# HG changeset patch
# User cvs
# Date 1186991015 -7200
# Node ID 0132846995bd6ac914cbeb246e94de9d009d229e
# Parent  4de2936b4e7727ac47e31562431397ef0f43f6c8
Import from CVS: tag r20-3b8

diff -r 4de2936b4e77 -r 0132846995bd CHANGES-beta
--- a/CHANGES-beta	Mon Aug 13 09:42:28 2007 +0200
+++ b/CHANGES-beta	Mon Aug 13 09:43:35 2007 +0200
@@ -1,5 +1,35 @@
 							-*- indented-text -*-
-to 20.3 beta7.
+to 20.3 beta8 "Copenhagen".
+-- Custom changes now saved in ~/.xemacs-custom and loaded automatically at
+   startup.
+-- oobr support binaries moved from lisp hierarchy to new top level
+   directory `pkg-src'.
+-- Viper-2.94 Courtesy of Michael Kifer
+-- Customizations from Hrvoje Niksic
+-- FAQ update from Andreas Kaempf
+-- New graphic cbx.gif added to etc, courtesy of Jens Lautenbacher,
+   `Created by XEmacs' suitable for adorning a web page.
+-- save-some-buffers now has an option to preview dirty buffers as
+   they are being offered for save.  Courtesy of David Bakhash.
+-- XEmacs compiles in 64 bit SGI environment courtesy of Olivier Galibert.
+-- Hardcoded -I/usr/local/include, -L/usr/local/include removed.
+-- edmacro.el-3.16
+-- mapvector is now a subr courtesy of Hrvoje Niksic
+-- new function archive-quit in arc-mode.el courtesy of Karl Hegbloom
+-- debug-on-error (round 2) courtesy of Hrvoje Niksic
+-- Gnus-5.4.59
+-- Build no longer depends on a list of .elc files listed in src/Makefile.in.in
+   (only important to developers).
+-- If a .xemacs file exists, use it in preference to .emacs.  If no .xemacs
+   use .emacs as usual.  The file loaded is left in `user-init-file'.
+-- Overhaul of XEmacs startup code, Part II.
+-- custom-1.9931
+-- Miscellaneous Ebola fixes
+-- New internal autoload generating function `batch-update-directory'.
+-- New file hippie-exp.el from Emacs/Mule zeta.
+-- Miscellaneous bug fixes
+
+to 20.3 beta7 "Oslo".
 -- Miscellaneous Ebola fixes
 -- hyper-apropos update courtesy of Hrvoje Niksic
 -- Make lib-complete deal with compressed .el files when not using Mule.
@@ -12,19 +42,19 @@
    Niksic
 -- Miscellaneous bug fixes
 
-to 20.3 beta6.
+to 20.3 beta6 "Moscow".
 -- Configure updates courtesy of Martin Buchholz
 -- Mule updates courtesy of MORIOKA Tomohiko
 -- Lots of Ebola cleanup, but much remains
 -- Miscellaneous bug fixes
 
-to 20.3 beta5.
+to 20.3 beta5 "Zagreb".
 -- Configure patches continued from Martin Buchholz
 -- Miscellaneous Bug Fixes from various people (see ChangeLogs)
 -- custom-1.9908
 -- Moved mule-doc/demo to etc/HELLO for the mule menu.
 
-to 20.3 beta4.
+to 20.3 beta4 "Warsaw".
 -- miscellaneous bug fixes
 -- various about.el additions & updates
 -- edmacro.el-3.15
diff -r 4de2936b4e77 -r 0132846995bd ChangeLog
--- a/ChangeLog	Mon Aug 13 09:42:28 2007 +0200
+++ b/ChangeLog	Mon Aug 13 09:43:35 2007 +0200
@@ -1,3 +1,45 @@
+1997-06-21  Steven L Baur  <steve@altair.xemacs.org>
+
+	* XEmacs 20.3-beta8 is released.
+
+1997-06-20  Olivier Galibert <Olivier.Galibert@mines.u-nancy.fr>
+
+	* lwlib/lwlib-Xaw.c, lwlib/lwlib-Xlw.c, lwlib/lwlib-Xm.c,
+	lwlib/lwlib.c:  Make 64 bit clean.
+	
+1997-06-20  Steven L Baur  <steve@altair.xemacs.org>
+
+	* etc/gnuserv.1: Updates and cleanup.
+	From Hrvoje Niksic <hniksic@srce.hr>
+
+1997-06-19  Martin Buchholz  <mrb@eng.sun.com>
+
+	* configure.in:
+	- Autodetect X defines using xmkmf.
+	- Compute rpath on *bsd* systems as well.
+	- rewrite PRINT_VAR m4 macro.
+	- detect sizes of void* and long long for future use by unex*.c
+
+1997-06-18  Martin Buchholz  <mrb@eng.sun.com>
+
+	* */Makefile.in.in: Another rewrite
+	Make makefiles immune from being mangled by various cpp
+	implementations by quoting non-preprocessor directive lines. 
+	- random cleanup
+	- Use $(RM) and $(pwd) macros consistently
+	- Add dependencies for balloon-help source files
+	- Use getcwd by default instead of getwd.
+	* lwlib/config.h:  Now includes src/config.h
+	* lwlib/*.c: Use config.h, but DON'T use Xos.h
+	* lib-src/*.c: Fix compiler warnings
+	* lisp/version.el:
+	- Put version information in version.sh instead of version.el
+
+Wed Jun 18 16:41:43 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+	* configure.in (CPP): Remove hardcoding of -L/usr/local/lib
+	-I/usr/local/include.
+
 1997-06-14  Steven L Baur  <steve@altair.xemacs.org>
 
 	* XEmacs 20.3-beta7 is released.
@@ -120,6 +162,28 @@
 	* lisp/gnus/smiley.el (smiley-deformed-regexp-alist): Add Japanese
 	smiley faces.
 
+1997-06-10  Gary D. Foster  <Gary.Foster@corp.sun.com>
+	
+	* lisp/modes/view-less.el: Changed \177 bindings to 'delete
+	* lisp/modes/help.el: Changed \177 bindings to 'delete
+
+1997-06-10  Gary D. Foster  <Gary.Foster@corp.sun.com>
+
+	* lisp/prim/keydefs.el: Changed all 'delete key bindings to point to
+	  the `backward-or-forward-foo' functions.
+	* lisp/prim/simple.el:
+	- Renamed `delete-erases-forward' to `delete-key-deletes-forward'.
+	- Removed `backspace-or-delete-hook'
+	- Renamed `backspace-or-delete' to `backward-or-forward-delete-char'
+	- Added functions: `backward-or-forward-kill-word'
+	 `backward-or-forward-kill-sentence'
+	 `backward-or-forward-kill-sexp'
+	- Removed the zmacs hacks from all the `b-or-f-foo' functions and
+	  began playing nicely with pending-del.
+	* lisp/modes/cc-mode.el:
+	* lisp/modes/cperl-mode.el: Fixed references to delete functions
+	  to use the new names.
+	
 1997-06-09  Steven L Baur  <steve@altair.xemacs.org>
 
 	* XEmacs 20.3-b5 is released.
@@ -174,11 +238,23 @@
 	- Sun sound in non-standard dirs now works
 	- --native-sound-lib no longer ignored on HP & SGI
 	- gpm configure tests moved after curses configure tests
+
+1997-06-04  Gary D. Foster  <Gary.Foster@corp.sun.com>
+
+	* lisp/modes/cc-mode.el: Modified `c-electric-delete' to honor the 
+	  desired delete direction in both normal and "hungry" modes.
+	* lisp/modes/cperl-mode.el: Modified `cperl-electric-backspace' to 
+	  honor the desired delete direction.
 	
 1997-05-30  Martin Buchholz  <mrb@eng.sun.com>
 
 	* configure.in: Automagically compute -R path for gcc
 
+1997-05-30  Gary D. Foster  <Gary.Foster@corp.sun.com>
+
+	* lisp/vm/vm-vars.el: Fixed delete key binding to call
+	  `vm-scroll-down'
+	
 Thu May 29 15:35:07 1997  Martin Buchholz  <mrb@eng.sun.com>
 
 	* configure.in: Add support for Solaris2.6 -z ignore linker flags
@@ -188,6 +264,18 @@
 	* configure.in: Replace standard Autoconf MMAP test with Neal
 	Becker's replacement, hacked somewhat.
 
+1997-05-16  Gary D. Foster  <Gary.Foster@corp.sun.com>
+
+	* lisp/prim/simple.el: Created `backspace-or-delete' function and
+	  `backspace-or-delete-hook'
+	* lisp/prim/keydefs.el: Changed \177 bindings to point to new
+	  delete function.
+	* lisp/modes/*.el: Removed conflicting \177 bindings.
+	* lisp/modes/cc-mode.el: Modified `c-electric-delete' to use new
+	  delete bindings.
+	* lisp/modes/cperl-mode.el: Modified `cperl-electric-backspace' to 
+	  use new delete bindings.
+	
 1997-06-03  MORIOKA Tomohiko  <morioka@jaist.ac.jp>
 
 	* lisp/x11/x-menubar.el (default-menubar): Add menu for Mule.
diff -r 4de2936b4e77 -r 0132846995bd Makefile.in
--- a/Makefile.in	Mon Aug 13 09:42:28 2007 +0200
+++ b/Makefile.in	Mon Aug 13 09:43:35 2007 +0200
@@ -1,237 +1,239 @@
-# DIST: This is the distribution Makefile for XEmacs.  configure can
-# DIST: make most of the changes to this file you might want, so try
-# DIST: that first.
+## DIST: This is the distribution Makefile for XEmacs.  configure can
+## DIST: make most of the changes to this file you might want, so try
+## DIST: that first.
 
-# This file is part of XEmacs.
+## 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 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.
+## 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.
+## 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.
 
-# make all	to compile and build XEmacs.
-# make install	to build and install it.
-# make install-only	to install after a previous complete build
-# make TAGS	to update tags tables.
-#
-# make clean  or  make mostlyclean
-#      Delete all files from the current directory that are normally
-#      created by building the program.	 Don't delete the files that
-#      record the configuration.  Also preserve files that could be made
-#      by building, but normally aren't because the distribution comes
-#      with them.
-#
-#      Delete `.dvi' files here if they are not part of the distribution.
-#
-# make distclean
-#      Delete all files from the current directory that are created by
-#      configuring or building the program.  If you have unpacked the
-#      source and built the program without creating any other files,
-#      `make distclean' should leave only the files that were in the
-#      distribution.
-#
-# make realclean
-#      Delete everything from the current directory that can be
-#      reconstructed with this Makefile.  This typically includes
-#      everything deleted by distclean, plus more: C source files
-#      produced by Bison, tags tables, info files, and so on.
-#
-# make extraclean
-#      Still more severe - delete backup and autosave files, too.
+## make all	to compile and build XEmacs.
+## make install	to build and install it.
+## make install-only	to install after a previous complete build
+## make TAGS	to update tags tables.
+
+## make clean  or  make mostlyclean
+##      Delete all files from the current directory that are normally
+##      created by building the program.	 Don't delete the files that
+##      record the configuration.  Also preserve files that could be made
+##      by building, but normally aren't because the distribution comes
+##      with them.
+
+##      Delete `.dvi' files here if they are not part of the distribution.
+
+## make distclean
+##      Delete all files from the current directory that are created by
+##      configuring or building the program.  If you have unpacked the
+##      source and built the program without creating any other files,
+##      `make distclean' should leave only the files that were in the
+##      distribution.
+
+## make realclean
+##      Delete everything from the current directory that can be
+##      reconstructed with this Makefile.  This typically includes
+##      everything deleted by distclean, plus more: C source files
+##      produced by Bison, tags tables, info files, and so on.
+
+## make extraclean
+##      Still more severe - delete backup and autosave files, too.
 
 SHELL = /bin/sh
 @SET_MAKE@
 
-# ==================== Things `configure' Might Edit ====================
+## ==================== Things `configure' Might Edit ====================
 
 CC=@CC@
 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.
+## These help us choose version- and architecture-specific directories
+## to install files in.
 
-### This should be the number of the XEmacs version we're building,
-### like `19.12' or `19.13'.
+## This should be the number of the XEmacs version we're building,
+## like `19.12' or `19.13'.
 version=@version@
 
-### This should be the name of the configuration we're building XEmacs
-### for, like `mips-dec-ultrix' or `sparc-sun-sunos'.
+## This should be the name of the configuration we're building XEmacs
+## for, like `mips-dec-ultrix' or `sparc-sun-sunos'.
 configuration=@configuration@
 
-# ==================== Where To Install Things ====================
+## ==================== Where To Install Things ====================
 
-# The default location for installation.  Everything is placed in
-# subdirectories of this directory.  The default values for many of
-# the variables below are expressed in terms of this one, so you may
-# not need to change them.  This defaults to /usr/local.
+## The default location for installation.  Everything is placed in
+## subdirectories of this directory.  The default values for many of
+## the variables below are expressed in terms of this one, so you may
+## not need to change them.  This defaults to /usr/local.
 prefix=@prefix@
 
-# Like `prefix', but used for architecture-specific files.
+## Like `prefix', but used for architecture-specific files.
 exec_prefix=@exec_prefix@
 
-# Where to install XEmacs and other binaries that people will want to
-# run directly (like etags).
+## Where to install XEmacs and other binaries that people will want to
+## run directly (like etags).
 bindir=@bindir@
 
-# Where to install architecture-independent data files.	 ${lispdir}
-# and ${etcdir} are subdirectories of this.
+## Where to install architecture-independent data files.
+## ${lispdir} and ${etcdir} are subdirectories of this.
 datadir=@datadir@
 
 pkgdir=@pkgdir@
 
-# Where to install and expect the files that XEmacs modifies as it
-# runs.	 These files are all architecture-independent. Right now, the
-# only such data is the locking directory; ${lockdir} is a
-# subdirectory of this.
+## Where to install and expect the files that XEmacs modifies as it runs.
+## These files are all architecture-independent. Right now, the
+## only such data is the locking directory;
+## ${lockdir} is a subdirectory of this.
 statedir=@statedir@
 
-# Where to install and expect executable files to be run by XEmacs
-# rather than directly by users, and other architecture-dependent
-# data.	 ${archlibdir} is a subdirectory of this.
+## Where to install and expect executable files to be run by XEmacs
+## rather than directly by users, and other architecture-dependent data
+## ${archlibdir} is a subdirectory of this.
 libdir=@libdir@
 
-# Where to install XEmacs's man pages, and what extension they should have.
+## Where to install XEmacs's man pages, and what extension they should have.
 mandir=@mandir@
 manext=.1
 
-# Where to install and expect the info files describing XEmacs.	In the
-# past, this defaulted to a subdirectory of ${prefix}/lib/xemacs, but
-# since there are now many packages documented with the texinfo
-# system, it is inappropriate to imply that it is part of XEmacs.
+## Where to install and expect the info files describing XEmacs.	In the
+## past, this defaulted to a subdirectory of ${prefix}/lib/xemacs, but
+## since there are now many packages documented with the texinfo
+## system, it is inappropriate to imply that it is part of XEmacs.
 infodir=@infodir@
 
-# This is set to 'yes' if the user specified the --infodir flag at
-# configuration time.
+## This is set to 'yes' if the user specified the --infodir flag at
+## configuration time.
 infodir_user_defined=@infodir_user_defined@
 
-# Where to find the source code.  The source code for XEmacs's C kernel is
-# expected to be in ${srcdir}/src, and the source code for XEmacs's
-# utility programs is expected to be in ${srcdir}/lib-src.  This is
-# set by the configure script's `--srcdir' option.
+## Where to find the source code.  The source code for XEmacs's C kernel is
+## expected to be in ${srcdir}/src, and the source code for XEmacs's
+## utility programs is expected to be in ${srcdir}/lib-src.  This is
+## set by the configure script's `--srcdir' option.
 srcdir=@srcdir@
 
-# ==================== XEmacs-specific directories ====================
+## ==================== XEmacs-specific directories ====================
 
-# These variables hold the values XEmacs will actually use.  They are
-# based on the values of the standard Make variables above.
+## These variables hold the values XEmacs will actually use.  They are
+## based on the values of the standard Make variables above.
 
-# Where to install the lisp files distributed with
-# XEmacs.  This includes the XEmacs version, so that the
-# lisp files for different versions of XEmacs will install
-# themselves in separate directories.
+## Where to install the lisp files distributed with
+## XEmacs.  This includes the XEmacs version, so that the
+## lisp files for different versions of XEmacs will install
+## themselves in separate directories.
 lispdir=@lispdir@
 
-# This is set to 'yes' if the user specified the --lispdir or
-# --datadir flag at configuration time.
+## This is set to 'yes' if the user specified the --lispdir or
+## --datadir flag at configuration time.
 lispdir_user_defined=@lispdir_user_defined@
 
-# Directories XEmacs should search for lisp files specific
-# to this site (i.e. customizations), before consulting
-# ${lispdir}.  This should be a colon-separated list of
-# directories.
+## Directories XEmacs should search for lisp files specific
+## to this site (i.e. customizations), before consulting
+## ${lispdir}.  This should be a colon-separated list of
+## directories.
 sitelispdir=@sitelispdir@
 
-# Where XEmacs will search for its lisp files while
-# building.  This is only used during the process of
-# compiling XEmacs, to help XEmacs find its lisp files
-# before they've been installed in their final location.
-# It's usually identical to lispdir, except that the
-# entry for the directory containing the installed lisp
-# files has been replaced with ../lisp.  This should be a
-# colon-separated list of directories.
+## Where XEmacs will search for its lisp files while
+## building.  This is only used during the process of
+## compiling XEmacs, to help XEmacs find its lisp files
+## before they've been installed in their final location.
+## It's usually identical to lispdir, except that the
+## entry for the directory containing the installed lisp
+## files has been replaced with ../lisp.  This should be a
+## colon-separated list of directories.
 buildlispdir=${srcdir}/lisp
 
-# Where to install the other architecture-independent
-# data files distributed with XEmacs (like the tutorial,
-# the cookie recipes and the Zippy database). This path
-# usually contains the XEmacs version number, so the data
-# files for multiple versions of XEmacs may be installed
-# at once.
+## Where to install the other architecture-independent
+## data files distributed with XEmacs (like the tutorial,
+## the cookie recipes and the Zippy database). This path
+## usually contains the XEmacs version number, so the data
+## files for multiple versions of XEmacs may be installed
+## at once.
 etcdir=@etcdir@
 
-# This is set to 'yes' if the user specified the --etcdir or
-# --datadir flag at configuration time.
+## This is set to 'yes' if the user specified the --etcdir or
+## --datadir flag at configuration time.
 etcdir_user_defined=@etcdir_user_defined@
 
-# Where to create and expect the locking directory, where
-# the XEmacs locking code keeps track of which files are
-# currently being edited.
+## Where to create and expect the locking directory, where
+## the XEmacs locking code keeps track of which files are
+## currently being edited.
 lockdir=@lockdir@
 
-# This is set to 'yes' if the user specified the --lockdir or
-# --statedir flag at configuration time.
+## This is set to 'yes' if the user specified the --lockdir or
+## --statedir flag at configuration time.
 lockdir_user_defined=@lockdir_user_defined@
 
-# Where to put executables to be run by XEmacs rather than
-# the user.  This path usually includes the XEmacs version
-# and configuration name, so that multiple configurations
-# for multiple versions of XEmacs may be installed at
-# once.
+## Where to put executables to be run by XEmacs rather than
+## the user.  This path usually includes the XEmacs version
+## and configuration name, so that multiple configurations
+## for multiple versions of XEmacs may be installed at
+## once.
 archlibdir=@archlibdir@
 
-# This is set to 'yes' if the user specified any of --exec-prefix,
-# --libdir or --archlibdir at configuration time.
+## This is set to 'yes' if the user specified any of --exec-prefix,
+## --libdir or --archlibdir at configuration time.
 archlibdir_user_defined=@archlibdir_user_defined@
 
-# ==================== Utility Programs for the Build ====================
+## ==================== Utility Programs for the Build ====================
 
-# Allow the user to specify the install program.
+## Allow the user to specify the install program.
 INSTALL = @INSTALL@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_DATA = @INSTALL_DATA@
 
-# ============================= Targets ==============================
+## ============================= Targets ==============================
 
-# Subdirectories to make recursively.  `lisp' is not included
-# because the compiled lisp files are part of the distribution
-# and you cannot remake them without installing XEmacs first.
+## Subdirectories to make recursively.  `lisp' is not included
+## because the compiled lisp files are part of the distribution
+## and you cannot remake them without installing XEmacs first.
 MAKE_SUBDIR = @MAKE_SUBDIR@
 
-# Subdirectories that can be made recursively.
+## Subdirectories that can be made recursively.
 SUBDIR = ${MAKE_SUBDIR} man
 
-# The makefiles of the directories in ${MAKE_SUBDIR}.
+## The makefiles of the directories in ${MAKE_SUBDIR}.
 SUBDIR_MAKEFILES = @SUBDIR_MAKEFILES@
 
-# Subdirectories to install, and where they'll go.
-# lib-src's makefile knows how to install it, so we don't do that here.
-# When installing the info files, we need to do special things to
-# avoid nuking an existing dir file, so we don't do that here;
-# instead, we have written out explicit code in the `install' targets.
+## Subdirectories to install, and where they'll go.
+## lib-src's makefile knows how to install it, so we don't do that here.
+## When installing the info files, we need to do special things to
+## avoid nuking an existing dir file, so we don't do that here;
+## instead, we have written out explicit code in the `install' targets.
 COPYDIR = ${srcdir}/etc ${srcdir}/lisp
 COPYDESTS = ${etcdir} ${lispdir}
-GENERATED_HEADERS = src/paths.h src/Emacs.ad.h src/config.h src/puresize_adjust.h
+GENERATED_HEADERS = src/paths.h src/Emacs.ad.h src/puresize_adjust.h src/config.h lwlib/config.h
 
 all:	${GENERATED_HEADERS} ${MAKE_SUBDIR}
 
-# For performance and consistency, no built-in rules
+## For performance and consistency, no built-in rules
 .SUFFIXES:
 
 .NO_PARALLEL:	${GENERATED_HEADERS} ${MAKE_SUBDIR} dump-elcs
 .PHONY: ${SUBDIR} all beta all-elc all-elcs dump-elc dump-elcs autoloads
 
-# Convenience target for XEmacs beta testers
+## Convenience target for XEmacs beta testers
 beta:	clean all-elc
 
-# Build XEmacs and recompile out-of-date and missing .elc files along
-# the way.
+## Build XEmacs and recompile out-of-date and missing .elc files along
+## the way.
 all-elc all-elcs:   lib-src lwlib dump-elcs src
 	MAKE='$(MAKE)' sh ${srcdir}/lib-src/update-elc.sh
 
-# Sub-target for all-elc.
+## 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}'
@@ -239,15 +241,15 @@
 autoloads:	src
 	MAKE='$(MAKE)' sh ${srcdir}/lib-src/update-autoloads.sh
 
-# We force the rebuilding of src/paths.h because the user might give
-# different values for the various directories.  Since we use
-# move-if-change, src/paths.h only actually changes if the user did
-# something notable, so the only unnecessary work we do is in building
-# src/paths.h.tmp, which isn't much.  Note that sed is not in /bin on
-# 386bsd.
+## We force the rebuilding of src/paths.h because the user might give
+## different values for the various directories.  Since we use
+## move-if-change, src/paths.h only actually changes if the user did
+## something notable, so the only unnecessary work we do is in building
+## src/paths.h.tmp, which isn't much.  Note that sed is not in /bin on
+## 386bsd.
 src/paths.h: Makefile ${srcdir}/src/paths.h.in FRC.src.paths.h
 	@echo "Producing \`src/paths.h' from \`src/paths.h.in'."
-	@-rm -f src/paths.h.tmp
+	@$(RM) src/paths.h.tmp
 	@cp ${srcdir}/src/paths.h.in src/paths.h.tmp
 	@-chmod 0644 src/paths.h.tmp
 	@(echo '#define PATH_PREFIX "${prefix}"'; \
@@ -273,12 +275,12 @@
 	fi; ) >> src/paths.h.tmp; \
 	sh ${srcdir}/move-if-change src/paths.h.tmp src/paths.h
 
-# We have to force the building of Emacs.ad.h as well in order to get it
-# updated correctly when VPATH is being used.  Since we use move-if-change,
-# it will only actually change if the user modified ${etcdir}/Emacs.ad.
+## We have to force the building of Emacs.ad.h as well in order to get it
+## updated correctly when VPATH is being used.  Since we use move-if-change,
+## it will only actually change if the user modified ${etcdir}/Emacs.ad.
 src/Emacs.ad.h: ${srcdir}/etc/Emacs.ad
 	@echo "Producing \`src/Emacs.ad.h' from \`etc/Emacs.ad'."
-	-rm -f src/Emacs.ad.h
+	@$(RM) src/Emacs.ad.h
 	@(echo "/*	Do not edit this file!" ; \
 	  echo "  	Automatically generated from ${srcdir}/etc/Emacs.ad" ; \
 	  echo " */" ; \
@@ -294,6 +296,8 @@
 src:	@SRC_SUBDIR_DEPS@ FRC.src
 lib-src: FRC.lib-src
 lwlib:	FRC.lwlib
+dynodump: FRC.dynodump
+FRC.src FRC.lib-src FRC.lwlib FRC.dynodump:
 
 .RECURSIVE: ${SUBDIR}
 
@@ -313,10 +317,13 @@
 lwlib/Makefile: ${srcdir}/lwlib/Makefile.in.in config.status
 	./config.status
 
+lwlib/config.h: ${srcdir}/lwlib/config.h.in
+	./config.status && touch $@
+
 src/config.h: ${srcdir}/src/config.h.in
-	./config.status
+	./config.status && touch $@
 
-# ==================== Installation ====================
+## ==================== Installation ====================
 
 ## If we let lib-src do its own installation, that means we
 ## don't have to duplicate the list of utilities to install in
@@ -346,62 +353,58 @@
 install: all install-arch-dep install-arch-indep;
 
 install-arch-dep: mkdir
-	(cd lib-src && \
+	cd lib-src && \
 	  $(MAKE) install $(MFLAGS) prefix=${prefix} \
 	    exec_prefix=${exec_prefix} bindir=${bindir} libdir=${libdir} \
-	    archlibdir=${archlibdir})
-	if [ `(cd ${archlibdir} && /bin/pwd)` != `(cd ./lib-src && /bin/pwd)` ]; \
+	    archlibdir=${archlibdir}
+	if [ `(cd ${archlibdir} && $(pwd))` != `(cd ./lib-src && $(pwd))` ]; \
 	then \
 	   ${INSTALL_DATA} lib-src/DOC ${archlibdir}/DOC ; \
 	   for subdir in `find ${archlibdir} -type d ! -name RCS ! -name SCCS ! -name CVS -print` ; do \
-	     rm -rf $${subdir}/RCS $${subdir}/CVS $${subdir}/SCCS ; \
-	     rm -f  $${subdir}/\#* $${subdir}/*~ ; \
+	     (cd $${subdir} && $(RM) -r RCS CVS SCCS \#* *~) ;
 	   done ; \
 	else true; fi
 	${INSTALL_PROGRAM} src/xemacs ${bindir}/xemacs-${version}
 	-chmod 0755 ${bindir}/xemacs-${version}
-	rm -f ${bindir}/xemacs
-	(cd ${bindir} && ${LN_S} xemacs-${version} ./xemacs)
+	$(RM) ${bindir}/xemacs
+	cd ${bindir} && ${LN_S} xemacs-${version} ./xemacs
 
 install-arch-indep: mkdir
-	-set ${COPYDESTS} ; \
+	-@set ${COPYDESTS} ; \
 	 for dir in ${COPYDIR} ; do \
-	   if [ `(cd $$1 && pwd)` != `(cd $${dir} && pwd)` ] ; then \
-	     echo "rm -rf $$1" ; \
+	   if [ `(cd $$1 && $(pwd))` != `(cd $${dir} && $(pwd))` ] ; then \
+	     : do nothing - echo "rm -rf $$1" ; \
 	   fi ; \
 	   shift ; \
 	 done
 	-set ${COPYDESTS} ; \
-	 mkdir ${COPYDESTS} ; \
+	 for dir in ${COPYDESTS} ; do test -d $${dir} || mkdir $${dir} ; done ; \
 	 for dir in ${COPYDIR} ; do \
 	   dest=$$1 ; shift ; \
-	   [ -d $${dir} ] \
-	   && [ `(cd $${dir} && /bin/pwd)` != `(cd $${dest} && /bin/pwd)` ] \
+	   test -d $${dir} \
+	     -a `(cd $${dir} && $(pwd))` != `(cd $${dest} && $(pwd))` \
 	   && (echo "Copying $${dir}..." ; \
 	       (cd $${dir} && tar -cf - . ) | \
 		(cd $${dest} && umask 022 && tar -xf - );\
 	       chmod 0755 $${dest}; \
 	       for subdir in `find $${dest} -type d ! -name RCS ! -name SCCS ! -name CVS -print` ; do \
-		 rm -rf $${subdir}/RCS $${subdir}/CVS $${subdir}/SCCS ; \
-		 rm -f  $${subdir}/\#* $${subdir}/*~ ; \
+		 (cd $${subdir} && $(RM) -r RCS CVS SCCS \#* *~) ; \
 	       done) ; \
 	 done
-	if [ `(cd ${srcdir}/info && /bin/pwd)` != `(cd ${infodir} && /bin/pwd)` ]; \
-	then \
-	  (cd ${srcdir}/info && \
-	   if [ ! -f ${infodir}/dir ] && [ -f dir ]; then \
-	     ${INSTALL_DATA} ${srcdir}/info/dir ${infodir}/dir ; \
-	   fi ; \
-	   for f in *.info* ; do \
-	     ${INSTALL_DATA} ${srcdir}/info/$$f ${infodir}/$$f ; \
-	     chmod 0644 ${infodir}/$$f; \
-	   done); \
-	else true; fi
-	cd ${srcdir}/etc && for page in xemacs etags ctags gnuserv \
-				      gnuclient gnuattach gnudoit ; do \
-	  ${INSTALL_DATA} ${srcdir}/etc/$${page}.1 ${mandir}/$${page}${manext} ; \
-	  chmod 0644 ${mandir}/$${page}${manext} ; \
-	done
+	if test `(cd ${srcdir}/info && $(pwd))` != `(cd ${infodir} && $(pwd))` && cd ${srcdir}/info; then \
+	  if test ! -f ${infodir}/dir -a -f dir ; then \
+	    ${INSTALL_DATA} ${srcdir}/info/dir ${infodir}/dir ; \
+	  fi ; \
+	  for file in *.info* ; do \
+	    ${INSTALL_DATA} $${file} ${infodir}/$${file} ; \
+	    chmod 0644 ${infodir}/$${file}; \
+	  done ; \
+	fi
+	cd ${srcdir}/etc && \
+	  for page in xemacs etags ctags gnuserv gnuclient gnuattach gnudoit; do \
+	    ${INSTALL_DATA} ${srcdir}/etc/$${page}.1 ${mandir}/$${page}${manext} ; \
+	    chmod 0644 ${mandir}/$${page}${manext} ; \
+	  done
 	@echo "If you would like to save approximately 15M of disk space, do"
 	@echo "make gzip-el"
 	@echo "or you may run "
@@ -413,20 +416,20 @@
 	lib-src/gzip-el.sh ${lispdir}
 
 MAKEPATH=./lib-src/make-path
-### Build all the directories we're going to install XEmacs in.	Since
-### we may be creating several layers of directories (for example,
-### /usr/local/lib/xemacs-19.13/mips-dec-ultrix4.2), we use make-path
-### instead of mkdir.  Not all systems' mkdirs have the `-p' flag.
+## Build all the directories we're going to install XEmacs in.	Since
+## we may be creating several layers of directories (for example,
+## /usr/local/lib/xemacs-19.13/mips-dec-ultrix4.2), we use make-path
+## instead of mkdir.  Not all systems' mkdirs have the `-p' flag.
 mkdir: FRC.mkdir
 	${MAKEPATH} ${COPYDESTS} ${lockdir} ${infodir} ${mandir} \
 	  ${bindir} ${datadir} ${libdir} ${sitelispdir} ${pkdir}
 	-chmod 0777 ${lockdir}
 
-### Delete all the installed files that the `install' target would
-### create (but not the noninstalled files such as `make all' would
-### create).
-###
-### Don't delete the lisp and etc directories if they're in the source tree.
+## Delete all the installed files that the `install' target would
+## create (but not the noninstalled files such as `make all' would
+## create).
+
+#### Don't delete the lisp and etc directories if they're in the source tree.
 #### This target has not been updated in sometime and until it is it
 #### would be extremely dangerous for anyone to use it.
 #uninstall:
@@ -435,107 +438,102 @@
 #	    prefix=${prefix} exec_prefix=${exec_prefix}	\
 #	    bindir=${bindir} libdir=${libdir} archlibdir=${archlibdir})
 #	for dir in ${lispdir} ${etcdir} ; do 		\
-#	  case `(cd $${dir} ; pwd)` in			\
-#	    `(cd ${srcdir} ; pwd)`* ) ;;		\
-#	    * ) rm -rf $${dir} ;;			\
+#	  case `(cd $${dir} ; $(pwd))` in			\
+#	    `(cd ${srcdir} ; $(pwd))`* ) ;;		\
+#	    * ) $(RM) $${dir} ;;			\
 #	  esac ;					\
 #	  case $${dir} in				\
 #	    ${datadir}/xemacs/${version}/* )		\
-#	      rm -rf ${datadir}/xemacs/${version}	\
+#	      $(RM) -r ${datadir}/xemacs/${version}	\
 #	    ;;						\
 #	  esac ;					\
 #	done
-#	(cd ${infodir} && rm -f cl* xemacs* forms* info* vip*)
-#	(cd ${mandir} && rm -f xemacs.1 etags.1 ctags.1 gnuserv.1)
-#	(cd ${bindir} && rm -f xemacs-${version} xemacs)
+#	cd ${infodir} && $(RM) cl* xemacs* forms* info* vip*
+#	cd ${mandir} && $(RM) xemacs.1 etags.1 ctags.1 gnuserv.1
+#	cd ${bindir} && $(RM) xemacs-${version} xemacs
 
 
-### Some makes seem to remember that they've built something called FRC,
-### so you can only use a given FRC once per makefile.
-FRC FRC.src.paths.h FRC.src FRC.lib-src FRC.lwlib FRC.mkdir FRC.dump-elcs:
-FRC.mostlyclean FRC.clean FRC.distclean FRC.realclean:
+## Some makes seem to remember that they've built something called FRC,
+## so you can only use a given FRC once per makefile.
+FRC FRC.src.paths.h FRC.mkdir FRC.dump-elcs:
+FRC.mostlyclean FRC.clean FRC.distclean FRC.realclean FRC.tags:
 
-# ==================== Cleaning up and miscellanea ====================
+## ==================== Cleaning up and miscellanea ====================
 
 .PHONY: mostlyclean clean distclean realclean extraclean
 
-### `mostlyclean'
-###      Like `clean', but may refrain from deleting a few files that people
-###      normally don't want to recompile.  For example, the `mostlyclean'
-###      target for GCC does not delete `libgcc.a', because recompiling it
-###      is rarely necessary and takes a lot of time.
+## `mostlyclean'
+##      Like `clean', but may refrain from deleting a few files that people
+##      normally don't want to recompile.  For example, the `mostlyclean'
+##      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 $(MAKE_SUBDIR); do (cd $$d && $(MAKE) $(MFLAGS) $@); done
-	-(cd man && $(MAKE) $(MFLAGS) $@)
+	for d in $(SUBDIR); do (cd $$d && $(MAKE) $(MFLAGS) $@); done
+
+## `clean'
+##      Delete all files from the current directory that are normally
+##      created by building the program.  Don't delete the files that
+##      record the configuration.  Also preserve files that could be made
+##      by building, but normally aren't because the distribution comes
+##      with them.
 
-### `clean'
-###      Delete all files from the current directory that are normally
-###      created by building the program.  Don't delete the files that
-###      record the configuration.  Also preserve files that could be made
-###      by building, but normally aren't because the distribution comes
-###      with them.
-###
-###      Delete `.dvi' files here if they are not part of the distribution.
+##      Delete `.dvi' files here if they are not part of the distribution.
 clean: FRC.clean
-	for d in $(MAKE_SUBDIR); do (cd $$d && $(MAKE) $(MFLAGS) $@); done
-	-(cd man && $(MAKE) $(MFLAGS) $@)
-	rm -f core
+	for d in $(SUBDIR); do (cd $$d && $(MAKE) $(MFLAGS) $@); done
+	$(RM) core
 
-### `distclean'
-###      Delete all files from the current directory that are created by
-###      configuring or building the program.  If you have unpacked the
-###      source and built the program without creating any other files,
-###      `make distclean' should leave only the files that were in the
-###      distribution.
+## `distclean'
+##      Delete all files from the current directory that are created by
+##      configuring or building the program.  If you have unpacked the
+##      source and built the program without creating any other files,
+##      `make distclean' should leave only the files that were in the
+##      distribution.
 top_distclean=\
-	rm -f config.status config.log config-tmp-* build-install Installation ; \
+	$(RM) config.status config.log config-tmp-* build-install Installation ; \
 	for d in src lib-src lwlib dynodump ; do \
-	  rm -f $$d/Makefile $$d/Makefile.in ; \
+	  $(RM) $$d/Makefile $$d/Makefile.in ; \
 	done ; \
-	rm -f core .sbinit Makefile lock/*
+	$(RM) core .sbinit Makefile lock/*
 
 distclean: FRC.distclean
-	-for d in lock site-lisp; do test -d $$d || mkdir $$d; done
-	for d in $(MAKE_SUBDIR); do (cd $$d && $(MAKE) $(MFLAGS) $@); done
-	-(cd man && $(MAKE) $(MFLAGS) $@)
+	for d in lock site-lisp; do test -d $$d || mkdir $$d; done
+	for d in $(SUBDIR); do (cd $$d && $(MAKE) $(MFLAGS) $@); done
 	-${top_distclean}
 
-### `realclean'
-###      Delete everything from the current directory that can be
-###      reconstructed with this Makefile.  This typically includes
-###      everything deleted by distclean, plus more: C source files
-###      produced by Bison, tags tables, info files, and so on.
-###
-###      One exception, however: `make realclean' should not delete
-###      `configure' even if `configure' can be remade using a rule in the
-###      Makefile.  More generally, `make realclean' should not delete
-###      anything that needs to exist in order to run `configure' and then
-###      begin to build the program.
+## `realclean'
+##      Delete everything from the current directory that can be
+##      reconstructed with this Makefile.  This typically includes
+##      everything deleted by distclean, plus more: C source files
+##      produced by Bison, tags tables, info files, and so on.
+
+##      One exception, however: `make realclean' should not delete
+##      `configure' even if `configure' can be remade using a rule in the
+##      Makefile.  More generally, `make realclean' should not delete
+##      anything that needs to exist in order to run `configure' and then
+##      begin to build the program.
 realclean: FRC.realclean
-	for d in $(MAKE_SUBDIR); do (cd $$d && $(MAKE) $(MFLAGS) $@); done
-	-(cd man && $(MAKE) $(MFLAGS) $@)
+	for d in $(SUBDIR); do (cd $$d && $(MAKE) $(MFLAGS) $@); done
 	-${top_distclean}
 
-### This doesn't actually appear in the coding standards, but Karl
-### says GCC supports it, and that's where the configuration part of
-### the coding standards seem to come from.  It's like distclean, but
-### it deletes backup and autosave files too.
+## This doesn't actually appear in the coding standards, but Karl
+## says GCC supports it, and that's where the configuration part of
+## the coding standards seem to come from.  It's like distclean, but
+## it deletes backup and autosave files too.
 extraclean:
-	for d in $(MAKE_SUBDIR); do (cd $$d && $(MAKE) $(MFLAGS) $@); done
-	-(cd man && $(MAKE) $(MFLAGS) $@)
-	-rm -f *~ \#*
+	for d in $(SUBDIR); do (cd $$d && $(MAKE) $(MFLAGS) $@); done
+	$(RM) *~ \#*
 	-${top_distclean}
 
-### Unlocking and relocking.  The idea of these productions is to reduce
-### hassles when installing an incremental tar of XEmacs.  Do `make unlock'
-### before unlocking the file to take the write locks off all sources so
-### that tar xvof will overwrite them without fuss.  Then do `make relock'
-### afterward so that VC mode will know which files should be checked in
-### if you want to mung them.
-###
-### Note: it's no disaster if these productions miss a file or two; tar
-### and VC will swiftly let you know if this happens, and it is easily
-### corrected.
+## Unlocking and relocking.  The idea of these productions is to reduce
+## hassles when installing an incremental tar of XEmacs.  Do `make unlock'
+## before unlocking the file to take the write locks off all sources so
+## that tar xvof will overwrite them without fuss.  Then do `make relock'
+## afterward so that VC mode will know which files should be checked in
+## if you want to mung them.
+
+## Note: it's no disaster if these productions miss a file or two; tar
+## and VC will swiftly let you know if this happens, and it is easily
+## corrected.
 SOURCES = ChangeLog GETTING.GNU.SOFTWARE INSTALL Makefile.in PROBLEMS \
 	README build-install.in configure make-dist move-if-change
 
@@ -543,31 +541,31 @@
 
 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)
-	(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) unlock)
+	-cd elisp && chmod u+w Makefile README *.texi
+	cd etc     && $(MAKE) $(MFLAGS) unlock
+	cd lib-src && $(MAKE) $(MFLAGS) unlock
+	cd lisp    && $(MAKE) $(MFLAGS) unlock
+	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)
-	(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)
+	-cd elisp && chmod u-w Makefile README *.texi
+	cd etc     && $(MAKE) $(MFLAGS) relock
+	cd lib-src && $(MAKE) $(MFLAGS) relock
+	cd lisp    && $(MAKE) $(MFLAGS) relock
+	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."
-	@PATH=`pwd`/lib-src:$$PATH HOME=/-=-; export PATH HOME; \
+	@PATH=`$(pwd)`/lib-src:$$PATH HOME=/-=-; export PATH HOME; \
 	  echo "Using etags from `which etags`."
-	PATH=`pwd`/lib-src:$$PATH ; export PATH; cd ${srcdir} && \
+	PATH=`$(pwd)`/lib-src:$$PATH ; export PATH; cd ${srcdir} && \
 	etags --regex='/[ 	]*DEF\(VAR\|INE\)_[A-Z_]+[ 	]*([ 	]*"\([^"]+\)"/\2/' src/*.[ch] ; \
 	for d in `find lisp -name SCCS -prune -o -name RCS -prune -o -type d -print` ; do \
 	  (cd $$d && if [ "`echo *.el`" != "*.el" ] ; then etags -a -o ${srcdir}/TAGS *.el ; fi ) ; \
@@ -582,10 +580,11 @@
 
 info: FRC.info
 	cd ${srcdir}/man && $(MAKE) $(MFLAGS) $@
+
 dvi:
 	cd ${srcdir}/man && $(MAKE) $(MFLAGS) $@
 
-# Fix up version information in executables (Solaris-only)
+## Fix up version information in executables (Solaris-only)
 mcs:
 	date=`LANG=C LC_ALL=C date -u '+%e %b %Y'`; \
 	ident="@(#)RELEASE VERSION XEmacs ${version} $${date}"; \
diff -r 4de2936b4e77 -r 0132846995bd PROBLEMS
--- a/PROBLEMS	Mon Aug 13 09:42:28 2007 +0200
+++ b/PROBLEMS	Mon Aug 13 09:43:35 2007 +0200
@@ -1018,42 +1018,6 @@
 You *have* to compile your own jpeg lib. The one delivered with SGI
 systems is a C++ lib, which apparently XEmacs cannot cope with.
 
-** XEmacs won't build with the n32 environment on Irix 6.
-
-Olivier Galibert <Olivier.Galibert@mines.u-nancy.fr> writes:
-While making the OS and the compiler able to work on 64b
-architectures, SGI designed another mode for using registers
-and passing parameters between functions, activated on the
-compiler by using -64. Since it was much more efficient ar
-using registers even for 32b architectures, they designed
-a version for 32b called n32. And it _is_ really better.
-This mode should always be used when not using gcc (which
-can only do o32 afaik).
-
-Too bad xemacs can't do n32 out of the box. So here is what
-I had to do to compile it in this mode:
-
-s/irix6-0.h:
-- #define LD_SWITCH_SYSTEM -32
-+ #define LD_SWITCH_SYSTEM -n32 -G 0
-
-m/iris4d.h:
-- #define LIBS_MACHINE -lmld
-+ #define LIBS_MACHINE
-
-- #define C_SWITCH_MACHINE -32
-+ #define C_SWITCH_MACHINE -n32 -G 0
-
-(the mld lib does not exist in n32 mode)
-
-I also added a --cflags='-n32 -O2 -G 0 -s' to the configuration
-line but it seems that these flags are ignored for configure test
-and since o32 and n32 libraries are independant I had to revert
-to the CFLAGS env var.
-
-Anyway, once done that the compile has gone succesfully, the dump
-was OK and I'm writing this in the resulting xemacs-20.2b1 ;-)
-
 ** Slow startup on Linux.
 
 People using systems based on the Linux kernel sometimes report that
diff -r 4de2936b4e77 -r 0132846995bd configure
--- a/configure	Mon Aug 13 09:42:28 2007 +0200
+++ b/configure	Mon Aug 13 09:43:35 2007 +0200
@@ -770,9 +770,9 @@
 
 test "$extra_verbose" = "yes" && verbose=yes
 
-case "site_includes" in *:* ) site_includes="`echo '' $site_includes | sed -e 's:^ ::' -e 's/:/ /g'`";; esac
-case "site_libraries" in *:* ) site_libraries="`echo '' $site_libraries | sed -e 's:^ ::' -e 's/:/ /g'`";; esac
-case "site_runtime_libraries" in *:* ) site_runtime_libraries="`echo '' $site_runtime_libraries | sed -e 's:^ ::' -e 's/:/ /g'`";; esac
+case "$site_includes" in *:* ) site_includes="`echo '' $site_includes | sed -e 's:^ ::' -e 's/:/ /g'`";; esac
+case "$site_libraries" in *:* ) site_libraries="`echo '' $site_libraries | sed -e 's:^ ::' -e 's/:/ /g'`";; esac
+case "$site_runtime_libraries" in *:* ) site_runtime_libraries="`echo '' $site_runtime_libraries | sed -e 's:^ ::' -e 's/:/ /g'`";; esac
 
 test -n "$with_x" && with_x11="$with_x"
 
@@ -907,7 +907,7 @@
   romp-ibm-*       ) machine=ibmrt ;;
   rs6000-ibm-aix*  ) machine=ibmrs6000 ;;
   powerpc-ibm-aix* ) machine=ibmrs6000 ;;
-  powerpc-*-*      ) machine=powerpc ;;
+  powerpc*-*       ) machine=powerpc ;;
   hppa-*-*         ) machine=hp800 ;;
   m88k-dg-*        ) machine=aviion ;;
   m68*-sony-*      ) machine=news ;;
@@ -1148,13 +1148,13 @@
       m68*-sunos1* )	         machine=sun1     ;;
       m68*-sunos2* )	         machine=sun2     ;;
       m68* )		         machine=sun3     ;;
-      i[3-9]86*-sun-sunos[34]* ) machine=sun386 ;;
-      i[3-9]86-*-* )	         machine=intel386 ;;
+      i*86*-sun-sunos[34]* )   machine=sun386   ;;
+      i*86-*-* )	         machine=intel386 ;;
       rs6000* )                  machine=rs6000   ;;
     esac
 
         case "$canonical" in *-sunos5*)
-      canonical="`echo \"$canonical\" | sed -e s/sunos5/solaris2/`";;
+      canonical=`echo $canonical | sed -e s/sunos5/solaris2/`;;
     esac
 
                     case "$canonical" in
@@ -1167,28 +1167,31 @@
     esac
 
     case "$canonical" in
-            i[3-9]86-*-sunos4*) opsys=sunos4-0	;;
+      *-solaris*	  )
+	opsys=sol2
+	os_release=`uname -r | sed -e 's/^\([0-9]\)\.\([0-9]\).*/\1\2/'`
+	{ test "$extra_verbose" = "yes" && cat << EOF
+    Defining OS_RELEASE = $os_release
+EOF
+cat >> confdefs.h <<EOF
+#define OS_RELEASE $os_release
+EOF
+}
+ ;;
+
+            i*86-*-sunos4*      ) opsys=sunos4-0	;;
       *-sunos4.0*	  ) opsys=sunos4-0	;;
       *-sunos4.1.2*	  ) opsys=sunos4-1-2	;;
       *-sunos4.1.3*	  ) opsys=sunos4-1-3	;;
       *-sunos4.1.[4-9]* ) opsys=sunos4-1-4	;;
       *-sunos4* | *-sunos ) opsys=sunos4-1	;;
-
-      *-solaris2.3*	  ) opsys=sol2-3	;;
-      *-solaris2.4*	  ) opsys=sol2-4	;;
-      *-solaris2.5*	  ) opsys=sol2-5	;;
-      *-solaris2.[6-9]* ) opsys=sol2-6	;;
-      *-solaris*	  ) opsys=sol2		;;
-
       *-mach*		  ) opsys=mach-bsd4-3	;;
       *			  ) opsys=bsd4-2	;;
     esac
 
     case "$canonical" in *-sunos4*shr* ) opsys="${opsys}-shr" ;; esac
 
-        case "$canonical" in
-      *-solaris* ) case "$CC" in /usr/ucb/cc* ) CC="" ;; esac ;;
-    esac
+        test "$opsys $CC" = "sol2 /usr/ucb/cc" && CC=""
   ;;
 
     m68*-tadpole-sysv* ) machine=tad68k opsys=usg5-3 ;;
@@ -1268,7 +1271,7 @@
   esac
 elif test "$dynamic" = "no" ; then
   case "$opsys" in
-    sol2* | decosf1-3 | decosf3-* | decosf4-* | linux ) opsys="${opsys}-static" ;;
+    sol2 | decosf1-3 | decosf3-* | decosf4-* | linux ) opsys="${opsys}-static" ;;
   esac
 fi
 
@@ -1310,7 +1313,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:1314: checking for $ac_word" >&5
+echo "configure:1317: checking for $ac_word" >&5
 
 if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -1336,7 +1339,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:1340: checking for $ac_word" >&5
+echo "configure:1343: checking for $ac_word" >&5
 
 if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -1381,7 +1384,7 @@
 fi
 
 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:1385: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:1388: 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'
@@ -1393,11 +1396,11 @@
 cross_compiling=no
 
 cat > conftest.$ac_ext <<EOF
-#line 1397 "configure"
+#line 1400 "configure"
 #include "confdefs.h"
 main(){return(0);}
 EOF
-if { (eval echo configure:1401: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:1404: \"$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
@@ -1417,19 +1420,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:1421: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:1424: 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:1426: checking whether we are using GNU C" >&5
+echo "configure:1429: 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:1433: \"$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:1436: \"$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
@@ -1443,7 +1446,7 @@
   ac_save_CFLAGS="$CFLAGS"
   CFLAGS=
   echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:1447: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:1450: checking whether ${CC-cc} accepts -g" >&5
 
 echo 'void f(){}' > conftest.c
 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
@@ -1473,7 +1476,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:1477: checking for $ac_word" >&5
+echo "configure:1480: checking for $ac_word" >&5
 
 if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -1499,7 +1502,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:1503: checking for $ac_word" >&5
+echo "configure:1506: checking for $ac_word" >&5
 
 if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -1544,7 +1547,7 @@
 fi
 
 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:1548: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:1551: 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'
@@ -1556,11 +1559,11 @@
 cross_compiling=no
 
 cat > conftest.$ac_ext <<EOF
-#line 1560 "configure"
+#line 1563 "configure"
 #include "confdefs.h"
 main(){return(0);}
 EOF
-if { (eval echo configure:1564: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:1567: \"$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
@@ -1580,19 +1583,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:1584: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:1587: 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:1589: checking whether we are using GNU C" >&5
+echo "configure:1592: 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:1596: \"$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:1599: \"$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
@@ -1606,7 +1609,7 @@
   ac_save_CFLAGS="$CFLAGS"
   CFLAGS=
   echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:1610: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:1613: checking whether ${CC-cc} accepts -g" >&5
 
 echo 'void f(){}' > conftest.c
 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
@@ -1635,7 +1638,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:1639: checking for $ac_word" >&5
+echo "configure:1642: checking for $ac_word" >&5
 
 if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -1661,7 +1664,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:1665: checking for $ac_word" >&5
+echo "configure:1668: checking for $ac_word" >&5
 
 if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -1706,7 +1709,7 @@
 fi
 
 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:1710: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:1713: 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'
@@ -1718,11 +1721,11 @@
 cross_compiling=no
 
 cat > conftest.$ac_ext <<EOF
-#line 1722 "configure"
+#line 1725 "configure"
 #include "confdefs.h"
 main(){return(0);}
 EOF
-if { (eval echo configure:1726: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:1729: \"$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
@@ -1742,19 +1745,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:1746: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:1749: 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:1751: checking whether we are using GNU C" >&5
+echo "configure:1754: 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:1758: \"$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:1761: \"$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
@@ -1768,7 +1771,7 @@
   ac_save_CFLAGS="$CFLAGS"
   CFLAGS=
   echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:1772: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:1775: checking whether ${CC-cc} accepts -g" >&5
 
 echo 'void f(){}' > conftest.c
 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
@@ -1799,7 +1802,7 @@
 test -n "$NON_GNU_CPP" -a "$with_gcc" = "no" -a -z "$CPP" && CPP="$NON_GNU_CPP"
 
 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:1803: checking how to run the C preprocessor" >&5
+echo "configure:1806: checking how to run the C preprocessor" >&5
 # On Suns, sometimes $CPP names a directory.
 if test -n "$CPP" && test -d "$CPP"; then
   CPP=
@@ -1812,13 +1815,13 @@
   # On the NeXT, cc -E runs the code through the compiler's parser,
   # not just through cpp.
   cat > conftest.$ac_ext <<EOF
-#line 1816 "configure"
+#line 1819 "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:1822: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1825: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   :
@@ -1829,13 +1832,13 @@
   rm -rf conftest*
   CPP="${CC-cc} -E -traditional-cpp"
   cat > conftest.$ac_ext <<EOF
-#line 1833 "configure"
+#line 1836 "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:1839: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1842: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   :
@@ -1858,9 +1861,9 @@
 
 
 echo $ac_n "checking for AIX""... $ac_c" 1>&6
-echo "configure:1862: checking for AIX" >&5
-cat > conftest.$ac_ext <<EOF
-#line 1864 "configure"
+echo "configure:1865: checking for AIX" >&5
+cat > conftest.$ac_ext <<EOF
+#line 1867 "configure"
 #include "confdefs.h"
 #ifdef _AIX
   yes
@@ -1887,9 +1890,9 @@
 
 
 echo $ac_n "checking whether we are using SunPro C""... $ac_c" 1>&6
-echo "configure:1891: checking whether we are using SunPro C" >&5
-cat > conftest.$ac_ext <<EOF
-#line 1893 "configure"
+echo "configure:1894: checking whether we are using SunPro C" >&5
+cat > conftest.$ac_ext <<EOF
+#line 1896 "configure"
 #include "confdefs.h"
 
 int main() {
@@ -1899,7 +1902,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:1903: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1906: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   __sunpro_c=yes
 else
@@ -1929,6 +1932,7 @@
 #define LD_SWITCH_SITE
 #define LD_SWITCH_X_SITE
 #define LD_SWITCH_X_SITE_AUX
+#define OS_RELEASE '$os_release'
 #include "'$srcdir'/src/'$opsysfile'"
 #include "'$srcdir'/src/'$machfile'"
 
@@ -1953,6 +1957,17 @@
 configure___ libs_standard=LIB_STANDARD
 
 
+#ifndef OBJECTS_MACHINE
+#define OBJECTS_MACHINE
+#endif
+configure___ objects_machine=OBJECTS_MACHINE
+
+#ifndef OBJECTS_SYSTEM
+#define OBJECTS_SYSTEM
+#endif
+configure___ objects_system=OBJECTS_SYSTEM
+
+
 #ifndef C_SWITCH_MACHINE
 #define C_SWITCH_MACHINE
 #endif
@@ -1991,6 +2006,59 @@
 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
+configure___ ld_switch_shared=LD_SWITCH_SHARED
+
+
+#ifdef ORDINARY_LINK
+#define LD "$(CC) $(CFLAGS)"
+#else /* no ORDINARY LINK */
+#ifdef COFF_ENCAPSULATE
+#define LD "$(CC) -nostdlib"
+#else /* not COFF_ENCAPSULATE */
+#ifdef LINKER
+#define LD LINKER
+#else /* ! defined (LINKER) */
+#define LD "ld"
+#endif /* ! defined (LINKER) */
+#endif /* ! defined (COFF_ENCAPSULATE) */
+#endif /* not ORDINARY_LINK */
+configure___ ld=LD
+
+#ifndef LIB_GCC
+#define LIB_GCC
+#endif
+configure___ lib_gcc=LIB_GCC
+
+#ifndef LD_TEXT_START_ADDR
+#define LD_TEXT_START_ADDR
+#endif
+configure___ ld_text_start_addr=LD_TEXT_START_ADDR
+
+
+#if ! defined (ORDINARY_LINK) && !defined (START_FILES)
+#ifdef NO_REMAP
+#ifdef COFF_ENCAPSULATE
+#define START_FILES "pre-crt0.o /usr/local/lib/gcc-crt0.o"
+#else /* ! defined (COFF_ENCAPSULATE) */
+#define START_FILES "pre-crt0.o /lib/crt0.o"
+#endif /* ! defined (COFF_ENCAPSULATE) */
+#else /* ! defined (NO_REMAP) */
+#define START_FILES "ecrt0.o"
+#endif /* ! defined (NO_REMAP) */
+#endif /* no ORDINARY_LINK */
+#ifndef START_FILES
+#define START_FILES
+#endif
+configure___ start_files=START_FILES
+
 #ifdef ORDINARY_LINK
 configure___ ordinary_link=yes
 #else
@@ -2056,11 +2124,15 @@
 ' > $tempcname
 CPP=`eval "echo $CPP"`
 eval `$CPP -Isrc $tempcname \
-	| sed -n -e "s/ *=[ \"]*/='/" -e "s/[ \"]*\$/'/" -e "s/^configure___//p"`
+	| sed -n -e "s/[ \t]*=[ \t\"]*/='/" -e "s/[ \t\"]*\$/'/" -e "s/^configure___//p"`
 
 
 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 ""
+
+
 test "$ordinary_link" = "no" -a -z "$libs_standard" && libs_standard="-lc"
 
 if test -z "$CFLAGS"; then
@@ -2070,18 +2142,87 @@
       CFLAGS="$CFLAGS -fno-strength-reduce -malign-loops=2 -malign-jumps=2 -malign-functions=2"
   elif test "$__sunpro_c" = "yes"; then
     case "$opsys" in
-      sol2*   ) CFLAGS="-v -xO4" ;;
-      sunos4* ) CFLAGS="-xO3";;
+      sol2    ) CFLAGS="-v -xO4" ;;
+      sunos4* ) CFLAGS="-xO2";;
     esac
   else
     CFLAGS="-O" # The only POSIX-approved flag
   fi
 fi
 
-extra_objs="$extra_objs $unexec" &&  if test "$extra_verbose" = "yes"; then
+if test "$GCC" = "yes"; then
+    ld_switch_system_tmp="$ld_switch_system"; ld_switch_system=""
+  for arg in $ld_switch_system_tmp; do
+    case "$arg" in
+      -L* | -l* | -R* | -u* | -Wl* | -f* ) ld_switch_system="$ld_switch_system $arg" ;;
+      -Xlinker* ) ;;
+      * ) ld_switch_system="$ld_switch_system -Xlinker $arg" ;;
+    esac
+  done
+  ld_switch_machine_tmp="$ld_switch_machine"; ld_switch_machine=""
+  for arg in $ld_switch_machine_tmp; do
+    case "$arg" in
+      -L* | -l* | -R* | -u* | -Wl* | -f* ) ld_switch_machine="$ld_switch_machine $arg" ;;
+      -Xlinker* ) ;;
+      * ) ld_switch_machine="$ld_switch_machine -Xlinker $arg" ;;
+    esac
+  done
+  LDFLAGS_tmp="$LDFLAGS"; LDFLAGS=""
+  for arg in $LDFLAGS_tmp; do
+    case "$arg" in
+      -L* | -l* | -R* | -u* | -Wl* | -f* ) LDFLAGS="$LDFLAGS $arg" ;;
+      -Xlinker* ) ;;
+      * ) LDFLAGS="$LDFLAGS -Xlinker $arg" ;;
+    esac
+  done
+fi
+
+test -n "$objects_machine" && extra_objs="$extra_objs $objects_machine" &&  if test "$extra_verbose" = "yes"; then
+   echo "    xemacs will be linked with \"$objects_machine\""
+ fi
+test -n "$objects_system"  && extra_objs="$extra_objs $objects_system" &&  if test "$extra_verbose" = "yes"; then
+   echo "    xemacs will be linked with \"$objects_system\""
+ fi
+test -n "$unexec"          && extra_objs="$extra_objs $unexec" &&  if test "$extra_verbose" = "yes"; then
    echo "    xemacs will be linked with \"$unexec\""
  fi
 
+echo $ac_n "checking for dynodump""... $ac_c" 1>&6
+echo "configure:2192: checking for dynodump" >&5
+if test "$unexec" != "unexsol2.o"; then
+  echo "$ac_t""no" 1>&6
+else
+  echo "$ac_t""yes" 1>&6
+  { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining DYNODUMP
+EOF
+cat >> confdefs.h <<\EOF
+#define DYNODUMP 1
+EOF
+}
+
+  MAKE_SUBDIR="$MAKE_SUBDIR dynodump" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dynodump\" to \$MAKE_SUBDIR"; fi
+  case "$machine" in
+    sparc   ) dynodump_arch=sparc ;;
+    *86*    ) dynodump_arch=i386  ;;
+    powerpc ) dynodump_arch=ppc   ;;
+  esac
+    test "$GCC" = "yes" && ld_switch_site="$ld_switch_site -fno-gnu-linker" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-fno-gnu-linker\" to \$ld_switch_site"; fi
+fi
+
+
+
+
+test -n "$ld_text_start_addr" && start_flags="-T $ld_text_start_addr -e __start"
+
+if test "$ordinary_link" = "no" -a "$GCC" = "yes"; then
+ test -z "$linker" &&  linker='$(CC) -nostdlib'
+ test -z "$lib_gcc" && lib_gcc='`$(CC) -print-lib-gcc-file-name`'
+fi
+test "$GCC" != "yes" && lib_gcc=
+
+
+
 
 if test -n "$site_libraries"; then
   for arg in $site_libraries; do
@@ -2097,10 +2238,6 @@
   done
 fi
 
-if test -d "/usr/local/include" -a -d "/usr/local/lib"; then
-  ld_switch_site="$ld_switch_site "-L/usr/local/lib"" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \""-L/usr/local/lib"\" to \$ld_switch_site"; fi
-  c_switch_site="$c_switch_site "-I/usr/local/include"" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \""-I/usr/local/include"\" to \$c_switch_site"; fi
-fi
 
 for dir in "/usr/ccs/lib"; do
   test -d "$dir" && ld_switch_site="$ld_switch_site -L${dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-L${dir}\" to \$ld_switch_site"; fi
@@ -2114,27 +2251,27 @@
 
 if   test "$dynamic" = "no"; then add_runtime_path=no
 elif test -n "$LD_RUN_PATH"; then add_runtime_path=yes
-else case "$canonical" in
-       *-solaris2.* | *-sgi-irix* ) add_runtime_path=yes ;;
+else case "$opsys" in
+       sol2 | irix* | *bsd* ) add_runtime_path=yes ;;
        * ) add_runtime_path=no ;;
      esac
 fi
 
 if test "$add_runtime_path" = "yes"; then
       echo $ac_n "checking "for runtime libraries flag"""... $ac_c" 1>&6
-echo "configure:2126: checking "for runtime libraries flag"" >&5
+echo "configure:2263: 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 2131 "configure"
+#line 2268 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:2138: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2275: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   dash_r="$try_dash_r"
 else
@@ -2151,49 +2288,59 @@
   fi
 fi
 
+xe_add_unique_runpath_dir='
+  xe_add_p=yes
+  for xe_dir in $runpath_dirs; do       test "$xe_dir" = "$xe_runpath_dir" && xe_add_p=no
+  done
+  if test "$xe_add_p" = "yes"; then
+    test -n "$runpath" && runpath="${runpath}:"
+    runpath="${runpath}${xe_runpath_dir}"
+    runpath_dirs="$runpath_dirs $xe_runpath_dir"
+  fi'
+
+
 
 
 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
-    ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/${dash_r}[^ ]*//"`
-  ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/${dash_r}[^ ]*//"`
+    ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//"`
+  ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//"`
   
-        runpath=""
+        runpath="" runpath_dirs=""
   if test -n "$LD_RUN_PATH"; then
     runpath="$LD_RUN_PATH"
   elif test "$GCC" = "yes"; then
-        echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
+        ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
+    echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
       case "$arg" in P,* | -L* | -R* )
         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
-          
+          {
 xe_runpath_dir="$dir"
-if test "$xe_runpath_dir" != "/lib"     -a \
+  test "$xe_runpath_dir" != "/lib"     -a \
 	"$xe_runpath_dir" != "/usr/lib" -a \
-	-n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`"; then
-  test -n "$runpath" && runpath="${runpath}:"
-  runpath="${runpath}${xe_runpath_dir}"
-fi
-
+	-n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
+  eval "$xe_add_unique_runpath_dir"
+}
         done ;;
       esac
     done
+    ld_switch_run="$ld_switch_run_save"
     rm -f conftest*
   else
         for arg in $ld_switch_site $ld_switch_x_site; do
-      case "$arg" in -L*) 
+      case "$arg" in -L*) {
 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
-if test "$xe_runpath_dir" != "/lib"     -a \
+  test "$xe_runpath_dir" != "/lib"     -a \
 	"$xe_runpath_dir" != "/usr/lib" -a \
-	-n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`"; then
-  test -n "$runpath" && runpath="${runpath}:"
-  runpath="${runpath}${xe_runpath_dir}"
-fi
-;; esac
+	-n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
+  eval "$xe_add_unique_runpath_dir"
+};; esac
     done
-        case "$canonical" in  *-solaris2.[1-4]* )
-      test "$need_motif" = "yes" && runpath="${runpath}:/opt/SUNWdt/lib" ;;
-    esac
+        if test "$opsys $need_motif" = "sol2 yes"; then
+      xe_runpath_dir="/opt/SUNWdt/lib";
+      eval "$xe_add_unique_runpath_dir";
+    fi
   fi 
   if test -n "$runpath"; then
     ld_switch_run="${dash_r}${runpath}"
@@ -2218,7 +2365,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:2222: checking for $ac_word" >&5
+echo "configure:2369: checking for $ac_word" >&5
 
 if test -n "$RANLIB"; then
   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
@@ -2271,7 +2418,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:2275: checking for a BSD compatible install" >&5
+echo "configure:2422: checking for a BSD compatible install" >&5
 if test -z "$INSTALL"; then
 
   IFS="${IFS= 	}"; ac_save_IFS="$IFS"; IFS="${IFS}:"
@@ -2322,7 +2469,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:2326: checking for $ac_word" >&5
+echo "configure:2473: checking for $ac_word" >&5
 
 if test -n "$YACC"; then
   ac_cv_prog_YACC="$YACC" # Let the user override the test.
@@ -2353,15 +2500,15 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2357: checking for $ac_hdr" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 2360 "configure"
+echo "configure:2504: checking for $ac_hdr" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 2507 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2365: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2512: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -2390,19 +2537,19 @@
 fi
 done
 
-for ac_hdr in utime.h locale.h libgen.h
+for ac_hdr in utime.h locale.h libgen.h fcntl.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2398: checking for $ac_hdr" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 2401 "configure"
+echo "configure:2545: checking for $ac_hdr" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 2548 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2406: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2553: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -2435,15 +2582,15 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2439: checking for $ac_hdr" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 2442 "configure"
+echo "configure:2586: checking for $ac_hdr" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 2589 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2447: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2594: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -2473,10 +2620,10 @@
 done
 
 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
-echo "configure:2477: checking for sys/wait.h that is POSIX.1 compatible" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 2480 "configure"
+echo "configure:2624: checking for sys/wait.h that is POSIX.1 compatible" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 2627 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/wait.h>
@@ -2492,7 +2639,7 @@
 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
 ; return 0; }
 EOF
-if { (eval echo configure:2496: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2643: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_header_sys_wait_h=yes
 else
@@ -2516,10 +2663,10 @@
 fi
 
 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:2520: checking for ANSI C header files" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 2523 "configure"
+echo "configure:2667: checking for ANSI C header files" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 2670 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 #include <stdarg.h>
@@ -2527,7 +2674,7 @@
 #include <float.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2531: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2678: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -2544,7 +2691,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 2548 "configure"
+#line 2695 "configure"
 #include "confdefs.h"
 #include <string.h>
 EOF
@@ -2562,7 +2709,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 2566 "configure"
+#line 2713 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 EOF
@@ -2580,7 +2727,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 2584 "configure"
+#line 2731 "configure"
 #include "confdefs.h"
 #include <ctype.h>
 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -2591,7 +2738,7 @@
 exit (0); }
 
 EOF
-if { (eval echo configure:2595: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
+if { (eval echo configure:2742: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
 then
   :
 else
@@ -2616,10 +2763,10 @@
 fi
 
 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
-echo "configure:2620: checking whether time.h and sys/time.h may both be included" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 2623 "configure"
+echo "configure:2767: checking whether time.h and sys/time.h may both be included" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 2770 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/time.h>
@@ -2628,7 +2775,7 @@
 struct tm *tp;
 ; return 0; }
 EOF
-if { (eval echo configure:2632: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2779: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_header_time=yes
 else
@@ -2652,10 +2799,10 @@
 fi
 
 echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6
-echo "configure:2656: checking for sys_siglist declaration in signal.h or unistd.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 2659 "configure"
+echo "configure:2803: checking for sys_siglist declaration in signal.h or unistd.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 2806 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <signal.h>
@@ -2667,7 +2814,7 @@
 char *msg = *(sys_siglist + 1);
 ; return 0; }
 EOF
-if { (eval echo configure:2671: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2818: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_decl_sys_siglist=yes
 else
@@ -2692,9 +2839,9 @@
 
 
 echo $ac_n "checking for struct utimbuf""... $ac_c" 1>&6
-echo "configure:2696: checking for struct utimbuf" >&5
-cat > conftest.$ac_ext <<EOF
-#line 2698 "configure"
+echo "configure:2843: checking for struct utimbuf" >&5
+cat > conftest.$ac_ext <<EOF
+#line 2845 "configure"
 #include "confdefs.h"
 #ifdef TIME_WITH_SYS_TIME
 #include <sys/time.h>
@@ -2713,7 +2860,7 @@
 static struct utimbuf x; x.actime = x.modtime;
 ; return 0; }
 EOF
-if { (eval echo configure:2717: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2864: \"$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
@@ -2733,10 +2880,10 @@
 rm -f conftest*
 
 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
-echo "configure:2737: checking return type of signal handlers" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 2740 "configure"
+echo "configure:2884: checking return type of signal handlers" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 2887 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <signal.h>
@@ -2753,7 +2900,7 @@
 int i;
 ; return 0; }
 EOF
-if { (eval echo configure:2757: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2904: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_type_signal=void
 else
@@ -2774,11 +2921,186 @@
 }
 
 
+echo $ac_n "checking for size_t""... $ac_c" 1>&6
+echo "configure:2926: checking for size_t" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 2929 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#if STDC_HEADERS
+#include <stdlib.h>
+#include <stddef.h>
+#endif
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
+  rm -rf conftest*
+  ac_cv_type_size_t=yes
+else
+  rm -rf conftest*
+  ac_cv_type_size_t=no
+fi
+rm -f conftest*
+
+echo "$ac_t""$ac_cv_type_size_t" 1>&6
+if test $ac_cv_type_size_t = no; then
+  { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining size_t = unsigned
+EOF
+cat >> confdefs.h <<\EOF
+#define size_t unsigned
+EOF
+}
+
+fi
+
+echo $ac_n "checking for pid_t""... $ac_c" 1>&6
+echo "configure:2960: checking for pid_t" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 2963 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#if STDC_HEADERS
+#include <stdlib.h>
+#include <stddef.h>
+#endif
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
+  rm -rf conftest*
+  ac_cv_type_pid_t=yes
+else
+  rm -rf conftest*
+  ac_cv_type_pid_t=no
+fi
+rm -f conftest*
+
+echo "$ac_t""$ac_cv_type_pid_t" 1>&6
+if test $ac_cv_type_pid_t = no; then
+  { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining pid_t = int
+EOF
+cat >> confdefs.h <<\EOF
+#define pid_t int
+EOF
+}
+
+fi
+
+echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
+echo "configure:2994: checking for uid_t in sys/types.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 2997 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "uid_t" >/dev/null 2>&1; then
+  rm -rf conftest*
+  ac_cv_type_uid_t=yes
+else
+  rm -rf conftest*
+  ac_cv_type_uid_t=no
+fi
+rm -f conftest*
+
+
+echo "$ac_t""$ac_cv_type_uid_t" 1>&6
+if test $ac_cv_type_uid_t = no; then
+  { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining uid_t = int
+EOF
+cat >> confdefs.h <<\EOF
+#define uid_t int
+EOF
+}
+
+  { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining gid_t = int
+EOF
+cat >> confdefs.h <<\EOF
+#define gid_t int
+EOF
+}
+
+fi
+
+echo $ac_n "checking for mode_t""... $ac_c" 1>&6
+echo "configure:3033: checking for mode_t" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 3036 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#if STDC_HEADERS
+#include <stdlib.h>
+#include <stddef.h>
+#endif
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
+  rm -rf conftest*
+  ac_cv_type_mode_t=yes
+else
+  rm -rf conftest*
+  ac_cv_type_mode_t=no
+fi
+rm -f conftest*
+
+echo "$ac_t""$ac_cv_type_mode_t" 1>&6
+if test $ac_cv_type_mode_t = no; then
+  { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining mode_t = int
+EOF
+cat >> confdefs.h <<\EOF
+#define mode_t int
+EOF
+}
+
+fi
+
+echo $ac_n "checking for off_t""... $ac_c" 1>&6
+echo "configure:3067: checking for off_t" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 3070 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#if STDC_HEADERS
+#include <stdlib.h>
+#include <stddef.h>
+#endif
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
+  rm -rf conftest*
+  ac_cv_type_off_t=yes
+else
+  rm -rf conftest*
+  ac_cv_type_off_t=no
+fi
+rm -f conftest*
+
+echo "$ac_t""$ac_cv_type_off_t" 1>&6
+if test $ac_cv_type_off_t = no; then
+  { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining off_t = long
+EOF
+cat >> confdefs.h <<\EOF
+#define off_t long
+EOF
+}
+
+fi
+
 
 echo $ac_n "checking for struct timeval""... $ac_c" 1>&6
-echo "configure:2780: checking for struct timeval" >&5
-cat > conftest.$ac_ext <<EOF
-#line 2782 "configure"
+echo "configure:3102: checking for struct timeval" >&5
+cat > conftest.$ac_ext <<EOF
+#line 3104 "configure"
 #include "confdefs.h"
 #ifdef TIME_WITH_SYS_TIME
 #include <sys/time.h>
@@ -2794,7 +3116,7 @@
 static struct timeval x; x.tv_sec = x.tv_usec;
 ; return 0; }
 EOF
-if { (eval echo configure:2798: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3120: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   echo "$ac_t""yes" 1>&6
   HAVE_TIMEVAL=yes
@@ -2816,10 +3138,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:2820: checking whether struct tm is in sys/time.h or time.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 2823 "configure"
+echo "configure:3142: checking whether struct tm is in sys/time.h or time.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 3145 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <time.h>
@@ -2827,7 +3149,7 @@
 struct tm *tp; tp->tm_sec;
 ; return 0; }
 EOF
-if { (eval echo configure:2831: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3153: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_struct_tm=time.h
 else
@@ -2851,10 +3173,10 @@
 fi
 
 echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
-echo "configure:2855: checking for tm_zone in struct tm" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 2858 "configure"
+echo "configure:3177: checking for tm_zone in struct tm" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 3180 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <$ac_cv_struct_tm>
@@ -2862,7 +3184,7 @@
 struct tm tm; tm.tm_zone;
 ; return 0; }
 EOF
-if { (eval echo configure:2866: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3188: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_struct_tm_zone=yes
 else
@@ -2885,10 +3207,10 @@
 
 else
   echo $ac_n "checking for tzname""... $ac_c" 1>&6
-echo "configure:2889: checking for tzname" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 2892 "configure"
+echo "configure:3211: checking for tzname" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 3214 "configure"
 #include "confdefs.h"
 #include <time.h>
 #ifndef tzname /* For SGI.  */
@@ -2898,7 +3220,7 @@
 atoi(*tzname);
 ; return 0; }
 EOF
-if { (eval echo configure:2902: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3224: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   ac_cv_var_tzname=yes
 else
@@ -2924,10 +3246,10 @@
 
 
 echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:2928: checking for working const" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 2931 "configure"
+echo "configure:3250: checking for working const" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 3253 "configure"
 #include "confdefs.h"
 
 int main() {
@@ -2976,7 +3298,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:2980: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3302: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_const=yes
 else
@@ -3001,7 +3323,7 @@
 
 
 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:3005: checking whether ${MAKE-make} sets \${MAKE}" >&5
+echo "configure:3327: checking whether ${MAKE-make} sets \${MAKE}" >&5
 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
 
 cat > conftestmake <<\EOF
@@ -3026,12 +3348,12 @@
 
 
 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
-echo "configure:3030: checking whether byte ordering is bigendian" >&5
+echo "configure:3352: 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 3035 "configure"
+#line 3357 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/param.h>
@@ -3042,11 +3364,11 @@
 #endif
 ; return 0; }
 EOF
-if { (eval echo configure:3046: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3368: \"$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 3050 "configure"
+#line 3372 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/param.h>
@@ -3057,7 +3379,7 @@
 #endif
 ; return 0; }
 EOF
-if { (eval echo configure:3061: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3383: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_bigendian=yes
 else
@@ -3074,7 +3396,7 @@
 rm -f conftest*
 if test $ac_cv_c_bigendian = unknown; then
 cat > conftest.$ac_ext <<EOF
-#line 3078 "configure"
+#line 3400 "configure"
 #include "confdefs.h"
 main () {
   /* Are we little or big endian?  From Harbison&Steele.  */
@@ -3087,7 +3409,7 @@
   exit (u.c[sizeof (long) - 1] == 1);
 }
 EOF
-if { (eval echo configure:3091: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
+if { (eval echo configure:3413: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
 then
   ac_cv_c_bigendian=no
 else
@@ -3113,10 +3435,10 @@
 
 
 echo $ac_n "checking size of short""... $ac_c" 1>&6
-echo "configure:3117: checking size of short" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 3120 "configure"
+echo "configure:3439: checking size of short" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 3442 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 main()
@@ -3127,7 +3449,7 @@
   exit(0);
 }
 EOF
-if { (eval echo configure:3131: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
+if { (eval echo configure:3453: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
 then
   ac_cv_sizeof_short=`cat conftestval`
 else
@@ -3147,11 +3469,17 @@
 }
 
 
+if test "$ac_cv_sizeof_short" = 0; then
+  echo ""
+  echo "*** PANIC *** Configure tests are not working - compiler is broken."
+  echo "*** PANIC *** Please examine config.log for compilation errors."
+  exit 1
+fi
 echo $ac_n "checking size of int""... $ac_c" 1>&6
-echo "configure:3152: checking size of int" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 3155 "configure"
+echo "configure:3480: checking size of int" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 3483 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 main()
@@ -3162,7 +3490,7 @@
   exit(0);
 }
 EOF
-if { (eval echo configure:3166: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
+if { (eval echo configure:3494: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
 then
   ac_cv_sizeof_int=`cat conftestval`
 else
@@ -3183,10 +3511,10 @@
 
 
 echo $ac_n "checking size of long""... $ac_c" 1>&6
-echo "configure:3187: checking size of long" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 3190 "configure"
+echo "configure:3515: checking size of long" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 3518 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 main()
@@ -3197,7 +3525,7 @@
   exit(0);
 }
 EOF
-if { (eval echo configure:3201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
+if { (eval echo configure:3529: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
 then
   ac_cv_sizeof_long=`cat conftestval`
 else
@@ -3217,15 +3545,79 @@
 }
 
 
-if test "$ac_cv_sizeof_long" = 0; then
-  echo ""
-  echo "*** PANIC *** Configure tests are not working - compiler is broken."
-  echo "*** PANIC *** Please examine config.log for compilation errors."
-  exit 1
-fi
+echo $ac_n "checking size of long long""... $ac_c" 1>&6
+echo "configure:3550: checking size of long long" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 3553 "configure"
+#include "confdefs.h"
+#include <stdio.h>
+main()
+{
+  FILE *f=fopen("conftestval", "w");
+  if (!f) exit(1);
+  fprintf(f, "%d\n", sizeof(long long));
+  exit(0);
+}
+EOF
+if { (eval echo configure:3564: \"$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
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  ac_cv_sizeof_long_long=0
+fi
+rm -fr conftest*
+echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
+{ test "$extra_verbose" = "yes" && cat << EOF
+    Defining SIZEOF_LONG_LONG = $ac_cv_sizeof_long_long
+EOF
+cat >> confdefs.h <<EOF
+#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
+EOF
+}
+
+
+echo $ac_n "checking size of void *""... $ac_c" 1>&6
+echo "configure:3585: checking size of void *" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 3588 "configure"
+#include "confdefs.h"
+#include <stdio.h>
+main()
+{
+  FILE *f=fopen("conftestval", "w");
+  if (!f) exit(1);
+  fprintf(f, "%d\n", sizeof(void *));
+  exit(0);
+}
+EOF
+if { (eval echo configure:3599: \"$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
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  ac_cv_sizeof_void_p=0
+fi
+rm -fr conftest*
+echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
+{ test "$extra_verbose" = "yes" && cat << EOF
+    Defining SIZEOF_VOID_P = $ac_cv_sizeof_void_p
+EOF
+cat >> confdefs.h <<EOF
+#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
+EOF
+}
+
+
 
 echo $ac_n "checking for long file names""... $ac_c" 1>&6
-echo "configure:3229: checking for long file names" >&5
+echo "configure:3621: 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:
@@ -3272,12 +3664,12 @@
 
 
 echo $ac_n "checking for sqrt in -lm""... $ac_c" 1>&6
-echo "configure:3276: checking for sqrt in -lm" >&5
+echo "configure:3668: 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 3281 "configure"
+#line 3673 "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
@@ -3288,7 +3680,7 @@
 sqrt()
 ; return 0; }
 EOF
-if { (eval echo configure:3292: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3684: \"$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
@@ -3321,51 +3713,6 @@
 
 
 
-echo $ac_n "checking for main in -lPW""... $ac_c" 1>&6
-echo "configure:3326: checking for main in -lPW" >&5
-ac_lib_var=`echo PW'_'main | sed 'y%./+-%__p_%'`
-
-xe_check_libs=" -lPW "
-cat > conftest.$ac_ext <<EOF
-#line 3331 "configure"
-#include "confdefs.h"
-
-int main() {
-main()
-; return 0; }
-EOF
-if { (eval echo configure:3338: \"$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
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-xe_check_libs=""
-
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_lib=HAVE_LIB`echo PW | sed -e 's/[^a-zA-Z0-9_]/_/g' \
-    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
-  { test "$extra_verbose" = "yes" && cat << EOF
-    Defining $ac_tr_lib
-EOF
-cat >> confdefs.h <<EOF
-#define $ac_tr_lib 1
-EOF
-}
-
-  LIBS="-lPW $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lPW\" to \$LIBS"; fi
-
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-
-
 { test "$extra_verbose" = "yes" && cat << \EOF
     Defining LISP_FLOAT_TYPE
 EOF
@@ -3376,7 +3723,7 @@
 
 
 echo "checking type of mail spool file locking" 1>&6
-echo "configure:3380: checking type of mail spool file locking" >&5
+echo "configure:3727: 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
@@ -3400,12 +3747,12 @@
 
 
 echo $ac_n "checking for kstat_open in -lkstat""... $ac_c" 1>&6
-echo "configure:3404: checking for kstat_open in -lkstat" >&5
+echo "configure:3751: 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 3409 "configure"
+#line 3756 "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
@@ -3416,7 +3763,7 @@
 kstat_open()
 ; return 0; }
 EOF
-if { (eval echo configure:3420: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3767: \"$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
@@ -3450,12 +3797,12 @@
 
 
 echo $ac_n "checking for kvm_read in -lkvm""... $ac_c" 1>&6
-echo "configure:3454: checking for kvm_read in -lkvm" >&5
+echo "configure:3801: 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 3459 "configure"
+#line 3806 "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
@@ -3466,7 +3813,7 @@
 kvm_read()
 ; return 0; }
 EOF
-if { (eval echo configure:3470: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3817: \"$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
@@ -3500,12 +3847,12 @@
 
 
 echo $ac_n "checking for cma_open in -lpthreads""... $ac_c" 1>&6
-echo "configure:3504: checking for cma_open in -lpthreads" >&5
+echo "configure:3851: 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 3509 "configure"
+#line 3856 "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
@@ -3516,7 +3863,7 @@
 cma_open()
 ; return 0; }
 EOF
-if { (eval echo configure:3520: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3867: \"$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
@@ -3552,7 +3899,7 @@
 fi
 
 echo $ac_n "checking whether the -xildoff compiler flag is required""... $ac_c" 1>&6
-echo "configure:3556: checking whether the -xildoff compiler flag is required" >&5
+echo "configure:3903: 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;
@@ -3561,41 +3908,19 @@
   else echo "$ac_t""no" 1>&6
 fi
 
-echo $ac_n "checking for dynodump""... $ac_c" 1>&6
-echo "configure:3566: checking for dynodump" >&5
-case "$opsys" in sol2* )
-  echo "$ac_t""yes" 1>&6
-  { test "$extra_verbose" = "yes" && cat << \EOF
-    Defining DYNODUMP
-EOF
-cat >> confdefs.h <<\EOF
-#define DYNODUMP 1
-EOF
-}
-
-  MAKE_SUBDIR="$MAKE_SUBDIR dynodump" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dynodump\" to \$MAKE_SUBDIR"; fi
-  case "$machine" in
-    sparc   ) dynodump_arch=sparc ;;
-    *86*    ) dynodump_arch=i386  ;;
-    powerpc ) dynodump_arch=ppc   ;;
-  esac
-    test "$GCC" = "yes" && ld_switch_site="$ld_switch_site -fno-gnu-linker" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-fno-gnu-linker\" to \$ld_switch_site"; fi ;;
-  *) echo "$ac_t""no" 1>&6 ;;
-esac
-
-case "$opsys" in sol2-[6-9]* )
+if test "$opsys" = "sol2" -a "${OS_RELEASE:-0}" -ge 56; then
   echo $ac_n "checking for \"-z ignore\" linker flag""... $ac_c" 1>&6
-echo "configure:3589: checking for \"-z ignore\" linker flag" >&5
+echo "configure:3914: 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 ;;
     *) echo "$ac_t""no" 1>&6 ;;
-  esac ;;
-esac
+  esac
+fi
 
 
 echo "checking "for specified window system"" 1>&6
-echo "configure:3599: checking "for specified window system"" >&5
+echo "configure:3924: checking "for specified window system"" >&5
 
 if test "$x_includes $x_libraries" = "NONE NONE"; then
   if test -n "$OPENWINHOME" \
@@ -3616,7 +3941,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:3620: checking for X" >&5
+echo "configure:3945: checking for X" >&5
 
 # Check whether --with-x or --without-x was given.
 if test "${with_x+set}" = set; then
@@ -3676,12 +4001,12 @@
 
   # First, try using that file with no special directory specified.
 cat > conftest.$ac_ext <<EOF
-#line 3680 "configure"
+#line 4005 "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:3685: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4010: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -3750,14 +4075,14 @@
   ac_save_LIBS="$LIBS"
   LIBS="-l$x_direct_test_library $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3754 "configure"
+#line 4079 "configure"
 #include "confdefs.h"
 
 int main() {
 ${x_direct_test_function}()
 ; return 0; }
 EOF
-if { (eval echo configure:3761: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4086: \"$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.
@@ -3866,17 +4191,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:3870: checking whether -R must be followed by a space" >&5
+echo "configure:4195: 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 3873 "configure"
+#line 4198 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:3880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4205: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   ac_R_nospace=yes
 else
@@ -3892,14 +4217,14 @@
       else
 	LIBS="$ac_xsave_LIBS -R $x_libraries"
 	cat > conftest.$ac_ext <<EOF
-#line 3896 "configure"
+#line 4221 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:3903: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4228: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   ac_R_space=yes
 else
@@ -3935,12 +4260,12 @@
 else
 
 echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
-echo "configure:3939: checking for dnet_ntoa in -ldnet" >&5
+echo "configure:4264: 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 3944 "configure"
+#line 4269 "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
@@ -3951,7 +4276,7 @@
 dnet_ntoa()
 ; return 0; }
 EOF
-if { (eval echo configure:3955: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4280: \"$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
@@ -3975,12 +4300,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:3979: checking for dnet_ntoa in -ldnet_stub" >&5
+echo "configure:4304: 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 3984 "configure"
+#line 4309 "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
@@ -3991,7 +4316,7 @@
 dnet_ntoa()
 ; return 0; }
 EOF
-if { (eval echo configure:3995: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4320: \"$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
@@ -4020,10 +4345,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:4024: checking for gethostbyname" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 4027 "configure"
+echo "configure:4349: checking for gethostbyname" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 4352 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char gethostbyname(); below.  */
@@ -4046,7 +4371,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:4050: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4375: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_gethostbyname=yes"
 else
@@ -4067,12 +4392,12 @@
     if test $ac_cv_func_gethostbyname = no; then
       
 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
-echo "configure:4071: checking for gethostbyname in -lnsl" >&5
+echo "configure:4396: 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 4076 "configure"
+#line 4401 "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
@@ -4083,7 +4408,7 @@
 gethostbyname()
 ; return 0; }
 EOF
-if { (eval echo configure:4087: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4412: \"$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
@@ -4113,10 +4438,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:4117: checking for connect" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 4120 "configure"
+echo "configure:4442: checking for connect" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 4445 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char connect(); below.  */
@@ -4139,7 +4464,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:4143: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_connect=yes"
 else
@@ -4162,12 +4487,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:4166: checking "$xe_msg_checking"" >&5
+echo "configure:4491: 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 4171 "configure"
+#line 4496 "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
@@ -4178,7 +4503,7 @@
 connect()
 ; return 0; }
 EOF
-if { (eval echo configure:4182: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4507: \"$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
@@ -4202,10 +4527,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:4206: checking for remove" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 4209 "configure"
+echo "configure:4531: checking for remove" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 4534 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char remove(); below.  */
@@ -4228,7 +4553,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:4232: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4557: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_remove=yes"
 else
@@ -4249,12 +4574,12 @@
     if test $ac_cv_func_remove = no; then
       
 echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
-echo "configure:4253: checking for remove in -lposix" >&5
+echo "configure:4578: 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 4258 "configure"
+#line 4583 "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
@@ -4265,7 +4590,7 @@
 remove()
 ; return 0; }
 EOF
-if { (eval echo configure:4269: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4594: \"$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
@@ -4289,10 +4614,10 @@
 
     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
     echo $ac_n "checking for shmat""... $ac_c" 1>&6
-echo "configure:4293: checking for shmat" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 4296 "configure"
+echo "configure:4618: checking for shmat" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 4621 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char shmat(); below.  */
@@ -4315,7 +4640,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:4319: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4644: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_shmat=yes"
 else
@@ -4336,12 +4661,12 @@
     if test $ac_cv_func_shmat = no; then
       
 echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
-echo "configure:4340: checking for shmat in -lipc" >&5
+echo "configure:4665: 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 4345 "configure"
+#line 4670 "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
@@ -4352,7 +4677,7 @@
 shmat()
 ; return 0; }
 EOF
-if { (eval echo configure:4356: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4681: \"$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
@@ -4386,12 +4711,12 @@
   #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
   
 echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
-echo "configure:4390: checking for IceConnectionNumber in -lICE" >&5
+echo "configure:4715: 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 4395 "configure"
+#line 4720 "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
@@ -4402,7 +4727,7 @@
 IceConnectionNumber()
 ; return 0; }
 EOF
-if { (eval echo configure:4406: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4731: \"$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
@@ -4480,46 +4805,45 @@
 
   
 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
-    ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/${dash_r}[^ ]*//"`
-  ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/${dash_r}[^ ]*//"`
+    ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//"`
+  ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//"`
   
-        runpath=""
+        runpath="" runpath_dirs=""
   if test -n "$LD_RUN_PATH"; then
     runpath="$LD_RUN_PATH"
   elif test "$GCC" = "yes"; then
-        echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
+        ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
+    echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
       case "$arg" in P,* | -L* | -R* )
         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
-          
+          {
 xe_runpath_dir="$dir"
-if test "$xe_runpath_dir" != "/lib"     -a \
+  test "$xe_runpath_dir" != "/lib"     -a \
 	"$xe_runpath_dir" != "/usr/lib" -a \
-	-n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`"; then
-  test -n "$runpath" && runpath="${runpath}:"
-  runpath="${runpath}${xe_runpath_dir}"
-fi
-
+	-n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
+  eval "$xe_add_unique_runpath_dir"
+}
         done ;;
       esac
     done
+    ld_switch_run="$ld_switch_run_save"
     rm -f conftest*
   else
         for arg in $ld_switch_site $ld_switch_x_site; do
-      case "$arg" in -L*) 
+      case "$arg" in -L*) {
 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
-if test "$xe_runpath_dir" != "/lib"     -a \
+  test "$xe_runpath_dir" != "/lib"     -a \
 	"$xe_runpath_dir" != "/usr/lib" -a \
-	-n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`"; then
-  test -n "$runpath" && runpath="${runpath}:"
-  runpath="${runpath}${xe_runpath_dir}"
-fi
-;; esac
+	-n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
+  eval "$xe_add_unique_runpath_dir"
+};; esac
     done
-        case "$canonical" in  *-solaris2.[1-4]* )
-      test "$need_motif" = "yes" && runpath="${runpath}:/opt/SUNWdt/lib" ;;
-    esac
+        if test "$opsys $need_motif" = "sol2 yes"; then
+      xe_runpath_dir="/opt/SUNWdt/lib";
+      eval "$xe_add_unique_runpath_dir";
+    fi
   fi 
   if test -n "$runpath"; then
     ld_switch_run="${dash_r}${runpath}"
@@ -4530,26 +4854,52 @@
 
   if test "$extra_verbose" = "yes"; then
     echo; echo "X11 compilation variables:"
-    echo "x_libraries = \"$x_libraries\""
-echo "x_includes = \"$x_includes\""
-echo "X_CFLAGS = \"$X_CFLAGS\""
-echo "X_LIBS = \"$X_LIBS\""
-echo "X_PRE_LIBS = \"$X_PRE_LIBS\""
-echo "X_EXTRA_LIBS = \"$X_EXTRA_LIBS\""
+    for var in x_libraries x_includes X_CFLAGS X_LIBS X_PRE_LIBS X_EXTRA_LIBS; do eval "echo \"$var = '\$$var'\""; done
     echo
   fi
 
+    echo "checking for X defines extracted by xmkmf" 1>&6
+echo "configure:4863: checking for X defines extracted by xmkmf" >&5
+  rm -fr conftestdir
+  if mkdir conftestdir; then
+    cd conftestdir
+    cat > Imakefile <<'EOF'
+xetest:
+	@echo ${PROTO_DEFINES} ${STD_DEFINES}
+EOF
+    if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
+      # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+      xmkmf_defines=`${MAKE-make} xetest 2>/dev/null | grep -v make`
+    fi
+    cd ..
+    rm -fr conftestdir
+    for word in $xmkmf_defines; do
+      case "$word" in
+	-D*=* ) ;;
+	-D* ) word=`echo '' $word | sed -e 's:^ *-D::'`
+	      { test "$extra_verbose" = "yes" && cat << EOF
+    Defining $word
+EOF
+cat >> confdefs.h <<EOF
+#define $word 1
+EOF
+}
+ ;;
+      esac
+    done
+  fi
+
     ac_safe=`echo "X11/Intrinsic.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for X11/Intrinsic.h""... $ac_c" 1>&6
-echo "configure:4545: checking for X11/Intrinsic.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 4548 "configure"
+echo "configure:4895: checking for X11/Intrinsic.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 4898 "configure"
 #include "confdefs.h"
 #include <X11/Intrinsic.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4553: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4903: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -4573,12 +4923,12 @@
 
       
 echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6
-echo "configure:4577: checking for XOpenDisplay in -lX11" >&5
+echo "configure:4927: 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 4582 "configure"
+#line 4932 "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
@@ -4589,7 +4939,7 @@
 XOpenDisplay()
 ; return 0; }
 EOF
-if { (eval echo configure:4593: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4943: \"$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
@@ -4614,12 +4964,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:4618: checking "$xe_msg_checking"" >&5
+echo "configure:4968: 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 4623 "configure"
+#line 4973 "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
@@ -4630,7 +4980,7 @@
 XGetFontProperty()
 ; return 0; }
 EOF
-if { (eval echo configure:4634: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4984: \"$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
@@ -4657,12 +5007,12 @@
 
     
 echo $ac_n "checking for XShapeSelectInput in -lXext""... $ac_c" 1>&6
-echo "configure:4661: checking for XShapeSelectInput in -lXext" >&5
+echo "configure:5011: 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 4666 "configure"
+#line 5016 "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
@@ -4673,7 +5023,7 @@
 XShapeSelectInput()
 ; return 0; }
 EOF
-if { (eval echo configure:4677: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5027: \"$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
@@ -4697,12 +5047,12 @@
     case "$opsys" in    sunos4* ) libs_x="-u _XtToolkitInitialize -lXt $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-u _XtToolkitInitialize -lXt\" to \$libs_x"; fi ;;
    * ) 
 echo $ac_n "checking for XtOpenDisplay in -lXt""... $ac_c" 1>&6
-echo "configure:4701: checking for XtOpenDisplay in -lXt" >&5
+echo "configure:5051: 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 4706 "configure"
+#line 5056 "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
@@ -4713,7 +5063,7 @@
 XtOpenDisplay()
 ; return 0; }
 EOF
-if { (eval echo configure:4717: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5067: \"$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
@@ -4737,14 +5087,14 @@
   esac
 
   echo $ac_n "checking the version of X11 being used""... $ac_c" 1>&6
-echo "configure:4741: checking the version of X11 being used" >&5
+echo "configure:5091: checking the version of X11 being used" >&5
   cat > conftest.$ac_ext <<EOF
-#line 4743 "configure"
+#line 5093 "configure"
 #include "confdefs.h"
 #include <X11/Intrinsic.h>
     main(int c, char* v[]) { return c>1 ? XlibSpecificationRelease : 0; }
 EOF
-if { (eval echo configure:4748: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
+if { (eval echo configure:5098: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
 then
   ./conftest foobar; x11_release=$?
 else
@@ -4768,15 +5118,15 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4772: checking for $ac_hdr" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 4775 "configure"
+echo "configure:5122: checking for $ac_hdr" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 5125 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4780: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5130: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -4807,7 +5157,7 @@
 
 
     echo $ac_n "checking for XFree86""... $ac_c" 1>&6
-echo "configure:4811: checking for XFree86" >&5
+echo "configure:5161: checking for XFree86" >&5
   if test -d "/usr/X386/include" -o \
           -f "/etc/XF86Config" -o \
 	  -f "/etc/X11/XF86Config" -o \
@@ -4829,12 +5179,12 @@
     * ) if test -z "$with_xmu"; then
 	  
 echo $ac_n "checking for XmuConvertStandardSelection in -lXmu""... $ac_c" 1>&6
-echo "configure:4833: checking for XmuConvertStandardSelection in -lXmu" >&5
+echo "configure:5183: checking for XmuConvertStandardSelection in -lXmu" >&5
 ac_lib_var=`echo Xmu'_'XmuConvertStandardSelection | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lXmu "
 cat > conftest.$ac_ext <<EOF
-#line 4838 "configure"
+#line 5188 "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
@@ -4845,7 +5195,7 @@
 XmuConvertStandardSelection()
 ; return 0; }
 EOF
-if { (eval echo configure:4849: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5199: \"$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
@@ -4878,19 +5228,19 @@
 
       
 echo $ac_n "checking for main in -lXbsd""... $ac_c" 1>&6
-echo "configure:4882: checking for main in -lXbsd" >&5
+echo "configure:5232: 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 4887 "configure"
+#line 5237 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:4894: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5244: \"$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
@@ -4913,12 +5263,12 @@
 
     
 echo $ac_n "checking for XawScrollbarSetThumb in -lXaw""... $ac_c" 1>&6
-echo "configure:4917: checking for XawScrollbarSetThumb in -lXaw" >&5
+echo "configure:5267: 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 4922 "configure"
+#line 5272 "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
@@ -4929,7 +5279,7 @@
 XawScrollbarSetThumb()
 ; return 0; }
 EOF
-if { (eval echo configure:4933: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5283: \"$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
@@ -4951,34 +5301,6 @@
 
 
 
-    echo $ac_n "checking for NARROWPROTO""... $ac_c" 1>&6
-echo "configure:4956: checking for NARROWPROTO" >&5
-  rm -fr conftestdir
-  if mkdir conftestdir; then
-    cd conftestdir
-    cat > Imakefile <<'EOF'
-xetest:
-	@echo 'proto_defines="${PROTO_DEFINES}"'
-EOF
-    if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
-      # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-      eval `${MAKE-make} xetest 2>/dev/null | grep -v make`
-      case "$proto_defines" in *NARROWPROTO* ) narrowproto=yes ;; esac
-    fi
-    cd ..
-    rm -fr conftestdir
-  fi
-  test -z "$narrowproto" && narrowproto=no
-  echo "$ac_t""$narrowproto" 1>&6
-  test "$narrowproto" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
-    Defining NARROWPROTO
-EOF
-cat >> confdefs.h <<\EOF
-#define NARROWPROTO 1
-EOF
-}
-
-
 fi 
 test -z "$window_system" && window_system="none"
 
@@ -5014,15 +5336,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:5018: checking for X11/Xauth.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 5021 "configure"
+echo "configure:5340: checking for X11/Xauth.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 5343 "configure"
 #include "confdefs.h"
 #include <X11/Xauth.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5026: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5348: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -5045,12 +5367,12 @@
  }
 test -z "$with_xauth" && { 
 echo $ac_n "checking for XauGetAuthByAddr in -lXau""... $ac_c" 1>&6
-echo "configure:5049: checking for XauGetAuthByAddr in -lXau" >&5
+echo "configure:5371: 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 5054 "configure"
+#line 5376 "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
@@ -5061,7 +5383,7 @@
 XauGetAuthByAddr()
 ; return 0; }
 EOF
-if { (eval echo configure:5065: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5387: \"$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
@@ -5102,15 +5424,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:5106: checking for OffiX/DragAndDrop.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 5109 "configure"
+echo "configure:5428: checking for OffiX/DragAndDrop.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 5431 "configure"
 #include "confdefs.h"
 #include <OffiX/DragAndDrop.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5114: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5436: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -5133,12 +5455,12 @@
  }
 test -z "$with_offix" && { 
 echo $ac_n "checking for DndInitialize in -lDnd""... $ac_c" 1>&6
-echo "configure:5137: checking for DndInitialize in -lDnd" >&5
+echo "configure:5459: 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 5142 "configure"
+#line 5464 "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
@@ -5149,7 +5471,7 @@
 DndInitialize()
 ; return 0; }
 EOF
-if { (eval echo configure:5153: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5475: \"$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
@@ -5188,15 +5510,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:5192: checking for ${dir}tt_c.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 5195 "configure"
+echo "configure:5514: checking for ${dir}tt_c.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 5517 "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:5200: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5522: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -5225,12 +5547,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:5229: checking "$xe_msg_checking"" >&5
+echo "configure:5551: 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 5234 "configure"
+#line 5556 "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
@@ -5241,7 +5563,7 @@
 tt_message_create()
 ; return 0; }
 EOF
-if { (eval echo configure:5245: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5567: \"$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
@@ -5290,15 +5612,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:5294: checking for Dt/Dt.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 5297 "configure"
+echo "configure:5616: checking for Dt/Dt.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 5619 "configure"
 #include "confdefs.h"
 #include <Dt/Dt.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5302: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5624: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -5321,12 +5643,12 @@
  }
 test -z "$with_cde" && { 
 echo $ac_n "checking for DtDndDragStart in -lDtSvc""... $ac_c" 1>&6
-echo "configure:5325: checking for DtDndDragStart in -lDtSvc" >&5
+echo "configure:5647: 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 5330 "configure"
+#line 5652 "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
@@ -5337,7 +5659,7 @@
 DtDndDragStart()
 ; return 0; }
 EOF
-if { (eval echo configure:5341: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5663: \"$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
@@ -5384,19 +5706,19 @@
 
   
 echo $ac_n "checking for main in -lenergize""... $ac_c" 1>&6
-echo "configure:5388: checking for main in -lenergize" >&5
+echo "configure:5710: 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 5393 "configure"
+#line 5715 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:5400: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5722: \"$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
@@ -5428,19 +5750,19 @@
   if test -z "$energize_version"; then
     
 echo $ac_n "checking for main in -lconn""... $ac_c" 1>&6
-echo "configure:5432: checking for main in -lconn" >&5
+echo "configure:5754: 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 5437 "configure"
+#line 5759 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:5444: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5766: \"$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
@@ -5473,15 +5795,15 @@
   fi
   ac_safe=`echo "editorconn.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for editorconn.h""... $ac_c" 1>&6
-echo "configure:5477: checking for editorconn.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 5480 "configure"
+echo "configure:5799: checking for editorconn.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 5802 "configure"
 #include "confdefs.h"
 #include <editorconn.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5485: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5807: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -5523,7 +5845,7 @@
 
 
 echo "checking for graphics libraries" 1>&6
-echo "configure:5527: checking for graphics libraries" >&5
+echo "configure:5849: checking for graphics libraries" >&5
 test -z "$with_gif" && with_gif=yes;
 if test "$with_gif" = "yes"; then
   { test "$extra_verbose" = "yes" && cat << \EOF
@@ -5539,21 +5861,24 @@
  fi
 fi
 
-echo $ac_n "checking for Xpm""... $ac_c" 1>&6
-echo "configure:5544: checking for Xpm" >&5
+echo $ac_n "checking for Xpm - no older than 3.4f""... $ac_c" 1>&6
+echo "configure:5866: checking for Xpm - no older than 3.4f" >&5
 xe_check_libs=-lXpm
 test -z "$with_xpm" && { cat > conftest.$ac_ext <<EOF
-#line 5547 "configure"
+#line 5869 "configure"
 #include "confdefs.h"
 #include <X11/xpm.h>
-int main(int argc, char *argv[]) {
-return (XpmIncludeVersion != XpmLibraryVersion()) ||
-        XpmIncludeVersion < 30406;
-}
-EOF
-if { (eval echo configure:5555: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
+int main(int c, char **v) {
+return c == 1 ? 0 :
+  XpmIncludeVersion != XpmLibraryVersion() ? 1 :
+        XpmIncludeVersion < 30406 ? 2 :
+		0 ;
+}
+EOF
+if { (eval echo configure:5879: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
 then
-  with_xpm=yes
+  ./conftest foobar; xpm_status=$?;
+  if test "$xpm_status" = "0"; then with_xpm=yes; else with_xpm=no; fi;
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
@@ -5564,6 +5889,16 @@
 }
 xe_check_libs=
 echo "$ac_t""$with_xpm" 1>&6
+if test "$xpm_status" = "1" -o "$xpm_status" = "2"; then
+  test "$xpm_status" = "1" && problem="Xpm library version and header file version don't match!"
+  test "$xpm_status" = "2" && problem="Xpm library version is too old!"
+  echo "
+*** WARNING *** $problem
+                I'm not touching that with a 10-foot pole!
+                If you really want to use the installed version of Xpm, rerun
+                configure --with-xpm=yes, but don't blame me if XEmacs crashes!
+"
+fi
 if test "$with_xpm" = "yes"; then
   { test "$extra_verbose" = "yes" && cat << \EOF
     Defining HAVE_XPM
@@ -5578,15 +5913,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:5582: checking for compface.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 5585 "configure"
+echo "configure:5917: checking for compface.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 5920 "configure"
 #include "confdefs.h"
 #include <compface.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5590: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5925: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -5609,12 +5944,12 @@
  }
 test -z "$with_xface" && { 
 echo $ac_n "checking for UnGenFace in -lcompface""... $ac_c" 1>&6
-echo "configure:5613: checking for UnGenFace in -lcompface" >&5
+echo "configure:5948: 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 5618 "configure"
+#line 5953 "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
@@ -5625,7 +5960,7 @@
 UnGenFace()
 ; return 0; }
 EOF
-if { (eval echo configure:5629: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5964: \"$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
@@ -5661,15 +5996,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:5665: checking for jpeglib.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 5668 "configure"
+echo "configure:6000: checking for jpeglib.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 6003 "configure"
 #include "confdefs.h"
 #include <jpeglib.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5673: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6008: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -5692,12 +6027,12 @@
  }
 test -z "$with_jpeg" && { 
 echo $ac_n "checking for jpeg_destroy_decompress in -ljpeg""... $ac_c" 1>&6
-echo "configure:5696: checking for jpeg_destroy_decompress in -ljpeg" >&5
+echo "configure:6031: 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 5701 "configure"
+#line 6036 "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
@@ -5708,7 +6043,7 @@
 jpeg_destroy_decompress()
 ; return 0; }
 EOF
-if { (eval echo configure:5712: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:6047: \"$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
@@ -5744,15 +6079,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:5748: checking for png.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 5751 "configure"
+echo "configure:6083: checking for png.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 6086 "configure"
 #include "confdefs.h"
 #include <png.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5756: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6091: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -5774,10 +6109,10 @@
 fi
  }
 test -z "$with_png" && { echo $ac_n "checking for pow""... $ac_c" 1>&6
-echo "configure:5778: checking for pow" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 5781 "configure"
+echo "configure:6113: checking for pow" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 6116 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char pow(); below.  */
@@ -5800,7 +6135,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:5804: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:6139: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_pow=yes"
 else
@@ -5825,12 +6160,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:5829: checking "$xe_msg_checking"" >&5
+echo "configure:6164: 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 5834 "configure"
+#line 6169 "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
@@ -5841,7 +6176,7 @@
 png_read_image()
 ; return 0; }
 EOF
-if { (eval echo configure:5845: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:6180: \"$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
@@ -5891,15 +6226,15 @@
 
   ac_safe=`echo "Xm/Xm.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for Xm/Xm.h""... $ac_c" 1>&6
-echo "configure:5895: checking for Xm/Xm.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 5898 "configure"
+echo "configure:6230: checking for Xm/Xm.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 6233 "configure"
 #include "confdefs.h"
 #include <Xm/Xm.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5903: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6238: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -5916,12 +6251,12 @@
   echo "$ac_t""yes" 1>&6
   
 echo $ac_n "checking for XmStringFree in -lXm""... $ac_c" 1>&6
-echo "configure:5920: checking for XmStringFree in -lXm" >&5
+echo "configure:6255: 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 5925 "configure"
+#line 6260 "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
@@ -5932,7 +6267,7 @@
 XmStringFree()
 ; return 0; }
 EOF
-if { (eval echo configure:5936: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:6271: \"$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
@@ -6180,7 +6515,7 @@
 
 if test "$with_mule" = "yes" ; then
   echo "checking for Mule-related features" 1>&6
-echo "configure:6184: checking for Mule-related features" >&5
+echo "configure:6519: checking for Mule-related features" >&5
   { test "$extra_verbose" = "yes" && cat << \EOF
     Defining MULE
 EOF
@@ -6197,15 +6532,15 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:6201: checking for $ac_hdr" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 6204 "configure"
+echo "configure:6536: checking for $ac_hdr" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 6539 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6209: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6544: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -6236,12 +6571,12 @@
 
   
 echo $ac_n "checking for strerror in -lintl""... $ac_c" 1>&6
-echo "configure:6240: checking for strerror in -lintl" >&5
+echo "configure:6575: 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 6245 "configure"
+#line 6580 "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
@@ -6252,7 +6587,7 @@
 strerror()
 ; return 0; }
 EOF
-if { (eval echo configure:6256: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:6591: \"$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
@@ -6285,19 +6620,19 @@
 
 
   echo "checking for Mule input methods" 1>&6
-echo "configure:6289: checking for Mule input methods" >&5
-      test -z "$with_xim" && case "$opsys" in sol2* ) ;; *) with_xim=no ;; esac
+echo "configure:6624: 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:6293: checking for XIM" >&5
+echo "configure:6628: checking for XIM" >&5
     
 echo $ac_n "checking for XmImMbLookupString in -lXm""... $ac_c" 1>&6
-echo "configure:6296: checking for XmImMbLookupString in -lXm" >&5
+echo "configure:6631: 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 6301 "configure"
+#line 6636 "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
@@ -6308,7 +6643,7 @@
 XmImMbLookupString()
 ; return 0; }
 EOF
-if { (eval echo configure:6312: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:6647: \"$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
@@ -6370,15 +6705,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:6374: checking for wnn/jllib.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 6377 "configure"
+echo "configure:6709: checking for wnn/jllib.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 6712 "configure"
 #include "confdefs.h"
 #include <wnn/jllib.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6382: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6717: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -6401,12 +6736,12 @@
  }
   test -z "$with_wnn" && { 
 echo $ac_n "checking for jl_dic_list_e in -lwnn""... $ac_c" 1>&6
-echo "configure:6405: checking for jl_dic_list_e in -lwnn" >&5
+echo "configure:6740: 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 6410 "configure"
+#line 6745 "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
@@ -6417,7 +6752,7 @@
 jl_dic_list_e()
 ; return 0; }
 EOF
-if { (eval echo configure:6421: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:6756: \"$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
@@ -6454,12 +6789,12 @@
  fi
     
 echo $ac_n "checking for jl_fi_dic_list in -lwnn""... $ac_c" 1>&6
-echo "configure:6458: checking for jl_fi_dic_list in -lwnn" >&5
+echo "configure:6793: 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 6463 "configure"
+#line 6798 "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
@@ -6470,7 +6805,7 @@
 jl_fi_dic_list()
 ; return 0; }
 EOF
-if { (eval echo configure:6474: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:6809: \"$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
@@ -6502,15 +6837,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:6506: checking for canna/RK.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 6509 "configure"
+echo "configure:6841: checking for canna/RK.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 6844 "configure"
 #include "confdefs.h"
 #include <canna/RK.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6514: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6849: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -6533,12 +6868,12 @@
  }
   test -z "$with_canna" && { 
 echo $ac_n "checking for RkBgnBun in -lRKC""... $ac_c" 1>&6
-echo "configure:6537: checking for RkBgnBun in -lRKC" >&5
+echo "configure:6872: 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 6542 "configure"
+#line 6877 "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
@@ -6549,7 +6884,7 @@
 RkBgnBun()
 ; return 0; }
 EOF
-if { (eval echo configure:6553: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:6888: \"$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
@@ -6572,12 +6907,12 @@
  }
   test -z "$with_canna" && { 
 echo $ac_n "checking for jrKanjiControl in -lcanna""... $ac_c" 1>&6
-echo "configure:6576: checking for jrKanjiControl in -lcanna" >&5
+echo "configure:6911: 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 6581 "configure"
+#line 6916 "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
@@ -6588,7 +6923,7 @@
 jrKanjiControl()
 ; return 0; }
 EOF
-if { (eval echo configure:6592: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:6927: \"$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
@@ -6637,46 +6972,45 @@
   libs_x="-lXm $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXm\" to \$libs_x"; fi
   
 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
-    ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/${dash_r}[^ ]*//"`
-  ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/${dash_r}[^ ]*//"`
+    ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//"`
+  ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//"`
   
-        runpath=""
+        runpath="" runpath_dirs=""
   if test -n "$LD_RUN_PATH"; then
     runpath="$LD_RUN_PATH"
   elif test "$GCC" = "yes"; then
-        echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
+        ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
+    echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
       case "$arg" in P,* | -L* | -R* )
         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
-          
+          {
 xe_runpath_dir="$dir"
-if test "$xe_runpath_dir" != "/lib"     -a \
+  test "$xe_runpath_dir" != "/lib"     -a \
 	"$xe_runpath_dir" != "/usr/lib" -a \
-	-n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`"; then
-  test -n "$runpath" && runpath="${runpath}:"
-  runpath="${runpath}${xe_runpath_dir}"
-fi
-
+	-n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
+  eval "$xe_add_unique_runpath_dir"
+}
         done ;;
       esac
     done
+    ld_switch_run="$ld_switch_run_save"
     rm -f conftest*
   else
         for arg in $ld_switch_site $ld_switch_x_site; do
-      case "$arg" in -L*) 
+      case "$arg" in -L*) {
 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
-if test "$xe_runpath_dir" != "/lib"     -a \
+  test "$xe_runpath_dir" != "/lib"     -a \
 	"$xe_runpath_dir" != "/usr/lib" -a \
-	-n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`"; then
-  test -n "$runpath" && runpath="${runpath}:"
-  runpath="${runpath}${xe_runpath_dir}"
-fi
-;; esac
+	-n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
+  eval "$xe_add_unique_runpath_dir"
+};; esac
     done
-        case "$canonical" in  *-solaris2.[1-4]* )
-      test "$need_motif" = "yes" && runpath="${runpath}:/opt/SUNWdt/lib" ;;
-    esac
+        if test "$opsys $need_motif" = "sol2 yes"; then
+      xe_runpath_dir="/opt/SUNWdt/lib";
+      eval "$xe_add_unique_runpath_dir";
+    fi
   fi 
   if test -n "$runpath"; then
     ld_switch_run="${dash_r}${runpath}"
@@ -6689,10 +7023,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 utimes waitpid
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6693: checking for $ac_func" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 6696 "configure"
+echo "configure:7027: checking for $ac_func" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 7030 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -6715,7 +7049,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:6719: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:7053: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -6752,10 +7086,10 @@
     for ac_func in realpath
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6756: checking for $ac_func" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 6759 "configure"
+echo "configure:7090: checking for $ac_func" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 7093 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -6778,7 +7112,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:6782: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:7116: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -6811,16 +7145,16 @@
 esac
 
 echo $ac_n "checking whether netdb declares h_errno""... $ac_c" 1>&6
-echo "configure:6815: checking whether netdb declares h_errno" >&5
-cat > conftest.$ac_ext <<EOF
-#line 6817 "configure"
+echo "configure:7149: checking whether netdb declares h_errno" >&5
+cat > conftest.$ac_ext <<EOF
+#line 7151 "configure"
 #include "confdefs.h"
 #include <netdb.h>
 int main() {
 return h_errno;
 ; return 0; }
 EOF
-if { (eval echo configure:6824: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:7158: \"$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
@@ -6840,16 +7174,16 @@
 rm -f conftest*
 
 echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6
-echo "configure:6844: checking for sigsetjmp" >&5
-cat > conftest.$ac_ext <<EOF
-#line 6846 "configure"
+echo "configure:7178: checking for sigsetjmp" >&5
+cat > conftest.$ac_ext <<EOF
+#line 7180 "configure"
 #include "confdefs.h"
 #include <setjmp.h>
 int main() {
 sigjmp_buf bar; sigsetjmp (bar, 0);
 ; return 0; }
 EOF
-if { (eval echo configure:6853: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7187: \"$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
@@ -6869,11 +7203,11 @@
 rm -f conftest*
 
 echo $ac_n "checking whether localtime caches TZ""... $ac_c" 1>&6
-echo "configure:6873: checking whether localtime caches TZ" >&5
+echo "configure:7207: checking whether localtime caches TZ" >&5
 
 if test "$ac_cv_func_tzset" = "yes"; then
 cat > conftest.$ac_ext <<EOF
-#line 6877 "configure"
+#line 7211 "configure"
 #include "confdefs.h"
 #include <time.h>
 #if STDC_HEADERS
@@ -6908,7 +7242,7 @@
   exit (0);
 }
 EOF
-if { (eval echo configure:6912: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
+if { (eval echo configure:7246: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
 then
   emacs_cv_localtime_cache=no
 else
@@ -6937,9 +7271,9 @@
 
 if test "$HAVE_TIMEVAL" = "yes"; then
 echo $ac_n "checking whether gettimeofday cannot accept two arguments""... $ac_c" 1>&6
-echo "configure:6941: checking whether gettimeofday cannot accept two arguments" >&5
-cat > conftest.$ac_ext <<EOF
-#line 6943 "configure"
+echo "configure:7275: checking whether gettimeofday cannot accept two arguments" >&5
+cat > conftest.$ac_ext <<EOF
+#line 7277 "configure"
 #include "confdefs.h"
 
 #ifdef TIME_WITH_SYS_TIME
@@ -6961,7 +7295,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:6965: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:7299: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   echo "$ac_t""no" 1>&6
 else
@@ -6983,19 +7317,19 @@
 
 
 echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:6987: checking for inline" >&5
+echo "configure:7321: checking for inline" >&5
 
 ac_cv_c_inline=no
 for ac_kw in inline __inline__ __inline; do
   cat > conftest.$ac_ext <<EOF
-#line 6992 "configure"
+#line 7326 "configure"
 #include "confdefs.h"
 
 int main() {
 } $ac_kw foo() {
 ; return 0; }
 EOF
-if { (eval echo configure:6999: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7333: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_inline=$ac_kw; break
 else
@@ -7045,17 +7379,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:7049: checking for working alloca.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 7052 "configure"
+echo "configure:7383: checking for working alloca.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 7386 "configure"
 #include "confdefs.h"
 #include <alloca.h>
 int main() {
 char *p = alloca(2 * sizeof(int));
 ; return 0; }
 EOF
-if { (eval echo configure:7059: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:7393: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   ac_cv_header_alloca_h=yes
 else
@@ -7079,10 +7413,10 @@
 fi
 
 echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:7083: checking for alloca" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 7086 "configure"
+echo "configure:7417: checking for alloca" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 7420 "configure"
 #include "confdefs.h"
 
 #ifdef __GNUC__
@@ -7105,7 +7439,7 @@
 char *p = (char *) alloca(1);
 ; return 0; }
 EOF
-if { (eval echo configure:7109: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:7443: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   ac_cv_func_alloca_works=yes
 else
@@ -7144,10 +7478,10 @@
 
 
 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:7148: checking whether alloca needs Cray hooks" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 7151 "configure"
+echo "configure:7482: checking whether alloca needs Cray hooks" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 7485 "configure"
 #include "confdefs.h"
 #if defined(CRAY) && ! defined(CRAY2)
 webecray
@@ -7171,10 +7505,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:7175: checking for $ac_func" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 7178 "configure"
+echo "configure:7509: checking for $ac_func" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 7512 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -7197,7 +7531,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:7201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:7535: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -7227,10 +7561,10 @@
 fi
 
 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:7231: checking stack direction for C alloca" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 7234 "configure"
+echo "configure:7565: checking stack direction for C alloca" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 7568 "configure"
 #include "confdefs.h"
 find_stack_direction ()
 {
@@ -7249,7 +7583,7 @@
   exit (find_stack_direction() < 0);
 }
 EOF
-if { (eval echo configure:7253: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
+if { (eval echo configure:7587: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
 then
   ac_cv_c_stack_direction=1
 else
@@ -7275,51 +7609,17 @@
    echo "    xemacs will be linked with \"$ALLOCA\""
  fi
 
-echo $ac_n "checking for pid_t""... $ac_c" 1>&6
-echo "configure:7280: checking for pid_t" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 7283 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#if STDC_HEADERS
-#include <stdlib.h>
-#include <stddef.h>
-#endif
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
-  rm -rf conftest*
-  ac_cv_type_pid_t=yes
-else
-  rm -rf conftest*
-  ac_cv_type_pid_t=no
-fi
-rm -f conftest*
-
-echo "$ac_t""$ac_cv_type_pid_t" 1>&6
-if test $ac_cv_type_pid_t = no; then
-  { test "$extra_verbose" = "yes" && cat << \EOF
-    Defining pid_t = int
-EOF
-cat >> confdefs.h <<\EOF
-#define pid_t int
-EOF
-}
-
-fi
-
 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
-echo "configure:7315: checking for vfork.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 7318 "configure"
+echo "configure:7615: checking for vfork.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 7618 "configure"
 #include "confdefs.h"
 #include <vfork.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7323: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7623: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -7347,10 +7647,10 @@
 fi
 
 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
-echo "configure:7351: checking for working vfork" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 7354 "configure"
+echo "configure:7651: checking for working vfork" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 7654 "configure"
 #include "confdefs.h"
 /* Thanks to Paul Eggert for this test.  */
 #include <stdio.h>
@@ -7445,7 +7745,7 @@
   }
 }
 EOF
-if { (eval echo configure:7449: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
+if { (eval echo configure:7749: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
 then
   ac_cv_func_vfork_works=yes
 else
@@ -7470,10 +7770,10 @@
 
 
 echo $ac_n "checking for working strcoll""... $ac_c" 1>&6
-echo "configure:7474: checking for working strcoll" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 7477 "configure"
+echo "configure:7774: checking for working strcoll" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 7777 "configure"
 #include "confdefs.h"
 #include <string.h>
 main ()
@@ -7483,7 +7783,7 @@
 	strcoll ("123", "456") >= 0);
 }
 EOF
-if { (eval echo configure:7487: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
+if { (eval echo configure:7787: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
 then
   ac_cv_func_strcoll_works=yes
 else
@@ -7507,11 +7807,151 @@
 fi
 
 
+for ac_func in getpgrp
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:7814: checking for $ac_func" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 7817 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func(); below.  */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:7840: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  { test "$extra_verbose" = "yes" && cat << EOF
+    Defining $ac_tr_func
+EOF
+cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+}
+ 
+else
+  echo "$ac_t""no" 1>&6
+fi
+done
+
+echo $ac_n "checking whether getpgrp takes no argument""... $ac_c" 1>&6
+echo "configure:7868: checking whether getpgrp takes no argument" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 7871 "configure"
+#include "confdefs.h"
+
+/*
+ * If this system has a BSD-style getpgrp(),
+ * which takes a pid argument, exit unsuccessfully.
+ *
+ * Snarfed from Chet Ramey's bash pgrp.c test program
+ */
+#include <stdio.h>
+#include <sys/types.h>
+
+int     pid;
+int     pg1, pg2, pg3, pg4;
+int     ng, np, s, child;
+
+main()
+{
+        pid = getpid();
+        pg1 = getpgrp(0);
+        pg2 = getpgrp();
+        pg3 = getpgrp(pid);
+        pg4 = getpgrp(1);
+
+        /*
+         * If all of these values are the same, it's pretty sure that
+         * we're on a system that ignores getpgrp's first argument.
+         */
+        if (pg2 == pg4 && pg1 == pg3 && pg2 == pg3)
+                exit(0);
+
+        child = fork();
+        if (child < 0)
+                exit(1);
+        else if (child == 0) {
+                np = getpid();
+                /*
+                 * If this is Sys V, this will not work; pgrp will be
+                 * set to np because setpgrp just changes a pgrp to be
+                 * the same as the pid.
+                 */
+                setpgrp(np, pg1);
+                ng = getpgrp(0);        /* Same result for Sys V and BSD */
+                if (ng == pg1) {
+                        exit(1);
+                } else {
+                        exit(0);
+                }
+        } else {
+                wait(&s);
+                exit(s>>8);
+        }
+}
+
+EOF
+if { (eval echo configure:7926: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
+then
+  ac_cv_func_getpgrp_void=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  ac_cv_func_getpgrp_void=no
+fi
+rm -fr conftest*
+
+
+echo "$ac_t""$ac_cv_func_getpgrp_void" 1>&6
+if test $ac_cv_func_getpgrp_void = yes; then
+  { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining GETPGRP_VOID
+EOF
+cat >> confdefs.h <<\EOF
+#define GETPGRP_VOID 1
+EOF
+}
+
+fi
+
+
 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:7512: checking for working mmap" >&5
+echo "configure:7952: checking for working mmap" >&5
 case "$opsys" in ultrix* ) have_mmap=no ;; *)
 cat > conftest.$ac_ext <<EOF
-#line 7515 "configure"
+#line 7955 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 #include <unistd.h>
@@ -7544,7 +7984,7 @@
   return 1;
 }
 EOF
-if { (eval echo configure:7548: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
+if { (eval echo configure:7988: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
 then
   have_mmap=yes
 else
@@ -7577,10 +8017,10 @@
 
 
 echo $ac_n "checking for socket""... $ac_c" 1>&6
-echo "configure:7581: checking for socket" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 7584 "configure"
+echo "configure:8021: checking for socket" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 8024 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char socket(); below.  */
@@ -7603,7 +8043,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:7607: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:8047: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_socket=yes"
 else
@@ -7618,15 +8058,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:7622: checking for netinet/in.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 7625 "configure"
+echo "configure:8062: checking for netinet/in.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 8065 "configure"
 #include "confdefs.h"
 #include <netinet/in.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7630: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8070: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -7643,15 +8083,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:7647: checking for arpa/inet.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 7650 "configure"
+echo "configure:8087: checking for arpa/inet.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 8090 "configure"
 #include "confdefs.h"
 #include <arpa/inet.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7655: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8095: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -7676,9 +8116,9 @@
 }
 
       echo $ac_n "checking "for sun_len member in struct sockaddr_un"""... $ac_c" 1>&6
-echo "configure:7680: checking "for sun_len member in struct sockaddr_un"" >&5
+echo "configure:8120: checking "for sun_len member in struct sockaddr_un"" >&5
       cat > conftest.$ac_ext <<EOF
-#line 7682 "configure"
+#line 8122 "configure"
 #include "confdefs.h"
 
 #include <sys/types.h>
@@ -7689,7 +8129,7 @@
 static struct sockaddr_un x; x.sun_len = 1;
 ; return 0; }
 EOF
-if { (eval echo configure:7693: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:8133: \"$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
@@ -7720,10 +8160,10 @@
 
 
 echo $ac_n "checking for msgget""... $ac_c" 1>&6
-echo "configure:7724: checking for msgget" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 7727 "configure"
+echo "configure:8164: checking for msgget" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 8167 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char msgget(); below.  */
@@ -7746,7 +8186,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:7750: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:8190: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_msgget=yes"
 else
@@ -7761,15 +8201,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:7765: checking for sys/ipc.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 7768 "configure"
+echo "configure:8205: checking for sys/ipc.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 8208 "configure"
 #include "confdefs.h"
 #include <sys/ipc.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7773: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8213: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -7786,15 +8226,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:7790: checking for sys/msg.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 7793 "configure"
+echo "configure:8230: checking for sys/msg.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 8233 "configure"
 #include "confdefs.h"
 #include <sys/msg.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7798: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8238: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -7832,15 +8272,15 @@
 
 ac_safe=`echo "dirent.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for dirent.h""... $ac_c" 1>&6
-echo "configure:7836: checking for dirent.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 7839 "configure"
+echo "configure:8276: checking for dirent.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 8279 "configure"
 #include "confdefs.h"
 #include <dirent.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7844: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8284: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -7867,15 +8307,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:7871: checking for sys/dir.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 7874 "configure"
+echo "configure:8311: checking for sys/dir.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 8314 "configure"
 #include "confdefs.h"
 #include <sys/dir.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7879: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8319: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -7908,15 +8348,15 @@
 
 ac_safe=`echo "nlist.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for nlist.h""... $ac_c" 1>&6
-echo "configure:7912: checking for nlist.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 7915 "configure"
+echo "configure:8352: checking for nlist.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 8355 "configure"
 #include "confdefs.h"
 #include <nlist.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7920: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8360: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -7955,14 +8395,50 @@
  break; fi
 done
 
-file="$srcdir/lisp/version.el"
-version=`sed -ne 's/^(defconst emacs-version "\(.*\)".*/\1/p' "$file"`
-if test  -z "$version"; then
-  echo "$progname: can't find current emacs version in \"$file\"." >&2
-  exit 1
-fi
-beta=`sed -ne 's/^.*beta.*(beta\([0-9][0-9]*\)).*$/\1/p' "$file"`
-test -n "$beta" && version="${version}-b${beta}"
+. "$srcdir/version.sh" || exit 1;
+#version=`sed -ne 's/^(defconst emacs-version "\(.*\)".*/\1/p' "$file"`
+#if test  -z "$version"; then
+#  echo "$progname: can't find current emacs version in \"$file\"." >&2
+#  exit 1
+#fi
+#beta=`sed -ne 's/^.*beta.*(beta\([[0-9]][[0-9]]*\)).*$/\1/p' "$file"`
+#test -n "$beta" && version="${version}-b${beta}"
+version="${emacs_major_version}.${emacs_minor_version}"
+{ test "$extra_verbose" = "yes" && cat << EOF
+    Defining EMACS_MAJOR_VERSION = $emacs_major_version
+EOF
+cat >> confdefs.h <<EOF
+#define EMACS_MAJOR_VERSION $emacs_major_version
+EOF
+}
+
+{ test "$extra_verbose" = "yes" && cat << EOF
+    Defining EMACS_MINOR_VERSION = $emacs_minor_version
+EOF
+cat >> confdefs.h <<EOF
+#define EMACS_MINOR_VERSION $emacs_minor_version
+EOF
+}
+
+if test -n "$emacs_beta_version"; then
+  version="${version}-b${emacs_beta_version}"
+  { test "$extra_verbose" = "yes" && cat << EOF
+    Defining EMACS_BETA_VERSION = $emacs_beta_version
+EOF
+cat >> confdefs.h <<EOF
+#define EMACS_BETA_VERSION $emacs_beta_version
+EOF
+}
+
+fi
+{ test "$extra_verbose" = "yes" && cat << EOF
+    Defining XEMACS_CODENAME = "$xemacs_codename"
+EOF
+cat >> confdefs.h <<EOF
+#define XEMACS_CODENAME "$xemacs_codename"
+EOF
+}
+
 { test "$extra_verbose" = "yes" && cat << EOF
     Defining EMACS_VERSION = "$version"
 EOF
@@ -7971,12 +8447,12 @@
 EOF
 }
 
-main_1_id=`echo main_1_xemacs_${version}_${canonical} | sed 'y/.-/__/'`
+canonical_version=`echo ${version}_${canonical} | sed 'y/.-/__/'`
 { test "$extra_verbose" = "yes" && cat << EOF
-    Defining main_1 = $main_1_id
+    Defining CANONICAL_VERSION = $canonical_version
 EOF
 cat >> confdefs.h <<EOF
-#define main_1 $main_1_id
+#define CANONICAL_VERSION $canonical_version
 EOF
 }
 
@@ -7984,7 +8460,7 @@
 
 
 echo "checking "for sound support"" 1>&6
-echo "configure:7988: checking "for sound support"" >&5
+echo "configure:8464: checking "for sound support"" >&5
 case "$with_sound" in
   native | both ) with_native_sound=yes;;
   nas    | no   ) with_native_sound=no;;
@@ -7995,15 +8471,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:7999: checking for multimedia/audio_device.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 8002 "configure"
+echo "configure:8475: checking for multimedia/audio_device.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 8478 "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:8007: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8483: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -8051,12 +8527,12 @@
       if test -z "$native_sound_lib"; then
         
 echo $ac_n "checking for ALopenport in -laudio""... $ac_c" 1>&6
-echo "configure:8055: checking for ALopenport in -laudio" >&5
+echo "configure:8531: 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 8060 "configure"
+#line 8536 "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
@@ -8067,7 +8543,7 @@
 ALopenport()
 ; return 0; }
 EOF
-if { (eval echo configure:8071: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:8547: \"$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
@@ -8098,12 +8574,12 @@
       if test -z "$native_sound_lib"; then
 	
 echo $ac_n "checking for AOpenAudio in -lAlib""... $ac_c" 1>&6
-echo "configure:8102: checking for AOpenAudio in -lAlib" >&5
+echo "configure:8578: 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 8107 "configure"
+#line 8583 "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
@@ -8114,7 +8590,7 @@
 AOpenAudio()
 ; return 0; }
 EOF
-if { (eval echo configure:8118: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:8594: \"$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
@@ -8152,15 +8628,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:8156: checking for ${dir}/soundcard.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 8159 "configure"
+echo "configure:8632: checking for ${dir}/soundcard.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 8635 "configure"
 #include "confdefs.h"
 #include <${dir}/soundcard.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8164: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8640: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -8230,7 +8706,7 @@
  fi
   LIBS="-laudio $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-laudio\" to \$LIBS"; fi
       cat > conftest.$ac_ext <<EOF
-#line 8234 "configure"
+#line 8710 "configure"
 #include "confdefs.h"
 #include <audio/Xtutil.h>
 EOF
@@ -8257,7 +8733,7 @@
 
 if test "$with_tty" = "yes"  ; then
   echo "checking for TTY-related features" 1>&6
-echo "configure:8261: checking for TTY-related features" >&5
+echo "configure:8737: checking for TTY-related features" >&5
   { test "$extra_verbose" = "yes" && cat << \EOF
     Defining HAVE_TTY
 EOF
@@ -8272,15 +8748,15 @@
 
       ac_safe=`echo "termios.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for termios.h""... $ac_c" 1>&6
-echo "configure:8276: checking for termios.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 8279 "configure"
+echo "configure:8752: checking for termios.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 8755 "configure"
 #include "confdefs.h"
 #include <termios.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8284: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8760: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -8307,15 +8783,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:8311: checking for termio.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 8314 "configure"
+echo "configure:8787: checking for termio.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 8790 "configure"
 #include "confdefs.h"
 #include <termio.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8319: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8795: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -8348,12 +8824,12 @@
     if test -z "$with_ncurses"; then
     
 echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
-echo "configure:8352: checking for tgetent in -lncurses" >&5
+echo "configure:8828: 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 8357 "configure"
+#line 8833 "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
@@ -8364,7 +8840,7 @@
 tgetent()
 ; return 0; }
 EOF
-if { (eval echo configure:8368: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:8844: \"$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
@@ -8397,15 +8873,15 @@
 
     ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
-echo "configure:8401: checking for ncurses/curses.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 8404 "configure"
+echo "configure:8877: checking for ncurses/curses.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 8880 "configure"
 #include "confdefs.h"
 #include <ncurses/curses.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8409: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8885: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -8427,15 +8903,15 @@
 
     ac_safe=`echo "ncurses/term.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for ncurses/term.h""... $ac_c" 1>&6
-echo "configure:8431: checking for ncurses/term.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 8434 "configure"
+echo "configure:8907: checking for ncurses/term.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 8910 "configure"
 #include "confdefs.h"
 #include <ncurses/term.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8439: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8915: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -8465,15 +8941,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:8469: checking for ncurses/curses.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 8472 "configure"
+echo "configure:8945: checking for ncurses/curses.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 8948 "configure"
 #include "confdefs.h"
 #include <ncurses/curses.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8477: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8953: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -8508,12 +8984,12 @@
 	for lib in curses termlib termcap; do
 	  
 echo $ac_n "checking for tgetent in -l$lib""... $ac_c" 1>&6
-echo "configure:8512: checking for tgetent in -l$lib" >&5
+echo "configure:8988: 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 8517 "configure"
+#line 8993 "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
@@ -8524,7 +9000,7 @@
 tgetent()
 ; return 0; }
 EOF
-if { (eval echo configure:8528: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:9004: \"$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
@@ -8555,12 +9031,12 @@
       else
 	
 echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6
-echo "configure:8559: checking for tgetent in -lcurses" >&5
+echo "configure:9035: 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 8564 "configure"
+#line 9040 "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
@@ -8571,7 +9047,7 @@
 tgetent()
 ; return 0; }
 EOF
-if { (eval echo configure:8575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:9051: \"$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
@@ -8589,12 +9065,12 @@
 else
   echo "$ac_t""no" 1>&6
 echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
-echo "configure:8593: checking for tgetent in -ltermcap" >&5
+echo "configure:9069: 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 8598 "configure"
+#line 9074 "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
@@ -8605,7 +9081,7 @@
 tgetent()
 ; return 0; }
 EOF
-if { (eval echo configure:8609: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:9085: \"$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
@@ -8653,15 +9129,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:8657: checking for gpm.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 8660 "configure"
+echo "configure:9133: checking for gpm.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 9136 "configure"
 #include "confdefs.h"
 #include <gpm.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8665: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:9141: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -8684,12 +9160,12 @@
  }
   test -z "$with_gpm" && { 
 echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
-echo "configure:8688: checking for Gpm_Open in -lgpm" >&5
+echo "configure:9164: 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 8693 "configure"
+#line 9169 "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
@@ -8700,7 +9176,7 @@
 Gpm_Open()
 ; return 0; }
 EOF
-if { (eval echo configure:8704: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:9180: \"$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
@@ -8743,19 +9219,23 @@
     eval "with_${feature}=no"
   done
 fi 
+test "$with_x11" = "yes" -o "$with_tty" = "yes" && extra_objs="$extra_objs event-unixoid.o" &&  if test "$extra_verbose" = "yes"; then
+   echo "    xemacs will be linked with \"event-unixoid.o\""
+ fi
+
 
 echo "checking for database support" 1>&6
-echo "configure:8749: checking for database support" >&5
+echo "configure:9229: 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:8754: checking for dbm_open in -lgdbm" >&5
+echo "configure:9234: 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 8759 "configure"
+#line 9239 "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
@@ -8766,7 +9246,7 @@
 dbm_open()
 ; return 0; }
 EOF
-if { (eval echo configure:8770: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:9250: \"$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
@@ -8788,10 +9268,10 @@
 
   if test "$with_database_gnudbm" != "yes"; then
     echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
-echo "configure:8792: checking for dbm_open" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 8795 "configure"
+echo "configure:9272: checking for dbm_open" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 9275 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char dbm_open(); below.  */
@@ -8814,7 +9294,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:8818: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:9298: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_dbm_open=yes"
 else
@@ -8850,10 +9330,10 @@
 
 if test "$with_database_dbm" != "no"; then
   echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
-echo "configure:8854: checking for dbm_open" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 8857 "configure"
+echo "configure:9334: checking for dbm_open" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 9337 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char dbm_open(); below.  */
@@ -8876,7 +9356,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:8880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:9360: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_dbm_open=yes"
 else
@@ -8897,12 +9377,12 @@
   if test "$need_libdbm" != "no"; then
     
 echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
-echo "configure:8901: checking for dbm_open in -ldbm" >&5
+echo "configure:9381: 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 8906 "configure"
+#line 9386 "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
@@ -8913,7 +9393,7 @@
 dbm_open()
 ; return 0; }
 EOF
-if { (eval echo configure:8917: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:9397: \"$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
@@ -8950,10 +9430,10 @@
 
 if test "$with_database_berkdb" != "no"; then
   echo $ac_n "checking for dbopen""... $ac_c" 1>&6
-echo "configure:8954: checking for dbopen" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 8957 "configure"
+echo "configure:9434: checking for dbopen" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 9437 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char dbopen(); below.  */
@@ -8976,7 +9456,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:8980: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:9460: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_dbopen=yes"
 else
@@ -8997,12 +9477,12 @@
   if test "$need_libdb" != "no"; then
     
 echo $ac_n "checking for dbopen in -ldb""... $ac_c" 1>&6
-echo "configure:9001: checking for dbopen in -ldb" >&5
+echo "configure:9481: 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 9006 "configure"
+#line 9486 "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
@@ -9013,7 +9493,7 @@
 dbopen()
 ; return 0; }
 EOF
-if { (eval echo configure:9017: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:9497: \"$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
@@ -9037,7 +9517,7 @@
   if test "$with_database_berkdb" = "yes"; then
     for path in "db/db.h" "db.h"; do
 cat > conftest.$ac_ext <<EOF
-#line 9041 "configure"
+#line 9521 "configure"
 #include "confdefs.h"
 #ifdef HAVE_INTTYPES_H
 #define __BIT_TYPES_DEFINED__
@@ -9055,7 +9535,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:9059: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:9539: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   db_h_path="$path"; break
 else
@@ -9107,12 +9587,12 @@
 if test "$with_socks" = "yes"; then
   
 echo $ac_n "checking for SOCKSinit in -lsocks""... $ac_c" 1>&6
-echo "configure:9111: checking for SOCKSinit in -lsocks" >&5
+echo "configure:9591: 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 9116 "configure"
+#line 9596 "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
@@ -9123,7 +9603,7 @@
 SOCKSinit()
 ; return 0; }
 EOF
-if { (eval echo configure:9127: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:9607: \"$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
@@ -9259,16 +9739,7 @@
 
 if test "$extra_verbose" = "yes"; then
   echo ""
-  echo "extra_objs = \"$extra_objs\""
-echo "c_switch_general = \"$c_switch_general\""
-echo "c_switch_window_system = \"$c_switch_window_system\""
-echo "c_switch_all = \"$c_switch_all\""
-echo "ld_switch_general = \"$ld_switch_general\""
-echo "ld_switch_window_system = \"$ld_switch_window_system\""
-echo "ld_switch_all = \"$ld_switch_all\""
-echo "ld_libs_general = \"$ld_libs_general\""
-echo "ld_libs_window_system = \"$ld_libs_window_system\""
-echo "ld_libs_all = \"$ld_libs_all\""
+  for var in extra_objs    c_switch_general  c_switch_window_system  c_switch_all   ld_switch_general ld_switch_window_system ld_switch_all     ld_libs_general   ld_libs_window_system   ld_libs_all; do eval "echo \"$var = '\$$var'\""; done
   echo ""
 fi
 
@@ -9829,6 +10300,12 @@
 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
+s%@ld@%$ld%g
+s%@lib_gcc@%$lib_gcc%g
 s%@RANLIB@%$RANLIB%g
 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
 s%@INSTALL_DATA@%$INSTALL_DATA%g
@@ -10101,14 +10578,30 @@
   (
     cd $dir
     rm -f junk.c
-    sed -e 's/^# Generated.*//' -e 's%/\*\*/#.*%%' < Makefile.in > junk.c;
+    < Makefile.in \
+      sed -e 's/^# Generated.*//' \
+          -e 's%/\*\*/#.*%%' \
+          -e 's/^[ \f\t]*#[ \f\t]*/#/' \
+          -e '/^##/d' \
+          -e '/^#/ {
+p
+d
+}'        -e '/./ {
+s/\([\"]\)/\\\1/g
+s/^/"/
+s/$/"/
+}'  > junk.c;
     $CPP -I. -I${top_srcdir}/src $CPPFLAGS junk.c > junk.cpp;
     < junk.cpp				\
       sed -e 's/^#.*//'			\
 	-e 's/^[ \f\t][ \f\t]*$//'	\
 	-e 's/^ /	/'		\
 	| sed -n -e '/^..*$/p'		\
-	> Makefile.new
+	| sed '/^"/ {
+s/\\\([\"]\)/\1/g
+s/^"//
+s/"$//
+}'	> Makefile.new
     chmod 444 Makefile.new
     mv -f Makefile.new Makefile
     rm -f junk.c junk.cpp
diff -r 4de2936b4e77 -r 0132846995bd configure.in
--- a/configure.in	Mon Aug 13 09:42:28 2007 +0200
+++ b/configure.in	Mon Aug 13 09:43:35 2007 +0200
@@ -58,9 +58,9 @@
 dnl - ordinary libs are handled separately from X libs (might be a mistake)
 dnl - various random kludges (e.g. -with-dnet=no
 
-dnl PRINT_VAR(var, var, ...)  prints values of shell variables
-define([PRINT_VAR],[ifelse([$#] ,0, , [$#], 1, echo "[$1] = \"$[$1]\"", echo "[$1] = \"$[$1]\""
-[PRINT_VAR(builtin([shift],$@))])])
+dnl PRINT_VAR(var var ...)  prints values of shell variables
+define([PRINT_VAR],[for var in patsubst([$1],[[
+]+],[ ]); do eval "echo \"$var = '\$$var'\""; done])
 
 dnl Disable cache files:
 dnl This is controversial, but I am convinced this is the right way to go,
@@ -942,7 +942,7 @@
 
 dnl Allow use of either ":" or spaces for lists of directories
 define(COLON_TO_SPACE,
-  [case "[$1]" in *:* [)] [$1]="`echo '' $[$1] | sed -e 's:^ ::' -e 's/:/ /g'`";; esac])dnl
+  [case "$[$1]" in *:* [)] [$1]="`echo '' $[$1] | sed -e 's:^ ::' -e 's/:/ /g'`";; esac])dnl
 COLON_TO_SPACE(site_includes)
 COLON_TO_SPACE(site_libraries)
 COLON_TO_SPACE(site_runtime_libraries)
@@ -1101,7 +1101,7 @@
   romp-ibm-*       ) machine=ibmrt ;;
   rs6000-ibm-aix*  ) machine=ibmrs6000 ;;
   powerpc-ibm-aix* ) machine=ibmrs6000 ;;
-  powerpc-*-*      ) machine=powerpc ;;
+  powerpc*-*       ) machine=powerpc ;;
   hppa-*-*         ) machine=hp800 ;;
   m88k-dg-*        ) machine=aviion ;;
   m68*-sony-*      ) machine=news ;;
@@ -1410,14 +1410,14 @@
       m68*-sunos1* )	         machine=sun1     ;;
       m68*-sunos2* )	         machine=sun2     ;;
       m68* )		         machine=sun3     ;;
-      i[[3-9]]86*-sun-sunos[[34]]* ) machine=sun386 ;;
-      i[[3-9]]86-*-* )	         machine=intel386 ;;
+      i*86*-sun-sunos[[34]]* )   machine=sun386   ;;
+      i*86-*-* )	         machine=intel386 ;;
       rs6000* )                  machine=rs6000   ;;
     esac
 
     dnl Make $canonical even more so.
     case "$canonical" in *-sunos5*)
-      canonical="`echo \"$canonical\" | sed -e s/sunos5/solaris2/`";;
+      canonical=`echo $canonical | sed -e s/sunos5/solaris2/`;;
     esac
 
     dnl On SunOS 4, use /usr/lib/cpp, sans dynodump, /bin/ranlib
@@ -1434,20 +1434,18 @@
     esac
 
     case "$canonical" in
+      *-solaris*	  )
+	opsys=sol2
+	os_release=`uname -r | sed -e 's/^\([[0-9]]\)\.\([[0-9]]\).*/\1\2/'`
+	AC_DEFINE_UNQUOTED(OS_RELEASE, $os_release) ;;
+
       dnl The last Sun386 ran 4.0.
-      i[[3-9]]86-*-sunos4*) opsys=sunos4-0	;;
+      i*86-*-sunos4*      ) opsys=sunos4-0	;;
       *-sunos4.0*	  ) opsys=sunos4-0	;;
       *-sunos4.1.2*	  ) opsys=sunos4-1-2	;;
       *-sunos4.1.3*	  ) opsys=sunos4-1-3	;;
       *-sunos4.1.[[4-9]]* ) opsys=sunos4-1-4	;;
       *-sunos4* | *-sunos ) opsys=sunos4-1	;;
-
-      *-solaris2.3*	  ) opsys=sol2-3	;;
-      *-solaris2.4*	  ) opsys=sol2-4	;;
-      *-solaris2.5*	  ) opsys=sol2-5	;;
-      *-solaris2.[[6-9]]* ) opsys=sol2-6	;;
-      *-solaris*	  ) opsys=sol2		;;
-
       *-mach*		  ) opsys=mach-bsd4-3	;;
       *			  ) opsys=bsd4-2	;;
     esac
@@ -1455,9 +1453,7 @@
     case "$canonical" in *-sunos4*shr* ) opsys="${opsys}-shr" ;; esac
 
     dnl Watch out for a compiler guaranteed not to work.
-    case "$canonical" in
-      *-solaris* ) case "$CC" in /usr/ucb/cc* ) CC="" ;; esac ;;
-    esac
+    test "$opsys $CC" = "sol2 /usr/ucb/cc" && CC=""
   ;;
 
   dnl Tadpole 68k
@@ -1558,7 +1554,7 @@
   esac
 elif test "$dynamic" = "no" ; then
   case "$opsys" in
-    sol2* | decosf1-3 | decosf3-* | decosf4-* | linux ) opsys="${opsys}-static" ;;
+    sol2 | decosf1-3 | decosf3-* | decosf4-* | linux ) opsys="${opsys}-static" ;;
   esac
 fi
 
@@ -1661,6 +1657,7 @@
 #define LD_SWITCH_SITE
 #define LD_SWITCH_X_SITE
 #define LD_SWITCH_X_SITE_AUX
+#define OS_RELEASE '$os_release'
 #include "'$srcdir'/src/'$opsysfile'"
 #include "'$srcdir'/src/'$machfile'"
 
@@ -1669,6 +1666,9 @@
 CPP_to_sh(LIBS_TERMCAP, libs_termcap)
 CPP_to_sh(LIB_STANDARD, libs_standard)
 
+CPP_to_sh(OBJECTS_MACHINE, objects_machine)
+CPP_to_sh(OBJECTS_SYSTEM,  objects_system)
+
 CPP_to_sh(C_SWITCH_MACHINE,   c_switch_machine)
 CPP_to_sh(C_SWITCH_SYSTEM,    c_switch_system)
 CPP_to_sh(C_SWITCH_X_SYSTEM,  c_switch_x_system)
@@ -1679,6 +1679,43 @@
 
 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
+#define LD "$(CC) $(CFLAGS)"
+#else /* no ORDINARY LINK */
+#ifdef COFF_ENCAPSULATE
+#define LD "$(CC) -nostdlib"
+#else /* not COFF_ENCAPSULATE */
+#ifdef LINKER
+#define LD LINKER
+#else /* ! defined (LINKER) */
+#define LD "ld"
+#endif /* ! defined (LINKER) */
+#endif /* ! defined (COFF_ENCAPSULATE) */
+#endif /* not ORDINARY_LINK */
+configure___ ld=LD
+
+CPP_to_sh(LIB_GCC, lib_gcc)
+CPP_to_sh(LD_TEXT_START_ADDR, ld_text_start_addr)
+
+#if ! defined (ORDINARY_LINK) && !defined (START_FILES)
+#ifdef NO_REMAP
+#ifdef COFF_ENCAPSULATE
+#define START_FILES "pre-crt0.o /usr/local/lib/gcc-crt0.o"
+#else /* ! defined (COFF_ENCAPSULATE) */
+#define START_FILES "pre-crt0.o /lib/crt0.o"
+#endif /* ! defined (COFF_ENCAPSULATE) */
+#else /* ! defined (NO_REMAP) */
+#define START_FILES "ecrt0.o"
+#endif /* ! defined (NO_REMAP) */
+#endif /* no ORDINARY_LINK */
+#ifndef START_FILES
+#define START_FILES
+#endif
+configure___ start_files=START_FILES
+
 CPP_boolean_to_sh(ORDINARY_LINK, ordinary_link)
 CPP_boolean_to_sh(SYSTEM_MALLOC, system_malloc)
 CPP_boolean_to_sh(TERMINFO, have_terminfo)
@@ -1713,7 +1750,7 @@
 dnl to get its actual value...
 CPP=`eval "echo $CPP"`
 eval `$CPP -Isrc $tempcname \
-	| sed -n -e "s/ *=[[ \"]]*/='/" -e "s/[[ \"]]*\$/'/" -e "s/^configure___//p"`
+	| [sed -n -e "s/[ \t]*=[ \t\"]*/='/" -e "s/[ \t\"]*\$/'/" -e "s/^configure___//p"`]
 
 dnl if test -z "$SPECIFIED_CFLAGS"; then
 dnl   eval `$CPP -Isrc -DTHIS_IS_CONFIGURE $tempcname \
@@ -1724,6 +1761,16 @@
 
 rm $tempcname
 
+dnl For debugging...
+test "$extra_verbose" = "yes" && \
+  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 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"
 
@@ -1738,16 +1785,65 @@
       CFLAGS="$CFLAGS -fno-strength-reduce -malign-loops=2 -malign-jumps=2 -malign-functions=2"
   elif test "$__sunpro_c" = "yes"; then
     case "$opsys" in
-      sol2*   ) CFLAGS="-v -xO4" ;;
-      sunos4* ) CFLAGS="-xO3";;
+      sol2    ) CFLAGS="-v -xO4" ;;
+      sunos4* ) CFLAGS="-xO2";;
     esac
   else
     CFLAGS="-O" # The only POSIX-approved flag
   fi
 fi
 
-dnl Add unexec object to link line
-XE_ADD_OBJS($unexec)
+dnl Make sure linker flags not understood by GCC are properly wrapped.
+if test "$GCC" = "yes"; then
+  define([XE_GCC_WRAP_LDFLAGS],
+  [[$1_tmp]="$[$1]"; [$1]=""
+  for arg in $[$1_tmp]; do
+    case "$arg" in
+      -L* | -l* | -R* | -u* | -Wl* | -f* ) [$1]="$[$1] $arg" ;;
+      -Xlinker* ) ;;
+      * ) [$1]="$[$1] -Xlinker $arg" ;;
+    esac
+  done])dnl
+  XE_GCC_WRAP_LDFLAGS(ld_switch_system)
+  XE_GCC_WRAP_LDFLAGS(ld_switch_machine)
+  XE_GCC_WRAP_LDFLAGS(LDFLAGS)
+fi
+
+dnl Add s&m-determined objects (including unexec) to link line
+test -n "$objects_machine" && XE_ADD_OBJS($objects_machine)
+test -n "$objects_system"  && XE_ADD_OBJS($objects_system)
+test -n "$unexec"          && XE_ADD_OBJS($unexec)
+
+dnl Dynodump (Solaris 2.x, x<6)
+AC_MSG_CHECKING(for dynodump)
+if test "$unexec" != "unexsol2.o"; then
+  AC_MSG_RESULT(no)
+else
+  AC_MSG_RESULT(yes)
+  AC_DEFINE(DYNODUMP)
+  XE_APPEND(dynodump, MAKE_SUBDIR)
+  case "$machine" in
+    sparc   ) dynodump_arch=sparc ;;
+    *86*    ) dynodump_arch=i386  ;;
+    powerpc ) dynodump_arch=ppc   ;;
+  esac
+  dnl Dynodump requires the system linker
+  test "$GCC" = "yes" && XE_APPEND(-fno-gnu-linker, ld_switch_site)
+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"
+AC_SUBST(start_flags)
+if test "$ordinary_link" = "no" -a "$GCC" = "yes"; then
+ test -z "$linker" &&  linker='$(CC) -nostdlib'
+ test -z "$lib_gcc" && lib_gcc='`$(CC) -print-lib-gcc-file-name`'
+fi
+test "$GCC" != "yes" && lib_gcc=
+AC_SUBST(ld)
+AC_SUBST(lib_gcc)
 
 dnl ---------------------------------------------------------------
 dnl Add site and system specific flags to compile and link commands
@@ -1770,10 +1866,10 @@
 fi
 
 dnl GNU software installs by default into /usr/local/{include,lib}
-if test -d "/usr/local/include" -a -d "/usr/local/lib"; then
-  XE_APPEND("-L/usr/local/lib",    ld_switch_site)
-  XE_APPEND("-I/usr/local/include", c_switch_site)
-fi
+dnl if test -d "/usr/local/include" -a -d "/usr/local/lib"; then
+dnl   XE_APPEND("-L/usr/local/lib",    ld_switch_site)
+dnl   XE_APPEND("-I/usr/local/include", c_switch_site)
+dnl fi
 
 dnl Extra system-specific library directories - please add to list
 for dir in "/usr/ccs/lib"; do
@@ -1792,8 +1888,8 @@
 
 if   test "$dynamic" = "no"; then add_runtime_path=no
 elif test -n "$LD_RUN_PATH"; then add_runtime_path=yes
-else case "$canonical" in
-       *-solaris2.* | *-sgi-irix* ) add_runtime_path=yes ;;
+else case "$opsys" in
+       sol2 | irix* | *bsd* ) add_runtime_path=yes ;;
        * ) add_runtime_path=no ;;
      esac
 fi
@@ -1815,33 +1911,45 @@
   fi
 fi
 
+xe_add_unique_runpath_dir='
+  xe_add_p=yes
+  for xe_dir in $runpath_dirs; do   dnl Uniquify
+    test "$xe_dir" = "$xe_runpath_dir" && xe_add_p=no
+  done
+  if test "$xe_add_p" = "yes"; then
+    test -n "$runpath" && runpath="${runpath}:"
+    runpath="${runpath}${xe_runpath_dir}"
+    runpath_dirs="$runpath_dirs $xe_runpath_dir"
+  fi'
+
+
 dnl XE_ADD_RUNPATH_DIR(directory)
-define([XE_ADD_RUNPATH_DIR],[
+define([XE_ADD_RUNPATH_DIR],[{
 xe_runpath_dir=$1
-if test "$xe_runpath_dir" != "/lib"     -a \
+dnl PRINT_VAR(ld_switch_site ld_switch_x_site runpath xe_runpath_dir LD_RUN_PATH xe_ldflags)
+  test "$xe_runpath_dir" != "/lib"     -a \
 	"$xe_runpath_dir" != "/usr/lib" -a \
-	-n "`ls ${xe_runpath_dir}/*.s[[ol]] 2>/dev/null`"; then
-  test -n "$runpath" && runpath="${runpath}:"
-  runpath="${runpath}${xe_runpath_dir}"
-fi
-])dnl
+	-n "`ls ${xe_runpath_dir}/*.s[[ol]] 2>/dev/null`" && \
+  eval "$xe_add_unique_runpath_dir"
+}])dnl
 
 dnl XE_COMPUTE_RUNPATH()
 define([XE_COMPUTE_RUNPATH],[
 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
   dnl Remove runtime paths from current ld switches
-  ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/${dash_r}[[^ ]]*//"`
-  ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/${dash_r}[[^ ]]*//"`
-  dnl PRINT_VAR(ld_switch_site, ld_switch_x_site)
+  ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[[^ ]]*//"`
+  ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[[^ ]]*//"`
+  dnl PRINT_VAR(ld_switch_site ld_switch_x_site)
 
   dnl Fix up Runtime path
   dnl If LD_RUN_PATH is set in environment, use that.
   dnl In this case, assume user has set the right value.
-  runpath=""
+  runpath="" runpath_dirs=""
   if test -n "$LD_RUN_PATH"; then
     runpath="$LD_RUN_PATH"
   elif test "$GCC" = "yes"; then
     dnl Compute runpath from gcc's -v output
+    ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
     echo "int main(int argc, char *argv[[]]) {return 0;}" > conftest.c
     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
@@ -1851,6 +1959,7 @@
         done ;;
       esac
     done
+    ld_switch_run="$ld_switch_run_save"
     rm -f conftest*
   else
     dnl Add all directories with .so files to runpath
@@ -1858,9 +1967,10 @@
       case "$arg" in -L*) XE_ADD_RUNPATH_DIR(`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`);; esac
     done
     dnl Sometimes /opt/SUNWdt/lib is the only installed Motif available
-    case "$canonical" in  *-solaris2.[[1-4]]* )
-      test "$need_motif" = "yes" && runpath="${runpath}:/opt/SUNWdt/lib" ;;
-    esac
+    if test "$opsys $need_motif" = "sol2 yes"; then
+      xe_runpath_dir="/opt/SUNWdt/lib";
+      eval "$xe_add_unique_runpath_dir";
+    fi
   fi dnl Compute $runpath
 
   if test -n "$runpath"; then
@@ -1898,7 +2008,7 @@
 
 dnl checks for header files
 AC_CHECK_HEADERS(mach/mach.h sys/stropts.h sys/timeb.h sys/time.h unistd.h)
-AC_CHECK_HEADERS(utime.h locale.h libgen.h)
+AC_CHECK_HEADERS(utime.h locale.h libgen.h fcntl.h)
 AC_CHECK_HEADERS(linux/version.h kstat.h sys/pstat.h inttypes.h limits.h)
 AC_HEADER_SYS_WAIT
 AC_HEADER_STDC
@@ -1926,6 +2036,11 @@
 
 dnl checks for typedefs
 AC_TYPE_SIGNAL
+AC_TYPE_SIZE_T
+AC_TYPE_PID_T
+AC_TYPE_UID_T
+AC_TYPE_MODE_T
+AC_TYPE_OFF_T
 
 AC_MSG_CHECKING(for struct timeval)
 AC_TRY_COMPILE([#ifdef TIME_WITH_SYS_TIME
@@ -1959,14 +2074,16 @@
 
 dnl define SIZEOF_TYPE
 AC_CHECK_SIZEOF(short)
-AC_CHECK_SIZEOF(int)
-AC_CHECK_SIZEOF(long)
-if test "$ac_cv_sizeof_long" = 0; then
+if test "$ac_cv_sizeof_short" = 0; then
   echo ""
   echo "*** PANIC *** Configure tests are not working - compiler is broken."
   echo "*** PANIC *** Please examine config.log for compilation errors."
   exit 1
 fi
+AC_CHECK_SIZEOF(int)
+AC_CHECK_SIZEOF(long)
+AC_CHECK_SIZEOF(long long)
+AC_CHECK_SIZEOF(void *)
 
 dnl check for long file names
 AC_SYS_LONG_FILE_NAMES
@@ -1975,7 +2092,8 @@
 AC_CHECK_LIB(m, sqrt)
 
 dnl -lPW might be needed on some systems
-AC_CHECK_LIB(PW, main)
+dnl But they break more other systems.
+dnl AC_CHECK_LIB(PW, main)
 
 dnl Floating operation support is now unconditional
 AC_DEFINE(LISP_FLOAT_TYPE)
@@ -2009,31 +2127,15 @@
   else AC_MSG_RESULT(no)
 fi
 
-dnl Dynodump (Solaris 2.x, x<6)
-AC_MSG_CHECKING(for dynodump)
-case "$opsys" in sol2* )
-  AC_MSG_RESULT(yes)
-  AC_DEFINE(DYNODUMP)
-  XE_APPEND(dynodump, MAKE_SUBDIR)
-  case "$machine" in
-    sparc   ) dynodump_arch=sparc ;;
-    *86*    ) dynodump_arch=i386  ;;
-    powerpc ) dynodump_arch=ppc   ;;
-  esac
-  dnl Dynodump requires the system linker
-  test "$GCC" = "yes" && XE_APPEND(-fno-gnu-linker, ld_switch_site) ;;
-  *) AC_MSG_RESULT(no) ;;
-esac
-
 dnl Link with "-z ignore" on Solaris if supported
-case "$opsys" in sol2-[[6-9]]* )
+if test "$opsys" = "sol2" -a "${OS_RELEASE:-0}" -ge 56; then
   AC_MSG_CHECKING(for \"-z ignore\" linker flag)
   case "`ld -h 2>&1`" in
     *-z\ ignore\|record* ) AC_MSG_RESULT(yes)
       XE_PREPEND(-z ignore, ld_switch_site) ;;
     *) AC_MSG_RESULT(no) ;;
-  esac ;;
-esac
+  esac
+fi
 
 dnl ----------------------
 dnl Choose a window system
@@ -2113,10 +2215,34 @@
 
   if test "$extra_verbose" = "yes"; then
     echo; echo "X11 compilation variables:"
-    PRINT_VAR(x_libraries, x_includes, X_CFLAGS, X_LIBS, X_PRE_LIBS, X_EXTRA_LIBS)
+    PRINT_VAR(x_libraries x_includes X_CFLAGS X_LIBS X_PRE_LIBS X_EXTRA_LIBS)
     echo
   fi
 
+  dnl Autodetect defines extracted from X config by xmkmf, e.g. NARROWPROTO
+  AC_CHECKING(for X defines extracted by xmkmf)
+  rm -fr conftestdir
+  if mkdir conftestdir; then
+    cd conftestdir
+    cat > Imakefile <<'EOF'
+xetest:
+	@echo ${PROTO_DEFINES} ${STD_DEFINES}
+EOF
+    if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
+      # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+      xmkmf_defines=`${MAKE-make} xetest 2>/dev/null | grep -v make`
+    fi
+    cd ..
+    rm -fr conftestdir
+    for word in $xmkmf_defines; do
+      case "$word" in
+	-D*=* ) ;;
+	-D* ) word=`echo '' $word | sed -e 's:^ *-D::'`
+	      AC_DEFINE_UNQUOTED($word) ;;
+      esac
+    done
+  fi
+
   dnl make sure we can find Intrinsic.h
   AC_CHECK_HEADER(X11/Intrinsic.h, ,
    [AC_MSG_ERROR("Unable to find X11 header files.")])
@@ -2184,27 +2310,6 @@
   dnl Autodetect -lXaw
   AC_CHECK_LIB(Xaw, XawScrollbarSetThumb, have_xaw=yes, have_xaw=no)
 
-  dnl Autodetect -DNARROWPROTO
-  AC_MSG_CHECKING(for NARROWPROTO)
-  rm -fr conftestdir
-  if mkdir conftestdir; then
-    cd conftestdir
-    cat > Imakefile <<'EOF'
-xetest:
-	@echo 'proto_defines="${PROTO_DEFINES}"'
-EOF
-    if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
-      # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-      eval `${MAKE-make} xetest 2>/dev/null | grep -v make`
-      case "$proto_defines" in *NARROWPROTO* ) narrowproto=yes ;; esac
-    fi
-    cd ..
-    rm -fr conftestdir
-  fi
-  test -z "$narrowproto" && narrowproto=no
-  AC_MSG_RESULT($narrowproto)
-  test "$narrowproto" = "yes" && AC_DEFINE(NARROWPROTO)
-
 fi dnl $with_x11 = yes
 
 test -z "$window_system" && window_system="none"
@@ -2329,16 +2434,30 @@
 fi
 
 dnl Autodetect Xpm
-AC_MSG_CHECKING(for Xpm)
+AC_MSG_CHECKING(for Xpm - no older than 3.4f)
 xe_check_libs=-lXpm
 test -z "$with_xpm" && { AC_TRY_RUN([#include <X11/xpm.h>
-int main(int argc, char *argv[]) {
-return (XpmIncludeVersion != XpmLibraryVersion()) ||
-        XpmIncludeVersion < 30406;
-}], with_xpm=yes, with_xpm=no)
+int main(int c, char **v) {
+return c == 1 ? 0 :
+  XpmIncludeVersion != XpmLibraryVersion() ? 1 :
+        XpmIncludeVersion < 30406 ? 2 :
+		0 ;
+}], [./conftest foobar; xpm_status=$?;
+  if test "$xpm_status" = "0"; then with_xpm=yes; else with_xpm=no; fi;],
+with_xpm=no, with_xpm=no)
 }
 xe_check_libs=
 AC_MSG_RESULT($with_xpm)
+if test "$xpm_status" = "1" -o "$xpm_status" = "2"; then
+  test "$xpm_status" = "1" && problem="Xpm library version and header file version don't match!"
+  test "$xpm_status" = "2" && problem="Xpm library version is too old!"
+  echo "
+*** WARNING *** $problem
+                I'm not touching that with a 10-foot pole!
+                If you really want to use the installed version of Xpm, rerun
+                configure --with-xpm=yes, but don't blame me if XEmacs crashes!
+"
+fi
 if test "$with_xpm" = "yes"; then
   AC_DEFINE(HAVE_XPM)
   XE_PREPEND(-lXpm, libs_x)
@@ -2479,7 +2598,7 @@
   AC_CHECKING(for Mule input methods)
   dnl Do we have the XmIm* routines?  And if so, do we want to use them?
   dnl XIM seems to be flaky except on Solaris...
-  test -z "$with_xim" && case "$opsys" in sol2* ) ;; *) with_xim=no ;; esac
+  test -z "$with_xim" -a "$opsys" != "sol2" && with_xim=no
   case "$with_xim" in "" | "yes" )
     AC_CHECKING(for XIM)
     AC_CHECK_LIB(Xm, XmImMbLookupString, with_xim=motif, with_xim=xlib)
@@ -2657,6 +2776,12 @@
 dnl than just check for its existence.) If so, it defines HAVE_STRCOLL.
 AC_FUNC_STRCOLL
 
+dnl If `getpgrp' takes no argument (the POSIX.1 version), define
+dnl `GETPGRP_VOID'.  Otherwise, it is the BSD version, which takes a
+dnl process ID as an argument.
+AC_CHECK_FUNCS(getpgrp)
+AC_FUNC_GETPGRP
+
 dnl We used to call AC_FUNC_MMAP here
 dnl Instead we now use following, suggested by Neal Becker
 AC_MSG_CHECKING(for working mmap)
@@ -2735,17 +2860,25 @@
 done
 
 dnl Find out which version of XEmacs this is.
-file="$srcdir/lisp/version.el"
-version=`sed -ne 's/^(defconst emacs-version "\(.*\)".*/\1/p' "$file"`
-if test  -z "$version"; then
-  echo "$progname: can't find current emacs version in \"$file\"." >&2
-  exit 1
+. "$srcdir/version.sh" || exit 1;
+#version=`sed -ne 's/^(defconst emacs-version "\(.*\)".*/\1/p' "$file"`
+#if test  -z "$version"; then
+#  echo "$progname: can't find current emacs version in \"$file\"." >&2
+#  exit 1
+#fi
+#beta=`sed -ne 's/^.*beta.*(beta\([[0-9]][[0-9]]*\)).*$/\1/p' "$file"`
+#test -n "$beta" && version="${version}-b${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)
+if test -n "$emacs_beta_version"; then
+  version="${version}-b${emacs_beta_version}"
+  AC_DEFINE_UNQUOTED(EMACS_BETA_VERSION, $emacs_beta_version)
 fi
-beta=`sed -ne 's/^.*beta.*(beta\([[0-9]][[0-9]]*\)).*$/\1/p' "$file"`
-test -n "$beta" && version="${version}-b${beta}"
+AC_DEFINE_UNQUOTED(XEMACS_CODENAME, "$xemacs_codename")
 AC_DEFINE_UNQUOTED(EMACS_VERSION, "$version")
-main_1_id=`echo main_1_xemacs_${version}_${canonical} | sed 'y/.-/__/'`
-AC_DEFINE_UNQUOTED(main_1, $main_1_id)
+canonical_version=`echo ${version}_${canonical} | sed 'y/.-/__/'`
+AC_DEFINE_UNQUOTED(CANONICAL_VERSION, $canonical_version)
 
 
 dnl Check for sound of various sorts.
@@ -2928,6 +3061,9 @@
   done
 fi dnl with_tty
 
+dnl Do we need event-unixoid.o ?
+test "$with_x11" = "yes" -o "$with_tty" = "yes" && XE_ADD_OBJS(event-unixoid.o)
+
 dnl Database support
 dnl <mdiers@logware.de>
 dnl We do not necessarily have to have libdb/lib(g)dbm for DB/(G)DBM support.
@@ -3056,10 +3192,10 @@
 
 if test "$extra_verbose" = "yes"; then
   echo ""
-  PRINT_VAR(extra_objs,
-   c_switch_general,  c_switch_window_system,  c_switch_all,
-  ld_switch_general, ld_switch_window_system, ld_switch_all,
-    ld_libs_general,   ld_libs_window_system,   ld_libs_all)
+  PRINT_VAR(extra_objs
+   c_switch_general  c_switch_window_system  c_switch_all
+  ld_switch_general ld_switch_window_system ld_switch_all
+    ld_libs_general   ld_libs_window_system   ld_libs_all)
   echo ""
 fi
 
@@ -3342,21 +3478,37 @@
 AC_OUTPUT($internal_makefile_list,[
 for dir in $MAKE_SUBDIR; do
   echo creating $dir/Makefile
-  (
+  ([
     cd $dir
     rm -f junk.c
-    sed -e 's/^# Generated.*//' -e 's%/\*\*/#.*%%' < Makefile.in > junk.c;
+    < Makefile.in \
+      sed -e 's/^# Generated.*//' \
+          -e 's%/\*\*/#.*%%' \
+          -e 's/^[ \f\t]*#[ \f\t]*/#/' \
+          -e '/^##/d' \
+          -e '/^#/ {
+p
+d
+}'        -e '/./ {
+s/\([\"]\)/\\\1/g
+s/^/"/
+s/$/"/
+}'  > junk.c;
     $CPP -I. -I${top_srcdir}/src $CPPFLAGS junk.c > junk.cpp;
     < junk.cpp				\
       sed -e 's/^#.*//'			\
-	-e 's/^[[ \f\t]][[ \f\t]]*$//'	\
+	-e 's/^[ \f\t][ \f\t]*$//'	\
 	-e 's/^ /	/'		\
 	| sed -n -e '/^..*$/p'		\
-	> Makefile.new
+	| sed '/^"/ {
+s/\\\([\"]\)/\1/g
+s/^"//
+s/"$//
+}'	> Makefile.new
     chmod 444 Makefile.new
     mv -f Makefile.new Makefile
     rm -f junk.c junk.cpp
-  )
+  ])
 done
 ],
 [CPP="$CPP"
diff -r 4de2936b4e77 -r 0132846995bd dynodump/Makefile.in.in
--- a/dynodump/Makefile.in.in	Mon Aug 13 09:42:28 2007 +0200
+++ b/dynodump/Makefile.in.in	Mon Aug 13 09:43:35 2007 +0200
@@ -1,39 +1,29 @@
-/* Hey Emacs, this is a -*- Makefile -*- */
-
-/* Makefile for dynodump subdirectory in XEmacs
-   Copyright (C) 1995 Board of Trustees, University of Illinois
+##   Makefile for dynodump subdirectory in XEmacs
+##   Copyright (C) 1995 Board of Trustees, University of Illinois
+##   Copyright (C) 1996, 1997 Sun Microsystems, Inc.
 
-This file is part of XEmacs.
+## 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 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.
+## 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.  */
+## 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.
 
-/* Avoid trouble on systems where the "SHELL" variable might be
-   inherited from the environment. */
+## Synched up with: Not synched with FSF.
+
 SHELL = /bin/sh
 
-/* Some people use these in paths they define.  We do not want their paths
-   getting changed on them. */
-#undef sparc
-#undef sun
-#undef unix
-#undef i386
-#undef ppc
-#undef sgi
-
-/* ==================== Things "configure" will edit ==================== */
+## ==================== Things "configure" will edit ====================
 
 CC=@CC@
 CFLAGS=@CFLAGS@
@@ -41,7 +31,7 @@
 
 srcdir=@srcdir@
 
-/* ========================= start of cpp stuff ========================= */
+## ========================= start of cpp stuff =========================
 
 #define NO_SHORTNAMES
 #define NOT_C_CODE
diff -r 4de2936b4e77 -r 0132846995bd etc/NEWS
--- a/etc/NEWS	Mon Aug 13 09:42:28 2007 +0200
+++ b/etc/NEWS	Mon Aug 13 09:43:35 2007 +0200
@@ -109,6 +109,20 @@
 * Changes in XEmacs 20.3
 ========================
 
+** .xemacs is loaded at startup if it exists.
+
+By default XEmacs now loads the user file ~/.xemacs if it exists.  If
+there is no such file, it reads ~/.emacs as usual.  If both .xemacs and
+.emacs exist, XEmacs will only load .xemacs.
+
+** Quail input method is now available.
+
+#### Need something to say about quail.
+
+** arc-mode has a new function called `archive-quit' bound to q.
+
+This function quits archive mode in the same fashion dired-quit works.
+
 ** XEmacs runs on Windows NT.
 
 Thanks to David Hobley <davidh@wr.com.au> and Marc Paquette
@@ -141,6 +155,19 @@
 startup, as well as instruct XEmacs to save them before exiting.  You
 can use Customize to add or remove the histories being saved.
 
+** The default format for ChangeLog entries (as created by `C-x 4 a')
+is now the international ISO 8601 format.
+
+To revert to the old behaviour, use:
+
+   (setq add-log-time-format 'current-time-string)
+
+Or `M-x customize-group RET add-log RET'.
+
+** The `M-x customize' command now automatically customizes `Emacs'
+group (top of the customize tree).  Use `M-x customize-group' to
+customize settings of a specific group.
+
 ** Gnuserv changes
 
 *** The Lisp part of gnuserv has been rewritten to allow for more
@@ -151,7 +178,7 @@
 
 *** The `gnuattact' and `gnudoit' programs have been abandoned in
 favor of `gnuclient', which now accepts the standard `-nw',
-`-eval' and `-f' options.
+`-display', `-eval' and `-f' options.
 
 ** Etags changes.
 
diff -r 4de2936b4e77 -r 0132846995bd etc/cbx.gif
Binary file etc/cbx.gif has changed
diff -r 4de2936b4e77 -r 0132846995bd etc/gnuserv.1
--- a/etc/gnuserv.1	Mon Aug 13 09:42:28 2007 +0200
+++ b/etc/gnuserv.1	Mon Aug 13 09:43:35 2007 +0200
@@ -1,62 +1,49 @@
 .TH GNUSERV 1 "" "XEmacs Server"
 .UC 4
 .SH NAME
-gnuserv, gnuclient, gnuattach, gnudoit \- Server and Clients for XEmacs
+gnuserv, gnuclient \- Server and Clients for XEmacs
 .SH SYNOPSIS
 .B gnuclient
-[-q] [[-h hostname] [-p port] [-r pathname]] [[+line] path] ...
-.br
-.B gnuattach
-[[-h hostname] [-p port] [-r pathname]] [[+line] path] ...
-.br
-.B gnudoit 
-[-q] [[-h hostname] [-p port]] [sexpr] ...
+[-q] [-nw] [-l library] [-f function] [-eval form] [[-h hostname]
+[-p port] [-r pathname]] [[+line] path] ...
 .br
 .B gnuserv
 .SH DESCRIPTION
 
 .PP
-\fIgnuclient\fP allows the user to request a running XEmacs process to edit
-the named files or directories (typically in a newly created X frame).
-.PP
-\fIgnuattach\fP allows the user to request a running XEmacs process to edit
-the named files or directories in the current TTY connection.  One typical
-use for this is with a dialup connection to a machine on which an XEmacs
+\fIgnuclient\fP allows the user to request a running XEmacs process to
+edit the named files or directories in a new frame.  Depending on your
+environment, it can be an X frame or a TTY frame.  One typical use for
+this is with a dialup connection to a machine on which an XEmacs
 process is currently running.
 .PP
-\fIgnudoit\fP allows the user to request a running XEmacs process to
-evaluate the given arguments inside a progn LISP form.
-.PP
-\fIgnuserv\fP is the server program that is set running by XEmacs to handle
-all incoming and outgoing requests. It is not usually invoked directly, but is
-started from XEmacs by loading the \fIgnuserv\fP package and evaluating 
-the LISP form (gnuserv-start). 
+\fIgnuserv\fP is the server program that is set running by XEmacs to
+handle all incoming and outgoing requests. It is not usually invoked
+directly, but is started from XEmacs by loading the \fIgnuserv\fP
+package and evaluating the Lisp form (gnuserv-start).
 .SH OPTIONS
 .TP 8
 .BI \-q
-This option informs both \fIgnuclient\fP and \fIgnudoit\fP to exit once
-connection has been made with the XEmacs process.  Normally \fIgnuclient\fP
-waits until all of the files on the command line have been finished with
-(their buffers killed) by the XEmacs process, and \fIgnudoit\fP normally
-waits around for evaluation of its arguments by the XEmacs process, and
-prints the results or error conditions.  This option does not exist for
-\fIgnuattach\fP because it does not make sense -- XEmacs and the shell
-would fight for input and would screw up each other's output.
+This option informs \fIgnuclient\fP to exit once connection has been
+made with the XEmacs process.  Normally \fIgnuclient\fP waits until
+all of the files on the command line have been finished with (their
+buffers killed) by the XEmacs process, and all the forms have been
+evaluated.
 .TP 8
 .BI \-h " hostname"
 Used only with Internet-domain sockets, this option specifies the host
 machine which should be running \fIgnuserv\fP.  If this option is not
 specified then the value of the environment variable GNU_HOST is used
 if set.  If no hostname is specified, and the GNU_HOST variable is not
-set, an internet connection will not be attempted.  N\.B.: \fIgnuserv\fP
-does NOT allow internet connections unless the GNU_SECURE variable has
-been specified and points at a file listing all trusted hosts. (See
-SECURITY below.)
+set, an internet connection will not be attempted.  N\.B.:
+\fIgnuserv\fP does NOT allow internet connections unless the
+GNU_SECURE variable has been specified and points at a file listing
+all trusted hosts. (See SECURITY below.)
 
 .br
-Note that an internet address may be specified instead of a hostname which can
-speed up connections to the server by quite a bit, especially if the client
-machine is running YP.
+Note that an internet address may be specified instead of a hostname
+which can speed up connections to the server by quite a bit,
+especially if the client machine is running YP.
 
 .br
 Note also that a hostname of \fBunix\fP can be used to specify that
@@ -78,23 +65,22 @@
 .BI \-r " pathname"
 Used only with Internet-domain sockets, the pathname argument may be
 needed to inform XEmacs how to reach the root directory of a remote
-machine.  \fIgnuclient\fP and \fIgnuattach\fP prepend this string to
-each path argument given.  For example, if you were trying to edit a
-file on a client machine called otter, whose root directory was
-accessible from the server machine via the path /net/otter, then this
-argument should be set to '/net/otter'.  If this option is omitted,
-then the value is taken from the environment variable GNU_NODE, if
-set, or the empty string otherwise.
+machine.  \fIgnuclient\fP prepends this string to each path argument
+given.  For example, if you were trying to edit a file on a client
+machine called otter, whose root directory was accessible from the
+server machine via the path /net/otter, then this argument should be
+set to '/net/otter'.  If this option is omitted, then the value is
+taken from the environment variable GNU_NODE, if set, or the empty
+string otherwise.
 .TP 8
 .BI "path"
 This is the path of the file to be edited.  If the file is a directory, then
 the directory browsers dired or monkey are usually invoked instead.
 .TP 8
 .BI "sexpr"
-This is part of an XEmacs LISP expression to evaluate.  All the sexprs are
-concatenated together and wrapped in a progn form before sending to
-XEmacs.  If no sexpr is supplied on the  \fIgnudoit\fP commandline,
-\fIgnudoit\fP will read the sexpr to be evaluated from standard input.
+This is part of an XEmacs LISP expression to evaluate.  All the sexprs
+are concatenated together and wrapped in a progn form before sending
+to XEmacs.
 
 .PP
 .SH SETUP
@@ -104,38 +90,37 @@
 `M-x gnuserv-start'.
 .SH EXAMPLE
 .RS 4
-gnudoit -q '(mh-smail)'
+gnuclient -q -f mh-smail
 .br
 gnuclient -h cuckoo -r /ange@otter: /tmp/*
 .br
-gnuattach ../src/listproc.c
+gnuclient -nw ../src/listproc.c
 .RE
 
-.SH SYSV IPC 
-SysV IPC is used to communicate between \fIgnuclient\fP,
-\fIgnuattach\fP, \fIgnudoit\fP and \fIgnuserv\fP if the symbol
-SYSV_IPC is defined at the top of gnuserv.h. This is incompatible with
-both Unix-domain and Internet-domain socket communication as described
-below. A file called /tmp/gsrv??? is created as a key for the message
-queue, and if removed will cause the communication between server and
-client to fail until the server is restarted.
+.SH SYSV IPC
+SysV IPC is used to communicate between \fIgnuclient\fP and
+\fIgnuserv\fP if the symbol SYSV_IPC is defined at the top of
+gnuserv.h. This is incompatible with both Unix-domain and
+Internet-domain socket communication as described below. A file called
+/tmp/gsrv??? is created as a key for the message queue, and if removed
+will cause the communication between server and client to fail until
+the server is restarted.
 .SH UNIX-DOMAIN SOCKETS
-A Unix-domain socket is used to communicate between \fIgnuclient\fP,
-\fIgnuattach\fP, \fIgnudoit\fP and \fIgnuserv\fP if the symbol
-UNIX_DOMAIN_SOCKETS is defined at the top of gnuserv.h.  A file called
-/tmp/gsrvdir????/gsrv is created for communication and if deleted will
-cause communication between server and client to fail.  Only the user
-running gnuserv will be able to connect to the socket.
+A Unix-domain socket is used to communicate between \fIgnuclient\fP
+and \fIgnuserv\fP if the symbol UNIX_DOMAIN_SOCKETS is defined at the
+top of gnuserv.h.  A file called /tmp/gsrvdir????/gsrv is created for
+communication and if deleted will cause communication between server
+and client to fail.  Only the user running gnuserv will be able to
+connect to the socket.
 .SH INTERNET-DOMAIN SOCKETS
 Internet-domain sockets are used to communicate between
-\fIgnuclient\fP, \fIgnuattach\fP, \fIgnudoit\fP and \fIgnuserv\fP if
-the symbol INTERNET_DOMAIN_SOCKETS is defined at the top of
-gnuserv.h. Both Internet-domain and Unix-domain sockets can be used at
-the same time. If a hostname is specified via -h or via the GNU_HOST
-environment variable, \fIgnudoit\fP, \fIgnuclient\fP and
-\fIgnuattach\fP establish connections using an internet domain
-socket. If not, a local connection is attempted via either a
-unix-domain socket or SYSV IPC."
+\fIgnuclient\fP and \fIgnuserv\fP if the symbol
+INTERNET_DOMAIN_SOCKETS is defined at the top of gnuserv.h. Both
+Internet-domain and Unix-domain sockets can be used at the same
+time. If a hostname is specified via -h or via the GNU_HOST
+environment variable, \fIgnuclient\fP establish connections using an
+internet domain socket. If not, a local connection is attempted via
+either a unix-domain socket or SYSV IPC.
 .SH SECURITY
 Using Internet-domain sockets, a more robust form of security is
 needed that wasn't necessary with either Unix-domain sockets or SysV
@@ -230,13 +215,11 @@
 xauth(1X11), Xsecurity(1X11)
 .SH BUGS
 .PP 
-Ctrl-D's occurring in gnudoit input strings won't be handled correctly.
-.PP 
 NULs occurring in result strings don't get passed back to gnudoit properly.
 
 .SH AUTHOR.
 Andy Norman (ange@hplb.hpl.hp.com), based heavily upon
 etc/emacsclient.c, etc/server.c and lisp/server.el from the GNU Emacs
 18.52 distribution.  Various modifications from Bob Weiner (weiner@mot.com),
-Darrell Kindred (dkindred@cmu.edu), Arup Mukherjee (arup@cmu.edu), and
-Ben Wing (wing@666.com).
+Darrell Kindred (dkindred@cmu.edu), Arup Mukherjee (arup@cmu.edu), Ben
+Wing (wing@666.com) and Hrvoje Niksic (hniksic@srce.hr).
diff -r 4de2936b4e77 -r 0132846995bd etc/viperCard.tex
--- a/etc/viperCard.tex	Mon Aug 13 09:42:28 2007 +0200
+++ b/etc/viperCard.tex	Mon Aug 13 09:43:35 2007 +0200
@@ -61,9 +61,9 @@
 %  Internet: gildea@erl.mit.edu
 
 
-\def\versionnumber{2.93}
+\def\versionnumber{2.94}
 \def\year{1997}
-\def\version{May \year\ v\versionnumber}
+\def\version{June \year\ v\versionnumber}
 
 \def\shortcopyrightnotice{\vskip 1ex plus 2 fill
   \centerline{\small \copyright\ \year\ Free Software Foundation, Inc.
@@ -263,7 +263,7 @@
 
 \title{ViperCard: Viper Reference Pal}
 
-\centerline{(For Version 2.93 under Emacs and XEmacs 19 \& 20)}
+\centerline{(For Version 2.94 under Emacs and XEmacs 19 \& 20)}
 
 %\copyrightnotice
 
diff -r 4de2936b4e77 -r 0132846995bd lib-src/ChangeLog
--- a/lib-src/ChangeLog	Mon Aug 13 09:42:28 2007 +0200
+++ b/lib-src/ChangeLog	Mon Aug 13 09:43:35 2007 +0200
@@ -1,3 +1,10 @@
+1997-06-20  Steven L Baur  <steve@altair.xemacs.org>
+
+	* gnuattach: Readd as warning script.
+
+	* Makefile.in.in (INSTALLABLE_SCRIPTS): Readd Gnuattach.
+	From Hrvoje Niksic <hniksic@srce.hr>
+	
 1997-06-13  Steven L Baur  <steve@altair.xemacs.org>
 
 	* update-elc.sh (mule_p): Ignore lisp/language when building
diff -r 4de2936b4e77 -r 0132846995bd lib-src/Makefile.in.in
--- a/lib-src/Makefile.in.in	Mon Aug 13 09:42:28 2007 +0200
+++ b/lib-src/Makefile.in.in	Mon Aug 13 09:43:35 2007 +0200
@@ -1,48 +1,35 @@
-/*  Makefile for lib-src subdirectory in XEmacs.
-
-Copyright (C) 1985, 1987, 1988, 1993, 1994 Free Software Foundation, Inc.
-
-This file is part of XEmacs.
+##   Makefile for lib-src subdirectory in XEmacs.
+##   Copyright (C) 1985, 1987, 1988, 1993, 1994 Free Software Foundation, Inc.
+##   Copyright (C) 1996, 1997 Sun Microsystems, Inc.
 
-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.
+## This file is part of XEmacs.
 
-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
-the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA.  */
+## 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.
 
-/* Note: FSF Makefile.in.in does something weird so that the comments
-   above a certain point in this file are in shell format instead of
-   in C format.  How the hell is this supposed to work? */
-
-/* Avoid trouble on systems where the "SHELL" variable might be
-   inherited from the environment. */
-SHELL = /bin/sh
+## 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.
 
-/* Some people use these in paths they define.
-   This is a horrible kludge - should we really use CPP
-   to pre-process Makefiles? */
-#undef sparc
-#undef sun
-#undef unix
-#undef sgi
-#undef NeXT
-#undef mips
-#undef i386
-#undef linux
+## 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.
 
-/* For performance and consistency, no built-in rules */
+## Note: FSF Makefile.in.in does something weird so that the comments
+## 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 ==================== */
+## ==================== Things "configure" will edit ====================
 
 CC=@CC@
 CPP=@CPP@
@@ -54,72 +41,37 @@
 LN_S=@LN_S@
 version=@version@
 
-/* ==================== Where To Install Things ==================== */
-
-/* The default location for installation.  Everything is placed in
-   subdirectories of this directory.  The default values for many of
-   the variables below are expressed in terms of this one, so you may
-   not need to change them.  This is set with the --prefix option to
-   "../configure". */
-prefix=@prefix@
-
-/* Like "prefix", but used for architecture-specific files.  This is
-   set with the "--exec-prefix" option to "../configure". */
-exec_prefix=@exec_prefix@
-
-/* Where to install Emacs and other binaries that people will want to
-   run directly (like etags).  This is set with the "--bindir" option
-   to "../configure". */
-bindir=@bindir@
+## ==================== Where To Install Things ====================
 
-/* Where to install and expect executable files to be run by Emacs
-   rather than directly by users, and other architecture-dependent
-   data.  ${archlibdir} is usually below this.  This is set with the
-   --libdir option to "../configure". */
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+bindir=@bindir@
 libdir=@libdir@
-
-/* Where to find the source code.  This is set by the configure
-   "--srcdir" option.  However, the value of ${srcdir} in
-   this makefile is not identical to what was specified with --srcdir,
-   since the variable here has "/lib-src" appended to the end. */
 srcdir=@srcdir@
-
-/* ==================== Emacs-specific directories ==================== */
-
-/* These variables hold the values Emacs will actually use.  They are
-   based on the values of the standard Make variables above.
-
-   Where to put executables to be run by Emacs rather than the user.
-   This path usually includes the Emacs version and configuration name,
-   so that multiple configurations for multiple versions of Emacs may
-   be installed at once.  This can be set with the --archlibdir option
-   to "../configure". */
 archlibdir=@archlibdir@
 
-/* ==================== Utility Programs for the Build ================= */
+## ==================== Utility Programs for the Build =================
 
-/* ../configure figures out the correct values for these. */
 INSTALL = @INSTALL@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_DATA = @INSTALL_DATA@
 
-/* ========================== Lists of Files =========================== */
+## ========================== Lists of Files ===========================
 
-/* Things that a user might actually run,
-   which should be installed in bindir. */
+## Things that a user might actually run,
+## which should be installed in bindir.
 INSTALLABLES = etags ctags b2m gnuclient
-INSTALLABLE_SCRIPTS = rcs-checkin pstogif install-sid send-pr gnudoit
+INSTALLABLE_SCRIPTS = rcs-checkin pstogif install-sid send-pr gnudoit gnuattach
 
-/* Things that Emacs runs internally, or during the build process,
-   which should not be installed in bindir. */
+## Things that Emacs runs internally, or during the build process,
+## which should not be installed in bindir.
 UTILITIES= make-path wakeup profile make-docfile digest-doc \
 	sorted-doc movemail cvtmail fakemail yow hexl \
 	gnuserv mmencode
-/* These need to be conditional on I18N3
-	make-msgfile make-po */
+## These need to be conditional on I18N3 make-msgfile make-po
 
-/* Like UTILITIES, but they are not system-dependent, and should not be
-   deleted by the distclean target. */
+## Like UTILITIES, but they are not system-dependent, and should not be
+## deleted by the distclean target.
 TM_SCRIPTS=tm-au tm-file tm-html tm-image tm-mpeg tm-plain tm-ps tmdecode
 SCRIPTS= rcs2log vcdiff gzip-el.sh install-sid send-pr $(TM_SCRIPTS)
 
@@ -127,82 +79,45 @@
 
 SOURCES = COPYING ChangeLog Makefile.in.in README aixcc.lex emacs.csh \
 	makedoc.com *.[chy] $(SCRIPTS)
-/*
-# Additional -D flags for movemail (add to MOVE_FLAGS if desired):
-# MAIL_USE_POP		Support mail retrieval from a POP mailbox.
-# MAIL_USE_MMDF		Support MMDF mailboxes.
-# MAIL_USE_FLOCK	Use flock for file locking (see the comments
-#			about locking in movemail.c)
-# MAIL_UNLINK_SPOOL	Unlink the user spool mailbox after reading
-#			it (instead of just emptying it).
-# KERBEROS		Support Kerberized POP.
-# KRB5			Support Kerberos Version 5 pop instead of
-#			Version 4 (define this in addition to
-#			KERBEROS).
-# HESIOD		Support Hesiod lookups of user mailboxes.
-# MAILHOST		A string, the host name of the default POP
-#			mail host for the site.
-*/
+## Additional -D flags for movemail (add to MOVE_FLAGS if desired):
+## MAIL_USE_POP		Support mail retrieval from a POP mailbox.
+## MAIL_USE_MMDF		Support MMDF mailboxes.
+## MAIL_USE_FLOCK	Use flock for file locking (see the comments
+##			about locking in movemail.c)
+## MAIL_UNLINK_SPOOL	Unlink the user spool mailbox after reading
+##			it (instead of just emptying it).
+## KERBEROS		Support Kerberized POP.
+## KRB5			Support Kerberos Version 5 pop instead of
+##			Version 4 (define this in addition to
+##			KERBEROS).
+## HESIOD		Support Hesiod lookups of user mailboxes.
+## MAILHOST		A string, the host name of the default POP
+##			mail host for the site.
+
 MOVE_FLAGS=
-/*
-# Additional libraries for movemail:
-# For KERBEROS
-# MOVE_LIBS= -lkrb -ldes -lcom_err
-# For KERBEROS + KRB5
-# MOVE_LIBS= -lkrb5 -lcrypto -lisode -lcom_err
-# Add "-lhesiod" if HESIOD is defined.
-*/
+##
+## Additional libraries for movemail:
+## For KERBEROS
+## MOVE_LIBS= -lkrb -ldes -lcom_err
+## For KERBEROS + KRB5
+## MOVE_LIBS= -lkrb5 -lcrypto -lisode -lcom_err
+## Add "-lhesiod" if HESIOD is defined.
+
 MOVE_LIBS=
 
-/* ========================== start of cpp stuff ======================= */
-
-/* From here on, comments must be done in C syntax. (see comment above
-   about this.) */
+## ========================== start of cpp stuff =======================
 
 #define NO_SHORTNAMES
-#define THIS_IS_YMAKEFILE
 #define NOT_C_CODE
 #include "../src/config.h"
 
-/* With the traditional VPATH setting, it is not possible to
-   simultaneously compile in-place and in another directory.  The
-   mistaken definition is that *all* dependencies are searched for in
-   the VPATH directory, rather than just the dependencies that are not
-   themselves targets.  Thus, if there is an up-to-date .o file in the
-   in-place location, it will not get recompiled in the not-in-place
-   location.
-
-   The GNU Make "vpath" directive continues this tradition, but at
-   least lets you restrict the classes of files that it applies to.
-   This allows us to kludge around the problem. */
 #ifdef USE_GNU_MAKE
 vpath %.c @srcdir@
 vpath %.h @srcdir@
-/* now list files that should NOT be searched in the srcdir.
-   This includes any .c or .h built from something else
-   (e.g. a .in file). */
-/* none here */
 #else
 VPATH=@srcdir@
 #endif
 
-/* We will not really call alloca;
-   do not let the file name alloca.c get messed up.  */
-#undef alloca
-
-#undef MOVEMAIL_NEEDS_BLESSING
-#ifndef MAIL_USE_FLOCK
-#ifndef MAIL_USE_LOCKF
-#define MOVEMAIL_NEEDS_BLESSING
-#endif
-#endif
-
-#ifdef MOVEMAIL_NEEDS_BLESSING
-#define BLESSMAIL blessmail
-#else
-#define BLESSMAIL
-#endif
-
 c_switch_general=@c_switch_general@
 c_switch_window_system=@c_switch_window_system@
 c_switch_all=@c_switch_all@
@@ -217,23 +132,23 @@
 LOAD_X_LIBES=$(ld_switch_window_system)
 C_SWITCH_X=$(c_switch_window_system)
 
-/* We need to #define emacs to get the right versions of some files. */
+## We need to #define emacs to get the right versions of some files.
 
 lib_src_cppflags = -Demacs -I../src -I${srcdir} -I${srcdir}/../src $(CPPFLAGS)
 lib_src_cppflags = -Demacs -I../src $(CPPFLAGS)
 cflags  = $(CFLAGS) $(lib_src_cppflags) $(c_switch_all)
 ldflags = $(LDFLAGS) $(ld_switch_all) $(ld_libs_general)
 
-/* This is the default compilation command.
-   But we should never rely on it, because some make version
-   failed to find it for getopt.o.
-   Using an explicit command made it work.  */
+## This is the default compilation command.
+## But we should never rely on it, because some make version
+## failed to find it for getopt.o.
+## Using an explicit command made it work.
 .c.o:
 	${CC} -c $(cflags) $<
 
 all: ${UTILITIES} ${INSTALLABLES} ${SCRIPTS}
 
-/* Make symlinks for shell scripts if using --srcdir */
+## Make symlinks for shell scripts if using --srcdir */
 rcs2log:
 	${LN_S} ${srcdir}/$@ $@
 vcdiff:
@@ -261,48 +176,51 @@
 send-pr:
 	${LN_S} ${srcdir}/$@ $@
 
-#ifdef MOVEMAIL_NEEDS_BLESSING
+
+#undef MOVEMAIL_NEEDS_BLESSING
+#if !defined (MAIL_USE_FLOCK) && ! defined (MAIL_USE_LOCKF)
+#define MOVEMAIL_NEEDS_BLESSING
+blessmail = blessmail
 blessmail:
 	../src/emacs -batch -l ../lisp/blessmail.el
-	chmod +x blessmail
-#endif
+	chmod +x $@
+#endif /* movemail needs blessing */
 
-maybe-blessmail: BLESSMAIL
+maybe-blessmail: $(blessmail)
 #ifdef MOVEMAIL_NEEDS_BLESSING
-/* Do not charge ahead and do it!  Let the installer decide.
+## Do not charge ahead and do it!  Let the installer decide.
 	  ./blessmail ${archlibdir}/movemail  */
-	@if [ `wc -l <blessmail` != 2 ] ; then \
+	@if test `wc -l <blessmail` != 2; then \
 	  dir=`sed -n -e 's/echo mail directory = \(.*\)/\1/p' blessmail`; \
-	  echo Assuming $$dir is really the mail spool directory, you should; \
-	  echo run  lib-src/blessmail ${archlibdir}/movemail; \
-	  echo as root, to give  movemail  appropriate permissions.; \
-	  echo Do that after running  make install.; \
+	  echo "Assuming $$dir is really the mail spool directory, you should"; \
+	  echo "run  lib-src/blessmail ${archlibdir}/movemail"; \
+	  echo "as root, to give  movemail  appropriate permissions."; \
+	  echo "Do that after running  make install."; \
 	fi
 #endif
 
-/* Install the internal utilities.  Until they are installed, we can
-   just run them directly from lib-src.  */
+## Install the internal utilities.  Until they are installed, we can
+## just run them directly from lib-src.
 ${archlibdir}: all
-	@echo
-	@echo "Installing utilities run internally by XEmacs."
+	@echo; echo "Installing utilities run internally by XEmacs."
 	./make-path ${archlibdir}
-	if [ `(cd ${archlibdir} && /bin/pwd)` != `/bin/pwd` ]; then \
+	if test `(cd ${archlibdir} && /bin/pwd)` != `/bin/pwd`; then \
 	  for file in ${UTILITIES}; do \
 	    (cd .. && $(INSTALL_PROGRAM) lib-src/$$file ${archlibdir}/$$file) ; \
 	  done ; \
 	fi
-	if [ `(cd ${archlibdir} && /bin/pwd)` \
-	     != `(cd ${srcdir} && /bin/pwd)` ]; then \
+	if test `(cd ${archlibdir} && /bin/pwd)` \
+	     != `(cd ${srcdir} && /bin/pwd)`; then \
 	  for file in ${SCRIPTS}; do \
 	    (cd .. && $(INSTALL_PROGRAM) ${srcdir}/$$file ${archlibdir}/$$file); \
 	  done ; \
 	fi
 
-/* We do not need to install "wakeup" explicitly, because it will be
-   copied when this whole directory is copied.  */
+## We do not need to install "wakeup" explicitly, because it will be
+## copied when this whole directory is copied.
+.PHONY : all maybe-blessmail install uninstall
 install: ${archlibdir}
-	@echo
-	@echo "Installing utilities for users to run."
+	@echo; echo "Installing utilities for users to run."
 	for file in ${INSTALLABLES} ; do \
 	  (cd .. && $(INSTALL_PROGRAM) lib-src/$${file} ${bindir}/$${file}) ; \
 	done
@@ -312,25 +230,26 @@
 
 uninstall:
 	(cd ${bindir} && \
-	 rm -f ${INSTALLABLES} ${INSTALLABLE_SCRIPTS})
+	 $(RM) ${INSTALLABLES} ${INSTALLABLE_SCRIPTS})
 	(cd ${archlibdir} && \
-	 rm -f ${UTILITIES} ${INSTALLABLES} ${SCRIPTS} ${INSTALLABLE_SCRIPTS})
+	 $(RM) ${UTILITIES} ${INSTALLABLES} ${SCRIPTS} ${INSTALLABLE_SCRIPTS})
 
+.PHONY : mostlyclean clean distclean realclean extraclean unlock relock check
 mostlyclean:
-	-rm -f core *.o
+	$(RM) core *.o *.i
 
 clean: mostlyclean
-	-rm -f ${INSTALLABLES} ${UTILITIES}
+	$(RM) ${INSTALLABLES} ${UTILITIES}
 
 distclean: clean
-	-rm -f DOC *.tab.c *.tab.h aixcc.c TAGS
-	-rm -f Makefile Makefile.in blessmail
+	$(RM) DOC *.tab.c *.tab.h aixcc.c TAGS
+	$(RM) Makefile Makefile.in blessmail
 
 realclean: distclean
-	true
+	@true
 
 extraclean: realclean
-	-rm -f *~ \#*
+	$(RM) *~ \#*
 
 unlock:
 	chmod u+w $(SOURCES)
@@ -338,7 +257,7 @@
 relock:
 	chmod u-w $(SOURCES)
 
-/* Test the contents of the directory.  */
+## Test the contents of the directory.
 check:
 	@echo "We don't have any tests for XEmacs yet."
 
@@ -369,8 +288,8 @@
 etags: ${srcdir}/etags.c $(GETOPTDEPS) $(REGEXDEPS) ../src/config.h
 	$(CC) ${cflags} -DVERSION="\"${version}\"" ${srcdir}/etags.c $(GETOPTOBJS) $(REGEXOBJ) $(ldflags) -o etags
 
-/* We depend on etags to assure that parallel makes do not write two
-   etags.o files on top of each other.  */
+## We depend on etags to assure that parallel makes do not write two
+## etags.o files on top of each other.
 ctags: ${srcdir}/etags.c $(GETOPTDEPS) $(REGEXDEPS) etags
 	$(CC) ${cflags} -DCTAGS -DVERSION="\"${version}\"" ${srcdir}/etags.c $(GETOPTOBJS) $(REGEXOBJ) $(ldflags) -o ctags
 
@@ -413,7 +332,7 @@
 make-po: ${srcdir}/make-po.c
 	$(CC) $(cflags) ${srcdir}/make-po.c $(ldflags) -o make-po
 
-/* Why oh why does HP not include half of the standard X distribution? */
+## Why oh why does HP not include half of the standard X distribution?
 
 ldflags_gnuserv = $(LDFLAGS) $(ld_switch_all) @libs_xauth@ $(ld_libs_general)
 gnuslib.o: ${srcdir}/gnuslib.c ${srcdir}/gnuserv.h ../src/config.h
@@ -423,20 +342,20 @@
 gnuserv: ${srcdir}/gnuserv.c gnuslib.o ${srcdir}/gnuserv.h
 	$(CC) ${cflags} -o $@ ${srcdir}/$@.c gnuslib.o ${ldflags_gnuserv}
 
-/* 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 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
 
 
-/* The timer utility (timer.c, getdate.y) is not used in XEmacs
-   because XEmacs provides built-in timer facilities. */
+## 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
 
-/* These are NOT included in INSTALLABLES or UTILITIES.
-   See ../src/Makefile.in.in.  */
+## These are NOT included in INSTALLABLES or UTILITIES.
+## See ../src/Makefile.in.in.
 aixcc: ${srcdir}/aixcc.c
 	$(CC) $(cflags) -o aixcc ${srcdir}/aixcc.c
 
diff -r 4de2936b4e77 -r 0132846995bd lib-src/gnuattach
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lib-src/gnuattach	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,23 @@
+#! /bin/sh
+
+# This file is part of XEmacs.
+
+# Copyright (C) 1997  Free Software Foundation, Inc.
+
+# 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.
+
+echo "$0: Please use \`gnuclient -nw' instead." >&2
+exit 1
diff -r 4de2936b4e77 -r 0132846995bd lib-src/gnuserv.c
--- a/lib-src/gnuserv.c	Mon Aug 13 09:42:28 2007 +0200
+++ b/lib-src/gnuserv.c	Mon Aug 13 09:43:35 2007 +0200
@@ -693,12 +693,12 @@
 handle_internet_request (int ls)
 {
   int s;
-  int addrlen = sizeof(struct sockaddr_in);
+  size_t addrlen = sizeof(struct sockaddr_in);
   struct sockaddr_in peer;	/* for peer socket address */
 
   memset((char *)&peer,0,sizeof(struct sockaddr_in));
 
-  if ((s = accept(ls,(struct sockaddr *)&peer,&addrlen)) == -1)
+  if ((s = accept(ls,(struct sockaddr *)&peer, (void *) &addrlen)) == -1)
     {
       perror(progname);
       fprintf(stderr,"%s: unable to accept\n",progname);
@@ -813,12 +813,12 @@
 handle_unix_request (int ls)
 {
   int s;
-  int len = sizeof(struct sockaddr_un);
+  size_t len = sizeof(struct sockaddr_un);
   struct sockaddr_un server; 	/* for unix socket address */
 
   server.sun_family = AF_UNIX;
 
-  if ((s = accept(ls,(struct sockaddr *)&server,&len)) < 0)
+  if ((s = accept(ls,(struct sockaddr *)&server, (void *)&len)) < 0)
     {
       perror(progname);
       fprintf(stderr,"%s: unable to accept\n",progname);
diff -r 4de2936b4e77 -r 0132846995bd lib-src/mmencode.c
--- a/lib-src/mmencode.c	Mon Aug 13 09:42:28 2007 +0200
+++ b/lib-src/mmencode.c	Mon Aug 13 09:43:35 2007 +0200
@@ -22,10 +22,10 @@
 static void
 output64chunk(int c1, int c2, int c3, int pads, FILE *outfile);
 
-static char basis_64[] =
+static signed char basis_64[] =
    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
 
-static char index_64[128] = {
+static signed char index_64[128] = {
     -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1,
     -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1,
     -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,62, -1,-1,-1,63,
@@ -243,8 +243,8 @@
     if (CRpending) putc(13, outfile); /* Don't drop a lone trailing char 13 */
 }
 
-static char basis_hex[] = "0123456789ABCDEF";
-static char index_hex[128] = {
+static signed char basis_hex[] = "0123456789ABCDEF";
+static signed char index_hex[128] = {
     -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1,
     -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1,
     -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1,
diff -r 4de2936b4e77 -r 0132846995bd lib-src/movemail.c
--- a/lib-src/movemail.c	Mon Aug 13 09:42:28 2007 +0200
+++ b/lib-src/movemail.c	Mon Aug 13 09:43:35 2007 +0200
@@ -62,6 +62,7 @@
 #include <stdio.h>
 #include <errno.h>
 #include "../src/syswait.h"
+#include "../src/systime.h"
 #include <stdlib.h>
 #include <string.h>
 #ifdef MAIL_USE_POP
@@ -92,20 +93,19 @@
 #define DISABLE_DIRECT_ACCESS
 #endif /* WINDOWSNT */
 
-#ifdef USG
-#include <fcntl.h>
+#if defined (HAVE_UNISTD_H) || defined (USG)
 #include <unistd.h>
+#endif /* unistd.h */
 #ifndef F_OK
 #define F_OK 0
 #define X_OK 1
 #define W_OK 2
 #define R_OK 4
-#endif
-#endif /* USG */
+#endif /* No F_OK */
 
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
+#if defined (HAVE_FCNTL_H) || defined (USG)
+#include <fcntl.h>
+#endif /* fcntl.h */
 
 #if defined (XENIX) || defined (WINDOWSNT)
 #include <sys/locking.h>
@@ -493,15 +493,6 @@
 #include <stdio.h>
 #include <pwd.h>
 
-#ifdef USG
-#include <fcntl.h>
-/* Cancel substitutions made by config.h for Emacs.  */
-#undef open
-#undef read
-#undef write
-#undef close
-#endif /* USG */
-
 #define NOTOK (-1)
 #define OK 0
 #define DONE 1
diff -r 4de2936b4e77 -r 0132846995bd lib-src/update-autoloads.sh
--- a/lib-src/update-autoloads.sh	Mon Aug 13 09:42:28 2007 +0200
+++ b/lib-src/update-autoloads.sh	Mon Aug 13 09:43:35 2007 +0200
@@ -24,22 +24,25 @@
 echo "          with $REAL..."
 
 dirs=
-for dir in lisp/* ; do
+for dir in lisp/*; do
   if test -d $dir \
    -a $dir != lisp/CVS \
    -a $dir != lisp/SCCS \
    -a $dir != lisp/egg \
    -a $dir != lisp/its \
    -a $dir != lisp/mule \
-   -a $dir != lisp/quail; then
+   -a $dir != lisp/language \
+   -a $dir != lisp/leim; then
     dirs="$dirs $dir"
   fi
 done
-cat > lisp/prim/auto-autoloads.el << EOF
-;;; Do NOT edit this file!
-;;; It is automatically generated using "make autoloads"
-;;; See update-autoloads.sh and autoload.el for more details.
-
-EOF
+# cat > lisp/prim/auto-autoloads.el << EOF
+# ;;; Do NOT edit this file!
+# ;;; It is automatically generated using "make autoloads"
+# ;;; See update-autoloads.sh and autoload.el for more details.
+# 
+# EOF
 set -x
-$EMACS -batch -q -l autoload -f batch-update-autoloads $dirs
+for dir in $dirs; do
+	$EMACS -batch -q -l autoload -f batch-update-directory $dir
+done
diff -r 4de2936b4e77 -r 0132846995bd lib-src/update-elc.sh
--- a/lib-src/update-elc.sh	Mon Aug 13 09:42:28 2007 +0200
+++ b/lib-src/update-elc.sh	Mon Aug 13 09:43:35 2007 +0200
@@ -113,7 +113,7 @@
 make_special w3 xemacs-w3
 make_special hyperbole elc
 make_special oobr HYPB_ELC='' elc
-make_special eos -k		# not stricly necessary...
+make_special eos -k		# not strictly necessary...
 make_special ilisp elc
 make_special auctex some
 
@@ -132,11 +132,17 @@
 \!/prim/loadup.el$!d
 \!/prim/loadup-el.el$!d
 \!/prim/update-elc.el$!d
+\!/prim/packages.el$!d
+\!/prim/list-autoloads.el$!d
+\!/prim/dumped-lisp.el$!d
+\!/prim/make-docfile.el$!d
 \!/site-start.el$!d
 \!/site-load.el$!d
 \!/site-init.el$!d
 \!/version.el$!d
+\!/mule/mule-load.el$!d
 \!/sunpro/sunpro-load.el$!d
+\!/tooltalk/tooltalk-load.el$!d
 \!/language/devanagari.el$!d
 \!/language/ethiopic.el$!d
 \!/language/indian.el$!d
diff -r 4de2936b4e77 -r 0132846995bd lisp/ChangeLog
--- a/lisp/ChangeLog	Mon Aug 13 09:42:28 2007 +0200
+++ b/lisp/ChangeLog	Mon Aug 13 09:43:35 2007 +0200
@@ -1,5 +1,167 @@
+1997-06-21  Steven L Baur  <steve@altair.xemacs.org>
+
+	* prim/tabify.el (untabify): Return nil.
+	From contributor name lost.
+
+	* prim/packages.el (packages-hardcoded-lisp): startup.elc needs to 
+	be scanned for docstrings.
+
+1997-06-21  Hrvoje Niksic  <hniksic@srce.hr>
+
+	* prim/overlay.el (overlay-put): Support `local-map'.
+	(overlay-get): Support `category'.
+
+1997-06-21  Steven L Baur  <steve@altair.xemacs.org>
+
+	* prim/startup.el (load-user-init-file): Load custom-file if it
+	has not changed from the default.
+
+1997-06-21  Hrvoje Niksic  <hniksic@srce.hr>
+
+	* prim/overlay.el (make-overlay): Avoid temporary variable.
+	(move-overlay): Ditto.
+	(overlays-in): Use `mapcar-extents'.
+	(next-overlay-change): Avoid consing; use `map-extents'.
+	(previous-overlay-change): Ditto.
+	(overlay-lists): Ditto.
+	(overlay-lists): Call `overlay-recenter' with correct value.
+
+1997-06-20  Steven L Baur  <steve@altair.xemacs.org>
+
+	* utils/autoload.el (fixup-autoload-buffer): New function.  Insert 
+	guards so a (load "auto-autoloads") works the same as require.
+	(batch-update-directory): Use it.
+
+	* prim/update-elc.el: Allow for specification of packages that
+	must not be bytecompiled.  Better error diagnostics if a package
+	is not found.
+
+	* prim/window.el, prim/window-xemacs.el, prim/simple.el:
+	* prim/lisp.el, prim/frame.el:
+	Customizations/synch to Emacs 20.1.
+	* packages/hyper-apropos.el: Massive update.
+	From Hrvoje Niksic <hniksic@srce.hr>
+
+	* tm/tm-vm.el (vm-menu-mail-menu): Fix typo.
+
+	* packages/font-lock.el (lisp-font-lock-keywords-2): Add some new
+	functions.
+	From Karl M. Hegbloom <karlheg@inetarena.com>
+
+	* prim/files.el (save-some-buffers-query-display-buffer): New
+	user variable.
+	(save-some-buffers): Use it.
+	From David Bakhash <cadet@MIT.EDU>
+	- Customization patches from Hrvoje Niksic.
+
+	* prim/simple.el (kill-region): Undo sorting region limits patch.
+
+1997-06-20  Mike Scheidler  <c23mts@eng.delcoelect.com>
+
+	* prim/tabify.el: Fixed 'untabify' to return 'nil value.
+
+1997-06-18  Steven L Baur  <steve@altair.xemacs.org>
+
+	* efs/dired-xemacs.el (dired-do-interactive-chmod): Advance point
+	after not failure.
+	From <rritchie@britannia-life.co.uk>
+
+	* utils/edmacro.el (edmacro-parse-word): make (kbd "M-123"), (kbd
+	"M--256") and such behave as documented.
+	From Hrvoje Niksic <hniksic@srce.hr>
+
+	* prim/cus-start.el: Various additions to built-in variable list.
+	From Hrvoje Niksic <hniksic@srce.hr>
+
+	* prim/subr.el: Remove mapvector.
+	(with-output-to-string): Use with-current-buffer.
+	(with-string-as-buffer-contents): Ditto.
+	From Hrvoje Niksic <hniksic@srce.hr>
+
+	* modes/arc-mode.el (archive-quit): New function.
+	From Karl M. Hegbloom <karlheg@inetarena.com>
+	(archive-mode-map): Bind it to `q'.
+
+	* utils/autoload.el (cusload-file-name): Default to custom-load.el 
+	for each individual file.
+
+	* prim/minibuf.el (minibuffer-max-depth-exceeded): Use
+	`custom-file' as a location for saving enable multiple minibuffers 
+	option.
+
+	* packages/man.el (manual-entry): Don't leave empty buffer if
+	error occurs.
+	From Glynn Clements <glynn@sensei.co.uk>
+
+	* modes/arc-mode.el (archive-arc-summarize): De-ebolify.
+	(archive-lzh-summarize): Ditto.
+	(archive-zip-summarize): Ditto.
+	(archive-zip-chmod-entry): Ditto.
+
+1997-06-17  Steven L Baur  <steve@altair.xemacs.org>
+
+	* prim/update-elc.el: Total rework for dynamic dumped .elc finding.
+
+1997-06-18  Hrvoje Niksic  <hniksic@srce.hr>
+
+	* prim/loaddefs.el (debug-ignored-errors): Initialize it.
+
+1997-06-17  Steven L Baur  <steve@altair.xemacs.org>
+
+	* prim/files.el (auto-mode-alist): Add /app-defaults/ as candidate 
+	for xrdb-mode.
+	Suggested by Karl Hegbloom, Regexp by David Moore.
+
+	* version.el: Remove variables emacs-version, emacs-major-version, 
+	and emacs-minor-version.
+
+	* tooltalk/tooltalk-load.el: Comment as obsolete and move contents 
+	to dumped-lisp.el.
+
+	* prim/make-docfile.el: New file.
+
+1997-06-16  Steven L Baur  <steve@altair.xemacs.org>
+
+	* prim/startup.el (load-user-init-file): Look for ~[user]/.xemacs
+	before loading .emacs.
+
+	* modes/xrdb-mode.el (xrdb-mode): Autoload.
+
+	* prim/files.el (auto-mode-alist): Add defaults for xrdb-mode.
+
+	* leim/quail.el (quail-toggle-mode-temporarily): Guard against
+	possibility of quail-conv-overlay not being an overlay.
+
+1997-06-15  Steven L Baur  <steve@altair.xemacs.org>
+
+	* prim/loadup.el: Remove most but not all of the hardcoded dumped
+	lisp file names.
+
+	* prim/dumped-lisp.el: New file.
+
+	* prim/update-elc.el (toplevel): Rework using a better function to 
+	determine autoload file locations.
+
+	* prim/packages.el: New file.
+
+	* prim/update-elc.el: Determine location and count of
+ 	auto-autoloads files at run-time.
+
+	* prim/loaddefs.el (((dir load-path))): Generalize load of
+	auto-autoloads.
+
+	* utils/autoload.el (autoload-file-name): New variable.
+	(autoload-target-directory): New variable.
+	(generated-autoload-file): Use them.
+	(cusload-file-name): New variable.
+	(generated-custom-file): Use it.
+	(batch-update-directory): New function.
+
 1997-06-14  Steven L Baur  <steve@altair.xemacs.org>
 
+	* mule/canna.el: Guard call to function dynamic-link, which
+	doesn't exist in XEmacs/Mule.
+
 	* bytecomp/bytecomp.el (byte-compile-file): Suppress unavoidable
 	Ebola notices.
 
@@ -836,10 +998,6 @@
 
 	* prim/simple.el (transpose-preceding-chars): New function.
 
-Wed Apr 23 16:04:22 1997  Hrvoje Niksic  <hniksic@srce.hr>
-
-	* prim/loaddefs.el (debug-ignored-errors): Initialize.
-
 Fri May 16 20:37:35 1997  Steven L Baur  <steve@altair.xemacs.org>
 
 	* version.el: Update minor version number.
diff -r 4de2936b4e77 -r 0132846995bd lisp/apel/custom-load.el
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lisp/apel/custom-load.el	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,65 @@
+(put 'copyright 'custom-loads '())
+(put 'eldoc 'custom-loads '())
+(put 'execute 'custom-loads '())
+(put 'mouse 'custom-loads '())
+(put 'mail-abbrevs 'custom-loads '())
+(put 'etags 'custom-loads '())
+(put 'limits 'custom-loads '())
+(put 'minibuffer 'custom-loads '())
+(put 'environment 'custom-loads '())
+(put 'sound 'custom-loads '())
+(put 'holidays 'custom-loads '())
+(put 'auto-save 'custom-loads '())
+(put 'ispell 'custom-loads '())
+(put 'fortran-indent 'custom-loads '())
+(put 'lpr 'custom-loads '())
+(put 'message-headers 'custom-loads '())
+(put 'editing-basics 'custom-loads '())
+(put 'internal 'custom-loads '())
+(put 'calendar 'custom-loads '())
+(put 'help-appearance 'custom-loads '())
+(put 'display-time 'custom-loads '())
+(put 'lisp 'custom-loads '())
+(put 'diff 'custom-loads '())
+(put 'paren-matching 'custom-loads '())
+(put 'help 'custom-loads '())
+(put 'local 'custom-loads '())
+(put 'keyboard 'custom-loads '())
+(put 'minubuffer 'custom-loads '())
+(put 'message-sending 'custom-loads '())
+(put 'data 'custom-loads '())
+(put 'ps-print 'custom-loads '())
+(put 'backup 'custom-loads '())
+(put 'frames 'custom-loads '())
+(put 'customize 'custom-loads '())
+(put 'abbrev 'custom-loads '())
+(put 'toolbar 'custom-loads '())
+(put 'compilation 'custom-loads '())
+(put 'dired 'custom-loads '())
+(put 'killing 'custom-loads '())
+(put 'paren-blinking 'custom-loads '())
+(put 'find-file 'custom-loads '())
+(put 'gnuserv 'custom-loads '())
+(put 'maint 'custom-loads '())
+(put 'fill-comments 'custom-loads '())
+(put 'message-mail 'custom-loads '())
+(put 'windows 'custom-loads '())
+(put 'message-various 'custom-loads '())
+(put 'resize-minibuffer 'custom-loads '())
+(put 'fill 'custom-loads '())
+(put 'debug 'custom-loads '())
+(put 'display 'custom-loads '())
+(put 'diary 'custom-loads '())
+(put 'browse-url 'custom-loads '())
+(put 'message-insertion 'custom-loads '())
+(put 'hyper-apropos 'custom-loads '())
+(put 'vc 'custom-loads '())
+(put 'alloc 'custom-loads '())
+(put 'isearch 'custom-loads '())
+(put 'modeline 'custom-loads '())
+(put 'processes-basics 'custom-loads '())
+(put 'editing 'custom-loads '())
+(put 'matching 'custom-loads '())
+(put 'ps-print-color 'custom-loads '())
+(put 'undo 'custom-loads '())
+(put 'x 'custom-loads '())
diff -r 4de2936b4e77 -r 0132846995bd lisp/auctex/auto-autoloads.el
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lisp/auctex/auto-autoloads.el	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,62 @@
+;;; DO NOT MODIFY THIS FILE
+(if (not (featurep 'auctex-autoloads))
+    (progn
+
+;;;### (autoloads (BibTeX-auto-store) "latex" "auctex/latex.el")
+
+(autoload 'BibTeX-auto-store "latex" "\
+This function should be called from bibtex-mode-hook.
+It will setup BibTeX to store keys in an auto file." nil nil)
+
+;;;***
+
+;;;### (autoloads nil "tex-info" "auctex/tex-info.el")
+
+;;;***
+
+;;;### (autoloads (japanese-latex-mode japanese-plain-tex-mode) "tex-jp" "auctex/tex-jp.el")
+
+(autoload 'japanese-plain-tex-mode "tex-jp" "\
+Major mode for editing files of input for Japanese plain TeX.
+Set japanese-TeX-mode to t, and enters plain-tex-mode." t nil)
+
+(autoload 'japanese-latex-mode "tex-jp" "\
+Major mode for editing files of input for Japanese plain TeX.
+Set japanese-TeX-mode to t, and enters latex-mode." t nil)
+
+;;;***
+
+;;;### (autoloads (TeX-submit-bug-report TeX-insert-quote TeX-auto-generate-global TeX-auto-generate ams-tex-mode) "tex" "auctex/tex.el")
+
+(autoload 'ams-tex-mode "tex" "\
+Major mode for editing files of input for AmS TeX.
+See info under AUC TeX for documentation.
+
+Special commands:
+\\{TeX-mode-map}
+ 
+Entering AmS-tex-mode calls the value of text-mode-hook,
+then the value of TeX-mode-hook, and then the value
+of AmS-TeX-mode-hook." t nil)
+
+(autoload 'TeX-auto-generate "tex" "\
+Generate style file for TEX and store it in AUTO.  
+If TEX is a directory, generate style files for all files in the directory." t nil)
+
+(autoload 'TeX-auto-generate-global "tex" "\
+Create global auto directory for global TeX macro definitions." t nil)
+
+(autoload 'TeX-insert-quote "tex" "\
+Insert the appropriate quote marks for TeX.
+Inserts the value of `TeX-open-quote' (normally ``) or `TeX-close-quote'
+\(normally '') depending on the context.  If `TeX-quote-after-quote'
+is non-nil, this insertion works only after \". 
+With prefix argument, always inserts \" characters." t nil)
+
+(autoload 'TeX-submit-bug-report "tex" "\
+Submit via mail a bug report on AUC TeX" t nil)
+
+;;;***
+
+(provide 'auctex-autoloads)
+))
diff -r 4de2936b4e77 -r 0132846995bd lisp/auctex/custom-load.el
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lisp/auctex/custom-load.el	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,81 @@
+(put 'copyright 'custom-loads '())
+(put 'eldoc 'custom-loads '())
+(put 'execute 'custom-loads '())
+(put 'mouse 'custom-loads '())
+(put 'mail-abbrevs 'custom-loads '())
+(put 'tex 'custom-loads '("tex"))
+(put 'etags 'custom-loads '())
+(put 'limits 'custom-loads '())
+(put 'minibuffer 'custom-loads '())
+(put 'environment 'custom-loads '())
+(put 'sound 'custom-loads '())
+(put 'holidays 'custom-loads '())
+(put 'LaTeX-label 'custom-loads '("latex"))
+(put 'LaTeX-environment 'custom-loads '("latex"))
+(put 'auto-save 'custom-loads '())
+(put 'LaTeX-macro 'custom-loads '("latex"))
+(put 'ispell 'custom-loads '())
+(put 'fortran-indent 'custom-loads '())
+(put 'lpr 'custom-loads '())
+(put 'message-headers 'custom-loads '())
+(put 'TeX-output 'custom-loads '("tex-buf" "tex"))
+(put 'editing-basics 'custom-loads '())
+(put 'LaTeX-math 'custom-loads '("latex"))
+(put 'internal 'custom-loads '())
+(put 'calendar 'custom-loads '())
+(put 'help-appearance 'custom-loads '())
+(put 'display-time 'custom-loads '())
+(put 'lisp 'custom-loads '())
+(put 'diff 'custom-loads '())
+(put 'paren-matching 'custom-loads '())
+(put 'help 'custom-loads '())
+(put 'local 'custom-loads '())
+(put 'keyboard 'custom-loads '())
+(put 'minubuffer 'custom-loads '())
+(put 'message-sending 'custom-loads '())
+(put 'TeX-parse 'custom-loads '("tex"))
+(put 'data 'custom-loads '())
+(put 'AUC-TeX 'custom-loads '("tex"))
+(put 'TeX-command 'custom-loads '("tex"))
+(put 'TeX-command-name 'custom-loads '("tex"))
+(put 'ps-print 'custom-loads '())
+(put 'TeX-commands 'custom-loads '("tex-buf"))
+(put 'backup 'custom-loads '())
+(put 'frames 'custom-loads '())
+(put 'customize 'custom-loads '())
+(put 'abbrev 'custom-loads '())
+(put 'toolbar 'custom-loads '())
+(put 'compilation 'custom-loads '())
+(put 'dired 'custom-loads '())
+(put 'TeX-indentation 'custom-loads '("latex"))
+(put 'killing 'custom-loads '())
+(put 'paren-blinking 'custom-loads '())
+(put 'find-file 'custom-loads '())
+(put 'TeX-macro 'custom-loads '("latex"))
+(put 'gnuserv 'custom-loads '())
+(put 'maint 'custom-loads '())
+(put 'fill-comments 'custom-loads '())
+(put 'message-mail 'custom-loads '())
+(put 'windows 'custom-loads '())
+(put 'message-various 'custom-loads '())
+(put 'resize-minibuffer 'custom-loads '())
+(put 'fill 'custom-loads '())
+(put 'debug 'custom-loads '())
+(put 'display 'custom-loads '())
+(put 'diary 'custom-loads '())
+(put 'browse-url 'custom-loads '())
+(put 'LaTeX-indentation 'custom-loads '("latex"))
+(put 'message-insertion 'custom-loads '())
+(put 'hyper-apropos 'custom-loads '())
+(put 'LaTeX 'custom-loads '("latex" "tex"))
+(put 'vc 'custom-loads '())
+(put 'alloc 'custom-loads '())
+(put 'isearch 'custom-loads '())
+(put 'modeline 'custom-loads '())
+(put 'processes-basics 'custom-loads '())
+(put 'editing 'custom-loads '())
+(put 'matching 'custom-loads '())
+(put 'ps-print-color 'custom-loads '())
+(put 'TeX-file 'custom-loads '("tex"))
+(put 'undo 'custom-loads '())
+(put 'x 'custom-loads '())
diff -r 4de2936b4e77 -r 0132846995bd lisp/bytecomp/auto-autoloads.el
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lisp/bytecomp/auto-autoloads.el	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,96 @@
+;;; DO NOT MODIFY THIS FILE
+(if (not (featurep 'bytecomp-autoloads))
+    (progn
+
+;;;### (autoloads (batch-byte-recompile-directory batch-byte-recompile-directory-norecurse batch-byte-compile display-call-tree byte-compile-sexp byte-compile compile-defun byte-compile-file byte-recompile-file byte-recompile-directory byte-force-recompile) "bytecomp" "bytecomp/bytecomp.el")
+
+(autoload 'byte-force-recompile "bytecomp" "\
+Recompile every `.el' file in DIRECTORY that already has a `.elc' file.
+Files in subdirectories of DIRECTORY are processed also." t nil)
+
+(autoload 'byte-recompile-directory "bytecomp" "\
+Recompile every `.el' file in DIRECTORY that needs recompilation.
+This is if a `.elc' file exists but is older than the `.el' file.
+Files in subdirectories of DIRECTORY are processed also unless argument
+NORECURSION is non-nil.
+
+If the `.elc' file does not exist, normally the `.el' file is *not* compiled.
+But a prefix argument (optional second arg) means ask user,
+for each such `.el' file, whether to compile it.  Prefix argument 0 means
+don't ask and compile the file anyway.
+
+A nonzero prefix argument also means ask about each subdirectory.
+
+If the fourth argument FORCE is non-nil,
+recompile every `.el' file that already has a `.elc' file." t nil)
+
+(autoload 'byte-recompile-file "bytecomp" "\
+Recompile a file of Lisp code named FILENAME if it needs recompilation.
+This is if the `.elc' file exists but is older than the `.el' file.
+
+If the `.elc' file does not exist, normally the `.el' file is *not*
+compiled.  But a prefix argument (optional second arg) means ask user
+whether to compile it.  Prefix argument 0 don't ask and recompile anyway." t nil)
+
+(autoload 'byte-compile-file "bytecomp" "\
+Compile a file of Lisp code named FILENAME into a file of byte code.
+The output file's name is made by appending `c' to the end of FILENAME.
+With prefix arg (noninteractively: 2nd arg), load the file after compiling." t nil)
+
+(autoload 'compile-defun "bytecomp" "\
+Compile and evaluate the current top-level form.
+Print the result in the minibuffer.
+With argument, insert value in current buffer after the form." t nil)
+
+(autoload 'byte-compile "bytecomp" "\
+If FORM is a symbol, byte-compile its function definition.
+If FORM is a lambda or a macro, byte-compile it as a function." nil nil)
+
+(autoload 'byte-compile-sexp "bytecomp" "\
+Compile and return SEXP." nil nil)
+
+(autoload 'display-call-tree "bytecomp" "\
+Display a call graph of a specified file.
+This lists which functions have been called, what functions called
+them, and what functions they call.  The list includes all functions
+whose definitions have been compiled in this Emacs session, as well as
+all functions called by those functions.
+
+The call graph does not include macros, inline functions, or
+primitives that the byte-code interpreter knows about directly (eq,
+cons, etc.).
+
+The call tree also lists those functions which are not known to be called
+\(that is, to which no calls have been compiled), and which cannot be
+invoked interactively." t nil)
+
+(autoload 'batch-byte-compile "bytecomp" "\
+Run `byte-compile-file' on the files remaining on the command line.
+Use this from the command line, with `-batch';
+it won't work in an interactive Emacs.
+Each file is processed even if an error occurred previously.
+For example, invoke \"emacs -batch -f batch-byte-compile $emacs/ ~/*.el\"" nil nil)
+
+(autoload 'batch-byte-recompile-directory-norecurse "bytecomp" "\
+Same as `batch-byte-recompile-directory' but without recursion." nil nil)
+
+(autoload 'batch-byte-recompile-directory "bytecomp" "\
+Runs `byte-recompile-directory' on the dirs remaining on the command line.
+Must be used only with `-batch', and kills Emacs on completion.
+For example, invoke `xemacs -batch -f batch-byte-recompile-directory .'." nil nil)
+
+;;;***
+
+;;;### (autoloads (disassemble) "disass" "bytecomp/disass.el")
+
+(autoload 'disassemble "disass" "\
+Print disassembled code for OBJECT in (optional) BUFFER.
+OBJECT can be a symbol defined as a function, or a function itself
+\(a lambda expression or a compiled-function object).
+If OBJECT is not already compiled, we compile it, but do not
+redefine OBJECT if it is a symbol." t nil)
+
+;;;***
+
+(provide 'bytecomp-autoloads)
+))
diff -r 4de2936b4e77 -r 0132846995bd lisp/bytecomp/bytecomp.el
--- a/lisp/bytecomp/bytecomp.el	Mon Aug 13 09:42:28 2007 +0200
+++ b/lisp/bytecomp/bytecomp.el	Mon Aug 13 09:43:35 2007 +0200
@@ -3619,9 +3619,17 @@
   (byte-compile-out 'byte-unbind 1))
 
 (defun byte-compile-save-current-buffer (form)
-  (byte-compile-out 'byte-save-current-buffer 0)
-  (byte-compile-body-do-effect (cdr form))
-  (byte-compile-out 'byte-unbind 1))
+  (if (byte-compile-version-cond byte-compile-emacs19-compatibility)
+      ;; `save-current-buffer' special form is not available in XEmacs 19.
+      (byte-compile-form
+       `(let ((_byte_compiler_save_buffer_emulation_closure_ (current-buffer)))
+	  (unwind-protect
+	      (progn ,@(cdr form))
+	    (and (buffer-live-p _byte_compiler_save_buffer_emulation_closure_)
+		 (set-buffer _byte_compiler_save_buffer_emulation_closure_)))))
+    (byte-compile-out 'byte-save-current-buffer 0)
+    (byte-compile-body-do-effect (cdr form))
+    (byte-compile-out 'byte-unbind 1)))
 
 (defun byte-compile-save-window-excursion (form)
   (byte-compile-push-constant
diff -r 4de2936b4e77 -r 0132846995bd lisp/bytecomp/custom-load.el
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lisp/bytecomp/custom-load.el	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,65 @@
+(put 'copyright 'custom-loads '())
+(put 'eldoc 'custom-loads '())
+(put 'execute 'custom-loads '())
+(put 'mouse 'custom-loads '())
+(put 'mail-abbrevs 'custom-loads '())
+(put 'etags 'custom-loads '())
+(put 'limits 'custom-loads '())
+(put 'minibuffer 'custom-loads '())
+(put 'environment 'custom-loads '())
+(put 'sound 'custom-loads '())
+(put 'holidays 'custom-loads '())
+(put 'auto-save 'custom-loads '())
+(put 'ispell 'custom-loads '())
+(put 'fortran-indent 'custom-loads '())
+(put 'lpr 'custom-loads '())
+(put 'message-headers 'custom-loads '())
+(put 'editing-basics 'custom-loads '())
+(put 'internal 'custom-loads '())
+(put 'calendar 'custom-loads '())
+(put 'help-appearance 'custom-loads '())
+(put 'display-time 'custom-loads '())
+(put 'lisp 'custom-loads '())
+(put 'diff 'custom-loads '())
+(put 'paren-matching 'custom-loads '())
+(put 'help 'custom-loads '())
+(put 'local 'custom-loads '())
+(put 'keyboard 'custom-loads '())
+(put 'minubuffer 'custom-loads '())
+(put 'message-sending 'custom-loads '())
+(put 'data 'custom-loads '())
+(put 'ps-print 'custom-loads '())
+(put 'backup 'custom-loads '())
+(put 'frames 'custom-loads '())
+(put 'customize 'custom-loads '())
+(put 'abbrev 'custom-loads '())
+(put 'toolbar 'custom-loads '())
+(put 'compilation 'custom-loads '())
+(put 'dired 'custom-loads '())
+(put 'killing 'custom-loads '())
+(put 'paren-blinking 'custom-loads '())
+(put 'find-file 'custom-loads '())
+(put 'gnuserv 'custom-loads '())
+(put 'maint 'custom-loads '())
+(put 'fill-comments 'custom-loads '())
+(put 'message-mail 'custom-loads '())
+(put 'windows 'custom-loads '())
+(put 'message-various 'custom-loads '())
+(put 'resize-minibuffer 'custom-loads '())
+(put 'fill 'custom-loads '())
+(put 'debug 'custom-loads '())
+(put 'display 'custom-loads '())
+(put 'diary 'custom-loads '())
+(put 'browse-url 'custom-loads '())
+(put 'message-insertion 'custom-loads '())
+(put 'hyper-apropos 'custom-loads '())
+(put 'vc 'custom-loads '())
+(put 'alloc 'custom-loads '())
+(put 'isearch 'custom-loads '())
+(put 'modeline 'custom-loads '())
+(put 'processes-basics 'custom-loads '())
+(put 'editing 'custom-loads '())
+(put 'matching 'custom-loads '())
+(put 'ps-print-color 'custom-loads '())
+(put 'undo 'custom-loads '())
+(put 'x 'custom-loads '())
diff -r 4de2936b4e77 -r 0132846995bd lisp/calendar/auto-autoloads.el
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lisp/calendar/auto-autoloads.el	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,380 @@
+;;; DO NOT MODIFY THIS FILE
+(if (not (featurep 'calendar-autoloads))
+    (progn
+
+;;;### (autoloads nil "cal-dst" "calendar/cal-dst.el")
+
+(put 'calendar-daylight-savings-starts 'risky-local-variable t)
+
+(put 'calendar-daylight-savings-ends 'risky-local-variable t)
+
+;;;***
+
+;;;### (autoloads nil "cal-x" "calendar/cal-x.el")
+
+(defvar calendar-setup 'one-frame "\
+The frame set up of the calendar.
+The choices are `one-frame' (calendar and diary together in one separate,
+dediciated frame) or `two-frames' (calendar and diary in separate, dedicated
+frames); with any other value the current frame is used.")
+
+;;;***
+
+;;;### (autoloads (list-yahrzeit-dates calendar) "calendar" "calendar/calendar.el")
+
+(defcustom calendar-week-start-day 0 "*The day of the week on which a week in the calendar begins.\n0 means Sunday (default), 1 means Monday, and so on." :type 'integer :group 'calendar)
+
+(defcustom calendar-offset 0 "*The offset of the principal month from the center of the calendar window.\n0 means the principal month is in the center (default), -1 means on the left,\n+1 means on the right.  Larger (or smaller) values push the principal month off\nthe screen." :type 'integer :group 'calendar)
+
+(defcustom view-diary-entries-initially nil "*Non-nil means display current date's diary entries on entry.\nThe diary is displayed in another window when the calendar is first displayed,\nif the current date is visible.  The number of days of diary entries displayed\nis governed by the variable `number-of-diary-entries'." :type 'boolean :group 'diary)
+
+(defcustom number-of-diary-entries 1 "*Specifies how many days of diary entries are to be displayed initially.\nThis variable affects the diary display when the command M-x diary is used,\nor if the value of the variable `view-diary-entries-initially' is t.  For\nexample, if the default value 1 is used, then only the current day's diary\nentries will be displayed.  If the value 2 is used, then both the current\nday's and the next day's entries will be displayed.\n\nThe value can also be a vector such as [0 2 2 2 2 4 1]; this value\nsays to display no diary entries on Sunday, the display the entries\nfor the current date and the day after on Monday through Thursday,\ndisplay Friday through Monday's entries on Friday, and display only\nSaturday's entries on Saturday.\n\nThis variable does not affect the diary display with the `d' command\nfrom the calendar; in that case, the prefix argument controls the\nnumber of days of diary entries displayed." :type 'integer :group 'diary)
+
+(defcustom mark-diary-entries-in-calendar nil "*Non-nil means mark dates with diary entries, in the calendar window.\nThe marking symbol is specified by the variable `diary-entry-marker'." :type 'boolean :group 'diary)
+
+(defcustom view-calendar-holidays-initially nil "*Non-nil means display holidays for current three month period on entry.\nThe holidays are displayed in another window when the calendar is first\ndisplayed." :type 'boolean :group 'holidays)
+
+(defcustom mark-holidays-in-calendar nil "*Non-nil means mark dates of holidays in the calendar window.\nThe marking symbol is specified by the variable `calendar-holiday-marker'." :type 'boolean :group 'holidays)
+
+(defcustom all-hebrew-calendar-holidays nil "*If nil, show only major holidays from the Hebrew calendar.\nThis means only those Jewish holidays that appear on secular calendars.\n\nIf t, show all the holidays that would appear in a complete Hebrew calendar." :type 'boolean :group 'holidays)
+
+(defcustom all-christian-calendar-holidays nil "*If nil, show only major holidays from the Christian calendar.\nThis means only those Christian holidays that appear on secular calendars.\n\nIf t, show all the holidays that would appear in a complete Christian\ncalendar." :type 'boolean :group 'holidays)
+
+(defcustom all-islamic-calendar-holidays nil "*If nil, show only major holidays from the Islamic calendar.\nThis means only those Islamic holidays that appear on secular calendars.\n\nIf t, show all the holidays that would appear in a complete Islamic\ncalendar." :type 'boolean :group 'holidays)
+
+(defcustom calendar-load-hook nil "*List of functions to be called after the calendar is first loaded.\nThis is the place to add key bindings to `calendar-mode-map'." :type 'hook :group 'calendar)
+
+(defcustom initial-calendar-window-hook nil "*List of functions to be called when the calendar window is first opened.\nThe functions invoked are called after the calendar window is opened, but\nonce opened is never called again.  Leaving the calendar with the `q' command\nand reentering it will cause these functions to be called again." :type 'hook :group 'calendar)
+
+(defcustom today-visible-calendar-hook nil "*List of functions called whenever the current date is visible.\nThis can be used, for example, to replace today's date with asterisks; a\nfunction `calendar-star-date' is included for this purpose:\n    (setq today-visible-calendar-hook 'calendar-star-date)\nIt can also be used to mark the current date with `calendar-today-marker';\na function is also provided for this:\n    (setq today-visible-calendar-hook 'calendar-mark-today)\n\nThe corresponding variable `today-invisible-calendar-hook' is the list of\nfunctions called when the calendar function was called when the current\ndate is not visible in the window.\n\nOther than the use of the provided functions, the changing of any\ncharacters in the calendar buffer by the hooks may cause the failure of the\nfunctions that move by days and weeks." :type 'hook :group 'calendar)
+
+(defcustom today-invisible-calendar-hook nil "*List of functions called whenever the current date is not visible.\n\nThe corresponding variable `today-visible-calendar-hook' is the list of\nfunctions called when the calendar function was called when the current\ndate is visible in the window.\n\nOther than the use of the provided functions, the changing of any\ncharacters in the calendar buffer by the hooks may cause the failure of the\nfunctions that move by days and weeks." :type 'hook :group 'calendar)
+
+(defcustom diary-file "~/diary" "*Name of the file in which one's personal diary of dates is kept.\n\nThe file's entries are lines in any of the forms\n\n            MONTH/DAY\n            MONTH/DAY/YEAR\n            MONTHNAME DAY\n            MONTHNAME DAY, YEAR\n            DAYNAME\n\nat the beginning of the line; the remainder of the line is the diary entry\nstring for that date.  MONTH and DAY are one or two digit numbers, YEAR is\na number and may be written in full or abbreviated to the final two digits.\nIf the date does not contain a year, it is generic and applies to any year.\nDAYNAME entries apply to any date on which is on that day of the week.\nMONTHNAME and DAYNAME can be spelled in full, abbreviated to three\ncharacters (with or without a period), capitalized or not.  Any of DAY,\nMONTH, or MONTHNAME, YEAR can be `*' which matches any day, month, or year,\nrespectively.\n\nThe European style (in which the day precedes the month) can be used\ninstead, if you execute `european-calendar' when in the calendar, or set\n`european-calendar-style' to t in your .emacs file.  The European forms are\n\n            DAY/MONTH\n            DAY/MONTH/YEAR\n            DAY MONTHNAME\n            DAY MONTHNAME YEAR\n            DAYNAME\n\nTo revert to the default American style from the European style, execute\n`american-calendar' in the calendar.\n\nA diary entry can be preceded by the character\n`diary-nonmarking-symbol' (ordinarily `&') to make that entry\nnonmarking--that is, it will not be marked on dates in the calendar\nwindow but will appear in a diary window.\n\nMultiline diary entries are made by indenting lines after the first with\neither a TAB or one or more spaces.\n\nLines not in one the above formats are ignored.  Here are some sample diary\nentries (in the default American style):\n\n     12/22/1988 Twentieth wedding anniversary!!\n     &1/1. Happy New Year!\n     10/22 Ruth's birthday.\n     21: Payday\n     Tuesday--weekly meeting with grad students at 10am\n              Supowit, Shen, Bitner, and Kapoor to attend.\n     1/13/89 Friday the thirteenth!!\n     &thu 4pm squash game with Lloyd.\n     mar 16 Dad's birthday\n     April 15, 1989 Income tax due.\n     &* 15 time cards due.\n\nIf the first line of a diary entry consists only of the date or day name with\nno trailing blanks or punctuation, then that line is not displayed in the\ndiary window; only the continuation lines is shown.  For example, the\nsingle diary entry\n\n     02/11/1989\n      Bill Blattner visits Princeton today\n      2pm Cognitive Studies Committee meeting\n      2:30-5:30 Lizzie at Lawrenceville for `Group Initiative'\n      4:00pm Jamie Tappenden\n      7:30pm Dinner at George and Ed's for Alan Ryan\n      7:30-10:00pm dance at Stewart Country Day School\n\nwill appear in the diary window without the date line at the beginning.  This\nfacility allows the diary window to look neater, but can cause confusion if\nused with more than one day's entries displayed.\n\nDiary entries can be based on Lisp sexps.  For example, the diary entry\n\n      %%(diary-block 11 1 1990 11 10 1990) Vacation\n\ncauses the diary entry \"Vacation\" to appear from November 1 through November\n10, 1990.  Other functions available are `diary-float', `diary-anniversary',\n`diary-cyclic', `diary-day-of-year', `diary-iso-date', `diary-french-date',\n`diary-hebrew-date', `diary-islamic-date', `diary-mayan-date',\n`diary-yahrzeit', `diary-sunrise-sunset', `diary-phases-of-moon',\n`diary-parasha', `diary-omer', `diary-rosh-hodesh', and\n`diary-sabbath-candles'.  See the documentation for the function\n`list-sexp-diary-entries' for more details.\n\nDiary entries based on the Hebrew and/or the Islamic calendar are also\npossible, but because these are somewhat slow, they are ignored\nunless you set the `nongregorian-diary-listing-hook' and the\n`nongregorian-diary-marking-hook' appropriately.  See the documentation\nfor these functions for details.\n\nDiary files can contain directives to include the contents of other files; for\ndetails, see the documentation for the variable `list-diary-entries-hook'." :type 'file :group 'diary)
+
+(defcustom diary-nonmarking-symbol "&" "*Symbol indicating that a diary entry is not to be marked in the calendar." :type 'string :group 'diary)
+
+(defcustom hebrew-diary-entry-symbol "H" "*Symbol indicating a diary entry according to the Hebrew calendar." :type 'string :group 'diary)
+
+(defcustom islamic-diary-entry-symbol "I" "*Symbol indicating a diary entry according to the Islamic calendar." :type 'string :group 'diary)
+
+(defcustom diary-include-string "#include" "*The string indicating inclusion of another file of diary entries.\nSee the documentation for the function `include-other-diary-files'." :type 'string :group 'diary)
+
+(defcustom sexp-diary-entry-symbol "%%" "*The string used to indicate a sexp diary entry in diary-file.\nSee the documentation for the function `list-sexp-diary-entries'." :type 'string :group 'diary)
+
+(defcustom abbreviated-calendar-year t "*Interpret a two-digit year DD in a diary entry as either 19DD or 20DD.\nFor the Gregorian calendar; similarly for the Hebrew and Islamic calendars.\nIf this variable is nil, years must be written in full." :type 'boolean :group 'diary)
+
+(defcustom european-calendar-style nil "*Use the European style of dates in the diary and in any displays.\nIf this variable is t, a date 1/2/1990 would be interpreted as February 1,\n1990.  The accepted European date styles are\n\n            DAY/MONTH\n            DAY/MONTH/YEAR\n            DAY MONTHNAME\n            DAY MONTHNAME YEAR\n            DAYNAME\n\nNames can be capitalized or not, written in full, or abbreviated to three\ncharacters with or without a period." :type 'boolean :group 'diary)
+
+(defcustom american-date-diary-pattern '((month "/" day "[^/0-9]") (month "/" day "/" year "[^0-9]") (monthname " *" day "[^,0-9]") (monthname " *" day ", *" year "[^0-9]") (dayname "\\W")) "*List of pseudo-patterns describing the American patterns of date used.\nSee the documentation of `diary-date-forms' for an explanation." :type '(repeat (choice (cons :tag "Backup" (const backup) (repeat (list :inline t :format "%v" (symbol :tag "Keyword") (choice symbol regexp)))) (repeat (list :inline t :format "%v" (symbol :tag "Keyword") (choice symbol regexp))))) :group 'diary)
+
+(defcustom european-date-diary-pattern '((day "/" month "[^/0-9]") (day "/" month "/" year "[^0-9]") (backup day " *" monthname "\\W+\\<[^*0-9]") (day " *" monthname " *" year "[^0-9]") (dayname "\\W")) "*List of pseudo-patterns describing the European patterns of date used.\nSee the documentation of `diary-date-forms' for an explanation." :type '(repeat (choice (cons :tag "Backup" (const backup) (repeat (list :inline t :format "%v" (symbol :tag "Keyword") (choice symbol regexp)))) (repeat (list :inline t :format "%v" (symbol :tag "Keyword") (choice symbol regexp))))) :group 'diary)
+
+(defcustom european-calendar-display-form '((if dayname (concat dayname ", ")) day " " monthname " " year) "*Pseudo-pattern governing the way a date appears in the European style.\nSee the documentation of calendar-date-display-form for an explanation." :type 'sexp :group 'calendar)
+
+(defcustom american-calendar-display-form '((if dayname (concat dayname ", ")) monthname " " day ", " year) "*Pseudo-pattern governing the way a date appears in the American style.\nSee the documentation of `calendar-date-display-form' for an explanation." :type 'sexp :group 'calendar)
+
+(defcustom print-diary-entries-hook 'lpr-buffer "*List of functions called after a temporary diary buffer is prepared.\nThe buffer shows only the diary entries currently visible in the diary\nbuffer.  The default just does the printing.  Other uses might include, for\nexample, rearranging the lines into order by day and time, saving the buffer\ninstead of deleting it, or changing the function used to do the printing." :type 'hook :group 'diary)
+
+(defcustom list-diary-entries-hook nil "*List of functions called after diary file is culled for relevant entries.\nIt is to be used for diary entries that are not found in the diary file.\n\nA function `include-other-diary-files' is provided for use as the value of\nthis hook.  This function enables you to use shared diary files together\nwith your own.  The files included are specified in the diary file by lines\nof the form\n\n        #include \"filename\"\n\nThis is recursive; that is, #include directives in files thus included are\nobeyed.  You can change the \"#include\" to some other string by changing\nthe variable `diary-include-string'.  When you use `include-other-diary-files'\nas part of the list-diary-entries-hook, you will probably also want to use the\nfunction `mark-included-diary-files' as part of `mark-diary-entries-hook'.\n\nFor example, you could use\n\n     (setq list-diary-entries-hook\n       '(include-other-diary-files sort-diary-entries))\n     (setq diary-display-hook 'fancy-diary-display)\n\nin your `.emacs' file to cause the fancy diary buffer to be displayed with\ndiary entries from various included files, each day's entries sorted into\nlexicographic order." :type 'hook :group 'diary)
+
+(defcustom diary-hook nil "*List of functions called after the display of the diary.\nCan be used for appointment notification." :type 'hook :group 'diary)
+
+(defcustom diary-display-hook nil "*List of functions that handle the display of the diary.\nIf nil (the default), `simple-diary-display' is used.  Use `ignore' for no\ndiary display.\n\nOrdinarily, this just displays the diary buffer (with holidays indicated in\nthe mode line), if there are any relevant entries.  At the time these\nfunctions are called, the variable `diary-entries-list' is a list, in order\nby date, of all relevant diary entries in the form of ((MONTH DAY YEAR)\nSTRING), where string is the diary entry for the given date.  This can be\nused, for example, a different buffer for display (perhaps combined with\nholidays), or produce hard copy output.\n\nA function `fancy-diary-display' is provided as an alternative\nchoice for this hook; this function prepares a special noneditable diary\nbuffer with the relevant diary entries that has neat day-by-day arrangement\nwith headings.  The fancy diary buffer will show the holidays unless the\nvariable `holidays-in-diary-buffer' is set to nil.  Ordinarily, the fancy\ndiary buffer will not show days for which there are no diary entries, even\nif that day is a holiday; if you want such days to be shown in the fancy\ndiary buffer, set the variable `diary-list-include-blanks' to t." :type 'hook :group 'diary)
+
+(defcustom nongregorian-diary-listing-hook nil "*List of functions called for listing diary file and included files.\nAs the files are processed for diary entries, these functions are used to cull\nrelevant entries.  You can use either or both of `list-hebrew-diary-entries'\nand `list-islamic-diary-entries'.  The documentation for these functions\ndescribes the style of such diary entries." :type 'hook :group 'diary)
+
+(defcustom mark-diary-entries-hook nil "*List of functions called after marking diary entries in the calendar.\n\nA function `mark-included-diary-files' is also provided for use as the\nmark-diary-entries-hook; it enables you to use shared diary files together\nwith your own.  The files included are specified in the diary file by lines\nof the form\n        #include \"filename\"\nThis is recursive; that is, #include directives in files thus included are\nobeyed.  You can change the \"#include\" to some other string by changing the\nvariable `diary-include-string'.  When you use `mark-included-diary-files' as\npart of the mark-diary-entries-hook, you will probably also want to use the\nfunction `include-other-diary-files' as part of `list-diary-entries-hook'." :type 'hook :group 'diary)
+
+(defcustom nongregorian-diary-marking-hook nil "*List of functions called for marking diary file and included files.\nAs the files are processed for diary entries, these functions are used to cull\nrelevant entries.  You can use either or both of `mark-hebrew-diary-entries'\nand `mark-islamic-diary-entries'.  The documentation for these functions\ndescribes the style of such diary entries." :type 'hook :group 'diary)
+
+(defcustom diary-list-include-blanks nil "*If nil, do not include days with no diary entry in the list of diary entries.\nSuch days will then not be shown in the fancy diary buffer, even if they\nare holidays." :type 'boolean :group 'diary)
+
+(defcustom holidays-in-diary-buffer t "*Non-nil means include holidays in the diary display.\nThe holidays appear in the mode line of the diary buffer, or in the\nfancy diary buffer next to the date.  This slows down the diary functions\nsomewhat; setting it to nil makes the diary display faster." :type 'boolean :group 'diary)
+
+(defcustom general-holidays '((holiday-fixed 1 1 "New Year's Day") (holiday-float 1 1 3 "Martin Luther King Day") (holiday-fixed 2 2 "Ground Hog Day") (holiday-fixed 2 14 "Valentine's Day") (holiday-float 2 1 3 "President's Day") (holiday-fixed 3 17 "St. Patrick's Day") (holiday-fixed 4 1 "April Fool's Day") (holiday-float 5 0 2 "Mother's Day") (holiday-float 5 1 -1 "Memorial Day") (holiday-fixed 6 14 "Flag Day") (holiday-float 6 0 3 "Father's Day") (holiday-fixed 7 4 "Independence Day") (holiday-float 9 1 1 "Labor Day") (holiday-float 10 1 2 "Columbus Day") (holiday-fixed 10 31 "Halloween") (holiday-fixed 11 11 "Veteran's Day") (holiday-float 11 4 4 "Thanksgiving")) "*General holidays.  Default value is for the United States.\nSee the documentation for `calendar-holidays' for details." :type 'sexp :group 'holidays)
+
+(put 'general-holidays 'risky-local-variable t)
+
+(defcustom local-holidays nil "*Local holidays.\nSee the documentation for `calendar-holidays' for details." :type 'sexp :group 'holidays :group 'local)
+
+(put 'local-holidays 'risky-local-variable t)
+
+(defcustom other-holidays nil "*User defined holidays.\nSee the documentation for `calendar-holidays' for details." :type 'sexp :group 'holidays)
+
+(put 'other-holidays 'risky-local-variable t)
+
+(defvar hebrew-holidays-1 '((holiday-rosh-hashanah-etc) (if all-hebrew-calendar-holidays (holiday-julian 11 (let* ((m displayed-month) (y displayed-year) (year)) (increment-calendar-month m y -1) (let ((year (extract-calendar-year (calendar-julian-from-absolute (calendar-absolute-from-gregorian (list m 1 y)))))) (if (zerop (% (1+ year) 4)) 22 21))) "\"Tal Umatar\" (evening)"))))
+
+(put 'hebrew-holidays-1 'risky-local-variable t)
+
+(defvar hebrew-holidays-2 '((if all-hebrew-calendar-holidays (holiday-hanukkah) (holiday-hebrew 9 25 "Hanukkah")) (if all-hebrew-calendar-holidays (holiday-hebrew 10 (let ((h-year (extract-calendar-year (calendar-hebrew-from-absolute (calendar-absolute-from-gregorian (list displayed-month 28 displayed-year)))))) (if (= (% (calendar-absolute-from-hebrew (list 10 10 h-year)) 7) 6) 11 10)) "Tzom Teveth")) (if all-hebrew-calendar-holidays (holiday-hebrew 11 15 "Tu B'Shevat"))))
+
+(put 'hebrew-holidays-2 'risky-local-variable t)
+
+(defvar hebrew-holidays-3 '((if all-hebrew-calendar-holidays (holiday-hebrew 11 (let ((m displayed-month) (y displayed-year)) (increment-calendar-month m y 1) (let* ((h-year (extract-calendar-year (calendar-hebrew-from-absolute (calendar-absolute-from-gregorian (list m (calendar-last-day-of-month m y) y))))) (s-s (calendar-hebrew-from-absolute (if (= (% (calendar-absolute-from-hebrew (list 7 1 h-year)) 7) 6) (calendar-dayname-on-or-before 6 (calendar-absolute-from-hebrew (list 11 17 h-year))) (calendar-dayname-on-or-before 6 (calendar-absolute-from-hebrew (list 11 16 h-year)))))) (day (extract-calendar-day s-s))) day)) "Shabbat Shirah"))))
+
+(put 'hebrew-holidays-3 'risky-local-variable t)
+
+(defvar hebrew-holidays-4 '((holiday-passover-etc) (if (and all-hebrew-calendar-holidays (let* ((m displayed-month) (y displayed-year) (year)) (increment-calendar-month m y -1) (let ((year (extract-calendar-year (calendar-julian-from-absolute (calendar-absolute-from-gregorian (list m 1 y)))))) (= 21 (% year 28))))) (holiday-julian 3 26 "Kiddush HaHamah")) (if all-hebrew-calendar-holidays (holiday-tisha-b-av-etc))))
+
+(put 'hebrew-holidays-4 'risky-local-variable t)
+
+(defvar hebrew-holidays (append hebrew-holidays-1 hebrew-holidays-2 hebrew-holidays-3 hebrew-holidays-4) "\
+*Jewish holidays.
+See the documentation for `calendar-holidays' for details.")
+
+(put 'hebrew-holidays 'risky-local-variable t)
+
+(defvar christian-holidays '((if all-christian-calendar-holidays (holiday-fixed 1 6 "Epiphany")) (holiday-easter-etc) (if all-christian-calendar-holidays (holiday-greek-orthodox-easter)) (if all-christian-calendar-holidays (holiday-fixed 8 15 "Assumption")) (if all-christian-calendar-holidays (holiday-advent)) (holiday-fixed 12 25 "Christmas") (if all-christian-calendar-holidays (holiday-julian 12 25 "Eastern Orthodox Christmas"))) "\
+*Christian holidays.
+See the documentation for `calendar-holidays' for details.")
+
+(put 'christian-holidays 'risky-local-variable t)
+
+(defvar islamic-holidays '((holiday-islamic 1 1 (format "Islamic New Year %d" (let ((m displayed-month) (y displayed-year)) (increment-calendar-month m y 1) (extract-calendar-year (calendar-islamic-from-absolute (calendar-absolute-from-gregorian (list m (calendar-last-day-of-month m y) y))))))) (if all-islamic-calendar-holidays (holiday-islamic 1 10 "Ashura")) (if all-islamic-calendar-holidays (holiday-islamic 3 12 "Mulad-al-Nabi")) (if all-islamic-calendar-holidays (holiday-islamic 7 26 "Shab-e-Mi'raj")) (if all-islamic-calendar-holidays (holiday-islamic 8 15 "Shab-e-Bara't")) (holiday-islamic 9 1 "Ramadan Begins") (if all-islamic-calendar-holidays (holiday-islamic 9 27 "Shab-e Qadr")) (if all-islamic-calendar-holidays (holiday-islamic 10 1 "Id-al-Fitr")) (if all-islamic-calendar-holidays (holiday-islamic 12 10 "Id-al-Adha"))) "\
+*Islamic holidays.
+See the documentation for `calendar-holidays' for details.")
+
+(put 'islamic-holidays 'risky-local-variable t)
+
+(defvar solar-holidays '((if (fboundp 'atan) (solar-equinoxes-solstices)) (if (progn (require 'cal-dst) t) (funcall 'holiday-sexp calendar-daylight-savings-starts '(format "Daylight Savings Time Begins %s" (if (fboundp 'atan) (solar-time-string (/ calendar-daylight-savings-starts-time (float 60)) calendar-standard-time-zone-name) "")))) (funcall 'holiday-sexp calendar-daylight-savings-ends '(format "Daylight Savings Time Ends %s" (if (fboundp 'atan) (solar-time-string (/ calendar-daylight-savings-ends-time (float 60)) calendar-daylight-time-zone-name) "")))) "\
+*Sun-related holidays.
+See the documentation for `calendar-holidays' for details.")
+
+(put 'solar-holidays 'risky-local-variable t)
+
+(defvar calendar-holidays (append general-holidays local-holidays other-holidays christian-holidays hebrew-holidays islamic-holidays solar-holidays) "\
+*List of notable days for the command M-x holidays.
+
+Additional holidays are easy to add to the list, just put them in the list
+`other-holidays' in your .emacs file.  Similarly, by setting any of
+`general-holidays', `local-holidays' `christian-holidays', `hebrew-holidays',
+`islamic-holidays', or `solar-holidays' to nil in your .emacs file, you can
+eliminate unwanted categories of holidays.  The intention is that (in the US)
+`local-holidays' be set in site-init.el and `other-holidays' be set by the
+user.
+
+Entries on the list are expressions that return (possibly empty) lists of
+items of the form ((month day year) string) of a holiday in the in the
+three-month period centered around `displayed-month' of `displayed-year'.
+Several basic functions are provided for this purpose:
+
+    (holiday-fixed MONTH DAY STRING) is a fixed date on the Gregorian calendar
+    (holiday-float MONTH DAYNAME K STRING &optional day) is the Kth DAYNAME in
+                               MONTH on the Gregorian calendar (0 for Sunday,
+                               etc.); K<0 means count back from the end of the
+                               month. An optional parameter DAY means the Kth
+                               DAYNAME after/before MONTH DAY.
+    (holiday-hebrew MONTH DAY STRING)  a fixed date on the Hebrew calendar
+    (holiday-islamic MONTH DAY STRING) a fixed date on the Islamic calendar
+    (holiday-julian MONTH DAY STRING)  a fixed date on the Julian calendar
+    (holiday-sexp SEXP STRING) SEXP is a Gregorian-date-valued expression
+                               in the variable `year'; if it evaluates to
+                               a visible date, that's the holiday; if it
+                               evaluates to nil, there's no holiday.  STRING
+                               is an expression in the variable `date'.
+
+For example, to add Bastille Day, celebrated in France on July 14, add
+
+     (holiday-fixed 7 14 \"Bastille Day\")
+
+to the list.  To add Hurricane Supplication Day, celebrated in the Virgin
+Islands on the fourth Monday in August, add
+
+     (holiday-float 8 1 4 \"Hurricane Supplication Day\")
+
+to the list (the last Monday would be specified with `-1' instead of `4').
+To add the last day of Hanukkah to the list, use
+
+     (holiday-hebrew 10 2 \"Last day of Hanukkah\")
+
+since the Hebrew months are numbered with 1 starting from Nisan, while to
+add the Islamic feast celebrating Mohammed's birthday use
+
+     (holiday-islamic 3 12 \"Mohammed's Birthday\")
+
+since the Islamic months are numbered from 1 starting with Muharram.  To
+add Thomas Jefferson's birthday, April 2, 1743 (Julian), use
+
+     (holiday-julian 4 2 \"Jefferson's Birthday\")
+
+To include a holiday conditionally, use the sexp form or a conditional.  For
+example, to include American presidential elections, which occur on the first
+Tuesday after the first Monday in November of years divisible by 4, add
+
+     (holiday-sexp
+       (if (zerop (% year 4))
+           (calendar-gregorian-from-absolute
+             (1+ (calendar-dayname-on-or-before
+                   1 (+ 6 (calendar-absolute-from-gregorian
+                            (list 11 1 year)))))))
+       \"US Presidential Election\")
+
+or
+
+     (if (zerop (% displayed-year 4))
+         (holiday-fixed 11
+                (extract-calendar-day
+                 (calendar-gregorian-from-absolute
+                  (1+ (calendar-dayname-on-or-before
+                       1 (+ 6 (calendar-absolute-from-gregorian
+                               (list 11 1 displayed-year)))))))
+                \"US Presidential Election\"))
+
+to the list.  To include the phases of the moon, add
+
+     (lunar-phases)
+
+to the holiday list, where `lunar-phases' is an Emacs-Lisp function that
+you've written to return a (possibly empty) list of the relevant VISIBLE dates
+with descriptive strings such as
+
+     (((2 6 1989) \"New Moon\") ((2 12 1989) \"First Quarter Moon\") ... ).")
+
+(put 'calendar-holidays 'risky-local-variable t)
+
+(autoload 'calendar "calendar" "\
+Display a three-month calendar in another window.
+The three months appear side by side, with the current month in the middle
+surrounded by the previous and next months.  The cursor is put on today's date.
+
+If called with an optional prefix argument, prompts for month and year.
+
+This function is suitable for execution in a .emacs file; appropriate setting
+of the variable `view-diary-entries-initially' will cause the diary entries for
+the current date to be displayed in another window.  The value of the variable
+`number-of-diary-entries' controls the number of days of diary entries
+displayed upon initial display of the calendar.
+
+An optional prefix argument ARG causes the calendar displayed to be ARG
+months in the future if ARG is positive or in the past if ARG is negative;
+in this case the cursor goes on the first day of the month.
+
+Once in the calendar window, future or past months can be moved into view.
+Arbitrary months can be displayed, or the calendar can be scrolled forward
+or backward.
+
+The cursor can be moved forward or backward by one day, one week, one month,
+or one year.  All of these commands take prefix arguments which, when negative,
+cause movement in the opposite direction.  For convenience, the digit keys
+and the minus sign are automatically prefixes.  The window is replotted as
+necessary to display the desired date.
+
+Diary entries can be marked on the calendar or displayed in another window.
+
+Use M-x describe-mode for details of the key bindings in the calendar window.
+
+The Gregorian calendar is assumed.
+
+After loading the calendar, the hooks given by the variable
+`calendar-load-hook' are run.  This is the place to add key bindings to the
+calendar-mode-map.
+
+After preparing the calendar window initially, the hooks given by the variable
+`initial-calendar-window-hook' are run.
+
+The hooks given by the variable `today-visible-calendar-hook' are run
+everytime the calendar window gets scrolled, if the current date is visible
+in the window.  If it is not visible, the hooks given by the variable
+`today-invisible-calendar-hook' are run.  Thus, for example, setting
+`today-visible-calendar-hook' to 'calendar-star-date will cause today's date
+to be replaced by asterisks to highlight it whenever it is in the window." t nil)
+
+(autoload 'list-yahrzeit-dates "calendar" "\
+List Yahrzeit dates for *Gregorian* DEATH-DATE from START-YEAR to END-YEAR.
+When called interactively from the calendar window, the date of death is taken
+from the cursor position." t nil)
+
+;;;***
+
+;;;### (autoloads (diary) "diary-lib" "calendar/diary-lib.el")
+
+(autoload 'diary "diary-lib" "\
+Generate the diary window for ARG days starting with the current date.
+If no argument is provided, the number of days of diary entries is governed
+by the variable `number-of-diary-entries'.  This function is suitable for
+execution in a `.emacs' file." t nil)
+
+;;;***
+
+;;;### (autoloads (holidays) "holidays" "calendar/holidays.el")
+
+(autoload 'holidays "holidays" "\
+Display the holidays for last month, this month, and next month.
+If called with an optional prefix argument, prompts for month and year.
+
+This function is suitable for execution in a .emacs file." t nil)
+
+;;;***
+
+;;;### (autoloads (phases-of-moon) "lunar" "calendar/lunar.el")
+
+(autoload 'phases-of-moon "lunar" "\
+Display the quarters of the moon for last month, this month, and next month.
+If called with an optional prefix argument, prompts for month and year.
+
+This function is suitable for execution in a .emacs file." t nil)
+
+;;;***
+
+;;;### (autoloads (solar-equinoxes-solstices sunrise-sunset) "solar" "calendar/solar.el")
+
+(defvar calendar-time-display-form '(12-hours ":" minutes am-pm (if time-zone " (") time-zone (if time-zone ")")) "\
+*The pseudo-pattern that governs the way a time of day is formatted.
+
+A pseudo-pattern is a list of expressions that can involve the keywords
+`12-hours', `24-hours', and `minutes',  all numbers in string form,
+and `am-pm' and `time-zone',  both alphabetic strings.
+
+For example, the form
+
+  '(24-hours \":\" minutes
+    (if time-zone \" (\") time-zone (if time-zone \")\"))
+
+would give military-style times like `21:07 (UTC)'.")
+
+(defvar calendar-latitude nil "\
+*Latitude of `calendar-location-name' in degrees.
+
+The value can be either a decimal fraction (one place of accuracy is
+sufficient), + north, - south, such as 40.7 for New York City, or the value
+can be a vector [degrees minutes north/south] such as [40 50 north] for New
+York City.
+
+This variable should be set in site-local.el.")
+
+(defvar calendar-longitude nil "\
+*Longitude of `calendar-location-name' in degrees.
+
+The value can be either a decimal fraction (one place of accuracy is
+sufficient), + east, - west, such as -73.9 for New York City, or the value
+can be a vector [degrees minutes east/west] such as [73 55 west] for New
+York City.
+
+This variable should be set in site-local.el.")
+
+(defvar calendar-location-name '(let ((float-output-format "%.1f")) (format "%s%s, %s%s" (if (numberp calendar-latitude) (abs calendar-latitude) (+ (aref calendar-latitude 0) (/ (aref calendar-latitude 1) 60.0))) (if (numberp calendar-latitude) (if (> calendar-latitude 0) "N" "S") (if (equal (aref calendar-latitude 2) 'north) "N" "S")) (if (numberp calendar-longitude) (abs calendar-longitude) (+ (aref calendar-longitude 0) (/ (aref calendar-longitude 1) 60.0))) (if (numberp calendar-longitude) (if (> calendar-longitude 0) "E" "W") (if (equal (aref calendar-latitude 2) 'east) "E" "W")))) "\
+*Expression evaluating to name of `calendar-longitude', calendar-latitude'.
+For example, \"New York City\".  Default value is just the latitude, longitude
+pair.
+
+This variable should be set in site-local.el.")
+
+(autoload 'sunrise-sunset "solar" "\
+Local time of sunrise and sunset for today.  Accurate to +/- 2 minutes.
+If called with an optional prefix argument, prompt for date.
+
+If called with an optional double prefix argument, prompt for longitude,
+latitude, time zone, and date, and always use standard time.
+
+This function is suitable for execution in a .emacs file." t nil)
+
+(autoload 'solar-equinoxes-solstices "solar" "\
+Date and time of equinoxes and solstices, if visible in the calendar window.
+Requires floating point." nil nil)
+
+;;;***
+
+(provide 'calendar-autoloads)
+))
diff -r 4de2936b4e77 -r 0132846995bd lisp/calendar/custom-load.el
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lisp/calendar/custom-load.el	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,66 @@
+(put 'copyright 'custom-loads '())
+(put 'eldoc 'custom-loads '())
+(put 'execute 'custom-loads '())
+(put 'mouse 'custom-loads '())
+(put 'mail-abbrevs 'custom-loads '())
+(put 'etags 'custom-loads '())
+(put 'limits 'custom-loads '())
+(put 'minibuffer 'custom-loads '())
+(put 'environment 'custom-loads '())
+(put 'sound 'custom-loads '())
+(put 'holidays 'custom-loads '("calendar"))
+(put 'auto-save 'custom-loads '())
+(put 'ispell 'custom-loads '())
+(put 'fortran-indent 'custom-loads '())
+(put 'lpr 'custom-loads '())
+(put 'message-headers 'custom-loads '())
+(put 'editing-basics 'custom-loads '())
+(put 'internal 'custom-loads '())
+(put 'calendar 'custom-loads '("calendar"))
+(put 'help-appearance 'custom-loads '())
+(put 'display-time 'custom-loads '())
+(put 'lisp 'custom-loads '())
+(put 'diff 'custom-loads '())
+(put 'paren-matching 'custom-loads '())
+(put 'help 'custom-loads '())
+(put 'local 'custom-loads '("calendar"))
+(put 'keyboard 'custom-loads '())
+(put 'minubuffer 'custom-loads '())
+(put 'message-sending 'custom-loads '())
+(put 'data 'custom-loads '())
+(put 'ps-print 'custom-loads '())
+(put 'backup 'custom-loads '())
+(put 'frames 'custom-loads '())
+(put 'customize 'custom-loads '())
+(put 'abbrev 'custom-loads '())
+(put 'toolbar 'custom-loads '())
+(put 'compilation 'custom-loads '())
+(put 'dired 'custom-loads '())
+(put 'killing 'custom-loads '())
+(put 'paren-blinking 'custom-loads '())
+(put 'find-file 'custom-loads '())
+(put 'gnuserv 'custom-loads '())
+(put 'maint 'custom-loads '())
+(put 'fill-comments 'custom-loads '())
+(put 'message-mail 'custom-loads '())
+(put 'windows 'custom-loads '())
+(put 'message-various 'custom-loads '())
+(put 'resize-minibuffer 'custom-loads '())
+(put 'fill 'custom-loads '())
+(put 'debug 'custom-loads '())
+(put 'display 'custom-loads '())
+(put 'diary 'custom-loads '("calendar"))
+(put 'browse-url 'custom-loads '())
+(put 'message-insertion 'custom-loads '())
+(put 'hyper-apropos 'custom-loads '())
+(put 'vc 'custom-loads '())
+(put 'alloc 'custom-loads '())
+(put 'isearch 'custom-loads '())
+(put 'modeline 'custom-loads '())
+(put 'appt 'custom-loads '("appt"))
+(put 'processes-basics 'custom-loads '())
+(put 'editing 'custom-loads '())
+(put 'matching 'custom-loads '())
+(put 'ps-print-color 'custom-loads '())
+(put 'undo 'custom-loads '())
+(put 'x 'custom-loads '())
diff -r 4de2936b4e77 -r 0132846995bd lisp/cl/custom-load.el
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lisp/cl/custom-load.el	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,65 @@
+(put 'copyright 'custom-loads '())
+(put 'eldoc 'custom-loads '())
+(put 'execute 'custom-loads '())
+(put 'mouse 'custom-loads '())
+(put 'mail-abbrevs 'custom-loads '())
+(put 'etags 'custom-loads '())
+(put 'limits 'custom-loads '())
+(put 'minibuffer 'custom-loads '())
+(put 'environment 'custom-loads '())
+(put 'sound 'custom-loads '())
+(put 'holidays 'custom-loads '())
+(put 'auto-save 'custom-loads '())
+(put 'ispell 'custom-loads '())
+(put 'fortran-indent 'custom-loads '())
+(put 'lpr 'custom-loads '())
+(put 'message-headers 'custom-loads '())
+(put 'editing-basics 'custom-loads '())
+(put 'internal 'custom-loads '())
+(put 'calendar 'custom-loads '())
+(put 'help-appearance 'custom-loads '())
+(put 'display-time 'custom-loads '())
+(put 'lisp 'custom-loads '())
+(put 'diff 'custom-loads '())
+(put 'paren-matching 'custom-loads '())
+(put 'help 'custom-loads '())
+(put 'local 'custom-loads '())
+(put 'keyboard 'custom-loads '())
+(put 'minubuffer 'custom-loads '())
+(put 'message-sending 'custom-loads '())
+(put 'data 'custom-loads '())
+(put 'ps-print 'custom-loads '())
+(put 'backup 'custom-loads '())
+(put 'frames 'custom-loads '())
+(put 'customize 'custom-loads '())
+(put 'abbrev 'custom-loads '())
+(put 'toolbar 'custom-loads '())
+(put 'compilation 'custom-loads '())
+(put 'dired 'custom-loads '())
+(put 'killing 'custom-loads '())
+(put 'paren-blinking 'custom-loads '())
+(put 'find-file 'custom-loads '())
+(put 'gnuserv 'custom-loads '())
+(put 'maint 'custom-loads '())
+(put 'fill-comments 'custom-loads '())
+(put 'message-mail 'custom-loads '())
+(put 'windows 'custom-loads '())
+(put 'message-various 'custom-loads '())
+(put 'resize-minibuffer 'custom-loads '())
+(put 'fill 'custom-loads '())
+(put 'debug 'custom-loads '())
+(put 'display 'custom-loads '())
+(put 'diary 'custom-loads '())
+(put 'browse-url 'custom-loads '())
+(put 'message-insertion 'custom-loads '())
+(put 'hyper-apropos 'custom-loads '())
+(put 'vc 'custom-loads '())
+(put 'alloc 'custom-loads '())
+(put 'isearch 'custom-loads '())
+(put 'modeline 'custom-loads '())
+(put 'processes-basics 'custom-loads '())
+(put 'editing 'custom-loads '())
+(put 'matching 'custom-loads '())
+(put 'ps-print-color 'custom-loads '())
+(put 'undo 'custom-loads '())
+(put 'x 'custom-loads '())
diff -r 4de2936b4e77 -r 0132846995bd lisp/comint/auto-autoloads.el
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lisp/comint/auto-autoloads.el	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,251 @@
+;;; DO NOT MODIFY THIS FILE
+(if (not (featurep 'comint-autoloads))
+    (progn
+
+;;;### (autoloads (background) "background" "comint/background.el")
+
+(autoload 'background "background" "\
+Run COMMAND in the background like csh.  
+A message is displayed when the job starts and finishes.  The buffer is in
+comint mode, so you can send input and signals to the job.  The process object
+is returned if anyone cares.  See also comint-mode and the variables
+background-show and background-select.
+
+Optional second argument BUFFER-NAME is a buffer to insert the output into.
+If omitted, a buffer name is constructed from the command run." t nil)
+
+;;;***
+
+;;;### (autoloads (comint-dynamic-list-completions comint-dynamic-complete comint-run make-comint) "comint" "comint/comint.el")
+
+(autoload 'make-comint "comint" "\
+Make a comint process NAME in a buffer, running PROGRAM.
+The name of the buffer is made by surrounding NAME with `*'s.
+PROGRAM should be either a string denoting an executable program to create
+via `start-process', or a cons pair of the form (HOST . SERVICE) denoting a TCP
+connection to be opened via `open-network-stream'.  If there is already a
+running process in that buffer, it is not restarted.  Optional third arg
+STARTFILE is the name of a file to send the contents of to the process.
+
+If PROGRAM is a string, any more args are arguments to PROGRAM." nil nil)
+
+(autoload 'comint-run "comint" "\
+Run PROGRAM in a comint buffer and switch to it.
+The buffer name is made by surrounding the file name of PROGRAM with `*'s.
+The file name is used to make a symbol name, such as `comint-sh-hook', and any
+hooks on this symbol are run in the buffer.
+See `make-comint' and `comint-exec'." t nil)
+
+(autoload 'comint-dynamic-complete "comint" "\
+Dynamically perform completion at point.
+Calls the functions in `comint-dynamic-complete-functions' to perform
+completion until a function returns non-nil, at which point completion is
+assumed to have occurred." t nil)
+
+(autoload 'comint-dynamic-list-completions "comint" "\
+List in help buffer sorted COMPLETIONS.
+Typing SPC flushes the help buffer." nil nil)
+
+;;;***
+
+;;;### (autoloads (gdb) "gdb" "comint/gdb.el")
+
+(defvar gdb-command-name "gdb" "\
+Pathname for executing gdb.")
+
+(autoload 'gdb "gdb" "\
+Run gdb on program FILE in buffer *gdb-FILE*.
+The directory containing FILE becomes the initial working directory
+and source-file directory for GDB.  If you wish to change this, use
+the GDB commands `cd DIR' and `directory'." t nil)
+
+;;;***
+
+;;;### (autoloads (gdbsrc) "gdbsrc" "comint/gdbsrc.el")
+
+(autoload 'gdbsrc "gdbsrc" "\
+Activates a gdb session with gdbsrc-mode turned on.  A numeric prefix
+argument can be used to specify a running process to attach, and a non-numeric
+prefix argument will cause you to be prompted for a core file to debug." t nil)
+
+;;;***
+
+;;;### (autoloads (perldb xdb dbx sdb) "gud" "comint/gud.el")
+
+(autoload 'sdb "gud" "\
+Run sdb on program FILE in buffer *gud-FILE*.
+The directory containing FILE becomes the initial working directory
+and source-file directory for your debugger." t nil)
+
+(autoload 'dbx "gud" "\
+Run dbx on program FILE in buffer *gud-FILE*.
+The directory containing FILE becomes the initial working directory
+and source-file directory for your debugger." t nil)
+
+(autoload 'xdb "gud" "\
+Run xdb on program FILE in buffer *gud-FILE*.
+The directory containing FILE becomes the initial working directory
+and source-file directory for your debugger.
+
+You can set the variable 'gud-xdb-directories' to a list of program source
+directories if your program contains sources from more than one directory." t nil)
+
+(autoload 'perldb "gud" "\
+Run perldb on program FILE in buffer *gud-FILE*.
+The directory containing FILE becomes the initial working directory
+and source-file directory for your debugger." t nil)
+
+;;;***
+
+;;;### (autoloads nil "inf-lisp" "comint/inf-lisp.el")
+
+(add-hook 'same-window-buffer-names "*inferior-lisp*")
+
+;;;***
+
+;;;### (autoloads (rlogin) "rlogin" "comint/rlogin.el")
+
+(add-hook 'same-window-regexps "^\\*rlogin-.*\\*\\(\\|<[0-9]+>\\)")
+
+(autoload 'rlogin "rlogin" "\
+Open a network login connection to HOST via the `rlogin' program.
+Input is sent line-at-a-time to the remote connection.
+
+Communication with the remote host is recorded in a buffer `*rlogin-HOST*'
+\(or `*rlogin-USER@HOST*' if the remote username differs).
+If a prefix argument is given and the buffer `*rlogin-HOST*' already exists,
+a new buffer with a different connection will be made.
+
+When called from a program, if the optional second argument is a string or 
+buffer, it names the buffer to use.
+
+The variable `rlogin-program' contains the name of the actual program to
+run.  It can be a relative or absolute path.
+
+The variable `rlogin-explicit-args' is a list of arguments to give to
+the rlogin when starting.  They are added after any arguments given in
+INPUT-ARGS.
+
+If the default value of `rlogin-directory-tracking-mode' is t, then the
+default directory in that buffer is set to a remote (FTP) file name to
+access your home directory on the remote machine.  Occasionally this causes
+an error, if you cannot access the home directory on that machine.  This
+error is harmless as long as you don't try to use that default directory.
+
+If `rlogin-directory-tracking-mode' is neither t nor nil, then the default
+directory is initially set up to your (local) home directory.
+This is useful if the remote machine and your local machine
+share the same files via NFS.  This is the default.
+
+If you wish to change directory tracking styles during a session, use the
+function `rlogin-directory-tracking-mode' rather than simply setting the
+variable." t nil)
+
+;;;***
+
+;;;### (autoloads (shell) "shell" "comint/shell.el")
+
+(defvar shell-prompt-pattern (purecopy "^[^#$%>\n]*[#$%>] *") "\
+Regexp to match prompts in the inferior shell.
+Defaults to \"^[^#$%>\\n]*[#$%>] *\", which works pretty well.
+This variable is used to initialise `comint-prompt-regexp' in the
+shell buffer.
+
+The pattern should probably not match more than one line.  If it does,
+shell-mode may become confused trying to distinguish prompt from input
+on lines which don't start with a prompt.
+
+This is a fine thing to set in your `.emacs' file.")
+
+(autoload 'shell "shell" "\
+Run an inferior shell, with I/O through buffer *shell*.
+If buffer exists but shell process is not running, make new shell.
+If buffer exists and shell process is running, 
+ just switch to buffer `*shell*'.
+Program used comes from variable `explicit-shell-file-name',
+ or (if that is nil) from the ESHELL environment variable,
+ or else from SHELL if there is no ESHELL.
+If a file `~/.emacs_SHELLNAME' exists, it is given as initial input
+ (Note that this may lose due to a timing error if the shell
+  discards input when it starts up.)
+The buffer is put in Shell mode, giving commands for sending input
+and controlling the subjobs of the shell.  See `shell-mode'.
+See also the variable `shell-prompt-pattern'.
+
+The shell file name (sans directories) is used to make a symbol name
+such as `explicit-csh-args'.  If that symbol is a variable,
+its value is used as a list of arguments when invoking the shell.
+Otherwise, one argument `-i' is passed to the shell.
+
+\(Type \\[describe-mode] in the shell buffer for a list of commands.)" t nil)
+
+(add-hook 'same-window-buffer-names "*shell*")
+
+;;;***
+
+;;;### (autoloads (ssh) "ssh" "comint/ssh.el")
+
+(add-hook 'same-window-regexps "^\\*ssh-.*\\*\\(\\|<[0-9]+>\\)")
+
+(autoload 'ssh "ssh" "\
+Open a network login connection via `ssh' with args INPUT-ARGS.
+INPUT-ARGS should start with a host name; it may also contain
+other arguments for `ssh'.
+
+Input is sent line-at-a-time to the remote connection.
+
+Communication with the remote host is recorded in a buffer `*ssh-HOST*'
+\(or `*ssh-USER@HOST*' if the remote username differs).
+If a prefix argument is given and the buffer `*ssh-HOST*' already exists,
+a new buffer with a different connection will be made.
+
+When called from a program, if the optional second argument BUFFER is
+a string or buffer, it specifies the buffer to use.
+
+The variable `ssh-program' contains the name of the actual program to
+run.  It can be a relative or absolute path.
+
+The variable `ssh-explicit-args' is a list of arguments to give to
+the ssh when starting.  They are prepended to any arguments given in
+INPUT-ARGS.
+
+If the default value of `ssh-directory-tracking-mode' is t, then the
+default directory in that buffer is set to a remote (FTP) file name to
+access your home directory on the remote machine.  Occasionally this causes
+an error, if you cannot access the home directory on that machine.  This
+error is harmless as long as you don't try to use that default directory.
+
+If `ssh-directory-tracking-mode' is neither t nor nil, then the default
+directory is initially set up to your (local) home directory.
+This is useful if the remote machine and your local machine
+share the same files via NFS.  This is the default.
+
+If you wish to change directory tracking styles during a session, use the
+function `ssh-directory-tracking-mode' rather than simply setting the
+variable." t nil)
+
+;;;***
+
+;;;### (autoloads (rsh telnet) "telnet" "comint/telnet.el")
+
+(add-hook 'same-window-regexps "\\*telnet-.*\\*\\(\\|<[0-9]+>\\)")
+
+(autoload 'telnet "telnet" "\
+Open a network login connection to host named HOST (a string).
+With a prefix argument, prompts for the port name or number as well.
+Communication with HOST is recorded in a buffer `*HOST-telnet*'.
+Normally input is edited in Emacs and sent a line at a time.
+See also `\\[rsh]'." t nil)
+
+(add-hook 'same-window-regexps "\\*rsh-[^-]*\\*\\(\\|<[0-9]*>\\)")
+
+(autoload 'rsh "telnet" "\
+Open a network login connection to host named HOST (a string).
+Communication with HOST is recorded in a buffer `*rsh-HOST*'.
+Normally input is edited in Emacs and sent a line at a time.
+See also `\\[telnet]'." t nil)
+
+;;;***
+
+(provide 'comint-autoloads)
+))
diff -r 4de2936b4e77 -r 0132846995bd lisp/comint/custom-load.el
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lisp/comint/custom-load.el	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,77 @@
+(put 'copyright 'custom-loads '())
+(put 'eldoc 'custom-loads '())
+(put 'execute 'custom-loads '())
+(put 'mouse 'custom-loads '())
+(put 'mail-abbrevs 'custom-loads '())
+(put 'ssh 'custom-loads '("ssh"))
+(put 'etags 'custom-loads '())
+(put 'limits 'custom-loads '())
+(put 'telnet 'custom-loads '("telnet"))
+(put 'minibuffer 'custom-loads '())
+(put 'environment 'custom-loads '())
+(put 'shell 'custom-loads '("shell"))
+(put 'sound 'custom-loads '())
+(put 'holidays 'custom-loads '())
+(put 'comint-completion 'custom-loads '("comint"))
+(put 'auto-save 'custom-loads '())
+(put 'ispell 'custom-loads '())
+(put 'fortran-indent 'custom-loads '())
+(put 'comint 'custom-loads '("comint-xemacs" "comint" "telnet"))
+(put 'lpr 'custom-loads '())
+(put 'message-headers 'custom-loads '())
+(put 'editing-basics 'custom-loads '())
+(put 'internal 'custom-loads '())
+(put 'calendar 'custom-loads '())
+(put 'help-appearance 'custom-loads '())
+(put 'display-time 'custom-loads '())
+(put 'lisp 'custom-loads '())
+(put 'rlogin 'custom-loads '("rlogin"))
+(put 'diff 'custom-loads '())
+(put 'shell-faces 'custom-loads '("shell"))
+(put 'paren-matching 'custom-loads '())
+(put 'help 'custom-loads '())
+(put 'local 'custom-loads '())
+(put 'keyboard 'custom-loads '())
+(put 'minubuffer 'custom-loads '())
+(put 'message-sending 'custom-loads '())
+(put 'data 'custom-loads '())
+(put 'ps-print 'custom-loads '())
+(put 'backup 'custom-loads '())
+(put 'frames 'custom-loads '())
+(put 'customize 'custom-loads '())
+(put 'shell-directories 'custom-loads '("shell"))
+(put 'abbrev 'custom-loads '())
+(put 'toolbar 'custom-loads '())
+(put 'compilation 'custom-loads '())
+(put 'dired 'custom-loads '())
+(put 'comint-source 'custom-loads '("comint"))
+(put 'killing 'custom-loads '())
+(put 'paren-blinking 'custom-loads '())
+(put 'find-file 'custom-loads '())
+(put 'gnuserv 'custom-loads '())
+(put 'maint 'custom-loads '())
+(put 'fill-comments 'custom-loads '())
+(put 'message-mail 'custom-loads '())
+(put 'windows 'custom-loads '())
+(put 'message-various 'custom-loads '())
+(put 'resize-minibuffer 'custom-loads '())
+(put 'fill 'custom-loads '())
+(put 'debug 'custom-loads '())
+(put 'display 'custom-loads '())
+(put 'diary 'custom-loads '())
+(put 'browse-url 'custom-loads '())
+(put 'processes 'custom-loads '("background" "comint" "rlogin" "shell" "ssh"))
+(put 'message-insertion 'custom-loads '())
+(put 'hyper-apropos 'custom-loads '())
+(put 'background 'custom-loads '("background"))
+(put 'vc 'custom-loads '())
+(put 'alloc 'custom-loads '())
+(put 'isearch 'custom-loads '())
+(put 'modeline 'custom-loads '())
+(put 'processes-basics 'custom-loads '())
+(put 'editing 'custom-loads '())
+(put 'matching 'custom-loads '())
+(put 'ps-print-color 'custom-loads '())
+(put 'unix 'custom-loads '("rlogin" "shell" "ssh"))
+(put 'undo 'custom-loads '())
+(put 'x 'custom-loads '())
diff -r 4de2936b4e77 -r 0132846995bd lisp/custom/ChangeLog
--- a/lisp/custom/ChangeLog	Mon Aug 13 09:42:28 2007 +0200
+++ b/lisp/custom/ChangeLog	Mon Aug 13 09:43:35 2007 +0200
@@ -1,5 +1,246 @@
+Sat Jun 21 21:10:57 1997  Per Abrahamsen  <abraham@dina.kvl.dk>
+
+	* Version 1.9931 released.
+
+Sat Jun 21 14:41:02 1997  Per Abrahamsen  <abraham@dina.kvl.dk>
+
+	* face.xpm: New file.
+	* option.xpm: New file.
+	* folder.xpm: New file.
+	* Makefile (TEXT): Added.
+	* wid-edit.el (widget-push-button-value-create): Use :tag-glyph.
+	(widget-glyph-insert-glyph): Accept nil widget.
+	* cus-edit.el (custom-tree-group-tag): Specify :tag-glyph.
+	(custom-tree-variable-tag): Ditto.
+	(custom-tree-face-tag): Ditto.
+
+	* Version 1.9930 released.
+
+Sat Jun 21 03:01:17 1997  Per Abrahamsen  <abraham@dina.kvl.dk>
+
+	* all: Synched with FSF.
+
+	* cus-edit.el (custom-buffer-indent): New option.
+	(custom-magic-value-create): Use it.
+	(custom-group-value-create): Ditto.
+	(custom-buffer-create-internal): Don't create parent groups here.
+	(custom-group-list): New variable.
+	(custom-add-parent-links): New function.
+	(custom-variable-value-create): Use it.
+	(custom-face-value-create): Use it.
+	(custom-group-value-create): Use it.
+	(custom-buffer-groups-last): Changed default.
+
+	* wid-edit.el (group-visibility): Deleted.
+	(widget-group-visibility-create): Ditto.
+	(group-link): Deleted.
+	(widget-group-link-create): Ditto.
+	(widget-group-link-action): Ditto.
+
+	* cus-edit.el (custom-nest-groups): Delete option.
+	(custom-buffer-style): Add `links' style instead.
+	(custom-group-link): New widget.
+	(custom-group-link-action): New function.
+	(custom-group-value-create): Use `custom-group-link'.
+
+	* wid-edit.el (widget-before-change): Fixed comment and debug
+	string. 
+
+	* cus-edit.el (custom-mode-customize-menu): Deleted.
+	(custom-mode-menu): Define here.
+	(custom-mode): Don't add here.
+	(custom-format-handler): Deleted.
+	(custom): Don't add here.
+
+	* all: Synched with FSF.
+	
+	* Version 1.9929 released.
+
+Sat Jun 21 02:05:08 1997  Per Abrahamsen  <abraham@dina.kvl.dk>
+
+	* cus-edit.el (custom-browse-sort-predicate): New alias.
+	(custom-group-value-create): Use it.
+	(:custom-last): Replace :custom-extra-prefix.
+	(customize-browse): Use it.
+	(custom-group): Ditto.
+	(custom-group-value-create): Ditto.
+
+	* Version 1.9928 released.
+
+Sat Jun 21 01:35:04 1997  Per Abrahamsen  <abraham@dina.kvl.dk>
+
+	* cus-edit.el (face): Fixed format.
+	(custom-face-value-create): Browse face, not option.
+
+	* Version 1.9927 released.
+
+Sat Jun 21 00:03:48 1997  Per Abrahamsen  <abraham@dina.kvl.dk>
+
+	* cus-edit.el (custom-group-value-create): Rewrote to replace
+	entire format string. 
+	(custom-variable-value-create): Ditto.
+	(custom-face-value-create): Ditto.
+	(custom-group): Delete :format.
+	(custom-variable): Ditto.
+	(custom-face): Delete :format and :format-handler.
+	(custom): Add :format.
+	(custom-format-handler): Removed unnecessary code.
+	(custom-face-format-handler): Deleted.
+	(custom-add-see-also): New function.
+	(custom-buffer-style): New option.
+	(widget-face-value-create): Use it here instead of :format.
+	(:custom-prefix, :custom-extra-prefix): New keywords.
+	(custom): Initialize them.
+	(custom-redraw-magic): Work with no magic button.
+	(customize-browse): New command.
+	(custom-tree-visibility): New widget.
+	(custom-tree-visibility-action): New function.
+	(custom-tree-group-tag): New widget.
+	(custom-tree-group-tag-action): New function.
+	(custom-tree-group-tag): New widget.
+	(custom-tree-group-tag-action): New function.
+	(custom-tree-variable-tag): New widget.
+	(custom-tree-variable-tag-action): New function.
+	(custom-tree-face-tag): New widget.
+	(custom-tree-face-tag-action): New function.
+
+	* custom.el (customize-browse): Added autoload.
+
+	* cus-edit.el (custom-buffer-sort-alphabetically): New option.
+	(custom-buffer-groups-last): New option.
+	(custom-buffer-sort-predicate): Use them.
+	(customize-apropos): Use it.
+	(custom-group-value-create): Ditto.
+	(custom-menu-sort-alphabetically): New option.
+	(custom-menu-groups-first): New option.
+	(custom-menu-sort-predicate): Use them.
+	(custom-menu-create): Use it.
+	(custom-buffer-sort-predicate, custom-buffer-order-predicate,
+	custom-menu-sort-predicate, custom-menu-order-predicate): Deleted.
+
+Thu Jun 19 17:29:05 1997  Per Abrahamsen  <abraham@dina.kvl.dk>
+
+	* Version 1.9926 released.
+
+Thu Jun 19 13:31:08 1997  Per Abrahamsen  <abraham@dina.kvl.dk>
+
+	* wid-edit.el (widget-leave-text): Don't delete nil overlays.
+
+	* wid-edit.el (widget-get-indirect): New function.
+	(widget-default-create): Use it.
+	(widget-button-insert-indirect): Deleted.
+
+	* wid-edit.el (widget-inactive-face): Use dim gray instead of dark
+	gray.
+
+	* Version 1.9925 released.
+
+Thu Jun 19 12:09:32 1997  Per Abrahamsen  <abraham@dina.kvl.dk>
+
+	* Synched with FSF.
+
+	* Version 1.9924 released.
+
+Thu Jun 19 11:05:38 1997  Per Abrahamsen  <abraham@dina.kvl.dk>
+
+	* cus-edit.el (customize-apropos): Always sort apropos.
+	Patch by Simon Marshall <Simon.Marshall@esrin.esa.it>.
+
+	* Version 1.9923 released.
+
+Thu Jun 19 10:59:26 1997  Per Abrahamsen  <abraham@dina.kvl.dk>
+
+	* cus-edit.el (custom-reset-saved): Call :custom-reset-saved.
+	(custom-reset-standard): Call :custom-reset-standard.
+
+	* Version 1.9922 released.
+
+1997-06-18  Steven L Baur  <steve@altair.xemacs.org>
+
+	* cus-edit.el (custom-file): Autoload, and use ~/.xemacs-custom
+	for XEmacs.
+
+Wed Jun 18 18:37:00 1997  Per Abrahamsen  <abraham@dina.kvl.dk>
+
+	* cus-edit.el (custom-buffer-create-internal): Change parent tag.
+
+	* Version 1.9921 released.
+
+	* cus-edit.el (custom-buffer-create-internal): Add links to parent
+	groups when there is only a single item in the buffer.
+
+Wed Jun 18 13:49:20 1997  Simon Marshall  <simon@gnu.ai.mit.edu>
+
+	* cus-edit.el (customize-apropos): Extend ALL arg to restrict
+	apropos to options, groups and faces.  Doc fix.
+	(customize-apropos-options):
+	(customize-apropos-faces):
+	(customize-apropos-groups): New commands.  Call it.
+	(custom-help-menu): Add commands to menu.
+
+Mon Jun 16 11:57:14 1997  Per Abrahamsen  <abraham@dina.kvl.dk>
+
+	* wid-edit.el (widget-documentation-link-add): Only highlight text
+	inside link. 
+	Patch by Simon Marshall <Simon.Marshall@esrin.esa.it>.
+
+1997-06-16  Hrvoje Niksic  <hniksic@srce.hr>
+
+	* wid-edit.el (widget-specify-field): Place unreadable
+ 	text-property correctly when `widget-field-add-space' is non-nil.
+
+Sun Jun 15 17:21:34 1997  Per Abrahamsen  <abraham@dina.kvl.dk>
+
+	* all: Synched with FSF.
+
+	* Version 1.9920 released.
+
+Sun Jun 15 14:06:49 1997  Per Abrahamsen  <abraham@dina.kvl.dk>
+
+	* cus-edit.el (custom-variable-menu): Rearranged lisp support.
+	(custom-face-menu): Ditto.
+
+	* wid-edit.el (boolean): Add explicit toggle button.
+	(choice): Add explicit value menu button.
+	* cus-face.el (custom-face-attributes): Use booleans.
+
+	* cus-edit.el (custom-format-handler): Handle %i escape.
+	(custom-face): Use it.
+	(custom-magic-value-create): Add spaces for groups.
+	(custom-format-handler): Add spaces for groups.
+
+	* widget.el (:documentation-indent): New keyword.
+	* wid-edit.el (widget-default-format-handler): Obey it.
+	(widget-documentation-link-add): Add indentation.
+	(widget-documentation-string-value-create): Ditto.
+
+	* Version 1.9919 released.
+
+Sun Jun 15 13:02:02 1997  Per Abrahamsen  <abraham@dina.kvl.dk>
+
+	* cus-edit.el (widget-glyph-insert-glyph): Make the invisible
+	extent open ended.
+
+	* cus-edit.el (custom-format-handler): Added :echo-help to
+	visibility widget.
+	(custom-variable-value-create): Ditto, also for tag.
+	* wid-edit.el (widget-documentation-string-value-create): Ditto.
+	(widget-documentation-link-help-echo): New function.
+	(documentation-link): Use it.  Make untabable.
+
+Sat Jun 14 21:57:49 1997  Per Abrahamsen  <abraham@dina.kvl.dk>
+
+	* Version 1.9918 released.
+
 Sat Jun 14 21:31:09 1997  Per Abrahamsen  <abraham@dina.kvl.dk>
 
+	* wid-edit.el (widget-apply-action): Don't bind
+	`after-change-functions' here.
+
+	* cus-edit.el (custom-toggle-hide): Call `widget-setup'.
+
+	* wid-edit.el (widget-setup): Cleanup.
+
 	* Version 1.9916 released.
 
 Sat Jun 14 18:24:36 1997  Per Abrahamsen  <abraham@dina.kvl.dk>
diff -r 4de2936b4e77 -r 0132846995bd lisp/custom/auto-autoloads.el
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lisp/custom/auto-autoloads.el	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,181 @@
+;;; DO NOT MODIFY THIS FILE
+(if (not (featurep 'custom-autoloads))
+    (progn
+
+;;;### (autoloads (customize-menu-create custom-menu-create custom-save-all custom-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 custom-set-variable custom-set-value) "cus-edit" "custom/cus-edit.el")
+
+(autoload 'custom-set-value "cus-edit" "\
+Set VARIABLE to VALUE.  VALUE is a Lisp object.
+
+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 'custom-set-variable "cus-edit" "\
+Set the default for VARIABLE to VALUE.  VALUE is a Lisp object.
+
+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\".
+Initially the top-level group `Emacs' and its immediate subgroups
+are shown; the contents of those subgroups are initially hidden." t nil)
+
+(autoload 'customize-group "cus-edit" "\
+Customize GROUP, which must be a customization group." t nil)
+
+(autoload 'customize-group-other-window "cus-edit" "\
+Customize SYMBOL, which must be a customization group." t nil)
+
+(defalias 'customize-variable 'customize-option)
+
+(autoload 'customize-option "cus-edit" "\
+Customize SYMBOL, which must be a user option variable." t nil)
+
+(defalias 'customize-variable-other-window 'customize-option-other-window)
+
+(autoload 'customize-option-other-window "cus-edit" "\
+Customize SYMBOL, which must be a user option variable.
+Show the buffer in another window, but don't select it." t nil)
+
+(autoload 'customize-face "cus-edit" "\
+Customize SYMBOL, which should be a face name or nil.
+If SYMBOL is nil, customize all faces." t nil)
+
+(autoload 'customize-face-other-window "cus-edit" "\
+Show customization buffer for FACE in other window." t nil)
+
+(autoload 'customize-customized "cus-edit" "\
+Customize all user options set since the last save in this session." t nil)
+
+(autoload 'customize-saved "cus-edit" "\
+Customize all already saved user options." t nil)
+
+(autoload 'customize-apropos "cus-edit" "\
+Customize all user options matching REGEXP.
+If ALL is `options', include only options.
+If ALL is `faces', include only faces.
+If ALL is `groups', include only groups.
+If ALL is t (interactively, with prefix arg), include options which are not
+user-settable, as well as faces and groups." t nil)
+
+(autoload 'customize-apropos-options "cus-edit" "\
+Customize all user options matching REGEXP.
+With prefix arg, include options which are not user-settable." t nil)
+
+(autoload 'customize-apropos-faces "cus-edit" "\
+Customize all user faces matching REGEXP." t nil)
+
+(autoload 'customize-apropos-groups "cus-edit" "\
+Customize all user groups matching REGEXP." t nil)
+
+(autoload 'custom-buffer-create "cus-edit" "\
+Create a buffer containing OPTIONS.
+Optional NAME is the name of the buffer.
+OPTIONS should be an alist of the form ((SYMBOL WIDGET)...), where
+SYMBOL is a customization option, and WIDGET is a widget for editing
+that option." nil nil)
+
+(autoload 'custom-buffer-create-other-window "cus-edit" "\
+Create a buffer containing OPTIONS.
+Optional NAME is the name of the buffer.
+OPTIONS should be an alist of the form ((SYMBOL WIDGET)...), where
+SYMBOL is a customization option, and WIDGET is a widget for editing
+that option." nil nil)
+
+(autoload 'customize-browse "cus-edit" "\
+Create a tree browser for the customize hierarchy." t nil)
+
+(defcustom custom-file (if (featurep 'xemacs) "~/.xemacs-custom" "~/.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 'custom-save-customized "cus-edit" "\
+Save all user options which have been set in this session." t nil)
+
+(autoload 'custom-save-all "cus-edit" "\
+Save all customizations in `custom-file'." nil nil)
+
+(autoload 'custom-menu-create "cus-edit" "\
+Create menu for customization group SYMBOL.
+The menu is in a format applicable to `easy-menu-define'." nil nil)
+
+(autoload 'customize-menu-create "cus-edit" "\
+Return a customize menu for customization group SYMBOL.
+If optional NAME is given, use that as the name of the menu. 
+Otherwise the menu will be named `Customize'.
+The format is suitable for use with `easy-menu-define'." nil nil)
+
+;;;***
+
+;;;### (autoloads (custom-set-faces custom-initialize-frame custom-declare-face) "cus-face" "custom/cus-face.el")
+
+(autoload 'custom-declare-face "cus-face" "\
+Like `defface', but FACE is evaluated as a normal argument." nil nil)
+
+(autoload 'custom-initialize-frame "cus-face" "\
+Initialize local faces for FRAME if necessary.
+If FRAME is missing or nil, the first member of (frame-list) is used." nil nil)
+
+(autoload 'custom-set-faces "cus-face" "\
+Initialize faces according to user preferences.
+The arguments should be a list where each entry has the form:
+
+  (FACE SPEC [NOW])
+
+SPEC will be stored as the saved value for FACE.  If NOW is present
+and non-nil, FACE will also be created according to SPEC.
+
+See `defface' for the format of SPEC." nil nil)
+
+;;;***
+
+;;;### (autoloads (widget-minor-mode widget-browse-other-window widget-browse widget-browse-at) "wid-browse" "custom/wid-browse.el")
+
+(autoload 'widget-browse-at "wid-browse" "\
+Browse the widget under point." t nil)
+
+(autoload 'widget-browse "wid-browse" "\
+Create a widget browser for WIDGET." t nil)
+
+(autoload 'widget-browse-other-window "wid-browse" "\
+Show widget browser for WIDGET in other window." t nil)
+
+(autoload 'widget-minor-mode "wid-browse" "\
+Togle minor mode for traversing widgets.
+With arg, turn widget mode on if and only if arg is positive." t nil)
+
+;;;***
+
+;;;### (autoloads (widget-delete widget-create widget-prompt-value widget-apply) "wid-edit" "custom/wid-edit.el")
+
+(autoload 'widget-apply "wid-edit" "\
+Apply the value of WIDGET's PROPERTY to the widget itself.
+ARGS are passed as extra arguments to the function." nil nil)
+
+(autoload 'widget-prompt-value "wid-edit" "\
+Prompt for a value matching WIDGET, using PROMPT.
+The current value is assumed to be VALUE, unless UNBOUND is non-nil." nil nil)
+
+(autoload 'widget-create "wid-edit" "\
+Create widget of TYPE.  
+The optional ARGS are additional keyword arguments." nil nil)
+
+(autoload 'widget-delete "wid-edit" "\
+Delete WIDGET." nil nil)
+
+;;;***
+
+(provide 'custom-autoloads)
+))
diff -r 4de2936b4e77 -r 0132846995bd lisp/custom/cus-edit.el
--- a/lisp/custom/cus-edit.el	Mon Aug 13 09:42:28 2007 +0200
+++ b/lisp/custom/cus-edit.el	Mon Aug 13 09:43:35 2007 +0200
@@ -4,7 +4,7 @@
 ;;
 ;; Author: Per Abrahamsen <abraham@dina.kvl.dk>
 ;; Keywords: help, faces
-;; Version: 1.9916
+;; Version: 1.9931
 ;; X-URL: http://www.dina.kvl.dk/~abraham/custom/
 
 ;; This file is part of GNU Emacs.
@@ -45,7 +45,8 @@
     (require 'cus-start)
   (error nil))
 
-(define-widget-keywords :custom-category :custom-prefixes :custom-menu
+(define-widget-keywords :custom-last :custom-prefix :custom-category
+  :custom-prefixes :custom-menu  
   :custom-show  
   :custom-magic :custom-state :custom-level :custom-form
   :custom-set :custom-save :custom-reset-current :custom-reset-saved 
@@ -209,6 +210,10 @@
   "Support editing files of data."
   :group 'emacs)
 
+(defgroup files nil
+  "Support editing files."
+  :group 'emacs)
+
 (defgroup wp nil
   "Word processing."
   :group 'emacs)
@@ -323,7 +328,7 @@
 
 (defgroup auto-save nil
   "Preventing accidential loss of data."
-  :group 'data)
+  :group 'files)
 
 (defgroup processes-basics nil
   "Basic stuff dealing with processes."
@@ -339,6 +344,18 @@
 
 ;;; Utilities.
 
+(defun custom-last (x &optional n)
+  ;; Stolen from `cl.el'.
+  "Returns the last link in the list LIST.
+With optional argument N, returns Nth-to-last link (default 1)."
+  (if n
+      (let ((m 0) (p x))
+	(while (consp p) (incf m) (pop p))
+	(if (<= n 0) p
+	  (if (< n m) (nthcdr (- m n) x) x)))
+    (while (consp (cdr x)) (pop x))
+    x))
+
 (defun custom-quote (sexp)
   "Quote SEXP iff it is not self quoting."
   (if (or (memq sexp '(t nil))
@@ -528,59 +545,55 @@
 
 ;;; Sorting.
 
-(defcustom custom-buffer-sort-predicate 'ignore
-  "Function used for sorting group members in buffers.
-The value should be useful as a predicate for `sort'.  
-The list to be sorted is the value of the groups `custom-group' property."
-  :type '(radio (const :tag "Unsorted" ignore)
-		(const :tag "Alphabetic" custom-sort-items-alphabetically)
-		(function :tag "Other"))
+(defcustom custom-buffer-sort-alphabetically nil
+  "If non-nil, sort the members of each customization group alphabetically."
+  :type 'boolean
   :group 'custom-buffer)
 
-(defcustom custom-buffer-order-predicate 'custom-sort-groups-last
-  "Function used for sorting group members in buffers.
-The value should be useful as a predicate for `sort'.  
-The list to be sorted is the value of the groups `custom-group' property."
-  :type '(radio (const :tag "Groups first" custom-sort-groups-first)
-		(const :tag "Groups last" custom-sort-groups-last)
-		(function :tag "Other"))
+(defcustom custom-buffer-groups-last nil
+  "If non-nil, put subgroups after all ordinary options within a group."
+  :type 'boolean
   :group 'custom-buffer)
 
-(defcustom custom-menu-sort-predicate 'ignore
-  "Function used for sorting group members in menus.
-The value should be useful as a predicate for `sort'.  
-The list to be sorted is the value of the groups `custom-group' property."
-  :type '(radio (const :tag "Unsorted" ignore)
-		(const :tag "Alphabetic" custom-sort-items-alphabetically)
-		(function :tag "Other"))
+(defcustom custom-menu-sort-alphabetically nil
+  "If non-nil, sort the members of each customization group alphabetically."
+  :type 'boolean
+  :group 'custom-menu)
+
+(defcustom custom-menu-groups-first t
+  "If non-nil, put subgroups before all ordinary options within a group."
+  :type 'boolean
   :group 'custom-menu)
 
-(defcustom custom-menu-order-predicate 'custom-sort-groups-first
-  "Function used for sorting group members in menus.
-The value should be useful as a predicate for `sort'.  
-The list to be sorted is the value of the groups `custom-group' property."
-  :type '(radio (const :tag "Groups first" custom-sort-groups-first)
-		(const :tag "Groups last" custom-sort-groups-last)
-		(function :tag "Other"))
-  :group 'custom-menu)
-
-(defun custom-sort-items-alphabetically (a b)
-  "Return t iff A is alphabetically before B and the same custom type.
+(defun custom-buffer-sort-predicate (a b)
+  "Return t iff A should come before B in a customization buffer.
 A and B should be members of a `custom-group' property."
-  (and (eq (nth 1 a) (nth 1 b))
-       (string-lessp (symbol-name (nth 0 a)) (symbol-name (nth 0 b)))))
+  (cond ((and (not custom-buffer-groups-last)
+	      (not custom-buffer-sort-alphabetically))
+	 nil)
+	((or (eq (eq (nth 1 a) 'custom-group) (eq (nth 1 b) 'custom-group))
+	     (not custom-buffer-groups-last))
+	 (if custom-buffer-sort-alphabetically
+	     (string-lessp (symbol-name (nth 0 a)) (symbol-name (nth 0 b)))
+	   nil))
+	(t
+	 (not (eq (nth 1 a) 'custom-group) ))))
 
-(defun custom-sort-groups-first (a b)
-  "Return t iff A a custom group and B is a not.
+(defalias 'custom-browse-sort-predicate 'ignore)
+
+(defun custom-menu-sort-predicate (a b)
+  "Return t iff A should come before B in a customization menu.
 A and B should be members of a `custom-group' property."
-  (and (eq (nth 1 a) 'custom-group)
-       (not (eq (nth 1 b) 'custom-group))))
-
-(defun custom-sort-groups-last (a b)
-  "Return t iff B a custom group and A is a not.
-A and B should be members of a `custom-group' property."
-  (and (eq (nth 1 b) 'custom-group)
-       (not (eq (nth 1 a) 'custom-group))))
+  (cond ((and (not custom-menu-groups-first)
+	      (not custom-menu-sort-alphabetically))
+	 nil)
+	((or (eq (eq (nth 1 a) 'custom-group) (eq (nth 1 b) 'custom-group))
+	     (not custom-menu-groups-first))
+	 (if custom-menu-sort-alphabetically
+	     (string-lessp (symbol-name (nth 0 a)) (symbol-name (nth 0 b)))
+	   nil))
+	(t
+	 (eq (nth 1 a) 'custom-group) )))
 
 ;;; Custom Mode Commands.
 
@@ -639,7 +652,7 @@
   (let ((children custom-options))
     (mapcar (lambda (child)
 	      (when (eq (widget-get child :custom-state) 'modified)
-		(widget-apply child :custom-reset-current)))
+		(widget-apply child :custom-reset-saved)))
 	    children)))
 
 (defun custom-reset-standard (&rest ignore)
@@ -648,7 +661,7 @@
   (let ((children custom-options))
     (mapcar (lambda (child)
 	      (when (eq (widget-get child :custom-state) 'modified)
-		(widget-apply child :custom-reset-current)))
+		(widget-apply child :custom-reset-standard)))
 	    children)))
 
 ;;; The Customize Commands
@@ -733,19 +746,23 @@
 ;;;###autoload
 (defun customize-group (group)
   "Customize GROUP, which must be a customization group."
-  (interactive (list (completing-read "Customize group: (default emacs) "
-				      obarray 
-				      (lambda (symbol)
-					(get symbol 'custom-group))
-				      t)))
+  (interactive (list (let ((completion-ignore-case t))
+		       (completing-read "Customize group: (default emacs) "
+					obarray 
+					(lambda (symbol)
+					  (get symbol 'custom-group))
+					t))))
 
   (when (stringp group)
     (if (string-equal "" group)
 	(setq group 'emacs)
       (setq group (intern group))))
-  (custom-buffer-create (list (list group 'custom-group))
-			(format "*Customize Group: %s*"
-				(custom-unlispify-tag-name group))))
+  (let ((name (format "*Customize Group: %s*"
+		      (custom-unlispify-tag-name group))))
+    (if (get-buffer name)
+	(switch-to-buffer name)
+      (custom-buffer-create (list (list group 'custom-group))
+			    name))))
 
 ;;;###autoload
 (defun customize-group-other-window (symbol)
@@ -797,10 +814,10 @@
       (let ((found nil))
 	(message "Looking for faces...")
 	(mapcar (lambda (symbol)
-		  (setq found (cons (list symbol 'custom-face) found)))
-		(nreverse (mapcar 'intern 
+		  (push (list symbol 'custom-face) found))
+		(nreverse (mapcar 'intern
 				  (sort (mapcar 'symbol-name (face-list))
-					'string<))))
+					'string-lessp))))
 			
 	(custom-buffer-create found "*Customize Faces*"))
     (if (stringp symbol)
@@ -834,11 +851,10 @@
     (mapatoms (lambda (symbol)
 		(and (get symbol 'customized-face)
 		     (custom-facep symbol)
-		     (setq found (cons (list symbol 'custom-face) found)))
+		     (push (list symbol 'custom-face) found))
 		(and (get symbol 'customized-value)
 		     (boundp symbol)
-		     (setq found
-			   (cons (list symbol 'custom-variable) found)))))
+		     (push (list symbol 'custom-variable) found))))
     (if found 
 	(custom-buffer-create found "*Customize Customized*")
       (error "No customized user options"))))
@@ -851,11 +867,10 @@
     (mapatoms (lambda (symbol)
 		(and (get symbol 'saved-face)
 		     (custom-facep symbol)
-		     (setq found (cons (list symbol 'custom-face) found)))
+		     (push (list symbol 'custom-face) found))
 		(and (get symbol 'saved-value)
 		     (boundp symbol)
-		     (setq found
-			   (cons (list symbol 'custom-variable) found)))))
+		     (push (list symbol 'custom-variable) found))))
     (if found 
 	(custom-buffer-create found "*Customize Saved*")
       (error "No saved user options"))))
@@ -863,30 +878,71 @@
 ;;;###autoload
 (defun customize-apropos (regexp &optional all)
   "Customize all user options matching REGEXP.
-If ALL (e.g., started with a prefix key), include options which are not
-user-settable."
+If ALL is `options', include only options.
+If ALL is `faces', include only faces.
+If ALL is `groups', include only groups.
+If ALL is t (interactively, with prefix arg), include options which are not
+user-settable, as well as faces and groups."
   (interactive "sCustomize regexp: \nP")
   (let ((found nil))
     (mapatoms (lambda (symbol)
 		(when (string-match regexp (symbol-name symbol))
-		  (when (get symbol 'custom-group)
-		    (setq found (cons (list symbol 'custom-group) found)))
-		  (when (custom-facep symbol)
-		    (setq found (cons (list symbol 'custom-face) found)))
-		  (when (and (boundp symbol)
+		  (when (and (not (memq all '(faces options)))
+			     (get symbol 'custom-group))
+		    (push (list symbol 'custom-group) found))
+		  (when (and (not (memq all '(options groups)))
+			     (custom-facep symbol))
+		    (push (list symbol 'custom-face) found))
+		  (when (and (not (memq all '(groups faces)))
+			     (boundp symbol)
 			     (or (get symbol 'saved-value)
 				 (get symbol 'standard-value)
-				 (if all
-				     (get symbol 'variable-documentation)
-				   (user-variable-p symbol))))
-		    (setq found
-			  (cons (list symbol 'custom-variable) found))))))
-    (if found 
-	(custom-buffer-create found "*Customize Apropos*")
-      (error "No matches"))))
+				 (if (memq all '(nil options))
+				     (user-variable-p symbol)
+				   (get symbol 'variable-documentation))))
+		    (push (list symbol 'custom-variable) found)))))
+    (if (not found)
+	(error "No matches")
+      (let ((custom-buffer-sort-alphabetically t))
+	(custom-buffer-create (sort found 'custom-buffer-sort-predicate)
+			      "*Customize Apropos*")))))
+
+;;;###autoload
+(defun customize-apropos-options (regexp &optional arg)
+  "Customize all user options matching REGEXP.
+With prefix arg, include options which are not user-settable."
+  (interactive "sCustomize regexp: \nP")
+  (customize-apropos regexp (or arg 'options)))
+
+;;;###autoload
+(defun customize-apropos-faces (regexp)
+  "Customize all user faces matching REGEXP."
+  (interactive "sCustomize regexp: \n")
+  (customize-apropos regexp 'faces))
+
+;;;###autoload
+(defun customize-apropos-groups (regexp)
+  "Customize all user groups matching REGEXP."
+  (interactive "sCustomize regexp: \n")
+  (customize-apropos regexp 'groups))
 
 ;;; Buffer.
 
+(defcustom custom-buffer-style 'links
+  "Control the presentation style for customization buffers.
+The value should be a symbol, one of:
+
+brackets: groups nest within each other with big horizontal brackets.
+links: groups have links to subgroups."
+  :type '(radio (const brackets)
+		(const links))
+  :group 'custom-buffer)
+
+(defcustom custom-buffer-indent 3
+  "Number of spaces to indent nested groups."
+  :type 'integer
+  :group 'custom-buffer)
+
 ;;;###autoload
 (defun custom-buffer-create (options &optional name)
   "Create a buffer containing OPTIONS.
@@ -1002,13 +1058,90 @@
 		      options))))
   (unless (eq (preceding-char) ?\n)
     (widget-insert "\n"))
-  (message "Creating customization magic...")
-  (mapcar 'custom-magic-reset custom-options)
+  (unless (eq custom-buffer-style 'tree)
+    (mapcar 'custom-magic-reset custom-options))
   (message "Creating customization setup...")
   (widget-setup)
   (goto-char (point-min))
   (message "Creating customization buffer...done"))
 
+;;; The Tree Browser.
+
+;;;###autoload
+(defun customize-browse ()
+  "Create a tree browser for the customize hierarchy."
+  (interactive)
+  (let ((name "*Customize Browser*"))
+    (kill-buffer (get-buffer-create name))
+    (switch-to-buffer (get-buffer-create name)))
+  (custom-mode)
+  (widget-insert "\
+Invoke [+] 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")
+  (let ((custom-buffer-style 'tree))
+    (widget-create 'custom-group 
+		   :custom-last t
+		   :custom-state 'unknown
+		   :tag (custom-unlispify-tag-name 'emacs)
+		   :value 'emacs))
+  (goto-char (point-min)))
+
+(define-widget 'custom-tree-visibility 'item
+  "Control visibility of of items in the customize tree browser."
+  :format "%[[%t]%]"
+  :action 'custom-tree-visibility-action)
+
+(defun custom-tree-visibility-action (widget &rest ignore)
+  (let ((custom-buffer-style 'tree))
+    (custom-toggle-parent widget)))
+
+(define-widget 'custom-tree-group-tag 'push-button
+  "Show parent in other window when activated."
+  :tag "group"
+  :tag-glyph "folder"
+  :action 'custom-tree-group-tag-action)
+
+(defun custom-tree-group-tag-action (widget &rest ignore)
+  (let ((parent (widget-get widget :parent)))
+    (customize-group-other-window (widget-value parent))))
+
+(define-widget 'custom-tree-variable-tag 'push-button
+  "Show parent in other window when activated."
+  :tag "option"
+  :tag-glyph "option"
+  :action 'custom-tree-variable-tag-action)
+
+(defun custom-tree-variable-tag-action (widget &rest ignore)
+  (let ((parent (widget-get widget :parent)))
+    (customize-variable-other-window (widget-value parent))))
+
+(define-widget 'custom-tree-face-tag 'push-button
+  "Show parent in other window when activated."
+  :tag "face"
+  :tag-glyph "face"
+  :action 'custom-tree-face-tag-action)
+
+(defun custom-tree-face-tag-action (widget &rest ignore)
+  (let ((parent (widget-get widget :parent)))
+    (customize-face-other-window (widget-value parent))))
+
+(defconst custom-tree-alist '(("   " "space")
+			      (" | " "vertical")
+			      (" |-" "middle")
+			      (" `-" "bottom")))
+
+(defun custom-tree-insert (prefix)
+  "Insert PREFIX.  On XEmacs convert it to line graphics."
+  (if nil ;(string-match "XEmacs" emacs-version)
+      (while (not (string-equal prefix ""))
+	(let ((entry (substring prefix 0 3)))
+	  (setq prefix (substring prefix 3))
+	  (widget-specify-insert
+	   (widget-glyph-insert nil entry
+				(nth 1 (assoc entry custom-tree-alist))))))
+    (insert prefix)))
+
 ;;; Modification of Basic Widgets.
 ;;
 ;; We add extra properties to the basic widgets needed here.  This is
@@ -1086,8 +1219,8 @@
 			       (unknown "?" italic "\
 unknown, you should not see this.")
 			       (hidden "-" default "\
-hidden, invoke the dots above to show." "\
-group now hidden, invoke the dots above to show contents.")
+hidden, invoke \"Show\" in the previous line to show." "\
+group now hidden, invoke \"Show\", above, to show contents.")
 			       (invalid "x" custom-invalid-face "\
 the value displayed for this %c is invalid and cannot be set.")
 			       (modified "*" custom-modified-face "\
@@ -1206,6 +1339,9 @@
 	       (or (not hidden)
 		   (memq category custom-magic-show-hidden)))
       (insert "   ")
+      (when (eq category 'group)
+	(insert-char ?\  (* custom-buffer-indent
+			    (widget-get parent :custom-level))))
       (push (widget-create-child-and-convert 
 	     widget 'choice-item 
 	     :help-echo "Change the state of this item."
@@ -1222,6 +1358,9 @@
       (when lisp 
 	(insert " (lisp)"))
       (insert "\n"))
+    (when (eq category 'group)
+      (insert-char ?\  (* custom-buffer-indent
+			  (widget-get parent :custom-level))))
     (when custom-magic-show-button
       (when custom-magic-show
 	(let ((indent (widget-get parent :indent)))
@@ -1251,9 +1390,10 @@
 
 (define-widget 'custom 'default
   "Customize a user option."
+  :format "%v"
   :convert-widget 'custom-convert-widget
-  :format-handler 'custom-format-handler
   :notify 'custom-notify
+  :custom-prefix ""
   :custom-level 1
   :custom-state 'hidden
   :documentation-property 'widget-subclass-responsibility
@@ -1273,72 +1413,6 @@
       (widget-put widget :args nil)))
   widget)
 
-(defun custom-format-handler (widget escape)
-  ;; We recognize extra escape sequences.
-  (let* ((buttons (widget-get widget :buttons))
-	 (state (widget-get widget :custom-state))
-	 (level (widget-get widget :custom-level)))
-    (cond ((eq escape ?l)
-	   (when level 
-	     (insert-char ?\  (1- level))
-	     (if (eq state 'hidden)
-		 (insert-char ?- (1+ level))
-	       (insert "/")
-	       (insert-char ?- level))))
-	  ((eq escape ?e)
-	   (when (and level (not (eq state 'hidden)))
-	     (insert "\n")
-	     (insert-char ?\  (1- level))
-	     (insert "\\")
-	     (insert-char ?-  level)
-	     (insert " " (widget-get widget :tag) " group end ")
-	     (insert-char ?- (- 75 (current-column) level))
-	     (insert "/\n")))
-	  ((eq escape ?-)
-	   (when (and level (not (eq state 'hidden)))
-	     (insert-char ?- (- 76 (current-column) level))
-	     (insert "\\")))
-	  ((eq escape ?L)
-	   (push (widget-create-child-and-convert
-		  widget 'visibility
-		  :action 'custom-toggle-parent
-		  (not (eq state 'hidden)))
-		 buttons))
-	  ((eq escape ?m)
-	   (and (eq (preceding-char) ?\n)
-		(widget-get widget :indent)
-		(insert-char ?  (widget-get widget :indent)))
-	   (let ((magic (widget-create-child-and-convert
-			 widget 'custom-magic nil)))
-	     (widget-put widget :custom-magic magic)
-	     (push magic buttons)
-	     (widget-put widget :buttons buttons)))
-	  ((eq escape ?a)
-	   (unless (eq state 'hidden)
-	     (let* ((symbol (widget-get widget :value))
-		    (links (get symbol 'custom-links))
-		    (many (> (length links) 2)))
-	       (when links
-		 (and (eq (preceding-char) ?\n)
-		      (widget-get widget :indent)
-		      (insert-char ?  (widget-get widget :indent)))
-		 (insert "See also ")
-		 (while links
-		   (push (widget-create-child-and-convert widget (car links))
-			 buttons)
-		   (setq links (cdr links))
-		   (cond ((null links)
-			  (insert ".\n"))
-			 ((null (cdr links))
-			  (if many
-			      (insert ", and ")
-			    (insert " and ")))
-			 (t 
-			  (insert ", "))))
-		 (widget-put widget :buttons buttons)))))
-	  (t 
-	   (widget-default-format-handler widget escape)))))
-
 (defun custom-notify (widget &rest args)
   "Keep track of changes."
   (let ((state (widget-get widget :custom-state)))
@@ -1371,11 +1445,12 @@
   "Redraw WIDGET state with current settings."
   (while widget 
     (let ((magic (widget-get widget :custom-magic)))
-      (unless magic 
-	(debug))
-      (widget-value-set magic (widget-value magic))
-      (when (setq widget (widget-get widget :group))
-	(custom-group-state-update widget))))
+      (cond (magic 
+	     (widget-value-set magic (widget-value magic))
+	     (when (setq widget (widget-get widget :group))
+	       (custom-group-state-update widget)))
+	    (t
+	     (setq widget nil)))))
   (widget-setup))
 
 (defun custom-show (widget value)
@@ -1430,12 +1505,64 @@
 	  (t 
 	   (widget-put widget :documentation-shown nil)
 	   (widget-put widget :custom-state 'hidden)))
-    (custom-redraw widget)))
+    (custom-redraw widget)
+    (widget-setup)))
 
 (defun custom-toggle-parent (widget &rest ignore)
   "Toggle visibility of parent to WIDGET."
   (custom-toggle-hide (widget-get widget :parent)))
 
+(defun custom-add-see-also (widget &optional prefix)
+  "Add `See also ...' to WIDGET if there are any links.
+Insert PREFIX first if non-nil."
+  (let* ((symbol (widget-get widget :value))
+	 (links (get symbol 'custom-links))
+	 (many (> (length links) 2))
+	 (buttons (widget-get widget :buttons))
+	 (indent (widget-get widget :indent)))
+    (when links
+      (when indent
+	(insert-char ?\  indent))
+      (when prefix
+	(insert prefix))
+      (insert "See also ")
+      (while links
+	(push (widget-create-child-and-convert widget (car links))
+	      buttons)
+	(setq links (cdr links))
+	(cond ((null links)
+	       (insert ".\n"))
+	      ((null (cdr links))
+	       (if many
+		   (insert ", and ")
+		 (insert " and ")))
+	      (t 
+	       (insert ", "))))
+      (widget-put widget :buttons buttons))))
+
+(defun custom-add-parent-links (widget)
+  "Add `Parent groups: ...' to WIDGET."
+  (let ((name (widget-value widget))
+	(type (widget-type widget))
+	(buttons (widget-get widget :buttons))
+	found)
+    (insert "Parent groups:")
+    (mapatoms (lambda (symbol)
+		(let ((group (get symbol 'custom-group)))
+		  (when (assq name group)
+		    (when (eq type (nth 1 (assq name group)))
+		      (insert " ")
+		      (push (widget-create-child-and-convert 
+			     widget 'custom-group-link 
+			     :tag (custom-unlispify-tag-name symbol)
+			     symbol)
+			    buttons)
+		      (setq found t))))))
+    (widget-put widget :buttons buttons)
+    (unless found
+      (insert " (none)"))
+    (insert "\n")))
+
 ;;; The `custom-variable' Widget.
 
 (defface custom-variable-sample-face '((t (:underline t)))
@@ -1448,7 +1575,7 @@
 
 (define-widget 'custom-variable 'custom
   "Customize variable."
-  :format "%v%m%h%a"
+  :format "%v"
   :help-echo "Set or reset this variable."
   :documentation-property 'variable-documentation
   :custom-category 'option
@@ -1491,6 +1618,8 @@
 	 (type (custom-variable-type symbol))
 	 (conv (widget-convert type))
 	 (get (or (get symbol 'custom-get) 'default-value))
+	 (prefix (widget-get widget :custom-prefix))
+	 (last (widget-get widget :custom-last))
 	 (value (if (default-boundp symbol)
 		    (funcall get symbol)
 		  (widget-get conv :value))))
@@ -1506,7 +1635,14 @@
 	;; (widget-apply (widget-convert type) :match value)
 	(setq form 'lisp)))
     ;; Now we can create the child widget.
-    (cond ((eq state 'hidden)
+    (cond ((eq custom-buffer-style 'tree)
+	   (insert prefix (if last " `--- " " |--- "))
+	   (push (widget-create-child-and-convert
+		  widget 'custom-tree-variable-tag)
+		 buttons)
+	   (insert " " tag "\n")
+	   (widget-put widget :buttons buttons))
+	  ((eq state 'hidden)
 	   ;; Indicate hidden value.
 	   (push (widget-create-child-and-convert 
 		  widget 'item
@@ -1517,6 +1653,7 @@
 		 buttons)
 	   (push (widget-create-child-and-convert 
 		  widget 'visibility
+		  :help-echo "Show the value of this option."
 		  :action 'custom-toggle-parent
 		  nil)
 		 buttons))
@@ -1532,10 +1669,11 @@
 				(custom-quote (widget-get conv :value))))))
 	     (insert (symbol-name symbol) ": ")
 	     (push (widget-create-child-and-convert 
-		  widget 'visibility
-		  :action 'custom-toggle-parent
-		  t)
-		 buttons)
+		    widget 'visibility
+		    :help-echo "Hide the value of this option."
+		    :action 'custom-toggle-parent
+		    t)
+		   buttons)
 	     (insert " ")
 	     (push (widget-create-child-and-convert 
 		    widget 'sexp 
@@ -1557,6 +1695,7 @@
 		    widget 'item 
 		    :format tag-format
 		    :action 'custom-tag-action
+		    :help-echo "Change value of this option."
 		    :mouse-down-action 'custom-tag-mouse-down-action
 		    :button-face 'custom-variable-button-face
 		    :sample-face 'custom-variable-sample-face
@@ -1565,6 +1704,7 @@
 	     (insert " ")
 	     (push (widget-create-child-and-convert 
 		  widget 'visibility
+		  :help-echo "Hide the value of this option."
 		  :action 'custom-toggle-parent
 		  t)
 		 buttons)	     
@@ -1573,15 +1713,29 @@
 		    :format value-format
 		    :value value)
 		   children))))
-    ;; Now update the state.
-    (unless (eq (preceding-char) ?\n)
-      (widget-insert "\n"))
-    (if (eq state 'hidden)
-	(widget-put widget :custom-state state)
-      (custom-variable-state-set widget))
-    (widget-put widget :custom-form form)	     
-    (widget-put widget :buttons buttons)
-    (widget-put widget :children children)))
+    (unless (eq custom-buffer-style 'tree)
+      ;; Now update the state.
+      (unless (eq (preceding-char) ?\n)
+	(widget-insert "\n"))
+      (if (eq state 'hidden)
+	  (widget-put widget :custom-state state)
+	(custom-variable-state-set widget))
+      ;; Create the magic button.
+      (let ((magic (widget-create-child-and-convert
+		    widget 'custom-magic nil)))
+	(widget-put widget :custom-magic magic)
+	(push magic buttons))
+      ;; Update properties.
+      (widget-put widget :custom-form form)	     
+      (widget-put widget :buttons buttons)
+      (widget-put widget :children children)
+      ;; Insert documentation.
+      (widget-default-format-handler widget ?h)
+      ;; See also.
+      (unless (eq state 'hidden)
+	(when (eq (widget-get widget :custom-level) 1)
+	  (custom-add-parent-links widget))
+	(custom-add-see-also widget)))))
 
 (defun custom-tag-action (widget &rest args)
   "Pass :action to first child of WIDGET's parent."
@@ -1623,13 +1777,7 @@
     (widget-put widget :custom-state state)))
 
 (defvar custom-variable-menu 
-  '(("Edit" custom-variable-edit 
-     (lambda (widget)
-       (not (eq (widget-get widget :custom-form) 'edit))))
-    ("Edit Lisp" custom-variable-edit-lisp
-     (lambda (widget)
-       (not (eq (widget-get widget :custom-form) 'lisp))))
-    ("Set" custom-variable-set
+  '(("Set" custom-variable-set
      (lambda (widget)
        (eq (widget-get widget :custom-state) 'modified)))
     ("Save" custom-variable-save
@@ -1648,7 +1796,14 @@
      (lambda (widget)
        (and (get (widget-value widget) 'standard-value)
 	    (memq (widget-get widget :custom-state)
-		  '(modified set changed saved rogue))))))
+		  '(modified set changed saved rogue)))))
+    ("---" ignore ignore)
+    ("Don't show as Lisp expression" custom-variable-edit 
+     (lambda (widget)
+       (not (eq (widget-get widget :custom-form) 'edit))))
+    ("Show as Lisp expression" custom-variable-edit-lisp
+     (lambda (widget)
+       (not (eq (widget-get widget :custom-form) 'lisp)))))
   "Alist of actions for the `custom-variable' widget.
 Each entry has the form (NAME ACTION FILTER) where NAME is the name of
 the menu entry, ACTION is the function to call on the widget when the
@@ -1856,8 +2011,6 @@
 
 (define-widget 'custom-face 'custom
   "Customize face."
-  :format "%{%t%}: %s %L\n%m%h%a%v"
-  :format-handler 'custom-face-format-handler
   :sample-face 'custom-face-tag-face
   :help-echo "Set or reset this face."
   :documentation-property '(lambda (face)
@@ -1873,26 +2026,6 @@
   :custom-reset-standard 'custom-face-reset-standard
   :custom-menu 'custom-face-menu-create)
 
-(defun custom-face-format-handler (widget escape)
-  ;; We recognize extra escape sequences.
-  (let (child
-	(symbol (widget-get widget :value)))
-    (cond ((eq escape ?s)
-	   (and (string-match "XEmacs" emacs-version)
-		;; XEmacs cannot display initialized faces.
-		(not (custom-facep symbol))
-		(copy-face 'custom-face-empty symbol))
-	   (setq child (widget-create-child-and-convert 
-			widget 'item
-			:format "(%{%t%})"
-			:sample-face symbol
-			:tag "sample")))
-	  (t 
-	   (custom-format-handler widget escape)))
-    (when child
-      (widget-put widget
-		  :buttons (cons child (widget-get widget :buttons))))))
-
 (define-widget 'custom-face-all 'editable-list 
   "An editable list of display specifications and attributes."
   :entry-format "%i %d %v"
@@ -1926,55 +2059,115 @@
   "Converted version of the `custom-face-selected' widget.")
 
 (defun custom-face-value-create (widget)
-  ;; Create a list of the display specifications.
-  (unless (eq (preceding-char) ?\n)
-    (insert "\n"))
-  (when (not (eq (widget-get widget :custom-state) 'hidden))
-    (message "Creating face editor...")
-    (custom-load-widget widget)
-    (let* ((symbol (widget-value widget))
-	   (spec (or (get symbol 'saved-face)
-		     (get symbol 'face-defface-spec)
-		     ;; Attempt to construct it.
-		     (list (list t (custom-face-attributes-get 
-				    symbol (selected-frame))))))
-	   (form (widget-get widget :custom-form))
-	   (indent (widget-get widget :indent))
-	   (edit (widget-create-child-and-convert
-		  widget
-		  (cond ((and (eq form 'selected)
-			      (widget-apply custom-face-selected :match spec))
-			 (when indent (insert-char ?\  indent))
-			 'custom-face-selected)
-			((and (not (eq form 'lisp))
-			      (widget-apply custom-face-all :match spec))
-			 'custom-face-all)
-			(t 
-			 (when indent (insert-char ?\  indent))
-			 'sexp))
-		  :value spec)))
-      (custom-face-state-set widget)
-      (widget-put widget :children (list edit)))
-    (message "Creating face editor...done")))
+  "Create a list of the display specifications for WIDGET."
+  (let ((buttons (widget-get widget :buttons))
+	(symbol (widget-get widget :value))
+	(tag (widget-get widget :tag))
+	(state (widget-get widget :custom-state))
+	(begin (point))
+	(is-last (widget-get widget :custom-last))
+	(prefix (widget-get widget :custom-prefix)))
+    (unless tag
+      (setq tag (prin1-to-string symbol)))
+    (cond ((eq custom-buffer-style 'tree)
+	   (insert prefix (if is-last " `--- " " |--- "))
+	   (push (widget-create-child-and-convert
+		  widget 'custom-tree-face-tag)
+		 buttons)
+	   (insert " " tag "\n")
+	   (widget-put widget :buttons buttons))
+	  (t
+	   ;; Create tag.
+	   (insert tag)
+	   (if (eq custom-buffer-style 'face)
+	       (insert " ")
+	     (widget-specify-sample widget begin (point))
+	     (insert ": "))
+	   ;; Sample.
+	   (and (string-match "XEmacs" emacs-version)
+		;; XEmacs cannot display uninitialized faces.
+		(not (custom-facep symbol))
+		(copy-face 'custom-face-empty symbol))
+	   (push (widget-create-child-and-convert widget 'item
+						  :format "(%{%t%})"
+						  :sample-face symbol
+						  :tag "sample")
+		 buttons)
+	   ;; Visibility.
+	   (insert " ")
+	   (push (widget-create-child-and-convert 
+		  widget 'visibility
+		  :help-echo "Hide or show this face."
+		  :action 'custom-toggle-parent
+		  (not (eq state 'hidden)))
+		 buttons)
+	   ;; Magic.
+	   (insert "\n")
+	   (let ((magic (widget-create-child-and-convert
+			 widget 'custom-magic nil)))
+	     (widget-put widget :custom-magic magic)
+	     (push magic buttons))
+	   ;; Update buttons.
+	   (widget-put widget :buttons buttons)
+	   ;; Insert documentation.
+	   (widget-default-format-handler widget ?h)
+	   ;; See also.
+	   (unless (eq state 'hidden)
+	     (when (eq (widget-get widget :custom-level) 1)
+	       (custom-add-parent-links widget))
+	     (custom-add-see-also widget))
+	   ;; Editor.
+	   (unless (eq (preceding-char) ?\n)
+	     (insert "\n"))
+	   (unless (eq state 'hidden)
+	     (message "Creating face editor...")
+	     (custom-load-widget widget)
+	     (let* ((symbol (widget-value widget))
+		    (spec (or (get symbol 'saved-face)
+			      (get symbol 'face-defface-spec)
+			      ;; Attempt to construct it.
+			      (list (list t (custom-face-attributes-get 
+					     symbol (selected-frame))))))
+		    (form (widget-get widget :custom-form))
+		    (indent (widget-get widget :indent))
+		    (edit (widget-create-child-and-convert
+			   widget
+			   (cond ((and (eq form 'selected)
+				       (widget-apply custom-face-selected 
+						     :match spec))
+				  (when indent (insert-char ?\  indent))
+				  'custom-face-selected)
+				 ((and (not (eq form 'lisp))
+				       (widget-apply custom-face-all
+						     :match spec))
+				  'custom-face-all)
+				 (t 
+				  (when indent (insert-char ?\  indent))
+				  'sexp))
+			   :value spec)))
+	       (custom-face-state-set widget)
+	       (widget-put widget :children (list edit)))
+	     (message "Creating face editor...done"))))))
 
 (defvar custom-face-menu 
-  '(("Edit Selected" custom-face-edit-selected
-     (lambda (widget)
-       (not (eq (widget-get widget :custom-form) 'selected))))
-    ("Edit All" custom-face-edit-all
-     (lambda (widget)
-       (not (eq (widget-get widget :custom-form) 'all))))
-    ("Edit Lisp" custom-face-edit-lisp
-     (lambda (widget)
-       (not (eq (widget-get widget :custom-form) 'lisp))))
-    ("Set" custom-face-set)
+  '(("Set" custom-face-set)
     ("Save" custom-face-save)
     ("Reset to Saved" custom-face-reset-saved
      (lambda (widget)
        (get (widget-value widget) 'saved-face)))
     ("Reset to Standard Setting" custom-face-reset-standard
      (lambda (widget)
-       (get (widget-value widget) 'face-defface-spec))))
+       (get (widget-value widget) 'face-defface-spec)))
+    ("---" ignore ignore)
+    ("Show all display specs" custom-face-edit-all
+     (lambda (widget)
+       (not (eq (widget-get widget :custom-form) 'all))))
+    ("Just current attributes" custom-face-edit-selected
+     (lambda (widget)
+       (not (eq (widget-get widget :custom-form) 'selected))))
+    ("Show as Lisp expression" custom-face-edit-lisp
+     (lambda (widget)
+       (not (eq (widget-get widget :custom-form) 'lisp)))))
   "Alist of actions for the `custom-face' widget.
 Each entry has the form (NAME ACTION FILTER) where NAME is the name of
 the menu entry, ACTION is the function to call on the widget when the
@@ -2082,7 +2275,9 @@
 (define-widget 'face 'default
   "Select and customize a face."
   :convert-widget 'widget-value-convert-widget
-  :format "%[%t%]: %v"
+  :button-prefix 'widget-push-button-prefix
+  :button-suffix 'widget-push-button-suffix
+  :format "%t: %[select face%] %v"
   :tag "Face"
   :value 'default
   :value-create 'widget-face-value-create
@@ -2095,9 +2290,9 @@
 (defun widget-face-value-create (widget)
   ;; Create a `custom-face' child.
   (let* ((symbol (widget-value widget))
+	 (custom-buffer-style 'face)
 	 (child (widget-create-child-and-convert
 		 widget 'custom-face
-		 :format "%t %s %L\n%m%h%v"
 		 :custom-level nil
 		 :value symbol)))
     (custom-magic-reset child)
@@ -2149,6 +2344,16 @@
     (widget-put widget :args args)
     widget))
 
+;;; The `custom-group-link' Widget.
+
+(define-widget 'custom-group-link 'link
+  "Show parent in other window when activated."
+  :help-echo "Create customize buffer for this group group."
+  :action 'custom-group-link-action)
+
+(defun custom-group-link-action (widget &rest ignore)
+  (customize-group (widget-value widget)))
+
 ;;; The `custom-group' Widget.
 
 (defcustom custom-group-tag-faces '(custom-group-tag-face-1)
@@ -2181,7 +2386,7 @@
 
 (define-widget 'custom-group 'custom
   "Customize group."
-  :format "%l %{%t%} group: %L %-\n%m%h%a%v%e"
+  :format "%v"
   :sample-face-get 'custom-group-sample-face-get
   :documentation-property 'group-documentation
   :help-echo "Set or reset all members of this group."
@@ -2201,42 +2406,209 @@
       'custom-group-tag-face))
 
 (defun custom-group-value-create (widget)
-  (let ((state (widget-get widget :custom-state)))
-    (unless (eq state 'hidden)
-      (message "Creating group...")
-      (custom-load-widget widget)
-      (let* ((level (widget-get widget :custom-level))
-	     (symbol (widget-value widget))
-	     (members (sort (sort (copy-sequence (get symbol 'custom-group))
-				  custom-buffer-sort-predicate)
-			    custom-buffer-order-predicate))
-	     (prefixes (widget-get widget :custom-prefixes))
-	     (custom-prefix-list (custom-prefix-add symbol prefixes))
-	     (length (length members))
-	     (count 0)
-	     (children (mapcar (lambda (entry)
-				 (widget-insert "\n")
-				 (message "Creating group members... %2d%%"
-					  (/ (* 100.0 count) length))
-				 (setq count (1+ count))
-				 (prog1
-				     (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)
-				      :value (nth 0 entry))
-				   (unless (eq (preceding-char) ?\n)
-				     (widget-insert "\n"))))
-			       members)))
-	(message "Creating group magic...")
-	(mapcar 'custom-magic-reset children)
-	(message "Creating group state...")
-	(widget-put widget :children children)
-	(custom-group-state-update widget)
-	(message "Creating group... done")))))
+  "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)))
+    (cond ((and (eq custom-buffer-style 'tree)
+		(eq state 'hidden))
+	   (custom-tree-insert prefix)
+	   (push (widget-create-child-and-convert
+		  widget 'custom-tree-visibility 
+		  ;; :tag-glyph "plus"
+		  :tag "+")
+		 buttons)
+	   (insert "-- ")
+	   ;; (widget-glyph-insert nil "-- " "horizontal")
+	   (push (widget-create-child-and-convert
+		  widget 'custom-tree-group-tag)
+		 buttons)
+	   (insert " " tag "\n")
+	   (widget-put widget :buttons buttons))
+	  ((and (eq custom-buffer-style 'tree)
+		(zerop (length (get symbol 'custom-group))))
+	   (custom-tree-insert prefix)
+	   (insert "[ ]-- ")
+	   ;; (widget-glyph-insert nil "[ ]" "empty")
+	   ;; (widget-glyph-insert nil "-- " "horizontal")
+	   (push (widget-create-child-and-convert 
+		  widget 'custom-tree-group-tag)
+		 buttons)
+	   (insert " " tag "\n")
+	   (widget-put widget :buttons buttons))
+	  ((eq custom-buffer-style 'tree)
+	   (custom-tree-insert prefix)
+	   (custom-load-widget widget)
+	   (if (zerop (length (get symbol 'custom-group)))
+	       (progn 
+		 (custom-tree-insert prefix)
+		 (insert "[ ]-- ")
+		 ;; (widget-glyph-insert nil "[ ]" "empty")
+		 ;; (widget-glyph-insert nil "-- " "horizontal")
+		 (push (widget-create-child-and-convert 
+			widget 'custom-tree-group-tag)
+		       buttons)
+		 (insert " " tag "\n")
+		 (widget-put widget :buttons buttons))
+	     (push (widget-create-child-and-convert 
+		    widget 'custom-tree-visibility 
+		    ;; :tag-glyph "minus"
+		    :tag "-")
+		   buttons)
+	     (insert "-+ ")
+	     ;; (widget-glyph-insert nil "-+ " "top")
+	     (push (widget-create-child-and-convert 
+		    widget 'custom-tree-group-tag)
+		   buttons)
+	     (insert " " tag "\n")
+	     (widget-put widget :buttons buttons)
+	     (message "Creating group...")
+	     (let* ((members (sort (copy-sequence (get symbol 'custom-group))
+				   'custom-browse-sort-predicate))
+		    (prefixes (widget-get widget :custom-prefixes))
+		    (custom-prefix-list (custom-prefix-add symbol prefixes))
+		    (length (length members))
+		    (extra-prefix (if (widget-get widget :custom-last)
+				      "   "
+				    " | "))
+		    (prefix (concat prefix extra-prefix))
+		    children entry)
+	       (while members
+		 (setq entry (car members)
+		       members (cdr members))
+		 (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.
+	  ((eq state 'hidden)
+	   ;; Create level indicator.
+	   (insert-char ?\  (* custom-buffer-indent (1- level)))
+	   (insert "-- ")
+	   ;; Create tag.
+	   (let ((begin (point)))
+	     (insert tag)
+	     (widget-specify-sample widget begin (point)))
+	   (insert " group: ")
+	   ;; Create link/visibility indicator.
+	   (if (eq custom-buffer-style 'links)
+	       (push (widget-create-child-and-convert
+		      widget 'custom-group-link 
+		      :tag "Show"
+		      symbol)
+		     buttons)
+	     (push (widget-create-child-and-convert 
+		    widget 'visibility
+		    :help-echo "Show members of this group."
+		    :action 'custom-toggle-parent
+		    (not (eq state 'hidden)))
+		   buttons))
+	   (insert " \n")
+	   ;; Create magic button.
+	   (let ((magic (widget-create-child-and-convert
+			 widget 'custom-magic nil)))
+	     (widget-put widget :custom-magic magic)
+	     (push magic buttons))
+	   ;; Update buttons.
+	   (widget-put widget :buttons buttons)
+	   ;; Insert documentation.
+	   (widget-default-format-handler widget ?h))
+	  ;; Nested style.
+	  (t				;Visible.
+	   ;; Create level indicator.
+	   (insert-char ?\  (* custom-buffer-indent (1- level)))
+	   (insert "/- ")
+	   ;; Create tag.
+	   (let ((start (point)))
+	     (insert tag)
+	     (widget-specify-sample widget start (point)))
+	   (insert " group: ")
+	   ;; Create visibility indicator.
+	   (unless (eq custom-buffer-style 'links)
+	     (insert "--------")
+	     (push (widget-create-child-and-convert 
+		    widget 'visibility
+		    :help-echo "Hide members of this group."
+		    :action 'custom-toggle-parent
+		    (not (eq state 'hidden)))
+		   buttons)
+	     (insert " "))
+	   ;; Create more dashes.
+	   ;; Use 76 instead of 75 to compensate for the temporary "<"
+	   ;; added by `widget-insert'.  
+	   (insert-char ?- (- 76 (current-column)
+			      (* custom-buffer-indent level)))
+	   (insert "\\\n")
+	   ;; Create magic button.
+	   (let ((magic (widget-create-child-and-convert
+			 widget 'custom-magic 
+			 :indent 0
+			 nil)))
+	     (widget-put widget :custom-magic magic)
+	     (push magic buttons))
+	   ;; Update buttons.
+	   (widget-put widget :buttons buttons)
+	   ;; Insert documentation.
+	   (widget-default-format-handler widget ?h)
+	   ;; Parents and See also.
+	   (when (eq level 1)
+	     (insert-char ?\  custom-buffer-indent)
+	     (custom-add-parent-links widget))
+	   (custom-add-see-also widget 
+				(make-string (* custom-buffer-indent level)
+					     ?\ ))
+	   ;; Members.
+	   (message "Creating group...")
+	   (custom-load-widget widget)
+	   (let* ((members (sort (copy-sequence (get symbol 'custom-group))
+				 'custom-buffer-sort-predicate))
+		  (prefixes (widget-get widget :custom-prefixes))
+		  (custom-prefix-list (custom-prefix-add symbol prefixes))
+		  (length (length members))
+		  (count 0)
+		  (children (mapcar (lambda (entry)
+				      (widget-insert "\n")
+				      (message "\
+Creating group members... %2d%%"
+					       (/ (* 100.0 count) length))
+				      (setq count (1+ count))
+				      (prog1
+					  (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)
+					   :value (nth 0 entry))
+					(unless (eq (preceding-char) ?\n)
+					  (widget-insert "\n"))))
+				    members)))
+	     (message "Creating group magic...")
+	     (mapcar 'custom-magic-reset children)
+	     (message "Creating group state...")
+	     (widget-put widget :children children)
+	     (custom-group-state-update widget)
+	     (message "Creating group... done"))
+	   ;; End line
+	   (insert "\n")
+	   (insert-char ?\  (* custom-buffer-indent (1- level)))
+	   (insert "\\- " (widget-get widget :tag) " group end ")
+	   (insert-char ?- (- 75 (current-column) (* custom-buffer-indent level)))
+	   (insert "/\n")))))
 
 (defvar custom-group-menu 
   '(("Set" custom-group-set
@@ -2337,8 +2709,10 @@
   (custom-magic-reset widget))
 
 ;;; The `custom-save-all' Function.
-
-(defcustom custom-file "~/.emacs"
+;;;###autoload
+(defcustom custom-file (if (featurep 'xemacs)
+			   "~/.xemacs-custom"
+			 "~/.emacs")
   "File used for storing customization information.
 If you change this from the default \"~/.emacs\" you need to
 explicitly load that file for the settings to take effect."
@@ -2462,14 +2836,19 @@
 ;;; Menu support
 
 (unless (string-match "XEmacs" emacs-version)
-  (defconst custom-help-menu '("Customize"
-			       ["Update menu..." custom-menu-update t]
-			       ["Group..." customize-group t]
-			       ["Variable..." customize-variable t]
-			       ["Face..." customize-face t]
-			       ["Saved..." customize-saved t]
-			       ["Set..." customize-customized t]
-			       ["Apropos..." customize-apropos t])
+  (defconst custom-help-menu
+    '("Customize"
+      ["Update menu..." custom-menu-update t]
+      ["Group..." customize-group t]
+      ["Variable..." customize-variable t]
+      ["Face..." customize-face t]
+      ["Saved..." customize-saved t]
+      ["Set..." customize-customized t]
+      ["--" custom-menu-sep t]
+      ["Apropos..." customize-apropos t]
+      ["Group apropos..." customize-apropos-groups t]
+      ["Variable apropos..." customize-apropos-options t]
+      ["Face apropos..." customize-apropos-faces t])
     ;; This menu should be identical to the one defined in `menu-bar.el'. 
     "Customize menu")
 
@@ -2549,9 +2928,8 @@
 	     (< (length (get symbol 'custom-group)) widget-menu-max-size))
 	(let ((custom-prefix-list (custom-prefix-add symbol
 						     custom-prefix-list))
-	      (members (sort (sort (copy-sequence (get symbol 'custom-group))
-				   custom-menu-sort-predicate)
-			     custom-menu-order-predicate)))
+	      (members (sort (copy-sequence (get symbol 'custom-group))
+			     'custom-menu-sort-predicate)))
 	  (custom-load-symbol symbol)
 	  `(,(custom-unlispify-menu-entry symbol t)
 	    ,item
@@ -2591,15 +2969,11 @@
   (suppress-keymap custom-mode-map)
   (define-key custom-mode-map "q" 'bury-buffer))
 
-(easy-menu-define custom-mode-customize-menu 
-    custom-mode-map
-  "Menu used to customize customization buffers."
-  (customize-menu-create 'customize))
-
 (easy-menu-define custom-mode-menu 
     custom-mode-map
   "Menu used in customization buffers."
   `("Custom"
+    ,(customize-menu-create 'customize)
     ["Set" custom-set t]
     ["Save" custom-save t]
     ["Reset to Current" custom-reset-current t]
@@ -2633,7 +3007,6 @@
   (setq major-mode 'custom-mode
 	mode-name "Custom")
   (use-local-map custom-mode-map)
-  (easy-menu-add custom-mode-customize-menu)
   (easy-menu-add custom-mode-menu)
   (make-local-variable 'custom-options)
   (run-hooks 'custom-mode-hook))
diff -r 4de2936b4e77 -r 0132846995bd lisp/custom/cus-face.el
--- a/lisp/custom/cus-face.el	Mon Aug 13 09:42:28 2007 +0200
+++ b/lisp/custom/cus-face.el	Mon Aug 13 09:43:35 2007 +0200
@@ -4,7 +4,7 @@
 ;;
 ;; Author: Per Abrahamsen <abraham@dina.kvl.dk>
 ;; Keywords: help, faces
-;; Version: 1.9916
+;; Version: 1.9931
 ;; X-URL: http://www.dina.kvl.dk/~abraham/custom/
 
 ;;; Commentary:
@@ -255,17 +255,17 @@
 ;;; Font Attributes.
 
 (defconst custom-face-attributes
-  '((:bold (toggle :format "%[Bold%]: %v\n"
-		   :help-echo "Control whether a bold font should be used.")
+  '((:bold (boolean :tag "Bold"
+		    :help-echo "Control whether a bold font should be used.")
 	   custom-set-face-bold 
 	   custom-face-bold)
-    (:italic (toggle :format "%[Italic%]: %v\n"
-		     :help-echo "\
+    (:italic (boolean :tag "Italic"
+		      :help-echo "\
 Control whether an italic font should be used.")
 	     custom-set-face-italic
 	     custom-face-italic)
-    (:underline (toggle :format "%[Underline%]: %v\n"
-			:help-echo "\
+    (:underline (boolean :tag "Underline"
+			 :help-echo "\
 Control whether the text should be underlined.")
 		set-face-underline-p
 		face-underline-p)
diff -r 4de2936b4e77 -r 0132846995bd lisp/custom/custom-load.el
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lisp/custom/custom-load.el	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,87 @@
+(put 'extensions 'custom-loads '("wid-edit"))
+(put 'copyright 'custom-loads '())
+(put 'custom-buffer 'custom-loads '("cus-edit"))
+(put 'eldoc 'custom-loads '())
+(put 'custom-faces 'custom-loads '("cus-edit"))
+(put 'execute 'custom-loads '())
+(put 'mouse 'custom-loads '())
+(put 'mail-abbrevs 'custom-loads '())
+(put 'etags 'custom-loads '())
+(put 'limits 'custom-loads '())
+(put 'widgets 'custom-loads '("wid-browse" "wid-edit"))
+(put 'minibuffer 'custom-loads '())
+(put 'environment 'custom-loads '("cus-edit"))
+(put 'sound 'custom-loads '())
+(put 'holidays 'custom-loads '())
+(put 'auto-save 'custom-loads '())
+(put 'ispell 'custom-loads '())
+(put 'fortran-indent 'custom-loads '())
+(put 'lpr 'custom-loads '())
+(put 'message-headers 'custom-loads '())
+(put 'custom-menu 'custom-loads '("cus-edit"))
+(put 'editing-basics 'custom-loads '())
+(put 'internal 'custom-loads '("cus-edit"))
+(put 'calendar 'custom-loads '())
+(put 'help-appearance 'custom-loads '())
+(put 'display-time 'custom-loads '())
+(put 'hypermedia 'custom-loads '("wid-edit"))
+(put 'lisp 'custom-loads '())
+(put 'diff 'custom-loads '())
+(put 'applications 'custom-loads '("cus-edit"))
+(put 'paren-matching 'custom-loads '())
+(put 'help 'custom-loads '("cus-edit"))
+(put 'local 'custom-loads '())
+(put 'keyboard 'custom-loads '())
+(put 'minubuffer 'custom-loads '())
+(put 'message-sending 'custom-loads '())
+(put 'widget-browse 'custom-loads '("wid-browse"))
+(put 'data 'custom-loads '())
+(put 'widget-documentation 'custom-loads '("wid-edit"))
+(put 'ps-print 'custom-loads '())
+(put 'backup 'custom-loads '())
+(put 'frames 'custom-loads '())
+(put 'customize 'custom-loads '("cus-edit" "wid-edit" "cus-face"))
+(put 'abbrev 'custom-loads '("cus-edit"))
+(put 'programming 'custom-loads '("cus-edit"))
+(put 'toolbar 'custom-loads '())
+(put 'compilation 'custom-loads '())
+(put 'dired 'custom-loads '())
+(put 'killing 'custom-loads '())
+(put 'widget-button 'custom-loads '("wid-edit"))
+(put 'paren-blinking 'custom-loads '())
+(put 'find-file 'custom-loads '())
+(put 'files 'custom-loads '("cus-edit"))
+(put 'external 'custom-loads '("cus-edit"))
+(put 'development 'custom-loads '("cus-edit"))
+(put 'gnuserv 'custom-loads '())
+(put 'maint 'custom-loads '())
+(put 'fill-comments 'custom-loads '())
+(put 'message-mail 'custom-loads '())
+(put 'windows 'custom-loads '())
+(put 'widget-faces 'custom-loads '("wid-edit"))
+(put 'message-various 'custom-loads '())
+(put 'resize-minibuffer 'custom-loads '())
+(put 'languages 'custom-loads '("cus-edit"))
+(put 'fill 'custom-loads '())
+(put 'custom-magic-faces 'custom-loads '("cus-edit"))
+(put 'debug 'custom-loads '())
+(put 'display 'custom-loads '())
+(put 'faces 'custom-loads '("cus-edit" "wid-edit"))
+(put 'diary 'custom-loads '())
+(put 'browse-url 'custom-loads '())
+(put 'emacs 'custom-loads '("cus-edit"))
+(put 'processes 'custom-loads '("cus-edit"))
+(put 'message-insertion 'custom-loads '())
+(put 'hyper-apropos 'custom-loads '())
+(put 'wp 'custom-loads '("cus-edit"))
+(put 'vc 'custom-loads '())
+(put 'alloc 'custom-loads '())
+(put 'isearch 'custom-loads '())
+(put 'modeline 'custom-loads '())
+(put 'processes-basics 'custom-loads '())
+(put 'editing 'custom-loads '("cus-edit"))
+(put 'matching 'custom-loads '())
+(put 'i18n 'custom-loads '("cus-edit"))
+(put 'ps-print-color 'custom-loads '())
+(put 'undo 'custom-loads '())
+(put 'x 'custom-loads '())
diff -r 4de2936b4e77 -r 0132846995bd lisp/custom/custom.el
--- a/lisp/custom/custom.el	Mon Aug 13 09:42:28 2007 +0200
+++ b/lisp/custom/custom.el	Mon Aug 13 09:43:35 2007 +0200
@@ -4,7 +4,7 @@
 ;;
 ;; Author: Per Abrahamsen <abraham@dina.kvl.dk>
 ;; Keywords: help, faces
-;; Version: 1.9916
+;; Version: 1.9931
 ;; X-URL: http://www.dina.kvl.dk/~abraham/custom/
 
 ;; This file is part of GNU Emacs.
@@ -47,6 +47,7 @@
   (autoload 'custom-set-value "cus-edit" nil t)
   (autoload 'custom-set-variable "cus-edit" nil t)
   (autoload 'customize "cus-edit" nil t)
+  (autoload 'customize-browse "cus-edit" nil t)
   (autoload 'customize-group "cus-edit" nil t)
   (autoload 'customize-group-other-window "cus-edit" nil t)
   (autoload 'customize-variable "cus-edit" nil t)
diff -r 4de2936b4e77 -r 0132846995bd lisp/custom/wid-browse.el
--- a/lisp/custom/wid-browse.el	Mon Aug 13 09:42:28 2007 +0200
+++ b/lisp/custom/wid-browse.el	Mon Aug 13 09:43:35 2007 +0200
@@ -4,7 +4,7 @@
 ;;
 ;; Author: Per Abrahamsen <abraham@dina.kvl.dk>
 ;; Keywords: extensions
-;; Version: 1.9916
+;; Version: 1.9931
 ;; X-URL: http://www.dina.kvl.dk/~abraham/custom/
 
 ;; This file is part of GNU Emacs.
diff -r 4de2936b4e77 -r 0132846995bd lisp/custom/wid-edit.el
--- a/lisp/custom/wid-edit.el	Mon Aug 13 09:42:28 2007 +0200
+++ b/lisp/custom/wid-edit.el	Mon Aug 13 09:43:35 2007 +0200
@@ -4,7 +4,7 @@
 ;;
 ;; Author: Per Abrahamsen <abraham@dina.kvl.dk>
 ;; Keywords: extensions
-;; Version: 1.9916
+;; Version: 1.9931
 ;; X-URL: http://www.dina.kvl.dk/~abraham/custom/
 
 ;; This file is part of GNU Emacs.
@@ -296,8 +296,11 @@
     (when widget-field-add-space
       (insert-and-inherit " "))
     (setq to (point)))
-  (add-text-properties (1- to) to ;to (1+ to) 
-  		       '(front-sticky nil start-open t read-only to))
+  (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))
@@ -359,6 +362,7 @@
    (save-restriction
      (let ((inhibit-read-only t)
 	   result
+	   before-change-functions
 	   after-change-functions)
        (insert "<>")
        (narrow-to-region (- (point) 2) (point))
@@ -375,7 +379,7 @@
 				 (:foreground "light gray"))
 				(((class grayscale color)
 				  (background light))
-				 (:foreground "dark gray"))
+				 (:foreground "dim gray"))
 				(t 
 				 (:italic t)))
   "Face used for inactive widgets."
@@ -435,6 +439,15 @@
 	     (setq missing nil))))
     value))
 
+(defun widget-get-indirect (widget property)
+  "In WIDGET, get the value of PROPERTY.
+If the value is a symbol, return its binding.  
+Otherwise, just return the value."
+  (let ((value (widget-get widget property)))
+    (if (symbolp value)
+	(symbol-value value)
+      value)))
+
 (defun widget-member (widget property)
   "Non-nil iff there is a definition in WIDGET for PROPERTY."
   (cond ((widget-plist-member (cdr widget) property)
@@ -471,10 +484,9 @@
 
 (defun widget-apply-action (widget &optional event)
   "Apply :action in WIDGET in response to EVENT."
-  (let (after-change-functions)
-    (if (widget-apply widget :active)
-	(widget-apply widget :action event)
-      (error "Attempt to perform action on inactive widget"))))
+  (if (widget-apply widget :active)
+      (widget-apply widget :action event)
+    (error "Attempt to perform action on inactive widget")))
 
 ;;; Helper functions.
 ;;
@@ -629,22 +641,26 @@
   "In WIDGET, insert GLYPH.
 If optional arguments DOWN and INACTIVE are given, they should be
 glyphs used when the widget is pushed and inactive, respectively."
-  (set-glyph-property glyph 'widget widget)
-  (when down
-    (set-glyph-property down 'widget widget))
-  (when inactive
-    (set-glyph-property inactive 'widget widget))
+  (when widget
+    (set-glyph-property glyph 'widget widget)
+    (when down
+      (set-glyph-property down 'widget widget))
+    (when inactive
+      (set-glyph-property inactive 'widget widget)))
   (insert "*")
   (let ((ext (make-extent (point) (1- (point))))
-	(help-echo (widget-get widget :help-echo)))
+	(help-echo (and widget (widget-get widget :help-echo))))
     (set-extent-property ext 'invisible t)
+    (set-extent-property ext 'start-open t)
+    (set-extent-property ext 'end-open t)
     (set-extent-end-glyph ext glyph)
     (when help-echo
       (set-extent-property ext 'balloon-help help-echo)
       (set-extent-property ext 'help-echo help-echo)))
-  (widget-put widget :glyph-up glyph)
-  (when down (widget-put widget :glyph-down down))
-  (when inactive (widget-put widget :glyph-inactive inactive)))
+  (when widget
+    (widget-put widget :glyph-up glyph)
+    (when down (widget-put widget :glyph-down down))
+    (when inactive (widget-put widget :glyph-inactive inactive))))
 
 ;;; Buttons.
 
@@ -662,14 +678,6 @@
   :type 'string
   :group 'widget-button)
 
-(defun widget-button-insert-indirect (widget key)
-  "Insert value of WIDGET's KEY property."
-  (let ((val (widget-get widget key)))
-    (while (and val (symbolp val))
-      (setq val (symbol-value val)))
-    (when val 
-      (insert val))))
-
 ;;; Creating Widgets.
 
 ;;;###autoload
@@ -768,6 +776,7 @@
 (defun widget-insert (&rest args)
   "Call `insert' with ARGS and make the text read only."
   (let ((inhibit-read-only t)
+	before-change-functions
 	after-change-functions
 	(from (point)))
     (apply 'insert args)
@@ -811,8 +820,10 @@
 	(children (widget-get widget :children)))
     (set-marker from nil)
     (set-marker to nil)
-    (delete-overlay button)
-    (delete-overlay field)
+    (when button
+      (delete-overlay button))
+    (when field
+      (delete-overlay field))
     (mapcar 'widget-leave-text children)))
 
 ;;; Keymap and Commands.
@@ -1114,6 +1125,7 @@
   "Setup current buffer so editing string widgets works."
   (let ((inhibit-read-only t)
 	(after-change-functions nil)
+	before-change-functions
 	field)
     (while widget-field-new
       (setq field (car widget-field-new)
@@ -1128,9 +1140,11 @@
   (widget-clear-undo)
   ;; We need to maintain text properties and size of the editing fields.
   (make-local-variable 'after-change-functions)
-  (if (and widget-field-list)
-      (setq after-change-functions '(widget-after-change))
-    (setq after-change-functions nil)))
+  (make-local-variable 'before-change-functions)
+  (setq after-change-functions
+	(if widget-field-list '(widget-after-change) nil))
+  (setq before-change-functions
+	(if widget-field-list '(widget-before-change) nil)))
 
 (defvar widget-field-last nil)
 ;; Last field containing point.
@@ -1174,6 +1188,14 @@
 	  (setq found field))))
     found))
 
+(defun widget-before-change (from &rest ignore)
+  ;; 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"))))
+
 (defun widget-after-change (from to old)
   ;; Adjust field size and text properties.
   (condition-case nil
@@ -1319,9 +1341,9 @@
 		(insert "%"))
 	       ((eq escape ?\[)
 		(setq button-begin (point))
-		(widget-button-insert-indirect widget :button-prefix))
+		(insert (widget-get-indirect widget :button-prefix)))
 	       ((eq escape ?\])
-		(widget-button-insert-indirect widget :button-suffix)
+		(insert (widget-get-indirect widget :button-suffix))
 		(setq button-end (point)))
 	       ((eq escape ?\{)
 		(setq sample-begin (point)))
@@ -1390,7 +1412,8 @@
 					   (widget-get widget :value)))))
 		  (doc-text (and (stringp doc-try)
 				 (> (length doc-try) 1)
-				 doc-try)))
+				 doc-try))
+		  (doc-indent (widget-get widget :documentation-indent)))
 	     (when doc-text
 	       (and (eq (preceding-char) ?\n)
 		    (widget-get widget :indent)
@@ -1403,6 +1426,11 @@
 		 (setq doc-text (substring doc-text 0 (match-beginning 0))))
 	       (push (widget-create-child-and-convert
 		      widget 'documentation-string
+		      :indent (cond ((numberp doc-indent )
+				     doc-indent)
+				    ((null doc-indent)
+				     nil)
+				    (t 0))
 		      doc-text)
 		     buttons))))
 	  (t 
@@ -1423,6 +1451,7 @@
 	(to (widget-get widget :to))
 	(inactive-overlay (widget-get widget :inactive))
 	(button-overlay (widget-get widget :button-overlay))
+	before-change-functions
 	after-change-functions
 	(inhibit-read-only t))
     (widget-apply widget :value-delete)
@@ -1566,30 +1595,33 @@
   ;; Insert text representing the `on' and `off' states.
   (let* ((tag (or (widget-get widget :tag)
 		  (widget-get widget :value)))
+	 (tag-glyph (widget-get widget :tag-glyph))
 	 (text (concat widget-push-button-prefix
 		       tag widget-push-button-suffix))
 	 (gui (cdr (assoc tag widget-push-button-cache))))
-    (if (and (fboundp 'make-gui-button)
+    (cond (tag-glyph
+	   (widget-glyph-insert widget text tag-glyph))
+	  ((and (fboundp 'make-gui-button)
 	     (fboundp 'make-glyph)
 	     widget-push-button-gui
 	     (fboundp 'device-on-window-system-p)
 	     (device-on-window-system-p)
 	     (string-match "XEmacs" emacs-version))
-	(progn 
-	  (unless gui
-	    (setq gui (make-gui-button tag 'widget-gui-action widget))
-	    (push (cons tag gui) widget-push-button-cache))
-	  (widget-glyph-insert-glyph widget
-				     (make-glyph
-				      (list (nth 0 (aref gui 1))
-					    (vector 'string ':data text)))
-				     (make-glyph
-				      (list (nth 1 (aref gui 1))
-					    (vector 'string ':data text)))
-				     (make-glyph
-				      (list (nth 2 (aref gui 1))
-					    (vector 'string ':data text)))))
-      (insert text))))
+	   (unless gui
+	     (setq gui (make-gui-button tag 'widget-gui-action widget))
+	     (push (cons tag gui) widget-push-button-cache))
+	   (widget-glyph-insert-glyph widget
+				      (make-glyph
+				       (list (nth 0 (aref gui 1))
+					     (vector 'string ':data text)))
+				      (make-glyph
+				       (list (nth 1 (aref gui 1))
+					     (vector 'string ':data text)))
+				      (make-glyph
+				       (list (nth 2 (aref gui 1))
+					     (vector 'string ':data text)))))
+	  (t
+	   (insert text)))))
 
 (defun widget-gui-action (widget)
   "Apply :action for WIDGET."
@@ -2410,6 +2442,7 @@
   (save-excursion
     (let ((children (widget-get widget :children))
 	  (inhibit-read-only t)
+	  before-change-functions
 	  after-change-functions)
       (cond (before 
 	     (goto-char (widget-get before :entry-from)))
@@ -2436,6 +2469,7 @@
     (let ((buttons (copy-sequence (widget-get widget :buttons)))
 	  button
 	  (inhibit-read-only t)
+	  before-change-functions
 	  after-change-functions)
       (while buttons
 	(setq button (car buttons)
@@ -2447,6 +2481,7 @@
     (let ((entry-from (widget-get child :entry-from))
 	  (entry-to (widget-get child :entry-to))
 	  (inhibit-read-only t)
+	  before-change-functions
 	  after-change-functions)
       (widget-delete child)
       (delete-region entry-from entry-to)
@@ -2567,8 +2602,8 @@
   :format "%[%v%]"
   :button-prefix ""
   :button-suffix ""
-  :on "hide"
-  :off "show"
+  :on "Hide"
+  :off "Show"
   :value-create 'widget-visibility-value-create
   :action 'widget-toggle-action
   :match (lambda (widget value) t))
@@ -2584,20 +2619,27 @@
       (setq on ""))
     (if off
 	(setq off (concat widget-push-button-prefix
-			 off
-			 widget-push-button-suffix))
+			  off
+			  widget-push-button-suffix))
       (setq off ""))
     (if (widget-value widget)
 	(widget-glyph-insert widget on "down" "down-pushed")
-      (widget-glyph-insert widget off "right" "right-pushed")
-      (insert "..."))))
+      (widget-glyph-insert widget off "right" "right-pushed"))))
 
 ;;; The `documentation-link' Widget.
+;;
+;; This is a helper widget for `documentation-string'.
 
 (define-widget 'documentation-link 'link
   "Link type used in documentation strings."
+  :tab-order -1
+  :help-echo 'widget-documentation-link-echo-help
   :action 'widget-documentation-link-action)
 
+(defun widget-documentation-link-echo-help (widget)
+  "Tell what this link will describe."
+  (concat "Describe the `" (widget-get widget :value) "' symbol."))
+
 (defun widget-documentation-link-action (widget &optional event)
   "Run apropos on WIDGET's value.  Ignore optional argument EVENT."
   (apropos (concat "\\`" (regexp-quote (widget-get widget :value)) "\\'")))
@@ -2635,15 +2677,23 @@
 	  (type widget-documentation-link-type)
 	  (buttons (widget-get widget :buttons)))
       (save-excursion
-	(goto-char (point-min))
+	(goto-char from)
 	(while (re-search-forward regexp to t)
 	  (let ((name (match-string 1))
-		(begin (match-beginning 0))
-		(end (match-end 0)))
+		(begin (match-beginning 1))
+		(end (match-end 1)))
 	    (when (funcall predicate name)
 	      (push (widget-convert-button type begin end :value name)
 		    buttons)))))
-      (widget-put widget :buttons buttons))))
+      (widget-put widget :buttons buttons)))
+  (let ((indent (widget-get widget :indent)))
+    (when (and indent (not (zerop indent)))
+      (save-excursion 
+	(save-restriction
+	  (narrow-to-region from to)
+	  (goto-char (point-min))
+	  (while (search-forward "\n" nil t)
+	    (insert-char ?\  indent)))))))
 
 ;;; The `documentation-string' Widget.
 
@@ -2657,6 +2707,7 @@
 (defun widget-documentation-string-value-create (widget)
   ;; Insert documentation string.
   (let ((doc (widget-value widget))
+	(indent (widget-get widget :indent))
 	(shown (widget-get (widget-get widget :parent) :documentation-shown))
 	(start (point)))
     (if (string-match "\n" doc)
@@ -2667,12 +2718,15 @@
 	  (widget-documentation-link-add widget start (point))
 	  (push (widget-create-child-and-convert
 		 widget 'visibility
-		 :off nil
+		 :help-echo "Show or hide rest of the documentation."
+		 :off "More"
 		 :action 'widget-parent-action
 		 shown)
 		buttons)
 	  (when shown
 	    (setq start (point))
+	    (when (and indent (not (zerop indent)))
+	      (insert-char ?\  indent))
 	    (insert after)
 	    (widget-documentation-link-add widget start (point)))
 	  (widget-put widget :buttons buttons))
@@ -3015,7 +3069,9 @@
 (define-widget 'choice 'menu-choice
   "A union of several sexp types."
   :tag "Choice"
-  :format "%[%t%]: %v"
+  :format "%{%t%}: %[Value Menu%] %v"
+  :button-prefix 'widget-push-button-prefix
+  :button-suffix 'widget-push-button-suffix
   :prompt-value 'widget-choice-prompt-value)
 
 (defun widget-choice-prompt-value (widget prompt value unbound)
@@ -3080,7 +3136,11 @@
   "To be nil or non-nil, that is the question."
   :tag "Boolean"
   :prompt-value 'widget-boolean-prompt-value
-  :format "%[%t%]: %v\n")
+  :button-prefix 'widget-push-button-prefix
+  :button-suffix 'widget-push-button-suffix
+  :format "%{%t%}: %[Toggle%]  %v\n"
+  :on "on (non-nil)"
+  :off "off (nil)")
 
 (defun widget-boolean-prompt-value (widget prompt value unbound)
   ;; Toggle a boolean.
diff -r 4de2936b4e77 -r 0132846995bd lisp/custom/widget-example.el
--- a/lisp/custom/widget-example.el	Mon Aug 13 09:42:28 2007 +0200
+++ b/lisp/custom/widget-example.el	Mon Aug 13 09:43:35 2007 +0200
@@ -4,7 +4,7 @@
 ;;
 ;; Author: Per Abrahamsen <abraham@dina.kvl.dk>
 ;; Keywords: help, extensions, faces, hypermedia
-;; Version: 1.9916
+;; Version: 1.9931
 ;; X-URL: http://www.dina.kvl.dk/~abraham/custom/
 
 (require 'widget)
diff -r 4de2936b4e77 -r 0132846995bd lisp/custom/widget.el
--- a/lisp/custom/widget.el	Mon Aug 13 09:42:28 2007 +0200
+++ b/lisp/custom/widget.el	Mon Aug 13 09:43:35 2007 +0200
@@ -4,7 +4,7 @@
 ;;
 ;; Author: Per Abrahamsen <abraham@dina.kvl.dk>
 ;; Keywords: help, extensions, faces, hypermedia
-;; Version: 1.9916
+;; Version: 1.9931
 ;; 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 :complete-function :complete :button-overlay
+(define-widget-keywords :documentation-indent
+  :complete-function :complete :button-overlay
   :field-overlay  
   :documentation-shown :button-prefix  
   :button-suffix :mouse-down-action :glyph-up :glyph-down :glyph-inactive  
diff -r 4de2936b4e77 -r 0132846995bd lisp/edebug/auto-autoloads.el
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lisp/edebug/auto-autoloads.el	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,23 @@
+;;; DO NOT MODIFY THIS FILE
+(if (not (featurep 'edebug-autoloads))
+    (progn
+
+;;;### (autoloads (edebug-eval-top-level-form def-edebug-spec) "edebug" "edebug/edebug.el")
+
+(autoload 'def-edebug-spec "edebug" "\
+Set the edebug-form-spec property of SYMBOL according to SPEC.
+Both SYMBOL and SPEC are unevaluated. The SPEC can be 0, t, a symbol
+\(naming a function), or a list." nil 'macro)
+
+(defalias 'edebug-defun 'edebug-eval-top-level-form)
+
+(autoload 'edebug-eval-top-level-form "edebug" "\
+Evaluate a top level form, such as a defun or defmacro.
+This is like `eval-defun', but the code is always instrumented for Edebug.
+Print its name in the minibuffer and leave point where it is,
+or if an error occurs, leave point after it with mark at the original point." t nil)
+
+;;;***
+
+(provide 'edebug-autoloads)
+))
diff -r 4de2936b4e77 -r 0132846995bd lisp/edebug/custom-load.el
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lisp/edebug/custom-load.el	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,66 @@
+(put 'copyright 'custom-loads '())
+(put 'eldoc 'custom-loads '())
+(put 'execute 'custom-loads '())
+(put 'mouse 'custom-loads '())
+(put 'mail-abbrevs 'custom-loads '())
+(put 'etags 'custom-loads '())
+(put 'limits 'custom-loads '())
+(put 'minibuffer 'custom-loads '())
+(put 'environment 'custom-loads '())
+(put 'sound 'custom-loads '())
+(put 'holidays 'custom-loads '())
+(put 'auto-save 'custom-loads '())
+(put 'ispell 'custom-loads '())
+(put 'fortran-indent 'custom-loads '())
+(put 'lpr 'custom-loads '())
+(put 'message-headers 'custom-loads '())
+(put 'editing-basics 'custom-loads '())
+(put 'internal 'custom-loads '())
+(put 'calendar 'custom-loads '())
+(put 'help-appearance 'custom-loads '())
+(put 'display-time 'custom-loads '())
+(put 'lisp 'custom-loads '("edebug"))
+(put 'diff 'custom-loads '())
+(put 'paren-matching 'custom-loads '())
+(put 'help 'custom-loads '())
+(put 'local 'custom-loads '())
+(put 'keyboard 'custom-loads '())
+(put 'minubuffer 'custom-loads '())
+(put 'message-sending 'custom-loads '())
+(put 'data 'custom-loads '())
+(put 'edebug 'custom-loads '("edebug"))
+(put 'ps-print 'custom-loads '())
+(put 'backup 'custom-loads '())
+(put 'frames 'custom-loads '())
+(put 'customize 'custom-loads '())
+(put 'abbrev 'custom-loads '())
+(put 'toolbar 'custom-loads '())
+(put 'compilation 'custom-loads '())
+(put 'dired 'custom-loads '())
+(put 'killing 'custom-loads '())
+(put 'paren-blinking 'custom-loads '())
+(put 'find-file 'custom-loads '())
+(put 'gnuserv 'custom-loads '())
+(put 'maint 'custom-loads '())
+(put 'fill-comments 'custom-loads '())
+(put 'message-mail 'custom-loads '())
+(put 'windows 'custom-loads '())
+(put 'message-various 'custom-loads '())
+(put 'resize-minibuffer 'custom-loads '())
+(put 'fill 'custom-loads '())
+(put 'debug 'custom-loads '())
+(put 'display 'custom-loads '())
+(put 'diary 'custom-loads '())
+(put 'browse-url 'custom-loads '())
+(put 'message-insertion 'custom-loads '())
+(put 'hyper-apropos 'custom-loads '())
+(put 'vc 'custom-loads '())
+(put 'alloc 'custom-loads '())
+(put 'isearch 'custom-loads '())
+(put 'modeline 'custom-loads '())
+(put 'processes-basics 'custom-loads '())
+(put 'editing 'custom-loads '())
+(put 'matching 'custom-loads '())
+(put 'ps-print-color 'custom-loads '())
+(put 'undo 'custom-loads '())
+(put 'x 'custom-loads '())
diff -r 4de2936b4e77 -r 0132846995bd lisp/ediff/auto-autoloads.el
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lisp/ediff/auto-autoloads.el	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,185 @@
+;;; DO NOT MODIFY THIS FILE
+(if (not (featurep 'ediff-autoloads))
+    (progn
+
+;;;### (autoloads (ediff-show-registry) "ediff-mult" "ediff/ediff-mult.el")
+
+(autoload 'ediff-show-registry "ediff-mult" "\
+Display Ediff's registry." t nil)
+
+(defalias 'eregistry 'ediff-show-registry)
+
+;;;***
+
+;;;### (autoloads (ediff-toggle-use-toolbar ediff-toggle-multiframe) "ediff-util" "ediff/ediff-util.el")
+
+(autoload 'ediff-toggle-multiframe "ediff-util" "\
+Switch from multiframe display to single-frame display and back.
+To change the default, set the variable `ediff-window-setup-function',
+which see." t nil)
+
+(autoload 'ediff-toggle-use-toolbar "ediff-util" "\
+Enable or disable Ediff toolbar.
+Works only in versions of Emacs that support toolbars.
+To change the default, set the variable `ediff-use-toolbar-p', which see." t nil)
+
+;;;***
+
+;;;### (autoloads (ediff-documentation ediff-version ediff-revision ediff-patch-buffer ediff-patch-file run-ediff-from-cvs-buffer ediff-merge-revisions-with-ancestor ediff-merge-revisions ediff-merge-buffers-with-ancestor ediff-merge-buffers ediff-merge-files-with-ancestor ediff-merge-files ediff-regions-linewise ediff-regions-wordwise ediff-windows-linewise ediff-windows-wordwise ediff-merge-directory-revisions-with-ancestor ediff-merge-directory-revisions ediff-merge-directories-with-ancestor ediff-merge-directories ediff-directories3 ediff-directory-revisions ediff-directories ediff-buffers3 ediff-buffers ediff-files3 ediff-files) "ediff" "ediff/ediff.el")
+
+(autoload 'ediff-files "ediff" "\
+Run Ediff on a pair of files, FILE-A and FILE-B." t nil)
+
+(autoload 'ediff-files3 "ediff" "\
+Run Ediff on three files, FILE-A, FILE-B, and FILE-C." t nil)
+
+(defalias 'ediff3 'ediff-files3)
+
+(defalias 'ediff 'ediff-files)
+
+(autoload 'ediff-buffers "ediff" "\
+Run Ediff on a pair of buffers, BUFFER-A and BUFFER-B." t nil)
+
+(defalias 'ebuffers 'ediff-buffers)
+
+(autoload 'ediff-buffers3 "ediff" "\
+Run Ediff on three buffers, BUFFER-A, BUFFER-B, and BUFFER-C." t nil)
+
+(defalias 'ebuffers3 'ediff-buffers3)
+
+(autoload 'ediff-directories "ediff" "\
+Run Ediff on a pair of directories, DIR1 and DIR2, comparing files that have
+the same name in both. The third argument, REGEXP, is a regular expression that
+can be used to filter out certain file names." t nil)
+
+(defalias 'edirs 'ediff-directories)
+
+(autoload 'ediff-directory-revisions "ediff" "\
+Run Ediff on a directory, DIR1, comparing its files with their revisions.
+The second argument, REGEXP, is a regular expression that filters the file
+names. Only the files that are under revision control are taken into account." t nil)
+
+(defalias 'edir-revisions 'ediff-directory-revisions)
+
+(autoload 'ediff-directories3 "ediff" "\
+Run Ediff on three directories, DIR1, DIR2, and DIR3, comparing files that
+have the same name in all three. The last argument, REGEXP, is a regular
+expression that can be used to filter out certain file names." t nil)
+
+(defalias 'edirs3 'ediff-directories3)
+
+(autoload 'ediff-merge-directories "ediff" "\
+Run Ediff on a pair of directories, DIR1 and DIR2, merging files that have
+the same name in both. The third argument, REGEXP, is a regular expression that
+can be used to filter out certain file names." t nil)
+
+(defalias 'edirs-merge 'ediff-merge-directories)
+
+(autoload 'ediff-merge-directories-with-ancestor "ediff" "\
+Merge files in directories DIR1 and DIR2 using files in ANCESTOR-DIR as ancestors.
+Ediff merges files that have identical names in DIR1, DIR2. If a pair of files
+in DIR1 and DIR2 doesn't have an ancestor in ANCESTOR-DIR, Ediff will merge
+without ancestor. The fourth argument, REGEXP, is a regular expression that
+can be used to filter out certain file names." t nil)
+
+(autoload 'ediff-merge-directory-revisions "ediff" "\
+Run Ediff on a directory, DIR1, merging its files with their revisions.
+The second argument, REGEXP, is a regular expression that filters the file
+names. Only the files that are under revision control are taken into account." t nil)
+
+(defalias 'edir-merge-revisions 'ediff-merge-directory-revisions)
+
+(autoload 'ediff-merge-directory-revisions-with-ancestor "ediff" "\
+Run Ediff on a directory, DIR1, merging its files with their revisions and ancestors.
+The second argument, REGEXP, is a regular expression that filters the file
+names. Only the files that are under revision control are taken into account." t nil)
+
+(defalias 'edir-merge-revisions-with-ancestor 'ediff-merge-directory-revisions-with-ancestor)
+
+(defalias 'edirs-merge-with-ancestor 'ediff-merge-directories-with-ancestor)
+
+(autoload 'ediff-windows-wordwise "ediff" "\
+Compare WIND-A and WIND-B, which are selected by clicking, wordwise.
+With prefix argument, DUMB-MODE, or on a non-windowing display, works as
+follows:
+If WIND-A is nil, use selected window.
+If WIND-B is nil, use window next to WIND-A." t nil)
+
+(autoload 'ediff-windows-linewise "ediff" "\
+Compare WIND-A and WIND-B, which are selected by clicking, linewise.
+With prefix argument, DUMB-MODE, or on a non-windowing display, works as
+follows:
+If WIND-A is nil, use selected window.
+If WIND-B is nil, use window next to WIND-A." t nil)
+
+(autoload 'ediff-regions-wordwise "ediff" "\
+Run Ediff on a pair of regions in two different buffers.
+Regions (i.e., point and mark) are assumed to be set in advance.
+This function is effective only for relatively small regions, up to 200
+lines. For large regions, use `ediff-regions-linewise'." t nil)
+
+(autoload 'ediff-regions-linewise "ediff" "\
+Run Ediff on a pair of regions in two different buffers.
+Regions (i.e., point and mark) are assumed to be set in advance.
+Each region is enlarged to contain full lines.
+This function is effective for large regions, over 100-200
+lines. For small regions, use `ediff-regions-wordwise'." t nil)
+
+(defalias 'ediff-merge 'ediff-merge-files)
+
+(autoload 'ediff-merge-files "ediff" "\
+Merge two files without ancestor." t nil)
+
+(autoload 'ediff-merge-files-with-ancestor "ediff" "\
+Merge two files with ancestor." t nil)
+
+(defalias 'ediff-merge-with-ancestor 'ediff-merge-files-with-ancestor)
+
+(autoload 'ediff-merge-buffers "ediff" "\
+Merge buffers without ancestor." t nil)
+
+(autoload 'ediff-merge-buffers-with-ancestor "ediff" "\
+Merge buffers with ancestor." t nil)
+
+(autoload 'ediff-merge-revisions "ediff" "\
+Run Ediff by merging two revisions of a file.
+The file is the optional FILE argument or the file visited by the current
+buffer." t nil)
+
+(autoload 'ediff-merge-revisions-with-ancestor "ediff" "\
+Run Ediff by merging two revisions of a file with a common ancestor.
+The file is the the optional FILE argument or the file visited by the current
+buffer." t nil)
+
+(autoload 'run-ediff-from-cvs-buffer "ediff" "\
+Run Ediff-merge on appropriate revisions of the selected file.
+First run after `M-x cvs-update'. Then place the cursor on a line describing a
+file and then run `run-ediff-from-cvs-buffer'." t nil)
+
+(autoload 'ediff-patch-file "ediff" "\
+Run Ediff by patching SOURCE-FILENAME." t nil)
+
+(autoload 'ediff-patch-buffer "ediff" "\
+Run Ediff by patching BUFFER-NAME." t nil)
+
+(defalias 'epatch 'ediff-patch-file)
+
+(defalias 'epatch-buffer 'ediff-patch-buffer)
+
+(autoload 'ediff-revision "ediff" "\
+Run Ediff by comparing versions of a file.
+The file is an optional FILE argument or the file visited by the current
+buffer. Use `vc.el' or `rcs.el' depending on `ediff-version-control-package'." t nil)
+
+(autoload 'ediff-version "ediff" "\
+Return string describing the version of Ediff.
+When called interactively, displays the version." t nil)
+
+(autoload 'ediff-documentation "ediff" "\
+Display Ediff's manual.
+With optional NODE, goes to that node." t nil)
+
+;;;***
+
+(provide 'ediff-autoloads)
+))
diff -r 4de2936b4e77 -r 0132846995bd lisp/ediff/custom-load.el
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lisp/ediff/custom-load.el	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,72 @@
+(put 'copyright 'custom-loads '())
+(put 'eldoc 'custom-loads '())
+(put 'execute 'custom-loads '())
+(put 'mouse 'custom-loads '())
+(put 'mail-abbrevs 'custom-loads '())
+(put 'etags 'custom-loads '())
+(put 'limits 'custom-loads '())
+(put 'minibuffer 'custom-loads '())
+(put 'environment 'custom-loads '())
+(put 'sound 'custom-loads '())
+(put 'holidays 'custom-loads '())
+(put 'auto-save 'custom-loads '())
+(put 'ispell 'custom-loads '())
+(put 'fortran-indent 'custom-loads '())
+(put 'lpr 'custom-loads '())
+(put 'message-headers 'custom-loads '())
+(put 'tools 'custom-loads '("ediff"))
+(put 'editing-basics 'custom-loads '())
+(put 'internal 'custom-loads '())
+(put 'calendar 'custom-loads '())
+(put 'help-appearance 'custom-loads '())
+(put 'display-time 'custom-loads '())
+(put 'lisp 'custom-loads '())
+(put 'diff 'custom-loads '())
+(put 'ediff-diff 'custom-loads '("ediff-diff"))
+(put 'paren-matching 'custom-loads '())
+(put 'help 'custom-loads '())
+(put 'local 'custom-loads '())
+(put 'keyboard 'custom-loads '())
+(put 'minubuffer 'custom-loads '())
+(put 'message-sending 'custom-loads '())
+(put 'data 'custom-loads '())
+(put 'ps-print 'custom-loads '())
+(put 'ediff-window 'custom-loads '())
+(put 'backup 'custom-loads '())
+(put 'frames 'custom-loads '("ediff-wind"))
+(put 'customize 'custom-loads '())
+(put 'abbrev 'custom-loads '())
+(put 'ediff-ptch 'custom-loads '())
+(put 'toolbar 'custom-loads '())
+(put 'compilation 'custom-loads '())
+(put 'dired 'custom-loads '())
+(put 'killing 'custom-loads '())
+(put 'paren-blinking 'custom-loads '())
+(put 'find-file 'custom-loads '())
+(put 'ediff-merge 'custom-loads '("ediff-merg"))
+(put 'gnuserv 'custom-loads '())
+(put 'maint 'custom-loads '())
+(put 'fill-comments 'custom-loads '())
+(put 'message-mail 'custom-loads '())
+(put 'ediff-mult 'custom-loads '("ediff-mult"))
+(put 'windows 'custom-loads '())
+(put 'message-various 'custom-loads '())
+(put 'resize-minibuffer 'custom-loads '())
+(put 'fill 'custom-loads '())
+(put 'debug 'custom-loads '())
+(put 'display 'custom-loads '())
+(put 'diary 'custom-loads '())
+(put 'browse-url 'custom-loads '())
+(put 'message-insertion 'custom-loads '())
+(put 'hyper-apropos 'custom-loads '())
+(put 'vc 'custom-loads '())
+(put 'alloc 'custom-loads '())
+(put 'isearch 'custom-loads '())
+(put 'modeline 'custom-loads '())
+(put 'processes-basics 'custom-loads '())
+(put 'editing 'custom-loads '())
+(put 'matching 'custom-loads '())
+(put 'ediff 'custom-loads '("ediff-diff" "ediff-merg" "ediff-mult" "ediff-ptch" "ediff-wind" "ediff"))
+(put 'ps-print-color 'custom-loads '())
+(put 'undo 'custom-loads '())
+(put 'x 'custom-loads '())
diff -r 4de2936b4e77 -r 0132846995bd lisp/efs/auto-autoloads.el
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lisp/efs/auto-autoloads.el	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,270 @@
+;;; DO NOT MODIFY THIS FILE
+(if (not (featurep 'efs-autoloads))
+    (progn
+
+;;;### (autoloads nil "default-dir" "efs/default-dir.el")
+
+(defvar default-directory-function nil "\
+A function to call to compute the default-directory for the current buffer.
+If this is nil, the function default-directory will return the value of the
+variable default-directory.
+Buffer local.")
+
+;;;***
+
+;;;### (autoloads (dired-jump-back-other-frame dired-jump-back-other-window dired-jump-back dired-noselect dired-other-frame dired-other-window dired default-directory) "dired" "efs/dired.el")
+
+(autoload 'default-directory "dired" "\
+ Returns the default-directory for the current buffer.
+Will use the variable default-directory-function if it non-nil." nil nil)
+
+(defvar dired-compression-method 'compress "\
+*Type of compression program to use.
+Give as a symbol.
+Currently-recognized methods are: gzip pack compact compress.
+To change this variable use \\[dired-do-compress] with a zero prefix.")
+
+(defvar dired-compression-method-alist '((gzip ".gz" ("gzip") ("gzip" "-d") "-f") (compress ".Z" ("compress" "-f") ("compress" "-d") "-f") (pack ".z" ("pack" "-f") ("unpack")) (compact ".C" ("compact") ("uncompact"))) "\
+*Association list of compression method descriptions.
+ Each element of the table should be a list of the form
+ 
+     (compress-type extension (compress-args) (decompress-args) force-flag)
+ 
+ where 
+   `compress-type' is a unique symbol in the alist to which
+      `dired-compression-method' can be set;
+   `extension' is the file extension (as a string) used by files compressed
+      by this method;
+   `compress-args' is a list of the path of the compression program and
+      flags to pass as separate arguments;
+   `decompress-args' is a list of the path of the decompression
+      program and flags to pass as separate arguments.
+   `force-flag' is the switch to pass to the command to force overwriting
+      of existing files.
+ 
+ For example:
+ 
+   (setq dired-compression-method-alist
+         (cons '(frobnicate \".frob\" (\"frob\") (\"frob\" \"-d\") \"-f\")
+               dired-compression-method-alist))
+   => ((frobnicate \".frob\" (\"frob\") (\"frob\" \"-d\")) 
+       (gzip \".gz\" (\"gzip\") (\"gunzip\"))
+       ...)
+ 
+ See also: dired-compression-method <V>")
+
+(defvar dired-ls-program "ls" "\
+*Absolute or relative name of the ls program used by dired.")
+
+(defvar dired-listing-switches "-al" "\
+*Switches passed to ls for dired. MUST contain the `l' option.
+Can contain even `F', `b', `i' and `s'.")
+
+(defvar dired-chown-program (if (memq system-type '(hpux dgux usg-unix-v linux)) "chown" "/etc/chown") "\
+*Name of chown command (usually `chown' or `/etc/chown').")
+
+(defvar dired-gnutar-program nil "\
+*If non-nil, name of the GNU tar executable (e.g. \"tar\" or \"gnutar\").
+GNU tar's `z' switch is used for compressed tar files.
+If you don't have GNU tar, set this to nil: a pipe using `zcat' is then used.")
+
+(defvar dired-unshar-program nil "\
+*Set to the name of the unshar program, if you have it.")
+
+(defvar dired-local-variables-file ".dired" "\
+*If non-nil, filename for local variables for Dired.
+If Dired finds a file with that name in the current directory, it will
+temporarily insert it into the dired buffer and run `hack-local-variables'.
+
+Type \\[info] and `g' `(emacs)File Variables' `RET' for more info on
+local variables.")
+
+(defvar dired-kept-versions 2 "\
+*When cleaning directory, number of versions to keep.")
+
+(defvar dired-find-subdir nil "\
+*Determines whether dired tries to lookup a subdir in existing buffers.
+If non-nil, dired does not make a new buffer for a directory if it can be
+found (perhaps as subdir) in some existing dired buffer. If there are several
+dired buffers for a directory, then the most recently used one is chosen.
+
+Dired avoids switching to the current buffer, so that if you have
+a normal and a wildcard buffer for the same directory, C-x d RET will
+toggle between those two.")
+
+(defvar dired-use-file-transformers t "\
+*Determines whether dired uses file transformers.
+If non-nil `dired-do-shell-command' will apply file transformers to file names.
+See \\[describe-function] for dired-do-shell-command for more information.")
+
+(defvar dired-dwim-target nil "\
+*If non-nil, dired tries to guess a default target directory.
+This means that if there is a dired buffer displayed in the next window,
+use its current subdir, instead of the current subdir of this dired buffer.
+The target is put in the prompt for file copy, rename, etc.")
+
+(defvar dired-copy-preserve-time nil "\
+*If non-nil, Dired preserves the last-modified time in a file copy.
+\(This works on only some systems.)\\<dired-mode-map>
+Use `\\[dired-do-copy]' with a zero prefix argument to toggle its value.")
+
+(defvar dired-no-confirm nil "\
+*If non-nil, a list of symbols for commands dired should not confirm.
+It can be a sublist of
+
+  '(byte-compile chgrp chmod chown compress copy delete hardlink load
+    move print shell symlink uncompress recursive-delete kill-file-buffer
+    kill-dired-buffer patch create-top-dir revert-subdirs)
+
+The meanings of most of the symbols are obvious.  A few exceptions:
+
+    'compress applies to compression or decompression by any of the 
+     compression program in `dired-compression-method-alist'.
+
+    'kill-dired-buffer applies to offering to kill dired buffers for
+     directories which have been deleted.
+
+    'kill-file-buffer applies to offering to kill buffers visiting files
+     which have been deleted.
+
+    'recursive-delete applies to recursively deleting non-empty
+     directories, and all of their contents.
+
+    'create-top-dir applies to `dired-up-directory' creating a new top level
+     directory for the dired buffer.
+
+    'revert-subdirs applies to re-reading subdirectories which have 
+     been modified on disk.
+
+Note that this list also applies to remote files accessed with efs
+or ange-ftp.")
+
+(defvar dired-backup-if-overwrite nil "\
+*Non-nil if Dired should ask about making backups before overwriting files.
+Special value 'always suppresses confirmation.")
+
+(defvar dired-omit-files nil "\
+*If non-nil un-interesting files will be omitted from this dired buffer.
+Use \\[dired-omit-toggle] to see these files. (buffer local)")
+
+(defvar dired-mail-reader 'rmail "\
+*Mail reader used by dired for dired-read-mail (\\[dired-read-mail]).
+The symbols 'rmail and 'vm are the only two allowed values.")
+
+(defvar dired-refresh-automatically t "\
+*If non-nil, refresh dired buffers automatically after file operations.")
+
+(define-key ctl-x-map "d" 'dired)
+
+(autoload 'dired "dired" "\
+\"Edit\" directory DIRNAME--delete, rename, print, etc. some files in it.
+Optional second argument SWITCHES specifies the `ls' options used.
+\(Interactively, use a prefix argument to be able to specify SWITCHES.)
+Dired displays a list of files in DIRNAME (which may also have
+shell wildcards appended to select certain files).  If DIRNAME is a cons,
+its first element is taken as the directory name and the resr as an explicit
+list of files to make directory entries for.
+\\<dired-mode-map>You can move around in it with the usual commands.
+You can flag files for deletion with \\[dired-flag-file-deletion] and then
+delete them by typing \\[dired-expunge-deletions].
+Type \\[dired-describe-mode] after entering dired for more info.
+
+If DIRNAME is already in a dired buffer, that buffer is used without refresh." t nil)
+
+(define-key ctl-x-4-map "d" 'dired-other-window)
+
+(autoload 'dired-other-window "dired" "\
+\"Edit\" directory DIRNAME.  Like `dired' but selects in another window." t nil)
+
+(define-key ctl-x-5-map "d" 'dired-other-frame)
+
+(autoload 'dired-other-frame "dired" "\
+\"Edit\" directory DIRNAME.  Like `dired' but makes a new frame." t nil)
+
+(autoload 'dired-noselect "dired" "\
+Like `dired' but returns the dired buffer as value, does not select it." nil nil)
+
+(define-key ctl-x-map "\C-j" 'dired-jump-back)
+
+(autoload 'dired-jump-back "dired" "\
+Jump back to dired.
+If in a file, dired the current directory and move to file's line.
+If in dired already, pop up a level and goto old directory's line.
+In case the proper dired file line cannot be found, refresh the dired
+  buffer and try again." t nil)
+
+(define-key ctl-x-4-map "\C-j" 'dired-jump-back-other-window)
+
+(autoload 'dired-jump-back-other-window "dired" "\
+Like \\[dired-jump-back], but to other window." t nil)
+
+(define-key ctl-x-5-map "\C-j" 'dired-jump-back-other-frame)
+
+(autoload 'dired-jump-back-other-frame "dired" "\
+Like \\[dired-jump-back], but in another frame." t nil)
+
+;;;***
+
+;;;### (autoloads (efs-ftp-path) "efs-cu" "efs/efs-cu.el")
+
+(defvar efs-path-root-regexp "^/[^/:]+:" "\
+Regexp to match the `/user@host:' root of an efs full path.")
+
+(autoload 'efs-ftp-path "efs-cu" "\
+Parse PATH according to efs-path-regexp.
+Returns a list (HOST USER PATH), or nil if PATH does not match the format." nil nil)
+
+;;;***
+
+;;;### (autoloads (remote-path-file-handler-function) "efs-dump" "efs/efs-dump.el")
+
+(or (assoc efs-path-root-regexp file-name-handler-alist) (setq file-name-handler-alist (cons (cons efs-path-root-regexp 'remote-path-file-handler-function) file-name-handler-alist)))
+
+(autoload 'remote-path-file-handler-function "efs-dump" "\
+Function to call special file handlers for remote files." nil nil)
+
+;;;***
+
+;;;### (autoloads nil "efs-fnh" "efs/efs-fnh.el")
+
+(defvar allow-remote-paths t "\
+*Set this to nil if you don't want remote paths to access
+remote files.")
+
+;;;***
+
+;;;### (autoloads (efs-root-file-name-completion efs-root-file-name-all-completions efs-set-passwd) "efs-netrc" "efs/efs-netrc.el")
+
+(autoload 'efs-set-passwd "efs-netrc" "\
+For a given HOST and USER, set or change the associated PASSWORD." t nil)
+
+(autoload 'efs-root-file-name-all-completions "efs-netrc" nil nil nil)
+
+(autoload 'efs-root-file-name-completion "efs-netrc" nil nil nil)
+
+;;;***
+
+;;;### (autoloads (efs-report-bug) "efs-report" "efs/efs-report.el")
+
+(autoload 'efs-report-bug "efs-report" "\
+Submit a bug report for efs." t nil)
+
+;;;***
+
+;;;### (autoloads (efs-file-handler-function efs-nslookup-host efs-display-ftp-activity) "efs" "efs/efs.el")
+
+(autoload 'efs-display-ftp-activity "efs" "\
+Displays the number of active background ftp sessions in the modeline.
+Uses the variable `efs-mode-line-format' to determine how this will be
+displayed." t nil)
+
+(autoload 'efs-nslookup-host "efs" "\
+Attempt to resolve the given HOSTNAME using nslookup if possible." t nil)
+
+(autoload 'efs-file-handler-function "efs" "\
+Function to call special file handlers for remote files." nil nil)
+
+;;;***
+
+(provide 'efs-autoloads)
+))
diff -r 4de2936b4e77 -r 0132846995bd lisp/efs/custom-load.el
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lisp/efs/custom-load.el	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,65 @@
+(put 'copyright 'custom-loads '())
+(put 'eldoc 'custom-loads '())
+(put 'execute 'custom-loads '())
+(put 'mouse 'custom-loads '())
+(put 'mail-abbrevs 'custom-loads '())
+(put 'etags 'custom-loads '())
+(put 'limits 'custom-loads '())
+(put 'minibuffer 'custom-loads '())
+(put 'environment 'custom-loads '("dired-faces"))
+(put 'sound 'custom-loads '())
+(put 'holidays 'custom-loads '())
+(put 'auto-save 'custom-loads '())
+(put 'ispell 'custom-loads '())
+(put 'fortran-indent 'custom-loads '())
+(put 'lpr 'custom-loads '())
+(put 'message-headers 'custom-loads '())
+(put 'editing-basics 'custom-loads '())
+(put 'internal 'custom-loads '())
+(put 'calendar 'custom-loads '())
+(put 'help-appearance 'custom-loads '())
+(put 'display-time 'custom-loads '())
+(put 'lisp 'custom-loads '())
+(put 'diff 'custom-loads '())
+(put 'paren-matching 'custom-loads '())
+(put 'help 'custom-loads '())
+(put 'local 'custom-loads '())
+(put 'keyboard 'custom-loads '())
+(put 'minubuffer 'custom-loads '())
+(put 'message-sending 'custom-loads '())
+(put 'data 'custom-loads '())
+(put 'ps-print 'custom-loads '())
+(put 'backup 'custom-loads '())
+(put 'frames 'custom-loads '())
+(put 'customize 'custom-loads '())
+(put 'abbrev 'custom-loads '())
+(put 'toolbar 'custom-loads '())
+(put 'compilation 'custom-loads '())
+(put 'dired 'custom-loads '("dired-faces"))
+(put 'killing 'custom-loads '())
+(put 'paren-blinking 'custom-loads '())
+(put 'find-file 'custom-loads '())
+(put 'gnuserv 'custom-loads '())
+(put 'maint 'custom-loads '())
+(put 'fill-comments 'custom-loads '())
+(put 'message-mail 'custom-loads '())
+(put 'windows 'custom-loads '())
+(put 'message-various 'custom-loads '())
+(put 'resize-minibuffer 'custom-loads '())
+(put 'fill 'custom-loads '())
+(put 'debug 'custom-loads '())
+(put 'display 'custom-loads '())
+(put 'diary 'custom-loads '())
+(put 'browse-url 'custom-loads '())
+(put 'message-insertion 'custom-loads '())
+(put 'hyper-apropos 'custom-loads '())
+(put 'vc 'custom-loads '())
+(put 'alloc 'custom-loads '())
+(put 'isearch 'custom-loads '())
+(put 'modeline 'custom-loads '())
+(put 'processes-basics 'custom-loads '())
+(put 'editing 'custom-loads '())
+(put 'matching 'custom-loads '())
+(put 'ps-print-color 'custom-loads '())
+(put 'undo 'custom-loads '())
+(put 'x 'custom-loads '())
diff -r 4de2936b4e77 -r 0132846995bd lisp/efs/dired-xemacs.el
--- a/lisp/efs/dired-xemacs.el	Mon Aug 13 09:42:28 2007 +0200
+++ b/lisp/efs/dired-xemacs.el	Mon Aug 13 09:43:35 2007 +0200
@@ -566,10 +566,11 @@
 	 (failure (apply (function dired-check-process)
 			 operation
 			 "chmod" new-attribute (list file))))
-    (dired-do-redisplay) 
+    (dired-do-redisplay)
     (if failure
 	(dired-log-summary (buffer-name (current-buffer))
-			   (format "%s: error" operation) nil))))
+			   (format "%s: error" operation) nil)
+      (forward-char 1))))
 
 (defun dired-chmod-popup-menu (event menu)
   (save-excursion
diff -r 4de2936b4e77 -r 0132846995bd lisp/egg/custom-load.el
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lisp/egg/custom-load.el	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,57 @@
+(put 'copyright 'custom-loads '())
+(put 'eldoc 'custom-loads '())
+(put 'execute 'custom-loads '())
+(put 'mouse 'custom-loads '())
+(put 'mail-abbrevs 'custom-loads '())
+(put 'etags 'custom-loads '())
+(put 'limits 'custom-loads '())
+(put 'minibuffer 'custom-loads '())
+(put 'environment 'custom-loads '())
+(put 'sound 'custom-loads '())
+(put 'holidays 'custom-loads '())
+(put 'auto-save 'custom-loads '())
+(put 'ispell 'custom-loads '())
+(put 'fortran-indent 'custom-loads '())
+(put 'lpr 'custom-loads '())
+(put 'message-headers 'custom-loads '())
+(put 'editing-basics 'custom-loads '())
+(put 'internal 'custom-loads '())
+(put 'calendar 'custom-loads '())
+(put 'help-appearance 'custom-loads '())
+(put 'display-time 'custom-loads '())
+(put 'diff 'custom-loads '())
+(put 'paren-matching 'custom-loads '())
+(put 'help 'custom-loads '())
+(put 'local 'custom-loads '())
+(put 'keyboard 'custom-loads '())
+(put 'minubuffer 'custom-loads '())
+(put 'message-sending 'custom-loads '())
+(put 'data 'custom-loads '())
+(put 'ps-print 'custom-loads '())
+(put 'frames 'custom-loads '())
+(put 'abbrev 'custom-loads '())
+(put 'toolbar 'custom-loads '())
+(put 'compilation 'custom-loads '())
+(put 'killing 'custom-loads '())
+(put 'paren-blinking 'custom-loads '())
+(put 'gnuserv 'custom-loads '())
+(put 'maint 'custom-loads '())
+(put 'message-mail 'custom-loads '())
+(put 'windows 'custom-loads '())
+(put 'message-various 'custom-loads '())
+(put 'resize-minibuffer 'custom-loads '())
+(put 'fill 'custom-loads '())
+(put 'debug 'custom-loads '())
+(put 'display 'custom-loads '())
+(put 'diary 'custom-loads '())
+(put 'browse-url 'custom-loads '())
+(put 'message-insertion 'custom-loads '())
+(put 'hyper-apropos 'custom-loads '())
+(put 'alloc 'custom-loads '())
+(put 'isearch 'custom-loads '())
+(put 'modeline 'custom-loads '())
+(put 'processes-basics 'custom-loads '())
+(put 'editing 'custom-loads '())
+(put 'matching 'custom-loads '())
+(put 'ps-print-color 'custom-loads '())
+(put 'x 'custom-loads '())
diff -r 4de2936b4e77 -r 0132846995bd lisp/electric/auto-autoloads.el
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lisp/electric/auto-autoloads.el	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,98 @@
+;;; DO NOT MODIFY THIS FILE
+(if (not (featurep 'electric-autoloads))
+    (progn
+
+;;;### (autoloads (electric-buffer-list) "ebuff-menu" "electric/ebuff-menu.el")
+
+(autoload 'electric-buffer-list "ebuff-menu" "\
+Pops up a buffer describing the set of Emacs buffers.
+Vaguely like ITS lunar select buffer; combining typeoutoid buffer
+listing with menuoid buffer selection.
+
+If the very next character typed is a space then the buffer list
+window disappears.  Otherwise, one may move around in the buffer list
+window, marking buffers to be selected, saved or deleted.
+
+To exit and select a new buffer, type a space when the cursor is on
+the appropriate line of the buffer-list window.  Other commands are
+much like those of buffer-menu-mode.
+
+Calls value of `electric-buffer-menu-mode-hook' on entry if non-nil.
+
+Non-null optional arg FILES-ONLY means mention only file buffers.
+When called from Lisp code, FILES-ONLY may be a regular expression,
+in which case only buffers whose names match that expression are listed,
+or an arbitrary predicate function.
+
+\\{electric-buffer-menu-mode-map}" t nil)
+
+;;;***
+
+;;;### (autoloads (electric-command-history Electric-command-history-redo-expression) "echistory" "electric/echistory.el")
+
+(autoload 'Electric-command-history-redo-expression "echistory" "\
+Edit current history line in minibuffer and execute result.
+With prefix arg NOCONFIRM, execute current line as-is without editing." t nil)
+
+(autoload 'electric-command-history "echistory" "\
+\\<electric-history-map>Major mode for examining and redoing commands from `command-history'.
+This pops up a window with the Command History listing.
+The number of command listed is controlled by `list-command-history-max'.
+The command history is filtered by `list-command-history-filter' if non-nil.
+Combines typeout Command History list window with menu like selection
+of an expression from the history for re-evaluation in the *original* buffer.
+
+The history displayed is filtered by `list-command-history-filter' if non-nil.
+
+Like Emacs-Lisp mode except that characters do not insert themselves and
+Tab and Linefeed do not indent.  Instead these commands are provided:
+\\{electric-history-map}
+
+Calls the value of `electric-command-history-hook' if that is non-nil.
+The Command History listing is recomputed each time this mode is invoked." t nil)
+
+;;;***
+
+;;;### (autoloads (electric-helpify with-electric-help) "ehelp" "electric/ehelp.el")
+
+(autoload 'with-electric-help "ehelp" "\
+Pop up an \"electric\" help buffer.
+The arguments are THUNK &optional BUFFER NOERASE MINHEIGHT.
+THUNK is a function of no arguments which is called to initialize the
+contents of BUFFER.  BUFFER defaults to `*Help*'.  BUFFER will be
+erased before THUNK is called unless NOERASE is non-nil.  THUNK will
+be called while BUFFER is current and with `standard-output' bound to
+the buffer specified by BUFFER.
+
+If THUNK returns nil, we display BUFFER starting at the top, and
+shrink the window to fit.  If THUNK returns non-nil, we don't do those things.
+
+After THUNK has been called, this function \"electrically\" pops up a window
+in which BUFFER is displayed and allows the user to scroll through that buffer
+in electric-help-mode. The window's height will be at least MINHEIGHT if
+this value is non-nil.
+
+If THUNK returns nil, we display BUFFER starting at the top, and
+shrink the window to fit.  If THUNK returns non-nil, we don't do those
+things.
+
+When the user exits (with `electric-help-exit', or otherwise) the help
+buffer's window disappears (i.e., we use `save-window-excursion')
+BUFFER is put into `default-major-mode' (or `fundamental-mode') when we exit." nil nil)
+
+(autoload 'electric-helpify "ehelp" nil nil nil)
+
+;;;***
+
+;;;### (autoloads (Helper-help Helper-describe-bindings) "helper" "electric/helper.el")
+
+(autoload 'Helper-describe-bindings "helper" "\
+Describe local key bindings of current mode." t nil)
+
+(autoload 'Helper-help "helper" "\
+Provide help for current mode." t nil)
+
+;;;***
+
+(provide 'electric-autoloads)
+))
diff -r 4de2936b4e77 -r 0132846995bd lisp/electric/custom-load.el
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lisp/electric/custom-load.el	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,65 @@
+(put 'copyright 'custom-loads '())
+(put 'eldoc 'custom-loads '())
+(put 'execute 'custom-loads '())
+(put 'mouse 'custom-loads '())
+(put 'mail-abbrevs 'custom-loads '())
+(put 'etags 'custom-loads '())
+(put 'limits 'custom-loads '())
+(put 'minibuffer 'custom-loads '())
+(put 'environment 'custom-loads '())
+(put 'sound 'custom-loads '())
+(put 'holidays 'custom-loads '())
+(put 'auto-save 'custom-loads '())
+(put 'ispell 'custom-loads '())
+(put 'fortran-indent 'custom-loads '())
+(put 'lpr 'custom-loads '())
+(put 'message-headers 'custom-loads '())
+(put 'editing-basics 'custom-loads '())
+(put 'internal 'custom-loads '())
+(put 'calendar 'custom-loads '())
+(put 'help-appearance 'custom-loads '())
+(put 'display-time 'custom-loads '())
+(put 'lisp 'custom-loads '())
+(put 'diff 'custom-loads '())
+(put 'paren-matching 'custom-loads '())
+(put 'help 'custom-loads '())
+(put 'local 'custom-loads '())
+(put 'keyboard 'custom-loads '())
+(put 'minubuffer 'custom-loads '())
+(put 'message-sending 'custom-loads '())
+(put 'data 'custom-loads '())
+(put 'ps-print 'custom-loads '())
+(put 'backup 'custom-loads '())
+(put 'frames 'custom-loads '())
+(put 'customize 'custom-loads '())
+(put 'abbrev 'custom-loads '())
+(put 'toolbar 'custom-loads '())
+(put 'compilation 'custom-loads '())
+(put 'dired 'custom-loads '())
+(put 'killing 'custom-loads '())
+(put 'paren-blinking 'custom-loads '())
+(put 'find-file 'custom-loads '())
+(put 'gnuserv 'custom-loads '())
+(put 'maint 'custom-loads '())
+(put 'fill-comments 'custom-loads '())
+(put 'message-mail 'custom-loads '())
+(put 'windows 'custom-loads '())
+(put 'message-various 'custom-loads '())
+(put 'resize-minibuffer 'custom-loads '())
+(put 'fill 'custom-loads '())
+(put 'debug 'custom-loads '())
+(put 'display 'custom-loads '())
+(put 'diary 'custom-loads '())
+(put 'browse-url 'custom-loads '())
+(put 'message-insertion 'custom-loads '())
+(put 'hyper-apropos 'custom-loads '())
+(put 'vc 'custom-loads '())
+(put 'alloc 'custom-loads '())
+(put 'isearch 'custom-loads '())
+(put 'modeline 'custom-loads '())
+(put 'processes-basics 'custom-loads '())
+(put 'editing 'custom-loads '())
+(put 'matching 'custom-loads '())
+(put 'ps-print-color 'custom-loads '())
+(put 'undo 'custom-loads '())
+(put 'x 'custom-loads '())
diff -r 4de2936b4e77 -r 0132846995bd lisp/emulators/auto-autoloads.el
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lisp/emulators/auto-autoloads.el	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,154 @@
+;;; DO NOT MODIFY THIS FILE
+(if (not (featurep 'emulators-autoloads))
+    (progn
+
+;;;### (autoloads (edt-emulation-on) "edt" "emulators/edt.el")
+
+(autoload 'edt-emulation-on "edt" "\
+Turn on EDT Emulation." t nil)
+
+;;;***
+
+;;;### (autoloads (teco-command) "teco" "emulators/teco.el")
+
+(autoload 'teco-command "teco" "\
+Read and execute a Teco command string." t nil)
+
+;;;***
+
+;;;### (autoloads (tpu-edt-on) "tpu-edt" "emulators/tpu-edt.el")
+
+(fset 'tpu-edt-mode 'tpu-edt-on)
+
+(fset 'tpu-edt 'tpu-edt-on)
+
+(autoload 'tpu-edt-on "tpu-edt" "\
+Turn on TPU/edt emulation." t nil)
+
+;;;***
+
+;;;### (autoloads (tpu-set-cursor-bound tpu-set-cursor-free tpu-set-scroll-margins) "tpu-extras" "emulators/tpu-extras.el")
+
+(autoload 'tpu-set-scroll-margins "tpu-extras" "\
+Set scroll margins." t nil)
+
+(autoload 'tpu-set-cursor-free "tpu-extras" "\
+Allow the cursor to move freely about the screen." t nil)
+
+(autoload 'tpu-set-cursor-bound "tpu-extras" "\
+Constrain the cursor to the flow of the text." t nil)
+
+;;;***
+
+;;;### (autoloads (wordstar-mode) "ws-mode" "emulators/ws-mode.el")
+
+(autoload 'wordstar-mode "ws-mode" "\
+Major mode with WordStar-like key bindings.
+
+BUGS:
+ - Help menus with WordStar commands (C-j just calls help-for-help)
+   are not implemented
+ - Options for search and replace
+ - Show markers (C-k h) is somewhat strange
+ - Search and replace (C-q a) is only available in forward direction
+
+No key bindings beginning with ESC are installed, they will work
+Emacs-like.
+
+The key bindings are:
+
+  C-a		backward-word
+  C-b		fill-paragraph
+  C-c		scroll-up-line
+  C-d		forward-char
+  C-e		previous-line
+  C-f		forward-word
+  C-g		delete-char
+  C-h		backward-char
+  C-i		indent-for-tab-command
+  C-j		help-for-help
+  C-k		ordstar-C-k-map
+  C-l		ws-repeat-search
+  C-n		open-line
+  C-p		quoted-insert
+  C-r		scroll-down-line
+  C-s		backward-char
+  C-t		kill-word
+  C-u		keyboard-quit
+  C-v		overwrite-mode
+  C-w		scroll-down
+  C-x		next-line
+  C-y		kill-complete-line
+  C-z		scroll-up
+
+  C-k 0		ws-set-marker-0
+  C-k 1		ws-set-marker-1
+  C-k 2		ws-set-marker-2
+  C-k 3		ws-set-marker-3
+  C-k 4		ws-set-marker-4
+  C-k 5		ws-set-marker-5
+  C-k 6		ws-set-marker-6
+  C-k 7		ws-set-marker-7
+  C-k 8		ws-set-marker-8
+  C-k 9		ws-set-marker-9
+  C-k b		ws-begin-block
+  C-k c		ws-copy-block
+  C-k d		save-buffers-kill-emacs
+  C-k f		find-file
+  C-k h		ws-show-markers
+  C-k i		ws-indent-block
+  C-k k		ws-end-block
+  C-k p		ws-print-block
+  C-k q		kill-emacs
+  C-k r		insert-file
+  C-k s		save-some-buffers
+  C-k t		ws-mark-word
+  C-k u		ws-exdent-block
+  C-k C-u	keyboard-quit
+  C-k v		ws-move-block
+  C-k w		ws-write-block
+  C-k x		kill-emacs
+  C-k y		ws-delete-block
+
+  C-o c		wordstar-center-line
+  C-o b		switch-to-buffer
+  C-o j		justify-current-line
+  C-o k		kill-buffer
+  C-o l		list-buffers
+  C-o m		auto-fill-mode
+  C-o r		set-fill-column
+  C-o C-u	keyboard-quit
+  C-o wd	delete-other-windows
+  C-o wh	split-window-horizontally
+  C-o wo	other-window
+  C-o wv	split-window-vertically
+
+  C-q 0		ws-find-marker-0
+  C-q 1		ws-find-marker-1
+  C-q 2		ws-find-marker-2
+  C-q 3		ws-find-marker-3
+  C-q 4		ws-find-marker-4
+  C-q 5		ws-find-marker-5
+  C-q 6		ws-find-marker-6
+  C-q 7		ws-find-marker-7
+  C-q 8		ws-find-marker-8
+  C-q 9		ws-find-marker-9
+  C-q a		ws-query-replace
+  C-q b		ws-to-block-begin
+  C-q c		end-of-buffer
+  C-q d		end-of-line
+  C-q f		ws-search
+  C-q k		ws-to-block-end
+  C-q l		ws-undo
+  C-q p		ws-last-cursorp
+  C-q r		beginning-of-buffer
+  C-q C-u	keyboard-quit
+  C-q w		ws-last-error
+  C-q y		ws-kill-eol
+  C-q DEL	ws-kill-bol
+" t nil)
+
+;;;***
+
+(provide 'emulators-autoloads)
+))
diff -r 4de2936b4e77 -r 0132846995bd lisp/emulators/custom-load.el
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lisp/emulators/custom-load.el	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,65 @@
+(put 'copyright 'custom-loads '())
+(put 'eldoc 'custom-loads '())
+(put 'execute 'custom-loads '())
+(put 'mouse 'custom-loads '())
+(put 'mail-abbrevs 'custom-loads '())
+(put 'etags 'custom-loads '())
+(put 'limits 'custom-loads '())
+(put 'minibuffer 'custom-loads '())
+(put 'environment 'custom-loads '())
+(put 'sound 'custom-loads '())
+(put 'holidays 'custom-loads '())
+(put 'auto-save 'custom-loads '())
+(put 'ispell 'custom-loads '())
+(put 'fortran-indent 'custom-loads '())
+(put 'lpr 'custom-loads '())
+(put 'message-headers 'custom-loads '())
+(put 'editing-basics 'custom-loads '())
+(put 'internal 'custom-loads '())
+(put 'calendar 'custom-loads '())
+(put 'help-appearance 'custom-loads '())
+(put 'display-time 'custom-loads '())
+(put 'lisp 'custom-loads '())
+(put 'diff 'custom-loads '())
+(put 'paren-matching 'custom-loads '())
+(put 'help 'custom-loads '())
+(put 'local 'custom-loads '())
+(put 'keyboard 'custom-loads '())
+(put 'minubuffer 'custom-loads '())
+(put 'message-sending 'custom-loads '())
+(put 'data 'custom-loads '())
+(put 'ps-print 'custom-loads '())
+(put 'backup 'custom-loads '())
+(put 'frames 'custom-loads '())
+(put 'customize 'custom-loads '())
+(put 'abbrev 'custom-loads '())
+(put 'toolbar 'custom-loads '())
+(put 'compilation 'custom-loads '())
+(put 'dired 'custom-loads '())
+(put 'killing 'custom-loads '())
+(put 'paren-blinking 'custom-loads '())
+(put 'find-file 'custom-loads '())
+(put 'gnuserv 'custom-loads '())
+(put 'maint 'custom-loads '())
+(put 'fill-comments 'custom-loads '())
+(put 'message-mail 'custom-loads '())
+(put 'windows 'custom-loads '())
+(put 'message-various 'custom-loads '())
+(put 'resize-minibuffer 'custom-loads '())
+(put 'fill 'custom-loads '())
+(put 'debug 'custom-loads '())
+(put 'display 'custom-loads '())
+(put 'diary 'custom-loads '())
+(put 'browse-url 'custom-loads '())
+(put 'message-insertion 'custom-loads '())
+(put 'hyper-apropos 'custom-loads '())
+(put 'vc 'custom-loads '())
+(put 'alloc 'custom-loads '())
+(put 'isearch 'custom-loads '())
+(put 'modeline 'custom-loads '())
+(put 'processes-basics 'custom-loads '())
+(put 'editing 'custom-loads '())
+(put 'matching 'custom-loads '())
+(put 'ps-print-color 'custom-loads '())
+(put 'undo 'custom-loads '())
+(put 'x 'custom-loads '())
diff -r 4de2936b4e77 -r 0132846995bd lisp/eos/custom-load.el
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lisp/eos/custom-load.el	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,65 @@
+(put 'copyright 'custom-loads '())
+(put 'eldoc 'custom-loads '())
+(put 'execute 'custom-loads '())
+(put 'mouse 'custom-loads '())
+(put 'mail-abbrevs 'custom-loads '())
+(put 'etags 'custom-loads '())
+(put 'limits 'custom-loads '())
+(put 'minibuffer 'custom-loads '())
+(put 'environment 'custom-loads '())
+(put 'sound 'custom-loads '())
+(put 'holidays 'custom-loads '())
+(put 'auto-save 'custom-loads '())
+(put 'ispell 'custom-loads '())
+(put 'fortran-indent 'custom-loads '())
+(put 'lpr 'custom-loads '())
+(put 'message-headers 'custom-loads '())
+(put 'editing-basics 'custom-loads '())
+(put 'internal 'custom-loads '())
+(put 'calendar 'custom-loads '())
+(put 'help-appearance 'custom-loads '())
+(put 'display-time 'custom-loads '())
+(put 'lisp 'custom-loads '())
+(put 'diff 'custom-loads '())
+(put 'paren-matching 'custom-loads '())
+(put 'help 'custom-loads '())
+(put 'local 'custom-loads '())
+(put 'keyboard 'custom-loads '())
+(put 'minubuffer 'custom-loads '())
+(put 'message-sending 'custom-loads '())
+(put 'data 'custom-loads '())
+(put 'ps-print 'custom-loads '())
+(put 'backup 'custom-loads '())
+(put 'frames 'custom-loads '())
+(put 'customize 'custom-loads '())
+(put 'abbrev 'custom-loads '())
+(put 'toolbar 'custom-loads '())
+(put 'compilation 'custom-loads '())
+(put 'dired 'custom-loads '())
+(put 'killing 'custom-loads '())
+(put 'paren-blinking 'custom-loads '())
+(put 'find-file 'custom-loads '())
+(put 'gnuserv 'custom-loads '())
+(put 'maint 'custom-loads '())
+(put 'fill-comments 'custom-loads '())
+(put 'message-mail 'custom-loads '())
+(put 'windows 'custom-loads '())
+(put 'message-various 'custom-loads '())
+(put 'resize-minibuffer 'custom-loads '())
+(put 'fill 'custom-loads '())
+(put 'debug 'custom-loads '())
+(put 'display 'custom-loads '())
+(put 'diary 'custom-loads '())
+(put 'browse-url 'custom-loads '())
+(put 'message-insertion 'custom-loads '())
+(put 'hyper-apropos 'custom-loads '())
+(put 'vc 'custom-loads '())
+(put 'alloc 'custom-loads '())
+(put 'isearch 'custom-loads '())
+(put 'modeline 'custom-loads '())
+(put 'processes-basics 'custom-loads '())
+(put 'editing 'custom-loads '())
+(put 'matching 'custom-loads '())
+(put 'ps-print-color 'custom-loads '())
+(put 'undo 'custom-loads '())
+(put 'x 'custom-loads '())
diff -r 4de2936b4e77 -r 0132846995bd lisp/eterm/auto-autoloads.el
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lisp/eterm/auto-autoloads.el	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,89 @@
+;;; DO NOT MODIFY THIS FILE
+(if (not (featurep 'eterm-autoloads))
+    (progn
+
+;;;### (autoloads (term make-term) "term" "eterm/term.el")
+
+(autoload 'make-term "term" "\
+Make a term process NAME in a buffer, running PROGRAM.
+The name of the buffer is made by surrounding NAME with `*'s.
+If there is already a running process in that buffer, it is not restarted.
+Optional third arg STARTFILE is the name of a file to send the contents of to 
+the process.  Any more args are arguments to PROGRAM." nil nil)
+
+(autoload 'term "term" "\
+Start a terminal-emulator in a new buffer." t nil)
+
+;;;***
+
+;;;### (autoloads (tperldb txdb tdbx tsdb tgdb) "tgud" "eterm/tgud.el")
+
+(autoload 'tgdb "tgud" "\
+Run gdb on program FILE in buffer *tgud-FILE*.
+The directory containing FILE becomes the initial working directory
+and source-file directory for your debugger." t nil)
+
+(autoload 'tsdb "tgud" "\
+Run sdb on program FILE in buffer *tgud-FILE*.
+The directory containing FILE becomes the initial working directory
+and source-file directory for your debugger." t nil)
+
+(autoload 'tdbx "tgud" "\
+Run dbx on program FILE in buffer *tgud-FILE*.
+The directory containing FILE becomes the initial working directory
+and source-file directory for your debugger." t nil)
+
+(autoload 'txdb "tgud" "\
+Run xdb on program FILE in buffer *tgud-FILE*.
+The directory containing FILE becomes the initial working directory
+and source-file directory for your debugger.
+
+You can set the variable 'tgud-xdb-directories' to a list of program source
+directories if your program contains sources from more than one directory." t nil)
+
+(autoload 'tperldb "tgud" "\
+Run perldb on program FILE in buffer *tgud-FILE*.
+The directory containing FILE becomes the initial working directory
+and source-file directory for your debugger." t nil)
+
+;;;***
+
+;;;### (autoloads (tshell) "tshell" "eterm/tshell.el")
+
+(defvar tshell-prompt-pattern "^[^#$%>\n]*[#$%>] *" "\
+Regexp to match prompts in the inferior shell.
+Defaults to \"^[^#$%>\\n]*[#$%>] *\", which works pretty well.
+This variable is used to initialise `term-prompt-regexp' in the 
+shell buffer.
+
+The pattern should probably not match more than one line.  If it does,
+tshell-mode may become confused trying to distinguish prompt from input
+on lines which don't start with a prompt.
+
+This is a fine thing to set in your `.emacs' file.")
+
+(autoload 'tshell "tshell" "\
+Run an inferior shell, with I/O through buffer *shell*.
+If buffer exists but shell process is not running, make new shell.
+If buffer exists and shell process is running, just switch to buffer `*shell*'.
+Program used comes from variable `explicit-shell-file-name',
+ or (if that is nil) from the ESHELL environment variable,
+ or else from SHELL if there is no ESHELL.
+If a file `~/.emacs_SHELLNAME' exists, it is given as initial input
+ (Note that this may lose due to a timing error if the shell
+  discards input when it starts up.)
+The buffer is put in Tshell mode, giving commands for sending input
+and controlling the subjobs of the shell.  See `tshell-mode'.
+See also the variable `tshell-prompt-pattern'.
+
+The shell file name (sans directories) is used to make a symbol name
+such as `explicit-csh-args'.  If that symbol is a variable,
+its value is used as a list of arguments when invoking the shell.
+Otherwise, one argument `-i' is passed to the shell.
+
+\(Type \\[describe-mode] in the shell buffer for a list of commands.)" t nil)
+
+;;;***
+
+(provide 'eterm-autoloads)
+))
diff -r 4de2936b4e77 -r 0132846995bd lisp/eterm/custom-load.el
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lisp/eterm/custom-load.el	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,68 @@
+(put 'copyright 'custom-loads '())
+(put 'eldoc 'custom-loads '())
+(put 'execute 'custom-loads '())
+(put 'mouse 'custom-loads '())
+(put 'mail-abbrevs 'custom-loads '())
+(put 'etags 'custom-loads '())
+(put 'limits 'custom-loads '())
+(put 'minibuffer 'custom-loads '())
+(put 'environment 'custom-loads '())
+(put 'sound 'custom-loads '())
+(put 'holidays 'custom-loads '())
+(put 'auto-save 'custom-loads '())
+(put 'ispell 'custom-loads '())
+(put 'fortran-indent 'custom-loads '())
+(put 'lpr 'custom-loads '())
+(put 'message-headers 'custom-loads '())
+(put 'editing-basics 'custom-loads '())
+(put 'internal 'custom-loads '())
+(put 'calendar 'custom-loads '())
+(put 'help-appearance 'custom-loads '())
+(put 'display-time 'custom-loads '())
+(put 'lisp 'custom-loads '())
+(put 'diff 'custom-loads '())
+(put 'paren-matching 'custom-loads '())
+(put 'term 'custom-loads '("term"))
+(put 'help 'custom-loads '())
+(put 'local 'custom-loads '())
+(put 'keyboard 'custom-loads '())
+(put 'minubuffer 'custom-loads '())
+(put 'message-sending 'custom-loads '())
+(put 'data 'custom-loads '())
+(put 'ps-print 'custom-loads '())
+(put 'backup 'custom-loads '())
+(put 'frames 'custom-loads '())
+(put 'customize 'custom-loads '())
+(put 'abbrev 'custom-loads '())
+(put 'toolbar 'custom-loads '())
+(put 'compilation 'custom-loads '())
+(put 'dired 'custom-loads '())
+(put 'killing 'custom-loads '())
+(put 'paren-blinking 'custom-loads '())
+(put 'find-file 'custom-loads '())
+(put 'gnuserv 'custom-loads '())
+(put 'maint 'custom-loads '())
+(put 'fill-comments 'custom-loads '())
+(put 'message-mail 'custom-loads '())
+(put 'windows 'custom-loads '())
+(put 'message-various 'custom-loads '())
+(put 'resize-minibuffer 'custom-loads '())
+(put 'fill 'custom-loads '())
+(put 'debug 'custom-loads '())
+(put 'display 'custom-loads '())
+(put 'diary 'custom-loads '())
+(put 'browse-url 'custom-loads '())
+(put 'processes 'custom-loads '("term"))
+(put 'message-insertion 'custom-loads '())
+(put 'hyper-apropos 'custom-loads '())
+(put 'vc 'custom-loads '())
+(put 'alloc 'custom-loads '())
+(put 'isearch 'custom-loads '())
+(put 'modeline 'custom-loads '())
+(put 'processes-basics 'custom-loads '())
+(put 'editing 'custom-loads '())
+(put 'matching 'custom-loads '())
+(put 'ps-print-color 'custom-loads '())
+(put 'unix 'custom-loads '("term"))
+(put 'undo 'custom-loads '())
+(put 'x 'custom-loads '())
diff -r 4de2936b4e77 -r 0132846995bd lisp/games/auto-autoloads.el
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lisp/games/auto-autoloads.el	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,322 @@
+;;; DO NOT MODIFY THIS FILE
+(if (not (featurep 'games-autoloads))
+    (progn
+
+;;;### (autoloads (blackbox) "blackbox" "games/blackbox.el")
+
+(autoload 'blackbox "blackbox" "\
+Play blackbox.  Optional prefix argument is the number of balls;
+the default is 4.
+
+What is blackbox?
+
+Blackbox is a game of hide and seek played on an 8 by 8 grid (the
+Blackbox).  Your opponent (Emacs, in this case) has hidden several
+balls (usually 4) within this box.  By shooting rays into the box and
+observing where they emerge it is possible to deduce the positions of
+the hidden balls.  The fewer rays you use to find the balls, the lower
+your score.
+
+Overview of play:
+
+\\<blackbox-mode-map>To play blackbox, type \\[blackbox].  An optional prefix argument
+specifies the number of balls to be hidden in the box; the default is
+four.
+
+The cursor can be moved around the box with the standard cursor
+movement keys.
+
+To shoot a ray, move the cursor to the edge of the box and press SPC.
+The result will be determined and the playfield updated.
+
+You may place or remove balls in the box by moving the cursor into the
+box and pressing \\[bb-romp].
+
+When you think the configuration of balls you have placed is correct,
+press \\[bb-done].  You will be informed whether you are correct or
+not, and be given your score.  Your score is the number of letters and
+numbers around the outside of the box plus five for each incorrectly
+placed ball.  If you placed any balls incorrectly, they will be
+indicated with `x', and their actual positions indicated with `o'.
+
+Details:
+
+There are three possible outcomes for each ray you send into the box:
+
+	Detour: the ray is deflected and emerges somewhere other than
+		where you sent it in.  On the playfield, detours are
+		denoted by matching pairs of numbers -- one where the
+		ray went in, and the other where it came out.
+
+	Reflection: the ray is reflected and emerges in the same place
+		it was sent in.  On the playfield, reflections are
+		denoted by the letter `R'.
+
+	Hit:	the ray strikes a ball directly and is absorbed.  It does
+		not emerge from the box.  On the playfield, hits are
+		denoted by the letter `H'.
+
+The rules for how balls deflect rays are simple and are best shown by
+example.
+
+As a ray approaches a ball it is deflected ninety degrees.  Rays can
+be deflected multiple times.  In the diagrams below, the dashes
+represent empty box locations and the letter `O' represents a ball.
+The entrance and exit points of each ray are marked with numbers as
+described under \"Detour\" above.  Note that the entrance and exit
+points are always interchangeable.  `*' denotes the path taken by the
+ray.
+
+Note carefully the relative positions of the ball and the ninety
+degree deflection it causes.
+
+    1                                            
+  - * - - - - - -         - - - - - - - -         - - - - - - - -       
+  - * - - - - - -         - - - - - - - -         - - - - - - - -       
+1 * * - - - - - -         - - - - - - - -         - O - - - - O -       
+  - - O - - - - -         - - O - - - - -         - - * * * * - -
+  - - - - - - - -         - - - * * * * * 2     3 * * * - - * - -
+  - - - - - - - -         - - - * - - - -         - - - O - * - -      
+  - - - - - - - -         - - - * - - - -         - - - - * * - -       
+  - - - - - - - -         - - - * - - - -         - - - - * - O -       
+                                2                         3
+
+As mentioned above, a reflection occurs when a ray emerges from the same point
+it was sent in.  This can happen in several ways:
+
+                                                                           
+  - - - - - - - -         - - - - - - - -          - - - - - - - -
+  - - - - O - - -         - - O - O - - -          - - - - - - - -
+R * * * * - - - -         - - - * - - - -          O - - - - - - -
+  - - - - O - - -         - - - * - - - -        R - - - - - - - -
+  - - - - - - - -         - - - * - - - -          - - - - - - - -
+  - - - - - - - -         - - - * - - - -          - - - - - - - -
+  - - - - - - - -       R * * * * - - - -          - - - - - - - -
+  - - - - - - - -         - - - - O - - -          - - - - - - - -
+
+In the first example, the ray is deflected downwards by the upper
+ball, then left by the lower ball, and finally retraces its path to
+its point of origin.  The second example is similar.  The third
+example is a bit anomalous but can be rationalized by realizing the
+ray never gets a chance to get into the box.  Alternatively, the ray
+can be thought of as being deflected downwards and immediately
+emerging from the box.
+
+A hit occurs when a ray runs straight into a ball:
+
+  - - - - - - - -         - - - - - - - -          - - - - - - - -
+  - - - - - - - -         - - - - - - - -          - - - - O - - -
+  - - - - - - - -         - - - - O - - -        H * * * * - - - -
+  - - - - - - - -       H * * * * O - - -          - - - * - - - -
+  - - - - - - - -         - - - - O - - -          - - - O - - - -
+H * * * O - - - -         - - - - - - - -          - - - - - - - -
+  - - - - - - - -         - - - - - - - -          - - - - - - - -
+  - - - - - - - -         - - - - - - - -          - - - - - - - -
+
+Be sure to compare the second example of a hit with the first example of
+a reflection." t nil)
+
+;;;***
+
+;;;### (autoloads (conx-load conx conx-region conx-buffer) "conx" "games/conx.el")
+
+(autoload 'conx-buffer "conx" "\
+Absorb the text in the current buffer into the tree." t nil)
+
+(autoload 'conx-region "conx" "\
+Absorb the text in the current region into the tree." t nil)
+
+(autoload 'conx "conx" "\
+Generate some random sentences in the *conx* buffer." t nil)
+
+(autoload 'conx-load "conx" "\
+Load in a CONX database written by the \\[conx-save] command.
+This clears the database currently in memory." t nil)
+
+;;;***
+
+;;;### (autoloads (shuffle-vector cookie-snarf cookie-insert cookie) "cookie1" "games/cookie1.el")
+
+(autoload 'cookie "cookie1" "\
+Return a random phrase from PHRASE-FILE.  When the phrase file
+is read in, display STARTMSG at beginning of load, ENDMSG at end." nil nil)
+
+(autoload 'cookie-insert "cookie1" "\
+Insert random phrases from PHRASE-FILE; COUNT of them.  When the phrase file
+is read in, display STARTMSG at beginning of load, ENDMSG at end." nil nil)
+
+(autoload 'cookie-snarf "cookie1" "\
+Reads in the PHRASE-FILE, returns it as a vector of strings.
+Emit STARTMSG and ENDMSG before and after.  Caches the result; second
+and subsequent calls on the same file won't go to disk." nil nil)
+
+(autoload 'shuffle-vector "cookie1" "\
+Randomly permute the elements of VECTOR (all permutations equally likely)" nil nil)
+
+;;;***
+
+;;;### (autoloads (decipher-mode decipher) "decipher" "games/decipher.el")
+
+(autoload 'decipher "decipher" "\
+Format a buffer of ciphertext for cryptanalysis and enter Decipher mode." t nil)
+
+(autoload 'decipher-mode "decipher" "\
+Major mode for decrypting monoalphabetic substitution ciphers.
+Lower-case letters enter plaintext.
+Upper-case letters are commands.
+
+The buffer is made read-only so that normal Emacs commands cannot
+modify it.
+
+The most useful commands are:
+\\<decipher-mode-map>
+\\[decipher-digram-list]  Display a list of all digrams & their frequency
+\\[decipher-frequency-count]  Display the frequency of each ciphertext letter
+\\[decipher-adjacency-list]  Show adjacency list for current letter (lists letters appearing next to it)
+\\[decipher-make-checkpoint]  Save the current cipher alphabet (checkpoint)
+\\[decipher-restore-checkpoint]  Restore a saved cipher alphabet (checkpoint)" t nil)
+
+;;;***
+
+;;;### (autoloads (dissociated-press) "dissociate" "games/dissociate.el")
+
+(autoload 'dissociated-press "dissociate" "\
+Dissociate the text of the current buffer.
+Output goes in buffer named *Dissociation*,
+which is redisplayed each time text is added to it.
+Every so often the user must say whether to continue.
+If ARG is positive, require ARG chars of continuity.
+If ARG is negative, require -ARG words of continuity.
+Default is 2." t nil)
+
+;;;***
+
+;;;### (autoloads (doctor) "doctor" "games/doctor.el")
+
+(autoload 'doctor "doctor" "\
+Switch to *doctor* buffer and start giving psychotherapy." t nil)
+
+;;;***
+
+;;;### (autoloads (dunnet) "dunnet" "games/dunnet.el")
+
+(autoload 'dunnet "dunnet" "\
+Switch to *dungeon* buffer and start game." t nil)
+
+;;;***
+
+;;;### (autoloads (flame) "flame" "games/flame.el")
+
+(autoload 'flame "flame" "\
+Generate ARG (default 1) sentences of half-crazed gibberish." t nil)
+
+;;;***
+
+;;;### (autoloads (gomoku) "gomoku" "games/gomoku.el")
+
+(autoload 'gomoku "gomoku" "\
+Start a Gomoku game between you and Emacs.
+If a game is in progress, this command allow you to resume it.
+If optional arguments N and M are given, an N by M board is used.
+
+You and Emacs play in turn by marking a free square. You mark it with X
+and Emacs marks it with O. The winner is the first to get five contiguous
+marks horizontally, vertically or in diagonal.
+You play by moving the cursor over the square you choose and hitting
+\\<gomoku-mode-map>\\[gomoku-human-plays].
+Use \\[describe-mode] for more info." t nil)
+
+;;;***
+
+;;;### (autoloads (hanoi) "hanoi" "games/hanoi.el")
+
+(autoload 'hanoi "hanoi" "\
+Towers of Hanoi diversion.  Argument is number of rings." t nil)
+
+;;;***
+
+;;;### (autoloads (life) "life" "games/life.el")
+
+(autoload 'life "life" "\
+Run Conway's Life simulation.
+The starting pattern is randomly selected.  Prefix arg (optional first
+arg non-nil from a program) is the number of seconds to sleep between
+generations (this defaults to 1)." t nil)
+
+;;;***
+
+;;;### (autoloads (mpuz) "mpuz" "games/mpuz.el")
+
+(autoload 'mpuz "mpuz" "\
+Multiplication puzzle with GNU Emacs." t nil)
+
+;;;***
+
+;;;### (autoloads (snarf-spooks spook) "spook" "games/spook.el")
+
+(autoload 'spook "spook" "\
+Adds that special touch of class to your outgoing mail." t nil)
+
+(autoload 'snarf-spooks "spook" "\
+Return a vector containing the lines from `spook-phrases-file'." nil nil)
+
+;;;***
+
+;;;### (autoloads (xmine-mode) "xmine" "games/xmine.el")
+
+(autoload 'xmine-mode "xmine" "\
+A mode for playing the well known mine searching game.
+
+   `\\<annotation-local-map-default>\\[xmine-activate-function-button1]' or `\\<xmine-keymap>\\[xmine-key-action1]' unhides a tile,
+   `\\<annotation-local-map-default>\\[xmine-activate-function-button2]' or `\\<xmine-keymap>\\[xmine-key-action2]' unhides all neighbours of a tile,
+   `\\<annotation-local-map-default>\\[xmine-activate-function-button3]' or `\\<xmine-keymap>\\[xmine-key-action3]' (un)flagges a tile to hold a mine.
+
+   `\\[xmine-key-new]' starts a new game.
+   `\\[xmine-key-quit]' ends a game.
+
+All keybindings (with alternatives) currently in effect:
+   \\{xmine-keymap}
+
+The rules are quite easy: You start by unhiding (random) tiles. An unhidden
+tile showing a number tells you something about the number of mines in it's
+neighborhood, where the neighborhood are all 8 tiles (or less if it's
+at a border) around the tile.
+
+E.g. a \"1\" shows you that there is only one mine in the neighborhood of
+this tile. Empty tiles have no mines around them, and empty tiles in
+the neighborhood of another empty tile are all automatically unhidden
+if you unhide one of them. You need to find a strategy to use the
+information you have from the numbers to \"flag\" the tiles with mines
+under them and unhide all other tiles. If you correctly made this
+without accidently unhiding a mine, you've won.
+
+If you are sure you have correctly flagged all mines around a unhidden tile,
+you can use Button-2 or \\[xmine-key-action2] on it to unhide all it's
+neighbors. But beware: If you made a mistake by flagging the wrong mines,
+you'll blow up! 
+
+Have Fun." t nil)
+
+(fset 'xmine 'xmine-mode)
+
+;;;***
+
+;;;### (autoloads (psychoanalyze-pinhead apropos-zippy insert-zippyism yow) "yow" "games/yow.el")
+
+(autoload 'yow "yow" "\
+Return or display a random Zippy quotation.  With prefix arg, insert it." t nil)
+
+(autoload 'insert-zippyism "yow" "\
+Prompt with completion for a known Zippy quotation, and insert it at point." t nil)
+
+(autoload 'apropos-zippy "yow" "\
+Return a list of all Zippy quotes matching REGEXP.
+If called interactively, display a list of matches." t nil)
+
+(autoload 'psychoanalyze-pinhead "yow" "\
+Zippy goes to the analyst." t nil)
+
+;;;***
+
+(provide 'games-autoloads)
+))
diff -r 4de2936b4e77 -r 0132846995bd lisp/games/custom-load.el
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lisp/games/custom-load.el	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,67 @@
+(put 'copyright 'custom-loads '())
+(put 'eldoc 'custom-loads '())
+(put 'execute 'custom-loads '())
+(put 'mouse 'custom-loads '())
+(put 'mail-abbrevs 'custom-loads '())
+(put 'etags 'custom-loads '())
+(put 'limits 'custom-loads '())
+(put 'minibuffer 'custom-loads '())
+(put 'environment 'custom-loads '())
+(put 'sound 'custom-loads '())
+(put 'holidays 'custom-loads '())
+(put 'auto-save 'custom-loads '())
+(put 'ispell 'custom-loads '())
+(put 'fortran-indent 'custom-loads '())
+(put 'lpr 'custom-loads '())
+(put 'message-headers 'custom-loads '())
+(put 'editing-basics 'custom-loads '())
+(put 'internal 'custom-loads '())
+(put 'calendar 'custom-loads '())
+(put 'help-appearance 'custom-loads '())
+(put 'display-time 'custom-loads '())
+(put 'lisp 'custom-loads '())
+(put 'diff 'custom-loads '())
+(put 'paren-matching 'custom-loads '())
+(put 'help 'custom-loads '())
+(put 'local 'custom-loads '())
+(put 'keyboard 'custom-loads '())
+(put 'minubuffer 'custom-loads '())
+(put 'message-sending 'custom-loads '())
+(put 'data 'custom-loads '())
+(put 'ps-print 'custom-loads '())
+(put 'backup 'custom-loads '())
+(put 'frames 'custom-loads '())
+(put 'customize 'custom-loads '())
+(put 'abbrev 'custom-loads '())
+(put 'toolbar 'custom-loads '())
+(put 'compilation 'custom-loads '())
+(put 'dired 'custom-loads '())
+(put 'killing 'custom-loads '())
+(put 'paren-blinking 'custom-loads '())
+(put 'games 'custom-loads '("xmine"))
+(put 'find-file 'custom-loads '())
+(put 'gnuserv 'custom-loads '())
+(put 'maint 'custom-loads '())
+(put 'fill-comments 'custom-loads '())
+(put 'message-mail 'custom-loads '())
+(put 'windows 'custom-loads '())
+(put 'message-various 'custom-loads '())
+(put 'resize-minibuffer 'custom-loads '())
+(put 'fill 'custom-loads '())
+(put 'debug 'custom-loads '())
+(put 'display 'custom-loads '())
+(put 'diary 'custom-loads '())
+(put 'xmine 'custom-loads '("xmine"))
+(put 'browse-url 'custom-loads '())
+(put 'message-insertion 'custom-loads '())
+(put 'hyper-apropos 'custom-loads '())
+(put 'vc 'custom-loads '())
+(put 'alloc 'custom-loads '())
+(put 'isearch 'custom-loads '())
+(put 'modeline 'custom-loads '())
+(put 'processes-basics 'custom-loads '())
+(put 'editing 'custom-loads '())
+(put 'matching 'custom-loads '())
+(put 'ps-print-color 'custom-loads '())
+(put 'undo 'custom-loads '())
+(put 'x 'custom-loads '())
diff -r 4de2936b4e77 -r 0132846995bd lisp/gnats/auto-autoloads.el
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lisp/gnats/auto-autoloads.el	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,74 @@
+;;; DO NOT MODIFY THIS FILE
+(if (not (featurep 'gnats-autoloads))
+    (progn
+
+;;;### (autoloads (gnats:summ-pr gnats:query-pr gnats:edit-pr gnats:view-pr gnats:gnats-mode) "gnats" "gnats/gnats.el")
+
+(defvar gnats::mode-name nil "\
+Name of the GNATS mode.")
+
+(setq gnats::mode-name 'gnats:gnats-mode)
+
+(fset 'gnats-mode gnats::mode-name)
+
+(autoload 'gnats:gnats-mode "gnats" "\
+Major mode for editing problem reports.
+For information about the form see gnats(1) and pr_form(5).
+
+When you are finished editing the buffer, type \\[gnats:submit-pr] to commit
+your changes to the PR database.  To abort the edit, type
+\\[gnats:unlock-buffer].
+
+Special commands:
+\\{gnats-mode-map}
+Turning on gnats-mode calls the value of the variable gnats-mode-hook,
+if it is not nil." nil nil)
+
+(fset 'view-pr 'gnats:view-pr)
+
+(autoload 'gnats:view-pr "gnats" "\
+Visit the problem report named by the string ID.  While viewing, press
+'e' to edit the currently viewed PR." t nil)
+
+(fset 'edit-pr 'gnats:edit-pr)
+
+(autoload 'gnats:edit-pr "gnats" "\
+Edit the problem report named by the string ID." t nil)
+
+(fset 'query-pr 'gnats:query-pr)
+
+(autoload 'gnats:query-pr "gnats" "\
+Run query-pr, with user-specified args, and collect output in a buffer.
+While query-pr runs asynchronously, you can use the \\[next-error] command
+to find the text that the hits refer to." t nil)
+
+(fset 'summ-pr 'gnats:summ-pr)
+
+(autoload 'gnats:summ-pr "gnats" "\
+Run query-pr, with user-specified args, and display a pretty summary.
+Well, display a summary, at least." t nil)
+
+;;;***
+
+;;;### (autoloads (send-pr:send-pr-mode send-pr:send-pr) "send-pr" "gnats/send-pr.el")
+
+(fset 'send-pr 'send-pr:send-pr)
+
+(autoload 'send-pr:send-pr "send-pr" "\
+Create a buffer and read in the result of `send-pr -P'.
+When finished with editing the problem report use \\[send-pr:submit-pr]
+to send the PR with `send-pr -b -f -'." t nil)
+
+(fset 'send-pr-mode 'send-pr:send-pr-mode)
+
+(autoload 'send-pr:send-pr-mode "send-pr" "\
+Major mode for submitting problem reports.
+For information about the form see gnats(1) and send-pr(1).
+Special commands: \\{send-pr-mode-map}
+Turning on send-pr-mode calls the value of the variable send-pr-mode-hook,
+if it is not nil." t nil)
+
+;;;***
+
+(provide 'gnats-autoloads)
+))
diff -r 4de2936b4e77 -r 0132846995bd lisp/gnats/custom-load.el
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lisp/gnats/custom-load.el	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,65 @@
+(put 'copyright 'custom-loads '())
+(put 'eldoc 'custom-loads '())
+(put 'execute 'custom-loads '())
+(put 'mouse 'custom-loads '())
+(put 'mail-abbrevs 'custom-loads '())
+(put 'etags 'custom-loads '())
+(put 'limits 'custom-loads '())
+(put 'minibuffer 'custom-loads '())
+(put 'environment 'custom-loads '())
+(put 'sound 'custom-loads '())
+(put 'holidays 'custom-loads '())
+(put 'auto-save 'custom-loads '())
+(put 'ispell 'custom-loads '())
+(put 'fortran-indent 'custom-loads '())
+(put 'lpr 'custom-loads '())
+(put 'message-headers 'custom-loads '())
+(put 'editing-basics 'custom-loads '())
+(put 'internal 'custom-loads '())
+(put 'calendar 'custom-loads '())
+(put 'help-appearance 'custom-loads '())
+(put 'display-time 'custom-loads '())
+(put 'lisp 'custom-loads '())
+(put 'diff 'custom-loads '())
+(put 'paren-matching 'custom-loads '())
+(put 'help 'custom-loads '())
+(put 'local 'custom-loads '())
+(put 'keyboard 'custom-loads '())
+(put 'minubuffer 'custom-loads '())
+(put 'message-sending 'custom-loads '())
+(put 'data 'custom-loads '())
+(put 'ps-print 'custom-loads '())
+(put 'backup 'custom-loads '())
+(put 'frames 'custom-loads '())
+(put 'customize 'custom-loads '())
+(put 'abbrev 'custom-loads '())
+(put 'toolbar 'custom-loads '())
+(put 'compilation 'custom-loads '())
+(put 'dired 'custom-loads '())
+(put 'killing 'custom-loads '())
+(put 'paren-blinking 'custom-loads '())
+(put 'find-file 'custom-loads '())
+(put 'gnuserv 'custom-loads '())
+(put 'maint 'custom-loads '())
+(put 'fill-comments 'custom-loads '())
+(put 'message-mail 'custom-loads '())
+(put 'windows 'custom-loads '())
+(put 'message-various 'custom-loads '())
+(put 'resize-minibuffer 'custom-loads '())
+(put 'fill 'custom-loads '())
+(put 'debug 'custom-loads '())
+(put 'display 'custom-loads '())
+(put 'diary 'custom-loads '())
+(put 'browse-url 'custom-loads '())
+(put 'message-insertion 'custom-loads '())
+(put 'hyper-apropos 'custom-loads '())
+(put 'vc 'custom-loads '())
+(put 'alloc 'custom-loads '())
+(put 'isearch 'custom-loads '())
+(put 'modeline 'custom-loads '())
+(put 'processes-basics 'custom-loads '())
+(put 'editing 'custom-loads '())
+(put 'matching 'custom-loads '())
+(put 'ps-print-color 'custom-loads '())
+(put 'undo 'custom-loads '())
+(put 'x 'custom-loads '())
diff -r 4de2936b4e77 -r 0132846995bd lisp/gnus/ChangeLog
--- a/lisp/gnus/ChangeLog	Mon Aug 13 09:42:28 2007 +0200
+++ b/lisp/gnus/ChangeLog	Mon Aug 13 09:43:35 2007 +0200
@@ -1,23 +1,124 @@
-1997-06-13  MORIOKA Tomohiko  <morioka@jaist.ac.jp>
-
-	* smiley.el (smiley-deformed-regexp-alist): Modify regexp for
-	horizontal smiley faces.
-	(smiley-nosey-regexp-alist): Add horizontal smiley faces.
-
-1997-06-10  Steven L Baur  <steve@altair.xemacs.org>
-
-	* nntp.el (nntp-wait-for): Replace following-char with char-after.
+Wed Jun 18 17:26:35 1997  Lars Magne Ingebrigtsen  <larsi@menja.ifi.uio.no>
+
+	* gnus.el: Gnus v5.4.59 is released.
+
+Wed Jun 18 09:29:15 1997  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
+
+	* gnus-xmas.el (gnus-xmas-article-display-xface): Correct setting of
+	braces.
 
 1997-06-07  MORIOKA Tomohiko  <morioka@jaist.ac.jp>
 
 	* smiley.el (smiley-deformed-regexp-alist): Add Japanese smiley
 	faces.
 
+Wed Jun 18 14:15:21 1997  Lars Magne Ingebrigtsen  <larsi@ifi.uio.no>
+
+	* gnus-art.el (article-hide-pgp): Only run hook when there is a
+	PGP signature.
+
+	* gnus-sum.el (gnus-summary-fetch-faq): Have `C-u' work.
+
+	* gnus-xmas.el (gnus-xmas-summary-set-display-table): Don't nix
+	out chars that aren't supposed to be nixed out.
+
+	* gnus-art.el (gnus-article-delete-invisible-text): Would bug out
+	on point-max.
+	(gnus-article-delete-text-of-type): Ditto.
+
+	* gnus-xmas.el (gnus-xmas-redefine): Switch off horiz scrollbar in
+	tree buffers.
+
+Wed Jun 18 01:11:58 1997  Lars Magne Ingebrigtsen  <larsi@menja.ifi.uio.no>
+
+	* gnus.el: Gnus v5.4.58 is released.
+
+Wed Jun 18 01:02:34 1997  Lars Magne Ingebrigtsen  <larsi@ifi.uio.no>
+
+	* gnus.el: Backed out all char-afters which caused bugs all over
+	the place.
+
+Wed Jun 18 00:33:41 1997  Lars Magne Ingebrigtsen  <larsi@menja.ifi.uio.no>
+
+	* gnus.el: Gnus v5.4.57 is released.
+
+Wed Jun 18 00:09:35 1997  Lars Magne Ingebrigtsen  <larsi@ifi.uio.no>
+
+	* gnus-demon.el (gnus-demon-add-nocem): Use a numerical idle.
+
+1997-06-10  Steven L Baur  <steve@altair.xemacs.org>
+
+	* nntp.el (nntp-wait-for): Replace following-char with char-after.
+
 1997-06-09  Steven L Baur  <steve@altair.xemacs.org>
 
 	* gnus-msg.el (gnus-extended-version): Put XEmacs codename in
 	default X-Mailer/X-Newsreader if the symbol exists.
 
+Tue Jun 10 20:24:35 1997  Christoph Wedler  <wedler@fmi.uni-passau.de>
+
+	* message.el (message-checksum): Do not only inspect the last
+	32/64 characters; technical: `ash' is no bit-rotate.
+
+Tue Jun 17 23:45:00 1997  Guy Geens  <Guy.Geens@elis.rug.ac.be>
+
+	* gnus-score.el (gnus-decay-scores): Use the right index.
+
+Tue Jun 17 23:22:24 1997  Lars Magne Ingebrigtsen  <larsi@ifi.uio.no>
+
+	* gnus-score.el (gnus-score-load-file): Set the decay when not
+	set. 
+
+	* gnus-art.el (gnus-article-treat-html): Do w3 setup.
+
+	* gnus.el (gnus-indent-rigidly): Be useful on odd tab widths.
+
+	* gnus-xmas.el (gnus-article-x-face-command): Allow just using
+	xpm. 
+
+Thu Jun  5 18:33:31 1997  Robert Bihlmeyer  <robbe@orcus.priv.at>
+
+	* gnus-score.el (gnus-score-find-trace): Would bug out for
+	file-less rules.
+
+Tue Jun 17 22:57:14 1997  Hrvoje Niksic  <hniksic@srce.hr>
+
+	* gnus-xmas.el (gnus-xmas-group-startup-message): Cleanup. 
+
+Tue Jun 17 22:55:14 1997  Lars Magne Ingebrigtsen  <larsi@ifi.uio.no>
+
+	* nntp.el (nntp-request-head): Guess at article number.
+
+Tue Jun 17 22:40:49 1997  David Moore  <dmoore@ucsd.edu>
+
+	* gnus-xmas.el (gnus-xmas-set-text-properties): New version.
+
+Tue Jun 17 21:30:37 1997  Lars Magne Ingebrigtsen  <larsi@ifi.uio.no>
+
+	* gnus-group.el (gnus-group-search-forward): Ignore topic lines. 
+
+Tue Jun 17 18:06:09 1997  "Karl M. Hegbloom" <karlheg@inetarena.com>
+
+	* gnus.el: ebola fixes.
+
+Wed Jun 11 19:23:09 1997  Lars Magne Ingebrigtsen  <larsi@ifi.uio.no>
+
+	* gnus-sum.el (t): Moved pop article keystroke.
+
+Tue Jun 10 06:32:52 1997  Lars Magne Ingebrigtsen  <larsi@ifi.uio.no>
+
+	* nnmail.el (nnmail-search-unix-mail-delim-backward): Allow
+	several "From "'s.
+	(nnmail-search-unix-mail-delim): Ditto.
+
+Fri Jun  6 19:31:10 1997  Lars Magne Ingebrigtsen  <larsi@ifi.uio.no>
+
+	* gnus-group.el (gnus-group-make-web-group): Use default prompt
+	instead of string.
+
+	* gnus.el (gnus-string-or): New macro.
+	(gnus-string-or-1): New function.
+
 Sat May 31 15:41:09 1997  Lars Magne Ingebrigtsen  <larsi@menja.ifi.uio.no>
 
 	* gnus.el: Gnus v5.4.56 is released.
diff -r 4de2936b4e77 -r 0132846995bd lisp/gnus/auto-autoloads.el
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lisp/gnus/auto-autoloads.el	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,313 @@
+;;; DO NOT MODIFY THIS FILE
+(if (not (featurep 'gnus-autoloads))
+    (progn
+
+;;;### (autoloads (gnus-earcon-display) "earcon" "gnus/earcon.el")
+
+(autoload 'gnus-earcon-display "earcon" "\
+Play sounds in message buffers." t nil)
+
+;;;***
+
+;;;### (autoloads (gnus-audio-play) "gnus-audio" "gnus/gnus-audio.el")
+
+(autoload 'gnus-audio-play "gnus-audio" "\
+Play a sound through the speaker." t nil)
+
+;;;***
+
+;;;### (autoloads (gnus-cache-generate-nov-databases gnus-cache-generate-active gnus-jog-cache) "gnus-cache" "gnus/gnus-cache.el")
+
+(autoload 'gnus-jog-cache "gnus-cache" "\
+Go through all groups and put the articles into the cache.
+
+Usage:
+$ emacs -batch -l ~/.emacs -l gnus -f gnus-jog-cache" t nil)
+
+(autoload 'gnus-cache-generate-active "gnus-cache" "\
+Generate the cache active file." t nil)
+
+(autoload 'gnus-cache-generate-nov-databases "gnus-cache" "\
+Generate NOV files recursively starting in DIR." t nil)
+
+;;;***
+
+;;;### (autoloads (gnus-fetch-group) "gnus-group" "gnus/gnus-group.el")
+
+(autoload 'gnus-fetch-group "gnus-group" "\
+Start Gnus if necessary and enter GROUP.
+Returns whether the fetching was successful or not." t nil)
+
+;;;***
+
+;;;### (autoloads (gnus-batch-score) "gnus-kill" "gnus/gnus-kill.el")
+
+(defalias 'gnus-batch-kill 'gnus-batch-score)
+
+(autoload 'gnus-batch-score "gnus-kill" "\
+Run batched scoring.
+Usage: emacs -batch -l gnus -f gnus-batch-score <newsgroups> ...
+Newsgroups is a list of strings in Bnews format.  If you want to score
+the comp hierarchy, you'd say \"comp.all\".  If you would not like to
+score the alt hierarchy, you'd say \"!alt.all\"." t nil)
+
+;;;***
+
+;;;### (autoloads (gnus-change-server) "gnus-move" "gnus/gnus-move.el")
+
+(autoload 'gnus-change-server "gnus-move" "\
+Move from FROM-SERVER to TO-SERVER.
+Update the .newsrc.eld file to reflect the change of nntp server." t nil)
+
+;;;***
+
+;;;### (autoloads (gnus-batch-brew-soup) "gnus-soup" "gnus/gnus-soup.el")
+
+(autoload 'gnus-batch-brew-soup "gnus-soup" "\
+Brew a SOUP packet from groups mention on the command line.
+Will use the remaining command line arguments as regular expressions
+for matching on group names.
+
+For instance, if you want to brew on all the nnml groups, as well as
+groups with \"emacs\" in the name, you could say something like:
+
+$ emacs -batch -f gnus-batch-brew-soup ^nnml \".*emacs.*\"" t nil)
+
+;;;***
+
+;;;### (autoloads (gnus-update-format) "gnus-spec" "gnus/gnus-spec.el")
+
+(autoload 'gnus-update-format "gnus-spec" "\
+Update the format specification near point." t nil)
+
+;;;***
+
+;;;### (autoloads (gnus-declare-backend gnus-unload) "gnus-start" "gnus/gnus-start.el")
+
+(autoload 'gnus-unload "gnus-start" "\
+Unload all Gnus features." t nil)
+
+(autoload 'gnus-declare-backend "gnus-start" "\
+Declare backend NAME with ABILITIES as a Gnus backend." nil nil)
+
+;;;***
+
+;;;### (autoloads (gnus-add-configuration) "gnus-win" "gnus/gnus-win.el")
+
+(autoload 'gnus-add-configuration "gnus-win" "\
+Add the window configuration CONF to `gnus-buffer-configuration'." nil nil)
+
+;;;***
+
+;;;### (autoloads (gnus gnus-other-frame gnus-slave gnus-no-server gnus-slave-no-server) "gnus" "gnus/gnus.el")
+
+(autoload 'gnus-slave-no-server "gnus" "\
+Read network news as a slave, without connecting to local server" t nil)
+
+(autoload 'gnus-no-server "gnus" "\
+Read network news.
+If ARG is a positive number, Gnus will use that as the
+startup level.	If ARG is nil, Gnus will be started at level 2.
+If ARG is non-nil and not a positive number, Gnus will
+prompt the user for the name of an NNTP server to use.
+As opposed to `gnus', this command will not connect to the local server." t nil)
+
+(autoload 'gnus-slave "gnus" "\
+Read news as a slave." t nil)
+
+(autoload 'gnus-other-frame "gnus" "\
+Pop up a frame to read news." t nil)
+
+(autoload 'gnus "gnus" "\
+Read network news.
+If ARG is non-nil and a positive number, Gnus will use that as the
+startup level.	If ARG is non-nil and not a positive number, Gnus will
+prompt the user for the name of an NNTP server to use." t nil)
+
+;;;***
+
+;;;### (autoloads (unbold-region bold-region message-news-other-frame message-news-other-window message-mail-other-frame message-mail-other-window message-bounce message-resend message-forward message-recover message-supersede message-cancel-news message-followup message-wide-reply message-reply message-news message-mail message-mode) "message" "gnus/message.el")
+
+(defcustom message-from-style 'default "*Specifies how \"From\" headers look.\n\nIf `nil', they contain just the return address like:\n	king@grassland.com\nIf `parens', they look like:\n	king@grassland.com (Elvis Parsley)\nIf `angles', they look like:\n	Elvis Parsley <king@grassland.com>\n\nOtherwise, most addresses look like `angles', but they look like\n`parens' if `angles' would need quoting and `parens' would not." :type '(choice (const :tag "simple" nil) (const parens) (const angles) (const default)) :group 'message-headers)
+
+(defcustom message-signature-separator "^-- *$" "Regexp matching the signature separator." :type 'regexp :group 'message-various)
+
+(defcustom message-user-organization-file "/usr/lib/news/organization" "*Local news organization file." :type 'file :group 'message-headers)
+
+(defcustom message-send-mail-function 'message-send-mail-with-sendmail "Function to call to send the current buffer as mail.\nThe headers should be delimited by a line whose contents match the\nvariable `mail-header-separator'.\n\nLegal values include `message-send-mail-with-sendmail' (the default),\n`message-send-mail-with-mh' and `message-send-mail-with-qmail'." :type '(radio (function-item message-send-mail-with-sendmail) (function-item message-send-mail-with-mh) (function-item message-send-mail-with-qmail) (function :tag "Other")) :group 'message-sending :group 'message-mail)
+
+(defcustom message-citation-line-function 'message-insert-citation-line "*Function called to insert the \"Whomever writes:\" line." :type 'function :group 'message-insertion)
+
+(defcustom message-yank-prefix "> " "*Prefix inserted on the lines of yanked messages.\nnil means use indentation." :type 'string :group 'message-insertion)
+
+(defcustom message-cite-function (if (and (boundp 'mail-citation-hook) mail-citation-hook) mail-citation-hook 'message-cite-original) "*Function for citing an original message." :type '(radio (function-item message-cite-original) (function-item sc-cite-original) (function :tag "Other")) :group 'message-insertion)
+
+(defcustom message-indent-citation-function 'message-indent-citation "*Function for modifying a citation just inserted in the mail buffer.\nThis can also be a list of functions.  Each function can find the\ncitation between (point) and (mark t).  And each function should leave\npoint and mark around the citation text as modified." :type 'function :group 'message-insertion)
+
+(defcustom message-signature t "*String to be inserted at the end of the message buffer.\nIf t, the `message-signature-file' file will be inserted instead.\nIf a function, the result from the function will be used instead.\nIf a form, the result from the form will be used instead." :type 'sexp :group 'message-insertion)
+
+(defcustom message-signature-file "~/.signature" "*File containing the text inserted at end of message buffer." :type 'file :group 'message-insertion)
+
+(autoload 'message-mode "message" "\
+Major mode for editing mail and news to be sent.
+Like Text Mode but with these additional commands:
+C-c C-s  message-send (send the message)    C-c C-c  message-send-and-exit
+C-c C-f  move to a header field (and create it if there isn't):
+	 C-c C-f C-t  move to To	C-c C-f C-s  move to Subject
+	 C-c C-f C-c  move to Cc	C-c C-f C-b  move to Bcc
+	 C-c C-f C-w  move to Fcc	C-c C-f C-r  move to Reply-To
+	 C-c C-f C-u  move to Summary	C-c C-f C-n  move to Newsgroups
+	 C-c C-f C-k  move to Keywords	C-c C-f C-d  move to Distribution
+	 C-c C-f C-f  move to Followup-To
+C-c C-t  message-insert-to (add a To header to a news followup)
+C-c C-n  message-insert-newsgroups (add a Newsgroup header to a news reply)
+C-c C-b  message-goto-body (move to beginning of message text).
+C-c C-i  message-goto-signature (move to the beginning of the signature).
+C-c C-w  message-insert-signature (insert `message-signature-file' file).
+C-c C-y  message-yank-original (insert current message, if any).
+C-c C-q  message-fill-yanked-message (fill what was yanked).
+C-c C-e  message-elide-region (elide the text between point and mark).
+C-c C-r  message-caesar-buffer-body (rot13 the message body)." t nil)
+
+(autoload 'message-mail "message" "\
+Start editing a mail message to be sent." t nil)
+
+(autoload 'message-news "message" "\
+Start editing a news article to be sent." t nil)
+
+(autoload 'message-reply "message" "\
+Start editing a reply to the article in the current buffer." t nil)
+
+(autoload 'message-wide-reply "message" "\
+Make a \"wide\" reply to the message in the current buffer." t nil)
+
+(autoload 'message-followup "message" "\
+Follow up to the message in the current buffer.
+If TO-NEWSGROUPS, use that as the new Newsgroups line." t nil)
+
+(autoload 'message-cancel-news "message" "\
+Cancel an article you posted." t nil)
+
+(autoload 'message-supersede "message" "\
+Start composing a message to supersede the current message.
+This is done simply by taking the old article and adding a Supersedes
+header line with the old Message-ID." t nil)
+
+(autoload 'message-recover "message" "\
+Reread contents of current buffer from its last auto-save file." t nil)
+
+(autoload 'message-forward "message" "\
+Forward the current message via mail.
+Optional NEWS will use news to forward instead of mail." t nil)
+
+(autoload 'message-resend "message" "\
+Resend the current article to ADDRESS." t nil)
+
+(autoload 'message-bounce "message" "\
+Re-mail the current message.
+This only makes sense if the current message is a bounce message than
+contains some mail you have written which has been bounced back to
+you." t nil)
+
+(autoload 'message-mail-other-window "message" "\
+Like `message-mail' command, but display mail buffer in another window." t nil)
+
+(autoload 'message-mail-other-frame "message" "\
+Like `message-mail' command, but display mail buffer in another frame." t nil)
+
+(autoload 'message-news-other-window "message" "\
+Start editing a news article to be sent." t nil)
+
+(autoload 'message-news-other-frame "message" "\
+Start editing a news article to be sent." t nil)
+
+(autoload 'bold-region "message" "\
+Bold all nonblank characters in the region.
+Works by overstriking characters.
+Called from program, takes two arguments START and END
+which specify the range to operate on." t nil)
+
+(autoload 'unbold-region "message" "\
+Remove all boldness (overstruck characters) in the region.
+Called from program, takes two arguments START and END
+which specify the range to operate on." t nil)
+
+;;;***
+
+;;;### (autoloads nil "messcompat" "gnus/messcompat.el")
+
+(defvar message-signature-file mail-signature-file "\
+*File containing the text inserted at end of message. buffer.")
+
+;;;***
+
+;;;### (autoloads (nndoc-add-type) "nndoc" "gnus/nndoc.el")
+
+(autoload 'nndoc-add-type "nndoc" "\
+Add document DEFINITION to the list of nndoc document definitions.
+If POSITION is nil or `last', the definition will be added
+as the last checked definition, if t or `first', add as the
+first definition, and if any other symbol, add after that
+symbol in the alist." nil nil)
+
+;;;***
+
+;;;### (autoloads (nnfolder-generate-active-file) "nnfolder" "gnus/nnfolder.el")
+
+(autoload 'nnfolder-generate-active-file "nnfolder" "\
+Look for mbox folders in the nnfolder directory and make them into groups." t nil)
+
+;;;***
+
+;;;### (autoloads (nnkiboze-generate-groups) "nnkiboze" "gnus/nnkiboze.el")
+
+(autoload 'nnkiboze-generate-groups "nnkiboze" "\
+Usage: emacs -batch -l nnkiboze -f nnkiboze-generate-groups
+Finds out what articles are to be part of the nnkiboze groups." t nil)
+
+;;;***
+
+;;;### (autoloads (nnml-generate-nov-databases) "nnml" "gnus/nnml.el")
+
+(autoload 'nnml-generate-nov-databases "nnml" "\
+Generate NOV databases in all nnml directories." t nil)
+
+;;;***
+
+;;;### (autoloads (nnsoup-revert-variables nnsoup-set-variables nnsoup-pack-replies) "nnsoup" "gnus/nnsoup.el")
+
+(autoload 'nnsoup-pack-replies "nnsoup" "\
+Make an outbound package of SOUP replies." t nil)
+
+(autoload 'nnsoup-set-variables "nnsoup" "\
+Use the SOUP methods for posting news and mailing mail." t nil)
+
+(autoload 'nnsoup-revert-variables "nnsoup" "\
+Revert posting and mailing methods to the standard Emacs methods." t nil)
+
+;;;***
+
+;;;### (autoloads (gnus-score-mode) "score-mode" "gnus/score-mode.el")
+
+(autoload 'gnus-score-mode "score-mode" "\
+Mode for editing Gnus score files.
+This mode is an extended emacs-lisp mode.
+
+\\{gnus-score-mode-map}" t nil)
+
+;;;***
+
+;;;### (autoloads (gnus-smiley-display smiley-buffer smiley-region) "smiley" "gnus/smiley.el")
+
+(autoload 'smiley-region "smiley" "\
+Smilify the region between point and mark." t nil)
+
+(autoload 'smiley-buffer "smiley" nil t nil)
+
+(autoload 'gnus-smiley-display "smiley" "\
+Display \"smileys\" as small graphical icons." t nil)
+
+;;;***
+
+(provide 'gnus-autoloads)
+))
diff -r 4de2936b4e77 -r 0132846995bd lisp/gnus/custom-load.el
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lisp/gnus/custom-load.el	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,143 @@
+(put 'gnus-start 'custom-loads '("gnus-group" "gnus-int" "gnus-start" "gnus-util" "gnus"))
+(put 'message 'custom-loads '("message"))
+(put 'copyright 'custom-loads '())
+(put 'gnus-score-expire 'custom-loads '("gnus-kill" "gnus-score"))
+(put 'gnus-score-kill 'custom-loads '("gnus-kill"))
+(put 'eldoc 'custom-loads '())
+(put 'execute 'custom-loads '())
+(put 'gnus-message 'custom-loads '("message"))
+(put 'mouse 'custom-loads '())
+(put 'mail-abbrevs 'custom-loads '())
+(put 'gnus-summary-sort 'custom-loads '("gnus-sum"))
+(put 'nnmail-procmail 'custom-loads '("nnmail"))
+(put 'etags 'custom-loads '())
+(put 'limits 'custom-loads '())
+(put 'minibuffer 'custom-loads '())
+(put 'environment 'custom-loads '())
+(put 'sound 'custom-loads '())
+(put 'gnus-article-buttons 'custom-loads '("gnus-art"))
+(put 'gnus-extract-archive 'custom-loads '("gnus-uu"))
+(put 'gnus-article-headers 'custom-loads '("gnus-art" "gnus-sum"))
+(put 'holidays 'custom-loads '())
+(put 'gnus-score 'custom-loads '("gnus-nocem" "gnus"))
+(put 'gnus-summary-various 'custom-loads '("gnus-sum"))
+(put 'gnus-topic 'custom-loads '("gnus-topic"))
+(put 'gnus-article-emphasis 'custom-loads '("gnus-art"))
+(put 'earcon 'custom-loads '("earcon"))
+(put 'auto-save 'custom-loads '())
+(put 'gnus-group-foreign 'custom-loads '("gnus-group"))
+(put 'gnus-article-washing 'custom-loads '("gnus-xmas" "gnus-art"))
+(put 'ispell 'custom-loads '())
+(put 'mail 'custom-loads '("gnus" "message"))
+(put 'gnus-summary-exit 'custom-loads '("gnus-sum"))
+(put 'fortran-indent 'custom-loads '())
+(put 'gnus-article-saving 'custom-loads '("gnus-art"))
+(put 'gnus-extract-view 'custom-loads '("gnus-sum" "gnus-uu"))
+(put 'gnus-group-listing 'custom-loads '("gnus-group"))
+(put 'lpr 'custom-loads '())
+(put 'gnus-summary 'custom-loads '("gnus-sum" "gnus"))
+(put 'message-headers 'custom-loads '("message"))
+(put 'editing-basics 'custom-loads '())
+(put 'gnus-group-select 'custom-loads '("gnus-sum"))
+(put 'internal 'custom-loads '())
+(put 'calendar 'custom-loads '())
+(put 'help-appearance 'custom-loads '())
+(put 'display-time 'custom-loads '())
+(put 'lisp 'custom-loads '())
+(put 'diff 'custom-loads '())
+(put 'gnus-summary-mail 'custom-loads '("gnus-sum"))
+(put 'gnus-score-default 'custom-loads '("gnus-score" "gnus-sum"))
+(put 'nnmail-expire 'custom-loads '("nnmail"))
+(put 'gnus-thread 'custom-loads '("gnus-sum"))
+(put 'gnus-nocem 'custom-loads '("gnus-nocem"))
+(put 'gnus-threading 'custom-loads '("gnus-sum"))
+(put 'paren-matching 'custom-loads '())
+(put 'gnus-summary-maneuvering 'custom-loads '("gnus-sum"))
+(put 'gnus-extract 'custom-loads '("gnus" "gnus-uu"))
+(put 'help 'custom-loads '())
+(put 'local 'custom-loads '())
+(put 'nnmail-split 'custom-loads '("nnmail"))
+(put 'keyboard 'custom-loads '())
+(put 'minubuffer 'custom-loads '())
+(put 'gnus-article-various 'custom-loads '("gnus-art" "gnus-sum"))
+(put 'message-sending 'custom-loads '("message"))
+(put 'data 'custom-loads '())
+(put 'gnus-article 'custom-loads '("gnus-art" "gnus-cite"))
+(put 'ps-print 'custom-loads '())
+(put 'gnus 'custom-loads '("gnus-art" "gnus-async" "gnus-cache" "gnus-demon" "gnus-dup" "gnus-eform" "gnus-uu" "gnus-win" "gnus-xmas" "gnus" "nnmail"))
+(put 'backup 'custom-loads '())
+(put 'gnus-xmas 'custom-loads '("gnus-xmas"))
+(put 'gnus-treading 'custom-loads '("gnus-sum"))
+(put 'frames 'custom-loads '())
+(put 'nnmail 'custom-loads '("nnmail"))
+(put 'gnus-article-hiding 'custom-loads '("gnus-art" "gnus-sum"))
+(put 'customize 'custom-loads '())
+(put 'nnmail-duplicate 'custom-loads '("nnmail"))
+(put 'gnus-summary-visual 'custom-loads '("gnus-sum" "gnus"))
+(put 'gnus-group-various 'custom-loads '("gnus-group"))
+(put 'abbrev 'custom-loads '())
+(put 'nnmail-retrieve 'custom-loads '("nnmail"))
+(put 'message-interface 'custom-loads '("message"))
+(put 'gnus-group 'custom-loads '("gnus-topic" "gnus"))
+(put 'gnus-article-signature 'custom-loads '("gnus-art"))
+(put 'toolbar 'custom-loads '())
+(put 'compilation 'custom-loads '())
+(put 'dired 'custom-loads '())
+(put 'gnus-duplicate 'custom-loads '("gnus-dup"))
+(put 'gnus-score-adapt 'custom-loads '("gnus-score"))
+(put 'nnmail-various 'custom-loads '("nnmail"))
+(put 'nnmail-files 'custom-loads '("nnmail"))
+(put 'gnus-asynchronous 'custom-loads '("gnus-async"))
+(put 'gnus-visual 'custom-loads '("earcon" "gnus-art" "gnus-picon" "gnus" "smiley"))
+(put 'message-forwarding 'custom-loads '("message"))
+(put 'killing 'custom-loads '())
+(put 'message-news 'custom-loads '("message"))
+(put 'paren-blinking 'custom-loads '())
+(put 'find-file 'custom-loads '())
+(put 'gnus-edit-form 'custom-loads '("gnus-eform"))
+(put 'gnus-files 'custom-loads '("gnus" "nnmail"))
+(put 'gnus-cite 'custom-loads '("gnus-cite"))
+(put 'gnus-demon 'custom-loads '("gnus-demon"))
+(put 'gnus-summary-choose 'custom-loads '("gnus-sum"))
+(put 'gnuserv 'custom-loads '())
+(put 'gnus-windows 'custom-loads '("gnus-win"))
+(put 'maint 'custom-loads '())
+(put 'fill-comments 'custom-loads '())
+(put 'message-mail 'custom-loads '("message"))
+(put 'windows 'custom-loads '())
+(put 'message-various 'custom-loads '("message"))
+(put 'resize-minibuffer 'custom-loads '())
+(put 'gnus-group-levels 'custom-loads '("gnus-group"))
+(put 'gnus-summary-format 'custom-loads '("gnus-sum"))
+(put 'gnus-score-decay 'custom-loads '("gnus-score"))
+(put 'fill 'custom-loads '())
+(put 'gnus-extract-post 'custom-loads '("gnus-uu"))
+(put 'debug 'custom-loads '())
+(put 'display 'custom-loads '())
+(put 'faces 'custom-loads '("gnus" "message"))
+(put 'diary 'custom-loads '())
+(put 'gnus-various 'custom-loads '("gnus-sum"))
+(put 'smiley 'custom-loads '())
+(put 'browse-url 'custom-loads '())
+(put 'gnus-article-highlight 'custom-loads '("gnus-art"))
+(put 'news 'custom-loads '("gnus" "message"))
+(put 'gnus-cache 'custom-loads '())
+(put 'message-insertion 'custom-loads '("message"))
+(put 'hyper-apropos 'custom-loads '())
+(put 'message-faces 'custom-loads '("message"))
+(put 'vc 'custom-loads '())
+(put 'alloc 'custom-loads '())
+(put 'isearch 'custom-loads '())
+(put 'gnus-score-files 'custom-loads '("gnus-score"))
+(put 'modeline 'custom-loads '())
+(put 'gnus-summary-marks 'custom-loads '("gnus-sum"))
+(put 'picons 'custom-loads '("gnus-picon"))
+(put 'processes-basics 'custom-loads '())
+(put 'nnmail-prepare 'custom-loads '("nnmail"))
+(put 'message-buffers 'custom-loads '("message"))
+(put 'editing 'custom-loads '())
+(put 'matching 'custom-loads '())
+(put 'gnus-article-mime 'custom-loads '("gnus-art" "gnus-sum"))
+(put 'ps-print-color 'custom-loads '())
+(put 'undo 'custom-loads '())
+(put 'x 'custom-loads '())
diff -r 4de2936b4e77 -r 0132846995bd lisp/gnus/gnus-art.el
--- a/lisp/gnus/gnus-art.el	Mon Aug 13 09:42:28 2007 +0200
+++ b/lisp/gnus/gnus-art.el	Mon Aug 13 09:43:35 2007 +0200
@@ -583,7 +583,8 @@
     (let ((b (point-min)))
       (while (setq b (text-property-any b (point-max) 'article-type type))
 	(delete-region
-	 b (text-property-not-all b (point-max) 'article-type type))))))
+	 b (or (text-property-not-all b (point-max) 'article-type type)
+	       (point-max)))))))
 
 (defun gnus-article-delete-invisible-text ()
   "Delete all invisible text in the current buffer."
@@ -591,7 +592,8 @@
     (let ((b (point-min)))
       (while (setq b (text-property-any b (point-max) 'invisible t))
 	(delete-region
-	 b (text-property-not-all b (point-max) 'invisible t))))))
+	 b (or (text-property-not-all b (point-max) 'invisible t)
+	       (point-max)))))))
 
 (defun gnus-article-text-type-exists-p (type)
   "Say whether any text of type TYPE exists in the buffer."
@@ -959,28 +961,28 @@
 	;; Hide the "header".
 	(when (search-forward "\n-----BEGIN PGP SIGNED MESSAGE-----\n" nil t)
 	  (gnus-article-hide-text-type (1+ (match-beginning 0))
-				       (match-end 0) 'pgp))
-	(setq beg (point))
-	;; Hide the actual signature.
-	(and (search-forward "\n-----BEGIN PGP SIGNATURE-----\n" nil t)
-	     (setq end (1+ (match-beginning 0)))
-	     (gnus-article-hide-text-type
-	      end
-	      (if (search-forward "\n-----END PGP SIGNATURE-----\n" nil t)
-		  (match-end 0)
-		;; Perhaps we shouldn't hide to the end of the buffer
-		;; if there is no end to the signature?
-		(point-max))
-	      'pgp))
-	;; Hide "- " PGP quotation markers.
-	(when (and beg end)
-	  (narrow-to-region beg end)
-	  (goto-char (point-min))
-	  (while (re-search-forward "^- " nil t)
-	    (gnus-article-hide-text-type
-	     (match-beginning 0) (match-end 0) 'pgp))
-	  (widen)))
-      (run-hooks 'gnus-article-hide-pgp-hook))))
+				       (match-end 0) 'pgp)
+	  (setq beg (point))
+	  ;; Hide the actual signature.
+	  (and (search-forward "\n-----BEGIN PGP SIGNATURE-----\n" nil t)
+	       (setq end (1+ (match-beginning 0)))
+	       (gnus-article-hide-text-type
+		end
+		(if (search-forward "\n-----END PGP SIGNATURE-----\n" nil t)
+		    (match-end 0)
+		  ;; Perhaps we shouldn't hide to the end of the buffer
+		  ;; if there is no end to the signature?
+		  (point-max))
+		'pgp))
+	  ;; Hide "- " PGP quotation markers.
+	  (when (and beg end)
+	    (narrow-to-region beg end)
+	    (goto-char (point-min))
+	    (while (re-search-forward "^- " nil t)
+	      (gnus-article-hide-text-type
+	       (match-beginning 0) (match-end 0) 'pgp))
+	    (widen)))
+	(run-hooks 'gnus-article-hide-pgp-hook)))))
 
 (defun article-hide-pem (&optional arg)
   "Toggle hiding of any PEM headers and signatures in the current article.
@@ -1124,7 +1126,8 @@
       nil)))
 
 (eval-and-compile
-  (autoload 'w3-parse-buffer "w3-parse"))
+  (autoload 'w3-parse-buffer "w3-parse")
+  (autoload 'w3-do-setup "w3" "" t))
 
 (defun gnus-article-treat-html ()
   "Render HTML."
@@ -1132,6 +1135,7 @@
   (let ((cbuf (current-buffer)))
     (set-buffer gnus-article-buffer)
     (let (buf buffer-read-only b e)
+      (w3-do-setup)
       (goto-char (point-min))
       (narrow-to-region
        (if (search-forward "\n\n" nil t)
@@ -1746,6 +1750,7 @@
 (gnus-define-keys gnus-article-mode-map
   " " gnus-article-goto-next-page
   "\177" gnus-article-goto-prev-page
+  [backspace] gnus-article-goto-prev-page
   [delete] gnus-article-goto-prev-page
   "\C-c^" gnus-article-refer-article
   "h" gnus-article-show-summary
diff -r 4de2936b4e77 -r 0132846995bd lisp/gnus/gnus-demon.el
--- a/lisp/gnus/gnus-demon.el	Mon Aug 13 09:42:28 2007 +0200
+++ b/lisp/gnus/gnus-demon.el	Mon Aug 13 09:43:35 2007 +0200
@@ -240,7 +240,7 @@
 
 (defun gnus-demon-add-nocem ()
   "Add daemonic NoCeM handling to Gnus."
-  (gnus-demon-add-handler 'gnus-demon-scan-nocem 60 t))
+  (gnus-demon-add-handler 'gnus-demon-scan-nocem 60 30))
 
 (defun gnus-demon-scan-nocem ()
   "Scan NoCeM groups for NoCeM messages."
diff -r 4de2936b4e77 -r 0132846995bd lisp/gnus/gnus-group.el
--- a/lisp/gnus/gnus-group.el	Mon Aug 13 09:42:28 2007 +0200
+++ b/lisp/gnus/gnus-group.el	Mon Aug 13 09:43:35 2007 +0200
@@ -423,6 +423,7 @@
     "n" gnus-group-next-unread-group
     "p" gnus-group-prev-unread-group
     "\177" gnus-group-prev-unread-group
+    [backspace] gnus-group-prev-unread-group
     [delete] gnus-group-prev-unread-group
     "N" gnus-group-next-group
     "P" gnus-group-prev-group
@@ -505,6 +506,7 @@
     "r" gnus-group-rename-group
     "c" gnus-group-customize
     "\177" gnus-group-delete-group
+    [backspace] gnus-group-delete-group
     [delete] gnus-group-delete-group)
 
   (gnus-define-keys (gnus-group-soup-map "s" gnus-group-group-map)
@@ -1274,24 +1276,26 @@
 	      (not (eobp))
 	      (not (setq
 		    found
-		    (and (or all
-			     (and
-			      (let ((unread
-				     (get-text-property (point) 'gnus-unread)))
-				(and (numberp unread) (> unread 0)))
-			      (setq lev (get-text-property (point)
+		    (and
+		     (get-text-property (point) 'gnus-group)
+		     (or all
+			 (and
+			  (let ((unread
+				 (get-text-property (point) 'gnus-unread)))
+			    (and (numberp unread) (> unread 0)))
+			  (setq lev (get-text-property (point)
+						       'gnus-level))
+			  (<= lev gnus-level-subscribed)))
+		     (or (not level)
+			 (and (setq lev (get-text-property (point)
 							   'gnus-level))
-			      (<= lev gnus-level-subscribed)))
-			 (or (not level)
-			     (and (setq lev (get-text-property (point)
-							       'gnus-level))
-				  (or (= lev level)
-				      (and (< lev low)
-					   (< level lev)
-					   (progn
-					     (setq low lev)
-					     (setq pos (point))
-					     nil))))))))
+			      (or (= lev level)
+				  (and (< lev low)
+				       (< level lev)
+				       (progn
+					 (setq low lev)
+					 (setq pos (point))
+					 nil))))))))
 	      (zerop (forward-line way)))))
     (if found
 	(progn (gnus-group-position-point) t)
@@ -2022,15 +2026,16 @@
   (let* ((group
 	  (if solid (gnus-read-group "Group name: ")
 	    (message-unique-id)))
+	 (default-type (or (car gnus-group-web-type-history)
+			   (symbol-name (caar nnweb-type-definition))))
 	 (type
-	  (completing-read
-	   "Search engine type: "
-	   (mapcar (lambda (elem) (list (symbol-name (car elem))))
-		   nnweb-type-definition)
-	   nil t (cons (or (car gnus-group-web-type-history)
-			   (symbol-name (caar nnweb-type-definition)))
-		       0)
-	   'gnus-group-web-type-history))
+	  (gnus-string-or
+	   (completing-read
+	    (format "Search engine type (default %s): " default-type)
+	    (mapcar (lambda (elem) (list (symbol-name (car elem))))
+		    nnweb-type-definition)
+	    nil t nil 'gnus-group-web-type-history)
+	   default-type))
 	 (search
 	  (read-string
 	   "Search string: "
@@ -2913,11 +2918,11 @@
   (interactive
    (list
     (gnus-group-group-name)
-    (cond (current-prefix-arg
-	   (completing-read
-	    "Faq dir: " (and (listp gnus-group-faq-directory)
-			     (mapcar (lambda (file) (list file))
-				     gnus-group-faq-directory)))))))
+    (when current-prefix-arg
+      (completing-read
+       "Faq dir: " (and (listp gnus-group-faq-directory)
+			(mapcar (lambda (file) (list file))
+				gnus-group-faq-directory))))))
   (unless group
     (error "No group name given"))
   (let ((dirs (or faq-dir gnus-group-faq-directory))
diff -r 4de2936b4e77 -r 0132846995bd lisp/gnus/gnus-msg.el
--- a/lisp/gnus/gnus-msg.el	Mon Aug 13 09:42:28 2007 +0200
+++ b/lisp/gnus/gnus-msg.el	Mon Aug 13 09:43:35 2007 +0200
@@ -512,6 +512,7 @@
 
 ;; Dummy to avoid byte-compile warning.
 (defvar nnspool-rejected-article-hook)
+(defvar xemacs-codename)
 
 ;;; Since the X-Newsreader/X-Mailer are ``vanity'' headers, they might
 ;;; as well include the Emacs version as well.
diff -r 4de2936b4e77 -r 0132846995bd lisp/gnus/gnus-score.el
--- a/lisp/gnus/gnus-score.el	Mon Aug 13 09:42:28 2007 +0200
+++ b/lisp/gnus/gnus-score.el	Mon Aug 13 09:43:35 2007 +0200
@@ -1081,11 +1081,11 @@
 	  (decay (car (gnus-score-get 'decay alist)))
 	  (eval (car (gnus-score-get 'eval alist))))
       ;; Perform possible decays.
-      (when (and gnus-decay-scores
-		 (gnus-decay-scores
-		  alist (or decay (gnus-time-to-day (current-time)))))
-	(gnus-score-set 'touched '(t) alist)
-	(gnus-score-set 'decay (list (gnus-time-to-day (current-time)))))
+      (when gnus-decay-scores
+	(when (or (not decay)
+		  (gnus-decay-scores alist (gnus-time-to-day (current-time))))
+	  (gnus-score-set 'touched '(t) alist)
+	  (gnus-score-set 'decay (list (gnus-time-to-day (current-time))))))
       ;; We do not respect eval and files atoms from global score
       ;; files.
       (and files (not global)
@@ -2196,7 +2196,9 @@
 	(gnus-add-current-to-buffer-list)
 	(while trace
 	  (insert (format "%S  ->  %s\n" (cdar trace)
-			  (file-name-nondirectory (caar trace))))
+			  (if (caar trace)
+			      (file-name-nondirectory (caar trace))
+			    "(non-file rule)")))
 	  (setq trace (cdr trace)))
 	(goto-char (point-min))
 	(gnus-configure-windows 'score-trace)))
@@ -2745,11 +2747,13 @@
 	  (while (setq kill (pop entry))
 	    (when (nth 2 kill)
 	      (setq updated t)
-	      (setq score (or (car kill) gnus-score-interactive-default-score)
+	      (setq score (or (nth 1 kill)
+			      gnus-score-interactive-default-score)
 		    n times)
 	      (while (natnump (decf n))
 		(setq score (funcall gnus-decay-score-function score)))
-	      (setcar kill score))))))
+	      (setcdr kill (cons score 
+				 (cdr (cdr kill)))))))))
     ;; Return whether this score file needs to be saved.  By Je-haysuss!
     updated))
 
diff -r 4de2936b4e77 -r 0132846995bd lisp/gnus/gnus-srvr.el
--- a/lisp/gnus/gnus-srvr.el	Mon Aug 13 09:42:28 2007 +0200
+++ b/lisp/gnus/gnus-srvr.el	Mon Aug 13 09:43:35 2007 +0200
@@ -503,6 +503,8 @@
    "n" gnus-browse-next-group
    "p" gnus-browse-prev-group
    "\177" gnus-browse-prev-group
+   [backspace] gnus-browse-prev-group
+   [delete] gnus-browse-prev-group
    "N" gnus-browse-next-group
    "P" gnus-browse-prev-group
    "\M-n" gnus-browse-next-group
diff -r 4de2936b4e77 -r 0132846995bd lisp/gnus/gnus-sum.el
--- a/lisp/gnus/gnus-sum.el	Mon Aug 13 09:42:28 2007 +0200
+++ b/lisp/gnus/gnus-sum.el	Mon Aug 13 09:43:35 2007 +0200
@@ -1036,6 +1036,7 @@
   (gnus-define-keys gnus-summary-mode-map
     " " gnus-summary-next-page
     "\177" gnus-summary-prev-page
+    [backspace] gnus-summary-prev-page
     [delete] gnus-summary-prev-page
     "\r" gnus-summary-scroll-up
     "n" gnus-summary-next-unread-article
@@ -1193,7 +1194,7 @@
     "j" gnus-summary-goto-article
     "g" gnus-summary-goto-subject
     "l" gnus-summary-goto-last-article
-    "p" gnus-summary-pop-article)
+    "o" gnus-summary-pop-article)
 
   (gnus-define-keys (gnus-summary-thread-map "T" gnus-summary-mode-map)
     "k" gnus-summary-kill-thread
@@ -1235,6 +1236,7 @@
     " " gnus-summary-next-page
     "n" gnus-summary-next-page
     "\177" gnus-summary-prev-page
+    [backspace] gnus-summary-prev-page
     [delete] gnus-summary-prev-page
     "p" gnus-summary-prev-page
     "\r" gnus-summary-scroll-up
@@ -1307,6 +1309,7 @@
     "e" gnus-summary-expire-articles
     "\M-\C-e" gnus-summary-expire-articles-now
     "\177" gnus-summary-delete-article
+    [backspace] gnus-summary-delete-article
     [delete] gnus-summary-delete-article
     "m" gnus-summary-move-article
     "r" gnus-summary-respool-article
@@ -4997,7 +5000,7 @@
   (suppress-keymap gnus-dead-summary-mode-map)
   (substitute-key-definition
    'undefined 'gnus-summary-wake-up-the-dead gnus-dead-summary-mode-map)
-  (let ((keys '("\C-d" "\r" "\177")))
+  (let ((keys '("\C-d" "\r" "\177" [backspace] [delete])))
     (while keys
       (define-key gnus-dead-summary-mode-map
 	(pop keys) 'gnus-summary-wake-up-the-dead))))
@@ -5083,7 +5086,8 @@
     (when current-prefix-arg
       (completing-read
        "Faq dir: " (and (listp gnus-group-faq-directory)
-			gnus-group-faq-directory)))))
+			(mapcar (lambda (file) (list file))
+				gnus-group-faq-directory))))))
   (let (gnus-faq-buffer)
     (when (setq gnus-faq-buffer
 		(gnus-group-fetch-faq gnus-newsgroup-name faq-dir))
diff -r 4de2936b4e77 -r 0132846995bd lisp/gnus/gnus-topic.el
--- a/lisp/gnus/gnus-topic.el	Mon Aug 13 09:42:28 2007 +0200
+++ b/lisp/gnus/gnus-topic.el	Mon Aug 13 09:43:35 2007 +0200
@@ -894,6 +894,8 @@
     [tab] gnus-topic-indent
     "r" gnus-topic-rename
     "\177" gnus-topic-delete
+    [backpace] gnus-topic-delete
+    [delete] gnus-topic-delete
     "h" gnus-topic-toggle-display-empty-topics)
 
   (gnus-define-keys (gnus-topic-sort-map "S" gnus-group-topic-map)
diff -r 4de2936b4e77 -r 0132846995bd lisp/gnus/gnus-xmas.el
--- a/lisp/gnus/gnus-xmas.el	Mon Aug 13 09:42:28 2007 +0200
+++ b/lisp/gnus/gnus-xmas.el	Mon Aug 13 09:43:35 2007 +0200
@@ -69,7 +69,8 @@
   "Colors used for the Gnus logo.")
 
 (defcustom gnus-article-x-face-command
-  (if (featurep 'xface)
+  (if (or (featurep 'xface)
+	  (featurep 'xpm))
       'gnus-xmas-article-display-xface
     "{ echo '/* Width=48, Height=48 */'; uncompface; } | icontopbm | xv -quit -")
   "String or function to be executed to display an X-Face header.
@@ -133,11 +134,12 @@
   (if (stringp buffer)
       nil
     (map-extents (lambda (extent ignored)
-		   (remove-text-properties
-		    start end
-		    (list (extent-property extent 'text-prop) nil)
-		    buffer))
-		 buffer start end nil nil 'text-prop)
+                   (remove-text-properties
+                    start end
+                    (list (extent-property extent 'text-prop) nil)
+                    buffer)
+		   nil)
+                 buffer start end nil nil 'text-prop)
     (gnus-add-text-properties start end props buffer)))
 
 (defun gnus-xmas-highlight-selected-summary ()
@@ -211,7 +213,8 @@
     ;; We nix out any glyphs over 126 below ctl-arrow.
     (let ((i (if (integerp ctl-arrow) ctl-arrow 160)))
       (while (>= (setq i (1- i)) 127)
-	(aset table i [??])))
+	(unless (aref table i)
+	  (aset table i [??]))))
     ;; Can't use `set-specifier' because of a bug in 19.14 and earlier
     (add-spec-to-specifier current-display-table table (current-buffer) nil)))
 
@@ -509,7 +512,8 @@
   (add-hook 'gnus-summary-mode-hook 'gnus-xmas-setup-summary-toolbar)
 
   (add-hook 'gnus-summary-mode-hook
-	    'gnus-xmas-switch-horizontal-scrollbar-off))
+	    'gnus-xmas-switch-horizontal-scrollbar-off)
+  (add-hook 'gnus-tree-mode-hook 'gnus-xmas-switch-horizontal-scrollbar-off))
 
 
 ;;; XEmacs logo and toolbar.
@@ -526,15 +530,16 @@
     (let* ((logo-xpm (expand-file-name "gnus.xpm" gnus-xmas-glyph-directory))
 	   (logo-xbm (expand-file-name "gnus.xbm" gnus-xmas-glyph-directory))
 	   (glyph (make-glyph
-		   (list
-		    (vector 'xpm
-			    ':file logo-xpm
-			    ':color-symbols
-			    `(("thing" . ,(car gnus-xmas-logo-colors))
-			      ("shadow" . ,(cadr gnus-xmas-logo-colors))
-			      ("background" . ,(face-background 'default))))
-		    (vector 'xbm :file logo-xbm)
-		    (vector 'nothing)))))
+		   `(,@(if (featurep 'xpm)
+			   (list
+			    (vector 'xpm
+			     ':file logo-xpm
+			     ':color-symbols
+			     `(("thing" . ,(car gnus-xmas-logo-colors))
+			       ("shadow" . ,(cadr gnus-xmas-logo-colors))
+			       ("background" . ,(face-background 'default))))))
+		       ,(vector 'xbm :file logo-xbm)
+		       ,(vector 'nothing)))))
       (insert " ")
       (set-extent-begin-glyph (make-extent (point) (point)) glyph)
       (goto-char (point-min))
@@ -717,21 +722,24 @@
   "Display any XFace headers in the current article."
   (save-excursion
     (let ((xface-glyph
-	   (if (featurep 'xface)
-	       (make-glyph (vector 'xface :data
-				   (concat "X-Face: "
-					   (buffer-substring beg end))))
-	     (let ((cur (current-buffer)))
-	       (save-excursion
-		 (gnus-set-work-buffer)
-		 (insert (format "%s" (buffer-substring beg end cur)))
-		 (gnus-xmas-call-region "uncompface")
-		 (goto-char (point-min))
-		 (insert "/* Width=48, Height=48 */\n")
-		 (gnus-xmas-call-region "icontopbm")
-		 (gnus-xmas-call-region "ppmtoxpm")
-		 (make-glyph
-		  (vector 'xpm :data (buffer-string))))))))
+	   (cond ((featurep 'xface)
+		  (make-glyph (vector 'xface :data
+				      (concat "X-Face: "
+					      (buffer-substring beg end)))))
+		 ((featurep 'xpm)
+		  (let ((cur (current-buffer)))
+		    (save-excursion
+		      (gnus-set-work-buffer)
+		      (insert (format "%s" (buffer-substring beg end cur)))
+		      (gnus-xmas-call-region "uncompface")
+		      (goto-char (point-min))
+		      (insert "/* Width=48, Height=48 */\n")
+		      (gnus-xmas-call-region "icontopbm")
+		      (gnus-xmas-call-region "ppmtoxpm")
+		      (make-glyph
+		       (vector 'xpm :data (buffer-string))))))
+		 (t
+		  (make-glyph [nothing])))))
       (set-glyph-face xface-glyph 'gnus-x-face)
       (goto-char (point-min))
       (re-search-forward "^From:" nil t)
@@ -768,13 +776,15 @@
 	   (file-xbm (expand-file-name "gnus-pointer.xbm"
 				    gnus-xmas-glyph-directory))
 	   (glyph (make-glyph
-		   (list
-		    ;; Let's try a nifty XPM
-		    (vector 'xpm ':file file-xpm)
-		    ;; Then a not-so-nifty XBM
-		    (vector 'xbm ':file file-xbm)
-		    ;; Then the simple string
-		    (vector 'string ':data "Gnus:")))))
+		   ;; Gag gag gag.
+		   `(
+		     ,@(if (featurep 'xpm)
+			   ;; Let's try a nifty XPM
+			   (list (vector 'xpm ':file file-xpm)))
+		       ;; Then a not-so-nifty XBM
+		       ,(vector 'xbm ':file file-xbm)
+		       ;; Then the simple string
+		       ,(vector 'string ':data "Gnus:")))))
       (set-glyph-face glyph 'modeline-buffer-id)
       glyph)))
 
diff -r 4de2936b4e77 -r 0132846995bd lisp/gnus/gnus.el
--- a/lisp/gnus/gnus.el	Mon Aug 13 09:42:28 2007 +0200
+++ b/lisp/gnus/gnus.el	Mon Aug 13 09:43:35 2007 +0200
@@ -226,7 +226,7 @@
   :link '(custom-manual "(gnus)Exiting Gnus")
   :group 'gnus)
 
-(defconst gnus-version-number "5.4.56"
+(defconst gnus-version-number "5.4.59"
   "Version number for this version of Gnus.")
 
 (defconst gnus-version (format "Gnus v%s" gnus-version-number)
@@ -647,12 +647,13 @@
   (save-excursion
     (save-restriction
       (narrow-to-region start end)
-      (indent-rigidly start end arg)
-      ;; We translate tabs into spaces -- not everybody uses
-      ;; an 8-character tab.
-      (goto-char (point-min))
-      (while (search-forward "\t" nil t)
-	(replace-match "        " t t)))))
+      (let ((tab-width 8))
+	(indent-rigidly start end arg)
+	;; We translate tabs into spaces -- not everybody uses
+	;; an 8-character tab.
+	(goto-char (point-min))
+	(while (search-forward "\t" nil t)
+	  (replace-match "        " t t))))))
 
 (defvar gnus-simple-splash nil)
 
@@ -1907,6 +1908,20 @@
 ;;; Gnus Utility Functions
 ;;;
 
+(defmacro gnus-string-or (&rest strings)
+  "Return the first element of STRINGS that is a non-blank string.
+STRINGS will be evaluated in normal `or' order."
+  `(gnus-string-or-1 ',strings))
+
+(defun gnus-string-or-1 (strings)
+  (let (string)
+    (while strings
+      (setq string (eval (pop strings)))
+      (if (string-match "^[ \t]*$" string)
+	  (setq string nil)
+	(setq strings nil)))
+    string))
+
 ;; Add the current buffer to the list of buffers to be killed on exit.
 (defun gnus-add-current-to-buffer-list ()
   (or (memq (current-buffer) gnus-buffer-list)
diff -r 4de2936b4e77 -r 0132846995bd lisp/gnus/message.el
--- a/lisp/gnus/message.el	Mon Aug 13 09:42:28 2007 +0200
+++ b/lisp/gnus/message.el	Mon Aug 13 09:43:35 2007 +0200
@@ -2298,7 +2298,8 @@
        (concat "^" (regexp-quote mail-header-separator) "$"))
       (while (not (eobp))
 	(when (not (looking-at "[ \t\n]"))
-	  (setq sum (logxor (ash sum 1) (following-char))))
+ 	  (setq sum (logxor (ash sum 1) (if (natnump sum) 0 1)
+ 			    (following-char))))
 	(forward-char 1)))
     sum))
 
diff -r 4de2936b4e77 -r 0132846995bd lisp/gnus/nnmail.el
--- a/lisp/gnus/nnmail.el	Mon Aug 13 09:42:28 2007 +0200
+++ b/lisp/gnus/nnmail.el	Mon Aug 13 09:43:35 2007 +0200
@@ -806,7 +806,7 @@
 			   (= (following-char) ?\n)))
 		     (save-excursion
 		       (forward-line 1)
-		       (while (looking-at ">From ")
+		       (while (looking-at ">From \\|From ")
 			 (forward-line 1))
 		       (looking-at "[^ \n\t:]+[ \n\t]*:")))
 	    (setq found 'yes)))))
@@ -835,7 +835,7 @@
 			   (= (following-char) ?\n)))
 		     (save-excursion
 		       (forward-line 1)
-		       (while (looking-at ">From ")
+		       (while (looking-at ">From \\|From ")
 			 (forward-line 1))
 		       (looking-at "[^ \n\t:]+[ \n\t]*:")))
 	    (setq found 'yes)))))
diff -r 4de2936b4e77 -r 0132846995bd lisp/gnus/nntp.el
--- a/lisp/gnus/nntp.el	Mon Aug 13 09:42:28 2007 +0200
+++ b/lisp/gnus/nntp.el	Mon Aug 13 09:43:35 2007 +0200
@@ -73,10 +73,11 @@
 
 Two pre-made functions are `nntp-open-network-stream', which is the
 default, and simply connects to some port or other on the remote
-system (see nntp-port-number).  The other are `nntp-open-rlogin', which
-does an rlogin on the remote system, and then does a telnet to the
-NNTP server available there (see nntp-rlogin-parameters) and `nntp-open-telnet' which
-telnets to a remote system, logs in and does the same")
+system (see nntp-port-number).  The other are `nntp-open-rlogin',
+which does an rlogin on the remote system, and then does a telnet to
+the NNTP server available there (see nntp-rlogin-parameters) and
+`nntp-open-telnet' which telnets to a remote system, logs in and does
+the same.")
 
 (defvoo nntp-rlogin-parameters '("telnet" "-8" "${NNTPSERVER:=news}" "nntp")
   "*Parameters to `nntp-open-login'.
@@ -189,7 +190,7 @@
   (save-excursion
     (set-buffer (process-buffer process))
     (goto-char (point-min))
-    (while (or (not (memq (char-after) '(?2 ?3 ?4 ?5)))
+    (while (or (not (memq (char-after (point)) '(?2 ?3 ?4 ?5)))
 	       (looking-at "480"))
       (when (looking-at "480")
 	(erase-buffer)
@@ -570,20 +571,22 @@
   (when (nntp-send-command-and-decode
 	 "\r?\n\\.\r?\n" "ARTICLE"
 	 (if (numberp article) (int-to-string article) article))
-    (when (and buffer
-	       (not (equal buffer nntp-server-buffer)))
-      (save-excursion
-	(set-buffer nntp-server-buffer)
-	(copy-to-buffer buffer (point-min) (point-max))
-	(nntp-find-group-and-number)))
-    (nntp-find-group-and-number)))
+    (if (and buffer
+	     (not (equal buffer nntp-server-buffer)))
+	(save-excursion
+	  (set-buffer nntp-server-buffer)
+	  (copy-to-buffer buffer (point-min) (point-max))
+	  (nntp-find-group-and-number))
+      (nntp-find-group-and-number))))
 
 (deffoo nntp-request-head (article &optional group server)
   (nntp-possibly-change-group group server)
-  (when (nntp-send-command-and-decode
+  (when (nntp-send-command
 	 "\r?\n\\.\r?\n" "HEAD"
 	 (if (numberp article) (int-to-string article) article))
-    (nntp-find-group-and-number)))
+    (prog1
+	(nntp-find-group-and-number)
+      (nntp-decode-text))))
 
 (deffoo nntp-request-body (article &optional group server)
   (nntp-possibly-change-group group server)
diff -r 4de2936b4e77 -r 0132846995bd lisp/gnus/smiley.el
--- a/lisp/gnus/smiley.el	Mon Aug 13 09:42:28 2007 +0200
+++ b/lisp/gnus/smiley.el	Mon Aug 13 09:43:35 2007 +0200
@@ -53,12 +53,12 @@
 ;; two alists below.
 
 (defcustom smiley-deformed-regexp-alist
-  '(("(?\\(\\^_?\\^;;;\\)\\()\\|\\W\\|[^\000-\177]\\)" 1 "Face_ase3.xbm")
-    ("(?\\(\\^_?\\^;;\\)\\()\\|\\W\\|[^\000-\177]\\)" 1 "Face_ase2.xbm")
-    ("(?\\(\\^_?\\^;\\)\\()\\|\\W\\|[^\000-\177]\\)" 1 "Face_ase.xbm")
-    ("(\\(\\^_?\\^\\)\\()\\|\\W\\|[^\000-\177]\\)" 1 "Face_smile.xbm")
-    ("(\\(;_?;\\))" 1 "Face_weep.xbm")
-    ("(\\(T_?T\\))" 1 "Face_weep.xbm")
+  '(("\\(\\^_?\\^;;;\\)\\W" 1 "WideFaceAse3.xbm")
+    ("\\(\\^_?\\^;;\\)\\W" 1 "WideFaceAse2.xbm")
+    ("\\(\\^_?\\^;\\)\\W" 1 "WideFaceAse1.xbm")
+    ("\\(\\^_?\\^\\)\\W" 1 "WideFaceSmile.xbm")
+    ("\\(\\;_;\\)\\W" 1 "WideFaceWeep.xbm")
+    ("\\(\\T_T\\)\\W" 1 "WideFaceWeep.xbm")
     ("\\(:-*[<�]+\\)\\W" 1 "FaceAngry.xpm")
     ("\\(:-+\\]+\\)\\W" 1 "FaceGoofy.xpm")
     ("\\(:-*D\\)\\W" 1 "FaceGrinning.xpm")
@@ -81,13 +81,7 @@
   :group 'smiley)
 
 (defcustom smiley-nosey-regexp-alist
-  '(("(?\\(\\^_?\\^;;;\\)\\()\\|\\W\\|[^\000-\177]\\)" 1 "Face_ase3.xbm")
-    ("(?\\(\\^_?\\^;;\\)\\()\\|\\W\\|[^\000-\177]\\)" 1 "Face_ase2.xbm")
-    ("(?\\(\\^_?\\^;\\)\\()\\|\\W\\|[^\000-\177]\\)" 1 "Face_ase.xbm")
-    ("(\\(\\^_?\\^\\)\\()\\|\\W\\|[^\000-\177]\\)" 1 "Face_smile.xbm")
-    ("(\\(;_?;\\))" 1 "Face_weep.xbm")
-    ("(\\(T_?T\\))" 1 "Face_weep.xbm")
-    ("\\(:-+[<�]+\\)\\W" 1 "FaceAngry.xpm")
+  '(("\\(:-+[<�]+\\)\\W" 1 "FaceAngry.xpm")
     ("\\(:-+\\]+\\)\\W" 1 "FaceGoofy.xpm")
     ("\\(:-+D\\)\\W" 1 "FaceGrinning.xpm")
     ("\\(:-+[}�]+\\)\\W" 1 "FaceHappy.xpm")
diff -r 4de2936b4e77 -r 0132846995bd lisp/hm--html-menus/auto-autoloads.el
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lisp/hm--html-menus/auto-autoloads.el	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,77 @@
+;;; DO NOT MODIFY THIS FILE
+(if (not (featurep 'hm--html-menus-autoloads))
+    (progn
+
+;;;### (autoloads (hm--html-minor-mode hm--html-mode) "hm--html-mode" "hm--html-menus/hm--html-mode.el")
+
+(autoload 'hm--html-mode "hm--html-mode" "\
+Major mode for editing HTML hypertext documents.  
+Special commands:\\{hm--html-mode-map}
+Turning on hm--html-mode calls the value of the variable hm--html-mode-hook,
+if that value is non-nil." t nil)
+
+(autoload 'hm--html-minor-mode "hm--html-mode" "\
+Toggle hm--html-minor-mode.
+With arg, turn hm--html-minor-mode on iff arg is positive." t nil)
+
+;;;***
+
+;;;### (autoloads (html-view-get-display html-view-goto-url html-view-view-buffer html-view-view-file html-view-start-mosaic) "html-view" "hm--html-menus/html-view.el")
+
+(autoload 'html-view-start-mosaic "html-view" "\
+Start Mosaic." t nil)
+
+(autoload 'html-view-view-file "html-view" "\
+View an html file with Mosaic." t nil)
+
+(autoload 'html-view-view-buffer "html-view" "\
+View html buffer with Mosaic.
+If BUFFER-TO-VIEW is nil, then the current buffer is used." t nil)
+
+(autoload 'html-view-goto-url "html-view" "\
+Goto an URL in Mosaic." t nil)
+
+(autoload 'html-view-get-display "html-view" "\
+Get the display for Mosaic." t nil)
+
+;;;***
+
+;;;### (autoloads (tmpl-insert-template-file tmpl-insert-template-file-from-fixed-dirs tmpl-expand-templates-in-buffer tmpl-expand-templates-in-region) "tmpl-minor-mode" "hm--html-menus/tmpl-minor-mode.el")
+
+(autoload 'tmpl-expand-templates-in-region "tmpl-minor-mode" "\
+Expands the templates in the region from BEGIN to END.
+If BEGIN and END are nil, then the current region is used." t nil)
+
+(autoload 'tmpl-expand-templates-in-buffer "tmpl-minor-mode" "\
+Expands all templates in the current buffer." t nil)
+
+(autoload 'tmpl-insert-template-file-from-fixed-dirs "tmpl-minor-mode" "\
+Inserts a template FILE and expands it, if `tmpl-automatic-expand' is t.
+This command tries to read the template file from a list of
+predefined directories (look at `tmpl-template-dir-list') and it filters
+the contents of these directories with the regular expression
+`tmpl-filter-regexp' (look also at this variable). 
+The command uses a history variable, which could be changed with the
+variable `tmpl-history-variable-name'.
+
+The user of the command is able to change interactively to another
+directory by entering at first the string \"Change the directory\".
+This may be too difficult for the user. Therefore another command
+called `tmpl-insert-template-file' exist, which doesn't use fixed
+directories and filters." t nil)
+
+(autoload 'tmpl-insert-template-file "tmpl-minor-mode" "\
+Inserts a template FILE and expand it, if `tmpl-automatic-expand' is t.
+Look also at `tmpl-template-dir-list', to specify a default template directory.
+You should also take a look at `tmpl-insert-template-file-from-fixed-dirs'
+which has additional advantages (and disadvantages :-).
+
+ATTENTION: The interface of this function has changed. The old 
+function had the argument list (&optional TEMPLATE-DIR AUTOMATIC-EXPAND).
+The variables `tmpl-template-dir-list' and `tmpl-automatic-expand' must
+now be used instead of the args TEMPLATE-DIR and AUTOMATIC-EXPAND." t nil)
+
+;;;***
+
+(provide 'hm--html-menus-autoloads)
+))
diff -r 4de2936b4e77 -r 0132846995bd lisp/hm--html-menus/custom-load.el
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lisp/hm--html-menus/custom-load.el	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,65 @@
+(put 'copyright 'custom-loads '())
+(put 'eldoc 'custom-loads '())
+(put 'execute 'custom-loads '())
+(put 'mouse 'custom-loads '())
+(put 'mail-abbrevs 'custom-loads '())
+(put 'etags 'custom-loads '())
+(put 'limits 'custom-loads '())
+(put 'minibuffer 'custom-loads '())
+(put 'environment 'custom-loads '())
+(put 'sound 'custom-loads '())
+(put 'holidays 'custom-loads '())
+(put 'auto-save 'custom-loads '())
+(put 'ispell 'custom-loads '())
+(put 'fortran-indent 'custom-loads '())
+(put 'lpr 'custom-loads '())
+(put 'message-headers 'custom-loads '())
+(put 'editing-basics 'custom-loads '())
+(put 'internal 'custom-loads '())
+(put 'calendar 'custom-loads '())
+(put 'help-appearance 'custom-loads '())
+(put 'display-time 'custom-loads '())
+(put 'lisp 'custom-loads '())
+(put 'diff 'custom-loads '())
+(put 'paren-matching 'custom-loads '())
+(put 'help 'custom-loads '())
+(put 'local 'custom-loads '())
+(put 'keyboard 'custom-loads '())
+(put 'minubuffer 'custom-loads '())
+(put 'message-sending 'custom-loads '())
+(put 'data 'custom-loads '())
+(put 'ps-print 'custom-loads '())
+(put 'backup 'custom-loads '())
+(put 'frames 'custom-loads '())
+(put 'customize 'custom-loads '())
+(put 'abbrev 'custom-loads '())
+(put 'toolbar 'custom-loads '())
+(put 'compilation 'custom-loads '())
+(put 'dired 'custom-loads '())
+(put 'killing 'custom-loads '())
+(put 'paren-blinking 'custom-loads '())
+(put 'find-file 'custom-loads '())
+(put 'gnuserv 'custom-loads '())
+(put 'maint 'custom-loads '())
+(put 'fill-comments 'custom-loads '())
+(put 'message-mail 'custom-loads '())
+(put 'windows 'custom-loads '())
+(put 'message-various 'custom-loads '())
+(put 'resize-minibuffer 'custom-loads '())
+(put 'fill 'custom-loads '())
+(put 'debug 'custom-loads '())
+(put 'display 'custom-loads '())
+(put 'diary 'custom-loads '())
+(put 'browse-url 'custom-loads '())
+(put 'message-insertion 'custom-loads '())
+(put 'hyper-apropos 'custom-loads '())
+(put 'vc 'custom-loads '())
+(put 'alloc 'custom-loads '())
+(put 'isearch 'custom-loads '())
+(put 'modeline 'custom-loads '())
+(put 'processes-basics 'custom-loads '())
+(put 'editing 'custom-loads '())
+(put 'matching 'custom-loads '())
+(put 'ps-print-color 'custom-loads '())
+(put 'undo 'custom-loads '())
+(put 'x 'custom-loads '())
diff -r 4de2936b4e77 -r 0132846995bd lisp/hyperbole/auto-autoloads.el
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lisp/hyperbole/auto-autoloads.el	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,348 @@
+;;; DO NOT MODIFY THIS FILE
+(if (not (featurep 'hyperbole-autoloads))
+    (progn
+
+;;;### (autoloads (hmail:compose) "hmail" "hyperbole/hmail.el")
+
+(autoload 'hmail:compose "hmail" "\
+Compose mail with ADDRESS and evaluation of EXPR.
+Optional SUBJECT and HELP message may also be given." t nil)
+
+;;;***
+
+;;;### (autoloads (Info-handle-in-note smart-info-assist smart-info) "hmous-info" "hyperbole/hmous-info.el")
+
+(autoload 'smart-info "hmous-info" "\
+Walks through Info documentation networks using one key or mouse key.
+
+If key is pressed within:
+ (1) the first line of an Info Menu Entry or Cross Reference, the desired node
+       is found;
+ (2) the Up, Next, or Previous entries of a Node Header (first line),
+       the desired node is found;
+ (3) the File entry of a Node Header (first line),       
+       the 'Top' node within that file is found;
+ (4) at the end of the current node, the Next node is found (this will
+       descend subtrees if the function 'Info-global-next' is bound);
+ (5) anywhere else (e.g. at the end of a line), the current node entry is
+       scrolled up one windowful.
+
+Returns t if key is pressed within an Info Node Header, Cross Reference,
+or a Menu; otherwise returns nil." t nil)
+
+(autoload 'smart-info-assist "hmous-info" "\
+Walks through Info documentation networks using one assist-key or mouse assist-key.
+
+If assist-key is pressed within:
+ (1) the first line of an Info Menu Entry or Cross Reference, the desired node
+       is found;
+ (2) the Up, Next, or Previous entries of a Node Header (first line),
+       the last node in the history list is found;
+ (3) the File entry of a Node Header (first line),       
+       the 'DIR' root-level node is found;
+ (4) at the end of the current node, the Previous node is found (this will
+       return from subtrees if the function 'Info-global-prev is bound);
+ (5) anywhere else (e.g. at the end of a line), the current node entry is
+       scrolled down one windowful.
+
+Returns t if assist-key is pressed within an Info Node Header, Cross Reference,
+or a Menu; otherwise returns nil." t nil)
+
+(autoload 'Info-handle-in-note "hmous-info" "\
+Follows an Info cross-reference.
+If point is within the first line of an Info note (cross-reference), follows
+cross-reference and returns t; otherwise returns nil." nil nil)
+
+;;;***
+
+;;;### (autoloads (hkey-help-show) "hmouse-drv" "hyperbole/hmouse-drv.el")
+
+(autoload 'hkey-help-show "hmouse-drv" "\
+Saves prior frame configuration if BUFFER displays help.  Displays BUFFER.
+
+Optional second arg CURRENT-WINDOW non-nil forces display of buffer within
+the current window.  By default, it is displayed in another window." nil nil)
+
+;;;***
+
+;;;### (autoloads (smart-tags-file smart-tags-file-path smart-objc smart-lisp-mode-p smart-java-at-tag-p smart-java smart-fortran-at-tag-p smart-c++ smart-c-at-tag-p smart-asm-at-tag-p) "hmouse-tag" "hyperbole/hmouse-tag.el")
+
+(autoload 'smart-asm-at-tag-p "hmouse-tag" "\
+Return assembly tag name that point is within, else nil." nil nil)
+
+(autoload 'smart-c-at-tag-p "hmouse-tag" "\
+Return C tag name that point is within, else nil." nil nil)
+
+(autoload 'smart-c++ "hmouse-tag" "\
+Jumps to the definition of optional C++ IDENTIFIER or the one at point.
+Optional second arg NEXT means jump to next matching C++ tag.
+
+It assumes that its caller has already checked that the key was pressed in an
+appropriate buffer and has moved the cursor to the selected buffer.
+
+If:
+ (1) on a `#include' statement, the include file is displayed;
+     Look for include file in directory lists `smart-c-cpp-include-dirs'
+     and `smart-c-include-dirs'.
+ (2) on a C++ identifier, the identifier definition is displayed,
+     assuming the identifier is found within an `etags' generated tag file
+     in the current directory or any of its ancestor directories.
+ (3) if `smart-c-use-lib-man' is non-nil, the C++ identifier is
+     recognized as a library symbol, and a man page is found for the
+     identifier, then the man page is displayed." t nil)
+
+(autoload 'smart-fortran-at-tag-p "hmouse-tag" "\
+Return Fortran tag name that point is within, else nil." nil nil)
+
+(autoload 'smart-java "hmouse-tag" "\
+Jumps to the definition of optional Java IDENTIFIER or the one at point.
+Optional second arg NEXT means jump to next matching Java tag.
+
+It assumes that its caller has already checked that the key was pressed in an
+appropriate buffer and has moved the cursor to the selected buffer.
+
+If:
+ (1) within a commented @see cross-reference, the referent is displayed;
+ (2) on a `package' or `import' statement, the referent is displayed;
+     Look for referent files in the directory list `smart-java-package-dirs'.
+ (3) on an Java identifier, the identifier definition is displayed,
+     assuming the identifier is found within an `etags' generated tag file
+     in the current directory or any of its ancestor directories." t nil)
+
+(autoload 'smart-java-at-tag-p "hmouse-tag" "\
+Return Java tag name that point is within, else nil." nil nil)
+
+(autoload 'smart-lisp-mode-p "hmouse-tag" "\
+Return t if in a mode which uses Lisp symbols." nil nil)
+
+(autoload 'smart-objc "hmouse-tag" "\
+Jumps to the definition of optional Objective-C IDENTIFIER or the one at point.
+Optional second arg NEXT means jump to next matching Objective-C tag.
+
+It assumes that its caller has already checked that the key was pressed in an
+appropriate buffer and has moved the cursor to the selected buffer.
+
+If:
+ (1) on a `#include' statement, the include file is displayed;
+     Look for include file in directory lists `smart-c-cpp-include-dirs'
+     and `smart-c-include-dirs'.
+ (2) on an Objective-C identifier, the identifier definition is displayed,
+     assuming the identifier is found within an `etags' generated tag file
+     in the current directory or any of its ancestor directories.
+ (3) if `smart-c-use-lib-man' is non-nil, the Objective-C identifier is
+     recognized as a library symbol, and a man page is found for the
+     identifier, then the man page is displayed." t nil)
+
+(autoload 'smart-tags-file-path "hmouse-tag" "\
+Expand relative FILE name by looking it up in the nearest tags file.
+Return FILE unchanged if it exists relative to the current directory or
+cannot be expanded via a tags file." nil nil)
+
+(autoload 'smart-tags-file "hmouse-tag" "\
+Return appropriate tags file name for CURR-FILENAME or `tags-file-name'.
+Optional NAME-OF-TAGS-FILE is the literal filename for which to look." nil nil)
+
+;;;***
+
+;;;### (autoloads (hyperbole) "hui-mini" "hyperbole/hui-mini.el")
+
+(autoload 'hyperbole "hui-mini" "\
+Invokes default Hyperbole menu user interface when not already active.
+Suitable for binding to a key, e.g. {C-h h}.
+Non-interactively, returns t if menu is actually invoked by call, else nil.
+
+Two optional arguments may be given to invoke alternative menus.
+MENU (a symbol) specifies the menu to invoke from MENU-LIST, (a
+Hyperbole menu list structure).  MENU defaults to 'hyperbole and MENU-LIST
+to `hui:menus'.  See `hui:menus' definition for the format of the menu list
+structure." t nil)
+
+;;;***
+
+;;;### (autoloads (var:append) "hvar" "hyperbole/hvar.el")
+
+(autoload 'var:append "hvar" "\
+Appends to value held by VAR-SYMBOL-NAME, LIST-TO-ADD.  Returns new value.
+If VAR-SYMBOL-NAME is unbound, it is set to LIST-TO-ADD.
+Often used to append to 'hook' variables." nil nil)
+
+;;;***
+
+;;;### (autoloads (hypb:display-file-with-logo hypb:configuration) "hypb" "hyperbole/hypb.el")
+
+(autoload 'hypb:configuration "hypb" "\
+Insert Emacs configuration information at the end of optional OUT-BUF or the current buffer." nil nil)
+
+(autoload 'hypb:display-file-with-logo "hypb" "\
+Display an optional text FILE with the InfoDock Associates logo prepended.
+Without file, logo is prepended to the current buffer." nil nil)
+
+;;;***
+
+;;;### (autoloads nil "hyperbole" "hyperbole/hyperbole.el")
+
+(defvar action-key-url-function 'w3-fetch "\
+Value is a function of one argument, a url, which displays the url referent.
+Possible values are:
+  w3-fetch - display using the W3 Emacs web browser;
+  highlight-headers-follow-url-netscape - display in Netscape;
+  highlight-headers-follow-url-mosaic - display in Mosaic.")
+
+(defvar kimport:mode-alist '((t . kimport:text) (outline-mode . kimport:star-outline)) "\
+Alist of (major-mode . importation-function) elements.
+This determines the type of importation done on a file when `kimport:file' is
+called if the major mode of the import file matches the car of an element in
+this list.  If there is no match, then `kimport:suffix-alist' is checked.  If
+that yields no match, the element in this list whose car is 't is used.  It
+normally does an import of a koutline or text file.
+
+Each importation-function must take two arguments, a buffer/file to import
+and a buffer/file into which to insert the imported elements and a third
+optional argument, CHILDREN-P, which when non-nil means insert imported cells
+as the initial set of children of the current cell, if any.
+
+   outline-mode  - imported as an Emacs outline whose entries begin with
+                   asterisks; 
+   .kot
+   .kotl         - imported as a structured koutline
+
+   all others    - imported as text.")
+
+(defvar kimport:suffix-alist '(("\\.otl$" . kimport:star-outline) ("\\.aug$" . kimport:aug-post-outline)) "\
+Alist of (buffer-name-suffix-regexp . importation-function) elements.
+This determines the type of importation done on a file when `kimport:file' is
+called.  Each importation-function must take two arguments, a buffer/file to
+import and a buffer/file into which to insert the imported elements and a
+third optional argument, CHILDREN-P, which when non-nil means insert imported
+cells as the initial set of children of the current cell, if any.
+
+   .otl  - imported as an Emacs outline whose entries begin with asterisks;
+   .kot
+   .kotl - imported as a structured koutline
+   .aug  - imported as an Augment post-numbered outline.")
+
+;;;***
+
+;;;### (autoloads (wconfig-yank-pop wconfig-ring-save wconfig-delete-pop wconfig-restore-by-name wconfig-delete-by-name wconfig-add-by-name) "wconfig" "hyperbole/wconfig.el")
+
+(autoload 'wconfig-add-by-name "wconfig" "\
+Saves the current window configuration under the string NAME.
+When called interactively and a window configuration already exists under
+NAME, confirms whether or not to replace it." t nil)
+
+(autoload 'wconfig-delete-by-name "wconfig" "\
+Deletes window configuration saved under NAME." t nil)
+
+(autoload 'wconfig-restore-by-name "wconfig" "\
+Restores window configuration saved under NAME." t nil)
+
+(autoload 'wconfig-delete-pop "wconfig" "\
+Replaces current window config with most recently saved config in ring.
+Then deletes this new configuration from the ring." t nil)
+
+(autoload 'wconfig-ring-save "wconfig" "\
+Saves the current window configuration onto the save ring.
+Use {\\[wconfig-yank-pop]} to restore it at a later time." t nil)
+
+(autoload 'wconfig-yank-pop "wconfig" "\
+Replaces current window config with prefix arg Nth prior one in save ring.
+Interactively, default value of N = 1, meaning the last saved window
+configuration is displayed.
+
+The sequence of window configurations wraps around, so that after the oldest
+one comes the newest one." t nil)
+
+;;;***
+
+;;;### (autoloads (rolo-logic) "wrolo-logic" "hyperbole/wrolo-logic.el")
+
+(autoload 'rolo-logic "wrolo-logic" "\
+Apply FUNC to all entries in optional IN-BUFS, display entries where FUNC is non-nil.
+If IN-BUFS is nil, 'rolo-file-list' is used.  If optional COUNT-ONLY is
+non-nil, don't display entries, return count of matching entries only.  If
+optional INCLUDE-SUB-ENTRIES flag is non-nil, FUNC will be applied across all
+sub-entries at once.  Default is to apply FUNC to each entry and sub-entry
+separately.  Entries are displayed with all of their sub-entries unless
+INCLUDE-SUB-ENTRIES is nil and optional NO-SUB-ENTRIES-OUT flag is non-nil.
+FUNC should use the free variables 'start' and 'end' which contain the limits
+of the region on which it should operate.  Returns number of applications of
+FUNC that return non-nil." t nil)
+
+;;;***
+
+;;;### (autoloads (rolo-yank rolo-toggle-datestamps rolo-sort rolo-kill rolo-grep rolo-fgrep rolo-edit rolo-display-matches rolo-add) "wrolo" "hyperbole/wrolo.el")
+
+(autoload 'rolo-add "wrolo" "\
+Adds a new entry in personal rolodex for NAME.
+Last name first is best, e.g. \"Smith, John\".
+With prefix argument, prompts for optional FILE to add entry within.
+NAME may be of the form: parent/child to insert child below a parent
+entry which begins with the parent string." t nil)
+
+(autoload 'rolo-display-matches "wrolo" "\
+Display optional DISPLAY-BUF buffer of previously found rolodex matches.
+If DISPLAY-BUF is nil, use the value in `rolo-display-buffer'.
+Second arg RETURN-TO-BUFFER is the buffer to leave point within after the display." t nil)
+
+(autoload 'rolo-edit "wrolo" "\
+Edits a rolodex entry given by optional NAME within `rolo-file-list'.
+With prefix argument, prompts for optional FILE to locate entry within.
+With no NAME arg, simply displays FILE or first entry in `rolo-file-list' in an
+editable mode.  NAME may be of the form: parent/child to edit child below a
+parent entry which begins with the parent string." t nil)
+
+(autoload 'rolo-fgrep "wrolo" "\
+Display rolodex entries matching STRING.
+To a maximum of optional prefix arg MAX-MATCHES, in file(s) from optional
+ROLO-FILE or rolo-file-list.  Default is to find all matching entries.  Each
+entry is displayed with all of its sub-entries.  Optional COUNT-ONLY non-nil
+means don't retrieve and don't display matching entries.  Optional NO-DISPLAY
+non-nil means retrieve entries but don't display.
+
+Nil value of MAX-MATCHES means find all matches, t value means find all matches
+but omit file headers, negative values mean find up to the inverse of that
+number of entries and omit file headers.
+
+Returns number of entries matched.  See also documentation for the variable
+rolo-file-list." t nil)
+
+(autoload 'rolo-grep "wrolo" "\
+Display rolodex entries matching REGEXP.
+To a maximum of prefix arg MAX-MATCHES, in buffer(s) from optional ROLO-BUFS or
+rolo-file-list.  Default is to find all matching entries.  Each entry is
+displayed with all of its sub-entries.  Optional COUNT-ONLY non-nil means don't
+retrieve and don't display matching entries.  Optional NO-DISPLAY non-nil
+means retrieve entries but don't display.
+
+Nil value of MAX-MATCHES means find all matches, t value means find all matches
+but omit file headers, negative values mean find up to the inverse of that
+number of entries and omit file headers.
+
+Returns number of entries matched.  See also documentation for the variable
+rolo-file-list." t nil)
+
+(autoload 'rolo-kill "wrolo" "\
+Kills a rolodex entry given by NAME within `rolo-file-list'.
+With prefix argument, prompts for optional FILE to locate entry within.
+NAME may be of the form: parent/child to kill child below a parent entry
+which begins with the parent string.
+Returns t if entry is killed, nil otherwise." t nil)
+
+(autoload 'rolo-sort "wrolo" "\
+Sorts up to 14 levels of entries in ROLO-FILE (default is personal rolo).
+Assumes entries are delimited by one or more `*'characters.
+Returns list of number of groupings at each entry level." t nil)
+
+(autoload 'rolo-toggle-datestamps "wrolo" "\
+Toggle whether datestamps are updated when rolodex entries are modified.
+With optional ARG, turn them on iff ARG is positive." t nil)
+
+(autoload 'rolo-yank "wrolo" "\
+Inserts at point the first rolodex entry matching NAME.
+With optional prefix arg, REGEXP-P, treats NAME as a regular expression instead
+of a string." t nil)
+
+;;;***
+
+(provide 'hyperbole-autoloads)
+))
diff -r 4de2936b4e77 -r 0132846995bd lisp/hyperbole/custom-load.el
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lisp/hyperbole/custom-load.el	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,65 @@
+(put 'copyright 'custom-loads '())
+(put 'eldoc 'custom-loads '())
+(put 'execute 'custom-loads '())
+(put 'mouse 'custom-loads '())
+(put 'mail-abbrevs 'custom-loads '())
+(put 'etags 'custom-loads '())
+(put 'limits 'custom-loads '())
+(put 'minibuffer 'custom-loads '())
+(put 'environment 'custom-loads '())
+(put 'sound 'custom-loads '())
+(put 'holidays 'custom-loads '())
+(put 'auto-save 'custom-loads '())
+(put 'ispell 'custom-loads '())
+(put 'fortran-indent 'custom-loads '())
+(put 'lpr 'custom-loads '())
+(put 'message-headers 'custom-loads '())
+(put 'editing-basics 'custom-loads '())
+(put 'internal 'custom-loads '())
+(put 'calendar 'custom-loads '())
+(put 'help-appearance 'custom-loads '())
+(put 'display-time 'custom-loads '())
+(put 'lisp 'custom-loads '())
+(put 'diff 'custom-loads '())
+(put 'paren-matching 'custom-loads '())
+(put 'help 'custom-loads '())
+(put 'local 'custom-loads '())
+(put 'keyboard 'custom-loads '())
+(put 'minubuffer 'custom-loads '())
+(put 'message-sending 'custom-loads '())
+(put 'data 'custom-loads '())
+(put 'ps-print 'custom-loads '())
+(put 'backup 'custom-loads '())
+(put 'frames 'custom-loads '())
+(put 'customize 'custom-loads '())
+(put 'abbrev 'custom-loads '())
+(put 'toolbar 'custom-loads '())
+(put 'compilation 'custom-loads '())
+(put 'dired 'custom-loads '())
+(put 'killing 'custom-loads '())
+(put 'paren-blinking 'custom-loads '())
+(put 'find-file 'custom-loads '())
+(put 'gnuserv 'custom-loads '())
+(put 'maint 'custom-loads '())
+(put 'fill-comments 'custom-loads '())
+(put 'message-mail 'custom-loads '())
+(put 'windows 'custom-loads '())
+(put 'message-various 'custom-loads '())
+(put 'resize-minibuffer 'custom-loads '())
+(put 'fill 'custom-loads '())
+(put 'debug 'custom-loads '())
+(put 'display 'custom-loads '())
+(put 'diary 'custom-loads '())
+(put 'browse-url 'custom-loads '())
+(put 'message-insertion 'custom-loads '())
+(put 'hyper-apropos 'custom-loads '())
+(put 'vc 'custom-loads '())
+(put 'alloc 'custom-loads '())
+(put 'isearch 'custom-loads '())
+(put 'modeline 'custom-loads '())
+(put 'processes-basics 'custom-loads '())
+(put 'editing 'custom-loads '())
+(put 'matching 'custom-loads '())
+(put 'ps-print-color 'custom-loads '())
+(put 'undo 'custom-loads '())
+(put 'x 'custom-loads '())
diff -r 4de2936b4e77 -r 0132846995bd lisp/ilisp/custom-load.el
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lisp/ilisp/custom-load.el	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,65 @@
+(put 'copyright 'custom-loads '())
+(put 'eldoc 'custom-loads '())
+(put 'execute 'custom-loads '())
+(put 'mouse 'custom-loads '())
+(put 'mail-abbrevs 'custom-loads '())
+(put 'etags 'custom-loads '())
+(put 'limits 'custom-loads '())
+(put 'minibuffer 'custom-loads '())
+(put 'environment 'custom-loads '())
+(put 'sound 'custom-loads '())
+(put 'holidays 'custom-loads '())
+(put 'auto-save 'custom-loads '())
+(put 'ispell 'custom-loads '())
+(put 'fortran-indent 'custom-loads '())
+(put 'lpr 'custom-loads '())
+(put 'message-headers 'custom-loads '())
+(put 'editing-basics 'custom-loads '())
+(put 'internal 'custom-loads '())
+(put 'calendar 'custom-loads '())
+(put 'help-appearance 'custom-loads '())
+(put 'display-time 'custom-loads '())
+(put 'lisp 'custom-loads '())
+(put 'diff 'custom-loads '())
+(put 'paren-matching 'custom-loads '())
+(put 'help 'custom-loads '())
+(put 'local 'custom-loads '())
+(put 'keyboard 'custom-loads '())
+(put 'minubuffer 'custom-loads '())
+(put 'message-sending 'custom-loads '())
+(put 'data 'custom-loads '())
+(put 'ps-print 'custom-loads '())
+(put 'backup 'custom-loads '())
+(put 'frames 'custom-loads '())
+(put 'customize 'custom-loads '())
+(put 'abbrev 'custom-loads '())
+(put 'toolbar 'custom-loads '())
+(put 'compilation 'custom-loads '())
+(put 'dired 'custom-loads '())
+(put 'killing 'custom-loads '())
+(put 'paren-blinking 'custom-loads '())
+(put 'find-file 'custom-loads '())
+(put 'gnuserv 'custom-loads '())
+(put 'maint 'custom-loads '())
+(put 'fill-comments 'custom-loads '())
+(put 'message-mail 'custom-loads '())
+(put 'windows 'custom-loads '())
+(put 'message-various 'custom-loads '())
+(put 'resize-minibuffer 'custom-loads '())
+(put 'fill 'custom-loads '())
+(put 'debug 'custom-loads '())
+(put 'display 'custom-loads '())
+(put 'diary 'custom-loads '())
+(put 'browse-url 'custom-loads '())
+(put 'message-insertion 'custom-loads '())
+(put 'hyper-apropos 'custom-loads '())
+(put 'vc 'custom-loads '())
+(put 'alloc 'custom-loads '())
+(put 'isearch 'custom-loads '())
+(put 'modeline 'custom-loads '())
+(put 'processes-basics 'custom-loads '())
+(put 'editing 'custom-loads '())
+(put 'matching 'custom-loads '())
+(put 'ps-print-color 'custom-loads '())
+(put 'undo 'custom-loads '())
+(put 'x 'custom-loads '())
diff -r 4de2936b4e77 -r 0132846995bd lisp/iso/auto-autoloads.el
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lisp/iso/auto-autoloads.el	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,33 @@
+;;; DO NOT MODIFY THIS FILE
+(if (not (featurep 'iso-autoloads))
+    (progn
+
+;;;### (autoloads (iso-accents-mode) "iso-acc" "iso/iso-acc.el")
+
+(autoload 'iso-accents-mode "iso-acc" "\
+Toggle ISO Accents mode, in which accents modify the following letter.
+This permits easy insertion of accented characters according to ISO-8859-1.
+When Iso-accents mode is enabled, accent character keys
+\(`, ', \", ^, / and ~) do not self-insert; instead, they modify the following
+letter key so that it inserts an ISO accented letter.
+
+You can customize ISO Accents mode to a particular language
+with the command `iso-accents-customize'.
+
+Special combinations: ~c gives a c with cedilla,
+~d gives an Icelandic eth (d with dash).
+~t gives an Icelandic thorn.
+\"s gives German sharp s.
+/a gives a with ring.
+/e gives an a-e ligature.
+~< and ~> give guillemots.
+~! gives an inverted exclamation mark.
+~? gives an inverted question mark.
+
+With an argument, a positive argument enables ISO Accents mode, 
+and a negative argument disables it." t nil)
+
+;;;***
+
+(provide 'iso-autoloads)
+))
diff -r 4de2936b4e77 -r 0132846995bd lisp/iso/custom-load.el
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lisp/iso/custom-load.el	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,65 @@
+(put 'copyright 'custom-loads '())
+(put 'eldoc 'custom-loads '())
+(put 'execute 'custom-loads '())
+(put 'mouse 'custom-loads '())
+(put 'mail-abbrevs 'custom-loads '())
+(put 'etags 'custom-loads '())
+(put 'limits 'custom-loads '())
+(put 'minibuffer 'custom-loads '())
+(put 'environment 'custom-loads '())
+(put 'sound 'custom-loads '())
+(put 'holidays 'custom-loads '())
+(put 'auto-save 'custom-loads '())
+(put 'ispell 'custom-loads '())
+(put 'fortran-indent 'custom-loads '())
+(put 'lpr 'custom-loads '())
+(put 'message-headers 'custom-loads '())
+(put 'editing-basics 'custom-loads '())
+(put 'internal 'custom-loads '())
+(put 'calendar 'custom-loads '())
+(put 'help-appearance 'custom-loads '())
+(put 'display-time 'custom-loads '())
+(put 'lisp 'custom-loads '())
+(put 'diff 'custom-loads '())
+(put 'paren-matching 'custom-loads '())
+(put 'help 'custom-loads '())
+(put 'local 'custom-loads '())
+(put 'keyboard 'custom-loads '())
+(put 'minubuffer 'custom-loads '())
+(put 'message-sending 'custom-loads '())
+(put 'data 'custom-loads '())
+(put 'ps-print 'custom-loads '())
+(put 'backup 'custom-loads '())
+(put 'frames 'custom-loads '())
+(put 'customize 'custom-loads '())
+(put 'abbrev 'custom-loads '())
+(put 'toolbar 'custom-loads '())
+(put 'compilation 'custom-loads '())
+(put 'dired 'custom-loads '())
+(put 'killing 'custom-loads '())
+(put 'paren-blinking 'custom-loads '())
+(put 'find-file 'custom-loads '())
+(put 'gnuserv 'custom-loads '())
+(put 'maint 'custom-loads '())
+(put 'fill-comments 'custom-loads '())
+(put 'message-mail 'custom-loads '())
+(put 'windows 'custom-loads '())
+(put 'message-various 'custom-loads '())
+(put 'resize-minibuffer 'custom-loads '())
+(put 'fill 'custom-loads '())
+(put 'debug 'custom-loads '())
+(put 'display 'custom-loads '())
+(put 'diary 'custom-loads '())
+(put 'browse-url 'custom-loads '())
+(put 'message-insertion 'custom-loads '())
+(put 'hyper-apropos 'custom-loads '())
+(put 'vc 'custom-loads '())
+(put 'alloc 'custom-loads '())
+(put 'isearch 'custom-loads '())
+(put 'modeline 'custom-loads '())
+(put 'processes-basics 'custom-loads '())
+(put 'editing 'custom-loads '())
+(put 'matching 'custom-loads '())
+(put 'ps-print-color 'custom-loads '())
+(put 'undo 'custom-loads '())
+(put 'x 'custom-loads '())
diff -r 4de2936b4e77 -r 0132846995bd lisp/its/custom-load.el
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lisp/its/custom-load.el	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,57 @@
+(put 'copyright 'custom-loads '())
+(put 'eldoc 'custom-loads '())
+(put 'execute 'custom-loads '())
+(put 'mouse 'custom-loads '())
+(put 'mail-abbrevs 'custom-loads '())
+(put 'etags 'custom-loads '())
+(put 'limits 'custom-loads '())
+(put 'minibuffer 'custom-loads '())
+(put 'environment 'custom-loads '())
+(put 'sound 'custom-loads '())
+(put 'holidays 'custom-loads '())
+(put 'auto-save 'custom-loads '())
+(put 'ispell 'custom-loads '())
+(put 'fortran-indent 'custom-loads '())
+(put 'lpr 'custom-loads '())
+(put 'message-headers 'custom-loads '())
+(put 'editing-basics 'custom-loads '())
+(put 'internal 'custom-loads '())
+(put 'calendar 'custom-loads '())
+(put 'help-appearance 'custom-loads '())
+(put 'display-time 'custom-loads '())
+(put 'diff 'custom-loads '())
+(put 'paren-matching 'custom-loads '())
+(put 'help 'custom-loads '())
+(put 'local 'custom-loads '())
+(put 'keyboard 'custom-loads '())
+(put 'minubuffer 'custom-loads '())
+(put 'message-sending 'custom-loads '())
+(put 'data 'custom-loads '())
+(put 'ps-print 'custom-loads '())
+(put 'frames 'custom-loads '())
+(put 'abbrev 'custom-loads '())
+(put 'toolbar 'custom-loads '())
+(put 'compilation 'custom-loads '())
+(put 'killing 'custom-loads '())
+(put 'paren-blinking 'custom-loads '())
+(put 'gnuserv 'custom-loads '())
+(put 'maint 'custom-loads '())
+(put 'message-mail 'custom-loads '())
+(put 'windows 'custom-loads '())
+(put 'message-various 'custom-loads '())
+(put 'resize-minibuffer 'custom-loads '())
+(put 'fill 'custom-loads '())
+(put 'debug 'custom-loads '())
+(put 'display 'custom-loads '())
+(put 'diary 'custom-loads '())
+(put 'browse-url 'custom-loads '())
+(put 'message-insertion 'custom-loads '())
+(put 'hyper-apropos 'custom-loads '())
+(put 'alloc 'custom-loads '())
+(put 'isearch 'custom-loads '())
+(put 'modeline 'custom-loads '())
+(put 'processes-basics 'custom-loads '())
+(put 'editing 'custom-loads '())
+(put 'matching 'custom-loads '())
+(put 'ps-print-color 'custom-loads '())
+(put 'x 'custom-loads '())
diff -r 4de2936b4e77 -r 0132846995bd lisp/language/auto-autoloads.el
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lisp/language/auto-autoloads.el	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,80 @@
+
+;;;### (autoloads (encode-hz-buffer encode-hz-region decode-hz-buffer decode-hz-region) "china-util" "language/china-util.el")
+
+(autoload 'decode-hz-region "china-util" "\
+Decode HZ/ZW encoded text in the current region.
+Return the length of resulting text." t nil)
+
+(autoload 'decode-hz-buffer "china-util" "\
+Decode HZ/ZW encoded text in the current buffer." t nil)
+
+(autoload 'encode-hz-region "china-util" "\
+Encode the text in the current region to HZ.
+Return the length of resulting text." t nil)
+
+(autoload 'encode-hz-buffer "china-util" "\
+Encode the text in the current buffer to HZ." t nil)
+
+;;;***
+
+;;;### (autoloads (read-hiragana-string japanese-zenkaku-region japanese-hankaku-region japanese-hiragana-region japanese-katakana-region japanese-zenkaku japanese-hankaku japanese-hiragana japanese-katakana) "japan-util" "language/japan-util.el")
+
+(autoload 'japanese-katakana "japan-util" "\
+Convert argument to Katakana and return that.
+The argument may be a character or string.  The result has the same type.
+The argument object is not altered--the value is a copy.
+Optional argument HANKAKU t means to convert to `hankaku' Katakana
+ (`japanese-jisx0201-kana'), in which case return value
+ may be a string even if OBJ is a character if two Katakanas are
+ necessary to represent OBJ." nil nil)
+
+(autoload 'japanese-hiragana "japan-util" "\
+Convert argument to Hiragana and return that.
+The argument may be a character or string.  The result has the same type.
+The argument object is not altered--the value is a copy." nil nil)
+
+(autoload 'japanese-hankaku "japan-util" "\
+Convert argument to `hankaku' and return that.
+The argument may be a character or string.  The result has the same type.
+The argument object is not altered--the value is a copy.
+Optional argument ASCII-ONLY non-nil means to return only ASCII character." nil nil)
+
+(autoload 'japanese-zenkaku "japan-util" "\
+Convert argument to `zenkaku' and return that.
+The argument may be a character or string.  The result has the same type.
+The argument object is not altered--the value is a copy." nil nil)
+
+(autoload 'japanese-katakana-region "japan-util" "\
+Convert Japanese `hiragana' chars in the region to `katakana' chars.
+Optional argument HANKAKU t means to convert to `hankaku katakana' character
+of which charset is `japanese-jisx0201-kana'." t nil)
+
+(autoload 'japanese-hiragana-region "japan-util" "\
+Convert Japanese `katakana' chars in the region to `hiragana'  chars." t nil)
+
+(autoload 'japanese-hankaku-region "japan-util" "\
+Convert Japanese `zenkaku' chars in the region to `hankaku' chars.
+`Zenkaku' chars belong to `japanese-jisx0208'
+`Hankaku' chars belong to `ascii' or `japanese-jisx0201-kana'.
+Optional argument ASCII-ONLY non-nil means to convert only to ASCII char." t nil)
+
+(autoload 'japanese-zenkaku-region "japan-util" "\
+Convert hankaku' chars in the region to Japanese `zenkaku' chars.
+`Zenkaku' chars belong to `japanese-jisx0208'
+`Hankaku' chars belong to `ascii' or `japanese-jisx0201-kana'." t nil)
+
+(autoload 'read-hiragana-string "japan-util" "\
+Read a Hiragana string from the minibuffer, prompting with string PROMPT.
+If non-nil, second arg INITIAL-INPUT is a string to insert before reading." nil nil)
+
+;;;***
+
+;;;### (autoloads (thai-compose-buffer thai-compose-region) "thai-util" "language/thai-util.el")
+
+(autoload 'thai-compose-region "thai-util" "\
+Compose Thai characters in the region." t nil)
+
+(autoload 'thai-compose-buffer "thai-util" "\
+Compose Thai characters in the current buffer." t nil)
+
+;;;***
diff -r 4de2936b4e77 -r 0132846995bd lisp/language/custom-load.el
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lisp/language/custom-load.el	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,57 @@
+(put 'copyright 'custom-loads '())
+(put 'eldoc 'custom-loads '())
+(put 'execute 'custom-loads '())
+(put 'mouse 'custom-loads '())
+(put 'mail-abbrevs 'custom-loads '())
+(put 'etags 'custom-loads '())
+(put 'limits 'custom-loads '())
+(put 'minibuffer 'custom-loads '())
+(put 'environment 'custom-loads '())
+(put 'sound 'custom-loads '())
+(put 'holidays 'custom-loads '())
+(put 'auto-save 'custom-loads '())
+(put 'ispell 'custom-loads '())
+(put 'fortran-indent 'custom-loads '())
+(put 'lpr 'custom-loads '())
+(put 'message-headers 'custom-loads '())
+(put 'editing-basics 'custom-loads '())
+(put 'internal 'custom-loads '())
+(put 'calendar 'custom-loads '())
+(put 'help-appearance 'custom-loads '())
+(put 'display-time 'custom-loads '())
+(put 'diff 'custom-loads '())
+(put 'paren-matching 'custom-loads '())
+(put 'help 'custom-loads '())
+(put 'local 'custom-loads '())
+(put 'keyboard 'custom-loads '())
+(put 'minubuffer 'custom-loads '())
+(put 'message-sending 'custom-loads '())
+(put 'data 'custom-loads '())
+(put 'ps-print 'custom-loads '())
+(put 'frames 'custom-loads '())
+(put 'abbrev 'custom-loads '())
+(put 'toolbar 'custom-loads '())
+(put 'compilation 'custom-loads '())
+(put 'killing 'custom-loads '())
+(put 'paren-blinking 'custom-loads '())
+(put 'gnuserv 'custom-loads '())
+(put 'maint 'custom-loads '())
+(put 'message-mail 'custom-loads '())
+(put 'windows 'custom-loads '())
+(put 'message-various 'custom-loads '())
+(put 'resize-minibuffer 'custom-loads '())
+(put 'fill 'custom-loads '())
+(put 'debug 'custom-loads '())
+(put 'display 'custom-loads '())
+(put 'diary 'custom-loads '())
+(put 'browse-url 'custom-loads '())
+(put 'message-insertion 'custom-loads '())
+(put 'hyper-apropos 'custom-loads '())
+(put 'alloc 'custom-loads '())
+(put 'isearch 'custom-loads '())
+(put 'modeline 'custom-loads '())
+(put 'processes-basics 'custom-loads '())
+(put 'editing 'custom-loads '())
+(put 'matching 'custom-loads '())
+(put 'ps-print-color 'custom-loads '())
+(put 'x 'custom-loads '())
diff -r 4de2936b4e77 -r 0132846995bd lisp/leim/auto-autoloads.el
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lisp/leim/auto-autoloads.el	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,8 @@
+
+;;;### (autoloads (quail-use-package) "quail" "leim/quail.el")
+
+(autoload 'quail-use-package "quail" "\
+Start using Quail package PACKAGE-NAME.
+The remaining arguments are libraries to be loaded before using the package." nil nil)
+
+;;;***
diff -r 4de2936b4e77 -r 0132846995bd lisp/leim/custom-load.el
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lisp/leim/custom-load.el	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,57 @@
+(put 'copyright 'custom-loads '())
+(put 'eldoc 'custom-loads '())
+(put 'execute 'custom-loads '())
+(put 'mouse 'custom-loads '())
+(put 'mail-abbrevs 'custom-loads '())
+(put 'etags 'custom-loads '())
+(put 'limits 'custom-loads '())
+(put 'minibuffer 'custom-loads '())
+(put 'environment 'custom-loads '())
+(put 'sound 'custom-loads '())
+(put 'holidays 'custom-loads '())
+(put 'auto-save 'custom-loads '())
+(put 'ispell 'custom-loads '())
+(put 'fortran-indent 'custom-loads '())
+(put 'lpr 'custom-loads '())
+(put 'message-headers 'custom-loads '())
+(put 'editing-basics 'custom-loads '())
+(put 'internal 'custom-loads '())
+(put 'calendar 'custom-loads '())
+(put 'help-appearance 'custom-loads '())
+(put 'display-time 'custom-loads '())
+(put 'diff 'custom-loads '())
+(put 'paren-matching 'custom-loads '())
+(put 'help 'custom-loads '())
+(put 'local 'custom-loads '())
+(put 'keyboard 'custom-loads '())
+(put 'minubuffer 'custom-loads '())
+(put 'message-sending 'custom-loads '())
+(put 'data 'custom-loads '())
+(put 'ps-print 'custom-loads '())
+(put 'frames 'custom-loads '())
+(put 'abbrev 'custom-loads '())
+(put 'toolbar 'custom-loads '())
+(put 'compilation 'custom-loads '())
+(put 'killing 'custom-loads '())
+(put 'paren-blinking 'custom-loads '())
+(put 'gnuserv 'custom-loads '())
+(put 'maint 'custom-loads '())
+(put 'message-mail 'custom-loads '())
+(put 'windows 'custom-loads '())
+(put 'message-various 'custom-loads '())
+(put 'resize-minibuffer 'custom-loads '())
+(put 'fill 'custom-loads '())
+(put 'debug 'custom-loads '())
+(put 'display 'custom-loads '())
+(put 'diary 'custom-loads '())
+(put 'browse-url 'custom-loads '())
+(put 'message-insertion 'custom-loads '())
+(put 'hyper-apropos 'custom-loads '())
+(put 'alloc 'custom-loads '())
+(put 'isearch 'custom-loads '())
+(put 'modeline 'custom-loads '())
+(put 'processes-basics 'custom-loads '())
+(put 'editing 'custom-loads '())
+(put 'matching 'custom-loads '())
+(put 'ps-print-color 'custom-loads '())
+(put 'x 'custom-loads '())
diff -r 4de2936b4e77 -r 0132846995bd lisp/locale/custom-load.el
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lisp/locale/custom-load.el	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,65 @@
+(put 'copyright 'custom-loads '())
+(put 'eldoc 'custom-loads '())
+(put 'execute 'custom-loads '())
+(put 'mouse 'custom-loads '())
+(put 'mail-abbrevs 'custom-loads '())
+(put 'etags 'custom-loads '())
+(put 'limits 'custom-loads '())
+(put 'minibuffer 'custom-loads '())
+(put 'environment 'custom-loads '())
+(put 'sound 'custom-loads '())
+(put 'holidays 'custom-loads '())
+(put 'auto-save 'custom-loads '())
+(put 'ispell 'custom-loads '())
+(put 'fortran-indent 'custom-loads '())
+(put 'lpr 'custom-loads '())
+(put 'message-headers 'custom-loads '())
+(put 'editing-basics 'custom-loads '())
+(put 'internal 'custom-loads '())
+(put 'calendar 'custom-loads '())
+(put 'help-appearance 'custom-loads '())
+(put 'display-time 'custom-loads '())
+(put 'lisp 'custom-loads '())
+(put 'diff 'custom-loads '())
+(put 'paren-matching 'custom-loads '())
+(put 'help 'custom-loads '())
+(put 'local 'custom-loads '())
+(put 'keyboard 'custom-loads '())
+(put 'minubuffer 'custom-loads '())
+(put 'message-sending 'custom-loads '())
+(put 'data 'custom-loads '())
+(put 'ps-print 'custom-loads '())
+(put 'backup 'custom-loads '())
+(put 'frames 'custom-loads '())
+(put 'customize 'custom-loads '())
+(put 'abbrev 'custom-loads '())
+(put 'toolbar 'custom-loads '())
+(put 'compilation 'custom-loads '())
+(put 'dired 'custom-loads '())
+(put 'killing 'custom-loads '())
+(put 'paren-blinking 'custom-loads '())
+(put 'find-file 'custom-loads '())
+(put 'gnuserv 'custom-loads '())
+(put 'maint 'custom-loads '())
+(put 'fill-comments 'custom-loads '())
+(put 'message-mail 'custom-loads '())
+(put 'windows 'custom-loads '())
+(put 'message-various 'custom-loads '())
+(put 'resize-minibuffer 'custom-loads '())
+(put 'fill 'custom-loads '())
+(put 'debug 'custom-loads '())
+(put 'display 'custom-loads '())
+(put 'diary 'custom-loads '())
+(put 'browse-url 'custom-loads '())
+(put 'message-insertion 'custom-loads '())
+(put 'hyper-apropos 'custom-loads '())
+(put 'vc 'custom-loads '())
+(put 'alloc 'custom-loads '())
+(put 'isearch 'custom-loads '())
+(put 'modeline 'custom-loads '())
+(put 'processes-basics 'custom-loads '())
+(put 'editing 'custom-loads '())
+(put 'matching 'custom-loads '())
+(put 'ps-print-color 'custom-loads '())
+(put 'undo 'custom-loads '())
+(put 'x 'custom-loads '())
diff -r 4de2936b4e77 -r 0132846995bd lisp/mailcrypt/auto-autoloads.el
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lisp/mailcrypt/auto-autoloads.el	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,159 @@
+;;; DO NOT MODIFY THIS FILE
+(if (not (featurep 'mailcrypt-autoloads))
+    (progn
+
+;;;### (autoloads (mc-deactivate-passwd mc-install-write-mode mc-install-read-mode) "mailcrypt" "mailcrypt/mailcrypt.el")
+
+(autoload 'mc-install-read-mode "mailcrypt" nil t nil)
+
+(autoload 'mc-install-write-mode "mailcrypt" nil t nil)
+
+(autoload 'mc-deactivate-passwd "mailcrypt" "\
+*Deactivate the passphrase cache." t nil)
+
+;;;***
+
+;;;### (autoloads (mc-pgp-fetch-key mc-scheme-pgp) "mc-pgp" "mailcrypt/mc-pgp.el")
+
+(autoload 'mc-scheme-pgp "mc-pgp" nil nil nil)
+
+(autoload 'mc-pgp-fetch-key "mc-pgp" "\
+Attempt to fetch a key for addition to PGP keyring.  Interactively,
+prompt for string matching key to fetch.
+
+Non-interactively, ID must be a pair.  The CAR must be a bare Email
+address and the CDR a keyID (with \"0x\" prefix).  Either, but not
+both, may be nil.
+
+Return t if we think we were successful; nil otherwise.  Note that nil
+is not necessarily an error, since we may have merely fired off an Email
+request for the key." t nil)
+
+;;;***
+
+;;;### (autoloads (mc-remailer-insert-response-block mc-remailer-encrypt-for-chain mc-remailer-insert-pseudonym) "mc-remail" "mailcrypt/mc-remail.el")
+
+(autoload 'mc-remailer-insert-pseudonym "mc-remail" "\
+Insert pseudonym as a From field in the hash-mark header.
+
+See the documentation for the variable `mc-remailer-pseudonyms' for
+more information." t nil)
+
+(autoload 'mc-remailer-encrypt-for-chain "mc-remail" "\
+Encrypt message for a remailer chain, prompting for chain to use.
+
+With \\[universal-argument], pause before each encryption." t nil)
+
+(autoload 'mc-remailer-insert-response-block "mc-remail" "\
+Insert response block at point, prompting for chain to use.
+
+With \\[universal-argument], enter a recursive edit of the innermost
+layer of the block before encrypting it." t nil)
+
+;;;***
+
+;;;### (autoloads (mc-mh-snarf-keys mc-mh-verify-signature mc-mh-decrypt-message mc-gnus-decrypt-message mc-gnus-snarf-keys mc-gnus-verify-signature mc-vm-snarf-keys mc-vm-decrypt-message mc-vm-verify-signature mc-rmail-decrypt-message mc-rmail-verify-signature mc-rmail-summary-snarf-keys mc-rmail-summary-decrypt-message mc-rmail-summary-verify-signature mc-snarf-keys mc-snarf mc-insert-public-key mc-verify-signature mc-verify mc-sign-message mc-sign mc-decrypt-message mc-decrypt mc-encrypt-message mc-encrypt mc-cleanup-recipient-headers) "mc-toplev" "mailcrypt/mc-toplev.el")
+
+(autoload 'mc-cleanup-recipient-headers "mc-toplev" nil nil nil)
+
+(autoload 'mc-encrypt "mc-toplev" "\
+*Encrypt the current buffer.
+
+Exact behavior depends on current major mode.
+
+With \\[universal-argument], prompt for User ID to sign as.
+
+With \\[universal-argument] \\[universal-argument], prompt for encryption scheme to use." t nil)
+
+(autoload 'mc-encrypt-message "mc-toplev" "\
+*Encrypt a message for RECIPIENTS using the given encryption SCHEME.
+RECIPIENTS is a comma separated string. If SCHEME is nil, use the value
+of `mc-default-scheme'.  Returns t on success, nil otherwise." nil nil)
+
+(autoload 'mc-decrypt "mc-toplev" "\
+*Decrypt a message in the current buffer.
+
+Exact behavior depends on current major mode." t nil)
+
+(autoload 'mc-decrypt-message "mc-toplev" "\
+Decrypt whatever message is in the current buffer.
+Returns a pair (SUCCEEDED . VERIFIED) where SUCCEEDED is t if the encryption
+succeeded and VERIFIED is t if it had a valid signature." nil nil)
+
+(autoload 'mc-sign "mc-toplev" "\
+*Sign a message in the current buffer.
+
+Exact behavior depends on current major mode.
+
+With one prefix arg, prompts for private key to use, with two prefix args,
+also prompts for encryption scheme to use.  With negative prefix arg,
+inhibits clearsigning (pgp)." t nil)
+
+(autoload 'mc-sign-message "mc-toplev" "\
+Clear sign the message." nil nil)
+
+(autoload 'mc-verify "mc-toplev" "\
+*Verify a message in the current buffer.
+
+Exact behavior depends on current major mode." t nil)
+
+(autoload 'mc-verify-signature "mc-toplev" "\
+*Verify the signature of the signed message in the current buffer.
+Show the result as a message in the minibuffer. Returns t if the signature
+is verified." nil nil)
+
+(autoload 'mc-insert-public-key "mc-toplev" "\
+*Insert your public key at point.
+With one prefix arg, prompts for user id to use. With two prefix
+args, prompts for encryption scheme." t nil)
+
+(autoload 'mc-snarf "mc-toplev" "\
+*Add all public keys in the buffer to your keyring.
+
+Exact behavior depends on current major mode." t nil)
+
+(autoload 'mc-snarf-keys "mc-toplev" "\
+*Add all public keys in the buffer to your keyring." t nil)
+
+(autoload 'mc-rmail-summary-verify-signature "mc-toplev" "\
+*Verify the signature in the current message." t nil)
+
+(autoload 'mc-rmail-summary-decrypt-message "mc-toplev" "\
+*Decrypt the contents of this message" t nil)
+
+(autoload 'mc-rmail-summary-snarf-keys "mc-toplev" "\
+*Adds keys from current message to public key ring" t nil)
+
+(autoload 'mc-rmail-verify-signature "mc-toplev" "\
+*Verify the signature in the current message." t nil)
+
+(autoload 'mc-rmail-decrypt-message "mc-toplev" "\
+*Decrypt the contents of this message" t nil)
+
+(autoload 'mc-vm-verify-signature "mc-toplev" "\
+*Verify the signature in the current VM message" t nil)
+
+(autoload 'mc-vm-decrypt-message "mc-toplev" "\
+*Decrypt the contents of the current VM message" t nil)
+
+(autoload 'mc-vm-snarf-keys "mc-toplev" "\
+*Snarf public key from the contents of the current VM message" t nil)
+
+(autoload 'mc-gnus-verify-signature "mc-toplev" nil t nil)
+
+(autoload 'mc-gnus-snarf-keys "mc-toplev" nil t nil)
+
+(autoload 'mc-gnus-decrypt-message "mc-toplev" nil t nil)
+
+(autoload 'mc-mh-decrypt-message "mc-toplev" "\
+Decrypt the contents of the current MH message in the show buffer." t nil)
+
+(autoload 'mc-mh-verify-signature "mc-toplev" "\
+*Verify the signature in the current MH message." t nil)
+
+(autoload 'mc-mh-snarf-keys "mc-toplev" nil t nil)
+
+;;;***
+
+(provide 'mailcrypt-autoloads)
+))
diff -r 4de2936b4e77 -r 0132846995bd lisp/mailcrypt/custom-load.el
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lisp/mailcrypt/custom-load.el	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,65 @@
+(put 'copyright 'custom-loads '())
+(put 'eldoc 'custom-loads '())
+(put 'execute 'custom-loads '())
+(put 'mouse 'custom-loads '())
+(put 'mail-abbrevs 'custom-loads '())
+(put 'etags 'custom-loads '())
+(put 'limits 'custom-loads '())
+(put 'minibuffer 'custom-loads '())
+(put 'environment 'custom-loads '())
+(put 'sound 'custom-loads '())
+(put 'holidays 'custom-loads '())
+(put 'auto-save 'custom-loads '())
+(put 'ispell 'custom-loads '())
+(put 'fortran-indent 'custom-loads '())
+(put 'lpr 'custom-loads '())
+(put 'message-headers 'custom-loads '())
+(put 'editing-basics 'custom-loads '())
+(put 'internal 'custom-loads '())
+(put 'calendar 'custom-loads '())
+(put 'help-appearance 'custom-loads '())
+(put 'display-time 'custom-loads '())
+(put 'lisp 'custom-loads '())
+(put 'diff 'custom-loads '())
+(put 'paren-matching 'custom-loads '())
+(put 'help 'custom-loads '())
+(put 'local 'custom-loads '())
+(put 'keyboard 'custom-loads '())
+(put 'minubuffer 'custom-loads '())
+(put 'message-sending 'custom-loads '())
+(put 'data 'custom-loads '())
+(put 'ps-print 'custom-loads '())
+(put 'backup 'custom-loads '())
+(put 'frames 'custom-loads '())
+(put 'customize 'custom-loads '())
+(put 'abbrev 'custom-loads '())
+(put 'toolbar 'custom-loads '())
+(put 'compilation 'custom-loads '())
+(put 'dired 'custom-loads '())
+(put 'killing 'custom-loads '())
+(put 'paren-blinking 'custom-loads '())
+(put 'find-file 'custom-loads '())
+(put 'gnuserv 'custom-loads '())
+(put 'maint 'custom-loads '())
+(put 'fill-comments 'custom-loads '())
+(put 'message-mail 'custom-loads '())
+(put 'windows 'custom-loads '())
+(put 'message-various 'custom-loads '())
+(put 'resize-minibuffer 'custom-loads '())
+(put 'fill 'custom-loads '())
+(put 'debug 'custom-loads '())
+(put 'display 'custom-loads '())
+(put 'diary 'custom-loads '())
+(put 'browse-url 'custom-loads '())
+(put 'message-insertion 'custom-loads '())
+(put 'hyper-apropos 'custom-loads '())
+(put 'vc 'custom-loads '())
+(put 'alloc 'custom-loads '())
+(put 'isearch 'custom-loads '())
+(put 'modeline 'custom-loads '())
+(put 'processes-basics 'custom-loads '())
+(put 'editing 'custom-loads '())
+(put 'matching 'custom-loads '())
+(put 'ps-print-color 'custom-loads '())
+(put 'undo 'custom-loads '())
+(put 'x 'custom-loads '())
diff -r 4de2936b4e77 -r 0132846995bd lisp/mel/custom-load.el
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lisp/mel/custom-load.el	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,65 @@
+(put 'copyright 'custom-loads '())
+(put 'eldoc 'custom-loads '())
+(put 'execute 'custom-loads '())
+(put 'mouse 'custom-loads '())
+(put 'mail-abbrevs 'custom-loads '())
+(put 'etags 'custom-loads '())
+(put 'limits 'custom-loads '())
+(put 'minibuffer 'custom-loads '())
+(put 'environment 'custom-loads '())
+(put 'sound 'custom-loads '())
+(put 'holidays 'custom-loads '())
+(put 'auto-save 'custom-loads '())
+(put 'ispell 'custom-loads '())
+(put 'fortran-indent 'custom-loads '())
+(put 'lpr 'custom-loads '())
+(put 'message-headers 'custom-loads '())
+(put 'editing-basics 'custom-loads '())
+(put 'internal 'custom-loads '())
+(put 'calendar 'custom-loads '())
+(put 'help-appearance 'custom-loads '())
+(put 'display-time 'custom-loads '())
+(put 'lisp 'custom-loads '())
+(put 'diff 'custom-loads '())
+(put 'paren-matching 'custom-loads '())
+(put 'help 'custom-loads '())
+(put 'local 'custom-loads '())
+(put 'keyboard 'custom-loads '())
+(put 'minubuffer 'custom-loads '())
+(put 'message-sending 'custom-loads '())
+(put 'data 'custom-loads '())
+(put 'ps-print 'custom-loads '())
+(put 'backup 'custom-loads '())
+(put 'frames 'custom-loads '())
+(put 'customize 'custom-loads '())
+(put 'abbrev 'custom-loads '())
+(put 'toolbar 'custom-loads '())
+(put 'compilation 'custom-loads '())
+(put 'dired 'custom-loads '())
+(put 'killing 'custom-loads '())
+(put 'paren-blinking 'custom-loads '())
+(put 'find-file 'custom-loads '())
+(put 'gnuserv 'custom-loads '())
+(put 'maint 'custom-loads '())
+(put 'fill-comments 'custom-loads '())
+(put 'message-mail 'custom-loads '())
+(put 'windows 'custom-loads '())
+(put 'message-various 'custom-loads '())
+(put 'resize-minibuffer 'custom-loads '())
+(put 'fill 'custom-loads '())
+(put 'debug 'custom-loads '())
+(put 'display 'custom-loads '())
+(put 'diary 'custom-loads '())
+(put 'browse-url 'custom-loads '())
+(put 'message-insertion 'custom-loads '())
+(put 'hyper-apropos 'custom-loads '())
+(put 'vc 'custom-loads '())
+(put 'alloc 'custom-loads '())
+(put 'isearch 'custom-loads '())
+(put 'modeline 'custom-loads '())
+(put 'processes-basics 'custom-loads '())
+(put 'editing 'custom-loads '())
+(put 'matching 'custom-loads '())
+(put 'ps-print-color 'custom-loads '())
+(put 'undo 'custom-loads '())
+(put 'x 'custom-loads '())
diff -r 4de2936b4e77 -r 0132846995bd lisp/mh-e/auto-autoloads.el
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lisp/mh-e/auto-autoloads.el	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,90 @@
+;;; DO NOT MODIFY THIS FILE
+(if (not (featurep 'mh-e-autoloads))
+    (progn
+
+;;;### (autoloads (mh-letter-mode mh-smail-other-window mh-smail-batch mh-smail) "mh-comp" "mh-e/mh-comp.el")
+
+(autoload 'mh-smail "mh-comp" "\
+Compose and send mail with the MH mail system.
+This function is an entry point to mh-e, the Emacs front end
+to the MH mail system.
+
+See documentation of `\\[mh-send]' for more details on composing mail." t nil)
+
+(autoload 'mh-smail-batch "mh-comp" "\
+Set up a mail composition draft with the MH mail system.
+This function is an entry point to mh-e, the Emacs front end
+to the MH mail system.  This function does not prompt the user
+for any header fields, and thus is suitable for use by programs
+that want to create a mail buffer.
+Users should use `\\[mh-smail]' to compose mail." nil nil)
+
+(autoload 'mh-smail-other-window "mh-comp" "\
+Compose and send mail in other window with the MH mail system.
+This function is an entry point to mh-e, the Emacs front end
+to the MH mail system.
+
+See documentation of `\\[mh-send]' for more details on composing mail." t nil)
+
+(autoload 'mh-letter-mode "mh-comp" "\
+Mode for composing letters in mh-e.\\<mh-letter-mode-map>
+When you have finished composing, type \\[mh-send-letter] to send the message
+using the MH mail handling system.
+See the documentation for \\[mh-edit-mhn] for information on composing MIME
+messages.
+
+\\{mh-letter-mode-map}
+
+Variables controlling this mode (defaults in parentheses):
+
+ mh-delete-yanked-msg-window (nil)
+    If non-nil, \\[mh-yank-cur-msg] will delete any windows displaying
+    the yanked message.
+
+ mh-yank-from-start-of-msg (t)
+    If non-nil, \\[mh-yank-cur-msg] will include the entire message.
+    If `body', just yank the body (no header).
+    If nil, only the portion of the message following the point will be yanked.
+    If there is a region, this variable is ignored.
+
+ mh-ins-buf-prefix (\"> \")
+    String to insert before each non-blank line of a message as it is
+    inserted in a draft letter.
+
+ mh-signature-file-name (\"~/.signature\")
+    File to be inserted into message by \\[mh-insert-signature].
+
+Upon invoking mh-letter-mode, text-mode-hook and mh-letter-mode-hook are
+invoked with no args, if those values are non-nil." t nil)
+
+;;;***
+
+;;;### (autoloads (mh-version mh-rmail) "mh-e" "mh-e/mh-e.el")
+
+(autoload 'mh-rmail "mh-e" "\
+Inc(orporate) new mail with MH, or, with arg, scan an MH mail folder.
+This function is an entry point to mh-e, the Emacs front end
+to the MH mail system." t nil)
+
+(autoload 'mh-version "mh-e" "\
+Display version information about mh-e and the MH mail handling system." t nil)
+
+;;;***
+
+;;;### (autoloads nil "mh-mime" "mh-e/mh-mime.el")
+
+(defvar mh-mime-content-types '(("text/plain") ("text/richtext") ("multipart/mixed") ("multipart/alternative") ("multipart/digest") ("multipart/parallel") ("message/rfc822") ("message/partial") ("message/external-body") ("application/octet-stream") ("application/postscript") ("image/jpeg") ("image/gif") ("audio/basic") ("video/mpeg")) "\
+Legal MIME content types.  See documentation for \\[mh-edit-mhn].")
+
+;;;***
+
+;;;### (autoloads nil "mh-utils" "mh-e/mh-utils.el")
+
+(put 'mh-progs 'risky-local-variable t)
+
+(put 'mh-lib 'risky-local-variable t)
+
+;;;***
+
+(provide 'mh-e-autoloads)
+))
diff -r 4de2936b4e77 -r 0132846995bd lisp/mh-e/custom-load.el
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lisp/mh-e/custom-load.el	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,70 @@
+(put 'copyright 'custom-loads '())
+(put 'eldoc 'custom-loads '())
+(put 'execute 'custom-loads '())
+(put 'mouse 'custom-loads '())
+(put 'mail-abbrevs 'custom-loads '())
+(put 'etags 'custom-loads '())
+(put 'limits 'custom-loads '())
+(put 'minibuffer 'custom-loads '())
+(put 'environment 'custom-loads '())
+(put 'sound 'custom-loads '())
+(put 'holidays 'custom-loads '())
+(put 'auto-save 'custom-loads '())
+(put 'ispell 'custom-loads '())
+(put 'mail 'custom-loads '("mh-e"))
+(put 'fortran-indent 'custom-loads '())
+(put 'lpr 'custom-loads '())
+(put 'message-headers 'custom-loads '())
+(put 'editing-basics 'custom-loads '())
+(put 'internal 'custom-loads '())
+(put 'calendar 'custom-loads '())
+(put 'help-appearance 'custom-loads '())
+(put 'display-time 'custom-loads '())
+(put 'lisp 'custom-loads '())
+(put 'diff 'custom-loads '())
+(put 'paren-matching 'custom-loads '())
+(put 'help 'custom-loads '())
+(put 'local 'custom-loads '())
+(put 'keyboard 'custom-loads '())
+(put 'minubuffer 'custom-loads '())
+(put 'mh-hook 'custom-loads '("mh-e"))
+(put 'message-sending 'custom-loads '())
+(put 'data 'custom-loads '())
+(put 'ps-print 'custom-loads '())
+(put 'backup 'custom-loads '())
+(put 'frames 'custom-loads '())
+(put 'customize 'custom-loads '())
+(put 'abbrev 'custom-loads '())
+(put 'toolbar 'custom-loads '())
+(put 'compilation 'custom-loads '())
+(put 'dired 'custom-loads '())
+(put 'killing 'custom-loads '())
+(put 'paren-blinking 'custom-loads '())
+(put 'find-file 'custom-loads '())
+(put 'mh-buffer 'custom-loads '("mh-utils"))
+(put 'gnuserv 'custom-loads '())
+(put 'maint 'custom-loads '())
+(put 'fill-comments 'custom-loads '())
+(put 'message-mail 'custom-loads '())
+(put 'windows 'custom-loads '())
+(put 'message-various 'custom-loads '())
+(put 'resize-minibuffer 'custom-loads '())
+(put 'fill 'custom-loads '())
+(put 'debug 'custom-loads '())
+(put 'display 'custom-loads '())
+(put 'diary 'custom-loads '())
+(put 'mh-compose 'custom-loads '("mh-comp"))
+(put 'browse-url 'custom-loads '())
+(put 'message-insertion 'custom-loads '())
+(put 'hyper-apropos 'custom-loads '())
+(put 'vc 'custom-loads '())
+(put 'alloc 'custom-loads '())
+(put 'isearch 'custom-loads '())
+(put 'mh 'custom-loads '("mh-comp" "mh-e" "mh-utils"))
+(put 'modeline 'custom-loads '())
+(put 'processes-basics 'custom-loads '())
+(put 'editing 'custom-loads '())
+(put 'matching 'custom-loads '())
+(put 'ps-print-color 'custom-loads '())
+(put 'undo 'custom-loads '())
+(put 'x 'custom-loads '())
diff -r 4de2936b4e77 -r 0132846995bd lisp/modes/arc-mode.el
--- a/lisp/modes/arc-mode.el	Mon Aug 13 09:42:28 2007 +0200
+++ b/lisp/modes/arc-mode.el	Mon Aug 13 09:43:35 2007 +0200
@@ -465,6 +465,12 @@
 
 ;; Archive mode is suitable only for specially formatted data.
 (put 'archive-mode 'mode-class 'special)
+
+(defun archive-quit ()
+  "Bury the current archive buffer."
+  (interactive)
+  (bury-buffer))
+
 ;; -------------------------------------------------------------------------
 ;; Section: Key maps
 
@@ -504,6 +510,7 @@
   (if archive-xemacs
       (progn
 	;; Not a nice "solution" but it'll have to do
+	(define-key archive-mode-map "q" 'archive-quit)
 	(define-key archive-mode-map "\C-xu" 'archive-undo)
 	(define-key archive-mode-map "\C-_" 'archive-undo))
     (substitute-key-definition 'undo 'archive-undo
@@ -1123,7 +1130,7 @@
         files
 	visual)
     (while (and (< (+ p 29) (point-max))
-		(= (char-after p) ?\C-z)
+		(eq (char-after p) ?\C-z)
 		(> (char-after (1+ p)) 0))
       (let* ((namefld (buffer-substring (+ p 2) (+ p 2 13)))
 	     (fnlen   (or (string-match "\0" namefld) 13))
@@ -1198,10 +1205,10 @@
              (ifnname (if fiddle (downcase efnname) efnname))
 	     (p2      (+ p 22 fnlen))
 	     (creator (if (>= (- hsize fnlen) 24) (char-after (+ p2 2)) 0))
-	     (mode    (if (= creator ?U) (archive-l-e (+ p2 8) 2) ?\666))
+	     (mode    (if (eq creator ?U) (archive-l-e (+ p2 8) 2) ?\666))
 	     (modestr (if mode (archive-int-to-mode mode) "??????????"))
-	     (uid     (if (= creator ?U) (archive-l-e (+ p2 10) 2)))
-	     (gid     (if (= creator ?U) (archive-l-e (+ p2 12) 2)))
+	     (uid     (if (eq creator ?U) (archive-l-e (+ p2 10) 2)))
+	     (gid     (if (eq creator ?U) (archive-l-e (+ p2 12) 2)))
 	     (text    (if archive-alternate-display
 			  (format "  %8d  %5S  %5S  %s"
 				  ucsize
@@ -1338,9 +1345,10 @@
              (efnname (buffer-substring (+ p 46) (+ p 46 fnlen)))
 	     (isdir   (and (= ucsize 0)
 			   (string= (file-name-nondirectory efnname) "")))
-	     (mode    (cond ((memq creator '(2 3)) ; Unix + VMS
+	     (mode    (cond ((memq (char-int creator) '(2 3)) ; Unix + VMS
 			     (archive-l-e (+ p 40) 2))
-			    ((memq creator '(0 5 6 7 10 11)) ; Dos etc.
+			    ((memq (char-int creator)
+				   '(0 5 6 7 10 11)) ; Dos etc.
 			     (logior ?\444
 				     (if isdir (logior 16384 ?\111) 0)
 				     (if (zerop
@@ -1349,7 +1357,7 @@
 			    (t nil)))
 	     (modestr (if mode (archive-int-to-mode mode) "??????????"))
 	     (fiddle  (and archive-zip-case-fiddle
-			   (not (not (memq creator '(0 2 4 5 9))))))
+			   (not (not (memq (char-int creator) '(0 2 4 5 9))))))
              (ifnname (if fiddle (downcase efnname) efnname))
              (text    (format "  %10s  %8d  %-11s  %-8s  %s"
 			      modestr
@@ -1406,11 +1414,11 @@
 	       (oldmode (aref fil 3))
 	       (newval  (archive-calc-mode oldmode newmode t))
 	       buffer-read-only)
-	  (cond ((memq creator '(2 3)) ; Unix + VMS
+	  (cond ((memq (char-int creator) '(2 3)) ; Unix + VMS
 		 (goto-char (+ p 40))
 		 (delete-char 2)
 		 (insert (logand newval 255) (lsh newval -8)))
-		((memq creator '(0 5 6 7 10 11)) ; Dos etc.
+		((memq (char-int creator) '(0 5 6 7 10 11)) ; Dos etc.
 		 (goto-char (+ p 38))
 		 (insert (logior (logand (char-after (point)) 254)
 				 (logand (logxor 1 (lsh newval -7)) 1)))
diff -r 4de2936b4e77 -r 0132846995bd lisp/modes/auto-autoloads.el
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lisp/modes/auto-autoloads.el	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,2247 @@
+;;; DO NOT MODIFY THIS FILE
+(if (not (featurep 'modes-autoloads))
+    (progn
+
+;;;### (autoloads nil "abbrev" "modes/abbrev.el")
+
+;;;***
+
+;;;### (autoloads (ada-make-filename-from-adaname ada-mode) "ada-mode" "modes/ada-mode.el")
+
+(autoload 'ada-mode "ada-mode" "\
+Ada Mode is the major mode for editing Ada code.
+
+Bindings are as follows: (Note: 'LFD' is control-j.)
+
+ Indent line                                          '\\[ada-tab]'
+ Indent line, insert newline and indent the new line. '\\[newline-and-indent]'
+
+ Re-format the parameter-list point is in             '\\[ada-format-paramlist]'
+ Indent all lines in region                           '\\[ada-indent-region]'
+ Call external pretty printer program                 '\\[ada-call-pretty-printer]'
+
+ Adjust case of identifiers and keywords in region    '\\[ada-adjust-case-region]'
+ Adjust case of identifiers and keywords in buffer    '\\[ada-adjust-case-buffer]'
+
+ Call EXTERNAL pretty printer (if you have one)       '\\[ada-call-pretty-printer]'
+
+ Fill comment paragraph                               '\\[ada-fill-comment-paragraph]'
+ Fill comment paragraph and justify each line         '\\[ada-fill-comment-paragraph-justify]'
+ Fill comment paragraph, justify and append postfix   '\\[ada-fill-comment-paragraph-postfix]'
+
+ Next func/proc/task '\\[ada-next-procedure]'    Previous func/proc/task '\\[ada-previous-procedure]'
+ Next package        '\\[ada-next-package]'  Previous package        '\\[ada-previous-package]'
+
+ Goto matching start of current 'end ...;'            '\\[ada-move-to-start]'
+ Goto end of current block                            '\\[ada-move-to-end]'
+
+Comments are handled using standard GNU Emacs conventions, including:
+ Start a comment                                      '\\[indent-for-comment]'
+ Comment region                                       '\\[comment-region]'
+ Uncomment region                                     '\\[ada-uncomment-region]'
+ Continue comment on next line                        '\\[indent-new-comment-line]'
+
+If you use imenu.el:
+ Display index-menu of functions & procedures         '\\[imenu]'
+
+If you use find-file.el:
+ Switch to other file (Body <-> Spec)                 '\\[ff-find-other-file]'
+                                                   or '\\[ff-mouse-find-other-file]
+ Switch to other file in other window                 '\\[ada-ff-other-window]'
+                                                   or '\\[ff-mouse-find-other-file-other-window]
+ If you use this function in a spec and no body is available, it gets created
+ with body stubs.
+
+If you use ada-xref.el:
+ Goto declaration:          '\\[ada-point-and-xref]' on the identifier
+                         or '\\[ada-goto-declaration]' with point on the identifier
+ Complete identifier:       '\\[ada-complete-identifier]'
+ Execute Gnatf:             '\\[ada-gnatf-current]'" t nil)
+
+(autoload 'ada-make-filename-from-adaname "ada-mode" "\
+Determine the filename of a package/procedure from its own Ada name." t nil)
+
+;;;***
+
+;;;### (autoloads (archive-mode) "arc-mode" "modes/arc-mode.el")
+
+(autoload 'archive-mode "arc-mode" "\
+Major mode for viewing an archive file in a dired-like way.
+You can move around using the usual cursor motion commands.
+Letters no longer insert themselves.
+Type `e' to pull a file out of the archive and into its own buffer;
+or click mouse-2 on the file's line in the archive mode buffer.
+
+If you edit a sub-file of this archive (as with the `e' command) and
+save it, the contents of that buffer will be saved back into the
+archive.
+
+\\{archive-mode-map}" nil nil)
+
+;;;***
+
+;;;### (autoloads (asm-mode) "asm-mode" "modes/asm-mode.el")
+
+(autoload 'asm-mode "asm-mode" "\
+Major mode for editing typical assembler code.
+Features a private abbrev table and the following bindings:
+
+\\[asm-colon]	outdent a preceding label, tab to next tab stop.
+\\[tab-to-tab-stop]	tab to next tab stop.
+\\[asm-newline]	newline, then tab to next tab stop.
+\\[asm-comment]	smart placement of assembler comments.
+
+The character used for making comments is set by the variable
+`asm-comment-char' (which defaults to `?;').
+
+Alternatively, you may set this variable in `asm-mode-set-comment-hook',
+which is called near the beginning of mode initialization.
+
+Turning on Asm mode runs the hook `asm-mode-hook' at the end of initialization.
+
+Special commands:
+\\{asm-mode-map}
+" t nil)
+
+;;;***
+
+;;;### (autoloads (autoconf-mode) "autoconf-mode" "modes/autoconf-mode.el")
+
+(autoload 'autoconf-mode "autoconf-mode" "\
+A major-mode to edit autoconf input files like configure.in
+\\{autoconf-mode-map}
+" t nil)
+
+;;;***
+
+;;;### (autoloads (awk-mode) "awk-mode" "modes/awk-mode.el")
+
+(autoload 'awk-mode "awk-mode" "\
+Major mode for editing AWK code.
+This is much like C mode except for the syntax of comments.  It uses
+the same keymap as C mode and has the same variables for customizing
+indentation.  It has its own abbrev table and its own syntax table.
+
+Turning on AWK mode calls the value of the variable `awk-mode-hook'
+with no args, if that value is non-nil." t nil)
+
+;;;***
+
+;;;### (autoloads (bibtex-mode) "bibtex" "modes/bibtex.el")
+
+(autoload 'bibtex-mode "bibtex" "\
+Major mode for editing bibtex files.
+
+\\{bibtex-mode-map}
+
+A command such as \\[bibtex-Book] will outline the fields for a BibTeX book entry.
+
+The optional fields start with the string OPT, and thus ignored by BibTeX.
+The OPT string may be removed from a field with \\[bibtex-remove-OPT].
+\\[bibtex-kill-optional-field] kills the current optional field entirely.
+\\[bibtex-remove-double-quotes] removes the double-quotes around the text of
+the current field.  \\[bibtex-empty-field] replaces the text of the current
+field with the default \"\".
+
+The command \\[bibtex-clean-entry] cleans the current entry, i.e. (i) removes
+double-quotes from entirely numerical fields, (ii) removes OPT from all
+non-empty optional fields, (iii) removes all empty optional fields, and (iv)
+checks that no non-optional fields are empty.
+
+Use \\[bibtex-find-text] to position the dot at the end of the current field.
+Use \\[bibtex-next-field] to move to end of the next field.
+
+The following may be of interest as well:
+
+  Functions:
+    find-bibtex-duplicates
+    find-bibtex-entry-location
+    hide-bibtex-entry-bodies
+    sort-bibtex-entries
+    validate-bibtex-buffer
+
+  Variables:
+    bibtex-clean-entry-zap-empty-opts
+    bibtex-entry-field-alist
+    bibtex-include-OPTannote
+    bibtex-include-OPTcrossref
+    bibtex-include-OPTkey
+    bibtex-maintain-sorted-entries
+    bibtex-mode-user-optional-fields
+
+Fields:
+    address
+           Publisher's address
+    annote
+           Long annotation used for annotated bibliographies (begins sentence)
+    author
+           Name(s) of author(s), in BibTeX name format
+    booktitle
+           Book title when the thing being referenced isn't the whole book.
+           For book entries, the title field should be used instead.
+    chapter
+           Chapter number
+    crossref
+	   The database key of the entry being cross referenced.
+    edition
+           Edition of a book (e.g., \"second\")
+    editor
+           Name(s) of editor(s), in BibTeX name format.
+           If there is also an author field, then the editor field should be
+           for the book or collection that the work appears in
+    howpublished
+            How something strange has been published (begins sentence)
+    institution
+           Sponsoring institution
+    journal
+           Journal name (macros are provided for many)
+    key
+           Alphabetizing and labeling key (needed when no author or editor)
+    month
+           Month (macros are provided)
+    note
+           To help the reader find a reference (begins sentence)
+    number
+           Number of a journal or technical report
+    organization
+           Organization (sponsoring a conference)
+    pages
+           Page number or numbers (use `--' to separate a range)
+    publisher
+           Publisher name
+    school
+           School name (for theses)
+    series
+           The name of a series or set of books.
+           An individual book will also have its own title
+    title
+           The title of the thing being referenced
+    type
+           Type of a technical report (e.g., \"Research Note\") to be used
+           instead of the default \"Technical Report\"
+    volume
+           Volume of a journal or multivolume work
+    year
+           Year---should contain only numerals
+---------------------------------------------------------
+Entry to this mode calls the value of bibtex-mode-hook if that value is
+non-nil." t nil)
+
+;;;***
+
+;;;### (autoloads (c-add-style c-set-style java-mode objc-mode c++-mode c-mode) "cc-mode" "modes/cc-mode.el")
+
+(autoload 'c-mode "cc-mode" "\
+Major mode for editing K&R and ANSI C code.
+To submit a problem report, enter `\\[c-submit-bug-report]' from a
+c-mode buffer.  This automatically sets up a mail buffer with version
+information already added.  You just need to add a description of the
+problem, including a reproducible test case and send the message.
+
+To see what version of CC Mode you are running, enter `\\[c-version]'.
+
+The hook variable `c-mode-hook' is run with no args, if that value is
+bound and has a non-nil value.  Also the hook `c-mode-common-hook' is
+run first.
+
+Key bindings:
+\\{c-mode-map}" t nil)
+
+(autoload 'c++-mode "cc-mode" "\
+Major mode for editing C++ code.
+To submit a problem report, enter `\\[c-submit-bug-report]' from a
+c++-mode buffer.  This automatically sets up a mail buffer with
+version information already added.  You just need to add a description
+of the problem, including a reproducible test case, and send the
+message.
+
+To see what version of CC Mode you are running, enter `\\[c-version]'.
+
+The hook variable `c++-mode-hook' is run with no args, if that
+variable is bound and has a non-nil value.  Also the hook
+`c-mode-common-hook' is run first.
+
+Key bindings:
+\\{c++-mode-map}" t nil)
+
+(autoload 'objc-mode "cc-mode" "\
+Major mode for editing Objective C code.
+To submit a problem report, enter `\\[c-submit-bug-report]' from an
+objc-mode buffer.  This automatically sets up a mail buffer with
+version information already added.  You just need to add a description
+of the problem, including a reproducible test case, and send the
+message.
+
+To see what version of CC Mode you are running, enter `\\[c-version]'.
+
+The hook variable `objc-mode-hook' is run with no args, if that value
+is bound and has a non-nil value.  Also the hook `c-mode-common-hook'
+is run first.
+
+Key bindings:
+\\{objc-mode-map}" t nil)
+
+(autoload 'java-mode "cc-mode" "\
+Major mode for editing Java code.
+To submit a problem report, enter `\\[c-submit-bug-report]' from an
+java-mode buffer.  This automatically sets up a mail buffer with
+version information already added.  You just need to add a description
+of the problem, including a reproducible test case and send the
+message.
+
+To see what version of CC Mode you are running, enter `\\[c-version]'.
+
+The hook variable `java-mode-hook' is run with no args, if that value
+is bound and has a non-nil value.  Also the common hook
+`c-mode-common-hook' is run first.  Note that this mode automatically
+sets the \"java\" style before calling any hooks so be careful if you
+set styles in `c-mode-common-hook'.
+
+Key bindings:
+\\{java-mode-map}" t nil)
+
+(autoload 'c-set-style "cc-mode" "\
+Set CC Mode variables to use one of several different indentation styles.
+STYLENAME is a string representing the desired style from the list of
+styles described in the variable `c-style-alist'.  See that variable
+for details of setting up styles.
+
+The variable `c-indentation-style' always contains the buffer's current
+style name." t nil)
+
+(autoload 'c-add-style "cc-mode" "\
+Adds a style to `c-style-alist', or updates an existing one.
+STYLE is a string identifying the style to add or update.  DESCRIP is
+an association list describing the style and must be of the form:
+
+  ((VARIABLE . VALUE) [(VARIABLE . VALUE) ...])
+
+See the variable `c-style-alist' for the semantics of VARIABLE and
+VALUE.  This function also sets the current style to STYLE using
+`c-set-style' if the optional SET-P flag is non-nil." t nil)
+
+(fset 'set-c-style           'c-set-style)
+
+;;;***
+
+;;;### (autoloads (common-lisp-indent-function) "cl-indent" "modes/cl-indent.el")
+
+(autoload 'common-lisp-indent-function "cl-indent" nil nil nil)
+
+;;;***
+
+;;;### (autoloads (c-macro-expand) "cmacexp" "modes/cmacexp.el")
+
+(autoload 'c-macro-expand "cmacexp" "\
+Expand C macros in the region, using the C preprocessor.
+Normally display output in temp buffer, but
+prefix arg means replace the region with it.
+
+`c-macro-preprocessor' specifies the preprocessor to use.
+Prompt for arguments to the preprocessor (e.g. `-DDEBUG -I ./include')
+if the user option `c-macro-prompt-flag' is non-nil.
+
+Noninteractive args are START, END, SUBST.
+For use inside Lisp programs, see also `c-macro-expansion'." t nil)
+
+;;;***
+
+;;;### (autoloads (eiffel-mode) "eiffel3" "modes/eiffel3.el")
+
+(autoload 'eiffel-mode "eiffel3" "\
+Major mode for editing Eiffel programs." t nil)
+
+;;;***
+
+;;;### (autoloads (enriched-decode enriched-encode enriched-mode) "enriched" "modes/enriched.el")
+
+(autoload 'enriched-mode "enriched" "\
+Minor mode for editing text/enriched files.
+These are files with embedded formatting information in the MIME standard
+text/enriched format.
+Turning the mode on runs `enriched-mode-hook'.
+
+More information about Enriched mode is available in the file 
+etc/enriched.doc  in the Emacs distribution directory.
+
+Commands:
+
+\\<enriched-mode-map>\\{enriched-mode-map}" t nil)
+
+(autoload 'enriched-encode "enriched" nil nil nil)
+
+(autoload 'enriched-decode "enriched" nil nil nil)
+
+;;;***
+
+;;;### (autoloads (executable-self-display executable-set-magic) "executable" "modes/executable.el")
+
+(autoload 'executable-set-magic "executable" "\
+Set this buffer's interpreter to INTERPRETER with optional ARGUMENT.
+The variables `executable-magicless-file-regexp', `executable-prefix',
+`executable-insert', `executable-query' and `executable-chmod' control
+when and how magic numbers are inserted or replaced and scripts made
+executable." t nil)
+
+(autoload 'executable-self-display "executable" "\
+Turn a text file into a self-displaying Un*x command.
+The magic number of such a command displays all lines but itself." t nil)
+
+;;;***
+
+;;;### (autoloads (f90-mode) "f90" "modes/f90.el")
+
+(autoload 'f90-mode "f90" "\
+Major mode for editing Fortran 90 code in free format.
+
+\\[f90-indent-new-line] corrects current indentation and creates new indented line.
+\\[f90-indent-line] indents the current line correctly. 
+\\[f90-indent-subprogram] indents the current subprogram. 
+
+Type `? or `\\[help-command] to display a list of built-in abbrevs for F90 keywords.
+
+Key definitions:
+\\{f90-mode-map}
+
+Variables controlling indentation style and extra features:
+
+ f90-do-indent
+    Extra indentation within do blocks.  (default 3)
+ f90-if-indent
+    Extra indentation within if/select case/where/forall blocks. (default 3)
+ f90-type-indent
+    Extra indentation within type/interface/block-data blocks.  (default 3)
+ f90-program-indent
+    Extra indentation within program/module/subroutine/function blocks.
+      (default 2)
+ f90-continuation-indent
+    Extra indentation applied to continuation lines.  (default 5)
+ f90-comment-region
+    String inserted by \\[f90-comment-region] at start of each line in 
+    region.  (default \"!!!$\")
+ f90-indented-comment-re
+    Regexp determining the type of comment to be intended like code.
+    (default \"!\")
+ f90-directive-comment-re
+    Regexp of comment-like directive like \"!HPF\\\\$\", not to be indented.
+    (default \"!hpf\\\\$\")
+ f90-break-delimiters
+    Regexp holding list of delimiters at which lines may be broken.
+    (default \"[-+*/><=,% \\t]\")
+ f90-break-before-delimiters
+    Non-nil causes `f90-do-auto-fill' to break lines before delimiters.
+    (default t)
+ f90-beginning-ampersand 
+    Automatic insertion of & at beginning of continuation lines. (default t)
+ f90-smart-end 
+    From an END statement, check and fill the end using matching block start.
+    Allowed values are 'blink, 'no-blink, and nil, which determine
+    whether to blink the matching beginning.) (default 'blink)
+ f90-auto-keyword-case
+    Automatic change of case of keywords. (default nil)
+    The possibilities are 'downcase-word, 'upcase-word, 'capitalize-word.
+ f90-leave-line-no
+    Do not left-justify line numbers. (default nil)
+ f90-startup-message
+    Set to nil to inhibit message first time F90 mode is used. (default t)
+ f90-keywords-re
+    List of keywords used for highlighting/upcase-keywords etc.
+
+Turning on F90 mode calls the value of the variable `f90-mode-hook'
+with no args, if that value is non-nil." t nil)
+
+;;;***
+
+;;;### (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)
+
+(autoload 'fortran-mode "fortran" "\
+Major mode for editing Fortran code.
+\\[fortran-indent-line] indents the current Fortran line correctly. 
+DO statements must not share a common CONTINUE.
+
+Type ;? or ;\\[help-command] to display a list of built-in abbrevs for Fortran keywords.
+
+Key definitions:
+\\{fortran-mode-map}
+
+Variables controlling indentation style and extra features:
+
+ comment-start
+    Normally nil in Fortran mode.  If you want to use comments
+    starting with `!', set this to the string \"!\".
+ fortran-do-indent
+    Extra indentation within do blocks.  (default 3)
+ fortran-if-indent
+    Extra indentation within if blocks.  (default 3)
+ fortran-structure-indent
+    Extra indentation within structure, union, map and interface blocks.
+    (default 3)
+ fortran-continuation-indent
+    Extra indentation applied to continuation statements.  (default 5)
+ fortran-comment-line-extra-indent
+    Amount of extra indentation for text within full-line comments. (default 0)
+ fortran-comment-indent-style
+    nil    means don't change indentation of text in full-line comments,
+    fixed  means indent that text at `fortran-comment-line-extra-indent' beyond
+           the value of `fortran-minimum-statement-indent-fixed' (for fixed
+           format continuation style) or `fortran-minimum-statement-indent-tab'
+           (for TAB format continuation style).
+    relative  means indent at `fortran-comment-line-extra-indent' beyond the
+ 	      indentation for a line of code.
+    (default 'fixed)
+ fortran-comment-indent-char
+    Single-character string to be inserted instead of space for
+    full-line comment indentation.  (default \" \")
+ fortran-minimum-statement-indent-fixed
+    Minimum indentation for Fortran statements in fixed format mode. (def.6)
+ fortran-minimum-statement-indent-tab
+    Minimum indentation for Fortran statements in TAB format mode. (default 9)
+ fortran-line-number-indent
+    Maximum indentation for line numbers.  A line number will get
+    less than this much indentation if necessary to avoid reaching
+    column 5.  (default 1)
+ fortran-check-all-num-for-matching-do
+    Non-nil causes all numbered lines to be treated as possible \"continue\"
+    statements.  (default nil)
+ fortran-blink-matching-if 
+    Non-nil causes \\[fortran-indent-line] on an ENDIF statement to blink on
+    matching IF.  Also, from an ENDDO statement, blink on matching DO [WHILE]
+    statement.  (default nil)
+ fortran-continuation-string
+    Single-character string to be inserted in column 5 of a continuation
+    line.  (default \"$\")
+ fortran-comment-region
+    String inserted by \\[fortran-comment-region] at start of each line in 
+    region.  (default \"c$$$\")
+ fortran-electric-line-number
+    Non-nil causes line number digits to be moved to the correct column 
+    as typed.  (default t)
+ fortran-break-before-delimiters
+    Non-nil causes `fortran-fill' breaks lines before delimiters.
+    (default t)
+ fortran-startup-message
+    Set to nil to inhibit message first time Fortran mode is used.
+
+Turning on Fortran mode calls the value of the variable `fortran-mode-hook'
+with no args, if that value is non-nil." t nil)
+
+;;;***
+
+;;;### (autoloads (hide-ifdef-mode) "hideif" "modes/hideif.el")
+
+(add-minor-mode 'hide-ifdef-mode " Ifdef")
+
+(autoload 'hide-ifdef-mode "hideif" "\
+Toggle Hide-Ifdef mode.  This is a minor mode, albeit a large one.
+With ARG, turn Hide-Ifdef mode on if arg is positive, off otherwise.
+In Hide-Ifdef mode, code within #ifdef constructs that the C preprocessor
+would eliminate may be hidden from view.  Several variables affect
+how the hiding is done:
+
+hide-ifdef-env
+	An association list of defined and undefined symbols for the
+	current buffer.  Initially, the global value of `hide-ifdef-env'
+	is used.
+
+hide-ifdef-define-alist
+	An association list of defined symbol lists.  
+        Use `hide-ifdef-set-define-alist' to save the current `hide-ifdef-env'
+        and `hide-ifdef-use-define-alist' to set the current `hide-ifdef-env'
+        from one of the lists in `hide-ifdef-define-alist'.
+
+hide-ifdef-lines
+	Set to non-nil to not show #if, #ifdef, #ifndef, #else, and
+	#endif lines when hiding.
+
+hide-ifdef-initially
+	Indicates whether `hide-ifdefs' should be called when Hide-Ifdef mode
+	is activated.
+
+hide-ifdef-read-only
+	Set to non-nil if you want to make buffers read only while hiding.
+	After `show-ifdefs', read-only status is restored to previous value.
+
+\\{hide-ifdef-mode-map}" t nil)
+
+(defvar hide-ifdef-initially nil "\
+*Non-nil means call `hide-ifdefs' when Hide-Ifdef mode is first activated.")
+
+(defvar hide-ifdef-read-only nil "\
+*Set to non-nil if you want buffer to be read-only while hiding text.")
+
+(defvar hide-ifdef-lines nil "\
+*Non-nil means hide the #ifX, #else, and #endif lines.")
+
+;;;***
+
+;;;### (autoloads (hs-minor-mode hs-hide-block hs-hide-all) "hideshow" "modes/hideshow.el")
+
+(defvar hs-minor-mode nil "\
+Non-nil if using hideshow mode as a minor mode of some other mode.
+Use the command `hs-minor-mode' to toggle this variable.")
+
+(autoload 'hs-hide-all "hideshow" "\
+Hides all top-level blocks, displaying only first and last lines.
+It moves point to the beginning of the line, and it runs the normal hook
+`hs-hide-hook'.  See documentation for `run-hooks'." t nil)
+
+(autoload 'hs-hide-block "hideshow" "\
+Selects a block and hides it.  With prefix arg, reposition at end.
+Block is defined as a sexp for lispish modes, mode-specific otherwise.
+Comments are blocks, too.  Upon completion, point is at repositioned and
+the normal hook `hs-hide-hook' is run.  See documentation for `run-hooks'." t nil)
+
+(autoload 'hs-minor-mode "hideshow" "\
+Toggle hideshow minor mode.
+With ARG, turn hideshow minor mode on if ARG is positive, off otherwise.
+When hideshow minor mode is on, the menu bar is augmented with hideshow
+commands and the hideshow commands are enabled.  The variables
+`selective-display' and `selective-display-ellipses' are set to t.
+Last, the normal hook `hs-minor-mode-hook' is run; see the doc for `run-hooks'.
+
+Turning hideshow minor mode off reverts the menu bar and the
+variables to default values and disables the hideshow commands." t nil)
+
+;;;***
+
+;;;### (autoloads (icon-mode) "icon" "modes/icon.el")
+
+(autoload 'icon-mode "icon" "\
+Major mode for editing Icon code.
+Expression and list commands understand all Icon brackets.
+Tab indents for Icon code.
+Paragraphs are separated by blank lines only.
+Delete converts tabs to spaces as it moves back.
+\\{icon-mode-map}
+Variables controlling indentation style:
+ icon-tab-always-indent
+    Non-nil means TAB in Icon mode should always reindent the current line,
+    regardless of where in the line point is when the TAB command is used.
+ icon-auto-newline
+    Non-nil means automatically newline before and after braces
+    inserted in Icon code.
+ icon-indent-level
+    Indentation of Icon statements within surrounding block.
+    The surrounding block's indentation is the indentation
+    of the line on which the open-brace appears.
+ icon-continued-statement-offset
+    Extra indentation given to a substatement, such as the
+    then-clause of an if or body of a while.
+ icon-continued-brace-offset
+    Extra indentation given to a brace that starts a substatement.
+    This is in addition to `icon-continued-statement-offset'.
+ icon-brace-offset
+    Extra indentation for line if it starts with an open brace.
+ icon-brace-imaginary-offset
+    An open brace following other text is treated as if it were
+    this far to the right of the start of its line.
+
+Turning on Icon mode calls the value of the variable `icon-mode-hook'
+with no args, if that value is non-nil." t nil)
+
+;;;***
+
+;;;### (autoloads (imenu imenu-add-to-menubar) "imenu" "modes/imenu.el")
+
+(defvar imenu-generic-expression nil "\
+The regex pattern to use for creating a buffer index.
+
+If non-nil this pattern is passed to `imenu-create-index-with-pattern'
+to create a buffer index.
+
+It is an alist with elements that look like this: (MENU-TITLE
+REGEXP INDEX). 
+
+MENU-TITLE is a string used as the title for the submenu or nil if the
+entries are not nested.
+
+REGEXP is a regexp that should match a construct in the buffer that is
+to be displayed in the menu; i.e., function or variable definitions,
+etc.  It contains a substring which is the name to appear in the
+menu.  See the info section on Regexps for more information.
+
+INDEX points to the substring in REGEXP that contains the name (of the
+function, variable or type) that is to appear in the menu.
+
+For emacs-lisp-mode for example PATTERN would look like:
+
+'((nil \"^\\\\s-*(def\\\\(un\\\\|subst\\\\|macro\\\\|advice\\\\)\\\\s-+\\\\([-A-Za-z0-9+]+\\\\)\" 2)
+  (\"*Vars*\" \"^\\\\s-*(def\\\\(var\\\\|const\\\\)\\\\s-+\\\\([-A-Za-z0-9+]+\\\\)\" 2)
+  (\"*Types*\" \"^\\\\s-*(def\\\\(type\\\\|struct\\\\|class\\\\|ine-condition\\\\)\\\\s-+\\\\([-A-Za-z0-9+]+\\\\)\" 2))
+
+The variable is buffer-local.")
+
+(make-variable-buffer-local 'imenu-generic-expression)
+
+(autoload 'imenu-add-to-menubar "imenu" "\
+Adds an `imenu' entry to the menu bar for the current buffer.
+NAME is a string used to name the menu bar item.
+See the command `imenu' for more information." t nil)
+
+(autoload 'imenu "imenu" "\
+Jump to a place in the buffer chosen using a buffer menu or mouse menu.
+See `imenu-choose-buffer-index' for more information." t nil)
+
+;;;***
+
+;;;### (autoloads (ksh-mode) "ksh-mode" "modes/ksh-mode.el")
+
+(autoload 'ksh-mode "ksh-mode" "\
+ksh-mode $Revision: 1.1 $ - Major mode for editing (Bourne, Korn or Bourne again)
+shell scripts.
+Special key bindings and commands:
+\\{ksh-mode-map}
+Variables controlling indentation style:
+ksh-indent
+    Indentation of ksh statements with respect to containing block.
+    Default value is 2.
+ksh-case-indent
+    Additional indentation for statements under case items.
+    Default value is nil which will align the statements one position 
+    past the \")\" of the pattern.
+ksh-case-item-offset
+    Additional indentation for case items within a case statement.
+    Default value is 2.
+ksh-group-offset
+    Additional indentation for keywords \"do\" and \"then\".
+    Default value is -2.
+ksh-brace-offset
+    Additional indentation of \"{\" under functions or brace groupings.
+    Default value is 0.
+ksh-multiline-offset
+   Additional indentation of line that is preceded of a line ending with a
+   \\ to make it continue on next line.
+ksh-tab-always-indent
+    Controls the operation of the TAB key. If t (the default), always
+    reindent the current line.  If nil, indent the current line only if
+    point is at the left margin or in the line's indentation; otherwise
+    insert a tab.
+ksh-match-and-tell
+    If non-nil echo in the minibuffer the matching compound command
+    for the \"done\", \"}\", \"fi\", or \"esac\". Default value is t.
+
+ksh-align-to-keyword
+    Controls whether nested constructs align from the keyword or
+    the current indentation. If non-nil, indentation will be relative to
+    the column the keyword starts. If nil, indentation will be relative to
+    the current indentation of the line the keyword is on.
+    The default value is non-nil.
+
+ksh-comment-regexp
+  Regular expression used to recognize comments. Customize to support
+  ksh-like languages. Default value is \"\\s *#\".
+
+Style Guide.
+ By setting
+    (setq ksh-indent default-tab-width)
+    (setq ksh-group-offset 0)
+
+    The following style is obtained:
+
+    if [ -z $foo ]
+	    then
+		    bar    # <-- ksh-group-offset is additive to ksh-indent
+		    foo
+    fi
+
+ By setting
+    (setq ksh-indent default-tab-width)
+    (setq ksh-group-offset (- 0 ksh-indent))
+
+    The following style is obtained:
+
+    if [ -z $foo ]
+    then
+	    bar
+	    foo
+    fi
+
+ By setting
+    (setq ksh-case-item-offset 1)
+    (setq ksh-case-indent nil)
+
+    The following style is obtained:
+
+    case x in *
+     foo) bar           # <-- ksh-case-item-offset
+          baz;;         # <-- ksh-case-indent aligns with \")\"
+     foobar) foo
+             bar;;
+    esac
+
+ By setting
+    (setq ksh-case-item-offset 1)
+    (setq ksh-case-indent 6)
+
+    The following style is obtained:
+
+    case x in *
+     foo) bar           # <-- ksh-case-item-offset
+           baz;;        # <-- ksh-case-indent
+     foobar) foo
+           bar;;
+    esac
+    
+
+Installation:
+
+ (setq ksh-mode-hook
+      (function (lambda ()
+         (font-lock-mode 1)             ;; font-lock the buffer
+         (setq ksh-indent 8)
+	 (setq ksh-group-offset -8)
+	 (setq ksh-brace-offset -8)   
+         (setq ksh-tab-always-indent t)
+         (setq ksh-match-and-tell t)
+         (setq ksh-align-to-keyword t)	;; Turn on keyword alignment
+	 )))" t nil)
+
+;;;***
+
+;;;### (autoloads (define-mail-alias build-mail-aliases mail-aliases-setup) "mail-abbrevs" "modes/mail-abbrevs.el")
+
+(defcustom mail-abbrev-mailrc-file nil "Name of file with mail aliases.   If nil, ~/.mailrc is used." :type '(choice (const :tag "Default" nil) file) :group 'mail-abbrevs)
+
+(defvar mail-aliases nil "\
+Word-abbrev table of mail address aliases.
+If this is nil, it means the aliases have not yet been initialized and
+should be read from the .mailrc file.  (This is distinct from there being
+no aliases, which is represented by this being a table with no entries.)")
+
+(autoload 'mail-aliases-setup "mail-abbrevs" nil nil nil)
+
+(autoload 'build-mail-aliases "mail-abbrevs" "\
+Read mail aliases from .mailrc and set mail-aliases." nil nil)
+
+(autoload 'define-mail-alias "mail-abbrevs" "\
+Define NAME as a mail-alias that translates to DEFINITION.
+If DEFINITION contains multiple addresses, separate them with commas." t nil)
+
+;;;***
+
+;;;### (autoloads (makefile-mode) "make-mode" "modes/make-mode.el")
+
+(autoload 'makefile-mode "make-mode" "\
+Major mode for editing Makefiles.
+This function ends by invoking the function(s) `makefile-mode-hook'.
+
+\\{makefile-mode-map}
+
+In the browser, use the following keys:
+
+\\{makefile-browser-map}
+
+Makefile mode can be configured by modifying the following variables:
+
+makefile-browser-buffer-name:
+    Name of the macro- and target browser buffer.
+
+makefile-target-colon:
+    The string that gets appended to all target names
+    inserted by `makefile-insert-target'.
+    \":\" or \"::\" are quite common values.
+
+makefile-macro-assign:
+   The string that gets appended to all macro names
+   inserted by `makefile-insert-macro'.
+   The normal value should be \" = \", since this is what
+   standard make expects. However, newer makes such as dmake
+   allow a larger variety of different macro assignments, so you
+   might prefer to use \" += \" or \" := \" .
+
+makefile-tab-after-target-colon:
+   If you want a TAB (instead of a space) to be appended after the
+   target colon, then set this to a non-nil value.
+
+makefile-browser-leftmost-column:
+   Number of blanks to the left of the browser selection mark.
+
+makefile-browser-cursor-column:
+   Column in which the cursor is positioned when it moves
+   up or down in the browser.
+
+makefile-browser-selected-mark:
+   String used to mark selected entries in the browser.
+
+makefile-browser-unselected-mark:
+   String used to mark unselected entries in the browser.
+
+makefile-browser-auto-advance-after-selection-p:
+   If this variable is set to a non-nil value the cursor
+   will automagically advance to the next line after an item
+   has been selected in the browser.
+
+makefile-pickup-everything-picks-up-filenames-p:
+   If this variable is set to a non-nil value then
+   `makefile-pickup-everything' also picks up filenames as targets
+   (i.e. it calls `makefile-find-filenames-as-targets'), otherwise
+   filenames are omitted.
+
+makefile-cleanup-continuations-p:
+   If this variable is set to a non-nil value then makefile-mode
+   will assure that no line in the file ends with a backslash
+   (the continuation character) followed by any whitespace.
+   This is done by silently removing the trailing whitespace, leaving
+   the backslash itself intact.
+   IMPORTANT: Please note that enabling this option causes makefile-mode
+   to MODIFY A FILE WITHOUT YOUR CONFIRMATION when \"it seems necessary\".
+
+makefile-browser-hook:
+   A function or list of functions to be called just before the
+   browser is entered. This is executed in the makefile buffer.
+
+makefile-special-targets-list:
+   List of special targets. You will be offered to complete
+   on one of those in the minibuffer whenever you enter a `.'.
+   at the beginning of a line in Makefile mode." t nil)
+
+;;;***
+
+;;;### (autoloads (modula-2-mode) "modula2" "modes/modula2.el")
+
+(autoload 'modula-2-mode "modula2" "\
+This is a mode intended to support program development in Modula-2.
+All control constructs of Modula-2 can be reached by typing C-c
+followed by the first character of the construct.
+\\<m2-mode-map>
+  \\[m2-begin] begin         \\[m2-case] case
+  \\[m2-definition] definition    \\[m2-else] else
+  \\[m2-for] for           \\[m2-header] header
+  \\[m2-if] if            \\[m2-module] module
+  \\[m2-loop] loop          \\[m2-or] or
+  \\[m2-procedure] procedure     Control-c Control-w with
+  \\[m2-record] record        \\[m2-stdio] stdio
+  \\[m2-type] type          \\[m2-until] until
+  \\[m2-var] var           \\[m2-while] while
+  \\[m2-export] export        \\[m2-import] import
+  \\[m2-begin-comment] begin-comment \\[m2-end-comment] end-comment
+  \\[suspend-emacs] suspend Emacs     \\[m2-toggle] toggle
+  \\[m2-compile] compile           \\[m2-next-error] next-error
+  \\[m2-link] link
+
+   `m2-indent' controls the number of spaces for each indentation.
+   `m2-compile-command' holds the command to compile a Modula-2 program.
+   `m2-link-command' holds the command to link a Modula-2 program." t nil)
+
+;;;***
+
+;;;### (autoloads (electric-nroff-mode nroff-mode) "nroff-mode" "modes/nroff-mode.el")
+
+(autoload 'nroff-mode "nroff-mode" "\
+Major mode for editing text intended for nroff to format.
+\\{nroff-mode-map}
+Turning on Nroff mode runs `text-mode-hook', then `nroff-mode-hook'.
+Also, try `nroff-electric-mode', for automatically inserting
+closing requests for requests that are used in matched pairs." t nil)
+
+(autoload 'electric-nroff-mode "nroff-mode" "\
+Toggle `nroff-electric-newline' minor mode.
+`nroff-electric-newline' forces Emacs to check for an nroff request at the
+beginning of the line, and insert the matching closing request if necessary.
+This command toggles that mode (off->on, on->off), with an argument,
+turns it on iff arg is positive, otherwise off." t nil)
+
+(defvar nroff-electric-mode nil "\
+Non-nil if in electric-nroff minor mode.")
+
+(add-minor-mode 'nroff-electric-mode " Electric" nil nil 'electric-nroff-mode)
+
+;;;***
+
+;;;### (autoloads (outl-mouse-minor-mode outl-mouse-mode) "outl-mouse" "modes/outl-mouse.el")
+
+(autoload 'outl-mouse-mode "outl-mouse" "\
+Calls outline-mode, with outl-mouse extensions" t nil)
+
+(autoload 'outl-mouse-minor-mode "outl-mouse" "\
+Toggles outline-minor-mode, with outl-mouse extensions" t nil)
+
+;;;***
+
+;;;### (autoloads (outline-minor-mode outline-mode) "outline" "modes/outline.el")
+
+(defvar outline-minor-mode nil "\
+Non-nil if using Outline mode as a minor mode of some other mode.")
+
+(make-variable-buffer-local 'outline-minor-mode)
+
+(put 'outline-minor-mode 'permanent-local t)
+
+(add-minor-mode 'outline-minor-mode " Outl")
+
+(autoload 'outline-mode "outline" "\
+Set major mode for editing outlines with selective display.
+Headings are lines which start with asterisks: one for major headings,
+two for subheadings, etc.  Lines not starting with asterisks are body lines. 
+
+Body text or subheadings under a heading can be made temporarily
+invisible, or visible again.  Invisible lines are attached to the end 
+of the heading, so they move with it, if the line is killed and yanked
+back.  A heading with text hidden under it is marked with an ellipsis (...).
+
+Commands:\\<outline-mode-map>
+\\[outline-next-visible-heading]   outline-next-visible-heading      move by visible headings
+\\[outline-previous-visible-heading]   outline-previous-visible-heading
+\\[outline-forward-same-level]   outline-forward-same-level        similar but skip subheadings
+\\[outline-backward-same-level]   outline-backward-same-level
+\\[outline-up-heading]   outline-up-heading		    move from subheading to heading
+
+\\[hide-body]	make all text invisible (not headings).
+\\[show-all]	make everything in buffer visible.
+
+The remaining commands are used when point is on a heading line.
+They apply to some of the body or subheadings of that heading.
+\\[hide-subtree]   hide-subtree	make body and subheadings invisible.
+\\[show-subtree]   show-subtree	make body and subheadings visible.
+\\[show-children]   show-children	make direct subheadings visible.
+		 No effect on body, or subheadings 2 or more levels down.
+		 With arg N, affects subheadings N levels down.
+\\[hide-entry]	   make immediately following body invisible.
+\\[show-entry]	   make it visible.
+\\[hide-leaves]	   make body under heading and under its subheadings invisible.
+		     The subheadings remain visible.
+\\[show-branches]  make all subheadings at all levels visible.
+
+The variable `outline-regexp' can be changed to control what is a heading.
+A line is a heading if `outline-regexp' matches something at the
+beginning of the line.  The longer the match, the deeper the level.
+
+Turning on outline mode calls the value of `text-mode-hook' and then of
+`outline-mode-hook', if they are non-nil." t nil)
+
+(autoload 'outline-minor-mode "outline" "\
+Toggle Outline minor mode.
+With arg, turn Outline minor mode on if arg is positive, off otherwise.
+See the command `outline-mode' for more information on this mode." t nil)
+
+;;;***
+
+;;;### (autoloads (pascal-mode) "pascal" "modes/pascal.el")
+
+(autoload 'pascal-mode "pascal" "\
+Major mode for editing Pascal code. \\<pascal-mode-map>
+TAB indents for Pascal code.  Delete converts tabs to spaces as it moves back.
+
+\\[pascal-complete-word] completes the word around current point with respect to position in code
+\\[pascal-show-completions] shows all possible completions at this point.
+
+Other useful functions are:
+
+\\[pascal-mark-defun]	- Mark function.
+\\[pascal-insert-block]	- insert begin ... end;
+\\[pascal-star-comment]	- insert (* ... *)
+\\[pascal-comment-area]	- Put marked area in a comment, fixing nested comments.
+\\[pascal-uncomment-area]	- Uncomment an area commented with \\[pascal-comment-area].
+\\[pascal-beg-of-defun]	- Move to beginning of current function.
+\\[pascal-end-of-defun]	- Move to end of current function.
+\\[pascal-goto-defun]	- Goto function prompted for in the minibuffer.
+\\[pascal-outline]	- Enter pascal-outline-mode (see also pascal-outline).
+
+Variables controlling indentation/edit style:
+
+ pascal-indent-level      (default 3)
+    Indentation of Pascal statements with respect to containing block.
+ pascal-case-indent       (default 2)
+    Indentation for case statements.
+ pascal-auto-newline      (default nil)
+    Non-nil means automatically newline after semicolons and the punctuation mark
+    after an end.
+ pascal-tab-always-indent (default t)
+    Non-nil means TAB in Pascal mode should always reindent the current line,
+    regardless of where in the line point is when the TAB command is used.
+ pascal-auto-endcomments  (default t)
+    Non-nil means a comment { ... } is set after the ends which ends cases and
+    functions. The name of the function or case will be set between the braces.
+ pascal-auto-lineup       (default t)
+    List of contexts where auto lineup of :'s or ='s should be done.
+
+See also the user variables pascal-type-keywords, pascal-start-keywords and
+pascal-separator-keywords.
+
+Turning on Pascal mode calls the value of the variable pascal-mode-hook with
+no args, if that value is non-nil." t nil)
+
+;;;***
+
+;;;### (autoloads (perl-mode) "perl-mode" "modes/perl-mode.el")
+
+(autoload 'perl-mode "perl-mode" "\
+Major mode for editing Perl code.
+Expression and list commands understand all Perl brackets.
+Tab indents for Perl code.
+Comments are delimited with # ... \\n.
+Paragraphs are separated by blank lines only.
+Delete converts tabs to spaces as it moves back.
+\\{perl-mode-map}
+Variables controlling indentation style:
+ perl-tab-always-indent
+    Non-nil means TAB in Perl mode should always indent the current line,
+    regardless of where in the line point is when the TAB command is used.
+ perl-tab-to-comment
+    Non-nil means that for lines which don't need indenting, TAB will
+    either delete an empty comment, indent an existing comment, move 
+    to end-of-line, or if at end-of-line already, create a new comment.
+ perl-nochange
+    Lines starting with this regular expression are not auto-indented.
+ perl-indent-level
+    Indentation of Perl statements within surrounding block.
+    The surrounding block's indentation is the indentation
+    of the line on which the open-brace appears.
+ perl-continued-statement-offset
+    Extra indentation given to a substatement, such as the
+    then-clause of an if or body of a while.
+ perl-continued-brace-offset
+    Extra indentation given to a brace that starts a substatement.
+    This is in addition to `perl-continued-statement-offset'.
+ perl-brace-offset
+    Extra indentation for line if it starts with an open brace.
+ perl-brace-imaginary-offset
+    An open brace following other text is treated as if it were
+    this far to the right of the start of its line.
+ perl-label-offset
+    Extra indentation for line that is a label.
+
+Various indentation styles:       K&R  BSD  BLK  GNU  LW
+  perl-indent-level                5    8    0    2    4
+  perl-continued-statement-offset  5    8    4    2    4
+  perl-continued-brace-offset      0    0    0    0   -4
+  perl-brace-offset               -5   -8    0    0    0
+  perl-brace-imaginary-offset      0    0    4    0    0
+  perl-label-offset               -5   -8   -2   -2   -2
+
+Turning on Perl mode runs the normal hook `perl-mode-hook'." t nil)
+
+;;;***
+
+;;;### (autoloads (picture-mode) "picture" "modes/picture.el")
+
+(autoload 'picture-mode "picture" "\
+Switch to Picture mode, in which a quarter-plane screen model is used.
+Printing characters replace instead of inserting themselves with motion
+afterwards settable by these commands:
+  C-c <	  Move left after insertion.
+  C-c >	  Move right after insertion.
+  C-c ^	  Move up after insertion.
+  C-c .	  Move down after insertion.
+  C-c `	  Move northwest (nw) after insertion.
+  C-c '	  Move northeast (ne) after insertion.
+  C-c /	  Move southwest (sw) after insertion.
+  C-c \\   Move southeast (se) after insertion.
+The current direction is displayed in the modeline.  The initial
+direction is right.  Whitespace is inserted and tabs are changed to
+spaces when required by movement.  You can move around in the buffer
+with these commands:
+  \\[picture-move-down]	  Move vertically to SAME column in previous line.
+  \\[picture-move-up]	  Move vertically to SAME column in next line.
+  \\[picture-end-of-line]	  Move to column following last non-whitespace character.
+  \\[picture-forward-column]	  Move right inserting spaces if required.
+  \\[picture-backward-column]	  Move left changing tabs to spaces if required.
+  C-c C-f Move in direction of current picture motion.
+  C-c C-b Move in opposite direction of current picture motion.
+  Return  Move to beginning of next line.
+You can edit tabular text with these commands:
+  M-Tab	  Move to column beneath (or at) next interesting character.
+	    `Indents' relative to a previous line.
+  Tab	  Move to next stop in tab stop list.
+  C-c Tab Set tab stops according to context of this line.
+	    With ARG resets tab stops to default (global) value.
+	    See also documentation of variable	picture-tab-chars
+	    which defines \"interesting character\".  You can manually
+	    change the tab stop list with command \\[edit-tab-stops].
+You can manipulate text with these commands:
+  C-d	  Clear (replace) ARG columns after point without moving.
+  C-c C-d Delete char at point - the command normally assigned to C-d.
+  \\[picture-backward-clear-column]  Clear (replace) ARG columns before point, moving back over them.
+  \\[picture-clear-line]	  Clear ARG lines, advancing over them.	 The cleared
+	    text is saved in the kill ring.
+  \\[picture-open-line]	  Open blank line(s) beneath current line.
+You can manipulate rectangles with these commands:
+  C-c C-k Clear (or kill) a rectangle and save it.
+  C-c C-w Like C-c C-k except rectangle is saved in named register.
+  C-c C-y Overlay (or insert) currently saved rectangle at point.
+  C-c C-x Like C-c C-y except rectangle is taken from named register.
+  \\[copy-rectangle-to-register]   Copies a rectangle to a register.
+  \\[advertised-undo]   Can undo effects of rectangle overlay commands
+	    commands if invoked soon enough.
+You can return to the previous mode with:
+  C-c C-c Which also strips trailing whitespace from every line.
+	    Stripping is suppressed by supplying an argument.
+
+Entry to this mode calls the value of  picture-mode-hook  if non-nil.
+
+Note that Picture mode commands will work outside of Picture mode, but
+they are not defaultly assigned to keys." t nil)
+
+(defalias 'edit-picture 'picture-mode)
+
+;;;***
+
+;;;### (autoloads (postscript-mode) "postscript" "modes/postscript.el")
+
+(autoload 'postscript-mode "postscript" "\
+Major mode for editing PostScript files.
+
+\\[ps-execute-buffer] will send the contents of the buffer to the NeWS
+server using psh(1).  \\[ps-execute-region] sends the current region.
+\\[ps-shell] starts an interactive psh(1) window which will be used for
+subsequent \\[ps-execute-buffer] or \\[ps-execute-region] commands.
+
+In this mode, TAB and \\[indent-region] attempt to indent code
+based on the position of {}, [], and begin/end pairs.  The variable
+ps-indent-level controls the amount of indentation used inside
+arrays and begin/end pairs.  
+
+\\{ps-mode-map}
+
+\\[postscript-mode] calls the value of the variable postscript-mode-hook 
+with no args, if that value is non-nil." t nil)
+
+;;;***
+
+;;;### (autoloads (run-prolog inferior-prolog-mode prolog-mode) "prolog" "modes/prolog.el")
+
+(autoload 'prolog-mode "prolog" "\
+Major mode for editing Prolog code for Prologs.
+Blank lines and `%%...' separate paragraphs.  `%'s start comments.
+Commands:
+\\{prolog-mode-map}
+Entry to this mode calls the value of `prolog-mode-hook'
+if that value is non-nil." t nil)
+
+(autoload 'inferior-prolog-mode "prolog" "\
+Major mode for interacting with an inferior Prolog process.
+
+The following commands are available:
+\\{inferior-prolog-mode-map}
+
+Entry to this mode calls the value of `prolog-mode-hook' with no arguments,
+if that value is non-nil.  Likewise with the value of `comint-mode-hook'.
+`prolog-mode-hook' is called after `comint-mode-hook'.
+
+You can send text to the inferior Prolog from other buffers
+using the commands `send-region', `send-string' and \\[prolog-consult-region].
+
+Commands:
+Tab indents for Prolog; with argument, shifts rest
+ of expression rigidly with the current line.
+Paragraphs are separated only by blank lines and '%%'.
+'%'s start comments.
+
+Return at end of buffer sends line as input.
+Return not at end copies rest of line to end and sends it.
+\\[comint-kill-input] and \\[backward-kill-word] are kill commands, imitating normal Unix input editing.
+\\[comint-interrupt-subjob] interrupts the shell or its current subjob if any.
+\\[comint-stop-subjob] stops. \\[comint-quit-subjob] sends quit signal." t nil)
+
+(autoload 'run-prolog "prolog" "\
+Run an inferior Prolog process, input and output via buffer *prolog*." t nil)
+
+;;;***
+
+;;;### (autoloads (py-shell python-mode) "python-mode" "modes/python-mode.el")
+
+(eval-when-compile (condition-case nil (progn (require 'cl) (require 'imenu)) (error nil)))
+
+(autoload 'python-mode "python-mode" "\
+Major mode for editing Python files.
+To submit a problem report, enter `\\[py-submit-bug-report]' from a
+`python-mode' buffer.  Do `\\[py-describe-mode]' for detailed
+documentation.  To see what version of `python-mode' you are running,
+enter `\\[py-version]'.
+
+This mode knows about Python indentation, tokens, comments and
+continuation lines.  Paragraphs are separated by blank lines only.
+
+COMMANDS
+\\{py-mode-map}
+VARIABLES
+
+py-indent-offset		indentation increment
+py-block-comment-prefix		comment string used by comment-region
+py-python-command		shell command to invoke Python interpreter
+py-scroll-process-buffer		always scroll Python process buffer
+py-temp-directory		directory used for temp files (if needed)
+py-beep-if-tab-change		ring the bell if tab-width is changed" t nil)
+
+(autoload 'py-shell "python-mode" "\
+Start an interactive Python interpreter in another window.
+This is like Shell mode, except that Python is running in the window
+instead of a shell.  See the `Interactive Shell' and `Shell Mode'
+sections of the Emacs manual for details, especially for the key
+bindings active in the `*Python*' buffer.
+
+See the docs for variable `py-scroll-buffer' for info on scrolling
+behavior in the process window.
+
+Warning: Don't use an interactive Python if you change sys.ps1 or
+sys.ps2 from their default values, or if you're running code that
+prints `>>> ' or `... ' at the start of a line.  `python-mode' can't
+distinguish your output from Python's output, and assumes that `>>> '
+at the start of a line is a prompt from Python.  Similarly, the Emacs
+Shell mode code assumes that both `>>> ' and `... ' at the start of a
+line are Python prompts.  Bad things can happen if you fool either
+mode.
+
+Warning:  If you do any editing *in* the process buffer *while* the
+buffer is accepting output from Python, do NOT attempt to `undo' the
+changes.  Some of the output (nowhere near the parts you changed!) may
+be lost if you do.  This appears to be an Emacs bug, an unfortunate
+interaction between undo and process filters; the same problem exists in
+non-Python process buffers using the default (Emacs-supplied) process
+filter." t nil)
+
+;;;***
+
+;;;### (autoloads (reftex-add-to-label-alist reftex-mode turn-on-reftex) "reftex" "modes/reftex.el")
+
+(autoload 'turn-on-reftex "reftex" "\
+Turn on RefTeX minor mode." nil nil)
+
+(autoload 'reftex-mode "reftex" "\
+Minor mode with distinct support for \\label, \\ref and \\cite in LaTeX.
+
+Labels can be created with `\\[reftex-label]' and referenced with `\\[reftex-reference]'.
+When referencing, you get a menu with all labels of a given type and
+context of the label definition. The selected label is inserted as a
+\\ref macro.
+
+Citations can be made with `\\[reftex-citation]' which will use a regular expression 
+to pull out a *formatted* list of articles from your BibTeX
+database. The selected citation is inserted as a \\cite macro.
+
+A Table of Contents of the entire (multifile) document with browsing
+capabilities is available with `\\[reftex-toc]'.
+
+Most command have help available on the fly. This help is accessed by
+pressing `?' to any prompt mentioning this feature.
+
+\\{reftex-mode-map}
+Under X, these functions will be available also in a menu on the menu bar.
+
+------------------------------------------------------------------------------" t nil)
+
+(autoload 'reftex-add-to-label-alist "reftex" "\
+Add label environment descriptions to reftex-label-alist-external-add-ons.
+The format of ENTRY-LIST is exactly like reftex-label-alist. See there 
+for details.
+This function makes it possible to support RefTeX from AUCTeX style files.
+The entries in ENTRY-LIST will be processed after the user settings in
+reftex-label-alist, and before the defaults (specified in
+reftex-default-label-alist-entries).  Any changes made to
+reftex-label-alist-external-add-ons will raise a flag to the effect that a
+mode reset is done on the next occasion." nil nil)
+
+;;;***
+
+;;;### (autoloads (rexx-mode) "rexx-mode" "modes/rexx-mode.el")
+
+(autoload 'rexx-mode "rexx-mode" "\
+Major mode for editing REXX code.
+\\{rexx-mode-map}
+
+Variables controlling indentation style:
+ rexx-indent
+	The basic indentation for do-blocks.
+ rexx-end-indent
+	The relative offset of the \"end\" statement. 0 places it in the
+	same column as the statements of the block. Setting it to the same
+	value as rexx-indent places the \"end\" under the do-line.
+ rexx-cont-indent
+	The indention for lines following \"then\", \"else\" and \",\"
+	(continued) lines.
+ rexx-tab-always-indent
+	Non-nil means TAB in REXX mode should always reindent the current 
+	line, regardless of where in the line the point is when the TAB
+	command is used.
+
+If you have set rexx-end-indent to a nonzero value, you probably want to
+remap RETURN to rexx-indent-newline-indent. It makes sure that lines
+indents correctly when you press RETURN.
+
+An extensive abbreviation table consisting of all the keywords of REXX are
+supplied. Expanded keywords are converted into upper case making it
+easier to distinguish them. To use this feature the buffer must be in
+abbrev-mode. (See example below.)
+
+Turning on REXX mode calls the value of the variable rexx-mode-hook with
+no args, if that value is non-nil.
+
+For example:
+\(setq rexx-mode-hook '(lambda ()
+			(setq rexx-indent 4)
+			(setq rexx-end-indent 4)
+			(setq rexx-cont-indent 4)
+			(local-set-key \"\\C-m\" 'rexx-indent-newline-indent)
+			(abbrev-mode 1)
+			))
+
+will make the END aligned with the DO/SELECT. It will indent blocks and
+IF-statements four steps and make sure that the END jumps into the
+correct position when RETURN is pressed. Finally it will use the abbrev
+table to convert all REXX keywords into upper case." t nil)
+
+;;;***
+
+;;;### (autoloads (resize-minibuffer-mode) "rsz-minibuf" "modes/rsz-minibuf.el")
+
+(defgroup resize-minibuffer nil "Dynamically resize minibuffer to display entire contents" :group 'frames)
+
+(defcustom resize-minibuffer-window-max-height nil "*Maximum size the minibuffer window is allowed to become.\nIf less than 1 or not a number, the limit is the height of the frame in\nwhich the active minibuffer window resides." :type '(choice (const nil) integer) :group 'resize-minibuffer)
+
+(defcustom resize-minibuffer-window-exactly t "*If non-`nil', make minibuffer exactly the size needed to display all its contents.\nOtherwise, the minibuffer window can temporarily increase in size but\nnever get smaller while it is active." :type 'boolean :group 'resize-minibuffer)
+
+(defcustom resize-minibuffer-frame nil "*If non-`nil' and the active minibuffer is the sole window in its frame, allow changing the frame height." :type 'boolean :group 'resize-minibuffer)
+
+(defcustom resize-minibuffer-frame-max-height nil "*Maximum size the minibuffer frame is allowed to become.\nIf less than 1 or not a number, there is no limit.")
+
+(defcustom resize-minibuffer-frame-exactly nil "*If non-`nil', make minibuffer frame exactly the size needed to display all its contents.\nOtherwise, the minibuffer frame can temporarily increase in size but\nnever get smaller while it is active." :type 'boolean :group 'resize-minibuffer)
+
+(autoload 'resize-minibuffer-mode "rsz-minibuf" "\
+Enable or disable resize-minibuffer mode.
+A negative prefix argument disables this mode.  A positive argument or
+argument of 0 enables it.
+
+When this minor mode is enabled, the minibuffer is dynamically resized to
+contain the entire region of text put in it as you type.
+
+The variable `resize-minibuffer-mode' is set to t or nil depending on
+whether this mode is active or not.
+
+The maximum height to which the minibuffer can grow is controlled by the
+variable `resize-minibuffer-window-max-height'.
+
+The variable `resize-minibuffer-window-exactly' determines whether the
+minibuffer window should ever be shrunk to make it no larger than needed to
+display its contents.
+
+When using a window system, it is possible for a minibuffer to be the sole
+window in a frame.  Since that window is already its maximum size, the only
+way to make more text visible at once is to increase the size of the frame.
+The variable `resize-minibuffer-frame' controls whether this should be
+done.  The variables `resize-minibuffer-frame-max-height' and
+`resize-minibuffer-frame-exactly' are analogous to their window
+counterparts." t nil)
+
+;;;***
+
+;;;### (autoloads (scheme-mode) "scheme" "modes/scheme.el")
+
+(autoload 'scheme-mode "scheme" "\
+Major mode for editing Scheme code.
+Editing commands are similar to those of lisp-mode.
+
+In addition, if an inferior Scheme process is running, some additional
+commands will be defined, for evaluating expressions and controlling
+the interpreter, and the state of the process will be displayed in the
+modeline of all Scheme buffers.  The names of commands that interact
+with the Scheme process start with \"xscheme-\".  For more information
+see the documentation for xscheme-interaction-mode.
+
+Commands:
+Delete converts tabs to spaces as it moves back.
+Blank lines separate paragraphs.  Semicolons start comments.
+\\{scheme-mode-map}
+Entry to this mode calls the value of scheme-mode-hook
+if that value is non-nil." t nil)
+
+;;;***
+
+;;;### (autoloads (scribe-mode) "scribe" "modes/scribe.el")
+
+(autoload 'scribe-mode "scribe" "\
+Major mode for editing files of Scribe (a text formatter) source.
+Scribe-mode is similar text-mode, with a few extra commands added.
+\\{scribe-mode-map}
+
+Interesting variables:
+
+scribe-fancy-paragraphs
+  Non-nil makes Scribe mode use a different style of paragraph separation.
+
+scribe-electric-quote
+  Non-nil makes insert of double quote use `` or '' depending on context.
+
+scribe-electric-parenthesis
+  Non-nil makes an open-parenthesis char (one of `([<{')
+  automatically insert its close if typed after an @Command form." t nil)
+
+;;;***
+
+;;;### (autoloads (mail-other-frame mail-other-window mail mail-mode user-mail-address) "sendmail" "modes/sendmail.el")
+
+(defvar mail-from-style 'angles "\
+*Specifies how \"From:\" fields look.
+
+If `nil', they contain just the return address like:
+	king@grassland.com
+If `parens', they look like:
+	king@grassland.com (Elvis Parsley)
+If `angles', they look like:
+	Elvis Parsley <king@grassland.com>")
+
+(defvar mail-self-blind nil "\
+Non-nil means insert BCC to self in messages to be sent.
+This is done when the message is initialized,
+so you can remove or alter the BCC field to override the default.")
+
+(defvar mail-interactive nil "\
+Non-nil means when sending a message wait for and display errors.
+nil means let mailer mail back a message to report errors.")
+
+(defvar mail-dir nil "\
+*Default directory for saving messages.")
+
+(defvar rmail-ignored-headers (purecopy (concat "^\\(" (mapconcat 'identity '("Sender:" "References:" "Return-Path:" "Received:" "[^: 	\n]*Message-ID:" "Errors-To:" "Path:" "Expires:" "Xref:" "Lines:" "Approved:" "Distribution:" "Content-Length:" "Mime-Version:" "Content-Type:" "Content-Transfer-Encoding:" "X400-Received:" "X400-Originator:" "X400-Mts-Identifier:" "X400-Content-Type:" "Content-Identifier:" "Status:" "Summary-Line:" "X-Attribution:" "Via:" "Sent-Via:" "Mail-From:" "Origin:" "Comments:" "Originator:" "NF-ID:" "NF-From:" "Posting-Version:" "Posted:" "Posted-Date:" "Date-Received:" "Relay-Version:" "Article-I\\.D\\.:" "NNTP-Version:" "NNTP-Posting-Host:" "X-Mailer:" "X-Newsreader:" "News-Software:" "X-Received:" "X-References:" "X-Envelope-To:" "X-VMS-" "Remailed-" "X-Plantation:" "X-Windows:" "X-Pgp-") "\\|") "\\)")) "\
+*Gubbish header fields one would rather not see.")
+
+(defvar mail-yank-ignored-headers (purecopy (concat rmail-ignored-headers "\\|" "^\\(" (mapconcat 'identity '("Resent-To:" "Resent-By:" "Resent-CC:" "To:" "Subject:" "In-Reply-To:") "\\|") "\\)")) "\
+Delete these headers from old message when it's inserted in a reply.")
+
+(defvar send-mail-function 'sendmail-send-it "\
+Function to call to send the current buffer as mail.
+The headers should be delimited by a line whose contents
+match the variable `mail-header-separator'.")
+
+(defvar mail-header-separator (purecopy "--text follows this line--") "\
+*Line used to separate headers from text in messages being composed.")
+
+(defvar mail-archive-file-name nil "\
+*Name of file to write all outgoing messages in, or nil for none.
+This can be an inbox file or an Rmail file.")
+
+(defvar mail-default-reply-to nil "\
+*Address to insert as default Reply-to field of outgoing messages.
+If nil, it will be initialized from the REPLYTO environment variable
+when you first send mail.")
+
+(defvar mail-alias-file nil "\
+*If non-nil, the name of a file to use instead of `/usr/lib/aliases'.
+This file defines aliases to be expanded by the mailer; this is a different
+feature from that of defining aliases in `.mailrc' to be expanded in Emacs.
+This variable has no effect unless your system uses sendmail as its mailer.")
+
+(defvar mail-yank-prefix "> " "\
+*Prefix insert on lines of yanked message being replied to.
+nil means use indentation.")
+
+(defvar mail-signature nil "\
+*Text inserted at end of mail buffer when a message is initialized.
+If t, it means to insert the contents of the file `mail-signature-file'.")
+
+(autoload 'user-mail-address "sendmail" "\
+Query the user for his mail address, unless it is already known." t nil)
+
+(autoload 'mail-mode "sendmail" "\
+Major mode for editing mail to be sent.
+Like Text Mode but with these additional commands:
+C-c C-s  mail-send (send the message)    C-c C-c  mail-send-and-exit
+C-c C-f  move to a header field (and create it if there isn't):
+	 C-c C-f C-t  move to To:	C-c C-f C-s  move to Subj:
+	 C-c C-f C-b  move to BCC:	C-c C-f C-c  move to CC:
+	 C-c C-f C-f  move to FCC:	C-c C-f C-r  move to Reply-To:
+C-c C-t  mail-text (move to beginning of message text).
+C-c C-w  mail-signature (insert `mail-signature-file' file).
+C-c C-y  mail-yank-original (insert current message, in Rmail).
+C-c C-q  mail-fill-yanked-message (fill what was yanked).
+C-c C-v  mail-sent-via (add a sent-via field for each To or CC)." t nil)
+
+(autoload 'mail "sendmail" "\
+Edit a message to be sent.  Prefix arg means resume editing (don't erase).
+When this function returns, the buffer `*mail*' is selected.
+The value is t if the message was newly initialized; otherwise, nil.
+
+Optionally, the signature file `mail-signature-file' can be inserted at the
+end; see the variable `mail-signature'.
+
+\\<mail-mode-map>
+While editing message, type \\[mail-send-and-exit] to send the message and exit.
+
+Various special commands starting with C-c are available in sendmail mode
+to move to message header fields:
+\\{mail-mode-map}
+
+The variable `mail-signature' controls whether the signature file
+`mail-signature-file' is inserted immediately.
+
+If `mail-signature' is nil, use \\[mail-signature] to insert the
+signature in `mail-signature-file'.
+
+If `mail-self-blind' is non-nil, a BCC to yourself is inserted
+when the message is initialized.
+
+If `mail-default-reply-to' is non-nil, it should be an address (a string);
+a Reply-to: field with that address is inserted.
+
+If `mail-archive-file-name' is non-nil, an FCC field with that file name
+is inserted.
+
+The normal hook `mail-setup-hook' is run after the message is
+initialized.  It can add more default fields to the message.
+
+When calling from a program, the first argument if non-nil says
+not to erase the existing contents of the `*mail*' buffer.
+
+The second through fifth arguments,
+ TO, SUBJECT, IN-REPLY-TO and CC, specify if non-nil
+ the initial contents of those header fields.
+ These arguments should not have final newlines.
+The sixth argument REPLYBUFFER is a buffer whose contents
+ should be yanked if the user types C-c C-y.
+The seventh argument ACTIONS is a list of actions to take
+ if/when the message is sent.  Each action looks like (FUNCTION . ARGS);
+ when the message is sent, we apply FUNCTION to ARGS.
+ This is how Rmail arranges to mark messages `answered'." t nil)
+
+(autoload 'mail-other-window "sendmail" "\
+Like `mail' command, but display mail buffer in another window." t nil)
+
+(autoload 'mail-other-frame "sendmail" "\
+Like `mail' command, but display mail buffer in another frame." t nil)
+
+(define-key ctl-x-map "m" 'mail)
+
+(define-key ctl-x-4-map "m" 'mail-other-window)
+
+(define-key ctl-x-5-map "m" 'mail-other-frame)
+
+(add-hook 'same-window-buffer-names "*mail*")
+
+;;;***
+
+;;;### (autoloads (sh-mode) "sh-script" "modes/sh-script.el")
+
+(put 'sh-mode 'mode-class 'special)
+
+(autoload 'sh-mode "sh-script" "\
+Major mode for editing shell scripts.
+This mode works for many shells, since they all have roughly the same syntax,
+as far as commands, arguments, variables, pipes, comments etc. are concerned.
+Unless the file's magic number indicates the shell, your usual shell is
+assumed.  Since filenames rarely give a clue, they are not further analyzed.
+
+This mode adapts to the variations between shells (see `sh-set-shell') by
+means of an inheritance based feature lookup (see `sh-feature').  This
+mechanism applies to all variables (including skeletons) that pertain to
+shell-specific features.
+
+The default style of this mode is that of Rosenblatt's Korn shell book.
+The syntax of the statements varies with the shell being used.  The
+following commands are available, based on the current shell's syntax:
+
+\\[sh-case]	 case statement
+\\[sh-for]	 for loop
+\\[sh-function]	 function definition
+\\[sh-if]	 if statement
+\\[sh-indexed-loop]	 indexed loop from 1 to n
+\\[sh-while-getopts]	 while getopts loop
+\\[sh-repeat]	 repeat loop
+\\[sh-select]	 select loop
+\\[sh-until]	 until loop
+\\[sh-while]	 while loop
+
+\\[backward-delete-char-untabify]	 Delete backward one position, even if it was a tab.
+\\[sh-newline-and-indent]	 Delete unquoted space and indent new line same as this one.
+\\[sh-end-of-command]	 Go to end of successive commands.
+\\[sh-beginning-of-command]	 Go to beginning of successive commands.
+\\[sh-set-shell]	 Set this buffer's shell, and maybe its magic number.
+\\[sh-execute-region]	 Have optional header and region be executed in a subshell.
+
+\\[sh-maybe-here-document]	 Without prefix, following an unquoted < inserts here document.
+{, (, [, ', \", `
+	Unless quoted with \\, insert the pairs {}, (), [], or '', \"\", ``.
+
+If you generally program a shell different from your login shell you can
+set `sh-shell-file' accordingly.  If your shell's file name doesn't correctly
+indicate what shell it is use `sh-alias-alist' to translate.
+
+If your shell gives error messages with line numbers, you can use \\[executable-interpret]
+with your script for an edit-interpret-debug cycle." t nil)
+
+(defalias 'shell-script-mode 'sh-mode)
+
+;;;***
+
+;;;### (autoloads (strokes-mode strokes-list-strokes strokes-load-user-strokes strokes-help strokes-describe-stroke strokes-do-complex-stroke strokes-do-stroke strokes-read-complex-stroke strokes-read-stroke strokes-global-set-stroke) "strokes" "modes/strokes.el")
+
+(defvar strokes-mode nil "\
+Non-nil when `strokes' is globally enabled")
+
+(autoload 'strokes-global-set-stroke "strokes" "\
+Interactively give STROKE the global binding as COMMAND.
+Operated just like `global-set-key', except for strokes.
+COMMAND is a symbol naming an interactively-callable function.  STROKE
+is a list of sampled positions on the stroke grid as described in the
+documentation for the `strokes-define-stroke' function." t nil)
+
+(defalias 'global-set-stroke 'strokes-global-set-stroke)
+
+(autoload 'strokes-read-stroke "strokes" "\
+Read a simple stroke (interactively) and return the stroke.
+Optional PROMPT in minibuffer displays before and during stroke reading.
+This function will display the stroke interactively as it is being
+entered in the strokes buffer if the variable
+`strokes-use-strokes-buffer' is non-nil.
+Optional EVENT is currently not used, but hopefully will be soon." nil nil)
+
+(autoload 'strokes-read-complex-stroke "strokes" "\
+Read a complex stroke (interactively) and return the stroke.
+Optional PROMPT in minibuffer displays before and during stroke reading.
+Note that a complex stroke allows the user to pen-up and pen-down.  This
+is implemented by allowing the user to paint with button1 or button2 and
+then complete the stroke with button3.
+Optional EVENT is currently not used, but hopefully will be soon." nil nil)
+
+(autoload 'strokes-do-stroke "strokes" "\
+Read a simple stroke from the user and then exectute its comand.
+This must be bound to a mouse event." t nil)
+
+(autoload 'strokes-do-complex-stroke "strokes" "\
+Read a complex stroke from the user and then exectute its command.
+This must be bound to a mouse event." t nil)
+
+(autoload 'strokes-describe-stroke "strokes" "\
+Displays the command which STROKE maps to, reading STROKE interactively." t nil)
+
+(defalias 'describe-stroke 'strokes-describe-stroke)
+
+(autoload 'strokes-help "strokes" "\
+Get instructional help on using the the `strokes' package." t nil)
+
+(autoload 'strokes-load-user-strokes "strokes" "\
+Load user-defined strokes from file named by `strokes-file'." t nil)
+
+(defalias 'load-user-strokes 'strokes-load-user-strokes)
+
+(autoload 'strokes-list-strokes "strokes" "\
+Pop up a buffer containing a listing of all strokes defined in STROKE-MAP.
+If STROKE-MAP is not given, `strokes-global-map' will be used instead." t nil)
+
+(defalias 'list-strokes 'strokes-list-strokes)
+
+(autoload 'strokes-mode "strokes" "\
+Toggle strokes being enabled.
+With ARG, turn strokes on if and only if ARG is positive or true.
+Note that `strokes-mode' is a global mode.  Think of it as a minor
+mode in all buffers when activated.
+By default, strokes are invoked with mouse button-2.  You can define
+new strokes with
+
+> M-x global-set-stroke" t nil)
+
+;;;***
+
+;;;### (autoloads (tcl-help-on-word inferior-tcl tcl-mode) "tcl" "modes/tcl.el")
+
+(autoload 'tcl-mode "tcl" "\
+Major mode for editing Tcl code.
+Expression and list commands understand all Tcl brackets.
+Tab indents for Tcl code.
+Paragraphs are separated by blank lines only.
+Delete converts tabs to spaces as it moves back.
+
+Variables controlling indentation style:
+  tcl-indent-level
+    Indentation of Tcl statements within surrounding block.
+  tcl-continued-indent-level
+    Indentation of continuation line relative to first line of command.
+
+Variables controlling user interaction with mode (see variable
+documentation for details):
+  tcl-tab-always-indent
+    Controls action of TAB key.
+  tcl-auto-newline
+    Non-nil means automatically newline before and after braces, brackets,
+    and semicolons inserted in Tcl code.
+  tcl-electric-hash-style
+    Controls action of `#' key.
+  tcl-use-hairy-comment-detector
+    If t, use more complicated, but slower, comment detector.
+    This variable is only used in GNU Emacs 19.
+  tcl-use-smart-word-finder
+    If not nil, use a smarter, Tcl-specific way to find the current
+    word when looking up help on a Tcl command.
+
+Turning on Tcl mode calls the value of the variable `tcl-mode-hook'
+with no args, if that value is non-nil.  Read the documentation for
+`tcl-mode-hook' to see what kinds of interesting hook functions
+already exist.
+
+Commands:
+\\{tcl-mode-map}" t nil)
+
+(autoload 'inferior-tcl "tcl" "\
+Run inferior Tcl process.
+Prefix arg means enter program name interactively.
+See documentation for function `inferior-tcl-mode' for more information." t nil)
+
+(autoload 'tcl-help-on-word "tcl" "\
+Get help on Tcl command.  Default is word at point.
+Prefix argument means invert sense of `tcl-use-smart-word-finder'." t nil)
+
+;;;***
+
+;;;### (autoloads (latex-mode plain-tex-mode tex-mode) "tex-mode" "modes/tex-mode.el")
+
+(autoload 'tex-mode "tex-mode" "\
+Major mode for editing files of input for TeX, LaTeX, or SliTeX.
+Tries to determine (by looking at the beginning of the file) whether
+this file is for plain TeX, LaTeX, or SliTeX and calls plain-tex-mode,
+latex-mode, or slitex-mode, respectively.  If it cannot be determined,
+such as if there are no commands in the file, the value of tex-default-mode
+is used." t nil)
+
+(fset 'TeX-mode 'tex-mode)
+
+(fset 'LaTeX-mode 'latex-mode)
+
+(autoload 'plain-tex-mode "tex-mode" "\
+Major mode for editing files of input for plain TeX.
+Makes $ and } display the characters they match.
+Makes \" insert `` when it seems to be the beginning of a quotation,
+and '' when it appears to be the end; it inserts \" only after a \\.
+
+Use \\[tex-region] to run TeX on the current region, plus a \"header\"
+copied from the top of the file (containing macro definitions, etc.),
+running TeX under a special subshell.  \\[tex-buffer] does the whole buffer.
+\\[tex-file] saves the buffer and then processes the file.
+\\[tex-print] prints the .dvi file made by any of these.
+\\[tex-view] previews the .dvi file made by any of these.
+\\[tex-bibtex-file] runs bibtex on the file of the current buffer.
+
+Use \\[validate-tex-buffer] to check buffer for paragraphs containing
+mismatched $'s or braces.
+
+Special commands:
+\\{tex-mode-map}
+
+Mode variables:
+tex-run-command
+	Command string used by \\[tex-region] or \\[tex-buffer].
+tex-directory
+	Directory in which to create temporary files for TeX jobs
+	run by \\[tex-region] or \\[tex-buffer].
+tex-dvi-print-command
+	Command string used by \\[tex-print] to print a .dvi file.
+tex-alt-dvi-print-command
+	Alternative command string used by \\[tex-print] (when given a prefix
+	argument) to print a .dvi file.
+tex-dvi-view-command
+	Command string used by \\[tex-view] to preview a .dvi file.
+tex-show-queue-command
+	Command string used by \\[tex-show-print-queue] to show the print
+	queue that \\[tex-print] put your job on.
+
+Entering Plain-tex mode calls the value of text-mode-hook, then the value of
+tex-mode-hook, and then the value of plain-tex-mode-hook.  When the special
+subshell is initiated, the value of tex-shell-hook is called." t nil)
+
+(fset 'plain-TeX-mode 'plain-tex-mode)
+
+(autoload 'latex-mode "tex-mode" "\
+Major mode for editing files of input for LaTeX.
+Makes $ and } display the characters they match.
+Makes \" insert `` when it seems to be the beginning of a quotation,
+and '' when it appears to be the end; it inserts \" only after a \\.
+
+Use \\[tex-region] to run LaTeX on the current region, plus the preamble
+copied from the top of the file (containing \\documentstyle, etc.),
+running LaTeX under a special subshell.  \\[tex-buffer] does the whole buffer.
+\\[tex-file] saves the buffer and then processes the file.
+\\[tex-print] prints the .dvi file made by any of these.
+\\[tex-view] previews the .dvi file made by any of these.
+\\[tex-bibtex-file] runs bibtex on the file of the current buffer.
+
+Use \\[validate-tex-buffer] to check buffer for paragraphs containing
+mismatched $'s or braces.
+
+Special commands:
+\\{tex-mode-map}
+
+Mode variables:
+latex-run-command
+	Command string used by \\[tex-region] or \\[tex-buffer].
+tex-directory
+	Directory in which to create temporary files for LaTeX jobs
+	run by \\[tex-region] or \\[tex-buffer].
+tex-dvi-print-command
+	Command string used by \\[tex-print] to print a .dvi file.
+tex-alt-dvi-print-command
+	Alternative command string used by \\[tex-print] (when given a prefix
+	argument) to print a .dvi file.
+tex-dvi-view-command
+	Command string used by \\[tex-view] to preview a .dvi file.
+tex-show-queue-command
+	Command string used by \\[tex-show-print-queue] to show the print
+	queue that \\[tex-print] put your job on.
+
+Entering Latex mode calls the value of text-mode-hook, then the value of
+tex-mode-hook, and then the value of latex-mode-hook.  When the special
+subshell is initiated, the value of tex-shell-hook is called." t nil)
+
+;;;***
+
+;;;### (autoloads (texinfo-mode) "texinfo" "modes/texinfo.el")
+
+(autoload 'texinfo-mode "texinfo" "\
+Major mode for editing Texinfo files.
+
+  It has these extra commands:
+\\{texinfo-mode-map}
+
+  These are files that are used as input for TeX to make printed manuals
+and also to be turned into Info files with \\[makeinfo-buffer] or
+the `makeinfo' program.  These files must be written in a very restricted and
+modified version of TeX input format.
+
+  Editing commands are like text-mode except that the syntax table is
+set up so expression commands skip Texinfo bracket groups.  To see
+what the Info version of a region of the Texinfo file will look like,
+use \\[makeinfo-region], which runs `makeinfo' on the current region.
+
+  You can show the structure of a Texinfo file with \\[texinfo-show-structure].
+This command shows the structure of a Texinfo file by listing the
+lines with the @-sign commands for @chapter, @section, and the like.
+These lines are displayed in another window called the *Occur* window.
+In that window, you can position the cursor over one of the lines and
+use \\[occur-mode-goto-occurrence], to jump to the corresponding spot
+in the Texinfo file.
+
+  In addition, Texinfo mode provides commands that insert various
+frequently used @-sign commands into the buffer.  You can use these
+commands to save keystrokes.  And you can insert balanced braces with
+\\[texinfo-insert-braces] and later use the command \\[up-list] to
+move forward past the closing brace.
+
+Also, Texinfo mode provides functions for automatically creating or
+updating menus and node pointers.  These functions
+
+  * insert the `Next', `Previous' and `Up' pointers of a node,
+  * insert or update the menu for a section, and
+  * create a master menu for a Texinfo source file.
+
+Here are the functions:
+
+    texinfo-update-node                \\[texinfo-update-node]
+    texinfo-every-node-update          \\[texinfo-every-node-update]
+    texinfo-sequential-node-update 
+
+    texinfo-make-menu                  \\[texinfo-make-menu]
+    texinfo-all-menus-update           \\[texinfo-all-menus-update]
+    texinfo-master-menu
+
+    texinfo-indent-menu-description (column &optional region-p)
+
+The `texinfo-column-for-description' variable specifies the column to
+which menu descriptions are indented. 
+
+Passed an argument (a prefix argument, if interactive), the
+`texinfo-update-node' and `texinfo-make-menu' functions do their jobs
+in the region.
+
+To use the updating commands, you must structure your Texinfo file
+hierarchically, such that each `@node' line, with the exception of the
+Top node, is accompanied by some kind of section line, such as an
+`@chapter' or `@section' line.
+
+If the file has a `top' node, it must be called `top' or `Top' and
+be the first node in the file.
+
+Entering Texinfo mode calls the value of text-mode-hook, and then the
+value of texinfo-mode-hook." t nil)
+
+;;;***
+
+;;;### (autoloads (verilog-mode) "verilog-mode" "modes/verilog-mode.el")
+
+(autoload 'verilog-mode "verilog-mode" "\
+Major mode for editing Verilog code. \\<verilog-mode-map>
+NEWLINE, TAB indents for Verilog code.  
+Delete converts tabs to spaces as it moves back.
+Supports highlighting.
+
+Variables controlling indentation/edit style:
+
+ verilog-indent-level           (default 3)
+    Indentation of Verilog statements with respect to containing block.
+ verilog-indent-level-module    (default 3)
+    Absolute indentation of Module level Verilog statements. 
+    Set to 0 to get initial and always statements lined up 
+    on the left side of your screen.
+ verilog-indent-level-declaration    (default 3)
+    Indentation of declarations with respect to containing block. 
+    Set to 0 to get them list right under containing block.
+ verilog-indent-level-behavorial    (default 3)
+    Indentation of first begin in a task or function block
+    Set to 0 to get such code to linedup underneath the task or function keyword
+ verilog-cexp-indent            (default 1)
+    Indentation of Verilog statements broken across lines.
+ verilog-case-indent            (default 2)
+    Indentation for case statements.
+ verilog-auto-newline           (default nil)
+    Non-nil means automatically newline after semicolons and the punctation 
+    mark after an end.
+ verilog-auto-indent-on-newline (default t)
+    Non-nil means automatically indent line after newline
+ verilog-tab-always-indent      (default t)
+    Non-nil means TAB in Verilog mode should always reindent the current line,
+    regardless of where in the line point is when the TAB command is used.
+ verilog-indent-begin-after-if  (default t)
+    Non-nil means to indent begin statements following a preceding
+    if, else, while, for and repeat statements, if any. otherwise,
+    the begin is lined up with the preceding token. If t, you get:
+      if (a)
+         begin
+    otherwise you get:
+      if (a)
+      begin
+ verilog-auto-endcomments       (default t)
+    Non-nil means a comment /* ... */ is set after the ends which ends 
+      cases, tasks, functions and modules.
+    The type and name of the object will be set between the braces.
+ verilog-minimum-comment-distance (default 40)
+    Minimum distance between begin and end required before a comment
+    will be inserted.  Setting this variable to zero results in every
+    end aquiring a comment; the default avoids too many redundanet
+    comments in tight quarters. 
+ verilog-auto-lineup            (default `(all))
+    List of contexts where auto lineup of :'s or ='s should be done.
+
+Turning on Verilog mode calls the value of the variable verilog-mode-hook with
+no args, if that value is non-nil.
+Other useful functions are:
+\\[verilog-complete-word]	-complete word with appropriate possibilities 
+   (functions, verilog keywords...)
+\\[verilog-comment-region]	- Put marked area in a comment, fixing 
+   nested comments.
+\\[verilog-uncomment-region]	- Uncomment an area commented with \\[verilog-comment-region].
+\\[verilog-insert-block]	- insert begin ... end;
+\\[verilog-star-comment]	- insert /* ... */
+\\[verilog-mark-defun]	- Mark function.
+\\[verilog-beg-of-defun]	- Move to beginning of current function.
+\\[verilog-end-of-defun]	- Move to end of current function.
+\\[verilog-label-be]	- Label matching begin ... end, fork ... join 
+  and case ... endcase statements;
+" t nil)
+
+;;;***
+
+;;;### (autoloads (vhdl-mode) "vhdl-mode" "modes/vhdl-mode.el")
+
+(autoload 'vhdl-mode "vhdl-mode" "\
+Major mode for editing VHDL code.
+vhdl-mode $Revision: 1.1 $
+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
+problem, including a reproducible test case and send the message.
+
+Note that the details of configuring vhdl-mode will soon be moved to the
+accompanying texinfo manual.  Until then, please read the README file
+that came with the vhdl-mode distribution.
+
+The hook variable `vhdl-mode-hook' is run with no args, if that value is
+bound and has a non-nil value.
+
+Key bindings:
+\\{vhdl-mode-map}" t nil)
+
+;;;***
+
+;;;### (autoloads (auto-view-mode view-major-mode view-mode view-minor-mode view-buffer-other-window view-file-other-window view-buffer view-file) "view-less" "modes/view-less.el")
+
+(defvar view-minor-mode-map (let ((map (make-keymap))) (set-keymap-name map 'view-minor-mode-map) (suppress-keymap map) (define-key map "-" 'negative-argument) (define-key map " " 'scroll-up) (define-key map "f" 'scroll-up) (define-key map "b" 'scroll-down) (define-key map 'backspace 'scroll-down) (define-key map 'delete 'scroll-down) (define-key map "
" 'view-scroll-lines-up) (define-key map "\n" 'view-scroll-lines-up) (define-key map "e" 'view-scroll-lines-up) (define-key map "j" 'view-scroll-lines-up) (define-key map "y" 'view-scroll-lines-down) (define-key map "k" 'view-scroll-lines-down) (define-key map "d" 'view-scroll-some-lines-up) (define-key map "u" 'view-scroll-some-lines-down) (define-key map "r" 'recenter) (define-key map "t" 'toggle-truncate-lines) (define-key map "N" 'view-buffer) (define-key map "E" 'view-file) (define-key map "P" 'view-buffer) (define-key map "!" 'shell-command) (define-key map "|" 'shell-command-on-region) (define-key map "=" 'what-line) (define-key map "?" 'view-search-backward) (define-key map "h" 'view-mode-describe) (define-key map "s" 'view-repeat-search) (define-key map "n" 'view-repeat-search) (define-key map "/" 'view-search-forward) (define-key map "\\" 'view-search-backward) (define-key map "g" 'view-goto-line) (define-key map "G" 'view-last-windowful) (define-key map "%" 'view-goto-percent) (define-key map "p" 'view-goto-percent) (define-key map "m" 'point-to-register) (define-key map "'" 'register-to-point) (define-key map "C" 'view-cleanup-backspaces) (define-key map "" 'view-quit) (define-key map "" 'view-quit-toggle-ro) (define-key map "q" 'view-quit) map))
+
+(defvar view-mode-map (let ((map (copy-keymap view-minor-mode-map))) (set-keymap-name map 'view-mode-map) map))
+
+(autoload 'view-file "view-less" "\
+Find FILE, enter view mode.  With prefix arg OTHER-P, use other window." t nil)
+
+(autoload 'view-buffer "view-less" "\
+Switch to BUF, enter view mode.  With prefix arg use other window." t nil)
+
+(autoload 'view-file-other-window "view-less" "\
+Find FILE in other window, and enter view mode." t nil)
+
+(autoload 'view-buffer-other-window "view-less" "\
+Switch to BUFFER in another window, and enter view mode." t nil)
+
+(autoload 'view-minor-mode "view-less" "\
+Minor mode for viewing text, with bindings like `less'.
+Commands are:
+\\<view-minor-mode-map>
+0..9	prefix args
+-	prefix minus
+\\[scroll-up]	page forward
+\\[scroll-down]	page back
+\\[view-scroll-lines-up]	scroll prefix-arg lines forward, default 1.
+\\[view-scroll-lines-down]	scroll prefix-arg lines backward, default 1.
+\\[view-scroll-some-lines-down]	scroll prefix-arg lines backward, default 10.
+\\[view-scroll-some-lines-up]	scroll prefix-arg lines forward, default 10.
+\\[what-line]	print line number
+\\[view-mode-describe]	print this help message
+\\[view-search-forward]	regexp search, uses previous string if you just hit RET
+\\[view-search-backward]	as above but searches backward
+\\[view-repeat-search]	repeat last search
+\\[view-goto-line]	goto line prefix-arg, default 1
+\\[view-last-windowful]	goto line prefix-arg, default last line
+\\[view-goto-percent]	goto a position by percentage
+\\[toggle-truncate-lines]	toggle truncate-lines
+\\[view-file]	view another file
+\\[view-buffer]	view another buffer
+\\[view-cleanup-backspaces]	cleanup backspace constructions
+\\[shell-command]	execute a shell command
+\\[shell-command-on-region]	execute a shell command with the region as input
+\\[view-quit]	exit view-mode, and bury the current buffer.
+
+If invoked with the optional (prefix) arg non-nil, view-mode cleans up
+backspace constructions.
+
+More precisely:
+\\{view-minor-mode-map}" t nil)
+
+(autoload 'view-mode "view-less" "\
+View the current buffer using view-minor-mode.  This exists to be 99.9%
+compatible with the implementations of `view-mode' in view.el and older
+versions of view-less.el." t nil)
+
+(autoload 'view-major-mode "view-less" "\
+View the current buffer using view-mode, as a major mode.
+This function has a nonstandard name because `view-mode' is wrongly
+named but is like this for compatibility reasons." t nil)
+
+(autoload 'auto-view-mode "view-less" "\
+If the file of the current buffer is not writable, call view-mode.
+This is meant to be added to `find-file-hooks'." nil nil)
+
+;;;***
+
+;;;### (autoloads (vrml-mode) "vrml-mode" "modes/vrml-mode.el")
+
+(autoload 'vrml-mode "vrml-mode" "\
+Major mode for editing VRML code.
+Expression and list commands understand all VRML brackets.
+Tab indents for VRML code.
+Paragraphs are separated by blank lines only.
+Delete converts tabs to spaces as it moves back.
+
+Variables controlling indentation style:
+  vrml-indent-level
+    Indentation of VRML statements within surrounding block.
+
+Variables controlling user interaction with mode (see variable
+documentation for details):
+  vrml-tab-always-indent
+    Controls action of TAB key.
+  vrml-auto-newline
+    Non-nil means automatically newline before and after braces
+    inserted in VRML code.
+
+Turning on VRML mode calls the value of the variable `vrml-mode-hook'
+with no args, if that value is non-nil.  Read the documentation for
+`vrml-mode-hook' to see what kinds of interesting hook functions
+already exist.
+
+Commands:
+\\{vrml-mode-map}" t nil)
+
+;;;***
+
+;;;### (autoloads (xpm-mode) "xpm-mode" "modes/xpm-mode.el")
+
+(autoload 'xpm-mode "xpm-mode" "\
+Treat the current buffer as an xpm file and colorize it.
+
+  Shift-button-1 lets you paint by dragging the mouse.  Shift-button-1 on a
+color definition line will change the current painting color to that line's
+value.
+
+  Characters inserted from the keyboard will NOT be colored properly yet.
+Use the mouse, or do xpm-init (\\[xpm-init]) after making changes.
+
+\\[xpm-add-color] Add a new color, prompting for character and value
+\\[xpm-show-image] show the current image at the top of the buffer
+\\[xpm-parse-color] parse the current line's color definition and add
+   it to the color table.  Provided as a means of changing colors.
+XPM minor mode bindings:
+\\{xpm-mode-map}" t nil)
+
+;;;***
+
+;;;### (autoloads (xrdb-mode) "xrdb-mode" "modes/xrdb-mode.el")
+
+(autoload 'xrdb-mode "xrdb-mode" "\
+Major mode for editing xrdb config files" t nil)
+
+;;;***
+
+(provide 'modes-autoloads)
+))
diff -r 4de2936b4e77 -r 0132846995bd lisp/modes/custom-load.el
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lisp/modes/custom-load.el	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,109 @@
+(put 'message 'custom-loads '("sendmail"))
+(put 'copyright 'custom-loads '())
+(put 'eldoc 'custom-loads '())
+(put 'prolog 'custom-loads '("prolog"))
+(put 'execute 'custom-loads '())
+(put 'mouse 'custom-loads '("outl-mouse" "strokes"))
+(put 'reftex-defining-label-environments 'custom-loads '())
+(put 'mail-abbrevs 'custom-loads '("mail-abbrevs"))
+(put 'pascal 'custom-loads '("pascal"))
+(put 'tex 'custom-loads '("reftex"))
+(put 'tcl 'custom-loads '("tcl"))
+(put 'etags 'custom-loads '())
+(put 'limits 'custom-loads '())
+(put 'minibuffer 'custom-loads '())
+(put 'environment 'custom-loads '())
+(put 'sound 'custom-loads '())
+(put 'cc-style 'custom-loads '("cc-mode"))
+(put 'icon 'custom-loads '("icon"))
+(put 'holidays 'custom-loads '())
+(put 'texinfo 'custom-loads '("texinfo"))
+(put 'auto-save 'custom-loads '())
+(put 'xrdb 'custom-loads '("xrdb-mode"))
+(put 'ispell 'custom-loads '())
+(put 'mail 'custom-loads '("mail-abbrevs"))
+(put 'fortran-indent 'custom-loads '("fortran"))
+(put 'lpr 'custom-loads '())
+(put 'message-headers 'custom-loads '())
+(put 'docs 'custom-loads '("texinfo"))
+(put 'lisp-indent 'custom-loads '("cl-indent"))
+(put 'tools 'custom-loads '("make-mode"))
+(put 'cc-comment 'custom-loads '("cc-mode"))
+(put 'editing-basics 'custom-loads '())
+(put 'internal 'custom-loads '())
+(put 'calendar 'custom-loads '())
+(put 'help-appearance 'custom-loads '())
+(put 'display-time 'custom-loads '())
+(put 'lisp 'custom-loads '("cl-indent"))
+(put 'reftex 'custom-loads '("reftex"))
+(put 'diff 'custom-loads '())
+(put 'sh-script 'custom-loads '("sh-script"))
+(put 'outlines 'custom-loads '("outl-mouse" "whitespace-mode"))
+(put 'paren-matching 'custom-loads '())
+(put 'f90 'custom-loads '("f90"))
+(put 'help 'custom-loads '())
+(put 'local 'custom-loads '())
+(put 'keyboard 'custom-loads '())
+(put 'minubuffer 'custom-loads '())
+(put 'asm 'custom-loads '("asm-mode"))
+(put 'reftex-label-support 'custom-loads '("reftex"))
+(put 'message-sending 'custom-loads '())
+(put 'data 'custom-loads '())
+(put 'ps-print 'custom-loads '())
+(put 'cc-indent 'custom-loads '("cc-mode"))
+(put 'backup 'custom-loads '())
+(put 'fortran-comment 'custom-loads '("fortran"))
+(put 'outl-mouse 'custom-loads '("outl-mouse"))
+(put 'frames 'custom-loads '("rsz-minibuf"))
+(put 'customize 'custom-loads '())
+(put 'verilog 'custom-loads '("verilog-mode"))
+(put 'abbrev 'custom-loads '())
+(put 'f90-indent 'custom-loads '("f90"))
+(put 'strokes 'custom-loads '("strokes"))
+(put 'toolbar 'custom-loads '())
+(put 'compilation 'custom-loads '())
+(put 'dired 'custom-loads '())
+(put 'cc-auto 'custom-loads '("cc-mode"))
+(put 'c-macro 'custom-loads '("cmacexp"))
+(put 'killing 'custom-loads '())
+(put 'paren-blinking 'custom-loads '())
+(put 'vrml 'custom-loads '("vrml-mode"))
+(put 'find-file 'custom-loads '())
+(put 'fortran 'custom-loads '("f90" "fortran"))
+(put 'cc-mode 'custom-loads '("cc-mode"))
+(put 'gnuserv 'custom-loads '())
+(put 'maint 'custom-loads '())
+(put 'fill-comments 'custom-loads '())
+(put 'message-mail 'custom-loads '())
+(put 'windows 'custom-loads '())
+(put 'message-various 'custom-loads '())
+(put 'resize-minibuffer 'custom-loads '("rsz-minibuf"))
+(put 'languages 'custom-loads '("asm-mode" "fortran" "icon" "pascal" "prolog" "rexx-mode" "sh-script" "tcl" "verilog-mode" "vrml-mode" "xrdb-mode"))
+(put 'fill 'custom-loads '())
+(put 'debug 'custom-loads '())
+(put 'display 'custom-loads '())
+(put 'diary 'custom-loads '())
+(put 'cc-syntax 'custom-loads '("cc-mode"))
+(put 'browse-url 'custom-loads '())
+(put 'enriched 'custom-loads '("enriched"))
+(put 'processes 'custom-loads '("executable"))
+(put 'rexx 'custom-loads '("rexx-mode"))
+(put 'executable 'custom-loads '("executable"))
+(put 'message-insertion 'custom-loads '())
+(put 'hyper-apropos 'custom-loads '())
+(put 'wp 'custom-loads '("enriched"))
+(put 'vc 'custom-loads '())
+(put 'sh 'custom-loads '("sh-script"))
+(put 'alloc 'custom-loads '())
+(put 'isearch 'custom-loads '())
+(put 'modeline 'custom-loads '())
+(put 'makefile-mode 'custom-loads '("make-mode"))
+(put 'processes-basics 'custom-loads '())
+(put 'whitespace 'custom-loads '("whitespace-mode"))
+(put 'editing 'custom-loads '())
+(put 'matching 'custom-loads '("whitespace-mode"))
+(put 'ps-print-color 'custom-loads '())
+(put 'unix 'custom-loads '("sh-script"))
+(put 'undo 'custom-loads '())
+(put 'x 'custom-loads '())
+(put 'c 'custom-loads '("cc-mode" "cmacexp"))
diff -r 4de2936b4e77 -r 0132846995bd lisp/modes/xrdb-mode.el
--- a/lisp/modes/xrdb-mode.el	Mon Aug 13 09:42:28 2007 +0200
+++ b/lisp/modes/xrdb-mode.el	Mon Aug 13 09:43:35 2007 +0200
@@ -333,6 +333,7 @@
     (define-key xrdb-mode-map "\C-c>"    'xrdb-align-to)
     ))
 
+;;;###autoload
 (defun xrdb-mode ()
   "Major mode for editing xrdb config files"
   (interactive)
diff -r 4de2936b4e77 -r 0132846995bd lisp/mu/custom-load.el
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lisp/mu/custom-load.el	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,65 @@
+(put 'copyright 'custom-loads '())
+(put 'eldoc 'custom-loads '())
+(put 'execute 'custom-loads '())
+(put 'mouse 'custom-loads '())
+(put 'mail-abbrevs 'custom-loads '())
+(put 'etags 'custom-loads '())
+(put 'limits 'custom-loads '())
+(put 'minibuffer 'custom-loads '())
+(put 'environment 'custom-loads '())
+(put 'sound 'custom-loads '())
+(put 'holidays 'custom-loads '())
+(put 'auto-save 'custom-loads '())
+(put 'ispell 'custom-loads '())
+(put 'fortran-indent 'custom-loads '())
+(put 'lpr 'custom-loads '())
+(put 'message-headers 'custom-loads '())
+(put 'editing-basics 'custom-loads '())
+(put 'internal 'custom-loads '())
+(put 'calendar 'custom-loads '())
+(put 'help-appearance 'custom-loads '())
+(put 'display-time 'custom-loads '())
+(put 'lisp 'custom-loads '())
+(put 'diff 'custom-loads '())
+(put 'paren-matching 'custom-loads '())
+(put 'help 'custom-loads '())
+(put 'local 'custom-loads '())
+(put 'keyboard 'custom-loads '())
+(put 'minubuffer 'custom-loads '())
+(put 'message-sending 'custom-loads '())
+(put 'data 'custom-loads '())
+(put 'ps-print 'custom-loads '())
+(put 'backup 'custom-loads '())
+(put 'frames 'custom-loads '())
+(put 'customize 'custom-loads '())
+(put 'abbrev 'custom-loads '())
+(put 'toolbar 'custom-loads '())
+(put 'compilation 'custom-loads '())
+(put 'dired 'custom-loads '())
+(put 'killing 'custom-loads '())
+(put 'paren-blinking 'custom-loads '())
+(put 'find-file 'custom-loads '())
+(put 'gnuserv 'custom-loads '())
+(put 'maint 'custom-loads '())
+(put 'fill-comments 'custom-loads '())
+(put 'message-mail 'custom-loads '())
+(put 'windows 'custom-loads '())
+(put 'message-various 'custom-loads '())
+(put 'resize-minibuffer 'custom-loads '())
+(put 'fill 'custom-loads '())
+(put 'debug 'custom-loads '())
+(put 'display 'custom-loads '())
+(put 'diary 'custom-loads '())
+(put 'browse-url 'custom-loads '())
+(put 'message-insertion 'custom-loads '())
+(put 'hyper-apropos 'custom-loads '())
+(put 'vc 'custom-loads '())
+(put 'alloc 'custom-loads '())
+(put 'isearch 'custom-loads '())
+(put 'modeline 'custom-loads '())
+(put 'processes-basics 'custom-loads '())
+(put 'editing 'custom-loads '())
+(put 'matching 'custom-loads '())
+(put 'ps-print-color 'custom-loads '())
+(put 'undo 'custom-loads '())
+(put 'x 'custom-loads '())
diff -r 4de2936b4e77 -r 0132846995bd lisp/mule/canna.el
--- a/lisp/mule/canna.el	Mon Aug 13 09:42:28 2007 +0200
+++ b/lisp/mule/canna.el	Mon Aug 13 09:43:35 2007 +0200
@@ -5,7 +5,7 @@
 
 ;; Author: Akira Kon <kon@d1.bs2.mt.nec.co.jp>
 ;;         MORIOKA Tomohiko <morioka@jaist.ac.jp>
-;; Version: $Revision: 1.6 $
+;; Version: $Revision: 1.7 $
 ;; Keywords: Canna, Japanese, input method, mule, multilingual
 
 ;; This file is not a part of Emacs yet.
@@ -40,6 +40,7 @@
 
 ;; by $B<i2,(B $BCNI'(B <morioka@jaist.ac.jp> 1996/11/11
 (or (boundp 'CANNA)
+    (not (fboundp 'dynamic-link))
     (let ((handle (dynamic-link (expand-file-name "canna.so" exec-directory))))
       (dynamic-call "emacs_canna_init" handle))
     )
@@ -49,7 +50,7 @@
 ;; end
 
 (defconst canna-rcs-version
-  "$Id: canna.el,v 1.6 1997/04/27 19:30:30 steve Exp $")
+  "$Id: canna.el,v 1.7 1997/06/21 20:02:46 steve Exp $")
 
 (defun canna-version ()
   "Display version of canna.el in mini-buffer."
diff -r 4de2936b4e77 -r 0132846995bd lisp/mule/mule-load.el
--- a/lisp/mule/mule-load.el	Mon Aug 13 09:42:28 2007 +0200
+++ b/lisp/mule/mule-load.el	Mon Aug 13 09:43:35 2007 +0200
@@ -18,6 +18,10 @@
 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 ;; Boston, MA 02111-1307, USA.
 
+;;; Commentary:
+
+;; This file is obsoleted by dumped-lisp.el and will be removed shortly.
+
 ;; (load-gc) is defined in loadup.el
 
 ;; Load these two first, to set up the most basic stuff.
diff -r 4de2936b4e77 -r 0132846995bd lisp/oobr/auto-autoloads.el
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lisp/oobr/auto-autoloads.el	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,135 @@
+;;; DO NOT MODIFY THIS FILE
+(if (not (featurep 'oobr-autoloads))
+    (progn
+
+;;;### (autoloads (br-env-load br-env-browse) "br-env" "oobr/br-env.el")
+
+(autoload 'br-env-browse "br-env" "\
+Invoke the OO-Browser on an existing or to be created Environment ENV-FILE." t nil)
+
+(autoload 'br-env-load "br-env" "\
+Load browser Environment or spec from optional ENV-FILE or 'br-env-file'.
+Non-nil PROMPT means prompt user before building tables.
+Non-nil NO-BUILD means skip build of Environment entirely.
+Return t if load is successful, else nil." t nil)
+
+;;;***
+
+;;;### (autoloads (oo-browser) "br-start" "oobr/br-start.el")
+
+(fset 'oobr 'oo-browser)
+
+(autoload 'oo-browser "br-start" "\
+Prompt for an Environment and language over which to run the OO-Browser.
+Optional prefix argument SAME-ENV-FLAG means browse the current Environment,
+if any, without prompting.  Otherwise, if called interactively, give the user
+a choice whether to re-browse the last Environment or to browse a new one." t nil)
+
+;;;***
+
+;;;### (autoloads (br-to-from-viewer br-add-class-file) "br" "oobr/br.el")
+
+(autoload 'br-add-class-file "br" "\
+Add a file of classes to the current Environment.
+Interactively or when optional CLASS-PATH is nil, CLASS-PATH defaults to the
+current buffer file pathname.  If optional LIB-TABLE-P is non-nil, add to
+Library Environment, otherwise add to System Environment.  If optional
+SAVE-FILE is t, the Environment is then stored to the filename given by
+`br-env-file'.  If SAVE-FILE is non-nil and not t, its string value is used
+as the file to which to save the Environment." t nil)
+
+(autoload 'br-to-from-viewer "br" "\
+Move point to viewer window or back to last recorded listing window." t nil)
+
+;;;***
+
+;;;### (autoloads (c++-browse) "c++-browse" "oobr/c++-browse.el")
+
+(autoload 'c++-browse "c++-browse" "\
+Invoke the C++ OO-Browser.
+This allows browsing through C++ library and system class hierarchies.  With
+an optional non-nil prefix argument ENV-FILE, prompt for Environment file to
+use.  Alternatively, a string value of ENV-FILE is used as the Environment
+file name.  See also the file \"br-help\"." t nil)
+
+;;;***
+
+;;;### (autoloads (clos-browse) "clos-brows" "oobr/clos-brows.el")
+
+(autoload 'clos-browse "clos-brows" "\
+Invoke the CLOS OO-Browser.
+This allows browsing through CLOS library and system class hierarchies.  With
+an optional non-nil prefix argument ENV-FILE, prompt for Environment file
+to use.  Alternatively, a string value of ENV-FILE is used as the
+Environment file name.  See also the file \"br-help\"." t nil)
+
+;;;***
+
+;;;### (autoloads (eif-browse) "eif-browse" "oobr/eif-browse.el")
+
+(autoload 'eif-browse "eif-browse" "\
+Invoke the Eiffel OO-Browser.
+This allows browsing through Eiffel library and system class hierarchies.
+With an optional prefix arg ENV-FILE equal to t, prompt for Environment file
+to use.  Alternatively, a string value of ENV-FILE is used as the Environment
+file name.  See also the file \"br-help\"." t nil)
+
+;;;***
+
+;;;### (autoloads (info-browse) "info-brows" "oobr/info-brows.el")
+
+(autoload 'info-browse "info-brows" "\
+Invoke the Info OO-Browser.
+This allows browsing through Info library and system class hierarchies.  With
+an optional non-nil prefix argument ENV-FILE, prompt for Environment file to
+use.  Alternatively, a string value of ENV-FILE is used as the Environment
+file name.  See also the file \"br-help\"." t nil)
+
+;;;***
+
+;;;### (autoloads (java-browse) "java-brows" "oobr/java-brows.el")
+
+(autoload 'java-browse "java-brows" "\
+Invoke the Java OO-Browser.
+This allows browsing through Java library and system class hierarchies.  With
+an optional non-nil prefix argument ENV-FILE, prompt for Environment file to
+use.  Alternatively, a string value of ENV-FILE is used as the Environment
+file name.  See also the file \"br-help\"." t nil)
+
+;;;***
+
+;;;### (autoloads (objc-browse) "objc-brows" "oobr/objc-brows.el")
+
+(autoload 'objc-browse "objc-brows" "\
+Invoke the Objective-C OO-Browser.
+This allows browsing through Objective-C library and system class
+hierarchies.  With an optional non-nil prefix argument ENV-FILE, prompt for
+Environment file to use.  Alternatively, a string value of ENV-FILE is used
+as the Environment file name.  See also the file \"br-help\"." t nil)
+
+;;;***
+
+;;;### (autoloads (python-browse) "python-browse" "oobr/python-browse.el")
+
+(autoload 'python-browse "python-browse" "\
+Invoke the Python OO-Browser.
+This allows browsing through Python library and system class hierarchies.
+With an optional non-nil prefix argument ENV-FILE, prompt for Environment
+file to use.  Alternatively, a string value of ENV-FILE is used as the
+Environment file name.  See also the file \"br-help\"." t nil)
+
+;;;***
+
+;;;### (autoloads (smt-browse) "smt-browse" "oobr/smt-browse.el")
+
+(autoload 'smt-browse "smt-browse" "\
+Invoke the Smalltalk OO-Browser.
+This allows browsing through Smalltalk library and system class hierarchies.
+With an optional non-nil prefix argument ENV-FILE, prompt for Environment
+file to use.  Alternatively, a string value of ENV-FILE is used as the
+Environment file name.  See also the file \"br-help\"." t nil)
+
+;;;***
+
+(provide 'oobr-autoloads)
+))
diff -r 4de2936b4e77 -r 0132846995bd lisp/oobr/custom-load.el
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lisp/oobr/custom-load.el	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,65 @@
+(put 'copyright 'custom-loads '())
+(put 'eldoc 'custom-loads '())
+(put 'execute 'custom-loads '())
+(put 'mouse 'custom-loads '())
+(put 'mail-abbrevs 'custom-loads '())
+(put 'etags 'custom-loads '())
+(put 'limits 'custom-loads '())
+(put 'minibuffer 'custom-loads '())
+(put 'environment 'custom-loads '())
+(put 'sound 'custom-loads '())
+(put 'holidays 'custom-loads '())
+(put 'auto-save 'custom-loads '())
+(put 'ispell 'custom-loads '())
+(put 'fortran-indent 'custom-loads '())
+(put 'lpr 'custom-loads '())
+(put 'message-headers 'custom-loads '())
+(put 'editing-basics 'custom-loads '())
+(put 'internal 'custom-loads '())
+(put 'calendar 'custom-loads '())
+(put 'help-appearance 'custom-loads '())
+(put 'display-time 'custom-loads '())
+(put 'lisp 'custom-loads '())
+(put 'diff 'custom-loads '())
+(put 'paren-matching 'custom-loads '())
+(put 'help 'custom-loads '())
+(put 'local 'custom-loads '())
+(put 'keyboard 'custom-loads '())
+(put 'minubuffer 'custom-loads '())
+(put 'message-sending 'custom-loads '())
+(put 'data 'custom-loads '())
+(put 'ps-print 'custom-loads '())
+(put 'backup 'custom-loads '())
+(put 'frames 'custom-loads '())
+(put 'customize 'custom-loads '())
+(put 'abbrev 'custom-loads '())
+(put 'toolbar 'custom-loads '())
+(put 'compilation 'custom-loads '())
+(put 'dired 'custom-loads '())
+(put 'killing 'custom-loads '())
+(put 'paren-blinking 'custom-loads '())
+(put 'find-file 'custom-loads '())
+(put 'gnuserv 'custom-loads '())
+(put 'maint 'custom-loads '())
+(put 'fill-comments 'custom-loads '())
+(put 'message-mail 'custom-loads '())
+(put 'windows 'custom-loads '())
+(put 'message-various 'custom-loads '())
+(put 'resize-minibuffer 'custom-loads '())
+(put 'fill 'custom-loads '())
+(put 'debug 'custom-loads '())
+(put 'display 'custom-loads '())
+(put 'diary 'custom-loads '())
+(put 'browse-url 'custom-loads '())
+(put 'message-insertion 'custom-loads '())
+(put 'hyper-apropos 'custom-loads '())
+(put 'vc 'custom-loads '())
+(put 'alloc 'custom-loads '())
+(put 'isearch 'custom-loads '())
+(put 'modeline 'custom-loads '())
+(put 'processes-basics 'custom-loads '())
+(put 'editing 'custom-loads '())
+(put 'matching 'custom-loads '())
+(put 'ps-print-color 'custom-loads '())
+(put 'undo 'custom-loads '())
+(put 'x 'custom-loads '())
diff -r 4de2936b4e77 -r 0132846995bd lisp/oobr/tree-nx/English.lproj/DocWindow.nib/data.classes
--- a/lisp/oobr/tree-nx/English.lproj/DocWindow.nib/data.classes	Mon Aug 13 09:42:28 2007 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,31 +0,0 @@
-TreeController = {
-    ACTIONS = {
-	info:;
-	open:;
-    };
-    OUTLETS = {
-	treeView;
-	infoPanel;
-    };
-    SUPERCLASS = Object;
-};
-FirstResponder = {
-    ACTIONS = {
-    };
-    SUPERCLASS = Object;
-};
-TreeView = {
-    ACTIONS = {
-	setCurrButtonByName:;
-	scale:;
-	displayButByName:;
-    };
-    OUTLETS = {
-	selectedField;
-	lineList;
-	treeRoot;
-	currentButton;
-	priorButton;
-    };
-    SUPERCLASS = View;
-};
diff -r 4de2936b4e77 -r 0132846995bd lisp/oobr/tree-nx/English.lproj/DocWindow.nib/data.nib
Binary file lisp/oobr/tree-nx/English.lproj/DocWindow.nib/data.nib has changed
diff -r 4de2936b4e77 -r 0132846995bd lisp/oobr/tree-nx/English.lproj/InfoPanel.nib/data.classes
--- a/lisp/oobr/tree-nx/English.lproj/InfoPanel.nib/data.classes	Mon Aug 13 09:42:28 2007 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,14 +0,0 @@
-TreeController = {
-    ACTIONS = {
-    };
-    OUTLETS = {
-	treeView;
-	infoPanel;
-    };
-    SUPERCLASS = Object;
-};
-FirstResponder = {
-    ACTIONS = {
-    };
-    SUPERCLASS = Object;
-};
diff -r 4de2936b4e77 -r 0132846995bd lisp/oobr/tree-nx/English.lproj/InfoPanel.nib/data.nib
Binary file lisp/oobr/tree-nx/English.lproj/InfoPanel.nib/data.nib has changed
diff -r 4de2936b4e77 -r 0132846995bd lisp/oobr/tree-nx/English.lproj/TreeView.nib/data.classes
--- a/lisp/oobr/tree-nx/English.lproj/TreeView.nib/data.classes	Mon Aug 13 09:42:28 2007 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,56 +0,0 @@
-TreeButton = {
-    ACTIONS = {
-    };
-    OUTLETS = {
-	myTreeNode;
-    };
-    SUPERCLASS = Button;
-};
-TreeController = {
-    ACTIONS = {
-	info:;
-	open:;
-    };
-    OUTLETS = {
-	infoPanel;
-	openMenuItem;
-	treeView;
-    };
-    SUPERCLASS = Object;
-};
-Tree = {
-    ACTIONS = {
-    };
-    OUTLETS = {
-	label;
-	branches;
-    };
-    SUPERCLASS = Object;
-};
-FirstResponder = {
-    ACTIONS = {
-    };
-    SUPERCLASS = Object;
-};
-String = {
-    ACTIONS = {
-	setStringValue:;
-	concatenate:;
-    };
-    OUTLETS = {
-    };
-    SUPERCLASS = Object;
-};
-TreeView = {
-    ACTIONS = {
-	setCurrButtonByName:;
-	scale:;
-    };
-    OUTLETS = {
-	treeRoot;
-	lineList;
-	priorButton;
-	currentButton;
-    };
-    SUPERCLASS = View;
-};
diff -r 4de2936b4e77 -r 0132846995bd lisp/oobr/tree-nx/English.lproj/TreeView.nib/data.nib
Binary file lisp/oobr/tree-nx/English.lproj/TreeView.nib/data.nib has changed
diff -r 4de2936b4e77 -r 0132846995bd lisp/oobr/tree-nx/History.rtf
--- a/lisp/oobr/tree-nx/History.rtf	Mon Aug 13 09:42:28 2007 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,74 +0,0 @@
-{\rtf0\ansi{\fonttbl\f0\fswiss Helvetica;\f2\fmodern Courier;\f1\fmodern Ohlfs;}
-\paperw9840
-\paperh11200
-\margl120
-\margr120
-\pard\tx520\tx1060\tx1600\tx2120\tx2660\tx3200\tx3720\tx4260\tx4800\tx5320\f0\b0\i0\ulnone\fs24\fc0\cf0 \
-Here's why this thing exists.  You'll notice from the dates that it's taken me quite a while to get around to actually doing this; it ended up being quite simple to get it put together.  (What took me so long is the fact that in the meantime I had to write a simple optimizing compiler for one of my classes, and only had three weeks to do it in.)  The tree object just happens to be an enhancement of the object I used/subclassed to build the parse tree in the aforementioned compiler, so I know that the Tree class can be useful, at any rate.\
-\
-The other classes in here won't be particularly useful to most folks, but there are examples of (1) multiple .nib files, (2) simple use of multiple documents�notice that I don't track multiple instances except as I open them, so the Windows menu and the user's mouse clicks do all the work here�I didn't really have to do anything special to get it to work, in other words, since NeXTSTEP does this for me.  There's also examples of using an Open Panel and of getting the WorkSpace to open double-clicked documents.  All this stuff is easy to do anyway, but I suppose that this program could serve as an example for the beginner.\
-\
-As you'll notice from below, the main thing to show is how to use PostScript to draw lines and how to display the tree.  For most folks, the Tree object�and not this part�will be useful, but it's all in there with everything else for you to look at.  You'll notice that I took the simplest and least efficient route to implement the drawing, thus it should make sense to a beginner.  For better performance, other methods (described in the Adobe Purple book primarily) could be used.  I figured that simply calling the PS() functions would be good enough here, but ideally a PS wrap or better would be used.  Also, I redraw the entire View  every time even though I should really check the arguments to -drawSelf:: so that only the necessary parts get redrawn.  Although that would improve performance, it wasn't worth bothering with for this program.\
-\
-My notes about the program are included in the message below in 
-\i italics
-\i0 .\
-\
-
-Date: Thu, 18 Mar 93 19:01:39 -0500\
-From: Bob Weiner <weiner@pts.mot.com>\
-Message-Id: <9303190001.AA02300@info.>\
-To: yackd@maine.et.byu.edu\
-In-Reply-To: Don Yacktman's message of Thu, 18 Mar 93 16:34:14 -0700 <9303182334.AA29304@maine.et.byu.edu>\
-Subject: Re: Anyone have a tree display class that can read a tree from a text file?\
-Status: R\
-
-\f0\fs24 \
-\
-The tree class could read in a tree from\
-a file in textual form.  The first line is the name of the tree.\
-In textual form, each node in the tree is given by its label, which can be\
-any text, including spaces on a single line.  The node's position in the tree\
-is given by its preceding indentation, normally using 3 spaces of indentation\
-per level (the amount can be figured out by examining the first indented\
-label and counting its spaces.  An example:\
-\
-
-\f2 Tree Name\
-Root\
-   Node 1\
-      Node 1.1\
-         Node 1.1.1\
-   Node 2 has this longer label.\
-
-\f0 \
-
-\i I read in the first two lines with the assumption that there is no indentation.  On the third line, I use the number of spaces to determine the indent.  Do not use tabs; I didn't bother to write code which can deal with them.  Be sure that the file ends with ".tree" so that the app will load it.  If you make the file incorrectly, you will cause weird things to happen, since I didn't bother to do much error checking while parsing.  Obviously, for this program to be more "useful" that ought to be rectified.\
-
-\i0 \
-After the tree is read in, it is displayed within a new view.  Each node is\
-created as a selectable button with the appropriate label and lines\
-connecting it to its parent and children.  (Let's assume only one button can\
-be selected at a time.)\
-\
-
-\i For simplicity's sake, all buttons are the same size.  If  the node's label is really long or really short, this might cause a problem.  The View would have to do tricky calculations in order to do better, and I deamed this a "not worth bothering with" thing.\
-
-\i0 \
-When a button is selected, a string consisting of the tree name and the node\
-selected is sent to an output stream.  (stdout is fine as a default.), e.g.\
-\
-	Tree Name^^Node 1.1 \
-\
-could be output with ^^ indicating separation of the two arguments.\
-\
-
-\i This is what I do.  If launched from Workspace, look for the text in the Console window, which is where stdout goes to.  It would probably be better to have a UI "Console" window for this output and allow the user to select a file to "save" to, but it wasn't worth the effort to this this here, easy though it is.\
-
-\i0 \
-That's it.  Then my other program takes this standard output and displays\
-text associated with the selected node.\
-\
-\
-
-}
diff -r 4de2936b4e77 -r 0132846995bd lisp/oobr/tree-nx/Line.h
--- a/lisp/oobr/tree-nx/Line.h	Mon Aug 13 09:42:28 2007 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,13 +0,0 @@
-
-#import <appkit/appkit.h>
-
-@interface Line:Object
-{
-	NXPoint start;
-	NXPoint end;
-}
-
-- setStart:(NXPoint *)s end:(NXPoint *)e;
-- render;
-
-@end
diff -r 4de2936b4e77 -r 0132846995bd lisp/oobr/tree-nx/Line.m
--- a/lisp/oobr/tree-nx/Line.m	Mon Aug 13 09:42:28 2007 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,23 +0,0 @@
-
-#import "Line.h"
-
-@implementation Line
-
-- setStart:(NXPoint *)s end:(NXPoint *)e
-{
-	start.x = s->x;
-	start.y = s->y;
-	end.x = e->x;
-	end.y = e->y;
-	return self;
-}
-
-- render
-{
-	PSmoveto(start.x, start.y);
-	PSlineto(end.x, end.y);
-	PSstroke();
-	return self;
-}
-
-@end
diff -r 4de2936b4e77 -r 0132846995bd lisp/oobr/tree-nx/Makefile
--- a/lisp/oobr/tree-nx/Makefile	Mon Aug 13 09:42:28 2007 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,50 +0,0 @@
-#
-# Generated by the NeXT Project Builder.
-#
-# NOTE: Do NOT change this file -- Project Builder maintains it.
-#
-# Put all of your customizations in files called Makefile.preamble
-# and Makefile.postamble (both optional), and Makefile will include them.
-#
-
-NAME = TreeView
-
-PROJECTVERSION = 1.1
-LANGUAGE = English
-
-APPICON = Tree.tiff
-DOCICONS = Tree2.tiff
-
-LOCAL_RESOURCES = DocWindow.nib InfoPanel.nib TreeView.nib
-
-CLASSES = Line.m NamedTree.m String.m Tree.m TreeButton.m TreeButtonCell.m \
-          TreeController.m TreeView.m
-
-HFILES = Line.h NamedTree.h String.h Tree.h TreeButton.h TreeButtonCell.h \
-         TreeController.h TreeView.h
-
-MFILES = TreeView_main.m
-
-OTHERSRCS = Makefile
-
-
-MAKEFILEDIR = /NextDeveloper/Makefiles/app
-INSTALLDIR = /LocalApps
-INSTALLFLAGS = -c -s -m 755
-SOURCEMODE = 444
-
-ICONSECTIONS =	-sectcreate __ICON app Tree.tiff \
-		-sectcreate __ICON Tree2 Tree2.tiff
-
-LIBS = -lMedia_s -lNeXT_s
-DEBUG_LIBS = $(LIBS)
-PROF_LIBS = $(LIBS)
-
-
--include Makefile.preamble
-
-include $(MAKEFILEDIR)/app.make
-
--include Makefile.postamble
-
--include Makefile.dependencies
diff -r 4de2936b4e77 -r 0132846995bd lisp/oobr/tree-nx/NamedTree.h
--- a/lisp/oobr/tree-nx/NamedTree.h	Mon Aug 13 09:42:28 2007 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,38 +0,0 @@
-//
-//	NamedTree.h -- a generic class to build tree data structures
-//		This class requires the String class, also by Don Yacktman.
-//		Written by Don Yacktman (c) 1993 by Don Yacktman.
-//				All rights reserved.
-//
-//	This Tree subclass allows an entire tree to be given a name, other than
-//		the root node's name.
-//
-//		You may use and copy this class freely as long as you
-//		comply with the following terms:
-//			(1) If you use this class in an application which you
-//				intend to sell commercially, as shareware, or otherwise,
-//				you may only do so with express written permission
-//				of the author.  Use in applications which will
-//				be distributed free of charge is encouraged.
-//			(2) You must include the source code to this object and
-//				all accompanying documentation with your application,
-//				or provide it to users if requested, free of charge.
-//			(3) Do not remove the author's name or any of the
-//				copyright notices
-//
-
-#import "Tree.h" 	// superclass is in there
-
-@interface NamedTree:Tree
-{
-	id treeName;	// a String object that all nodes should point to
-}
-
-// set and retrieve the tree's name
-- setTreeName:string;
-- (const char *)treeName;
-
-- act:sender;            // action performed when node is activated
-- activateNode:sender;	 // message sent to "activate" the node
-
-@end
diff -r 4de2936b4e77 -r 0132846995bd lisp/oobr/tree-nx/NamedTree.m
--- a/lisp/oobr/tree-nx/NamedTree.m	Mon Aug 13 09:42:28 2007 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,54 +0,0 @@
-//
-//	NamedTree.m -- a generic class to build tree data structures
-//		This class requires the String class, also by Don Yacktman.
-//		Written by Don Yacktman (c) 1993 by Don Yacktman.
-//				All rights reserved.
-//
-//		You may use and copy this class freely as long as you
-//		comply with the following terms:
-//			(1) If you use this class in an application which you
-//				intend to sell commercially, as shareware, or otherwise,
-//				you may only do so with express written permission
-//				of the author.  Use in applications which will
-//				be distributed free of charge is encouraged.
-//			(2) You must include the source code to this object and
-//				all accompanying documentation with your application,
-//				or provide it to users if requested, free of charge.
-//			(3) Do not remove the author's name or any of the
-//				copyright notices
-//
-
-#import "NamedTree.h"
-#import "TreeView.h"
-
-@implementation NamedTree
-
-- setTreeName:string { treeName = string; return self; }
-- (const char *)treeName { return [treeName stringValue]; }
-
-- activateNode:sender
-{
-//        int     msgDelivered;
-
-	// this action message is sent whenever the button associated with
-	// this node is clicked by the user.
-	[[sender superview] setCurrentButton:sender];
-        [self act:sender];
-	return self;
-}
-
-- act:sender
-{
-	const char* nodeVal = [((value) ? value : label) stringValue];
-
-	printf("%s^^%s^^%s\n", [self treeName], "br-edit", nodeVal);
-//	msgDelivered = [[NXApp appSpeaker] selectorRPC:"nxBrowserMsg"
-//			             paramTypes:"ccc",
-//			             [self treeName], "br-edit", nodeVal];
-//	if (msgDelivered != 0)
-//	  fprintf(stderr, "Class display request not accepted.\n");
-
-	return self;
-}
-
-@end
diff -r 4de2936b4e77 -r 0132846995bd lisp/oobr/tree-nx/PB.gdbinit
--- a/lisp/oobr/tree-nx/PB.gdbinit	Mon Aug 13 09:42:28 2007 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,7 +0,0 @@
-#
-# Generated by the NeXT Project Builder.
-#
-# NOTE: Do NOT change this file -- Project Builder maintains it.
-#
-view
-
diff -r 4de2936b4e77 -r 0132846995bd lisp/oobr/tree-nx/PB.project
--- a/lisp/oobr/tree-nx/PB.project	Mon Aug 13 09:42:28 2007 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,26 +0,0 @@
-INSTALLDIR = /LocalApps;
-APPICON = Tree.tiff;
-GENERATEMAIN = YES;
-DOCICONFILES = (Tree2.tiff);
-FILESTABLE = {
-    OTHER_LIBS = (Media_s, NeXT_s);
-    CLASSES = (Line.m, NamedTree.m, String.m, Tree.m, TreeButton.m, TreeButtonCell.m, TreeController.m, TreeView.m);
-    OTHER_SOURCES = (Makefile);
-    H_FILES = (Line.h, NamedTree.h, String.h, Tree.h, TreeButton.h, TreeButtonCell.h, TreeController.h, TreeView.h);
-    INTERFACES = (DocWindow.nib, InfoPanel.nib, TreeView.nib);
-    OTHER_LINKED = ();
-    M_FILES = (TreeView_main.m);
-};
-APPCLASS = Application;
-MAINNIB = TreeView;
-DOCEXTENSIONS = (tree);
-PROJECTTYPE = Application;
-PROJECTVERSION = 1.1;
-LOCALIZABLE_FILES = {
-    InfoPanel.nib;
-    TreeView.nib;
-    DocWindow.nib;
-};
-PROJECTNAME = TreeView;
-SYSTEMEXTENSIONS = ();
-LANGUAGE = English;
diff -r 4de2936b4e77 -r 0132846995bd lisp/oobr/tree-nx/README.rtf
--- a/lisp/oobr/tree-nx/README.rtf	Mon Aug 13 09:42:28 2007 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,24 +0,0 @@
-{\rtf0\ansi{\fonttbl\f0\fswiss Helvetica;\f1\fmodern Ohlfs;}
-\paperw9840
-\paperh14020
-\margl120
-\margr120
-\pard\tx520\tx1060\tx1600\tx2120\tx2660\tx3200\tx3720\tx4260\tx4800\tx5320\f0\b0\i0\ulnone\fs24\fc0\cf0 \
-
-\fs36 This program is released under the terms of the GNU General Public License.  Do what you want with it.\
-
-\fs24 \
-See the History.rtf file to see what this program is all about.\
-\
-To run, launch it from the Workspace and have it read in a .tree file (format is in ascii, as described in History.rtf).  The tree will be displayed graphically.  Click on a button to activate a node.  When a node gets sent an activation message, it prints it's contents to stdout, which means that you will see feedback in the WorkSpace Console.\
-\
-And that's all there is.  This program mainly serves as a programming example and a way to make available a generic Tree class.  The Tree class is particularly useful for building parse trees, and subclasses could easily be made to create a recursive pretty-printer automatically.  (I have used the Tree class in an optimizing compiler which deals with a subset of Pascal, and the Tree did pretty printing and three-address code generation automatically by just sending the appropriate message to the root node.  It worked out quite nicely.  Each subclass corresponded to a different type of programming construct�)  Also of note is the way I use a List as a display List for the line objects.  Any type of object that can render itself could be placed in that list, which is part of how my gamekit deals with multiple types of sprites...  and in the file parsing is an example of how a List object can be used as a stack.  (It could be used as a queue, too, if you think about it.  Quite a nifty object IMHO.)\
-\
-If you have any questions, requests, whatever, feel free to contact me.\
-\
-\
-Don_Yacktman@byu.edu\
-\
-\
-\
-}
diff -r 4de2936b4e77 -r 0132846995bd lisp/oobr/tree-nx/String.h
--- a/lisp/oobr/tree-nx/String.h	Mon Aug 13 09:42:28 2007 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,92 +0,0 @@
-//
-//	String.h -- a generic class to simplify manipulation of (char *)'s
-//		Written by Don Yacktman (c) 1993 by Don Yacktman.
-//				Version 1.1.  All rights reserved.
-//
-//		You may use and copy this class freely as long as you
-//		comply with the following terms:
-//			(1) If you use this class in an application which you
-//				intend to sell commercially, as shareware, or otherwise,
-//				you may only do so with express written permission
-//				of the author.  Use in applications which will
-//				be distributed free of charge is encouraged.
-//			(2) You must include the source code to this object and
-//				all accompanying documentation with your application,
-//				or provide it to users if requested, free of charge.
-//			(3) Do not remove the author's name or any of the
-//				copyright notices
-//
-
-#import <appkit/appkit.h>
-
-@interface String:Object
-{
-	 char *buffer;
-	 NXStringOrderTable *orderTable;
-	 int length, _length;
-}
-
-// basic allocation, deallocation methods
-- init;
-- initString:(const char *)aString;
-- allocateBuffer:(int)size;
-- allocateBuffer:(int)size fromZone:(NXZone *)zone;
-- read:(NXTypedStream *)stream;
-- write:(NXTypedStream *)stream;
-- freeString;
-- free;
-
-// strcpy(), strlen() covers 
-- copyFromZone:(NXZone *)zone; // a -copy message calls this.
-- setString:(const char *)aString;
-- setString:(const char *)aString fromZone:(NXZone *)zone;
-- setStringValue:sender;
-- setStringValue:sender fromZone:(NXZone *)zone;
-- (const char *)stringValue;
-- (int)length;
-
-// strcat(), strncat() covers
-- concatenate:sender;
-- concatenate:sender n:(int)n;
-- concatenate:sender fromZone:(NXZone *)zone;
-- concatenate:sender n:(int)n fromZone:(NXZone *)zone;
-- cat:(const char *)aString;
-- cat:(const char *)aString n:(int)n;
-- cat:(const char *)aString fromZone:(NXZone *)zone;
-- cat:(const char *)aString n:(int)n fromZone:(NXZone *)zone;
-
-// index(), rindex() covers
-- (const char *)rindex:(char)aChar;
-- (const char *)index:(char)aChar;
-
-// strcmp(), strncmp(), strcasecmp(), strncasecmp() covers
-- setStringOrderTable:(NXStringOrderTable *)table;
-- (NXStringOrderTable *)stringOrderTable;
-- (BOOL)isEqual:anObject;
-- (int)compareTo:sender;
-- (int)compareTo:sender n:(int)n;
-- (int)compareTo:sender caseSensitive:(BOOL)sense;
-- (int)compareTo:sender n:(int)n caseSensitive:(BOOL)sense;
-- (int)cmp:(const char *)aString;
-- (int)cmp:(const char *)aString n:(int)n;
-- (int)casecmp:(const char *)aString;
-- (int)casecmp:(const char *)aString n:(int)n;
-- (const char *)strstr:(const char *)subString;
-
-// like BASIC's left$(), right$(), and mid$(); all return a new instance.
-- left:(int)count;
-- right:(int)count;
-- midFrom:(int)start to:(int)end;
-- midFrom:(int)start length:(int)len;
-- left:(int)count fromZone:(NXZone *)zone;
-- right:(int)count fromZone:(NXZone *)zone;
-- midFrom:(int)start to:(int)end fromZone:(NXZone *)zone;
-- midFrom:(int)start length:(int)len fromZone:(NXZone *)zone;
-- subStringRight:subString;
-- subStringLeft:subString;
-
-// private methods: do not use these!
-- _unhookBuffer;
-
-
-@end
diff -r 4de2936b4e77 -r 0132846995bd lisp/oobr/tree-nx/String.m
--- a/lisp/oobr/tree-nx/String.m	Mon Aug 13 09:42:28 2007 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,376 +0,0 @@
-//
-//	String.m -- a generic class to simplify manipulation of (char *)'s
-//		Written by Don Yacktman (c) 1993 by Don Yacktman.
-//				Version 1.1.  All rights reserved.
-//
-//		You may use and copy this class freely as long as you
-//		comply with the following terms:
-//			(1) If you use this class in an application which you
-//				intend to sell commercially, as shareware, or otherwise,
-//				you may only do so with express written permission
-//				of the author.  Use in applications which will
-//				be distributed free of charge is encouraged.
-//			(2) You must include the source code to this object and
-//				all accompanying documentation with your application,
-//				or provide it to users if requested, free of charge.
-//			(3) Do not remove the author's name or any of the
-//				copyright notices
-//
-
-#import "String.h"
-#import <strings.h>
-#import <appkit/appkit.h>
-
-@implementation String
-
-- init
-{
-	 [super init];
-	 [self setStringOrderTable:NXDefaultStringOrderTable()];
-	 buffer = NULL;
-	 length = 0;
-	 _length = 0;
-	 return self;
-}
-
-- initString:(const char *)aString
-{
-	[self init];
-	return [self setString:aString];
-}
-
-- setStringOrderTable:(NXStringOrderTable *)table
-{
-	orderTable = table;
-	return self;
-}
-
-- (NXStringOrderTable *)stringOrderTable
-{
-	return orderTable;
-}
-
-- allocateBuffer:(int)size
-{
-	return [self allocateBuffer:size fromZone:[self zone]];
-}
-
-- allocateBuffer:(int)size fromZone:(NXZone *)zone
-{
-	if (size <= _length) return self;
-	[self freeString];
-	buffer = (char *)NXZoneMalloc(zone, size);
-	buffer[0] = 0;
-	_length = size;
-
-	return self;
-}
-
-- setString:(const char *)aString
-{
-	return [self setString:aString fromZone:[self zone]];
-}
-
-- setString:(const char *)aString fromZone:(NXZone *)zone
-{
-	if (!aString) return self;
-	// Note that I could have used NXCopyStringBufferFromZone() here
-	// instead.  This works just as well, but it may be slower...
-	// I haven't checked that out, though.  It might be worth doing.
-	[self allocateBuffer:strlen(aString)+1 fromZone:zone];
-	strcpy(buffer, aString);
-	length = strlen(buffer);
-	return self;
-}
-
-- setStringValue:sender
-{
-	if (![sender respondsTo:@selector(stringValue)]) return self;
-	return [self setString:[sender stringValue] fromZone:[self zone]];
-}
-
-- setStringValue:sender fromZone:(NXZone *)zone
-{
-	if (![sender respondsTo:@selector(stringValue)]) return self;
-	return [self setString:[sender stringValue] fromZone:zone];
-}
-
-- (const char *)stringValue
-{
-	return buffer;
-}
-
-- read:(NXTypedStream *)stream
-{
-	char *tmpStr;
-	[super read:stream];
-	NXReadType(stream, "i", &_length);
-	tmpStr = (char *)malloc(_length + 1);
-	NXReadType(stream, "*", &tmpStr);
-	[self setString:tmpStr fromZone:[self zone]];
-	free(tmpStr);
-	return self;
-}
-
-- write:(NXTypedStream *)stream
-{
-	[super write:stream];
-	NXWriteTypes(stream, "i*", &_length, &buffer);
-	return self;
-}
-
-- copyFromZone:(NXZone *)zone
-{
-	String *myCopy = [super copyFromZone:zone];
-	// force child to have it's own copy of the string buffer
-	[myCopy _unhookBuffer];
-	[myCopy allocateBuffer:_length fromZone:zone];
-	[myCopy setString:buffer fromZone:zone];
-	return myCopy;
-}
-
-- _unhookBuffer
-{ // used by the copy method so that we don't free the buffer from orig. 
-	buffer = NULL; _length = 0;
-	return self;
-}
-
-- freeString
-{
-	if(buffer) free(buffer);
-	buffer = NULL;
-	length = 0;
-	_length = 0;
-	return self;
-}
-
-- free
-{
-	 [self freeString];
-	 return [super free];
-}
-
-- cat:(const char *)aString
-{
-	return [self cat:aString
-				 n:strlen(aString)
-				 fromZone:[self zone]];
-}
-
-- cat:(const char *)aString n:(int)n
-{
-	return [self cat:aString n:n fromZone:[self zone]];
-}
-
-- cat:(const char *)aString fromZone:(NXZone *)zone
-{
-	return [self cat:aString n:strlen(aString) fromZone:zone];
-}
-
-- cat:(const char *)aString n:(int)n fromZone:(NXZone *)zone
-{
-	char *newBuffer; int newSize;
-	newSize = length + n + 1;
-	if (newSize > _length) {
-		newBuffer = (char *)NXZoneMalloc(zone, newSize);
-		_length = newSize;
-		newBuffer[0] = '\0';
-		strcat(newBuffer, buffer);
-		strncat(newBuffer, aString, n);
-		free(buffer);
-		buffer = newBuffer;
-	} else  strncat(buffer, aString, n);
-	length = strlen(buffer);
-	return self;
-}
-
-- concatenate:sender
-{
-	if (![sender respondsTo:@selector(stringValue)]) return self;
-	return [self cat:[sender stringValue]
-				 n:strlen([sender stringValue])
-				 fromZone:[self zone]];
-}
-
-- concatenate:sender n:(int)n
-{
-	if (![sender respondsTo:@selector(stringValue)]) return self;
-	return [self cat:[sender stringValue] n:n fromZone:[self zone]];
-}
-
-- concatenate:sender fromZone:(NXZone *)zone
-{
-	if (![sender respondsTo:@selector(stringValue)]) return self;
-	return [self cat:[sender stringValue]
-			n:strlen([sender stringValue]) fromZone:zone];
-}
-
-- concatenate:sender n:(int)n fromZone:(NXZone *)zone
-{
-	if (![sender respondsTo:@selector(stringValue)]) return self;
-	return [self cat:[sender stringValue] n:n fromZone:zone];
-}
-
-- (const char *)rindex:(char)aChar
-{
-	return rindex(buffer, aChar);
-}
-
-- (const char *)index:(char)aChar
-{
-	return index(buffer, aChar);
-}
-
-- (const char *)strstr:(const char *)subString
-{
-	return strstr(buffer, subString);
-}
-
-- subStringRight:subString
-{
-	const char *sub;
-	if ([subString respondsTo:@selector(stringValue)])
-		sub = [subString stringValue];
-	else return nil;	// error if can't get string value
-	return [[String allocFromZone:[self zone]]
-			initString:strstr(buffer, sub)];
-}
-
-- subStringLeft:subString
-{
-	const char *sub;
-	char *tempString = NXCopyStringBufferFromZone(buffer, [self zone]);
-	char *temp2;
-	id retVal = [String alloc];
-	
-	if ([subString respondsTo:@selector(stringValue)])
-		sub = [subString stringValue];
-	else return nil;	// error if can't get string value
-	temp2 = strstr(tempString, sub); 
-	if (temp2) {
-		temp2[0] = '\0';	// terminate it early
-		[retVal initString:tempString];
-	} else { // substring not found
-		return [self copy];
-	}
-	free(tempString);
-	return retVal;
-}
-
-- (int)length
-{
-	return length;
-}
-
-- (BOOL)isEqual:anObject
-{
-	if (anObject == self) return YES;
-	// doesn't have to be a String object to be equal...
-	if ([anObject respondsTo:@selector(stringValue)]) {
-		if (!NXOrderStrings(buffer, [anObject stringValue],
-				YES, -1, orderTable)) return YES;
-	}
-	return NO;
-}
-
-- (int)compareTo:sender
-{
-	return [self compareTo:sender n:(-1) caseSensitive:YES];
-}
-
-- (int)compareTo:sender n:(int)n
-{
-	return [self compareTo:sender n:n caseSensitive:YES];
-}
-
-- (int)cmp:(const char *)aString
-{
-	return strcmp(buffer, aString);
-}
-
-- (int)cmp:(const char *)aString n:(int)n
-{
-	return strncmp(buffer, aString, n);
-}
-
-- (int)compareTo:sender caseSensitive:(BOOL)sense
-{
-	return [self compareTo:sender n:(-1) caseSensitive:sense];
-}
-
-- (int)compareTo:sender n:(int)n caseSensitive:(BOOL)sense
-{
-	if (![sender respondsTo:@selector(stringValue)]) return 1; // !=
-	return NXOrderStrings(buffer, [sender stringValue], sense, n, orderTable);
-}
-
-- (int)casecmp:(const char *)aString
-{
-	return strcasecmp(buffer, aString);
-}
-
-- (int)casecmp:(const char *)aString n:(int)n
-{
-	return strncasecmp(buffer, aString, n);
-}
-
-- left:(int)count
-{
-	return [self left:count fromZone:[self zone]];
-}
-
-- right:(int)count
-{
-	return [self right:count fromZone:[self zone]];
-}
-
-- midFrom:(int)start to:(int)end
-{
-	return [self midFrom:start to:end fromZone:[self zone]];
-}
-
-- midFrom:(int)start length:(int)len
-{
-	return [self midFrom:start length:len fromZone:[self zone]];
-}
-
-- left:(int)count fromZone:(NXZone *)zone
-{
-	char smash = buffer[count];
-	id newString = [[String allocFromZone:zone] init];
-	buffer[count] = '\0';
-	[newString setString:buffer fromZone:zone];
-	buffer[count] = smash;
-	return newString;
-}
-
-- right:(int)count fromZone:(NXZone *)zone
-{
-	id newString = [[String allocFromZone:zone] init];
-	[newString setString:&buffer[length - count] fromZone:zone];
-	return newString;
-}
-
-- midFrom:(int)start to:(int)end fromZone:(NXZone *)zone
-{
-	char smash = buffer[end];
-	id newString = [[String allocFromZone:zone] init];
-	buffer[end] = '\0'; // inclusive; end-1 is not.
-	[newString setString:&buffer[start - 1] fromZone:zone];
-	buffer[end] = smash;
-	return newString;
-}
-
-- midFrom:(int)start length:(int)len fromZone:(NXZone *)zone
-{
-	register int spot = start + len - 1;
-	char smash = buffer[spot];
-	id newString = [[String allocFromZone:zone] init];
-	buffer[spot] = '\0';
-	[newString setString:&buffer[start - 1] fromZone:zone];
-	buffer[spot] = smash;
-	return newString;
-}
-
-
-@end
diff -r 4de2936b4e77 -r 0132846995bd lisp/oobr/tree-nx/Test.tree
--- a/lisp/oobr/tree-nx/Test.tree	Mon Aug 13 09:42:28 2007 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,21 +0,0 @@
-Tree Name
-Root
-   Node 1
-      Node 1.1
-         Node 1.1.1
-         Node 1.1.2
-         Node 1.1.3
-      Node 1.2
-      Node 1.3
-   Node 2 has this longer label.
-   Node 3 has this label.
-      Node 3.1
-      Node 3.2
-         Node 3.2.1
-         Node 3.2.2
-         Node 3.2.3
-            Node 3.2.3.1
-            Node 3.2.3.2
-      Node 3.3
-      Node 3.4
-   Node 4 has a label.
diff -r 4de2936b4e77 -r 0132846995bd lisp/oobr/tree-nx/Tree.h
--- a/lisp/oobr/tree-nx/Tree.h	Mon Aug 13 09:42:28 2007 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,84 +0,0 @@
-//
-//	Tree.h -- a generic class to build tree data structures
-//		This class requires the String class, also by Don Yacktman.
-//		Written by Don Yacktman (c) 1993 by Don Yacktman.
-//				All rights reserved.
-//
-//	Subclasses should be designed to hold more data than just children and
-// 		a String-based label...That's where the usefulness of the class
-//		becomes apparent.  By using a list, any number of children is ok.
-//
-//		You may use and copy this class freely as long as you
-//		comply with the following terms:
-//			(1) If you use this class in an application which you
-//				intend to sell commercially, as shareware, or otherwise,
-//				you may only do so with express written permission
-//				of the author.  Use in applications which will
-//				be distributed free of charge is encouraged.
-//			(2) You must include the source code to this object and
-//				all accompanying documentation with your application,
-//				or provide it to users if requested, free of charge.
-//			(3) Do not remove the author's name or any of the
-//				copyright notices
-//
-
-#import <appkit/appkit.h> 	// superclass is in there
-#import <stdio.h>
-#import "String.h"
-
-@interface Tree:Object
-{
-	id branches;	// an instance of the list class
-	id label;	// node name
-	id value;       // must be a string
-	BOOL notCollapsed;	// print children when dumping if true.
-}
-
-
-// init with null label
-- init;
-
-// designated initializer
-- initLabel:(const char *)newLabel;	// send a char* string
-- initLabelString:string;		// send a String object
-
-// access to the label of this node
-- setLabel:(const char *)newLabel;      // send a char* string
-- (const char *)label;
-
-// access to the value of this node
-- setValue:newValue;                    // send a String object
-- (const char *)value;
-
-// clean up our mess
-- free;
-
-// add a new child node
-- addBranch:child;
-
-// Print the tree to a stream (file, whatever).  Call the root with level
-// set to zero, and set the indent string however you like; the indent
-// string should be something like "  " or "\t" to show how to indent to
-// the next level.  This method recursively traverses the tree's children.
-- dumpTree:(NXStream *)file level:(int)lev indent:(const char *)ind;
-
-// set whether or not we print the children (we don't if collapsed)
-// when dumping.  This does NOT affect the tree's width or depth!
-- collapse;
-- uncollapse;
-- (BOOL)collapsed;
-
-// when dumping the tree, if you want to add extra data to the output
-// before the newline and before children are printed, add it here.  If
-// you return NO, then the children won't be printed; this is how the
-// collapse stuff works.
-- (BOOL)moreData:(NXStream *)file level:(int)lev indent:(const char *)ind;
-
-// How deep or wide is the tree?
-- (int) width;
-- (int) depth;
-
-// Return the List object that contains ids of all the kids.
-- branches;
-
-@end
diff -r 4de2936b4e77 -r 0132846995bd lisp/oobr/tree-nx/Tree.m
--- a/lisp/oobr/tree-nx/Tree.m	Mon Aug 13 09:42:28 2007 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,148 +0,0 @@
-//
-//	Tree.m -- a generic class to build tree data structures
-//		This class requires the String class, also by Don Yacktman.
-//		Written by Don Yacktman (c) 1993 by Don Yacktman.
-//				All rights reserved.
-//
-//		You may use and copy this class freely as long as you
-//		comply with the following terms:
-//			(1) If you use this class in an application which you
-//				intend to sell commercially, as shareware, or otherwise,
-//				you may only do so with express written permission
-//				of the author.  Use in applications which will
-//				be distributed free of charge is encouraged.
-//			(2) You must include the source code to this object and
-//				all accompanying documentation with your application,
-//				or provide it to users if requested, free of charge.
-//			(3) Do not remove the author's name or any of the
-//				copyright notices
-//
-
-#import "Tree.h"
-
-@implementation Tree
-
-- init			// special init for this class
-{
-	[self initLabel:""];
-	return self;
-}
-
-- initLabel:(const char *)newLabel
-{
-	[super init];
-	notCollapsed = YES;
-	// set up a list class to hold pointers to other Tree objects (branches).
-	branches = [[List alloc] init];	// make a dynamic-sized array of objects
-	label = [[String alloc] init];	// make a string for the label
-	[label setString:newLabel];
-	return self;
-}
-
-- initLabelString:string	// send in a String object
-{
-	[self init];
-	if (label) [label free];
-	label = string;
-	return self;
-}
-
-- setLabel:(const char *)newLabel
-{
-	[label setString:newLabel];
-	return self;
-}
-
-- setValue:newValue
-{
-	if (value) [value free];
-	value = newValue;
-	return self;
-}
-
-- free			// clean up our mess
-{
-	[branches freeObjects];	// free the branches we're responsible for
-	// (I assumed that each branch only has one parent...if that's not
-	// the case, then the above line should be axed.)
-	[branches free];		// get rid of the List object
-	return [super free];
-}
-
-- addBranch:child	// add a new child node
-{	// add to the end of the "branches" List object
-	return [branches addObject:child];
-}
-
-- dumpTree:(NXStream *)file level:(int)lev indent:(const char *)ind
-{
-	int i; BOOL doKids;
-	
-	for (i=0; i<lev; i++) NXPrintf(file, "%s", ind);	// indent
-	NXPrintf(file, "%s", [label stringValue]);		// and print label
-	doKids = [self moreData:file level:lev indent:ind];
-	NXPrintf(file, "\n");		       			// print newline
-	if (doKids)
-		for (i=0; i<[branches count]; i++)		// then do children
-			[[branches objectAt:i]
-			 dumpTree:file level:(lev + 1) indent:ind];
-	return self;
-}
-
-- (BOOL)moreData:(NXStream *)file level:(int)lev indent:(const char *)ind
-{	// Subclass responsibility -- you can dynamically control collapsing
-	// (for example, cut off at a certain level, etc.) and also add info
-	// to the end of a dumped node's line from here.  Be sure to message
-	// super when you override this method; if this method returns a NO
-	// then you should return a NO, regardless.  Don't just use the
-	// notCollapsed instance var, since it may change in the future; look
-	// at the return value from super!
-	//
-	// Here's how you might override to keep from printing levels deeper
-	// than level 2 (remember that the root level is zero):
-	//
-	// - (BOOL)moreData:(NXStream *)file level:(int)lev indent:(const char *)ind
-	// {
-	//    if ((lev > 2) || ![super moreData:file level:lev indent:ind])
-	//	 return NO;
-	//    return YES;
-	// }
-	//
-	return notCollapsed;
-}
-
-- (int)width
-{
-	int num = [branches count];
-	int i, count = 0;
-	
-	if (!num) return 1;	// No children, so we're only one node wide...
-	
-	// have kids, so sum up their widths.
-	for (i=0; i<num; i++) count += [[branches objectAt:i] width];
-	return count;
-}
-
-- (int)depth
-{
-	int num = [branches count];
-	int i, temp, deepest = 1;
-	
-	if (!num) return 1;	// No children, so only one node deep
-	
-	// have kids, so see which branch is deepest.
-	for (i=0; i<num; i++) {
-		temp = [[branches objectAt:i] depth];
-		if (temp > deepest) deepest = temp;
-	}
-	return (deepest + 1);	// we are one deeper than the deepest child.
-}
-
-- branches { return branches; }
-- collapse { notCollapsed = NO; return self; }
-- uncollapse { notCollapsed = YES; return self; }
-- (BOOL)collapsed { return !notCollapsed; }
-- (const char *)label { return [label stringValue]; }
-- (const char *)value { return [value stringValue]; }
-
-@end
diff -r 4de2936b4e77 -r 0132846995bd lisp/oobr/tree-nx/Tree.tiff
Binary file lisp/oobr/tree-nx/Tree.tiff has changed
diff -r 4de2936b4e77 -r 0132846995bd lisp/oobr/tree-nx/Tree2.tiff
Binary file lisp/oobr/tree-nx/Tree2.tiff has changed
diff -r 4de2936b4e77 -r 0132846995bd lisp/oobr/tree-nx/TreeButton.h
--- a/lisp/oobr/tree-nx/TreeButton.h	Mon Aug 13 09:42:28 2007 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,41 +0,0 @@
-//
-//	TreeButton.h -- a class to attach to tree data structures
-//		This class requires the String class, also by Don Yacktman.
-//		Written by Don Yacktman (c) 1993 by Don Yacktman.
-//				All rights reserved.
-//
-//	I doubt this will be useful for much beyond what it does in the demo
-//		program supplied in this directory.
-//
-//		You may use and copy this class freely as long as you
-//		comply with the following terms:
-//			(1) If you use this class in an application which you
-//				intend to sell commercially, as shareware, or otherwise,
-//				you may only do so with express written permission
-//				of the author.  Use in applications which will
-//				be distributed free of charge is encouraged.
-//			(2) You must include the source code to this object and
-//				all accompanying documentation with your application,
-//				or provide it to users if requested, free of charge.
-//			(3) Do not remove the author's name or any of the
-//				copyright notices
-//
-
-#import <appkit/appkit.h> 	// superclass is in there
-#import <stdio.h>
-#import "String.h"
-
-@interface TreeButton:Button
-{
-	id myTreeNode;	// this is the tree node we represent
-}
-
-+ initialize;
-+ setCellClass:classId;
-- initFrame:(const NXRect *)frameRect;
-- wasSelected:sender;
-- treeNode;
-- setTreeNode:node;
-
-@end
-
diff -r 4de2936b4e77 -r 0132846995bd lisp/oobr/tree-nx/TreeButton.m
--- a/lisp/oobr/tree-nx/TreeButton.m	Mon Aug 13 09:42:28 2007 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,67 +0,0 @@
-//
-//	TreeButton.m -- a class to attach to tree data structures
-//		This class requires the String class, also by Don Yacktman.
-//		Written by Don Yacktman (c) 1993 by Don Yacktman.
-//				All rights reserved.
-//
-//	I doubt this will be useful for much beyond what it does in the demo
-//		program supplied in this directory.
-//
-//		You may use and copy this class freely as long as you
-//		comply with the following terms:
-//			(1) If you use this class in an application which you
-//				intend to sell commercially, as shareware, or otherwise,
-//				you may only do so with express written permission
-//				of the author.  Use in applications which will
-//				be distributed free of charge is encouraged.
-//			(2) You must include the source code to this object and
-//				all accompanying documentation with your application,
-//				or provide it to users if requested, free of charge.
-//			(3) Do not remove the author's name or any of the
-//				copyright notices
-//
-
-#import "TreeButton.h"
-#import "TreeButtonCell.h"
-#import "NamedTree.h"
-
-@implementation TreeButton
-
-static id treeButtonCell;
-
-+ initialize
-{
-	if (self == [TreeButton class]) {
-		treeButtonCell = [TreeButtonCell class]; // default cell class
-	}
-	return self;
-}
-
-+ setCellClass:classId
-{
-	treeButtonCell = classId;
-	return self;
-}
-
-- initFrame:(const NXRect *)frameRect
-{
-	id oldCell;
-	
-	[super initFrame:frameRect];
-	oldCell = [self setCell:[[[treeButtonCell alloc] init] setParent:self]];
-	[oldCell free];
-	
-	return self;
-}
-
-- wasSelected:sender
-{	// message is sent here by the Cell if the user clicked the button
-	if ([myTreeNode respondsTo:@selector(activateNode:)])
-		[myTreeNode activateNode:self];
-	return self;
-}
-
-- treeNode { return myTreeNode; }
-- setTreeNode:node { myTreeNode = node; return self; }
-
-@end
diff -r 4de2936b4e77 -r 0132846995bd lisp/oobr/tree-nx/TreeButtonCell.h
--- a/lisp/oobr/tree-nx/TreeButtonCell.h	Mon Aug 13 09:42:28 2007 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,15 +0,0 @@
-
-#import <appkit/appkit.h>
-
-@interface TreeButtonCell:ButtonCell
-{
-	id parent;
-}
-
-- parent;
-- setParent:anObject;
-- (BOOL)trackMouse:(NXEvent *)theEvent
-		inRect:(const NXRect *)cellFrame ofView:aView;
-- performClick:sender;
-
-@end
diff -r 4de2936b4e77 -r 0132846995bd lisp/oobr/tree-nx/TreeButtonCell.m
--- a/lisp/oobr/tree-nx/TreeButtonCell.m	Mon Aug 13 09:42:28 2007 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,33 +0,0 @@
-
-#import "TreeButtonCell.h"
-#import "TreeButton.h"
-
-@implementation TreeButtonCell
-
-- parent { return parent; }
-- setParent:anObject
-{	// anObject should be the parent Control object subclass
-	parent = anObject;
-	return self;
-}
-
-- (BOOL)trackMouse:(NXEvent *)theEvent
-		inRect:(const NXRect *)cellFrame ofView:aView
-{	// this traps the button being selected.
-	BOOL result = [super trackMouse:theEvent inRect:cellFrame ofView:aView];
-	if (result && [parent respondsTo:@selector(wasSelected:)]) {
-		[parent wasSelected:self];
-	}
-	return result;
-}
-
-- performClick:sender
-{
-	[super performClick:sender];
-	if ([parent respondsTo:@selector(wasSelected:)]) {
-		[parent wasSelected:self];
-	}
-	return self;
-}
-
-@end
diff -r 4de2936b4e77 -r 0132846995bd lisp/oobr/tree-nx/TreeController.h
--- a/lisp/oobr/tree-nx/TreeController.h	Mon Aug 13 09:42:28 2007 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,23 +0,0 @@
-
-#import <appkit/appkit.h>
-
-@interface TreeController:Object
-{
-    id	treeView;
-    id  infoPanel;
-    int nextX, nextY;
-    BOOL first;
-}
-
-- init;
-- info:sender;
-- open:sender;
-- (BOOL)openFile:(const char *)name;
-
-/* Application delegate methods */
-
-- appDidInit:(Application *)sender;
-- (int)app:sender openFile:(const char *)file type:(const char *)type;
-- (BOOL)appAcceptsAnotherFile:sender;
-
-@end
diff -r 4de2936b4e77 -r 0132846995bd lisp/oobr/tree-nx/TreeController.m
--- a/lisp/oobr/tree-nx/TreeController.m	Mon Aug 13 09:42:28 2007 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,265 +0,0 @@
-
-#import <stdio.h>
-
-#import "TreeController.h"
-#import "NamedTree.h"
-#import "TreeView.h"
-
-@implementation TreeController
-
-- appDidInit:(Application *)sender
-{
-  BOOL haveOpenedDocument = NO;	// whether we have opened a document
-
-//  // Gets the public port for SomeApp
-//  port_t  thePort = NXPortFromName("Emacs", NULL); 
-//
-//  if (thePort != PORT_NULL)
-//    // Sets the Speaker to send its next message to SomeApp's port
-//    [[NXApp appSpeaker] setSendPort:thePort]; 
-
-  if (NXArgc > 1)
-  {
-     int i;
-
-     for (i = 1; i < NXArgc; i++)
-     {
-	haveOpenedDocument = [self openFile: NXArgv[i]] || haveOpenedDocument;
-     }
-  }
-
-    return self;
-}
-
-- init
-{
-	[super init];
-    first = YES;
-    nextX = 200;
-    nextY = 600;
-      return self;
-}
-
-- info:sender // bring up the info panel, obviously
-{
-	if(!infoPanel)
-		[NXApp loadNibSection:"InfoPanel.nib" owner:self withNames:NO];
-	return [infoPanel orderFront:sender];
-}
-
-- open:sender
-{	// use open panel to select a file -- only with .tree extension.
-	// only one file may be loaded at a time.
-	const char *const *files;
-	char *file;
-	const char *dir;
-	static const char *const ft[2] = {"tree", NULL};
-
-	id openPanel = [OpenPanel new];
-	[openPanel allowMultipleFiles:NO];
-	if (first) {
-		[openPanel runModalForDirectory:[[NXBundle mainBundle] directory]
-				file:NULL types:ft];
-		first = NO;
-	} else  [openPanel runModalForTypes:ft];
-	files = [openPanel filenames];
-	dir = [openPanel directory];
-	file = malloc(strlen(files[0]) + strlen(dir) + 8);
-	strcpy(file, dir);
-	strcat(file,"/");
-	strcat(file, files[0]);
-	strcat(file, "\0");
-	[self openFile:file];
-	return self;
-}
-
-char nextChar; // This allows me to do single character lookahead in scan
-
-id readToNewline(FILE *file) // used to parse a file; reads until a newline
-{	// returns a string object... reads until EOL to get string value.
-	id newString = [[String alloc] init];
-	char *buffer = (char *)malloc(1024);	// should be plenty big
-	char *spot = buffer;
-
-	while (nextChar != '\n')
-	  {
-	    spot[0] = nextChar; spot++; nextChar = fgetc(file);
-	  }	
-	spot[0] = '\0'; // terminate the string
-	nextChar = fgetc(file);  // Get next char for next invocation of this function
-	[newString setString:buffer];
-	free(buffer);
-	return newString;
-}
-
-char prevChar; // This allows me to do single character lookback in scan
-
-id readToSep(FILE *file) // used to parse a file; reads until a newline or a "^^" sequence
-{	// returns a string object... reads until EOL to get string value.
-	id newString = [[String alloc] init];
-	char *buffer = (char *)malloc(1024);	// should be plenty big
-	char *spot = buffer;
-	int c;
-
-	while (nextChar != '\n')
-	  {
-	    if (nextChar == '^')
-	      if ((c = fgetc(file)) == '^')
-		break;
-	      else
-		ungetc(c, file);
-	    spot[0] = nextChar; spot++; nextChar = fgetc(file);
-	  }	
-	spot[0] = '\0'; // terminate the string
-	prevChar = nextChar;
-	nextChar = fgetc(file);  // Get next char for next invocation of this function
-	[newString setString:buffer];
-	free(buffer);
-	return newString;
-}
-
-// This actually opens a file.  WorkSpace and Open panel methods both
-// eventually get to here to do the real work.  This code is pretty much
-// worth ignoring, unless you _really_ care about how I read in the
-// files.  It's mostly specific to the file format so it's not
-// generally useful.  The framework for this code came from the
-// code in my "Viewer.app" that is in with some PD raytracers I ported
-// to the NeXT--allows viewing an rgb bitmap file; I wrote it before
-// GW and ImageViewer existed...  (See raytracers.tar.Z on sonata/orst)
-- (BOOL)openFile:(const char *)name
-{
-	// id alert;
-	id aString, treeName, rootNode, workingNode, tempNode;
-	id newString, stack = [[List alloc] init];
-	int indLevel, numSpaces, indent = 0;
-	char *tempString;
-	BOOL rStat = YES;
-	FILE *file;
-	// for debugging:
-	//NXStream *out = NXOpenFile(fileno(stdout), NX_WRITEONLY);
-
-	// get a new doc window.
-	[NXApp loadNibSection:"DocWindow.nib" owner:self withNames:NO];
-	[[treeView window] setTitleAsFilename:name];
-	// put up an alert panel to let user know we're busy
-	// alert = NXGetAlertPanel(NULL, "Reading tree and creating image.",
-	//		NULL, NULL, NULL);
-	// [alert makeKeyAndOrderFront:self];
-	// Read the tree file.  NOTE THAT THIS DOES NOT DO ERROR CHECKING.
-	file = fopen(name, "r");
-	nextChar = fgetc(file);	// prime the system
-	treeName = readToNewline(file); // first line is tree's name
-	aString = readToSep(file);	// Get the name of the root node.
-	rootNode = [[[NamedTree alloc]
-			initLabelString:aString] setTreeName:treeName];
-	if (prevChar != '\n')
-	  [rootNode setValue: readToSep(file)];  // Set the node's value.
-	[stack insertObject:rootNode at:0];
-	workingNode = rootNode;
-	// figure out the indentation
-	while (nextChar == ' ') {
-		indent++;
-		nextChar = fgetc(file);
-	}
-	aString = readToSep(file); // get name of child node
-	tempNode = [[[NamedTree alloc]
-			initLabelString:aString] setTreeName:treeName];
-	if (prevChar != '\n')
-	  [tempNode setValue: readToSep(file)];  // Set the node's value.
-	[workingNode addBranch:tempNode];
-	[stack insertObject:tempNode at:0];
-	workingNode = tempNode;
-	// now that we know the file's char's, we read in the other nodes
-	// I use a List object as if it were a stack and push parent nodes on
-	// it while working on children rather than doing a recursive function.
-	// the comments are sparse, just know that it's mostly pushing and
-	// popping from the stack to get at the right parent to add a child to.
-	while (!feof(file)) {
-		aString = readToSep(file); // next node name + indentation.
-		// find out # of indentation spaces and strip them off
-		// *** This gives a warning: ignore it, it's unimportant here.
-		tempString = [aString stringValue]; numSpaces = 0;
-		while (tempString[0] == ' ') {
-			numSpaces++; tempString++;
-		}
-		indLevel = numSpaces / indent;
-		if (indLevel == ([stack count] - 1)) // same level as last object
-		  {
-			[stack removeObjectAt:0];
-			workingNode = [stack objectAt:0];
-			newString = [[String alloc] initString:tempString];
-			[aString free];
-			tempNode = [[[NamedTree alloc]
-					initLabelString:newString] setTreeName:treeName];
-                        if (prevChar != '\n')
-			  [tempNode setValue: readToSep(file)];  // Set the node's value.
-			[workingNode addBranch:tempNode];
-			[stack insertObject:tempNode at:0];
-			workingNode = tempNode;
-		} else if (indLevel == ([stack count])) { // child of last node
-			newString = [[String alloc] initString:tempString];
-			[aString free];
-			tempNode = [[[NamedTree alloc]
-					initLabelString:newString] setTreeName:treeName];
-                        if (prevChar != '\n')
-			  [tempNode setValue: readToSep(file)];  // Set the node's value.
-			[workingNode addBranch:tempNode];
-			[stack insertObject:tempNode at:0];
-			workingNode = tempNode;
-		} else if (indLevel < [stack count]) { // higher level, so pop
-			while (indLevel < [stack count]) { // pop until at right level
-				[stack removeObjectAt:0];
-				workingNode = [stack objectAt:0];
-			} // now add new node since we're at the level
-			newString = [[String alloc] initString:tempString];
-			[aString free];
-			tempNode = [[[NamedTree alloc]
-					initLabelString:newString] setTreeName:treeName];
-                        if (prevChar != '\n')
-			  [tempNode setValue: readToSep(file)];  // Set the node's value.
-			[workingNode addBranch:tempNode];
-			[stack insertObject:tempNode at:0];
-			workingNode = tempNode;
-		} else { // typically, if user goes in two levels at once, which
-			// doesn't make any sense semantically
-			fprintf(stderr, "Error: level too deep!\n");
-			rStat = NO;
-		}
-	}
-	// Debugging code to pretty print the parsed tree.  If this output
-	// is correct, then we know that the parse was OK.
-	//printf("\nHere's the parsed tree:\n");
-	//printf("Tree name:  \"%s\".", [treeName stringValue]);
-	//[rootNode dumpTree:out level:0 indent:"   "];
-	//printf("\n\n");
-	//NXClose(out);
-	// end debug code
-	// rStat = return status of tree reader  YES = success
-	// Now attach the Tree to the TreeView...
-	[treeView attachTree:rootNode];
-	// and now bring up the window for the user
-	[[treeView window] moveTo:nextX :(nextY-218)];
-	// Get rid of the alert
-	// [alert orderOut:self];
-	// [alert free];
-	nextX += 22; nextY -= 25;
-	if (nextX > 370)
-	{
-		nextX = 200; nextY = 600;
-	}
-	[[treeView window] makeKeyAndOrderFront:self];
-	return rStat;
-}
-
-
-// The next two methods allow the WorkSpace to open a .tree file when
-// it is double-clicked.  (Or any file that's cmd-dragged over our icon.)
-
-- (BOOL)appAcceptsAnotherFile:sender { return YES; }
-- (int)app:sender openFile:(const char *)file type:(const char *)type
-{
-	return [self openFile:file];
-}
-
-
-@end
diff -r 4de2936b4e77 -r 0132846995bd lisp/oobr/tree-nx/TreeView.h
--- a/lisp/oobr/tree-nx/TreeView.h	Mon Aug 13 09:42:28 2007 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,42 +0,0 @@
-
-#import <appkit/appkit.h>
-#import "TreeButton.h"
-
-@interface TreeView:View
-{
-	id currentButton;
-	id lineList;
-	id priorButton;
-	id selectedField;
-	id treeRoot;
-
-	NXCoord currScale;
-	NXCoord origWidth;
-	NXCoord origHeight;
-}
-
-- attachTree:aTree;
-- buildTreeFromNode:aNode bottom:(double)ybot
-		top:(double)ytop atX:(double)xpos parent:(NXPoint *)pos;
-- displayBut:but;
-- displayButByName:sender;
-- drawSelf:(NXRect *)rects :(int)rectCount;  	// standard rendering method
-- getButByName:(const char*)name;
-- initFrame:(const NXRect *)frameRect;
-- scale:sender;
-- setCurrentButton:but;
-- setCurrButtonByName:sender;
-
-@end
-
-/* Color Dragging */
-
-@interface TreeView(Drag)
-
-- registerForDragging;
-- (NXDragOperation)draggingEntered:(id <NXDraggingInfo>)sender;
-- (BOOL)prepareForDragOperation:(id <NXDraggingInfo>)sender;
-- (BOOL)performDragOperation:(id <NXDraggingInfo>)sender;
-- concludeDragOperation:(id <NXDraggingInfo>)sender;
-
-@end
diff -r 4de2936b4e77 -r 0132846995bd lisp/oobr/tree-nx/TreeView.iconheader
--- a/lisp/oobr/tree-nx/TreeView.iconheader	Mon Aug 13 09:42:28 2007 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-F	TreeView.app	TreeView	app
-F	TreeView	TreeView	app
-S	tree	TreeView	Tree2
diff -r 4de2936b4e77 -r 0132846995bd lisp/oobr/tree-nx/TreeView.m
--- a/lisp/oobr/tree-nx/TreeView.m	Mon Aug 13 09:42:28 2007 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,274 +0,0 @@
-
-#import "TreeView.h"
-#import "TreeButton.h"
-#import "NamedTree.h"
-#import "Line.h"
-
-// constants to determine how the buttons are laid out
-#define BUTTONWIDTH	155.0
-#define BUTTONHEIGHT	 24.0
-#define VERTSPACING 	  8.0
-#define HORIZSPACING	 40.0
-
-@implementation TreeView
-
-- initFrame:(const NXRect *)frameRect
-{
-  [super initFrame:frameRect];
-  [self setAutosizing:(unsigned int) (NX_WIDTHSIZABLE | NX_HEIGHTSIZABLE)];
-
-  currentButton = nil;
-  lineList = nil;
-  priorButton = nil;
-  [selectedField setNextText: selectedField];
-  [selectedField setPreviousText: selectedField];
-  currScale  = 1.0;
-
-  [self registerForDragging];
-  [self setOpaque:YES];
-
-  return self;
-}
-
-- buildTreeFromNode:aNode bottom:(double)ybot
-		top:(double)ytop atX:(double)xpos parent:(NXPoint *)pos
-{	// add a button representing the node to the View
-	// This method is recursive.
-	NXRect butFrame = {{(xpos + HORIZSPACING),
-			(ybot + (ytop - ybot) / 2 - BUTTONHEIGHT / 2)},
-			{BUTTONWIDTH, BUTTONHEIGHT}};
-	id newButton = [[[TreeButton alloc] initFrame:&butFrame]
-			setTreeNode:aNode];
-	id kid, kids = [aNode branches];
-	int numBranches = [kids count];
-	int i, treeWidth; double diff, accum = ybot;
-	NXPoint myCenter = {(NX_X(&butFrame)),
-			    (NX_Y(&butFrame) + BUTTONHEIGHT / 2)};
-	id newLine;
-	
-	[newButton setTitle:[aNode label]];
-	[self addSubview:newButton];
-	// line to parent:
-	if (pos) {	// NULL if root, so no line
-		NXPoint parentRight = { pos->x + BUTTONWIDTH, pos->y };
-		newLine = [[Line alloc] init];
-		[newLine setStart:&parentRight end:&myCenter];
-		[lineList addObject:newLine];
-	}
-	// now add any children and the lines to them.
-	for (i=numBranches - 1; i >= 0; i--) { // loop isn't entered if no kids.
-		kid = [kids objectAt:i];
-		treeWidth = [kid width];
-		diff = (treeWidth * (BUTTONHEIGHT + VERTSPACING));
-		[self buildTreeFromNode:kid bottom:accum
-				top:(accum + diff + VERTSPACING)
-				atX:(xpos + BUTTONWIDTH + HORIZSPACING)
-				parent:&myCenter];
-		accum += diff;
-	}
-	return self;
-}
-
-- attachTree:aTree
-{
-	int treeWidth = [aTree width];
-	int treeDepth = [aTree depth];
-	double height = (treeWidth * (BUTTONHEIGHT + VERTSPACING) + VERTSPACING);
-	double width  = (treeDepth * (BUTTONWIDTH + HORIZSPACING) + HORIZSPACING);
-	
-	treeRoot = aTree;
-	if (lineList) [[lineList freeObjects] free];
-	lineList = [[List alloc] init];
-	// resize the View to accomodate the Buttons
-	[self sizeTo:width :height];
-	[self buildTreeFromNode:aTree bottom:0.0 top:height atX:0.0 parent:NULL];
-
-	return self;
-}
-
-- drawSelf:(NXRect *)rects :(int)rectCount  	// standard rendering method
-{
-    NXColor color = [[self window] backgroundColor];
-
-    if (NXEqualColor(color, NX_COLORLTGRAY))
-       color = NX_COLORDKGRAY;
-
-    // PSsetgray(NX_DKGRAY);
-    NXSetColor(color);
-    NXRectFill(&bounds);
-    // PSsetgray(NX_BLACK);
-    NXSetColor(NX_COLORBLACK);
-    PSsetlinewidth(2.0);
-
-    [lineList makeObjectsPerform:@selector(render)];
-    [[self subviews] makeObjectsPerform:@selector(display)];
-    return self;
-}
-
-- scale:sender
-{
-  id popUp = [sender window];
-  short index = [popUp indexOfItem:[popUp selectedItem]];
-  //                   25%   50%  75%  100%  125%  150%  200%  SizeToFit
-  //                   0     1      2     3     4     5     6    7
-  float factors[] = {0.25,  0.50, 0.75,  1.0, 1.25, 1.50, 2.0, 0.20};
-  NXPoint center;
-  NXCoord scale = factors[index];
-
-  // Initialize width and height bounds when view is not scaled.
-  if (currScale == 1.0)
-    {
-      origWidth = NX_WIDTH(&bounds);
-      origHeight = NX_HEIGHT(&bounds);
-    }
-
-  // Remember the center to we can reset it after the scaling.
-  center.x = NX_X(&bounds) + NX_WIDTH(&bounds) / 2;
-  center.y = NX_Y(&bounds) + NX_HEIGHT(&bounds) / 2;
-
-  // Scale the view to its new size
-  if (index == 3) // 100% (Normal Size)
-    {
-     [self setDrawSize:origWidth :origHeight];
-     currScale  = 1.0;
-    }
-  else
-    {
-      currScale *= scale;
-      [self setDrawSize:NX_WIDTH(&bounds) / currScale
-                       :NX_HEIGHT(&bounds) / currScale];
-    }
-
-  // Reset the center point
-  [self setDrawOrigin:center.x - NX_WIDTH(&bounds) / 2
-	 	     :center.y - NX_HEIGHT(&bounds) / 2];
-
-  // Ensure that selected button, if any, is visible.
-  [self displayBut:currentButton];
-
-  [self update];
-
-  return self;
-}
-
-- setCurrentButton:but
-{
-  if (but)
-    {
-      priorButton = currentButton;
-      if (priorButton)
-	{
-	  [priorButton setType:NX_MOMENTARYPUSH];
-	  [priorButton setState:0];
-	}
-      currentButton = but;
-      [currentButton setType:NX_ONOFF]; [currentButton setState:1];
-      // [selectedField setStringValueNoCopy: [but title]];
-    }
-  return but;
-}
-
-- setCurrButtonByName:sender
-{
-  id currBut = [self getButByName:[sender stringValue]];
-
-  [self displayBut:[self setCurrentButton:currBut]];
-  [treeRoot act:currBut];
-  return currBut;
-}
-
-- getButByName:(const char*)name
-{
-  id butList = [self subviews];
-  id but = nil;
-  id currBut = nil;
-  int i = 0;
-
-  while (!currBut && (but = [butList objectAt:i++]))
-    {
-      if (!strcmp([but title], name))
-	currBut = but;
-    }
-  return currBut;
-}
-
-- displayButByName:sender
-{
-  id but = [self getButByName:[sender stringValue]];
-
-  if (but)
-    [self displayBut:but];
-  return but;
-}
-
-- displayBut:but
-{
-  NXRect butRect;
-
-  if (but)
-    {
-      [[but getBounds:&butRect] convertRectToSuperview:&butRect];
-      [self scrollRectToVisible:&butRect];
-    }
-  return self;
-}
-
-@end
-
-
-
-// Color dragging support
-
-BOOL includesType(const NXAtom *types, NXAtom type)
-{
-    if (types)
-      while (*types)
-	if (*types++ == type)
-	  return YES;
-    return NO;
-}
-
-@implementation TreeView(Drag)
-
-- registerForDragging
-{
- [self registerForDraggedTypes:&NXColorPboardType count:1];
- return self;
-}
-
-- (NXDragOperation)draggingEntered:(id <NXDraggingInfo>)sender
-{
-  NXDragOperation sourceMask = [sender draggingSourceOperationMask];
-  Pasteboard *pboard = [sender draggingPasteboard];
-
-  return ((includesType([pboard types], NXColorPboardType))
-	   ? NX_DragOperationGeneric : NX_DragOperationNone);
-}
-
-- (BOOL)prepareForDragOperation:(id <NXDraggingInfo>)sender
-{
-  return YES;
-}
-
-- (BOOL)performDragOperation:(id <NXDraggingInfo>)sender
-{
-    Pasteboard *pboard = [sender draggingPasteboard];
-
-    if (includesType([pboard types], NXColorPboardType))
-      {
-	NXColor color = NXReadColorFromPasteboard(pboard);
-	[[self window] setBackgroundColor:color];
-	[self display];  // reflect color change
-	return YES;
-      }
-    else
-      return NO;
-}
-
-- concludeDragOperation:(id <NXDraggingInfo>)sender
-{
-  // Return value ignored.
-  return nil;
-}
-
-@end
diff -r 4de2936b4e77 -r 0132846995bd lisp/oobr/tree-nx/TreeView_main.m
--- a/lisp/oobr/tree-nx/TreeView_main.m	Mon Aug 13 09:42:28 2007 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,15 +0,0 @@
-/* Generated by the NeXT Project Builder 
-   NOTE: Do NOT change this file -- Project Builder maintains it.
-*/
-
-#import <appkit/Application.h>
-
-void main(int argc, char *argv[]) {
-
-    [Application new];
-    if ([NXApp loadNibSection:"TreeView.nib" owner:NXApp withNames:NO])
-	    [NXApp run];
-	    
-    [NXApp free];
-    exit(0);
-}
diff -r 4de2936b4e77 -r 0132846995bd lisp/oobr/tree-x/BUGS
--- a/lisp/oobr/tree-x/BUGS	Mon Aug 13 09:42:28 2007 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,11 +0,0 @@
-From: Torgeir Veimo <torgeir@ii.uib.no>
-Subject: Unresolved issues with the X OO-Browser.
-Date: Fri, 03 Mar 1995 19:21:03 +0100
-
-Saving to a file does not work properly, and the save option on the tree menu
-isn't set unsensitive when asked to, but these operations are not used
-by the OO-Browser.
-
---
-Torgeir @ http://www.ii.uib.no/~torgeir/
-
diff -r 4de2936b4e77 -r 0132846995bd lisp/oobr/tree-x/Makefile
--- a/lisp/oobr/tree-x/Makefile	Mon Aug 13 09:42:28 2007 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,94 +0,0 @@
-#
-# SUMMARY:      Makefile for the OO-Browser
-#
-# AUTHOR:       Bob Weiner / Mark Stern
-# ORG:          InfoDock Associates / Brown U.
-#
-# ORIG-DATE:    15-Oct-90
-# LAST-MOD:     19-Oct-96 at 00:53:29 by Bob Weiner
-#
-# Copyright (C) 1990-1996  Free Software Foundation, Inc.
-# See the file BR-COPY for license information.
-#
-# This file is part of the OO-Browser.
-
-# If the usleep () system call exists on your system, uncomment the following line.
-DEFINES         = -DHAVE_USLEEP
-
-# Root directory of your X distribution.  Note how this is used in succeeding
-# variables.
-XROOT           = /usr/X11
-LD_LIBRARY_PATH = $(XROOT)/lib
-INCLUDEDIRS     = -I$(XROOT)/include
-LIBDIRS         = -L$(XROOT)/lib
-
-# Use this for the standard Athena widgets.
-XAW = -lXaw
-# Use this instead for the 3D Athena widget library.
-XAW3D = -lXaw3d
-# Set this to one of the 2 above variable names.
-DEFXAW = XAW
-# Set this to one of the 2 above variable values.
-LIBXAW = $(XAW)
-
-# C compiler
-CC		= gcc
-# Compiler flags
-CFLAGS		= -g -O $(INCLUDEDIRS) $(DEFINES) -D$(DEFXAW)
-
-#   Set XVERSION to the proper relase of X11 for your system.
-#   Use X11R5 if you system is not on X11R6 or above.
-X11R5 = 
-X11R6 = -lSM -lICE
-XVERSION = $(X11R6)
-
-#   X11 libraries used by all system configurations.
-XCOMMON = -lXmu -lXt -lX11 -lXext
-
-#   This is used for static linking on a generic platform such as SunOS 4.
-LD_STATIC   	 = -static $(LIBDIRS) $(LIBXAW) $(XCOMMON) $(XVERSION)
-#   This is used for dynamic linking under Solaris.
-LD_SOLARIS       = $(LIBDIRS) $(LIBXAW) $(XCOMMON) -lsocket $(XVERSION)
-#   This is used for dynamic linking under Linux.
-LD_LINUX         = $(LIBDIRS) $(LIBXAW) $(XCOMMON) $(XVERSION)
-
-# Set this to be the directory in which to install the X OO-Browser
-# executable.  This should be a directory in all users' search paths or the
-# value of the Emacs variable, exec-directory.
-# Use 'make install' to install the binary.
-BINDIR          = /home/infodock/lib-bin-linux-elf
-
-NAME		= xoobr
-C_FILES 	= draw.c tree.c input.c dissolve.c dbl.c intf.c usleep.c
-O_FILES		= draw.o tree.o input.o dissolve.o dbl.o intf.o usleep.o
-INC_FILES	= defs.h tree.h input.h dissolve.h dbl.h rsrc.h intf.h help.h
-SRC_FILES	= $(INC_FILES) $(C_FILES)
-
-$(NAME):	linux
-
-static:		$(O_FILES)
-		$(CC) $(CFLAGS) -o $(NAME) $(O_FILES) $(LD_STATIC)
-
-solaris:	$(O_FILES)
-		$(CC) $(CFLAGS) -DSYSV -o $(NAME) $(O_FILES) $(LD_SOLARIS)
-
-linux:		$(O_FILES)
-		$(CC) $(CFLAGS) -o $(NAME) $(O_FILES) $(LD_LINUX)
-
-
-install:	$(NAME)
-		chmod 755 $(NAME)
-		mv $(NAME) $(BINDIR)/$(NAME)
-
-clean:
-		rm -f *.o *.orig *.rej $(NAME) core *~
-
-size:
-		wc $(SRC_FILES)
-
-dbl.o: 		dbl.h 
-dissolve.o:	dissolve.h
-draw.o: 	defs.h tree.h dbl.h intf.h
-input.o: 	defs.h tree.h input.h
-intf.o: 	defs.h tree.h dbl.h intf.h rsrc.h input.h help.h
-tree.o: 	defs.h tree.h intf.h
diff -r 4de2936b4e77 -r 0132846995bd lisp/oobr/tree-x/OOBR
--- a/lisp/oobr/tree-x/OOBR	Mon Aug 13 09:42:28 2007 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,48 +0,0 @@
-
-(setq
-br-env-version
-"02.09.11"
-
-br-sys-search-dirs
-'(".")
-
-br-lib-search-dirs
-'nil
-
-br-lang-prefix
-'"c++-"
-
-br-env-spec
-'nil
-
-br-children-alist
-'(
-)
-
-br-sys-paths-alist
-'(
-(("line" "tnode") . "/home/infodock/lisp/oobr/tree-x/tree.h")
-(("[constant]" "[enumeration]" "[function]" "[macro]" "[structure]" "[type]" "[union]") . "<none>")
-)
-
-br-lib-paths-alist
-'(
-)
-
-br-sys-parents-alist
-'(
-(nil . "[union]")
-(nil . "[type]")
-(nil . "[structure]")
-(nil . "[macro]")
-(nil . "[function]")
-(nil . "[enumeration]")
-(nil . "[constant]")
-(nil . "line")
-(nil . "tnode")
-)
-
-br-lib-parents-alist
-'(
-)
-)
diff -r 4de2936b4e77 -r 0132846995bd lisp/oobr/tree-x/OOBR-FTR
--- a/lisp/oobr/tree-x/OOBR-FTR	Mon Aug 13 09:42:28 2007 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,25 +0,0 @@
-
-/home/infodock/lisp/oobr/tree-x/draw.c
-[function]@- BeginFrame@void BeginFrame() {
-[function]@- EndFrame@void EndFrame() {
-
-/home/infodock/lisp/oobr/tree-x/intf.c
-[function]@- Pause@void Pause() {
-[function]@- UserEventLoop@void UserEventLoop() {
-
-/home/infodock/lisp/oobr/tree-x/tree.c
-[function]@- MakeNode@Tree* MakeNode() {
-
-/home/infodock/lisp/oobr/tree-x/usleep.c
-[function]@- usleep@int usleep( unsigned long int microSeconds ) {
-
-/home/infodock/lisp/oobr/tree-x/intf.c
-#defi@- GLOBALS@#define GLOBALS
-#defi@- gray_width@#define gray_width
-#defi@- gray_height@#define gray_height
-#defi@- check_width@#define check_width
-#defi@- check_height@#define check_height
-#defi@- slider_pixmap_width@#define slider_pixmap_width
-#defi@- slider_pixmap_height@#define slider_pixmap_height
-#defi@- shell_tra@#define shell_translations
-
diff -r 4de2936b4e77 -r 0132846995bd lisp/oobr/tree-x/README
--- a/lisp/oobr/tree-x/README	Mon Aug 13 09:42:28 2007 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,10 +0,0 @@
-This is the source code for the X interface to the OO-Browser.
-Mark Stern wrote the original version of the program as a tree browser, for a
-class in 1990, while at Brown University.
-
-Bob Weiner adapted the program for use as the X OO-Browser.  He
-and Torgeir Veimo maintain the current version.
-
-Send comments and issues to the mail list, <oo-browser@infodock.com>.
-
-The program is freely redistributable.
diff -r 4de2936b4e77 -r 0132846995bd lisp/oobr/tree-x/TREE.c++
--- a/lisp/oobr/tree-x/TREE.c++	Mon Aug 13 09:42:28 2007 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,86 +0,0 @@
-^^c++-^^/usr1/dingus/weiner/projs/oobr/samples-c++/templates/OOBR
-NO-ROOT
-  ConstPtrList<T>
-    +ConstPtrList^^ConstPtrList<T>@+ ConstPtrList@ConstPtrList(const ConstPtrList<T> &) : List<__AnyConstPtr>() {
-    +ConstPtrList^^ConstPtrList<T>@+ ConstPtrList@ConstPtrList(long size) : List<__AnyConstPtr>(size) {
-    +ConstPtrList^^ConstPtrList<T>@+ ConstPtrList@ConstPtrList() : List<__AnyConstPtr>() {
-    -append^^ConstPtrList<T>@- append@void append(const ConstPtrList<T>& list) {
-    -append^^ConstPtrList<T>@- append@void append(const T* item) {
-    -count^^ConstPtrList<T>@- count@long count() const {
-    -insert^^ConstPtrList<T>@- insert@void insert(long index, const ConstPtrList<T>& list) {
-    -insert^^ConstPtrList<T>@- insert@void insert(long index, const T* item) {
-    -item^^ConstPtrList<T>@- item@const T* item(long index) const {
-    -operator =^^ConstPtrList<T>@- operator =@ConstPtrList<T>& operator = (const ConstPtrList<T>& l) {
-    -prepend^^ConstPtrList<T>@- prepend@void prepend(const ConstPtrList<T>& list) {
-    -prepend^^ConstPtrList<T>@- prepend@void prepend(const T* item) {
-    -remove^^ConstPtrList<T>@- remove@void remove(long index) {
-    -remove_all^^ConstPtrList<T>@- remove_all@void remove_all() {
-  ConstPtrListItr<T>
-    +ConstPtrListItr^^ConstPtrListItr<T>@+ ConstPtrListItr@ConstPtrListItr(const ConstPtrList<T>& l) : ListItr<__AnyConstPtr>(l) {
-    -cur^^ConstPtrListItr<T>@- cur@const T* cur() const {
-    -more^^ConstPtrListItr<T>@- more@boolean more() const {
-    -next^^ConstPtrListItr<T>@- next@void next() {
-  ConstPtrListUpdater<T>
-    +ConstPtrListUpdater^^ConstPtrListUpdater<T>@+ ConstPtrListUpdater@ConstPtrListUpdater(ConstPtrList<T>& l) : ListUpdater<__AnyConstPtr>(l) {
-    -cur^^ConstPtrListUpdater<T>@- cur@const T* cur() const {
-    -more^^ConstPtrListUpdater<T>@- more@boolean more() const {
-    -next^^ConstPtrListUpdater<T>@- next@void next() {
-    -remove_cur^^ConstPtrListUpdater<T>@- remove_cur@void remove_cur() {
-  List<T>
-    +List^^List<T>@+ List@template <class T> List<T>::List(const List<T> &l) {
-    +List^^List<T>@+ List@template <class T> List<T>::List() {
-    +List^^List<T>@+ List@template <class T> List<T>::List(long size) {
-    -append^^List<T>@- append@void append(const List<T>& list) {
-    -append^^List<T>@- append@void append(const T& item) {
-    -copy^^List<T>@- copy@template <class T> void List<T>::copy(const List<T> &l) {
-    -count^^List<T>@- count@long count() const {
-    -insert^^List<T>@- insert@template <class T> void List<T>::insert(long index, const List<T>& list) {
-    -insert^^List<T>@- insert@template <class T> void List<T>::insert(long index, const T& item) {
-    -item^^List<T>@- item@T item(long index) const {
-    -item_ref^^List<T>@- item_ref@T& item_ref(long index) const{
-    -operator =^^List<T>@- operator =@template <class T> List<T>& List<T>::operator = (const List<T> &l) {
-    -prepend^^List<T>@- prepend@void prepend(const List<T>& list) {
-    -prepend^^List<T>@- prepend@void prepend(const T& item) {
-    -remove^^List<T>@- remove@template <class T> void List<T>::remove(long index) {
-    -remove_all^^List<T>@- remove_all@template <class T> void List<T>::remove_all() {
-    +~List^^List<T>@+ ~List@template <class T> List<T>::~List() {
-  ListItr<T>
-    +ListItr^^ListItr<T>@+ ListItr@template <class T> ListItr<T>::ListItr(const List<T>& list) {
-    -cur^^ListItr<T>@- cur@T cur() const {
-    -cur_ref^^ListItr<T>@- cur_ref@T& cur_ref() const {
-    -more^^ListItr<T>@- more@boolean more() const {
-    -next^^ListItr<T>@- next@void next() {
-  ListUpdater<T>
-    +ListUpdater^^ListUpdater<T>@+ ListUpdater@template <class T> ListUpdater<T>::ListUpdater(List<T>& list) {
-    -cur^^ListUpdater<T>@- cur@T cur() const {
-    -cur_ref^^ListUpdater<T>@- cur_ref@T& cur_ref() const {
-    -more^^ListUpdater<T>@- more@boolean more() const {
-    -next^^ListUpdater<T>@- next@void next() {
-    -remove_cur^^ListUpdater<T>@- remove_cur@void remove_cur() {
-  PtrList<T>
-    +PtrList^^PtrList<T>@+ PtrList@PtrList(const PtrList<T> &) : List<__AnyPtr>() {
-    +PtrList^^PtrList<T>@+ PtrList@PtrList(long size) : List<__AnyPtr>(size) {
-    +PtrList^^PtrList<T>@+ PtrList@PtrList() : List<__AnyPtr>() {
-    -append^^PtrList<T>@- append@void append(const PtrList<T>& list) {
-    -append^^PtrList<T>@- append@void append(T* item) {
-    -count^^PtrList<T>@- count@long count() const {
-    -insert^^PtrList<T>@- insert@void insert(long index, const PtrList<T>& list) {
-    -insert^^PtrList<T>@- insert@void insert(long index, T* item) {
-    -item^^PtrList<T>@- item@T* item(long index) const {
-    -item_ref^^PtrList<T>@- item_ref@T*& item_ref(long index) const {
-    -operator =^^PtrList<T>@- operator =@PtrList<T>& operator = (const PtrList<T>& l) {
-    -prepend^^PtrList<T>@- prepend@void prepend(const PtrList<T>& list) {
-    -prepend^^PtrList<T>@- prepend@void prepend(T* item) {
-    -remove^^PtrList<T>@- remove@void remove(long index) {
-    -remove_all^^PtrList<T>@- remove_all@void remove_all() {
-  PtrListItr<T>
-    +PtrListItr^^PtrListItr<T>@+ PtrListItr@PtrListItr(const PtrList<T>& l) : ListItr<__AnyPtr>(l) {
-    -cur^^PtrListItr<T>@- cur@T* cur() const {
-    -more^^PtrListItr<T>@- more@boolean more() const {
-    -next^^PtrListItr<T>@- next@void next() {
-  PtrListUpdater<T>
-    +PtrListUpdater^^PtrListUpdater<T>@+ PtrListUpdater@PtrListUpdater(PtrList<T>& l) : ListUpdater<__AnyPtr>(l) {
-    -cur^^PtrListUpdater<T>@- cur@T* cur() const {
-    -more^^PtrListUpdater<T>@- more@boolean more() const {
-    -next^^PtrListUpdater<T>@- next@void next() {
-    -remove_cur^^PtrListUpdater<T>@- remove_cur@void remove_cur() {
diff -r 4de2936b4e77 -r 0132846995bd lisp/oobr/tree-x/TREE.objc
--- a/lisp/oobr/tree-x/TREE.objc	Mon Aug 13 09:42:28 2007 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,4 +0,0 @@
-^^objc-^^/usr/home/samples-objc/gnu-libobjects/OOBR
-BinaryTreeNode
-  @<BinaryTreeComprising>^^BinaryTreeNode@@ <BinaryTreeComprising>@<BinaryTreeComprising>
-  @<Coding>^^BinaryTreeNode@@ <Coding>@<Coding>
diff -r 4de2936b4e77 -r 0132846995bd lisp/oobr/tree-x/Xoobr-color.ad
--- a/lisp/oobr/tree-x/Xoobr-color.ad	Mon Aug 13 09:42:28 2007 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,92 +0,0 @@
-! Generic athena widget font selection
-
-*Text.Font:			-*-lucidatypewriter-medium-r-*-*-12-*-*-*-*-*-iso8859-1
-*Label.Font:			-*-helvetica-medium-r-*-*-12-*-*-*-*-*-iso8859-1
-*Command.Font:			-*-helvetica-bold-r-*-*-12-*-*-*-*-*-iso8859-1
-*SimpleMenu.Font:		-*-helvetica-bold-r-*-*-12-*-*-*-*-*-iso8859-1
-*SmeBSB.Font:			-*-helvetica-bold-r-*-*-12-*-*-*-*-*-iso8859-1
-*MenuButton.Font:		-*-helvetica-bold-r-*-*-12-*-*-*-*-*-iso8859-1
-*List.Font:			-*-helvetica-bold-r-*-*-12-*-*-*-*-*-iso8859-1
-
-! Menu Button Labels
-
-*treeMenuBtn.label:			Tree
-*layoutMenuBtn.label:			Layout
-*helpBtn.label:				Help...
-
-! Menu Entry Labels
-
-*treeMenu*treeMenuNew.label:		New Tree
-*treeMenu*treeMenuLoad.label:		Load Tree
-*treeMenu*treeMenuSave.label:		Save Tree
-*treeMenu*treeMenuQuit.label:		Quit
-
-*layoutMenu*layoutMenuSpacing.label:	Layout Spacing...
-*layoutMenu*layoutMenuAlignNodes.label:	Align Nodes on Level
-
-! Dialog (Button) Labels
-
-*dlgNewTree.title:			New Tree
-*dlgNodeName.title:			Node Name
-*dlgInfo.title:				Information
-*dlgError.title:			Error!
-*dlgSpacing.title:			Tree Node Spacing
-*helpShell.title:			Help
-
-*dlgNewTreeForm.label:			Enter name of root node:
-*dlgNodeNameForm.label:			Enter name of new node:
-*dlgFileForm.label:			Enter name of file:
-*dlgInfoForm.label:			Information:
-*dlgErrorForm.label:			Error:
-*dlgSpacing.label:			Spacing Dialog
-*dlgLevelLabel.label:			Level spacing:
-*dlgSiblingLabel.label:			Sibling spacing:
-*dlgLevelValuator.width:		40
-*dlgLevelValuator.width:		40
-
-
-*dlgNewTreeOk.label:			Ok
-*dlgNewTreeCancel.label:		Cancel
-*dlgFileOk.label:			Ok
-*dlgFileCancel.label:			Cancel
-*dlgInfoButton.label:			Acknowledged
-*dlgErrorButton.label:			Acknowledged
-*dlgOkButton.label:			Ok
-*dlgCancelButton.label:			Cancel
-*dlgNodeNameOk.label:			Ok
-*dlgNodeNameCancel.label:		Cancel
-
-*helpDoneButton.label:			Dismiss
-*helpTitle.label:			Help for Drawing Dynamic Trees
-
-*statusText.width:			310
-*treeDrawingArea.width:			310
-*treeDrawingArea.height:		400
-*treeDrawingArea.Translations: #override \n\
-                                <Btn1Down>:	node_select(EDIT)\n\
-                                <Btn2Down>:	node_select(VIEW)\n\
-                                <Btn3Down>:	XawPositionSimpleMenu(nodeMenu)node_menu_prepare()XtMenuPopup(nodeMenu)\n
-!                                <Btn3Down>:	XawPositionSimpleMenu(nodeMenu)node_menu_prepare()maybe_menu_popup(nodeMenu)\n
-	
-
-
-! Color Specifications
-
-Xoobr*backgroundColor: 			gray90
-!Xoobr*treeColor:       		lightyellow
-!Xoobr*contourColor:    		black
-!Xoobr*splitColor:      		green
-!Xoobr*highlightColor:  		red
-
-*Paned.background:			gray
-*Box.background:			gray
-*Form.background:			gray
-*Dialog.background:			gray
-*Label.background:			gray
-*Panner.background:			gray
-*Panner.foreground:			gray50
-*Scrollbar.background:			gray
-*Viewport.background:			gray
-*MenuButton.background:			lightgrey
-*SimpleMenu.background:			lightgrey
-*Command.background:			lightgrey
\ No newline at end of file
diff -r 4de2936b4e77 -r 0132846995bd lisp/oobr/tree-x/Xoobr.ad
--- a/lisp/oobr/tree-x/Xoobr.ad	Mon Aug 13 09:42:28 2007 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,71 +0,0 @@
-! Generic athena widget font selection
-
-*Text.Font:			-*-lucidatypewriter-medium-r-*-*-12-*-*-*-*-*-iso8859-1
-*Label.Font:			-*-helvetica-medium-r-*-*-12-*-*-*-*-*-iso8859-1
-*Command.Font:			-*-helvetica-bold-r-*-*-12-*-*-*-*-*-iso8859-1
-*SimpleMenu.Font:		-*-helvetica-bold-r-*-*-12-*-*-*-*-*-iso8859-1
-*SmeBSB.Font:			-*-helvetica-bold-r-*-*-12-*-*-*-*-*-iso8859-1
-*MenuButton.Font:		-*-helvetica-bold-r-*-*-12-*-*-*-*-*-iso8859-1
-*List.Font:			-*-helvetica-bold-r-*-*-12-*-*-*-*-*-iso8859-1
-
-! Menu Button Labels
-
-*treeMenuBtn.label:			Tree
-*layoutMenuBtn.label:			Layout
-*helpBtn.label:				Help...
-
-! Menu Entry Labels
-
-*treeMenu*treeMenuNew.label:		New Tree
-*treeMenu*treeMenuLoad.label:		Load Tree
-*treeMenu*treeMenuSave.label:		Save Tree
-*treeMenu*treeMenuQuit.label:		Quit
-
-*layoutMenu*layoutMenuFixed.label:	Fixed
-*layoutMenu*layoutMenuVariable.label:	Variable
-*layoutMenu*layoutMenuSpacing.label:	Spacing...
-*layoutMenu*layoutMenuAlignNodes.label:	Align Nodes on Level
-
-! Dialog (Button) Labels
-
-*dlgNewTree.title:			New Tree
-*dlgNodeName.title:			Node Name
-*dlgInfo.title:				Information
-*dlgError.title:			Error!
-*dlgSpacing.title:			Tree Node Spacing
-*helpShell.title:			Help
-
-*dlgNewTreeForm.label:			Enter name of root node:
-*dlgNodeNameForm.label:			Enter name of new node:
-*dlgFileForm.label:			Enter name of file:
-*dlgInfoForm.label:			Information:
-*dlgErrorForm.label:			Error:
-*dlgSpacing.label:			Spacing Dialog
-*dlgLevelLabel.label:			Level spacing:
-*dlgSiblingLabel.label:			Sibling spacing:
-*dlgLevelValuator.width:		40
-*dlgLevelValuator.width:		40
-
-
-*dlgNewTreeOk.label:			Ok
-*dlgNewTreeCancel.label:		Cancel
-*dlgFileOk.label:			Ok
-*dlgFileCancel.label:			Cancel
-*dlgInfoButton.label:			Acknowledged
-*dlgErrorButton.label:			Acknowledged
-*dlgOkButton.label:			Ok
-*dlgCancelButton.label:			Cancel
-*dlgNodeNameOk.label:			Ok
-*dlgNodeNameCancel.label:		Cancel
-
-*helpDoneButton.label:			Dismiss
-*helpTitle.label:			Help for Drawing Dynamic Trees
-
-*statusText.width:			310
-*treeDrawingArea.width:			310
-*treeDrawingArea.height:		400
-*treeDrawingArea.Translations: #override \n\
-                                <Btn1Down>:	node_select(EDIT)\n\
-                                <Btn2Down>:	node_select(VIEW)\n\
-                                <Btn3Down>:	XawPositionSimpleMenu(nodeMenu)node_menu_prepare()XtMenuPopup(nodeMenu)\n
-!                                <Btn3Down>:	XawPositionSimpleMenu(nodeMenu)node_menu_prepare()maybe_menu_popup(nodeMenu)\n
diff -r 4de2936b4e77 -r 0132846995bd lisp/oobr/tree-x/dbl.c
--- a/lisp/oobr/tree-x/dbl.c	Mon Aug 13 09:42:28 2007 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,377 +0,0 @@
-/* ----------------------------------------------------------------------------
- *     Double buffering code
- * ----------------------------------------------------------------------------
- */
-
-
-#include "dbl.h"
-
-struct {                                               
-    unsigned short red;                                        
-    unsigned short green;
-    unsigned short blue;
-} color[] = {
-    { 65280, 65280, 65280 }, /* white  */                      
-    {     0,     0, 65280 }, /* blue   */
-    {     0, 65280,     0 }, /* green  */
-    { 65280,     0,     0 }, /* red    */
-    { 42240, 10752, 10752 }, /* brown  */
-    { 65280, 32512,     0 }, /* orange */
-    { 32512, 32512, 32512 }, /* gray   */
-    {     0,     0,     0 }  /* black  */
-};                       
-
-/* ------------------------------------------------------------------------- */
-
-DoubleBuffer *
-DBLcreate_double_buffer (display, window, backing_store, colors, num_colors)
-   Display *display;
-   Window   window;
-   int      backing_store;
-   XColor  *colors;
-   int      num_colors;
-{                                                                
-   int i, j, k, l, m, offset, mask, size;
-   int max_planes;
-
-   char         *string;
-   Surface     *surface;
-   DoubleBuffer     *db;
-   XGCValues       xgcv;
-   unsigned long   xgcvmask;
-
-/* allocate the double buffer structure,  and then open the display */
-
-   if ((db = (DoubleBuffer *)calloc(1, sizeof(DoubleBuffer))) == 0) {
-      printf("DBLopen_double_buffer : memory allocation error\n");
-      return (NULL);
-   }                                                          
-
-/* note the display */
-
-   db->display  = display;
-
-/* first some information about our display */
-
-   db->screen   = DefaultScreenOfDisplay(db->display);
-   db->window   = window;
-
-/* now get some information on color resources */
-
-   db->visual   = DefaultVisualOfScreen(db->screen);
-   db->depth    = DefaultDepthOfScreen(db->screen);
-   db->colormap = DefaultColormapOfScreen(db->screen);
-
-/* set up colors */
-
-   for (i = 0 ; i < num_colors; i++) {
-      color[i].red   = colors[i].red;
-      color[i].green = colors[i].green;
-      color[i].blue  = colors[i].blue;
-   }
-   
-/* see if the user wanted to limit the number of planes used
-   then see how many are available,  make it a multiple of 2 */
-
-   if ((string = getenv("DBL_MAX_PLANES")) == NULL)
-      max_planes = DBL_MAX_PLANES;
-   else {
-      max_planes = atoi(string);
-   }
-
-   if ((db->num_planes = PlanesOfScreen(db->screen)) > max_planes) {
-      db->num_planes = max_planes;
-   }
-
-   db->num_planes = (db->num_planes >> 1) << 1;
-
-
-/* otherwise allocate contiguous planes to do double buffering */
-
-   while (db->num_planes >= DBL_MIN_PLANES) {
-      if (XAllocColorCells (db->display, db->colormap, 1, db->planes,
-			    db->num_planes, db->pixels, 1)) {
-	 break;
-      }
-
-      db->num_planes -= 2;
-   }
-
-/* if we have at least minimum planes, then we can do double
-   buffering and we want to setup our surfaces and colormaps */
-
-   if (db->num_planes < DBL_MIN_PLANES)
-      db->num_surfaces = 0;
-   else {
-      db->num_colors   = 1 << (db->num_planes >> 1);
-      db->num_surfaces = DBL_MAX_SURFACES;
-
-   /* if the number of colors is less than DBL_MAX_COLORS,
-      then we want to make sure black is the  last  color */
-
-      for (i = db->num_colors - 1; i < DBL_MAX_COLORS; i++) {
-         color[i].red   = color[DBL_MAX_COLORS - 1].red;
-         color[i].green = color[DBL_MAX_COLORS - 1].green;
-         color[i].blue  = color[DBL_MAX_COLORS - 1].blue;
-      }
-
-   /* we have a set of contiguous planes.  compute a mask for
-      the planes,  and figure out the offset in the  hardware */
-
-      for (i = 0; i < db->num_planes; i++) {
-         db->mask |= db->planes[i];
-      }
-
-      mask   = db->mask;
-      offset = 0;
-
-      while ((mask & 1) == 0) {
-         mask = mask >> 1;
-         offset = offset + 1;
-      }
-
-      mask = (1 << (db->num_planes >> 1)) - 1;                             
-
-   /* now create the surfaces that will contain plane mask and
-      colormap information that we use to do double  buffering */
-
-      for (i = 0; i < db->num_surfaces; i++) {
-         size = sizeof(Surface) + sizeof(XColor) * (1 << db->num_planes);
-
-         if ((surface = (Surface *)malloc(size)) != NULL)
-            db->surface[i] = surface;
-         else {
-            printf("DBLcreate_double_buffer : memory allocation error\n");
-            DBLdelete_double_buffer(db);
-            return(NULL);
-         }
-
-         surface->offset     = offset + i * (db->num_planes >> 1);
-         surface->mask       = mask << surface->offset;
-         surface->num_colors = 1 << db->num_planes;
-  
-      /* compute our pixel values by taking every permutation
-         of the pixel and planes returned by XAllocColorCells */
-
-         for (j = 0; j < (surface->num_colors); j++) {
-            surface->color[j].pixel = db->pixels[0];
-         }
-
-         for (j = 0; j < db->num_planes; j++) {
-            for (k = (1 << j); k < (surface->num_colors); k += (2 << j)) {
-               for (l = k; l < (k + (1 << j)); l++) {                  
-                  surface->color[l].pixel |= db->planes[j];
-               }
-            }
-         }
-
-       /* now populate those pixels with the proper  colors  so             
-          that we can do animation by banging in a new colormap */
-
-         for (j = 0; j < surface->num_colors; j++) {
-            k = (j & surface->mask) >> surface->offset;
-
-            surface->color[j].red   = color[k].red;                 
-            surface->color[j].green = color[k].green;
-            surface->color[j].blue  = color[k].blue;
-
-            surface->color[j].flags = DoRed | DoGreen | DoBlue;
-         }
-      }
-
-      db->current_surface = 0;
-   }
-
-
-/* now figure out what pixel values we will use to draw with
-   and store them in the double buffer structure */
-
-   if (db->num_surfaces == 0) {
-      db->num_colors = DBL_MAX_COLORS;
-      db->colors[0]  = WhitePixelOfScreen(db->screen);
-
-      for (i = 1; i < db->num_colors; i++) {
-	 db->colors[i] = BlackPixelOfScreen(db->screen);
-      }
-   }
-   else {
-      for (i = 0; i < db->num_colors; i++) {
-         j = (i << (db->num_planes >> 1)) + i;
-         db->colors[i] = db->surface[0]->color[j].pixel;
-      }
-   }
-
-/* fill out the remaining colors with the last color */
-
-   for (; i < DBL_MAX_COLORS; i++) {
-      db->colors[i] = db->colors[db->num_colors - 1];
-   }
-
-   db->width   = WidthOfScreen(db->screen);
-   db->height  = HeightOfScreen(db->screen);
-
-/* if there are no surfaces then we are doing animation with
-   a frame buffer,  so create a pixmap as our frame buffer   */
-                         
-   if (db->num_surfaces > 0)
-      db->drawable = db->window;   
-   else {
-      db->frame = XCreatePixmap(db->display, db->window,
-				db->width, db->height, db->depth);
-      db->drawable = db->frame;
-   }                                                                    
-
-/* if they have requested backing store,  then create an extra
-   pixmap which we can use as backing store to handle exposures */
-
-   if (backing_store) {
-      db->backing = XCreatePixmap(db->display, db->window,
-				  db->width, db->height, db->depth);
-   }                                                   
-
-/*  use the 0 pixel from one of the surfaces for the background */
-
-   xgcv.background = DBLinq_background(db);
-   xgcv.line_style = LineSolid;
-   xgcv.line_width = 0;
-   xgcv.cap_style  = CapButt;
-   xgcv.join_style = JoinRound;
-   xgcvmask = GCBackground | GCLineStyle | GCLineWidth | GCCapStyle | 
-              GCJoinStyle;
-   
-   db->gc = XCreateGC(db->display, db->drawable, xgcvmask, &xgcv);
-
-/* do an initial frame to setup the colormap,  and return */
-
-   DBLbegin_frame(db);
-   DBLend_frame(db, 1);
-   return (db);
-}
-
-/* ------------------------------------------------------------------------- */
-
-void
-DBLdelete_double_buffer (db)
-     DoubleBuffer *db;
-{
-  int i;
-
-  /* remove and and all surfaces that are out there */
-  
-  for (i = 0; i < DBL_MAX_SURFACES; i++) {
-    if (db->surface[i] != 0) {
-      free(db->surface[i]);                               
-    }
-  }
-
-  /* now clean up the various resources used for this double buffer */
-  
-  if (db->frame != 0) {
-    XFreePixmap(db->display, db->frame);
-  }
-  
-  if (db->backing != 0) {
-    XFreePixmap(db->display, db->backing);
-  }
-  
-  /* if we created our own private colormap,  then free the colormap */
-  
-  if (db->colormap != DefaultColormapOfScreen(db->screen)) {
-    XFreeColormap(db->display, db->colormap);
-  }
-  
-  free (db);
-}
-
-/* ------------------------------------------------------------------------- */
-
-unsigned long
-DBLinq_background(db)
-   DoubleBuffer *db;
-{
-   if (db->num_surfaces > 0)
-      return(db->surface[0]->color[0].pixel);
-   else 
-      return(WhitePixelOfScreen(db->screen));
-}
-
-/* ------------------------------------------------------------------------- */
-
-DBLbegin_frame(db)
-     DoubleBuffer *db;
-{
-  Surface   *surface;
-  
-  /* there will be at most two surfaces optimize with "&"*/
-  
-  if (db->num_surfaces > 0) {                       
-    db->current_surface = (db->current_surface + 1) & 1;                  
-    surface = db->surface[db->current_surface];
-  }
-   
-  /* clear the back surface of the window which may actually be a pixmap */ 
-  
-  if (db->num_surfaces > 0) 
-    XSetPlaneMask (db->display, db->gc, surface->mask);
-  
-  /* clear out the back surface or frame buffer as appropriate */
-  
-  XSetFunction(db->display, db->gc, GXclear);
-  XFillRectangle(db->display, db->drawable, db->gc,
-		 0, 0, db->width, db->height);
-  
-  /* set writing mode back to copy */
-  XSetFunction (db->display, db->gc, GXcopy);
-  
-  XSync(db->display, False);
-}  
-         
-
-/* ------------------------------------------------------------------------- */
-                                            
-
-DBLend_frame(db, init)
-     DoubleBuffer *db;                                                   
-     short init;
-{
-  Surface  *surface;
-  
-  /* if there are no drawing surfaces,  then we are doing animation   
-     with a frame buffer, copy the frame buffers to their viewports */
-
-  if (db->num_surfaces == 0) {
-     if (! init)
-        XCopyArea (db->display, db->frame, db->window,
-	           db->gc, 0,0, db->width, db->height, 0,0);
-  } else {
-    
-    /* otherwise,  we can flip the surface by banging in the new colormap */
-
-    XSync(db->display, False);
-    surface = db->surface[db->current_surface];
-    XStoreColors (db->display, db->colormap,
-		  surface->color, surface->num_colors);
-  }
-
-  if (db->backing != 0) {
-    XCopyArea (db->display, db->window, db->backing,
-	       db->gc, 0,0, db->width, db->height, 0,0);
-  }
-  
-  /* make sure this all goes off to the server,  right away */
-  
-  XSync(db->display, False);
-}
-
-
-
-
-
-
-
-
-
-
-
-
-
diff -r 4de2936b4e77 -r 0132846995bd lisp/oobr/tree-x/dbl.h
--- a/lisp/oobr/tree-x/dbl.h	Mon Aug 13 09:42:28 2007 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,66 +0,0 @@
-/* ----------------------------------------------------------------------------
- *     Double buffering code
- * ----------------------------------------------------------------------------
- */
-
-#include <stdio.h>
-#include <X11/Xlib.h>
-
-#define DBL_MAX_SURFACES 2
-#define DBL_MIN_PLANES   2
-#define DBL_MAX_PLANES   6
-#define DBL_MAX_COLORS   (1 << (DBL_MAX_PLANES >> 1))
-
-typedef struct _surface {
-    int	         mask;          /* mask to use this surface           */
-    int	       offset;          /* offset within colormap             */
-    int	   num_colors;          /* number of colors in color array    */
-    XColor   color[1];          /* the actual color array             */
-} Surface;
-
-typedef struct _doublebuffer {
-    Display     *display;       /* X display for windows and pixmaps  */
-    Screen      *screen;	/* X screen                           */
-    Window	 window;	/* X window for this double buffer    */
-
-    int		 width;		/* width of window                    */
-    int          height;	/* height of window                   */
-
-    Pixmap	 frame;	        /* pixmap for frame buffer            */
-    Pixmap       backing;       /* pixmap for backing store           */
-    Drawable     drawable;      /* copy of window/pixmap we draw in   */
-
-    GC		 gc;		/* GC used to draw the drawable       */
-    Visual      *visual;	/* X visual                           */
-    Colormap     colormap;	/* X colormap identifier              */
-    int          depth;	        /* depth of screen in planes          */
-    int          num_planes;    /* number of planes used              */
-
-/* surface information is used to do double buffering                 */ 
-
-   int       num_surfaces;
-   int       current_surface;
-   Surface  *surface[DBL_MAX_SURFACES];
-
-/* we need to remember which pixels and planes we allocated           */
-
-   int       mask;
-   long      pixels[DBL_MAX_COLORS];                                  
-   long      planes[DBL_MAX_PLANES];
-
-/* the pixel values one should use when drawing to the viewports      */
-
-   int       num_colors; 
-   int       colors[DBL_MAX_COLORS];
-} DoubleBuffer;
-
-
-extern DoubleBuffer  *DBLcreate_double_buffer();
-extern void           DBLdelete_double_buffer();
-extern unsigned long  DBLinq_background();
-extern char          *getenv();
-
-
-
-
-
diff -r 4de2936b4e77 -r 0132846995bd lisp/oobr/tree-x/defs.h
--- a/lisp/oobr/tree-x/defs.h	Mon Aug 13 09:42:28 2007 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,50 +0,0 @@
-/* ----------------------------------------------------------------------------
- * File    : defs.h
- * Purpose : general defines for dynamic tree program
- * ----------------------------------------------------------------------------
- */
-
-#include <stdio.h>
-
-#define ASSERT(x, msg) \
-   if ((x) == NULL) { fprintf(stderr, "%s: %s\n", ProgramName, msg); exit(0); }
-
-#define NASSERT(x, msg) \
-   if ((x) == NULL) { fprintf(stderr, "%s: %s\n", ProgramName, msg); \
-		      return (NULL); }
-
-#define WARN(msg) \
-   fprintf(stderr, "%s: %s\n", ProgramName, msg)
-
-#define WARN_1(msg, arg1) \
-   fprintf(stderr, "%s: %s %s", ProgramName, msg, arg1)
-
-#define WARN_4(msg1, arg1, msg2, arg2) \
-    fprintf(stderr, "%s: %s %s; %s %s\n", ProgramName, msg1, arg1, msg2, arg2)
-
-#ifdef GLOBALS
-#define Global
-#else
-#define Global extern
-#endif
-
-Global char        *ProgramName;
-
-#undef Global
-#undef GLOBALS
-
-#ifndef TRUE
-#define TRUE 1
-#endif
-
-#ifndef FALSE
-#define FALSE 0
-#endif
-
-#ifndef NULL
-#define NULL 0L
-#endif
-
-#ifndef MAX
-#define MAX(x, y) ((x) < (y)) ? (y) : (x)
-#endif
diff -r 4de2936b4e77 -r 0132846995bd lisp/oobr/tree-x/dissolve.c
--- a/lisp/oobr/tree-x/dissolve.c	Mon Aug 13 09:42:28 2007 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,245 +0,0 @@
-/* ----------------------------------------------------------------------------
- * Animated display of collapse and expansion of nodes in a tree.
- * ----------------------------------------------------------------------------
- */
-
-#include <X11/Xlib.h>
-
-#include "dissolve.h"
-
-static Pixmap DissolvePixmaps[NUM_DISSOLVE_STEPS];
-static GC     DissolveInGC;
-static GC     DissolveOutGC;
-static GC     DissolveInLineGC[NUM_LINE_STEPS];
-static GC     DissolveOutLineGC[NUM_LINE_STEPS];
-
-static unsigned char first_dash[] =  {1, 3}; 
-static unsigned char second_dash[] = {1, 1}; 
-
-InitializeDissolveEffect(dpy, drawable, fg_pixel, bg_pixel)
-   Display *dpy;
-   Drawable drawable;
-   int fg_pixel;
-   int bg_pixel;
-{   
-   unsigned long  gcvaluemask;
-   XGCValues      gcvalues;
-   int i;
-
-   /* make DissolveOutGC */
-   gcvalues.background = bg_pixel; 
-   gcvalues.foreground = bg_pixel;
-   gcvalues.function   = GXcopy;
-   gcvalues.fill_style = FillStippled;
-   gcvalues.line_width = 0;
-   gcvaluemask = GCFunction | GCForeground | GCBackground | GCFillStyle |
-                 GCLineWidth;
-   DissolveOutGC = XCreateGC(dpy, drawable, gcvaluemask, &gcvalues);
-   XSetTSOrigin(dpy, DissolveOutGC, 0, 0);
-
-   /* make DissolveInGC */
-   gcvalues.foreground = fg_pixel;
-   DissolveInGC = XCreateGC(dpy, drawable, gcvaluemask, &gcvalues);
-   XSetTSOrigin(dpy, DissolveInGC, 0, 0);
-
-   /* make DissolveOutLineGC */
-   i = 0;
-   gcvalues.foreground = bg_pixel;
-   gcvalues.fill_style = FillSolid;
-   gcvalues.line_style = LineOnOffDash;
-   gcvalues.line_width = 0;
-   gcvaluemask = GCFunction | GCForeground | GCBackground |
-                 GCFillStyle | GCLineStyle | GCLineWidth ;
-   DissolveOutLineGC[i] = XCreateGC(dpy, drawable, gcvaluemask, &gcvalues);
-   XSetDashes(dpy, DissolveOutLineGC[i], 0, first_dash, 2);
-   i++;
-   DissolveOutLineGC[i] = XCreateGC(dpy, drawable, gcvaluemask, &gcvalues);
-   XSetDashes(dpy, DissolveOutLineGC[i], 0, second_dash, 2);
-   i++;
-   DissolveOutLineGC[i] = XCreateGC(dpy, drawable, gcvaluemask, &gcvalues);
-   XSetDashes(dpy, DissolveOutLineGC[i], 3, first_dash, 2);
-   i++;
-   gcvalues.line_style = LineSolid;
-   DissolveOutLineGC[i] = XCreateGC(dpy, drawable, gcvaluemask, &gcvalues);   
-
-   /* make DissolveInLineGC */
-   i = 0;
-   gcvalues.foreground = fg_pixel;
-   gcvalues.fill_style = FillSolid;
-   gcvalues.line_style = LineOnOffDash;
-   gcvalues.line_width = 0;
-   gcvaluemask = GCFunction | GCForeground | GCBackground |
-                 GCFillStyle | GCLineStyle | GCLineWidth;
-   DissolveInLineGC[i] = XCreateGC(dpy, drawable, gcvaluemask, &gcvalues);
-   XSetDashes(dpy, DissolveInLineGC[i], 0, first_dash, 2);
-   i++;
-   DissolveInLineGC[i] = XCreateGC(dpy, drawable, gcvaluemask, &gcvalues);
-   XSetDashes(dpy, DissolveInLineGC[i], 0, second_dash, 2);
-   i++;
-   DissolveInLineGC[i] = XCreateGC(dpy, drawable, gcvaluemask, &gcvalues);
-   XSetDashes(dpy, DissolveInLineGC[i], 3, first_dash, 2);
-   i++;
-   gcvalues.line_style = LineSolid;
-   DissolveInLineGC[i] = XCreateGC(dpy, drawable, gcvaluemask, &gcvalues);   
-
-   i = 0;
-   DissolvePixmaps[i] = XCreateBitmapFromData(dpy, drawable,
-					      first_bits,
-					      first_width,
-					      first_height);
-   i++;
-   DissolvePixmaps[i] = XCreateBitmapFromData(dpy, drawable,
-					      second_bits,
-					      second_width,
-					      second_height);
-   i++;
-   DissolvePixmaps[i] = XCreateBitmapFromData(dpy, drawable,
-					      third_bits,
-					      third_width,
-					      third_height);
-   i++;
-   DissolvePixmaps[i] = XCreateBitmapFromData(dpy, drawable,
-					      fourth_bits,
-					      fourth_width,
-					      fourth_height);
-   i++;
-   DissolvePixmaps[i] = XCreateBitmapFromData(dpy, drawable,
-					      fifth_bits,
-					      fifth_width,
-					      fifth_height);
-   i++;
-   DissolvePixmaps[i] = XCreateBitmapFromData(dpy, drawable,
-					      sixth_bits,
-					      sixth_width,
-					      sixth_height);
-   i++;
-   DissolvePixmaps[i] = XCreateBitmapFromData(dpy, drawable,
-					      seventh_bits,
-					      seventh_width,
-					      seventh_height);
-   i++;
-   DissolvePixmaps[i] = XCreateBitmapFromData(dpy, drawable,
-					      eighth_bits,
-					      eighth_width,
-					      eighth_height);
-}
-
-DissolveRectangle(dpy, drawable, x, y, width, height, mode)
-   Display *dpy;
-   Window drawable;
-   int x, y, width, height;
-   int mode;
-{
-   int i;
-   GC gc;
-
-   gc = mode ? DissolveOutGC : DissolveInGC;
-
-   for (i = 0 ; i < NUM_DISSOLVE_STEPS ; i++) {
-      XSetStipple(dpy, gc, DissolvePixmaps[i]);
-      if (mode)
-	 XFillRectangle(dpy, drawable, gc, x, y, width, height);
-      else
-	 XDrawRectangle(dpy, drawable, gc, x, y, width, height);
-      XFlush(dpy);
-      usleep(50000);
-   }
-}
-   
-DissolveRectangles(dpy, drawable, rectangles, nrectangles, mode)
-   Display *dpy;
-   Window drawable;
-   XRectangle rectangles[];
-   int nrectangles;
-   int mode;
-{
-   int i;
-   GC gc;
-
-   gc = mode ? DissolveOutGC : DissolveInGC;
-
-   for (i = 0 ; i < NUM_DISSOLVE_STEPS ; i++) {
-      XSetStipple(dpy, gc, DissolvePixmaps[i]);
-      if (mode)
-	 XFillRectangles(dpy, drawable, gc, rectangles, nrectangles);
-      else
-	 XDrawRectangles(dpy, drawable, gc, rectangles, nrectangles);
-      XFlush(dpy);
-      usleep(50000);
-   }
-}
-
-DissolveSegments(dpy, drawable, segments, nsegments, mode)
-   Display *dpy;
-   Window drawable;
-   XSegment segments[];
-   int nsegments;
-   int mode;
-{
-   int i;
-   GC *gc;
-
-   gc = mode ? DissolveOutLineGC : DissolveInLineGC;
-
-   for (i = 0 ; i < NUM_LINE_STEPS ; i++) {
-      XDrawSegments(dpy, drawable, gc[i], segments, nsegments);
-      XFlush(dpy);
-      usleep(50000);
-   }
-}
-
-DissolveTree(dpy, drawable, rectangles, nrectangles, segments, nsegments, mode)
-   Display *dpy;
-   Window drawable;
-   XRectangle rectangles[];
-   int nrectangles;
-   XSegment segments[];
-   int nsegments;
-   int mode;
-{
-   int i;
-   int j = 0;
-   int idle;
-   GC gc;
-   GC *lineGC;
-
-   gc = mode ? DissolveOutGC : DissolveInGC;
-   lineGC = mode ? DissolveOutLineGC : DissolveInLineGC;
-
-   /* speed up if there are lots of nodes */
-   idle = nrectangles > 50 ? 0 : 25000;
-   
-   for (i = 0 ; i < NUM_DISSOLVE_STEPS ; i++) {
-      XSetStipple(dpy, gc, DissolvePixmaps[i]);
-      if (mode)
-	 XFillRectangles(dpy, drawable, gc, rectangles, nrectangles);
-      else
-	 XDrawRectangles(dpy, drawable, gc, rectangles, nrectangles);
-      if (i % 2)
-	 XDrawSegments(dpy, drawable, lineGC[j++], segments, nsegments);
-      XFlush(dpy);
-      usleep(idle);
-   }
-}
-
-DissolvePolygon(dpy, drawable, pts, num_pts, mode)
-   Display *dpy;
-   Window drawable;
-   XPoint *pts;
-   int num_pts;
-   int mode;
-{
-   int i;
-   GC gc;
-
-   gc = mode ? DissolveOutGC : DissolveInGC;
-
-   for (i = 0 ; i < NUM_DISSOLVE_STEPS ; i++) {
-      XSetStipple(dpy, gc, DissolvePixmaps[i]);
-      XFillPolygon(dpy, drawable, gc, pts, num_pts,
-		   Nonconvex, CoordModeOrigin);
-      XFlush(dpy);
-      usleep(50000);
-   }
-}
-
diff -r 4de2936b4e77 -r 0132846995bd lisp/oobr/tree-x/dissolve.h
--- a/lisp/oobr/tree-x/dissolve.h	Mon Aug 13 09:42:28 2007 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,64 +0,0 @@
-/* ----------------------------------------------------------------------------
- * Animated display of collapse and expansion of nodes in a tree.
- * ----------------------------------------------------------------------------
- */
-
-#define NUM_DISSOLVE_STEPS 8
-#define NUM_LINE_STEPS     4
-
-#define first_width 16
-#define first_height 16
-
-static char first_bits[] = {
- 0x88, 0x04, 0x00, 0x80, 0x20, 0x10, 0x00, 0x81, 0x12, 0x00, 0x00, 0x00,
- 0x00, 0x02, 0x82, 0x40, 0x00, 0x00, 0x12, 0x14, 0x00, 0x00, 0x0a, 0x28,
- 0x40, 0x01, 0x05, 0x00, 0xa0, 0x92, 0x08, 0x00 };
-#define second_width 16
-#define second_height 16
-
-static char second_bits[] = {
- 0x51, 0x20, 0x04, 0x02, 0x00, 0x88, 0x02, 0x00, 0x08, 0x09, 0x40, 0x00,
- 0x04, 0x04, 0x00, 0xa0, 0x80, 0x08, 0x08, 0x00, 0x00, 0xa8, 0x00, 0x00,
- 0x28, 0x28, 0x00, 0x80, 0x01, 0x00, 0x10, 0x82 };
-#define third_width 16
-#define third_height 16
-
-static char third_bits[] = {
- 0x00, 0x01, 0x12, 0x44, 0x00, 0x01, 0x00, 0x08, 0x00, 0x42, 0x2a, 0x08,
- 0x80, 0x00, 0x04, 0x10, 0x01, 0x04, 0x00, 0x80, 0xa9, 0x04, 0x00, 0x00,
- 0x00, 0x10, 0x0a, 0x05, 0x40, 0x00, 0x00, 0x50 };
-#define fourth_width 16
-#define fourth_height 16
-
-static char fourth_bits[] = {
- 0x02, 0x88, 0x80, 0x00, 0x04, 0x40, 0x11, 0x02, 0x40, 0x90, 0x05, 0x00,
- 0x00, 0x08, 0x11, 0x01, 0x40, 0x00, 0x00, 0x41, 0x14, 0x00, 0x00, 0x12,
- 0x10, 0x00, 0x40, 0x40, 0x08, 0x00, 0xa0, 0x04 };
-#define fifth_width 16
-#define fifth_height 16
-
-static char fifth_bits[] = {
- 0x24, 0x00, 0x00, 0x08, 0x09, 0x20, 0x20, 0x04, 0x00, 0x00, 0x00, 0x85,
- 0x10, 0x20, 0x40, 0x02, 0x14, 0x40, 0x00, 0x08, 0x02, 0x01, 0x10, 0x40,
- 0x04, 0x04, 0x20, 0x20, 0x00, 0x00, 0x42, 0x29 };
-#define sixth_width 16
-#define sixth_height 16
-
-static char sixth_bits[] = {
- 0x00, 0x12, 0x28, 0x00, 0x02, 0x00, 0x88, 0x00, 0x01, 0x20, 0x90, 0x02,
- 0x01, 0x50, 0x20, 0x04, 0x08, 0xa0, 0x41, 0x00, 0x00, 0x00, 0x24, 0x05,
- 0x00, 0x80, 0x00, 0x10, 0x10, 0x40, 0x05, 0x00 };
-#define seventh_width 16
-#define seventh_height 16
-
-static char seventh_bits[] = {
- 0x00, 0x40, 0x01, 0x10, 0x90, 0x02, 0x00, 0x50, 0xa4, 0x04, 0x00, 0x20,
- 0x20, 0x80, 0x08, 0x08, 0x00, 0x01, 0x04, 0x00, 0x40, 0x52, 0x00, 0x00,
- 0x81, 0x42, 0x10, 0x00, 0x04, 0x25, 0x00, 0x00 };
-#define eighth_width 16
-#define eighth_height 16
-
-static char eighth_bits[] = {
- 0x00, 0x00, 0x40, 0x21, 0x40, 0x04, 0x44, 0x20, 0x00, 0x00, 0x00, 0x50,
- 0x4a, 0x01, 0x00, 0x00, 0x22, 0x12, 0xa0, 0x22, 0x00, 0x00, 0xc1, 0x80,
- 0x02, 0x00, 0x80, 0x0a, 0x02, 0x08, 0x00, 0x00 };
diff -r 4de2936b4e77 -r 0132846995bd lisp/oobr/tree-x/draw.c
--- a/lisp/oobr/tree-x/draw.c	Mon Aug 13 09:42:28 2007 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1280 +0,0 @@
-/* ----------------------------------------------------------------------------
- * File    : draw.c
- * Purpose : drawing-specific routines for dynamic tree program
- * ----------------------------------------------------------------------------
- */
-
-#include <X11/Intrinsic.h>
-#include <X11/StringDefs.h>
-
-#include "defs.h"
-#include "tree.h"
-#include "dbl.h"
-#include "intf.h"
-
-/* ------------------------------------------------------------------------- */
-/*				Global Variables                             */
-/* ------------------------------------------------------------------------- */
-
-Tree *TheTree;
-
-
-/* ------------------------------------------------------------------------- */
-/*				Local Variables                              */
-/* ------------------------------------------------------------------------- */
-
-static char AnimationMode = FALSE;        
-static char strbuf[BUFSIZ];
-static int  AnimationStep = ANIMATION_STEP;
-
-/* ------------------------------------------------------------------------- */
-/*			 Forward Function Declarations                       */
-/* ------------------------------------------------------------------------- */
-
-void DrawNode();
-void DrawTreeContour();
-
-
-/* ------------------------------------------------------------------------- */
-/*				   Functions                                 */
-/* ------------------------------------------------------------------------- */
-
-
-/* ----------------------------------------------------------------------------
- * 
- *   BeginFrame() provides an abstraction for double buffering. It should
- *   be called prior to creating a new frame of animation.
- * 
- * ----------------------------------------------------------------------------
- */
-
-void
-BeginFrame()
-{
-  DBLbegin_frame(TreeDrawingAreaDB);
-}
-
-
-/* ----------------------------------------------------------------------------
- * 
- *   EndFrame() provides an abstraction for double buffering. It should
- *   be called after creating a new frame of animation.
- * 
- * ----------------------------------------------------------------------------
- */
-
-void
-EndFrame()
-{
-  DBLend_frame(TreeDrawingAreaDB, 0);
-}
-
-
-/* ----------------------------------------------------------------------------
- * 
- *   GetDrawingSize() gets the size of the drawing area, and returns the
- *   dimensions in the arguments.
- * 
- * ----------------------------------------------------------------------------
- */
-
-void
-GetDrawingSize(width, height)
-     int *width, *height;
-{
-  Dimension w, h;
-  
-  XtVaGetValues(TreeDrawingArea, 
-		XtNwidth, &w,
-		XtNheight, &h,
-		NULL);
-
-  *width  = (int) w;
-  *height = (int) h;
-}
-
-
-/* ----------------------------------------------------------------------------
- * 
- *   SetDrawingSize() sets the size of the drawing area to the given
- *   dimensions. 
- * 
- * ----------------------------------------------------------------------------
- */
-
-void
-SetDrawingSize(width, height)
-     int width, height;
-{
-  XtVaSetValues(TreeDrawingArea,
-		XtNwidth, (Dimension) width,
-		XtNheight,  (Dimension) height,
-		NULL);
-}
-
-
-/* ----------------------------------------------------------------------------
- * 
- *   SetDrawingTree() is used to specify what tree is to be drawn in the
- *   drawing area. 
- * 
- * ----------------------------------------------------------------------------
- */
-
-void
-SetDrawingTree(tree)
-   Tree *tree;
-{
-   TheTree = tree;
-}
-
-
-/* ----------------------------------------------------------------------------
- * 
- *   SetNodeLabel() sets the label text of the specified node and computes
- *   the bounding rectangle so that the layout can be determined. This
- *   function is called when new nodes are created. If TreeAlignNodes is
- *   True, the string is truncated so that the node's width is no longer
- *   than TreeParentDistance.
- * 
- * ----------------------------------------------------------------------------
- */
-
-void
-SetNodeLabel(node, label)
-     Tree *node;
-     char *label;
-{
-  int         len;
-  int         dummy;
-  XCharStruct rtrn;
-  
-  len = strlen(label);
-  while (len > 1) {
-    XTextExtents(TreeLabelFont, label, len, &dummy, &dummy, &dummy, &rtrn);
-    node->width  = rtrn.lbearing + rtrn.rbearing + (LABEL_MAT_WIDTH * 2) + 1;
-    node->height = rtrn.ascent + rtrn.descent + (LABEL_MAT_HEIGHT * 2) + 1;
-    if (TreeAlignNodes) {
-      if (node->width <= (2 * TreeParentDistance))
-	break;
-      else
-	len--;
-    }
-    else
-      break;
-  }
-  
-  node->label.text = label;
-  node->label.len  = len;
-  node->label.xoffset = LABEL_MAT_WIDTH + 1,
-  node->label.yoffset = rtrn.ascent + LABEL_MAT_HEIGHT + 1;
-}
-
-
-/* ----------------------------------------------------------------------------
- * 
- *   SetDrawColor() sets the drawing color of the TreeDrawingArea. 
- * 
- * ----------------------------------------------------------------------------
- */
-
-void
-SetDrawColor(color)
-     int color;
-{
-  XSetForeground(TreeDrawingAreaDB->display, TreeDrawingAreaDB->gc,
-		 TreeDrawingAreaDB->colors[color]);
-}
-
-/* ----------------------------------------------------------------------------
- * 
- *   SetLineWidth() sets the line width of lines drawn in the TreeDrawingArea.
- * 
- * ----------------------------------------------------------------------------
- */
-
-void
-SetLineWidth(width)
-     unsigned int width;
-{
-  XSetLineAttributes(TreeDrawingAreaDB->display, TreeDrawingAreaDB->gc,
-		     width, LineSolid, CapButt, JoinRound);
-}
-
-
-/* ----------------------------------------------------------------------------
- * 
- *   SetContours() sets the visibility of three possible contour modes: 
- *   the outside contour, all subtree contours, or selected contours.
- * 
- * ----------------------------------------------------------------------------
- */
-
-void
-SetContours(option)
-     ContourOption option;
-{
-  if (option == NoContours) {
-    switch (TreeShowContourOption) {
-    case OutsideContour:
-      DrawTreeContour(TheTree, New, BACKGROUND_COLOR, FALSE, FALSE, FALSE);
-      break;
-    case AllContours:
-      DrawTreeContour(TheTree, New, BACKGROUND_COLOR, FALSE, FALSE, TRUE);
-      break;
-    case SelectedContours:
-      DrawTreeContour(TheTree, New, BACKGROUND_COLOR, FALSE, TRUE, TRUE);
-      break;
-    default:
-      ;
-    }
-    DrawTreeContour(TheTree, New, BACKGROUND_COLOR, FALSE, FALSE, TRUE);
-  }
-  else if (option == OutsideContour) {
-    switch (TreeShowContourOption) {
-    case AllContours:
-      DrawTreeContour(TheTree, New, BACKGROUND_COLOR, FALSE, FALSE, TRUE);
-      break;
-    case SelectedContours:
-      DrawTreeContour(TheTree, New, BACKGROUND_COLOR, FALSE, TRUE, TRUE);
-      break;
-    default:
-      ;
-    }
-    DrawTreeContour(TheTree, New, CONTOUR_COLOR, FALSE, FALSE, FALSE);
-  } else if (option == AllContours) {
-    DrawTreeContour(TheTree, New, CONTOUR_COLOR, FALSE, FALSE, TRUE);
-  } else if (option == SelectedContours) {
-    switch (TreeShowContourOption) {
-    case AllContours:
-      DrawTreeContour(TheTree, New, BACKGROUND_COLOR, FALSE, FALSE, TRUE);
-      break;
-    case OutsideContour:
-      DrawTreeContour(TheTree, New, BACKGROUND_COLOR, FALSE, FALSE, FALSE);
-      break;
-    default:
-      DrawTreeContour(TheTree, New, BACKGROUND_COLOR, FALSE, FALSE, TRUE);
-    }
-    DrawTreeContour(TheTree, New, CONTOUR_COLOR, FALSE, TRUE, TRUE);
-  }
-  TreeShowContourOption = option;
-}
-
-
-/* ----------------------------------------------------------------------------
- * 
- *   HiliteNode() is called by Unzip() to change the color of a node. 
- * 
- * ----------------------------------------------------------------------------
- */
-
-void
-HiliteNode(tree, pos_mode)
-     Tree *tree;
-{
-  SetDrawColor(HIGHLIGHT_COLOR);
-  DrawNode(tree, pos_mode);
-  SetDrawColor(TREE_COLOR);
-}
-
-
-/* ----------------------------------------------------------------------------
- * 
- *   DrawNode() takes a node and draws the node in the specified widget
- *   at its (x,y) coordinate. (x, y) indicates the upper-left corner where
- *   the node is drawn. Also, a line is drawn from the center of the left
- *   edge to the center of the parent's right edge. 'draw_mode' specifies 
- *   the drawing mode (whether or not the node is erased, rather than drawn).
- *   'pos_mode' determines whether or not to use the old position of the node.
- *   This flag is used in animating the movement of a node from its old
- *   position to its new position.
- * 
- * ----------------------------------------------------------------------------
- */
-
-void
-DrawNode(node, pos_mode)
-     Tree     *node;
-     PosMode  pos_mode;
-{
-  Widget   w;
-  GC       gc;
-  
-  w  = TreeDrawingArea;
-  gc = TreeDrawingAreaDB->gc;
-  
-  if (pos_mode == Old) {
-    XDrawString(XtDisplay(w), XtWindow(w), gc,
-		node->old_pos.x + node->label.xoffset,
-		node->old_pos.y + node->label.yoffset,
-		node->label.text, node->label.len);
-    XDrawRectangle(XtDisplay(w), XtWindow(w), gc,
-		   node->old_pos.x, node->old_pos.y,
-		   node->width, node->height);
-    if (node->parent) 
-      XDrawLine(XtDisplay(w), XtWindow(w), gc,
-		node->old_pos.x - 1,
-		node->old_pos.y + (node->height / 2),
-		node->parent->old_pos.x + node->parent->width + 1,
-		node->parent->old_pos.y + (node->parent->height / 2));
-    if (node->elision) {
-      XSetFillStyle(TreeDrawingAreaDB->display, TreeDrawingAreaDB->gc,
-		    FillTiled);
-      XFillRectangle(XtDisplay(w), XtWindow(w), gc,
-		     node->old_pos.x + node->width - ELISION_WIDTH,
-		     node->old_pos.y + 1, ELISION_WIDTH, node->height - 1);
-      XSetFillStyle(TreeDrawingAreaDB->display, TreeDrawingAreaDB->gc,
-		    FillSolid);
-    }
-  } else {
-    XDrawString(XtDisplay(w), XtWindow(w), gc,
-		node->pos.x + node->label.xoffset,
-		node->pos.y + node->label.yoffset,
-		node->label.text, node->label.len);
-    
-    XDrawRectangle(XtDisplay(w), XtWindow(w), gc,
-		   node->pos.x, node->pos.y,
-		   node->width, node->height);
-    if (node->parent) 
-      XDrawLine(XtDisplay(w), XtWindow(w), gc,
-		node->pos.x - 1,
-		node->pos.y + (node->height / 2),
-		node->parent->pos.x + node->parent->width + 1,
-		node->parent->pos.y + (node->parent->height / 2));
-    if (node->elision) {
-      XSetFillStyle(TreeDrawingAreaDB->display, TreeDrawingAreaDB->gc,
-		    FillTiled);
-      XFillRectangle(XtDisplay(w), XtWindow(w), gc,
-		     node->pos.x + node->width - ELISION_WIDTH,
-		     node->pos.y + 1, ELISION_WIDTH, node->height - 1);
-      XSetFillStyle(TreeDrawingAreaDB->display, TreeDrawingAreaDB->gc,
-		    FillSolid);
-    }
-  }
-}
-
-
-/* ----------------------------------------------------------------------------
- * 
- *   DrawTreeContour() draws the contour of the specified subtree. Bridges
- *   are not traversed, so the actual subtree contour is drawn, as opposed
- *   to the merged contour. 'color' specifies the drawing color. If 'detach'
- *   is True,  the lines attaching the subtree contour to the node are not
- *   drawn.  If 'select' is true, then only subtrees that are flagged as
- *   selected are shown. If 'recursive' is True, the entire tree is traversed.
- * 
- * ----------------------------------------------------------------------------
- */
-
-void
-DrawTreeContour(tree, pos_mode, color, detach, select, recursive)
-     Tree *tree;
-     PosMode pos_mode;
-     int color;
-     int detach;
-     int select;
-     int recursive;
-{
-  Widget w = TreeDrawingArea;
-  Polyline *contour, *tail;
-  Tree *child;
-  int x, y, i;
-
-  if (tree == NULL)
-    return;
-
-  if ((select && tree->show_contour) || !select) {
-
-    SetDrawColor(color);
-    SetLineWidth(TreeContourWidth);
-   
-    /* draw upper contour */
-    contour = tree->contour.upper.head;
-    tail    = tree->contour.upper.tail;
-    if (pos_mode == Old) {
-      x = tree->old_pos.x - tree->border;
-      y = tree->old_pos.y - tree->border;
-    }
-    else {
-      x = tree->pos.x - tree->border;
-      y = tree->pos.y - tree->border;
-    }
-
-    if (detach) {		/* skip over attaching lines */
-      for (i = 0 ; i < 2 ; i++) {
-	x += contour->dx;
-	y += contour->dy;
-	contour = contour->link;
-      }
-    }
-    
-    while (contour) {
-      XDrawLine(XtDisplay(w), XtWindow(w), TreeDrawingAreaDB->gc,
-		x, y, x + contour->dx, y + contour->dy);
-      x += contour->dx;
-      y += contour->dy;
-      if (contour == tail)	/* make sure you don't follow bridges */
-	contour = NULL;
-      else
-	contour = contour->link;
-    }
-
-    /* draw lower contour */
-    contour = tree->contour.lower.head;
-    tail    = tree->contour.lower.tail;
-    if (pos_mode == Old) {
-      x = tree->old_pos.x - tree->border;
-      y = tree->old_pos.y + tree->border + tree->height;
-    } else {
-      x = tree->pos.x - tree->border;
-      y = tree->pos.y + tree->border + tree->height;
-    }
-
-    if (detach) {		/* skip over attaching lines */
-      for (i = 0 ; i < 2 ; i++) {
-	x += contour->dx;
-	y += contour->dy;
-	contour = contour->link;
-      }
-    }
-
-    while (contour) {
-      XDrawLine(XtDisplay(w), XtWindow(w), TreeDrawingAreaDB->gc,
-		x, y, x + contour->dx, y + contour->dy);
-      x += contour->dx;
-      y += contour->dy;
-      if (contour == tail)	/* make sure you don't follow bridges */
-	contour = NULL;
-      else
-	contour = contour->link;
-    }
-  }
-  
-  if (recursive) {
-    FOREACH_CHILD(child, tree)
-      if (!child->elision)
-	DrawTreeContour(child, pos_mode, color,
-			detach, select, recursive);
-  }
-
-  SetDrawColor(TREE_COLOR);
-  SetLineWidth(0);
-}
-
-
-/* ----------------------------------------------------------------------------
- * 
- *   DrawTree() traverses the given tree, drawing the node and connecting
- *   segments. The tree contours are also drawn at each step, if enabled.
- *   'draw_mode' specifies the drawing mode in which the tree is drawn.
- *   'pos_mode' determines whether or not to use the old position of the node.
- *   This flag is used in animating the movement of a node from its old
- *   position to its new position. DrawNode() is called to draw an individual 
- *   node.
- * 
- * ----------------------------------------------------------------------------
- */
-
-void
-DrawTree(tree, pos_mode)
-     Tree     *tree;
-     PosMode  pos_mode;
-{
-  if (tree == NULL)
-    return;
-
-  DrawNode(tree, pos_mode);
-
-  /* do stuff that animates Unzip() */
-  if (tree->split) {
-    if (!AnimationMode ||
-	(tree->pos.x == tree->old_pos.x &&
-	 tree->pos.y == tree->old_pos.y))
-      DrawTreeContour(tree, pos_mode, SPLIT_COLOR, FALSE, FALSE, FALSE);
-    else
-      DrawTreeContour(tree, pos_mode, ACTION_COLOR, FALSE, FALSE, FALSE);
-  }
-  if (tree->on_path)
-    HiliteNode(tree, pos_mode);
-
-  if (tree->child && !tree->elision) 
-    DrawTree(tree->child, pos_mode);
-  if (tree->sibling)
-    DrawTree(tree->sibling, pos_mode);
-}
-
-
-/* ----------------------------------------------------------------------------
- * 
- *   ShiftTree() adjusts the positions of each node so that it moves from
- *   the "old" position towards the "new position". This is used by
- *   AnimateTree(). 'done' is set to FALSE if the tree is not in its
- *   final position; it is used to determine when to stop animating the tree.
- * 
- * ----------------------------------------------------------------------------
- */
-
-void
-ShiftTree(tree, done)
-     Tree *tree;
-     int  *done;
-{
-  Tree *child;
-  
-  if (tree->old_pos.x != tree->pos.x ||
-      tree->old_pos.y != tree->pos.y)
-    {
-      tree->old_pos.x = tree->pos.x;
-      tree->old_pos.y = tree->pos.y;
-    }
-  
-  FOREACH_CHILD(child, tree)
-    ShiftTree(child, done);
-}
-
-
-/* ----------------------------------------------------------------------------
- * 
- *   AnimateTree() draws the given tree in a series of steps to give the
- *   effect of animation from the "old" layout to the "new" layout of the
- *   tree. 
- * 
- *   The algorithm used here is not efficient; the entire tree is drawn
- *   on each iteration of the animation sequence; it would be more efficient
- *   to only redraw what is necessary. However, the method used here takes
- *   advantage of existing code without modification.
- * 
- * ----------------------------------------------------------------------------
- */
-
-void
-AnimateTree(tree)
-     Tree *tree;
-{
-  int done = FALSE;
-
-  AnimationMode = FALSE;
-  /* highlight which nodes have to move */
-  BeginFrame();
-    DrawTree(tree, Old);
-  EndFrame();
-  Pause(); 
-  if (PauseAfterStep)
-    AnimationStep = ANIMATION_STEP_STEP;
-  while (!done) {
-    done = TRUE;
-    ShiftTree(tree, &done);
-    BeginFrame();
-      DrawTree(tree, Old);
-    EndFrame();
-    if (PauseAfterStep)
-      Pause();
-  }
-  if (PauseAfterStep)
-    AnimationStep = ANIMATION_STEP;
-  AnimationMode = FALSE;
-}
-
-
-/* ----------------------------------------------------------------------------
- * 
- *   AnimateZip() generates a sequence of frames that animates the Zip() step.
- *   It is similar in logical structure to Zip().
- * 
- * ----------------------------------------------------------------------------
- */
-
-void 
-AnimateZip(tree)
-     Tree *tree;
-{
-  Tree *child;
-   
-  /* show results of Join() step */
-  if (tree->child) {
-    BeginFrame();
-      FOREACH_CHILD(child, tree)
-        child->split = FALSE;
-      DrawTree(TheTree, New);
-      DrawTreeContour(tree, New, CONTOUR_COLOR, TRUE, FALSE, FALSE);
-    EndFrame();
-
-    StatusMsg("Zip: merge and join contours", FALSE);
-    Pause(); 
-   
-    /* show results of AttachParent() step */
-    BeginFrame();
-      DrawTree(TheTree, New);
-      DrawTreeContour(tree, New, CONTOUR_COLOR, FALSE, FALSE, FALSE);
-    EndFrame();
-
-    StatusMsg("Zip: attach parents", FALSE);
-    Pause(); 
-  }
-  
-  tree->on_path = FALSE;
-   
-  if (tree->parent)
-    AnimateZip(tree->parent);
-  else {
-    tree->on_path = FALSE;
-    BeginFrame();
-      DrawTree(TheTree, New);
-      DrawTreeContour(TheTree, New, CONTOUR_COLOR, FALSE, FALSE, FALSE);
-    EndFrame();
-    StatusMsg("Zip: reassemble entire contour", FALSE);
-    Pause(); 
-  }
-}
-
-
-/* ----------------------------------------------------------------------------
- * 
- *   CountNodes() returns the number of nodes in the specified tree. 
- *   Nodes below a node that has been collapsed are ignored. 
- * 
- * ----------------------------------------------------------------------------
- */
-
-int
-CountNodes(tree)
-     Tree *tree;
-{
-  int num_nodes = 1;		/* count root of subtree */
-  Tree *child;
-  
-  if (!tree->elision) {
-    FOREACH_CHILD(child, tree)
-      num_nodes += CountNodes(child);
-  }
-  return (num_nodes);
-}
-
-
-/* ----------------------------------------------------------------------------
- * 
- *   CollectNodeRectangles() is a recursive function used by
- *   GetSubTreeRectangles() to collect the rectangles of descendant nodes
- *   into the pre-allocated storage passed to this function.
- * 
- * ----------------------------------------------------------------------------
- */
-
-void
-CollectNodeRectangles(node, rectangles, fill)
-     Tree *node;
-     XRectangle **rectangles;
-     int fill;
-{
-  Tree *child;
-   
-  (*rectangles)->x = node->pos.x;
-  (*rectangles)->y = node->pos.y;
-  if (fill) {
-    (*rectangles)->width = node->width + 1;
-    (*rectangles)->height = node->height + 1;
-  } else {
-    (*rectangles)->width = node->width;
-    (*rectangles)->height = node->height;
-  }
-  (*rectangles)++;
-  
-  if (!node->elision)
-    FOREACH_CHILD(child, node) 
-      CollectNodeRectangles(child, rectangles, fill);
-}
-
-
-/* ----------------------------------------------------------------------------
- * 
- *   GetSubTreeRectangles() builds an array of XRectangles that contain
- *   all the node rectangles in the tree, except the root node itself. 
- *   The array is returned in 'rectangles' and the number of rectangles
- *   is returned in 'nrectangles.' Storage for the rectangles is allocated
- *   in this function. This function is used by PickAction to determine
- *   what rectangles need to be dissolved away. 'fill', if True, specifies
- *   that the rectangles should be 1 pixel larger in each dimension to 
- *   compensate for FillRectangle behavior. 
- * 
- * ----------------------------------------------------------------------------
- */
-
-void
-GetSubTreeRectangles(tree, rectangles, nrectangles, fill)
-     Tree *tree;
-     XRectangle **rectangles;
-     int *nrectangles, fill;
-{
-  Tree *child;
-  XRectangle *crect;		/* current rectangle */
-  
-  *nrectangles = CountNodes(tree) - 1;        /* don't count root node */
-  *rectangles = (XRectangle *) malloc(sizeof(XRectangle) * *nrectangles);
-  ASSERT(*rectangles, "could not allocate memory for rectangles");
-  
-  crect = *rectangles;
-  if (!tree->elision)
-    FOREACH_CHILD(child, tree)
-      CollectNodeRectangles(child, &crect, fill);
-}
-
-
-/* ----------------------------------------------------------------------------
- * 
- *   CollectNodeSegments() is a recursive function used by GetSubTreeSegments()
- *   to collect the line segments connecting nodes into the pre-allocated 
- *   storage passed to this function.
- * 
- * ----------------------------------------------------------------------------
- */
-
-void
-CollectNodeSegments(node, segments)
-     Tree *node;
-     XSegment **segments;
-{
-  Tree *child;
-   
-  (*segments)->x1 = node->pos.x - 1;
-  (*segments)->y1 = node->pos.y + (node->height / 2),
-  (*segments)->x2 = node->parent->pos.x + node->parent->width + 1;
-  (*segments)->y2 = node->parent->pos.y + (node->parent->height / 2);
-  (*segments)++;
-
-  if (!node->elision)
-    FOREACH_CHILD(child, node) 
-      CollectNodeSegments(child, segments);
-}
-
-
-/* ----------------------------------------------------------------------------
- * 
- *   GetSubTreeSegments() builds an array of XSegments that contain
- *   all the line segments connecting the nodes in the tree. The array is
- *   returned in 'segments' and the number of segments is returned in
- *   'nsegments.' Storage for the segments is allocated in this function.
- *   This function is used by PickAction to determine what line segments
- *   rectangles need to be dissolved away.
- * 
- * ----------------------------------------------------------------------------
- */
-
-void
-GetSubTreeSegments(tree, segments, nsegments)
-     Tree *tree;
-     XSegment **segments;
-     int *nsegments;
-{
-  Tree *child;
-  XSegment *cseg;		/* current segment */
-
-  *nsegments = CountNodes(tree) - 1;
-  *segments = (XSegment *) malloc(sizeof(XSegment) * *nsegments);
-  ASSERT(*segments, "could not allocate memory for segments");
-  
-  cseg = *segments;
-  if (!tree->elision)
-    FOREACH_CHILD(child, tree)
-      CollectNodeSegments(child, &cseg);
-}
-
-
-/* ----------------------------------------------------------------------------
- * 
- *   ComputeSubTreeExtent() computes the extent of a subtree. This is
- *   easily computed based on the tree's contour, as in ComputeTreeSize().
- *   This extent is stored in the node, and used by SearchTree for 
- *   pick-correlation. 
- * 
- *   This function assumes that the given tree has at least one child; do not
- *   pass a leaf node to this function. 
- * 
- * ----------------------------------------------------------------------------
- */
-
-void
-ComputeSubTreeExtent(tree)
-     Tree *tree;
-{
-  int width, height;
-  int x_offset, y_offset;
-
-  ComputeTreeSize(tree, &width, &height, &x_offset, &y_offset);
-  tree->subextent.pos.x  = tree->child->pos.x - tree->child->border;
-  tree->subextent.pos.y  = tree->pos.y - y_offset;
-  tree->subextent.width  = width - (tree->child->pos.x - tree->pos.x) - 1;
-  tree->subextent.height = height - 1;
-}
-
-
-/* ----------------------------------------------------------------------------
- * 
- *   SearchTree() determines if a node's rectangular region encloses the
- *   specified point in (x,y). Rather than using a brute-force search 
- *   through all node rectangles of a given tree, the subtree extents
- *   are used in a recursive fashion to drive the search as long as the
- *   given point is enclosed in an extent. In the worst case, the search
- *   time would be on the order of a brute-force search, but with complex
- *   trees, this method reduces the number of visits. 
- * 
- *   The extent of a subtree is computed by ComputeSubTreeExtent() and is
- *   stored in each node of the tree.
- * 
- * ----------------------------------------------------------------------------
- */
-
-int
-SearchTree(tree, x, y, node)
-     Tree *tree, **node;
-     int x, y;
-{
-  Tree *child;
-  
-  if (tree == NULL)
-    return (FALSE);
-
-  if (PT_IN_RECT(x, y, tree->pos.x, tree->pos.y,
-		 tree->pos.x + tree->width,
-		 tree->pos.y + tree->height)) {
-    *node = tree;
-    return (TRUE);
-  }
-  if (tree->child && (PT_IN_EXTENT(x, y, tree->subextent))) 
-    FOREACH_CHILD(child, tree) {
-      if (SearchTree(child, x, y, node)) 
-	return (TRUE);
-    }
-  return (FALSE);
-}
-
-
-/* ----------------------------------------------------------------------------
- * 
- *   ExposeHandler() handles expose events in the TreeDrawingArea. This
- *   function is not intelligent; it just redraws the entire contents.
- * 
- * ----------------------------------------------------------------------------
- */
-
-void
-ExposeHandler(w, client_data, event)
-     Widget   w;
-     caddr_t client_data;
-     XExposeEvent  *event;
-{
-  
-  if (event->count == 0) {
-    BeginFrame();
-      SetContours(TreeShowContourOption);
-      DrawTree(TheTree, New);
-    EndFrame();
-  }
-}
-
-
-/* ----------------------------------------------------------------------------
- * 
- *   ExpandCollapseNode is called to expand or collapse a node in the tree.
- * 
- * ----------------------------------------------------------------------------
- */
-
-void
-ExpandCollapseNode(node)
-     Tree *node;
-{
-  int        width, height;
-  int        old_width, old_height;
-  int        x_offset, y_offset;
-  XRectangle *rectangles;
-  XSegment   *segments;
-  int        nrectangles, nsegments;
-  int        expand = FALSE;
-  Widget     w = TreeDrawingArea;
-  
-  StatusMsg("", TRUE);
-  
-  /* hilite node so that we know where we are */
-  /* DrawTree will hilite it as a side effect */
-  if (TreeShowSteps)
-    node->on_path = TRUE;
-  
-  /* erase the contour before changing in the tree */
-  if ((TreeShowContourOption != NoContours) || TreeShowSteps) {
-    BeginFrame();
-      DrawTree(TheTree, New);
-    EndFrame();
-  }
-   
-  sprintf(strbuf, "Node `%s' selected for %s", node->label.text,
-	  node->elision ? "expansion" : "collapse");
-  StatusMsg(strbuf, FALSE);
-  Pause(); 
-
-  if (node->parent)
-    Unzip(node->parent);
-  else {
-    StatusMsg("Show entire contour", FALSE);
-    if (TreeShowSteps) {
-      BeginFrame();
-        DrawTreeContour(TheTree, New, CONTOUR_COLOR, FALSE, FALSE, FALSE);
-        DrawTree(TheTree, New);
-      EndFrame();
-      Pause(); 
-    }
-  }
-
-  /* are we collapsing a subtree? */
-  if (!node->elision) {
-    StatusMsg("Collapse subtree", FALSE);
-    GetSubTreeRectangles(node, &rectangles, &nrectangles, TRUE);
-    GetSubTreeSegments(node, &segments, &nsegments);
-    DissolveTree(XtDisplay(w), XtWindow(w),
-		 rectangles, nrectangles,
-		 segments, nsegments, TRUE);
-    free(rectangles);
-    free(segments);
-    Pause(); 
-    
-    StatusMsg("Replace subtree contour with leaf contour", FALSE);
-    node->elision = TRUE;
-    if (TreeShowSteps)
-      node->split = TRUE;	/* turned off in AnimateZip */
-    node->old_contour = node->contour;
-    node->width += ELISION_WIDTH;
-    LayoutLeaf(node);
-    BeginFrame();
-      SetContours(TreeShowContourOption);
-      DrawTree(TheTree, New);
-    EndFrame();
-    Pause();  
-  } else {
-    StatusMsg("Replace leaf contour with old subtree contour", FALSE);
-    if (TreeShowSteps)
-      node->split = TRUE;	/* turned off in AnimateZip */
-    RuboutLeaf(node);
-    node->contour = node->old_contour;
-    expand = TRUE;
-  }
-  
-  if (node->parent)
-    Zip(node->parent);
-  
-  ComputeTreeSize(TheTree, &width, &height, &x_offset, &y_offset);
-  PetrifyTree(TheTree, x_offset + MAT_SIZE, y_offset + MAT_SIZE);
-  GetDrawingSize(&old_width, &old_height);
-
-  if (expand) {
-    SetDrawingSize(width + (2 * MAT_SIZE), height + (2 * MAT_SIZE));
-    BeginFrame();
-      DrawTree(TheTree, Old);
-    EndFrame();
-    Pause(); 
-    StatusMsg("Move tree to new configuration", FALSE);
-    AnimateTree(TheTree);
-  } else {
-    /* we are shrinking or staying the same */
-    StatusMsg("Move tree to new configuration", FALSE);
-    AnimateTree(TheTree);
-    SetDrawingSize(width + (2 * MAT_SIZE), height + (2 * MAT_SIZE));
-  }
-
-  if (expand) {
-    StatusMsg("Expand subtree", FALSE);
-    node->elision = FALSE;
-    
-    /* erase elision marker */
-    XSetFunction(TreeDrawingAreaDB->display, TreeDrawingAreaDB->gc,
-		 GXclear);
-    XFillRectangle(XtDisplay(w), XtWindow(w), TreeDrawingAreaDB->gc,
-		   node->pos.x + node->width - ELISION_WIDTH + 1,
-		   node->pos.y, ELISION_WIDTH, node->height + 1);
-    XSetFunction(TreeDrawingAreaDB->display, TreeDrawingAreaDB->gc,
-		 GXcopy);
-    node->width -= ELISION_WIDTH;
-    
-    GetSubTreeRectangles(node, &rectangles, &nrectangles, FALSE);
-    GetSubTreeSegments(node, &segments, &nsegments);
-    /* dissolve the tree back in */
-    DissolveTree(XtDisplay(w), XtWindow(w),
-		 rectangles, nrectangles,
-		 segments, nsegments, FALSE);
-    free(rectangles);
-    free(segments);
-    
-    /* draw text of nodes */
-    BeginFrame();
-      SetContours(TreeShowContourOption);
-      DrawTree(TheTree, New);
-    EndFrame();
-    Pause(); 
-  }
-  
-  if (TreeShowSteps) {
-    node->on_path = FALSE;
-    if (node->parent)
-      AnimateZip(node->parent);
-    else
-      node->split = FALSE;
-  }
-  
-  /* BUG: the display isn't properly updated here! */
-  /* There should probably be some code here that
-     clears the tree below the node currently being 
-     collapsed or expanded. Hack added 20.03.95 (torgeir@ii.uib.no). 
-     I'll try to fix this later. */
-
-  XClearArea(TreeDisplay, XtWindow(TreeDrawingArea), 0, 0, 0, 0, FALSE);
-
-  BeginFrame();
-    SetContours(TreeShowContourOption);
-    DrawTree(TheTree, New);
-  EndFrame();
-  
-  StatusMsg("Ready", TRUE);
-}
-
-/* ----------------------------------------------------------------------------
- * 
- *   InsertNode() handles the task of inserting a new node in the tree,
- *   at the given position with respect to 'base_node'. When 'node_pos' is
- *   either Before or After, it is assumed that 'base_node' has a parent.
- * 
- * ----------------------------------------------------------------------------
- */
-
-void
-InsertNode(base_node, node_pos, new_node_text)
-     Tree *base_node;
-     NodePosition node_pos;
-     char *new_node_text;
-{
-  Tree *new_node;
-  Tree *parent;
-  Tree *sibling = NULL;
-  Tree *child;
-
-  int  width, height;
-  int  x_offset, y_offset;
-
-  StatusMsg("", TRUE);
-
-  new_node = MakeNode();	/* should check for memory failure */
-  SetNodeLabel(new_node, new_node_text);
-  LayoutLeaf(new_node);
-
-  /* figure out parent & sibling */
-  if (node_pos == Child) {
-    parent = base_node;
-    /* find last child, if one exists */
-    FOREACH_CHILD(child, parent)
-      sibling = child;
-  } else if (node_pos == After) {
-    parent = base_node->parent;
-    sibling = base_node;
-  } else if (node_pos == Before) {
-    parent = base_node->parent;
-    FOREACH_CHILD(child, parent)
-      if (child->sibling == base_node) {
-	sibling = child;
-	break;
-      }
-  }
-
-  if (TreeShowSteps)
-    parent->on_path = TRUE;
-  
-  if ((TreeShowContourOption != NoContours) ||
-      TreeShowSteps) {
-    BeginFrame();
-      DrawTree(TheTree, New);
-    EndFrame();
-  }
-
-  sprintf(strbuf, "Inserting `%s' as child of node `%s'",
-	  new_node_text, parent->label.text);
-  StatusMsg(strbuf, FALSE);
-  Pause(); 
-   
-  /* erase the contour before changing in the tree */
-  
-  Insert(parent, new_node, sibling);
-  
-  ComputeTreeSize(TheTree, &width, &height, &x_offset, &y_offset);
-  PetrifyTree(TheTree, x_offset + MAT_SIZE, y_offset + MAT_SIZE);
-  
-  if (sibling)
-    new_node->old_pos = sibling->old_pos;
-  else if (new_node->sibling)
-    new_node->old_pos = new_node->sibling->old_pos;
-  else {
-    new_node->old_pos.x = new_node->pos.x;
-    new_node->old_pos.y = parent->old_pos.y;
-  }
-  
-  if (TreeShowSteps)
-    new_node->split = TRUE;
-
-  SetDrawingSize(width + (2 * MAT_SIZE), height + (2 * MAT_SIZE));
-  BeginFrame();
-    DrawTree(TheTree, Old);
-  EndFrame();
-  StatusMsg("Insert: add new node and contour", FALSE);
-  Pause(); 
-   
-  StatusMsg("Move tree to new configuration", FALSE);
-  AnimateTree(TheTree);
-
-  if (TreeShowSteps) {
-    if (parent)
-      AnimateZip(parent);
-  }
-
-  BeginFrame();
-    SetContours(TreeShowContourOption);
-    DrawTree(TheTree, New);
-  EndFrame();
-
-  StatusMsg("Ready", TRUE);
-}   
-
-/* ----------------------------------------------------------------------------
- * 
- *   DeleteNode() handles the task of deleting a given node in the tree.
- * 
- * ----------------------------------------------------------------------------
- */
-
-void
-DeleteNode(node)
-     Tree *node;
-{
-  Tree *parent;
-
-  XRectangle *rectangles;
-  XSegment   *segments;
-  int         nrectangles, nsegments;
-  Widget      w = TreeDrawingArea;
-  int  width, height;
-  int  x_offset, y_offset;
-  
-  StatusMsg("", TRUE);
-
-  if (TreeShowSteps)
-    node->on_path = TRUE;
-   
-  /* erase the contour before changing in the tree */
-  if ((TreeShowContourOption != NoContours) ||
-      TreeShowSteps) {
-    BeginFrame();
-      DrawTree(TheTree, New);
-    EndFrame();
-  }
-
-  sprintf(strbuf, "Node `%s' selected for deletion", node->label.text);
-  StatusMsg(strbuf, FALSE);
-  Pause(); 
-  
-  parent = node->parent;
-  
-  if (parent)
-    Unzip(parent);
-  else
-    TheTree = NULL;		/* delete root of tree */
-
-  /* fade out deleted subtree */
-  StatusMsg("Delete subtree", FALSE);
-  GetSubTreeRectangles(node, &rectangles, &nrectangles, TRUE);
-  GetSubTreeSegments(node, &segments, &nsegments);
-  DissolveTree(XtDisplay(w), XtWindow(w),
-	       rectangles, nrectangles,
-	       segments, nsegments, TRUE);
-  free(rectangles);
-  free(segments);
-
-  Delete(node);
-
-  BeginFrame();
-  if (TheTree) 
-    DrawTree(TheTree, New);
-  EndFrame();
-  Pause(); 
-
-  if (parent)
-    Zip(parent);
-  
-  if (TheTree) {
-    ComputeTreeSize(TheTree, &width, &height, &x_offset, &y_offset);
-    PetrifyTree(TheTree, x_offset + MAT_SIZE, y_offset + MAT_SIZE);
-    StatusMsg("Move tree to new configuration", FALSE);
-    AnimateTree(TheTree);
-    SetDrawingSize(width + (2 * MAT_SIZE), height + (2 * MAT_SIZE));
-    Pause(); 
-
-    if (TreeShowSteps) {
-      if (parent)
-	AnimateZip(parent);
-    }
-
-    BeginFrame();
-      SetContours(TreeShowContourOption);
-      DrawTree(TheTree, New);
-    EndFrame();
-
-  }
-
-  StatusMsg("Ready", TRUE);
-}
-
-
-/* ----------------------------------------------------------------------------
- * 
- *   ResetLabels() is called when the TreeAlignNodes mode is changed. 
- *   When TreeParentDistance changes, the node width changes, so this
- *   function forces each node's width to be recomputed. 
- * 
- * ----------------------------------------------------------------------------
- */
-
-ResetLabels(tree)
-     Tree *tree;
-{
-  Tree *child;
-  
-  SetNodeLabel(tree, tree->label.text);
-  FOREACH_CHILD(child, tree)
-    ResetLabels(child);
-}
-
-
-/* ----------------------------------------------------------------------------
- * 
- *   SetupTree() handles the task of setting up the specified tree in 
- *   the drawing area.
- * 
- * ----------------------------------------------------------------------------
- */
-
-void
-SetupTree(tree)
-     Tree *tree;
-{
-  int width, height;
-  int x_offset, y_offset;
-  
-  LayoutTree(tree);
-  ComputeTreeSize(tree, &width, &height, &x_offset, &y_offset);
-  PetrifyTree(tree, x_offset + MAT_SIZE, y_offset + MAT_SIZE);
-  SetDrawingTree(tree);
-  SetDrawingSize(width + (2 * MAT_SIZE), height + (2 * MAT_SIZE));
-  BeginFrame();
-    SetContours(TreeShowContourOption);
-    DrawTree(tree, New);
-  EndFrame();
-}
-
-
-
-
-
-
diff -r 4de2936b4e77 -r 0132846995bd lisp/oobr/tree-x/help.h
--- a/lisp/oobr/tree-x/help.h	Mon Aug 13 09:42:28 2007 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,189 +0,0 @@
-static char help_text[] ="\n"
-"Introduction\n"
-"\n"
-"		The OO-Browser Graphical Interface\n"
-"\n"
-"	This program demonstrates a dynamic tree-drawing \n"
-"	algorithm developed by Sven Moen.  The algorithm is \n"
-"	published in \"IEEE Software\", July 1990, pp. 21-28.\n"
-"	If you desire more information than the description\n"
-"	given below, see the above-referenced article. \n"
-"\n"
-"	A number of the features mentioned herein are not\n"
-"	included in this version of the program.\n"
-"\n"
-"Algorithm\n"
-"\n"
-"	Unlike other algorithms, Moen's algorithm uses an \n"
-"	explicit representation of node and subtree contours\n"
-"	and it stores each contour as a polygon. \n"
-"\n"
-"	Trees with nodes of any polygonal shape can be drawn\n"
-"	compactly, and the data structure supports insert and\n"
-"	delete operations on subtrees.  The results are tidy\n"
-"	trees and efficient relayouts when the tree changes.\n"
-"\n"
-"	In the Layout step, the tree is traversed in depth-first\n"
-"	fashion until the leaf nodes are reached.  The contour\n"
-"	of each leaf node is formed by creating a linked list of\n"
-"	lines that wrap around the node's shape.  This is the \n"
-"	LayoutLeaf step.  As the return trip is made back to the\n"
-"	root, the contour of each interior node is formed by\n"
-"	joining the individual contours of each child. This Join\n"
-"	step involves a Merge step where the offset between\n"
-"	two neighboring contours is computed to avoid overlap. \n"
-"	Since the width of each subtree contour is known at\n"
-"	each step, each interior node is centered over its\n"
-"	children, and the subtree contour is extended to include\n"
-"	the interior node.  This is the AttachParent step.\n"
-"\n"
-"	In a dynamic update operation (insert or delete), the\n"
-"	algorithm reuses the contours not influenced by the\n"
-"	change and updates them efficiently. When a given \n"
-"	node changes, subtree contours at higher levels must\n"
-"	be disassembled before the change. This is called\n"
-"	the Unzip step, which call RuboutLeaf, Split, and\n"
-"	DetachParent, all inverses of LayoutLeaf, Join, and\n"
-"	AttachParent, respectively.  After the change is made,\n"
-"	the Zip step reassembles the contours by again calling\n"
-"	Layout, Join, and AttachParent.\n"
-"\n"
-"User Interface\n"
-"	\n"
-"	This program offers an interactive environment for \n"
-"	creating and updating trees of arbitrary size. Trees\n"
-"	can be loaded from a file or created on-the-fly.  You\n"
-"	can also save trees, and specify various layout and\n"
-"	animation options.  Each feature is associated with \n"
-"	a menu item which is explained in the next section.\n"
-"\n"
-"	When invoking the program, you may specify a single\n"
-"	argument indicating the name of a tree file. This file\n"
-"	will be loaded upon startup. If you start the program\n"
-"	without arguments, the canvas will be blank.\n"
-"\n"
-"Tree Menu\n"
-"\n"
-"	New Tree...	Create a new tree. You specify \n"
-"			a new root, and the existing tree, \n"
-"			if any, is deleted.\n"
-"\n"
-"	Load Tree...	Load a tree specification file.\n"
-"			(see the File Format section)\n"
-"\n"
-"	Save Tree...	Save a tree specification file.\n"
-"			(see the File Format section)\n"
-"\n"
-"	Quit		Exits the program.\n"
-"\n"
-"Layout Menu\n"
-"\n"
-"	Layout Spacing...\n"
-"			Displays a dialog that allows you\n"
-"			to change the spacing between nodes\n"
-"			on the same level and the spacing\n"
-"			between levels. \n"
-"\n"
-"	Align Nodes on Level\n"
-"			Adds a constraint to the layout\n"
-"			algorithm that forces all nodes\n"
-"			on the same level to have the same\n"
-"			x-position. This leads to truncation\n"
-"			of nodes if necessary. The maximum\n"
-"			node width is controlled by the\n"
-"			Level Spacing. By default, this is\n"
-"			disabled.\n"
-"\n"
-"Node Menu\n"
-"\n"
-"	This popup menu is invoked by pressing and holding\n"
-"	the left mouse button on a node. This menu offers\n"
-"	several actions that can be performed on nodes.\n"
-"\n"
-"	Add Child	Add a child to the node. The new child\n"
-"			is added after the bottommost child.\n"
-"\n"
-"	Add Sibling Before\n"
-"			Add a sibling before this node.\n"
-"\n"
-"	Add Sibling After\n"
-"			Add a sibling after this node.\n"
-"\n"
-"	Collapse Node	Collapses or expands the subtree\n"
-"	Expand Node	beginning at the specified node.\n"
-"			This operation is similiar to a\n"
-"			Delete operation, except that the\n"
-"			subtree is preserved so that you\n"
-"			can display it again. Collapsed\n"
-"			nodes are marked with a gray box.\n"
-"\n"
-"	Delete Node	Delete the subtree beginning at the\n"
-"			specified node.\n"
-"\n"
-"Tree File Format\n"
-"\n"
-"	If you wish to load a file, you can load a file created\n"
-"	by the OO-Browser with the {C-c d}, (br-xbr) command.\n"
-"\n"
-"	Node labels are sequences of characters delimited by\n"
-"	newlines or end-of-file. \n"
-"\n"
-"	Files must begin with an OO-Browser Environment path\n"
-"	name.  The next line must be a label, which indicates the\n"
-"	root node.  Optionally, lists containing labels may\n"
-"	follow. Each child label is indented two spaces more \n"
-"	its parent. Lists of labels are nested to produce trees. \n"
-"\n"
-"	For example, a three-level binary tree is as follows:\n"
-"\n"
-"		^^c++-^^~/OOBR\n"
-"		root node level1\n"
-"		  level2-1\n"
-"		    level3-1\n"
-"		    level3-2\n"
-"		  level2-2\n"
-"		    level3-3\n"
-"		    level3-4\n"
-"\n"
-"X11 Resources\n"
-"\n"
-"	Various settings in the program can be manipulated by \n"
-"	using X11 resources, specified either on the command\n"
-"	line or in a resource setting file. The supported \n"
-"	resources are:\n"
-"\n"
-"	tree.font:	Sets the font of the label nodes.\n"
-"			Default is \"fixed\".\n"
-"\n"
-"	tree.backgroundColor:\n"
-"			Sets the background color of the \n"
-"			canvas.  Default is \"white\".\n"
-"\n"
-"	tree.treeColor:	Sets the color of the displayed tree.\n"
-"			Default is \"black\".\n"
-"\n"
-"	tree.splitColor:\n"
-"			Sets the color of split contours which\n"
-"			appear during a dynamic update.\n"
-"			Default is \"goldenrod\".\n"
-"	\n"
-"	tree.highlightColor:\n"
-"			Sets the color of highlighted nodes.\n"
-"			Default is \"OrangeRed\".\n"
-"\n"
-"Help\n"
-"\n"
-"	If you are reading this, chances are that you found the\n"
-"	Help button on the menubar. \n"
-"\n"
-"Author\n"
-"	\n"
-"	This program was written by Mark L. Stern during\n"
-"	the summer of 1990.  It was redone by Bob Weiner for\n"
-"	use with the OO-Browser.\n"
-"\n"
-"	Stephan Zachwieja contributed the double-buffering\n"
-"	code used for smooth animations in this program.\n"
-"\n"
-"	The other authors have permitted Bob Weiner to distribute\n"
-"	the code freely as part of the OO-Browser.\n";
diff -r 4de2936b4e77 -r 0132846995bd lisp/oobr/tree-x/input.c
--- a/lisp/oobr/tree-x/input.c	Mon Aug 13 09:42:28 2007 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,347 +0,0 @@
-/* ----------------------------------------------------------------------------
- * File    : input.c
- * Purpose : input routine to create a Tree from an input file
- * ----------------------------------------------------------------------------
- */
-
-#include <ctype.h>
-#include <string.h>
-#include "defs.h"
-#include "tree.h"
-#include "input.h"
-
-char *EnvNm;                 /* Stores name of current Envir file */
-static int tokDepth = 0;     /* Depth in tree of current token */
-static int prevTokDepth;     /* Depth in tree of prev token */
-
-static void SaveSubtree();
-
-/* ----------------------------------------------------------------------------
- * 
- *   GetNextToken() reads the next token from the file indicated by 'fp' and
- *   returns a token. If the token is TOKEN_LABEL, the lexeme is returned
- *   in 'lexeme'. If memory could not be allocated for 'lexeme', it is NULL.
- * 
- *   The following tokens are supported:
- * 
- *     - TOKEN_LABEL: a string of characters, up to 'TOKEN-MAXSIZ'
- *       characters, delimited by number of leading spaces and newlines.
- *       If a label has more than this number of characters, the rest are
- *       ignored. 
- *     - TOKEN_EOF
- * 
- * ----------------------------------------------------------------------------
- */
-
-int
-  GetNextToken(fp, lexeme)
-FILE *fp;
-char **lexeme;
-{
-  static   char  lexbuf[INPUT_BUFSIZ];
-  register char *curbuf = lexbuf;
-  register int   charct = 0;
-  register int   c;
-  int done = FALSE;
-  
-  prevTokDepth = tokDepth;
-  tokDepth = 0;
-  
-  c = getc(fp);
-  
-  /* skip over leading whitespace */
-  while (c == ' ')
-    {
-      tokDepth++;
-      c = getc(fp);
-    }
-  tokDepth /= 2;
-  
-  while (1)
-    {
-      switch (c)
-	{
-	case EOF:
-	  return (TOKEN_EOF);
-	case '\n':
-	  *curbuf = '\0';
-	  *lexeme = strdup(lexbuf);
-	  return (TOKEN_LABEL);
-	  break;
-	default:
-	  *curbuf++ = c;
-	  charct++;
-	  /* check for buffer overflow */
-	  if (charct >= TOKEN_MAXSIZ)
-	    {
-	      *curbuf = '\0';
-	      *lexeme = strdup(lexbuf);
-	      /* since buffer is full, skip over remaining chars */
-	      c = getc(fp);
-	      while (c != '\n' && c != EOF)
-		c = getc(fp);
-	      if (c == EOF)
-		ungetc(c, fp);
-	      return (TOKEN_LABEL);
-	    }
-	  else
-	    c = getc(fp);
-	}
-    }
-}
-
-
-/* ----------------------------------------------------------------------------
- * 
- *   SetNodeLabelAndValue() sets the label text of the specified node and
- *   stores any string value following the label and preceded by a "^^"
- *   delimiter. 
- * 
- * ----------------------------------------------------------------------------
- */
-
-void
-SetNodeLabelAndValue(node, label_and_value)
-   Tree *node;
-   char *label_and_value;
-{
-   char*       val;
-
-   if (val = strstr(label_and_value, "^^"))
-       {
-           /* Set node value to string following ^^ delimiter. */
-           node->value = val+2;
-           /* Erase value from input string, leaving only label. */
-           *val = '\0';
-       }
-   else
-       {   node->value = NULL; }
-   SetNodeLabel(node, label_and_value);
-}
-
-
-/* ----------------------------------------------------------------------------
- * 
- *   ReadTreeFromFile() takes a filename argument and constructs
- *   a Tree from the labels in the file. If a tree could be constructed,
- *   even partially, it is returned by the function. NULL is returned if
- *   the file could not be opened or there was insufficient memory for
- *   creating the tree.
- * 
- * ----------------------------------------------------------------------------
- */
-
-Tree*
-  ReadTreeFromFile(fname, error)
-char *fname;
-ErrCode *error;
-{
-  FILE *infile;
-  int   inside_list = 0;	/* for semantic checking */
-  int   first_child = TRUE;
-  
-  int   token;
-  char *label;
-  
-  Tree *tree = NULL;		/* the return value of this function  */
-  Tree *parent = NULL;		/* parent of 'node'                   */
-  Tree *node;			/* current node                       */
-  Tree *new_node;		/* new node to add after current node */
-  
-  *error = ERR_NONE;
-  
-  infile = fopen(fname, "r");
-  if (infile == NULL)
-    {
-      *error = ERR_OPENFAIL;
-      return (NULL);
-    }
-  
-  /* first line of file is Envir file name, save */
-  token = GetNextToken(infile, &label);
-  if (token == TOKEN_EOF)
-    {
-      *error = ERR_EMPTYFILE;
-      fclose(infile);
-      return (NULL);
-    }
-  else if (token == TOKEN_LABEL)
-    {
-      if (label == NULL)
-	{
-	  *error = ERR_MEMALLOC;
-	  fclose(infile);
-	  return (NULL);
-	}
-      EnvNm = strdup(label);
-    }
-  
-  /* set up root node */
-  token = GetNextToken(infile, &label);
-  if (token == TOKEN_EOF)
-    {
-      *error = ERR_EMPTYFILE;
-      fclose(infile);
-      return (NULL);
-    }
-  else if (token == TOKEN_LABEL)
-    {
-      if (label == NULL)
-	{
-	  *error = ERR_MEMALLOC;
-	  fclose(infile);
-	  return (NULL);
-	}
-      tree = MakeNode();
-      if (tree == NULL)
-	{
-	  *error = ERR_MEMALLOC;
-	  fclose(infile);
-	  free(label);
-	  return(NULL);
-	}
-      SetNodeLabelAndValue(tree, label);
-      tree->parent = NULL;
-      node = tree;
-    }
-  else
-    {
-      *error = ERR_NOROOT;
-      fclose(infile);
-      return (NULL);
-    }
-  
-  /* add children and siblings */
-  while (1)
-    {
-      token = GetNextToken(infile, &label);
-      if (token == TOKEN_EOF)
-	break;
-      
-      if (tokDepth > prevTokDepth)  /* then new subtree */
-	{
-	  inside_list++;
-	  first_child = TRUE;
-	  parent = node;
-	}
-      else if (tokDepth < prevTokDepth)  /* then end of subtree */
-	if (!inside_list)
-	  {
-	    *error = ERR_NOBEGIN;
-	    fclose(infile);
-	    return (tree);
-	  }
-	else
-	  while (tokDepth < inside_list)
-	    {
-	      inside_list--;
-	      node = node->parent;
-	      parent = node->parent;
-	    }
-      
-      if (label == NULL)
-	{
-	  *error = ERR_MEMALLOC;
-	  fclose(infile);
-	  return (tree);
-	}
-      if (parent == NULL)
-	{
-	  *error = ERR_MANYROOT;
-	  fclose(infile);
-	  free(label);
-	  return (tree);
-	}
-      else
-	{
-	  new_node = MakeNode();
-	  if (new_node == NULL)
-	    {
-	      *error = ERR_MEMALLOC;
-	      fclose(infile);
-	      free(label);
-	      return (tree);
-	    }
-	  SetNodeLabelAndValue(new_node, label);
-	  new_node->parent = parent;
-	  
-	  if (first_child)
-	    {
-	      new_node->parent->child = new_node;
-	      first_child = FALSE;
-	    }
-	  else
-	    node->sibling = new_node;
-	  
-	  node = new_node;
-/*
- *	  printf("%3d tok: '%s'; tokDepth: %d; prevTokDepth: %d; inside_list: %d\n",
- *	     NumNodes, node->label.text, tokDepth, prevTokDepth, inside_list);
- */
-	}
-    }
-  fclose(infile);
-  return (tree);
-}
-
-
-/* ----------------------------------------------------------------------------
- * 
- *   SaveTreeToFile() takes a tree and saves it to a file specified by 'fname.'
- *   If the file could not be opened for writing, False is returned. Otherwise,
- *   True is returned.
- * 
- * ----------------------------------------------------------------------------
- */
-
-SaveTreeToFile(tree, fname)
-     Tree *tree;
-     char *fname;
-{
-  FILE *outfile;
-  
-  outfile = fopen(fname, "w");
-  if (outfile == NULL)
-    return (FALSE);
-  
-  fprintf(outfile, "%s\n", EnvNm);   /* Save Env File Name */
-  fprintf(outfile, "%s\n", tree->label.text);
-  if (tree->child)
-    SaveSubtree(tree->child, 0, outfile);
-  
-  fclose(outfile);
-  return (TRUE);
-}
-
-
-/* ----------------------------------------------------------------------------
- * 
- *   SaveSubtree() is the recursive procedure that supports SaveTreeToFile().
- *
- * ----------------------------------------------------------------------------
- */
-
-static void
-  SaveSubtree(tree, level, fp)
-Tree *tree;
-int level;
-FILE *fp;
-{
-  int i;
-  
-  level++;
-  for ( ; tree ; tree = tree->sibling)
-    {
-      for (i = 0 ; i < level ; i++)
-	{
-	  putc(' ', fp);
-	  putc(' ', fp);
-	}
-      fprintf(fp, "%s\n", tree->label.text);
-      if (tree->child)
-	SaveSubtree(tree->child, level, fp);
-    }
-  level--;
-}
-
-
diff -r 4de2936b4e77 -r 0132846995bd lisp/oobr/tree-x/input.h
--- a/lisp/oobr/tree-x/input.h	Mon Aug 13 09:42:28 2007 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
-/* ----------------------------------------------------------------------------
- * File    : input.h
- * Purpose : header file for input.c
- * ----------------------------------------------------------------------------
- */
-
-#define TOKEN_MAXSIZ          1023             /* maximum size of token      */
-#define INPUT_BUFSIZ          TOKEN_MAXSIZ + 1 /* allow for terminating null */
-/*
- *  #define DELIMITER_BEGIN_LIST '{'
- *  #define DELIMITER_END_LIST   '}'
- */ 
-
-/* Possible token types in file */
-
-enum { TOKEN_LABEL,
-/*
- *     TOKEN_BEGIN_LIST,
- *     TOKEN_END_LIST,
- */
-       TOKEN_EOF };
-
-
-typedef enum { 
-   ERR_OPENFAIL,
-   ERR_EMPTYFILE,
-   ERR_MEMALLOC,
-   ERR_NOBEGIN,
-   ERR_NOEND,
-   ERR_NOROOT,
-   ERR_MANYROOT,
-   ERR_NONE,
-} ErrCode;
-
-#define NUM_ERRS             7	/* don't count ERR_NONE */
-
-
diff -r 4de2936b4e77 -r 0132846995bd lisp/oobr/tree-x/intf.c
--- a/lisp/oobr/tree-x/intf.c	Mon Aug 13 09:42:28 2007 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,2004 +0,0 @@
-/* ----------------------------------------------------------------------------
- * File    : intf.c
- * Purpose : X11/Athena interface code
- * ----------------------------------------------------------------------------
- */
-
-#define GLOBALS 1
-
-#include <stdio.h>
-#include <string.h>
-#include <fcntl.h>
-
-#include <X11/IntrinsicP.h>
-#include <X11/ShellP.h>
-
-#include <X11/Intrinsic.h>
-#include <X11/StringDefs.h>
-
-#ifdef XAW3D
-  #include <X11/Xaw3d/Box.h>
-  #include <X11/Xaw3d/Simple.h>
-  #include <X11/Xaw3d/MenuButton.h>
-  #include <X11/Xaw3d/SimpleMenu.h>
-  #include <X11/Xaw3d/SmeBSB.h>
-  #include <X11/Xaw3d/SmeLine.h>
-  #include <X11/Xaw3d/Form.h>
-  #include <X11/Xaw3d/Label.h>
-  #include <X11/Xaw3d/Dialog.h>
-  #include <X11/Xaw3d/AsciiText.h>
-  #include <X11/Xaw3d/AsciiSrc.h>
-  #include <X11/Xaw3d/Viewport.h>
-  #include <X11/Xaw3d/Scrollbar.h>
-  #include <X11/Xaw3d/Paned.h>
-  #include <X11/Xaw3d/Panner.h>
-  #include <X11/Xaw3d/Reports.h>
-#else  
-  #include <X11/Xaw/Box.h>
-  #include <X11/Xaw/Simple.h>
-  #include <X11/Xaw/MenuButton.h>
-  #include <X11/Xaw/SimpleMenu.h>
-  #include <X11/Xaw/SmeBSB.h>
-  #include <X11/Xaw/SmeLine.h>
-  #include <X11/Xaw/Form.h>
-  #include <X11/Xaw/Label.h>
-  #include <X11/Xaw/Dialog.h>
-  #include <X11/Xaw/AsciiText.h>
-  #include <X11/Xaw/AsciiSrc.h>
-  #include <X11/Xaw/Viewport.h>
-  #include <X11/Xaw/Scrollbar.h>
-  #include <X11/Xaw/Paned.h>
-  #include <X11/Xaw/Panner.h>
-  #include <X11/Xaw/Reports.h>
-  #endif
-
-#include "defs.h"
-#include "tree.h"
-#include "dbl.h"
-#include "intf.h"
-#include "rsrc.h"
-#include "input.h"
-#include "help.h"
-
-#include <X11/cursorfont.h>
-
-
-/* ------------------------------------------------------------------------- */
-/*				Global Variables                             */
-/* ------------------------------------------------------------------------- */
-
-extern char  *EnvNm;    /* Stores name of current Envir file */
-
-Atom	      wm_delete_window;
-Widget        TreeTopLevel;
-Widget        TreeDrawingArea;
-Display      *TreeDisplay;
-XtAppContext  app;
-int           TreeScreen;
-int           TreeContourWidth;
-int           TreeBorderSize = BORDER_SIZE;
-int           TreeParentDistance = PARENT_DISTANCE;
-XFontStruct  *TreeLabelFont;
-DoubleBuffer *TreeDrawingAreaDB;
-ContourOption TreeShowContourOption = NoContours;
-DensityOption TreeLayoutDensity = Fixed;
-char          TreeShowSteps =  FALSE;
-char          TreeAlignNodes = FALSE;
-char          PauseAfterStep    = FALSE;
-
-/* ------------------------------------------------------------------------- */
-/*				Local Variables                              */
-/* ------------------------------------------------------------------------- */
-
-static Tree *PopupNode;		/* node selected for popup */
-static NodePosition NodePos;
-
-static Widget mainWindow;
-static Widget topForm;
-
-static Widget statusLabel;
-static Widget statusText;
-
-static Widget scrolledWindow;
-
-static Widget helpShell;
-static Widget helpForm;
-static Widget helpScrollWindow;
-static Widget helpText;
-static Widget helpDoneButton;
-static Widget helpTitle;
-static Widget helpFrame;
-
-static Widget treeMenubar;
-static Widget treeMenus[NUM_MENUS];
-static Widget treeMenuBtns[NUM_MENUS - 1];   /* don't need button for */
-					     /* node popup menu       */
-
-static Widget treeMenuItems[TREE_MENU_ITEMS];
-static Widget layoutMenuItems[LAYOUT_MENU_ITEMS];
-static Widget nodeMenuItems[NODE_MENU_ITEMS];
-static Widget helpBtn;
-
-static String labelStr[NUM_MENU_STRS];
-static String errStr[NUM_ERRS];
-
-static Widget dialog[NUM_DLG];
-
-/* globals used for state values */
-
-static Widget dlgLevelScale, dlgLevelValuator, 
-              dlgSiblingValuator, dlgSiblingScale;
-static int dlgLevelValue;
-static int dlgSiblingValue;
-static int loading_file = 0;
-
-static Pixmap check_pixmap, slider_pixmap;
-
-static Boolean nodeFound;
-
-static int    PauseTime         = ANIMATION_SPEED_FAST;
-static Cursor PauseCursor;
-
-static XtResource applRsrcsDesc[] = {
-   {
-      TrNbackgroundColor,       TrCBackgroundColor,
-      XtRPixel,                 sizeof(Pixel),
-      XtOffset(ApplRsrcDataPtr, background_color),
-      XtRString,                TrDefaultBackgroundColor
-   },
-   {
-      TrNtreeColor,             TrCTreeColor,
-      XtRPixel,                 sizeof(Pixel),
-      XtOffset(ApplRsrcDataPtr, tree_color),
-      XtRString,                TrDefaultTreeColor
-   },
-   {
-      TrNcontourColor,          TrCContourColor,
-      XtRPixel,                 sizeof(Pixel),
-      XtOffset(ApplRsrcDataPtr, contour_color),
-      XtRString,                TrDefaultContourColor
-   },
-   {
-      TrNsplitColor,            TrCSplitColor,
-      XtRPixel,                 sizeof(Pixel),
-      XtOffset(ApplRsrcDataPtr, split_color),
-      XtRString,                TrDefaultSplitColor
-   },
-   {
-      TrNhighlightColor,        TrCHighlightColor,
-      XtRPixel,                 sizeof(Pixel),
-      XtOffset(ApplRsrcDataPtr, highlight_color),
-      XtRString,                TrDefaultHighlightColor
-   },
-   {
-      TrNactionColor,           TrCActionColor,
-      XtRPixel,                 sizeof(Pixel),
-      XtOffset(ApplRsrcDataPtr, action_color),
-      XtRString,                TrDefaultActionColor
-   },
-   {
-      TrNcontourWidth,          TrCContourWidth,
-      XtRInt,                   sizeof(int),
-      XtOffset(ApplRsrcDataPtr, contour_width),
-      XtRImmediate,             (XtPointer) TrDefaultContourWidth
-   },
-};
-
-static void popdown_action();
-static void activate_action();
-static void quit_action();
-static void Action();
-
-static void select_action();
-static void button_action();
-static void menu_popup_action();
-
-static void set_levelscale_CB();
-static void levelscale_CB();
-static void set_siblingscale_CB();
-static void siblingscale_CB();
-static void set_levelvalue_CB();
-static void set_siblingvalue_CB();
-static void levelvalue_CB();
-static void siblingvalue_CB();
-
-static void center_widget();
-
-static XtActionsRec local_actions[] = {
-  {"wmpopdown", popdown_action},
-  {"dlg_activate", activate_action},
-  {"node_select", select_action},
-  {"node_menu_prepare", button_action},
-  {"maybe_menu_popup", menu_popup_action},
-  {"quit", quit_action},
-};
-
-String fallback_resources[]  = {
-"*statusText.width:                      310",
-"*treeDrawingArea.width:                 310",
-"*treeDrawingArea.height:                400",
-"*Text.Font:	      -*-lucidatypewriter-medium-r-*-*-12-*-*-*-*-*-iso8859-1",
-"*Label.Font:	      -*-helvetica-medium-r-*-*-12-*-*-*-*-*-iso8859-1",
-"*Command.Font:	      -*-helvetica-bold-r-*-*-12-*-*-*-*-*-iso8859-1",
-"*SimpleMenu.Font:    -*-helvetica-bold-r-*-*-12-*-*-*-*-*-iso8859-1",
-"*SmeBSB.Font:	      -*-helvetica-bold-r-*-*-12-*-*-*-*-*-iso8859-1",
-"*MenuButton.Font:    -*-helvetica-bold-r-*-*-12-*-*-*-*-*-iso8859-1",
-"*List.Font:	      -*-helvetica-bold-r-*-*-12-*-*-*-*-*-iso8859-1",
-"*treeMenuBtn.label:			Tree",
-"*layoutMenuBtn.label:			Layout",
-"*helpBtn.label:			Help...",
-"*treeMenu*treeMenuNew.label:		New Tree",
-"*treeMenu*treeMenuLoad.label:		Load Tree",
-"*treeMenu*treeMenuSave.label:		Save Tree",
-"*treeMenu*treeMenuQuit.label:		Quit",
-"*layoutMenu*layoutMenuFixed.label:	Fixed",
-"*layoutMenu*layoutMenuVariable.label:	Variable",
-"*layoutMenu*layoutMenuSpacing.label:	Spacing...",
-"*layoutMenu*layoutMenuAlignNodes.label: Align Nodes on Level",
-"*dlgNewTree.title:			New Tree",
-"*dlgNodeName.title:			Node Name",
-"*dlgInfo.title:			Information",
-"*dlgError.title:			Error!",
-"*dlgSpacing.title:			Tree Node Spacing",
-"*helpShell.title:			Help",
-"*dlgNewTreeForm.label:			Enter name of root node:",
-"*dlgNodeNameForm.label:		Enter name of new node:",
-"*dlgFileForm.label:			Enter name of file:",
-"*dlgInfoForm.label:			Information:",
-"*dlgErrorForm.label:			Error:",
-"*dlgSpacing.label:			Spacing Dialog",
-"*dlgLevelLabel.label:			Level spacing:",
-"*dlgSiblingLabel.label:		Sibling spacing:",
-"*dlgLevelValuator.width:		40",
-"*dlgLevelValuator.width:		40",
-"*dlgNewTreeOk.label:			Ok",
-"*dlgNewTreeCancel.label:		Cancel",
-"*dlgFileOk.label:			Ok",
-"*dlgFileCancel.label:			Cancel",
-"*dlgInfoButton.label:			Acknowledged",
-"*dlgErrorButton.label:			Acknowledged",
-"*dlgOkButton.label:			Ok",
-"*dlgCancelButton.label:		Cancel",
-"*dlgNodeNameOk.label:			Ok",
-"*dlgNodeNameCancel.label:		Cancel",
-"*helpDoneButton.label:			Dismiss",
-"*helpTitle.label:			Help for Drawing Dynamic Trees",
-"*treeDrawingArea.Translations: #override \\n\
-                                <Btn1Down>:	node_select(EDIT)\\n\
-                                <Btn2Down>:	node_select(VIEW)\\n\
-                                <Btn3Down>:	XawPositionSimpleMenu(nodeMenu)node_menu_prepare()XtMenuPopup(nodeMenu)\\n",
-NULL,
-};
-
-static ApplRsrcData    applRsrcs;
-static ApplRsrcDataPtr applRsrcsPtr;
-
-/* included bitmaps */
-
-#define gray_width 8
-#define gray_height 8
-static unsigned char gray_bits[] = {
-  0x55, 0xaa, 0x55, 0xaa, 0x55, 0xaa, 0x55, 0xaa
-};
-
-/* This is a check mark stolen from the xmh application. :) */
-#define check_width 9
-#define check_height 8
-static unsigned char check_bits[] = {
-  0x00, 0x01, 0x80, 0x01, 0xc0, 0x00, 0x60, 0x00,
-  0x31, 0x00, 0x1b, 0x00, 0x0e, 0x00, 0x04, 0x00
-};
-
-#define slider_pixmap_width 4
-#define slider_pixmap_height 4
-static char slider_pixmap_bits[] = {
-  0x05, 0x0a, 0x05, 0x0a
-};
-
-/* ------------------------------------------------------------------------- */
-/*			 Forward Function Declarations                       */
-/* ------------------------------------------------------------------------- */
-
-static void popup_dialog();
-
-static void Quit_CB();
-
-static void Contours_CB();
-static void ShowContours_CB();
-static void Pause_CB();
-static void Speed_CB();
-
-static void Help_CB();
-static void HelpDone_CB();
-static void Scale_CB();
-
-static void TreeMenu_CB();
-static void LayoutMenu_CB();
-static void NodeMenu_CB();
-
-static void NodeLabel_CB();
-static void NewTree_CB();
-static void File_CB();
-
-static void Popdown_CB();
-static void ButtonHandler();
-
-extern void ExposeHandler();
-
-/* ------------------------------------------------------------------------- */
-/*				   Functions                                 */
-/* ------------------------------------------------------------------------- */
-
-/* ----------------------------------------------------------------------------
- * 
- *   Status() displays the specified text in the status area.
- *   'urgent' overrides the value of TreeShowSteps.
- * 
- * ----------------------------------------------------------------------------
- */
-
-void
-StatusMsg(msg, urgent)
-     char *msg;
-     int  urgent;
-{
-  if (TreeShowSteps || urgent) 
-    XtVaSetValues(statusText, XtNlabel, msg, NULL);
-}
-
-
-/* ----------------------------------------------------------------------------
- * 
- *  Pause is a trivial function, for the benefit of interface-dependent code
- *  inside tree.c. This avoids having to include X11 stuff inside that file.
- *  PauseTime is expected to contain an integer indicating 1/10ths of a sec.
- * 
- * ----------------------------------------------------------------------------
- */
-
-void
-Pause()
-{
-  XEvent event;
-  
-  if (PauseAfterStep) {
-    XGrabKeyboard(TreeDisplay, XtWindow(TreeTopLevel), False,
-		  GrabModeAsync, GrabModeAsync, CurrentTime);
-    XGrabPointer(TreeDisplay, XtWindow(TreeTopLevel), False,
-		 ButtonPressMask | ButtonReleaseMask,
-		 GrabModeAsync, GrabModeAsync, None,
-		 PauseCursor, CurrentTime);
-    XMaskEvent(TreeDisplay, ButtonPressMask | KeyPress, &event);
-    XUngrabPointer(TreeDisplay, CurrentTime);
-    XUngrabKeyboard(TreeDisplay, CurrentTime);
-  }
-  else if (TreeShowSteps) {
-    XSync(TreeDisplay, 0);
-    usleep(PauseTime * 100000);
-  }
-}
-
-/* ----------------------------------------------------------------------------
- * 
- *   BuildPopupMenus() builds the popup menus for use in the application
- *   window.
- * 
- * ----------------------------------------------------------------------------
- */
-
-void
-BuildPopupMenus(parent)
-     Widget parent;
-{
-  Arg      args[2];
-  String   xstr;
-  
-  labelStr[STR_NODE_COLLAPSE] = "Collapse Node";
-  labelStr[STR_NODE_EXPAND]   = "Expand Node";
-  
-  treeMenus[NODE_MENU] = XtVaCreatePopupShell("nodeMenu",
-					      simpleMenuWidgetClass,
-					      parent, 
-					      XtNlabel, " ",
-					      NULL);
-  
-  (void)  XtVaCreateManagedWidget("nodeMenuAddChild", smeLineObjectClass,
-				  treeMenus[NODE_MENU],
-				  NULL);
-  
-  nodeMenuItems[NODE_MENU_ADD_CHILD] = 
-    XtVaCreateManagedWidget("nodeMenuAddChild", smeBSBObjectClass,
-			    treeMenus[NODE_MENU],
-			    XtNlabel, "Add Child",
-			    NULL);
-  XtAddCallback(nodeMenuItems[NODE_MENU_ADD_CHILD],
-		XtNcallback, NodeMenu_CB, (XtPointer) NODE_MENU_ADD_CHILD);
-  
-  nodeMenuItems[NODE_MENU_ADD_BEFORE] = 
-    XtVaCreateManagedWidget("nodeMenuAddSiblingBefore", smeBSBObjectClass,
-			    treeMenus[NODE_MENU],
-			    XtNlabel, "Add Sibling Before",
-			    NULL);
-  XtAddCallback(nodeMenuItems[NODE_MENU_ADD_BEFORE],
-		 XtNcallback, NodeMenu_CB, (XtPointer) NODE_MENU_ADD_BEFORE);
-		 
-   nodeMenuItems[NODE_MENU_ADD_AFTER] = 
-       XtVaCreateManagedWidget("nodeMenuAddSiblingAfter", smeBSBObjectClass,
-			       treeMenus[NODE_MENU],
-			       XtNlabel, "Add Sibling After",
-			       NULL);
-   XtAddCallback(nodeMenuItems[NODE_MENU_ADD_AFTER],
-		 XtNcallback, NodeMenu_CB, (XtPointer) NODE_MENU_ADD_AFTER);
-
-   nodeMenuItems[NODE_MENU_ELISION] =
-       XtVaCreateManagedWidget("nodeMenuElision", smeBSBObjectClass,
-			       treeMenus[NODE_MENU],
-			       XtNlabel, labelStr[STR_NODE_COLLAPSE],
-			       NULL);
-   XtAddCallback(nodeMenuItems[NODE_MENU_ELISION],
-		 XtNcallback, NodeMenu_CB, (XtPointer) NODE_MENU_ELISION);
-
-   
-   nodeMenuItems[NODE_MENU_DELETE] =
-       XtVaCreateManagedWidget("nodeMenuDeleteNode", smeBSBObjectClass,
-			       treeMenus[NODE_MENU],
-			       XtNlabel, "Delete Node",
-			       NULL);
-   XtAddCallback(nodeMenuItems[NODE_MENU_DELETE],
-		 XtNcallback, NodeMenu_CB, (XtPointer) NODE_MENU_DELETE);
-
-		 
-}
-
-/* ----------------------------------------------------------------------------
- * 
- *   BuildMenubar() builds the menubar that appears in the main window.
- * 
- * ----------------------------------------------------------------------------
- */
-
-
-void
-BuildMenubar(parent)
-   Widget parent;
-{
-   Arg args[4];
-   int i;
-   Widget box;
-
-   box = XtVaCreateManagedWidget("menuBox",
-				 boxWidgetClass,
-				 parent,
-				 XtNshowGrip, FALSE,
-				 XtNborderWidth, 0,
-				 NULL);
-				 
-
-   /* menu button widgets */
-   treeMenuBtns[TREE_MENU] = 
-       XtVaCreateManagedWidget("treeMenuBtn",
-			       menuButtonWidgetClass,
-			       box,
-			       XtNmenuName, "treeMenu",
-			       NULL);
-   treeMenuBtns[LAYOUT_MENU] =
-       XtVaCreateManagedWidget("layoutMenuBtn",
-			       menuButtonWidgetClass,
-			       box,
-			       XtNmenuName, "layoutMenu",
-			       NULL);
-
-   helpBtn = XtVaCreateManagedWidget("helpBtn",
-				     commandWidgetClass,
-				     box,
-				     NULL);
-
-   XtAddCallback(helpBtn, XtNcallback, Help_CB, NULL);
-
-   /* create pulldwon menus */
-
-   treeMenus[TREE_MENU] = XtVaCreatePopupShell("treeMenu",
-					       simpleMenuWidgetClass,
-					       treeMenuBtns[TREE_MENU],
-					       NULL, 0);
-   treeMenus[LAYOUT_MENU] = XtVaCreatePopupShell("layoutMenu",
-						 simpleMenuWidgetClass,
-						 treeMenuBtns[LAYOUT_MENU],
-						 NULL, 0);
-
-
-   /* adding menu entries */
-   
-   /* Tree menu */
-
-   treeMenuItems[TREE_MENU_NEW] = 
-       XtVaCreateManagedWidget("treeMenuNew", smeBSBObjectClass,
-			       treeMenus[TREE_MENU],
-			       NULL);
-   XtAddCallback(treeMenuItems[TREE_MENU_NEW],
-		 XtNcallback, TreeMenu_CB, TREE_MENU_NEW);
-   
-   treeMenuItems[TREE_MENU_LOAD] = 
-       XtVaCreateManagedWidget("treeMenuLoad", smeBSBObjectClass,
-			       treeMenus[TREE_MENU],
-			       NULL);
-   XtAddCallback(treeMenuItems[TREE_MENU_LOAD],
-		 XtNcallback, TreeMenu_CB, (XtPointer) TREE_MENU_LOAD);
-		 
-   treeMenuItems[TREE_MENU_SAVE] = 
-       XtVaCreateManagedWidget("treeMenuSave", smeBSBObjectClass,
-			       treeMenus[TREE_MENU],
-			       NULL);
-   XtAddCallback(treeMenuItems[TREE_MENU_SAVE],
-		 XtNcallback, TreeMenu_CB, (XtPointer) TREE_MENU_SAVE);
-		 
-   treeMenuItems[TREE_MENU_SEP1] = 
-       XtVaCreateManagedWidget("treeMenuSep1", smeLineObjectClass,
-			       treeMenus[TREE_MENU],
-			       NULL);
-
-#ifdef COMMENT
-   treeMenuItems[TREE_MENU_STATS] = 
-       XtVaCreateManagedWidget("treeMenuStats", smeBSBObjectClass,
-			       treeMenus[TREE_MENU],
-			       XtNlabel, labelStr[STR_SHOW_STATS],
-			       NULL);
-
-   XtAddCallback(treeMenuItems[TREE_MENU_STATS],
-		 XtNcallback, TreeMenu_CB, (XtPointer) TREE_MENU_STATS);
-
-   XtSetSensitive(treeMenuItems[TREE_MENU_STATS], FALSE);
-
-   treeMenuItems[TREE_MENU_SEP2] = 
-       XtVaCreateManagedWidget("treeMenuSep2", smeLineObjectClass,
-			       treeMenus[TREE_MENU],
-			       NULL);
-#endif /* COMMENT */
-   
-   treeMenuItems[TREE_MENU_QUIT] = 
-       XtVaCreateManagedWidget("treeMenuQuit", smeBSBObjectClass,
-			       treeMenus[TREE_MENU],
-			       NULL);
-   XtAddCallback(treeMenuItems[TREE_MENU_QUIT],
-		 XtNcallback, TreeMenu_CB, (XtPointer) TREE_MENU_QUIT);
-		 
-
-
-   /* Layout menu */
-
-#ifdef COMMENT
-   treeMenuItems[LAYOUT_MENU_FIXED] = 
-       XtVaCreateManagedWidget("layoutMenuFixed", smeBSBObjectClass,
-			       treeMenus[LAYOUT_MENU],
-			       XtNleftMargin, 18,
-			       NULL);
-
-   XtAddCallback(treeMenuItems[LAYOUT_MENU_FIXED],
-		 XtNcallback, LayoutMenu_CB, (XtPointer) LAYOUT_MENU_FIXED);
-
-   treeMenuItems[LAYOUT_MENU_VARIABLE] = 
-       XtVaCreateManagedWidget("layoutMenuVariable", smeBSBObjectClass,
-			       treeMenus[LAYOUT_MENU],
-			       XtNleftMargin, 18,
-			       NULL);
-
-   XtAddCallback(treeMenuItems[LAYOUT_MENU_VARIABLE],
-		 XtNcallback, LayoutMenu_CB, (XtPointer) LAYOUT_MENU_VARIABLE);
-
-
-   treeMenuItems[LAYOUT_MENU_SEP1] = 
-       XtVaCreateManagedWidget("layoutSep1", smeLineObjectClass,
-			       treeMenus[LAYOUT_MENU],
-			       NULL);
-#endif /* COMMENT */
-
-   treeMenuItems[LAYOUT_MENU_SPACING] = 
-       XtVaCreateManagedWidget("layoutMenuSpacing", smeBSBObjectClass,
-			       treeMenus[LAYOUT_MENU],
-			       XtNleftMargin, 18,
-			       NULL);
-   XtAddCallback(treeMenuItems[LAYOUT_MENU_SPACING],
-		 XtNcallback, LayoutMenu_CB, (XtPointer) LAYOUT_MENU_SPACING);
-
-   treeMenuItems[LAYOUT_MENU_SEP2] = 
-       XtVaCreateManagedWidget("layoutMenuSep2", smeLineObjectClass,
-			       treeMenus[LAYOUT_MENU],
-			       NULL);
-
-   /* the following is a toggle button - we hack it using a bitmap */
-   treeMenuItems[LAYOUT_MENU_ALIGN_NODES] = 
-       XtVaCreateManagedWidget("layoutMenuAlignNodes", smeBSBObjectClass,
-			       treeMenus[LAYOUT_MENU],
-			       XtNleftMargin, 18,
-			       NULL);
-   XtAddCallback(treeMenuItems[LAYOUT_MENU_ALIGN_NODES],
-		 XtNcallback, LayoutMenu_CB, 
-		 (XtPointer) LAYOUT_MENU_ALIGN_NODES);
-
-}
-
-/* ----------------------------------------------------------------------------
- * 
- *   BuildDialogs() builds all the dialogs used in this application. 
- * 
- * ----------------------------------------------------------------------------
- */
-
-
-BuildDialogs(parent)
-     Widget parent;
-{
-  int	i;
-  Widget 
-    tmpwidget, dlgForm, dlgValue, 
-    dlgLevelLabel, dlgSiblingLabel, 
-    dlgOkButton, dlgCancelButton;
-  
-  labelStr[STR_LOAD_FILE] = "Name of file to load:";
-  labelStr[STR_SAVE_FILE] = "Name of file to save:";
-  
-  errStr[ERR_OPENFAIL]  = "Failed to open file.";
-  errStr[ERR_EMPTYFILE] = "Input file is empty.";
-  errStr[ERR_MEMALLOC]  = "Memory allocation failed.";
-  errStr[ERR_NOBEGIN] = "End of list does not have a matching beginning.";
-  errStr[ERR_NOEND] = "Beginning of list does not have a matching end.";
-  errStr[ERR_NOROOT] = "Input file does not have a root label.";
-  errStr[ERR_MANYROOT] = "Input file has more than one root label.";
-  
-  
-  dialog[DLG_NEW] = XtVaCreatePopupShell("dlgNewTree",
-					 transientShellWidgetClass,
-					 parent,
-					 XtNresizable, TRUE,
-					 NULL);
-  
-  tmpwidget = XtVaCreateManagedWidget("dlgNewTreeForm",
-				      dialogWidgetClass,
-				      dialog[DLG_NEW], 
-				      XtNresizable, TRUE,
-				      XtNvalue, "",
-				      NULL);
-  
-  XawDialogAddButton(tmpwidget, "dlgNewTreeOk", NewTree_CB, 
-		     (XtPointer) TRUE);
-  XawDialogAddButton(tmpwidget, "dlgNewTreeCancel", NewTree_CB, 
-		     (XtPointer) FALSE);
-  
-  dlgValue = XtNameToWidget(tmpwidget, "value");
-  
-  XtOverrideTranslations
-    (dlgValue, XtParseTranslationTable
-     ("<Key>Return:dlg_activate(dlgNewTreeOk)\n"));
-  
-  
-  dialog[DLG_NODE_NAME] = XtVaCreatePopupShell("dlgNodeName",
-					       transientShellWidgetClass,
-					       TreeTopLevel,
-					       XtNresizable, TRUE,
-					       NULL);
-				    
-  
-  tmpwidget= XtVaCreateManagedWidget("dlgNodeNameForm",
-				     dialogWidgetClass,
-				     dialog[DLG_NODE_NAME], 
-				     XtNresizable, TRUE,
-				     XtNvalue, "",
-				     NULL);
-  
-  XawDialogAddButton(tmpwidget, "dlgNodeNameOk", NodeLabel_CB, 
-		     (XtPointer) TRUE);
-  XawDialogAddButton(tmpwidget, "dlgNodeNameCancel", NodeLabel_CB, 
-		     (XtPointer) FALSE);
-  
-  dlgValue = XtNameToWidget(tmpwidget, "value");
-  
-  XtOverrideTranslations
-    (dlgValue, XtParseTranslationTable
-     ("<Key>Return: dlg_activate(dlgNodeNameOk)\n"));
-  
-
-  dialog[DLG_FILE] = XtVaCreatePopupShell("dlgFile",
-					  transientShellWidgetClass,
-					  TreeTopLevel, 
-					  XtNresizable, TRUE,
-					  NULL);
-
-  tmpwidget = XtVaCreateManagedWidget("dlgFileForm",
-				      dialogWidgetClass,
-				      dialog[DLG_FILE], 
-				      XtNresizable, TRUE,
-				      XtNvalue, "",
-				      NULL);
-   
-  XawDialogAddButton(tmpwidget, "dlgFileOk", File_CB, (XtPointer) TRUE);
-  XawDialogAddButton(tmpwidget, "dlgFileCancel", File_CB, (XtPointer) FALSE);
-
-  dlgValue = XtNameToWidget(tmpwidget, "value");
-  
-  XtOverrideTranslations
-    (dlgValue, XtParseTranslationTable
-     ("<Key>Return:dlg_activate(dlgFileOk)\n"));
-  
-
-  dialog[DLG_INFO] = XtVaCreatePopupShell("dlgInfo",
-					  transientShellWidgetClass,
-					  TreeTopLevel, 
-					  XtNresizable, TRUE,
-					  NULL);
-  
-  tmpwidget = XtVaCreatePopupShell("dlgInfoForm",
-				   dialogWidgetClass,
-				   dialog[DLG_INFO], 
-				   XtNresizable, TRUE,
-				   XtNvalue, "",
-				   NULL);
-  
-  XawDialogAddButton(tmpwidget, "dlgInfoButton", Popdown_CB, 
-		     (XtPointer) dialog[DLG_INFO]);
-  
-  
-  dialog[DLG_ERROR] = XtVaCreatePopupShell("dlgError",
-					   transientShellWidgetClass,
-					   TreeTopLevel, 
-					   XtNresizable, TRUE,
-					   NULL);
-   
-  tmpwidget = XtVaCreateManagedWidget("dlgErrorForm",
-				      dialogWidgetClass,
-				      dialog[DLG_ERROR], 
-				      XtNresizable, TRUE,
-				      XtNvalue, "",
-				      NULL);
-   
-  XawDialogAddButton(tmpwidget, "dlgErrorButton", Popdown_CB, 
-		     (XtPointer) dialog[DLG_ERROR]);
-   
-
-  dialog[DLG_SPACING] = XtVaCreatePopupShell("dlgSpacing",
-					     transientShellWidgetClass,
-					     TreeTopLevel, 
-					     XtNresizable, FALSE,
-					     NULL);
-  dlgForm = XtVaCreateManagedWidget("dlgSpacingForm",
-				    formWidgetClass,
-				    dialog[DLG_SPACING],
-				    XtNresizable, FALSE,
-				    NULL);
-   
-  dlgLevelLabel = XtVaCreateManagedWidget("dlgLevelLabel",
-					  labelWidgetClass,
-					  dlgForm,
-					  XtNfromVert, NULL,
-					  XtNfromHoriz, NULL,
-					  XtNtop, XawChainTop,
-					  XtNbottom, XawChainTop,
-					  XtNleft, XawChainLeft,
-					  XtNright, XawChainLeft,
-					  XtNborderWidth, 0,
-					  NULL);
-
-  dlgLevelValuator = XtVaCreateManagedWidget("dlgLevelValuator",
-					     labelWidgetClass,
-					     dlgForm,
-					     XtNfromVert, NULL,
-					     XtNfromHoriz, dlgLevelLabel,
-					     XtNtop, XawChainTop,
-					     XtNbottom, XawChainTop,
-					     XtNleft, XawChainLeft,
-					     XtNright, XawChainLeft,
-					     XtNlabel, "   ",
-					     NULL);
-
-  
-  dlgLevelScale = XtVaCreateManagedWidget("dlgLevelScale",
-					  pannerWidgetClass,
-					  dlgForm,
-					  XtNfromVert, dlgLevelLabel,
-					  XtNfromHoriz, NULL,
-					  XtNtop, XawChainTop,
-					  XtNbottom, XawChainTop,
-					  XtNleft, XawChainLeft,
-					  XtNright, XawChainLeft,
-					  XtNcanvasWidth, 110,
-					  XtNdefaultScale, 1,
-					  XtNinternalSpace, 1,
-					  XtNrubberBand, FALSE,
-					  XtNshadowThickness, 0,
-					  XtNallowOff, FALSE,
-					  XtNwidth, 200,
-					  XtNsliderWidth, 10,
-					  XtNheight, 15,
-					  NULL);
-  
-  XtOverrideTranslations(dlgLevelScale, XtParseTranslationTable("\
-<Btn2Down>:		start()\n\
-<Btn2Motion>:		move()\n\
-<Btn2Up>:		notify()stop()\n\
-<Btn3Down>:		abort()\n"));
-
-  XtAddCallback(dlgLevelScale, XtNreportCallback, levelscale_CB,
-		(XtPointer) dlgLevelValuator);
-  XtAddCallback(dlgLevelScale, XtNreportCallback, levelvalue_CB,
-		(XtPointer) &dlgLevelValue);
-
-  dlgSiblingLabel = XtVaCreateManagedWidget("dlgSiblingLabel",
-					    labelWidgetClass,
-					    dlgForm,
-					    XtNfromVert, dlgLevelScale,
-					    XtNfromHoriz, NULL,
-					    XtNtop, XawChainTop,
-					    XtNbottom, XawChainTop,
-					    XtNleft, XawChainLeft,
-					    XtNright, XawChainLeft,
-					    XtNborderWidth, 0,
-					    NULL);
-
-  dlgSiblingValuator = XtVaCreateManagedWidget("dlgLevelValuator",
-					       labelWidgetClass,
-					       dlgForm,
-					       XtNfromVert, dlgLevelScale,
-					       XtNfromHoriz, dlgSiblingLabel,
-					       XtNtop, XawChainTop,
-					       XtNbottom, XawChainTop,
-					       XtNleft, XawChainLeft,
-					       XtNright, XawChainLeft,
-					       XtNlabel, "   ",
-					       NULL);
-  dlgSiblingScale = XtVaCreateManagedWidget("dlgSiblingScale",
-					    pannerWidgetClass,
-					    dlgForm,
-					    XtNfromVert, dlgSiblingLabel,
-					    XtNfromHoriz, NULL,
-					    XtNtop, XawChainTop,
-					    XtNbottom, XawChainTop,
-					    XtNleft, XawChainLeft,
-					    XtNright, XawChainLeft,
-					    XtNcanvasWidth, 110,
-					    XtNdefaultScale, 1,
-					    XtNinternalSpace, 1,
-					    XtNrubberBand, FALSE,
-					    XtNshadowThickness, 0,
-					    XtNallowOff, FALSE,
-					    XtNwidth, 200,
-					    XtNsliderWidth, 10,
-					    XtNheight, 15,
-					    NULL);
-  
-  XtOverrideTranslations(dlgSiblingScale, XtParseTranslationTable("\
-<Btn2Down>:		start()\n\
-<Btn2Motion>:		move()\n\
-<Btn2Up>:		notify()stop()\n\
-<Btn3Down>:		abort()\n"));
-
-  XtAddCallback(dlgSiblingScale, XtNreportCallback, siblingscale_CB,
-		(XtPointer) dlgSiblingValuator);
-  XtAddCallback(dlgSiblingScale, XtNreportCallback, siblingvalue_CB,
-		(XtPointer) &dlgSiblingValue);
-  
-  dlgOkButton = XtVaCreateManagedWidget("dlgOkButton",
-					commandWidgetClass,
-					dlgForm,
-					XtNfromVert, dlgSiblingScale,
-					XtNfromHoriz, NULL,
-					XtNtop, XawChainTop,
-					XtNbottom, XawChainTop,
-					XtNleft, XawChainLeft,
-					XtNright, XawChainLeft,
-					NULL);
-  
-  dlgCancelButton = XtVaCreateManagedWidget("dlgCancelButton",
-					    commandWidgetClass,
-					    dlgForm,
-					    XtNfromVert, dlgSiblingScale,
-					    XtNfromHoriz, dlgOkButton,
-					    XtNtop, XawChainTop,
-					    XtNbottom, XawChainTop,
-					    XtNleft, XawChainLeft,
-					    XtNright, XawChainLeft,
-					    NULL);
-  
-  XtAddCallback(dlgOkButton, XtNcallback, Scale_CB, (XtPointer) TRUE);
-  XtAddCallback(dlgCancelButton, XtNcallback, Scale_CB, (XtPointer) FALSE);
-}
-
-/* ----------------------------------------------------------------------------
- * 
- *   BuildHelpWindow() builds the help window that is displayed when the
- *   Help button on the application main window is pressed.
- * 
- * ----------------------------------------------------------------------------
- */
-
-
-static void
-BuildHelpWindow(parent)
-     Widget parent;
-{
-  int	i;
-
-  helpShell = XtVaCreatePopupShell("helpShell", transientShellWidgetClass,
-				   parent,
-				   NULL);
-  
-  helpForm = XtVaCreateManagedWidget("helpForm",
-				     formWidgetClass,
-				     helpShell,
-				     NULL);
-
-  helpDoneButton = XtVaCreateManagedWidget("helpDoneButton",
-					   commandWidgetClass,
-					   helpForm,
-					   XtNfromVert, NULL,
-					   XtNfromHoriz, NULL,
-					   XtNtop, XawChainTop,
-					   XtNbottom, XawChainTop,
-					   XtNleft, XawChainLeft,
-					   XtNright, XawChainLeft,
-					   NULL);
-  
-  XtAddCallback(helpDoneButton, XtNcallback, Popdown_CB, 
-		(XtPointer) helpShell);
-
-  helpTitle = XtVaCreateManagedWidget("helpTitle",
-				      labelWidgetClass,
-				      helpForm,
-				      XtNfromVert, NULL,
-				      XtNfromHoriz, helpDoneButton,
-				      XtNtop, XawChainTop,
-				      XtNbottom, XawChainTop,
-				      XtNleft, XawChainLeft,
-				      XtNright, XawChainLeft,
-				      XtNborderWidth, 0,
-				      XtNlabel, "",
-				      NULL);
-
-  helpText = XtVaCreateManagedWidget("helpText",
-				     asciiTextWidgetClass,
-				     helpForm,
-				     XtNfromVert, helpDoneButton,
-				     XtNfromHoriz, NULL,
-				     XtNtop, XawChainTop,
-				     XtNbottom, XawChainBottom,
-				     XtNleft, XawChainLeft,
-				     XtNright, XawChainRight,
-				     XtNeditType, XawtextRead,
-				     XtNdisplayCaret, FALSE,
-				     XtNscrollVertical, XawtextScrollAlways,
-				     XtNscrollHorizontal, 
-				     XawtextScrollWhenNeeded,
-				     XtNuseStringInPlace, TRUE,
-				     XtNstring, help_text,
-				     XtNwidth, 530,
-				     XtNheight, 650,
-				     NULL);
-}
-
-/* ----------------------------------------------------------------------------
- * 
- *   BuildApplicationWindow() assumes that TreeTopLevel has been initialized 
- *   by XtInitialize(). TreeDrawingArea is set to the drawing area in this
- *   application window.
- * 
- * ----------------------------------------------------------------------------
- */
-
-
-static void
-BuildApplicationWindow(parent)
-     Widget parent;
-{
-  Widget	topPane, box;
-
-  topPane = XtVaCreateManagedWidget("topPane",
-				    panedWidgetClass,
-				    parent,
-				    XtNorientation, XtorientVertical,
-				    NULL);
-
-  BuildMenubar(topPane);
-
-  statusText = XtVaCreateManagedWidget("statusText",
-				       labelWidgetClass,
-				       topPane,
-				       XtNborderWidth, 0,
-				       NULL);
-
-  scrolledWindow = XtVaCreateManagedWidget("scrolledWindow",
-					   viewportWidgetClass,
-					   topPane, 
-					   XtNshowGrip, FALSE,
-					   XtNallowHoriz, TRUE,
-					   XtNallowVert, TRUE,
-					   XtNuseBottom, TRUE,
-					   XtNuseRight, TRUE,
-					   NULL);
-
-  TreeDrawingArea = XtVaCreateManagedWidget("treeDrawingArea",
-					    simpleWidgetClass,
-					    scrolledWindow,
-					    NULL);
-}
-
-/* ----------------------------------------------------------------------------
- * 
- *   HandleError() is used when ReadTreeFromFile() or SaveTreeToFile() returns
- *   an error. 
- * 
- * ----------------------------------------------------------------------------
- */
-
-void
-HandleError(error, tree)
-     ErrCode error;
-     Tree *tree;
-{
-  Widget	dlg, text;
-  
-  if (tree) {
-    dlg = XtNameToWidget(dialog[DLG_INFO], "dlgInfoForm");
-    if (dlg) {
-      XtVaSetValues(dlg, 
-		    XtNvalue, errStr[error],
-		    XtNwidth, 200,
-		    NULL);
-      text = XtNameToWidget(dlg, "value");
-      if (text) {
-	XtVaSetValues(text, XtNdisplayCaret, FALSE, NULL);
-	XtVaSetValues(XawTextGetSource(text), XtNeditType, XawtextRead, NULL);
-      }
-    }
-    popup_dialog(dialog[DLG_INFO], XtGrabExclusive);
-  } else {
-    dlg = XtNameToWidget(dialog[DLG_ERROR], "dlgErrorForm");
-    if (dlg) {
-      XtVaSetValues(dlg, 
-		    XtNvalue, errStr[error], 
-		    XtNwidth, 200,
-		    NULL);
-      text = XtNameToWidget(dlg, "value");
-      if (text) {
-	XtVaSetValues(text, XtNdisplayCaret, FALSE, NULL);
-	XtVaSetValues(XawTextGetSource(text), XtNeditType, XawtextRead, NULL);
-      }
-    }
-    popup_dialog(dialog[DLG_ERROR], XtGrabExclusive);
-  }
-}
-
-
-/* ----------------------------------------------------------------------------
- * 
- *   InitializeInterface() initializes the environment for displaying
- *   the tree and creates the necessary supporting structures for interaction
- *   and display. This function should be called only once.
- * 
- * ----------------------------------------------------------------------------
- */
-
-void
-InitializeInterface(argc, argv)
-     int *argc;
-     char *argv[];
-{
-  XrmValue       rmvalue;
-  char          *rmtype;
-  Window         win;
-  Pixel          background;
-  XColor         colors[NUM_COLORS];
-  Colormap       cmap;
-  Pixmap         gray_pixmap;
-  Atom		 wm_delete_window;
-
-  /* XtSetLanguageProc is broken on some systems.
-     The symptom is an error of the form:
-        Warning: X locale modifiers not supported, using default
-     so don't use this call:
-
-        XtSetLanguageProc(NULL, NULL, NULL);
-  */
-  
-  TreeTopLevel = XtVaAppInitialize(&app, "Xoobr", 
-				   NULL, 0,
-				   argc, argv, 
-				   fallback_resources, 
-				   NULL);
-  
-  ASSERT(TreeTopLevel, "failed to open connection to X server");
-  
-  TreeDisplay = XtDisplay(TreeTopLevel);
-  TreeScreen  = DefaultScreen(TreeDisplay);
-
-  /* set up color resources */
-  applRsrcsPtr = &applRsrcs;
-  XtGetApplicationResources(TreeTopLevel, applRsrcsPtr,
-			    applRsrcsDesc, XtNumber(applRsrcsDesc),
-			    NULL, 0);
-
-  /* add actions */
-  XtAppAddActions(app, local_actions, 6);
-  XawSimpleMenuAddGlobalActions(app);
-  
-  TreeContourWidth = applRsrcsPtr->contour_width;
-  
-  /* set up label font info */
-  if (XrmGetResource(XtDatabase(TreeDisplay),
-		     X11_FONT_RESOURCE, X11_FONT_CLASS_RESOURCE,
-		     &rmtype, &rmvalue)) {
-    if (! (TreeLabelFont = XLoadQueryFont(TreeDisplay, rmvalue.addr)) ) {
-      WARN_4("cannot load user-specified font:", rmvalue.addr,
-	     "using font:", X11_DEFAULT_FONT);
-      TreeLabelFont = XLoadQueryFont(TreeDisplay, X11_DEFAULT_FONT);
-    }
-  }
-  else
-    TreeLabelFont = XLoadQueryFont(TreeDisplay, X11_DEFAULT_FONT);
-  TreeLabelFont = XLoadQueryFont(TreeDisplay, "fixed");
-  
-  check_pixmap =
-    XCreateBitmapFromData(TreeDisplay, RootWindow(TreeDisplay, TreeScreen),
-			  check_bits, check_width, check_height);
-  
-  slider_pixmap =
-    XCreateBitmapFromData(TreeDisplay, RootWindow(TreeDisplay, TreeScreen),
-			  slider_pixmap_bits, slider_pixmap_width, 
-			  slider_pixmap_height);
-  
-  BuildApplicationWindow(TreeTopLevel);
-  BuildHelpWindow(TreeTopLevel);
-  BuildPopupMenus(TreeTopLevel);
-  BuildDialogs(TreeTopLevel);
-  
-  
-  XtAddEventHandler(TreeDrawingArea, ExposureMask, FALSE,
-		    ExposeHandler, (XtPointer) NULL);
-  
-  XtVaSetValues(TreeDrawingArea, 
-		XtNbackground, applRsrcsPtr->background_color, 
-		NULL);
-  
-  XtRealizeWidget(TreeTopLevel);
-  
-  XtOverrideTranslations
-    (TreeTopLevel,
-     XtParseTranslationTable("<Message>WM_PROTOCOLS: quit()"));
-
-  wm_delete_window = XInternAtom(TreeDisplay, "WM_DELETE_WINDOW", FALSE);
-  (void) XSetWMProtocols(TreeDisplay, XtWindow(TreeTopLevel),
-			 &wm_delete_window, 1);
-
-
-  win = XtWindow(TreeDrawingArea);
-  cmap = DefaultColormap(TreeDisplay, TreeScreen);
-  
-  /* set up double buffer */
-  colors[BACKGROUND_COLOR].pixel = applRsrcsPtr->background_color;
-  XQueryColor(TreeDisplay, cmap, &(colors[BACKGROUND_COLOR]));
-  colors[TREE_COLOR].pixel = applRsrcsPtr->tree_color;
-  XQueryColor(TreeDisplay, cmap, &(colors[TREE_COLOR]));
-  colors[CONTOUR_COLOR].pixel = applRsrcsPtr->contour_color;
-  XQueryColor(TreeDisplay, cmap, &(colors[CONTOUR_COLOR]));
-  colors[HIGHLIGHT_COLOR].pixel = applRsrcsPtr->highlight_color;
-  XQueryColor(TreeDisplay, cmap, &(colors[HIGHLIGHT_COLOR]));
-  colors[SPLIT_COLOR].pixel = applRsrcsPtr->split_color;
-  XQueryColor(TreeDisplay, cmap, &(colors[SPLIT_COLOR]));
-  colors[ACTION_COLOR].pixel = applRsrcsPtr->action_color;
-  XQueryColor(TreeDisplay, cmap, &(colors[ACTION_COLOR]));
-  
-  TreeDrawingAreaDB = 
-    DBLcreate_double_buffer(TreeDisplay, 
-			    XtWindow(TreeDrawingArea), TRUE,
-			    colors, NUM_COLORS);
-
-  ASSERT(TreeDrawingAreaDB, "could not create double buffer");
-  
-  background = DBLinq_background(TreeDrawingAreaDB);
-  
-  
-  XtVaSetValues(TreeDrawingArea, XtNbackground, background, NULL);
-  
-  /* also set the scrolledWindow background to same color */
-  XtVaSetValues(XtParent(TreeDrawingArea), XtNbackground, background, NULL);
-  
-  XSetFont(TreeDrawingAreaDB->display, TreeDrawingAreaDB->gc,
-	   TreeLabelFont->fid); 
-  
-  gray_pixmap =
-    XCreatePixmapFromBitmapData(TreeDisplay, XtWindow(TreeDrawingArea),
-				gray_bits, gray_width, gray_height,
-				TreeDrawingAreaDB->colors[TREE_COLOR],
-				background,
-				DefaultDepth(TreeDisplay, TreeScreen));
-  
-#ifdef COMMENT
-  XtVaSetValues(treeMenuItems[LAYOUT_MENU_VARIABLE],
-		XtNleftBitmap, check_pixmap, 
-		NULL);
-#endif
-
-  XSetTile(TreeDrawingAreaDB->display, TreeDrawingAreaDB->gc, gray_pixmap);
-  SetDrawColor(TREE_COLOR);
-  
-  InitializeDissolveEffect(TreeDisplay, XtWindow(TreeDrawingArea),
-			   TreeDrawingAreaDB->colors[TREE_COLOR], background);
-  
-  PauseCursor = XCreateFontCursor(TreeDisplay, XC_watch);
-  
-  StatusMsg("Ready", TRUE);
-}
-
-
-/* ----------------------------------------------------------------------------
- * 
- *   UserEventLoop() is called after InitializeInterface() to handle
- *   processing of events.
- * 
- * ----------------------------------------------------------------------------
- */
-
-void
-UserEventLoop()
-{
-  XtAppMainLoop(app);
-}
-
-
-/* ------------------------------------------------------------------------- */
-/*			  Callback Routines                                  */
-/* ------------------------------------------------------------------------- */
-
-static void
-TreeMenu_CB(w, client_data, call_data)
-     Widget w;
-     XtPointer client_data;
-     XtPointer call_data;
-{
-  long		menuItem = (long) client_data;
-  Widget	dlgFileForm;
-  
-  switch (menuItem) {
-  case TREE_MENU_NEW:
-    popup_dialog(dialog[DLG_NEW], XtGrabExclusive);
-    break;
-  case TREE_MENU_LOAD:
-    loading_file = 1;
-    XtVaSetValues(dialog[DLG_FILE],  XtNtitle, "Load File", NULL);
-    dlgFileForm = XtNameToWidget(dialog[DLG_FILE], "dlgFileForm");
-    XtVaSetValues(dlgFileForm, XtNvalue, "", NULL);
-    popup_dialog(dialog[DLG_FILE], XtGrabExclusive);
-    break;
-  case TREE_MENU_SAVE:
-    loading_file = 0;
-    XtVaSetValues(dialog[DLG_FILE],  XtNtitle, "Save File", NULL);
-    dlgFileForm = XtNameToWidget(dialog[DLG_FILE], "dlgFileForm");
-    XtVaSetValues(dlgFileForm, XtNvalue, "", NULL);
-    popup_dialog(dialog[DLG_FILE], XtGrabExclusive);
-    break;
-  case TREE_MENU_QUIT:
-    exit(0);
-    break;
-    
-  default:
-    WARN("unknown menu item in TreeMenu_CB");
-  }
-}
-
-
-/* ------------------------------------------------------------------------- */
-
-static void
-LayoutMenu_CB(w, client_data, call_data)
-     Widget w;
-     XtPointer client_data;
-     XtPointer call_data;
-{
-  long	menuItem = (long) client_data;
-  char	tmpstr[10];
-  
-  switch (menuItem) {
-#ifdef COMMENT
-  case LAYOUT_MENU_FIXED:
-    XtVaSetValues(layoutMenuItems[LAYOUT_MENU_VARIABLE],
-                  XtNleftBitmap, None, NULL);
-    XtVaSetValues(layoutMenuItems[LAYOUT_MENU_FIXED], 
-                  XtNleftBitmap, check_pixmap, NULL);
-
-    if (TreeLayoutDensity != Fixed) {
-      TreeLayoutDensity = Fixed;
-      DeleteTree(TheTree, TRUE);
-      SetupTree(TheTree);
-    }
-    break;    
-  case LAYOUT_MENU_VARIABLE:
-    XtVaSetValues(layoutMenuItems[LAYOUT_MENU_VARIABLE],
-                  XtNleftBitmap, check_pixmap, NULL);
-    XtVaSetValues(layoutMenuItems[LAYOUT_MENU_FIXED], 
-                  XtNleftBitmap, None, NULL);
-    
-    if (TreeLayoutDensity != Variable) {
-      TreeLayoutDensity = Variable;
-      DeleteTree(TheTree, TRUE);
-      SetupTree(TheTree);
-    }
-    break;
-#endif COMMENT
-  case LAYOUT_MENU_SPACING:
-    dlgLevelValue = TreeParentDistance;
-    dlgSiblingValue = TreeBorderSize;
-    sprintf(tmpstr, "%d  ", dlgLevelValue);
-    XtVaSetValues(dlgLevelValuator, XtNlabel, tmpstr, NULL);
-
-    /* These setvalues need some adjustments... */
-    XtVaSetValues(dlgLevelScale, 
-		  XtNsliderX, (dlgLevelValue * 2),
-		  NULL);
-    sprintf(tmpstr, "%d  ", dlgSiblingValue);
-    XtVaSetValues(dlgSiblingValuator, XtNlabel, tmpstr, NULL);
-    XtVaSetValues(dlgSiblingScale, 
-		  XtNsliderX, (dlgSiblingValue * 4),
-		  NULL);
-    popup_dialog(dialog[DLG_SPACING], XtGrabNone);
-    break;
-  case LAYOUT_MENU_ALIGN_NODES:
-    TreeAlignNodes = !TreeAlignNodes;
-    XtVaSetValues(treeMenuItems[LAYOUT_MENU_ALIGN_NODES],
-		  XtNleftBitmap, TreeAlignNodes ? check_pixmap : None, 
-		  NULL);
-    DeleteTree(TheTree, TRUE);
-    ResetLabels(TheTree);
-    SetupTree(TheTree);
-    break;
-  default:
-    WARN("unknown menu item in LayoutMenu_CB");
-  }
-}
-
-
-/* ------------------------------------------------------------------------- */
-
-static void
-NodeMenu_CB(w, client_data, call_data)
-     Widget w;
-     XtPointer client_data;
-     XtPointer call_data;
-{
-  long	menuItem = (long) client_data;
-   
-  switch (menuItem) {
-  case NODE_MENU_ADD_CHILD:
-    NodePos = Child;
-    popup_dialog(dialog[DLG_NODE_NAME], XtGrabExclusive);
-    break;
-  case NODE_MENU_ADD_BEFORE:
-    NodePos = Before;
-    popup_dialog(dialog[DLG_NODE_NAME], XtGrabExclusive);
-    break;
-  case NODE_MENU_ADD_AFTER:
-    NodePos = After;
-    popup_dialog(dialog[DLG_NODE_NAME], XtGrabExclusive);
-    break;
-  case NODE_MENU_ELISION:
-    ExpandCollapseNode(PopupNode);
-    break;
-  case NODE_MENU_DELETE:
-    DeleteNode(PopupNode);
-    if (TheTree == NULL)
-      XtSetSensitive(treeMenuItems[TREE_MENU_SAVE], FALSE);
-    break;
-  default:
-    WARN("unknown menu item in NodeMenu_CB");
-  }
-}
-
-
-/* ------------------------------------------------------------------------- */
-
-static void
-Help_CB(w, client_data, call_data)
-     Widget w;
-     XtPointer client_data;
-     XtPointer call_data;
-{
-  popup_dialog(helpShell, XtGrabNone);
-}
-
-
-/* ------------------------------------------------------------------------- */
-
-static void
-HelpDone_CB(w, client_data, call_data)
-     Widget w;
-     XtPointer client_data;
-     XtPointer call_data;
-{
-  XtPopdown(helpShell);
-}
-
-
-/* ------------------------------------------------------------------------- */
-
-static void
-NodeLabel_CB(w, client_data, call_data)
-     Widget w;
-     XtPointer client_data;
-     XtPointer call_data;
-{
-  char	*node_label;
-
-  XtPopdown(dialog[DLG_NODE_NAME]);
-  if (client_data == (XtPointer) TRUE) {
-    node_label = XtMalloc(strlen(XawDialogGetValueString(XtParent(w)))
-			  * sizeof(char));
-    node_label = strcpy(node_label, XawDialogGetValueString(XtParent(w)));
-    if (*node_label) 
-      InsertNode(PopupNode, NodePos, node_label);
-  }
-}
-      
-
-/* ------------------------------------------------------------------------- */
-
-static void
-NewTree_CB(w, client_data, call_data)
-     Widget w;
-     XtPointer client_data;
-     XtPointer call_data;
-{
-  char	*node_label;
-  Tree	*tree;
-  
-  XtPopdown(dialog[DLG_NEW]);
-  if (client_data == (XtPointer) TRUE) {
-    node_label = XtMalloc((strlen(XawDialogGetValueString(XtParent(w))) + 1)
-			  * sizeof(char));
-    node_label = strcpy(node_label, XawDialogGetValueString(XtParent(w)));
-    if (*node_label) {
-      if (TheTree) {
-	Delete(TheTree);
-	XtSetSensitive(treeMenuItems[TREE_MENU_SAVE], FALSE);
-      }
-      tree = MakeNode();
-      SetNodeLabel(tree, node_label);
-      SetupTree(tree);
-      XtSetSensitive(treeMenuItems[TREE_MENU_SAVE], TRUE);
-    }
-  }
-  XSync(TreeDisplay, FALSE);
-}
-
-
-/* ------------------------------------------------------------------------- */
-
-static void
-File_CB(w, client_data, call_data)
-     Widget w;
-     XtPointer client_data;
-     XtPointer call_data;
-{
-  char *fname;
-  Tree *tree;
-  ErrCode error;
-  Arg args[1];
-  int menuItem;
-  
-  if (client_data == (XtPointer) TRUE) {
-    fname = XawDialogGetValueString(XtParent(w));
-    if (*fname) { 
-      
-      if (loading_file == 1) {
-	if (TheTree) {
-	  Delete(TheTree);
-	  XtSetSensitive(treeMenuItems[TREE_MENU_SAVE], FALSE);
-	}
-	tree = ReadTreeFromFile(fname, &error);
-	XtPopdown(dialog[DLG_FILE]);
-	if (error != ERR_NONE)
-	  HandleError(error, tree);
-	XSync(TreeDisplay, 0);
-	if (tree) {
-	  SetupTree(tree);
-	  XtSetSensitive(treeMenuItems[TREE_MENU_SAVE], TRUE);
-	} else {
-	  SetDrawingTree(NULL);
-	  BeginFrame();
-	  EndFrame();
-	}
-      } else if (menuItem == TREE_MENU_SAVE) {
-	if (!SaveTreeToFile(TheTree, fname)) {
-	  XtPopdown(dialog[DLG_FILE]);
-	  HandleError(ERR_OPENFAIL, NULL);
-	} else
-	  XtPopdown(dialog[DLG_FILE]);
-      }
-    } else
-      XtPopdown(dialog[DLG_FILE]);
-  } else 
-    XtPopdown(dialog[DLG_FILE]); 
-}
-
-
-/* ------------------------------------------------------------------------- */
-
-static void
-Scale_CB(w, client_data, call_data)
-     Widget w;
-     XtPointer client_data;
-     XtPointer call_data;
-{
-  int	level_value, sibling_value;
-  float	tmp;
-    
-  XtPopdown(dialog[DLG_SPACING]);
-
-  /* check if OK button was selected */
-  if (client_data) {
-    level_value = dlgLevelValue;
-    
-    sibling_value = dlgSiblingValue;
-    
-    if (level_value != TreeParentDistance ||
-	sibling_value != TreeBorderSize) {
-      
-      TreeParentDistance = level_value;
-      TreeBorderSize = sibling_value;
-      XSync(TreeDisplay, 0);
-      if (TheTree) {
-	DeleteTree(TheTree, TRUE);
-	if (TreeAlignNodes)
-	  ResetLabels(TheTree);
-	SetupTree(TheTree);
-      }
-    }
-  }
-}
-
-
-/* ------------------------------------------------------------------------- */
-/*									     */
-/* Auxilary actions and callback functions                                   */
-/*									     */
-/* ------------------------------------------------------------------------- */
-
-static void
-Popdown_CB(w, client_data, call_data)
-     Widget w;
-     XtPointer client_data;
-     XtPointer call_data;
-{
-  Widget	widget = (Widget) client_data;
-    
-  XtPopdown(widget);
-}
-
-static void
-activate_action(w, event, params, num_params)
-     Widget w;
-     XButtonEvent *event;
-     String *params;
-     Cardinal *num_params;
-{
-  Widget	button;
-  
-  if (*num_params == 1) {
-    button = XtNameToWidget(XtParent(w), params[0]);
-    
-    if (button)
-      XtCallCallbacks(button, XtNcallback, (XtPointer) TRUE);
-  }
-}
-
-static void
-quit_action(w, event, params, num_params)
-     Widget w;
-     XButtonEvent *event;
-     String *params;
-     Cardinal *num_params;
-{
-  exit(0);
-}
-
-
-
-/* ------------------------------------------------------------------------- */
-
-static void 
-select_action(w, event, params, num_params)
-     Widget w;
-     XButtonEvent *event;
-     String *params;
-     Cardinal *num_params;
-{
-  Tree		*node;
-  int		height;
-  Boolean	edit = FALSE;
-
-  if ((*num_params > 0) && 
-      (!strcmp(params[0], "EDIT") ||
-       !strcmp(params[0], "edit")))
-    edit = TRUE;
-
-  if (SearchTree(TheTree, event->x, event->y, &node)) {
-    static Tree *PrevNode = NULL;
-    Tree *ParNode = NULL;
-    
-    PopupNode = node;
-    if (PrevNode != NULL)
-      DrawNode(PrevNode, New);
-    PrevNode = PopupNode;
-    
-    printf("%s^^%s^^%s\n", 
-	   EnvNm,
-	   edit ? "br-edit" : "br-view",
-	   (PopupNode->value) ? PopupNode->value : PopupNode->label.text);
-
-    StatusMsg(PopupNode->label.text, 1);
-    
-    ParNode = PopupNode->parent;
-    PopupNode->parent = NULL;
-    HiliteNode(PopupNode, New);
-    PopupNode->parent = ParNode;
-  }
-}
-
-static void 
-menu_popup_action(w, event, params, num_params)
-     Widget w;
-     XEvent *event;
-     String *params;
-     Cardinal *num_params;
-{
-  Widget menu;
-  Boolean popup;
-  ShellWidget shell_widget;
-
-  char	    *strargs[] = {"nodeMenu", NULL};
-  
-  menu = XtNameToWidget(TreeTopLevel, params[0]);
-  shell_widget = (ShellWidget) menu;
-  
-  if (nodeFound) {
-
-    /* This is giving me a headache. 
-     * Why does popup menus come up unselectable? 
-     */
-
-    XtCallActionProc(TreeDrawingArea,
-		     "XtMenuPopup",
-		     event,
-		     strargs,
-		     1);
-		 
-/*
-    XtSetSensitive(menu, TRUE);
-    XtPopupSpringLoaded(menu);
- */
-
-/*    if (!XtIsShell(menu)) {
-      printf("error: not shell widget!\n");
-    } else {
-      if (! shell_widget->shell.popped_up) {
-	
-	XtGrabKind call_data = XtGrabExclusive;
-	
-	XtCallCallbacks(menu, XtNpopupCallback, (XtPointer) &call_data);
-	
-	shell_widget->shell.popped_up = TRUE;
-	shell_widget->shell.grab_kind = XtGrabExclusive;
-	shell_widget->shell.spring_loaded = TRUE;
-	
-	if (shell_widget->shell.create_popup_child_proc != NULL) {
-	  (*(shell_widget->shell.create_popup_child_proc))(menu);
-	}
-	
-	XtAddGrab(menu, TRUE, TRUE);
-	
-	XtRealizeWidget(menu);
-	
-	XMapRaised(XtDisplay(menu), XtWindow(menu));
-	
-      } else
-	XRaiseWindow(XtDisplay(menu), XtWindow(menu));   
-    }
-    */
-  }
-}
-
-
-static void 
-button_action(w, event, params, num_params)
-     Widget w;
-     XEvent *event;
-     String *params;
-     Cardinal *num_params;
-{
-  Tree     *node;
-  
-  if (SearchTree(TheTree, event->xbutton.x, event->xbutton.y, &node)) {
-    
-    nodeFound = TRUE;
-    
-    XtSetSensitive(nodeMenuItems[NODE_MENU_DELETE], TRUE);
-
-    XtVaSetValues(treeMenus[NODE_MENU], 
-		  XtNlabel, node->label.text, 
-		  NULL);
-    PopupNode = node;
-    if (IS_LEAF(node))  {
-      
-      XtSetSensitive(nodeMenuItems[NODE_MENU_ELISION], FALSE);
-      
-      XtVaSetValues(nodeMenuItems[NODE_MENU_ELISION], 
-		    XtNlabel, labelStr[STR_NODE_COLLAPSE], 
-		    NULL);
-      
-    } else {
-      
-      XtSetSensitive(nodeMenuItems[NODE_MENU_ELISION], TRUE);
-      if (node->elision) {
-	XtVaSetValues(nodeMenuItems[NODE_MENU_ELISION],
-		      XtNlabel, labelStr[STR_NODE_EXPAND],
-		      NULL);
-      } else {
-	XtVaSetValues(nodeMenuItems[NODE_MENU_ELISION],
-		      XtNlabel, labelStr[STR_NODE_COLLAPSE],
-		      NULL);
-      }
-    }
-    
-    if (node->parent) {
-      XtSetSensitive(nodeMenuItems[NODE_MENU_ADD_BEFORE], TRUE);
-      XtSetSensitive(nodeMenuItems[NODE_MENU_ADD_AFTER], TRUE);
-    } else {
-      XtSetSensitive(nodeMenuItems[NODE_MENU_ADD_BEFORE], FALSE);
-      XtSetSensitive(nodeMenuItems[NODE_MENU_ADD_AFTER], FALSE);
-    }
-    
-    if (node->elision) {
-      XtSetSensitive(nodeMenuItems[NODE_MENU_ADD_CHILD], FALSE);
-    } else {
-      XtSetSensitive(nodeMenuItems[NODE_MENU_ADD_CHILD], TRUE);
-    }
-    
-  } else {
-    nodeFound = FALSE;
-
-    XtVaSetValues(treeMenus[NODE_MENU], 
-		  XtNlabel, " ", 
-		  NULL);
-
-    XtSetSensitive(nodeMenuItems[NODE_MENU_ADD_BEFORE], FALSE);
-    XtSetSensitive(nodeMenuItems[NODE_MENU_ADD_AFTER], FALSE);
-    XtSetSensitive(nodeMenuItems[NODE_MENU_ADD_CHILD], FALSE);
-    XtSetSensitive(nodeMenuItems[NODE_MENU_ELISION], FALSE);
-    XtSetSensitive(nodeMenuItems[NODE_MENU_DELETE], FALSE);
-  }
-}
-
-
-/* ------------------------------------------------------------------------- */
-/*									     */
-/* General purpose popdown widget callback (for dialog popdown buttons)      */
-/*									     */
-/* ------------------------------------------------------------------------- */
-
-static void center_widget(w, x, y)
-Widget w;
-int x, y;
-{
-  Dimension	width, height, border;
-  Position	max_x, max_y;
-  
-  XtVaGetValues(w,
-		XtNwidth, &width,
-		XtNheight, &height,
-		XtNborderWidth, &border,
-		NULL);
-  
-  width += 2 * border;
-  height += 2 * border;
-  
-  x -= ((Position) width / 2);
-  y -= ((Position) height / 2);
-  
-  if (x < 0) x = 0;
-  if (y < 0) y = 0;
-  
-  if (x > (max_x = (Position) (XtScreen(w)->width - width)) )
-    x = max_x;
-  
-  if (y > (max_y = (Position) (XtScreen(w)->height - height)) )
-    y = max_y;
-  
-  XtVaSetValues(w,
-		XtNx, x,
-		XtNy, y,
-		NULL);
-}
-
-#define shell_translations "<Message>WM_PROTOCOLS: wmpopdown()\n"
-		     
-static void 
-popup_dialog(shell, grab_kind)
-     Widget shell;
-     XtGrabKind grab_kind;
-{
-  int		idummy, x, y;
-  Window	wdummy;
-
-  XtOverrideTranslations(shell, XtParseTranslationTable(shell_translations));
-  XtRealizeWidget(shell);
-  wm_delete_window = XInternAtom(XtDisplay(shell), "WM_DELETE_WINDOW", 
-				 FALSE);
-  (void) XSetWMProtocols(XtDisplay(shell), XtWindow(shell),
-			 &wm_delete_window, 1);
-  
-  XQueryPointer(TreeDisplay, DefaultRootWindow(TreeDisplay), 
-		&wdummy, &wdummy,
-		&x, &y, &idummy, &idummy, &idummy);
-  
-  center_widget(shell, x, y);
-  
-  XtPopup(shell, grab_kind);
-}
-
-static void 
-popdown_action(widget, event, params, num_params)
-     Widget widget;
-     XEvent *event;
-     String *params;
-     Cardinal *num_params;
-{
-  XtPopdown(widget);
-}
-
-static void 
-set_siblingscale_CB(widget, w, percent_ptr)
-     Widget widget;
-     XtPointer w;
-     XtPointer percent_ptr;
-{
-  char tmpstr[10];
-  
-  sprintf(tmpstr, "%d  ", (int) (*(float*) percent_ptr*MAX_BORDER_SIZE));
-  
-  XtVaSetValues((Widget) w, XtNlabel, tmpstr, NULL);
-}
-
-static void 
-siblingscale_CB(widget, w, report)
-     Widget widget;
-     XtPointer w;
-     XawPannerReport *report;
-{
-  char tmpstr[10];
-  
-  sprintf(tmpstr, "%d ", (int) 
-	  ((float) report->slider_x / report->slider_width 
-	   * MAX_BORDER_SIZE / 10));
-  
-  XtVaSetValues((Widget) w, XtNlabel, tmpstr, NULL);
-}
-
-static void
-set_levelscale_CB(widget, w, percent_ptr)
-     Widget widget;
-     XtPointer w;
-     XtPointer percent_ptr;
-{
-  char	tmpstr[10];
-
-  sprintf(tmpstr, "%d  ", (int) (*(float*) percent_ptr*MAX_PARENT_DISTANCE));
-
-  XtVaSetValues((Widget) w, XtNlabel, tmpstr, NULL);
-}
-
-static void
-levelscale_CB(widget, w, report)
-     Widget widget;
-     XtPointer w;
-     XawPannerReport *report;
-{
-  char	tmpstr[10];
-  
-  sprintf(tmpstr, "%d ", (int) 
-	  ((float) report->slider_x / report->slider_width 
-	   * MAX_PARENT_DISTANCE / 10));
-  
-  XtVaSetValues((Widget) w, XtNlabel, tmpstr, NULL);
-}
-
-static void 
-set_siblingvalue_CB(widget, var_ptr, percent_ptr)
-     Widget widget;
-     XtPointer var_ptr;
-     XtPointer percent_ptr;
-{
-  * (int *)var_ptr = (int) (*(float*) percent_ptr*MAX_BORDER_SIZE);
-}
-
-static void 
-set_levelvalue_CB(widget, var_ptr, percent_ptr)
-     Widget widget;
-     XtPointer var_ptr;
-     XtPointer percent_ptr;
-{
-  * (int *)var_ptr = (int) (*(float*) percent_ptr*MAX_PARENT_DISTANCE);
-}
-
-
-static void 
-siblingvalue_CB(widget, var_ptr, report)
-     Widget widget;
-     XtPointer var_ptr;
-     XawPannerReport *report;
-{
-  * (int *) var_ptr = (int) 
-    ((float) report->slider_x / report->slider_width 
-     * MAX_BORDER_SIZE / 10);
-}
-
-static void 
-levelvalue_CB(widget, var_ptr, report)
-     Widget widget;
-     XtPointer var_ptr;
-     XawPannerReport *report;
-{
-  * (int *) var_ptr = (int) 
-    ((float) report->slider_x / report->slider_width 
-     * MAX_PARENT_DISTANCE / 10);
-}
-
-
-/* ----------------------------------------------------------------------------
- * 
- *   Main routine
- * 
- * ----------------------------------------------------------------------------
- */
-
-main(argc, argv)
-     int argc;
-     char *argv[];
-{
-  Tree *tree = NULL;
-  ErrCode error = ERR_NONE;
-  
-  ProgramName = strdup(argv[0]);
-  if (ProgramName == NULL) {
-    fprintf(stderr, "%s: insufficient memory available\n", argv[0]);
-    exit(0);
-  }
-  
-  InitializeInterface(&argc, argv);
-  XSync(TreeDisplay, 0);
-
-  if (argc >= 2) {
-    tree = ReadTreeFromFile(argv[1], &error);
-    if (tree) StatusMsg(argv[1], TRUE);
-    if (argc > 2)
-      WARN("extraneous arguments ignored");
-  } 
-     
-  if (tree) {
-    SetupTree(tree);
-    XtSetSensitive(treeMenuItems[TREE_MENU_SAVE], TRUE);
-  } else {
-    SetDrawingTree(NULL);
-    XtSetSensitive(treeMenuItems[TREE_MENU_SAVE], FALSE);
-  }
-
-  if (error != ERR_NONE)
-    HandleError(error, tree);
-  
-  StatusMsg("Left = Edit Node; Mid = View Node; Right = Node Menu", 1);
-  UserEventLoop();
-}
-
-/* ------------------------------------------------------------------------- */
-/*				  End of File                                */
-/* ------------------------------------------------------------------------- */
-
-
-
-
-
-
diff -r 4de2936b4e77 -r 0132846995bd lisp/oobr/tree-x/intf.h
--- a/lisp/oobr/tree-x/intf.h	Mon Aug 13 09:42:28 2007 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,124 +0,0 @@
-/* ----------------------------------------------------------------------------
- * File    : intf.h
- * Purpose : include file for intf.c and draw.c 
- * ----------------------------------------------------------------------------
- */
-
-#include <X11/Intrinsic.h>
-#include <X11/StringDefs.h>
-#define DEFAULT_FONT	"-adobe-helvetica-bold-r-normal--12-*"
-#define BIG_FONT	"-adobe-helvetica-bold-r-normal--12-*"
-
-#define X11_APPLICATION_CLASS    "Tree"
-#define X11_DEFAULT_FONT         "fixed"
-#define X11_FONT_RESOURCE        "tree.font"
-#define X11_FONT_CLASS_RESOURCE  "Tree.Font"
-
-#define HELP_FILE                 "tree.help"
-
-#define LABEL_MAT_WIDTH           3
-#define LABEL_MAT_HEIGHT          3
-#define BORDER_SIZE               4      /* beginning border size     */
-#define MAX_BORDER_SIZE           25
-#define PARENT_DISTANCE           30     /* beginning parent distance */
-#define MAX_PARENT_DISTANCE       50
-#define DENSITY_FACTOR            1.50
-#define MAT_SIZE                  BORDER_SIZE * 2
-#define ELISION_WIDTH             5
-#define ANIMATION_STEP            3
-#define ANIMATION_STEP_STEP       4
-
-#define BACKGROUND_COLOR          0
-#define TREE_COLOR                1
-#define CONTOUR_COLOR             2
-#define HIGHLIGHT_COLOR           3
-#define SPLIT_COLOR               4
-#define ACTION_COLOR              5  
-#define NUM_COLORS                6
-
-#define TREE_MENU_NEW             0
-#define TREE_MENU_LOAD            1
-#define TREE_MENU_SAVE            2
-#define TREE_MENU_SEP1            3
-#define TREE_MENU_QUIT            4
-#define TREE_MENU_STATS           6
-#define TREE_MENU_ITEMS           5
-
-#define TREE_MENU_SEP2            5
-
-#define LAYOUT_MENU_FIXED         0 /* not used at this time */
-#define LAYOUT_MENU_VARIABLE      1
-#define LAYOUT_MENU_SEP1          2
-
-#define LAYOUT_MENU_SPACING       3
-#define LAYOUT_MENU_SEP2          4
-#define LAYOUT_MENU_ALIGN_NODES   5
-#define LAYOUT_MENU_ITEMS         5
-
-#define NODE_MENU_LABEL           0
-#define NODE_MENU_SEP1            1
-#define NODE_MENU_ADD_CHILD       2
-#define NODE_MENU_ADD_BEFORE      3
-#define NODE_MENU_ADD_AFTER       4
-#define NODE_MENU_ELISION         5
-#define NODE_MENU_DELETE          6
-#define NODE_MENU_ITEMS           7
-
-#define TREE_MENU                 0
-#define LAYOUT_MENU               1
-#define NODE_MENU                 2
-#define NUM_MENUS                 3
-
-#define STR_SHOW_STATS            0
-#define STR_HIDE_STATS            1
-#define STR_NODE_COLLAPSE         2
-#define STR_NODE_EXPAND           3
-#define STR_SHOW_CONTOUR          4
-#define STR_HIDE_CONTOUR          5
-#define STR_LOAD_FILE             6
-#define STR_SAVE_FILE             7
-#define NUM_MENU_STRS             8 
-
-#define DLG_NEW                   0
-#define DLG_NODE_NAME             1
-#define DLG_FILE                  2
-#define DLG_INFO                  3
-#define DLG_ERROR                 4
-#define DLG_SPACING               5
-#define NUM_DLG                   6
-
-/* in 1/10ths of a second */
-#define ANIMATION_SPEED_FAST       1
-
-typedef enum {
-   NoContours,
-   OutsideContour,
-   AllContours,
-   SelectedContours
-} ContourOption;
-
-typedef enum {
-   Child,
-   Before,
-   After
-} NodePosition;
-
-typedef enum {
-   Fixed,
-   Variable
-} DensityOption;
-
-extern  Widget        TreeTopLevel;
-extern  Widget        TreeDrawingArea;
-extern  Display      *TreeDisplay;
-extern  int           TreeScreen;
-extern  int           TreeContourWidth;
-extern  int           TreeBorderSize;
-extern  int           TreeParentDistance;
-extern  XFontStruct  *TreeLabelFont;
-extern  DoubleBuffer *TreeDrawingAreaDB;
-extern  char          TreeShowSteps;
-extern  ContourOption TreeShowContourOption;
-extern  DensityOption TreeLayoutDensity;
-extern  char          TreeAlignNodes;   
-extern  char          PauseAfterStep;
diff -r 4de2936b4e77 -r 0132846995bd lisp/oobr/tree-x/rsrc.h
--- a/lisp/oobr/tree-x/rsrc.h	Mon Aug 13 09:42:28 2007 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,34 +0,0 @@
-#define TrNbackgroundColor "backgroundColor"
-#define TrNtreeColor       "treeColor"
-#define TrNcontourColor    "contourColor"
-#define TrNsplitColor      "splitColor"
-#define TrNhighlightColor  "highlightColor"
-#define TrNactionColor     "actionColor"   
-#define TrNcontourWidth    "contourWidth"
-
-#define TrCBackgroundColor "BackgroundColor"
-#define TrCTreeColor       "TreeColor"
-#define TrCContourColor    "ContourColor"
-#define TrCSplitColor      "SplitColor"
-#define TrCHighlightColor  "HighlightColor"
-#define TrCActionColor     "ActionColor"    
-#define TrCContourWidth    "ContourWidth"
-
-#define TrDefaultBackgroundColor "white"
-#define TrDefaultTreeColor       "black"
-#define TrDefaultContourColor    "Blue"
-#define TrDefaultSplitColor      "brown"
-#define TrDefaultHighlightColor  "red"
-#define TrDefaultActionColor     "red"
-#define TrDefaultContourWidth    2
-
-typedef struct {
-   Pixel background_color;
-   Pixel tree_color;
-   Pixel contour_color;
-   Pixel split_color;
-   Pixel highlight_color;
-   Pixel action_color;
-   int   contour_width;
-} ApplRsrcData, *ApplRsrcDataPtr;
-
diff -r 4de2936b4e77 -r 0132846995bd lisp/oobr/tree-x/tree.c
--- a/lisp/oobr/tree-x/tree.c	Mon Aug 13 09:42:28 2007 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,725 +0,0 @@
-/* ----------------------------------------------------------------------------
- * File    : tree.c
- * Purpose : dynamic tree program based on Sven Moen's algorithm
- * ----------------------------------------------------------------------------
- */
-
-#include "defs.h"
-#include "tree.h"
-#include "dbl.h"
-#include "intf.h"
-#include <string.h>
-
-/* ------------------------------------------------------------------------- */
-/*				Global Variables                             */
-/* ------------------------------------------------------------------------- */
-
-int NumLines = 0;
-int NumNodes = 0;
-
-
-/* ----------------------------------------------------------------------------
- * 
- *   MakeLine() allocates the memory required for a Polyline and 
- *   initializes the fields of a Polyline to the arguments. The
- *   newly-allocated Polyline is returned by the function.
- * 
- * ----------------------------------------------------------------------------
- */
-
-Polyline*
-MakeLine(dx, dy, link)
-   short dx;
-   short dy;
-   Polyline *link;
-{
-   Polyline *new;
-
-   new = (Polyline *) malloc(sizeof(Polyline));
-   NASSERT(new, "could not allocate memory for polyline");
-   NumLines++;
-
-   new->dx = dx;
-   new->dy = dy;
-   new->link = link;
-
-   return (new);
-}
-
-/* ----------------------------------------------------------------------------
- * 
- *   MakeNode() allocates the memory required for a tree node, and
- *   zeros out all the fields in the Node. It returns a pointer to the
- *   tree node upon success, and NULL upon failure.
- * 
- * ----------------------------------------------------------------------------
- */
-
-Tree*
-MakeNode()
-{
-   Tree *node;
-   
-   node = (Tree *) malloc(sizeof(Tree));
-   NASSERT(node, "could not allocate memory for node");
-   NumNodes++;
-
-   if (node == NULL)
-      return (NULL);
-   else {
-#ifdef SYSV
-      memset((char *) node, 0, sizeof(Tree));
-#else
-      bzero((char *) node, sizeof(Tree));
-#endif
-      return (node);
-   }
-}
-
-/* ----------------------------------------------------------------------------
- * 
- *   MakeBridge()
- * 
- * ----------------------------------------------------------------------------
- */
-
-Polyline*
-MakeBridge(line1, x1, y1, line2, x2, y2)
-   Polyline *line1, *line2;
-   int x1, x2, y1, y2;
-{
-   int dx, dy, s;
-   Polyline *r;
-
-   dx = x2 + line2->dx - x1;
-   if (line2->dx == 0)
-      dy = line2->dy;
-   else {
-      s = dx * line2->dy;
-      dy = s / line2->dx;
-   }
-   r = MakeLine(dx, dy, line2->link);
-   line1->link = MakeLine(0, y2 + line2->dy - dy - y1, r);
-
-   return (r);
-}
-
-/* ----------------------------------------------------------------------------
- * 
- *   Offset() computes the necessary offset that prevents two line segments
- *   from intersecting each other. This is the "heart" of the merge step
- *   that computes how two subtree contours should be separated. 
- * 
- *   The code is taken directly from Sven Moen's paper, with changes in
- *   some variable names to give more meaning: 
- *   
- *   - px,py indicate the x- and y-coordinates of the point on the longer
- *     segment if the previous Offset() call had two unequal segments
- * 
- *   - lx,ly indicate the dx and dy values of the "lower" line segment
- * 
- *   - ux,uy indicate the dx and dy values of the "upper" line segment
- * 
- * ----------------------------------------------------------------------------
- */
-
-int
-Offset(px, py, lx, ly, ux, uy)
-   int px, py, lx, ly, ux, uy;
-{
-   int d, s, t;
-
-   if (ux <= px || px+lx <= 0)
-      return 0;
-
-   t = ux*ly - lx*uy;
-
-   if (t > 0) {
-      if (px < 0) {
-	 s = px*ly;
-	 d = s/lx - py;
-      }
-      else if (px > 0) {
-	 s = px*uy;
-	 d = s/ux - py;
-      }
-      else {
-	 d = -py;
-      }
-   }
-   else {
-      if (ux < px+lx) {
-	 s = (ux-px) * ly;
-	 d = uy - (py + s/lx);
-      }
-      else if (ux > px+lx) {
-	 s = (lx+px) * uy;
-	 d = s/ux - (py+ly);
-      }
-      else {
-	 d = uy - (py+ly);
-      }
-   }
-
-   return MAX(0, d);
-}
-
-/* ----------------------------------------------------------------------------
- * 
- *   Merge()
- * 
- * ----------------------------------------------------------------------------
- */
-
-int
-Merge(c1, c2)
-   Polygon *c1, *c2;
-{
-   int x, y, total, d;
-   Polyline *lower, *upper, *bridge;
-
-   x = y = total = 0;
-
-   /*  compare lower part of upper child's contour 
-    *  with upper part of lower child's contour
-    */
-   upper = c1->lower.head;
-   lower = c2->upper.head;
-
-   while (lower && upper) {
-      d = Offset(x, y, lower->dx, lower->dy, upper->dx, upper->dy);
-      y += d;
-      total += d;
-
-      if (x + lower->dx <= upper->dx) {
-	 x += lower->dx;
-	 y += lower->dy;
-	 lower = lower->link;
-      }
-      else {
-	 x -= upper->dx;
-	 y -= upper->dy;
-	 upper = upper->link;
-      }
-   }
-	 
-   if (lower) {
-      bridge = MakeBridge(c1->upper.tail, 0, 0, lower, x, y);
-      c1->upper.tail = (bridge->link) ? c2->upper.tail : bridge;
-      c1->lower.tail = c2->lower.tail;
-   }
-   else {
-      bridge = MakeBridge(c2->lower.tail, x, y, upper, 0, 0);
-      if (!bridge->link) 
-	 c1->lower.tail = bridge;
-   }
-   c1->lower.head = c2->lower.head;
-
-   return (total);
-}
-
-/* ----------------------------------------------------------------------------
- * 
- *   DetachParent() reverses the effects of AttachParent by removing
- *   the four line segments that connect the subtree contour to the
- *   node specified by 'tree'. 
- * 
- * ----------------------------------------------------------------------------
- */
-
-void
-DetachParent(tree)
-   Tree *tree;
-{
-   free(tree->contour.upper.head->link);
-   free(tree->contour.upper.head);
-   tree->contour.upper.head = NULL;
-   tree->contour.upper.tail = NULL;
-
-   free(tree->contour.lower.head->link);
-   free(tree->contour.lower.head);
-   tree->contour.lower.head = NULL;
-   tree->contour.lower.tail = NULL;
-
-   NumLines -= 4;
-}
-
-/* ----------------------------------------------------------------------------
- * 
- *   AttachParent() 
- *   This function also establishes the position of the first child
- *   The code follows Sven Moen's version, with slight modification to
- *   support varying borders at different levels.
- * 
- * ----------------------------------------------------------------------------
- */
-
-void
-AttachParent(tree, h)
-   Tree *tree;
-   int h;
-{
-   int x, y1, y2;
-
-   if (TreeAlignNodes)
-      x = tree->border + (TreeParentDistance * 2) +
-	 (TreeParentDistance - tree->width);
-   else
-      x = tree->border + TreeParentDistance;
-   y2 = (h - tree->height)/2 - tree->border;
-   y1 = y2 + tree->height + (2 * tree->border) - h; 
-   tree->child->offset.x = x + tree->width;
-   tree->child->offset.y = y1;
-   tree->contour.upper.head = MakeLine(tree->width, 0,
-				       MakeLine(x, y1,
-						tree->contour.upper.head));
-   tree->contour.lower.head = MakeLine(tree->width, 0,
-				       MakeLine(x, y2,
-						tree->contour.lower.head));
-}
-
-/* ----------------------------------------------------------------------------
- * 
- *   Split()
- *   The tree passed to Split() must have at least 1 child, because
- *   it doesn't make sense to split a leaf (there are no bridges)
- * 
- * ----------------------------------------------------------------------------
- */
-
-void
-Split(tree)
-   Tree *tree;
-{
-   Tree *child;
-   Polyline *link;
-
-   FOREACH_CHILD(child, tree) {
-      if (link = child->contour.upper.tail->link) {
-	 free(link->link);
-	 free(link);
-	 child->contour.upper.tail->link = NULL;
-	 NumLines -= 2;
-      }
-      if (link = child->contour.lower.tail->link) {
-	 free(link->link);
-	 free(link);
-	 NumLines -= 2;
-	 child->contour.lower.tail->link = NULL;
-      }
-   }
-}
-
-/* ----------------------------------------------------------------------------
- * 
- *   Join() merges all subtree contours of the given tree and returns the
- *   height of the entire tree contour. 
- * 
- * ----------------------------------------------------------------------------
- */
-
-int
-Join(tree)
-   Tree *tree;
-{
-   Tree *child;
-   int d, h, sum;
-
-   /*   to start, set the parent's contour and height
-    *   to contour and height of first child 
-    */
-   child = tree->child;
-   tree->contour = child->contour;
-   sum = h = child->height + (2 * child->border);
-
-   /* extend contour to include contours of all children of parent */
-   for (child = child->sibling ; child ; child = child->sibling) {
-      d = Merge(&tree->contour, &child->contour);
-      child->offset.y = d + h;
-      child->offset.x = 0;
-      h = child->height + (2 * child->border);
-      /* keep cumulative heights of subtree contours */
-      sum += d + h;
-   }
-   return sum;
-}
-
-/* ----------------------------------------------------------------------------
- * 
- *   RuboutLeaf() accepts a single node (leaf) and removes its contour.
- *   The memory associated with the contour is deallocated. 
- * 
- * ----------------------------------------------------------------------------
- */
-
-void
-RuboutLeaf(tree)
-   Tree *tree;
-{
-   free(tree->contour.upper.head);
-   free(tree->contour.lower.tail);
-   free(tree->contour.lower.head);
-   tree->contour.upper.head = NULL;   
-   tree->contour.upper.tail = NULL;   
-   tree->contour.lower.head = NULL;   
-   tree->contour.lower.tail = NULL;   
-   NumLines -= 3;
-}
-
-/* ----------------------------------------------------------------------------
- * 
- *   LayoutLeaf() accepts a single node (leaf) and forms its contour. This
- *   function assumes that the width, height, and border fields of the 
- *   node have been assigned meaningful values.
- * 
- * ----------------------------------------------------------------------------
- */
-
-void
-LayoutLeaf(tree)
-   Tree *tree;
-{
-   tree->node_height = 0;
-   tree->border = TreeBorderSize;
-
-   tree->contour.upper.tail = MakeLine(tree->width + 2 * tree->border, 0,
-				       NULL);
-   tree->contour.upper.head = tree->contour.upper.tail;
-   
-   tree->contour.lower.tail = MakeLine(0, -tree->height - 2 * tree->border,
-				       NULL);
-   tree->contour.lower.head = MakeLine(tree->width + 2 * tree->border, 0,
-				       tree->contour.lower.tail);
-
-}
-
-/* ----------------------------------------------------------------------------
- * 
- *   LayoutTree() traverses the given tree (in depth-first order), and forms
- *   subtree or leaf contours at each node as needed. Each node's contour is
- *   stored in its "contour" field. Elision is also supported by generating
- *   the contour for both the expanded and collapsed node. This routine
- *   also computes the tree height of each node in the tree, so that variable
- *   density layout can be demonstrated.
- * 
- * ----------------------------------------------------------------------------
- */
-
-void
-LayoutTree(tree)
-   Tree *tree;
-{
-   Tree *child;
-   int   height = 0;
-
-   FOREACH_CHILD(child, tree) {
-      LayoutTree(child);
-
-      if (child->elision) {	/* support elision */
-	 child->old_contour = child->contour;
-	 LayoutLeaf(child);
-      }
-
-   }
-
-   if (tree->child) {
-
-      FOREACH_CHILD(child, tree) 
-	 height = MAX(child->node_height, height);
-      tree->node_height = height + 1;
-
-      if (TreeLayoutDensity == Fixed)
-	 tree->border = TreeBorderSize;
-      else
-	 tree->border =
-	    (int) (TreeBorderSize * (tree->node_height * DENSITY_FACTOR));
-
-      AttachParent(tree, Join(tree));
-   }
-   else
-      LayoutLeaf(tree);
-}
-
-/* ------------------------------------------------------------------------- */
-
-void
-Unzip(tree)
-   Tree *tree;
-{
-   Tree *child;
-
-#ifdef INTF
-   if (TreeShowSteps) {
-      HiliteNode(tree, New);
-      tree->on_path = TRUE;
-      StatusMsg("Unzip: follow parent links up to root");
-      Pause();
-   }
-#endif   
-
-   if (tree->parent)
-      Unzip(tree->parent);
-
-   if (tree->child) {
-
-#ifdef INTF
-      /*   draw entire contour; do it only for root, because the last
-       *   frame drawn in this function will have already drawn the  
-       *   contour for the most recently split subtree.              
-       */
-      if (TreeShowSteps) {
-	 if (tree->parent == NULL) {
-	    BeginFrame();
-	      DrawTreeContour(tree, New, CONTOUR_COLOR, FALSE, FALSE, FALSE);
-	      DrawTree(TheTree, New);
-	    EndFrame();
-	    StatusMsg("Unzip: disassemble entire contour");
-	    Pause();
-	 }
-      }
-#endif
-
-#ifdef INTF
-      /* draw contour as it would appear after DetachParent() */
-      if (TreeShowSteps) {
-	 BeginFrame();
-	   DrawTreeContour(tree, New, CONTOUR_COLOR, TRUE,
-			   FALSE, FALSE, FALSE);
-	   DrawTree(TheTree, New);
-	 EndFrame();
-	 StatusMsg("Unzip: detach parent");
-	 Pause();
-      }
-#endif
-
-      DetachParent(tree);
-      Split(tree);
-
-#ifdef INTF
-      if (TreeShowSteps) {
-	 BeginFrame();
-           /* mark other subtree contours as split, and */
-	   /* draw only the contour on path in full     */
-	   FOREACH_CHILD(child, tree) {
-	      if (!child->on_path) 
-		 child->split = TRUE;
-	      else
-		 DrawTreeContour(child, New, CONTOUR_COLOR,
-				 FALSE, FALSE, FALSE);
-	   }
-	   DrawTree(TheTree, New);
-	 EndFrame();
-	 StatusMsg("Unzip: split tree");
-	 Pause();
-      }
-#endif
-
-   }
-   else
-      RuboutLeaf(tree);		/* leaf node */
-}
-
-/* ------------------------------------------------------------------------- */
-
-void
-Zip(tree)
-   Tree *tree;
-{
-   if (tree->child)
-      AttachParent(tree, Join(tree));
-   else
-      LayoutLeaf(tree);
-
-   if (tree->parent)
-      Zip(tree->parent);
-}
-
-/* ----------------------------------------------------------------------------
- * 
- *   Insert() adds the specified child to parent, just after the specified
- *   sibling. If 'sibling' is Null, the child is added as the first child.
- * 
- * ----------------------------------------------------------------------------
- */
-
-void
-Insert(parent, child, sibling)
-   Tree *parent, *child, *sibling;
-{
-   Unzip(parent);
-   child->parent = parent;
-   if (sibling) {
-      child->sibling = sibling->sibling;
-      sibling->sibling = child;
-   }
-   else {
-      child->sibling = parent->child;
-      parent->child = child;
-   }
-   Zip(parent);
-}
-
-
-
-
-/* ----------------------------------------------------------------------------
- * 
- *   Delete() traverses the specified tree and frees all storage
- *   allocated to the subtree, including contours and bridges.
- *   If the tree had a preceding sibling, the preceding sibling is
- *   modified to point to the tree's succeeding sibling, if any.
- * 
- * ----------------------------------------------------------------------------
- */
-
-Delete(tree)
-   Tree *tree;
-{
-   Tree *sibling = NULL;
-   Tree *parent, *child;
-
-   /* find sibling */
-   parent = tree->parent;
-   if (parent) {
-      FOREACH_CHILD(child, parent)
-	 if (child->sibling == tree) {
-	    sibling = child;
-	    break;
-	 }
-   }
-   if (sibling)
-      sibling->sibling = tree->sibling;
-   else if (parent)
-      parent->child = tree->sibling;
-   
-   DeleteTree(tree, FALSE);
-}
-
-
-/* ----------------------------------------------------------------------------
- * 
- *   DeleteTree() is the recursive function that supports Delete(). 
- *   If 'contour' is True, then only the contours are recursively deleted.
- *   This flag should be True when you are regenerating a tree's layout
- *   and still want to preserve the nodes. Since contours would be deleted
- *   only due to a change in sibling or level distance, each node's border
- *   value is updated with the current value of TreeBorderSize;
- * 
- * ----------------------------------------------------------------------------
- */
-
-DeleteTree(tree, contour)
-   Tree *tree;
-   int   contour;
-{
-   Tree *child;
-
-   if (tree->elision) {
-      RuboutLeaf(tree);
-      tree->contour = tree->old_contour;
-      tree->old_contour.upper.head = NULL;    /* flag to note 'NULL' contour */
-   }
-
-   if (!IS_LEAF(tree)) {
-      DetachParent(tree);
-      Split(tree);
-
-      FOREACH_CHILD(child,tree)
-	 DeleteTree(child, contour);
-   }
-   else
-      RuboutLeaf(tree);
-
-   if (contour) 
-      tree->border = TreeBorderSize;
-   else {
-      free(tree->label.text);
-      free(tree);
-      NumNodes--;
-   }
-}
-
-
-/* ----------------------------------------------------------------------------
- * 
- *   ComputeTreeSize() 
- *   This function should be called after tree layout.
- * 
- * ----------------------------------------------------------------------------
- */
-
-void
-ComputeTreeSize(tree, width, height, x_offset, y_offset)
-   Tree *tree;
-   int *width, *height;
-   int *x_offset, *y_offset;
-{
-   Polyline *contour, *tail;
-   int upper_min_y = 0, lower_max_y = 0;
-   int upper_abs_y = 0, lower_abs_y = 0;
-   int x = 0;
-
-   /* do upper contour */
-   contour = tree->contour.upper.head;
-   tail    = tree->contour.upper.tail;
-   while (contour) {
-      if ((contour->dy + upper_abs_y) < upper_min_y) 
-	 upper_min_y = contour->dy + upper_abs_y;
-      upper_abs_y += contour->dy;
-      if (contour == tail)
-	 contour = NULL;
-      else
-	 contour = contour->link;
-   }
-
-   /* do lower contour */
-   contour = tree->contour.lower.head;
-   tail    = tree->contour.lower.tail;
-   while (contour) {
-      if ((contour->dy + lower_abs_y) > lower_max_y)
-	 lower_max_y = contour->dy + lower_abs_y;
-      lower_abs_y += contour->dy;
-      x += contour->dx;
-      if (contour == tail)
-	 contour = NULL;
-      else
-	 contour = contour->link;
-   }
-
-   *width = x + 1;
-   *height = lower_max_y - upper_min_y +
-             (tree->height + (2 * tree->border)) + 1;
-   if (x_offset)
-      *x_offset = tree->border;
-   if (y_offset)
-      *y_offset = - upper_min_y + tree->border;
-}
-
-/* ----------------------------------------------------------------------------
- * 
- *   PetrifyTree()
- * 
- * ----------------------------------------------------------------------------
- */
-
-void
-PetrifyTree(tree, x, y)
-   Tree *tree;
-   int x, y;
-{
-   int width, height;
-   int x_offset, y_offset;
-   
-   tree->old_pos = tree->pos;	/* used by AnimateTree */
-
-   /* fix position of each node */
-   tree->pos.x = x + tree->offset.x;
-   tree->pos.y = y + tree->offset.y;
-   
-   if (tree->child) {
-      PetrifyTree(tree->child, tree->pos.x, tree->pos.y);
-      ComputeSubTreeExtent(tree); /* for benefit of interface picking */
-   }
-   if (tree->sibling)
-      PetrifyTree(tree->sibling, tree->pos.x, tree->pos.y);
-}
diff -r 4de2936b4e77 -r 0132846995bd lisp/oobr/tree-x/tree.h
--- a/lisp/oobr/tree-x/tree.h	Mon Aug 13 09:42:28 2007 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,102 +0,0 @@
-/* ----------------------------------------------------------------------------
- * File    : tree.h
- * Purpose : Header file for dynamic tree program
- * ----------------------------------------------------------------------------
- */
-
-#define INTF 1		/* enable interface-specific code */
-
-#define FOREACH_CHILD(child, tree) \
-   for ((child) = (tree)->child ; (child) ; (child) = (child)->sibling)
-
-#define PT_IN_RECT(p1, p2, x1, y1, x2, y2)   \
-	 ((p1) > (x1) &&                      \
-	  (p2) > (y1) &&                       \
-	  (p1) < (x2) &&                        \
-	  (p2) < (y2))
-
-#define PT_IN_EXTENT(p1, p2, extent)                 \
-	 ((p1) > (extent).pos.x &&                    \
-	  (p2) > (extent).pos.y &&                     \
-	  (p1) < ((extent).pos.x + (extent).width) &&   \
-	  (p2) < ((extent).pos.y + (extent).height))
-
-#define IS_LEAF(node) \
-   ((node)->child == NULL)
-
-typedef struct line  Polyline;
-typedef struct tnode Tree;
-
-typedef struct point {
-   int x;
-   int y;
-} Point;
-
-typedef struct extent {
-   Point pos;			/* top left corner of rectangle     */
-   int width;
-   int height;
-} Extent;
-
-struct line {
-   int dx, dy;
-   Polyline *link;
-};
-
-typedef struct polygon {
-   struct {
-      Polyline *head;
-      Polyline *tail;
-   } lower, upper;
-} Polygon;
-
-typedef struct label {
-   char *text;			/* the actual label text */
-   int len;			/* length of label text  */
-   int xoffset;			/* the X offset of label inside rectangle */
-   int yoffset;			/* the Y offset of label inside rectangle */
-} Label;
-
-struct tnode {
-   Tree    *parent;
-   Tree    *child;
-   Tree    *sibling;
-   int      width;
-   int      height;
-   int      border;
-   Polygon  contour;
-   Point    offset;		/* offset is relative to 'predecessor'    */
-   Point    pos;	        /* position is screen coordinates of node */
-   Point    old_pos;	        /* position is screen coordinates of node */
-   int      node_height;	/* height of node in tree */
-   /* all fields below are interface-specific */
-   Label    label;
-   char*    value;
-   Extent   subextent;		/* extent of subtree (excluding this node) */
-   Polygon  old_contour;	/* for caching old contour in elision      */
-   char     elision;		/* TRUE if this node is collapsed          */
-   char     on_path;		/* true if on path to root from node       */
-   char     split;              /* flag for drawing subtree contours       */
-   char     show_contour;	/* flag to show or hide subtree contour    */
-};
-
-typedef enum {
-   Erase,
-   Draw
-} DrawMode;
-
-typedef enum {
-   Old,
-   New
-} PosMode;			/* Position mode */
-
-extern Polyline* MakeLine();
-extern Tree*     MakeNode();
-extern Tree*     ReadTreeFromFile();
-extern void      ComputeTreeSize();
-extern void      Unzip();
-extern void      Zip();
-
-extern Tree     *TheTree;
-extern int       NumLines;
-extern int       NumNodes;
diff -r 4de2936b4e77 -r 0132846995bd lisp/oobr/tree-x/usleep.c
--- a/lisp/oobr/tree-x/usleep.c	Mon Aug 13 09:42:28 2007 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,71 +0,0 @@
-/*
- *  NAME:
- *      usleep     -- This is the precision timer for Test Set
- *                    Automation. It uses the select(2) system
- *                    call to delay for the desired number of
- *                    micro-seconds. This call returns ZERO
- *                    (which is usually ignored) on successful
- *                    completion, -1 otherwise. 
- *
- *  ALGORITHM:
- *      1) We range check the passed in microseconds and log a
- *         warning message if appropriate. We then return without
- *         delay, flagging an error. 
- *      2) Load the Seconds and micro-seconds portion of the
- *         interval timer structure.
- *      3) Call select(2) with no file descriptors set, just the
- *         timer, this results in either delaying the proper
- *         ammount of time or being interupted early by a signal.
- *
- *  HISTORY:
- *      Added when the need for a subsecond timer was evident.
- *
- *  AUTHOR:
- *      Michael J. Dyer   <mike@sherlock.med.ge.com>
- */
-
-#ifndef HAVE_USLEEP
-#include <unistd.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <errno.h>
-#include <time.h>
-#include <sys/time.h>
-#include <sys/param.h>
-#include <sys/types.h>
-
-int     usleep( unsigned long int microSeconds )
-{
-        unsigned int            Seconds, uSec;
-        int                     nfds, readfds, writefds, exceptfds;
-        struct  timeval         Timer;
-
-        nfds = readfds = writefds = exceptfds = 0;
-
-        if( (microSeconds == (unsigned long) 0) 
-                || microSeconds > (unsigned long) 4000000 )
-        {
-                errno = ERANGE;         /* value out of range */
-                perror( "usleep time out of range ( 0 -> 4000000 ) " );
-                return -1;
-        }
-
-        Seconds = microSeconds / (unsigned long) 1000000;
-        uSec    = microSeconds % (unsigned long) 1000000;
-
-        Timer.tv_sec            = Seconds;
-        Timer.tv_usec           = uSec;
-
-        if( select( nfds, &readfds, &writefds, &exceptfds, &Timer ) < 0 )
-        {
-                perror( "usleep (select) failed" );
-                return -1;
-        }
-
-        return 0;
-}
-#else
-/* this is to avoid a "object file has no symbol" error/warning.
-*/
-static int local_junk;
-#endif
diff -r 4de2936b4e77 -r 0132846995bd lisp/packages/auto-autoloads.el
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lisp/packages/auto-autoloads.el	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,2334 @@
+;;; DO NOT MODIFY THIS FILE
+(if (not (featurep 'packages-autoloads))
+    (progn
+
+;;;### (autoloads (add-log-current-defun change-log-mode add-change-log-entry-other-window add-change-log-entry find-change-log prompt-for-change-log-name) "add-log" "packages/add-log.el")
+
+(autoload 'prompt-for-change-log-name "add-log" "\
+Prompt for a change log name." nil nil)
+
+(autoload 'find-change-log "add-log" "\
+Find a change log file for \\[add-change-log-entry] and return the name.
+
+Optional arg FILE-NAME specifies the file to use.
+If FILE-NAME is nil, use the value of `change-log-default-name'.
+If 'change-log-default-name' is nil, behave as though it were 'ChangeLog'
+\(or whatever we use on this operating system).
+
+If 'change-log-default-name' contains a leading directory component, then
+simply find it in the current directory.  Otherwise, search in the current 
+directory and its successive parents for a file so named.
+
+Once a file is found, `change-log-default-name' is set locally in the
+current buffer to the complete file name." nil nil)
+
+(autoload 'add-change-log-entry "add-log" "\
+Find change log file and add an entry for today.
+Optional arg (interactive prefix) non-nil means prompt for user name and site.
+Second arg is file name of change log.  If nil, uses `change-log-default-name'.
+Third arg OTHER-WINDOW non-nil means visit in other window.
+Fourth arg NEW-ENTRY non-nil means always create a new entry at the front;
+never append to an existing entry.  Today's date is calculated according to
+`change-log-time-zone-rule' if non-nil, otherwise in local time." t nil)
+
+(autoload 'add-change-log-entry-other-window "add-log" "\
+Find change log file in other window and add an entry for today.
+Optional arg (interactive prefix) non-nil means prompt for user name and site.
+Second arg is file name of change log.  If nil, uses `change-log-default-name'." t nil)
+
+(define-key ctl-x-4-map "a" 'add-change-log-entry-other-window)
+
+(autoload 'change-log-mode "add-log" "\
+Major mode for editing change logs; like Indented Text Mode.
+Prevents numeric backups and sets `left-margin' to 8 and `fill-column' to 74.
+New log entries are usually made with \\[add-change-log-entry] or \\[add-change-log-entry-other-window].
+Each entry behaves as a paragraph, and the entries for one day as a page.
+Runs `change-log-mode-hook'." t nil)
+
+(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) "\
+*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) "\
+*Modes that look like TeX to `add-log-current-defun'.")
+
+(autoload 'add-log-current-defun "add-log" "\
+Return name of function definition point is in, or nil.
+
+Understands C, Lisp, LaTeX (\"functions\" are chapters, sections, ...),
+Texinfo (@node titles), Perl, and Fortran.
+
+Other modes are handled by a heuristic that looks in the 10K before
+point for uppercase headings starting in the first column or
+identifiers followed by `:' or `=', see variable
+`add-log-current-defun-header-regexp'.
+
+Has a preference of looking backwards." nil nil)
+
+;;;***
+
+;;;### (autoloads (apropos-documentation apropos-value apropos apropos-command) "apropos" "packages/apropos.el")
+
+(fset 'command-apropos 'apropos-command)
+
+(autoload 'apropos-command "apropos" "\
+Shows commands (interactively callable functions) that match REGEXP.
+With optional prefix ARG or if `apropos-do-all' is non-nil, also show
+variables." t nil)
+
+(autoload 'apropos "apropos" "\
+Show all bound symbols whose names match REGEXP.
+With optional prefix ARG or if `apropos-do-all' is non-nil, also show unbound
+symbols and key bindings, which is a little more time-consuming.
+Returns list of symbols and documentation found." t nil)
+
+(autoload 'apropos-value "apropos" "\
+Show all symbols whose value's printed image matches REGEXP.
+With optional prefix ARG or if `apropos-do-all' is non-nil, also looks
+at the function and at the names and values of properties.
+Returns list of symbols and values found." t nil)
+
+(autoload 'apropos-documentation "apropos" "\
+Show symbols whose documentation contain matches for REGEXP.
+With optional prefix ARG or if `apropos-do-all' is non-nil, also use
+documentation that is not stored in the documentation file and show key
+bindings.
+Returns list of symbols and documentation found." t nil)
+
+;;;***
+
+;;;### (autoloads (define-auto-insert auto-insert) "autoinsert" "packages/autoinsert.el")
+
+(autoload 'auto-insert "autoinsert" "\
+Insert default contents into a new file if `auto-insert' is non-nil.
+Matches the visited file name against the elements of `auto-insert-alist'." t nil)
+
+(autoload 'define-auto-insert "autoinsert" "\
+Associate CONDITION with (additional) ACTION in `auto-insert-alist'.
+Optional AFTER means to insert action after all existing actions for CONDITION,
+or if CONDITION had no actions, after all other CONDITIONs." nil nil)
+
+;;;***
+
+;;;### (autoloads (mouse-avoidance-mode) "avoid" "packages/avoid.el")
+
+(defvar mouse-avoidance-mode nil "\
+Value is t or a symbol if the mouse pointer should avoid the cursor.
+See function `mouse-avoidance-mode' for possible values.  Changing this
+variable is NOT the recommended way to change modes; use that function 
+instead.")
+
+(autoload 'mouse-avoidance-mode "avoid" "\
+Set cursor avoidance mode to MODE.
+MODE should be one of the symbols `banish', `exile', `jump', `animate',
+`cat-and-mouse', `proteus', or `none'.
+
+If MODE is nil, toggle mouse avoidance between `none` and `banish'
+modes.  Positive numbers and symbols other than the above are treated
+as equivalent to `banish'; negative numbers and `-' are equivalent to `none'.
+
+Effects of the different modes: 
+ * banish: Move the mouse to the upper-right corner on any keypress.
+ * exile: Move the mouse to the corner only if the cursor gets too close,
+     and allow it to return once the cursor is out of the way.
+ * jump: If the cursor gets too close to the mouse, displace the mouse
+     a random distance & direction.
+ * animate: As `jump', but shows steps along the way for illusion of motion.
+ * cat-and-mouse: Same as `animate'.
+ * proteus: As `animate', but changes the shape of the mouse pointer too.
+
+Whenever the mouse is moved, the frame is also raised.
+
+\(see `mouse-avoidance-threshold' for definition of \"too close\",
+and `mouse-avoidance-nudge-dist' and `mouse-avoidance-nudge-var' for
+definition of \"random distance\".)" t nil)
+
+(add-minor-mode 'mouse-avoidance-mode " Avoid")
+
+;;;***
+
+;;;### (autoloads (blink-cursor-mode) "blink-cursor" "packages/blink-cursor.el")
+
+(autoload 'blink-cursor-mode "blink-cursor" "\
+Enable or disable a blinking cursor.
+If TIMEOUT is nil, toggle on or off.
+If TIMEOUT is t, enable with the previous timeout value.
+If TIMEOUT is 0, disable.
+If TIMEOUT is greater than 0, then the cursor will blink once
+each TIMEOUT secs (can be a float)." t nil)
+
+;;;***
+
+;;;### (autoloads (bookmark-menu-delete bookmark-menu-rename bookmark-menu-locate bookmark-menu-jump bookmark-menu-insert bookmark-bmenu-list bookmark-load bookmark-save bookmark-write bookmark-delete bookmark-insert bookmark-rename bookmark-insert-location bookmark-relocate bookmark-jump bookmark-set) "bookmark" "packages/bookmark.el")
+
+(if (symbolp (key-binding "r")) nil (progn (define-key ctl-x-map "rb" 'bookmark-jump) (define-key ctl-x-map "rm" 'bookmark-set) (define-key ctl-x-map "rl" 'bookmark-bmenu-list)))
+
+(defvar bookmark-map nil "\
+Keymap containing bindings to bookmark functions.
+It is not bound to any key by default: to bind it
+so that you have a bookmark prefix, just use `global-set-key' and bind a
+key of your choice to `bookmark-map'.  All interactive bookmark
+functions have a binding in this keymap.")
+
+(define-prefix-command 'bookmark-map)
+
+(define-key bookmark-map "x" 'bookmark-set)
+
+(define-key bookmark-map "m" 'bookmark-set)
+
+(define-key bookmark-map "j" 'bookmark-jump)
+
+(define-key bookmark-map "g" 'bookmark-jump)
+
+(define-key bookmark-map "i" 'bookmark-insert)
+
+(define-key bookmark-map "e" 'edit-bookmarks)
+
+(define-key bookmark-map "f" 'bookmark-insert-location)
+
+(define-key bookmark-map "r" 'bookmark-rename)
+
+(define-key bookmark-map "d" 'bookmark-delete)
+
+(define-key bookmark-map "l" 'bookmark-load)
+
+(define-key bookmark-map "w" 'bookmark-write)
+
+(define-key bookmark-map "s" 'bookmark-save)
+
+(add-hook 'kill-emacs-hook (function (lambda nil (and (featurep 'bookmark) bookmark-alist (bookmark-time-to-save-p t) (bookmark-save)))))
+
+(autoload 'bookmark-set "bookmark" "\
+Set a bookmark named NAME inside a file.
+If name is nil, then the user will be prompted.
+With prefix arg, will not overwrite a bookmark that has the same name
+as NAME if such a bookmark already exists, but instead will \"push\"
+the new bookmark onto the bookmark alist.  Thus the most recently set
+bookmark with name NAME would be the one in effect at any given time,
+but the others are still there, should you decide to delete the most
+recent one.
+
+To yank words from the text of the buffer and use them as part of the
+bookmark name, type C-w while setting a bookmark.  Successive C-w's
+yank successive words.
+
+Typing C-u inserts the name of the last bookmark used in the buffer
+\(as an aid in using a single bookmark name to track your progress
+through a large file).  If no bookmark was used, then C-u inserts the
+name of the file being visited.
+
+Use \\[bookmark-delete] to remove bookmarks (you give it a name,
+and it removes only the first instance of a bookmark with that name from
+the list of bookmarks.)" t nil)
+
+(autoload 'bookmark-jump "bookmark" "\
+Jump to bookmark BOOKMARK (a point in some file).  
+You may have a problem using this function if the value of variable
+`bookmark-alist' is nil.  If that happens, you need to load in some
+bookmarks.  See help on function `bookmark-load' for more about
+this.
+
+If the file pointed to by BOOKMARK no longer exists, you will be asked
+if you wish to give the bookmark a new location, and bookmark-jump
+will then jump to the new location, as well as recording it in place
+of the old one in the permanent bookmark record." t nil)
+
+(autoload 'bookmark-relocate "bookmark" "\
+Relocate BOOKMARK to another file (reading file name with minibuffer).
+This makes an already existing bookmark point to that file, instead of
+the one it used to point at.  Useful when a file has been renamed
+after a bookmark was set in it." t nil)
+
+(autoload 'bookmark-insert-location "bookmark" "\
+Insert the name of the file associated with BOOKMARK.
+Optional second arg NO-HISTORY means don't record this in the
+minibuffer history list `bookmark-history'." t nil)
+
+(defalias 'bookmark-locate 'bookmark-insert-location)
+
+(autoload 'bookmark-rename "bookmark" "\
+Change the name of OLD bookmark to NEW name.
+If called from keyboard, prompt for OLD and NEW.  If called from
+menubar, select OLD from a menu and prompt for NEW.
+
+If called from Lisp, prompt for NEW if only OLD was passed as an
+argument.  If called with two strings, then no prompting is done.  You
+must pass at least OLD when calling from Lisp.
+
+While you are entering the new name, consecutive C-w's insert
+consecutive words from the text of the buffer into the new bookmark
+name." t nil)
+
+(autoload 'bookmark-insert "bookmark" "\
+Insert the text of the file pointed to by bookmark BOOKMARK.  
+You may have a problem using this function if the value of variable
+`bookmark-alist' is nil.  If that happens, you need to load in some
+bookmarks.  See help on function `bookmark-load' for more about
+this." t nil)
+
+(autoload 'bookmark-delete "bookmark" "\
+Delete BOOKMARK from the bookmark list.  
+Removes only the first instance of a bookmark with that name.  If
+there are one or more other bookmarks with the same name, they will
+not be deleted.  Defaults to the \"current\" bookmark (that is, the
+one most recently used in this file, if any).
+Optional second arg BATCH means don't update the bookmark list buffer,
+probably because we were called from there." t nil)
+
+(autoload 'bookmark-write "bookmark" "\
+Write bookmarks to a file (reading the file name with the minibuffer).
+Don't use this in Lisp programs; use `bookmark-save' instead." t nil)
+
+(autoload 'bookmark-save "bookmark" "\
+Save currently defined bookmarks.
+Saves by default in the file defined by the variable
+`bookmark-default-file'.  With a prefix arg, save it in file FILE
+\(second argument).
+
+If you are calling this from Lisp, the two arguments are PREFIX-ARG
+and FILE, and if you just want it to write to the default file, then
+pass no arguments.  Or pass in nil and FILE, and it will save in FILE
+instead.  If you pass in one argument, and it is non-nil, then the
+user will be interactively queried for a file to save in.
+
+When you want to load in the bookmarks from a file, use
+`bookmark-load', \\[bookmark-load].  That function will prompt you
+for a file, defaulting to the file defined by variable
+`bookmark-default-file'." t nil)
+
+(autoload 'bookmark-load "bookmark" "\
+Load bookmarks from FILE (which must be in bookmark format).
+Appends loaded bookmarks to the front of the list of bookmarks.  If
+optional second argument REVERT is non-nil, existing bookmarks are
+destroyed.  Optional third arg NO-MSG means don't display any messages
+while loading.
+
+If you load a file that doesn't contain a proper bookmark alist, you
+will corrupt Emacs's bookmark list.  Generally, you should only load
+in files that were created with the bookmark functions in the first
+place.  Your own personal bookmark file, `~/.emacs.bmk', is
+maintained automatically by Emacs; you shouldn't need to load it
+explicitly." t nil)
+
+(autoload 'bookmark-bmenu-list "bookmark" "\
+Display a list of existing bookmarks.
+The list is displayed in a buffer named `*Bookmark List*'.
+The leftmost column displays a D if the bookmark is flagged for
+deletion, or > if it is flagged for displaying." t nil)
+
+(defalias 'list-bookmarks 'bookmark-bmenu-list)
+
+(defalias 'edit-bookmarks 'bookmark-bmenu-list)
+
+(autoload 'bookmark-menu-insert "bookmark" "\
+Insert the text of the file pointed to by bookmark BOOKMARK.  
+You may have a problem using this function if the value of variable
+`bookmark-alist' is nil.  If that happens, you need to load in some
+bookmarks.  See help on function `bookmark-load' for more about
+this.
+
+Warning: this function only takes an EVENT as argument.  Use the
+corresponding bookmark function from Lisp (the one without the
+\"-menu-\" in its name)." t nil)
+
+(autoload 'bookmark-menu-jump "bookmark" "\
+Jump to bookmark BOOKMARK (a point in some file).  
+You may have a problem using this function if the value of variable
+`bookmark-alist' is nil.  If that happens, you need to load in some
+bookmarks.  See help on function `bookmark-load' for more about
+this.
+
+Warning: this function only takes an EVENT as argument.  Use the
+corresponding bookmark function from Lisp (the one without the
+\"-menu-\" in its name)." t nil)
+
+(autoload 'bookmark-menu-locate "bookmark" "\
+Insert the name of the file associated with BOOKMARK. 
+\(This is not the same as the contents of that file).
+
+Warning: this function only takes an EVENT as argument.  Use the
+corresponding bookmark function from Lisp (the one without the
+\"-menu-\" in its name)." t nil)
+
+(autoload 'bookmark-menu-rename "bookmark" "\
+Change the name of OLD-BOOKMARK to NEWNAME.  
+If called from keyboard, prompts for OLD-BOOKMARK and NEWNAME.
+If called from menubar, OLD-BOOKMARK is selected from a menu, and
+prompts for NEWNAME. 
+If called from Lisp, prompts for NEWNAME if only OLD-BOOKMARK was
+passed as an argument.  If called with two strings, then no prompting
+is done.  You must pass at least OLD-BOOKMARK when calling from Lisp.
+
+While you are entering the new name, consecutive C-w's insert
+consecutive words from the text of the buffer into the new bookmark
+name.
+
+Warning: this function only takes an EVENT as argument.  Use the
+corresponding bookmark function from Lisp (the one without the
+\"-menu-\" in its name)." t nil)
+
+(autoload 'bookmark-menu-delete "bookmark" "\
+Delete the bookmark named NAME from the bookmark list.  
+Removes only the first instance of a bookmark with that name.  If
+there are one or more other bookmarks with the same name, they will
+not be deleted.  Defaults to the \"current\" bookmark (that is, the
+one most recently used in this file, if any).
+
+Warning: this function only takes an EVENT as argument.  Use the
+corresponding bookmark function from Lisp (the one without the
+\"-menu-\" in its name)." t nil)
+
+(defvar menu-bar-bookmark-map (make-sparse-keymap "Bookmark functions"))
+
+(defalias 'menu-bar-bookmark-map (symbol-value 'menu-bar-bookmark-map))
+
+(define-key menu-bar-bookmark-map [load] '("Load a Bookmark File..." . bookmark-load))
+
+(define-key menu-bar-bookmark-map [write] '("Save Bookmarks As..." . bookmark-write))
+
+(define-key menu-bar-bookmark-map [save] '("Save Bookmarks" . bookmark-save))
+
+(define-key menu-bar-bookmark-map [edit] '("Edit Bookmark List" . bookmark-bmenu-list))
+
+(define-key menu-bar-bookmark-map [delete] '("Delete Bookmark" . bookmark-menu-delete))
+
+(define-key menu-bar-bookmark-map [rename] '("Rename Bookmark" . bookmark-menu-rename))
+
+(define-key menu-bar-bookmark-map [locate] '("Insert Location" . bookmark-menu-locate))
+
+(define-key menu-bar-bookmark-map [insert] '("Insert Contents" . bookmark-menu-insert))
+
+(define-key menu-bar-bookmark-map [set] '("Set Bookmark" . bookmark-set))
+
+(define-key menu-bar-bookmark-map [jump] '("Jump to Bookmark" . bookmark-menu-jump))
+
+;;;***
+
+;;;### (autoloads nil "buff-menu" "packages/buff-menu.el")
+
+(defvar list-buffers-directory nil)
+
+(make-variable-buffer-local 'list-buffers-directory)
+
+;;;***
+
+;;;### (autoloads (command-history-mode list-command-history repeat-matching-complex-command) "chistory" "packages/chistory.el")
+
+(autoload 'repeat-matching-complex-command "chistory" "\
+Edit and re-evaluate complex command with name matching PATTERN.
+Matching occurrences are displayed, most recent first, until you select
+a form for evaluation.  If PATTERN is empty (or nil), every form in the
+command history is offered.  The form is placed in the minibuffer for
+editing and the result is evaluated." t nil)
+
+(autoload 'list-command-history "chistory" "\
+List history of commands typed to minibuffer.
+The number of commands listed is controlled by `list-command-history-max'.
+Calls value of `list-command-history-filter' (if non-nil) on each history
+element to judge if that element should be excluded from the list.
+
+The buffer is left in Command History mode." t nil)
+
+(autoload 'command-history-mode "chistory" "\
+Major mode for examining commands from `command-history'.
+The number of commands listed is controlled by `list-command-history-max'.
+The command history is filtered by `list-command-history-filter' if non-nil.
+Use \\<command-history-map>\\[command-history-repeat] to repeat the command on the current line.
+
+Otherwise much like Emacs-Lisp Mode except that there is no self-insertion
+and digits provide prefix arguments.  Tab does not indent.
+\\{command-history-map}
+Calls the value of `command-history-hook' if that is non-nil.
+The Command History listing is recomputed each time this mode is invoked." t nil)
+
+;;;***
+
+;;;### (autoloads nil "cmuscheme" "packages/cmuscheme.el")
+
+(add-hook 'same-window-buffer-names "*scheme*")
+
+;;;***
+
+;;;### (autoloads (compare-windows) "compare-w" "packages/compare-w.el")
+
+(autoload 'compare-windows "compare-w" "\
+Compare text in current window with text in next window.
+Compares the text starting at point in each window,
+moving over text in each one as far as they match.
+
+This command pushes the mark in each window
+at the prior location of point in that window.
+If both windows display the same buffer,
+the mark is pushed twice in that buffer:
+first in the other window, then in the selected window.
+
+A prefix arg means ignore changes in whitespace.
+The variable `compare-windows-whitespace' controls how whitespace is skipped.
+If `compare-ignore-case' is non-nil, changes in case are also ignored." t nil)
+
+;;;***
+
+;;;### (autoloads (first-error previous-error next-error compilation-minor-mode grep compile) "compile" "packages/compile.el")
+
+(defcustom compilation-mode-hook nil "*List of hook functions run by `compilation-mode' (see `run-hooks')." :type 'hook :group 'compilation)
+
+(defcustom compilation-window-height nil "*Number of lines in a compilation window.  If nil, use Emacs default." :type '(choice (const nil) integer) :group 'compilation)
+
+(defcustom compilation-buffer-name-function nil "Function to compute the name of a compilation buffer.\nThe function receives one argument, the name of the major mode of the\ncompilation buffer.  It should return a string.\nnil means compute the name with `(concat \"*\" (downcase major-mode) \"*\")'." :type 'function :group 'compilation)
+
+(defcustom compilation-finish-function nil "*Function to call when a compilation process finishes.\nIt is called with two arguments: the compilation buffer, and a string\ndescribing how the process finished." :type 'function :group 'compilation)
+
+(defcustom compilation-search-path '(nil) "*List of directories to search for source files named in error messages.\nElements should be directory names, not file names of directories.\nnil as an element means to try the default directory." :type '(repeat (choice (const :tag "Default" nil) directory)) :group 'compilation)
+
+(autoload 'compile "compile" "\
+Compile the program including the current buffer.  Default: run `make'.
+Runs COMMAND, a shell command, in a separate process asynchronously
+with output going to the buffer `*compilation*'.
+
+You can then use the command \\[next-error] to find the next error message
+and move to the source code that caused it.
+
+Interactively, prompts for the command if `compilation-read-command' is
+non-nil; otherwise uses `compile-command'.  With prefix arg, always prompts.
+
+To run more than one compilation at once, start one and rename the
+`*compilation*' buffer to some other name with \\[rename-buffer].
+Then start the next one.
+
+The name used for the buffer is actually whatever is returned by
+the function in `compilation-buffer-name-function', so you can set that
+to a function that generates a unique name." t nil)
+
+(autoload 'grep "compile" "\
+Run grep, with user-specified args, and collect output in a buffer.
+While grep runs asynchronously, you can use the \\[next-error] command
+to find the text that grep hits refer to.
+
+This command uses a special history list for its arguments, so you can
+easily repeat a grep command." t nil)
+
+(autoload 'compilation-minor-mode "compile" "\
+Toggle compilation minor mode.
+With arg, turn compilation mode on if and only if arg is positive.
+See `compilation-mode'.
+! \\{compilation-mode-map}" t nil)
+
+(autoload 'next-error "compile" "\
+Visit next compilation error message and corresponding source code.
+This operates on the output from the \\[compile] command.
+If all preparsed error messages have been processed,
+the error message buffer is checked for new ones.
+
+A prefix arg specifies how many error messages to move;
+negative means move back to previous error messages.
+Just C-u as a prefix means reparse the error message buffer
+and start at the first error.
+
+\\[next-error] normally applies to the most recent compilation started,
+but as long as you are in the middle of parsing errors from one compilation
+output buffer, you stay with that compilation output buffer.
+
+Use \\[next-error] in a compilation output buffer to switch to
+processing errors from that compilation.
+
+See variables `compilation-parse-errors-function' and
+`compilation-error-regexp-alist' for customization ideas." t nil)
+
+(define-key ctl-x-map "`" 'next-error)
+
+(autoload 'previous-error "compile" "\
+Visit previous compilation error message and corresponding source code.
+This operates on the output from the \\[compile] command." t nil)
+
+(autoload 'first-error "compile" "\
+Reparse the error message buffer and start at the first error
+Visit corresponding source code.
+This operates on the output from the \\[compile] command." t nil)
+
+;;;***
+
+;;;### (autoloads (dabbrev-expand dabbrev-completion) "dabbrev" "packages/dabbrev.el")
+
+(define-key global-map [(meta /)] 'dabbrev-expand)
+
+(define-key global-map [(meta control /)] 'dabbrev-completion)
+
+(autoload 'dabbrev-completion "dabbrev" "\
+Completion on current word.
+Like \\[dabbrev-expand] but finds all expansions in the current buffer
+and presents suggestions for completion.
+
+With a prefix argument, it searches all buffers accepted by the
+function pointed out by `dabbrev-friend-buffer-function' to find the
+completions.
+
+If the prefix argument is 16 (which comes from C-u C-u),
+then it searches *all* buffers.
+
+With no prefix argument, it reuses an old completion list
+if there is a suitable one already." t nil)
+
+(autoload 'dabbrev-expand "dabbrev" "\
+Expand previous word \"dynamically\".
+
+Expands to the most recent, preceding word for which this is a prefix.
+If no suitable preceding word is found, words following point are
+considered.  If still no suitable word is found, then look in the
+buffers accepted by the function pointed out by variable
+`dabbrev-friend-buffer-function'.
+
+A positive prefix argument, N, says to take the Nth backward *distinct*
+possibility.  A negative argument says search forward.
+
+If the cursor has not moved from the end of the previous expansion and
+no argument is given, replace the previously-made expansion
+with the next possible expansion not yet tried.
+
+The variable `dabbrev-backward-only' may be used to limit the
+direction of search to backward if set non-nil.
+
+See also `dabbrev-abbrev-char-regexp' and \\[dabbrev-completion]." t nil)
+
+;;;***
+
+;;;### (autoloads (diff-backup diff) "diff" "packages/diff.el")
+
+(defcustom diff-switches "-c" "*A list of switches (strings) to pass to the diff program." :type '(choice string (repeat string)) :group 'diff)
+
+(autoload 'diff "diff" "\
+Find and display the differences between OLD and NEW files.
+Interactively you are prompted with the current buffer's file name for NEW
+and what appears to be its backup for OLD." t nil)
+
+(autoload 'diff-backup "diff" "\
+Diff this file with its backup file or vice versa.
+Uses the latest backup, if there are several numerical backups.
+If this file is a backup, diff it with its original.
+The backup file is the first file given to `diff'." t nil)
+
+;;;***
+
+;;;### (autoloads (edit-faces) "edit-faces" "packages/edit-faces.el")
+
+(autoload 'edit-faces "edit-faces" "\
+Alter face characteristics by editing a list of defined faces.
+Pops up a buffer containing a list of defined faces.
+
+Editing commands:
+
+\\{edit-faces-mode-map}" t nil)
+
+;;;***
+
+;;;### (autoloads (report-xemacs-bug) "emacsbug" "packages/emacsbug.el")
+
+(autoload 'report-xemacs-bug "emacsbug" "\
+Report a bug in XEmacs.
+Prompts for bug subject.  Leaves you in a mail buffer." t nil)
+
+;;;***
+
+;;;### (autoloads (emerge-merge-directories emerge-revisions-with-ancestor emerge-revisions emerge-files-with-ancestor-remote emerge-files-remote emerge-files-with-ancestor-command emerge-files-command emerge-buffers-with-ancestor emerge-buffers emerge-files-with-ancestor emerge-files) "emerge" "packages/emerge.el")
+
+(autoload 'emerge-files "emerge" "\
+Run Emerge on two files." t nil)
+
+(fset 'emerge 'emerge-files)
+
+(autoload 'emerge-files-with-ancestor "emerge" "\
+Run Emerge on two files, giving another file as the ancestor." t nil)
+
+(autoload 'emerge-buffers "emerge" "\
+Run Emerge on two buffers." t nil)
+
+(autoload 'emerge-buffers-with-ancestor "emerge" "\
+Run Emerge on two buffers, giving another buffer as the ancestor." t nil)
+
+(autoload 'emerge-files-command "emerge" nil nil nil)
+
+(autoload 'emerge-files-with-ancestor-command "emerge" nil nil nil)
+
+(autoload 'emerge-files-remote "emerge" nil nil nil)
+
+(autoload 'emerge-files-with-ancestor-remote "emerge" nil nil nil)
+
+(autoload 'emerge-revisions "emerge" "\
+Emerge two RCS revisions of a file." t nil)
+
+(autoload 'emerge-revisions-with-ancestor "emerge" "\
+Emerge two RCS revisions of a file, with another revision as ancestor." t nil)
+
+(autoload 'emerge-merge-directories "emerge" nil t nil)
+
+;;;***
+
+;;;### (autoloads (tags-apropos list-tags tags-query-replace tags-search tags-loop-continue next-file find-tag-other-window find-tag visit-tags-table) "etags" "packages/etags.el")
+
+(defcustom tags-build-completion-table 'ask "*If this variable is nil, then tags completion is disabled.\nIf this variable is t, then things which prompt for tags will do so with \n completion across all known tags.\nIf this variable is the symbol `ask', then you will be asked whether each\n tags table should be added to the completion list as it is read in.\n (With the exception that for very small tags tables, you will not be asked,\n since they can be parsed quickly.)" :type '(radio (const :tag "Disabled" nil) (const :tag "Complete All" t) (const :tag "Ask" ask)) :group 'etags)
+
+(defcustom tags-always-exact nil "*If this variable is non-nil, then tags always looks for exact matches." :type 'boolean :group 'etags)
+
+(defcustom tag-table-alist nil "*A list which determines which tags files should be active for a \ngiven buffer.  This is not really an association list, in that all \nelements are checked.  The CAR of each element of this list is a \npattern against which the buffer's file name is compared; if it \nmatches, then the CDR of the list should be the name of the tags\ntable to use.  If more than one element of this list matches the\nbuffer's file name, then all of the associated tags tables will be\nused.  Earlier ones will be searched first.\n\nIf the CAR of elements of this list are strings, then they are treated\nas regular-expressions against which the file is compared (like the\nauto-mode-alist).  If they are not strings, then they are evaluated.\nIf they evaluate to non-nil, then the current buffer is considered to\nmatch.\n\nIf the CDR of the elements of this list are strings, then they are\nassumed to name a TAGS file.  If they name a directory, then the string\n\"TAGS\" is appended to them to get the file name.  If they are not \nstrings, then they are evaluated, and must return an appropriate string.\n\nFor example:\n  (setq tag-table-alist\n	'((\"/usr/src/public/perl/\" . \"/usr/src/public/perl/perl-3.0/\")\n	 (\"\\\\.el$\" . \"/usr/local/emacs/src/\")\n	 (\"/jbw/gnu/\" . \"/usr15/degree/stud/jbw/gnu/\")\n	 (\"\" . \"/usr/local/emacs/src/\")\n	 ))\n\nThis means that anything in the /usr/src/public/perl/ directory should use\nthe TAGS file /usr/src/public/perl/perl-3.0/TAGS; and file ending in .el should\nuse the TAGS file /usr/local/emacs/src/TAGS; and anything in or below the\ndirectory /jbw/gnu/ should use the TAGS file /usr15/degree/stud/jbw/gnu/TAGS.\nA file called something like \"/usr/jbw/foo.el\" would use both the TAGS files\n/usr/local/emacs/src/TAGS and /usr15/degree/stud/jbw/gnu/TAGS (in that order)\nbecause it matches both patterns.\n\nIf the buffer-local variable `buffer-tag-table' is set, then it names a tags\ntable that is searched before all others when find-tag is executed from this\nbuffer.\n\nIf there is a file called \"TAGS\" in the same directory as the file in \nquestion, then that tags file will always be used as well (after the\n`buffer-tag-table' but before the tables specified by this list.)\n\nIf the variable tags-file-name is set, then the tags file it names will apply\nto all buffers (for backwards compatibility.)  It is searched first.\n" :type '(repeat (cons regexp sexp)) :group 'etags)
+
+(autoload 'visit-tags-table "etags" "\
+Tell tags commands to use tags table file FILE first.
+FILE should be the name of a file created with the `etags' program.
+A directory name is ok too; it means file TAGS in that directory." t nil)
+
+(autoload 'find-tag "etags" "\
+*Find tag whose name contains TAGNAME.
+ Selects the buffer that the tag is contained in
+and puts point at its definition.
+ If TAGNAME is a null string, the expression in the buffer
+around or before point is used as the tag name.
+ If called interactively with a numeric argument, searches for the next tag
+in the tag table that matches the tagname used in the previous find-tag.
+ If second arg OTHER-WINDOW is non-nil, uses another window to display
+the tag.
+
+This version of this function supports multiple active tags tables,
+and completion.
+
+Variables of note:
+
+  tag-table-alist		controls which tables apply to which buffers
+  tags-file-name		a default tags table
+  tags-build-completion-table   controls completion behavior
+  buffer-tag-table		another way of specifying a buffer-local table
+  make-tags-files-invisible	whether tags tables should be very hidden
+  tag-mark-stack-max		how many tags-based hops to remember" t nil)
+
+(autoload 'find-tag-other-window "etags" "\
+*Find tag whose name contains TAGNAME.
+ Selects the buffer that the tag is contained in in another window
+and puts point at its definition.
+ If TAGNAME is a null string, the expression in the buffer
+around or before point is used as the tag name.
+ If second arg NEXT is non-nil (interactively, with prefix arg),
+searches for the next tag in the tag table
+that matches the tagname used in the previous find-tag.
+
+This version of this function supports multiple active tags tables,
+and completion.
+
+Variables of note:
+
+  tag-table-alist		controls which tables apply to which buffers
+  tags-file-name		a default tags table
+  tags-build-completion-table   controls completion behavior
+  buffer-tag-table		another way of specifying a buffer-local table
+  make-tags-files-invisible	whether tags tables should be very hidden
+  tag-mark-stack-max		how many tags-based hops to remember" t nil)
+
+(autoload 'next-file "etags" "\
+Select next file among files in current tag table(s).
+
+A first argument of t (prefix arg, if interactive) initializes to the
+beginning of the list of files in the (first) tags table.  If the argument
+is neither nil nor t, it is evalled to initialize the list of files.
+
+Non-nil second argument NOVISIT means use a temporary buffer
+to save time and avoid uninteresting warnings.
+
+Value is nil if the file was already visited;
+if the file was newly read in, the value is the filename." t nil)
+
+(autoload 'tags-loop-continue "etags" "\
+Continue last \\[tags-search] or \\[tags-query-replace] command.
+Used noninteractively with non-nil argument to begin such a command (the
+argument is passed to `next-file', which see).
+Two variables control the processing we do on each file:
+the value of `tags-loop-scan' is a form to be executed on each file
+to see if it is interesting (it returns non-nil if so)
+and `tags-loop-operate' is a form to execute to operate on an interesting file
+If the latter returns non-nil, we exit; otherwise we scan the next file." t nil)
+
+(autoload 'tags-search "etags" "\
+Search through all files listed in tags table for match for REGEXP.
+Stops when a match is found.
+To continue searching for next match, use command \\[tags-loop-continue].
+
+See documentation of variable `tag-table-alist'." t nil)
+
+(autoload 'tags-query-replace "etags" "\
+Query-replace-regexp FROM with TO through all files listed in tags table.
+Third arg DELIMITED (prefix arg) means replace only word-delimited matches.
+If you exit (\\[keyboard-quit] or ESC), you can resume the query-replace
+with the command \\[tags-loop-continue].
+
+See documentation of variable `tag-table-alist'." t nil)
+
+(autoload 'list-tags "etags" "\
+Display list of tags in file FILE.
+FILE should not contain a directory spec
+unless it has one in the tag table." t nil)
+
+(autoload 'tags-apropos "etags" "\
+Display list of all tags in tag table REGEXP matches." t nil)
+
+;;;***
+
+;;;### (autoloads (turn-on-fast-lock fast-lock-mode) "fast-lock" "packages/fast-lock.el")
+
+(autoload 'fast-lock-mode "fast-lock" "\
+Toggle Fast Lock mode.
+With arg, turn Fast Lock mode on if and only if arg is positive and the buffer
+is associated with a file.  Enable it automatically in your `~/.emacs' by:
+
+ (setq font-lock-support-mode 'fast-lock-mode)
+
+If Fast Lock mode is enabled, and the current buffer does not contain any text
+properties, any associated Font Lock cache is used if its timestamp matches the
+buffer's file, and its `font-lock-keywords' match those that you are using.
+
+Font Lock caches may be saved:
+- When you save the file's buffer.
+- When you kill an unmodified file's buffer.
+- When you exit Emacs, for all unmodified or saved buffers.
+Depending on the value of `fast-lock-save-events'.
+See also the commands `fast-lock-read-cache' and `fast-lock-save-cache'.
+
+Use \\[font-lock-fontify-buffer] to fontify the buffer if the cache is bad.
+
+Various methods of control are provided for the Font Lock cache.  In general,
+see variable `fast-lock-cache-directories' and function `fast-lock-cache-name'.
+For saving, see variables `fast-lock-minimum-size', `fast-lock-save-events',
+`fast-lock-save-others' and `fast-lock-save-faces'." t nil)
+
+(autoload 'turn-on-fast-lock "fast-lock" "\
+Unconditionally turn on Fast Lock mode." nil nil)
+
+(when (fboundp 'add-minor-mode) (defvar fast-lock-mode nil) (add-minor-mode 'fast-lock-mode nil))
+
+;;;***
+
+;;;### (autoloads (feedmail-send-it) "feedmail" "packages/feedmail.el")
+
+(autoload 'feedmail-send-it "feedmail" nil nil nil)
+
+;;;***
+
+;;;### (autoloads (make-file-part) "file-part" "packages/file-part.el")
+
+(autoload 'make-file-part "file-part" "\
+Make a file part on buffer BUFFER out of the region.  Call it NAME.
+This command creates a new buffer containing the contents of the
+region and marks the buffer as referring to the specified buffer,
+called the `master buffer'.  When the file-part buffer is saved,
+its changes are integrated back into the master buffer.  When the
+master buffer is deleted, all file parts are deleted with it.
+
+When called from a function, expects four arguments, START, END,
+NAME, and BUFFER, all of which are optional and default to the
+beginning of BUFFER, the end of BUFFER, a name generated from
+BUFFER's name, and the current buffer, respectively." t nil)
+
+;;;***
+
+;;;### (autoloads (font-lock-set-defaults-1 font-lock-fontify-buffer turn-off-font-lock turn-on-font-lock font-lock-mode) "font-lock" "packages/font-lock.el")
+
+(defvar font-lock-auto-fontify t "\
+*Whether font-lock should automatically fontify files as they're loaded.
+This will only happen if font-lock has fontifying keywords for the major
+mode of the file.  You can get finer-grained control over auto-fontification
+by using this variable in combination with `font-lock-mode-enable-list' or
+`font-lock-mode-disable-list'.")
+
+(defvar font-lock-mode-enable-list nil "\
+*List of modes to auto-fontify, if `font-lock-auto-fontify' is nil.")
+
+(defvar font-lock-mode-disable-list nil "\
+*List of modes not to auto-fontify, if `font-lock-auto-fontify' is t.")
+
+(defvar font-lock-use-colors '(color) "\
+*Specification for when Font Lock will set up color defaults.
+Normally this should be '(color), meaning that Font Lock will set up
+color defaults that are only used on color displays.  Set this to nil
+if you don't want Font Lock to set up color defaults at all.  This
+should be one of
+
+-- a list of valid tags, meaning that the color defaults will be used
+   when all of the tags apply. (e.g. '(color x))
+-- a list whose first element is 'or and whose remaining elements are
+   lists of valid tags, meaning that the defaults will be used when
+   any of the tag lists apply.
+-- nil, meaning that the defaults should not be set up at all.
+
+\(If you specify face values in your init file, they will override any
+that Font Lock specifies, regardless of whether you specify the face
+values before or after loading Font Lock.)
+
+See also `font-lock-use-fonts'.  If you want more control over the faces
+used for fontification, see the documentation of `font-lock-mode' for
+how to do it.")
+
+(defvar font-lock-use-fonts '(or (mono) (grayscale)) "\
+*Specification for when Font Lock will set up non-color defaults.
+
+Normally this should be '(or (mono) (grayscale)), meaning that Font
+Lock will set up non-color defaults that are only used on either mono
+or grayscale displays.  Set this to nil if you don't want Font Lock to
+set up non-color defaults at all.  This should be one of
+
+-- a list of valid tags, meaning that the non-color defaults will be used
+   when all of the tags apply. (e.g. '(grayscale x))
+-- a list whose first element is 'or and whose remaining elements are
+   lists of valid tags, meaning that the defaults will be used when
+   any of the tag lists apply.
+-- nil, meaning that the defaults should not be set up at all.
+
+\(If you specify face values in your init file, they will override any
+that Font Lock specifies, regardless of whether you specify the face
+values before or after loading Font Lock.)
+
+See also `font-lock-use-colors'.  If you want more control over the faces
+used for fontification, see the documentation of `font-lock-mode' for
+how to do it.")
+
+(defvar font-lock-maximum-decoration nil "\
+*If non-nil, the maximum decoration level for fontifying.
+If nil, use the minimum decoration (equivalent to level 0).
+If t, use the maximum decoration available.
+If a number, use that level of decoration (or if not available the maximum).
+If a list, each element should be a cons pair of the form (MAJOR-MODE . LEVEL),
+where MAJOR-MODE is a symbol or t (meaning the default).  For example:
+ ((c++-mode . 2) (c-mode . t) (t . 1))
+means use level 2 decoration for buffers in `c++-mode', the maximum decoration
+available for buffers in `c-mode', and level 1 decoration otherwise.")
+
+(define-obsolete-variable-alias 'font-lock-use-maximal-decoration 'font-lock-maximum-decoration)
+
+(defvar font-lock-maximum-size (* 250 1024) "\
+*If non-nil, the maximum size for buffers for fontifying.
+Only buffers less than this can be fontified when Font Lock mode is turned on.
+If nil, means size is irrelevant.
+If a list, each element should be a cons pair of the form (MAJOR-MODE . SIZE),
+where MAJOR-MODE is a symbol or t (meaning the default).  For example:
+ ((c++-mode . 256000) (c-mode . 256000) (rmail-mode . 1048576))
+means that the maximum size is 250K for buffers in `c++-mode' or `c-mode', one
+megabyte for buffers in `rmail-mode', and size is irrelevant otherwise.")
+
+(defvar font-lock-keywords nil "\
+*A list of the keywords to highlight.
+Each element should be of the form:
+
+ MATCHER
+ (MATCHER . MATCH)
+ (MATCHER . FACENAME)
+ (MATCHER . HIGHLIGHT)
+ (MATCHER HIGHLIGHT ...)
+ (eval . FORM)
+
+where HIGHLIGHT should be either MATCH-HIGHLIGHT or MATCH-ANCHORED.
+
+FORM is an expression, whose value should be a keyword element,
+evaluated when the keyword is (first) used in a buffer.  This feature
+can be used to provide a keyword that can only be generated when Font
+Lock mode is actually turned on.
+
+For highlighting single items, typically only MATCH-HIGHLIGHT is required.
+However, if an item or (typically) items is to be highlighted following the
+instance of another item (the anchor) then MATCH-ANCHORED may be required.
+
+MATCH-HIGHLIGHT should be of the form:
+
+ (MATCH FACENAME OVERRIDE LAXMATCH)
+
+Where MATCHER can be either the regexp to search for, a variable
+containing the regexp to search for, or the function to call to make
+the search (called with one argument, the limit of the search).  MATCH
+is the subexpression of MATCHER to be highlighted.  FACENAME is either
+a symbol naming a face, or an expression whose value is the face name
+to use.  If you want FACENAME to be a symbol that evaluates to a face,
+use a form like \"(progn sym)\".
+
+OVERRIDE and LAXMATCH are flags.  If OVERRIDE is t, existing fontification may
+be overwritten.  If `keep', only parts not already fontified are highlighted.
+If `prepend' or `append', existing fontification is merged with the new, in
+which the new or existing fontification, respectively, takes precedence.
+If LAXMATCH is non-nil, no error is signalled if there is no MATCH in MATCHER.
+
+For example, an element of the form highlights (if not already highlighted):
+
+ \"\\\\\\=<foo\\\\\\=>\"		Discrete occurrences of \"foo\" in the value of the
+			variable `font-lock-keyword-face'.
+ (\"fu\\\\(bar\\\\)\" . 1)	Substring \"bar\" within all occurrences of \"fubar\" in
+			the value of `font-lock-keyword-face'.
+ (\"fubar\" . fubar-face)	Occurrences of \"fubar\" in the value of `fubar-face'.
+ (\"foo\\\\|bar\" 0 foo-bar-face t)
+			Occurrences of either \"foo\" or \"bar\" in the value
+			of `foo-bar-face', even if already highlighted.
+
+MATCH-ANCHORED should be of the form:
+
+ (MATCHER PRE-MATCH-FORM POST-MATCH-FORM MATCH-HIGHLIGHT ...)
+
+Where MATCHER is as for MATCH-HIGHLIGHT with one exception.  The limit of the
+search is currently guaranteed to be (no greater than) the end of the line.
+PRE-MATCH-FORM and POST-MATCH-FORM are evaluated before the first, and after
+the last, instance MATCH-ANCHORED's MATCHER is used.  Therefore they can be
+used to initialise before, and cleanup after, MATCHER is used.  Typically,
+PRE-MATCH-FORM is used to move to some position relative to the original
+MATCHER, before starting with MATCH-ANCHORED's MATCHER.  POST-MATCH-FORM might
+be used to move, before resuming with MATCH-ANCHORED's parent's MATCHER.
+
+For example, an element of the form highlights (if not already highlighted):
+
+ (\"\\\\\\=<anchor\\\\\\=>\" (0 anchor-face) (\"\\\\\\=<item\\\\\\=>\" nil nil (0 item-face)))
+
+ Discrete occurrences of \"anchor\" in the value of `anchor-face', and subsequent
+ discrete occurrences of \"item\" (on the same line) in the value of `item-face'.
+ (Here PRE-MATCH-FORM and POST-MATCH-FORM are nil.  Therefore \"item\" is
+ initially searched for starting from the end of the match of \"anchor\", and
+ searching for subsequent instance of \"anchor\" resumes from where searching
+ for \"item\" concluded.)
+
+Note that the MATCH-ANCHORED feature is experimental; in the future, we may
+replace it with other ways of providing this functionality.
+
+These regular expressions should not match text which spans lines.  While
+\\[font-lock-fontify-buffer] handles multi-line patterns correctly, updating
+when you edit the buffer does not, since it considers text one line at a time.
+
+Be very careful composing regexps for this list;
+the wrong pattern can dramatically slow things down!")
+
+(make-variable-buffer-local 'font-lock-keywords)
+
+(defvar font-lock-mode nil)
+
+(defvar font-lock-mode-hook nil "\
+Function or functions to run on entry to font-lock-mode.")
+
+(autoload 'font-lock-mode "font-lock" "\
+Toggle Font Lock Mode.
+With arg, turn font-lock mode on if and only if arg is positive.
+
+When Font Lock mode is enabled, text is fontified as you type it:
+
+ - Comments are displayed in `font-lock-comment-face';
+ - Strings are displayed in `font-lock-string-face';
+ - Documentation strings (in Lisp-like languages) are displayed in
+   `font-lock-doc-string-face';
+ - Language keywords (\"reserved words\") are displayed in
+   `font-lock-keyword-face';
+ - Function names in their defining form are displayed in
+   `font-lock-function-name-face';
+ - Variable names in their defining form are displayed in
+   `font-lock-variable-name-face';
+ - Type names are displayed in `font-lock-type-face';
+ - References appearing in help files and the like are displayed
+   in `font-lock-reference-face';
+ - Preprocessor declarations are displayed in
+  `font-lock-preprocessor-face';
+
+   and
+
+ - Certain other expressions are displayed in other faces according
+   to the value of the variable `font-lock-keywords'.
+
+Where modes support different levels of fontification, you can use the variable
+`font-lock-maximum-decoration' to specify which level you generally prefer.
+When you turn Font Lock mode on/off the buffer is fontified/defontified, though
+fontification occurs only if the buffer is less than `font-lock-maximum-size'.
+To fontify a buffer without turning on Font Lock mode, and regardless of buffer
+size, you can use \\[font-lock-fontify-buffer].
+
+See the variable `font-lock-keywords' for customization." t nil)
+
+(autoload 'turn-on-font-lock "font-lock" "\
+Unconditionally turn on Font Lock mode." nil nil)
+
+(autoload 'turn-off-font-lock "font-lock" "\
+Unconditionally turn off Font Lock mode." nil nil)
+
+(autoload 'font-lock-fontify-buffer "font-lock" "\
+Fontify the current buffer the way `font-lock-mode' would.
+See `font-lock-mode' for details.
+
+This can take a while for large buffers." t nil)
+
+(autoload 'font-lock-set-defaults-1 "font-lock" nil nil nil)
+
+(add-minor-mode 'font-lock-mode " Font")
+
+;;;***
+
+;;;### (autoloads (sc-mode) "generic-sc" "packages/generic-sc.el")
+
+(autoload 'sc-mode "generic-sc" "\
+Toggle sc-mode.
+SYSTEM can be sccs, rcs or cvs.
+Cvs requires the pcl-cvs package.
+
+The following commands are available
+\\[sc-next-operation]	perform next logical source control operation on current file
+\\[sc-show-changes]	compare the version being edited with an older one
+\\[sc-version-diff-file]	compare two older versions of a file
+\\[sc-show-history]		display change history of current file
+\\[sc-visit-previous-revision]	display an older revision of current file
+\\[sc-revert-file]		revert buffer to last checked-in version
+\\[sc-list-all-locked-files]		show all files locked in current directory
+\\[sc-list-locked-files]		show all files locked by you in current directory
+\\[sc-list-registered-files]		show all files under source control in current directory
+\\[sc-update-directory]		get fresh copies of files checked-in by others in current directory
+\\[sc-rename-file]		rename the current file and its source control file
+
+
+While you are entering a change log message for a check in, sc-log-entry-mode
+will be in effect.
+
+Global user options:
+    sc-diff-command	A list consisting of the command and flags
+			to be used for generating context diffs.
+    sc-mode-expert	suppresses some conformation prompts,
+			notably for delta aborts and file saves.
+    sc-max-log-size	specifies the maximum allowable size
+			of a log message plus one.
+
+
+When using SCCS you have additional commands and options
+
+\\[sccs-insert-headers]		insert source control headers in current file
+
+When you generate headers into a buffer using \\[sccs-insert-headers],
+the value of sc-insert-headers-hook is called before insertion. If the
+file is recognized a C or Lisp source, sc-insert-c-header-hook or
+sc-insert-lisp-header-hook is called after insertion respectively.
+
+    sccs-headers-wanted	which %-keywords to insert when adding
+			headers with C-c h
+    sccs-insert-static	if non-nil, keywords inserted in C files
+			get stuffed in a static string area so that
+			what(1) can see them in the compiled object code.
+
+When using CVS you have additional commands
+
+\\[sc-cvs-update-directory]	update the current directory using pcl-cvs
+\\[sc-cvs-file-status]		show the CVS status of current file
+" t nil)
+
+;;;***
+
+;;;### (autoloads (gnuserv-start gnuserv-running-p) "gnuserv" "packages/gnuserv.el")
+
+(defcustom gnuserv-frame nil "*The frame to be used to display all edited files.\nIf nil, then a new frame is created for each file edited.\nIf t, then the currently selected frame will be used.\nIf a function, then this will be called with a symbol `x' or `tty' as the\nonly argument, and its return value will be interpreted as above." :tag "Gnuserv Frame" :type '(radio (const :tag "Create new frame each time" nil) (const :tag "Use selected frame" t) (function-item :tag "Use main Emacs frame" gnuserv-main-frame-function) (function-item :tag "Use visible frame, otherwise create new" gnuserv-visible-frame-function) (function-item :tag "Create special Gnuserv frame and use it" gnuserv-special-frame-function) (function :tag "Other")) :group 'gnuserv)
+
+(autoload 'gnuserv-running-p "gnuserv" "\
+Return non-nil if a gnuserv process is running from this XEmacs session." nil nil)
+
+(autoload 'gnuserv-start "gnuserv" "\
+Allow this Emacs process to be a server for client processes.
+This starts a gnuserv communications subprocess through which
+client \"editors\" (gnuclient and gnudoit) can send editing commands to 
+this Emacs job.  See the gnuserv(1) manual page for more details.
+
+Prefix arg means just kill any existing server communications subprocess." t nil)
+
+;;;***
+
+;;;### (autoloads (gopher-atpoint gopher) "gopher" "packages/gopher.el")
+
+(autoload 'gopher "gopher" "\
+Start a gopher session.  With C-u, prompt for a gopher server." t nil)
+
+(autoload 'gopher-atpoint "gopher" "\
+Try to interpret the text around point as a gopher bookmark, and dispatch
+to that object." t nil)
+
+;;;***
+
+;;;### (autoloads (hexlify-buffer hexl-find-file hexl-mode) "hexl" "packages/hexl.el")
+
+(autoload 'hexl-mode "hexl" "\
+\\<hexl-mode-map>
+A major mode for editing binary files in hex dump format.
+
+This function automatically converts a buffer into the hexl format
+using the function `hexlify-buffer'.
+
+Each line in the buffer has an \"address\" (displayed in hexadecimal)
+representing the offset into the file that the characters on this line
+are at and 16 characters from the file (displayed as hexadecimal
+values grouped every 16 bits) and as their ASCII values.
+
+If any of the characters (displayed as ASCII characters) are
+unprintable (control or meta characters) they will be replaced as
+periods.
+
+If `hexl-mode' is invoked with an argument the buffer is assumed to be
+in hexl format.
+
+A sample format:
+
+  HEX ADDR: 0001 0203 0405 0607 0809 0a0b 0c0d 0e0f     ASCII-TEXT
+  --------  ---- ---- ---- ---- ---- ---- ---- ----  ----------------
+  00000000: 5468 6973 2069 7320 6865 786c 2d6d 6f64  This is hexl-mod
+  00000010: 652e 2020 4561 6368 206c 696e 6520 7265  e.  Each line re
+  00000020: 7072 6573 656e 7473 2031 3620 6279 7465  presents 16 byte
+  00000030: 7320 6173 2068 6578 6164 6563 696d 616c  s as hexadecimal
+  00000040: 2041 5343 4949 0a61 6e64 2070 7269 6e74   ASCII.and print
+  00000050: 6162 6c65 2041 5343 4949 2063 6861 7261  able ASCII chara
+  00000060: 6374 6572 732e 2020 416e 7920 636f 6e74  cters.  Any cont
+  00000070: 726f 6c20 6f72 206e 6f6e 2d41 5343 4949  rol or non-ASCII
+  00000080: 2063 6861 7261 6374 6572 730a 6172 6520   characters.are 
+  00000090: 6469 7370 6c61 7965 6420 6173 2070 6572  displayed as per
+  000000a0: 696f 6473 2069 6e20 7468 6520 7072 696e  iods in the prin
+  000000b0: 7461 626c 6520 6368 6172 6163 7465 7220  table character 
+  000000c0: 7265 6769 6f6e 2e0a                      region..
+
+Movement is as simple as movement in a normal emacs text buffer.  Most
+cursor movement bindings are the same (ie. Use \\[hexl-backward-char], \\[hexl-forward-char], \\[hexl-next-line], and \\[hexl-previous-line]
+to move the cursor left, right, down, and up).
+
+Advanced cursor movement commands (ala \\[hexl-beginning-of-line], \\[hexl-end-of-line], \\[hexl-beginning-of-buffer], and \\[hexl-end-of-buffer]) are
+also supported.
+
+There are several ways to change text in hexl mode:
+
+ASCII characters (character between space (0x20) and tilde (0x7E)) are
+bound to self-insert so you can simply type the character and it will
+insert itself (actually overstrike) into the buffer.
+
+\\[hexl-quoted-insert] followed by another keystroke allows you to insert the key even if
+it isn't bound to self-insert.  An octal number can be supplied in place
+of another key to insert the octal number's ASCII representation.
+
+\\[hexl-insert-hex-char] will insert a given hexadecimal value (if it is between 0 and 0xFF)
+into the buffer at the current point.
+
+\\[hexl-insert-octal-char] will insert a given octal value (if it is between 0 and 0377)
+into the buffer at the current point.
+
+\\[hexl-insert-decimal-char] will insert a given decimal value (if it is between 0 and 255)
+into the buffer at the current point.
+
+\\[hexl-mode-exit] will exit hexl-mode.
+
+Note: saving the file with any of the usual Emacs commands
+will actually convert it back to binary format while saving.
+
+You can use \\[hexl-find-file] to visit a file in hexl-mode.
+
+\\[describe-bindings] for advanced commands." t nil)
+
+(autoload 'hexl-find-file "hexl" "\
+Edit file FILENAME in hexl-mode.
+Switch to a buffer visiting file FILENAME, creating one in none exists." t nil)
+
+(autoload 'hexlify-buffer "hexl" "\
+Convert a binary buffer to hexl format.
+This discards the buffer's undo information." t nil)
+
+;;;***
+
+;;;### (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")
+
+(autoload 'hyper-apropos "hyper-apropos" "\
+Display lists of functions and variables matching REGEXP
+in buffer \"*Hyper Apropos*\".  If optional prefix arg is given, then the
+value of `hyper-apropos-programming-apropos' is toggled for this search.
+See also `hyper-apropos-mode'." t nil)
+
+(autoload 'hyper-describe-key "hyper-apropos" nil t nil)
+
+(autoload 'hyper-describe-key-briefly "hyper-apropos" nil t nil)
+
+(autoload 'hyper-describe-face "hyper-apropos" "\
+Describe face..
+See also `hyper-apropos' and `hyper-describe-function'." t nil)
+
+(autoload 'hyper-describe-variable "hyper-apropos" "\
+Hypertext drop-in replacement for `describe-variable'.
+See also `hyper-apropos' and `hyper-describe-function'." t nil)
+
+(autoload 'hyper-describe-function "hyper-apropos" "\
+Hypertext replacement for `describe-function'.  Unlike `describe-function'
+in that the symbol under the cursor is the default if it is a function.
+See also `hyper-apropos' and `hyper-describe-variable'." t nil)
+
+(autoload 'hyper-apropos-read-variable-symbol "hyper-apropos" "\
+Hypertext drop-in replacement for `describe-variable'.
+See also `hyper-apropos' and `hyper-describe-function'." nil nil)
+
+(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)
+
+(autoload 'hyper-apropos-set-variable "hyper-apropos" "\
+Interactively set the variable on the current line." t nil)
+
+(define-obsolete-function-alias 'hypropos-set-variable 'hyper-apropos-set-variable)
+
+(autoload 'hyper-apropos-popup-menu "hyper-apropos" nil t nil)
+
+(define-obsolete-function-alias 'hypropos-popup-menu 'hyper-apropos-popup-menu)
+
+;;;***
+
+;;;### (autoloads (icomplete-minibuffer-setup icomplete-mode) "icomplete" "packages/icomplete.el")
+
+(autoload 'icomplete-mode "icomplete" "\
+Activate incremental minibuffer completion for this emacs session.
+Deactivates with negative universal argument." t nil)
+
+(autoload 'icomplete-minibuffer-setup "icomplete" "\
+Run in minibuffer on activation to establish incremental completion.
+Usually run by inclusion in `minibuffer-setup-hook'." nil nil)
+
+;;;***
+
+;;;### (autoloads (dired-do-igrep-find dired-do-igrep igrep-find-define igrep-find igrep-define igrep) "igrep" "packages/igrep.el")
+
+(autoload 'igrep "igrep" "\
+*Run `grep` PROGRAM to match EXPRESSION in FILES.
+The output is displayed in the *igrep* buffer, which \\[next-error] and
+\\[compile-goto-error] parse to find each line of matched text.
+
+PROGRAM may be nil, in which case it defaults to `igrep-program'.
+
+EXPRESSION is automatically delimited by `igrep-expression-quote-char'.
+
+FILES is either a file name pattern (expanded by the shell named by
+`shell-file-name') or a list of file name patterns.
+
+Optional OPTIONS is also passed to PROGRAM; it defaults to `igrep-options'.
+
+If a prefix argument (\\[universal-argument]) is given when called interactively,
+or if `igrep-read-options' is set, OPTIONS is read from the minibuffer.
+
+If two prefix arguments (\\[universal-argument] \\[universal-argument]) are given when called interactively,
+or if `igrep-read-multiple-files' is set, FILES is read from the minibuffer
+multiple times.
+
+If three prefix arguments (\\[universal-argument] \\[universal-argument] \\[universal-argument]) are given when called interactively,
+or if `igrep-read-options' and `igrep-read-multiple-files' are set,
+OPTIONS is read and FILES is read multiple times.
+
+If `igrep-find' is non-nil, the directory or directories
+containing FILES is recursively searched for files whose name matches
+the file name component of FILES (and whose contents match
+EXPRESSION)." t nil)
+
+(autoload 'igrep-define "igrep" "\
+Define ANALOGUE-COMMAND as an `igrep' analogue command.
+Optional (VARIABLE VALUE) arguments specify temporary bindings for the command." nil 'macro)
+
+(autoload 'igrep-find "igrep" "\
+*Run `grep` via `find`; see \\[igrep] and `igrep-find'.
+All arguments (including prefix arguments, when called interactively)
+are handled by `igrep'." t nil)
+
+(autoload 'igrep-find-define "igrep" "\
+Define ANALOGUE-COMMAND-find as an `igrep' analogue `find` command.
+Optional (VARIABLE VALUE) arguments specify temporary bindings for the command." nil 'macro)
+
+(autoload 'dired-do-igrep "igrep" "\
+*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")
+
+(autoload 'info "info" "\
+Enter Info, the documentation browser.
+Optional argument FILE specifies the file to examine;
+the default is the top-level directory of Info.
+
+In interactive use, a prefix argument directs this command
+to read a file name from the minibuffer." t nil)
+
+(autoload 'Info-query "info" "\
+Enter Info, the documentation browser.  Prompt for name of Info file." t nil)
+
+(autoload 'Info-goto-node "info" "\
+Go to info node named NAME.  Give just NODENAME or (FILENAME)NODENAME.
+Actually, the following interpretations of NAME are tried in order:
+    (FILENAME)NODENAME
+    (FILENAME)     (using Top node)
+    NODENAME       (in current file)
+    TAGNAME        (see below)
+    FILENAME       (using Top node)
+where TAGNAME is a string that appears in quotes: \"TAGNAME\", in an
+annotation for any node of any file.  (See `a' and `x' commands.)" t nil)
+
+(autoload 'Info-visit-file "info" "\
+Directly visit an info file." t nil)
+
+(autoload 'Info-search "info" "\
+Search for REGEXP, starting from point, and select node it's found in." t nil)
+
+(autoload 'Info-emacs-command "info" "\
+Look up an Emacs command in the Emacs manual in the Info system.
+This command is designed to be used whether you are already in Info or not." t nil)
+
+(autoload 'Info-goto-emacs-command-node "info" "\
+Look up an Emacs command in the Emacs manual in the Info system.
+This command is designed to be used whether you are already in Info or not." t nil)
+
+(autoload 'Info-goto-emacs-key-command-node "info" "\
+Look up an Emacs key sequence in the Emacs manual in the Info system.
+This command is designed to be used whether you are already in Info or not." t nil)
+
+(autoload 'Info-emacs-key "info" "\
+Look up an Emacs key sequence in the Emacs manual in the Info system.
+This command is designed to be used whether you are already in Info or not." t nil)
+
+(autoload 'Info-elisp-ref "info" "\
+Look up an Emacs Lisp function in the Elisp manual in the Info system.
+This command is designed to be used whether you are already in Info or not." t nil)
+
+;;;***
+
+;;;### (autoloads (batch-info-validate Info-validate Info-split Info-tagify) "informat" "packages/informat.el")
+
+(autoload 'Info-tagify "informat" "\
+Create or update Info-file tag table in current buffer." t nil)
+
+(autoload 'Info-split "informat" "\
+Split an info file into an indirect file plus bounded-size subfiles.
+Each subfile will be up to 50,000 characters plus one node.
+
+To use this command, first visit a large Info file that has a tag
+table.  The buffer is modified into a (small) indirect info file which
+should be saved in place of the original visited file.
+
+The subfiles are written in the same directory the original file is
+in, with names generated by appending `-' and a number to the original
+file name.  The indirect file still functions as an Info file, but it
+contains just the tag table and a directory of subfiles." t nil)
+
+(autoload 'Info-validate "informat" "\
+Check current buffer for validity as an Info file.
+Check that every node pointer points to an existing node." t nil)
+
+(autoload 'batch-info-validate "informat" "\
+Runs `Info-validate' on the files remaining on the command line.
+Must be used only with -batch, and kills Emacs on completion.
+Each file will be processed even if an error occurred previously.
+For example, invoke \"emacs -batch -f batch-info-validate $info/ ~/*.info\"" nil nil)
+
+;;;***
+
+;;;### (autoloads (ispell-message ispell-minor-mode ispell-complete-word-interior-frag ispell-complete-word ispell-continue ispell-buffer ispell-region ispell-change-dictionary ispell-kill-ispell ispell-help ispell-word) "ispell" "packages/ispell.el")
+
+(defcustom ispell-personal-dictionary nil "*File name of your personal spelling dictionary, or nil.\nIf nil, the default personal dictionary, \"~/.ispell_DICTNAME\" is used,\nwhere DICTNAME is the name of your default dictionary." :type 'file :group 'ispell)
+
+(defvar ispell-dictionary-alist-1 '((nil "[A-Za-z]" "[^A-Za-z]" "[']" nil ("-B") nil) ("english" "[A-Za-z]" "[^A-Za-z]" "[']" nil ("-B") nil) ("british" "[A-Za-z]" "[^A-Za-z]" "[']" nil ("-B" "-d" "british") nil) ("deutsch" "[a-zA-Z\"]" "[^a-zA-Z\"]" "[']" t ("-C") "~tex") ("deutsch8" "[a-zA-Z�������]" "[^a-zA-Z�������]" "[']" t ("-C" "-d" "deutsch") "~latin1") ("nederlands" "[A-Za-z�-���-��-��-��-���-���-��-�]" "[^A-Za-z�-���-��-��-��-���-���-��-�]" "[']" t ("-C") nil) ("nederlands8" "[A-Za-z�-���-��-��-��-���-���-��-�]" "[^A-Za-z�-���-��-��-��-���-���-��-�]" "[']" t ("-C") nil)))
+
+(defvar ispell-dictionary-alist-2 '(("svenska" "[A-Za-z}{|\\133\\135\\\\]" "[^A-Za-z}{|\\133\\135\\\\]" "[']" nil ("-C") nil) ("svenska8" "[A-Za-z������]" "[^A-Za-z������]" "[']" nil ("-C" "-d" "svenska") "~list") ("norsk" "[A-Za-z��������]" "[^A-Za-z��������]" "[']" nil ("-C" "-d" "norsk") "~list") ("francais7" "[A-Za-z]" "[^A-Za-z]" "[`'^---]" t nil nil) ("francais" "[A-Za-z���������������������������]" "[^A-Za-z���������������������������]" "[---']" t nil "~list") ("francais-tex" "[A-Za-z���������������������������\\]" "[^A-Za-z���������������������������\\]" "[---'^`\"]" t nil "~tex") ("italiano" "[A-Za-z������������������]" "[^A-Za-z������������������]" "[']" t ("-d" "italiano") "~list") ("dansk" "[A-Z���a-z���]" "[^A-Z���a-z���]" "" nil ("-C") nil)))
+
+(defvar ispell-dictionary-alist (append ispell-dictionary-alist-1 ispell-dictionary-alist-2) "\
+An alist of dictionaries and their associated parameters.
+
+Each element of this list is also a list:
+
+\(DICTIONARY-NAME CASECHARS NOT-CASECHARS OTHERCHARS MANY-OTHERCHARS-P
+        ISPELL-ARGS EXTENDED-CHARACTER-MODE)
+
+DICTIONARY-NAME is a possible value of variable `ispell-dictionary', nil
+means the default dictionary.
+
+CASECHARS is a regular expression of valid characters that comprise a
+word.
+
+NOT-CASECHARS is the opposite regexp of CASECHARS.
+
+OTHERCHARS is a regular expression of other characters that are valid
+in word constructs.  Otherchars cannot be adjacent to each other in a
+word, nor can they begin or end a word.  This implies we can't check
+\"Stevens'\" as a correct possessive and other correct formations.
+
+Hint: regexp syntax requires the hyphen to be declared first here.
+
+MANY-OTHERCHARS-P is non-nil if many otherchars are to be allowed in a
+word instead of only one.
+
+ISPELL-ARGS is a list of additional arguments passed to the ispell
+subprocess.
+
+EXTENDED-CHARACTER-MODE should be used when dictionaries are used which
+have been configured in an Ispell affix file.  (For example, umlauts
+can be encoded as \\\"a, a\\\", \"a, ...)  Defaults are ~tex and ~nroff
+in English.  This has the same effect as the command-line `-T' option.
+The buffer Major Mode controls Ispell's parsing in tex or nroff mode,
+but the dictionary can control the extended character mode.
+Both defaults can be overruled in a buffer-local fashion. See
+`ispell-parsing-keyword' for details on this.
+
+Note that the CASECHARS and OTHERCHARS slots of the alist should
+contain the same character set as casechars and otherchars in the
+language.aff file (e.g., english.aff).")
+
+(defvar ispell-menu-map nil "\
+Key map for ispell menu")
+
+(defvar ispell-menu-xemacs nil "\
+Spelling menu for XEmacs.")
+
+(defconst ispell-menu-map-needed (and (not ispell-menu-map) (string-lessp "19" emacs-version) (not (string-match "XEmacs" emacs-version))))
+
+(if ispell-menu-map-needed (let ((dicts (reverse (cons (cons "default" nil) ispell-dictionary-alist))) name) (setq ispell-menu-map (make-sparse-keymap "Spell")) (while dicts (setq name (car (car dicts)) dicts (cdr dicts)) (if (stringp name) (define-key ispell-menu-map (vector (intern name)) (cons (concat "Select " (capitalize name)) (list 'lambda nil '(interactive) (list 'ispell-change-dictionary name))))))))
+
+(if ispell-menu-map-needed (progn (define-key ispell-menu-map [ispell-change-dictionary] '("Change Dictionary" . ispell-change-dictionary)) (define-key ispell-menu-map [ispell-kill-ispell] '("Kill Process" . ispell-kill-ispell)) (define-key ispell-menu-map [ispell-pdict-save] '("Save Dictionary" lambda nil (interactive) (ispell-pdict-save t t))) (define-key ispell-menu-map [ispell-complete-word] '("Complete Word" . ispell-complete-word)) (define-key ispell-menu-map [ispell-complete-word-interior-frag] '("Complete Word Frag" . ispell-complete-word-interior-frag))))
+
+(if ispell-menu-map-needed (progn (define-key ispell-menu-map [ispell-continue] '("Continue Check" . ispell-continue)) (define-key ispell-menu-map [ispell-word] '("Check Word" . ispell-word)) (define-key ispell-menu-map [ispell-region] '("Check Region" . ispell-region)) (define-key ispell-menu-map [ispell-buffer] '("Check Buffer" . ispell-buffer))))
+
+(if ispell-menu-map-needed (progn (define-key ispell-menu-map [ispell-message] '("Check Message" . ispell-message)) (define-key ispell-menu-map [ispell-help] '("Help" lambda nil (interactive) (describe-function 'ispell-help))) (put 'ispell-region 'menu-enable 'mark-active) (fset 'ispell-menu-map (symbol-value 'ispell-menu-map))))
+
+(defvar ispell-local-pdict ispell-personal-dictionary "\
+A buffer local variable containing the current personal dictionary.
+If non-nil, the value must be a string, which is a file name.
+
+If you specify a personal dictionary for the current buffer which is
+different from the current personal dictionary, the effect is similar
+to calling \\[ispell-change-dictionary].  This variable is automatically
+set when defined in the file with either `ispell-pdict-keyword' or the
+local variable syntax.")
+
+(define-key global-map [(meta ?\$)] 'ispell-word)
+
+(autoload 'ispell-word "ispell" "\
+Check spelling of word under or before the cursor.
+If the word is not found in dictionary, display possible corrections
+in a window allowing you to choose one.
+
+With a prefix argument (or if CONTINUE is non-nil),
+resume interrupted spell-checking of a buffer or region.
+
+If optional argument FOLLOWING is non-nil or if `ispell-following-word'
+is non-nil when called interactively, then the following word
+\(rather than preceding) is checked when the cursor is not over a word.
+When the optional argument QUIETLY is non-nil or `ispell-quietly' is non-nil
+when called interactively, non-corrective messages are suppressed.
+
+Word syntax described by `ispell-dictionary-alist' (which see).
+
+This will check or reload the dictionary.  Use \\[ispell-change-dictionary]
+or \\[ispell-region] to update the Ispell process." t nil)
+
+(autoload 'ispell-help "ispell" "\
+Display a list of the options available when a misspelling is encountered.
+
+Selections are:
+
+DIGIT: Replace the word with a digit offered in the *Choices* buffer.
+SPC:   Accept word this time.
+`i':   Accept word and insert into private dictionary.
+`a':   Accept word for this session.
+`A':   Accept word and place in `buffer-local dictionary'.
+`r':   Replace word with typed-in value.  Rechecked.
+`R':   Replace word with typed-in value. Query-replaced in buffer. Rechecked.
+`?':   Show these commands.
+`x':   Exit spelling buffer.  Move cursor to original point.
+`X':   Exit spelling buffer.  Leaves cursor at the current point, and permits
+        the aborted check to be completed later.
+`q':   Quit spelling session (Kills ispell process).
+`l':   Look up typed-in replacement in alternate dictionary.  Wildcards okay.
+`u':   Like `i', but the word is lower-cased first.
+`m':   Like `i', but allows one to include dictionary completion information.
+`C-l':  redraws screen
+`C-r':  recursive edit
+`C-z':  suspend emacs or iconify frame" nil nil)
+
+(autoload 'ispell-kill-ispell "ispell" "\
+Kill current Ispell process (so that you may start a fresh one).
+With NO-ERROR, just return non-nil if there was no Ispell running." t nil)
+
+(autoload 'ispell-change-dictionary "ispell" "\
+Change `ispell-dictionary' (q.v.) and kill old Ispell process.
+A new one will be started as soon as necessary.
+
+By just answering RET you can find out what the current dictionary is.
+
+With prefix argument, set the default directory." t nil)
+
+(autoload 'ispell-region "ispell" "\
+Interactively check a region for spelling errors." t nil)
+
+(autoload 'ispell-buffer "ispell" "\
+Check the current buffer for spelling errors interactively." t nil)
+
+(autoload 'ispell-continue "ispell" nil t nil)
+
+(autoload 'ispell-complete-word "ispell" "\
+Look up word before or under point in dictionary (see lookup-words command)
+and try to complete it.  If optional INTERIOR-FRAG is non-nil then the word
+may be a character sequence inside of a word.
+
+Standard ispell choices are then available." t nil)
+
+(autoload 'ispell-complete-word-interior-frag "ispell" "\
+Completes word matching character sequence inside a word." t nil)
+
+(autoload 'ispell-minor-mode "ispell" "\
+Toggle Ispell minor mode.
+With prefix arg, turn Ispell minor mode on iff arg is positive.
+ 
+In Ispell minor mode, pressing SPC or RET
+warns you if the previous word is incorrectly spelled." t nil)
+
+(autoload 'ispell-message "ispell" "\
+Check the spelling of a mail message or news post.
+Don't check spelling of message headers except the Subject field.
+Don't check included messages.
+
+To abort spell checking of a message region and send the message anyway,
+use the `x' or `q' command.  (Any subsequent regions will be checked.)
+The `X' command aborts the message send so that you can edit the buffer.
+
+To spell-check whenever a message is sent, include the appropriate lines
+in your .emacs file:
+   (add-hook 'message-send-hook 'ispell-message)
+   (add-hook 'mail-send-hook  'ispell-message)
+   (add-hook 'mh-before-send-letter-hook 'ispell-message)
+
+You can bind this to the key C-c i in GNUS or mail by adding to
+`news-reply-mode-hook' or `mail-mode-hook' the following lambda expression:
+   (function (lambda () (local-set-key \"\\C-ci\" 'ispell-message)))" t nil)
+
+;;;***
+
+;;;### (autoloads (jka-compr-install toggle-auto-compression jka-compr-load) "jka-compr" "packages/jka-compr.el")
+
+(autoload 'jka-compr-load "jka-compr" "\
+Documented as original." nil nil)
+
+(autoload 'toggle-auto-compression "jka-compr" "\
+Toggle automatic file compression and uncompression.
+With prefix argument ARG, turn auto compression on if positive, else off.
+Returns the new status of auto compression (non-nil means on).
+If the argument MESSAGE is non-nil, it means to print a message
+saying whether the mode is now on or off." t nil)
+
+(autoload 'jka-compr-install "jka-compr" "\
+Install jka-compr.
+This adds entries to `file-name-handler-alist' and `auto-mode-alist'
+and `inhibit-first-line-modes-suffixes'." nil nil)
+
+;;;***
+
+;;;### (autoloads (turn-on-lazy-lock lazy-lock-mode) "lazy-lock" "packages/lazy-lock.el")
+
+(autoload 'lazy-lock-mode "lazy-lock" "\
+Toggle Lazy Lock mode.
+With arg, turn Lazy Lock mode on if and only if arg is positive and the buffer
+is at least `lazy-lock-minimum-size' characters long.
+
+When Lazy Lock mode is enabled, fontification is demand-driven and stealthy:
+
+ - Fontification occurs in visible parts of buffers when necessary.
+   Occurs if there is no input after pausing for `lazy-lock-continuity-time'.
+
+ - Fontification occurs in invisible parts when Emacs has been idle.
+   Occurs if there is no input after pausing for `lazy-lock-stealth-time'.
+
+If `lazy-lock-hide-invisible' is non-nil, text is not displayed until it is
+fontified, otherwise it is displayed in `lazy-lock-invisible-foreground'.
+
+See also variables `lazy-lock-walk-windows' and `lazy-lock-ignore-commands' for
+window (scroll) fontification, and `lazy-lock-stealth-lines',
+`lazy-lock-stealth-nice' and `lazy-lock-stealth-verbose' for stealth
+fontification.
+
+Use \\[lazy-lock-submit-bug-report] to send bug reports or feedback." t nil)
+
+(autoload 'turn-on-lazy-lock "lazy-lock" "\
+Unconditionally turn on Lazy Lock mode." nil nil)
+
+(when (fboundp 'add-minor-mode) (defvar lazy-lock-mode nil) (add-minor-mode 'lazy-lock-mode nil))
+
+;;;***
+
+;;;### (autoloads (ledit-from-lisp-mode ledit-mode) "ledit" "packages/ledit.el")
+
+(defconst ledit-save-files t "\
+*Non-nil means Ledit should save files before transferring to Lisp.")
+
+(defconst ledit-go-to-lisp-string "%?lisp" "\
+*Shell commands to execute to resume Lisp job.")
+
+(defconst ledit-go-to-liszt-string "%?liszt" "\
+*Shell commands to execute to resume Lisp compiler job.")
+
+(autoload 'ledit-mode "ledit" "\
+\\<ledit-mode-map>Major mode for editing text and stuffing it to a Lisp job.
+Like Lisp mode, plus these special commands:
+  \\[ledit-save-defun]	-- record defun at or after point
+	   for later transmission to Lisp job.
+  \\[ledit-save-region] -- record region for later transmission to Lisp job.
+  \\[ledit-go-to-lisp] -- transfer to Lisp job and transmit saved text.
+  \\[ledit-go-to-liszt] -- transfer to Liszt (Lisp compiler) job
+	   and transmit saved text.
+\\{ledit-mode-map}
+To make Lisp mode automatically change to Ledit mode,
+do (setq lisp-mode-hook 'ledit-from-lisp-mode)" t nil)
+
+(autoload 'ledit-from-lisp-mode "ledit" nil nil nil)
+
+;;;***
+
+;;;### (autoloads (print-region lpr-region print-buffer lpr-buffer) "lpr" "packages/lpr.el")
+
+(defcustom lpr-switches nil "*List of strings to pass as extra options for the printer program.\nSee `lpr-command'." :type '(repeat (string :tag "Argument")) :group 'lpr)
+
+(defcustom lpr-command (if (memq system-type '(usg-unix-v dgux hpux irix)) "lp" "lpr") "*Name of program for printing a file." :type 'string :group 'lpr)
+
+(autoload 'lpr-buffer "lpr" "\
+Print buffer contents as with Unix command `lpr'.
+`lpr-switches' is a list of extra switches (strings) to pass to lpr." t nil)
+
+(autoload 'print-buffer "lpr" "\
+Print buffer contents as with Unix command `lpr -p'.
+`lpr-switches' is a list of extra switches (strings) to pass to lpr." t nil)
+
+(autoload 'lpr-region "lpr" "\
+Print region contents as with Unix command `lpr'.
+`lpr-switches' is a list of extra switches (strings) to pass to lpr." t nil)
+
+(autoload 'print-region "lpr" "\
+Print region contents as with Unix command `lpr -p'.
+`lpr-switches' is a list of extra switches (strings) to pass to lpr." t nil)
+
+;;;***
+
+;;;### (autoloads (make-command-summary) "makesum" "packages/makesum.el")
+
+(autoload 'make-command-summary "makesum" "\
+Make a summary of current key bindings in the buffer *Summary*.
+Previous contents of that buffer are killed first." t nil)
+
+;;;***
+
+;;;### (autoloads (manual-entry) "man" "packages/man.el")
+
+(autoload 'manual-entry "man" "\
+Display the Unix manual entry (or entries) for TOPIC." t nil)
+
+;;;***
+
+;;;### (autoloads (metamail-region metamail-buffer metamail-interpret-body metamail-interpret-header) "metamail" "packages/metamail.el")
+
+(autoload 'metamail-interpret-header "metamail" "\
+Interpret a header part of a MIME message in current buffer.
+Its body part is not interpreted at all." t nil)
+
+(autoload 'metamail-interpret-body "metamail" "\
+Interpret a body part of a MIME message in current buffer.
+Optional argument VIEWMODE specifies the value of the
+EMACS_VIEW_MODE environment variable (defaulted to 1).
+Optional argument NODISPLAY non-nil means buffer is not
+redisplayed as output is inserted.
+Its header part is not interpreted at all." t nil)
+
+(autoload 'metamail-buffer "metamail" "\
+Process current buffer through `metamail'.
+Optional argument VIEWMODE specifies the value of the
+EMACS_VIEW_MODE environment variable (defaulted to 1).
+Optional argument BUFFER specifies a buffer to be filled (nil
+means current).
+Optional argument NODISPLAY non-nil means buffer is not
+redisplayed as output is inserted." t nil)
+
+(autoload 'metamail-region "metamail" "\
+Process current region through 'metamail'.
+Optional argument VIEWMODE specifies the value of the
+EMACS_VIEW_MODE environment variable (defaulted to 1).
+Optional argument BUFFER specifies a buffer to be filled (nil
+means current).
+Optional argument NODISPLAY non-nil means buffer is not
+redisplayed as output is inserted." t nil)
+
+;;;***
+
+;;;### (autoloads (blink-paren paren-set-mode) "paren" "packages/paren.el")
+
+(defcustom paren-mode nil "*Sets the style of parenthesis highlighting.\nValid values are nil, `blink-paren', `paren', and `sexp'.\n  nil		no parenthesis highlighting.\n  blink-paren	causes the matching paren to blink.\n  paren		causes the matching paren to be highlighted but not to blink.\n  sexp		whole expression enclosed by the local paren at its mate.\n  nested	(not yet implemented) use variable shading to see the\n		nesting of an expression.  Also groks regular expressions\n		and shell quoting.\n\nThis variable is global by default, but you can make it buffer-local and\nhighlight parentheses differently in different major modes." :type '(radio (const nil) (const blink-paren) (const paren) (const sexp) (const nested)) :group 'paren-matching)
+
+(autoload 'paren-set-mode "paren" "\
+Cycles through possible values for `paren-mode', force off with negative arg.
+When called from lisp, a symbolic value for `paren-mode' can be passed directly.
+See also `paren-mode' and `paren-highlight'." t nil)
+
+(make-obsolete 'blink-paren 'paren-set-mode)
+
+(autoload 'blink-paren "paren" "\
+Obsolete.  Use `paren-set-mode' instead." t nil)
+
+;;;***
+
+;;;### (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.
+With a positive argument, turns it on.
+With a non-positive argument, turns it off.
+When active, typed text replaces the selection." t nil)
+
+;;;***
+
+;;;### (autoloads (ps-setup ps-nb-pages-region ps-nb-pages-buffer ps-line-lengths ps-despool ps-spool-region-with-faces ps-spool-region ps-spool-buffer-with-faces ps-spool-buffer ps-print-region-with-faces ps-print-region ps-print-buffer-with-faces ps-print-buffer) "ps-print" "packages/ps-print.el")
+
+(defcustom ps-paper-type 'letter "*Specifies the size of paper to format for.\nShould be one of the paper types defined in `ps-page-dimensions-database', for\nexample `letter', `legal' or `a4'." :type '(symbol :validate (lambda (wid) (if (assq (widget-value wid) ps-page-dimensions-database) nil (widget-put wid :error "Unknown paper size") wid))) :group 'ps-print)
+
+(defcustom ps-print-color-p (or (fboundp 'x-color-values) (fboundp 'color-instance-rgb-components)) "*If non-nil, print the buffer's text in color." :type 'boolean :group 'ps-print-color)
+
+(autoload 'ps-print-buffer "ps-print" "\
+Generate and print a PostScript image of the buffer.
+
+When called with a numeric prefix argument (C-u), prompts the user for
+the name of a file to save the PostScript image in, instead of sending
+it to the printer.
+
+More specifically, the FILENAME argument is treated as follows: if it
+is nil, send the image to the printer.  If FILENAME is a string, save
+the PostScript image in a file with that name.  If FILENAME is a
+number, prompt the user for the name of the file to save in." t nil)
+
+(autoload 'ps-print-buffer-with-faces "ps-print" "\
+Generate and print a PostScript image of the buffer.
+Like `ps-print-buffer', but includes font, color, and underline
+information in the generated image.  This command works only if you
+are using a window system, so it has a way to determine color values." t nil)
+
+(autoload 'ps-print-region "ps-print" "\
+Generate and print a PostScript image of the region.
+Like `ps-print-buffer', but prints just the current region." t nil)
+
+(autoload 'ps-print-region-with-faces "ps-print" "\
+Generate and print a PostScript image of the region.
+Like `ps-print-region', but includes font, color, and underline
+information in the generated image.  This command works only if you
+are using a window system, so it has a way to determine color values." t nil)
+
+(autoload 'ps-spool-buffer "ps-print" "\
+Generate and spool a PostScript image of the buffer.
+Like `ps-print-buffer' except that the PostScript image is saved in a
+local buffer to be sent to the printer later.
+
+Use the command `ps-despool' to send the spooled images to the printer." t nil)
+
+(autoload 'ps-spool-buffer-with-faces "ps-print" "\
+Generate and spool a PostScript image of the buffer.
+Like `ps-spool-buffer', but includes font, color, and underline
+information in the generated image.  This command works only if you
+are using a window system, so it has a way to determine color values.
+
+Use the command `ps-despool' to send the spooled images to the printer." t nil)
+
+(autoload 'ps-spool-region "ps-print" "\
+Generate a PostScript image of the region and spool locally.
+Like `ps-spool-buffer', but spools just the current region.
+
+Use the command `ps-despool' to send the spooled images to the printer." t nil)
+
+(autoload 'ps-spool-region-with-faces "ps-print" "\
+Generate a PostScript image of the region and spool locally.
+Like `ps-spool-region', but includes font, color, and underline
+information in the generated image.  This command works only if you
+are using a window system, so it has a way to determine color values.
+
+Use the command `ps-despool' to send the spooled images to the printer." t nil)
+
+(autoload 'ps-despool "ps-print" "\
+Send the spooled PostScript to the printer.
+
+When called with a numeric prefix argument (C-u), prompt the user for
+the name of a file to save the spooled PostScript in, instead of sending
+it to the printer.
+
+More specifically, the FILENAME argument is treated as follows: if it
+is nil, send the image to the printer.  If FILENAME is a string, save
+the PostScript image in a file with that name.  If FILENAME is a
+number, prompt the user for the name of the file to save in." t nil)
+
+(autoload 'ps-line-lengths "ps-print" "\
+*Display the correspondence between a line length and a font size,
+using the current ps-print setup.
+Try: pr -t file | awk '{printf \"%3d %s
+\", length($0), $0}' | sort -r | head" t nil)
+
+(autoload 'ps-nb-pages-buffer "ps-print" "\
+*Display an approximate correspondence between a font size and the number
+of pages the current buffer would require to print
+using the current ps-print setup." t nil)
+
+(autoload 'ps-nb-pages-region "ps-print" "\
+*Display an approximate correspondence between a font size and the number
+of pages the current region would require to print
+using the current ps-print setup." t nil)
+
+(autoload 'ps-setup "ps-print" "\
+*Return the current setup" nil nil)
+
+;;;***
+
+;;;### (autoloads (remote-compile) "rcompile" "packages/rcompile.el")
+
+(autoload 'remote-compile "rcompile" "\
+Compile the current buffer's directory on HOST.  Log in as USER.
+See \\[compile]." t nil)
+
+;;;***
+
+;;;### (autoloads (resume-suspend-hook) "resume" "packages/resume.el")
+
+(autoload 'resume-suspend-hook "resume" "\
+Clear out the file used for transmitting args when Emacs resumes." nil nil)
+
+;;;***
+
+;;;### (autoloads (install-shell-fonts) "shell-font" "packages/shell-font.el")
+
+(autoload 'install-shell-fonts "shell-font" "\
+Decorate the current interaction buffer with fonts.
+This uses the faces called `shell-prompt', `shell-input' and `shell-output';
+you can alter the graphical attributes of those with the normal
+face-manipulation functions." nil nil)
+
+;;;***
+
+;;;### (autoloads (spell-string spell-region spell-word spell-buffer) "spell" "packages/spell.el")
+
+(put 'spell-filter 'risky-local-variable t)
+
+(autoload 'spell-buffer "spell" "\
+Check spelling of every word in the buffer.
+For each incorrect word, you are asked for the correct spelling
+and then put into a query-replace to fix some or all occurrences.
+If you do not want to change a word, just give the same word
+as its \"correct\" spelling; then the query replace is skipped." t nil)
+
+(autoload 'spell-word "spell" "\
+Check spelling of word at or before point.
+If it is not correct, ask user for the correct spelling
+and `query-replace' the entire buffer to substitute it." t nil)
+
+(autoload 'spell-region "spell" "\
+Like `spell-buffer' but applies only to region.
+Used in a program, applies from START to END.
+DESCRIPTION is an optional string naming the unit being checked:
+for example, \"word\"." t nil)
+
+(autoload 'spell-string "spell" "\
+Check spelling of string supplied as argument." t nil)
+
+;;;***
+
+;;;### (autoloads (tar-mode) "tar-mode" "packages/tar-mode.el")
+
+(autoload 'tar-mode "tar-mode" "\
+Major mode for viewing a tar file as a dired-like listing of its contents.
+You can move around using the usual cursor motion commands. 
+Letters no longer insert themselves.
+Type 'e' to pull a file out of the tar file and into its own buffer.
+Type 'c' to copy an entry from the tar file into another file on disk.
+
+If you edit a sub-file of this archive (as with the 'e' command) and 
+save it with Control-X Control-S, the contents of that buffer will be 
+saved back into the tar-file buffer; in this way you can edit a file 
+inside of a tar archive without extracting it and re-archiving it.
+
+See also: variables tar-update-datestamp and tar-anal-blocksize.
+\\{tar-mode-map}" nil nil)
+
+;;;***
+
+;;;### (autoloads (terminal-emulator) "terminal" "packages/terminal.el")
+
+(autoload 'terminal-emulator "terminal" "\
+Under a display-terminal emulator in BUFFER, run PROGRAM on arguments ARGS.
+ARGS is a list of argument-strings.  Remaining arguments are WIDTH and HEIGHT.
+BUFFER's contents are made an image of the display generated by that program,
+and any input typed when BUFFER is the current Emacs buffer is sent to that
+program an keyboard input.
+
+Interactively, BUFFER defaults to \"*terminal*\" and PROGRAM and ARGS
+are parsed from an input-string using your usual shell.
+WIDTH and HEIGHT are determined from the size of the current window
+-- WIDTH will be one less than the window's width, HEIGHT will be its height.
+
+To switch buffers and leave the emulator, or to give commands
+to the emulator itself (as opposed to the program running under it),
+type Control-^.  The following character is an emulator command.
+Type Control-^ twice to send it to the subprogram.
+This escape character may be changed using the variable `terminal-escape-char'.
+
+`Meta' characters may not currently be sent through the terminal emulator.
+
+Here is a list of some of the variables which control the behaviour
+of the emulator -- see their documentation for more information:
+terminal-escape-char, terminal-scrolling, terminal-more-processing,
+terminal-redisplay-interval.
+
+This function calls the value of terminal-mode-hook if that exists
+and is non-nil after the terminal buffer has been set up and the
+subprocess started.
+
+Presently with `termcap' only; if somebody sends us code to make this
+work with `terminfo' we will try to use it." t nil)
+
+;;;***
+
+;;;### (autoloads (batch-texinfo-format texinfo-format-region texinfo-format-buffer) "texinfmt" "packages/texinfmt.el")
+
+(autoload 'texinfo-format-buffer "texinfmt" "\
+Process the current buffer as texinfo code, into an Info file.
+The Info file output is generated in a buffer visiting the Info file
+names specified in the @setfilename command.
+
+Non-nil argument (prefix, if interactive) means don't make tag table
+and don't split the file if large.  You can use Info-tagify and
+Info-split to do these manually." t nil)
+
+(autoload 'texinfo-format-region "texinfmt" "\
+Convert the current region of the Texinfo file to Info format.
+This lets you see what that part of the file will look like in Info.
+The command is bound to \\[texinfo-format-region].  The text that is
+converted to Info is stored in a temporary buffer." t nil)
+
+(autoload 'batch-texinfo-format "texinfmt" "\
+Runs  texinfo-format-buffer  on the files remaining on the command line.
+Must be used only with -batch, and kills emacs on completion.
+Each file will be processed even if an error occurred previously.
+For example, invoke
+  \"emacs -batch -funcall batch-texinfo-format $docs/ ~/*.texinfo\"." nil nil)
+
+;;;***
+
+;;;### (autoloads (texinfo-sequential-node-update texinfo-every-node-update texinfo-update-node) "texnfo-upd" "packages/texnfo-upd.el")
+
+(autoload 'texinfo-update-node "texnfo-upd" "\
+Without any prefix argument, update the node in which point is located.
+Non-nil argument (prefix, if interactive) means update the nodes in the
+marked region.
+
+The functions for creating or updating nodes and menus, and their
+keybindings, are:
+
+    texinfo-update-node (&optional region-p)    \\[texinfo-update-node]
+    texinfo-every-node-update ()                \\[texinfo-every-node-update]
+    texinfo-sequential-node-update (&optional region-p)
+
+    texinfo-make-menu (&optional region-p)      \\[texinfo-make-menu]
+    texinfo-all-menus-update ()                 \\[texinfo-all-menus-update]
+    texinfo-master-menu ()
+
+    texinfo-indent-menu-description (column &optional region-p)
+
+The `texinfo-column-for-description' variable specifies the column to
+which menu descriptions are indented. Its default value is 32." t nil)
+
+(autoload 'texinfo-every-node-update "texnfo-upd" "\
+Update every node in a Texinfo file." t nil)
+
+(autoload 'texinfo-sequential-node-update "texnfo-upd" "\
+Update one node (or many) in a Texinfo file with sequential pointers.
+
+This function causes the `Next' or `Previous' pointer to point to the
+immediately preceding or following node, even if it is at a higher or
+lower hierarchical level in the document.  Continually pressing `n' or
+`p' takes you straight through the file.
+
+Without any prefix argument, update the node in which point is located.
+Non-nil argument (prefix, if interactive) means update the nodes in the
+marked region.
+
+This command makes it awkward to navigate among sections and
+subsections; it should be used only for those documents that are meant
+to be read like a novel rather than a reference, and for which the
+Info `g*' command is inadequate." t nil)
+
+;;;***
+
+;;;### (autoloads (time-stamp-toggle-active time-stamp) "time-stamp" "packages/time-stamp.el")
+
+(autoload 'time-stamp "time-stamp" "\
+Update the time stamp string in the buffer.
+If you put a time stamp template anywhere in the first 8 lines of a file,
+it can be updated every time you save the file.  See the top of
+`time-stamp.el' for a sample.  The template looks like one of the following:
+    Time-stamp: <>
+    Time-stamp: \" \"
+The time stamp is written between the brackets or quotes, resulting in
+    Time-stamp: <95/01/18 10:20:51 gildea>
+Only does its thing if the variable  time-stamp-active  is non-nil.
+Typically used on  write-file-hooks  for automatic time-stamping.
+The format of the time stamp is determined by the variable  time-stamp-format.
+The variables time-stamp-line-limit, time-stamp-start, and time-stamp-end
+control finding the template." t nil)
+
+(autoload 'time-stamp-toggle-active "time-stamp" "\
+Toggle time-stamp-active, setting whether \\[time-stamp] updates a buffer.
+With arg, turn time stamping on if and only if arg is positive." t nil)
+
+;;;***
+
+;;;### (autoloads (display-time) "time" "packages/time.el")
+
+(defcustom display-time-day-and-date nil "*Non-nil means \\[display-time] should display day,date and time.\nThis affects the spec 'date in the variable display-time-form-list." :group 'display-time :type 'boolean)
+
+(autoload 'display-time "time" "\
+Display current time, load level, and mail flag in mode line of each buffer.
+Updates automatically every minute.
+If `display-time-day-and-date' is non-nil, the current day and date
+are displayed as well.
+After each update, `display-time-hook' is run with `run-hooks'.
+If `display-time-echo-area' is non-nil, the time is displayed in the
+echo area instead of in the mode-line." t nil)
+
+;;;***
+
+;;;### (autoloads (ununderline-and-unoverstrike-region overstrike-region unoverstrike-region ununderline-region underline-region) "underline" "packages/underline.el")
+
+(autoload 'underline-region "underline" "\
+Underline all nonblank characters in the region.
+Works by overstriking underscores.
+Called from program, takes two arguments START and END
+which specify the range to operate on." t nil)
+
+(autoload 'ununderline-region "underline" "\
+Remove all underlining (overstruck underscores) in the region.
+Called from program, takes two arguments START and END
+which specify the range to operate on." t nil)
+
+(autoload 'unoverstrike-region "underline" "\
+Remove all overstriking (character-backspace-character) in the region.
+Called from program, takes two arguments START and END which specify the
+range to operate on." t nil)
+
+(autoload 'overstrike-region "underline" "\
+Overstrike (character-backspace-character) all nonblank characters in
+the region. Called from program, takes two arguments START and END which
+specify the range to operate on." t nil)
+
+(autoload 'ununderline-and-unoverstrike-region "underline" "\
+Remove underlining and overstriking in the region.  Called from a program,
+takes two arguments START and END which specify the range to operate on." t nil)
+
+;;;***
+
+;;;### (autoloads (ask-to-update-copyright update-copyright) "upd-copyr" "packages/upd-copyr.el")
+
+(defcustom copyright-do-not-disturb "Free Software Foundation, Inc." "*If non-nil, the existing copyright holder is checked against this regexp.\nIf it does not match, then a new copyright line is added with the copyright\nholder set to the value of `copyright-whoami'." :type '(choice (const nil) string) :group 'copyright)
+
+(defcustom copyright-whoami nil "*A string containing the name of the owner of new copyright notices." :type '(choice (const nil) string) :group 'copyright)
+
+(defcustom copyright-notice-file nil "*If non-nil, replace copying notices with this file." :type '(choice (const nil) file) :group 'copyright)
+
+(autoload 'update-copyright "upd-copyr" "\
+Update the copyright notice at the beginning of the buffer
+to indicate the current year.  If optional arg REPLACE is given
+\(interactively, with prefix arg) replace the years in the notice
+rather than adding the current year after them.
+If `copyright-notice-file' is set, the copying permissions following the
+copyright are replaced as well.
+
+If optional third argument ASK is non-nil, the user is prompted for whether
+or not to update the copyright.  If optional fourth argument ASK-YEAR is
+non-nil, the user is prompted for whether or not to replace the year rather
+than adding to it." t nil)
+
+(autoload 'ask-to-update-copyright "upd-copyr" "\
+If the current buffer contains a copyright notice that is out of date,
+ask the user if it should be updated with `update-copyright' (which see).
+Put this on write-file-hooks." nil nil)
+
+;;;***
+
+;;;### (autoloads (vc-update-change-log vc-rename-file vc-cancel-version vc-revert-buffer vc-print-log vc-retrieve-snapshot vc-create-snapshot vc-directory vc-insert-headers vc-version-other-window vc-diff vc-checkout vc-register vc-next-action vc-find-binary) "vc" "packages/vc.el")
+
+(defvar vc-before-checkin-hook nil "\
+*Normal hook (list of functions) run before a file gets checked in.  
+See `run-hooks'.")
+
+(defvar vc-checkin-hook nil "\
+*Normal hook (List of functions) run after a checkin is done.
+See `run-hooks'.")
+
+(autoload 'vc-find-binary "vc" "\
+Look for a command anywhere on the subprocess-command search path." nil nil)
+
+(autoload 'vc-next-action "vc" "\
+Do the next logical checkin or checkout operation on the current file.
+   If you call this from within a VC dired buffer with no files marked,
+it will operate on the file in the current line.
+   If you call this from within a VC dired buffer, and one or more
+files are marked, it will accept a log message and then operate on
+each one.  The log message will be used as a comment for any register
+or checkin operations, but ignored when doing checkouts.  Attempted
+lock steals will raise an error.
+   A prefix argument lets you specify the version number to use.
+
+For RCS and SCCS files:
+   If the file is not already registered, this registers it for version
+control and then retrieves a writable, locked copy for editing.
+   If the file is registered and not locked by anyone, this checks out
+a writable and locked file ready for editing.
+   If the file is checked out and locked by the calling user, this
+first checks to see if the file has changed since checkout.  If not,
+it performs a revert.
+   If the file has been changed, this pops up a buffer for entry
+of a log message; when the message has been entered, it checks in the
+resulting changes along with the log message as change commentary.  If
+the variable `vc-keep-workfiles' is non-nil (which is its default), a
+read-only copy of the changed file is left in place afterwards.
+   If the file is registered and locked by someone else, you are given
+the option to steal the lock.
+
+For CVS files:
+   If the file is not already registered, this registers it for version
+control.  This does a \"cvs add\", but no \"cvs commit\".
+   If the file is added but not committed, it is committed.
+   If your working file is changed, but the repository file is
+unchanged, this pops up a buffer for entry of a log message; when the
+message has been entered, it checks in the resulting changes along
+with the logmessage as change commentary.  A writable file is retained.
+   If the repository file is changed, you are asked if you want to
+merge in the changes into your working copy." t nil)
+
+(autoload 'vc-register "vc" "\
+Register the current file into your version-control system." t nil)
+
+(autoload 'vc-checkout "vc" "\
+Retrieve a copy of the latest version of the given file." nil nil)
+
+(autoload 'vc-diff "vc" "\
+Display diffs between file versions.
+Normally this compares the current file and buffer with the most recent 
+checked in version of that file.  This uses no arguments.
+With a prefix argument, it reads the file name to use
+and two version designators specifying which versions to compare." t nil)
+
+(autoload 'vc-version-other-window "vc" "\
+Visit version REV of the current buffer in another window.
+If the current buffer is named `F', the version is named `F.~REV~'.
+If `F.~REV~' already exists, it is used instead of being re-created." t nil)
+
+(autoload 'vc-insert-headers "vc" "\
+Insert headers in a file for use with your version-control system.
+Headers desired are inserted at the start of the buffer, and are pulled from
+the variable `vc-header-alist'." t nil)
+
+(autoload 'vc-directory "vc" "\
+Show version-control status of the current directory and subdirectories.
+Normally it creates a Dired buffer that lists only the locked files
+in all these directories.  With a prefix argument, it lists all files." t nil)
+
+(autoload 'vc-create-snapshot "vc" "\
+Make a snapshot called NAME.
+The snapshot is made from all registered files at or below the current
+directory.  For each file, the version level of its latest
+version becomes part of the named configuration." t nil)
+
+(autoload 'vc-retrieve-snapshot "vc" "\
+Retrieve the snapshot called NAME.
+This function fails if any files are locked at or below the current directory
+Otherwise, all registered files are checked out (unlocked) at their version
+levels in the snapshot." t nil)
+
+(autoload 'vc-print-log "vc" "\
+List the change log of the current buffer in a window." t nil)
+
+(autoload 'vc-revert-buffer "vc" "\
+Revert the current buffer's file back to the latest checked-in version.
+This asks for confirmation if the buffer contents are not identical
+to that version.
+If the back-end is CVS, this will give you the most recent revision of
+the file on the branch you are editing." t nil)
+
+(autoload 'vc-cancel-version "vc" "\
+Get rid of most recently checked in version of this file.
+A prefix argument means do not revert the buffer afterwards." t nil)
+
+(autoload 'vc-rename-file "vc" "\
+Rename file OLD to NEW, and rename its master file likewise." t nil)
+
+(autoload 'vc-update-change-log "vc" "\
+Find change log file and add entries from recent RCS/CVS logs.
+Normally, find log entries for all registered files in the default
+directory using `rcs2log', which finds CVS logs preferentially.
+The mark is left at the end of the text prepended to the change log.
+
+With prefix arg of C-u, only find log entries for the current buffer's file.
+
+With any numeric prefix arg, find log entries for all currently visited
+files that are under version control.  This puts all the entries in the
+log for the default directory, which may not be appropriate.
+
+From a program, any arguments are assumed to be filenames and are
+passed to the `rcs2log' script after massaging to be relative to the
+default directory." t nil)
+
+;;;***
+
+;;;### (autoloads (webjump) "webjump" "packages/webjump.el")
+
+(autoload 'webjump "webjump" "\
+Jumps to a Web site from a programmable hotlist.
+
+See the documentation for the `webjump-sites' variable for how to customize the
+hotlist.
+
+Please submit bug reports and other feedback to the author, Neil W. Van Dyke
+<nwv@acm.org>.
+
+The latest version can be gotten from `http://www.cs.brown.edu/people/nwv/'.
+That Web site also contains `webjump-plus.el', a larger and more frequently
+updated sample WebJump hotlist." t nil)
+
+;;;***
+
+;;;### (autoloads (webster-www) "webster-www" "packages/webster-www.el")
+
+(autoload 'webster-www "webster-www" "\
+Look up a word in the Webster's dictionary at http://www.m-w.com using WWW." t nil)
+
+;;;***
+
+;;;### (autoloads (run-scheme) "xscheme" "packages/xscheme.el")
+
+(defvar scheme-program-name "scheme" "\
+*Program invoked by the `run-scheme' command.")
+
+(defvar scheme-band-name nil "\
+*Band loaded by the `run-scheme' command.")
+
+(defvar scheme-program-arguments nil "\
+*Arguments passed to the Scheme program by the `run-scheme' command.")
+
+(autoload 'run-scheme "xscheme" "\
+Run an inferior Scheme process.
+Output goes to the buffer `*scheme*'.
+With argument, asks for a command line." t nil)
+
+;;;***
+
+(provide 'packages-autoloads)
+))
diff -r 4de2936b4e77 -r 0132846995bd lisp/packages/custom-load.el
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lisp/packages/custom-load.el	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,117 @@
+(put 'extensions 'custom-loads '("page-ext" "time-stamp"))
+(put 'change-log 'custom-loads '("add-log"))
+(put 'filladapt 'custom-loads '("filladapt"))
+(put 'copyright 'custom-loads '("upd-copyr"))
+(put 'eldoc 'custom-loads '())
+(put 'recent-files-menu 'custom-loads '("recent-files"))
+(put 'execute 'custom-loads '())
+(put 'mouse 'custom-loads '("avoid"))
+(put 'mail-abbrevs 'custom-loads '())
+(put 'tex 'custom-loads '("texnfo-tex"))
+(put 'etags 'custom-loads '("etags"))
+(put 'limits 'custom-loads '())
+(put 'igrep 'custom-loads '("igrep"))
+(put 'minibuffer 'custom-loads '())
+(put 'environment 'custom-loads '("gnuserv"))
+(put 'sound 'custom-loads '())
+(put 'holidays 'custom-loads '())
+(put 'texinfo 'custom-loads '("texnfo-tex"))
+(put 'terminals 'custom-loads '("gnuserv"))
+(put 'auto-save 'custom-loads '("auto-save"))
+(put 'ispell 'custom-loads '("ispell"))
+(put 'mail 'custom-loads '("feedmail" "metamail" "supercite"))
+(put 'fortran-indent 'custom-loads '())
+(put 'ps-print-face 'custom-loads '("ps-print"))
+(put 'crypt 'custom-loads '("crypt"))
+(put 'object 'custom-loads '("gopher"))
+(put 'man 'custom-loads '("man"))
+(put 'lpr 'custom-loads '("lpr"))
+(put 'message-headers 'custom-loads '())
+(put 'ps-print-header 'custom-loads '("ps-print"))
+(put 'docs 'custom-loads '("hyper-apropos" "makeinfo"))
+(put 'completion 'custom-loads '("completion"))
+(put 'tools 'custom-loads '("add-log" "diff" "etags" "func-menu" "generic-sc" "hyper-apropos" "rcompile"))
+(put 'recent-files 'custom-loads '("recent-files"))
+(put 'editing-basics 'custom-loads '())
+(put 'display-time-balloon 'custom-loads '("time"))
+(put 'internal 'custom-loads '())
+(put 'calendar 'custom-loads '())
+(put 'dabbrev 'custom-loads '("dabbrev"))
+(put 'help-appearance 'custom-loads '())
+(put 'display-time 'custom-loads '("time"))
+(put 'hypermedia 'custom-loads '("gopher" "metamail"))
+(put 'save-place 'custom-loads '("saveplace"))
+(put 'lisp 'custom-loads '("hyper-apropos"))
+(put 'jka-compr 'custom-loads '("jka-compr"))
+(put 'diff 'custom-loads '("diff"))
+(put 'supercite-cite 'custom-loads '("supercite"))
+(put 'paren-matching 'custom-loads '("paren"))
+(put 'time-stamp 'custom-loads '("time-stamp"))
+(put 'avoid 'custom-loads '("avoid"))
+(put 'help 'custom-loads '("hyper-apropos" "info" "man"))
+(put 'supercite 'custom-loads '("supercite"))
+(put 'generic-sc 'custom-loads '("generic-sc"))
+(put 'local 'custom-loads '("gopher"))
+(put 'keyboard 'custom-loads '())
+(put 'minubuffer 'custom-loads '())
+(put 'hyper-apropos-faces 'custom-loads '("hyper-apropos"))
+(put 'message-sending 'custom-loads '())
+(put 'data 'custom-loads '("auto-save" "jka-compr" "recent-files" "saveplace" "time-stamp"))
+(put 'ps-print 'custom-loads '("ps-print"))
+(put 'ps-print-font 'custom-loads '("ps-print"))
+(put 'backup 'custom-loads '())
+(put 'frames 'custom-loads '("balloon-help" "desktop"))
+(put 'customize 'custom-loads '())
+(put 'supercite-attr 'custom-loads '("supercite"))
+(put 'desktop 'custom-loads '("desktop"))
+(put 'abbrev 'custom-loads '("dabbrev"))
+(put 'remote-compile 'custom-loads '("rcompile"))
+(put 'programming 'custom-loads '("compile"))
+(put 'metamail 'custom-loads '("metamail"))
+(put 'toolbar 'custom-loads '())
+(put 'compilation 'custom-loads '("compile"))
+(put 'dired 'custom-loads '())
+(put 'makeinfo 'custom-loads '("makeinfo"))
+(put 'fume 'custom-loads '("func-menu"))
+(put 'killing 'custom-loads '())
+(put 'paren-blinking 'custom-loads '())
+(put 'find-file 'custom-loads '())
+(put 'fast-lock 'custom-loads '("fast-lock"))
+(put 'gnuserv 'custom-loads '("gnuserv"))
+(put 'ps-print-horizontal 'custom-loads '("ps-print"))
+(put 'maint 'custom-loads '("add-log" "upd-copyr"))
+(put 'fill-comments 'custom-loads '())
+(put 'message-mail 'custom-loads '())
+(put 'windows 'custom-loads '())
+(put 'message-various 'custom-loads '())
+(put 'resize-minibuffer 'custom-loads '())
+(put 'fill 'custom-loads '("filladapt"))
+(put 'balloon-help 'custom-loads '("balloon-help"))
+(put 'debug 'custom-loads '())
+(put 'supercite-hooks 'custom-loads '("supercite"))
+(put 'display 'custom-loads '())
+(put 'texinfo-tex 'custom-loads '("texnfo-tex"))
+(put 'faces 'custom-loads '("fast-lock" "ps-print"))
+(put 'pages 'custom-loads '("page-ext"))
+(put 'diary 'custom-loads '())
+(put 'supercite-frames 'custom-loads '("supercite"))
+(put 'browse-url 'custom-loads '())
+(put 'feedmail 'custom-loads '("feedmail"))
+(put 'processes 'custom-loads '("gnuserv" "ispell" "metamail" "rcompile"))
+(put 'news 'custom-loads '("supercite"))
+(put 'message-insertion 'custom-loads '())
+(put 'hyper-apropos 'custom-loads '("hyper-apropos"))
+(put 'wp 'custom-loads '("lpr" "ps-print"))
+(put 'vc 'custom-loads '())
+(put 'ps-print-vertical 'custom-loads '("ps-print"))
+(put 'alloc 'custom-loads '())
+(put 'isearch 'custom-loads '())
+(put 'gopher 'custom-loads '("gopher"))
+(put 'modeline 'custom-loads '())
+(put 'processes-basics 'custom-loads '())
+(put 'editing 'custom-loads '())
+(put 'matching 'custom-loads '("completion" "hyper-apropos"))
+(put 'ps-print-color 'custom-loads '("ps-print"))
+(put 'info 'custom-loads '("info"))
+(put 'undo 'custom-loads '())
+(put 'x 'custom-loads '())
diff -r 4de2936b4e77 -r 0132846995bd lisp/packages/font-lock.el
--- a/lisp/packages/font-lock.el	Mon Aug 13 09:42:28 2007 +0200
+++ b/lisp/packages/font-lock.el	Mon Aug 13 09:43:35 2007 +0200
@@ -1611,22 +1611,29 @@
    (list
     ;;
     ;; Control structures.  ELisp and CLisp combined.
-;      (make-regexp
-;       '("cond" "if" "while" "let\\*?" "prog[nv12*]?" "catch" "throw"
-;	 "save-restriction" "save-excursion" "save-window-excursion"
-;	 "save-selected-window" "save-match-data" "unwind-protect"
-;	 "condition-case" "track-mouse"
-;	 "eval-after-load" "eval-and-compile" "eval-when-compile"
-;	 "when" "unless" "do" "flet" "labels" "return" "return-from"))
+    ;;
+    ;;(make-regexp
+    ;;  '("cond" "if" "while" "let\\*?" "prog[nv12*]?" "catch" "throw"
+    ;;    "save-restriction" "save-excursion" "save-window-excursion"
+    ;;    "save-current-buffer" "with-current-buffer"
+    ;;    "with-temp-file" "with-output-to-.+"
+    ;;    "save-selected-window" "save-match-data" "unwind-protect"
+    ;;    "condition-case" "track-mouse" "autoload"
+    ;;    "eval-after-load" "eval-and-compile" "eval-when-compile"
+    ;;    "when" "unless" "do" "flet" "labels" "lambda"
+    ;;    "return" "return-from"))
+    ;;
     (cons
      (concat
       "(\\("
-      "\\(c\\(atch\\|ond\\(\\|ition-case\\)\\)\\|do\\|"
-      "eval-\\(a\\(fter-load\\|nd-compile\\)\\|when-compile\\)\\|flet\\|"
-      "if\\|l\\(abels\\|et\\*?\\)\\|prog[nv12*]?\\|return\\(\\|-from\\)\\|"
-      "save-\\(excursion\\|match-data\\|restriction\\|selected-window\\|"
-      "window-excursion\\)\\|t\\(hrow\\|rack-mouse\\)\\|"
-      "un\\(less\\|wind-protect\\)\\|wh\\(en\\|ile\\)\\)"
+      "autoload\\|c\\(atch\\|ond\\(\\|ition-case\\)\\)\\|do\\|"
+      "eval-\\(a\\(fter-load\\|nd-compile\\)\\|when-compile\\)\\|"
+      "flet\\|if\\|l\\(a\\(bels\\|mbda\\)\\|et\\*?\\)\\|prog[nv12*]?\\|"
+      "return\\(\\|-from\\)\\|save-\\(current-buffer\\|excursion\\|"
+      "match-data\\|restriction\\|selected-window\\|window-excursion\\)\\|"
+      "t\\(hrow\\|rack-mouse\\)\\|un\\(less\\|wind-protect\\)\\|"
+      "w\\(h\\(en\\|ile\\)\\|ith-\\(current-buffer\\|output-to-.+\\|"
+      "temp-file\\)\\)"
       "\\)\\>") 1)
     ;;
     ;; Words inside \\[] tend to be for `substitute-command-keys'.
diff -r 4de2936b4e77 -r 0132846995bd lisp/packages/hyper-apropos.el
--- a/lisp/packages/hyper-apropos.el	Mon Aug 13 09:42:28 2007 +0200
+++ b/lisp/packages/hyper-apropos.el	Mon Aug 13 09:43:35 2007 +0200
@@ -57,94 +57,117 @@
 ;; Massive changes by Christoph Wedler <wedler@fmi.uni-passau.de>
 ;; Some changes for XEmacs 20.3 by hniksic
 
+;; ### The maintainer is supposed to be stig, but I haven't seen him
+;; around for ages.  The real maintainer for the moment is Hrvoje
+;; Niksic <hniksic@srce.hr>.
+
 ;;; Code:
 
 (require 'pp)
 
 (defgroup hyper-apropos nil
   "Hypertext emacs lisp documentation interface."
-  :prefix "hypropos-"
   :group 'docs
   :group 'lisp
   :group 'tools
   :group 'help
   :group 'matching)
 
-;;;###autoload
-(defcustom hypropos-show-brief-docs t
-  "*If non-nil, `hyper-apropos' will display some documentation in the
-\"*Hyper Apropos*\" buffer.  Setting this to nil will speed up searches."
+(defcustom hyper-apropos-show-brief-docs t
+  "*If non-nil, display some documentation in the \"*Hyper Apropos*\" buffer.
+Setting this to nil will speed up searches."
   :type 'boolean
   :group 'hyper-apropos)
-
+(define-obsolete-variable-alias
+  'hypropos-show-brief-docs 'hyper-apropos-show-brief-docs)
 ;; I changed this to true because I think it's more useful this way. --ben
 
-(defcustom hypropos-programming-apropos t
-  "*If non-nil, then `hyper-apropos' takes a bit longer and generates more
-output.  If nil, then only functions that are interactive and variables that
-are user variables are found by `hyper-apropos'."
+(defcustom hyper-apropos-programming-apropos t
+  "*If non-nil, list all the functions and variables.
+This will cause more output to be generated, and take a longer time.
+
+Otherwise, only the interactive functions and user variables will be listed."
   :type 'boolean
   :group 'hyper-apropos)
+(define-obsolete-variable-alias
+  'hypropos-programming-apropos 'hyper-apropos-programming-apropos)
 
-(defcustom hypropos-shrink-window nil
+(defcustom hyper-apropos-shrink-window nil
   "*If non-nil, shrink *Hyper Help* buffer if possible."
   :type 'boolean
   :group 'hyper-apropos)
+(define-obsolete-variable-alias
+  'hypropos-shrink-window 'hyper-apropos-shrink-window)
 
-(defcustom hypropos-prettyprint-long-values t
+(defcustom hyper-apropos-prettyprint-long-values t
   "*If non-nil, then try to beautify the printing of very long values."
   :type 'boolean
   :group 'hyper-apropos)
-
+(define-obsolete-variable-alias
+  'hypropos-prettyprint-long-values 'hyper-apropos-prettyprint-long-values)
 
-(defgroup hypropos-faces nil
+(defgroup hyper-apropos-faces nil
   "Faces defined by hyper-apropos."
-  :prefix "hypropos-"
+  :prefix "hyper-apropos-"
   :group 'hyper-apropos)
+(define-obsolete-variable-alias
+  'hypropos-faces 'hyper-apropos-faces)
 
-
-(defface hypropos-documentation '((((class color) (background light))
-				   (:foreground "darkred"))
-				  (((class color) (background dark))
-				   (:foreground "gray90")))
+(defface hyper-apropos-documentation
+  '((((class color) (background light))
+     (:foreground "darkred"))
+    (((class color) (background dark))
+     (:foreground "gray90")))
   "Hyper-apropos documentation."
-  :group 'hypropos-faces)
+  :group 'hyper-apropos-faces)
+(define-obsolete-variable-alias
+  'hypropos-documentation 'hyper-apropos-documentation)
 
-(defface hypropos-hyperlink '((((class color) (background light))
-			       (:foreground "blue4"))
-			      (((class color) (background dark))
-			       (:foreground "lightseagreen"))
-			      (t
-			       (:bold t)))
+(defface hyper-apropos-hyperlink
+  '((((class color) (background light))
+     (:foreground "blue4"))
+    (((class color) (background dark))
+     (:foreground "lightseagreen"))
+    (t
+     (:bold t)))
   "Hyper-apropos hyperlinks."
-  :group 'hypropos-faces)
+  :group 'hyper-apropos-faces)
+(define-obsolete-variable-alias
+  'hypropos-hyperlink 'hyper-apropos-hyperlink)
 
-(defface hypropos-major-heading '((t (:bold t)))
+(defface hyper-apropos-major-heading '((t (:bold t)))
   "Hyper-apropos major heading."
-  :group 'hypropos-faces)
+  :group 'hyper-apropos-faces)
+(define-obsolete-variable-alias
+  'hypropos-major-heading 'hyper-apropos-major-heading)
 
-(defface hypropos-section-heading '((t (:bold t :italic t)))
+(defface hyper-apropos-section-heading '((t (:bold t :italic t)))
   "Hyper-apropos section heading."
-  :group 'hypropos-faces)
+  :group 'hyper-apropos-faces)
+(define-obsolete-variable-alias
+  'hypropos-section-heading 'hyper-apropos-section-heading)
 
-(defface hypropos-heading '((t (:bold t)))
+(defface hyper-apropos-heading '((t (:bold t)))
   "Hyper-apropos heading."
-  :group 'hypropos-faces)
+  :group 'hyper-apropos-faces)
+(define-obsolete-variable-alias
+  'hypropos-heading 'hyper-apropos-heading)
 
-(defface hypropos-warning '((t (:bold t :foreground "red")))
+(defface hyper-apropos-warning '((t (:bold t :foreground "red")))
   "Hyper-apropos warning."
-  :group 'hypropos-faces)
-
+  :group 'hyper-apropos-faces)
+(define-obsolete-variable-alias
+  'hypropos-warning 'hyper-apropos-warning)
 
 ;;; Internal variables below this point
 
-(defvar hypropos-ref-buffer)
-(defvar hypropos-prev-wconfig)
+(defvar hyper-apropos-ref-buffer)
+(defvar hyper-apropos-prev-wconfig)
 
-(defvar hypropos-help-map
+(defvar hyper-apropos-help-map
   (let ((map (make-sparse-keymap)))
     (suppress-keymap map)
-    (set-keymap-name map 'hypropos-help-map)
+    (set-keymap-name map 'hyper-apropos-help-map)
     ;; movement
     (define-key map " "     'scroll-up)
     (define-key map "b"     'scroll-down)
@@ -153,46 +176,50 @@
     (define-key map "/"     'isearch-forward)
     (define-key map "?"     'isearch-backward)
     ;; follow links
-    (define-key map [return] 'hypropos-get-doc)
-    (define-key map "s"     'hypropos-set-variable)
-    (define-key map "t"     'hypropos-find-tag)
-    (define-key map "l"     'hypropos-last-help)
-    (define-key map "c"     'hypropos-customize-variable)
-    (define-key map [button2] 'hypropos-mouse-get-doc)
-    (define-key map [button3] 'hypropos-popup-menu)
+    (define-key map [return] 'hyper-apropos-get-doc)
+    (define-key map "s"     'hyper-apropos-set-variable)
+    (define-key map "t"     'hyper-apropos-find-tag)
+    (define-key map "l"     'hyper-apropos-last-help)
+    (define-key map "c"     'hyper-apropos-customize-variable)
+    (define-key map [button2] 'hyper-apropos-mouse-get-doc)
+    (define-key map [button3] 'hyper-apropos-popup-menu)
     ;; for the totally hardcore...
-    (define-key map "D"     'hypropos-disassemble)
+    (define-key map "D"     'hyper-apropos-disassemble)
     ;; administrativa
     (define-key map "a"     'hyper-apropos)
     (define-key map "n"     'hyper-apropos)
-    (define-key map "q"     'hypropos-quit)
+    (define-key map "q"     'hyper-apropos-quit)
     map)
-  "Keybindings for both the *Hyper Help* buffer and the *Hyper Apropos* buffer")
+  "Keybindings for the *Hyper Help* buffer and the *Hyper Apropos* buffer")
+(define-obsolete-variable-alias
+  'hypropos-help-map 'hyper-apropos-help-map)
 
-(defvar hypropos-map
+(defvar hyper-apropos-map
   (let ((map (make-sparse-keymap)))
-    (set-keymap-name map 'hypropos-map)
-    (set-keymap-parents map (list hypropos-help-map))
+    (set-keymap-name map 'hyper-apropos-map)
+    (set-keymap-parents map (list hyper-apropos-help-map))
     ;; slightly different scrolling...
-    (define-key map " "     'hypropos-scroll-up)
-    (define-key map "b"     'hypropos-scroll-down)
-    (define-key map [delete] 'hypropos-scroll-down)
-    (define-key map [backspace] 'hypropos-scroll-down)
+    (define-key map " "     'hyper-apropos-scroll-up)
+    (define-key map "b"     'hyper-apropos-scroll-down)
+    (define-key map [delete] 'hyper-apropos-scroll-down)
+    (define-key map [backspace] 'hyper-apropos-scroll-down)
     ;; act on the current line...
-    (define-key map "w"     'hypropos-where-is)
-    (define-key map "i"     'hypropos-invoke-fn)
-    (define-key map "s"     'hypropos-set-variable)
+    (define-key map "w"     'hyper-apropos-where-is)
+    (define-key map "i"     'hyper-apropos-invoke-fn)
+    (define-key map "s"     'hyper-apropos-set-variable)
     ;; more administrativa...
-    (define-key map "P"     'hypropos-toggle-programming-flag)
-    (define-key map "k"     'hypropos-add-keyword)
-    (define-key map "e"     'hypropos-eliminate-keyword)
+    (define-key map "P"     'hyper-apropos-toggle-programming-flag)
+    (define-key map "k"     'hyper-apropos-add-keyword)
+    (define-key map "e"     'hyper-apropos-eliminate-keyword)
     map)
   "Keybindings for the *Hyper Apropos* buffer.
-This map inherits from `hypropos-help-map.'")
+This map inherits from `hyper-apropos-help-map.'")
+(define-obsolete-variable-alias
+  'hypropos-map 'hyper-apropos-map)
 
-;;(defvar hypropos-mousable-keymap
+;;(defvar hyper-apropos-mousable-keymap
 ;;  (let ((map (make-sparse-keymap)))
-;;    (define-key map [button2] 'hypropos-mouse-get-doc)
+;;    (define-key map [button2] 'hyper-apropos-mouse-get-doc)
 ;;    map))
 
 (defvar hyper-apropos-mode-hook nil
@@ -201,74 +228,77 @@
 
 ;; ---------------------------------------------------------------------- ;;
 
-(defconst hypropos-junk-regexp "^Apropos\\|^Functions\\|^Variables\\|^$")
+(defconst hyper-apropos-junk-regexp
+  "^Apropos\\|^Functions\\|^Variables\\|^$")
 
-(defvar hypropos-currently-showing nil)	; symbol documented in help buffer now
-(defvar hypropos-help-history nil)	; chain of symbols followed as links in
+(defvar hyper-apropos-currently-showing nil)	; symbol documented in
+						; help buffer now
+(defvar hyper-apropos-help-history nil)	; chain of symbols followed as links in
 					; help buffer
-(defvar hypropos-face-history nil)
-;;;(defvar hypropos-variable-history nil)
-;;;(defvar hypropos-function-history nil)
-(defvar hypropos-regexp-history nil)
-(defvar hypropos-last-regexp nil)	; regex used for last apropos
-(defconst hypropos-apropos-buf "*Hyper Apropos*")
-(defconst hypropos-help-buf "*Hyper Help*")
+(defvar hyper-apropos-face-history nil)
+;;;(defvar hyper-apropos-variable-history nil)
+;;;(defvar hyper-apropos-function-history nil)
+(defvar hyper-apropos-regexp-history nil)
+(defvar hyper-apropos-last-regexp nil)	; regex used for last apropos
+(defconst hyper-apropos-apropos-buf "*Hyper Apropos*")
+(defconst hyper-apropos-help-buf "*Hyper Help*")
 
 ;;;###autoload
 (defun hyper-apropos (regexp toggle-apropos)
   "Display lists of functions and variables matching REGEXP
-in buffer \"*Hyper Apropos*\".  If optional prefix arg is given, then the value
-of `hypropos-programming-apropos' is toggled for this search.
+in buffer \"*Hyper Apropos*\".  If optional prefix arg is given, then the
+value of `hyper-apropos-programming-apropos' is toggled for this search.
 See also `hyper-apropos-mode'."
   (interactive (list (read-from-minibuffer "List symbols matching regexp: "
-					   nil nil nil 'hypropos-regexp-history)
+					   nil nil nil 'hyper-apropos-regexp-history)
 		     current-prefix-arg))
-  (or (memq major-mode '(hyper-apropos-mode hyper-help-mode))
-      (setq hypropos-prev-wconfig (current-window-configuration)))
+  (or (memq major-mode '(hyper-apropos-mode hyper-apropos-help-mode))
+      (setq hyper-apropos-prev-wconfig (current-window-configuration)))
   (if (string= "" regexp)
-      (if (get-buffer hypropos-apropos-buf)
+      (if (get-buffer hyper-apropos-apropos-buf)
 	  (if toggle-apropos
-	      (hypropos-toggle-programming-flag)
+	      (hyper-apropos-toggle-programming-flag)
 	    (message "Using last search results"))
 	(error "Be more specific..."))
-    (set-buffer (get-buffer-create hypropos-apropos-buf))
+    (set-buffer (get-buffer-create hyper-apropos-apropos-buf))
     (setq buffer-read-only nil)
     (erase-buffer)
     (if toggle-apropos
-	(set (make-local-variable 'hypropos-programming-apropos)
-	     (not (default-value 'hypropos-programming-apropos))))
+	(set (make-local-variable 'hyper-apropos-programming-apropos)
+	     (not (default-value 'hyper-apropos-programming-apropos))))
     (let ((flist (apropos-internal regexp
-				   (if hypropos-programming-apropos
+				   (if hyper-apropos-programming-apropos
 				       #'fboundp
 				     #'commandp)))
 	  (vlist (apropos-internal regexp
-				   (if hypropos-programming-apropos
+				   (if hyper-apropos-programming-apropos
 				       #'boundp
 				     #'user-variable-p))))
       (insert-face (format "Apropos search for: %S\n\n" regexp)
-		   'hypropos-major-heading)
+		   'hyper-apropos-major-heading)
       (insert-face "* = command (M-x) or user-variable.\n"
-		   'hypropos-documentation)
+		   'hyper-apropos-documentation)
       (insert-face "\
 a = autoloaded, b = byte-compiled, i = internal, l = lambda, m = macro.\n\n"
-		   'hypropos-documentation)
-      (insert-face "Functions and Macros:\n\n" 'hypropos-major-heading)
-      (hypropos-grok-functions flist)
-      (insert-face "\n\nVariables and Constants:\n\n" 'hypropos-major-heading)
-      (hypropos-grok-variables vlist)
+		   'hyper-apropos-documentation)
+      (insert-face "Functions and Macros:\n\n" 'hyper-apropos-major-heading)
+      (hyper-apropos-grok-functions flist)
+      (insert-face "\n\nVariables and Constants:\n\n"
+		   'hyper-apropos-major-heading)
+      (hyper-apropos-grok-variables vlist)
       (goto-char (point-min))))
-  (switch-to-buffer hypropos-apropos-buf)
+  (switch-to-buffer hyper-apropos-apropos-buf)
   (hyper-apropos-mode regexp))
 
-(defun hypropos-toggle-programming-flag ()
+(defun hyper-apropos-toggle-programming-flag ()
   (interactive)
-  (eval-in-buffer hypropos-apropos-buf
-    (set (make-local-variable 'hypropos-programming-apropos)
-	 (not hypropos-programming-apropos)))
+  (eval-in-buffer hyper-apropos-apropos-buf
+    (set (make-local-variable 'hyper-apropos-programming-apropos)
+	 (not hyper-apropos-programming-apropos)))
   (message "Re-running apropos...")
-  (hyper-apropos hypropos-last-regexp nil))
+  (hyper-apropos hyper-apropos-last-regexp nil))
 
-(defun hypropos-grok-functions (fns)
+(defun hyper-apropos-grok-functions (fns)
   (let (bind doc type)
     (dolist (fn fns)
       (setq bind (symbol-function fn)
@@ -281,35 +311,35 @@
 					 ??))
 		       (t ?\ )))
       (insert type (if (commandp fn) "* " "  "))
-      (let ((e (insert-face (format "%S" fn) 'hypropos-hyperlink)))
+      (let ((e (insert-face (format "%S" fn) 'hyper-apropos-hyperlink)))
 	(set-extent-property e 'mouse-face 'highlight))
       (insert-char ?\  (let ((l (- 30 (length (format "%S" fn)))))
 			 (if (natnump l) l 0)))
-      (and hypropos-show-brief-docs
+      (and hyper-apropos-show-brief-docs
 	   (setq doc (documentation fn))
 	   (insert-face (if doc
 			    (concat " - "
 				    (substring doc 0 (string-match "\n" doc)))
 			  " Not documented.")
-			'hypropos-documentation))
+			'hyper-apropos-documentation))
       (insert ?\n))))
 
-(defun hypropos-grok-variables (vars)
+(defun hyper-apropos-grok-variables (vars)
   (let (doc userp)
     (dolist (var vars)
       (setq userp (user-variable-p var))
       (insert (if userp " * " "   "))
-      (let ((e (insert-face (format "%S" var) 'hypropos-hyperlink)))
+      (let ((e (insert-face (format "%S" var) 'hyper-apropos-hyperlink)))
 	(set-extent-property e 'mouse-face 'highlight))
       (insert-char ?\  (let ((l (- 30 (length (format "%S" var)))))
 			 (if (natnump l) l 0)))
-      (and hypropos-show-brief-docs
+      (and hyper-apropos-show-brief-docs
 	   (setq doc (documentation-property var 'variable-documentation))
 	   (insert-face (if doc
 			    (concat " - " (substring doc (if userp 1 0)
 						     (string-match "\n" doc)))
 			  " - Not documented.")
-			'hypropos-documentation))
+			'hyper-apropos-documentation))
       (insert ?\n))))
 
 ;; ---------------------------------------------------------------------- ;;
@@ -345,11 +375,11 @@
 	major-mode 'hyper-apropos-mode
 	buffer-read-only t
 	truncate-lines t
-	hypropos-last-regexp regexp
+	hyper-apropos-last-regexp regexp
 	modeline-buffer-identification
 	(list (cons modeline-buffer-id-left-extent "Hyper Apropos: ")
 	      (cons modeline-buffer-id-right-extent (concat "\"" regexp "\""))))
-  (use-local-map hypropos-map)
+  (use-local-map hyper-apropos-map)
   (run-hooks 'hyper-apropos-mode-hook))
 
 ;; ---------------------------------------------------------------------- ;;
@@ -406,7 +436,7 @@
 	(if (and (or (symbolp defn) (symbolp (setq defn (car-safe defn))))
 		 defn
 		 show)
-	    (hypropos-get-doc defn t))))))
+	    (hyper-apropos-get-doc defn t))))))
 
 ;;;###autoload
 (defun hyper-describe-face (symbol &optional this-ref-buffer)
@@ -415,12 +445,12 @@
   ;; #### - perhaps a prefix arg should suppress the prompt...
   (interactive
    (let (v val)
-     (setq v (hypropos-this-symbol))	; symbol under point
+     (setq v (hyper-apropos-this-symbol))	; symbol under point
      (or (find-face v)
 	 (setq v (variable-at-point)))
      (setq val (let ((enable-recursive-minibuffers t))
                  (completing-read
-		  (concat (if (hypropos-follow-ref-buffer current-prefix-arg)
+		  (concat (if (hyper-apropos-follow-ref-buffer current-prefix-arg)
 			      "Follow face"
 			    "Describe face")
 			  (if v
@@ -428,36 +458,36 @@
 			    ": "))
 		  (mapcar (function (lambda (x) (list (symbol-name x))))
 			  (face-list))
-		  nil t nil 'hypropos-face-history)))
+		  nil t nil 'hyper-apropos-face-history)))
      (list (if (string= val "")
-	       (progn (push (symbol-name v) hypropos-face-history) v)
+	       (progn (push (symbol-name v) hyper-apropos-face-history) v)
 	     (intern-soft val))
 	   current-prefix-arg)))
   (if (null symbol)
       (message "Sorry, nothing to describe.")
-    (or (memq major-mode '(hyper-apropos-mode hyper-help-mode))
-	(setq hypropos-prev-wconfig (current-window-configuration)))
-    (hypropos-get-doc symbol t nil this-ref-buffer)))
+    (or (memq major-mode '(hyper-apropos-mode hyper-apropos-help-mode))
+	(setq hyper-apropos-prev-wconfig (current-window-configuration)))
+    (hyper-apropos-get-doc symbol t nil this-ref-buffer)))
 
 ;;;###autoload
 (defun hyper-describe-variable (symbol &optional this-ref-buffer)
   "Hypertext drop-in replacement for `describe-variable'.
 See also `hyper-apropos' and `hyper-describe-function'."
   ;; #### - perhaps a prefix arg should suppress the prompt...
-  (interactive (list (hypropos-read-variable-symbol
-		      (if (hypropos-follow-ref-buffer current-prefix-arg)
+  (interactive (list (hyper-apropos-read-variable-symbol
+		      (if (hyper-apropos-follow-ref-buffer current-prefix-arg)
 			  "Follow variable"
 			"Describe variable"))
 		     current-prefix-arg))
   (if (null symbol)
       (message "Sorry, nothing to describe.")
-    (or (memq major-mode '(hyper-apropos-mode hyper-help-mode))
-	(setq hypropos-prev-wconfig (current-window-configuration)))
-    (hypropos-get-doc symbol t nil this-ref-buffer)))
+    (or (memq major-mode '(hyper-apropos-mode hyper-apropos-help-mode))
+	(setq hyper-apropos-prev-wconfig (current-window-configuration)))
+    (hyper-apropos-get-doc symbol t nil this-ref-buffer)))
 
 (defun hyper-where-is (symbol)
   "Print message listing key sequences that invoke specified command."
-  (interactive (list (hypropos-read-function-symbol "Where is function")))
+  (interactive (list (hyper-apropos-read-function-symbol "Where is function")))
   (if (null symbol)
       (message "Sorry, nothing to describe.")
     (where-is symbol)))
@@ -468,25 +498,25 @@
 in that the symbol under the cursor is the default if it is a function.
 See also `hyper-apropos' and `hyper-describe-variable'."
   ;; #### - perhaps a prefix arg should suppress the prompt...
-  (interactive (list (hypropos-read-function-symbol
-		      (if (hypropos-follow-ref-buffer current-prefix-arg)
+  (interactive (list (hyper-apropos-read-function-symbol
+		      (if (hyper-apropos-follow-ref-buffer current-prefix-arg)
 			  "Follow function"
 			"Describe function"))
 		     current-prefix-arg))
   (if (null symbol)
       (message "Sorry, nothing to describe.")
-    (or (memq major-mode '(hyper-apropos-mode hyper-help-mode))
-	(setq hypropos-prev-wconfig (current-window-configuration)))
-    (hypropos-get-doc symbol t nil this-ref-buffer)))
+    (or (memq major-mode '(hyper-apropos-mode hyper-apropos-help-mode))
+	(setq hyper-apropos-prev-wconfig (current-window-configuration)))
+    (hyper-apropos-get-doc symbol t nil this-ref-buffer)))
 
 ;;;###autoload
-(defun hypropos-read-variable-symbol (prompt &optional predicate)
+(defun hyper-apropos-read-variable-symbol (prompt &optional predicate)
   "Hypertext drop-in replacement for `describe-variable'.
 See also `hyper-apropos' and `hyper-describe-function'."
   ;; #### - perhaps a prefix arg should suppress the prompt...
   (or predicate (setq predicate 'boundp))
   (let (v val)
-    (setq v (hypropos-this-symbol))	; symbol under point
+    (setq v (hyper-apropos-this-symbol))	; symbol under point
     (or (funcall predicate v)
 	(setq v (variable-at-point)))
     (or (funcall predicate v)
@@ -501,10 +531,13 @@
     (if (string= val "")
 	(progn (push (symbol-name v) variable-history) v)
       (intern-soft val))))
+;;;###autoload
+(define-obsolete-function-alias
+  'hypropos-read-variable-symbol 'hyper-apropos-read-variable-symbol)
 
-(defun hypropos-read-function-symbol (prompt)
+(defun hyper-apropos-read-function-symbol (prompt)
   "Read function symbol from minibuffer."
-  (let ((fn (hypropos-this-symbol))
+  (let ((fn (hyper-apropos-this-symbol))
 	val)
     (or (fboundp fn)
 	(setq fn (function-called-at-point)))
@@ -518,42 +551,43 @@
 	(progn (push (symbol-name fn) function-history) fn)
       (intern-soft val))))
 
-(defun hypropos-last-help (arg)
+(defun hyper-apropos-last-help (arg)
   "Go back to the last symbol documented in the *Hyper Help* buffer."
   (interactive "P")
-  (let ((win (get-buffer-window hypropos-help-buf)))
+  (let ((win (get-buffer-window hyper-apropos-help-buf)))
     (or arg (setq arg (if win 1 0)))
     (cond ((= arg 0))
-	  ((<= (length hypropos-help-history) arg)
+	  ((<= (length hyper-apropos-help-history) arg)
 	   ;; go back as far as we can...
-	   (setcdr (nreverse hypropos-help-history) nil))
+	   (setcdr (nreverse hyper-apropos-help-history) nil))
 	  (t
-	   (setq hypropos-help-history (nthcdr arg hypropos-help-history))))
+	   (setq hyper-apropos-help-history
+		 (nthcdr arg hyper-apropos-help-history))))
     (if (or win (> arg 0))
-	(hypropos-get-doc (car hypropos-help-history) t)
-      (display-buffer hypropos-help-buf))))
+	(hyper-apropos-get-doc (car hyper-apropos-help-history) t)
+      (display-buffer hyper-apropos-help-buf))))
 
-(defun hypropos-insert-face (string &optional face)
-  "Insert STRING and fontify some parts with face `hypropos-hyperlink'."
+(defun hyper-apropos-insert-face (string &optional face)
+  "Insert STRING and fontify some parts with face `hyper-apropos-hyperlink'."
   (let ((beg (point)) end)
-    (insert-face string (or face 'hypropos-documentation))
+    (insert-face string (or face 'hyper-apropos-documentation))
     (setq end (point))
     (goto-char beg)
     (while (re-search-forward
 	    "`\\([-a-zA-Z0-9_][-a-zA-Z0-9_][-a-zA-Z0-9_.]+\\)'"
 	    end 'limit)
       (let ((e (make-extent (match-beginning 1) (match-end 1))))
-	(set-extent-face e 'hypropos-hyperlink)
+	(set-extent-face e 'hyper-apropos-hyperlink)
 	(set-extent-property e 'mouse-face 'highlight))
     (goto-char beg)
     (while (re-search-forward
 	    "M-x \\([-a-zA-Z0-9_][-a-zA-Z0-9_][-a-zA-Z0-9_.]+\\)"
 	    end 'limit)
       (let ((e (make-extent (match-beginning 1) (match-end 1))))
-	(set-extent-face e 'hypropos-hyperlink)
+	(set-extent-face e 'hyper-apropos-hyperlink)
 	(set-extent-property e 'mouse-face 'highlight))))))
 
-(defun hypropos-insert-keybinding (keys string)
+(defun hyper-apropos-insert-keybinding (keys string)
   (if keys
       (insert "  (" string " bound to \""
 	      (mapconcat 'key-description
@@ -561,7 +595,7 @@
 			 "\", \"")
 	      "\")\n")))
 
-(defun hypropos-insert-section-heading (alias-desc &optional desc)
+(defun hyper-apropos-insert-section-heading (alias-desc &optional desc)
   (or desc (setq desc alias-desc
 		 alias-desc nil))
   (if alias-desc
@@ -573,10 +607,10 @@
   (aset desc 0 (upcase (aref desc 0))) ; capitalize
   (goto-char (point-max))
   (newline 3) (delete-blank-lines) (newline 2)
-  (hypropos-insert-face desc 'hypropos-section-heading))
+  (hyper-apropos-insert-face desc 'hyper-apropos-section-heading))
 
-(defun hypropos-insert-value (string symbol val)
-  (insert-face string 'hypropos-heading)
+(defun hyper-apropos-insert-value (string symbol val)
+  (insert-face string 'hyper-apropos-heading)
   (insert (if (symbol-value symbol)
 	      (if (or (null val) (eq val t) (integerp val))
 		  (prog1
@@ -585,13 +619,13 @@
 		"see below")
 	    "is void")))
 
-(defun hypropos-follow-ref-buffer (this-ref-buffer) 
+(defun hyper-apropos-follow-ref-buffer (this-ref-buffer) 
   (and (not this-ref-buffer)
-       (eq major-mode 'hyper-help-mode)
-       hypropos-ref-buffer
-       (buffer-live-p hypropos-ref-buffer)))
+       (eq major-mode 'hyper-apropos-help-mode)
+       hyper-apropos-ref-buffer
+       (buffer-live-p hyper-apropos-ref-buffer)))
 
-(defun hypropos-get-alias (symbol alias-p next-symbol &optional use)
+(defun hyper-apropos-get-alias (symbol alias-p next-symbol &optional use)
   "Return (TERMINAL-SYMBOL . ALIAS-DESC)."
   (let (aliases)
     (while (funcall alias-p symbol)
@@ -606,7 +640,7 @@
 		       "'")))))
 
 ;;;###autoload
-(defun hypropos-get-doc (&optional symbol force type this-ref-buffer)
+(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."
   ;; SYMBOL is the symbol to document.  FORCE, if non-nil, means to
@@ -619,28 +653,28 @@
   ;;
   (interactive)
   (or symbol
-      (setq symbol (hypropos-this-symbol)))
+      (setq symbol (hyper-apropos-this-symbol)))
   (or type
       (setq type '(function variable face)))
-  (if (and (eq hypropos-currently-showing symbol)
-	   (get-buffer hypropos-help-buf)
-	   (get-buffer-window hypropos-help-buf)
+  (if (and (eq hyper-apropos-currently-showing symbol)
+	   (get-buffer hyper-apropos-help-buf)
+	   (get-buffer-window hyper-apropos-help-buf)
 	   (not force))
       ;; we're already displaying this help, so toggle its display.
-      (delete-windows-on hypropos-help-buf)
+      (delete-windows-on hyper-apropos-help-buf)
     ;; OK, we've got to refresh and display it...
-    (or (eq symbol (car hypropos-help-history))
-	(setq hypropos-help-history
-	      (if (eq major-mode 'hyper-help-mode)
+    (or (eq symbol (car hyper-apropos-help-history))
+	(setq hyper-apropos-help-history
+	      (if (eq major-mode 'hyper-apropos-help-mode)
 		  ;; if we're following a link in the help buffer, then
 		  ;; record that in the help history.
-		  (cons symbol hypropos-help-history)
+		  (cons symbol hyper-apropos-help-history)
 		;; otherwise clear the history because it's a new search.
 		(list symbol))))
     (save-excursion
-      (if (hypropos-follow-ref-buffer this-ref-buffer)
-	  (set-buffer hypropos-ref-buffer)
-	(setq hypropos-ref-buffer (current-buffer)))
+      (if (hyper-apropos-follow-ref-buffer this-ref-buffer)
+	  (set-buffer hyper-apropos-ref-buffer)
+	(setq hyper-apropos-ref-buffer (current-buffer)))
       (let (standard-output
 	    ok beg
 	    newsym symtype doc obsolete
@@ -649,20 +683,20 @@
 	    font fore back undl
 	    aliases alias-desc desc)
 	(save-excursion
-	  (set-buffer (get-buffer-create hypropos-help-buf))
+	  (set-buffer (get-buffer-create hyper-apropos-help-buf))
 	  ;;(setq standard-output (current-buffer))
 	  (setq buffer-read-only nil)
 	  (erase-buffer)
-	  (insert-face (format "`%s'" symbol) 'hypropos-major-heading)
+	  (insert-face (format "`%s'" symbol) 'hyper-apropos-major-heading)
 	  (insert (format " (buffer: %s, mode: %s)\n"
-			  (buffer-name hypropos-ref-buffer)
+			  (buffer-name hyper-apropos-ref-buffer)
 			  local)))
 	;; function ----------------------------------------------------------
 	(and (memq 'function type)
 	     (fboundp symbol)
 	     (progn
 	       (setq ok t)
-	       (setq aliases (hypropos-get-alias (symbol-function symbol)
+	       (setq aliases (hyper-apropos-get-alias (symbol-function symbol)
 						 'symbolp
 						 'symbol-function)
 		     newsym (car aliases)
@@ -690,28 +724,28 @@
 		     obsolete (get symbol 'byte-obsolete-info)
 		     doc (or (documentation symbol) "function not documented"))
 	       (save-excursion
-		 (set-buffer hypropos-help-buf)
+		 (set-buffer hyper-apropos-help-buf)
 		 (goto-char (point-max))
 		 (setq standard-output (current-buffer))
-		 (hypropos-insert-section-heading alias-desc desc)
+		 (hyper-apropos-insert-section-heading alias-desc desc)
 		 (insert ":\n")
 		 (if local
-		     (hypropos-insert-keybinding
+		     (hyper-apropos-insert-keybinding
 		      (where-is-internal symbol (list local) nil nil nil)
 		      "locally"))
-		 (hypropos-insert-keybinding
+		 (hyper-apropos-insert-keybinding
 		  (where-is-internal symbol (list global) nil nil nil)
 		  "globally")
 		 (insert "\n")
 		 (if obsolete
-		     (hypropos-insert-face
+		     (hyper-apropos-insert-face
 		      (format "%s is an obsolete function; %s\n\n" symbol
 			      (if (stringp (car obsolete))
 				  (car obsolete)
 				(format "use `%s' instead." (car obsolete))))
-		      'hypropos-warning))
+		      'hyper-apropos-warning))
 		 (setq beg (point))
-		 (insert-face "arguments: " 'hypropos-heading)
+		 (insert-face "arguments: " 'hyper-apropos-heading)
 		 (cond ((eq symtype 'lambda)
 			(princ (or (nth 1 newsym) "()")))
 		       ((eq symtype 'bytecode)
@@ -738,7 +772,7 @@
 			(setq doc (substring doc (match-end 0))))
 		       (t (princ "[not available]")))
 		 (insert "\n\n")
-		 (hypropos-insert-face doc)
+		 (hyper-apropos-insert-face doc)
 		 (insert "\n")
 		 (indent-rigidly beg (point) 2))))
 	;; variable ----------------------------------------------------------
@@ -746,7 +780,7 @@
 	     (or (boundp symbol) (default-boundp symbol))
 	     (progn 
 	       (setq ok t)
-	       (setq aliases (hypropos-get-alias symbol
+	       (setq aliases (hyper-apropos-get-alias symbol
 						 'variable-alias
 						 'variable-alias
 						 'variable-alias)
@@ -779,10 +813,10 @@
 						     'variable-documentation)
 			     "variable not documented"))
 	       (save-excursion
-		 (set-buffer hypropos-help-buf)
+		 (set-buffer hyper-apropos-help-buf)
 		 (goto-char (point-max))
 		 (setq standard-output (current-buffer))
-		 (hypropos-insert-section-heading alias-desc desc)
+		 (hyper-apropos-insert-section-heading alias-desc desc)
 		 (when (and (user-variable-p newsym)
 			    (get newsym 'custom-type))
 		   (let ((e (make-extent (point-at-bol) (point))))
@@ -790,17 +824,17 @@
 		     (set-extent-property e 'help-echo
 					  (format "Customize %s" newsym))
 		     (set-extent-property
-		      e 'hypropos-custom
+		      e 'hyper-apropos-custom
 		      `(lambda () (customize-variable (quote ,newsym))))))
 		 (insert ":\n\n")
 		 (setq beg (point))
 		 (if obsolete
-		     (hypropos-insert-face
+		     (hyper-apropos-insert-face
 		      (format "%s is an obsolete function; %s\n\n" symbol
 			      (if (stringp obsolete)
 				  obsolete
 				(format "use `%s' instead." obsolete)))
-		      'hypropos-warning))
+		      'hyper-apropos-warning))
 		 ;; generally, the value of the variable is short and the
 		 ;; documentation of the variable long, so it's desirable
 		 ;; to see all of the value and the start of the
@@ -811,28 +845,28 @@
 		 (if (and (or (null local-str) (< (length local-str) 69))
 			  (or (null global-str) (< (length global-str) 69)))
 					; 80 cols.  docstrings assume this.
-		     (progn (insert-face "value: " 'hypropos-heading)
+		     (progn (insert-face "value: " 'hyper-apropos-heading)
 			    (insert (or local-str "is void"))
 			    (if (eq symtype t)
 				(progn
 				  (insert "\n")
-				  (insert-face "default value: " 'hypropos-heading)
+				  (insert-face "default value: " 'hyper-apropos-heading)
 				  (insert (or global-str "is void"))))
 			    (insert "\n\n")
-			    (hypropos-insert-face doc))
-		   (hypropos-insert-value "value: " 'local-str local)
+			    (hyper-apropos-insert-face doc))
+		   (hyper-apropos-insert-value "value: " 'local-str local)
 		   (if (eq symtype t)
 		       (progn
 			 (insert ", ")
-			 (hypropos-insert-value "default-value: "
+			 (hyper-apropos-insert-value "default-value: "
 						'global-str global)))
 		   (insert "\n\n")
-		   (hypropos-insert-face doc)
+		   (hyper-apropos-insert-face doc)
 		   (if local-str
 		       (progn
 			 (newline 3) (delete-blank-lines) (newline 1)
-			 (insert-face "value: " 'hypropos-heading)
-			 (if hypropos-prettyprint-long-values
+			 (insert-face "value: " 'hyper-apropos-heading)
+			 (if hyper-apropos-prettyprint-long-values
 			     (condition-case nil
 				 (let ((pp-print-readably nil)) (pprint local))
 			       (error (insert local-str)))
@@ -840,8 +874,8 @@
 		   (if global-str
 		       (progn
 			 (newline 3) (delete-blank-lines) (newline 1)
-			 (insert-face "default value: " 'hypropos-heading)
-			 (if hypropos-prettyprint-long-values
+			 (insert-face "default value: " 'hyper-apropos-heading)
+			 (if hyper-apropos-prettyprint-long-values
 			     (condition-case nil
 				 (let ((pp-print-readably nil)) (pprint global))
 			       (error (insert global-str)))
@@ -852,13 +886,13 @@
 	     (find-face symbol)
 	     (progn
 	       (setq ok t)
-	       (copy-face symbol 'hypropos-temp-face 'global)
+	       (copy-face symbol 'hyper-apropos-temp-face 'global)
 	       (mapcar (function
 			(lambda (property)
 			  (setq symtype (face-property-instance symbol
 								property))
 			  (if symtype
-			      (set-face-property 'hypropos-temp-face
+			      (set-face-property 'hyper-apropos-temp-face
 						 property
 						 symtype))))
 		       built-in-face-specifiers)
@@ -873,9 +907,9 @@
 		     doc  (face-doc-string symbol))
 	       ;; #### - add some code here
 	       (save-excursion
-		 (set-buffer hypropos-help-buf)
+		 (set-buffer hyper-apropos-help-buf)
 		 (setq standard-output (current-buffer))
-		 (hypropos-insert-section-heading
+		 (hyper-apropos-insert-section-heading
 		  (concat "Face"
 			  (when (get symbol 'face-defface-spec)
 			    (let* ((str " (customizable)")
@@ -886,27 +920,27 @@
 			      (set-extent-property e 'unique t)
 			      (set-extent-property e 'duplicable t)
 			      (set-extent-property
-			       e 'hypropos-custom
+			       e 'hyper-apropos-custom
 			       `(lambda () (customize-face (quote ,symbol))))
 			      str))
 			  ":\n\n  "))
 		 (insert-face "\
 ABCDEFHIJKLMNOPQRSTUVWXYZ abcdefhijklmnopqrstuvwxyz 0123456789"
-			      'hypropos-temp-face)
+			      'hyper-apropos-temp-face)
 		 (newline 2)
-		 (insert-face "  Font: " 'hypropos-heading)
+		 (insert-face "  Font: " 'hyper-apropos-heading)
 		 (insert (format (if (numberp (car font)) "(%s)\n" "%s\n")
 				 (and (cdr font)
 				      (font-instance-name (cdr font)))))
-		 (insert-face "  Foreground: " 'hypropos-heading)
+		 (insert-face "  Foreground: " 'hyper-apropos-heading)
 		 (insert (format (if (numberp (car fore)) "(%s)\n" "%s\n")
 				 (and (cdr fore)
 				      (color-instance-name (cdr fore)))))
-		 (insert-face "  Background: " 'hypropos-heading)
+		 (insert-face "  Background: " 'hyper-apropos-heading)
 		 (insert (format (if (numberp (car back)) "(%s)\n" "%s\n")
 				 (and (cdr back)
 				      (color-instance-name (cdr back)))))
-		 (insert-face "  Underline: " 'hypropos-heading)
+		 (insert-face "  Underline: " 'hyper-apropos-heading)
 		 (insert (format (if (numberp (car undl)) "(%s)\n" "%s\n")
 				 (cdr undl)))
 		 (if doc
@@ -918,57 +952,60 @@
 	;; not bound & property list -----------------------------------------
 	(or ok
 	    (save-excursion
-	      (set-buffer hypropos-help-buf)
-	      (hypropos-insert-section-heading
+	      (set-buffer hyper-apropos-help-buf)
+	      (hyper-apropos-insert-section-heading
 	       "symbol is not currently bound\n")))
 	(if (and (setq symtype (symbol-plist symbol))
 		 (or (> (length symtype) 2)
 		     (not (memq 'variable-documentation symtype))))
 	    (save-excursion
-	      (set-buffer hypropos-help-buf)
+	      (set-buffer hyper-apropos-help-buf)
 	      (goto-char (point-max))
 	      (setq standard-output (current-buffer))
-	      (hypropos-insert-section-heading "property-list:\n\n")
+	      (hyper-apropos-insert-section-heading "property-list:\n\n")
 	      (while symtype
 		(if (memq (car symtype)
 			  '(variable-documentation byte-obsolete-info))
 		    (setq symtype (cdr symtype))
 		  (insert-face (concat "  " (symbol-name (car symtype))
 				       ": ")
-			       'hypropos-heading)
+			       'hyper-apropos-heading)
 		  (setq symtype (cdr symtype))
 		  (indent-to 32)
 		  (insert (prin1-to-string (car symtype)) "\n"))
 		(setq symtype (cdr symtype)))))))
     (save-excursion
-      (set-buffer hypropos-help-buf)
+      (set-buffer hyper-apropos-help-buf)
       (goto-char (point-min)) 
       ;; pop up window and shrink it if it's wasting space
-      (if hypropos-shrink-window
+      (if hyper-apropos-shrink-window
 	  (shrink-window-if-larger-than-buffer
 	   (display-buffer (current-buffer)))
 	(display-buffer (current-buffer)))
-      (hyper-help-mode))
-    (setq hypropos-currently-showing symbol)))
+      (hyper-apropos-help-mode))
+    (setq hyper-apropos-currently-showing symbol)))
+;;;###autoload
+(define-obsolete-function-alias
+  'hypropos-get-doc 'hyper-apropos-get-doc)
 
 ; -----------------------------------------------------------------------------
 
-(defun hyper-help-mode ()
+(defun hyper-apropos-help-mode ()
   "Major mode for hypertext XEmacs help.  In this mode, you can quickly
 follow links between back and forth between the documentation strings for
 different variables and functions.  Common commands:
 
-\\{hypropos-help-map}"
+\\{hyper-apropos-help-map}"
   (setq buffer-read-only t
-	major-mode	     'hyper-help-mode
+	major-mode	     'hyper-apropos-help-mode
 	mode-name	     "Hyper-Help")
   (set-syntax-table emacs-lisp-mode-syntax-table)
-  (hypropos-highlightify)
-  (use-local-map hypropos-help-map))
+  (hyper-apropos-highlightify)
+  (use-local-map hyper-apropos-help-map))
 
 ;; ---------------------------------------------------------------------- ;;
 
-(defun hypropos-highlightify ()
+(defun hyper-apropos-highlightify ()
   (save-excursion
     (goto-char (point-min))
     (let ((st (point-min))
@@ -986,10 +1023,11 @@
 
 ;; ---------------------------------------------------------------------- ;;
 
-(defun hypropos-scroll-up ()
-  "Scroll up the \"*Hyper Help*\" buffer if it's visible, or scroll this window up."
+(defun hyper-apropos-scroll-up ()
+  "Scroll up the \"*Hyper Help*\" buffer if it's visible.
+Otherwise, scroll the selected window up."
   (interactive)
-  (let ((win (get-buffer-window hypropos-help-buf))
+  (let ((win (get-buffer-window hyper-apropos-help-buf))
 	(owin (selected-window)))
     (if win
 	(progn
@@ -1000,10 +1038,11 @@
 	  (select-window owin))
       (scroll-up nil))))
 
-(defun hypropos-scroll-down ()
-  "Scroll down the \"*Hyper Help*\" buffer if it's visible, or scroll this window down."
+(defun hyper-apropos-scroll-down ()
+  "Scroll down the \"*Hyper Help*\" buffer if it's visible.
+Otherwise, scroll the selected window down."
   (interactive)
-  (let ((win (get-buffer-window hypropos-help-buf))
+  (let ((win (get-buffer-window hyper-apropos-help-buf))
 	(owin (selected-window)))
     (if win
 	(progn
@@ -1016,32 +1055,32 @@
 
 ;; ---------------------------------------------------------------------- ;;
 
-(defun hypropos-mouse-get-doc (event)
+(defun hyper-apropos-mouse-get-doc (event)
   "Get the documentation for the symbol the mouse is on."
   (interactive "e")
   (mouse-set-point event)
-  (let ((e (extent-at (point) nil 'hypropos-custom)))
+  (let ((e (extent-at (point) nil 'hyper-apropos-custom)))
     (if e
-	(funcall (extent-property e 'hypropos-custom))
+	(funcall (extent-property e 'hyper-apropos-custom))
       (save-excursion
-	(let ((symbol (hypropos-this-symbol)))
+	(let ((symbol (hyper-apropos-this-symbol)))
 	  (if symbol
-	      (hypropos-get-doc symbol)
+	      (hyper-apropos-get-doc symbol)
 	    (error "Click on a symbol")))))))
 
 ;; ---------------------------------------------------------------------- ;;
 
-(defun hypropos-add-keyword (pattern)
+(defun hyper-apropos-add-keyword (pattern)
   "Use additional keyword to narrow regexp match.
 Deletes lines which don't match PATTERN."
   (interactive "sAdditional Keyword: ")
   (save-excursion
     (goto-char (point-min))
     (let (buffer-read-only)
-      (keep-lines (concat pattern "\\|" hypropos-junk-regexp))
+      (keep-lines (concat pattern "\\|" hyper-apropos-junk-regexp))
       )))
 
-(defun hypropos-eliminate-keyword (pattern)
+(defun hyper-apropos-eliminate-keyword (pattern)
   "Use additional keyword to eliminate uninteresting matches.
 Deletes lines which match PATTERN."
   (interactive "sKeyword to eliminate: ")
@@ -1053,11 +1092,11 @@
 
 ;; ---------------------------------------------------------------------- ;;
 
-(defun hypropos-this-symbol ()
+(defun hyper-apropos-this-symbol ()
   (save-excursion
     (cond ((eq major-mode 'hyper-apropos-mode)
 	   (beginning-of-line)
-	   (if (looking-at hypropos-junk-regexp)
+	   (if (looking-at hyper-apropos-junk-regexp)
 	       nil
 	     (forward-char 3)
 	     (read (point-marker))))
@@ -1074,14 +1113,14 @@
 	     (and (not (eq st en))
 		  (intern-soft (buffer-substring st en))))))))
 
-(defun hypropos-where-is (symbol)
+(defun hyper-apropos-where-is (symbol)
   "Find keybinding for symbol on current line."
-  (interactive (list (hypropos-this-symbol)))
+  (interactive (list (hyper-apropos-this-symbol)))
   (where-is symbol))
 
-(defun hypropos-invoke-fn (fn)
+(defun hyper-apropos-invoke-fn (fn)
   "Interactively invoke the function on the current line."
-  (interactive (list (hypropos-this-symbol)))
+  (interactive (list (hyper-apropos-this-symbol)))
   (cond ((not (fboundp fn))
 	 (error "%S is not a function" fn))
 	(t (call-interactively fn))))
@@ -1089,51 +1128,54 @@
 ;;;###autoload
 (defun hyper-set-variable (var val &optional this-ref-buffer)
   (interactive
-   (let ((var (hypropos-read-variable-symbol
-	       (if (hypropos-follow-ref-buffer current-prefix-arg)
+   (let ((var (hyper-apropos-read-variable-symbol
+	       (if (hyper-apropos-follow-ref-buffer current-prefix-arg)
 		   "In ref buffer, set user option"
 		 "Set user option")
 	       'user-variable-p)))
-     (list var (hypropos-read-variable-value var) current-prefix-arg)))
-  (hypropos-set-variable var val this-ref-buffer))
+     (list var (hyper-apropos-read-variable-value var) current-prefix-arg)))
+  (hyper-apropos-set-variable var val this-ref-buffer))
 
 ;;;###autoload
-(defun hypropos-set-variable (var val &optional this-ref-buffer)
+(defun hyper-apropos-set-variable (var val &optional this-ref-buffer)
   "Interactively set the variable on the current line."
   (interactive
-   (let ((var (hypropos-this-symbol)))
+   (let ((var (hyper-apropos-this-symbol)))
      (or (and var (boundp var))
-	 (and (setq var (and (eq major-mode 'hyper-help-mode)
+	 (and (setq var (and (eq major-mode 'hyper-apropos-help-mode)
 			     (save-excursion
 			       (goto-char (point-min))
-			       (hypropos-this-symbol))))
+			       (hyper-apropos-this-symbol))))
 	      (boundp var))
 	 (setq var nil))
-     (list var (hypropos-read-variable-value var))))
+     (list var (hyper-apropos-read-variable-value var))))
   (and var
        (boundp var)
        (progn
-	 (if (hypropos-follow-ref-buffer this-ref-buffer)
+	 (if (hyper-apropos-follow-ref-buffer this-ref-buffer)
 	     (save-excursion
-	       (set-buffer hypropos-ref-buffer)
+	       (set-buffer hyper-apropos-ref-buffer)
 	       (set var val))
 	   (set var val))
-	 (hypropos-get-doc var t '(variable) this-ref-buffer))))
+	 (hyper-apropos-get-doc var t '(variable) this-ref-buffer))))
+;;;###autoload
+(define-obsolete-function-alias
+  'hypropos-set-variable 'hyper-apropos-set-variable)
 
-(defun hypropos-read-variable-value (var &optional this-ref-buffer)
+(defun hyper-apropos-read-variable-value (var &optional this-ref-buffer)
   (and var
        (boundp var)
        (let ((prop (get var 'variable-interactive))
 	     (print-readably t)
 	     val str)
-	 (hypropos-get-doc var t '(variable) current-prefix-arg)
+	 (hyper-apropos-get-doc var t '(variable) current-prefix-arg)
 	 (if prop
 	     (call-interactively (list 'lambda '(arg)
 				       (list 'interactive prop)
 				       'arg))
-	   (setq val (if (hypropos-follow-ref-buffer this-ref-buffer)
+	   (setq val (if (hyper-apropos-follow-ref-buffer this-ref-buffer)
 			 (save-excursion
-			   (set-buffer hypropos-ref-buffer)
+			   (set-buffer hyper-apropos-ref-buffer)
 			   (symbol-value var))
 		       (symbol-value var))
 		 str (prin1-to-string val))
@@ -1151,28 +1193,28 @@
 			  str))
 	      (error nil)))))))
 
-(defun hypropos-customize-variable ()
+(defun hyper-apropos-customize-variable ()
   (interactive)
-  (let ((var (hypropos-this-symbol)))
+  (let ((var (hyper-apropos-this-symbol)))
     (customize-variable var)))
 
 ;; ---------------------------------------------------------------------- ;;
 
-(defun hypropos-find-tag (&optional tag-name)
+(defun hyper-apropos-find-tag (&optional tag-name)
   "Find the tag for the symbol on the current line in other window.  In
 order for this to work properly, the variable `tag-table-alist' or
 `tags-file-name' must be set so that a TAGS file with tags for the emacs
 source is found for the \"*Hyper Apropos*\" buffer."
   (interactive)
   ;; there ought to be a default tags file for this...
-  (or tag-name (setq tag-name (symbol-name (hypropos-this-symbol))))
+  (or tag-name (setq tag-name (symbol-name (hyper-apropos-this-symbol))))
   (find-tag-other-window (list tag-name)))
 
 ;; ---------------------------------------------------------------------- ;;
 
-(defun hypropos-disassemble (sym)
+(defun hyper-apropos-disassemble (sym)
   "Disassemble FUN if it is byte-coded.  If it's a lambda, prettyprint it."
-  (interactive (list (hypropos-this-symbol)))
+  (interactive (list (hyper-apropos-this-symbol)))
   (let ((fun sym) (trail nil) macrop)
     (while (and (symbolp fun) (not (memq fun trail)))
       (setq trail (cons fun trail)
@@ -1205,20 +1247,20 @@
 
 ;; ---------------------------------------------------------------------- ;;
 
-(defun hypropos-quit ()
+(defun hyper-apropos-quit ()
   (interactive)
   "Quit Hyper Apropos and restore original window config."
-  (let ((buf (get-buffer hypropos-apropos-buf)))
+  (let ((buf (get-buffer hyper-apropos-apropos-buf)))
     (and buf (bury-buffer buf)))
-  (set-window-configuration hypropos-prev-wconfig))
+  (set-window-configuration hyper-apropos-prev-wconfig))
 
 ;; ---------------------------------------------------------------------- ;;
 
 ;;;###autoload
-(defun hypropos-popup-menu (event)
+(defun hyper-apropos-popup-menu (event)
   (interactive "e")
   (mouse-set-point event)
-  (let* ((sym (hypropos-this-symbol))
+  (let* ((sym (hyper-apropos-this-symbol))
 	 (notjunk (not (null sym)))
 	 (command-p (if (commandp sym) t))
 	 (variable-p (and sym (boundp sym)))
@@ -1230,34 +1272,37 @@
 			(save-excursion (set-buffer (event-buffer event))
 					major-mode)))
 	 (name (if sym (symbol-name sym) ""))
-	 (hypropos-menu
+	 (hyper-apropos-menu
 	  (delete
 	   nil
 	   (list (concat "Hyper-Help: " name)
-	    (vector "Display documentation" 'hypropos-get-doc   notjunk)
-	    (vector "Set variable"	'hypropos-set-variable	variable-p)
-	    (vector "Customize variable" 'hypropos-customize-variable
+	    (vector "Display documentation" 'hyper-apropos-get-doc   notjunk)
+	    (vector "Set variable"	'hyper-apropos-set-variable	variable-p)
+	    (vector "Customize variable" 'hyper-apropos-customize-variable
 		    customizable-p)
-	    (vector "Show keys for"     'hypropos-where-is      command-p)
-	    (vector "Invoke command"	'hypropos-invoke-fn	command-p)
-	    (vector "Find tag"		'hypropos-find-tag	notjunk)
+	    (vector "Show keys for"     'hyper-apropos-where-is      command-p)
+	    (vector "Invoke command"	'hyper-apropos-invoke-fn	command-p)
+	    (vector "Find tag"		'hyper-apropos-find-tag	notjunk)
 	    (and apropos-p
-		 ["Add keyword..." hypropos-add-keyword	t])
+		 ["Add keyword..." hyper-apropos-add-keyword	t])
 	    (and apropos-p
-		 ["Eliminate keyword..." hypropos-eliminate-keyword  t])
+		 ["Eliminate keyword..." hyper-apropos-eliminate-keyword  t])
 	    (if apropos-p
-		["Programmers' Apropos" hypropos-toggle-programming-flag
-		 :style toggle :selected hypropos-programming-apropos]
-	      ["Programmers' Help" hypropos-toggle-programming-flag
-	       :style toggle :selected hypropos-programming-apropos])
-	    (and hypropos-programming-apropos
+		["Programmers' Apropos" hyper-apropos-toggle-programming-flag
+		 :style toggle :selected hyper-apropos-programming-apropos]
+	      ["Programmers' Help" hyper-apropos-toggle-programming-flag
+	       :style toggle :selected hyper-apropos-programming-apropos])
+	    (and hyper-apropos-programming-apropos
 		 (vector "Disassemble function"
-			 'hypropos-disassemble
+			 'hyper-apropos-disassemble
 			 function-p))
 	    ["Help"                     describe-mode           t]
-	    ["Quit"			hypropos-quit		t]
+	    ["Quit"			hyper-apropos-quit		t]
 	    ))))
-    (popup-menu hypropos-menu)))
+    (popup-menu hyper-apropos-menu)))
+;;;###autoload
+(define-obsolete-function-alias
+  'hypropos-popup-menu 'hyper-apropos-popup-menu)
 
 (provide 'hyper-apropos)
 
diff -r 4de2936b4e77 -r 0132846995bd lisp/packages/man.el
--- a/lisp/packages/man.el	Mon Aug 13 09:42:28 2007 +0200
+++ b/lisp/packages/man.el	Mon Aug 13 09:43:35 2007 +0200
@@ -247,10 +247,8 @@
 
 		   (if (< (buffer-size) 200)
 		       (progn
-			 (goto-char (point-min))
-			 (error (buffer-substring (point)
-						  (progn (end-of-line)
-							 (point))))))
+			 (kill-buffer (current-buffer))
+			 (error "%s not found" args-string)))
 
 		   (message "%s (cleaning...)" args-string)
 		   (Manual-nuke-nroff-bs apropos-mode)
diff -r 4de2936b4e77 -r 0132846995bd lisp/pcl-cvs/auto-autoloads.el
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lisp/pcl-cvs/auto-autoloads.el	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,28 @@
+;;; DO NOT MODIFY THIS FILE
+(if (not (featurep 'pcl-cvs-autoloads))
+    (progn
+
+;;;### (autoloads (pcl-cvs-fontify) "pcl-cvs-xemacs" "pcl-cvs/pcl-cvs-xemacs.el")
+
+(autoload 'pcl-cvs-fontify "pcl-cvs-xemacs" nil nil nil)
+
+;;;***
+
+;;;### (autoloads (cvs-update-other-window cvs-update) "pcl-cvs" "pcl-cvs/pcl-cvs.el")
+
+(autoload 'cvs-update "pcl-cvs" "\
+Run a 'cvs update' in the current working directory.  Feed the
+output to a *cvs* buffer and run cvs-mode on it.
+If optional prefix argument LOCAL is non-nil, 'cvs update -l' is run." t nil)
+
+(autoload 'cvs-update-other-window "pcl-cvs" "\
+Run a 'cvs update' in the current working directory.  Feed the
+output to a *cvs* buffer, display it in the other window, and run
+cvs-mode on it.
+
+If optional prefix argument LOCAL is non-nil, 'cvs update -l' is run." t nil)
+
+;;;***
+
+(provide 'pcl-cvs-autoloads)
+))
diff -r 4de2936b4e77 -r 0132846995bd lisp/pcl-cvs/custom-load.el
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lisp/pcl-cvs/custom-load.el	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,65 @@
+(put 'copyright 'custom-loads '())
+(put 'eldoc 'custom-loads '())
+(put 'execute 'custom-loads '())
+(put 'mouse 'custom-loads '())
+(put 'mail-abbrevs 'custom-loads '())
+(put 'etags 'custom-loads '())
+(put 'limits 'custom-loads '())
+(put 'minibuffer 'custom-loads '())
+(put 'environment 'custom-loads '())
+(put 'sound 'custom-loads '())
+(put 'holidays 'custom-loads '())
+(put 'auto-save 'custom-loads '())
+(put 'ispell 'custom-loads '())
+(put 'fortran-indent 'custom-loads '())
+(put 'lpr 'custom-loads '())
+(put 'message-headers 'custom-loads '())
+(put 'editing-basics 'custom-loads '())
+(put 'internal 'custom-loads '())
+(put 'calendar 'custom-loads '())
+(put 'help-appearance 'custom-loads '())
+(put 'display-time 'custom-loads '())
+(put 'lisp 'custom-loads '())
+(put 'diff 'custom-loads '())
+(put 'paren-matching 'custom-loads '())
+(put 'help 'custom-loads '())
+(put 'local 'custom-loads '())
+(put 'keyboard 'custom-loads '())
+(put 'minubuffer 'custom-loads '())
+(put 'message-sending 'custom-loads '())
+(put 'data 'custom-loads '())
+(put 'ps-print 'custom-loads '())
+(put 'backup 'custom-loads '())
+(put 'frames 'custom-loads '())
+(put 'customize 'custom-loads '())
+(put 'abbrev 'custom-loads '())
+(put 'toolbar 'custom-loads '())
+(put 'compilation 'custom-loads '())
+(put 'dired 'custom-loads '())
+(put 'killing 'custom-loads '())
+(put 'paren-blinking 'custom-loads '())
+(put 'find-file 'custom-loads '())
+(put 'gnuserv 'custom-loads '())
+(put 'maint 'custom-loads '())
+(put 'fill-comments 'custom-loads '())
+(put 'message-mail 'custom-loads '())
+(put 'windows 'custom-loads '())
+(put 'message-various 'custom-loads '())
+(put 'resize-minibuffer 'custom-loads '())
+(put 'fill 'custom-loads '())
+(put 'debug 'custom-loads '())
+(put 'display 'custom-loads '())
+(put 'diary 'custom-loads '())
+(put 'browse-url 'custom-loads '())
+(put 'message-insertion 'custom-loads '())
+(put 'hyper-apropos 'custom-loads '())
+(put 'vc 'custom-loads '())
+(put 'alloc 'custom-loads '())
+(put 'isearch 'custom-loads '())
+(put 'modeline 'custom-loads '())
+(put 'processes-basics 'custom-loads '())
+(put 'editing 'custom-loads '())
+(put 'matching 'custom-loads '())
+(put 'ps-print-color 'custom-loads '())
+(put 'undo 'custom-loads '())
+(put 'x 'custom-loads '())
diff -r 4de2936b4e77 -r 0132846995bd lisp/prim/auto-autoloads.el
--- a/lisp/prim/auto-autoloads.el	Mon Aug 13 09:42:28 2007 +0200
+++ b/lisp/prim/auto-autoloads.el	Mon Aug 13 09:43:35 2007 +0200
@@ -1,7875 +1,6 @@
-;;; Do NOT edit this file!
-;;; It is automatically generated using "make autoloads"
-;;; See update-autoloads.sh and autoload.el for more details.
-
-
-;;;### (autoloads (BibTeX-auto-store) "latex" "auctex/latex.el")
-
-(autoload 'BibTeX-auto-store "latex" "\
-This function should be called from bibtex-mode-hook.
-It will setup BibTeX to store keys in an auto file." nil nil)
-
-;;;***
-
-;;;### (autoloads nil "tex-info" "auctex/tex-info.el")
-
-;;;***
-
-;;;### (autoloads (japanese-latex-mode japanese-plain-tex-mode) "tex-jp" "auctex/tex-jp.el")
-
-(autoload 'japanese-plain-tex-mode "tex-jp" "\
-Major mode for editing files of input for Japanese plain TeX.
-Set japanese-TeX-mode to t, and enters plain-tex-mode." t nil)
-
-(autoload 'japanese-latex-mode "tex-jp" "\
-Major mode for editing files of input for Japanese plain TeX.
-Set japanese-TeX-mode to t, and enters latex-mode." t nil)
-
-;;;***
-
-;;;### (autoloads (TeX-submit-bug-report TeX-insert-quote TeX-auto-generate-global TeX-auto-generate ams-tex-mode) "tex" "auctex/tex.el")
-
-(autoload 'ams-tex-mode "tex" "\
-Major mode for editing files of input for AmS TeX.
-See info under AUC TeX for documentation.
-
-Special commands:
-\\{TeX-mode-map}
- 
-Entering AmS-tex-mode calls the value of text-mode-hook,
-then the value of TeX-mode-hook, and then the value
-of AmS-TeX-mode-hook." t nil)
-
-(autoload 'TeX-auto-generate "tex" "\
-Generate style file for TEX and store it in AUTO.  
-If TEX is a directory, generate style files for all files in the directory." t nil)
-
-(autoload 'TeX-auto-generate-global "tex" "\
-Create global auto directory for global TeX macro definitions." t nil)
-
-(autoload 'TeX-insert-quote "tex" "\
-Insert the appropriate quote marks for TeX.
-Inserts the value of `TeX-open-quote' (normally ``) or `TeX-close-quote'
-\(normally '') depending on the context.  If `TeX-quote-after-quote'
-is non-nil, this insertion works only after \". 
-With prefix argument, always inserts \" characters." t nil)
-
-(autoload 'TeX-submit-bug-report "tex" "\
-Submit via mail a bug report on AUC TeX" t nil)
-
-;;;***
-
-;;;### (autoloads (batch-byte-recompile-directory batch-byte-recompile-directory-norecurse batch-byte-compile display-call-tree byte-compile-sexp byte-compile compile-defun byte-compile-file byte-recompile-file byte-recompile-directory byte-force-recompile) "bytecomp" "bytecomp/bytecomp.el")
-
-(autoload 'byte-force-recompile "bytecomp" "\
-Recompile every `.el' file in DIRECTORY that already has a `.elc' file.
-Files in subdirectories of DIRECTORY are processed also." t nil)
-
-(autoload 'byte-recompile-directory "bytecomp" "\
-Recompile every `.el' file in DIRECTORY that needs recompilation.
-This is if a `.elc' file exists but is older than the `.el' file.
-Files in subdirectories of DIRECTORY are processed also unless argument
-NORECURSION is non-nil.
-
-If the `.elc' file does not exist, normally the `.el' file is *not* compiled.
-But a prefix argument (optional second arg) means ask user,
-for each such `.el' file, whether to compile it.  Prefix argument 0 means
-don't ask and compile the file anyway.
-
-A nonzero prefix argument also means ask about each subdirectory.
-
-If the fourth argument FORCE is non-nil,
-recompile every `.el' file that already has a `.elc' file." t nil)
-
-(autoload 'byte-recompile-file "bytecomp" "\
-Recompile a file of Lisp code named FILENAME if it needs recompilation.
-This is if the `.elc' file exists but is older than the `.el' file.
-
-If the `.elc' file does not exist, normally the `.el' file is *not*
-compiled.  But a prefix argument (optional second arg) means ask user
-whether to compile it.  Prefix argument 0 don't ask and recompile anyway." t nil)
-
-(autoload 'byte-compile-file "bytecomp" "\
-Compile a file of Lisp code named FILENAME into a file of byte code.
-The output file's name is made by appending `c' to the end of FILENAME.
-With prefix arg (noninteractively: 2nd arg), load the file after compiling." t nil)
-
-(autoload 'compile-defun "bytecomp" "\
-Compile and evaluate the current top-level form.
-Print the result in the minibuffer.
-With argument, insert value in current buffer after the form." t nil)
-
-(autoload 'byte-compile "bytecomp" "\
-If FORM is a symbol, byte-compile its function definition.
-If FORM is a lambda or a macro, byte-compile it as a function." nil nil)
-
-(autoload 'byte-compile-sexp "bytecomp" "\
-Compile and return SEXP." nil nil)
-
-(autoload 'display-call-tree "bytecomp" "\
-Display a call graph of a specified file.
-This lists which functions have been called, what functions called
-them, and what functions they call.  The list includes all functions
-whose definitions have been compiled in this Emacs session, as well as
-all functions called by those functions.
-
-The call graph does not include macros, inline functions, or
-primitives that the byte-code interpreter knows about directly (eq,
-cons, etc.).
-
-The call tree also lists those functions which are not known to be called
-\(that is, to which no calls have been compiled), and which cannot be
-invoked interactively." t nil)
-
-(autoload 'batch-byte-compile "bytecomp" "\
-Run `byte-compile-file' on the files remaining on the command line.
-Use this from the command line, with `-batch';
-it won't work in an interactive Emacs.
-Each file is processed even if an error occurred previously.
-For example, invoke \"emacs -batch -f batch-byte-compile $emacs/ ~/*.el\"" nil nil)
-
-(autoload 'batch-byte-recompile-directory-norecurse "bytecomp" "\
-Same as `batch-byte-recompile-directory' but without recursion." nil nil)
-
-(autoload 'batch-byte-recompile-directory "bytecomp" "\
-Runs `byte-recompile-directory' on the dirs remaining on the command line.
-Must be used only with `-batch', and kills Emacs on completion.
-For example, invoke `xemacs -batch -f batch-byte-recompile-directory .'." nil nil)
-
-;;;***
-
-;;;### (autoloads (disassemble) "disass" "bytecomp/disass.el")
-
-(autoload 'disassemble "disass" "\
-Print disassembled code for OBJECT in (optional) BUFFER.
-OBJECT can be a symbol defined as a function, or a function itself
-\(a lambda expression or a compiled-function object).
-If OBJECT is not already compiled, we compile it, but do not
-redefine OBJECT if it is a symbol." t nil)
-
-;;;***
-
-;;;### (autoloads nil "cal-dst" "calendar/cal-dst.el")
-
-(put 'calendar-daylight-savings-starts 'risky-local-variable t)
-
-(put 'calendar-daylight-savings-ends 'risky-local-variable t)
-
-;;;***
-
-;;;### (autoloads nil "cal-x" "calendar/cal-x.el")
-
-(defvar calendar-setup 'one-frame "\
-The frame set up of the calendar.
-The choices are `one-frame' (calendar and diary together in one separate,
-dediciated frame) or `two-frames' (calendar and diary in separate, dedicated
-frames); with any other value the current frame is used.")
-
-;;;***
-
-;;;### (autoloads (list-yahrzeit-dates calendar) "calendar" "calendar/calendar.el")
-
-(defcustom calendar-week-start-day 0 "*The day of the week on which a week in the calendar begins.\n0 means Sunday (default), 1 means Monday, and so on." :type 'integer :group 'calendar)
-
-(defcustom calendar-offset 0 "*The offset of the principal month from the center of the calendar window.\n0 means the principal month is in the center (default), -1 means on the left,\n+1 means on the right.  Larger (or smaller) values push the principal month off\nthe screen." :type 'integer :group 'calendar)
-
-(defcustom view-diary-entries-initially nil "*Non-nil means display current date's diary entries on entry.\nThe diary is displayed in another window when the calendar is first displayed,\nif the current date is visible.  The number of days of diary entries displayed\nis governed by the variable `number-of-diary-entries'." :type 'boolean :group 'diary)
-
-(defcustom number-of-diary-entries 1 "*Specifies how many days of diary entries are to be displayed initially.\nThis variable affects the diary display when the command M-x diary is used,\nor if the value of the variable `view-diary-entries-initially' is t.  For\nexample, if the default value 1 is used, then only the current day's diary\nentries will be displayed.  If the value 2 is used, then both the current\nday's and the next day's entries will be displayed.\n\nThe value can also be a vector such as [0 2 2 2 2 4 1]; this value\nsays to display no diary entries on Sunday, the display the entries\nfor the current date and the day after on Monday through Thursday,\ndisplay Friday through Monday's entries on Friday, and display only\nSaturday's entries on Saturday.\n\nThis variable does not affect the diary display with the `d' command\nfrom the calendar; in that case, the prefix argument controls the\nnumber of days of diary entries displayed." :type 'integer :group 'diary)
-
-(defcustom mark-diary-entries-in-calendar nil "*Non-nil means mark dates with diary entries, in the calendar window.\nThe marking symbol is specified by the variable `diary-entry-marker'." :type 'boolean :group 'diary)
-
-(defcustom view-calendar-holidays-initially nil "*Non-nil means display holidays for current three month period on entry.\nThe holidays are displayed in another window when the calendar is first\ndisplayed." :type 'boolean :group 'holidays)
-
-(defcustom mark-holidays-in-calendar nil "*Non-nil means mark dates of holidays in the calendar window.\nThe marking symbol is specified by the variable `calendar-holiday-marker'." :type 'boolean :group 'holidays)
-
-(defcustom all-hebrew-calendar-holidays nil "*If nil, show only major holidays from the Hebrew calendar.\nThis means only those Jewish holidays that appear on secular calendars.\n\nIf t, show all the holidays that would appear in a complete Hebrew calendar." :type 'boolean :group 'holidays)
-
-(defcustom all-christian-calendar-holidays nil "*If nil, show only major holidays from the Christian calendar.\nThis means only those Christian holidays that appear on secular calendars.\n\nIf t, show all the holidays that would appear in a complete Christian\ncalendar." :type 'boolean :group 'holidays)
-
-(defcustom all-islamic-calendar-holidays nil "*If nil, show only major holidays from the Islamic calendar.\nThis means only those Islamic holidays that appear on secular calendars.\n\nIf t, show all the holidays that would appear in a complete Islamic\ncalendar." :type 'boolean :group 'holidays)
-
-(defcustom calendar-load-hook nil "*List of functions to be called after the calendar is first loaded.\nThis is the place to add key bindings to `calendar-mode-map'." :type 'hook :group 'calendar)
-
-(defcustom initial-calendar-window-hook nil "*List of functions to be called when the calendar window is first opened.\nThe functions invoked are called after the calendar window is opened, but\nonce opened is never called again.  Leaving the calendar with the `q' command\nand reentering it will cause these functions to be called again." :type 'hook :group 'calendar)
-
-(defcustom today-visible-calendar-hook nil "*List of functions called whenever the current date is visible.\nThis can be used, for example, to replace today's date with asterisks; a\nfunction `calendar-star-date' is included for this purpose:\n    (setq today-visible-calendar-hook 'calendar-star-date)\nIt can also be used to mark the current date with `calendar-today-marker';\na function is also provided for this:\n    (setq today-visible-calendar-hook 'calendar-mark-today)\n\nThe corresponding variable `today-invisible-calendar-hook' is the list of\nfunctions called when the calendar function was called when the current\ndate is not visible in the window.\n\nOther than the use of the provided functions, the changing of any\ncharacters in the calendar buffer by the hooks may cause the failure of the\nfunctions that move by days and weeks." :type 'hook :group 'calendar)
-
-(defcustom today-invisible-calendar-hook nil "*List of functions called whenever the current date is not visible.\n\nThe corresponding variable `today-visible-calendar-hook' is the list of\nfunctions called when the calendar function was called when the current\ndate is visible in the window.\n\nOther than the use of the provided functions, the changing of any\ncharacters in the calendar buffer by the hooks may cause the failure of the\nfunctions that move by days and weeks." :type 'hook :group 'calendar)
-
-(defcustom diary-file "~/diary" "*Name of the file in which one's personal diary of dates is kept.\n\nThe file's entries are lines in any of the forms\n\n            MONTH/DAY\n            MONTH/DAY/YEAR\n            MONTHNAME DAY\n            MONTHNAME DAY, YEAR\n            DAYNAME\n\nat the beginning of the line; the remainder of the line is the diary entry\nstring for that date.  MONTH and DAY are one or two digit numbers, YEAR is\na number and may be written in full or abbreviated to the final two digits.\nIf the date does not contain a year, it is generic and applies to any year.\nDAYNAME entries apply to any date on which is on that day of the week.\nMONTHNAME and DAYNAME can be spelled in full, abbreviated to three\ncharacters (with or without a period), capitalized or not.  Any of DAY,\nMONTH, or MONTHNAME, YEAR can be `*' which matches any day, month, or year,\nrespectively.\n\nThe European style (in which the day precedes the month) can be used\ninstead, if you execute `european-calendar' when in the calendar, or set\n`european-calendar-style' to t in your .emacs file.  The European forms are\n\n            DAY/MONTH\n            DAY/MONTH/YEAR\n            DAY MONTHNAME\n            DAY MONTHNAME YEAR\n            DAYNAME\n\nTo revert to the default American style from the European style, execute\n`american-calendar' in the calendar.\n\nA diary entry can be preceded by the character\n`diary-nonmarking-symbol' (ordinarily `&') to make that entry\nnonmarking--that is, it will not be marked on dates in the calendar\nwindow but will appear in a diary window.\n\nMultiline diary entries are made by indenting lines after the first with\neither a TAB or one or more spaces.\n\nLines not in one the above formats are ignored.  Here are some sample diary\nentries (in the default American style):\n\n     12/22/1988 Twentieth wedding anniversary!!\n     &1/1. Happy New Year!\n     10/22 Ruth's birthday.\n     21: Payday\n     Tuesday--weekly meeting with grad students at 10am\n              Supowit, Shen, Bitner, and Kapoor to attend.\n     1/13/89 Friday the thirteenth!!\n     &thu 4pm squash game with Lloyd.\n     mar 16 Dad's birthday\n     April 15, 1989 Income tax due.\n     &* 15 time cards due.\n\nIf the first line of a diary entry consists only of the date or day name with\nno trailing blanks or punctuation, then that line is not displayed in the\ndiary window; only the continuation lines is shown.  For example, the\nsingle diary entry\n\n     02/11/1989\n      Bill Blattner visits Princeton today\n      2pm Cognitive Studies Committee meeting\n      2:30-5:30 Lizzie at Lawrenceville for `Group Initiative'\n      4:00pm Jamie Tappenden\n      7:30pm Dinner at George and Ed's for Alan Ryan\n      7:30-10:00pm dance at Stewart Country Day School\n\nwill appear in the diary window without the date line at the beginning.  This\nfacility allows the diary window to look neater, but can cause confusion if\nused with more than one day's entries displayed.\n\nDiary entries can be based on Lisp sexps.  For example, the diary entry\n\n      %%(diary-block 11 1 1990 11 10 1990) Vacation\n\ncauses the diary entry \"Vacation\" to appear from November 1 through November\n10, 1990.  Other functions available are `diary-float', `diary-anniversary',\n`diary-cyclic', `diary-day-of-year', `diary-iso-date', `diary-french-date',\n`diary-hebrew-date', `diary-islamic-date', `diary-mayan-date',\n`diary-yahrzeit', `diary-sunrise-sunset', `diary-phases-of-moon',\n`diary-parasha', `diary-omer', `diary-rosh-hodesh', and\n`diary-sabbath-candles'.  See the documentation for the function\n`list-sexp-diary-entries' for more details.\n\nDiary entries based on the Hebrew and/or the Islamic calendar are also\npossible, but because these are somewhat slow, they are ignored\nunless you set the `nongregorian-diary-listing-hook' and the\n`nongregorian-diary-marking-hook' appropriately.  See the documentation\nfor these functions for details.\n\nDiary files can contain directives to include the contents of other files; for\ndetails, see the documentation for the variable `list-diary-entries-hook'." :type 'file :group 'diary)
-
-(defcustom diary-nonmarking-symbol "&" "*Symbol indicating that a diary entry is not to be marked in the calendar." :type 'string :group 'diary)
-
-(defcustom hebrew-diary-entry-symbol "H" "*Symbol indicating a diary entry according to the Hebrew calendar." :type 'string :group 'diary)
-
-(defcustom islamic-diary-entry-symbol "I" "*Symbol indicating a diary entry according to the Islamic calendar." :type 'string :group 'diary)
-
-(defcustom diary-include-string "#include" "*The string indicating inclusion of another file of diary entries.\nSee the documentation for the function `include-other-diary-files'." :type 'string :group 'diary)
-
-(defcustom sexp-diary-entry-symbol "%%" "*The string used to indicate a sexp diary entry in diary-file.\nSee the documentation for the function `list-sexp-diary-entries'." :type 'string :group 'diary)
-
-(defcustom abbreviated-calendar-year t "*Interpret a two-digit year DD in a diary entry as either 19DD or 20DD.\nFor the Gregorian calendar; similarly for the Hebrew and Islamic calendars.\nIf this variable is nil, years must be written in full." :type 'boolean :group 'diary)
-
-(defcustom european-calendar-style nil "*Use the European style of dates in the diary and in any displays.\nIf this variable is t, a date 1/2/1990 would be interpreted as February 1,\n1990.  The accepted European date styles are\n\n            DAY/MONTH\n            DAY/MONTH/YEAR\n            DAY MONTHNAME\n            DAY MONTHNAME YEAR\n            DAYNAME\n\nNames can be capitalized or not, written in full, or abbreviated to three\ncharacters with or without a period." :type 'boolean :group 'diary)
-
-(defcustom american-date-diary-pattern '((month "/" day "[^/0-9]") (month "/" day "/" year "[^0-9]") (monthname " *" day "[^,0-9]") (monthname " *" day ", *" year "[^0-9]") (dayname "\\W")) "*List of pseudo-patterns describing the American patterns of date used.\nSee the documentation of `diary-date-forms' for an explanation." :type '(repeat (choice (cons :tag "Backup" (const backup) (repeat (list :inline t :format "%v" (symbol :tag "Keyword") (choice symbol regexp)))) (repeat (list :inline t :format "%v" (symbol :tag "Keyword") (choice symbol regexp))))) :group 'diary)
-
-(defcustom european-date-diary-pattern '((day "/" month "[^/0-9]") (day "/" month "/" year "[^0-9]") (backup day " *" monthname "\\W+\\<[^*0-9]") (day " *" monthname " *" year "[^0-9]") (dayname "\\W")) "*List of pseudo-patterns describing the European patterns of date used.\nSee the documentation of `diary-date-forms' for an explanation." :type '(repeat (choice (cons :tag "Backup" (const backup) (repeat (list :inline t :format "%v" (symbol :tag "Keyword") (choice symbol regexp)))) (repeat (list :inline t :format "%v" (symbol :tag "Keyword") (choice symbol regexp))))) :group 'diary)
-
-(defcustom european-calendar-display-form '((if dayname (concat dayname ", ")) day " " monthname " " year) "*Pseudo-pattern governing the way a date appears in the European style.\nSee the documentation of calendar-date-display-form for an explanation." :type 'sexp :group 'calendar)
-
-(defcustom american-calendar-display-form '((if dayname (concat dayname ", ")) monthname " " day ", " year) "*Pseudo-pattern governing the way a date appears in the American style.\nSee the documentation of `calendar-date-display-form' for an explanation." :type 'sexp :group 'calendar)
-
-(defcustom print-diary-entries-hook 'lpr-buffer "*List of functions called after a temporary diary buffer is prepared.\nThe buffer shows only the diary entries currently visible in the diary\nbuffer.  The default just does the printing.  Other uses might include, for\nexample, rearranging the lines into order by day and time, saving the buffer\ninstead of deleting it, or changing the function used to do the printing." :type 'hook :group 'diary)
-
-(defcustom list-diary-entries-hook nil "*List of functions called after diary file is culled for relevant entries.\nIt is to be used for diary entries that are not found in the diary file.\n\nA function `include-other-diary-files' is provided for use as the value of\nthis hook.  This function enables you to use shared diary files together\nwith your own.  The files included are specified in the diary file by lines\nof the form\n\n        #include \"filename\"\n\nThis is recursive; that is, #include directives in files thus included are\nobeyed.  You can change the \"#include\" to some other string by changing\nthe variable `diary-include-string'.  When you use `include-other-diary-files'\nas part of the list-diary-entries-hook, you will probably also want to use the\nfunction `mark-included-diary-files' as part of `mark-diary-entries-hook'.\n\nFor example, you could use\n\n     (setq list-diary-entries-hook\n       '(include-other-diary-files sort-diary-entries))\n     (setq diary-display-hook 'fancy-diary-display)\n\nin your `.emacs' file to cause the fancy diary buffer to be displayed with\ndiary entries from various included files, each day's entries sorted into\nlexicographic order." :type 'hook :group 'diary)
-
-(defcustom diary-hook nil "*List of functions called after the display of the diary.\nCan be used for appointment notification." :type 'hook :group 'diary)
-
-(defcustom diary-display-hook nil "*List of functions that handle the display of the diary.\nIf nil (the default), `simple-diary-display' is used.  Use `ignore' for no\ndiary display.\n\nOrdinarily, this just displays the diary buffer (with holidays indicated in\nthe mode line), if there are any relevant entries.  At the time these\nfunctions are called, the variable `diary-entries-list' is a list, in order\nby date, of all relevant diary entries in the form of ((MONTH DAY YEAR)\nSTRING), where string is the diary entry for the given date.  This can be\nused, for example, a different buffer for display (perhaps combined with\nholidays), or produce hard copy output.\n\nA function `fancy-diary-display' is provided as an alternative\nchoice for this hook; this function prepares a special noneditable diary\nbuffer with the relevant diary entries that has neat day-by-day arrangement\nwith headings.  The fancy diary buffer will show the holidays unless the\nvariable `holidays-in-diary-buffer' is set to nil.  Ordinarily, the fancy\ndiary buffer will not show days for which there are no diary entries, even\nif that day is a holiday; if you want such days to be shown in the fancy\ndiary buffer, set the variable `diary-list-include-blanks' to t." :type 'hook :group 'diary)
-
-(defcustom nongregorian-diary-listing-hook nil "*List of functions called for listing diary file and included files.\nAs the files are processed for diary entries, these functions are used to cull\nrelevant entries.  You can use either or both of `list-hebrew-diary-entries'\nand `list-islamic-diary-entries'.  The documentation for these functions\ndescribes the style of such diary entries." :type 'hook :group 'diary)
-
-(defcustom mark-diary-entries-hook nil "*List of functions called after marking diary entries in the calendar.\n\nA function `mark-included-diary-files' is also provided for use as the\nmark-diary-entries-hook; it enables you to use shared diary files together\nwith your own.  The files included are specified in the diary file by lines\nof the form\n        #include \"filename\"\nThis is recursive; that is, #include directives in files thus included are\nobeyed.  You can change the \"#include\" to some other string by changing the\nvariable `diary-include-string'.  When you use `mark-included-diary-files' as\npart of the mark-diary-entries-hook, you will probably also want to use the\nfunction `include-other-diary-files' as part of `list-diary-entries-hook'." :type 'hook :group 'diary)
-
-(defcustom nongregorian-diary-marking-hook nil "*List of functions called for marking diary file and included files.\nAs the files are processed for diary entries, these functions are used to cull\nrelevant entries.  You can use either or both of `mark-hebrew-diary-entries'\nand `mark-islamic-diary-entries'.  The documentation for these functions\ndescribes the style of such diary entries." :type 'hook :group 'diary)
-
-(defcustom diary-list-include-blanks nil "*If nil, do not include days with no diary entry in the list of diary entries.\nSuch days will then not be shown in the fancy diary buffer, even if they\nare holidays." :type 'boolean :group 'diary)
-
-(defcustom holidays-in-diary-buffer t "*Non-nil means include holidays in the diary display.\nThe holidays appear in the mode line of the diary buffer, or in the\nfancy diary buffer next to the date.  This slows down the diary functions\nsomewhat; setting it to nil makes the diary display faster." :type 'boolean :group 'diary)
-
-(defcustom general-holidays '((holiday-fixed 1 1 "New Year's Day") (holiday-float 1 1 3 "Martin Luther King Day") (holiday-fixed 2 2 "Ground Hog Day") (holiday-fixed 2 14 "Valentine's Day") (holiday-float 2 1 3 "President's Day") (holiday-fixed 3 17 "St. Patrick's Day") (holiday-fixed 4 1 "April Fool's Day") (holiday-float 5 0 2 "Mother's Day") (holiday-float 5 1 -1 "Memorial Day") (holiday-fixed 6 14 "Flag Day") (holiday-float 6 0 3 "Father's Day") (holiday-fixed 7 4 "Independence Day") (holiday-float 9 1 1 "Labor Day") (holiday-float 10 1 2 "Columbus Day") (holiday-fixed 10 31 "Halloween") (holiday-fixed 11 11 "Veteran's Day") (holiday-float 11 4 4 "Thanksgiving")) "*General holidays.  Default value is for the United States.\nSee the documentation for `calendar-holidays' for details." :type 'sexp :group 'holidays)
-
-(put 'general-holidays 'risky-local-variable t)
-
-(defcustom local-holidays nil "*Local holidays.\nSee the documentation for `calendar-holidays' for details." :type 'sexp :group 'holidays :group 'local)
-
-(put 'local-holidays 'risky-local-variable t)
-
-(defcustom other-holidays nil "*User defined holidays.\nSee the documentation for `calendar-holidays' for details." :type 'sexp :group 'holidays)
-
-(put 'other-holidays 'risky-local-variable t)
-
-(defvar hebrew-holidays-1 '((holiday-rosh-hashanah-etc) (if all-hebrew-calendar-holidays (holiday-julian 11 (let* ((m displayed-month) (y displayed-year) (year)) (increment-calendar-month m y -1) (let ((year (extract-calendar-year (calendar-julian-from-absolute (calendar-absolute-from-gregorian (list m 1 y)))))) (if (zerop (% (1+ year) 4)) 22 21))) "\"Tal Umatar\" (evening)"))))
-
-(put 'hebrew-holidays-1 'risky-local-variable t)
-
-(defvar hebrew-holidays-2 '((if all-hebrew-calendar-holidays (holiday-hanukkah) (holiday-hebrew 9 25 "Hanukkah")) (if all-hebrew-calendar-holidays (holiday-hebrew 10 (let ((h-year (extract-calendar-year (calendar-hebrew-from-absolute (calendar-absolute-from-gregorian (list displayed-month 28 displayed-year)))))) (if (= (% (calendar-absolute-from-hebrew (list 10 10 h-year)) 7) 6) 11 10)) "Tzom Teveth")) (if all-hebrew-calendar-holidays (holiday-hebrew 11 15 "Tu B'Shevat"))))
-
-(put 'hebrew-holidays-2 'risky-local-variable t)
-
-(defvar hebrew-holidays-3 '((if all-hebrew-calendar-holidays (holiday-hebrew 11 (let ((m displayed-month) (y displayed-year)) (increment-calendar-month m y 1) (let* ((h-year (extract-calendar-year (calendar-hebrew-from-absolute (calendar-absolute-from-gregorian (list m (calendar-last-day-of-month m y) y))))) (s-s (calendar-hebrew-from-absolute (if (= (% (calendar-absolute-from-hebrew (list 7 1 h-year)) 7) 6) (calendar-dayname-on-or-before 6 (calendar-absolute-from-hebrew (list 11 17 h-year))) (calendar-dayname-on-or-before 6 (calendar-absolute-from-hebrew (list 11 16 h-year)))))) (day (extract-calendar-day s-s))) day)) "Shabbat Shirah"))))
-
-(put 'hebrew-holidays-3 'risky-local-variable t)
-
-(defvar hebrew-holidays-4 '((holiday-passover-etc) (if (and all-hebrew-calendar-holidays (let* ((m displayed-month) (y displayed-year) (year)) (increment-calendar-month m y -1) (let ((year (extract-calendar-year (calendar-julian-from-absolute (calendar-absolute-from-gregorian (list m 1 y)))))) (= 21 (% year 28))))) (holiday-julian 3 26 "Kiddush HaHamah")) (if all-hebrew-calendar-holidays (holiday-tisha-b-av-etc))))
-
-(put 'hebrew-holidays-4 'risky-local-variable t)
-
-(defvar hebrew-holidays (append hebrew-holidays-1 hebrew-holidays-2 hebrew-holidays-3 hebrew-holidays-4) "\
-*Jewish holidays.
-See the documentation for `calendar-holidays' for details.")
-
-(put 'hebrew-holidays 'risky-local-variable t)
-
-(defvar christian-holidays '((if all-christian-calendar-holidays (holiday-fixed 1 6 "Epiphany")) (holiday-easter-etc) (if all-christian-calendar-holidays (holiday-greek-orthodox-easter)) (if all-christian-calendar-holidays (holiday-fixed 8 15 "Assumption")) (if all-christian-calendar-holidays (holiday-advent)) (holiday-fixed 12 25 "Christmas") (if all-christian-calendar-holidays (holiday-julian 12 25 "Eastern Orthodox Christmas"))) "\
-*Christian holidays.
-See the documentation for `calendar-holidays' for details.")
-
-(put 'christian-holidays 'risky-local-variable t)
-
-(defvar islamic-holidays '((holiday-islamic 1 1 (format "Islamic New Year %d" (let ((m displayed-month) (y displayed-year)) (increment-calendar-month m y 1) (extract-calendar-year (calendar-islamic-from-absolute (calendar-absolute-from-gregorian (list m (calendar-last-day-of-month m y) y))))))) (if all-islamic-calendar-holidays (holiday-islamic 1 10 "Ashura")) (if all-islamic-calendar-holidays (holiday-islamic 3 12 "Mulad-al-Nabi")) (if all-islamic-calendar-holidays (holiday-islamic 7 26 "Shab-e-Mi'raj")) (if all-islamic-calendar-holidays (holiday-islamic 8 15 "Shab-e-Bara't")) (holiday-islamic 9 1 "Ramadan Begins") (if all-islamic-calendar-holidays (holiday-islamic 9 27 "Shab-e Qadr")) (if all-islamic-calendar-holidays (holiday-islamic 10 1 "Id-al-Fitr")) (if all-islamic-calendar-holidays (holiday-islamic 12 10 "Id-al-Adha"))) "\
-*Islamic holidays.
-See the documentation for `calendar-holidays' for details.")
-
-(put 'islamic-holidays 'risky-local-variable t)
-
-(defvar solar-holidays '((if (fboundp 'atan) (solar-equinoxes-solstices)) (if (progn (require 'cal-dst) t) (funcall 'holiday-sexp calendar-daylight-savings-starts '(format "Daylight Savings Time Begins %s" (if (fboundp 'atan) (solar-time-string (/ calendar-daylight-savings-starts-time (float 60)) calendar-standard-time-zone-name) "")))) (funcall 'holiday-sexp calendar-daylight-savings-ends '(format "Daylight Savings Time Ends %s" (if (fboundp 'atan) (solar-time-string (/ calendar-daylight-savings-ends-time (float 60)) calendar-daylight-time-zone-name) "")))) "\
-*Sun-related holidays.
-See the documentation for `calendar-holidays' for details.")
-
-(put 'solar-holidays 'risky-local-variable t)
-
-(defvar calendar-holidays (append general-holidays local-holidays other-holidays christian-holidays hebrew-holidays islamic-holidays solar-holidays) "\
-*List of notable days for the command M-x holidays.
-
-Additional holidays are easy to add to the list, just put them in the list
-`other-holidays' in your .emacs file.  Similarly, by setting any of
-`general-holidays', `local-holidays' `christian-holidays', `hebrew-holidays',
-`islamic-holidays', or `solar-holidays' to nil in your .emacs file, you can
-eliminate unwanted categories of holidays.  The intention is that (in the US)
-`local-holidays' be set in site-init.el and `other-holidays' be set by the
-user.
-
-Entries on the list are expressions that return (possibly empty) lists of
-items of the form ((month day year) string) of a holiday in the in the
-three-month period centered around `displayed-month' of `displayed-year'.
-Several basic functions are provided for this purpose:
-
-    (holiday-fixed MONTH DAY STRING) is a fixed date on the Gregorian calendar
-    (holiday-float MONTH DAYNAME K STRING &optional day) is the Kth DAYNAME in
-                               MONTH on the Gregorian calendar (0 for Sunday,
-                               etc.); K<0 means count back from the end of the
-                               month. An optional parameter DAY means the Kth
-                               DAYNAME after/before MONTH DAY.
-    (holiday-hebrew MONTH DAY STRING)  a fixed date on the Hebrew calendar
-    (holiday-islamic MONTH DAY STRING) a fixed date on the Islamic calendar
-    (holiday-julian MONTH DAY STRING)  a fixed date on the Julian calendar
-    (holiday-sexp SEXP STRING) SEXP is a Gregorian-date-valued expression
-                               in the variable `year'; if it evaluates to
-                               a visible date, that's the holiday; if it
-                               evaluates to nil, there's no holiday.  STRING
-                               is an expression in the variable `date'.
-
-For example, to add Bastille Day, celebrated in France on July 14, add
-
-     (holiday-fixed 7 14 \"Bastille Day\")
-
-to the list.  To add Hurricane Supplication Day, celebrated in the Virgin
-Islands on the fourth Monday in August, add
-
-     (holiday-float 8 1 4 \"Hurricane Supplication Day\")
-
-to the list (the last Monday would be specified with `-1' instead of `4').
-To add the last day of Hanukkah to the list, use
-
-     (holiday-hebrew 10 2 \"Last day of Hanukkah\")
-
-since the Hebrew months are numbered with 1 starting from Nisan, while to
-add the Islamic feast celebrating Mohammed's birthday use
-
-     (holiday-islamic 3 12 \"Mohammed's Birthday\")
-
-since the Islamic months are numbered from 1 starting with Muharram.  To
-add Thomas Jefferson's birthday, April 2, 1743 (Julian), use
-
-     (holiday-julian 4 2 \"Jefferson's Birthday\")
-
-To include a holiday conditionally, use the sexp form or a conditional.  For
-example, to include American presidential elections, which occur on the first
-Tuesday after the first Monday in November of years divisible by 4, add
-
-     (holiday-sexp
-       (if (zerop (% year 4))
-           (calendar-gregorian-from-absolute
-             (1+ (calendar-dayname-on-or-before
-                   1 (+ 6 (calendar-absolute-from-gregorian
-                            (list 11 1 year)))))))
-       \"US Presidential Election\")
-
-or
-
-     (if (zerop (% displayed-year 4))
-         (holiday-fixed 11
-                (extract-calendar-day
-                 (calendar-gregorian-from-absolute
-                  (1+ (calendar-dayname-on-or-before
-                       1 (+ 6 (calendar-absolute-from-gregorian
-                               (list 11 1 displayed-year)))))))
-                \"US Presidential Election\"))
-
-to the list.  To include the phases of the moon, add
-
-     (lunar-phases)
-
-to the holiday list, where `lunar-phases' is an Emacs-Lisp function that
-you've written to return a (possibly empty) list of the relevant VISIBLE dates
-with descriptive strings such as
-
-     (((2 6 1989) \"New Moon\") ((2 12 1989) \"First Quarter Moon\") ... ).")
-
-(put 'calendar-holidays 'risky-local-variable t)
-
-(autoload 'calendar "calendar" "\
-Display a three-month calendar in another window.
-The three months appear side by side, with the current month in the middle
-surrounded by the previous and next months.  The cursor is put on today's date.
-
-If called with an optional prefix argument, prompts for month and year.
-
-This function is suitable for execution in a .emacs file; appropriate setting
-of the variable `view-diary-entries-initially' will cause the diary entries for
-the current date to be displayed in another window.  The value of the variable
-`number-of-diary-entries' controls the number of days of diary entries
-displayed upon initial display of the calendar.
-
-An optional prefix argument ARG causes the calendar displayed to be ARG
-months in the future if ARG is positive or in the past if ARG is negative;
-in this case the cursor goes on the first day of the month.
-
-Once in the calendar window, future or past months can be moved into view.
-Arbitrary months can be displayed, or the calendar can be scrolled forward
-or backward.
-
-The cursor can be moved forward or backward by one day, one week, one month,
-or one year.  All of these commands take prefix arguments which, when negative,
-cause movement in the opposite direction.  For convenience, the digit keys
-and the minus sign are automatically prefixes.  The window is replotted as
-necessary to display the desired date.
-
-Diary entries can be marked on the calendar or displayed in another window.
-
-Use M-x describe-mode for details of the key bindings in the calendar window.
-
-The Gregorian calendar is assumed.
-
-After loading the calendar, the hooks given by the variable
-`calendar-load-hook' are run.  This is the place to add key bindings to the
-calendar-mode-map.
-
-After preparing the calendar window initially, the hooks given by the variable
-`initial-calendar-window-hook' are run.
-
-The hooks given by the variable `today-visible-calendar-hook' are run
-everytime the calendar window gets scrolled, if the current date is visible
-in the window.  If it is not visible, the hooks given by the variable
-`today-invisible-calendar-hook' are run.  Thus, for example, setting
-`today-visible-calendar-hook' to 'calendar-star-date will cause today's date
-to be replaced by asterisks to highlight it whenever it is in the window." t nil)
-
-(autoload 'list-yahrzeit-dates "calendar" "\
-List Yahrzeit dates for *Gregorian* DEATH-DATE from START-YEAR to END-YEAR.
-When called interactively from the calendar window, the date of death is taken
-from the cursor position." t nil)
-
-;;;***
-
-;;;### (autoloads (diary) "diary-lib" "calendar/diary-lib.el")
-
-(autoload 'diary "diary-lib" "\
-Generate the diary window for ARG days starting with the current date.
-If no argument is provided, the number of days of diary entries is governed
-by the variable `number-of-diary-entries'.  This function is suitable for
-execution in a `.emacs' file." t nil)
-
-;;;***
-
-;;;### (autoloads (holidays) "holidays" "calendar/holidays.el")
-
-(autoload 'holidays "holidays" "\
-Display the holidays for last month, this month, and next month.
-If called with an optional prefix argument, prompts for month and year.
-
-This function is suitable for execution in a .emacs file." t nil)
-
-;;;***
-
-;;;### (autoloads (phases-of-moon) "lunar" "calendar/lunar.el")
-
-(autoload 'phases-of-moon "lunar" "\
-Display the quarters of the moon for last month, this month, and next month.
-If called with an optional prefix argument, prompts for month and year.
-
-This function is suitable for execution in a .emacs file." t nil)
-
-;;;***
-
-;;;### (autoloads (solar-equinoxes-solstices sunrise-sunset) "solar" "calendar/solar.el")
-
-(defvar calendar-time-display-form '(12-hours ":" minutes am-pm (if time-zone " (") time-zone (if time-zone ")")) "\
-*The pseudo-pattern that governs the way a time of day is formatted.
-
-A pseudo-pattern is a list of expressions that can involve the keywords
-`12-hours', `24-hours', and `minutes',  all numbers in string form,
-and `am-pm' and `time-zone',  both alphabetic strings.
-
-For example, the form
-
-  '(24-hours \":\" minutes
-    (if time-zone \" (\") time-zone (if time-zone \")\"))
-
-would give military-style times like `21:07 (UTC)'.")
-
-(defvar calendar-latitude nil "\
-*Latitude of `calendar-location-name' in degrees.
-
-The value can be either a decimal fraction (one place of accuracy is
-sufficient), + north, - south, such as 40.7 for New York City, or the value
-can be a vector [degrees minutes north/south] such as [40 50 north] for New
-York City.
-
-This variable should be set in site-local.el.")
-
-(defvar calendar-longitude nil "\
-*Longitude of `calendar-location-name' in degrees.
-
-The value can be either a decimal fraction (one place of accuracy is
-sufficient), + east, - west, such as -73.9 for New York City, or the value
-can be a vector [degrees minutes east/west] such as [73 55 west] for New
-York City.
-
-This variable should be set in site-local.el.")
-
-(defvar calendar-location-name '(let ((float-output-format "%.1f")) (format "%s%s, %s%s" (if (numberp calendar-latitude) (abs calendar-latitude) (+ (aref calendar-latitude 0) (/ (aref calendar-latitude 1) 60.0))) (if (numberp calendar-latitude) (if (> calendar-latitude 0) "N" "S") (if (equal (aref calendar-latitude 2) 'north) "N" "S")) (if (numberp calendar-longitude) (abs calendar-longitude) (+ (aref calendar-longitude 0) (/ (aref calendar-longitude 1) 60.0))) (if (numberp calendar-longitude) (if (> calendar-longitude 0) "E" "W") (if (equal (aref calendar-latitude 2) 'east) "E" "W")))) "\
-*Expression evaluating to name of `calendar-longitude', calendar-latitude'.
-For example, \"New York City\".  Default value is just the latitude, longitude
-pair.
-
-This variable should be set in site-local.el.")
-
-(autoload 'sunrise-sunset "solar" "\
-Local time of sunrise and sunset for today.  Accurate to +/- 2 minutes.
-If called with an optional prefix argument, prompt for date.
-
-If called with an optional double prefix argument, prompt for longitude,
-latitude, time zone, and date, and always use standard time.
-
-This function is suitable for execution in a .emacs file." t nil)
-
-(autoload 'solar-equinoxes-solstices "solar" "\
-Date and time of equinoxes and solstices, if visible in the calendar window.
-Requires floating point." nil nil)
-
-;;;***
-
-;;;### (autoloads (background) "background" "comint/background.el")
-
-(autoload 'background "background" "\
-Run COMMAND in the background like csh.  
-A message is displayed when the job starts and finishes.  The buffer is in
-comint mode, so you can send input and signals to the job.  The process object
-is returned if anyone cares.  See also comint-mode and the variables
-background-show and background-select.
-
-Optional second argument BUFFER-NAME is a buffer to insert the output into.
-If omitted, a buffer name is constructed from the command run." t nil)
-
-;;;***
-
-;;;### (autoloads (comint-dynamic-list-completions comint-dynamic-complete comint-run make-comint) "comint" "comint/comint.el")
-
-(autoload 'make-comint "comint" "\
-Make a comint process NAME in a buffer, running PROGRAM.
-The name of the buffer is made by surrounding NAME with `*'s.
-PROGRAM should be either a string denoting an executable program to create
-via `start-process', or a cons pair of the form (HOST . SERVICE) denoting a TCP
-connection to be opened via `open-network-stream'.  If there is already a
-running process in that buffer, it is not restarted.  Optional third arg
-STARTFILE is the name of a file to send the contents of to the process.
-
-If PROGRAM is a string, any more args are arguments to PROGRAM." nil nil)
-
-(autoload 'comint-run "comint" "\
-Run PROGRAM in a comint buffer and switch to it.
-The buffer name is made by surrounding the file name of PROGRAM with `*'s.
-The file name is used to make a symbol name, such as `comint-sh-hook', and any
-hooks on this symbol are run in the buffer.
-See `make-comint' and `comint-exec'." t nil)
-
-(autoload 'comint-dynamic-complete "comint" "\
-Dynamically perform completion at point.
-Calls the functions in `comint-dynamic-complete-functions' to perform
-completion until a function returns non-nil, at which point completion is
-assumed to have occurred." t nil)
-
-(autoload 'comint-dynamic-list-completions "comint" "\
-List in help buffer sorted COMPLETIONS.
-Typing SPC flushes the help buffer." nil nil)
-
-;;;***
-
-;;;### (autoloads (gdb) "gdb" "comint/gdb.el")
-
-(defvar gdb-command-name "gdb" "\
-Pathname for executing gdb.")
-
-(autoload 'gdb "gdb" "\
-Run gdb on program FILE in buffer *gdb-FILE*.
-The directory containing FILE becomes the initial working directory
-and source-file directory for GDB.  If you wish to change this, use
-the GDB commands `cd DIR' and `directory'." t nil)
-
-;;;***
-
-;;;### (autoloads (gdbsrc) "gdbsrc" "comint/gdbsrc.el")
-
-(autoload 'gdbsrc "gdbsrc" "\
-Activates a gdb session with gdbsrc-mode turned on.  A numeric prefix
-argument can be used to specify a running process to attach, and a non-numeric
-prefix argument will cause you to be prompted for a core file to debug." t nil)
-
-;;;***
-
-;;;### (autoloads (perldb xdb dbx sdb) "gud" "comint/gud.el")
-
-(autoload 'sdb "gud" "\
-Run sdb on program FILE in buffer *gud-FILE*.
-The directory containing FILE becomes the initial working directory
-and source-file directory for your debugger." t nil)
-
-(autoload 'dbx "gud" "\
-Run dbx on program FILE in buffer *gud-FILE*.
-The directory containing FILE becomes the initial working directory
-and source-file directory for your debugger." t nil)
-
-(autoload 'xdb "gud" "\
-Run xdb on program FILE in buffer *gud-FILE*.
-The directory containing FILE becomes the initial working directory
-and source-file directory for your debugger.
-
-You can set the variable 'gud-xdb-directories' to a list of program source
-directories if your program contains sources from more than one directory." t nil)
-
-(autoload 'perldb "gud" "\
-Run perldb on program FILE in buffer *gud-FILE*.
-The directory containing FILE becomes the initial working directory
-and source-file directory for your debugger." t nil)
-
-;;;***
-
-;;;### (autoloads nil "inf-lisp" "comint/inf-lisp.el")
-
-(add-hook 'same-window-buffer-names "*inferior-lisp*")
-
-;;;***
-
-;;;### (autoloads (rlogin) "rlogin" "comint/rlogin.el")
-
-(add-hook 'same-window-regexps "^\\*rlogin-.*\\*\\(\\|<[0-9]+>\\)")
-
-(autoload 'rlogin "rlogin" "\
-Open a network login connection to HOST via the `rlogin' program.
-Input is sent line-at-a-time to the remote connection.
-
-Communication with the remote host is recorded in a buffer `*rlogin-HOST*'
-\(or `*rlogin-USER@HOST*' if the remote username differs).
-If a prefix argument is given and the buffer `*rlogin-HOST*' already exists,
-a new buffer with a different connection will be made.
-
-When called from a program, if the optional second argument is a string or 
-buffer, it names the buffer to use.
-
-The variable `rlogin-program' contains the name of the actual program to
-run.  It can be a relative or absolute path.
-
-The variable `rlogin-explicit-args' is a list of arguments to give to
-the rlogin when starting.  They are added after any arguments given in
-INPUT-ARGS.
-
-If the default value of `rlogin-directory-tracking-mode' is t, then the
-default directory in that buffer is set to a remote (FTP) file name to
-access your home directory on the remote machine.  Occasionally this causes
-an error, if you cannot access the home directory on that machine.  This
-error is harmless as long as you don't try to use that default directory.
-
-If `rlogin-directory-tracking-mode' is neither t nor nil, then the default
-directory is initially set up to your (local) home directory.
-This is useful if the remote machine and your local machine
-share the same files via NFS.  This is the default.
-
-If you wish to change directory tracking styles during a session, use the
-function `rlogin-directory-tracking-mode' rather than simply setting the
-variable." t nil)
-
-;;;***
-
-;;;### (autoloads (shell) "shell" "comint/shell.el")
-
-(defvar shell-prompt-pattern (purecopy "^[^#$%>\n]*[#$%>] *") "\
-Regexp to match prompts in the inferior shell.
-Defaults to \"^[^#$%>\\n]*[#$%>] *\", which works pretty well.
-This variable is used to initialise `comint-prompt-regexp' in the
-shell buffer.
-
-The pattern should probably not match more than one line.  If it does,
-shell-mode may become confused trying to distinguish prompt from input
-on lines which don't start with a prompt.
-
-This is a fine thing to set in your `.emacs' file.")
-
-(autoload 'shell "shell" "\
-Run an inferior shell, with I/O through buffer *shell*.
-If buffer exists but shell process is not running, make new shell.
-If buffer exists and shell process is running, 
- just switch to buffer `*shell*'.
-Program used comes from variable `explicit-shell-file-name',
- or (if that is nil) from the ESHELL environment variable,
- or else from SHELL if there is no ESHELL.
-If a file `~/.emacs_SHELLNAME' exists, it is given as initial input
- (Note that this may lose due to a timing error if the shell
-  discards input when it starts up.)
-The buffer is put in Shell mode, giving commands for sending input
-and controlling the subjobs of the shell.  See `shell-mode'.
-See also the variable `shell-prompt-pattern'.
-
-The shell file name (sans directories) is used to make a symbol name
-such as `explicit-csh-args'.  If that symbol is a variable,
-its value is used as a list of arguments when invoking the shell.
-Otherwise, one argument `-i' is passed to the shell.
-
-\(Type \\[describe-mode] in the shell buffer for a list of commands.)" t nil)
-
-(add-hook 'same-window-buffer-names "*shell*")
-
-;;;***
-
-;;;### (autoloads (ssh) "ssh" "comint/ssh.el")
-
-(add-hook 'same-window-regexps "^\\*ssh-.*\\*\\(\\|<[0-9]+>\\)")
-
-(autoload 'ssh "ssh" "\
-Open a network login connection via `ssh' with args INPUT-ARGS.
-INPUT-ARGS should start with a host name; it may also contain
-other arguments for `ssh'.
-
-Input is sent line-at-a-time to the remote connection.
-
-Communication with the remote host is recorded in a buffer `*ssh-HOST*'
-\(or `*ssh-USER@HOST*' if the remote username differs).
-If a prefix argument is given and the buffer `*ssh-HOST*' already exists,
-a new buffer with a different connection will be made.
-
-When called from a program, if the optional second argument BUFFER is
-a string or buffer, it specifies the buffer to use.
-
-The variable `ssh-program' contains the name of the actual program to
-run.  It can be a relative or absolute path.
-
-The variable `ssh-explicit-args' is a list of arguments to give to
-the ssh when starting.  They are prepended to any arguments given in
-INPUT-ARGS.
-
-If the default value of `ssh-directory-tracking-mode' is t, then the
-default directory in that buffer is set to a remote (FTP) file name to
-access your home directory on the remote machine.  Occasionally this causes
-an error, if you cannot access the home directory on that machine.  This
-error is harmless as long as you don't try to use that default directory.
-
-If `ssh-directory-tracking-mode' is neither t nor nil, then the default
-directory is initially set up to your (local) home directory.
-This is useful if the remote machine and your local machine
-share the same files via NFS.  This is the default.
-
-If you wish to change directory tracking styles during a session, use the
-function `ssh-directory-tracking-mode' rather than simply setting the
-variable." t nil)
-
-;;;***
-
-;;;### (autoloads (rsh telnet) "telnet" "comint/telnet.el")
-
-(add-hook 'same-window-regexps "\\*telnet-.*\\*\\(\\|<[0-9]+>\\)")
-
-(autoload 'telnet "telnet" "\
-Open a network login connection to host named HOST (a string).
-With a prefix argument, prompts for the port name or number as well.
-Communication with HOST is recorded in a buffer `*HOST-telnet*'.
-Normally input is edited in Emacs and sent a line at a time.
-See also `\\[rsh]'." t nil)
-
-(add-hook 'same-window-regexps "\\*rsh-[^-]*\\*\\(\\|<[0-9]*>\\)")
-
-(autoload 'rsh "telnet" "\
-Open a network login connection to host named HOST (a string).
-Communication with HOST is recorded in a buffer `*rsh-HOST*'.
-Normally input is edited in Emacs and sent a line at a time.
-See also `\\[telnet]'." t nil)
-
-;;;***
-
-;;;### (autoloads (customize-menu-create custom-menu-create custom-save-all custom-save-customized custom-buffer-create-other-window custom-buffer-create 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 custom-set-variable custom-set-value) "cus-edit" "custom/cus-edit.el")
-
-(autoload 'custom-set-value "cus-edit" "\
-Set VARIABLE to VALUE.  VALUE is a Lisp object.
-
-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 'custom-set-variable "cus-edit" "\
-Set the default for VARIABLE to VALUE.  VALUE is a Lisp object.
-
-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\".
-Initially the top-level group `Emacs' and its immediate subgroups
-are shown; the contents of those subgroups are initially hidden." t nil)
-
-(autoload 'customize-group "cus-edit" "\
-Customize GROUP, which must be a customization group." t nil)
-
-(autoload 'customize-group-other-window "cus-edit" "\
-Customize SYMBOL, which must be a customization group." t nil)
-
-(defalias 'customize-variable 'customize-option)
-
-(autoload 'customize-option "cus-edit" "\
-Customize SYMBOL, which must be a user option variable." t nil)
-
-(defalias 'customize-variable-other-window 'customize-option-other-window)
-
-(autoload 'customize-option-other-window "cus-edit" "\
-Customize SYMBOL, which must be a user option variable.
-Show the buffer in another window, but don't select it." t nil)
-
-(autoload 'customize-face "cus-edit" "\
-Customize SYMBOL, which should be a face name or nil.
-If SYMBOL is nil, customize all faces." t nil)
-
-(autoload 'customize-face-other-window "cus-edit" "\
-Show customization buffer for FACE in other window." t nil)
-
-(autoload 'customize-customized "cus-edit" "\
-Customize all user options set since the last save in this session." t nil)
-
-(autoload 'customize-saved "cus-edit" "\
-Customize all already saved user options." t nil)
-
-(autoload 'customize-apropos "cus-edit" "\
-Customize all user options matching REGEXP.
-If ALL (e.g., started with a prefix key), include options which are not
-user-settable." t nil)
-
-(autoload 'custom-buffer-create "cus-edit" "\
-Create a buffer containing OPTIONS.
-Optional NAME is the name of the buffer.
-OPTIONS should be an alist of the form ((SYMBOL WIDGET)...), where
-SYMBOL is a customization option, and WIDGET is a widget for editing
-that option." nil nil)
-
-(autoload 'custom-buffer-create-other-window "cus-edit" "\
-Create a buffer containing OPTIONS.
-Optional NAME is the name of the buffer.
-OPTIONS should be an alist of the form ((SYMBOL WIDGET)...), where
-SYMBOL is a customization option, and WIDGET is a widget for editing
-that option." nil nil)
-
-(autoload 'custom-save-customized "cus-edit" "\
-Save all user options which have been set in this session." t nil)
-
-(autoload 'custom-save-all "cus-edit" "\
-Save all customizations in `custom-file'." nil nil)
-
-(autoload 'custom-menu-create "cus-edit" "\
-Create menu for customization group SYMBOL.
-The menu is in a format applicable to `easy-menu-define'." nil nil)
-
-(autoload 'customize-menu-create "cus-edit" "\
-Return a customize menu for customization group SYMBOL.
-If optional NAME is given, use that as the name of the menu. 
-Otherwise the menu will be named `Customize'.
-The format is suitable for use with `easy-menu-define'." nil nil)
-
-;;;***
-
-;;;### (autoloads (custom-set-faces custom-initialize-frame custom-declare-face) "cus-face" "custom/cus-face.el")
-
-(autoload 'custom-declare-face "cus-face" "\
-Like `defface', but FACE is evaluated as a normal argument." nil nil)
-
-(autoload 'custom-initialize-frame "cus-face" "\
-Initialize local faces for FRAME if necessary.
-If FRAME is missing or nil, the first member of (frame-list) is used." nil nil)
-
-(autoload 'custom-set-faces "cus-face" "\
-Initialize faces according to user preferences.
-The arguments should be a list where each entry has the form:
-
-  (FACE SPEC [NOW])
-
-SPEC will be stored as the saved value for FACE.  If NOW is present
-and non-nil, FACE will also be created according to SPEC.
-
-See `defface' for the format of SPEC." nil nil)
-
-;;;***
-
-;;;### (autoloads (widget-minor-mode widget-browse-other-window widget-browse widget-browse-at) "wid-browse" "custom/wid-browse.el")
-
-(autoload 'widget-browse-at "wid-browse" "\
-Browse the widget under point." t nil)
-
-(autoload 'widget-browse "wid-browse" "\
-Create a widget browser for WIDGET." t nil)
-
-(autoload 'widget-browse-other-window "wid-browse" "\
-Show widget browser for WIDGET in other window." t nil)
-
-(autoload 'widget-minor-mode "wid-browse" "\
-Togle minor mode for traversing widgets.
-With arg, turn widget mode on if and only if arg is positive." t nil)
-
-;;;***
-
-;;;### (autoloads (widget-delete widget-create widget-prompt-value widget-apply) "wid-edit" "custom/wid-edit.el")
-
-(autoload 'widget-apply "wid-edit" "\
-Apply the value of WIDGET's PROPERTY to the widget itself.
-ARGS are passed as extra arguments to the function." nil nil)
-
-(autoload 'widget-prompt-value "wid-edit" "\
-Prompt for a value matching WIDGET, using PROMPT.
-The current value is assumed to be VALUE, unless UNBOUND is non-nil." nil nil)
-
-(autoload 'widget-create "wid-edit" "\
-Create widget of TYPE.  
-The optional ARGS are additional keyword arguments." nil nil)
-
-(autoload 'widget-delete "wid-edit" "\
-Delete WIDGET." nil nil)
-
-;;;***
-
-;;;### (autoloads (edebug-eval-top-level-form def-edebug-spec) "edebug" "edebug/edebug.el")
-
-(autoload 'def-edebug-spec "edebug" "\
-Set the edebug-form-spec property of SYMBOL according to SPEC.
-Both SYMBOL and SPEC are unevaluated. The SPEC can be 0, t, a symbol
-\(naming a function), or a list." nil 'macro)
-
-(defalias 'edebug-defun 'edebug-eval-top-level-form)
-
-(autoload 'edebug-eval-top-level-form "edebug" "\
-Evaluate a top level form, such as a defun or defmacro.
-This is like `eval-defun', but the code is always instrumented for Edebug.
-Print its name in the minibuffer and leave point where it is,
-or if an error occurs, leave point after it with mark at the original point." t nil)
-
-;;;***
-
-;;;### (autoloads (ediff-show-registry) "ediff-mult" "ediff/ediff-mult.el")
-
-(autoload 'ediff-show-registry "ediff-mult" "\
-Display Ediff's registry." t nil)
-
-(defalias 'eregistry 'ediff-show-registry)
-
-;;;***
-
-;;;### (autoloads (ediff-toggle-use-toolbar ediff-toggle-multiframe) "ediff-util" "ediff/ediff-util.el")
-
-(autoload 'ediff-toggle-multiframe "ediff-util" "\
-Switch from multiframe display to single-frame display and back.
-To change the default, set the variable `ediff-window-setup-function',
-which see." t nil)
-
-(autoload 'ediff-toggle-use-toolbar "ediff-util" "\
-Enable or disable Ediff toolbar.
-Works only in versions of Emacs that support toolbars.
-To change the default, set the variable `ediff-use-toolbar-p', which see." t nil)
-
-;;;***
-
-;;;### (autoloads (ediff-documentation ediff-version ediff-revision ediff-patch-buffer ediff-patch-file run-ediff-from-cvs-buffer ediff-merge-revisions-with-ancestor ediff-merge-revisions ediff-merge-buffers-with-ancestor ediff-merge-buffers ediff-merge-files-with-ancestor ediff-merge-files ediff-regions-linewise ediff-regions-wordwise ediff-windows-linewise ediff-windows-wordwise ediff-merge-directory-revisions-with-ancestor ediff-merge-directory-revisions ediff-merge-directories-with-ancestor ediff-merge-directories ediff-directories3 ediff-directory-revisions ediff-directories ediff-buffers3 ediff-buffers ediff-files3 ediff-files) "ediff" "ediff/ediff.el")
-
-(autoload 'ediff-files "ediff" "\
-Run Ediff on a pair of files, FILE-A and FILE-B." t nil)
-
-(autoload 'ediff-files3 "ediff" "\
-Run Ediff on three files, FILE-A, FILE-B, and FILE-C." t nil)
-
-(defalias 'ediff3 'ediff-files3)
-
-(defalias 'ediff 'ediff-files)
-
-(autoload 'ediff-buffers "ediff" "\
-Run Ediff on a pair of buffers, BUFFER-A and BUFFER-B." t nil)
-
-(defalias 'ebuffers 'ediff-buffers)
-
-(autoload 'ediff-buffers3 "ediff" "\
-Run Ediff on three buffers, BUFFER-A, BUFFER-B, and BUFFER-C." t nil)
-
-(defalias 'ebuffers3 'ediff-buffers3)
-
-(autoload 'ediff-directories "ediff" "\
-Run Ediff on a pair of directories, DIR1 and DIR2, comparing files that have
-the same name in both. The third argument, REGEXP, is a regular expression that
-can be used to filter out certain file names." t nil)
-
-(defalias 'edirs 'ediff-directories)
-
-(autoload 'ediff-directory-revisions "ediff" "\
-Run Ediff on a directory, DIR1, comparing its files with their revisions.
-The second argument, REGEXP, is a regular expression that filters the file
-names. Only the files that are under revision control are taken into account." t nil)
-
-(defalias 'edir-revisions 'ediff-directory-revisions)
-
-(autoload 'ediff-directories3 "ediff" "\
-Run Ediff on three directories, DIR1, DIR2, and DIR3, comparing files that
-have the same name in all three. The last argument, REGEXP, is a regular
-expression that can be used to filter out certain file names." t nil)
-
-(defalias 'edirs3 'ediff-directories3)
-
-(autoload 'ediff-merge-directories "ediff" "\
-Run Ediff on a pair of directories, DIR1 and DIR2, merging files that have
-the same name in both. The third argument, REGEXP, is a regular expression that
-can be used to filter out certain file names." t nil)
-
-(defalias 'edirs-merge 'ediff-merge-directories)
-
-(autoload 'ediff-merge-directories-with-ancestor "ediff" "\
-Merge files in directories DIR1 and DIR2 using files in ANCESTOR-DIR as ancestors.
-Ediff merges files that have identical names in DIR1, DIR2. If a pair of files
-in DIR1 and DIR2 doesn't have an ancestor in ANCESTOR-DIR, Ediff will merge
-without ancestor. The fourth argument, REGEXP, is a regular expression that
-can be used to filter out certain file names." t nil)
-
-(autoload 'ediff-merge-directory-revisions "ediff" "\
-Run Ediff on a directory, DIR1, merging its files with their revisions.
-The second argument, REGEXP, is a regular expression that filters the file
-names. Only the files that are under revision control are taken into account." t nil)
-
-(defalias 'edir-merge-revisions 'ediff-merge-directory-revisions)
-
-(autoload 'ediff-merge-directory-revisions-with-ancestor "ediff" "\
-Run Ediff on a directory, DIR1, merging its files with their revisions and ancestors.
-The second argument, REGEXP, is a regular expression that filters the file
-names. Only the files that are under revision control are taken into account." t nil)
-
-(defalias 'edir-merge-revisions-with-ancestor 'ediff-merge-directory-revisions-with-ancestor)
-
-(defalias 'edirs-merge-with-ancestor 'ediff-merge-directories-with-ancestor)
-
-(autoload 'ediff-windows-wordwise "ediff" "\
-Compare WIND-A and WIND-B, which are selected by clicking, wordwise.
-With prefix argument, DUMB-MODE, or on a non-windowing display, works as
-follows:
-If WIND-A is nil, use selected window.
-If WIND-B is nil, use window next to WIND-A." t nil)
-
-(autoload 'ediff-windows-linewise "ediff" "\
-Compare WIND-A and WIND-B, which are selected by clicking, linewise.
-With prefix argument, DUMB-MODE, or on a non-windowing display, works as
-follows:
-If WIND-A is nil, use selected window.
-If WIND-B is nil, use window next to WIND-A." t nil)
-
-(autoload 'ediff-regions-wordwise "ediff" "\
-Run Ediff on a pair of regions in two different buffers.
-Regions (i.e., point and mark) are assumed to be set in advance.
-This function is effective only for relatively small regions, up to 200
-lines. For large regions, use `ediff-regions-linewise'." t nil)
-
-(autoload 'ediff-regions-linewise "ediff" "\
-Run Ediff on a pair of regions in two different buffers.
-Regions (i.e., point and mark) are assumed to be set in advance.
-Each region is enlarged to contain full lines.
-This function is effective for large regions, over 100-200
-lines. For small regions, use `ediff-regions-wordwise'." t nil)
-
-(defalias 'ediff-merge 'ediff-merge-files)
-
-(autoload 'ediff-merge-files "ediff" "\
-Merge two files without ancestor." t nil)
-
-(autoload 'ediff-merge-files-with-ancestor "ediff" "\
-Merge two files with ancestor." t nil)
-
-(defalias 'ediff-merge-with-ancestor 'ediff-merge-files-with-ancestor)
-
-(autoload 'ediff-merge-buffers "ediff" "\
-Merge buffers without ancestor." t nil)
-
-(autoload 'ediff-merge-buffers-with-ancestor "ediff" "\
-Merge buffers with ancestor." t nil)
-
-(autoload 'ediff-merge-revisions "ediff" "\
-Run Ediff by merging two revisions of a file.
-The file is the optional FILE argument or the file visited by the current
-buffer." t nil)
-
-(autoload 'ediff-merge-revisions-with-ancestor "ediff" "\
-Run Ediff by merging two revisions of a file with a common ancestor.
-The file is the the optional FILE argument or the file visited by the current
-buffer." t nil)
-
-(autoload 'run-ediff-from-cvs-buffer "ediff" "\
-Run Ediff-merge on appropriate revisions of the selected file.
-First run after `M-x cvs-update'. Then place the cursor on a line describing a
-file and then run `run-ediff-from-cvs-buffer'." t nil)
-
-(autoload 'ediff-patch-file "ediff" "\
-Run Ediff by patching SOURCE-FILENAME." t nil)
-
-(autoload 'ediff-patch-buffer "ediff" "\
-Run Ediff by patching BUFFER-NAME." t nil)
-
-(defalias 'epatch 'ediff-patch-file)
-
-(defalias 'epatch-buffer 'ediff-patch-buffer)
-
-(autoload 'ediff-revision "ediff" "\
-Run Ediff by comparing versions of a file.
-The file is an optional FILE argument or the file visited by the current
-buffer. Use `vc.el' or `rcs.el' depending on `ediff-version-control-package'." t nil)
-
-(autoload 'ediff-version "ediff" "\
-Return string describing the version of Ediff.
-When called interactively, displays the version." t nil)
-
-(autoload 'ediff-documentation "ediff" "\
-Display Ediff's manual.
-With optional NODE, goes to that node." t nil)
-
-;;;***
-
-;;;### (autoloads nil "default-dir" "efs/default-dir.el")
-
-(defvar default-directory-function nil "\
-A function to call to compute the default-directory for the current buffer.
-If this is nil, the function default-directory will return the value of the
-variable default-directory.
-Buffer local.")
-
-;;;***
-
-;;;### (autoloads (dired-jump-back-other-frame dired-jump-back-other-window dired-jump-back dired-noselect dired-other-frame dired-other-window dired default-directory) "dired" "efs/dired.el")
-
-(autoload 'default-directory "dired" "\
- Returns the default-directory for the current buffer.
-Will use the variable default-directory-function if it non-nil." nil nil)
-
-(defvar dired-compression-method 'compress "\
-*Type of compression program to use.
-Give as a symbol.
-Currently-recognized methods are: gzip pack compact compress.
-To change this variable use \\[dired-do-compress] with a zero prefix.")
-
-(defvar dired-compression-method-alist '((gzip ".gz" ("gzip") ("gzip" "-d") "-f") (compress ".Z" ("compress" "-f") ("compress" "-d") "-f") (pack ".z" ("pack" "-f") ("unpack")) (compact ".C" ("compact") ("uncompact"))) "\
-*Association list of compression method descriptions.
- Each element of the table should be a list of the form
- 
-     (compress-type extension (compress-args) (decompress-args) force-flag)
- 
- where 
-   `compress-type' is a unique symbol in the alist to which
-      `dired-compression-method' can be set;
-   `extension' is the file extension (as a string) used by files compressed
-      by this method;
-   `compress-args' is a list of the path of the compression program and
-      flags to pass as separate arguments;
-   `decompress-args' is a list of the path of the decompression
-      program and flags to pass as separate arguments.
-   `force-flag' is the switch to pass to the command to force overwriting
-      of existing files.
- 
- For example:
- 
-   (setq dired-compression-method-alist
-         (cons '(frobnicate \".frob\" (\"frob\") (\"frob\" \"-d\") \"-f\")
-               dired-compression-method-alist))
-   => ((frobnicate \".frob\" (\"frob\") (\"frob\" \"-d\")) 
-       (gzip \".gz\" (\"gzip\") (\"gunzip\"))
-       ...)
- 
- See also: dired-compression-method <V>")
-
-(defvar dired-ls-program "ls" "\
-*Absolute or relative name of the ls program used by dired.")
-
-(defvar dired-listing-switches "-al" "\
-*Switches passed to ls for dired. MUST contain the `l' option.
-Can contain even `F', `b', `i' and `s'.")
-
-(defvar dired-chown-program (if (memq system-type '(hpux dgux usg-unix-v linux)) "chown" "/etc/chown") "\
-*Name of chown command (usually `chown' or `/etc/chown').")
-
-(defvar dired-gnutar-program nil "\
-*If non-nil, name of the GNU tar executable (e.g. \"tar\" or \"gnutar\").
-GNU tar's `z' switch is used for compressed tar files.
-If you don't have GNU tar, set this to nil: a pipe using `zcat' is then used.")
-
-(defvar dired-unshar-program nil "\
-*Set to the name of the unshar program, if you have it.")
-
-(defvar dired-local-variables-file ".dired" "\
-*If non-nil, filename for local variables for Dired.
-If Dired finds a file with that name in the current directory, it will
-temporarily insert it into the dired buffer and run `hack-local-variables'.
-
-Type \\[info] and `g' `(emacs)File Variables' `RET' for more info on
-local variables.")
-
-(defvar dired-kept-versions 2 "\
-*When cleaning directory, number of versions to keep.")
-
-(defvar dired-find-subdir nil "\
-*Determines whether dired tries to lookup a subdir in existing buffers.
-If non-nil, dired does not make a new buffer for a directory if it can be
-found (perhaps as subdir) in some existing dired buffer. If there are several
-dired buffers for a directory, then the most recently used one is chosen.
-
-Dired avoids switching to the current buffer, so that if you have
-a normal and a wildcard buffer for the same directory, C-x d RET will
-toggle between those two.")
-
-(defvar dired-use-file-transformers t "\
-*Determines whether dired uses file transformers.
-If non-nil `dired-do-shell-command' will apply file transformers to file names.
-See \\[describe-function] for dired-do-shell-command for more information.")
-
-(defvar dired-dwim-target nil "\
-*If non-nil, dired tries to guess a default target directory.
-This means that if there is a dired buffer displayed in the next window,
-use its current subdir, instead of the current subdir of this dired buffer.
-The target is put in the prompt for file copy, rename, etc.")
-
-(defvar dired-copy-preserve-time nil "\
-*If non-nil, Dired preserves the last-modified time in a file copy.
-\(This works on only some systems.)\\<dired-mode-map>
-Use `\\[dired-do-copy]' with a zero prefix argument to toggle its value.")
-
-(defvar dired-no-confirm nil "\
-*If non-nil, a list of symbols for commands dired should not confirm.
-It can be a sublist of
-
-  '(byte-compile chgrp chmod chown compress copy delete hardlink load
-    move print shell symlink uncompress recursive-delete kill-file-buffer
-    kill-dired-buffer patch create-top-dir revert-subdirs)
-
-The meanings of most of the symbols are obvious.  A few exceptions:
-
-    'compress applies to compression or decompression by any of the 
-     compression program in `dired-compression-method-alist'.
-
-    'kill-dired-buffer applies to offering to kill dired buffers for
-     directories which have been deleted.
-
-    'kill-file-buffer applies to offering to kill buffers visiting files
-     which have been deleted.
-
-    'recursive-delete applies to recursively deleting non-empty
-     directories, and all of their contents.
-
-    'create-top-dir applies to `dired-up-directory' creating a new top level
-     directory for the dired buffer.
-
-    'revert-subdirs applies to re-reading subdirectories which have 
-     been modified on disk.
-
-Note that this list also applies to remote files accessed with efs
-or ange-ftp.")
-
-(defvar dired-backup-if-overwrite nil "\
-*Non-nil if Dired should ask about making backups before overwriting files.
-Special value 'always suppresses confirmation.")
-
-(defvar dired-omit-files nil "\
-*If non-nil un-interesting files will be omitted from this dired buffer.
-Use \\[dired-omit-toggle] to see these files. (buffer local)")
-
-(defvar dired-mail-reader 'rmail "\
-*Mail reader used by dired for dired-read-mail (\\[dired-read-mail]).
-The symbols 'rmail and 'vm are the only two allowed values.")
-
-(defvar dired-refresh-automatically t "\
-*If non-nil, refresh dired buffers automatically after file operations.")
-
-(define-key ctl-x-map "d" 'dired)
-
-(autoload 'dired "dired" "\
-\"Edit\" directory DIRNAME--delete, rename, print, etc. some files in it.
-Optional second argument SWITCHES specifies the `ls' options used.
-\(Interactively, use a prefix argument to be able to specify SWITCHES.)
-Dired displays a list of files in DIRNAME (which may also have
-shell wildcards appended to select certain files).  If DIRNAME is a cons,
-its first element is taken as the directory name and the resr as an explicit
-list of files to make directory entries for.
-\\<dired-mode-map>You can move around in it with the usual commands.
-You can flag files for deletion with \\[dired-flag-file-deletion] and then
-delete them by typing \\[dired-expunge-deletions].
-Type \\[dired-describe-mode] after entering dired for more info.
-
-If DIRNAME is already in a dired buffer, that buffer is used without refresh." t nil)
-
-(define-key ctl-x-4-map "d" 'dired-other-window)
-
-(autoload 'dired-other-window "dired" "\
-\"Edit\" directory DIRNAME.  Like `dired' but selects in another window." t nil)
-
-(define-key ctl-x-5-map "d" 'dired-other-frame)
-
-(autoload 'dired-other-frame "dired" "\
-\"Edit\" directory DIRNAME.  Like `dired' but makes a new frame." t nil)
-
-(autoload 'dired-noselect "dired" "\
-Like `dired' but returns the dired buffer as value, does not select it." nil nil)
-
-(define-key ctl-x-map "\C-j" 'dired-jump-back)
-
-(autoload 'dired-jump-back "dired" "\
-Jump back to dired.
-If in a file, dired the current directory and move to file's line.
-If in dired already, pop up a level and goto old directory's line.
-In case the proper dired file line cannot be found, refresh the dired
-  buffer and try again." t nil)
-
-(define-key ctl-x-4-map "\C-j" 'dired-jump-back-other-window)
-
-(autoload 'dired-jump-back-other-window "dired" "\
-Like \\[dired-jump-back], but to other window." t nil)
-
-(define-key ctl-x-5-map "\C-j" 'dired-jump-back-other-frame)
-
-(autoload 'dired-jump-back-other-frame "dired" "\
-Like \\[dired-jump-back], but in another frame." t nil)
-
-;;;***
-
-;;;### (autoloads (efs-ftp-path) "efs-cu" "efs/efs-cu.el")
-
-(defvar efs-path-root-regexp "^/[^/:]+:" "\
-Regexp to match the `/user@host:' root of an efs full path.")
-
-(autoload 'efs-ftp-path "efs-cu" "\
-Parse PATH according to efs-path-regexp.
-Returns a list (HOST USER PATH), or nil if PATH does not match the format." nil nil)
-
-;;;***
-
-;;;### (autoloads (remote-path-file-handler-function) "efs-dump" "efs/efs-dump.el")
-
-(or (assoc efs-path-root-regexp file-name-handler-alist) (setq file-name-handler-alist (cons (cons efs-path-root-regexp 'remote-path-file-handler-function) file-name-handler-alist)))
-
-(autoload 'remote-path-file-handler-function "efs-dump" "\
-Function to call special file handlers for remote files." nil nil)
-
-;;;***
-
-;;;### (autoloads nil "efs-fnh" "efs/efs-fnh.el")
-
-(defvar allow-remote-paths t "\
-*Set this to nil if you don't want remote paths to access
-remote files.")
-
-;;;***
-
-;;;### (autoloads (efs-root-file-name-completion efs-root-file-name-all-completions efs-set-passwd) "efs-netrc" "efs/efs-netrc.el")
-
-(autoload 'efs-set-passwd "efs-netrc" "\
-For a given HOST and USER, set or change the associated PASSWORD." t nil)
-
-(autoload 'efs-root-file-name-all-completions "efs-netrc" nil nil nil)
-
-(autoload 'efs-root-file-name-completion "efs-netrc" nil nil nil)
-
-;;;***
-
-;;;### (autoloads (efs-report-bug) "efs-report" "efs/efs-report.el")
-
-(autoload 'efs-report-bug "efs-report" "\
-Submit a bug report for efs." t nil)
-
-;;;***
-
-;;;### (autoloads (efs-file-handler-function efs-nslookup-host efs-display-ftp-activity) "efs" "efs/efs.el")
-
-(autoload 'efs-display-ftp-activity "efs" "\
-Displays the number of active background ftp sessions in the modeline.
-Uses the variable `efs-mode-line-format' to determine how this will be
-displayed." t nil)
-
-(autoload 'efs-nslookup-host "efs" "\
-Attempt to resolve the given HOSTNAME using nslookup if possible." t nil)
-
-(autoload 'efs-file-handler-function "efs" "\
-Function to call special file handlers for remote files." nil nil)
-
-;;;***
-
-;;;### (autoloads (electric-buffer-list) "ebuff-menu" "electric/ebuff-menu.el")
-
-(autoload 'electric-buffer-list "ebuff-menu" "\
-Pops up a buffer describing the set of Emacs buffers.
-Vaguely like ITS lunar select buffer; combining typeoutoid buffer
-listing with menuoid buffer selection.
-
-If the very next character typed is a space then the buffer list
-window disappears.  Otherwise, one may move around in the buffer list
-window, marking buffers to be selected, saved or deleted.
-
-To exit and select a new buffer, type a space when the cursor is on
-the appropriate line of the buffer-list window.  Other commands are
-much like those of buffer-menu-mode.
-
-Calls value of `electric-buffer-menu-mode-hook' on entry if non-nil.
-
-Non-null optional arg FILES-ONLY means mention only file buffers.
-When called from Lisp code, FILES-ONLY may be a regular expression,
-in which case only buffers whose names match that expression are listed,
-or an arbitrary predicate function.
-
-\\{electric-buffer-menu-mode-map}" t nil)
-
-;;;***
-
-;;;### (autoloads (electric-command-history Electric-command-history-redo-expression) "echistory" "electric/echistory.el")
-
-(autoload 'Electric-command-history-redo-expression "echistory" "\
-Edit current history line in minibuffer and execute result.
-With prefix arg NOCONFIRM, execute current line as-is without editing." t nil)
-
-(autoload 'electric-command-history "echistory" "\
-\\<electric-history-map>Major mode for examining and redoing commands from `command-history'.
-This pops up a window with the Command History listing.
-The number of command listed is controlled by `list-command-history-max'.
-The command history is filtered by `list-command-history-filter' if non-nil.
-Combines typeout Command History list window with menu like selection
-of an expression from the history for re-evaluation in the *original* buffer.
-
-The history displayed is filtered by `list-command-history-filter' if non-nil.
-
-Like Emacs-Lisp mode except that characters do not insert themselves and
-Tab and Linefeed do not indent.  Instead these commands are provided:
-\\{electric-history-map}
-
-Calls the value of `electric-command-history-hook' if that is non-nil.
-The Command History listing is recomputed each time this mode is invoked." t nil)
-
-;;;***
-
-;;;### (autoloads (electric-helpify with-electric-help) "ehelp" "electric/ehelp.el")
-
-(autoload 'with-electric-help "ehelp" "\
-Pop up an \"electric\" help buffer.
-The arguments are THUNK &optional BUFFER NOERASE MINHEIGHT.
-THUNK is a function of no arguments which is called to initialize the
-contents of BUFFER.  BUFFER defaults to `*Help*'.  BUFFER will be
-erased before THUNK is called unless NOERASE is non-nil.  THUNK will
-be called while BUFFER is current and with `standard-output' bound to
-the buffer specified by BUFFER.
-
-If THUNK returns nil, we display BUFFER starting at the top, and
-shrink the window to fit.  If THUNK returns non-nil, we don't do those things.
-
-After THUNK has been called, this function \"electrically\" pops up a window
-in which BUFFER is displayed and allows the user to scroll through that buffer
-in electric-help-mode. The window's height will be at least MINHEIGHT if
-this value is non-nil.
-
-If THUNK returns nil, we display BUFFER starting at the top, and
-shrink the window to fit.  If THUNK returns non-nil, we don't do those
-things.
-
-When the user exits (with `electric-help-exit', or otherwise) the help
-buffer's window disappears (i.e., we use `save-window-excursion')
-BUFFER is put into `default-major-mode' (or `fundamental-mode') when we exit." nil nil)
-
-(autoload 'electric-helpify "ehelp" nil nil nil)
-
-;;;***
-
-;;;### (autoloads (Helper-help Helper-describe-bindings) "helper" "electric/helper.el")
-
-(autoload 'Helper-describe-bindings "helper" "\
-Describe local key bindings of current mode." t nil)
-
-(autoload 'Helper-help "helper" "\
-Provide help for current mode." t nil)
-
-;;;***
-
-;;;### (autoloads (edt-emulation-on) "edt" "emulators/edt.el")
-
-(autoload 'edt-emulation-on "edt" "\
-Turn on EDT Emulation." t nil)
-
-;;;***
-
-;;;### (autoloads (teco-command) "teco" "emulators/teco.el")
-
-(autoload 'teco-command "teco" "\
-Read and execute a Teco command string." t nil)
-
-;;;***
-
-;;;### (autoloads (tpu-edt-on) "tpu-edt" "emulators/tpu-edt.el")
-
-(fset 'tpu-edt-mode 'tpu-edt-on)
-
-(fset 'tpu-edt 'tpu-edt-on)
-
-(autoload 'tpu-edt-on "tpu-edt" "\
-Turn on TPU/edt emulation." t nil)
-
-;;;***
-
-;;;### (autoloads (tpu-set-cursor-bound tpu-set-cursor-free tpu-set-scroll-margins) "tpu-extras" "emulators/tpu-extras.el")
-
-(autoload 'tpu-set-scroll-margins "tpu-extras" "\
-Set scroll margins." t nil)
-
-(autoload 'tpu-set-cursor-free "tpu-extras" "\
-Allow the cursor to move freely about the screen." t nil)
-
-(autoload 'tpu-set-cursor-bound "tpu-extras" "\
-Constrain the cursor to the flow of the text." t nil)
-
-;;;***
-
-;;;### (autoloads (wordstar-mode) "ws-mode" "emulators/ws-mode.el")
-
-(autoload 'wordstar-mode "ws-mode" "\
-Major mode with WordStar-like key bindings.
-
-BUGS:
- - Help menus with WordStar commands (C-j just calls help-for-help)
-   are not implemented
- - Options for search and replace
- - Show markers (C-k h) is somewhat strange
- - Search and replace (C-q a) is only available in forward direction
-
-No key bindings beginning with ESC are installed, they will work
-Emacs-like.
-
-The key bindings are:
-
-  C-a		backward-word
-  C-b		fill-paragraph
-  C-c		scroll-up-line
-  C-d		forward-char
-  C-e		previous-line
-  C-f		forward-word
-  C-g		delete-char
-  C-h		backward-char
-  C-i		indent-for-tab-command
-  C-j		help-for-help
-  C-k		ordstar-C-k-map
-  C-l		ws-repeat-search
-  C-n		open-line
-  C-p		quoted-insert
-  C-r		scroll-down-line
-  C-s		backward-char
-  C-t		kill-word
-  C-u		keyboard-quit
-  C-v		overwrite-mode
-  C-w		scroll-down
-  C-x		next-line
-  C-y		kill-complete-line
-  C-z		scroll-up
-
-  C-k 0		ws-set-marker-0
-  C-k 1		ws-set-marker-1
-  C-k 2		ws-set-marker-2
-  C-k 3		ws-set-marker-3
-  C-k 4		ws-set-marker-4
-  C-k 5		ws-set-marker-5
-  C-k 6		ws-set-marker-6
-  C-k 7		ws-set-marker-7
-  C-k 8		ws-set-marker-8
-  C-k 9		ws-set-marker-9
-  C-k b		ws-begin-block
-  C-k c		ws-copy-block
-  C-k d		save-buffers-kill-emacs
-  C-k f		find-file
-  C-k h		ws-show-markers
-  C-k i		ws-indent-block
-  C-k k		ws-end-block
-  C-k p		ws-print-block
-  C-k q		kill-emacs
-  C-k r		insert-file
-  C-k s		save-some-buffers
-  C-k t		ws-mark-word
-  C-k u		ws-exdent-block
-  C-k C-u	keyboard-quit
-  C-k v		ws-move-block
-  C-k w		ws-write-block
-  C-k x		kill-emacs
-  C-k y		ws-delete-block
-
-  C-o c		wordstar-center-line
-  C-o b		switch-to-buffer
-  C-o j		justify-current-line
-  C-o k		kill-buffer
-  C-o l		list-buffers
-  C-o m		auto-fill-mode
-  C-o r		set-fill-column
-  C-o C-u	keyboard-quit
-  C-o wd	delete-other-windows
-  C-o wh	split-window-horizontally
-  C-o wo	other-window
-  C-o wv	split-window-vertically
-
-  C-q 0		ws-find-marker-0
-  C-q 1		ws-find-marker-1
-  C-q 2		ws-find-marker-2
-  C-q 3		ws-find-marker-3
-  C-q 4		ws-find-marker-4
-  C-q 5		ws-find-marker-5
-  C-q 6		ws-find-marker-6
-  C-q 7		ws-find-marker-7
-  C-q 8		ws-find-marker-8
-  C-q 9		ws-find-marker-9
-  C-q a		ws-query-replace
-  C-q b		ws-to-block-begin
-  C-q c		end-of-buffer
-  C-q d		end-of-line
-  C-q f		ws-search
-  C-q k		ws-to-block-end
-  C-q l		ws-undo
-  C-q p		ws-last-cursorp
-  C-q r		beginning-of-buffer
-  C-q C-u	keyboard-quit
-  C-q w		ws-last-error
-  C-q y		ws-kill-eol
-  C-q DEL	ws-kill-bol
-" t nil)
-
-;;;***
-
-;;;### (autoloads (term make-term) "term" "eterm/term.el")
-
-(autoload 'make-term "term" "\
-Make a term process NAME in a buffer, running PROGRAM.
-The name of the buffer is made by surrounding NAME with `*'s.
-If there is already a running process in that buffer, it is not restarted.
-Optional third arg STARTFILE is the name of a file to send the contents of to 
-the process.  Any more args are arguments to PROGRAM." nil nil)
-
-(autoload 'term "term" "\
-Start a terminal-emulator in a new buffer." t nil)
-
-;;;***
-
-;;;### (autoloads (tperldb txdb tdbx tsdb tgdb) "tgud" "eterm/tgud.el")
-
-(autoload 'tgdb "tgud" "\
-Run gdb on program FILE in buffer *tgud-FILE*.
-The directory containing FILE becomes the initial working directory
-and source-file directory for your debugger." t nil)
-
-(autoload 'tsdb "tgud" "\
-Run sdb on program FILE in buffer *tgud-FILE*.
-The directory containing FILE becomes the initial working directory
-and source-file directory for your debugger." t nil)
-
-(autoload 'tdbx "tgud" "\
-Run dbx on program FILE in buffer *tgud-FILE*.
-The directory containing FILE becomes the initial working directory
-and source-file directory for your debugger." t nil)
-
-(autoload 'txdb "tgud" "\
-Run xdb on program FILE in buffer *tgud-FILE*.
-The directory containing FILE becomes the initial working directory
-and source-file directory for your debugger.
-
-You can set the variable 'tgud-xdb-directories' to a list of program source
-directories if your program contains sources from more than one directory." t nil)
-
-(autoload 'tperldb "tgud" "\
-Run perldb on program FILE in buffer *tgud-FILE*.
-The directory containing FILE becomes the initial working directory
-and source-file directory for your debugger." t nil)
-
-;;;***
-
-;;;### (autoloads (tshell) "tshell" "eterm/tshell.el")
-
-(defvar tshell-prompt-pattern "^[^#$%>\n]*[#$%>] *" "\
-Regexp to match prompts in the inferior shell.
-Defaults to \"^[^#$%>\\n]*[#$%>] *\", which works pretty well.
-This variable is used to initialise `term-prompt-regexp' in the 
-shell buffer.
-
-The pattern should probably not match more than one line.  If it does,
-tshell-mode may become confused trying to distinguish prompt from input
-on lines which don't start with a prompt.
-
-This is a fine thing to set in your `.emacs' file.")
-
-(autoload 'tshell "tshell" "\
-Run an inferior shell, with I/O through buffer *shell*.
-If buffer exists but shell process is not running, make new shell.
-If buffer exists and shell process is running, just switch to buffer `*shell*'.
-Program used comes from variable `explicit-shell-file-name',
- or (if that is nil) from the ESHELL environment variable,
- or else from SHELL if there is no ESHELL.
-If a file `~/.emacs_SHELLNAME' exists, it is given as initial input
- (Note that this may lose due to a timing error if the shell
-  discards input when it starts up.)
-The buffer is put in Tshell mode, giving commands for sending input
-and controlling the subjobs of the shell.  See `tshell-mode'.
-See also the variable `tshell-prompt-pattern'.
-
-The shell file name (sans directories) is used to make a symbol name
-such as `explicit-csh-args'.  If that symbol is a variable,
-its value is used as a list of arguments when invoking the shell.
-Otherwise, one argument `-i' is passed to the shell.
-
-\(Type \\[describe-mode] in the shell buffer for a list of commands.)" t nil)
-
-;;;***
-
-;;;### (autoloads (blackbox) "blackbox" "games/blackbox.el")
-
-(autoload 'blackbox "blackbox" "\
-Play blackbox.  Optional prefix argument is the number of balls;
-the default is 4.
-
-What is blackbox?
-
-Blackbox is a game of hide and seek played on an 8 by 8 grid (the
-Blackbox).  Your opponent (Emacs, in this case) has hidden several
-balls (usually 4) within this box.  By shooting rays into the box and
-observing where they emerge it is possible to deduce the positions of
-the hidden balls.  The fewer rays you use to find the balls, the lower
-your score.
-
-Overview of play:
-
-\\<blackbox-mode-map>To play blackbox, type \\[blackbox].  An optional prefix argument
-specifies the number of balls to be hidden in the box; the default is
-four.
-
-The cursor can be moved around the box with the standard cursor
-movement keys.
-
-To shoot a ray, move the cursor to the edge of the box and press SPC.
-The result will be determined and the playfield updated.
-
-You may place or remove balls in the box by moving the cursor into the
-box and pressing \\[bb-romp].
-
-When you think the configuration of balls you have placed is correct,
-press \\[bb-done].  You will be informed whether you are correct or
-not, and be given your score.  Your score is the number of letters and
-numbers around the outside of the box plus five for each incorrectly
-placed ball.  If you placed any balls incorrectly, they will be
-indicated with `x', and their actual positions indicated with `o'.
-
-Details:
-
-There are three possible outcomes for each ray you send into the box:
-
-	Detour: the ray is deflected and emerges somewhere other than
-		where you sent it in.  On the playfield, detours are
-		denoted by matching pairs of numbers -- one where the
-		ray went in, and the other where it came out.
-
-	Reflection: the ray is reflected and emerges in the same place
-		it was sent in.  On the playfield, reflections are
-		denoted by the letter `R'.
-
-	Hit:	the ray strikes a ball directly and is absorbed.  It does
-		not emerge from the box.  On the playfield, hits are
-		denoted by the letter `H'.
-
-The rules for how balls deflect rays are simple and are best shown by
-example.
-
-As a ray approaches a ball it is deflected ninety degrees.  Rays can
-be deflected multiple times.  In the diagrams below, the dashes
-represent empty box locations and the letter `O' represents a ball.
-The entrance and exit points of each ray are marked with numbers as
-described under \"Detour\" above.  Note that the entrance and exit
-points are always interchangeable.  `*' denotes the path taken by the
-ray.
-
-Note carefully the relative positions of the ball and the ninety
-degree deflection it causes.
-
-    1                                            
-  - * - - - - - -         - - - - - - - -         - - - - - - - -       
-  - * - - - - - -         - - - - - - - -         - - - - - - - -       
-1 * * - - - - - -         - - - - - - - -         - O - - - - O -       
-  - - O - - - - -         - - O - - - - -         - - * * * * - -
-  - - - - - - - -         - - - * * * * * 2     3 * * * - - * - -
-  - - - - - - - -         - - - * - - - -         - - - O - * - -      
-  - - - - - - - -         - - - * - - - -         - - - - * * - -       
-  - - - - - - - -         - - - * - - - -         - - - - * - O -       
-                                2                         3
-
-As mentioned above, a reflection occurs when a ray emerges from the same point
-it was sent in.  This can happen in several ways:
-
-                                                                           
-  - - - - - - - -         - - - - - - - -          - - - - - - - -
-  - - - - O - - -         - - O - O - - -          - - - - - - - -
-R * * * * - - - -         - - - * - - - -          O - - - - - - -
-  - - - - O - - -         - - - * - - - -        R - - - - - - - -
-  - - - - - - - -         - - - * - - - -          - - - - - - - -
-  - - - - - - - -         - - - * - - - -          - - - - - - - -
-  - - - - - - - -       R * * * * - - - -          - - - - - - - -
-  - - - - - - - -         - - - - O - - -          - - - - - - - -
-
-In the first example, the ray is deflected downwards by the upper
-ball, then left by the lower ball, and finally retraces its path to
-its point of origin.  The second example is similar.  The third
-example is a bit anomalous but can be rationalized by realizing the
-ray never gets a chance to get into the box.  Alternatively, the ray
-can be thought of as being deflected downwards and immediately
-emerging from the box.
-
-A hit occurs when a ray runs straight into a ball:
-
-  - - - - - - - -         - - - - - - - -          - - - - - - - -
-  - - - - - - - -         - - - - - - - -          - - - - O - - -
-  - - - - - - - -         - - - - O - - -        H * * * * - - - -
-  - - - - - - - -       H * * * * O - - -          - - - * - - - -
-  - - - - - - - -         - - - - O - - -          - - - O - - - -
-H * * * O - - - -         - - - - - - - -          - - - - - - - -
-  - - - - - - - -         - - - - - - - -          - - - - - - - -
-  - - - - - - - -         - - - - - - - -          - - - - - - - -
-
-Be sure to compare the second example of a hit with the first example of
-a reflection." t nil)
-
-;;;***
-
-;;;### (autoloads (conx-load conx conx-region conx-buffer) "conx" "games/conx.el")
-
-(autoload 'conx-buffer "conx" "\
-Absorb the text in the current buffer into the tree." t nil)
-
-(autoload 'conx-region "conx" "\
-Absorb the text in the current region into the tree." t nil)
-
-(autoload 'conx "conx" "\
-Generate some random sentences in the *conx* buffer." t nil)
-
-(autoload 'conx-load "conx" "\
-Load in a CONX database written by the \\[conx-save] command.
-This clears the database currently in memory." t nil)
-
-;;;***
-
-;;;### (autoloads (shuffle-vector cookie-snarf cookie-insert cookie) "cookie1" "games/cookie1.el")
-
-(autoload 'cookie "cookie1" "\
-Return a random phrase from PHRASE-FILE.  When the phrase file
-is read in, display STARTMSG at beginning of load, ENDMSG at end." nil nil)
-
-(autoload 'cookie-insert "cookie1" "\
-Insert random phrases from PHRASE-FILE; COUNT of them.  When the phrase file
-is read in, display STARTMSG at beginning of load, ENDMSG at end." nil nil)
-
-(autoload 'cookie-snarf "cookie1" "\
-Reads in the PHRASE-FILE, returns it as a vector of strings.
-Emit STARTMSG and ENDMSG before and after.  Caches the result; second
-and subsequent calls on the same file won't go to disk." nil nil)
-
-(autoload 'shuffle-vector "cookie1" "\
-Randomly permute the elements of VECTOR (all permutations equally likely)" nil nil)
-
-;;;***
-
-;;;### (autoloads (decipher-mode decipher) "decipher" "games/decipher.el")
-
-(autoload 'decipher "decipher" "\
-Format a buffer of ciphertext for cryptanalysis and enter Decipher mode." t nil)
-
-(autoload 'decipher-mode "decipher" "\
-Major mode for decrypting monoalphabetic substitution ciphers.
-Lower-case letters enter plaintext.
-Upper-case letters are commands.
-
-The buffer is made read-only so that normal Emacs commands cannot
-modify it.
-
-The most useful commands are:
-\\<decipher-mode-map>
-\\[decipher-digram-list]  Display a list of all digrams & their frequency
-\\[decipher-frequency-count]  Display the frequency of each ciphertext letter
-\\[decipher-adjacency-list]  Show adjacency list for current letter (lists letters appearing next to it)
-\\[decipher-make-checkpoint]  Save the current cipher alphabet (checkpoint)
-\\[decipher-restore-checkpoint]  Restore a saved cipher alphabet (checkpoint)" t nil)
-
-;;;***
-
-;;;### (autoloads (dissociated-press) "dissociate" "games/dissociate.el")
-
-(autoload 'dissociated-press "dissociate" "\
-Dissociate the text of the current buffer.
-Output goes in buffer named *Dissociation*,
-which is redisplayed each time text is added to it.
-Every so often the user must say whether to continue.
-If ARG is positive, require ARG chars of continuity.
-If ARG is negative, require -ARG words of continuity.
-Default is 2." t nil)
-
-;;;***
-
-;;;### (autoloads (doctor) "doctor" "games/doctor.el")
-
-(autoload 'doctor "doctor" "\
-Switch to *doctor* buffer and start giving psychotherapy." t nil)
-
-;;;***
-
-;;;### (autoloads (dunnet) "dunnet" "games/dunnet.el")
-
-(autoload 'dunnet "dunnet" "\
-Switch to *dungeon* buffer and start game." t nil)
-
-;;;***
-
-;;;### (autoloads (flame) "flame" "games/flame.el")
-
-(autoload 'flame "flame" "\
-Generate ARG (default 1) sentences of half-crazed gibberish." t nil)
-
-;;;***
-
-;;;### (autoloads (gomoku) "gomoku" "games/gomoku.el")
-
-(autoload 'gomoku "gomoku" "\
-Start a Gomoku game between you and Emacs.
-If a game is in progress, this command allow you to resume it.
-If optional arguments N and M are given, an N by M board is used.
-
-You and Emacs play in turn by marking a free square. You mark it with X
-and Emacs marks it with O. The winner is the first to get five contiguous
-marks horizontally, vertically or in diagonal.
-You play by moving the cursor over the square you choose and hitting
-\\<gomoku-mode-map>\\[gomoku-human-plays].
-Use \\[describe-mode] for more info." t nil)
-
-;;;***
-
-;;;### (autoloads (hanoi) "hanoi" "games/hanoi.el")
-
-(autoload 'hanoi "hanoi" "\
-Towers of Hanoi diversion.  Argument is number of rings." t nil)
-
-;;;***
-
-;;;### (autoloads (life) "life" "games/life.el")
-
-(autoload 'life "life" "\
-Run Conway's Life simulation.
-The starting pattern is randomly selected.  Prefix arg (optional first
-arg non-nil from a program) is the number of seconds to sleep between
-generations (this defaults to 1)." t nil)
-
-;;;***
-
-;;;### (autoloads (mpuz) "mpuz" "games/mpuz.el")
-
-(autoload 'mpuz "mpuz" "\
-Multiplication puzzle with GNU Emacs." t nil)
-
-;;;***
-
-;;;### (autoloads (snarf-spooks spook) "spook" "games/spook.el")
-
-(autoload 'spook "spook" "\
-Adds that special touch of class to your outgoing mail." t nil)
-
-(autoload 'snarf-spooks "spook" "\
-Return a vector containing the lines from `spook-phrases-file'." nil nil)
-
-;;;***
-
-;;;### (autoloads (xmine-mode) "xmine" "games/xmine.el")
-
-(autoload 'xmine-mode "xmine" "\
-A mode for playing the well known mine searching game.
-
-   `\\<annotation-local-map-default>\\[xmine-activate-function-button1]' or `\\<xmine-keymap>\\[xmine-key-action1]' unhides a tile,
-   `\\<annotation-local-map-default>\\[xmine-activate-function-button2]' or `\\<xmine-keymap>\\[xmine-key-action2]' unhides all neighbours of a tile,
-   `\\<annotation-local-map-default>\\[xmine-activate-function-button3]' or `\\<xmine-keymap>\\[xmine-key-action3]' (un)flagges a tile to hold a mine.
-
-   `\\[xmine-key-new]' starts a new game.
-   `\\[xmine-key-quit]' ends a game.
-
-All keybindings (with alternatives) currently in effect:
-   \\{xmine-keymap}
-
-The rules are quite easy: You start by unhiding (random) tiles. An unhidden
-tile showing a number tells you something about the number of mines in it's
-neighborhood, where the neighborhood are all 8 tiles (or less if it's
-at a border) around the tile.
-
-E.g. a \"1\" shows you that there is only one mine in the neighborhood of
-this tile. Empty tiles have no mines around them, and empty tiles in
-the neighborhood of another empty tile are all automatically unhidden
-if you unhide one of them. You need to find a strategy to use the
-information you have from the numbers to \"flag\" the tiles with mines
-under them and unhide all other tiles. If you correctly made this
-without accidently unhiding a mine, you've won.
-
-If you are sure you have correctly flagged all mines around a unhidden tile,
-you can use Button-2 or \\[xmine-key-action2] on it to unhide all it's
-neighbors. But beware: If you made a mistake by flagging the wrong mines,
-you'll blow up! 
-
-Have Fun." t nil)
-
-(fset 'xmine 'xmine-mode)
-
-;;;***
-
-;;;### (autoloads (psychoanalyze-pinhead apropos-zippy insert-zippyism yow) "yow" "games/yow.el")
-
-(autoload 'yow "yow" "\
-Return or display a random Zippy quotation.  With prefix arg, insert it." t nil)
-
-(autoload 'insert-zippyism "yow" "\
-Prompt with completion for a known Zippy quotation, and insert it at point." t nil)
-
-(autoload 'apropos-zippy "yow" "\
-Return a list of all Zippy quotes matching REGEXP.
-If called interactively, display a list of matches." t nil)
-
-(autoload 'psychoanalyze-pinhead "yow" "\
-Zippy goes to the analyst." t nil)
-
-;;;***
-
-;;;### (autoloads (gnats:summ-pr gnats:query-pr gnats:edit-pr gnats:view-pr gnats:gnats-mode) "gnats" "gnats/gnats.el")
-
-(defvar gnats::mode-name nil "\
-Name of the GNATS mode.")
-
-(setq gnats::mode-name 'gnats:gnats-mode)
-
-(fset 'gnats-mode gnats::mode-name)
-
-(autoload 'gnats:gnats-mode "gnats" "\
-Major mode for editing problem reports.
-For information about the form see gnats(1) and pr_form(5).
-
-When you are finished editing the buffer, type \\[gnats:submit-pr] to commit
-your changes to the PR database.  To abort the edit, type
-\\[gnats:unlock-buffer].
-
-Special commands:
-\\{gnats-mode-map}
-Turning on gnats-mode calls the value of the variable gnats-mode-hook,
-if it is not nil." nil nil)
-
-(fset 'view-pr 'gnats:view-pr)
-
-(autoload 'gnats:view-pr "gnats" "\
-Visit the problem report named by the string ID.  While viewing, press
-'e' to edit the currently viewed PR." t nil)
-
-(fset 'edit-pr 'gnats:edit-pr)
-
-(autoload 'gnats:edit-pr "gnats" "\
-Edit the problem report named by the string ID." t nil)
-
-(fset 'query-pr 'gnats:query-pr)
-
-(autoload 'gnats:query-pr "gnats" "\
-Run query-pr, with user-specified args, and collect output in a buffer.
-While query-pr runs asynchronously, you can use the \\[next-error] command
-to find the text that the hits refer to." t nil)
-
-(fset 'summ-pr 'gnats:summ-pr)
-
-(autoload 'gnats:summ-pr "gnats" "\
-Run query-pr, with user-specified args, and display a pretty summary.
-Well, display a summary, at least." t nil)
-
-;;;***
-
-;;;### (autoloads (send-pr:send-pr-mode send-pr:send-pr) "send-pr" "gnats/send-pr.el")
-
-(fset 'send-pr 'send-pr:send-pr)
-
-(autoload 'send-pr:send-pr "send-pr" "\
-Create a buffer and read in the result of `send-pr -P'.
-When finished with editing the problem report use \\[send-pr:submit-pr]
-to send the PR with `send-pr -b -f -'." t nil)
-
-(fset 'send-pr-mode 'send-pr:send-pr-mode)
-
-(autoload 'send-pr:send-pr-mode "send-pr" "\
-Major mode for submitting problem reports.
-For information about the form see gnats(1) and send-pr(1).
-Special commands: \\{send-pr-mode-map}
-Turning on send-pr-mode calls the value of the variable send-pr-mode-hook,
-if it is not nil." t nil)
-
-;;;***
-
-;;;### (autoloads (gnus-earcon-display) "earcon" "gnus/earcon.el")
-
-(autoload 'gnus-earcon-display "earcon" "\
-Play sounds in message buffers." t nil)
-
-;;;***
-
-;;;### (autoloads (gnus-audio-play) "gnus-audio" "gnus/gnus-audio.el")
-
-(autoload 'gnus-audio-play "gnus-audio" "\
-Play a sound through the speaker." t nil)
-
-;;;***
-
-;;;### (autoloads (gnus-cache-generate-nov-databases gnus-cache-generate-active gnus-jog-cache) "gnus-cache" "gnus/gnus-cache.el")
-
-(autoload 'gnus-jog-cache "gnus-cache" "\
-Go through all groups and put the articles into the cache.
-
-Usage:
-$ emacs -batch -l ~/.emacs -l gnus -f gnus-jog-cache" t nil)
-
-(autoload 'gnus-cache-generate-active "gnus-cache" "\
-Generate the cache active file." t nil)
-
-(autoload 'gnus-cache-generate-nov-databases "gnus-cache" "\
-Generate NOV files recursively starting in DIR." t nil)
-
-;;;***
-
-;;;### (autoloads (gnus-fetch-group) "gnus-group" "gnus/gnus-group.el")
-
-(autoload 'gnus-fetch-group "gnus-group" "\
-Start Gnus if necessary and enter GROUP.
-Returns whether the fetching was successful or not." t nil)
-
-;;;***
-
-;;;### (autoloads (gnus-batch-score) "gnus-kill" "gnus/gnus-kill.el")
-
-(defalias 'gnus-batch-kill 'gnus-batch-score)
-
-(autoload 'gnus-batch-score "gnus-kill" "\
-Run batched scoring.
-Usage: emacs -batch -l gnus -f gnus-batch-score <newsgroups> ...
-Newsgroups is a list of strings in Bnews format.  If you want to score
-the comp hierarchy, you'd say \"comp.all\".  If you would not like to
-score the alt hierarchy, you'd say \"!alt.all\"." t nil)
-
-;;;***
-
-;;;### (autoloads (gnus-change-server) "gnus-move" "gnus/gnus-move.el")
-
-(autoload 'gnus-change-server "gnus-move" "\
-Move from FROM-SERVER to TO-SERVER.
-Update the .newsrc.eld file to reflect the change of nntp server." t nil)
-
-;;;***
-
-;;;### (autoloads (gnus-batch-brew-soup) "gnus-soup" "gnus/gnus-soup.el")
-
-(autoload 'gnus-batch-brew-soup "gnus-soup" "\
-Brew a SOUP packet from groups mention on the command line.
-Will use the remaining command line arguments as regular expressions
-for matching on group names.
-
-For instance, if you want to brew on all the nnml groups, as well as
-groups with \"emacs\" in the name, you could say something like:
-
-$ emacs -batch -f gnus-batch-brew-soup ^nnml \".*emacs.*\"" t nil)
-
-;;;***
-
-;;;### (autoloads (gnus-update-format) "gnus-spec" "gnus/gnus-spec.el")
-
-(autoload 'gnus-update-format "gnus-spec" "\
-Update the format specification near point." t nil)
-
-;;;***
-
-;;;### (autoloads (gnus-declare-backend gnus-unload) "gnus-start" "gnus/gnus-start.el")
-
-(autoload 'gnus-unload "gnus-start" "\
-Unload all Gnus features." t nil)
-
-(autoload 'gnus-declare-backend "gnus-start" "\
-Declare backend NAME with ABILITIES as a Gnus backend." nil nil)
-
-;;;***
-
-;;;### (autoloads (gnus-add-configuration) "gnus-win" "gnus/gnus-win.el")
-
-(autoload 'gnus-add-configuration "gnus-win" "\
-Add the window configuration CONF to `gnus-buffer-configuration'." nil nil)
-
-;;;***
-
-;;;### (autoloads (gnus gnus-other-frame gnus-slave gnus-no-server gnus-slave-no-server) "gnus" "gnus/gnus.el")
-
-(autoload 'gnus-slave-no-server "gnus" "\
-Read network news as a slave, without connecting to local server" t nil)
-
-(autoload 'gnus-no-server "gnus" "\
-Read network news.
-If ARG is a positive number, Gnus will use that as the
-startup level.	If ARG is nil, Gnus will be started at level 2.
-If ARG is non-nil and not a positive number, Gnus will
-prompt the user for the name of an NNTP server to use.
-As opposed to `gnus', this command will not connect to the local server." t nil)
-
-(autoload 'gnus-slave "gnus" "\
-Read news as a slave." t nil)
-
-(autoload 'gnus-other-frame "gnus" "\
-Pop up a frame to read news." t nil)
-
-(autoload 'gnus "gnus" "\
-Read network news.
-If ARG is non-nil and a positive number, Gnus will use that as the
-startup level.	If ARG is non-nil and not a positive number, Gnus will
-prompt the user for the name of an NNTP server to use." t nil)
-
-;;;***
-
-;;;### (autoloads (unbold-region bold-region message-news-other-frame message-news-other-window message-mail-other-frame message-mail-other-window message-bounce message-resend message-forward message-recover message-supersede message-cancel-news message-followup message-wide-reply message-reply message-news message-mail message-mode) "message" "gnus/message.el")
-
-(defcustom message-from-style 'default "*Specifies how \"From\" headers look.\n\nIf `nil', they contain just the return address like:\n	king@grassland.com\nIf `parens', they look like:\n	king@grassland.com (Elvis Parsley)\nIf `angles', they look like:\n	Elvis Parsley <king@grassland.com>\n\nOtherwise, most addresses look like `angles', but they look like\n`parens' if `angles' would need quoting and `parens' would not." :type '(choice (const :tag "simple" nil) (const parens) (const angles) (const default)) :group 'message-headers)
-
-(defcustom message-signature-separator "^-- *$" "Regexp matching the signature separator." :type 'regexp :group 'message-various)
-
-(defcustom message-user-organization-file "/usr/lib/news/organization" "*Local news organization file." :type 'file :group 'message-headers)
-
-(defcustom message-send-mail-function 'message-send-mail-with-sendmail "Function to call to send the current buffer as mail.\nThe headers should be delimited by a line whose contents match the\nvariable `mail-header-separator'.\n\nLegal values include `message-send-mail-with-sendmail' (the default),\n`message-send-mail-with-mh' and `message-send-mail-with-qmail'." :type '(radio (function-item message-send-mail-with-sendmail) (function-item message-send-mail-with-mh) (function-item message-send-mail-with-qmail) (function :tag "Other")) :group 'message-sending :group 'message-mail)
-
-(defcustom message-citation-line-function 'message-insert-citation-line "*Function called to insert the \"Whomever writes:\" line." :type 'function :group 'message-insertion)
-
-(defcustom message-yank-prefix "> " "*Prefix inserted on the lines of yanked messages.\nnil means use indentation." :type 'string :group 'message-insertion)
-
-(defcustom message-cite-function (if (and (boundp 'mail-citation-hook) mail-citation-hook) mail-citation-hook 'message-cite-original) "*Function for citing an original message." :type '(radio (function-item message-cite-original) (function-item sc-cite-original) (function :tag "Other")) :group 'message-insertion)
-
-(defcustom message-indent-citation-function 'message-indent-citation "*Function for modifying a citation just inserted in the mail buffer.\nThis can also be a list of functions.  Each function can find the\ncitation between (point) and (mark t).  And each function should leave\npoint and mark around the citation text as modified." :type 'function :group 'message-insertion)
-
-(defcustom message-signature t "*String to be inserted at the end of the message buffer.\nIf t, the `message-signature-file' file will be inserted instead.\nIf a function, the result from the function will be used instead.\nIf a form, the result from the form will be used instead." :type 'sexp :group 'message-insertion)
-
-(defcustom message-signature-file "~/.signature" "*File containing the text inserted at end of message buffer." :type 'file :group 'message-insertion)
-
-(autoload 'message-mode "message" "\
-Major mode for editing mail and news to be sent.
-Like Text Mode but with these additional commands:
-C-c C-s  message-send (send the message)    C-c C-c  message-send-and-exit
-C-c C-f  move to a header field (and create it if there isn't):
-	 C-c C-f C-t  move to To	C-c C-f C-s  move to Subject
-	 C-c C-f C-c  move to Cc	C-c C-f C-b  move to Bcc
-	 C-c C-f C-w  move to Fcc	C-c C-f C-r  move to Reply-To
-	 C-c C-f C-u  move to Summary	C-c C-f C-n  move to Newsgroups
-	 C-c C-f C-k  move to Keywords	C-c C-f C-d  move to Distribution
-	 C-c C-f C-f  move to Followup-To
-C-c C-t  message-insert-to (add a To header to a news followup)
-C-c C-n  message-insert-newsgroups (add a Newsgroup header to a news reply)
-C-c C-b  message-goto-body (move to beginning of message text).
-C-c C-i  message-goto-signature (move to the beginning of the signature).
-C-c C-w  message-insert-signature (insert `message-signature-file' file).
-C-c C-y  message-yank-original (insert current message, if any).
-C-c C-q  message-fill-yanked-message (fill what was yanked).
-C-c C-e  message-elide-region (elide the text between point and mark).
-C-c C-r  message-caesar-buffer-body (rot13 the message body)." t nil)
-
-(autoload 'message-mail "message" "\
-Start editing a mail message to be sent." t nil)
-
-(autoload 'message-news "message" "\
-Start editing a news article to be sent." t nil)
-
-(autoload 'message-reply "message" "\
-Start editing a reply to the article in the current buffer." t nil)
-
-(autoload 'message-wide-reply "message" "\
-Make a \"wide\" reply to the message in the current buffer." t nil)
-
-(autoload 'message-followup "message" "\
-Follow up to the message in the current buffer.
-If TO-NEWSGROUPS, use that as the new Newsgroups line." t nil)
-
-(autoload 'message-cancel-news "message" "\
-Cancel an article you posted." t nil)
-
-(autoload 'message-supersede "message" "\
-Start composing a message to supersede the current message.
-This is done simply by taking the old article and adding a Supersedes
-header line with the old Message-ID." t nil)
-
-(autoload 'message-recover "message" "\
-Reread contents of current buffer from its last auto-save file." t nil)
-
-(autoload 'message-forward "message" "\
-Forward the current message via mail.
-Optional NEWS will use news to forward instead of mail." t nil)
-
-(autoload 'message-resend "message" "\
-Resend the current article to ADDRESS." t nil)
-
-(autoload 'message-bounce "message" "\
-Re-mail the current message.
-This only makes sense if the current message is a bounce message than
-contains some mail you have written which has been bounced back to
-you." t nil)
-
-(autoload 'message-mail-other-window "message" "\
-Like `message-mail' command, but display mail buffer in another window." t nil)
-
-(autoload 'message-mail-other-frame "message" "\
-Like `message-mail' command, but display mail buffer in another frame." t nil)
-
-(autoload 'message-news-other-window "message" "\
-Start editing a news article to be sent." t nil)
-
-(autoload 'message-news-other-frame "message" "\
-Start editing a news article to be sent." t nil)
-
-(autoload 'bold-region "message" "\
-Bold all nonblank characters in the region.
-Works by overstriking characters.
-Called from program, takes two arguments START and END
-which specify the range to operate on." t nil)
-
-(autoload 'unbold-region "message" "\
-Remove all boldness (overstruck characters) in the region.
-Called from program, takes two arguments START and END
-which specify the range to operate on." t nil)
-
-;;;***
-
-;;;### (autoloads nil "messcompat" "gnus/messcompat.el")
-
-(defvar message-signature-file mail-signature-file "\
-*File containing the text inserted at end of message. buffer.")
-
-;;;***
-
-;;;### (autoloads (nndoc-add-type) "nndoc" "gnus/nndoc.el")
-
-(autoload 'nndoc-add-type "nndoc" "\
-Add document DEFINITION to the list of nndoc document definitions.
-If POSITION is nil or `last', the definition will be added
-as the last checked definition, if t or `first', add as the
-first definition, and if any other symbol, add after that
-symbol in the alist." nil nil)
-
-;;;***
-
-;;;### (autoloads (nnfolder-generate-active-file) "nnfolder" "gnus/nnfolder.el")
-
-(autoload 'nnfolder-generate-active-file "nnfolder" "\
-Look for mbox folders in the nnfolder directory and make them into groups." t nil)
-
-;;;***
-
-;;;### (autoloads (nnkiboze-generate-groups) "nnkiboze" "gnus/nnkiboze.el")
-
-(autoload 'nnkiboze-generate-groups "nnkiboze" "\
-Usage: emacs -batch -l nnkiboze -f nnkiboze-generate-groups
-Finds out what articles are to be part of the nnkiboze groups." t nil)
-
-;;;***
-
-;;;### (autoloads (nnml-generate-nov-databases) "nnml" "gnus/nnml.el")
-
-(autoload 'nnml-generate-nov-databases "nnml" "\
-Generate NOV databases in all nnml directories." t nil)
-
-;;;***
-
-;;;### (autoloads (nnsoup-revert-variables nnsoup-set-variables nnsoup-pack-replies) "nnsoup" "gnus/nnsoup.el")
-
-(autoload 'nnsoup-pack-replies "nnsoup" "\
-Make an outbound package of SOUP replies." t nil)
-
-(autoload 'nnsoup-set-variables "nnsoup" "\
-Use the SOUP methods for posting news and mailing mail." t nil)
-
-(autoload 'nnsoup-revert-variables "nnsoup" "\
-Revert posting and mailing methods to the standard Emacs methods." t nil)
-
-;;;***
-
-;;;### (autoloads (gnus-score-mode) "score-mode" "gnus/score-mode.el")
-
-(autoload 'gnus-score-mode "score-mode" "\
-Mode for editing Gnus score files.
-This mode is an extended emacs-lisp mode.
-
-\\{gnus-score-mode-map}" t nil)
-
-;;;***
-
-;;;### (autoloads (gnus-smiley-display smiley-buffer smiley-region) "smiley" "gnus/smiley.el")
-
-(autoload 'smiley-region "smiley" "\
-Smilify the region between point and mark." t nil)
-
-(autoload 'smiley-buffer "smiley" nil t nil)
-
-(autoload 'gnus-smiley-display "smiley" "\
-Display \"smileys\" as small graphical icons." t nil)
-
-;;;***
-
-;;;### (autoloads (hm--html-minor-mode hm--html-mode) "hm--html-mode" "hm--html-menus/hm--html-mode.el")
-
-(autoload 'hm--html-mode "hm--html-mode" "\
-Major mode for editing HTML hypertext documents.  
-Special commands:\\{hm--html-mode-map}
-Turning on hm--html-mode calls the value of the variable hm--html-mode-hook,
-if that value is non-nil." t nil)
-
-(autoload 'hm--html-minor-mode "hm--html-mode" "\
-Toggle hm--html-minor-mode.
-With arg, turn hm--html-minor-mode on iff arg is positive." t nil)
-
-;;;***
-
-;;;### (autoloads (html-view-get-display html-view-goto-url html-view-view-buffer html-view-view-file html-view-start-mosaic) "html-view" "hm--html-menus/html-view.el")
-
-(autoload 'html-view-start-mosaic "html-view" "\
-Start Mosaic." t nil)
-
-(autoload 'html-view-view-file "html-view" "\
-View an html file with Mosaic." t nil)
-
-(autoload 'html-view-view-buffer "html-view" "\
-View html buffer with Mosaic.
-If BUFFER-TO-VIEW is nil, then the current buffer is used." t nil)
-
-(autoload 'html-view-goto-url "html-view" "\
-Goto an URL in Mosaic." t nil)
-
-(autoload 'html-view-get-display "html-view" "\
-Get the display for Mosaic." t nil)
-
-;;;***
-
-;;;### (autoloads (tmpl-insert-template-file tmpl-insert-template-file-from-fixed-dirs tmpl-expand-templates-in-buffer tmpl-expand-templates-in-region) "tmpl-minor-mode" "hm--html-menus/tmpl-minor-mode.el")
-
-(autoload 'tmpl-expand-templates-in-region "tmpl-minor-mode" "\
-Expands the templates in the region from BEGIN to END.
-If BEGIN and END are nil, then the current region is used." t nil)
-
-(autoload 'tmpl-expand-templates-in-buffer "tmpl-minor-mode" "\
-Expands all templates in the current buffer." t nil)
-
-(autoload 'tmpl-insert-template-file-from-fixed-dirs "tmpl-minor-mode" "\
-Inserts a template FILE and expands it, if `tmpl-automatic-expand' is t.
-This command tries to read the template file from a list of
-predefined directories (look at `tmpl-template-dir-list') and it filters
-the contents of these directories with the regular expression
-`tmpl-filter-regexp' (look also at this variable). 
-The command uses a history variable, which could be changed with the
-variable `tmpl-history-variable-name'.
-
-The user of the command is able to change interactively to another
-directory by entering at first the string \"Change the directory\".
-This may be too difficult for the user. Therefore another command
-called `tmpl-insert-template-file' exist, which doesn't use fixed
-directories and filters." t nil)
-
-(autoload 'tmpl-insert-template-file "tmpl-minor-mode" "\
-Inserts a template FILE and expand it, if `tmpl-automatic-expand' is t.
-Look also at `tmpl-template-dir-list', to specify a default template directory.
-You should also take a look at `tmpl-insert-template-file-from-fixed-dirs'
-which has additional advantages (and disadvantages :-).
-
-ATTENTION: The interface of this function has changed. The old 
-function had the argument list (&optional TEMPLATE-DIR AUTOMATIC-EXPAND).
-The variables `tmpl-template-dir-list' and `tmpl-automatic-expand' must
-now be used instead of the args TEMPLATE-DIR and AUTOMATIC-EXPAND." t nil)
-
-;;;***
-
-;;;### (autoloads (hmail:compose) "hmail" "hyperbole/hmail.el")
-
-(autoload 'hmail:compose "hmail" "\
-Compose mail with ADDRESS and evaluation of EXPR.
-Optional SUBJECT and HELP message may also be given." t nil)
-
-;;;***
-
-;;;### (autoloads (Info-handle-in-note smart-info-assist smart-info) "hmous-info" "hyperbole/hmous-info.el")
-
-(autoload 'smart-info "hmous-info" "\
-Walks through Info documentation networks using one key or mouse key.
-
-If key is pressed within:
- (1) the first line of an Info Menu Entry or Cross Reference, the desired node
-       is found;
- (2) the Up, Next, or Previous entries of a Node Header (first line),
-       the desired node is found;
- (3) the File entry of a Node Header (first line),       
-       the 'Top' node within that file is found;
- (4) at the end of the current node, the Next node is found (this will
-       descend subtrees if the function 'Info-global-next' is bound);
- (5) anywhere else (e.g. at the end of a line), the current node entry is
-       scrolled up one windowful.
-
-Returns t if key is pressed within an Info Node Header, Cross Reference,
-or a Menu; otherwise returns nil." t nil)
-
-(autoload 'smart-info-assist "hmous-info" "\
-Walks through Info documentation networks using one assist-key or mouse assist-key.
-
-If assist-key is pressed within:
- (1) the first line of an Info Menu Entry or Cross Reference, the desired node
-       is found;
- (2) the Up, Next, or Previous entries of a Node Header (first line),
-       the last node in the history list is found;
- (3) the File entry of a Node Header (first line),       
-       the 'DIR' root-level node is found;
- (4) at the end of the current node, the Previous node is found (this will
-       return from subtrees if the function 'Info-global-prev is bound);
- (5) anywhere else (e.g. at the end of a line), the current node entry is
-       scrolled down one windowful.
-
-Returns t if assist-key is pressed within an Info Node Header, Cross Reference,
-or a Menu; otherwise returns nil." t nil)
-
-(autoload 'Info-handle-in-note "hmous-info" "\
-Follows an Info cross-reference.
-If point is within the first line of an Info note (cross-reference), follows
-cross-reference and returns t; otherwise returns nil." nil nil)
-
-;;;***
-
-;;;### (autoloads (hkey-help-show) "hmouse-drv" "hyperbole/hmouse-drv.el")
-
-(autoload 'hkey-help-show "hmouse-drv" "\
-Saves prior frame configuration if BUFFER displays help.  Displays BUFFER.
-
-Optional second arg CURRENT-WINDOW non-nil forces display of buffer within
-the current window.  By default, it is displayed in another window." nil nil)
-
-;;;***
-
-;;;### (autoloads (smart-tags-file smart-tags-file-path smart-objc smart-lisp-mode-p smart-java-at-tag-p smart-java smart-fortran-at-tag-p smart-c++ smart-c-at-tag-p smart-asm-at-tag-p) "hmouse-tag" "hyperbole/hmouse-tag.el")
-
-(autoload 'smart-asm-at-tag-p "hmouse-tag" "\
-Return assembly tag name that point is within, else nil." nil nil)
-
-(autoload 'smart-c-at-tag-p "hmouse-tag" "\
-Return C tag name that point is within, else nil." nil nil)
-
-(autoload 'smart-c++ "hmouse-tag" "\
-Jumps to the definition of optional C++ IDENTIFIER or the one at point.
-Optional second arg NEXT means jump to next matching C++ tag.
-
-It assumes that its caller has already checked that the key was pressed in an
-appropriate buffer and has moved the cursor to the selected buffer.
-
-If:
- (1) on a `#include' statement, the include file is displayed;
-     Look for include file in directory lists `smart-c-cpp-include-dirs'
-     and `smart-c-include-dirs'.
- (2) on a C++ identifier, the identifier definition is displayed,
-     assuming the identifier is found within an `etags' generated tag file
-     in the current directory or any of its ancestor directories.
- (3) if `smart-c-use-lib-man' is non-nil, the C++ identifier is
-     recognized as a library symbol, and a man page is found for the
-     identifier, then the man page is displayed." t nil)
-
-(autoload 'smart-fortran-at-tag-p "hmouse-tag" "\
-Return Fortran tag name that point is within, else nil." nil nil)
-
-(autoload 'smart-java "hmouse-tag" "\
-Jumps to the definition of optional Java IDENTIFIER or the one at point.
-Optional second arg NEXT means jump to next matching Java tag.
-
-It assumes that its caller has already checked that the key was pressed in an
-appropriate buffer and has moved the cursor to the selected buffer.
-
-If:
- (1) within a commented @see cross-reference, the referent is displayed;
- (2) on a `package' or `import' statement, the referent is displayed;
-     Look for referent files in the directory list `smart-java-package-dirs'.
- (3) on an Java identifier, the identifier definition is displayed,
-     assuming the identifier is found within an `etags' generated tag file
-     in the current directory or any of its ancestor directories." t nil)
-
-(autoload 'smart-java-at-tag-p "hmouse-tag" "\
-Return Java tag name that point is within, else nil." nil nil)
-
-(autoload 'smart-lisp-mode-p "hmouse-tag" "\
-Return t if in a mode which uses Lisp symbols." nil nil)
-
-(autoload 'smart-objc "hmouse-tag" "\
-Jumps to the definition of optional Objective-C IDENTIFIER or the one at point.
-Optional second arg NEXT means jump to next matching Objective-C tag.
-
-It assumes that its caller has already checked that the key was pressed in an
-appropriate buffer and has moved the cursor to the selected buffer.
-
-If:
- (1) on a `#include' statement, the include file is displayed;
-     Look for include file in directory lists `smart-c-cpp-include-dirs'
-     and `smart-c-include-dirs'.
- (2) on an Objective-C identifier, the identifier definition is displayed,
-     assuming the identifier is found within an `etags' generated tag file
-     in the current directory or any of its ancestor directories.
- (3) if `smart-c-use-lib-man' is non-nil, the Objective-C identifier is
-     recognized as a library symbol, and a man page is found for the
-     identifier, then the man page is displayed." t nil)
-
-(autoload 'smart-tags-file-path "hmouse-tag" "\
-Expand relative FILE name by looking it up in the nearest tags file.
-Return FILE unchanged if it exists relative to the current directory or
-cannot be expanded via a tags file." nil nil)
-
-(autoload 'smart-tags-file "hmouse-tag" "\
-Return appropriate tags file name for CURR-FILENAME or `tags-file-name'.
-Optional NAME-OF-TAGS-FILE is the literal filename for which to look." nil nil)
-
-;;;***
-
-;;;### (autoloads (hyperbole) "hui-mini" "hyperbole/hui-mini.el")
-
-(autoload 'hyperbole "hui-mini" "\
-Invokes default Hyperbole menu user interface when not already active.
-Suitable for binding to a key, e.g. {C-h h}.
-Non-interactively, returns t if menu is actually invoked by call, else nil.
-
-Two optional arguments may be given to invoke alternative menus.
-MENU (a symbol) specifies the menu to invoke from MENU-LIST, (a
-Hyperbole menu list structure).  MENU defaults to 'hyperbole and MENU-LIST
-to `hui:menus'.  See `hui:menus' definition for the format of the menu list
-structure." t nil)
-
-;;;***
-
-;;;### (autoloads (var:append) "hvar" "hyperbole/hvar.el")
-
-(autoload 'var:append "hvar" "\
-Appends to value held by VAR-SYMBOL-NAME, LIST-TO-ADD.  Returns new value.
-If VAR-SYMBOL-NAME is unbound, it is set to LIST-TO-ADD.
-Often used to append to 'hook' variables." nil nil)
-
-;;;***
-
-;;;### (autoloads (hypb:display-file-with-logo hypb:configuration) "hypb" "hyperbole/hypb.el")
-
-(autoload 'hypb:configuration "hypb" "\
-Insert Emacs configuration information at the end of optional OUT-BUF or the current buffer." nil nil)
-
-(autoload 'hypb:display-file-with-logo "hypb" "\
-Display an optional text FILE with the InfoDock Associates logo prepended.
-Without file, logo is prepended to the current buffer." nil nil)
-
-;;;***
-
-;;;### (autoloads nil "hyperbole" "hyperbole/hyperbole.el")
-
-(defvar action-key-url-function 'w3-fetch "\
-Value is a function of one argument, a url, which displays the url referent.
-Possible values are:
-  w3-fetch - display using the W3 Emacs web browser;
-  highlight-headers-follow-url-netscape - display in Netscape;
-  highlight-headers-follow-url-mosaic - display in Mosaic.")
-
-(defvar kimport:mode-alist '((t . kimport:text) (outline-mode . kimport:star-outline)) "\
-Alist of (major-mode . importation-function) elements.
-This determines the type of importation done on a file when `kimport:file' is
-called if the major mode of the import file matches the car of an element in
-this list.  If there is no match, then `kimport:suffix-alist' is checked.  If
-that yields no match, the element in this list whose car is 't is used.  It
-normally does an import of a koutline or text file.
-
-Each importation-function must take two arguments, a buffer/file to import
-and a buffer/file into which to insert the imported elements and a third
-optional argument, CHILDREN-P, which when non-nil means insert imported cells
-as the initial set of children of the current cell, if any.
-
-   outline-mode  - imported as an Emacs outline whose entries begin with
-                   asterisks; 
-   .kot
-   .kotl         - imported as a structured koutline
-
-   all others    - imported as text.")
-
-(defvar kimport:suffix-alist '(("\\.otl$" . kimport:star-outline) ("\\.aug$" . kimport:aug-post-outline)) "\
-Alist of (buffer-name-suffix-regexp . importation-function) elements.
-This determines the type of importation done on a file when `kimport:file' is
-called.  Each importation-function must take two arguments, a buffer/file to
-import and a buffer/file into which to insert the imported elements and a
-third optional argument, CHILDREN-P, which when non-nil means insert imported
-cells as the initial set of children of the current cell, if any.
-
-   .otl  - imported as an Emacs outline whose entries begin with asterisks;
-   .kot
-   .kotl - imported as a structured koutline
-   .aug  - imported as an Augment post-numbered outline.")
-
-;;;***
-
-;;;### (autoloads (wconfig-yank-pop wconfig-ring-save wconfig-delete-pop wconfig-restore-by-name wconfig-delete-by-name wconfig-add-by-name) "wconfig" "hyperbole/wconfig.el")
-
-(autoload 'wconfig-add-by-name "wconfig" "\
-Saves the current window configuration under the string NAME.
-When called interactively and a window configuration already exists under
-NAME, confirms whether or not to replace it." t nil)
-
-(autoload 'wconfig-delete-by-name "wconfig" "\
-Deletes window configuration saved under NAME." t nil)
-
-(autoload 'wconfig-restore-by-name "wconfig" "\
-Restores window configuration saved under NAME." t nil)
-
-(autoload 'wconfig-delete-pop "wconfig" "\
-Replaces current window config with most recently saved config in ring.
-Then deletes this new configuration from the ring." t nil)
-
-(autoload 'wconfig-ring-save "wconfig" "\
-Saves the current window configuration onto the save ring.
-Use {\\[wconfig-yank-pop]} to restore it at a later time." t nil)
-
-(autoload 'wconfig-yank-pop "wconfig" "\
-Replaces current window config with prefix arg Nth prior one in save ring.
-Interactively, default value of N = 1, meaning the last saved window
-configuration is displayed.
-
-The sequence of window configurations wraps around, so that after the oldest
-one comes the newest one." t nil)
-
-;;;***
-
-;;;### (autoloads (rolo-logic) "wrolo-logic" "hyperbole/wrolo-logic.el")
-
-(autoload 'rolo-logic "wrolo-logic" "\
-Apply FUNC to all entries in optional IN-BUFS, display entries where FUNC is non-nil.
-If IN-BUFS is nil, 'rolo-file-list' is used.  If optional COUNT-ONLY is
-non-nil, don't display entries, return count of matching entries only.  If
-optional INCLUDE-SUB-ENTRIES flag is non-nil, FUNC will be applied across all
-sub-entries at once.  Default is to apply FUNC to each entry and sub-entry
-separately.  Entries are displayed with all of their sub-entries unless
-INCLUDE-SUB-ENTRIES is nil and optional NO-SUB-ENTRIES-OUT flag is non-nil.
-FUNC should use the free variables 'start' and 'end' which contain the limits
-of the region on which it should operate.  Returns number of applications of
-FUNC that return non-nil." t nil)
-
-;;;***
-
-;;;### (autoloads (rolo-yank rolo-toggle-datestamps rolo-sort rolo-kill rolo-grep rolo-fgrep rolo-edit rolo-display-matches rolo-add) "wrolo" "hyperbole/wrolo.el")
-
-(autoload 'rolo-add "wrolo" "\
-Adds a new entry in personal rolodex for NAME.
-Last name first is best, e.g. \"Smith, John\".
-With prefix argument, prompts for optional FILE to add entry within.
-NAME may be of the form: parent/child to insert child below a parent
-entry which begins with the parent string." t nil)
-
-(autoload 'rolo-display-matches "wrolo" "\
-Display optional DISPLAY-BUF buffer of previously found rolodex matches.
-If DISPLAY-BUF is nil, use the value in `rolo-display-buffer'.
-Second arg RETURN-TO-BUFFER is the buffer to leave point within after the display." t nil)
-
-(autoload 'rolo-edit "wrolo" "\
-Edits a rolodex entry given by optional NAME within `rolo-file-list'.
-With prefix argument, prompts for optional FILE to locate entry within.
-With no NAME arg, simply displays FILE or first entry in `rolo-file-list' in an
-editable mode.  NAME may be of the form: parent/child to edit child below a
-parent entry which begins with the parent string." t nil)
-
-(autoload 'rolo-fgrep "wrolo" "\
-Display rolodex entries matching STRING.
-To a maximum of optional prefix arg MAX-MATCHES, in file(s) from optional
-ROLO-FILE or rolo-file-list.  Default is to find all matching entries.  Each
-entry is displayed with all of its sub-entries.  Optional COUNT-ONLY non-nil
-means don't retrieve and don't display matching entries.  Optional NO-DISPLAY
-non-nil means retrieve entries but don't display.
-
-Nil value of MAX-MATCHES means find all matches, t value means find all matches
-but omit file headers, negative values mean find up to the inverse of that
-number of entries and omit file headers.
-
-Returns number of entries matched.  See also documentation for the variable
-rolo-file-list." t nil)
-
-(autoload 'rolo-grep "wrolo" "\
-Display rolodex entries matching REGEXP.
-To a maximum of prefix arg MAX-MATCHES, in buffer(s) from optional ROLO-BUFS or
-rolo-file-list.  Default is to find all matching entries.  Each entry is
-displayed with all of its sub-entries.  Optional COUNT-ONLY non-nil means don't
-retrieve and don't display matching entries.  Optional NO-DISPLAY non-nil
-means retrieve entries but don't display.
-
-Nil value of MAX-MATCHES means find all matches, t value means find all matches
-but omit file headers, negative values mean find up to the inverse of that
-number of entries and omit file headers.
-
-Returns number of entries matched.  See also documentation for the variable
-rolo-file-list." t nil)
-
-(autoload 'rolo-kill "wrolo" "\
-Kills a rolodex entry given by NAME within `rolo-file-list'.
-With prefix argument, prompts for optional FILE to locate entry within.
-NAME may be of the form: parent/child to kill child below a parent entry
-which begins with the parent string.
-Returns t if entry is killed, nil otherwise." t nil)
-
-(autoload 'rolo-sort "wrolo" "\
-Sorts up to 14 levels of entries in ROLO-FILE (default is personal rolo).
-Assumes entries are delimited by one or more `*'characters.
-Returns list of number of groupings at each entry level." t nil)
-
-(autoload 'rolo-toggle-datestamps "wrolo" "\
-Toggle whether datestamps are updated when rolodex entries are modified.
-With optional ARG, turn them on iff ARG is positive." t nil)
-
-(autoload 'rolo-yank "wrolo" "\
-Inserts at point the first rolodex entry matching NAME.
-With optional prefix arg, REGEXP-P, treats NAME as a regular expression instead
-of a string." t nil)
-
-;;;***
-
-;;;### (autoloads (iso-accents-mode) "iso-acc" "iso/iso-acc.el")
-
-(autoload 'iso-accents-mode "iso-acc" "\
-Toggle ISO Accents mode, in which accents modify the following letter.
-This permits easy insertion of accented characters according to ISO-8859-1.
-When Iso-accents mode is enabled, accent character keys
-\(`, ', \", ^, / and ~) do not self-insert; instead, they modify the following
-letter key so that it inserts an ISO accented letter.
-
-You can customize ISO Accents mode to a particular language
-with the command `iso-accents-customize'.
-
-Special combinations: ~c gives a c with cedilla,
-~d gives an Icelandic eth (d with dash).
-~t gives an Icelandic thorn.
-\"s gives German sharp s.
-/a gives a with ring.
-/e gives an a-e ligature.
-~< and ~> give guillemots.
-~! gives an inverted exclamation mark.
-~? gives an inverted question mark.
-
-With an argument, a positive argument enables ISO Accents mode, 
-and a negative argument disables it." t nil)
-
-;;;***
-
-;;;### (autoloads (encode-hz-buffer encode-hz-region decode-hz-buffer decode-hz-region) "china-util" "language/china-util.el")
-
-(autoload 'decode-hz-region "china-util" "\
-Decode HZ/ZW encoded text in the current region.
-Return the length of resulting text." t nil)
-
-(autoload 'decode-hz-buffer "china-util" "\
-Decode HZ/ZW encoded text in the current buffer." t nil)
-
-(autoload 'encode-hz-region "china-util" "\
-Encode the text in the current region to HZ.
-Return the length of resulting text." t nil)
-
-(autoload 'encode-hz-buffer "china-util" "\
-Encode the text in the current buffer to HZ." t nil)
-
-;;;***
-
-;;;### (autoloads (read-hiragana-string japanese-zenkaku-region japanese-hankaku-region japanese-hiragana-region japanese-katakana-region japanese-zenkaku japanese-hankaku japanese-hiragana japanese-katakana) "japan-util" "language/japan-util.el")
-
-(autoload 'japanese-katakana "japan-util" "\
-Convert argument to Katakana and return that.
-The argument may be a character or string.  The result has the same type.
-The argument object is not altered--the value is a copy.
-Optional argument HANKAKU t means to convert to `hankaku' Katakana
- (`japanese-jisx0201-kana'), in which case return value
- may be a string even if OBJ is a character if two Katakanas are
- necessary to represent OBJ." nil nil)
-
-(autoload 'japanese-hiragana "japan-util" "\
-Convert argument to Hiragana and return that.
-The argument may be a character or string.  The result has the same type.
-The argument object is not altered--the value is a copy." nil nil)
-
-(autoload 'japanese-hankaku "japan-util" "\
-Convert argument to `hankaku' and return that.
-The argument may be a character or string.  The result has the same type.
-The argument object is not altered--the value is a copy.
-Optional argument ASCII-ONLY non-nil means to return only ASCII character." nil nil)
-
-(autoload 'japanese-zenkaku "japan-util" "\
-Convert argument to `zenkaku' and return that.
-The argument may be a character or string.  The result has the same type.
-The argument object is not altered--the value is a copy." nil nil)
-
-(autoload 'japanese-katakana-region "japan-util" "\
-Convert Japanese `hiragana' chars in the region to `katakana' chars.
-Optional argument HANKAKU t means to convert to `hankaku katakana' character
-of which charset is `japanese-jisx0201-kana'." t nil)
-
-(autoload 'japanese-hiragana-region "japan-util" "\
-Convert Japanese `katakana' chars in the region to `hiragana'  chars." t nil)
-
-(autoload 'japanese-hankaku-region "japan-util" "\
-Convert Japanese `zenkaku' chars in the region to `hankaku' chars.
-`Zenkaku' chars belong to `japanese-jisx0208'
-`Hankaku' chars belong to `ascii' or `japanese-jisx0201-kana'.
-Optional argument ASCII-ONLY non-nil means to convert only to ASCII char." t nil)
-
-(autoload 'japanese-zenkaku-region "japan-util" "\
-Convert hankaku' chars in the region to Japanese `zenkaku' chars.
-`Zenkaku' chars belong to `japanese-jisx0208'
-`Hankaku' chars belong to `ascii' or `japanese-jisx0201-kana'." t nil)
-
-(autoload 'read-hiragana-string "japan-util" "\
-Read a Hiragana string from the minibuffer, prompting with string PROMPT.
-If non-nil, second arg INITIAL-INPUT is a string to insert before reading." nil nil)
-
-;;;***
-
-;;;### (autoloads (thai-compose-buffer thai-compose-region) "thai-util" "language/thai-util.el")
-
-(autoload 'thai-compose-region "thai-util" "\
-Compose Thai characters in the region." t nil)
-
-(autoload 'thai-compose-buffer "thai-util" "\
-Compose Thai characters in the current buffer." t nil)
-
-;;;***
-
-;;;### (autoloads (quail-use-package) "quail" "leim/quail.el")
-
-(autoload 'quail-use-package "quail" "\
-Start using Quail package PACKAGE-NAME.
-The remaining arguments are libraries to be loaded before using the package." nil nil)
-
-;;;***
-
-;;;### (autoloads (mc-deactivate-passwd mc-install-write-mode mc-install-read-mode) "mailcrypt" "mailcrypt/mailcrypt.el")
-
-(autoload 'mc-install-read-mode "mailcrypt" nil t nil)
-
-(autoload 'mc-install-write-mode "mailcrypt" nil t nil)
-
-(autoload 'mc-deactivate-passwd "mailcrypt" "\
-*Deactivate the passphrase cache." t nil)
-
-;;;***
-
-;;;### (autoloads (mc-pgp-fetch-key mc-scheme-pgp) "mc-pgp" "mailcrypt/mc-pgp.el")
-
-(autoload 'mc-scheme-pgp "mc-pgp" nil nil nil)
-
-(autoload 'mc-pgp-fetch-key "mc-pgp" "\
-Attempt to fetch a key for addition to PGP keyring.  Interactively,
-prompt for string matching key to fetch.
-
-Non-interactively, ID must be a pair.  The CAR must be a bare Email
-address and the CDR a keyID (with \"0x\" prefix).  Either, but not
-both, may be nil.
-
-Return t if we think we were successful; nil otherwise.  Note that nil
-is not necessarily an error, since we may have merely fired off an Email
-request for the key." t nil)
-
-;;;***
-
-;;;### (autoloads (mc-remailer-insert-response-block mc-remailer-encrypt-for-chain mc-remailer-insert-pseudonym) "mc-remail" "mailcrypt/mc-remail.el")
-
-(autoload 'mc-remailer-insert-pseudonym "mc-remail" "\
-Insert pseudonym as a From field in the hash-mark header.
-
-See the documentation for the variable `mc-remailer-pseudonyms' for
-more information." t nil)
-
-(autoload 'mc-remailer-encrypt-for-chain "mc-remail" "\
-Encrypt message for a remailer chain, prompting for chain to use.
-
-With \\[universal-argument], pause before each encryption." t nil)
-
-(autoload 'mc-remailer-insert-response-block "mc-remail" "\
-Insert response block at point, prompting for chain to use.
-
-With \\[universal-argument], enter a recursive edit of the innermost
-layer of the block before encrypting it." t nil)
-
-;;;***
-
-;;;### (autoloads (mc-mh-snarf-keys mc-mh-verify-signature mc-mh-decrypt-message mc-gnus-decrypt-message mc-gnus-snarf-keys mc-gnus-verify-signature mc-vm-snarf-keys mc-vm-decrypt-message mc-vm-verify-signature mc-rmail-decrypt-message mc-rmail-verify-signature mc-rmail-summary-snarf-keys mc-rmail-summary-decrypt-message mc-rmail-summary-verify-signature mc-snarf-keys mc-snarf mc-insert-public-key mc-verify-signature mc-verify mc-sign-message mc-sign mc-decrypt-message mc-decrypt mc-encrypt-message mc-encrypt mc-cleanup-recipient-headers) "mc-toplev" "mailcrypt/mc-toplev.el")
-
-(autoload 'mc-cleanup-recipient-headers "mc-toplev" nil nil nil)
-
-(autoload 'mc-encrypt "mc-toplev" "\
-*Encrypt the current buffer.
-
-Exact behavior depends on current major mode.
-
-With \\[universal-argument], prompt for User ID to sign as.
-
-With \\[universal-argument] \\[universal-argument], prompt for encryption scheme to use." t nil)
-
-(autoload 'mc-encrypt-message "mc-toplev" "\
-*Encrypt a message for RECIPIENTS using the given encryption SCHEME.
-RECIPIENTS is a comma separated string. If SCHEME is nil, use the value
-of `mc-default-scheme'.  Returns t on success, nil otherwise." nil nil)
-
-(autoload 'mc-decrypt "mc-toplev" "\
-*Decrypt a message in the current buffer.
-
-Exact behavior depends on current major mode." t nil)
-
-(autoload 'mc-decrypt-message "mc-toplev" "\
-Decrypt whatever message is in the current buffer.
-Returns a pair (SUCCEEDED . VERIFIED) where SUCCEEDED is t if the encryption
-succeeded and VERIFIED is t if it had a valid signature." nil nil)
-
-(autoload 'mc-sign "mc-toplev" "\
-*Sign a message in the current buffer.
-
-Exact behavior depends on current major mode.
-
-With one prefix arg, prompts for private key to use, with two prefix args,
-also prompts for encryption scheme to use.  With negative prefix arg,
-inhibits clearsigning (pgp)." t nil)
-
-(autoload 'mc-sign-message "mc-toplev" "\
-Clear sign the message." nil nil)
-
-(autoload 'mc-verify "mc-toplev" "\
-*Verify a message in the current buffer.
-
-Exact behavior depends on current major mode." t nil)
-
-(autoload 'mc-verify-signature "mc-toplev" "\
-*Verify the signature of the signed message in the current buffer.
-Show the result as a message in the minibuffer. Returns t if the signature
-is verified." nil nil)
-
-(autoload 'mc-insert-public-key "mc-toplev" "\
-*Insert your public key at point.
-With one prefix arg, prompts for user id to use. With two prefix
-args, prompts for encryption scheme." t nil)
-
-(autoload 'mc-snarf "mc-toplev" "\
-*Add all public keys in the buffer to your keyring.
-
-Exact behavior depends on current major mode." t nil)
-
-(autoload 'mc-snarf-keys "mc-toplev" "\
-*Add all public keys in the buffer to your keyring." t nil)
-
-(autoload 'mc-rmail-summary-verify-signature "mc-toplev" "\
-*Verify the signature in the current message." t nil)
-
-(autoload 'mc-rmail-summary-decrypt-message "mc-toplev" "\
-*Decrypt the contents of this message" t nil)
-
-(autoload 'mc-rmail-summary-snarf-keys "mc-toplev" "\
-*Adds keys from current message to public key ring" t nil)
-
-(autoload 'mc-rmail-verify-signature "mc-toplev" "\
-*Verify the signature in the current message." t nil)
-
-(autoload 'mc-rmail-decrypt-message "mc-toplev" "\
-*Decrypt the contents of this message" t nil)
-
-(autoload 'mc-vm-verify-signature "mc-toplev" "\
-*Verify the signature in the current VM message" t nil)
-
-(autoload 'mc-vm-decrypt-message "mc-toplev" "\
-*Decrypt the contents of the current VM message" t nil)
-
-(autoload 'mc-vm-snarf-keys "mc-toplev" "\
-*Snarf public key from the contents of the current VM message" t nil)
-
-(autoload 'mc-gnus-verify-signature "mc-toplev" nil t nil)
-
-(autoload 'mc-gnus-snarf-keys "mc-toplev" nil t nil)
-
-(autoload 'mc-gnus-decrypt-message "mc-toplev" nil t nil)
-
-(autoload 'mc-mh-decrypt-message "mc-toplev" "\
-Decrypt the contents of the current MH message in the show buffer." t nil)
-
-(autoload 'mc-mh-verify-signature "mc-toplev" "\
-*Verify the signature in the current MH message." t nil)
-
-(autoload 'mc-mh-snarf-keys "mc-toplev" nil t nil)
-
-;;;***
-
-;;;### (autoloads (mh-letter-mode mh-smail-other-window mh-smail-batch mh-smail) "mh-comp" "mh-e/mh-comp.el")
-
-(autoload 'mh-smail "mh-comp" "\
-Compose and send mail with the MH mail system.
-This function is an entry point to mh-e, the Emacs front end
-to the MH mail system.
-
-See documentation of `\\[mh-send]' for more details on composing mail." t nil)
-
-(autoload 'mh-smail-batch "mh-comp" "\
-Set up a mail composition draft with the MH mail system.
-This function is an entry point to mh-e, the Emacs front end
-to the MH mail system.  This function does not prompt the user
-for any header fields, and thus is suitable for use by programs
-that want to create a mail buffer.
-Users should use `\\[mh-smail]' to compose mail." nil nil)
-
-(autoload 'mh-smail-other-window "mh-comp" "\
-Compose and send mail in other window with the MH mail system.
-This function is an entry point to mh-e, the Emacs front end
-to the MH mail system.
-
-See documentation of `\\[mh-send]' for more details on composing mail." t nil)
-
-(autoload 'mh-letter-mode "mh-comp" "\
-Mode for composing letters in mh-e.\\<mh-letter-mode-map>
-When you have finished composing, type \\[mh-send-letter] to send the message
-using the MH mail handling system.
-See the documentation for \\[mh-edit-mhn] for information on composing MIME
-messages.
-
-\\{mh-letter-mode-map}
-
-Variables controlling this mode (defaults in parentheses):
-
- mh-delete-yanked-msg-window (nil)
-    If non-nil, \\[mh-yank-cur-msg] will delete any windows displaying
-    the yanked message.
-
- mh-yank-from-start-of-msg (t)
-    If non-nil, \\[mh-yank-cur-msg] will include the entire message.
-    If `body', just yank the body (no header).
-    If nil, only the portion of the message following the point will be yanked.
-    If there is a region, this variable is ignored.
-
- mh-ins-buf-prefix (\"> \")
-    String to insert before each non-blank line of a message as it is
-    inserted in a draft letter.
-
- mh-signature-file-name (\"~/.signature\")
-    File to be inserted into message by \\[mh-insert-signature].
-
-Upon invoking mh-letter-mode, text-mode-hook and mh-letter-mode-hook are
-invoked with no args, if those values are non-nil." t nil)
-
-;;;***
-
-;;;### (autoloads (mh-version mh-rmail) "mh-e" "mh-e/mh-e.el")
-
-(autoload 'mh-rmail "mh-e" "\
-Inc(orporate) new mail with MH, or, with arg, scan an MH mail folder.
-This function is an entry point to mh-e, the Emacs front end
-to the MH mail system." t nil)
-
-(autoload 'mh-version "mh-e" "\
-Display version information about mh-e and the MH mail handling system." t nil)
-
-;;;***
-
-;;;### (autoloads nil "mh-mime" "mh-e/mh-mime.el")
-
-(defvar mh-mime-content-types '(("text/plain") ("text/richtext") ("multipart/mixed") ("multipart/alternative") ("multipart/digest") ("multipart/parallel") ("message/rfc822") ("message/partial") ("message/external-body") ("application/octet-stream") ("application/postscript") ("image/jpeg") ("image/gif") ("audio/basic") ("video/mpeg")) "\
-Legal MIME content types.  See documentation for \\[mh-edit-mhn].")
-
-;;;***
-
-;;;### (autoloads nil "mh-utils" "mh-e/mh-utils.el")
-
-(put 'mh-progs 'risky-local-variable t)
-
-(put 'mh-lib 'risky-local-variable t)
-
-;;;***
-
-;;;### (autoloads nil "abbrev" "modes/abbrev.el")
-
-;;;***
-
-;;;### (autoloads (ada-make-filename-from-adaname ada-mode) "ada-mode" "modes/ada-mode.el")
-
-(autoload 'ada-mode "ada-mode" "\
-Ada Mode is the major mode for editing Ada code.
-
-Bindings are as follows: (Note: 'LFD' is control-j.)
-
- Indent line                                          '\\[ada-tab]'
- Indent line, insert newline and indent the new line. '\\[newline-and-indent]'
-
- Re-format the parameter-list point is in             '\\[ada-format-paramlist]'
- Indent all lines in region                           '\\[ada-indent-region]'
- Call external pretty printer program                 '\\[ada-call-pretty-printer]'
-
- Adjust case of identifiers and keywords in region    '\\[ada-adjust-case-region]'
- Adjust case of identifiers and keywords in buffer    '\\[ada-adjust-case-buffer]'
-
- Call EXTERNAL pretty printer (if you have one)       '\\[ada-call-pretty-printer]'
-
- Fill comment paragraph                               '\\[ada-fill-comment-paragraph]'
- Fill comment paragraph and justify each line         '\\[ada-fill-comment-paragraph-justify]'
- Fill comment paragraph, justify and append postfix   '\\[ada-fill-comment-paragraph-postfix]'
-
- Next func/proc/task '\\[ada-next-procedure]'    Previous func/proc/task '\\[ada-previous-procedure]'
- Next package        '\\[ada-next-package]'  Previous package        '\\[ada-previous-package]'
-
- Goto matching start of current 'end ...;'            '\\[ada-move-to-start]'
- Goto end of current block                            '\\[ada-move-to-end]'
-
-Comments are handled using standard GNU Emacs conventions, including:
- Start a comment                                      '\\[indent-for-comment]'
- Comment region                                       '\\[comment-region]'
- Uncomment region                                     '\\[ada-uncomment-region]'
- Continue comment on next line                        '\\[indent-new-comment-line]'
-
-If you use imenu.el:
- Display index-menu of functions & procedures         '\\[imenu]'
-
-If you use find-file.el:
- Switch to other file (Body <-> Spec)                 '\\[ff-find-other-file]'
-                                                   or '\\[ff-mouse-find-other-file]
- Switch to other file in other window                 '\\[ada-ff-other-window]'
-                                                   or '\\[ff-mouse-find-other-file-other-window]
- If you use this function in a spec and no body is available, it gets created
- with body stubs.
-
-If you use ada-xref.el:
- Goto declaration:          '\\[ada-point-and-xref]' on the identifier
-                         or '\\[ada-goto-declaration]' with point on the identifier
- Complete identifier:       '\\[ada-complete-identifier]'
- Execute Gnatf:             '\\[ada-gnatf-current]'" t nil)
-
-(autoload 'ada-make-filename-from-adaname "ada-mode" "\
-Determine the filename of a package/procedure from its own Ada name." t nil)
-
-;;;***
-
-;;;### (autoloads (archive-mode) "arc-mode" "modes/arc-mode.el")
-
-(autoload 'archive-mode "arc-mode" "\
-Major mode for viewing an archive file in a dired-like way.
-You can move around using the usual cursor motion commands.
-Letters no longer insert themselves.
-Type `e' to pull a file out of the archive and into its own buffer;
-or click mouse-2 on the file's line in the archive mode buffer.
-
-If you edit a sub-file of this archive (as with the `e' command) and
-save it, the contents of that buffer will be saved back into the
-archive.
-
-\\{archive-mode-map}" nil nil)
-
-;;;***
-
-;;;### (autoloads (asm-mode) "asm-mode" "modes/asm-mode.el")
-
-(autoload 'asm-mode "asm-mode" "\
-Major mode for editing typical assembler code.
-Features a private abbrev table and the following bindings:
-
-\\[asm-colon]	outdent a preceding label, tab to next tab stop.
-\\[tab-to-tab-stop]	tab to next tab stop.
-\\[asm-newline]	newline, then tab to next tab stop.
-\\[asm-comment]	smart placement of assembler comments.
-
-The character used for making comments is set by the variable
-`asm-comment-char' (which defaults to `?;').
-
-Alternatively, you may set this variable in `asm-mode-set-comment-hook',
-which is called near the beginning of mode initialization.
-
-Turning on Asm mode runs the hook `asm-mode-hook' at the end of initialization.
-
-Special commands:
-\\{asm-mode-map}
-" t nil)
-
-;;;***
-
-;;;### (autoloads (autoconf-mode) "autoconf-mode" "modes/autoconf-mode.el")
-
-(autoload 'autoconf-mode "autoconf-mode" "\
-A major-mode to edit autoconf input files like configure.in
-\\{autoconf-mode-map}
-" t nil)
-
-;;;***
-
-;;;### (autoloads (awk-mode) "awk-mode" "modes/awk-mode.el")
-
-(autoload 'awk-mode "awk-mode" "\
-Major mode for editing AWK code.
-This is much like C mode except for the syntax of comments.  It uses
-the same keymap as C mode and has the same variables for customizing
-indentation.  It has its own abbrev table and its own syntax table.
-
-Turning on AWK mode calls the value of the variable `awk-mode-hook'
-with no args, if that value is non-nil." t nil)
-
-;;;***
-
-;;;### (autoloads (bibtex-mode) "bibtex" "modes/bibtex.el")
-
-(autoload 'bibtex-mode "bibtex" "\
-Major mode for editing bibtex files.
-
-\\{bibtex-mode-map}
-
-A command such as \\[bibtex-Book] will outline the fields for a BibTeX book entry.
-
-The optional fields start with the string OPT, and thus ignored by BibTeX.
-The OPT string may be removed from a field with \\[bibtex-remove-OPT].
-\\[bibtex-kill-optional-field] kills the current optional field entirely.
-\\[bibtex-remove-double-quotes] removes the double-quotes around the text of
-the current field.  \\[bibtex-empty-field] replaces the text of the current
-field with the default \"\".
-
-The command \\[bibtex-clean-entry] cleans the current entry, i.e. (i) removes
-double-quotes from entirely numerical fields, (ii) removes OPT from all
-non-empty optional fields, (iii) removes all empty optional fields, and (iv)
-checks that no non-optional fields are empty.
-
-Use \\[bibtex-find-text] to position the dot at the end of the current field.
-Use \\[bibtex-next-field] to move to end of the next field.
-
-The following may be of interest as well:
-
-  Functions:
-    find-bibtex-duplicates
-    find-bibtex-entry-location
-    hide-bibtex-entry-bodies
-    sort-bibtex-entries
-    validate-bibtex-buffer
-
-  Variables:
-    bibtex-clean-entry-zap-empty-opts
-    bibtex-entry-field-alist
-    bibtex-include-OPTannote
-    bibtex-include-OPTcrossref
-    bibtex-include-OPTkey
-    bibtex-maintain-sorted-entries
-    bibtex-mode-user-optional-fields
-
-Fields:
-    address
-           Publisher's address
-    annote
-           Long annotation used for annotated bibliographies (begins sentence)
-    author
-           Name(s) of author(s), in BibTeX name format
-    booktitle
-           Book title when the thing being referenced isn't the whole book.
-           For book entries, the title field should be used instead.
-    chapter
-           Chapter number
-    crossref
-	   The database key of the entry being cross referenced.
-    edition
-           Edition of a book (e.g., \"second\")
-    editor
-           Name(s) of editor(s), in BibTeX name format.
-           If there is also an author field, then the editor field should be
-           for the book or collection that the work appears in
-    howpublished
-            How something strange has been published (begins sentence)
-    institution
-           Sponsoring institution
-    journal
-           Journal name (macros are provided for many)
-    key
-           Alphabetizing and labeling key (needed when no author or editor)
-    month
-           Month (macros are provided)
-    note
-           To help the reader find a reference (begins sentence)
-    number
-           Number of a journal or technical report
-    organization
-           Organization (sponsoring a conference)
-    pages
-           Page number or numbers (use `--' to separate a range)
-    publisher
-           Publisher name
-    school
-           School name (for theses)
-    series
-           The name of a series or set of books.
-           An individual book will also have its own title
-    title
-           The title of the thing being referenced
-    type
-           Type of a technical report (e.g., \"Research Note\") to be used
-           instead of the default \"Technical Report\"
-    volume
-           Volume of a journal or multivolume work
-    year
-           Year---should contain only numerals
----------------------------------------------------------
-Entry to this mode calls the value of bibtex-mode-hook if that value is
-non-nil." t nil)
-
-;;;***
-
-;;;### (autoloads (c-add-style c-set-style java-mode objc-mode c++-mode c-mode) "cc-mode" "modes/cc-mode.el")
-
-(autoload 'c-mode "cc-mode" "\
-Major mode for editing K&R and ANSI C code.
-To submit a problem report, enter `\\[c-submit-bug-report]' from a
-c-mode buffer.  This automatically sets up a mail buffer with version
-information already added.  You just need to add a description of the
-problem, including a reproducible test case and send the message.
-
-To see what version of CC Mode you are running, enter `\\[c-version]'.
-
-The hook variable `c-mode-hook' is run with no args, if that value is
-bound and has a non-nil value.  Also the hook `c-mode-common-hook' is
-run first.
-
-Key bindings:
-\\{c-mode-map}" t nil)
-
-(autoload 'c++-mode "cc-mode" "\
-Major mode for editing C++ code.
-To submit a problem report, enter `\\[c-submit-bug-report]' from a
-c++-mode buffer.  This automatically sets up a mail buffer with
-version information already added.  You just need to add a description
-of the problem, including a reproducible test case, and send the
-message.
-
-To see what version of CC Mode you are running, enter `\\[c-version]'.
-
-The hook variable `c++-mode-hook' is run with no args, if that
-variable is bound and has a non-nil value.  Also the hook
-`c-mode-common-hook' is run first.
-
-Key bindings:
-\\{c++-mode-map}" t nil)
-
-(autoload 'objc-mode "cc-mode" "\
-Major mode for editing Objective C code.
-To submit a problem report, enter `\\[c-submit-bug-report]' from an
-objc-mode buffer.  This automatically sets up a mail buffer with
-version information already added.  You just need to add a description
-of the problem, including a reproducible test case, and send the
-message.
-
-To see what version of CC Mode you are running, enter `\\[c-version]'.
-
-The hook variable `objc-mode-hook' is run with no args, if that value
-is bound and has a non-nil value.  Also the hook `c-mode-common-hook'
-is run first.
-
-Key bindings:
-\\{objc-mode-map}" t nil)
-
-(autoload 'java-mode "cc-mode" "\
-Major mode for editing Java code.
-To submit a problem report, enter `\\[c-submit-bug-report]' from an
-java-mode buffer.  This automatically sets up a mail buffer with
-version information already added.  You just need to add a description
-of the problem, including a reproducible test case and send the
-message.
-
-To see what version of CC Mode you are running, enter `\\[c-version]'.
-
-The hook variable `java-mode-hook' is run with no args, if that value
-is bound and has a non-nil value.  Also the common hook
-`c-mode-common-hook' is run first.  Note that this mode automatically
-sets the \"java\" style before calling any hooks so be careful if you
-set styles in `c-mode-common-hook'.
-
-Key bindings:
-\\{java-mode-map}" t nil)
-
-(autoload 'c-set-style "cc-mode" "\
-Set CC Mode variables to use one of several different indentation styles.
-STYLENAME is a string representing the desired style from the list of
-styles described in the variable `c-style-alist'.  See that variable
-for details of setting up styles.
-
-The variable `c-indentation-style' always contains the buffer's current
-style name." t nil)
-
-(autoload 'c-add-style "cc-mode" "\
-Adds a style to `c-style-alist', or updates an existing one.
-STYLE is a string identifying the style to add or update.  DESCRIP is
-an association list describing the style and must be of the form:
-
-  ((VARIABLE . VALUE) [(VARIABLE . VALUE) ...])
-
-See the variable `c-style-alist' for the semantics of VARIABLE and
-VALUE.  This function also sets the current style to STYLE using
-`c-set-style' if the optional SET-P flag is non-nil." t nil)
-
-(fset 'set-c-style           'c-set-style)
-
-;;;***
-
-;;;### (autoloads (common-lisp-indent-function) "cl-indent" "modes/cl-indent.el")
-
-(autoload 'common-lisp-indent-function "cl-indent" nil nil nil)
-
-;;;***
-
-;;;### (autoloads (c-macro-expand) "cmacexp" "modes/cmacexp.el")
-
-(autoload 'c-macro-expand "cmacexp" "\
-Expand C macros in the region, using the C preprocessor.
-Normally display output in temp buffer, but
-prefix arg means replace the region with it.
-
-`c-macro-preprocessor' specifies the preprocessor to use.
-Prompt for arguments to the preprocessor (e.g. `-DDEBUG -I ./include')
-if the user option `c-macro-prompt-flag' is non-nil.
-
-Noninteractive args are START, END, SUBST.
-For use inside Lisp programs, see also `c-macro-expansion'." t nil)
-
-;;;***
-
-;;;### (autoloads (eiffel-mode) "eiffel3" "modes/eiffel3.el")
-
-(autoload 'eiffel-mode "eiffel3" "\
-Major mode for editing Eiffel programs." t nil)
-
-;;;***
-
-;;;### (autoloads (enriched-decode enriched-encode enriched-mode) "enriched" "modes/enriched.el")
-
-(autoload 'enriched-mode "enriched" "\
-Minor mode for editing text/enriched files.
-These are files with embedded formatting information in the MIME standard
-text/enriched format.
-Turning the mode on runs `enriched-mode-hook'.
-
-More information about Enriched mode is available in the file 
-etc/enriched.doc  in the Emacs distribution directory.
-
-Commands:
-
-\\<enriched-mode-map>\\{enriched-mode-map}" t nil)
-
-(autoload 'enriched-encode "enriched" nil nil nil)
-
-(autoload 'enriched-decode "enriched" nil nil nil)
-
-;;;***
-
-;;;### (autoloads (executable-self-display executable-set-magic) "executable" "modes/executable.el")
-
-(autoload 'executable-set-magic "executable" "\
-Set this buffer's interpreter to INTERPRETER with optional ARGUMENT.
-The variables `executable-magicless-file-regexp', `executable-prefix',
-`executable-insert', `executable-query' and `executable-chmod' control
-when and how magic numbers are inserted or replaced and scripts made
-executable." t nil)
-
-(autoload 'executable-self-display "executable" "\
-Turn a text file into a self-displaying Un*x command.
-The magic number of such a command displays all lines but itself." t nil)
-
-;;;***
-
-;;;### (autoloads (f90-mode) "f90" "modes/f90.el")
-
-(autoload 'f90-mode "f90" "\
-Major mode for editing Fortran 90 code in free format.
-
-\\[f90-indent-new-line] corrects current indentation and creates new indented line.
-\\[f90-indent-line] indents the current line correctly. 
-\\[f90-indent-subprogram] indents the current subprogram. 
-
-Type `? or `\\[help-command] to display a list of built-in abbrevs for F90 keywords.
-
-Key definitions:
-\\{f90-mode-map}
-
-Variables controlling indentation style and extra features:
-
- f90-do-indent
-    Extra indentation within do blocks.  (default 3)
- f90-if-indent
-    Extra indentation within if/select case/where/forall blocks. (default 3)
- f90-type-indent
-    Extra indentation within type/interface/block-data blocks.  (default 3)
- f90-program-indent
-    Extra indentation within program/module/subroutine/function blocks.
-      (default 2)
- f90-continuation-indent
-    Extra indentation applied to continuation lines.  (default 5)
- f90-comment-region
-    String inserted by \\[f90-comment-region] at start of each line in 
-    region.  (default \"!!!$\")
- f90-indented-comment-re
-    Regexp determining the type of comment to be intended like code.
-    (default \"!\")
- f90-directive-comment-re
-    Regexp of comment-like directive like \"!HPF\\\\$\", not to be indented.
-    (default \"!hpf\\\\$\")
- f90-break-delimiters
-    Regexp holding list of delimiters at which lines may be broken.
-    (default \"[-+*/><=,% \\t]\")
- f90-break-before-delimiters
-    Non-nil causes `f90-do-auto-fill' to break lines before delimiters.
-    (default t)
- f90-beginning-ampersand 
-    Automatic insertion of & at beginning of continuation lines. (default t)
- f90-smart-end 
-    From an END statement, check and fill the end using matching block start.
-    Allowed values are 'blink, 'no-blink, and nil, which determine
-    whether to blink the matching beginning.) (default 'blink)
- f90-auto-keyword-case
-    Automatic change of case of keywords. (default nil)
-    The possibilities are 'downcase-word, 'upcase-word, 'capitalize-word.
- f90-leave-line-no
-    Do not left-justify line numbers. (default nil)
- f90-startup-message
-    Set to nil to inhibit message first time F90 mode is used. (default t)
- f90-keywords-re
-    List of keywords used for highlighting/upcase-keywords etc.
-
-Turning on F90 mode calls the value of the variable `f90-mode-hook'
-with no args, if that value is non-nil." t nil)
-
-;;;***
-
-;;;### (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)
-
-(autoload 'fortran-mode "fortran" "\
-Major mode for editing Fortran code.
-\\[fortran-indent-line] indents the current Fortran line correctly. 
-DO statements must not share a common CONTINUE.
-
-Type ;? or ;\\[help-command] to display a list of built-in abbrevs for Fortran keywords.
-
-Key definitions:
-\\{fortran-mode-map}
-
-Variables controlling indentation style and extra features:
-
- comment-start
-    Normally nil in Fortran mode.  If you want to use comments
-    starting with `!', set this to the string \"!\".
- fortran-do-indent
-    Extra indentation within do blocks.  (default 3)
- fortran-if-indent
-    Extra indentation within if blocks.  (default 3)
- fortran-structure-indent
-    Extra indentation within structure, union, map and interface blocks.
-    (default 3)
- fortran-continuation-indent
-    Extra indentation applied to continuation statements.  (default 5)
- fortran-comment-line-extra-indent
-    Amount of extra indentation for text within full-line comments. (default 0)
- fortran-comment-indent-style
-    nil    means don't change indentation of text in full-line comments,
-    fixed  means indent that text at `fortran-comment-line-extra-indent' beyond
-           the value of `fortran-minimum-statement-indent-fixed' (for fixed
-           format continuation style) or `fortran-minimum-statement-indent-tab'
-           (for TAB format continuation style).
-    relative  means indent at `fortran-comment-line-extra-indent' beyond the
- 	      indentation for a line of code.
-    (default 'fixed)
- fortran-comment-indent-char
-    Single-character string to be inserted instead of space for
-    full-line comment indentation.  (default \" \")
- fortran-minimum-statement-indent-fixed
-    Minimum indentation for Fortran statements in fixed format mode. (def.6)
- fortran-minimum-statement-indent-tab
-    Minimum indentation for Fortran statements in TAB format mode. (default 9)
- fortran-line-number-indent
-    Maximum indentation for line numbers.  A line number will get
-    less than this much indentation if necessary to avoid reaching
-    column 5.  (default 1)
- fortran-check-all-num-for-matching-do
-    Non-nil causes all numbered lines to be treated as possible \"continue\"
-    statements.  (default nil)
- fortran-blink-matching-if 
-    Non-nil causes \\[fortran-indent-line] on an ENDIF statement to blink on
-    matching IF.  Also, from an ENDDO statement, blink on matching DO [WHILE]
-    statement.  (default nil)
- fortran-continuation-string
-    Single-character string to be inserted in column 5 of a continuation
-    line.  (default \"$\")
- fortran-comment-region
-    String inserted by \\[fortran-comment-region] at start of each line in 
-    region.  (default \"c$$$\")
- fortran-electric-line-number
-    Non-nil causes line number digits to be moved to the correct column 
-    as typed.  (default t)
- fortran-break-before-delimiters
-    Non-nil causes `fortran-fill' breaks lines before delimiters.
-    (default t)
- fortran-startup-message
-    Set to nil to inhibit message first time Fortran mode is used.
-
-Turning on Fortran mode calls the value of the variable `fortran-mode-hook'
-with no args, if that value is non-nil." t nil)
-
-;;;***
-
-;;;### (autoloads (hide-ifdef-mode) "hideif" "modes/hideif.el")
-
-(add-minor-mode 'hide-ifdef-mode " Ifdef")
-
-(autoload 'hide-ifdef-mode "hideif" "\
-Toggle Hide-Ifdef mode.  This is a minor mode, albeit a large one.
-With ARG, turn Hide-Ifdef mode on if arg is positive, off otherwise.
-In Hide-Ifdef mode, code within #ifdef constructs that the C preprocessor
-would eliminate may be hidden from view.  Several variables affect
-how the hiding is done:
-
-hide-ifdef-env
-	An association list of defined and undefined symbols for the
-	current buffer.  Initially, the global value of `hide-ifdef-env'
-	is used.
-
-hide-ifdef-define-alist
-	An association list of defined symbol lists.  
-        Use `hide-ifdef-set-define-alist' to save the current `hide-ifdef-env'
-        and `hide-ifdef-use-define-alist' to set the current `hide-ifdef-env'
-        from one of the lists in `hide-ifdef-define-alist'.
-
-hide-ifdef-lines
-	Set to non-nil to not show #if, #ifdef, #ifndef, #else, and
-	#endif lines when hiding.
-
-hide-ifdef-initially
-	Indicates whether `hide-ifdefs' should be called when Hide-Ifdef mode
-	is activated.
-
-hide-ifdef-read-only
-	Set to non-nil if you want to make buffers read only while hiding.
-	After `show-ifdefs', read-only status is restored to previous value.
-
-\\{hide-ifdef-mode-map}" t nil)
-
-(defvar hide-ifdef-initially nil "\
-*Non-nil means call `hide-ifdefs' when Hide-Ifdef mode is first activated.")
-
-(defvar hide-ifdef-read-only nil "\
-*Set to non-nil if you want buffer to be read-only while hiding text.")
-
-(defvar hide-ifdef-lines nil "\
-*Non-nil means hide the #ifX, #else, and #endif lines.")
-
-;;;***
-
-;;;### (autoloads (hs-minor-mode hs-hide-block hs-hide-all) "hideshow" "modes/hideshow.el")
-
-(defvar hs-minor-mode nil "\
-Non-nil if using hideshow mode as a minor mode of some other mode.
-Use the command `hs-minor-mode' to toggle this variable.")
-
-(autoload 'hs-hide-all "hideshow" "\
-Hides all top-level blocks, displaying only first and last lines.
-It moves point to the beginning of the line, and it runs the normal hook
-`hs-hide-hook'.  See documentation for `run-hooks'." t nil)
-
-(autoload 'hs-hide-block "hideshow" "\
-Selects a block and hides it.  With prefix arg, reposition at end.
-Block is defined as a sexp for lispish modes, mode-specific otherwise.
-Comments are blocks, too.  Upon completion, point is at repositioned and
-the normal hook `hs-hide-hook' is run.  See documentation for `run-hooks'." t nil)
-
-(autoload 'hs-minor-mode "hideshow" "\
-Toggle hideshow minor mode.
-With ARG, turn hideshow minor mode on if ARG is positive, off otherwise.
-When hideshow minor mode is on, the menu bar is augmented with hideshow
-commands and the hideshow commands are enabled.  The variables
-`selective-display' and `selective-display-ellipses' are set to t.
-Last, the normal hook `hs-minor-mode-hook' is run; see the doc for `run-hooks'.
-
-Turning hideshow minor mode off reverts the menu bar and the
-variables to default values and disables the hideshow commands." t nil)
-
-;;;***
-
-;;;### (autoloads (icon-mode) "icon" "modes/icon.el")
-
-(autoload 'icon-mode "icon" "\
-Major mode for editing Icon code.
-Expression and list commands understand all Icon brackets.
-Tab indents for Icon code.
-Paragraphs are separated by blank lines only.
-Delete converts tabs to spaces as it moves back.
-\\{icon-mode-map}
-Variables controlling indentation style:
- icon-tab-always-indent
-    Non-nil means TAB in Icon mode should always reindent the current line,
-    regardless of where in the line point is when the TAB command is used.
- icon-auto-newline
-    Non-nil means automatically newline before and after braces
-    inserted in Icon code.
- icon-indent-level
-    Indentation of Icon statements within surrounding block.
-    The surrounding block's indentation is the indentation
-    of the line on which the open-brace appears.
- icon-continued-statement-offset
-    Extra indentation given to a substatement, such as the
-    then-clause of an if or body of a while.
- icon-continued-brace-offset
-    Extra indentation given to a brace that starts a substatement.
-    This is in addition to `icon-continued-statement-offset'.
- icon-brace-offset
-    Extra indentation for line if it starts with an open brace.
- icon-brace-imaginary-offset
-    An open brace following other text is treated as if it were
-    this far to the right of the start of its line.
-
-Turning on Icon mode calls the value of the variable `icon-mode-hook'
-with no args, if that value is non-nil." t nil)
-
-;;;***
-
-;;;### (autoloads (imenu imenu-add-to-menubar) "imenu" "modes/imenu.el")
-
-(defvar imenu-generic-expression nil "\
-The regex pattern to use for creating a buffer index.
-
-If non-nil this pattern is passed to `imenu-create-index-with-pattern'
-to create a buffer index.
-
-It is an alist with elements that look like this: (MENU-TITLE
-REGEXP INDEX). 
-
-MENU-TITLE is a string used as the title for the submenu or nil if the
-entries are not nested.
-
-REGEXP is a regexp that should match a construct in the buffer that is
-to be displayed in the menu; i.e., function or variable definitions,
-etc.  It contains a substring which is the name to appear in the
-menu.  See the info section on Regexps for more information.
-
-INDEX points to the substring in REGEXP that contains the name (of the
-function, variable or type) that is to appear in the menu.
-
-For emacs-lisp-mode for example PATTERN would look like:
-
-'((nil \"^\\\\s-*(def\\\\(un\\\\|subst\\\\|macro\\\\|advice\\\\)\\\\s-+\\\\([-A-Za-z0-9+]+\\\\)\" 2)
-  (\"*Vars*\" \"^\\\\s-*(def\\\\(var\\\\|const\\\\)\\\\s-+\\\\([-A-Za-z0-9+]+\\\\)\" 2)
-  (\"*Types*\" \"^\\\\s-*(def\\\\(type\\\\|struct\\\\|class\\\\|ine-condition\\\\)\\\\s-+\\\\([-A-Za-z0-9+]+\\\\)\" 2))
-
-The variable is buffer-local.")
-
-(make-variable-buffer-local 'imenu-generic-expression)
-
-(autoload 'imenu-add-to-menubar "imenu" "\
-Adds an `imenu' entry to the menu bar for the current buffer.
-NAME is a string used to name the menu bar item.
-See the command `imenu' for more information." t nil)
-
-(autoload 'imenu "imenu" "\
-Jump to a place in the buffer chosen using a buffer menu or mouse menu.
-See `imenu-choose-buffer-index' for more information." t nil)
-
-;;;***
-
-;;;### (autoloads (ksh-mode) "ksh-mode" "modes/ksh-mode.el")
-
-(autoload 'ksh-mode "ksh-mode" "\
-ksh-mode $Revision: 1.33 $ - Major mode for editing (Bourne, Korn or Bourne again)
-shell scripts.
-Special key bindings and commands:
-\\{ksh-mode-map}
-Variables controlling indentation style:
-ksh-indent
-    Indentation of ksh statements with respect to containing block.
-    Default value is 2.
-ksh-case-indent
-    Additional indentation for statements under case items.
-    Default value is nil which will align the statements one position 
-    past the \")\" of the pattern.
-ksh-case-item-offset
-    Additional indentation for case items within a case statement.
-    Default value is 2.
-ksh-group-offset
-    Additional indentation for keywords \"do\" and \"then\".
-    Default value is -2.
-ksh-brace-offset
-    Additional indentation of \"{\" under functions or brace groupings.
-    Default value is 0.
-ksh-multiline-offset
-   Additional indentation of line that is preceded of a line ending with a
-   \\ to make it continue on next line.
-ksh-tab-always-indent
-    Controls the operation of the TAB key. If t (the default), always
-    reindent the current line.  If nil, indent the current line only if
-    point is at the left margin or in the line's indentation; otherwise
-    insert a tab.
-ksh-match-and-tell
-    If non-nil echo in the minibuffer the matching compound command
-    for the \"done\", \"}\", \"fi\", or \"esac\". Default value is t.
-
-ksh-align-to-keyword
-    Controls whether nested constructs align from the keyword or
-    the current indentation. If non-nil, indentation will be relative to
-    the column the keyword starts. If nil, indentation will be relative to
-    the current indentation of the line the keyword is on.
-    The default value is non-nil.
-
-ksh-comment-regexp
-  Regular expression used to recognize comments. Customize to support
-  ksh-like languages. Default value is \"\\s *#\".
-
-Style Guide.
- By setting
-    (setq ksh-indent default-tab-width)
-    (setq ksh-group-offset 0)
-
-    The following style is obtained:
-
-    if [ -z $foo ]
-	    then
-		    bar    # <-- ksh-group-offset is additive to ksh-indent
-		    foo
-    fi
-
- By setting
-    (setq ksh-indent default-tab-width)
-    (setq ksh-group-offset (- 0 ksh-indent))
-
-    The following style is obtained:
-
-    if [ -z $foo ]
-    then
-	    bar
-	    foo
-    fi
-
- By setting
-    (setq ksh-case-item-offset 1)
-    (setq ksh-case-indent nil)
-
-    The following style is obtained:
-
-    case x in *
-     foo) bar           # <-- ksh-case-item-offset
-          baz;;         # <-- ksh-case-indent aligns with \")\"
-     foobar) foo
-             bar;;
-    esac
-
- By setting
-    (setq ksh-case-item-offset 1)
-    (setq ksh-case-indent 6)
-
-    The following style is obtained:
-
-    case x in *
-     foo) bar           # <-- ksh-case-item-offset
-           baz;;        # <-- ksh-case-indent
-     foobar) foo
-           bar;;
-    esac
-    
-
-Installation:
-
- (setq ksh-mode-hook
-      (function (lambda ()
-         (font-lock-mode 1)             ;; font-lock the buffer
-         (setq ksh-indent 8)
-	 (setq ksh-group-offset -8)
-	 (setq ksh-brace-offset -8)   
-         (setq ksh-tab-always-indent t)
-         (setq ksh-match-and-tell t)
-         (setq ksh-align-to-keyword t)	;; Turn on keyword alignment
-	 )))" t nil)
-
-;;;***
-
-;;;### (autoloads (define-mail-alias build-mail-aliases mail-aliases-setup) "mail-abbrevs" "modes/mail-abbrevs.el")
-
-(defcustom mail-abbrev-mailrc-file nil "Name of file with mail aliases.   If nil, ~/.mailrc is used." :type '(choice (const :tag "Default" nil) file) :group 'mail-abbrevs)
-
-(defvar mail-aliases nil "\
-Word-abbrev table of mail address aliases.
-If this is nil, it means the aliases have not yet been initialized and
-should be read from the .mailrc file.  (This is distinct from there being
-no aliases, which is represented by this being a table with no entries.)")
-
-(autoload 'mail-aliases-setup "mail-abbrevs" nil nil nil)
-
-(autoload 'build-mail-aliases "mail-abbrevs" "\
-Read mail aliases from .mailrc and set mail-aliases." nil nil)
-
-(autoload 'define-mail-alias "mail-abbrevs" "\
-Define NAME as a mail-alias that translates to DEFINITION.
-If DEFINITION contains multiple addresses, separate them with commas." t nil)
-
-;;;***
-
-;;;### (autoloads (makefile-mode) "make-mode" "modes/make-mode.el")
-
-(autoload 'makefile-mode "make-mode" "\
-Major mode for editing Makefiles.
-This function ends by invoking the function(s) `makefile-mode-hook'.
-
-\\{makefile-mode-map}
-
-In the browser, use the following keys:
-
-\\{makefile-browser-map}
-
-Makefile mode can be configured by modifying the following variables:
-
-makefile-browser-buffer-name:
-    Name of the macro- and target browser buffer.
-
-makefile-target-colon:
-    The string that gets appended to all target names
-    inserted by `makefile-insert-target'.
-    \":\" or \"::\" are quite common values.
-
-makefile-macro-assign:
-   The string that gets appended to all macro names
-   inserted by `makefile-insert-macro'.
-   The normal value should be \" = \", since this is what
-   standard make expects. However, newer makes such as dmake
-   allow a larger variety of different macro assignments, so you
-   might prefer to use \" += \" or \" := \" .
-
-makefile-tab-after-target-colon:
-   If you want a TAB (instead of a space) to be appended after the
-   target colon, then set this to a non-nil value.
-
-makefile-browser-leftmost-column:
-   Number of blanks to the left of the browser selection mark.
-
-makefile-browser-cursor-column:
-   Column in which the cursor is positioned when it moves
-   up or down in the browser.
-
-makefile-browser-selected-mark:
-   String used to mark selected entries in the browser.
-
-makefile-browser-unselected-mark:
-   String used to mark unselected entries in the browser.
-
-makefile-browser-auto-advance-after-selection-p:
-   If this variable is set to a non-nil value the cursor
-   will automagically advance to the next line after an item
-   has been selected in the browser.
-
-makefile-pickup-everything-picks-up-filenames-p:
-   If this variable is set to a non-nil value then
-   `makefile-pickup-everything' also picks up filenames as targets
-   (i.e. it calls `makefile-find-filenames-as-targets'), otherwise
-   filenames are omitted.
-
-makefile-cleanup-continuations-p:
-   If this variable is set to a non-nil value then makefile-mode
-   will assure that no line in the file ends with a backslash
-   (the continuation character) followed by any whitespace.
-   This is done by silently removing the trailing whitespace, leaving
-   the backslash itself intact.
-   IMPORTANT: Please note that enabling this option causes makefile-mode
-   to MODIFY A FILE WITHOUT YOUR CONFIRMATION when \"it seems necessary\".
-
-makefile-browser-hook:
-   A function or list of functions to be called just before the
-   browser is entered. This is executed in the makefile buffer.
-
-makefile-special-targets-list:
-   List of special targets. You will be offered to complete
-   on one of those in the minibuffer whenever you enter a `.'.
-   at the beginning of a line in Makefile mode." t nil)
-
-;;;***
-
-;;;### (autoloads (modula-2-mode) "modula2" "modes/modula2.el")
-
-(autoload 'modula-2-mode "modula2" "\
-This is a mode intended to support program development in Modula-2.
-All control constructs of Modula-2 can be reached by typing C-c
-followed by the first character of the construct.
-\\<m2-mode-map>
-  \\[m2-begin] begin         \\[m2-case] case
-  \\[m2-definition] definition    \\[m2-else] else
-  \\[m2-for] for           \\[m2-header] header
-  \\[m2-if] if            \\[m2-module] module
-  \\[m2-loop] loop          \\[m2-or] or
-  \\[m2-procedure] procedure     Control-c Control-w with
-  \\[m2-record] record        \\[m2-stdio] stdio
-  \\[m2-type] type          \\[m2-until] until
-  \\[m2-var] var           \\[m2-while] while
-  \\[m2-export] export        \\[m2-import] import
-  \\[m2-begin-comment] begin-comment \\[m2-end-comment] end-comment
-  \\[suspend-emacs] suspend Emacs     \\[m2-toggle] toggle
-  \\[m2-compile] compile           \\[m2-next-error] next-error
-  \\[m2-link] link
-
-   `m2-indent' controls the number of spaces for each indentation.
-   `m2-compile-command' holds the command to compile a Modula-2 program.
-   `m2-link-command' holds the command to link a Modula-2 program." t nil)
-
-;;;***
-
-;;;### (autoloads (electric-nroff-mode nroff-mode) "nroff-mode" "modes/nroff-mode.el")
-
-(autoload 'nroff-mode "nroff-mode" "\
-Major mode for editing text intended for nroff to format.
-\\{nroff-mode-map}
-Turning on Nroff mode runs `text-mode-hook', then `nroff-mode-hook'.
-Also, try `nroff-electric-mode', for automatically inserting
-closing requests for requests that are used in matched pairs." t nil)
-
-(autoload 'electric-nroff-mode "nroff-mode" "\
-Toggle `nroff-electric-newline' minor mode.
-`nroff-electric-newline' forces Emacs to check for an nroff request at the
-beginning of the line, and insert the matching closing request if necessary.
-This command toggles that mode (off->on, on->off), with an argument,
-turns it on iff arg is positive, otherwise off." t nil)
-
-(defvar nroff-electric-mode nil "\
-Non-nil if in electric-nroff minor mode.")
-
-(add-minor-mode 'nroff-electric-mode " Electric" nil nil 'electric-nroff-mode)
-
-;;;***
-
-;;;### (autoloads (outl-mouse-minor-mode outl-mouse-mode) "outl-mouse" "modes/outl-mouse.el")
-
-(autoload 'outl-mouse-mode "outl-mouse" "\
-Calls outline-mode, with outl-mouse extensions" t nil)
-
-(autoload 'outl-mouse-minor-mode "outl-mouse" "\
-Toggles outline-minor-mode, with outl-mouse extensions" t nil)
-
-;;;***
-
-;;;### (autoloads (outline-minor-mode outline-mode) "outline" "modes/outline.el")
-
-(defvar outline-minor-mode nil "\
-Non-nil if using Outline mode as a minor mode of some other mode.")
-
-(make-variable-buffer-local 'outline-minor-mode)
-
-(put 'outline-minor-mode 'permanent-local t)
-
-(add-minor-mode 'outline-minor-mode " Outl")
-
-(autoload 'outline-mode "outline" "\
-Set major mode for editing outlines with selective display.
-Headings are lines which start with asterisks: one for major headings,
-two for subheadings, etc.  Lines not starting with asterisks are body lines. 
-
-Body text or subheadings under a heading can be made temporarily
-invisible, or visible again.  Invisible lines are attached to the end 
-of the heading, so they move with it, if the line is killed and yanked
-back.  A heading with text hidden under it is marked with an ellipsis (...).
-
-Commands:\\<outline-mode-map>
-\\[outline-next-visible-heading]   outline-next-visible-heading      move by visible headings
-\\[outline-previous-visible-heading]   outline-previous-visible-heading
-\\[outline-forward-same-level]   outline-forward-same-level        similar but skip subheadings
-\\[outline-backward-same-level]   outline-backward-same-level
-\\[outline-up-heading]   outline-up-heading		    move from subheading to heading
-
-\\[hide-body]	make all text invisible (not headings).
-\\[show-all]	make everything in buffer visible.
-
-The remaining commands are used when point is on a heading line.
-They apply to some of the body or subheadings of that heading.
-\\[hide-subtree]   hide-subtree	make body and subheadings invisible.
-\\[show-subtree]   show-subtree	make body and subheadings visible.
-\\[show-children]   show-children	make direct subheadings visible.
-		 No effect on body, or subheadings 2 or more levels down.
-		 With arg N, affects subheadings N levels down.
-\\[hide-entry]	   make immediately following body invisible.
-\\[show-entry]	   make it visible.
-\\[hide-leaves]	   make body under heading and under its subheadings invisible.
-		     The subheadings remain visible.
-\\[show-branches]  make all subheadings at all levels visible.
-
-The variable `outline-regexp' can be changed to control what is a heading.
-A line is a heading if `outline-regexp' matches something at the
-beginning of the line.  The longer the match, the deeper the level.
-
-Turning on outline mode calls the value of `text-mode-hook' and then of
-`outline-mode-hook', if they are non-nil." t nil)
-
-(autoload 'outline-minor-mode "outline" "\
-Toggle Outline minor mode.
-With arg, turn Outline minor mode on if arg is positive, off otherwise.
-See the command `outline-mode' for more information on this mode." t nil)
-
-;;;***
-
-;;;### (autoloads (pascal-mode) "pascal" "modes/pascal.el")
-
-(autoload 'pascal-mode "pascal" "\
-Major mode for editing Pascal code. \\<pascal-mode-map>
-TAB indents for Pascal code.  Delete converts tabs to spaces as it moves back.
-
-\\[pascal-complete-word] completes the word around current point with respect to position in code
-\\[pascal-show-completions] shows all possible completions at this point.
-
-Other useful functions are:
-
-\\[pascal-mark-defun]	- Mark function.
-\\[pascal-insert-block]	- insert begin ... end;
-\\[pascal-star-comment]	- insert (* ... *)
-\\[pascal-comment-area]	- Put marked area in a comment, fixing nested comments.
-\\[pascal-uncomment-area]	- Uncomment an area commented with \\[pascal-comment-area].
-\\[pascal-beg-of-defun]	- Move to beginning of current function.
-\\[pascal-end-of-defun]	- Move to end of current function.
-\\[pascal-goto-defun]	- Goto function prompted for in the minibuffer.
-\\[pascal-outline]	- Enter pascal-outline-mode (see also pascal-outline).
-
-Variables controlling indentation/edit style:
-
- pascal-indent-level      (default 3)
-    Indentation of Pascal statements with respect to containing block.
- pascal-case-indent       (default 2)
-    Indentation for case statements.
- pascal-auto-newline      (default nil)
-    Non-nil means automatically newline after semicolons and the punctuation mark
-    after an end.
- pascal-tab-always-indent (default t)
-    Non-nil means TAB in Pascal mode should always reindent the current line,
-    regardless of where in the line point is when the TAB command is used.
- pascal-auto-endcomments  (default t)
-    Non-nil means a comment { ... } is set after the ends which ends cases and
-    functions. The name of the function or case will be set between the braces.
- pascal-auto-lineup       (default t)
-    List of contexts where auto lineup of :'s or ='s should be done.
-
-See also the user variables pascal-type-keywords, pascal-start-keywords and
-pascal-separator-keywords.
-
-Turning on Pascal mode calls the value of the variable pascal-mode-hook with
-no args, if that value is non-nil." t nil)
-
-;;;***
-
-;;;### (autoloads (perl-mode) "perl-mode" "modes/perl-mode.el")
-
-(autoload 'perl-mode "perl-mode" "\
-Major mode for editing Perl code.
-Expression and list commands understand all Perl brackets.
-Tab indents for Perl code.
-Comments are delimited with # ... \\n.
-Paragraphs are separated by blank lines only.
-Delete converts tabs to spaces as it moves back.
-\\{perl-mode-map}
-Variables controlling indentation style:
- perl-tab-always-indent
-    Non-nil means TAB in Perl mode should always indent the current line,
-    regardless of where in the line point is when the TAB command is used.
- perl-tab-to-comment
-    Non-nil means that for lines which don't need indenting, TAB will
-    either delete an empty comment, indent an existing comment, move 
-    to end-of-line, or if at end-of-line already, create a new comment.
- perl-nochange
-    Lines starting with this regular expression are not auto-indented.
- perl-indent-level
-    Indentation of Perl statements within surrounding block.
-    The surrounding block's indentation is the indentation
-    of the line on which the open-brace appears.
- perl-continued-statement-offset
-    Extra indentation given to a substatement, such as the
-    then-clause of an if or body of a while.
- perl-continued-brace-offset
-    Extra indentation given to a brace that starts a substatement.
-    This is in addition to `perl-continued-statement-offset'.
- perl-brace-offset
-    Extra indentation for line if it starts with an open brace.
- perl-brace-imaginary-offset
-    An open brace following other text is treated as if it were
-    this far to the right of the start of its line.
- perl-label-offset
-    Extra indentation for line that is a label.
-
-Various indentation styles:       K&R  BSD  BLK  GNU  LW
-  perl-indent-level                5    8    0    2    4
-  perl-continued-statement-offset  5    8    4    2    4
-  perl-continued-brace-offset      0    0    0    0   -4
-  perl-brace-offset               -5   -8    0    0    0
-  perl-brace-imaginary-offset      0    0    4    0    0
-  perl-label-offset               -5   -8   -2   -2   -2
-
-Turning on Perl mode runs the normal hook `perl-mode-hook'." t nil)
-
-;;;***
-
-;;;### (autoloads (picture-mode) "picture" "modes/picture.el")
-
-(autoload 'picture-mode "picture" "\
-Switch to Picture mode, in which a quarter-plane screen model is used.
-Printing characters replace instead of inserting themselves with motion
-afterwards settable by these commands:
-  C-c <	  Move left after insertion.
-  C-c >	  Move right after insertion.
-  C-c ^	  Move up after insertion.
-  C-c .	  Move down after insertion.
-  C-c `	  Move northwest (nw) after insertion.
-  C-c '	  Move northeast (ne) after insertion.
-  C-c /	  Move southwest (sw) after insertion.
-  C-c \\   Move southeast (se) after insertion.
-The current direction is displayed in the modeline.  The initial
-direction is right.  Whitespace is inserted and tabs are changed to
-spaces when required by movement.  You can move around in the buffer
-with these commands:
-  \\[picture-move-down]	  Move vertically to SAME column in previous line.
-  \\[picture-move-up]	  Move vertically to SAME column in next line.
-  \\[picture-end-of-line]	  Move to column following last non-whitespace character.
-  \\[picture-forward-column]	  Move right inserting spaces if required.
-  \\[picture-backward-column]	  Move left changing tabs to spaces if required.
-  C-c C-f Move in direction of current picture motion.
-  C-c C-b Move in opposite direction of current picture motion.
-  Return  Move to beginning of next line.
-You can edit tabular text with these commands:
-  M-Tab	  Move to column beneath (or at) next interesting character.
-	    `Indents' relative to a previous line.
-  Tab	  Move to next stop in tab stop list.
-  C-c Tab Set tab stops according to context of this line.
-	    With ARG resets tab stops to default (global) value.
-	    See also documentation of variable	picture-tab-chars
-	    which defines \"interesting character\".  You can manually
-	    change the tab stop list with command \\[edit-tab-stops].
-You can manipulate text with these commands:
-  C-d	  Clear (replace) ARG columns after point without moving.
-  C-c C-d Delete char at point - the command normally assigned to C-d.
-  \\[picture-backward-clear-column]  Clear (replace) ARG columns before point, moving back over them.
-  \\[picture-clear-line]	  Clear ARG lines, advancing over them.	 The cleared
-	    text is saved in the kill ring.
-  \\[picture-open-line]	  Open blank line(s) beneath current line.
-You can manipulate rectangles with these commands:
-  C-c C-k Clear (or kill) a rectangle and save it.
-  C-c C-w Like C-c C-k except rectangle is saved in named register.
-  C-c C-y Overlay (or insert) currently saved rectangle at point.
-  C-c C-x Like C-c C-y except rectangle is taken from named register.
-  \\[copy-rectangle-to-register]   Copies a rectangle to a register.
-  \\[advertised-undo]   Can undo effects of rectangle overlay commands
-	    commands if invoked soon enough.
-You can return to the previous mode with:
-  C-c C-c Which also strips trailing whitespace from every line.
-	    Stripping is suppressed by supplying an argument.
-
-Entry to this mode calls the value of  picture-mode-hook  if non-nil.
-
-Note that Picture mode commands will work outside of Picture mode, but
-they are not defaultly assigned to keys." t nil)
-
-(defalias 'edit-picture 'picture-mode)
-
-;;;***
-
-;;;### (autoloads (postscript-mode) "postscript" "modes/postscript.el")
-
-(autoload 'postscript-mode "postscript" "\
-Major mode for editing PostScript files.
-
-\\[ps-execute-buffer] will send the contents of the buffer to the NeWS
-server using psh(1).  \\[ps-execute-region] sends the current region.
-\\[ps-shell] starts an interactive psh(1) window which will be used for
-subsequent \\[ps-execute-buffer] or \\[ps-execute-region] commands.
-
-In this mode, TAB and \\[indent-region] attempt to indent code
-based on the position of {}, [], and begin/end pairs.  The variable
-ps-indent-level controls the amount of indentation used inside
-arrays and begin/end pairs.  
-
-\\{ps-mode-map}
-
-\\[postscript-mode] calls the value of the variable postscript-mode-hook 
-with no args, if that value is non-nil." t nil)
-
-;;;***
-
-;;;### (autoloads (run-prolog inferior-prolog-mode prolog-mode) "prolog" "modes/prolog.el")
-
-(autoload 'prolog-mode "prolog" "\
-Major mode for editing Prolog code for Prologs.
-Blank lines and `%%...' separate paragraphs.  `%'s start comments.
-Commands:
-\\{prolog-mode-map}
-Entry to this mode calls the value of `prolog-mode-hook'
-if that value is non-nil." t nil)
-
-(autoload 'inferior-prolog-mode "prolog" "\
-Major mode for interacting with an inferior Prolog process.
-
-The following commands are available:
-\\{inferior-prolog-mode-map}
-
-Entry to this mode calls the value of `prolog-mode-hook' with no arguments,
-if that value is non-nil.  Likewise with the value of `comint-mode-hook'.
-`prolog-mode-hook' is called after `comint-mode-hook'.
-
-You can send text to the inferior Prolog from other buffers
-using the commands `send-region', `send-string' and \\[prolog-consult-region].
-
-Commands:
-Tab indents for Prolog; with argument, shifts rest
- of expression rigidly with the current line.
-Paragraphs are separated only by blank lines and '%%'.
-'%'s start comments.
-
-Return at end of buffer sends line as input.
-Return not at end copies rest of line to end and sends it.
-\\[comint-kill-input] and \\[backward-kill-word] are kill commands, imitating normal Unix input editing.
-\\[comint-interrupt-subjob] interrupts the shell or its current subjob if any.
-\\[comint-stop-subjob] stops. \\[comint-quit-subjob] sends quit signal." t nil)
-
-(autoload 'run-prolog "prolog" "\
-Run an inferior Prolog process, input and output via buffer *prolog*." t nil)
-
-;;;***
-
-;;;### (autoloads (py-shell python-mode) "python-mode" "modes/python-mode.el")
-
-(eval-when-compile (condition-case nil (progn (require 'cl) (require 'imenu)) (error nil)))
-
-(autoload 'python-mode "python-mode" "\
-Major mode for editing Python files.
-To submit a problem report, enter `\\[py-submit-bug-report]' from a
-`python-mode' buffer.  Do `\\[py-describe-mode]' for detailed
-documentation.  To see what version of `python-mode' you are running,
-enter `\\[py-version]'.
-
-This mode knows about Python indentation, tokens, comments and
-continuation lines.  Paragraphs are separated by blank lines only.
-
-COMMANDS
-\\{py-mode-map}
-VARIABLES
-
-py-indent-offset		indentation increment
-py-block-comment-prefix		comment string used by comment-region
-py-python-command		shell command to invoke Python interpreter
-py-scroll-process-buffer		always scroll Python process buffer
-py-temp-directory		directory used for temp files (if needed)
-py-beep-if-tab-change		ring the bell if tab-width is changed" t nil)
-
-(autoload 'py-shell "python-mode" "\
-Start an interactive Python interpreter in another window.
-This is like Shell mode, except that Python is running in the window
-instead of a shell.  See the `Interactive Shell' and `Shell Mode'
-sections of the Emacs manual for details, especially for the key
-bindings active in the `*Python*' buffer.
-
-See the docs for variable `py-scroll-buffer' for info on scrolling
-behavior in the process window.
-
-Warning: Don't use an interactive Python if you change sys.ps1 or
-sys.ps2 from their default values, or if you're running code that
-prints `>>> ' or `... ' at the start of a line.  `python-mode' can't
-distinguish your output from Python's output, and assumes that `>>> '
-at the start of a line is a prompt from Python.  Similarly, the Emacs
-Shell mode code assumes that both `>>> ' and `... ' at the start of a
-line are Python prompts.  Bad things can happen if you fool either
-mode.
-
-Warning:  If you do any editing *in* the process buffer *while* the
-buffer is accepting output from Python, do NOT attempt to `undo' the
-changes.  Some of the output (nowhere near the parts you changed!) may
-be lost if you do.  This appears to be an Emacs bug, an unfortunate
-interaction between undo and process filters; the same problem exists in
-non-Python process buffers using the default (Emacs-supplied) process
-filter." t nil)
-
-;;;***
-
-;;;### (autoloads (reftex-add-to-label-alist reftex-mode turn-on-reftex) "reftex" "modes/reftex.el")
-
-(autoload 'turn-on-reftex "reftex" "\
-Turn on RefTeX minor mode." nil nil)
-
-(autoload 'reftex-mode "reftex" "\
-Minor mode with distinct support for \\label, \\ref and \\cite in LaTeX.
-
-Labels can be created with `\\[reftex-label]' and referenced with `\\[reftex-reference]'.
-When referencing, you get a menu with all labels of a given type and
-context of the label definition. The selected label is inserted as a
-\\ref macro.
-
-Citations can be made with `\\[reftex-citation]' which will use a regular expression 
-to pull out a *formatted* list of articles from your BibTeX
-database. The selected citation is inserted as a \\cite macro.
-
-A Table of Contents of the entire (multifile) document with browsing
-capabilities is available with `\\[reftex-toc]'.
-
-Most command have help available on the fly. This help is accessed by
-pressing `?' to any prompt mentioning this feature.
-
-\\{reftex-mode-map}
-Under X, these functions will be available also in a menu on the menu bar.
-
-------------------------------------------------------------------------------" t nil)
-
-(autoload 'reftex-add-to-label-alist "reftex" "\
-Add label environment descriptions to reftex-label-alist-external-add-ons.
-The format of ENTRY-LIST is exactly like reftex-label-alist. See there 
-for details.
-This function makes it possible to support RefTeX from AUCTeX style files.
-The entries in ENTRY-LIST will be processed after the user settings in
-reftex-label-alist, and before the defaults (specified in
-reftex-default-label-alist-entries).  Any changes made to
-reftex-label-alist-external-add-ons will raise a flag to the effect that a
-mode reset is done on the next occasion." nil nil)
-
-;;;***
-
-;;;### (autoloads (rexx-mode) "rexx-mode" "modes/rexx-mode.el")
-
-(autoload 'rexx-mode "rexx-mode" "\
-Major mode for editing REXX code.
-\\{rexx-mode-map}
-
-Variables controlling indentation style:
- rexx-indent
-	The basic indentation for do-blocks.
- rexx-end-indent
-	The relative offset of the \"end\" statement. 0 places it in the
-	same column as the statements of the block. Setting it to the same
-	value as rexx-indent places the \"end\" under the do-line.
- rexx-cont-indent
-	The indention for lines following \"then\", \"else\" and \",\"
-	(continued) lines.
- rexx-tab-always-indent
-	Non-nil means TAB in REXX mode should always reindent the current 
-	line, regardless of where in the line the point is when the TAB
-	command is used.
-
-If you have set rexx-end-indent to a nonzero value, you probably want to
-remap RETURN to rexx-indent-newline-indent. It makes sure that lines
-indents correctly when you press RETURN.
-
-An extensive abbreviation table consisting of all the keywords of REXX are
-supplied. Expanded keywords are converted into upper case making it
-easier to distinguish them. To use this feature the buffer must be in
-abbrev-mode. (See example below.)
-
-Turning on REXX mode calls the value of the variable rexx-mode-hook with
-no args, if that value is non-nil.
-
-For example:
-\(setq rexx-mode-hook '(lambda ()
-			(setq rexx-indent 4)
-			(setq rexx-end-indent 4)
-			(setq rexx-cont-indent 4)
-			(local-set-key \"\\C-m\" 'rexx-indent-newline-indent)
-			(abbrev-mode 1)
-			))
-
-will make the END aligned with the DO/SELECT. It will indent blocks and
-IF-statements four steps and make sure that the END jumps into the
-correct position when RETURN is pressed. Finally it will use the abbrev
-table to convert all REXX keywords into upper case." t nil)
-
-;;;***
-
-;;;### (autoloads (resize-minibuffer-mode) "rsz-minibuf" "modes/rsz-minibuf.el")
-
-(defgroup resize-minibuffer nil "Dynamically resize minibuffer to display entire contents" :group 'frames)
-
-(defcustom resize-minibuffer-window-max-height nil "*Maximum size the minibuffer window is allowed to become.\nIf less than 1 or not a number, the limit is the height of the frame in\nwhich the active minibuffer window resides." :type '(choice (const nil) integer) :group 'resize-minibuffer)
-
-(defcustom resize-minibuffer-window-exactly t "*If non-`nil', make minibuffer exactly the size needed to display all its contents.\nOtherwise, the minibuffer window can temporarily increase in size but\nnever get smaller while it is active." :type 'boolean :group 'resize-minibuffer)
-
-(defcustom resize-minibuffer-frame nil "*If non-`nil' and the active minibuffer is the sole window in its frame, allow changing the frame height." :type 'boolean :group 'resize-minibuffer)
-
-(defcustom resize-minibuffer-frame-max-height nil "*Maximum size the minibuffer frame is allowed to become.\nIf less than 1 or not a number, there is no limit.")
-
-(defcustom resize-minibuffer-frame-exactly nil "*If non-`nil', make minibuffer frame exactly the size needed to display all its contents.\nOtherwise, the minibuffer frame can temporarily increase in size but\nnever get smaller while it is active." :type 'boolean :group 'resize-minibuffer)
-
-(autoload 'resize-minibuffer-mode "rsz-minibuf" "\
-Enable or disable resize-minibuffer mode.
-A negative prefix argument disables this mode.  A positive argument or
-argument of 0 enables it.
-
-When this minor mode is enabled, the minibuffer is dynamically resized to
-contain the entire region of text put in it as you type.
-
-The variable `resize-minibuffer-mode' is set to t or nil depending on
-whether this mode is active or not.
-
-The maximum height to which the minibuffer can grow is controlled by the
-variable `resize-minibuffer-window-max-height'.
-
-The variable `resize-minibuffer-window-exactly' determines whether the
-minibuffer window should ever be shrunk to make it no larger than needed to
-display its contents.
-
-When using a window system, it is possible for a minibuffer to be the sole
-window in a frame.  Since that window is already its maximum size, the only
-way to make more text visible at once is to increase the size of the frame.
-The variable `resize-minibuffer-frame' controls whether this should be
-done.  The variables `resize-minibuffer-frame-max-height' and
-`resize-minibuffer-frame-exactly' are analogous to their window
-counterparts." t nil)
-
-;;;***
-
-;;;### (autoloads (scheme-mode) "scheme" "modes/scheme.el")
-
-(autoload 'scheme-mode "scheme" "\
-Major mode for editing Scheme code.
-Editing commands are similar to those of lisp-mode.
-
-In addition, if an inferior Scheme process is running, some additional
-commands will be defined, for evaluating expressions and controlling
-the interpreter, and the state of the process will be displayed in the
-modeline of all Scheme buffers.  The names of commands that interact
-with the Scheme process start with \"xscheme-\".  For more information
-see the documentation for xscheme-interaction-mode.
-
-Commands:
-Delete converts tabs to spaces as it moves back.
-Blank lines separate paragraphs.  Semicolons start comments.
-\\{scheme-mode-map}
-Entry to this mode calls the value of scheme-mode-hook
-if that value is non-nil." t nil)
-
-;;;***
-
-;;;### (autoloads (scribe-mode) "scribe" "modes/scribe.el")
-
-(autoload 'scribe-mode "scribe" "\
-Major mode for editing files of Scribe (a text formatter) source.
-Scribe-mode is similar text-mode, with a few extra commands added.
-\\{scribe-mode-map}
-
-Interesting variables:
-
-scribe-fancy-paragraphs
-  Non-nil makes Scribe mode use a different style of paragraph separation.
-
-scribe-electric-quote
-  Non-nil makes insert of double quote use `` or '' depending on context.
-
-scribe-electric-parenthesis
-  Non-nil makes an open-parenthesis char (one of `([<{')
-  automatically insert its close if typed after an @Command form." t nil)
-
-;;;***
-
-;;;### (autoloads (mail-other-frame mail-other-window mail mail-mode user-mail-address) "sendmail" "modes/sendmail.el")
-
-(defvar mail-from-style 'angles "\
-*Specifies how \"From:\" fields look.
-
-If `nil', they contain just the return address like:
-	king@grassland.com
-If `parens', they look like:
-	king@grassland.com (Elvis Parsley)
-If `angles', they look like:
-	Elvis Parsley <king@grassland.com>")
-
-(defvar mail-self-blind nil "\
-Non-nil means insert BCC to self in messages to be sent.
-This is done when the message is initialized,
-so you can remove or alter the BCC field to override the default.")
-
-(defvar mail-interactive nil "\
-Non-nil means when sending a message wait for and display errors.
-nil means let mailer mail back a message to report errors.")
-
-(defvar mail-dir nil "\
-*Default directory for saving messages.")
-
-(defvar rmail-ignored-headers (purecopy (concat "^\\(" (mapconcat 'identity '("Sender:" "References:" "Return-Path:" "Received:" "[^: 	\n]*Message-ID:" "Errors-To:" "Path:" "Expires:" "Xref:" "Lines:" "Approved:" "Distribution:" "Content-Length:" "Mime-Version:" "Content-Type:" "Content-Transfer-Encoding:" "X400-Received:" "X400-Originator:" "X400-Mts-Identifier:" "X400-Content-Type:" "Content-Identifier:" "Status:" "Summary-Line:" "X-Attribution:" "Via:" "Sent-Via:" "Mail-From:" "Origin:" "Comments:" "Originator:" "NF-ID:" "NF-From:" "Posting-Version:" "Posted:" "Posted-Date:" "Date-Received:" "Relay-Version:" "Article-I\\.D\\.:" "NNTP-Version:" "NNTP-Posting-Host:" "X-Mailer:" "X-Newsreader:" "News-Software:" "X-Received:" "X-References:" "X-Envelope-To:" "X-VMS-" "Remailed-" "X-Plantation:" "X-Windows:" "X-Pgp-") "\\|") "\\)")) "\
-*Gubbish header fields one would rather not see.")
-
-(defvar mail-yank-ignored-headers (purecopy (concat rmail-ignored-headers "\\|" "^\\(" (mapconcat 'identity '("Resent-To:" "Resent-By:" "Resent-CC:" "To:" "Subject:" "In-Reply-To:") "\\|") "\\)")) "\
-Delete these headers from old message when it's inserted in a reply.")
-
-(defvar send-mail-function 'sendmail-send-it "\
-Function to call to send the current buffer as mail.
-The headers should be delimited by a line whose contents
-match the variable `mail-header-separator'.")
-
-(defvar mail-header-separator (purecopy "--text follows this line--") "\
-*Line used to separate headers from text in messages being composed.")
-
-(defvar mail-archive-file-name nil "\
-*Name of file to write all outgoing messages in, or nil for none.
-This can be an inbox file or an Rmail file.")
-
-(defvar mail-default-reply-to nil "\
-*Address to insert as default Reply-to field of outgoing messages.
-If nil, it will be initialized from the REPLYTO environment variable
-when you first send mail.")
-
-(defvar mail-alias-file nil "\
-*If non-nil, the name of a file to use instead of `/usr/lib/aliases'.
-This file defines aliases to be expanded by the mailer; this is a different
-feature from that of defining aliases in `.mailrc' to be expanded in Emacs.
-This variable has no effect unless your system uses sendmail as its mailer.")
-
-(defvar mail-yank-prefix "> " "\
-*Prefix insert on lines of yanked message being replied to.
-nil means use indentation.")
-
-(defvar mail-signature nil "\
-*Text inserted at end of mail buffer when a message is initialized.
-If t, it means to insert the contents of the file `mail-signature-file'.")
-
-(autoload 'user-mail-address "sendmail" "\
-Query the user for his mail address, unless it is already known." t nil)
-
-(autoload 'mail-mode "sendmail" "\
-Major mode for editing mail to be sent.
-Like Text Mode but with these additional commands:
-C-c C-s  mail-send (send the message)    C-c C-c  mail-send-and-exit
-C-c C-f  move to a header field (and create it if there isn't):
-	 C-c C-f C-t  move to To:	C-c C-f C-s  move to Subj:
-	 C-c C-f C-b  move to BCC:	C-c C-f C-c  move to CC:
-	 C-c C-f C-f  move to FCC:	C-c C-f C-r  move to Reply-To:
-C-c C-t  mail-text (move to beginning of message text).
-C-c C-w  mail-signature (insert `mail-signature-file' file).
-C-c C-y  mail-yank-original (insert current message, in Rmail).
-C-c C-q  mail-fill-yanked-message (fill what was yanked).
-C-c C-v  mail-sent-via (add a sent-via field for each To or CC)." t nil)
-
-(autoload 'mail "sendmail" "\
-Edit a message to be sent.  Prefix arg means resume editing (don't erase).
-When this function returns, the buffer `*mail*' is selected.
-The value is t if the message was newly initialized; otherwise, nil.
-
-Optionally, the signature file `mail-signature-file' can be inserted at the
-end; see the variable `mail-signature'.
-
-\\<mail-mode-map>
-While editing message, type \\[mail-send-and-exit] to send the message and exit.
-
-Various special commands starting with C-c are available in sendmail mode
-to move to message header fields:
-\\{mail-mode-map}
-
-The variable `mail-signature' controls whether the signature file
-`mail-signature-file' is inserted immediately.
-
-If `mail-signature' is nil, use \\[mail-signature] to insert the
-signature in `mail-signature-file'.
-
-If `mail-self-blind' is non-nil, a BCC to yourself is inserted
-when the message is initialized.
-
-If `mail-default-reply-to' is non-nil, it should be an address (a string);
-a Reply-to: field with that address is inserted.
-
-If `mail-archive-file-name' is non-nil, an FCC field with that file name
-is inserted.
-
-The normal hook `mail-setup-hook' is run after the message is
-initialized.  It can add more default fields to the message.
-
-When calling from a program, the first argument if non-nil says
-not to erase the existing contents of the `*mail*' buffer.
-
-The second through fifth arguments,
- TO, SUBJECT, IN-REPLY-TO and CC, specify if non-nil
- the initial contents of those header fields.
- These arguments should not have final newlines.
-The sixth argument REPLYBUFFER is a buffer whose contents
- should be yanked if the user types C-c C-y.
-The seventh argument ACTIONS is a list of actions to take
- if/when the message is sent.  Each action looks like (FUNCTION . ARGS);
- when the message is sent, we apply FUNCTION to ARGS.
- This is how Rmail arranges to mark messages `answered'." t nil)
-
-(autoload 'mail-other-window "sendmail" "\
-Like `mail' command, but display mail buffer in another window." t nil)
-
-(autoload 'mail-other-frame "sendmail" "\
-Like `mail' command, but display mail buffer in another frame." t nil)
-
-(define-key ctl-x-map "m" 'mail)
-
-(define-key ctl-x-4-map "m" 'mail-other-window)
-
-(define-key ctl-x-5-map "m" 'mail-other-frame)
-
-(add-hook 'same-window-buffer-names "*mail*")
-
-;;;***
-
-;;;### (autoloads (sh-mode) "sh-script" "modes/sh-script.el")
-
-(put 'sh-mode 'mode-class 'special)
-
-(autoload 'sh-mode "sh-script" "\
-Major mode for editing shell scripts.
-This mode works for many shells, since they all have roughly the same syntax,
-as far as commands, arguments, variables, pipes, comments etc. are concerned.
-Unless the file's magic number indicates the shell, your usual shell is
-assumed.  Since filenames rarely give a clue, they are not further analyzed.
-
-This mode adapts to the variations between shells (see `sh-set-shell') by
-means of an inheritance based feature lookup (see `sh-feature').  This
-mechanism applies to all variables (including skeletons) that pertain to
-shell-specific features.
-
-The default style of this mode is that of Rosenblatt's Korn shell book.
-The syntax of the statements varies with the shell being used.  The
-following commands are available, based on the current shell's syntax:
-
-\\[sh-case]	 case statement
-\\[sh-for]	 for loop
-\\[sh-function]	 function definition
-\\[sh-if]	 if statement
-\\[sh-indexed-loop]	 indexed loop from 1 to n
-\\[sh-while-getopts]	 while getopts loop
-\\[sh-repeat]	 repeat loop
-\\[sh-select]	 select loop
-\\[sh-until]	 until loop
-\\[sh-while]	 while loop
-
-\\[backward-delete-char-untabify]	 Delete backward one position, even if it was a tab.
-\\[sh-newline-and-indent]	 Delete unquoted space and indent new line same as this one.
-\\[sh-end-of-command]	 Go to end of successive commands.
-\\[sh-beginning-of-command]	 Go to beginning of successive commands.
-\\[sh-set-shell]	 Set this buffer's shell, and maybe its magic number.
-\\[sh-execute-region]	 Have optional header and region be executed in a subshell.
-
-\\[sh-maybe-here-document]	 Without prefix, following an unquoted < inserts here document.
-{, (, [, ', \", `
-	Unless quoted with \\, insert the pairs {}, (), [], or '', \"\", ``.
-
-If you generally program a shell different from your login shell you can
-set `sh-shell-file' accordingly.  If your shell's file name doesn't correctly
-indicate what shell it is use `sh-alias-alist' to translate.
-
-If your shell gives error messages with line numbers, you can use \\[executable-interpret]
-with your script for an edit-interpret-debug cycle." t nil)
-
-(defalias 'shell-script-mode 'sh-mode)
-
-;;;***
-
-;;;### (autoloads (strokes-mode strokes-list-strokes strokes-load-user-strokes strokes-help strokes-describe-stroke strokes-do-complex-stroke strokes-do-stroke strokes-read-complex-stroke strokes-read-stroke strokes-global-set-stroke) "strokes" "modes/strokes.el")
-
-(defvar strokes-mode nil "\
-Non-nil when `strokes' is globally enabled")
-
-(autoload 'strokes-global-set-stroke "strokes" "\
-Interactively give STROKE the global binding as COMMAND.
-Operated just like `global-set-key', except for strokes.
-COMMAND is a symbol naming an interactively-callable function.  STROKE
-is a list of sampled positions on the stroke grid as described in the
-documentation for the `strokes-define-stroke' function." t nil)
-
-(defalias 'global-set-stroke 'strokes-global-set-stroke)
-
-(autoload 'strokes-read-stroke "strokes" "\
-Read a simple stroke (interactively) and return the stroke.
-Optional PROMPT in minibuffer displays before and during stroke reading.
-This function will display the stroke interactively as it is being
-entered in the strokes buffer if the variable
-`strokes-use-strokes-buffer' is non-nil.
-Optional EVENT is currently not used, but hopefully will be soon." nil nil)
-
-(autoload 'strokes-read-complex-stroke "strokes" "\
-Read a complex stroke (interactively) and return the stroke.
-Optional PROMPT in minibuffer displays before and during stroke reading.
-Note that a complex stroke allows the user to pen-up and pen-down.  This
-is implemented by allowing the user to paint with button1 or button2 and
-then complete the stroke with button3.
-Optional EVENT is currently not used, but hopefully will be soon." nil nil)
-
-(autoload 'strokes-do-stroke "strokes" "\
-Read a simple stroke from the user and then exectute its comand.
-This must be bound to a mouse event." t nil)
-
-(autoload 'strokes-do-complex-stroke "strokes" "\
-Read a complex stroke from the user and then exectute its command.
-This must be bound to a mouse event." t nil)
-
-(autoload 'strokes-describe-stroke "strokes" "\
-Displays the command which STROKE maps to, reading STROKE interactively." t nil)
-
-(defalias 'describe-stroke 'strokes-describe-stroke)
-
-(autoload 'strokes-help "strokes" "\
-Get instructional help on using the the `strokes' package." t nil)
-
-(autoload 'strokes-load-user-strokes "strokes" "\
-Load user-defined strokes from file named by `strokes-file'." t nil)
-
-(defalias 'load-user-strokes 'strokes-load-user-strokes)
-
-(autoload 'strokes-list-strokes "strokes" "\
-Pop up a buffer containing a listing of all strokes defined in STROKE-MAP.
-If STROKE-MAP is not given, `strokes-global-map' will be used instead." t nil)
-
-(defalias 'list-strokes 'strokes-list-strokes)
-
-(autoload 'strokes-mode "strokes" "\
-Toggle strokes being enabled.
-With ARG, turn strokes on if and only if ARG is positive or true.
-Note that `strokes-mode' is a global mode.  Think of it as a minor
-mode in all buffers when activated.
-By default, strokes are invoked with mouse button-2.  You can define
-new strokes with
-
-> M-x global-set-stroke" t nil)
-
-;;;***
-
-;;;### (autoloads (tcl-help-on-word inferior-tcl tcl-mode) "tcl" "modes/tcl.el")
-
-(autoload 'tcl-mode "tcl" "\
-Major mode for editing Tcl code.
-Expression and list commands understand all Tcl brackets.
-Tab indents for Tcl code.
-Paragraphs are separated by blank lines only.
-Delete converts tabs to spaces as it moves back.
-
-Variables controlling indentation style:
-  tcl-indent-level
-    Indentation of Tcl statements within surrounding block.
-  tcl-continued-indent-level
-    Indentation of continuation line relative to first line of command.
-
-Variables controlling user interaction with mode (see variable
-documentation for details):
-  tcl-tab-always-indent
-    Controls action of TAB key.
-  tcl-auto-newline
-    Non-nil means automatically newline before and after braces, brackets,
-    and semicolons inserted in Tcl code.
-  tcl-electric-hash-style
-    Controls action of `#' key.
-  tcl-use-hairy-comment-detector
-    If t, use more complicated, but slower, comment detector.
-    This variable is only used in GNU Emacs 19.
-  tcl-use-smart-word-finder
-    If not nil, use a smarter, Tcl-specific way to find the current
-    word when looking up help on a Tcl command.
-
-Turning on Tcl mode calls the value of the variable `tcl-mode-hook'
-with no args, if that value is non-nil.  Read the documentation for
-`tcl-mode-hook' to see what kinds of interesting hook functions
-already exist.
-
-Commands:
-\\{tcl-mode-map}" t nil)
-
-(autoload 'inferior-tcl "tcl" "\
-Run inferior Tcl process.
-Prefix arg means enter program name interactively.
-See documentation for function `inferior-tcl-mode' for more information." t nil)
-
-(autoload 'tcl-help-on-word "tcl" "\
-Get help on Tcl command.  Default is word at point.
-Prefix argument means invert sense of `tcl-use-smart-word-finder'." t nil)
-
-;;;***
-
-;;;### (autoloads (latex-mode plain-tex-mode tex-mode) "tex-mode" "modes/tex-mode.el")
-
-(autoload 'tex-mode "tex-mode" "\
-Major mode for editing files of input for TeX, LaTeX, or SliTeX.
-Tries to determine (by looking at the beginning of the file) whether
-this file is for plain TeX, LaTeX, or SliTeX and calls plain-tex-mode,
-latex-mode, or slitex-mode, respectively.  If it cannot be determined,
-such as if there are no commands in the file, the value of tex-default-mode
-is used." t nil)
-
-(fset 'TeX-mode 'tex-mode)
-
-(fset 'LaTeX-mode 'latex-mode)
-
-(autoload 'plain-tex-mode "tex-mode" "\
-Major mode for editing files of input for plain TeX.
-Makes $ and } display the characters they match.
-Makes \" insert `` when it seems to be the beginning of a quotation,
-and '' when it appears to be the end; it inserts \" only after a \\.
-
-Use \\[tex-region] to run TeX on the current region, plus a \"header\"
-copied from the top of the file (containing macro definitions, etc.),
-running TeX under a special subshell.  \\[tex-buffer] does the whole buffer.
-\\[tex-file] saves the buffer and then processes the file.
-\\[tex-print] prints the .dvi file made by any of these.
-\\[tex-view] previews the .dvi file made by any of these.
-\\[tex-bibtex-file] runs bibtex on the file of the current buffer.
-
-Use \\[validate-tex-buffer] to check buffer for paragraphs containing
-mismatched $'s or braces.
-
-Special commands:
-\\{tex-mode-map}
-
-Mode variables:
-tex-run-command
-	Command string used by \\[tex-region] or \\[tex-buffer].
-tex-directory
-	Directory in which to create temporary files for TeX jobs
-	run by \\[tex-region] or \\[tex-buffer].
-tex-dvi-print-command
-	Command string used by \\[tex-print] to print a .dvi file.
-tex-alt-dvi-print-command
-	Alternative command string used by \\[tex-print] (when given a prefix
-	argument) to print a .dvi file.
-tex-dvi-view-command
-	Command string used by \\[tex-view] to preview a .dvi file.
-tex-show-queue-command
-	Command string used by \\[tex-show-print-queue] to show the print
-	queue that \\[tex-print] put your job on.
-
-Entering Plain-tex mode calls the value of text-mode-hook, then the value of
-tex-mode-hook, and then the value of plain-tex-mode-hook.  When the special
-subshell is initiated, the value of tex-shell-hook is called." t nil)
-
-(fset 'plain-TeX-mode 'plain-tex-mode)
-
-(autoload 'latex-mode "tex-mode" "\
-Major mode for editing files of input for LaTeX.
-Makes $ and } display the characters they match.
-Makes \" insert `` when it seems to be the beginning of a quotation,
-and '' when it appears to be the end; it inserts \" only after a \\.
-
-Use \\[tex-region] to run LaTeX on the current region, plus the preamble
-copied from the top of the file (containing \\documentstyle, etc.),
-running LaTeX under a special subshell.  \\[tex-buffer] does the whole buffer.
-\\[tex-file] saves the buffer and then processes the file.
-\\[tex-print] prints the .dvi file made by any of these.
-\\[tex-view] previews the .dvi file made by any of these.
-\\[tex-bibtex-file] runs bibtex on the file of the current buffer.
-
-Use \\[validate-tex-buffer] to check buffer for paragraphs containing
-mismatched $'s or braces.
-
-Special commands:
-\\{tex-mode-map}
-
-Mode variables:
-latex-run-command
-	Command string used by \\[tex-region] or \\[tex-buffer].
-tex-directory
-	Directory in which to create temporary files for LaTeX jobs
-	run by \\[tex-region] or \\[tex-buffer].
-tex-dvi-print-command
-	Command string used by \\[tex-print] to print a .dvi file.
-tex-alt-dvi-print-command
-	Alternative command string used by \\[tex-print] (when given a prefix
-	argument) to print a .dvi file.
-tex-dvi-view-command
-	Command string used by \\[tex-view] to preview a .dvi file.
-tex-show-queue-command
-	Command string used by \\[tex-show-print-queue] to show the print
-	queue that \\[tex-print] put your job on.
-
-Entering Latex mode calls the value of text-mode-hook, then the value of
-tex-mode-hook, and then the value of latex-mode-hook.  When the special
-subshell is initiated, the value of tex-shell-hook is called." t nil)
-
-;;;***
-
-;;;### (autoloads (texinfo-mode) "texinfo" "modes/texinfo.el")
-
-(autoload 'texinfo-mode "texinfo" "\
-Major mode for editing Texinfo files.
-
-  It has these extra commands:
-\\{texinfo-mode-map}
-
-  These are files that are used as input for TeX to make printed manuals
-and also to be turned into Info files with \\[makeinfo-buffer] or
-the `makeinfo' program.  These files must be written in a very restricted and
-modified version of TeX input format.
-
-  Editing commands are like text-mode except that the syntax table is
-set up so expression commands skip Texinfo bracket groups.  To see
-what the Info version of a region of the Texinfo file will look like,
-use \\[makeinfo-region], which runs `makeinfo' on the current region.
-
-  You can show the structure of a Texinfo file with \\[texinfo-show-structure].
-This command shows the structure of a Texinfo file by listing the
-lines with the @-sign commands for @chapter, @section, and the like.
-These lines are displayed in another window called the *Occur* window.
-In that window, you can position the cursor over one of the lines and
-use \\[occur-mode-goto-occurrence], to jump to the corresponding spot
-in the Texinfo file.
-
-  In addition, Texinfo mode provides commands that insert various
-frequently used @-sign commands into the buffer.  You can use these
-commands to save keystrokes.  And you can insert balanced braces with
-\\[texinfo-insert-braces] and later use the command \\[up-list] to
-move forward past the closing brace.
-
-Also, Texinfo mode provides functions for automatically creating or
-updating menus and node pointers.  These functions
-
-  * insert the `Next', `Previous' and `Up' pointers of a node,
-  * insert or update the menu for a section, and
-  * create a master menu for a Texinfo source file.
-
-Here are the functions:
-
-    texinfo-update-node                \\[texinfo-update-node]
-    texinfo-every-node-update          \\[texinfo-every-node-update]
-    texinfo-sequential-node-update 
-
-    texinfo-make-menu                  \\[texinfo-make-menu]
-    texinfo-all-menus-update           \\[texinfo-all-menus-update]
-    texinfo-master-menu
-
-    texinfo-indent-menu-description (column &optional region-p)
-
-The `texinfo-column-for-description' variable specifies the column to
-which menu descriptions are indented. 
-
-Passed an argument (a prefix argument, if interactive), the
-`texinfo-update-node' and `texinfo-make-menu' functions do their jobs
-in the region.
-
-To use the updating commands, you must structure your Texinfo file
-hierarchically, such that each `@node' line, with the exception of the
-Top node, is accompanied by some kind of section line, such as an
-`@chapter' or `@section' line.
-
-If the file has a `top' node, it must be called `top' or `Top' and
-be the first node in the file.
-
-Entering Texinfo mode calls the value of text-mode-hook, and then the
-value of texinfo-mode-hook." t nil)
-
-;;;***
-
-;;;### (autoloads (verilog-mode) "verilog-mode" "modes/verilog-mode.el")
-
-(autoload 'verilog-mode "verilog-mode" "\
-Major mode for editing Verilog code. \\<verilog-mode-map>
-NEWLINE, TAB indents for Verilog code.  
-Delete converts tabs to spaces as it moves back.
-Supports highlighting.
-
-Variables controlling indentation/edit style:
-
- verilog-indent-level           (default 3)
-    Indentation of Verilog statements with respect to containing block.
- verilog-indent-level-module    (default 3)
-    Absolute indentation of Module level Verilog statements. 
-    Set to 0 to get initial and always statements lined up 
-    on the left side of your screen.
- verilog-indent-level-declaration    (default 3)
-    Indentation of declarations with respect to containing block. 
-    Set to 0 to get them list right under containing block.
- verilog-indent-level-behavorial    (default 3)
-    Indentation of first begin in a task or function block
-    Set to 0 to get such code to linedup underneath the task or function keyword
- verilog-cexp-indent            (default 1)
-    Indentation of Verilog statements broken across lines.
- verilog-case-indent            (default 2)
-    Indentation for case statements.
- verilog-auto-newline           (default nil)
-    Non-nil means automatically newline after semicolons and the punctation 
-    mark after an end.
- verilog-auto-indent-on-newline (default t)
-    Non-nil means automatically indent line after newline
- verilog-tab-always-indent      (default t)
-    Non-nil means TAB in Verilog mode should always reindent the current line,
-    regardless of where in the line point is when the TAB command is used.
- verilog-indent-begin-after-if  (default t)
-    Non-nil means to indent begin statements following a preceding
-    if, else, while, for and repeat statements, if any. otherwise,
-    the begin is lined up with the preceding token. If t, you get:
-      if (a)
-         begin
-    otherwise you get:
-      if (a)
-      begin
- verilog-auto-endcomments       (default t)
-    Non-nil means a comment /* ... */ is set after the ends which ends 
-      cases, tasks, functions and modules.
-    The type and name of the object will be set between the braces.
- verilog-minimum-comment-distance (default 40)
-    Minimum distance between begin and end required before a comment
-    will be inserted.  Setting this variable to zero results in every
-    end aquiring a comment; the default avoids too many redundanet
-    comments in tight quarters. 
- verilog-auto-lineup            (default `(all))
-    List of contexts where auto lineup of :'s or ='s should be done.
-
-Turning on Verilog mode calls the value of the variable verilog-mode-hook with
-no args, if that value is non-nil.
-Other useful functions are:
-\\[verilog-complete-word]	-complete word with appropriate possibilities 
-   (functions, verilog keywords...)
-\\[verilog-comment-region]	- Put marked area in a comment, fixing 
-   nested comments.
-\\[verilog-uncomment-region]	- Uncomment an area commented with \\[verilog-comment-region].
-\\[verilog-insert-block]	- insert begin ... end;
-\\[verilog-star-comment]	- insert /* ... */
-\\[verilog-mark-defun]	- Mark function.
-\\[verilog-beg-of-defun]	- Move to beginning of current function.
-\\[verilog-end-of-defun]	- Move to end of current function.
-\\[verilog-label-be]	- Label matching begin ... end, fork ... join 
-  and case ... endcase statements;
-" t nil)
-
-;;;***
-
-;;;### (autoloads (vhdl-mode) "vhdl-mode" "modes/vhdl-mode.el")
-
-(autoload 'vhdl-mode "vhdl-mode" "\
-Major mode for editing VHDL code.
-vhdl-mode $Revision: 1.33 $
-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
-problem, including a reproducible test case and send the message.
-
-Note that the details of configuring vhdl-mode will soon be moved to the
-accompanying texinfo manual.  Until then, please read the README file
-that came with the vhdl-mode distribution.
-
-The hook variable `vhdl-mode-hook' is run with no args, if that value is
-bound and has a non-nil value.
-
-Key bindings:
-\\{vhdl-mode-map}" t nil)
-
-;;;***
-
-;;;### (autoloads (auto-view-mode view-major-mode view-mode view-minor-mode view-buffer-other-window view-file-other-window view-buffer view-file) "view-less" "modes/view-less.el")
-
-(defvar view-minor-mode-map (let ((map (make-keymap))) (set-keymap-name map 'view-minor-mode-map) (suppress-keymap map) (define-key map "-" 'negative-argument) (define-key map " " 'scroll-up) (define-key map "f" 'scroll-up) (define-key map "b" 'scroll-down) (define-key map 'backspace 'scroll-down) (define-key map 'delete 'scroll-down) (define-key map "
" 'view-scroll-lines-up) (define-key map "\n" 'view-scroll-lines-up) (define-key map "e" 'view-scroll-lines-up) (define-key map "j" 'view-scroll-lines-up) (define-key map "y" 'view-scroll-lines-down) (define-key map "k" 'view-scroll-lines-down) (define-key map "d" 'view-scroll-some-lines-up) (define-key map "u" 'view-scroll-some-lines-down) (define-key map "r" 'recenter) (define-key map "t" 'toggle-truncate-lines) (define-key map "N" 'view-buffer) (define-key map "E" 'view-file) (define-key map "P" 'view-buffer) (define-key map "!" 'shell-command) (define-key map "|" 'shell-command-on-region) (define-key map "=" 'what-line) (define-key map "?" 'view-search-backward) (define-key map "h" 'view-mode-describe) (define-key map "s" 'view-repeat-search) (define-key map "n" 'view-repeat-search) (define-key map "/" 'view-search-forward) (define-key map "\\" 'view-search-backward) (define-key map "g" 'view-goto-line) (define-key map "G" 'view-last-windowful) (define-key map "%" 'view-goto-percent) (define-key map "p" 'view-goto-percent) (define-key map "m" 'point-to-register) (define-key map "'" 'register-to-point) (define-key map "C" 'view-cleanup-backspaces) (define-key map "" 'view-quit) (define-key map "" 'view-quit-toggle-ro) (define-key map "q" 'view-quit) map))
-
-(defvar view-mode-map (let ((map (copy-keymap view-minor-mode-map))) (set-keymap-name map 'view-mode-map) map))
-
-(autoload 'view-file "view-less" "\
-Find FILE, enter view mode.  With prefix arg OTHER-P, use other window." t nil)
-
-(autoload 'view-buffer "view-less" "\
-Switch to BUF, enter view mode.  With prefix arg use other window." t nil)
-
-(autoload 'view-file-other-window "view-less" "\
-Find FILE in other window, and enter view mode." t nil)
-
-(autoload 'view-buffer-other-window "view-less" "\
-Switch to BUFFER in another window, and enter view mode." t nil)
-
-(autoload 'view-minor-mode "view-less" "\
-Minor mode for viewing text, with bindings like `less'.
-Commands are:
-\\<view-minor-mode-map>
-0..9	prefix args
--	prefix minus
-\\[scroll-up]	page forward
-\\[scroll-down]	page back
-\\[view-scroll-lines-up]	scroll prefix-arg lines forward, default 1.
-\\[view-scroll-lines-down]	scroll prefix-arg lines backward, default 1.
-\\[view-scroll-some-lines-down]	scroll prefix-arg lines backward, default 10.
-\\[view-scroll-some-lines-up]	scroll prefix-arg lines forward, default 10.
-\\[what-line]	print line number
-\\[view-mode-describe]	print this help message
-\\[view-search-forward]	regexp search, uses previous string if you just hit RET
-\\[view-search-backward]	as above but searches backward
-\\[view-repeat-search]	repeat last search
-\\[view-goto-line]	goto line prefix-arg, default 1
-\\[view-last-windowful]	goto line prefix-arg, default last line
-\\[view-goto-percent]	goto a position by percentage
-\\[toggle-truncate-lines]	toggle truncate-lines
-\\[view-file]	view another file
-\\[view-buffer]	view another buffer
-\\[view-cleanup-backspaces]	cleanup backspace constructions
-\\[shell-command]	execute a shell command
-\\[shell-command-on-region]	execute a shell command with the region as input
-\\[view-quit]	exit view-mode, and bury the current buffer.
-
-If invoked with the optional (prefix) arg non-nil, view-mode cleans up
-backspace constructions.
-
-More precisely:
-\\{view-minor-mode-map}" t nil)
-
-(autoload 'view-mode "view-less" "\
-View the current buffer using view-minor-mode.  This exists to be 99.9%
-compatible with the implementations of `view-mode' in view.el and older
-versions of view-less.el." t nil)
-
-(autoload 'view-major-mode "view-less" "\
-View the current buffer using view-mode, as a major mode.
-This function has a nonstandard name because `view-mode' is wrongly
-named but is like this for compatibility reasons." t nil)
-
-(autoload 'auto-view-mode "view-less" "\
-If the file of the current buffer is not writable, call view-mode.
-This is meant to be added to `find-file-hooks'." nil nil)
-
-;;;***
-
-;;;### (autoloads (vrml-mode) "vrml-mode" "modes/vrml-mode.el")
-
-(autoload 'vrml-mode "vrml-mode" "\
-Major mode for editing VRML code.
-Expression and list commands understand all VRML brackets.
-Tab indents for VRML code.
-Paragraphs are separated by blank lines only.
-Delete converts tabs to spaces as it moves back.
-
-Variables controlling indentation style:
-  vrml-indent-level
-    Indentation of VRML statements within surrounding block.
-
-Variables controlling user interaction with mode (see variable
-documentation for details):
-  vrml-tab-always-indent
-    Controls action of TAB key.
-  vrml-auto-newline
-    Non-nil means automatically newline before and after braces
-    inserted in VRML code.
-
-Turning on VRML mode calls the value of the variable `vrml-mode-hook'
-with no args, if that value is non-nil.  Read the documentation for
-`vrml-mode-hook' to see what kinds of interesting hook functions
-already exist.
-
-Commands:
-\\{vrml-mode-map}" t nil)
-
-;;;***
-
-;;;### (autoloads (xpm-mode) "xpm-mode" "modes/xpm-mode.el")
-
-(autoload 'xpm-mode "xpm-mode" "\
-Treat the current buffer as an xpm file and colorize it.
-
-  Shift-button-1 lets you paint by dragging the mouse.  Shift-button-1 on a
-color definition line will change the current painting color to that line's
-value.
-
-  Characters inserted from the keyboard will NOT be colored properly yet.
-Use the mouse, or do xpm-init (\\[xpm-init]) after making changes.
-
-\\[xpm-add-color] Add a new color, prompting for character and value
-\\[xpm-show-image] show the current image at the top of the buffer
-\\[xpm-parse-color] parse the current line's color definition and add
-   it to the color table.  Provided as a means of changing colors.
-XPM minor mode bindings:
-\\{xpm-mode-map}" t nil)
-
-;;;***
-
-;;;### (autoloads (br-env-load br-env-browse) "br-env" "oobr/br-env.el")
-
-(autoload 'br-env-browse "br-env" "\
-Invoke the OO-Browser on an existing or to be created Environment ENV-FILE." t nil)
-
-(autoload 'br-env-load "br-env" "\
-Load browser Environment or spec from optional ENV-FILE or 'br-env-file'.
-Non-nil PROMPT means prompt user before building tables.
-Non-nil NO-BUILD means skip build of Environment entirely.
-Return t if load is successful, else nil." t nil)
-
-;;;***
-
-;;;### (autoloads (oo-browser) "br-start" "oobr/br-start.el")
-
-(fset 'oobr 'oo-browser)
-
-(autoload 'oo-browser "br-start" "\
-Prompt for an Environment and language over which to run the OO-Browser.
-Optional prefix argument SAME-ENV-FLAG means browse the current Environment,
-if any, without prompting.  Otherwise, if called interactively, give the user
-a choice whether to re-browse the last Environment or to browse a new one." t nil)
-
-;;;***
-
-;;;### (autoloads (br-to-from-viewer br-add-class-file) "br" "oobr/br.el")
-
-(autoload 'br-add-class-file "br" "\
-Add a file of classes to the current Environment.
-Interactively or when optional CLASS-PATH is nil, CLASS-PATH defaults to the
-current buffer file pathname.  If optional LIB-TABLE-P is non-nil, add to
-Library Environment, otherwise add to System Environment.  If optional
-SAVE-FILE is t, the Environment is then stored to the filename given by
-`br-env-file'.  If SAVE-FILE is non-nil and not t, its string value is used
-as the file to which to save the Environment." t nil)
-
-(autoload 'br-to-from-viewer "br" "\
-Move point to viewer window or back to last recorded listing window." t nil)
-
-;;;***
-
-;;;### (autoloads (c++-browse) "c++-browse" "oobr/c++-browse.el")
-
-(autoload 'c++-browse "c++-browse" "\
-Invoke the C++ OO-Browser.
-This allows browsing through C++ library and system class hierarchies.  With
-an optional non-nil prefix argument ENV-FILE, prompt for Environment file to
-use.  Alternatively, a string value of ENV-FILE is used as the Environment
-file name.  See also the file \"br-help\"." t nil)
-
-;;;***
-
-;;;### (autoloads (clos-browse) "clos-brows" "oobr/clos-brows.el")
-
-(autoload 'clos-browse "clos-brows" "\
-Invoke the CLOS OO-Browser.
-This allows browsing through CLOS library and system class hierarchies.  With
-an optional non-nil prefix argument ENV-FILE, prompt for Environment file
-to use.  Alternatively, a string value of ENV-FILE is used as the
-Environment file name.  See also the file \"br-help\"." t nil)
-
-;;;***
-
-;;;### (autoloads (eif-browse) "eif-browse" "oobr/eif-browse.el")
-
-(autoload 'eif-browse "eif-browse" "\
-Invoke the Eiffel OO-Browser.
-This allows browsing through Eiffel library and system class hierarchies.
-With an optional prefix arg ENV-FILE equal to t, prompt for Environment file
-to use.  Alternatively, a string value of ENV-FILE is used as the Environment
-file name.  See also the file \"br-help\"." t nil)
-
-;;;***
-
-;;;### (autoloads (info-browse) "info-brows" "oobr/info-brows.el")
-
-(autoload 'info-browse "info-brows" "\
-Invoke the Info OO-Browser.
-This allows browsing through Info library and system class hierarchies.  With
-an optional non-nil prefix argument ENV-FILE, prompt for Environment file to
-use.  Alternatively, a string value of ENV-FILE is used as the Environment
-file name.  See also the file \"br-help\"." t nil)
-
-;;;***
-
-;;;### (autoloads (java-browse) "java-brows" "oobr/java-brows.el")
-
-(autoload 'java-browse "java-brows" "\
-Invoke the Java OO-Browser.
-This allows browsing through Java library and system class hierarchies.  With
-an optional non-nil prefix argument ENV-FILE, prompt for Environment file to
-use.  Alternatively, a string value of ENV-FILE is used as the Environment
-file name.  See also the file \"br-help\"." t nil)
-
-;;;***
-
-;;;### (autoloads (objc-browse) "objc-brows" "oobr/objc-brows.el")
-
-(autoload 'objc-browse "objc-brows" "\
-Invoke the Objective-C OO-Browser.
-This allows browsing through Objective-C library and system class
-hierarchies.  With an optional non-nil prefix argument ENV-FILE, prompt for
-Environment file to use.  Alternatively, a string value of ENV-FILE is used
-as the Environment file name.  See also the file \"br-help\"." t nil)
-
-;;;***
-
-;;;### (autoloads (python-browse) "python-browse" "oobr/python-browse.el")
-
-(autoload 'python-browse "python-browse" "\
-Invoke the Python OO-Browser.
-This allows browsing through Python library and system class hierarchies.
-With an optional non-nil prefix argument ENV-FILE, prompt for Environment
-file to use.  Alternatively, a string value of ENV-FILE is used as the
-Environment file name.  See also the file \"br-help\"." t nil)
-
-;;;***
-
-;;;### (autoloads (smt-browse) "smt-browse" "oobr/smt-browse.el")
-
-(autoload 'smt-browse "smt-browse" "\
-Invoke the Smalltalk OO-Browser.
-This allows browsing through Smalltalk library and system class hierarchies.
-With an optional non-nil prefix argument ENV-FILE, prompt for Environment
-file to use.  Alternatively, a string value of ENV-FILE is used as the
-Environment file name.  See also the file \"br-help\"." t nil)
-
-;;;***
-
-;;;### (autoloads (add-log-current-defun change-log-mode add-change-log-entry-other-window add-change-log-entry find-change-log prompt-for-change-log-name) "add-log" "packages/add-log.el")
-
-(autoload 'prompt-for-change-log-name "add-log" "\
-Prompt for a change log name." nil nil)
-
-(autoload 'find-change-log "add-log" "\
-Find a change log file for \\[add-change-log-entry] and return the name.
-
-Optional arg FILE-NAME specifies the file to use.
-If FILE-NAME is nil, use the value of `change-log-default-name'.
-If 'change-log-default-name' is nil, behave as though it were 'ChangeLog'
-\(or whatever we use on this operating system).
-
-If 'change-log-default-name' contains a leading directory component, then
-simply find it in the current directory.  Otherwise, search in the current 
-directory and its successive parents for a file so named.
-
-Once a file is found, `change-log-default-name' is set locally in the
-current buffer to the complete file name." nil nil)
-
-(autoload 'add-change-log-entry "add-log" "\
-Find change log file and add an entry for today.
-Optional arg (interactive prefix) non-nil means prompt for user name and site.
-Second arg is file name of change log.  If nil, uses `change-log-default-name'.
-Third arg OTHER-WINDOW non-nil means visit in other window.
-Fourth arg NEW-ENTRY non-nil means always create a new entry at the front;
-never append to an existing entry.  Today's date is calculated according to
-`change-log-time-zone-rule' if non-nil, otherwise in local time." t nil)
-
-(autoload 'add-change-log-entry-other-window "add-log" "\
-Find change log file in other window and add an entry for today.
-Optional arg (interactive prefix) non-nil means prompt for user name and site.
-Second arg is file name of change log.  If nil, uses `change-log-default-name'." t nil)
-
-(define-key ctl-x-4-map "a" 'add-change-log-entry-other-window)
-
-(autoload 'change-log-mode "add-log" "\
-Major mode for editing change logs; like Indented Text Mode.
-Prevents numeric backups and sets `left-margin' to 8 and `fill-column' to 74.
-New log entries are usually made with \\[add-change-log-entry] or \\[add-change-log-entry-other-window].
-Each entry behaves as a paragraph, and the entries for one day as a page.
-Runs `change-log-mode-hook'." t nil)
-
-(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) "\
-*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) "\
-*Modes that look like TeX to `add-log-current-defun'.")
-
-(autoload 'add-log-current-defun "add-log" "\
-Return name of function definition point is in, or nil.
-
-Understands C, Lisp, LaTeX (\"functions\" are chapters, sections, ...),
-Texinfo (@node titles), Perl, and Fortran.
-
-Other modes are handled by a heuristic that looks in the 10K before
-point for uppercase headings starting in the first column or
-identifiers followed by `:' or `=', see variable
-`add-log-current-defun-header-regexp'.
-
-Has a preference of looking backwards." nil nil)
-
-;;;***
-
-;;;### (autoloads (apropos-documentation apropos-value apropos apropos-command) "apropos" "packages/apropos.el")
-
-(fset 'command-apropos 'apropos-command)
-
-(autoload 'apropos-command "apropos" "\
-Shows commands (interactively callable functions) that match REGEXP.
-With optional prefix ARG or if `apropos-do-all' is non-nil, also show
-variables." t nil)
-
-(autoload 'apropos "apropos" "\
-Show all bound symbols whose names match REGEXP.
-With optional prefix ARG or if `apropos-do-all' is non-nil, also show unbound
-symbols and key bindings, which is a little more time-consuming.
-Returns list of symbols and documentation found." t nil)
-
-(autoload 'apropos-value "apropos" "\
-Show all symbols whose value's printed image matches REGEXP.
-With optional prefix ARG or if `apropos-do-all' is non-nil, also looks
-at the function and at the names and values of properties.
-Returns list of symbols and values found." t nil)
-
-(autoload 'apropos-documentation "apropos" "\
-Show symbols whose documentation contain matches for REGEXP.
-With optional prefix ARG or if `apropos-do-all' is non-nil, also use
-documentation that is not stored in the documentation file and show key
-bindings.
-Returns list of symbols and documentation found." t nil)
-
-;;;***
-
-;;;### (autoloads (define-auto-insert auto-insert) "autoinsert" "packages/autoinsert.el")
-
-(autoload 'auto-insert "autoinsert" "\
-Insert default contents into a new file if `auto-insert' is non-nil.
-Matches the visited file name against the elements of `auto-insert-alist'." t nil)
-
-(autoload 'define-auto-insert "autoinsert" "\
-Associate CONDITION with (additional) ACTION in `auto-insert-alist'.
-Optional AFTER means to insert action after all existing actions for CONDITION,
-or if CONDITION had no actions, after all other CONDITIONs." nil nil)
-
-;;;***
-
-;;;### (autoloads (mouse-avoidance-mode) "avoid" "packages/avoid.el")
-
-(defvar mouse-avoidance-mode nil "\
-Value is t or a symbol if the mouse pointer should avoid the cursor.
-See function `mouse-avoidance-mode' for possible values.  Changing this
-variable is NOT the recommended way to change modes; use that function 
-instead.")
-
-(autoload 'mouse-avoidance-mode "avoid" "\
-Set cursor avoidance mode to MODE.
-MODE should be one of the symbols `banish', `exile', `jump', `animate',
-`cat-and-mouse', `proteus', or `none'.
-
-If MODE is nil, toggle mouse avoidance between `none` and `banish'
-modes.  Positive numbers and symbols other than the above are treated
-as equivalent to `banish'; negative numbers and `-' are equivalent to `none'.
-
-Effects of the different modes: 
- * banish: Move the mouse to the upper-right corner on any keypress.
- * exile: Move the mouse to the corner only if the cursor gets too close,
-     and allow it to return once the cursor is out of the way.
- * jump: If the cursor gets too close to the mouse, displace the mouse
-     a random distance & direction.
- * animate: As `jump', but shows steps along the way for illusion of motion.
- * cat-and-mouse: Same as `animate'.
- * proteus: As `animate', but changes the shape of the mouse pointer too.
-
-Whenever the mouse is moved, the frame is also raised.
-
-\(see `mouse-avoidance-threshold' for definition of \"too close\",
-and `mouse-avoidance-nudge-dist' and `mouse-avoidance-nudge-var' for
-definition of \"random distance\".)" t nil)
-
-(add-minor-mode 'mouse-avoidance-mode " Avoid")
-
-;;;***
-
-;;;### (autoloads (blink-cursor-mode) "blink-cursor" "packages/blink-cursor.el")
-
-(autoload 'blink-cursor-mode "blink-cursor" "\
-Enable or disable a blinking cursor.
-If TIMEOUT is nil, toggle on or off.
-If TIMEOUT is t, enable with the previous timeout value.
-If TIMEOUT is 0, disable.
-If TIMEOUT is greater than 0, then the cursor will blink once
-each TIMEOUT secs (can be a float)." t nil)
-
-;;;***
-
-;;;### (autoloads (bookmark-menu-delete bookmark-menu-rename bookmark-menu-locate bookmark-menu-jump bookmark-menu-insert bookmark-bmenu-list bookmark-load bookmark-save bookmark-write bookmark-delete bookmark-insert bookmark-rename bookmark-insert-location bookmark-relocate bookmark-jump bookmark-set) "bookmark" "packages/bookmark.el")
-
-(if (symbolp (key-binding "r")) nil (progn (define-key ctl-x-map "rb" 'bookmark-jump) (define-key ctl-x-map "rm" 'bookmark-set) (define-key ctl-x-map "rl" 'bookmark-bmenu-list)))
-
-(defvar bookmark-map nil "\
-Keymap containing bindings to bookmark functions.
-It is not bound to any key by default: to bind it
-so that you have a bookmark prefix, just use `global-set-key' and bind a
-key of your choice to `bookmark-map'.  All interactive bookmark
-functions have a binding in this keymap.")
-
-(define-prefix-command 'bookmark-map)
-
-(define-key bookmark-map "x" 'bookmark-set)
-
-(define-key bookmark-map "m" 'bookmark-set)
-
-(define-key bookmark-map "j" 'bookmark-jump)
-
-(define-key bookmark-map "g" 'bookmark-jump)
-
-(define-key bookmark-map "i" 'bookmark-insert)
-
-(define-key bookmark-map "e" 'edit-bookmarks)
-
-(define-key bookmark-map "f" 'bookmark-insert-location)
-
-(define-key bookmark-map "r" 'bookmark-rename)
-
-(define-key bookmark-map "d" 'bookmark-delete)
-
-(define-key bookmark-map "l" 'bookmark-load)
-
-(define-key bookmark-map "w" 'bookmark-write)
-
-(define-key bookmark-map "s" 'bookmark-save)
-
-(add-hook 'kill-emacs-hook (function (lambda nil (and (featurep 'bookmark) bookmark-alist (bookmark-time-to-save-p t) (bookmark-save)))))
-
-(autoload 'bookmark-set "bookmark" "\
-Set a bookmark named NAME inside a file.
-If name is nil, then the user will be prompted.
-With prefix arg, will not overwrite a bookmark that has the same name
-as NAME if such a bookmark already exists, but instead will \"push\"
-the new bookmark onto the bookmark alist.  Thus the most recently set
-bookmark with name NAME would be the one in effect at any given time,
-but the others are still there, should you decide to delete the most
-recent one.
-
-To yank words from the text of the buffer and use them as part of the
-bookmark name, type C-w while setting a bookmark.  Successive C-w's
-yank successive words.
-
-Typing C-u inserts the name of the last bookmark used in the buffer
-\(as an aid in using a single bookmark name to track your progress
-through a large file).  If no bookmark was used, then C-u inserts the
-name of the file being visited.
-
-Use \\[bookmark-delete] to remove bookmarks (you give it a name,
-and it removes only the first instance of a bookmark with that name from
-the list of bookmarks.)" t nil)
-
-(autoload 'bookmark-jump "bookmark" "\
-Jump to bookmark BOOKMARK (a point in some file).  
-You may have a problem using this function if the value of variable
-`bookmark-alist' is nil.  If that happens, you need to load in some
-bookmarks.  See help on function `bookmark-load' for more about
-this.
-
-If the file pointed to by BOOKMARK no longer exists, you will be asked
-if you wish to give the bookmark a new location, and bookmark-jump
-will then jump to the new location, as well as recording it in place
-of the old one in the permanent bookmark record." t nil)
-
-(autoload 'bookmark-relocate "bookmark" "\
-Relocate BOOKMARK to another file (reading file name with minibuffer).
-This makes an already existing bookmark point to that file, instead of
-the one it used to point at.  Useful when a file has been renamed
-after a bookmark was set in it." t nil)
-
-(autoload 'bookmark-insert-location "bookmark" "\
-Insert the name of the file associated with BOOKMARK.
-Optional second arg NO-HISTORY means don't record this in the
-minibuffer history list `bookmark-history'." t nil)
-
-(defalias 'bookmark-locate 'bookmark-insert-location)
-
-(autoload 'bookmark-rename "bookmark" "\
-Change the name of OLD bookmark to NEW name.
-If called from keyboard, prompt for OLD and NEW.  If called from
-menubar, select OLD from a menu and prompt for NEW.
-
-If called from Lisp, prompt for NEW if only OLD was passed as an
-argument.  If called with two strings, then no prompting is done.  You
-must pass at least OLD when calling from Lisp.
-
-While you are entering the new name, consecutive C-w's insert
-consecutive words from the text of the buffer into the new bookmark
-name." t nil)
-
-(autoload 'bookmark-insert "bookmark" "\
-Insert the text of the file pointed to by bookmark BOOKMARK.  
-You may have a problem using this function if the value of variable
-`bookmark-alist' is nil.  If that happens, you need to load in some
-bookmarks.  See help on function `bookmark-load' for more about
-this." t nil)
-
-(autoload 'bookmark-delete "bookmark" "\
-Delete BOOKMARK from the bookmark list.  
-Removes only the first instance of a bookmark with that name.  If
-there are one or more other bookmarks with the same name, they will
-not be deleted.  Defaults to the \"current\" bookmark (that is, the
-one most recently used in this file, if any).
-Optional second arg BATCH means don't update the bookmark list buffer,
-probably because we were called from there." t nil)
-
-(autoload 'bookmark-write "bookmark" "\
-Write bookmarks to a file (reading the file name with the minibuffer).
-Don't use this in Lisp programs; use `bookmark-save' instead." t nil)
-
-(autoload 'bookmark-save "bookmark" "\
-Save currently defined bookmarks.
-Saves by default in the file defined by the variable
-`bookmark-default-file'.  With a prefix arg, save it in file FILE
-\(second argument).
-
-If you are calling this from Lisp, the two arguments are PREFIX-ARG
-and FILE, and if you just want it to write to the default file, then
-pass no arguments.  Or pass in nil and FILE, and it will save in FILE
-instead.  If you pass in one argument, and it is non-nil, then the
-user will be interactively queried for a file to save in.
-
-When you want to load in the bookmarks from a file, use
-`bookmark-load', \\[bookmark-load].  That function will prompt you
-for a file, defaulting to the file defined by variable
-`bookmark-default-file'." t nil)
-
-(autoload 'bookmark-load "bookmark" "\
-Load bookmarks from FILE (which must be in bookmark format).
-Appends loaded bookmarks to the front of the list of bookmarks.  If
-optional second argument REVERT is non-nil, existing bookmarks are
-destroyed.  Optional third arg NO-MSG means don't display any messages
-while loading.
-
-If you load a file that doesn't contain a proper bookmark alist, you
-will corrupt Emacs's bookmark list.  Generally, you should only load
-in files that were created with the bookmark functions in the first
-place.  Your own personal bookmark file, `~/.emacs.bmk', is
-maintained automatically by Emacs; you shouldn't need to load it
-explicitly." t nil)
-
-(autoload 'bookmark-bmenu-list "bookmark" "\
-Display a list of existing bookmarks.
-The list is displayed in a buffer named `*Bookmark List*'.
-The leftmost column displays a D if the bookmark is flagged for
-deletion, or > if it is flagged for displaying." t nil)
-
-(defalias 'list-bookmarks 'bookmark-bmenu-list)
-
-(defalias 'edit-bookmarks 'bookmark-bmenu-list)
-
-(autoload 'bookmark-menu-insert "bookmark" "\
-Insert the text of the file pointed to by bookmark BOOKMARK.  
-You may have a problem using this function if the value of variable
-`bookmark-alist' is nil.  If that happens, you need to load in some
-bookmarks.  See help on function `bookmark-load' for more about
-this.
-
-Warning: this function only takes an EVENT as argument.  Use the
-corresponding bookmark function from Lisp (the one without the
-\"-menu-\" in its name)." t nil)
-
-(autoload 'bookmark-menu-jump "bookmark" "\
-Jump to bookmark BOOKMARK (a point in some file).  
-You may have a problem using this function if the value of variable
-`bookmark-alist' is nil.  If that happens, you need to load in some
-bookmarks.  See help on function `bookmark-load' for more about
-this.
-
-Warning: this function only takes an EVENT as argument.  Use the
-corresponding bookmark function from Lisp (the one without the
-\"-menu-\" in its name)." t nil)
-
-(autoload 'bookmark-menu-locate "bookmark" "\
-Insert the name of the file associated with BOOKMARK. 
-\(This is not the same as the contents of that file).
-
-Warning: this function only takes an EVENT as argument.  Use the
-corresponding bookmark function from Lisp (the one without the
-\"-menu-\" in its name)." t nil)
-
-(autoload 'bookmark-menu-rename "bookmark" "\
-Change the name of OLD-BOOKMARK to NEWNAME.  
-If called from keyboard, prompts for OLD-BOOKMARK and NEWNAME.
-If called from menubar, OLD-BOOKMARK is selected from a menu, and
-prompts for NEWNAME. 
-If called from Lisp, prompts for NEWNAME if only OLD-BOOKMARK was
-passed as an argument.  If called with two strings, then no prompting
-is done.  You must pass at least OLD-BOOKMARK when calling from Lisp.
-
-While you are entering the new name, consecutive C-w's insert
-consecutive words from the text of the buffer into the new bookmark
-name.
-
-Warning: this function only takes an EVENT as argument.  Use the
-corresponding bookmark function from Lisp (the one without the
-\"-menu-\" in its name)." t nil)
-
-(autoload 'bookmark-menu-delete "bookmark" "\
-Delete the bookmark named NAME from the bookmark list.  
-Removes only the first instance of a bookmark with that name.  If
-there are one or more other bookmarks with the same name, they will
-not be deleted.  Defaults to the \"current\" bookmark (that is, the
-one most recently used in this file, if any).
-
-Warning: this function only takes an EVENT as argument.  Use the
-corresponding bookmark function from Lisp (the one without the
-\"-menu-\" in its name)." t nil)
-
-(defvar menu-bar-bookmark-map (make-sparse-keymap "Bookmark functions"))
-
-(defalias 'menu-bar-bookmark-map (symbol-value 'menu-bar-bookmark-map))
-
-(define-key menu-bar-bookmark-map [load] '("Load a Bookmark File..." . bookmark-load))
-
-(define-key menu-bar-bookmark-map [write] '("Save Bookmarks As..." . bookmark-write))
-
-(define-key menu-bar-bookmark-map [save] '("Save Bookmarks" . bookmark-save))
-
-(define-key menu-bar-bookmark-map [edit] '("Edit Bookmark List" . bookmark-bmenu-list))
-
-(define-key menu-bar-bookmark-map [delete] '("Delete Bookmark" . bookmark-menu-delete))
-
-(define-key menu-bar-bookmark-map [rename] '("Rename Bookmark" . bookmark-menu-rename))
-
-(define-key menu-bar-bookmark-map [locate] '("Insert Location" . bookmark-menu-locate))
-
-(define-key menu-bar-bookmark-map [insert] '("Insert Contents" . bookmark-menu-insert))
-
-(define-key menu-bar-bookmark-map [set] '("Set Bookmark" . bookmark-set))
-
-(define-key menu-bar-bookmark-map [jump] '("Jump to Bookmark" . bookmark-menu-jump))
-
-;;;***
-
-;;;### (autoloads nil "buff-menu" "packages/buff-menu.el")
-
-(defvar list-buffers-directory nil)
-
-(make-variable-buffer-local 'list-buffers-directory)
-
-;;;***
-
-;;;### (autoloads (command-history-mode list-command-history repeat-matching-complex-command) "chistory" "packages/chistory.el")
-
-(autoload 'repeat-matching-complex-command "chistory" "\
-Edit and re-evaluate complex command with name matching PATTERN.
-Matching occurrences are displayed, most recent first, until you select
-a form for evaluation.  If PATTERN is empty (or nil), every form in the
-command history is offered.  The form is placed in the minibuffer for
-editing and the result is evaluated." t nil)
-
-(autoload 'list-command-history "chistory" "\
-List history of commands typed to minibuffer.
-The number of commands listed is controlled by `list-command-history-max'.
-Calls value of `list-command-history-filter' (if non-nil) on each history
-element to judge if that element should be excluded from the list.
-
-The buffer is left in Command History mode." t nil)
-
-(autoload 'command-history-mode "chistory" "\
-Major mode for examining commands from `command-history'.
-The number of commands listed is controlled by `list-command-history-max'.
-The command history is filtered by `list-command-history-filter' if non-nil.
-Use \\<command-history-map>\\[command-history-repeat] to repeat the command on the current line.
-
-Otherwise much like Emacs-Lisp Mode except that there is no self-insertion
-and digits provide prefix arguments.  Tab does not indent.
-\\{command-history-map}
-Calls the value of `command-history-hook' if that is non-nil.
-The Command History listing is recomputed each time this mode is invoked." t nil)
-
-;;;***
-
-;;;### (autoloads nil "cmuscheme" "packages/cmuscheme.el")
-
-(add-hook 'same-window-buffer-names "*scheme*")
-
-;;;***
-
-;;;### (autoloads (compare-windows) "compare-w" "packages/compare-w.el")
-
-(autoload 'compare-windows "compare-w" "\
-Compare text in current window with text in next window.
-Compares the text starting at point in each window,
-moving over text in each one as far as they match.
-
-This command pushes the mark in each window
-at the prior location of point in that window.
-If both windows display the same buffer,
-the mark is pushed twice in that buffer:
-first in the other window, then in the selected window.
-
-A prefix arg means ignore changes in whitespace.
-The variable `compare-windows-whitespace' controls how whitespace is skipped.
-If `compare-ignore-case' is non-nil, changes in case are also ignored." t nil)
-
-;;;***
-
-;;;### (autoloads (first-error previous-error next-error compilation-minor-mode grep compile) "compile" "packages/compile.el")
-
-(defcustom compilation-mode-hook nil "*List of hook functions run by `compilation-mode' (see `run-hooks')." :type 'hook :group 'compilation)
-
-(defcustom compilation-window-height nil "*Number of lines in a compilation window.  If nil, use Emacs default." :type '(choice (const nil) integer) :group 'compilation)
-
-(defcustom compilation-buffer-name-function nil "Function to compute the name of a compilation buffer.\nThe function receives one argument, the name of the major mode of the\ncompilation buffer.  It should return a string.\nnil means compute the name with `(concat \"*\" (downcase major-mode) \"*\")'." :type 'function :group 'compilation)
-
-(defcustom compilation-finish-function nil "*Function to call when a compilation process finishes.\nIt is called with two arguments: the compilation buffer, and a string\ndescribing how the process finished." :type 'function :group 'compilation)
-
-(defcustom compilation-search-path '(nil) "*List of directories to search for source files named in error messages.\nElements should be directory names, not file names of directories.\nnil as an element means to try the default directory." :type '(repeat (choice (const :tag "Default" nil) directory)) :group 'compilation)
-
-(autoload 'compile "compile" "\
-Compile the program including the current buffer.  Default: run `make'.
-Runs COMMAND, a shell command, in a separate process asynchronously
-with output going to the buffer `*compilation*'.
-
-You can then use the command \\[next-error] to find the next error message
-and move to the source code that caused it.
-
-Interactively, prompts for the command if `compilation-read-command' is
-non-nil; otherwise uses `compile-command'.  With prefix arg, always prompts.
-
-To run more than one compilation at once, start one and rename the
-`*compilation*' buffer to some other name with \\[rename-buffer].
-Then start the next one.
-
-The name used for the buffer is actually whatever is returned by
-the function in `compilation-buffer-name-function', so you can set that
-to a function that generates a unique name." t nil)
-
-(autoload 'grep "compile" "\
-Run grep, with user-specified args, and collect output in a buffer.
-While grep runs asynchronously, you can use the \\[next-error] command
-to find the text that grep hits refer to.
-
-This command uses a special history list for its arguments, so you can
-easily repeat a grep command." t nil)
-
-(autoload 'compilation-minor-mode "compile" "\
-Toggle compilation minor mode.
-With arg, turn compilation mode on if and only if arg is positive.
-See `compilation-mode'.
-! \\{compilation-mode-map}" t nil)
-
-(autoload 'next-error "compile" "\
-Visit next compilation error message and corresponding source code.
-This operates on the output from the \\[compile] command.
-If all preparsed error messages have been processed,
-the error message buffer is checked for new ones.
-
-A prefix arg specifies how many error messages to move;
-negative means move back to previous error messages.
-Just C-u as a prefix means reparse the error message buffer
-and start at the first error.
-
-\\[next-error] normally applies to the most recent compilation started,
-but as long as you are in the middle of parsing errors from one compilation
-output buffer, you stay with that compilation output buffer.
-
-Use \\[next-error] in a compilation output buffer to switch to
-processing errors from that compilation.
-
-See variables `compilation-parse-errors-function' and
-`compilation-error-regexp-alist' for customization ideas." t nil)
-
-(define-key ctl-x-map "`" 'next-error)
-
-(autoload 'previous-error "compile" "\
-Visit previous compilation error message and corresponding source code.
-This operates on the output from the \\[compile] command." t nil)
-
-(autoload 'first-error "compile" "\
-Reparse the error message buffer and start at the first error
-Visit corresponding source code.
-This operates on the output from the \\[compile] command." t nil)
-
-;;;***
-
-;;;### (autoloads (dabbrev-expand dabbrev-completion) "dabbrev" "packages/dabbrev.el")
-
-(define-key global-map [(meta /)] 'dabbrev-expand)
-
-(define-key global-map [(meta control /)] 'dabbrev-completion)
-
-(autoload 'dabbrev-completion "dabbrev" "\
-Completion on current word.
-Like \\[dabbrev-expand] but finds all expansions in the current buffer
-and presents suggestions for completion.
-
-With a prefix argument, it searches all buffers accepted by the
-function pointed out by `dabbrev-friend-buffer-function' to find the
-completions.
-
-If the prefix argument is 16 (which comes from C-u C-u),
-then it searches *all* buffers.
-
-With no prefix argument, it reuses an old completion list
-if there is a suitable one already." t nil)
-
-(autoload 'dabbrev-expand "dabbrev" "\
-Expand previous word \"dynamically\".
-
-Expands to the most recent, preceding word for which this is a prefix.
-If no suitable preceding word is found, words following point are
-considered.  If still no suitable word is found, then look in the
-buffers accepted by the function pointed out by variable
-`dabbrev-friend-buffer-function'.
-
-A positive prefix argument, N, says to take the Nth backward *distinct*
-possibility.  A negative argument says search forward.
-
-If the cursor has not moved from the end of the previous expansion and
-no argument is given, replace the previously-made expansion
-with the next possible expansion not yet tried.
-
-The variable `dabbrev-backward-only' may be used to limit the
-direction of search to backward if set non-nil.
-
-See also `dabbrev-abbrev-char-regexp' and \\[dabbrev-completion]." t nil)
-
-;;;***
-
-;;;### (autoloads (diff-backup diff) "diff" "packages/diff.el")
-
-(defcustom diff-switches "-c" "*A list of switches (strings) to pass to the diff program." :type '(choice string (repeat string)) :group 'diff)
-
-(autoload 'diff "diff" "\
-Find and display the differences between OLD and NEW files.
-Interactively you are prompted with the current buffer's file name for NEW
-and what appears to be its backup for OLD." t nil)
-
-(autoload 'diff-backup "diff" "\
-Diff this file with its backup file or vice versa.
-Uses the latest backup, if there are several numerical backups.
-If this file is a backup, diff it with its original.
-The backup file is the first file given to `diff'." t nil)
-
-;;;***
-
-;;;### (autoloads (edit-faces) "edit-faces" "packages/edit-faces.el")
-
-(autoload 'edit-faces "edit-faces" "\
-Alter face characteristics by editing a list of defined faces.
-Pops up a buffer containing a list of defined faces.
-
-Editing commands:
-
-\\{edit-faces-mode-map}" t nil)
-
-;;;***
-
-;;;### (autoloads (report-xemacs-bug) "emacsbug" "packages/emacsbug.el")
-
-(autoload 'report-xemacs-bug "emacsbug" "\
-Report a bug in XEmacs.
-Prompts for bug subject.  Leaves you in a mail buffer." t nil)
-
-;;;***
-
-;;;### (autoloads (emerge-merge-directories emerge-revisions-with-ancestor emerge-revisions emerge-files-with-ancestor-remote emerge-files-remote emerge-files-with-ancestor-command emerge-files-command emerge-buffers-with-ancestor emerge-buffers emerge-files-with-ancestor emerge-files) "emerge" "packages/emerge.el")
-
-(autoload 'emerge-files "emerge" "\
-Run Emerge on two files." t nil)
-
-(fset 'emerge 'emerge-files)
-
-(autoload 'emerge-files-with-ancestor "emerge" "\
-Run Emerge on two files, giving another file as the ancestor." t nil)
-
-(autoload 'emerge-buffers "emerge" "\
-Run Emerge on two buffers." t nil)
-
-(autoload 'emerge-buffers-with-ancestor "emerge" "\
-Run Emerge on two buffers, giving another buffer as the ancestor." t nil)
-
-(autoload 'emerge-files-command "emerge" nil nil nil)
-
-(autoload 'emerge-files-with-ancestor-command "emerge" nil nil nil)
-
-(autoload 'emerge-files-remote "emerge" nil nil nil)
-
-(autoload 'emerge-files-with-ancestor-remote "emerge" nil nil nil)
-
-(autoload 'emerge-revisions "emerge" "\
-Emerge two RCS revisions of a file." t nil)
-
-(autoload 'emerge-revisions-with-ancestor "emerge" "\
-Emerge two RCS revisions of a file, with another revision as ancestor." t nil)
-
-(autoload 'emerge-merge-directories "emerge" nil t nil)
-
-;;;***
-
-;;;### (autoloads (tags-apropos list-tags tags-query-replace tags-search tags-loop-continue next-file find-tag-other-window find-tag visit-tags-table) "etags" "packages/etags.el")
-
-(defcustom tags-build-completion-table 'ask "*If this variable is nil, then tags completion is disabled.\nIf this variable is t, then things which prompt for tags will do so with \n completion across all known tags.\nIf this variable is the symbol `ask', then you will be asked whether each\n tags table should be added to the completion list as it is read in.\n (With the exception that for very small tags tables, you will not be asked,\n since they can be parsed quickly.)" :type '(radio (const :tag "Disabled" nil) (const :tag "Complete All" t) (const :tag "Ask" ask)) :group 'etags)
-
-(defcustom tags-always-exact nil "*If this variable is non-nil, then tags always looks for exact matches." :type 'boolean :group 'etags)
-
-(defcustom tag-table-alist nil "*A list which determines which tags files should be active for a \ngiven buffer.  This is not really an association list, in that all \nelements are checked.  The CAR of each element of this list is a \npattern against which the buffer's file name is compared; if it \nmatches, then the CDR of the list should be the name of the tags\ntable to use.  If more than one element of this list matches the\nbuffer's file name, then all of the associated tags tables will be\nused.  Earlier ones will be searched first.\n\nIf the CAR of elements of this list are strings, then they are treated\nas regular-expressions against which the file is compared (like the\nauto-mode-alist).  If they are not strings, then they are evaluated.\nIf they evaluate to non-nil, then the current buffer is considered to\nmatch.\n\nIf the CDR of the elements of this list are strings, then they are\nassumed to name a TAGS file.  If they name a directory, then the string\n\"TAGS\" is appended to them to get the file name.  If they are not \nstrings, then they are evaluated, and must return an appropriate string.\n\nFor example:\n  (setq tag-table-alist\n	'((\"/usr/src/public/perl/\" . \"/usr/src/public/perl/perl-3.0/\")\n	 (\"\\\\.el$\" . \"/usr/local/emacs/src/\")\n	 (\"/jbw/gnu/\" . \"/usr15/degree/stud/jbw/gnu/\")\n	 (\"\" . \"/usr/local/emacs/src/\")\n	 ))\n\nThis means that anything in the /usr/src/public/perl/ directory should use\nthe TAGS file /usr/src/public/perl/perl-3.0/TAGS; and file ending in .el should\nuse the TAGS file /usr/local/emacs/src/TAGS; and anything in or below the\ndirectory /jbw/gnu/ should use the TAGS file /usr15/degree/stud/jbw/gnu/TAGS.\nA file called something like \"/usr/jbw/foo.el\" would use both the TAGS files\n/usr/local/emacs/src/TAGS and /usr15/degree/stud/jbw/gnu/TAGS (in that order)\nbecause it matches both patterns.\n\nIf the buffer-local variable `buffer-tag-table' is set, then it names a tags\ntable that is searched before all others when find-tag is executed from this\nbuffer.\n\nIf there is a file called \"TAGS\" in the same directory as the file in \nquestion, then that tags file will always be used as well (after the\n`buffer-tag-table' but before the tables specified by this list.)\n\nIf the variable tags-file-name is set, then the tags file it names will apply\nto all buffers (for backwards compatibility.)  It is searched first.\n" :type '(repeat (cons regexp sexp)) :group 'etags)
-
-(autoload 'visit-tags-table "etags" "\
-Tell tags commands to use tags table file FILE first.
-FILE should be the name of a file created with the `etags' program.
-A directory name is ok too; it means file TAGS in that directory." t nil)
-
-(autoload 'find-tag "etags" "\
-*Find tag whose name contains TAGNAME.
- Selects the buffer that the tag is contained in
-and puts point at its definition.
- If TAGNAME is a null string, the expression in the buffer
-around or before point is used as the tag name.
- If called interactively with a numeric argument, searches for the next tag
-in the tag table that matches the tagname used in the previous find-tag.
- If second arg OTHER-WINDOW is non-nil, uses another window to display
-the tag.
-
-This version of this function supports multiple active tags tables,
-and completion.
-
-Variables of note:
-
-  tag-table-alist		controls which tables apply to which buffers
-  tags-file-name		a default tags table
-  tags-build-completion-table   controls completion behavior
-  buffer-tag-table		another way of specifying a buffer-local table
-  make-tags-files-invisible	whether tags tables should be very hidden
-  tag-mark-stack-max		how many tags-based hops to remember" t nil)
-
-(autoload 'find-tag-other-window "etags" "\
-*Find tag whose name contains TAGNAME.
- Selects the buffer that the tag is contained in in another window
-and puts point at its definition.
- If TAGNAME is a null string, the expression in the buffer
-around or before point is used as the tag name.
- If second arg NEXT is non-nil (interactively, with prefix arg),
-searches for the next tag in the tag table
-that matches the tagname used in the previous find-tag.
-
-This version of this function supports multiple active tags tables,
-and completion.
-
-Variables of note:
-
-  tag-table-alist		controls which tables apply to which buffers
-  tags-file-name		a default tags table
-  tags-build-completion-table   controls completion behavior
-  buffer-tag-table		another way of specifying a buffer-local table
-  make-tags-files-invisible	whether tags tables should be very hidden
-  tag-mark-stack-max		how many tags-based hops to remember" t nil)
-
-(autoload 'next-file "etags" "\
-Select next file among files in current tag table(s).
-
-A first argument of t (prefix arg, if interactive) initializes to the
-beginning of the list of files in the (first) tags table.  If the argument
-is neither nil nor t, it is evalled to initialize the list of files.
-
-Non-nil second argument NOVISIT means use a temporary buffer
-to save time and avoid uninteresting warnings.
-
-Value is nil if the file was already visited;
-if the file was newly read in, the value is the filename." t nil)
-
-(autoload 'tags-loop-continue "etags" "\
-Continue last \\[tags-search] or \\[tags-query-replace] command.
-Used noninteractively with non-nil argument to begin such a command (the
-argument is passed to `next-file', which see).
-Two variables control the processing we do on each file:
-the value of `tags-loop-scan' is a form to be executed on each file
-to see if it is interesting (it returns non-nil if so)
-and `tags-loop-operate' is a form to execute to operate on an interesting file
-If the latter returns non-nil, we exit; otherwise we scan the next file." t nil)
-
-(autoload 'tags-search "etags" "\
-Search through all files listed in tags table for match for REGEXP.
-Stops when a match is found.
-To continue searching for next match, use command \\[tags-loop-continue].
-
-See documentation of variable `tag-table-alist'." t nil)
-
-(autoload 'tags-query-replace "etags" "\
-Query-replace-regexp FROM with TO through all files listed in tags table.
-Third arg DELIMITED (prefix arg) means replace only word-delimited matches.
-If you exit (\\[keyboard-quit] or ESC), you can resume the query-replace
-with the command \\[tags-loop-continue].
-
-See documentation of variable `tag-table-alist'." t nil)
-
-(autoload 'list-tags "etags" "\
-Display list of tags in file FILE.
-FILE should not contain a directory spec
-unless it has one in the tag table." t nil)
-
-(autoload 'tags-apropos "etags" "\
-Display list of all tags in tag table REGEXP matches." t nil)
-
-;;;***
-
-;;;### (autoloads (turn-on-fast-lock fast-lock-mode) "fast-lock" "packages/fast-lock.el")
-
-(autoload 'fast-lock-mode "fast-lock" "\
-Toggle Fast Lock mode.
-With arg, turn Fast Lock mode on if and only if arg is positive and the buffer
-is associated with a file.  Enable it automatically in your `~/.emacs' by:
-
- (setq font-lock-support-mode 'fast-lock-mode)
-
-If Fast Lock mode is enabled, and the current buffer does not contain any text
-properties, any associated Font Lock cache is used if its timestamp matches the
-buffer's file, and its `font-lock-keywords' match those that you are using.
-
-Font Lock caches may be saved:
-- When you save the file's buffer.
-- When you kill an unmodified file's buffer.
-- When you exit Emacs, for all unmodified or saved buffers.
-Depending on the value of `fast-lock-save-events'.
-See also the commands `fast-lock-read-cache' and `fast-lock-save-cache'.
-
-Use \\[font-lock-fontify-buffer] to fontify the buffer if the cache is bad.
-
-Various methods of control are provided for the Font Lock cache.  In general,
-see variable `fast-lock-cache-directories' and function `fast-lock-cache-name'.
-For saving, see variables `fast-lock-minimum-size', `fast-lock-save-events',
-`fast-lock-save-others' and `fast-lock-save-faces'." t nil)
-
-(autoload 'turn-on-fast-lock "fast-lock" "\
-Unconditionally turn on Fast Lock mode." nil nil)
-
-(when (fboundp 'add-minor-mode) (defvar fast-lock-mode nil) (add-minor-mode 'fast-lock-mode nil))
-
-;;;***
-
-;;;### (autoloads (feedmail-send-it) "feedmail" "packages/feedmail.el")
-
-(autoload 'feedmail-send-it "feedmail" nil nil nil)
-
-;;;***
-
-;;;### (autoloads (make-file-part) "file-part" "packages/file-part.el")
-
-(autoload 'make-file-part "file-part" "\
-Make a file part on buffer BUFFER out of the region.  Call it NAME.
-This command creates a new buffer containing the contents of the
-region and marks the buffer as referring to the specified buffer,
-called the `master buffer'.  When the file-part buffer is saved,
-its changes are integrated back into the master buffer.  When the
-master buffer is deleted, all file parts are deleted with it.
-
-When called from a function, expects four arguments, START, END,
-NAME, and BUFFER, all of which are optional and default to the
-beginning of BUFFER, the end of BUFFER, a name generated from
-BUFFER's name, and the current buffer, respectively." t nil)
-
-;;;***
-
-;;;### (autoloads (font-lock-set-defaults-1 font-lock-fontify-buffer turn-off-font-lock turn-on-font-lock font-lock-mode) "font-lock" "packages/font-lock.el")
-
-(defvar font-lock-auto-fontify t "\
-*Whether font-lock should automatically fontify files as they're loaded.
-This will only happen if font-lock has fontifying keywords for the major
-mode of the file.  You can get finer-grained control over auto-fontification
-by using this variable in combination with `font-lock-mode-enable-list' or
-`font-lock-mode-disable-list'.")
-
-(defvar font-lock-mode-enable-list nil "\
-*List of modes to auto-fontify, if `font-lock-auto-fontify' is nil.")
-
-(defvar font-lock-mode-disable-list nil "\
-*List of modes not to auto-fontify, if `font-lock-auto-fontify' is t.")
-
-(defvar font-lock-use-colors '(color) "\
-*Specification for when Font Lock will set up color defaults.
-Normally this should be '(color), meaning that Font Lock will set up
-color defaults that are only used on color displays.  Set this to nil
-if you don't want Font Lock to set up color defaults at all.  This
-should be one of
-
--- a list of valid tags, meaning that the color defaults will be used
-   when all of the tags apply. (e.g. '(color x))
--- a list whose first element is 'or and whose remaining elements are
-   lists of valid tags, meaning that the defaults will be used when
-   any of the tag lists apply.
--- nil, meaning that the defaults should not be set up at all.
-
-\(If you specify face values in your init file, they will override any
-that Font Lock specifies, regardless of whether you specify the face
-values before or after loading Font Lock.)
-
-See also `font-lock-use-fonts'.  If you want more control over the faces
-used for fontification, see the documentation of `font-lock-mode' for
-how to do it.")
-
-(defvar font-lock-use-fonts '(or (mono) (grayscale)) "\
-*Specification for when Font Lock will set up non-color defaults.
-
-Normally this should be '(or (mono) (grayscale)), meaning that Font
-Lock will set up non-color defaults that are only used on either mono
-or grayscale displays.  Set this to nil if you don't want Font Lock to
-set up non-color defaults at all.  This should be one of
-
--- a list of valid tags, meaning that the non-color defaults will be used
-   when all of the tags apply. (e.g. '(grayscale x))
--- a list whose first element is 'or and whose remaining elements are
-   lists of valid tags, meaning that the defaults will be used when
-   any of the tag lists apply.
--- nil, meaning that the defaults should not be set up at all.
-
-\(If you specify face values in your init file, they will override any
-that Font Lock specifies, regardless of whether you specify the face
-values before or after loading Font Lock.)
-
-See also `font-lock-use-colors'.  If you want more control over the faces
-used for fontification, see the documentation of `font-lock-mode' for
-how to do it.")
-
-(defvar font-lock-maximum-decoration nil "\
-*If non-nil, the maximum decoration level for fontifying.
-If nil, use the minimum decoration (equivalent to level 0).
-If t, use the maximum decoration available.
-If a number, use that level of decoration (or if not available the maximum).
-If a list, each element should be a cons pair of the form (MAJOR-MODE . LEVEL),
-where MAJOR-MODE is a symbol or t (meaning the default).  For example:
- ((c++-mode . 2) (c-mode . t) (t . 1))
-means use level 2 decoration for buffers in `c++-mode', the maximum decoration
-available for buffers in `c-mode', and level 1 decoration otherwise.")
-
-(define-obsolete-variable-alias 'font-lock-use-maximal-decoration 'font-lock-maximum-decoration)
-
-(defvar font-lock-maximum-size (* 250 1024) "\
-*If non-nil, the maximum size for buffers for fontifying.
-Only buffers less than this can be fontified when Font Lock mode is turned on.
-If nil, means size is irrelevant.
-If a list, each element should be a cons pair of the form (MAJOR-MODE . SIZE),
-where MAJOR-MODE is a symbol or t (meaning the default).  For example:
- ((c++-mode . 256000) (c-mode . 256000) (rmail-mode . 1048576))
-means that the maximum size is 250K for buffers in `c++-mode' or `c-mode', one
-megabyte for buffers in `rmail-mode', and size is irrelevant otherwise.")
-
-(defvar font-lock-keywords nil "\
-*A list of the keywords to highlight.
-Each element should be of the form:
-
- MATCHER
- (MATCHER . MATCH)
- (MATCHER . FACENAME)
- (MATCHER . HIGHLIGHT)
- (MATCHER HIGHLIGHT ...)
- (eval . FORM)
-
-where HIGHLIGHT should be either MATCH-HIGHLIGHT or MATCH-ANCHORED.
-
-FORM is an expression, whose value should be a keyword element,
-evaluated when the keyword is (first) used in a buffer.  This feature
-can be used to provide a keyword that can only be generated when Font
-Lock mode is actually turned on.
-
-For highlighting single items, typically only MATCH-HIGHLIGHT is required.
-However, if an item or (typically) items is to be highlighted following the
-instance of another item (the anchor) then MATCH-ANCHORED may be required.
-
-MATCH-HIGHLIGHT should be of the form:
-
- (MATCH FACENAME OVERRIDE LAXMATCH)
-
-Where MATCHER can be either the regexp to search for, a variable
-containing the regexp to search for, or the function to call to make
-the search (called with one argument, the limit of the search).  MATCH
-is the subexpression of MATCHER to be highlighted.  FACENAME is either
-a symbol naming a face, or an expression whose value is the face name
-to use.  If you want FACENAME to be a symbol that evaluates to a face,
-use a form like \"(progn sym)\".
-
-OVERRIDE and LAXMATCH are flags.  If OVERRIDE is t, existing fontification may
-be overwritten.  If `keep', only parts not already fontified are highlighted.
-If `prepend' or `append', existing fontification is merged with the new, in
-which the new or existing fontification, respectively, takes precedence.
-If LAXMATCH is non-nil, no error is signalled if there is no MATCH in MATCHER.
-
-For example, an element of the form highlights (if not already highlighted):
-
- \"\\\\\\=<foo\\\\\\=>\"		Discrete occurrences of \"foo\" in the value of the
-			variable `font-lock-keyword-face'.
- (\"fu\\\\(bar\\\\)\" . 1)	Substring \"bar\" within all occurrences of \"fubar\" in
-			the value of `font-lock-keyword-face'.
- (\"fubar\" . fubar-face)	Occurrences of \"fubar\" in the value of `fubar-face'.
- (\"foo\\\\|bar\" 0 foo-bar-face t)
-			Occurrences of either \"foo\" or \"bar\" in the value
-			of `foo-bar-face', even if already highlighted.
-
-MATCH-ANCHORED should be of the form:
-
- (MATCHER PRE-MATCH-FORM POST-MATCH-FORM MATCH-HIGHLIGHT ...)
-
-Where MATCHER is as for MATCH-HIGHLIGHT with one exception.  The limit of the
-search is currently guaranteed to be (no greater than) the end of the line.
-PRE-MATCH-FORM and POST-MATCH-FORM are evaluated before the first, and after
-the last, instance MATCH-ANCHORED's MATCHER is used.  Therefore they can be
-used to initialise before, and cleanup after, MATCHER is used.  Typically,
-PRE-MATCH-FORM is used to move to some position relative to the original
-MATCHER, before starting with MATCH-ANCHORED's MATCHER.  POST-MATCH-FORM might
-be used to move, before resuming with MATCH-ANCHORED's parent's MATCHER.
-
-For example, an element of the form highlights (if not already highlighted):
-
- (\"\\\\\\=<anchor\\\\\\=>\" (0 anchor-face) (\"\\\\\\=<item\\\\\\=>\" nil nil (0 item-face)))
-
- Discrete occurrences of \"anchor\" in the value of `anchor-face', and subsequent
- discrete occurrences of \"item\" (on the same line) in the value of `item-face'.
- (Here PRE-MATCH-FORM and POST-MATCH-FORM are nil.  Therefore \"item\" is
- initially searched for starting from the end of the match of \"anchor\", and
- searching for subsequent instance of \"anchor\" resumes from where searching
- for \"item\" concluded.)
-
-Note that the MATCH-ANCHORED feature is experimental; in the future, we may
-replace it with other ways of providing this functionality.
-
-These regular expressions should not match text which spans lines.  While
-\\[font-lock-fontify-buffer] handles multi-line patterns correctly, updating
-when you edit the buffer does not, since it considers text one line at a time.
-
-Be very careful composing regexps for this list;
-the wrong pattern can dramatically slow things down!")
-
-(make-variable-buffer-local 'font-lock-keywords)
-
-(defvar font-lock-mode nil)
-
-(defvar font-lock-mode-hook nil "\
-Function or functions to run on entry to font-lock-mode.")
-
-(autoload 'font-lock-mode "font-lock" "\
-Toggle Font Lock Mode.
-With arg, turn font-lock mode on if and only if arg is positive.
-
-When Font Lock mode is enabled, text is fontified as you type it:
-
- - Comments are displayed in `font-lock-comment-face';
- - Strings are displayed in `font-lock-string-face';
- - Documentation strings (in Lisp-like languages) are displayed in
-   `font-lock-doc-string-face';
- - Language keywords (\"reserved words\") are displayed in
-   `font-lock-keyword-face';
- - Function names in their defining form are displayed in
-   `font-lock-function-name-face';
- - Variable names in their defining form are displayed in
-   `font-lock-variable-name-face';
- - Type names are displayed in `font-lock-type-face';
- - References appearing in help files and the like are displayed
-   in `font-lock-reference-face';
- - Preprocessor declarations are displayed in
-  `font-lock-preprocessor-face';
-
-   and
-
- - Certain other expressions are displayed in other faces according
-   to the value of the variable `font-lock-keywords'.
-
-Where modes support different levels of fontification, you can use the variable
-`font-lock-maximum-decoration' to specify which level you generally prefer.
-When you turn Font Lock mode on/off the buffer is fontified/defontified, though
-fontification occurs only if the buffer is less than `font-lock-maximum-size'.
-To fontify a buffer without turning on Font Lock mode, and regardless of buffer
-size, you can use \\[font-lock-fontify-buffer].
-
-See the variable `font-lock-keywords' for customization." t nil)
-
-(autoload 'turn-on-font-lock "font-lock" "\
-Unconditionally turn on Font Lock mode." nil nil)
-
-(autoload 'turn-off-font-lock "font-lock" "\
-Unconditionally turn off Font Lock mode." nil nil)
-
-(autoload 'font-lock-fontify-buffer "font-lock" "\
-Fontify the current buffer the way `font-lock-mode' would.
-See `font-lock-mode' for details.
-
-This can take a while for large buffers." t nil)
-
-(autoload 'font-lock-set-defaults-1 "font-lock" nil nil nil)
-
-(add-minor-mode 'font-lock-mode " Font")
-
-;;;***
-
-;;;### (autoloads (sc-mode) "generic-sc" "packages/generic-sc.el")
-
-(autoload 'sc-mode "generic-sc" "\
-Toggle sc-mode.
-SYSTEM can be sccs, rcs or cvs.
-Cvs requires the pcl-cvs package.
-
-The following commands are available
-\\[sc-next-operation]	perform next logical source control operation on current file
-\\[sc-show-changes]	compare the version being edited with an older one
-\\[sc-version-diff-file]	compare two older versions of a file
-\\[sc-show-history]		display change history of current file
-\\[sc-visit-previous-revision]	display an older revision of current file
-\\[sc-revert-file]		revert buffer to last checked-in version
-\\[sc-list-all-locked-files]		show all files locked in current directory
-\\[sc-list-locked-files]		show all files locked by you in current directory
-\\[sc-list-registered-files]		show all files under source control in current directory
-\\[sc-update-directory]		get fresh copies of files checked-in by others in current directory
-\\[sc-rename-file]		rename the current file and its source control file
-
-
-While you are entering a change log message for a check in, sc-log-entry-mode
-will be in effect.
-
-Global user options:
-    sc-diff-command	A list consisting of the command and flags
-			to be used for generating context diffs.
-    sc-mode-expert	suppresses some conformation prompts,
-			notably for delta aborts and file saves.
-    sc-max-log-size	specifies the maximum allowable size
-			of a log message plus one.
-
-
-When using SCCS you have additional commands and options
-
-\\[sccs-insert-headers]		insert source control headers in current file
-
-When you generate headers into a buffer using \\[sccs-insert-headers],
-the value of sc-insert-headers-hook is called before insertion. If the
-file is recognized a C or Lisp source, sc-insert-c-header-hook or
-sc-insert-lisp-header-hook is called after insertion respectively.
-
-    sccs-headers-wanted	which %-keywords to insert when adding
-			headers with C-c h
-    sccs-insert-static	if non-nil, keywords inserted in C files
-			get stuffed in a static string area so that
-			what(1) can see them in the compiled object code.
-
-When using CVS you have additional commands
-
-\\[sc-cvs-update-directory]	update the current directory using pcl-cvs
-\\[sc-cvs-file-status]		show the CVS status of current file
-" t nil)
-
-;;;***
-
-;;;### (autoloads (gnuserv-start gnuserv-running-p) "gnuserv" "packages/gnuserv.el")
-
-(defcustom gnuserv-frame nil "*The frame to be used to display all edited files.\nIf nil, then a new frame is created for each file edited.\nIf t, then the currently selected frame will be used.\nIf a function, then this will be called with a symbol `x' or `tty' as the\nonly argument, and its return value will be interpreted as above." :tag "Gnuserv Frame" :type '(radio (const :tag "Create new frame each time" nil) (const :tag "Use selected frame" t) (function-item :tag "Use main Emacs frame" gnuserv-main-frame-function) (function-item :tag "Use visible frame, otherwise create new" gnuserv-visible-frame-function) (function-item :tag "Create special Gnuserv frame and use it" gnuserv-special-frame-function) (function :tag "Other")) :group 'gnuserv)
-
-(autoload 'gnuserv-running-p "gnuserv" "\
-Return non-nil if a gnuserv process is running from this XEmacs session." nil nil)
-
-(autoload 'gnuserv-start "gnuserv" "\
-Allow this Emacs process to be a server for client processes.
-This starts a gnuserv communications subprocess through which
-client \"editors\" (gnuclient and gnudoit) can send editing commands to 
-this Emacs job.  See the gnuserv(1) manual page for more details.
-
-Prefix arg means just kill any existing server communications subprocess." t nil)
-
-;;;***
-
-;;;### (autoloads (gopher-atpoint gopher) "gopher" "packages/gopher.el")
-
-(autoload 'gopher "gopher" "\
-Start a gopher session.  With C-u, prompt for a gopher server." t nil)
-
-(autoload 'gopher-atpoint "gopher" "\
-Try to interpret the text around point as a gopher bookmark, and dispatch
-to that object." t nil)
-
-;;;***
-
-;;;### (autoloads (hexlify-buffer hexl-find-file hexl-mode) "hexl" "packages/hexl.el")
-
-(autoload 'hexl-mode "hexl" "\
-\\<hexl-mode-map>
-A major mode for editing binary files in hex dump format.
-
-This function automatically converts a buffer into the hexl format
-using the function `hexlify-buffer'.
-
-Each line in the buffer has an \"address\" (displayed in hexadecimal)
-representing the offset into the file that the characters on this line
-are at and 16 characters from the file (displayed as hexadecimal
-values grouped every 16 bits) and as their ASCII values.
-
-If any of the characters (displayed as ASCII characters) are
-unprintable (control or meta characters) they will be replaced as
-periods.
-
-If `hexl-mode' is invoked with an argument the buffer is assumed to be
-in hexl format.
-
-A sample format:
-
-  HEX ADDR: 0001 0203 0405 0607 0809 0a0b 0c0d 0e0f     ASCII-TEXT
-  --------  ---- ---- ---- ---- ---- ---- ---- ----  ----------------
-  00000000: 5468 6973 2069 7320 6865 786c 2d6d 6f64  This is hexl-mod
-  00000010: 652e 2020 4561 6368 206c 696e 6520 7265  e.  Each line re
-  00000020: 7072 6573 656e 7473 2031 3620 6279 7465  presents 16 byte
-  00000030: 7320 6173 2068 6578 6164 6563 696d 616c  s as hexadecimal
-  00000040: 2041 5343 4949 0a61 6e64 2070 7269 6e74   ASCII.and print
-  00000050: 6162 6c65 2041 5343 4949 2063 6861 7261  able ASCII chara
-  00000060: 6374 6572 732e 2020 416e 7920 636f 6e74  cters.  Any cont
-  00000070: 726f 6c20 6f72 206e 6f6e 2d41 5343 4949  rol or non-ASCII
-  00000080: 2063 6861 7261 6374 6572 730a 6172 6520   characters.are 
-  00000090: 6469 7370 6c61 7965 6420 6173 2070 6572  displayed as per
-  000000a0: 696f 6473 2069 6e20 7468 6520 7072 696e  iods in the prin
-  000000b0: 7461 626c 6520 6368 6172 6163 7465 7220  table character 
-  000000c0: 7265 6769 6f6e 2e0a                      region..
-
-Movement is as simple as movement in a normal emacs text buffer.  Most
-cursor movement bindings are the same (ie. Use \\[hexl-backward-char], \\[hexl-forward-char], \\[hexl-next-line], and \\[hexl-previous-line]
-to move the cursor left, right, down, and up).
-
-Advanced cursor movement commands (ala \\[hexl-beginning-of-line], \\[hexl-end-of-line], \\[hexl-beginning-of-buffer], and \\[hexl-end-of-buffer]) are
-also supported.
-
-There are several ways to change text in hexl mode:
-
-ASCII characters (character between space (0x20) and tilde (0x7E)) are
-bound to self-insert so you can simply type the character and it will
-insert itself (actually overstrike) into the buffer.
-
-\\[hexl-quoted-insert] followed by another keystroke allows you to insert the key even if
-it isn't bound to self-insert.  An octal number can be supplied in place
-of another key to insert the octal number's ASCII representation.
-
-\\[hexl-insert-hex-char] will insert a given hexadecimal value (if it is between 0 and 0xFF)
-into the buffer at the current point.
-
-\\[hexl-insert-octal-char] will insert a given octal value (if it is between 0 and 0377)
-into the buffer at the current point.
-
-\\[hexl-insert-decimal-char] will insert a given decimal value (if it is between 0 and 255)
-into the buffer at the current point.
-
-\\[hexl-mode-exit] will exit hexl-mode.
-
-Note: saving the file with any of the usual Emacs commands
-will actually convert it back to binary format while saving.
-
-You can use \\[hexl-find-file] to visit a file in hexl-mode.
-
-\\[describe-bindings] for advanced commands." t nil)
-
-(autoload 'hexl-find-file "hexl" "\
-Edit file FILENAME in hexl-mode.
-Switch to a buffer visiting file FILENAME, creating one in none exists." t nil)
-
-(autoload 'hexlify-buffer "hexl" "\
-Convert a binary buffer to hexl format.
-This discards the buffer's undo information." t nil)
-
-;;;***
-
-;;;### (autoloads (hypropos-popup-menu hypropos-set-variable hyper-set-variable hypropos-get-doc hypropos-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")
-
-(defcustom hypropos-show-brief-docs t "*If non-nil, `hyper-apropos' will display some documentation in the\n\"*Hyper Apropos*\" buffer.  Setting this to nil will speed up searches." :type 'boolean :group 'hyper-apropos)
-
-(autoload 'hyper-apropos "hyper-apropos" "\
-Display lists of functions and variables matching REGEXP
-in buffer \"*Hyper Apropos*\".  If optional prefix arg is given, then the value
-of `hypropos-programming-apropos' is toggled for this search.
-See also `hyper-apropos-mode'." t nil)
-
-(autoload 'hyper-describe-key "hyper-apropos" nil t nil)
-
-(autoload 'hyper-describe-key-briefly "hyper-apropos" nil t nil)
-
-(autoload 'hyper-describe-face "hyper-apropos" "\
-Describe face..
-See also `hyper-apropos' and `hyper-describe-function'." t nil)
-
-(autoload 'hyper-describe-variable "hyper-apropos" "\
-Hypertext drop-in replacement for `describe-variable'.
-See also `hyper-apropos' and `hyper-describe-function'." t nil)
-
-(autoload 'hyper-describe-function "hyper-apropos" "\
-Hypertext replacement for `describe-function'.  Unlike `describe-function'
-in that the symbol under the cursor is the default if it is a function.
-See also `hyper-apropos' and `hyper-describe-variable'." t nil)
-
-(autoload 'hypropos-read-variable-symbol "hyper-apropos" "\
-Hypertext drop-in replacement for `describe-variable'.
-See also `hyper-apropos' and `hyper-describe-function'." nil nil)
-
-(autoload 'hypropos-get-doc "hyper-apropos" "\
-Toggle display of documentation for the symbol on the current line." t nil)
-
-(autoload 'hyper-set-variable "hyper-apropos" nil t nil)
-
-(autoload 'hypropos-set-variable "hyper-apropos" "\
-Interactively set the variable on the current line." t nil)
-
-(autoload 'hypropos-popup-menu "hyper-apropos" nil t nil)
-
-;;;***
-
-;;;### (autoloads (icomplete-minibuffer-setup icomplete-mode) "icomplete" "packages/icomplete.el")
-
-(autoload 'icomplete-mode "icomplete" "\
-Activate incremental minibuffer completion for this emacs session.
-Deactivates with negative universal argument." t nil)
-
-(autoload 'icomplete-minibuffer-setup "icomplete" "\
-Run in minibuffer on activation to establish incremental completion.
-Usually run by inclusion in `minibuffer-setup-hook'." nil nil)
-
-;;;***
-
-;;;### (autoloads (dired-do-igrep-find dired-do-igrep igrep-find-define igrep-find igrep-define igrep) "igrep" "packages/igrep.el")
-
-(autoload 'igrep "igrep" "\
-*Run `grep` PROGRAM to match EXPRESSION in FILES.
-The output is displayed in the *igrep* buffer, which \\[next-error] and
-\\[compile-goto-error] parse to find each line of matched text.
-
-PROGRAM may be nil, in which case it defaults to `igrep-program'.
-
-EXPRESSION is automatically delimited by `igrep-expression-quote-char'.
-
-FILES is either a file name pattern (expanded by the shell named by
-`shell-file-name') or a list of file name patterns.
-
-Optional OPTIONS is also passed to PROGRAM; it defaults to `igrep-options'.
-
-If a prefix argument (\\[universal-argument]) is given when called interactively,
-or if `igrep-read-options' is set, OPTIONS is read from the minibuffer.
-
-If two prefix arguments (\\[universal-argument] \\[universal-argument]) are given when called interactively,
-or if `igrep-read-multiple-files' is set, FILES is read from the minibuffer
-multiple times.
-
-If three prefix arguments (\\[universal-argument] \\[universal-argument] \\[universal-argument]) are given when called interactively,
-or if `igrep-read-options' and `igrep-read-multiple-files' are set,
-OPTIONS is read and FILES is read multiple times.
-
-If `igrep-find' is non-nil, the directory or directories
-containing FILES is recursively searched for files whose name matches
-the file name component of FILES (and whose contents match
-EXPRESSION)." t nil)
-
-(autoload 'igrep-define "igrep" "\
-Define ANALOGUE-COMMAND as an `igrep' analogue command.
-Optional (VARIABLE VALUE) arguments specify temporary bindings for the command." nil 'macro)
-
-(autoload 'igrep-find "igrep" "\
-*Run `grep` via `find`; see \\[igrep] and `igrep-find'.
-All arguments (including prefix arguments, when called interactively)
-are handled by `igrep'." t nil)
-
-(autoload 'igrep-find-define "igrep" "\
-Define ANALOGUE-COMMAND-find as an `igrep' analogue `find` command.
-Optional (VARIABLE VALUE) arguments specify temporary bindings for the command." nil 'macro)
-
-(autoload 'dired-do-igrep "igrep" "\
-*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")
-
-(autoload 'info "info" "\
-Enter Info, the documentation browser.
-Optional argument FILE specifies the file to examine;
-the default is the top-level directory of Info.
-
-In interactive use, a prefix argument directs this command
-to read a file name from the minibuffer." t nil)
-
-(autoload 'Info-query "info" "\
-Enter Info, the documentation browser.  Prompt for name of Info file." t nil)
-
-(autoload 'Info-goto-node "info" "\
-Go to info node named NAME.  Give just NODENAME or (FILENAME)NODENAME.
-Actually, the following interpretations of NAME are tried in order:
-    (FILENAME)NODENAME
-    (FILENAME)     (using Top node)
-    NODENAME       (in current file)
-    TAGNAME        (see below)
-    FILENAME       (using Top node)
-where TAGNAME is a string that appears in quotes: \"TAGNAME\", in an
-annotation for any node of any file.  (See `a' and `x' commands.)" t nil)
-
-(autoload 'Info-visit-file "info" "\
-Directly visit an info file." t nil)
-
-(autoload 'Info-search "info" "\
-Search for REGEXP, starting from point, and select node it's found in." t nil)
-
-(autoload 'Info-emacs-command "info" "\
-Look up an Emacs command in the Emacs manual in the Info system.
-This command is designed to be used whether you are already in Info or not." t nil)
-
-(autoload 'Info-goto-emacs-command-node "info" "\
-Look up an Emacs command in the Emacs manual in the Info system.
-This command is designed to be used whether you are already in Info or not." t nil)
-
-(autoload 'Info-goto-emacs-key-command-node "info" "\
-Look up an Emacs key sequence in the Emacs manual in the Info system.
-This command is designed to be used whether you are already in Info or not." t nil)
-
-(autoload 'Info-emacs-key "info" "\
-Look up an Emacs key sequence in the Emacs manual in the Info system.
-This command is designed to be used whether you are already in Info or not." t nil)
-
-(autoload 'Info-elisp-ref "info" "\
-Look up an Emacs Lisp function in the Elisp manual in the Info system.
-This command is designed to be used whether you are already in Info or not." t nil)
-
-;;;***
-
-;;;### (autoloads (batch-info-validate Info-validate Info-split Info-tagify) "informat" "packages/informat.el")
-
-(autoload 'Info-tagify "informat" "\
-Create or update Info-file tag table in current buffer." t nil)
-
-(autoload 'Info-split "informat" "\
-Split an info file into an indirect file plus bounded-size subfiles.
-Each subfile will be up to 50,000 characters plus one node.
-
-To use this command, first visit a large Info file that has a tag
-table.  The buffer is modified into a (small) indirect info file which
-should be saved in place of the original visited file.
-
-The subfiles are written in the same directory the original file is
-in, with names generated by appending `-' and a number to the original
-file name.  The indirect file still functions as an Info file, but it
-contains just the tag table and a directory of subfiles." t nil)
-
-(autoload 'Info-validate "informat" "\
-Check current buffer for validity as an Info file.
-Check that every node pointer points to an existing node." t nil)
-
-(autoload 'batch-info-validate "informat" "\
-Runs `Info-validate' on the files remaining on the command line.
-Must be used only with -batch, and kills Emacs on completion.
-Each file will be processed even if an error occurred previously.
-For example, invoke \"emacs -batch -f batch-info-validate $info/ ~/*.info\"" nil nil)
-
-;;;***
-
-;;;### (autoloads (ispell-message ispell-minor-mode ispell-complete-word-interior-frag ispell-complete-word ispell-continue ispell-buffer ispell-region ispell-change-dictionary ispell-kill-ispell ispell-help ispell-word) "ispell" "packages/ispell.el")
-
-(defcustom ispell-personal-dictionary nil "*File name of your personal spelling dictionary, or nil.\nIf nil, the default personal dictionary, \"~/.ispell_DICTNAME\" is used,\nwhere DICTNAME is the name of your default dictionary." :type 'file :group 'ispell)
-
-(defvar ispell-dictionary-alist-1 '((nil "[A-Za-z]" "[^A-Za-z]" "[']" nil ("-B") nil) ("english" "[A-Za-z]" "[^A-Za-z]" "[']" nil ("-B") nil) ("british" "[A-Za-z]" "[^A-Za-z]" "[']" nil ("-B" "-d" "british") nil) ("deutsch" "[a-zA-Z\"]" "[^a-zA-Z\"]" "[']" t ("-C") "~tex") ("deutsch8" "[a-zA-Z�������]" "[^a-zA-Z�������]" "[']" t ("-C" "-d" "deutsch") "~latin1") ("nederlands" "[A-Za-z�-���-��-��-��-���-���-��-�]" "[^A-Za-z�-���-��-��-��-���-���-��-�]" "[']" t ("-C") nil) ("nederlands8" "[A-Za-z�-���-��-��-��-���-���-��-�]" "[^A-Za-z�-���-��-��-��-���-���-��-�]" "[']" t ("-C") nil)))
-
-(defvar ispell-dictionary-alist-2 '(("svenska" "[A-Za-z}{|\\133\\135\\\\]" "[^A-Za-z}{|\\133\\135\\\\]" "[']" nil ("-C") nil) ("svenska8" "[A-Za-z������]" "[^A-Za-z������]" "[']" nil ("-C" "-d" "svenska") "~list") ("norsk" "[A-Za-z��������]" "[^A-Za-z��������]" "[']" nil ("-C" "-d" "norsk") "~list") ("francais7" "[A-Za-z]" "[^A-Za-z]" "[`'^---]" t nil nil) ("francais" "[A-Za-z���������������������������]" "[^A-Za-z���������������������������]" "[---']" t nil "~list") ("francais-tex" "[A-Za-z���������������������������\\]" "[^A-Za-z���������������������������\\]" "[---'^`\"]" t nil "~tex") ("italiano" "[A-Za-z������������������]" "[^A-Za-z������������������]" "[']" t ("-d" "italiano") "~list") ("dansk" "[A-Z���a-z���]" "[^A-Z���a-z���]" "" nil ("-C") nil)))
-
-(defvar ispell-dictionary-alist (append ispell-dictionary-alist-1 ispell-dictionary-alist-2) "\
-An alist of dictionaries and their associated parameters.
-
-Each element of this list is also a list:
-
-\(DICTIONARY-NAME CASECHARS NOT-CASECHARS OTHERCHARS MANY-OTHERCHARS-P
-        ISPELL-ARGS EXTENDED-CHARACTER-MODE)
-
-DICTIONARY-NAME is a possible value of variable `ispell-dictionary', nil
-means the default dictionary.
-
-CASECHARS is a regular expression of valid characters that comprise a
-word.
-
-NOT-CASECHARS is the opposite regexp of CASECHARS.
-
-OTHERCHARS is a regular expression of other characters that are valid
-in word constructs.  Otherchars cannot be adjacent to each other in a
-word, nor can they begin or end a word.  This implies we can't check
-\"Stevens'\" as a correct possessive and other correct formations.
-
-Hint: regexp syntax requires the hyphen to be declared first here.
-
-MANY-OTHERCHARS-P is non-nil if many otherchars are to be allowed in a
-word instead of only one.
-
-ISPELL-ARGS is a list of additional arguments passed to the ispell
-subprocess.
-
-EXTENDED-CHARACTER-MODE should be used when dictionaries are used which
-have been configured in an Ispell affix file.  (For example, umlauts
-can be encoded as \\\"a, a\\\", \"a, ...)  Defaults are ~tex and ~nroff
-in English.  This has the same effect as the command-line `-T' option.
-The buffer Major Mode controls Ispell's parsing in tex or nroff mode,
-but the dictionary can control the extended character mode.
-Both defaults can be overruled in a buffer-local fashion. See
-`ispell-parsing-keyword' for details on this.
-
-Note that the CASECHARS and OTHERCHARS slots of the alist should
-contain the same character set as casechars and otherchars in the
-language.aff file (e.g., english.aff).")
-
-(defvar ispell-menu-map nil "\
-Key map for ispell menu")
-
-(defvar ispell-menu-xemacs nil "\
-Spelling menu for XEmacs.")
-
-(defconst ispell-menu-map-needed (and (not ispell-menu-map) (string-lessp "19" emacs-version) (not (string-match "XEmacs" emacs-version))))
-
-(if ispell-menu-map-needed (let ((dicts (reverse (cons (cons "default" nil) ispell-dictionary-alist))) name) (setq ispell-menu-map (make-sparse-keymap "Spell")) (while dicts (setq name (car (car dicts)) dicts (cdr dicts)) (if (stringp name) (define-key ispell-menu-map (vector (intern name)) (cons (concat "Select " (capitalize name)) (list 'lambda nil '(interactive) (list 'ispell-change-dictionary name))))))))
-
-(if ispell-menu-map-needed (progn (define-key ispell-menu-map [ispell-change-dictionary] '("Change Dictionary" . ispell-change-dictionary)) (define-key ispell-menu-map [ispell-kill-ispell] '("Kill Process" . ispell-kill-ispell)) (define-key ispell-menu-map [ispell-pdict-save] '("Save Dictionary" lambda nil (interactive) (ispell-pdict-save t t))) (define-key ispell-menu-map [ispell-complete-word] '("Complete Word" . ispell-complete-word)) (define-key ispell-menu-map [ispell-complete-word-interior-frag] '("Complete Word Frag" . ispell-complete-word-interior-frag))))
-
-(if ispell-menu-map-needed (progn (define-key ispell-menu-map [ispell-continue] '("Continue Check" . ispell-continue)) (define-key ispell-menu-map [ispell-word] '("Check Word" . ispell-word)) (define-key ispell-menu-map [ispell-region] '("Check Region" . ispell-region)) (define-key ispell-menu-map [ispell-buffer] '("Check Buffer" . ispell-buffer))))
-
-(if ispell-menu-map-needed (progn (define-key ispell-menu-map [ispell-message] '("Check Message" . ispell-message)) (define-key ispell-menu-map [ispell-help] '("Help" lambda nil (interactive) (describe-function 'ispell-help))) (put 'ispell-region 'menu-enable 'mark-active) (fset 'ispell-menu-map (symbol-value 'ispell-menu-map))))
-
-(defvar ispell-local-pdict ispell-personal-dictionary "\
-A buffer local variable containing the current personal dictionary.
-If non-nil, the value must be a string, which is a file name.
-
-If you specify a personal dictionary for the current buffer which is
-different from the current personal dictionary, the effect is similar
-to calling \\[ispell-change-dictionary].  This variable is automatically
-set when defined in the file with either `ispell-pdict-keyword' or the
-local variable syntax.")
-
-(define-key global-map [(meta ?\$)] 'ispell-word)
-
-(autoload 'ispell-word "ispell" "\
-Check spelling of word under or before the cursor.
-If the word is not found in dictionary, display possible corrections
-in a window allowing you to choose one.
-
-With a prefix argument (or if CONTINUE is non-nil),
-resume interrupted spell-checking of a buffer or region.
-
-If optional argument FOLLOWING is non-nil or if `ispell-following-word'
-is non-nil when called interactively, then the following word
-\(rather than preceding) is checked when the cursor is not over a word.
-When the optional argument QUIETLY is non-nil or `ispell-quietly' is non-nil
-when called interactively, non-corrective messages are suppressed.
-
-Word syntax described by `ispell-dictionary-alist' (which see).
-
-This will check or reload the dictionary.  Use \\[ispell-change-dictionary]
-or \\[ispell-region] to update the Ispell process." t nil)
-
-(autoload 'ispell-help "ispell" "\
-Display a list of the options available when a misspelling is encountered.
-
-Selections are:
-
-DIGIT: Replace the word with a digit offered in the *Choices* buffer.
-SPC:   Accept word this time.
-`i':   Accept word and insert into private dictionary.
-`a':   Accept word for this session.
-`A':   Accept word and place in `buffer-local dictionary'.
-`r':   Replace word with typed-in value.  Rechecked.
-`R':   Replace word with typed-in value. Query-replaced in buffer. Rechecked.
-`?':   Show these commands.
-`x':   Exit spelling buffer.  Move cursor to original point.
-`X':   Exit spelling buffer.  Leaves cursor at the current point, and permits
-        the aborted check to be completed later.
-`q':   Quit spelling session (Kills ispell process).
-`l':   Look up typed-in replacement in alternate dictionary.  Wildcards okay.
-`u':   Like `i', but the word is lower-cased first.
-`m':   Like `i', but allows one to include dictionary completion information.
-`C-l':  redraws screen
-`C-r':  recursive edit
-`C-z':  suspend emacs or iconify frame" nil nil)
-
-(autoload 'ispell-kill-ispell "ispell" "\
-Kill current Ispell process (so that you may start a fresh one).
-With NO-ERROR, just return non-nil if there was no Ispell running." t nil)
-
-(autoload 'ispell-change-dictionary "ispell" "\
-Change `ispell-dictionary' (q.v.) and kill old Ispell process.
-A new one will be started as soon as necessary.
-
-By just answering RET you can find out what the current dictionary is.
-
-With prefix argument, set the default directory." t nil)
-
-(autoload 'ispell-region "ispell" "\
-Interactively check a region for spelling errors." t nil)
-
-(autoload 'ispell-buffer "ispell" "\
-Check the current buffer for spelling errors interactively." t nil)
-
-(autoload 'ispell-continue "ispell" nil t nil)
-
-(autoload 'ispell-complete-word "ispell" "\
-Look up word before or under point in dictionary (see lookup-words command)
-and try to complete it.  If optional INTERIOR-FRAG is non-nil then the word
-may be a character sequence inside of a word.
-
-Standard ispell choices are then available." t nil)
-
-(autoload 'ispell-complete-word-interior-frag "ispell" "\
-Completes word matching character sequence inside a word." t nil)
-
-(autoload 'ispell-minor-mode "ispell" "\
-Toggle Ispell minor mode.
-With prefix arg, turn Ispell minor mode on iff arg is positive.
- 
-In Ispell minor mode, pressing SPC or RET
-warns you if the previous word is incorrectly spelled." t nil)
-
-(autoload 'ispell-message "ispell" "\
-Check the spelling of a mail message or news post.
-Don't check spelling of message headers except the Subject field.
-Don't check included messages.
-
-To abort spell checking of a message region and send the message anyway,
-use the `x' or `q' command.  (Any subsequent regions will be checked.)
-The `X' command aborts the message send so that you can edit the buffer.
-
-To spell-check whenever a message is sent, include the appropriate lines
-in your .emacs file:
-   (add-hook 'message-send-hook 'ispell-message)
-   (add-hook 'mail-send-hook  'ispell-message)
-   (add-hook 'mh-before-send-letter-hook 'ispell-message)
-
-You can bind this to the key C-c i in GNUS or mail by adding to
-`news-reply-mode-hook' or `mail-mode-hook' the following lambda expression:
-   (function (lambda () (local-set-key \"\\C-ci\" 'ispell-message)))" t nil)
-
-;;;***
-
-;;;### (autoloads (jka-compr-install toggle-auto-compression jka-compr-load) "jka-compr" "packages/jka-compr.el")
-
-(autoload 'jka-compr-load "jka-compr" "\
-Documented as original." nil nil)
-
-(autoload 'toggle-auto-compression "jka-compr" "\
-Toggle automatic file compression and uncompression.
-With prefix argument ARG, turn auto compression on if positive, else off.
-Returns the new status of auto compression (non-nil means on).
-If the argument MESSAGE is non-nil, it means to print a message
-saying whether the mode is now on or off." t nil)
-
-(autoload 'jka-compr-install "jka-compr" "\
-Install jka-compr.
-This adds entries to `file-name-handler-alist' and `auto-mode-alist'
-and `inhibit-first-line-modes-suffixes'." nil nil)
-
-;;;***
-
-;;;### (autoloads (turn-on-lazy-lock lazy-lock-mode) "lazy-lock" "packages/lazy-lock.el")
-
-(autoload 'lazy-lock-mode "lazy-lock" "\
-Toggle Lazy Lock mode.
-With arg, turn Lazy Lock mode on if and only if arg is positive and the buffer
-is at least `lazy-lock-minimum-size' characters long.
-
-When Lazy Lock mode is enabled, fontification is demand-driven and stealthy:
-
- - Fontification occurs in visible parts of buffers when necessary.
-   Occurs if there is no input after pausing for `lazy-lock-continuity-time'.
-
- - Fontification occurs in invisible parts when Emacs has been idle.
-   Occurs if there is no input after pausing for `lazy-lock-stealth-time'.
-
-If `lazy-lock-hide-invisible' is non-nil, text is not displayed until it is
-fontified, otherwise it is displayed in `lazy-lock-invisible-foreground'.
-
-See also variables `lazy-lock-walk-windows' and `lazy-lock-ignore-commands' for
-window (scroll) fontification, and `lazy-lock-stealth-lines',
-`lazy-lock-stealth-nice' and `lazy-lock-stealth-verbose' for stealth
-fontification.
-
-Use \\[lazy-lock-submit-bug-report] to send bug reports or feedback." t nil)
-
-(autoload 'turn-on-lazy-lock "lazy-lock" "\
-Unconditionally turn on Lazy Lock mode." nil nil)
-
-(when (fboundp 'add-minor-mode) (defvar lazy-lock-mode nil) (add-minor-mode 'lazy-lock-mode nil))
-
-;;;***
-
-;;;### (autoloads (ledit-from-lisp-mode ledit-mode) "ledit" "packages/ledit.el")
-
-(defconst ledit-save-files t "\
-*Non-nil means Ledit should save files before transferring to Lisp.")
-
-(defconst ledit-go-to-lisp-string "%?lisp" "\
-*Shell commands to execute to resume Lisp job.")
-
-(defconst ledit-go-to-liszt-string "%?liszt" "\
-*Shell commands to execute to resume Lisp compiler job.")
-
-(autoload 'ledit-mode "ledit" "\
-\\<ledit-mode-map>Major mode for editing text and stuffing it to a Lisp job.
-Like Lisp mode, plus these special commands:
-  \\[ledit-save-defun]	-- record defun at or after point
-	   for later transmission to Lisp job.
-  \\[ledit-save-region] -- record region for later transmission to Lisp job.
-  \\[ledit-go-to-lisp] -- transfer to Lisp job and transmit saved text.
-  \\[ledit-go-to-liszt] -- transfer to Liszt (Lisp compiler) job
-	   and transmit saved text.
-\\{ledit-mode-map}
-To make Lisp mode automatically change to Ledit mode,
-do (setq lisp-mode-hook 'ledit-from-lisp-mode)" t nil)
-
-(autoload 'ledit-from-lisp-mode "ledit" nil nil nil)
-
-;;;***
-
-;;;### (autoloads (print-region lpr-region print-buffer lpr-buffer) "lpr" "packages/lpr.el")
-
-(defcustom lpr-switches nil "*List of strings to pass as extra options for the printer program.\nSee `lpr-command'." :type '(repeat (string :tag "Argument")) :group 'lpr)
-
-(defcustom lpr-command (if (memq system-type '(usg-unix-v dgux hpux irix)) "lp" "lpr") "*Name of program for printing a file." :type 'string :group 'lpr)
-
-(autoload 'lpr-buffer "lpr" "\
-Print buffer contents as with Unix command `lpr'.
-`lpr-switches' is a list of extra switches (strings) to pass to lpr." t nil)
-
-(autoload 'print-buffer "lpr" "\
-Print buffer contents as with Unix command `lpr -p'.
-`lpr-switches' is a list of extra switches (strings) to pass to lpr." t nil)
-
-(autoload 'lpr-region "lpr" "\
-Print region contents as with Unix command `lpr'.
-`lpr-switches' is a list of extra switches (strings) to pass to lpr." t nil)
-
-(autoload 'print-region "lpr" "\
-Print region contents as with Unix command `lpr -p'.
-`lpr-switches' is a list of extra switches (strings) to pass to lpr." t nil)
-
-;;;***
-
-;;;### (autoloads (make-command-summary) "makesum" "packages/makesum.el")
-
-(autoload 'make-command-summary "makesum" "\
-Make a summary of current key bindings in the buffer *Summary*.
-Previous contents of that buffer are killed first." t nil)
-
-;;;***
-
-;;;### (autoloads (manual-entry) "man" "packages/man.el")
-
-(autoload 'manual-entry "man" "\
-Display the Unix manual entry (or entries) for TOPIC." t nil)
-
-;;;***
-
-;;;### (autoloads (metamail-region metamail-buffer metamail-interpret-body metamail-interpret-header) "metamail" "packages/metamail.el")
-
-(autoload 'metamail-interpret-header "metamail" "\
-Interpret a header part of a MIME message in current buffer.
-Its body part is not interpreted at all." t nil)
-
-(autoload 'metamail-interpret-body "metamail" "\
-Interpret a body part of a MIME message in current buffer.
-Optional argument VIEWMODE specifies the value of the
-EMACS_VIEW_MODE environment variable (defaulted to 1).
-Optional argument NODISPLAY non-nil means buffer is not
-redisplayed as output is inserted.
-Its header part is not interpreted at all." t nil)
-
-(autoload 'metamail-buffer "metamail" "\
-Process current buffer through `metamail'.
-Optional argument VIEWMODE specifies the value of the
-EMACS_VIEW_MODE environment variable (defaulted to 1).
-Optional argument BUFFER specifies a buffer to be filled (nil
-means current).
-Optional argument NODISPLAY non-nil means buffer is not
-redisplayed as output is inserted." t nil)
-
-(autoload 'metamail-region "metamail" "\
-Process current region through 'metamail'.
-Optional argument VIEWMODE specifies the value of the
-EMACS_VIEW_MODE environment variable (defaulted to 1).
-Optional argument BUFFER specifies a buffer to be filled (nil
-means current).
-Optional argument NODISPLAY non-nil means buffer is not
-redisplayed as output is inserted." t nil)
-
-;;;***
-
-;;;### (autoloads (blink-paren paren-set-mode) "paren" "packages/paren.el")
-
-(defcustom paren-mode nil "*Sets the style of parenthesis highlighting.\nValid values are nil, `blink-paren', `paren', and `sexp'.\n  nil		no parenthesis highlighting.\n  blink-paren	causes the matching paren to blink.\n  paren		causes the matching paren to be highlighted but not to blink.\n  sexp		whole expression enclosed by the local paren at its mate.\n  nested	(not yet implemented) use variable shading to see the\n		nesting of an expression.  Also groks regular expressions\n		and shell quoting.\n\nThis variable is global by default, but you can make it buffer-local and\nhighlight parentheses differently in different major modes." :type '(radio (const nil) (const blink-paren) (const paren) (const sexp) (const nested)) :group 'paren-matching)
-
-(autoload 'paren-set-mode "paren" "\
-Cycles through possible values for `paren-mode', force off with negative arg.
-When called from lisp, a symbolic value for `paren-mode' can be passed directly.
-See also `paren-mode' and `paren-highlight'." t nil)
-
-(make-obsolete 'blink-paren 'paren-set-mode)
-
-(autoload 'blink-paren "paren" "\
-Obsolete.  Use `paren-set-mode' instead." t nil)
-
-;;;***
-
-;;;### (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.
-With a positive argument, turns it on.
-With a non-positive argument, turns it off.
-When active, typed text replaces the selection." t nil)
-
-;;;***
-
-;;;### (autoloads (ps-setup ps-nb-pages-region ps-nb-pages-buffer ps-line-lengths ps-despool ps-spool-region-with-faces ps-spool-region ps-spool-buffer-with-faces ps-spool-buffer ps-print-region-with-faces ps-print-region ps-print-buffer-with-faces ps-print-buffer) "ps-print" "packages/ps-print.el")
-
-(defcustom ps-paper-type 'letter "*Specifies the size of paper to format for.\nShould be one of the paper types defined in `ps-page-dimensions-database', for\nexample `letter', `legal' or `a4'." :type '(symbol :validate (lambda (wid) (if (assq (widget-value wid) ps-page-dimensions-database) nil (widget-put wid :error "Unknown paper size") wid))) :group 'ps-print)
-
-(defcustom ps-print-color-p (or (fboundp 'x-color-values) (fboundp 'color-instance-rgb-components)) "*If non-nil, print the buffer's text in color." :type 'boolean :group 'ps-print-color)
-
-(autoload 'ps-print-buffer "ps-print" "\
-Generate and print a PostScript image of the buffer.
-
-When called with a numeric prefix argument (C-u), prompts the user for
-the name of a file to save the PostScript image in, instead of sending
-it to the printer.
-
-More specifically, the FILENAME argument is treated as follows: if it
-is nil, send the image to the printer.  If FILENAME is a string, save
-the PostScript image in a file with that name.  If FILENAME is a
-number, prompt the user for the name of the file to save in." t nil)
-
-(autoload 'ps-print-buffer-with-faces "ps-print" "\
-Generate and print a PostScript image of the buffer.
-Like `ps-print-buffer', but includes font, color, and underline
-information in the generated image.  This command works only if you
-are using a window system, so it has a way to determine color values." t nil)
-
-(autoload 'ps-print-region "ps-print" "\
-Generate and print a PostScript image of the region.
-Like `ps-print-buffer', but prints just the current region." t nil)
-
-(autoload 'ps-print-region-with-faces "ps-print" "\
-Generate and print a PostScript image of the region.
-Like `ps-print-region', but includes font, color, and underline
-information in the generated image.  This command works only if you
-are using a window system, so it has a way to determine color values." t nil)
-
-(autoload 'ps-spool-buffer "ps-print" "\
-Generate and spool a PostScript image of the buffer.
-Like `ps-print-buffer' except that the PostScript image is saved in a
-local buffer to be sent to the printer later.
-
-Use the command `ps-despool' to send the spooled images to the printer." t nil)
-
-(autoload 'ps-spool-buffer-with-faces "ps-print" "\
-Generate and spool a PostScript image of the buffer.
-Like `ps-spool-buffer', but includes font, color, and underline
-information in the generated image.  This command works only if you
-are using a window system, so it has a way to determine color values.
-
-Use the command `ps-despool' to send the spooled images to the printer." t nil)
-
-(autoload 'ps-spool-region "ps-print" "\
-Generate a PostScript image of the region and spool locally.
-Like `ps-spool-buffer', but spools just the current region.
-
-Use the command `ps-despool' to send the spooled images to the printer." t nil)
-
-(autoload 'ps-spool-region-with-faces "ps-print" "\
-Generate a PostScript image of the region and spool locally.
-Like `ps-spool-region', but includes font, color, and underline
-information in the generated image.  This command works only if you
-are using a window system, so it has a way to determine color values.
-
-Use the command `ps-despool' to send the spooled images to the printer." t nil)
-
-(autoload 'ps-despool "ps-print" "\
-Send the spooled PostScript to the printer.
-
-When called with a numeric prefix argument (C-u), prompt the user for
-the name of a file to save the spooled PostScript in, instead of sending
-it to the printer.
-
-More specifically, the FILENAME argument is treated as follows: if it
-is nil, send the image to the printer.  If FILENAME is a string, save
-the PostScript image in a file with that name.  If FILENAME is a
-number, prompt the user for the name of the file to save in." t nil)
-
-(autoload 'ps-line-lengths "ps-print" "\
-*Display the correspondence between a line length and a font size,
-using the current ps-print setup.
-Try: pr -t file | awk '{printf \"%3d %s
-\", length($0), $0}' | sort -r | head" t nil)
-
-(autoload 'ps-nb-pages-buffer "ps-print" "\
-*Display an approximate correspondence between a font size and the number
-of pages the current buffer would require to print
-using the current ps-print setup." t nil)
-
-(autoload 'ps-nb-pages-region "ps-print" "\
-*Display an approximate correspondence between a font size and the number
-of pages the current region would require to print
-using the current ps-print setup." t nil)
-
-(autoload 'ps-setup "ps-print" "\
-*Return the current setup" nil nil)
-
-;;;***
-
-;;;### (autoloads (remote-compile) "rcompile" "packages/rcompile.el")
-
-(autoload 'remote-compile "rcompile" "\
-Compile the current buffer's directory on HOST.  Log in as USER.
-See \\[compile]." t nil)
-
-;;;***
-
-;;;### (autoloads (resume-suspend-hook) "resume" "packages/resume.el")
-
-(autoload 'resume-suspend-hook "resume" "\
-Clear out the file used for transmitting args when Emacs resumes." nil nil)
-
-;;;***
-
-;;;### (autoloads (install-shell-fonts) "shell-font" "packages/shell-font.el")
-
-(autoload 'install-shell-fonts "shell-font" "\
-Decorate the current interaction buffer with fonts.
-This uses the faces called `shell-prompt', `shell-input' and `shell-output';
-you can alter the graphical attributes of those with the normal
-face-manipulation functions." nil nil)
-
-;;;***
-
-;;;### (autoloads (spell-string spell-region spell-word spell-buffer) "spell" "packages/spell.el")
-
-(put 'spell-filter 'risky-local-variable t)
-
-(autoload 'spell-buffer "spell" "\
-Check spelling of every word in the buffer.
-For each incorrect word, you are asked for the correct spelling
-and then put into a query-replace to fix some or all occurrences.
-If you do not want to change a word, just give the same word
-as its \"correct\" spelling; then the query replace is skipped." t nil)
-
-(autoload 'spell-word "spell" "\
-Check spelling of word at or before point.
-If it is not correct, ask user for the correct spelling
-and `query-replace' the entire buffer to substitute it." t nil)
-
-(autoload 'spell-region "spell" "\
-Like `spell-buffer' but applies only to region.
-Used in a program, applies from START to END.
-DESCRIPTION is an optional string naming the unit being checked:
-for example, \"word\"." t nil)
-
-(autoload 'spell-string "spell" "\
-Check spelling of string supplied as argument." t nil)
-
-;;;***
-
-;;;### (autoloads (tar-mode) "tar-mode" "packages/tar-mode.el")
-
-(autoload 'tar-mode "tar-mode" "\
-Major mode for viewing a tar file as a dired-like listing of its contents.
-You can move around using the usual cursor motion commands. 
-Letters no longer insert themselves.
-Type 'e' to pull a file out of the tar file and into its own buffer.
-Type 'c' to copy an entry from the tar file into another file on disk.
-
-If you edit a sub-file of this archive (as with the 'e' command) and 
-save it with Control-X Control-S, the contents of that buffer will be 
-saved back into the tar-file buffer; in this way you can edit a file 
-inside of a tar archive without extracting it and re-archiving it.
-
-See also: variables tar-update-datestamp and tar-anal-blocksize.
-\\{tar-mode-map}" nil nil)
-
-;;;***
-
-;;;### (autoloads (terminal-emulator) "terminal" "packages/terminal.el")
-
-(autoload 'terminal-emulator "terminal" "\
-Under a display-terminal emulator in BUFFER, run PROGRAM on arguments ARGS.
-ARGS is a list of argument-strings.  Remaining arguments are WIDTH and HEIGHT.
-BUFFER's contents are made an image of the display generated by that program,
-and any input typed when BUFFER is the current Emacs buffer is sent to that
-program an keyboard input.
-
-Interactively, BUFFER defaults to \"*terminal*\" and PROGRAM and ARGS
-are parsed from an input-string using your usual shell.
-WIDTH and HEIGHT are determined from the size of the current window
--- WIDTH will be one less than the window's width, HEIGHT will be its height.
-
-To switch buffers and leave the emulator, or to give commands
-to the emulator itself (as opposed to the program running under it),
-type Control-^.  The following character is an emulator command.
-Type Control-^ twice to send it to the subprogram.
-This escape character may be changed using the variable `terminal-escape-char'.
-
-`Meta' characters may not currently be sent through the terminal emulator.
-
-Here is a list of some of the variables which control the behaviour
-of the emulator -- see their documentation for more information:
-terminal-escape-char, terminal-scrolling, terminal-more-processing,
-terminal-redisplay-interval.
-
-This function calls the value of terminal-mode-hook if that exists
-and is non-nil after the terminal buffer has been set up and the
-subprocess started.
-
-Presently with `termcap' only; if somebody sends us code to make this
-work with `terminfo' we will try to use it." t nil)
-
-;;;***
-
-;;;### (autoloads (batch-texinfo-format texinfo-format-region texinfo-format-buffer) "texinfmt" "packages/texinfmt.el")
-
-(autoload 'texinfo-format-buffer "texinfmt" "\
-Process the current buffer as texinfo code, into an Info file.
-The Info file output is generated in a buffer visiting the Info file
-names specified in the @setfilename command.
-
-Non-nil argument (prefix, if interactive) means don't make tag table
-and don't split the file if large.  You can use Info-tagify and
-Info-split to do these manually." t nil)
-
-(autoload 'texinfo-format-region "texinfmt" "\
-Convert the current region of the Texinfo file to Info format.
-This lets you see what that part of the file will look like in Info.
-The command is bound to \\[texinfo-format-region].  The text that is
-converted to Info is stored in a temporary buffer." t nil)
-
-(autoload 'batch-texinfo-format "texinfmt" "\
-Runs  texinfo-format-buffer  on the files remaining on the command line.
-Must be used only with -batch, and kills emacs on completion.
-Each file will be processed even if an error occurred previously.
-For example, invoke
-  \"emacs -batch -funcall batch-texinfo-format $docs/ ~/*.texinfo\"." nil nil)
-
-;;;***
-
-;;;### (autoloads (texinfo-sequential-node-update texinfo-every-node-update texinfo-update-node) "texnfo-upd" "packages/texnfo-upd.el")
-
-(autoload 'texinfo-update-node "texnfo-upd" "\
-Without any prefix argument, update the node in which point is located.
-Non-nil argument (prefix, if interactive) means update the nodes in the
-marked region.
-
-The functions for creating or updating nodes and menus, and their
-keybindings, are:
-
-    texinfo-update-node (&optional region-p)    \\[texinfo-update-node]
-    texinfo-every-node-update ()                \\[texinfo-every-node-update]
-    texinfo-sequential-node-update (&optional region-p)
-
-    texinfo-make-menu (&optional region-p)      \\[texinfo-make-menu]
-    texinfo-all-menus-update ()                 \\[texinfo-all-menus-update]
-    texinfo-master-menu ()
-
-    texinfo-indent-menu-description (column &optional region-p)
-
-The `texinfo-column-for-description' variable specifies the column to
-which menu descriptions are indented. Its default value is 32." t nil)
-
-(autoload 'texinfo-every-node-update "texnfo-upd" "\
-Update every node in a Texinfo file." t nil)
-
-(autoload 'texinfo-sequential-node-update "texnfo-upd" "\
-Update one node (or many) in a Texinfo file with sequential pointers.
-
-This function causes the `Next' or `Previous' pointer to point to the
-immediately preceding or following node, even if it is at a higher or
-lower hierarchical level in the document.  Continually pressing `n' or
-`p' takes you straight through the file.
-
-Without any prefix argument, update the node in which point is located.
-Non-nil argument (prefix, if interactive) means update the nodes in the
-marked region.
-
-This command makes it awkward to navigate among sections and
-subsections; it should be used only for those documents that are meant
-to be read like a novel rather than a reference, and for which the
-Info `g*' command is inadequate." t nil)
-
-;;;***
-
-;;;### (autoloads (time-stamp-toggle-active time-stamp) "time-stamp" "packages/time-stamp.el")
-
-(autoload 'time-stamp "time-stamp" "\
-Update the time stamp string in the buffer.
-If you put a time stamp template anywhere in the first 8 lines of a file,
-it can be updated every time you save the file.  See the top of
-`time-stamp.el' for a sample.  The template looks like one of the following:
-    Time-stamp: <>
-    Time-stamp: \" \"
-The time stamp is written between the brackets or quotes, resulting in
-    Time-stamp: <95/01/18 10:20:51 gildea>
-Only does its thing if the variable  time-stamp-active  is non-nil.
-Typically used on  write-file-hooks  for automatic time-stamping.
-The format of the time stamp is determined by the variable  time-stamp-format.
-The variables time-stamp-line-limit, time-stamp-start, and time-stamp-end
-control finding the template." t nil)
-
-(autoload 'time-stamp-toggle-active "time-stamp" "\
-Toggle time-stamp-active, setting whether \\[time-stamp] updates a buffer.
-With arg, turn time stamping on if and only if arg is positive." t nil)
-
-;;;***
-
-;;;### (autoloads (display-time) "time" "packages/time.el")
-
-(defcustom display-time-day-and-date nil "*Non-nil means \\[display-time] should display day,date and time.\nThis affects the spec 'date in the variable display-time-form-list." :group 'display-time :type 'boolean)
-
-(autoload 'display-time "time" "\
-Display current time, load level, and mail flag in mode line of each buffer.
-Updates automatically every minute.
-If `display-time-day-and-date' is non-nil, the current day and date
-are displayed as well.
-After each update, `display-time-hook' is run with `run-hooks'.
-If `display-time-echo-area' is non-nil, the time is displayed in the
-echo area instead of in the mode-line." t nil)
-
-;;;***
-
-;;;### (autoloads (ununderline-and-unoverstrike-region overstrike-region unoverstrike-region ununderline-region underline-region) "underline" "packages/underline.el")
-
-(autoload 'underline-region "underline" "\
-Underline all nonblank characters in the region.
-Works by overstriking underscores.
-Called from program, takes two arguments START and END
-which specify the range to operate on." t nil)
-
-(autoload 'ununderline-region "underline" "\
-Remove all underlining (overstruck underscores) in the region.
-Called from program, takes two arguments START and END
-which specify the range to operate on." t nil)
-
-(autoload 'unoverstrike-region "underline" "\
-Remove all overstriking (character-backspace-character) in the region.
-Called from program, takes two arguments START and END which specify the
-range to operate on." t nil)
-
-(autoload 'overstrike-region "underline" "\
-Overstrike (character-backspace-character) all nonblank characters in
-the region. Called from program, takes two arguments START and END which
-specify the range to operate on." t nil)
-
-(autoload 'ununderline-and-unoverstrike-region "underline" "\
-Remove underlining and overstriking in the region.  Called from a program,
-takes two arguments START and END which specify the range to operate on." t nil)
-
-;;;***
-
-;;;### (autoloads (ask-to-update-copyright update-copyright) "upd-copyr" "packages/upd-copyr.el")
-
-(defcustom copyright-do-not-disturb "Free Software Foundation, Inc." "*If non-nil, the existing copyright holder is checked against this regexp.\nIf it does not match, then a new copyright line is added with the copyright\nholder set to the value of `copyright-whoami'." :type '(choice (const nil) string) :group 'copyright)
-
-(defcustom copyright-whoami nil "*A string containing the name of the owner of new copyright notices." :type '(choice (const nil) string) :group 'copyright)
-
-(defcustom copyright-notice-file nil "*If non-nil, replace copying notices with this file." :type '(choice (const nil) file) :group 'copyright)
-
-(autoload 'update-copyright "upd-copyr" "\
-Update the copyright notice at the beginning of the buffer
-to indicate the current year.  If optional arg REPLACE is given
-\(interactively, with prefix arg) replace the years in the notice
-rather than adding the current year after them.
-If `copyright-notice-file' is set, the copying permissions following the
-copyright are replaced as well.
-
-If optional third argument ASK is non-nil, the user is prompted for whether
-or not to update the copyright.  If optional fourth argument ASK-YEAR is
-non-nil, the user is prompted for whether or not to replace the year rather
-than adding to it." t nil)
-
-(autoload 'ask-to-update-copyright "upd-copyr" "\
-If the current buffer contains a copyright notice that is out of date,
-ask the user if it should be updated with `update-copyright' (which see).
-Put this on write-file-hooks." nil nil)
-
-;;;***
-
-;;;### (autoloads (vc-update-change-log vc-rename-file vc-cancel-version vc-revert-buffer vc-print-log vc-retrieve-snapshot vc-create-snapshot vc-directory vc-insert-headers vc-version-other-window vc-diff vc-checkout vc-register vc-next-action vc-find-binary) "vc" "packages/vc.el")
-
-(defvar vc-before-checkin-hook nil "\
-*Normal hook (list of functions) run before a file gets checked in.  
-See `run-hooks'.")
-
-(defvar vc-checkin-hook nil "\
-*Normal hook (List of functions) run after a checkin is done.
-See `run-hooks'.")
-
-(autoload 'vc-find-binary "vc" "\
-Look for a command anywhere on the subprocess-command search path." nil nil)
-
-(autoload 'vc-next-action "vc" "\
-Do the next logical checkin or checkout operation on the current file.
-   If you call this from within a VC dired buffer with no files marked,
-it will operate on the file in the current line.
-   If you call this from within a VC dired buffer, and one or more
-files are marked, it will accept a log message and then operate on
-each one.  The log message will be used as a comment for any register
-or checkin operations, but ignored when doing checkouts.  Attempted
-lock steals will raise an error.
-   A prefix argument lets you specify the version number to use.
-
-For RCS and SCCS files:
-   If the file is not already registered, this registers it for version
-control and then retrieves a writable, locked copy for editing.
-   If the file is registered and not locked by anyone, this checks out
-a writable and locked file ready for editing.
-   If the file is checked out and locked by the calling user, this
-first checks to see if the file has changed since checkout.  If not,
-it performs a revert.
-   If the file has been changed, this pops up a buffer for entry
-of a log message; when the message has been entered, it checks in the
-resulting changes along with the log message as change commentary.  If
-the variable `vc-keep-workfiles' is non-nil (which is its default), a
-read-only copy of the changed file is left in place afterwards.
-   If the file is registered and locked by someone else, you are given
-the option to steal the lock.
-
-For CVS files:
-   If the file is not already registered, this registers it for version
-control.  This does a \"cvs add\", but no \"cvs commit\".
-   If the file is added but not committed, it is committed.
-   If your working file is changed, but the repository file is
-unchanged, this pops up a buffer for entry of a log message; when the
-message has been entered, it checks in the resulting changes along
-with the logmessage as change commentary.  A writable file is retained.
-   If the repository file is changed, you are asked if you want to
-merge in the changes into your working copy." t nil)
-
-(autoload 'vc-register "vc" "\
-Register the current file into your version-control system." t nil)
-
-(autoload 'vc-checkout "vc" "\
-Retrieve a copy of the latest version of the given file." nil nil)
-
-(autoload 'vc-diff "vc" "\
-Display diffs between file versions.
-Normally this compares the current file and buffer with the most recent 
-checked in version of that file.  This uses no arguments.
-With a prefix argument, it reads the file name to use
-and two version designators specifying which versions to compare." t nil)
-
-(autoload 'vc-version-other-window "vc" "\
-Visit version REV of the current buffer in another window.
-If the current buffer is named `F', the version is named `F.~REV~'.
-If `F.~REV~' already exists, it is used instead of being re-created." t nil)
-
-(autoload 'vc-insert-headers "vc" "\
-Insert headers in a file for use with your version-control system.
-Headers desired are inserted at the start of the buffer, and are pulled from
-the variable `vc-header-alist'." t nil)
-
-(autoload 'vc-directory "vc" "\
-Show version-control status of the current directory and subdirectories.
-Normally it creates a Dired buffer that lists only the locked files
-in all these directories.  With a prefix argument, it lists all files." t nil)
-
-(autoload 'vc-create-snapshot "vc" "\
-Make a snapshot called NAME.
-The snapshot is made from all registered files at or below the current
-directory.  For each file, the version level of its latest
-version becomes part of the named configuration." t nil)
-
-(autoload 'vc-retrieve-snapshot "vc" "\
-Retrieve the snapshot called NAME.
-This function fails if any files are locked at or below the current directory
-Otherwise, all registered files are checked out (unlocked) at their version
-levels in the snapshot." t nil)
-
-(autoload 'vc-print-log "vc" "\
-List the change log of the current buffer in a window." t nil)
-
-(autoload 'vc-revert-buffer "vc" "\
-Revert the current buffer's file back to the latest checked-in version.
-This asks for confirmation if the buffer contents are not identical
-to that version.
-If the back-end is CVS, this will give you the most recent revision of
-the file on the branch you are editing." t nil)
-
-(autoload 'vc-cancel-version "vc" "\
-Get rid of most recently checked in version of this file.
-A prefix argument means do not revert the buffer afterwards." t nil)
-
-(autoload 'vc-rename-file "vc" "\
-Rename file OLD to NEW, and rename its master file likewise." t nil)
-
-(autoload 'vc-update-change-log "vc" "\
-Find change log file and add entries from recent RCS/CVS logs.
-Normally, find log entries for all registered files in the default
-directory using `rcs2log', which finds CVS logs preferentially.
-The mark is left at the end of the text prepended to the change log.
-
-With prefix arg of C-u, only find log entries for the current buffer's file.
-
-With any numeric prefix arg, find log entries for all currently visited
-files that are under version control.  This puts all the entries in the
-log for the default directory, which may not be appropriate.
-
-From a program, any arguments are assumed to be filenames and are
-passed to the `rcs2log' script after massaging to be relative to the
-default directory." t nil)
-
-;;;***
-
-;;;### (autoloads (webjump) "webjump" "packages/webjump.el")
-
-(autoload 'webjump "webjump" "\
-Jumps to a Web site from a programmable hotlist.
-
-See the documentation for the `webjump-sites' variable for how to customize the
-hotlist.
-
-Please submit bug reports and other feedback to the author, Neil W. Van Dyke
-<nwv@acm.org>.
-
-The latest version can be gotten from `http://www.cs.brown.edu/people/nwv/'.
-That Web site also contains `webjump-plus.el', a larger and more frequently
-updated sample WebJump hotlist." t nil)
-
-;;;***
-
-;;;### (autoloads (webster-www) "webster-www" "packages/webster-www.el")
-
-(autoload 'webster-www "webster-www" "\
-Look up a word in the Webster's dictionary at http://www.m-w.com using WWW." t nil)
-
-;;;***
-
-;;;### (autoloads (run-scheme) "xscheme" "packages/xscheme.el")
-
-(defvar scheme-program-name "scheme" "\
-*Program invoked by the `run-scheme' command.")
-
-(defvar scheme-band-name nil "\
-*Band loaded by the `run-scheme' command.")
-
-(defvar scheme-program-arguments nil "\
-*Arguments passed to the Scheme program by the `run-scheme' command.")
-
-(autoload 'run-scheme "xscheme" "\
-Run an inferior Scheme process.
-Output goes to the buffer `*scheme*'.
-With argument, asks for a command line." t nil)
-
-;;;***
-
-;;;### (autoloads (pcl-cvs-fontify) "pcl-cvs-xemacs" "pcl-cvs/pcl-cvs-xemacs.el")
-
-(autoload 'pcl-cvs-fontify "pcl-cvs-xemacs" nil nil nil)
-
-;;;***
-
-;;;### (autoloads (cvs-update-other-window cvs-update) "pcl-cvs" "pcl-cvs/pcl-cvs.el")
-
-(autoload 'cvs-update "pcl-cvs" "\
-Run a 'cvs update' in the current working directory.  Feed the
-output to a *cvs* buffer and run cvs-mode on it.
-If optional prefix argument LOCAL is non-nil, 'cvs update -l' is run." t nil)
-
-(autoload 'cvs-update-other-window "pcl-cvs" "\
-Run a 'cvs update' in the current working directory.  Feed the
-output to a *cvs* buffer, display it in the other window, and run
-cvs-mode on it.
-
-If optional prefix argument LOCAL is non-nil, 'cvs update -l' is run." t nil)
-
-;;;***
+;;; DO NOT MODIFY THIS FILE
+(if (not (featurep 'prim-autoloads))
+    (progn
 
 ;;;### (autoloads (about-xemacs) "about" "prim/about.el")
 
@@ -8069,7 +200,7 @@
 
 (autoload 'enable-command "novice" "\
 Allow COMMAND to be executed without special confirmation from now on.
-The user's .emacs file is altered so that this will apply
+The user's `custom-file' is altered so that this will apply
 to future sessions." t nil)
 
 (autoload 'disable-command "novice" "\
@@ -8367,1678 +498,6 @@
 The buffer in question is current when this function is called." nil nil)
 
 ;;;***
-
-;;;### (autoloads (style-format) "psgml-fs" "psgml/psgml-fs.el")
 
-(autoload 'style-format "psgml-fs" nil t nil)
-
-;;;***
-
-;;;### (autoloads nil "psgml-html" "psgml/psgml-html.el")
-
-(autoload 'html-mode "psgml-html" "\
-HTML mode." t)
-
-(autoload 'html3-mode "psgml-html" "\
-HTML3 mode." t)
-
-;;;***
-
-;;;### (autoloads (sgml-mode) "psgml" "psgml/psgml.el")
-
-(autoload 'sgml-mode "psgml" "\
-Major mode for editing SGML.\\<sgml-mode-map>
-Makes > display the matching <.  Makes / display matching /.
-Use \\[sgml-validate] to validate your document with an SGML parser.
-
-You can find information with:
-\\[sgml-show-context]  Show the nesting of elements at cursor position.
-\\[sgml-list-valid-tags]  Show the tags valid at cursor position.
-
-Insert tags with completion of contextually valid tags with \\[sgml-insert-tag].
-End the current element with \\[sgml-insert-end-tag].  Insert an element (i.e.
-both start and end tag) with \\[sgml-insert-element].  Or tag a region with 
-\\[sgml-tag-region]. 
-
-To tag a region with the mouse, use transient mark mode or secondary selection.
-
-Structure editing:
-\\[sgml-backward-element]  Moves backwards over the previous element.
-\\[sgml-forward-element]  Moves forward over the next element.
-\\[sgml-down-element]  Move forward and down one level in the element structure.
-\\[sgml-backward-up-element]  Move backward out of this element level.
-\\[sgml-beginning-of-element]  Move to after the start tag of the current element.
-\\[sgml-end-of-element]  Move to before the end tag of the current element.
-\\[sgml-kill-element]  Kill the element following the cursor.
-
-Finding interesting positions
-\\[sgml-next-data-field]  Move forward to next point where data is allowed.
-\\[sgml-next-trouble-spot]  Move forward to next point where something is 
-	amiss with the structure.
-
-Folding and unfolding
-\\[sgml-fold-element]  Fold the lines comprising the current element, leaving 
-	the first line visible.
-\\[sgml-fold-subelement]  Fold the elements in the content of the current element.
-	Leaving the first line of every element visible.
-\\[sgml-unfold-line]  Show hidden lines in current line.
-
-User options:
-
-sgml-omittag  Set this to reflect OMITTAG in the SGML declaration.
-sgml-shortag  Set this to reflect SHORTTAG in the SGML declaration.
-sgml-auto-insert-required-elements  If non-nil, automatically insert required 
-	elements in the content of an inserted element.
-sgml-balanced-tag-edit  If non-nil, always insert start-end tag pairs.
-sgml-omittag-transparent  If non-nil, will show legal tags inside elements
-	with omitable start tags and legal tags beyond omitable end tags.
-sgml-leave-point-after-insert  If non-nil, the point will remain after 
-	inserted tag(s).
-sgml-warn-about-undefined-elements  If non-nil, print a warning when a tag 
-	for a undefined element is found.
-sgml-max-menu-size  Max number of entries in Tags and Entities menus before
- 	they are split into several panes.
-sgml-always-quote-attributes  If non-nil, quote all attribute values 
-	inserted after finishing edit attributes.
-sgml-minimize-attributes  Determines minimization of attributes inserted by 
-	edit-attributes.
-sgml-normalize-trims  If non-nil, sgml-normalize will trim off white space 
-	from end of element when adding end tag.
-sgml-indent-step  How much to increament indent for every element level.
-sgml-indent-data  If non-nil, indent in data/mixed context also.
-sgml-set-face     If non-nil, psgml will set the face of parsed markup.
-sgml-markup-faces The faces used when the above variable is non-nil.
-sgml-system-path  List of directories used to look for system identifiers.
-sgml-public-map  Mapping from public identifiers to file names.
-sgml-offer-save  If non-nil, ask about saving modified buffers before
-		\\[sgml-validate] is run.
-
-All bindings:
-\\{sgml-mode-map}
-" t nil)
-
-;;;***
-
-;;;### (autoloads (rmail-input rmail-mode rmail) "rmail" "rmail/rmail.el")
-
-(defvar rmail-dont-reply-to-names nil "\
-*A regexp specifying names to prune of reply to messages.
-A value of nil means exclude your own name only.")
-
-(defvar rmail-default-dont-reply-to-names "info-" "\
-A regular expression specifying part of the value of the default value of
-the variable `rmail-dont-reply-to-names', for when the user does not set
-`rmail-dont-reply-to-names' explicitly.  (The other part of the default
-value is the user's name.)
-It is useful to set this variable in the site customization file.")
-
-(defvar rmail-delete-after-output nil "\
-*Non-nil means automatically delete a message that is copied to a file.")
-
-(defvar rmail-primary-inbox-list nil "\
-*List of files which are inboxes for user's primary mail file `~/RMAIL'.
-`nil' means the default, which is (\"/usr/spool/mail/$USER\")
-\(the name varies depending on the operating system,
-and the value of the environment variable MAIL overrides it).")
-
-(defvar rmail-mail-new-frame nil "\
-*Non-nil means Rmail makes a new frame for composing outgoing mail.")
-
-(defvar rmail-retry-setup-hook nil "\
-Hook that `rmail-retry-failure' uses in place of `mail-setup-hook'.")
-
-(defvar rmail-last-file nil)
-
-(autoload 'rmail "rmail" "\
-Read and edit incoming mail.
-Moves messages into file named by `rmail-file-name' (a babyl format file)
- and edits that file in RMAIL Mode.
-Type \\[describe-mode] once editing that file, for a list of RMAIL commands.
-
-May be called with filename as argument; then performs rmail editing on
-that file, but does not copy any new mail into the file." t nil)
-
-(autoload 'rmail-mode "rmail" "\
-Rmail Mode is used by \\<rmail-mode-map>\\[rmail] for editing Rmail files.
-All normal editing commands are turned off.
-Instead, these commands are available:
-
-\\[rmail-beginning-of-message]	Move point to front of this message (same as \\[beginning-of-buffer]).
-\\[scroll-up]	Scroll to next screen of this message.
-\\[scroll-down]	Scroll to previous screen of this message.
-\\[rmail-next-undeleted-message]	Move to Next non-deleted message.
-\\[rmail-previous-undeleted-message]	Move to Previous non-deleted message.
-\\[rmail-next-message]	Move to Next message whether deleted or not.
-\\[rmail-previous-message]	Move to Previous message whether deleted or not.
-\\[rmail-first-message]	Move to the first message in Rmail file.
-\\[rmail-last-message]	Move to the last message in Rmail file.
-\\[rmail-show-message]	Jump to message specified by numeric position in file.
-\\[rmail-search]	Search for string and show message it is found in.
-\\[rmail-delete-forward]	Delete this message, move to next nondeleted.
-\\[rmail-delete-backward]	Delete this message, move to previous nondeleted.
-\\[rmail-undelete-previous-message]	Undelete message.  Tries current message, then earlier messages
-	till a deleted message is found.
-\\[rmail-edit-current-message]	Edit the current message.  \\[rmail-cease-edit] to return to Rmail.
-\\[rmail-expunge]	Expunge deleted messages.
-\\[rmail-expunge-and-save]	Expunge and save the file.
-\\[rmail-quit]       Quit Rmail: expunge, save, then switch to another buffer.
-\\[save-buffer] Save without expunging.
-\\[rmail-get-new-mail]	Move new mail from system spool directory into this file.
-\\[rmail-mail]	Mail a message (same as \\[mail-other-window]).
-\\[rmail-continue]	Continue composing outgoing message started before.
-\\[rmail-reply]	Reply to this message.  Like \\[rmail-mail] but initializes some fields.
-\\[rmail-retry-failure]	Send this message again.  Used on a mailer failure message.
-\\[rmail-forward]	Forward this message to another user.
-\\[rmail-output-to-rmail-file]       Output this message to an Rmail file (append it).
-\\[rmail-output]	Output this message to a Unix-format mail file (append it).
-\\[rmail-input]	Input Rmail file.  Run Rmail on that file.
-\\[rmail-add-label]	Add label to message.  It will be displayed in the mode line.
-\\[rmail-kill-label]	Kill label.  Remove a label from current message.
-\\[rmail-next-labeled-message]   Move to Next message with specified label
-          (label defaults to last one specified).
-          Standard labels: filed, unseen, answered, forwarded, deleted.
-          Any other label is present only if you add it with \\[rmail-add-label].
-\\[rmail-previous-labeled-message]   Move to Previous message with specified label
-\\[rmail-summary]	Show headers buffer, with a one line summary of each message.
-\\[rmail-summary-by-labels]	Summarize only messages with particular label(s).
-\\[rmail-summary-by-recipients]   Summarize only messages with particular recipient(s).
-\\[rmail-summary-by-regexp]   Summarize only messages with particular regexp(s).
-\\[rmail-summary-by-topic]   Summarize only messages with subject line regexp(s).
-\\[rmail-toggle-header]	Toggle display of complete header." t nil)
-
-(autoload 'rmail-input "rmail" "\
-Run Rmail on file FILENAME." t nil)
-
-;;;***
-
-;;;### (autoloads (rmail-file-p) "rmailout" "rmail/rmailout.el")
-
-(autoload 'rmail-file-p "rmailout" nil nil nil)
-
-;;;***
-
-;;;### (autoloads (unrmail batch-unrmail) "unrmail" "rmail/unrmail.el")
-
-(autoload 'batch-unrmail "unrmail" "\
-Convert Rmail files to mailbox files.
-Specify the input Rmail file names as command line arguments.
-For each Rmail file, the corresponding output file name
-is made by adding `.mail' at the end.
-For example, invoke `emacs -batch -f batch-unrmail RMAIL'." nil nil)
-
-(autoload 'unrmail "unrmail" "\
-Convert Rmail file FILE to mailbox-format file TO-FILE." t nil)
-
-;;;***
-
-;;;### (autoloads (mime/editor-mode) "tm-edit" "tm/tm-edit.el")
-
-(autoload 'mime/editor-mode "tm-edit" "\
-MIME minor mode for editing the tagged MIME message.
-
-In this mode, basically, the message is composed in the tagged MIME
-format. The message tag looks like:
-
-	--[[text/plain; charset=ISO-2022-JP][7bit]]
-
-The tag specifies the MIME content type, subtype, optional parameters
-and transfer encoding of the message following the tag. Messages
-without any tag are treated as `text/plain' by default. Charset and
-transfer encoding are automatically defined unless explicitly
-specified. Binary messages such as audio and image are usually hidden.
-The messages in the tagged MIME format are automatically translated
-into a MIME compliant message when exiting this mode.
-
-Available charsets depend on Emacs version being used. The following
-lists the available charsets of each emacs.
-
-EMACS 18:	US-ASCII is only available.
-NEmacs:		US-ASCII and ISO-2022-JP are available.
-EMACS 19:	US-ASCII and ISO-8859-1 (or other charset) are available.
-XEmacs 19:	US-ASCII and ISO-8859-1 (or other charset) are available.
-Mule:		US-ASCII, ISO-8859-* (except for ISO-8859-5), KOI8-R,
-		ISO-2022-JP, ISO-2022-JP-2, ISO-2022-KR, BIG5 and
-		ISO-2022-INT-1 are available.
-
-ISO-2022-JP-2 and ISO-2022-INT-1 charsets used in mule is expected to
-be used to represent multilingual text in intermixed manner. Any
-languages that has no registered charset are represented as either
-ISO-2022-JP-2 or ISO-2022-INT-1 in mule.
-
-If you want to use non-ISO-8859-1 charset in EMACS 19 or XEmacs 19,
-please set variable `default-mime-charset'. This variable must be
-symbol of which name is a MIME charset.
-
-If you want to add more charsets in mule, please set variable
-`charsets-mime-charset-alist'. This variable must be alist of which
-key is list of leading-char/charset and value is symbol of MIME
-charset. (leading-char is a term of MULE 1.* and 2.*. charset is a
-term of XEmacs/mule, mule merged EMACS and MULE 3.*) If name of
-coding-system is different as MIME charset, please set variable
-`mime-charset-coding-system-alist'. This variable must be alist of
-which key is MIME charset and value is coding-system.
-
-Following commands are available in addition to major mode commands:
-
-[make single part]
-\\[mime-editor/insert-text]	insert a text message.
-\\[mime-editor/insert-file]	insert a (binary) file.
-\\[mime-editor/insert-external]	insert a reference to external body.
-\\[mime-editor/insert-voice]	insert a voice message.
-\\[mime-editor/insert-message]	insert a mail or news message.
-\\[mime-editor/insert-mail]	insert a mail message.
-\\[mime-editor/insert-signature]	insert a signature file at end.
-\\[mime-editor/insert-key]	insert PGP public key.
-\\[mime-editor/insert-tag]	insert a new MIME tag.
-
-[make enclosure (maybe multipart)]
-\\[mime-editor/enclose-alternative-region]	enclose as multipart/alternative.
-\\[mime-editor/enclose-parallel-region]	enclose as multipart/parallel.
-\\[mime-editor/enclose-mixed-region]	enclose as multipart/mixed.
-\\[mime-editor/enclose-digest-region]	enclose as multipart/digest.
-\\[mime-editor/enclose-signed-region]	enclose as PGP signed.
-\\[mime-editor/enclose-encrypted-region]	enclose as PGP encrypted.
-\\[mime-editor/enclose-quote-region]	enclose as verbose mode (to avoid to expand tags)
-
-[other commands]
-\\[mime-editor/set-transfer-level-7bit]	set transfer-level as 7.
-\\[mime-editor/set-transfer-level-8bit]	set transfer-level as 8.
-\\[mime-editor/set-split]	set message splitting mode.
-\\[mime-editor/set-sign]	set PGP-sign mode.
-\\[mime-editor/set-encrypt]	set PGP-encryption mode.
-\\[mime-editor/preview-message]	preview editing MIME message.
-\\[mime-editor/exit]	exit and translate into a MIME compliant message.
-\\[mime-editor/help]	show this help.
-\\[mime-editor/maybe-translate]	exit and translate if in MIME mode, then split.
-
-Additional commands are available in some major modes:
-C-c C-c		exit, translate and run the original command.
-C-c C-s		exit, translate and run the original command.
-
-The following is a message example written in the tagged MIME format.
-TABs at the beginning of the line are not a part of the message:
-
-	This is a conventional plain text.  It should be translated
-	into text/plain.
-	--[[text/plain]]
-	This is also a plain text.  But, it is explicitly specified as
-	is.
-	--[[text/plain; charset=ISO-8859-1]]
-	This is also a plain text.  But charset is specified as
-	iso-8859-1.
-
-	�Hola!  Buenos d�as.  �C�mo est� usted?
-	--[[text/enriched]]
-	This is a <bold>enriched text</bold>.
-	--[[image/gif][base64]]...image encoded in base64 here...
-	--[[audio/basic][base64]]...audio encoded in base64 here...
-
-User customizable variables (not documented all of them):
- mime-prefix
-    Specifies a key prefix for MIME minor mode commands.
-
- mime-ignore-preceding-spaces
-    Preceding white spaces in a message body are ignored if non-nil.
-
- mime-ignore-trailing-spaces
-    Trailing white spaces in a message body are ignored if non-nil.
-
- mime-auto-hide-body
-    Hide a non-textual body message encoded in base64 after insertion
-    if non-nil.
-
- mime-editor/transfer-level
-    A number of network transfer level.  It should be bigger than 7.
-    If you are in 8bit-through environment, please set 8.
-
- mime-editor/voice-recorder
-    Specifies a function to record a voice message and encode it.
-    The function `mime-editor/voice-recorder-for-sun' is for Sun
-    SparcStations.
-
- mime/editor-mode-hook
-    Turning on MIME mode calls the value of mime/editor-mode-hook, if
-    it is non-nil.
-
- mime-editor/translate-hook
-    The value of mime-editor/translate-hook is called just before translating
-    the tagged MIME format into a MIME compliant message if it is
-    non-nil.  If the hook call the function mime-editor/insert-signature,
-    the signature file will be inserted automatically.
-
- mime-editor/exit-hook
-    Turning off MIME mode calls the value of mime-editor/exit-hook, if it is
-    non-nil." t nil)
-
-(defalias 'edit-mime 'mime/editor-mode)
-
-;;;***
-
-;;;### (autoloads (defadvice ad-add-advice) "advice" "utils/advice.el")
-
-(defvar ad-redefinition-action 'warn "\
-*Defines what to do with redefinitions during Advice de/activation.
-Redefinition occurs if a previously activated function that already has an
-original definition associated with it gets redefined and then de/activated.
-In such a case we can either accept the current definition as the new
-original definition, discard the current definition and replace it with the
-old original, or keep it and raise an error.  The values `accept', `discard',
-`error' or `warn' govern what will be done.  `warn' is just like `accept' but
-it additionally prints a warning message.  All other values will be
-interpreted as `error'.")
-
-(defvar ad-default-compilation-action 'maybe "\
-*Defines whether to compile advised definitions during activation.
-A value of `always' will result in unconditional compilation, `never' will
-always avoid compilation, `maybe' will compile if the byte-compiler is already
-loaded, and `like-original' will compile if the original definition of the
-advised function is compiled or a built-in function. Every other value will
-be interpreted as `maybe'. This variable will only be considered if the 
-COMPILE argument of `ad-activate' was supplied as nil.")
-
-(autoload 'ad-add-advice "advice" "\
-Adds a piece of ADVICE to FUNCTION's list of advices in CLASS.
-If FUNCTION already has one or more pieces of advice of the specified
-CLASS then POSITION determines where the new piece will go.  The value
-of POSITION can either be `first', `last' or a number where 0 corresponds
-to `first'.  Numbers outside the range will be mapped to the closest
-extreme position.  If there was already a piece of ADVICE with the same
-name, then the position argument will be ignored and the old advice
-will be overwritten with the new one.
-    If the FUNCTION was not advised already, then its advice info will be 
-initialized.  Redefining a piece of advice whose name is part of the cache-id
-will clear the cache." nil nil)
-
-(autoload 'defadvice "advice" "\
-Defines a piece of advice for FUNCTION (a symbol).
-The syntax of `defadvice' is as follows:
-
-  (defadvice FUNCTION (CLASS NAME [POSITION] [ARGLIST] FLAG...)
-    [DOCSTRING] [INTERACTIVE-FORM]
-    BODY... )
-
-FUNCTION ::= Name of the function to be advised.
-CLASS ::= `before' | `around' | `after' | `activation' | `deactivation'.
-NAME ::= Non-nil symbol that names this piece of advice.
-POSITION ::= `first' | `last' | NUMBER. Optional, defaults to `first',
-    see also `ad-add-advice'.
-ARGLIST ::= An optional argument list to be used for the advised function
-    instead of the argument list of the original.  The first one found in
-    before/around/after-advices will be used.
-FLAG ::= `protect'|`disable'|`activate'|`compile'|`preactivate'|`freeze'.
-    All flags can be specified with unambiguous initial substrings.
-DOCSTRING ::= Optional documentation for this piece of advice.
-INTERACTIVE-FORM ::= Optional interactive form to be used for the advised
-    function.  The first one found in before/around/after-advices will be used.
-BODY ::= Any s-expression.
-
-Semantics of the various flags:
-`protect': The piece of advice will be protected against non-local exits in
-any code that precedes it.  If any around-advice of a function is protected
-then automatically all around-advices will be protected (the complete onion).
-
-`activate': All advice of FUNCTION will be activated immediately if
-FUNCTION has been properly defined prior to this application of `defadvice'.
-
-`compile': In conjunction with `activate' specifies that the resulting
-advised function should be compiled.
-
-`disable': The defined advice will be disabled, hence, it will not be used 
-during activation until somebody enables it.
-
-`preactivate': Preactivates the advised FUNCTION at macro-expansion/compile
-time.  This generates a compiled advised definition according to the current
-advice state that will be used during activation if appropriate.  Only use
-this if the `defadvice' gets actually compiled.
-
-`freeze': Expands the `defadvice' into a redefining `defun/defmacro' according
-to this particular single advice.  No other advice information will be saved.
-Frozen advices cannot be undone, they behave like a hard redefinition of
-the advised function.  `freeze' implies `activate' and `preactivate'.  The
-documentation of the advised function can be dumped onto the `DOC' file
-during preloading.
-
-Look at the file `advice.el' for comprehensive documentation." nil 'macro)
-
-;;;***
-
-;;;### (autoloads (all-annotations annotation-list annotations-at annotations-in-region annotation-at annotationp delete-annotation make-annotation) "annotations" "utils/annotations.el")
-
-(defvar make-annotation-hook nil "\
-*Function or functions to run immediately after creating an annotation.")
-
-(defvar before-delete-annotation-hook nil "\
-*Function or functions to run immediately before deleting an annotation.")
-
-(defvar after-delete-annotation-hook nil "\
-*Function or functions to run immediately after deleting an annotation.")
-
-(autoload 'make-annotation "annotations" "\
-Create a marginal annotation, displayed using GLYPH, at position POS.
-GLYPH may be either a glyph object or a string.  Use layout policy
-LAYOUT and place the annotation in buffer BUFFER.  If POS is nil, point is
-used.  If LAYOUT is nil, `whitespace' is used.  If BUFFER is nil, the
-current buffer is used.  If WITH-EVENT is non-nil, then when an annotation
-is activated, the triggering event is passed as the second arg to the
-annotation function.  If D-GLYPH is non-nil then it is used as the glyph 
-that will be displayed when button1 is down.  If RIGHTP is non-nil then
-the glyph will be displayed on the right side of the buffer instead of the
-left." nil nil)
-
-(autoload 'delete-annotation "annotations" "\
-Remove ANNOTATION from its buffer.  This does not modify the buffer text." nil nil)
-
-(autoload 'annotationp "annotations" "\
-T if OBJECT is an annotation." nil nil)
-
-(autoload 'annotation-at "annotations" "\
-Return the first annotation at POS in BUFFER.
-BUFFER defaults to the current buffer.  POS defaults to point in BUFFER." nil nil)
-
-(autoload 'annotations-in-region "annotations" "\
-Return all annotations in BUFFER between START and END inclusively." nil nil)
-
-(autoload 'annotations-at "annotations" "\
-Return a list of all annotations at POS in BUFFER.
-If BUFFER is nil, the current buffer is used.  If POS is nil, point is used." nil nil)
-
-(autoload 'annotation-list "annotations" "\
-Return a list of all annotations in BUFFER.
-If BUFFER is nil, the current buffer is used." nil nil)
-
-(autoload 'all-annotations "annotations" "\
-Return a list of all annotations in existence." nil nil)
-
-;;;***
-
-;;;### (autoloads (batch-update-autoloads update-autoloads-from-directory update-autoloads-here update-file-autoloads generate-file-autoloads) "autoload" "utils/autoload.el")
-
-(autoload 'generate-file-autoloads "autoload" "\
-Insert at point a loaddefs autoload section for FILE.
-autoloads are generated for defuns and defmacros in FILE
-marked by `generate-autoload-cookie' (which see).
-If FILE is being visited in a buffer, the contents of the buffer
-are used." t nil)
-
-(autoload 'update-file-autoloads "autoload" "\
-Update the autoloads for FILE in `generated-autoload-file'
-\(which FILE might bind in its local variables)." t nil)
-
-(autoload 'update-autoloads-here "autoload" "\
-Update sections of the current buffer generated by `update-file-autoloads'." t nil)
-
-(autoload 'update-autoloads-from-directory "autoload" "\
-Update `generated-autoload-file' with all the current autoloads from DIR.
-This runs `update-file-autoloads' on each .el file in DIR.
-Obsolete autoload entries for files that no longer exist are deleted." t nil)
-
-(autoload 'batch-update-autoloads "autoload" "\
-Update the autoloads for the files or directories on the command line.
-Runs `update-file-autoloads' on files and `update-directory-autoloads'
-on directories.  Must be used only with -batch, and kills Emacs on completion.
-Each file will be processed even if an error occurred previously.
-For example, invoke `xemacs -batch -f batch-update-autoloads *.el'." nil nil)
-
-;;;***
-
-;;;### (autoloads (browse-url-lynx-emacs browse-url-lynx-xterm browse-url-w3 browse-url-iximosaic browse-url-grail browse-url-mosaic browse-url-netscape) "browse-url" "utils/browse-url.el")
-
-(defcustom browse-url-browser-function 'browse-url-w3 "*Function to display the current buffer in a WWW browser.\nUsed by the `browse-url-at-point', `browse-url-at-mouse', and\n`browse-url-of-file' commands." :type 'function :group 'browse-url)
-
-(autoload 'browse-url-netscape "browse-url" "\
-Ask the Netscape WWW browser to load URL.
-
-Default to the URL around or before point.  The strings in variable
-`browse-url-netscape-arguments' are also passed to Netscape.
-
-When called interactively, if variable `browse-url-new-window-p' is
-non-nil, load the document in a new Netscape window, otherwise use a
-random existing one.  A non-nil interactive prefix argument reverses
-the effect of browse-url-new-window-p.
-
-When called non-interactively, optional second argument NEW-WINDOW is
-used instead of browse-url-new-window-p." t nil)
-
-(autoload 'browse-url-mosaic "browse-url" "\
-Ask the XMosaic WWW browser to load URL.
-Default to the URL around or before point." t nil)
-
-(autoload 'browse-url-grail "browse-url" "\
-Ask the Grail WWW browser to load URL.
-Default to the URL around or before point.  Runs the program in the
-variable `browse-url-grail'." t nil)
-
-(autoload 'browse-url-iximosaic "browse-url" "\
-Ask the IXIMosaic WWW browser to load URL.
-Default to the URL around or before point." t nil)
-
-(autoload 'browse-url-w3 "browse-url" "\
-Ask the w3 WWW browser to load URL.
-Default to the URL around or before point." t nil)
-
-(autoload 'browse-url-lynx-xterm "browse-url" "\
-Ask the Lynx WWW browser to load URL.
-Default to the URL around or before point.  A new Lynx process is run
-in an Xterm window." t nil)
-
-(autoload 'browse-url-lynx-emacs "browse-url" "\
-Ask the Lynx WWW browser to load URL.
-Default to the URL around or before point.  Run a new Lynx process in
-an Emacs buffer." t nil)
-
-;;;***
-
-;;;### (autoloads (docref-setup) "docref" "utils/docref.el")
-
-(autoload 'docref-setup "docref" "\
-Process docref cross-references in the current buffer.
-See also \\(f@docref-subst)." t nil)
-
-;;;***
-
-;;;### (autoloads (easy-menu-define) "easymenu" "utils/easymenu.el")
-
-(autoload 'easy-menu-define "easymenu" "\
-Define a menu bar submenu in maps MAPS, according to MENU.
-The arguments SYMBOL and DOC are ignored; they are present for
-compatibility only.  SYMBOL is not evaluated.  In other Emacs versions
-these arguments may be used as a variable to hold the menu data, and a
-doc string for that variable.
-
-The first element of MENU must be a string.  It is the menu bar item name.
-The rest of the elements are menu items.
-
-A menu item is usually a vector of three elements:  [NAME CALLBACK ENABLE]
-
-NAME is a string--the menu item name.
-
-CALLBACK is a command to run when the item is chosen,
-or a list to evaluate when the item is chosen.
-
-ENABLE is an expression; the item is enabled for selection
-whenever this expression's value is non-nil.
-
-Alternatively, a menu item may have the form: 
-
-   [ NAME CALLBACK [ KEYWORD ARG ] ... ]
-
-Where KEYWORD is one of the symbol defined below.
-
-   :keys KEYS
-
-KEYS is a string; a complex keyboard equivalent to this menu item.
-
-   :active ENABLE
-
-ENABLE is an expression; the item is enabled for selection
-whenever this expression's value is non-nil.
-
-   :suffix NAME
-
-NAME is a string; the name of an argument to CALLBACK.
-
-   :style STYLE
-   
-STYLE is a symbol describing the type of menu item.  The following are
-defined:  
-
-toggle: A checkbox.  
-        Currently just prepend the name with the string \"Toggle \".
-radio: A radio button. 
-nil: An ordinary menu item.
-
-   :selected SELECTED
-
-SELECTED is an expression; the checkbox or radio button is selected
-whenever this expression's value is non-nil.
-Currently just disable radio buttons, no effect on checkboxes.
-
-A menu item can be a string.  Then that string appears in the menu as
-unselectable text.  A string consisting solely of hyphens is displayed
-as a solid horizontal line.
-
-A menu item can be a list.  It is treated as a submenu.
-The first element should be the submenu name.  That's used as the
-menu item in the top-level menu.  The cdr of the submenu list
-is a list of menu items, as above." nil 'macro)
-
-;;;***
-
-;;;### (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")
-
-(define-key ctl-x-map "\C-k" 'edit-kbd-macro)
-
-(autoload 'edit-kbd-macro "edmacro" "\
-Edit a keyboard macro.
-At the prompt, type any key sequence which is bound to a keyboard macro.
-Or, type `C-x e' or RET to edit the last keyboard macro, `C-h l' to edit
-the last 100 keystrokes as a keyboard macro, or `M-x' to edit a macro by
-its command name.
-With a prefix argument, format the macro in a more concise way." t nil)
-
-(autoload 'edit-last-kbd-macro "edmacro" "\
-Edit the most recently defined keyboard macro." t nil)
-
-(autoload 'edit-named-kbd-macro "edmacro" "\
-Edit a keyboard macro which has been given a name by `name-last-kbd-macro'." t nil)
-
-(autoload 'read-kbd-macro "edmacro" "\
-Read the region as a keyboard macro definition.
-The region is interpreted as spelled-out keystrokes, e.g., \"M-x abc RET\".
-See documentation for `edmacro-mode' for details.
-Leading/trailing \"C-x (\" and \"C-x )\" in the text are allowed and ignored.
-The resulting macro is installed as the \"current\" keyboard macro.
-
-In Lisp, may also be called with a single STRING argument in which case
-the result is returned rather than being installed as the current macro.
-The result will be a string if possible, otherwise an event vector.
-Second argument NEED-VECTOR means to return an event vector always." t nil)
-
-(autoload 'kbd "edmacro" "\
-Convert KEYS to the internal Emacs key representation." nil 'macro)
-
-(autoload 'format-kbd-macro "edmacro" "\
-Return the keyboard macro MACRO as a human-readable string.
-This string is suitable for passing to `read-kbd-macro'.
-Second argument VERBOSE means to put one command per line with comments.
-If VERBOSE is `1', put everything on one line.  If VERBOSE is omitted
-or nil, use a compact 80-column format." 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")
-
-(defcustom eldoc-mode nil "*If non-nil, show the defined parameters for the elisp function near point.\n\nFor the emacs lisp function at the beginning of the sexp which point is\nwithin, show the defined parameters for the function in the echo area.\nThis information is extracted directly from the function or macro if it is\nin pure lisp.  If the emacs function is a subr, the parameters are obtained\nfrom the documentation string if possible.\n\nIf point is over a documented variable, print that variable's docstring\ninstead.\n\nThis variable is buffer-local." :type 'boolean :group 'eldoc)
-
-(autoload 'eldoc-mode "eldoc" "\
-*Enable or disable eldoc mode.
-See documentation for the variable of the same name for more details.
-
-If called interactively with no prefix argument, toggle current condition
-of the mode.
-If called with a positive or negative prefix argument, enable or disable
-the mode, respectively." t nil)
-
-(autoload 'turn-on-eldoc-mode "eldoc" "\
-Unequivocally turn on eldoc-mode (see variable documentation)." t nil)
-
-;;;***
-
-;;;### (autoloads (elp-submit-bug-report elp-results elp-instrument-package elp-instrument-list elp-restore-function elp-instrument-function) "elp" "utils/elp.el")
-
-(autoload 'elp-instrument-function "elp" "\
-Instrument FUNSYM for profiling.
-FUNSYM must be a symbol of a defined function." t nil)
-
-(autoload 'elp-restore-function "elp" "\
-Restore an instrumented function to its original definition.
-Argument FUNSYM is the symbol of a defined function." t nil)
-
-(autoload 'elp-instrument-list "elp" "\
-Instrument for profiling, all functions in `elp-function-list'.
-Use optional LIST if provided instead." t nil)
-
-(autoload 'elp-instrument-package "elp" "\
-Instrument for profiling, all functions which start with PREFIX.
-For example, to instrument all ELP functions, do the following:
-
-    \\[elp-instrument-package] RET elp- RET" t nil)
-
-(autoload 'elp-results "elp" "\
-Display current profiling results.
-If `elp-reset-after-results' is non-nil, then current profiling
-information for all instrumented functions are reset after results are
-displayed." t nil)
-
-(autoload 'elp-submit-bug-report "elp" "\
-Submit via mail, a bug report on elp." t nil)
-
-;;;***
-
-;;;### (autoloads (list-colors-display facemenu-read-color list-text-properties-at facemenu-remove-special facemenu-remove-props facemenu-set-read-only facemenu-set-intangible facemenu-set-invisible facemenu-make-much-smaller facemenu-make-much-larger facemenu-make-smaller facemenu-make-larger facemenu-set-size-default facemenu-set-face-from-menu facemenu-set-background facemenu-set-foreground facemenu-set-face) "facemenu" "utils/facemenu.el")
-
-(define-key ctl-x-map "F" 'facemenu-keymap)
-
-(defvar facemenu-menu nil "\
-Facemenu top-level menu keymap.")
-
-(defvar facemenu-keymap (let ((map (make-sparse-keymap "Set face"))) (define-key map ?o 'facemenu-set-face) map) "\
-Keymap for face-changing commands.
-`Facemenu-update' fills in the keymap according to the bindings
-requested in `facemenu-keybindings'.")
-
-(autoload 'facemenu-set-face "facemenu" "\
-Add FACE to the region or next character typed.
-It will be added to the top of the face list; any faces lower on the list that
-will not show through at all will be removed.
-
-Interactively, the face to be used is read with the minibuffer.
-
-If the region is active and there is no prefix argument,
-this command sets the region to the requested face.
-
-Otherwise, this command specifies the face for the next character
-inserted.  Moving point or switching buffers before
-typing a character to insert cancels the specification." t nil)
-
-(autoload 'facemenu-set-foreground "facemenu" "\
-Set the foreground color of the region or next character typed.
-The color is prompted for.  A face named `fg:color' is used (or created).
-If the region is active, it will be set to the requested face.  If
-it is inactive (even if mark-even-if-inactive is set) the next
-character that is typed (via `self-insert-command') will be set to
-the selected face.  Moving point or switching buffers before
-typing a character cancels the request." t nil)
-
-(autoload 'facemenu-set-background "facemenu" "\
-Set the background color of the region or next character typed.
-The color is prompted for.  A face named `bg:color' is used (or created).
-If the region is active, it will be set to the requested face.  If
-it is inactive (even if mark-even-if-inactive is set) the next
-character that is typed (via `self-insert-command') will be set to
-the selected face.  Moving point or switching buffers before
-typing a character cancels the request." t nil)
-
-(autoload 'facemenu-set-face-from-menu "facemenu" "\
-Set the face of the region or next character typed.
-This function is designed to be called from a menu; the face to use
-is the menu item's name.
-
-If the region is active and there is no prefix argument,
-this command sets the region to the requested face.
-
-Otherwise, this command specifies the face for the next character
-inserted.  Moving point or switching buffers before
-typing a character to insert cancels the specification." t nil)
-
-(autoload 'facemenu-set-size-default "facemenu" nil t nil)
-
-(autoload 'facemenu-make-larger "facemenu" nil t nil)
-
-(autoload 'facemenu-make-smaller "facemenu" nil t nil)
-
-(autoload 'facemenu-make-much-larger "facemenu" nil t nil)
-
-(autoload 'facemenu-make-much-smaller "facemenu" nil t nil)
-
-(autoload 'facemenu-set-invisible "facemenu" "\
-Make the region invisible.
-This sets the `invisible' text property; it can be undone with
-`facemenu-remove-special'." t nil)
-
-(autoload 'facemenu-set-intangible "facemenu" "\
-Make the region intangible: disallow moving into it.
-This sets the `intangible' text property; it can be undone with
-`facemenu-remove-special'." t nil)
-
-(autoload 'facemenu-set-read-only "facemenu" "\
-Make the region unmodifiable.
-This sets the `read-only' text property; it can be undone with
-`facemenu-remove-special'." t nil)
-
-(autoload 'facemenu-remove-props "facemenu" "\
-Remove all text properties that facemenu added to region." t nil)
-
-(autoload 'facemenu-remove-special "facemenu" "\
-Remove all the \"special\" text properties from the region.
-These special properties include `invisible', `intangible' and `read-only'." t nil)
-
-(autoload 'list-text-properties-at "facemenu" "\
-Pop up a buffer listing text-properties at LOCATION." t nil)
-
-(autoload 'facemenu-read-color "facemenu" "\
-Read a color using the minibuffer." nil nil)
-
-(autoload 'list-colors-display "facemenu" "\
-Display names of defined colors, and show what they look like.
-If the optional argument LIST is non-nil, it should be a list of
-colors to display.  Otherwise, this command computes a list
-of colors that the current display can handle." t nil)
-
-;;;***
-
-;;;### (autoloads (floating-toolbar-from-extent-or-popup-mode-menu floating-toolbar-or-popup-mode-menu floating-toolbar) "floating-toolbar" "utils/floating-toolbar.el")
-
-(autoload 'floating-toolbar "floating-toolbar" "\
-Popup a toolbar near the current mouse position.
-The toolbar instantiator used is taken from the 'floating-toolbar
-property of any extent under the mouse.  If no such non-nil
-property exists for any extent under the mouse, then the value of the
-variable `floating-toolbar' is checked.  If its value si nil, then
-no toolbar will be displayed.
-
-This command should be bound to a button press event.
-
-When called from a program, first arg EVENT should be the button
-press event.  Optional second arg EXTENT-LOCAL-ONLY specifies
-that only extent local toolbars should be used; this means the
-`floating-toolbar' variable will not be consulted." t nil)
-
-(autoload 'floating-toolbar-or-popup-mode-menu "floating-toolbar" "\
-Like floating-toolbar, but if no toolbar is displayed
-run popup-mode-menu." t nil)
-
-(autoload 'floating-toolbar-from-extent-or-popup-mode-menu "floating-toolbar" "\
-Like floating-toolbar-or-popup-mode-menu, but search only for an
-extent local toolbar." t nil)
-
-;;;***
-
-;;;### (autoloads (enable-flow-control-on enable-flow-control) "flow-ctrl" "utils/flow-ctrl.el")
-
-(autoload 'enable-flow-control "flow-ctrl" "\
-Toggle flow control handling.
-When handling is enabled, user can type C-s as C-\\, and C-q as C-^.
-With arg, enable flow control mode if arg is positive, otherwise disable." t nil)
-
-(autoload 'enable-flow-control-on "flow-ctrl" "\
-Enable flow control if using one of a specified set of terminal types.
-Use `(enable-flow-control-on \"vt100\" \"h19\")' to enable flow control
-on VT-100 and H19 terminals.  When flow control is enabled,
-you must type C-\\ to get the effect of a C-s, and type C-^
-to get the effect of a C-q.
-
-This function has no effect unless the current device is a tty.
-
-The tty terminal type is determined from the TERM environment variable.
-Trailing hyphens and everything following is stripped, so a TERM
-value of \"vt100-nam\" is treated the same as \"vt100\"." nil nil)
-
-;;;***
-
-;;;### (autoloads (forms-find-file-other-window forms-find-file forms-mode) "forms" "utils/forms.el")
-
-(autoload 'forms-mode "forms" "\
-Major mode to visit files in a field-structured manner using a form.
-
-Commands:                        Equivalent keys in read-only mode:
- TAB            forms-next-field          TAB
- \\C-c TAB       forms-next-field          
- \\C-c <         forms-first-record         <
- \\C-c >         forms-last-record          >
- \\C-c ?         describe-mode              ?
- \\C-c \\C-k      forms-delete-record
- \\C-c \\C-q      forms-toggle-read-only     q
- \\C-c \\C-o      forms-insert-record
- \\C-c \\C-l      forms-jump-record          l
- \\C-c \\C-n      forms-next-record          n
- \\C-c \\C-p      forms-prev-record          p
- \\C-c \\C-r      forms-search-backward      r
- \\C-c \\C-s      forms-search-forward       s
- \\C-c \\C-x      forms-exit                 x
-" t nil)
-
-(autoload 'forms-find-file "forms" "\
-Visit a file in Forms mode." t nil)
-
-(autoload 'forms-find-file-other-window "forms" "\
-Visit a file in Forms mode in other window." t nil)
-
-;;;***
-
-;;;### (autoloads (unhide-copyleft-region hide-copyleft-region) "hide-copyleft" "utils/hide-copyleft.el")
-
-(autoload 'hide-copyleft-region "hide-copyleft" "\
-Make the legal drivel at the front of this file invisible.  Unhide it again
-with C-u \\[hide-copyleft-region]." t nil)
-
-(autoload 'unhide-copyleft-region "hide-copyleft" "\
-If the legal nonsense at the top of this file is elided, make it visible again." nil nil)
-
-;;;***
-
-;;;### (autoloads (highlight-headers-follow-url highlight-headers-follow-url-mosaic highlight-headers-follow-url-netscape highlight-headers) "highlight-headers" "utils/highlight-headers.el")
-
-(autoload 'highlight-headers "highlight-headers" "\
-Highlight message headers between start and end.
-Faces used:
-  message-headers			the part before the colon
-  message-header-contents		the part after the colon
-  message-highlighted-header-contents	contents of \"special\" headers
-  message-cited-text			quoted text from other messages
-
-Variables used:
-
-  highlight-headers-regexp			what makes a \"special\" header
-  highlight-headers-citation-regexp		matches lines of quoted text
-  highlight-headers-citation-header-regexp	matches headers for quoted text
-
-If HACK-SIG is true,then we search backward from END for something that
-looks like the beginning of a signature block, and don't consider that a
-part of the message (this is because signatures are often incorrectly
-interpreted as cited text.)" nil nil)
-
-(autoload 'highlight-headers-follow-url-netscape "highlight-headers" nil nil nil)
-
-(autoload 'highlight-headers-follow-url-mosaic "highlight-headers" nil nil nil)
-
-(autoload 'highlight-headers-follow-url "highlight-headers" nil t nil)
-
-;;;***
-
-;;;### (autoloads (id-select-double-click-hook id-select-and-kill-thing id-select-and-copy-thing id-select-goto-matching-tag id-select-thing-with-mouse id-select-thing) "id-select" "utils/id-select.el")
-
-(autoload 'id-select-thing "id-select" "\
-Mark the region selected by the syntax of the thing at point.
-If invoked repeatedly, selects bigger and bigger things.
-If `id-select-display-type' is non-nil, the type of selection is displayed in
-the minibuffer." t nil)
-
-(autoload 'id-select-thing-with-mouse "id-select" "\
-Select a region based on the syntax of the character from a mouse click.
-If the click occurs at the same point as the last click, select
-the next larger syntactic structure.  If `id-select-display-type' is non-nil,
-the type of selection is displayed in the minibuffer." t nil)
-
-(autoload 'id-select-goto-matching-tag "id-select" "\
-If in a major mode listed in `id-select-markup-modes,' moves point to the start of the tag paired with the closest tag that point is within or precedes.
-Returns t if point is moved, else nil.
-Signals an error if no tag is found following point or if the closing tag
-does not have a `>' terminator character." t nil)
-
-(autoload 'id-select-and-copy-thing "id-select" "\
-Copy the region surrounding the syntactical unit at point." t nil)
-
-(autoload 'id-select-and-kill-thing "id-select" "\
-Kill the region surrounding the syntactical unit at point." t nil)
-
-(autoload 'id-select-double-click-hook "id-select" "\
-Select a region based on the syntax of the character wherever the mouse is double-clicked.
-If the double-click occurs at the same point as the last double-click, select
-the next larger syntactic structure.  If `id-select-display-type' is non-nil,
-the type of selection is displayed in the minibuffer." nil nil)
-
-;;;***
-
-;;;### (autoloads (unload-feature) "loadhist" "utils/loadhist.el")
-
-(autoload 'unload-feature "loadhist" "\
-Unload the library that provided FEATURE, restoring all its autoloads.
-If the feature is required by any other loaded code, and optional FORCE
-is nil, raise an error." t nil)
-
-;;;***
-
-;;;### (autoloads (what-domain mail-extract-address-components) "mail-extr" "utils/mail-extr.el")
-
-(autoload 'mail-extract-address-components "mail-extr" "\
-Given an RFC-822 ADDRESS, extract full name and canonical address.
-Returns a list of the form (FULL-NAME CANONICAL-ADDRESS).
-If no name can be extracted, FULL-NAME will be nil.
-ADDRESS may be a string or a buffer.  If it is a buffer, the visible 
- (narrowed) portion of the buffer will be interpreted as the address.
- (This feature exists so that the clever caller might be able to avoid
- consing a string.)
-If ADDRESS contains more than one RFC-822 address, only the first is
- returned.  Some day this function may be extended to extract multiple
- addresses, or perhaps return the position at which parsing stopped." nil nil)
-
-(autoload 'what-domain "mail-extr" "\
-Prompts for a mail domain, and prints the country it corresponds to
-in the minibuffer." t nil)
-
-;;;***
-
-;;;### (autoloads (mail-fetch-field mail-file-babyl-p) "mail-utils" "utils/mail-utils.el")
-
-(defvar mail-use-rfc822 nil "\
-*If non-nil, use a full, hairy RFC822 parser on mail addresses.
-Otherwise, (the default) use a smaller, somewhat faster, and
-often correct parser.")
-
-(autoload 'mail-file-babyl-p "mail-utils" nil nil nil)
-
-(autoload 'mail-fetch-field "mail-utils" "\
-Return the value of the header field FIELD-NAME.
-The buffer is expected to be narrowed to just the headers of the message.
-If second arg LAST is non-nil, use the last such field if there are several.
-If third arg ALL is non-nil, concatenate all such fields with commas between." nil nil)
-
-;;;***
-
-;;;### (autoloads (read-passwd) "passwd" "utils/passwd.el")
-
-(autoload 'read-passwd "passwd" "\
-Prompts for a password in the minibuffer, and returns it as a string.
-If PROMPT may be a prompt string or an alist of elements 
-'(prompt . default).
-If optional arg CONFIRM is true, then ask the user to type the password
-again to confirm that they typed it correctly.
-If optional arg DEFAULT is provided, then it is a string to insert as
-the default choice (it is not, of course, displayed.)
-
-If running under X, the keyboard will be grabbed (with XGrabKeyboard())
-to reduce the possibility that eavesdropping is occuring.
-
-When reading a password, all keys self-insert, except for:
-\\<read-passwd-map>
-	\\[read-passwd-erase-line]	Erase the entire line.
-	\\[quoted-insert]	Insert the next character literally.
-	\\[delete-backward-char]	Delete the previous character.
-	\\[exit-minibuffer]	Accept what you have typed.
-	\\[keyboard-quit]	Abort the command.
-
-The returned value is always a newly-created string.  No additional copies
-of the password remain after this function has returned.
-
-NOTE: unless great care is taken, the typed password will exist in plaintext
-form in the running image for an arbitrarily long time.  Priveleged users may
-be able to extract it from memory.  If emacs crashes, it may appear in the
-resultant core file.
-
-Some steps you can take to prevent the password from being copied around:
-
- - as soon as you are done with the returned string, destroy it with
-   (fillarray string 0).  The same goes for any default passwords
-   or password histories.
-
- - do not copy the string, as with concat or substring - if you do, be
-   sure to keep track of and destroy all copies.
-
- - do not insert the password into a buffer - if you do, be sure to 
-   overwrite the buffer text before killing it, as with the functions 
-   `passwd-erase-buffer' or `passwd-kill-buffer'.  Note that deleting
-   the text from the buffer does NOT necessarily remove the text from
-   memory.
-
- - be careful of the undo history - if you insert the password into a 
-   buffer which has undo recording turned on, the password will be 
-   copied onto the undo list, and thus recoverable.
-
- - do not pass it as an argument to a shell command - anyone will be
-   able to see it if they run `ps' at the right time.
-
-Note that the password will be temporarily recoverable with the `view-lossage'
-command.  This data will not be overwritten until another hundred or so 
-characters are typed.  There's not currently a way around this." nil nil)
-
-;;;***
-
-;;;### (autoloads (pp-eval-last-sexp pp-eval-expression pp) "pp" "utils/pp.el")
-
-(defalias 'pprint 'pp)
-
-(autoload 'pp "pp" "\
-Output the pretty-printed representation of OBJECT, any Lisp object.
-Quoting characters are printed when needed to make output that `read'
-can handle, whenever this is possible.
-Output stream is STREAM, or value of `standard-output' (which see)." nil nil)
-
-(autoload 'pp-eval-expression "pp" "\
-Evaluate EXPRESSION and pretty-print value into a new display buffer.
-If the pretty-printed value fits on one line, the message line is used
-instead.  Value is also consed on to front of variable  values 's
-value." t nil)
-
-(autoload 'pp-eval-last-sexp "pp" "\
-Run `pp-eval-expression' on sexp before point (which see).
-With argument, pretty-print output into current buffer.
-Ignores leading comment characters." t nil)
-
-;;;***
-
-;;;### (autoloads (prettyexpand-all-sexp prettyexpand-sexp macroexpand-all-sexp macroexpand-sexp pp-plist pp-variable pp-function) "pretty-print" "utils/pretty-print.el")
-
-(autoload 'pp-function "pretty-print" "\
-Pretty print the function definition of SYMBOL in a separate buffer" t nil)
-
-(autoload 'pp-variable "pretty-print" "\
-Pretty print the variable value of SYMBOL in a separate buffer" t nil)
-
-(autoload 'pp-plist "pretty-print" "\
-Pretty print the property list of SYMBOL in a separate buffer" t nil)
-
-(autoload 'macroexpand-sexp "pretty-print" "\
-Macro expand the sexpression following point. Pretty print expansion in a
-temporary buffer. With prefix argument, replace the original
-sexpression by its expansion in the current buffer." t nil)
-
-(autoload 'macroexpand-all-sexp "pretty-print" "\
-Macro expand recursively the sexpression following point. Pretty print
-expansion in a temporary buffer. With prefix argument, replace the
-original sexpression by its expansion in the current buffer." t nil)
-
-(autoload 'prettyexpand-sexp "pretty-print" "\
-Macro expand the sexpression following point. Pretty print expansion
-in a temporary buffer. With prefix argument, replace the original
-sexpression by its expansion in the current buffer.  
-	However, calls to macros specified in the variable
-`pp-shadow-expansion-list' are not expanded, in order to make the code
-look nicer." t nil)
-
-(autoload 'prettyexpand-all-sexp "pretty-print" "\
-Macro expand recursively the sexpression following point. Pretty print
-expansion in a temporary buffer. With prefix argument, replace the
-original sexpression by its expansion in the current buffer.
-	However, calls to macros specified in the variable
-`pp-shadow-expansion-list' are not expanded, in order to make the code
-look nicer." t nil)
-
-;;;***
-
-;;;### (autoloads (reporter-submit-bug-report) "reporter" "utils/reporter.el")
-
-(autoload 'reporter-submit-bug-report "reporter" nil nil nil)
-
-;;;***
-
-;;;### (autoloads (make-ring ringp) "ring" "utils/ring.el")
-
-(autoload 'ringp "ring" "\
-Returns t if X is a ring; nil otherwise." nil nil)
-
-(define-obsolete-function-alias 'ring-p 'ringp)
-
-(autoload 'make-ring "ring" "\
-Make a ring that can contain SIZE elements." nil nil)
-
-;;;***
-
-;;;### (autoloads (savehist-save savehist-load) "savehist" "utils/savehist.el")
-
-(autoload 'savehist-load "savehist" "\
-Load the histories saved to `savehist-file'.
-Unless PREFIX is non-nil, the function will also add the save function to
-`kill-emacs-hook'.
-
-This function should be normally used from your Emacs init file.  Since it
-removes your current minibuffer histories (if any), it is unwise to call it
-at any other time." t nil)
-
-(autoload 'savehist-save "savehist" "\
-Save the histories from `savehist-history-variables' to `savehist-file'.
-A variable will be saved if it is bound and non-nil." t nil)
-
-;;;***
-
-;;;### (autoloads (skeleton-pair-insert-maybe skeleton-insert skeleton-proxy skeleton-proxy-new define-skeleton) "skeleton" "utils/skeleton.el")
-
-(defvar skeleton-filter 'identity "\
-Function for transforming a skeleton proxy's aliases' variable value.")
-
-(autoload 'define-skeleton "skeleton" "\
-Define a user-configurable COMMAND that enters a statement skeleton.
-DOCUMENTATION is that of the command, while the variable of the same name,
-which contains the skeleton, has a documentation to that effect.
-INTERACTOR and ELEMENT ... are as defined under `skeleton-insert'." nil 'macro)
-
-(autoload 'skeleton-proxy-new "skeleton" "\
-Insert skeleton defined by variable of same name (see `skeleton-insert').
-Prefix ARG allows wrapping around words or regions (see `skeleton-insert').
-If no ARG was given, but the region is visible, ARG defaults to -1 depending
-on `skeleton-autowrap'.  An ARG of  M-0  will prevent this just for once.
-This command can also be an abbrev expansion (3rd and 4th columns in
-\\[edit-abbrevs]  buffer: \"\"  command-name).
- 
-When called as a function, optional first argument STR may also be a string
-which will be the value of `str' whereas the skeleton's interactor is then
-ignored." t nil)
-
-(autoload 'skeleton-proxy "skeleton" "\
-Insert skeleton defined by variable of same name (see `skeleton-insert').
-Prefix ARG allows wrapping around words or regions (see `skeleton-insert').
-If no ARG was given, but the region is visible, ARG defaults to -1 depending
-on `skeleton-autowrap'.  An ARG of  M-0  will prevent this just for once.
-This command can also be an abbrev expansion (3rd and 4th columns in
-\\[edit-abbrevs]  buffer: \"\"  command-name).
-
-When called as a function, optional first argument STR may also be a string
-which will be the value of `str' whereas the skeleton's interactor is then
-ignored." t nil)
-
-(autoload 'skeleton-insert "skeleton" "\
-Insert the complex statement skeleton SKELETON describes very concisely.
-
-With optional third REGIONS wrap first interesting point (`_') in skeleton
-around next REGIONS words, if REGIONS is positive.  If REGIONS is negative,
-wrap REGIONS preceding interregions into first REGIONS interesting positions
-\(successive `_'s) in skeleton.  An interregion is the stretch of text between
-two contiguous marked points.  If you marked A B C [] (where [] is the cursor)
-in alphabetical order, the 3 interregions are simply the last 3 regions.  But
-if you marked B A [] C, the interregions are B-A, A-[], []-C.
-
-Optional fourth STR is the value for the variable `str' within the skeleton.
-When this is non-`nil' the interactor gets ignored, and this should be a valid
-skeleton element.
-
-SKELETON is made up as (INTERACTOR ELEMENT ...).  INTERACTOR may be nil if
-not needed, a prompt-string or an expression for complex read functions.
-
-If ELEMENT is a string or a character it gets inserted (see also
-`skeleton-transformation').  Other possibilities are:
-
-	\\n	go to next line and indent according to mode
-	_	interesting point, interregion here, point after termination
-	>	indent line (or interregion if > _) according to major mode
-	&	do next ELEMENT if previous moved point
-	|	do next ELEMENT if previous didn't move point
-	-num	delete num preceding characters (see `skeleton-untabify')
-	resume:	skipped, continue here if quit is signaled
-	nil	skipped
-
-Further elements can be defined via `skeleton-further-elements'.  ELEMENT may
-itself be a SKELETON with an INTERACTOR.  The user is prompted repeatedly for
-different inputs.  The SKELETON is processed as often as the user enters a
-non-empty string.  \\[keyboard-quit] terminates skeleton insertion, but
-continues after `resume:' and positions at `_' if any.  If INTERACTOR in such
-a subskeleton is a prompt-string which contains a \".. %s ..\" it is
-formatted with `skeleton-subprompt'.  Such an INTERACTOR may also a list of
-strings with the subskeleton being repeated once for each string.
-
-Quoted Lisp expressions are evaluated evaluated for their side-effect.
-Other Lisp expressions are evaluated and the value treated as above.
-Note that expressions may not return `t' since this implies an
-endless loop.  Modes can define other symbols by locally setting them
-to any valid skeleton element.  The following local variables are
-available:
-
-	str	first time: read a string according to INTERACTOR
-		then: insert previously read string once more
-	help	help-form during interaction with the user or `nil'
-	input	initial input (string or cons with index) while reading str
-	v1, v2	local variables for memorizing anything you want
-
-When done with skeleton, but before going back to `_'-point call
-`skeleton-end-hook' if that is non-`nil'." nil nil)
-
-(autoload 'skeleton-pair-insert-maybe "skeleton" "\
-Insert the character you type ARG times.
-
-With no ARG, if `skeleton-pair' is non-nil, pairing can occur.  If the region
-is visible the pair is wrapped around it depending on `skeleton-autowrap'.
-Else, if `skeleton-pair-on-word' is non-nil or we are not before or inside a
-word, and if `skeleton-pair-filter' returns nil, pairing is performed.
-
-If a match is found in `skeleton-pair-alist', that is inserted, else
-the defaults are used.  These are (), [], {}, <> and `' for the
-symmetrical ones, and the same character twice for the others." t nil)
-
-;;;***
-
-;;;### (autoloads (speedbar-frame-mode) "speedbar" "utils/speedbar.el")
-
-(autoload 'speedbar-frame-mode "speedbar" "\
-Enable or disable use of a speedbar.  Positive number means turn
-on, negative turns speedbar off, and nil means toggle.  Once the
-speedbar frame is activated, a buffer in `speedbar-mode' will be
-displayed.  Currently, only one speedbar is supported at a time." t nil)
-
-;;;***
-
-;;;### (autoloads nil "timezone" "utils/timezone.el")
-
-(define-error 'invalid-date "Invalid date string")
-
-;;;***
-
-;;;### (autoloads (tq-create) "tq" "utils/tq.el")
-
-(autoload 'tq-create "tq" "\
-Create and return a transaction queue communicating with PROCESS.
-PROCESS should be a subprocess capable of sending and receiving
-streams of bytes.  It may be a local process, or it may be connected
-to a tcp server on another machine." nil nil)
-
-;;;***
-
-;;;### (autoloads (trace-function-background trace-function) "trace" "utils/trace.el")
-
-(defvar trace-buffer "*trace-output*" "\
-*Trace output will by default go to that buffer.")
-
-(autoload 'trace-function "trace" "\
-Traces FUNCTION with trace output going to BUFFER.
-For every call of FUNCTION Lisp-style trace messages that display argument
-and return values will be inserted into BUFFER. This function generates the
-trace advice for FUNCTION and activates it together with any other advice
-there might be!! The trace BUFFER will popup whenever FUNCTION is called.
-Do not use this to trace functions that switch buffers or do any other
-display oriented stuff, use `trace-function-background' instead." t nil)
-
-(autoload 'trace-function-background "trace" "\
-Traces FUNCTION with trace output going quietly to BUFFER.
-For every call of FUNCTION Lisp-style trace messages that display argument
-and return values will be inserted into BUFFER. This function generates the
-trace advice for FUNCTION and activates it together with any other advice
-there might be!! Trace output will quietly go to BUFFER without changing
-the window or buffer configuration at all." t nil)
-
-;;;***
-
-;;;### (autoloads (xbm-button-create) "xbm-button" "utils/xbm-button.el")
-
-(autoload 'xbm-button-create "xbm-button" "\
-Returns a list of XBM image instantiators for a button displaying TEXT.
-The list is of the form
-   (UP DOWN DISABLED)
-where UP, DOWN, and DISABLED are the up, down and disabled image
-instantiators for the button.
-
-BORDER-THICKNESS specifies how many pixels should be used for the
-borders on the edges of the buttons.  It should be a positive integer,
-or 0 to mean no border." nil nil)
-
-;;;***
-
-;;;### (autoloads (xpm-button-create) "xpm-button" "utils/xpm-button.el")
-
-(autoload 'xpm-button-create "xpm-button" "\
-Returns a list of XPM image instantiators for a button displaying TEXT.
-The list is of the form
-   (UP DOWN DISABLED)
-where UP, DOWN, and DISABLED are the up, down and disabled image
-instantiators for the button.
-
-SHADOW-THICKNESS specifies how many pixels should be used for the
-shadows on the edges of the buttons.  It should be a positive integer,
-or 0 to mean no shadows on the edges.
-FG-COLOR is the color used to display the text.  It should be a string.
-BG-COLOR is the background color the text will be displayed upon.
-It should be a string." nil nil)
-
-;;;***
-
-;;;### (autoloads (viper-mode) "viper" "viper/viper.el")
-
-(autoload 'viper-mode "viper" "\
-Turn on Viper emulation of Vi." t nil)
-
-(defalias 'vip-mode 'viper-mode)
-
-;;;***
-
-;;;### (autoloads (vm-easy-menu-create-keymaps vm-easy-menu-define) "vm-easymenu" "vm/vm-easymenu.el")
-
-(autoload 'vm-easy-menu-define "vm-easymenu" "\
-Define a menu bar submenu in maps MAPS, according to MENU.
-The menu keymap is stored in symbol SYMBOL, both as its value
-and as its function definition.   DOC is used as the doc string for SYMBOL.
-
-The first element of MENU must be a string.  It is the menu bar item name.
-The rest of the elements are menu items.
-
-A menu item is usually a vector of three elements:  [NAME CALLBACK ENABLE]
-
-NAME is a string--the menu item name.
-
-CALLBACK is a command to run when the item is chosen,
-or a list to evaluate when the item is chosen.
-
-ENABLE is an expression; the item is enabled for selection
-whenever this expression's value is non-nil.
-
-Alternatively, a menu item may have the form: 
-
-   [ NAME CALLBACK [ KEYWORD ARG ] ... ]
-
-Where KEYWORD is one of the symbol defined below.
-
-   :keys KEYS
-
-KEYS is a string; a complex keyboard equivalent to this menu item.
-This is normally not needed because keyboard equivalents are usually
-computed automatically.
-
-   :active ENABLE
-
-ENABLE is an expression; the item is enabled for selection
-whenever this expression's value is non-nil.
-
-   :suffix NAME
-
-NAME is a string; the name of an argument to CALLBACK.
-
-   :style 
-   
-STYLE is a symbol describing the type of menu item.  The following are
-defined:  
-
-toggle: A checkbox.  
-        Currently just prepend the name with the string \"Toggle \".
-radio: A radio button. 
-nil: An ordinary menu item.
-
-   :selected SELECTED
-
-SELECTED is an expression; the checkbox or radio button is selected
-whenever this expression's value is non-nil.
-Currently just disable radio buttons, no effect on checkboxes.
-
-A menu item can be a string.  Then that string appears in the menu as
-unselectable text.  A string consisting solely of hyphens is displayed
-as a solid horizontal line.
-
-A menu item can be a list.  It is treated as a submenu.
-The first element should be the submenu name.  That's used as the
-menu item in the top-level menu.  The cdr of the submenu list
-is a list of menu items, as above." nil 'macro)
-
-(autoload 'vm-easy-menu-create-keymaps "vm-easymenu" nil nil nil)
-
-;;;***
-
-;;;### (autoloads (x-font-build-cache font-default-size-for-device font-default-encoding-for-device font-default-registry-for-device font-default-family-for-device font-default-object-for-device font-default-font-for-device font-create-object) "font" "w3/font.el")
-
-(autoload 'font-create-object "font" nil nil nil)
-
-(autoload 'font-default-font-for-device "font" nil nil nil)
-
-(autoload 'font-default-object-for-device "font" nil nil nil)
-
-(autoload 'font-default-family-for-device "font" nil nil nil)
-
-(autoload 'font-default-registry-for-device "font" nil nil nil)
-
-(autoload 'font-default-encoding-for-device "font" nil nil nil)
-
-(autoload 'font-default-size-for-device "font" nil nil nil)
-
-(autoload 'x-font-build-cache "font" nil nil nil)
-
-;;;***
-
-;;;### (autoloads (url-cache-expired url-cache-extract url-is-cached url-store-in-cache) "url-cache" "w3/url-cache.el")
-
-(autoload 'url-store-in-cache "url-cache" "\
-Store buffer BUFF in the cache" nil nil)
-
-(autoload 'url-is-cached "url-cache" "\
-Return non-nil if the URL is cached." nil nil)
-
-(autoload 'url-cache-extract "url-cache" "\
-Extract FNAM from the local disk cache" nil nil)
-
-(autoload 'url-cache-expired "url-cache" "\
-Return t iff a cached file has expired." nil nil)
-
-;;;***
-
-;;;### (autoloads (url-gateway-nslookup-host) "url-gw" "w3/url-gw.el")
-
-(autoload 'url-gateway-nslookup-host "url-gw" "\
-Attempt to resolve the given HOSTNAME using nslookup if possible." t nil)
-
-;;;***
-
-;;;### (autoloads (url-retrieve url-popup-info url-get-url-at-point url-buffer-visiting url-normalize-url url-file-attributes) "url" "w3/url.el")
-
-(autoload 'url-file-attributes "url" "\
-Return a list of attributes of URL.
-Value is nil if specified file cannot be opened.
-Otherwise, list elements are:
- 0. t for directory, string (name linked to) for symbolic link, or nil.
- 1. Number of links to file.
- 2. File uid.
- 3. File gid.
- 4. Last access time, as a list of two integers.
-  First integer has high-order 16 bits of time, second has low 16 bits.
- 5. Last modification time, likewise.
- 6. Last status change time, likewise.
- 7. Size in bytes. (-1, if number is out of range).
- 8. File modes, as a string of ten letters or dashes as in ls -l.
-    If URL is on an http server, this will return the content-type if possible.
- 9. t iff file's gid would change if file were deleted and recreated.
-10. inode number.
-11. Device number.
-
-If file does not exist, returns nil." nil nil)
-
-(autoload 'url-normalize-url "url" "\
-Return a 'normalized' version of URL.  This strips out default port
-numbers, etc." nil nil)
-
-(autoload 'url-buffer-visiting "url" "\
-Return the name of a buffer (if any) that is visiting URL." nil nil)
-
-(autoload 'url-get-url-at-point "url" "\
-Get the URL closest to point, but don't change your
-position. Has a preference for looking backward when not
-directly on a symbol." nil nil)
-
-(autoload 'url-popup-info "url" "\
-Retrieve the HTTP/1.0 headers and display them in a temp buffer." nil nil)
-
-(autoload 'url-retrieve "url" "\
-Retrieve a document over the World Wide Web.
-The document should be specified by its fully specified
-Uniform Resource Locator.  No parsing is done, just return the
-document as the server sent it.  The document is left in the
-buffer specified by url-working-buffer.  url-working-buffer is killed
-immediately before starting the transfer, so that no buffer-local
-variables interfere with the retrieval.  HTTP/1.0 redirection will
-be honored before this function exits." nil nil)
-
-;;;***
-
-;;;### (autoloads (w3-hotlist-add-document w3-use-hotlist w3-hotlist-append w3-hotlist-rename-entry w3-hotlist-delete) "w3-hot" "w3/w3-hot.el")
-
-(autoload 'w3-hotlist-delete "w3-hot" "\
-Deletes a document from your hotlist file" t nil)
-
-(autoload 'w3-hotlist-rename-entry "w3-hot" "\
-Rename a hotlist item" t nil)
-
-(autoload 'w3-hotlist-append "w3-hot" "\
-Append a hotlist to the one in memory" t nil)
-
-(autoload 'w3-use-hotlist "w3-hot" "\
-Possibly go to a link in your W3/Mosaic hotlist.
-This is part of the emacs World Wide Web browser.  It will prompt for
-one of the items in your 'hotlist'.  A hotlist is a list of often
-visited or interesting items you have found on the World Wide Web." t nil)
-
-(autoload 'w3-hotlist-add-document "w3-hot" "\
-Add this documents url to the hotlist" t nil)
-
-;;;***
-
-;;;### (autoloads (w3-follow-link w3-follow-link-other-frame w3-do-setup w3 w3-preview-this-buffer w3-follow-url-at-point w3-follow-url-at-point-other-frame w3-maybe-follow-link w3-maybe-follow-link-mouse w3-fetch w3-fetch-other-frame w3-find-file w3-open-local) "w3" "w3/w3.el")
-
-(autoload 'w3-open-local "w3" "\
-Find a local file, and interpret it as a hypertext document.
-It will prompt for an existing file or directory, and retrieve it as a
-hypertext document." t nil)
-
-(autoload 'w3-find-file "w3" "\
-Find a local file, and interpret it as a hypertext document.
-It will prompt for an existing file or directory, and retrieve it as a
-hypertext document." t nil)
-
-(autoload 'w3-fetch-other-frame "w3" "\
-Attempt to follow the hypertext reference under point in a new frame.
-With prefix-arg P, ignore viewers and dump the link straight
-to disk." t nil)
-
-(autoload 'w3-fetch "w3" "\
-Retrieve a document over the World Wide Web.
-Defaults to URL of the current document, if any.
-With prefix argument, use the URL of the hyperlink under point instead." t nil)
-
-(autoload 'w3-maybe-follow-link-mouse "w3" "\
-Maybe follow a hypertext link under point.
-If there is no link under point, this will try using
-url-get-url-at-point" t nil)
-
-(autoload 'w3-maybe-follow-link "w3" "\
-Maybe follow a hypertext link under point.
-If there is no link under point, this will try using
-url-get-url-at-point" t nil)
-
-(autoload 'w3-follow-url-at-point-other-frame "w3" "\
-Follow the URL under PT, defaults to link under (point)" t nil)
-
-(autoload 'w3-follow-url-at-point "w3" "\
-Follow the URL under PT, defaults to link under (point)" t nil)
-
-(autoload 'w3-preview-this-buffer "w3" "\
-See what this buffer will look like when its formatted as HTML.
-HTML is the HyperText Markup Language used by the World Wide Web to
-specify formatting for text.  More information on HTML can be found at
-ftp.w3.org:/pub/www/doc." t nil)
-
-(autoload 'w3 "w3" "\
-Retrieve the default World Wide Web home page.
-The World Wide Web is a global hypertext system started by CERN in
-Switzerland in 1991.
-
-The home page is specified by the variable w3-default-homepage.  The
-document should be specified by its fully specified Uniform Resource
-Locator.  The document will be parsed as HTML (if appropriate) and
-displayed in a new buffer." t nil)
-
-(autoload 'w3-do-setup "w3" "\
-Do setup - this is to avoid conflict with user settings when W3 is
-dumped with emacs." nil nil)
-
-(autoload 'w3-follow-link-other-frame "w3" "\
-Attempt to follow the hypertext reference under point in a new frame.
-With prefix-arg P, ignore viewers and dump the link straight
-to disk." nil nil)
-
-(autoload 'w3-follow-link "w3" "\
-Attempt to follow the hypertext reference under point.
-With prefix-arg P, ignore viewers and dump the link straight
-to disk." t nil)
-
-;;;***
-
-;;;### (autoloads (font-menu-weight-constructor font-menu-size-constructor font-menu-family-constructor reset-device-font-menus) "x-font-menu" "x11/x-font-menu.el")
-
-(defvar font-menu-ignore-scaled-fonts t "\
-*If non-nil, then the font menu will try to show only bitmap fonts.")
-
-(defvar font-menu-this-frame-only-p nil "\
-*If non-nil, then changing the default font from the font menu will only
-affect one frame instead of all frames.")
-
-(fset 'install-font-menus 'reset-device-font-menus)
-
-(autoload 'reset-device-font-menus "x-font-menu" "\
-Generates the `Font', `Size', and `Weight' submenus for the Options menu.
-This is run the first time that a font-menu is needed for each device.
-If you don't like the lazy invocation of this function, you can add it to
-`create-device-hook' and that will make the font menus respond more quickly
-when they are selected for the first time.  If you add fonts to your system, 
-or if you change your font path, you can call this to re-initialize the menus." nil nil)
-
-(autoload 'font-menu-family-constructor "x-font-menu" nil nil nil)
-
-(autoload 'font-menu-size-constructor "x-font-menu" nil nil nil)
-
-(autoload 'font-menu-weight-constructor "x-font-menu" nil nil nil)
-
-;;;***
+(provide 'prim-autoloads)
+))
diff -r 4de2936b4e77 -r 0132846995bd lisp/prim/cus-load.el
--- a/lisp/prim/cus-load.el	Mon Aug 13 09:42:28 2007 +0200
+++ b/lisp/prim/cus-load.el	Mon Aug 13 09:43:35 2007 +0200
@@ -1,314 +1,42 @@
-(put 'gnus-start 'custom-loads '("gnus-group" "gnus-int" "gnus-start" "gnus-util" "gnus"))
-(put 'extensions 'custom-loads '("wid-edit" "page-ext" "time-stamp" "tempo" "eldoc"))
-(put 'change-log 'custom-loads '("add-log"))
-(put 'message 'custom-loads '("message" "highlight-headers" "sendmail"))
-(put 'filladapt 'custom-loads '("filladapt"))
-(put 'psgml-dtd 'custom-loads '("psgml"))
-(put 'copyright 'custom-loads '("upd-copyr"))
-(put 'gnus-score-expire 'custom-loads '("gnus-kill" "gnus-score"))
-(put 'custom-buffer 'custom-loads '("cus-edit"))
-(put 'gnus-score-kill 'custom-loads '("gnus-kill"))
-(put 'eldoc 'custom-loads '("eldoc"))
-(put 'prolog 'custom-loads '("prolog"))
-(put 'recent-files-menu 'custom-loads '("recent-files"))
-(put 'url 'custom-loads '("url-gw" "url-irc" "url-vars" "url"))
-(put 'custom-faces 'custom-loads '("cus-edit"))
-(put 'execute 'custom-loads '())
-(put 'gnus-message 'custom-loads '("message"))
-(put 'mouse 'custom-loads '("mouse" "outl-mouse" "strokes" "avoid"))
-(put 'reftex-defining-label-environments 'custom-loads '())
-(put 'mail-abbrevs 'custom-loads '("mail-abbrevs"))
-(put 'gnus-summary-sort 'custom-loads '("gnus-sum"))
-(put 'nnmail-procmail 'custom-loads '("nnmail"))
-(put 'pascal 'custom-loads '("pascal"))
-(put 'tex 'custom-loads '("tex" "reftex" "texnfo-tex"))
-(put 'ssl 'custom-loads '("ssl"))
-(put 'tcl 'custom-loads '("tcl"))
-(put 'ssh 'custom-loads '("ssh"))
-(put 'etags 'custom-loads '("etags"))
-(put 'limits 'custom-loads '())
-(put 'igrep 'custom-loads '("igrep"))
-(put 'telnet 'custom-loads '("telnet"))
-(put 'widgets 'custom-loads '("wid-browse" "wid-edit"))
-(put 'minibuffer 'custom-loads '("minibuf" "detached-minibuf" "savehist"))
-(put 'environment 'custom-loads '("minibuf" "modeline" "x-toolbar" "cus-edit" "dired-faces" "gnuserv" "sound"))
-(put 'shell 'custom-loads '("shell" "term"))
-(put 'sound 'custom-loads '("sound"))
-(put 'gnus-article-buttons 'custom-loads '("gnus-art"))
-(put 'gnus-extract-archive 'custom-loads '("gnus-uu"))
-(put 'html 'custom-loads '("psgml-html"))
-(put 'cc-style 'custom-loads '("cc-mode"))
-(put 'icon 'custom-loads '("icon"))
-(put 'gnus-article-headers 'custom-loads '("gnus-art" "gnus-sum"))
-(put 'holidays 'custom-loads '("calendar"))
-(put 'texinfo 'custom-loads '("texinfo" "texnfo-tex"))
-(put 'gnus-score 'custom-loads '("gnus-nocem" "gnus"))
-(put 'LaTeX-label 'custom-loads '("latex"))
-(put 'gnus-summary-various 'custom-loads '("gnus-sum"))
-(put 'LaTeX-environment 'custom-loads '("latex"))
-(put 'terminals 'custom-loads '("gnuserv"))
-(put 'gnus-topic 'custom-loads '("gnus-topic"))
-(put 'comint-completion 'custom-loads '("comint"))
-(put 'gnus-article-emphasis 'custom-loads '("gnus-art"))
-(put 'earcon 'custom-loads '("earcon"))
-(put 'auto-save 'custom-loads '("auto-save"))
-(put 'LaTeX-macro 'custom-loads '("latex"))
-(put 'gnus-group-foreign 'custom-loads '("gnus-group"))
-(put 'xrdb 'custom-loads '("xrdb-mode"))
-(put 'gnus-article-washing 'custom-loads '("gnus-xmas" "gnus-art"))
-(put 'ispell 'custom-loads '("ispell"))
-(put 'mail 'custom-loads '("gnus" "message" "mh-e" "mail-abbrevs" "feedmail" "metamail" "supercite" "highlight-headers" "ph" "smtpmail"))
-(put 'gnus-summary-exit 'custom-loads '("gnus-sum"))
-(put 'fortran-indent 'custom-loads '("fortran"))
-(put 'ps-print-face 'custom-loads '("ps-print"))
-(put 'gnus-article-saving 'custom-loads '("gnus-art"))
-(put 'gnus-extract-view 'custom-loads '("gnus-sum" "gnus-uu"))
-(put 'crypt 'custom-loads '("crypt"))
-(put 'object 'custom-loads '("gopher"))
-(put 'comint 'custom-loads '("comint-xemacs" "comint" "telnet"))
-(put 'gnus-group-listing 'custom-loads '("gnus-group"))
-(put 'man 'custom-loads '("man"))
-(put 'lpr 'custom-loads '("lpr"))
-(put 'gnus-summary 'custom-loads '("gnus-sum" "gnus"))
-(put 'message-headers 'custom-loads '("message"))
-(put 'ps-print-header 'custom-loads '("ps-print"))
-(put 'custom-menu 'custom-loads '("cus-edit"))
-(put 'docs 'custom-loads '("texinfo" "hyper-apropos" "makeinfo"))
-(put 'lisp-indent 'custom-loads '("cl-indent"))
-(put 'completion 'custom-loads '("completion"))
-(put 'tools 'custom-loads '("ediff" "make-mode" "add-log" "diff" "etags" "func-menu" "generic-sc" "hyper-apropos" "rcompile"))
-(put 'cc-comment 'custom-loads '("cc-mode"))
-(put 'url-cookie 'custom-loads '("url-cookie" "url-vars"))
-(put 'TeX-output 'custom-loads '("tex-buf" "tex"))
-(put 'uniquify 'custom-loads '("uniquify"))
-(put 'recent-files 'custom-loads '("recent-files"))
-(put 'editing-basics 'custom-loads '("simple"))
-(put 'gnus-group-select 'custom-loads '("gnus-sum"))
-(put 'display-time-balloon 'custom-loads '("time"))
-(put 'LaTeX-math 'custom-loads '("latex"))
-(put 'internal 'custom-loads '("cus-edit"))
-(put 'calendar 'custom-loads '("calendar"))
-(put 'dabbrev 'custom-loads '("dabbrev"))
-(put 'help-appearance 'custom-loads '("help"))
-(put 'display-time 'custom-loads '("time"))
-(put 'hypermedia 'custom-loads '("wid-edit" "gopher" "metamail" "browse-url" "url-vars" "w3-cus"))
-(put 'save-place 'custom-loads '("saveplace"))
-(put 'w3-advanced 'custom-loads '("w3-cus"))
-(put 'lisp 'custom-loads '("edebug" "cl-indent" "hyper-apropos" "elp"))
-(put 'jka-compr 'custom-loads '("jka-compr"))
-(put 'rlogin 'custom-loads '("rlogin"))
-(put 'reftex 'custom-loads '("reftex"))
-(put 'diff 'custom-loads '("diff"))
-(put 'shell-faces 'custom-loads '("shell"))
-(put 'sh-script 'custom-loads '("sh-script"))
-(put 'w3-menus 'custom-loads '("w3-cus" "w3-menu"))
-(put 'gnus-summary-mail 'custom-loads '("gnus-sum"))
-(put 'elp 'custom-loads '("elp"))
-(put 'psgml 'custom-loads '("psgml-html" "psgml"))
-(put 'supercite-cite 'custom-loads '("supercite"))
-(put 'gnus-score-default 'custom-loads '("gnus-score" "gnus-sum"))
-(put 'nnmail-expire 'custom-loads '("nnmail"))
-(put 'gnus-thread 'custom-loads '("gnus-sum"))
-(put 'gnus-nocem 'custom-loads '("gnus-nocem"))
-(put 'gnus-threading 'custom-loads '("gnus-sum"))
-(put 'ediff-diff 'custom-loads '("ediff-diff"))
-(put 'applications 'custom-loads '("cus-edit" "uniquify"))
-(put 'outlines 'custom-loads '("outl-mouse" "whitespace-mode"))
-(put 'paren-matching 'custom-loads '("paren"))
-(put 'time-stamp 'custom-loads '("time-stamp"))
-(put 'gnus-summary-maneuvering 'custom-loads '("gnus-sum"))
-(put 'avoid 'custom-loads '("avoid"))
-(put 'f90 'custom-loads '("f90"))
-(put 'term 'custom-loads '("term"))
-(put 'gnus-extract 'custom-loads '("gnus" "gnus-uu"))
-(put 'help 'custom-loads '("help" "cus-edit" "hyper-apropos" "info" "man"))
-(put 'supercite 'custom-loads '("supercite"))
-(put 'generic-sc 'custom-loads '("generic-sc"))
-(put 'local 'custom-loads '("calendar" "gopher"))
-(put 'nnmail-split 'custom-loads '("nnmail"))
-(put 'keyboard 'custom-loads '("edmacro"))
-(put 'minubuffer 'custom-loads '("minibuf"))
-(put 'asm 'custom-loads '("asm-mode"))
-(put 'url-gateway 'custom-loads '("url-gw"))
-(put 'gnus-article-various 'custom-loads '("gnus-art" "gnus-sum"))
-(put 'reftex-label-support 'custom-loads '("reftex"))
-(put 'mh-hook 'custom-loads '("mh-e"))
-(put 'message-sending 'custom-loads '("message"))
-(put 'TeX-parse 'custom-loads '("tex"))
-(put 'w3-files 'custom-loads '("w3-cus"))
-(put 'widget-browse 'custom-loads '("wid-browse"))
-(put 'data 'custom-loads '("auto-save" "jka-compr" "recent-files" "saveplace" "time-stamp"))
-(put 'gnus-article 'custom-loads '("gnus-art" "gnus-cite"))
-(put 'AUC-TeX 'custom-loads '("tex"))
-(put 'TeX-command 'custom-loads '("tex"))
-(put 'widget-documentation 'custom-loads '("wid-edit"))
-(put 'TeX-command-name 'custom-loads '("tex"))
-(put 'edebug 'custom-loads '("edebug"))
-(put 'ps-print 'custom-loads '("ps-print"))
-(put 'TeX-commands 'custom-loads '("tex-buf"))
-(put 'cc-indent 'custom-loads '("cc-mode"))
-(put 'comm 'custom-loads '("ph" "ssl"))
-(put 'ediff-window 'custom-loads '())
-(put 'gnus 'custom-loads '("gnus-art" "gnus-async" "gnus-cache" "gnus-demon" "gnus-dup" "gnus-eform" "gnus-uu" "gnus-win" "gnus-xmas" "gnus" "nnmail"))
-(put 'ps-print-font 'custom-loads '("ps-print"))
-(put 'id-select 'custom-loads '("id-select"))
-(put 'gnus-xmas 'custom-loads '("gnus-xmas"))
-(put 'fortran-comment 'custom-loads '("fortran"))
-(put 'outl-mouse 'custom-loads '("outl-mouse"))
-(put 'gnus-treading 'custom-loads '("gnus-sum"))
-(put 'url-cache 'custom-loads '("url-cache" "url-vars"))
-(put 'frames 'custom-loads '("rsz-minibuf" "ediff-wind" "balloon-help" "desktop" "detached-minibuf"))
-(put 'psgml-html 'custom-loads '("psgml-html"))
-(put 'nnmail 'custom-loads '("nnmail"))
-(put 'gnus-article-hiding 'custom-loads '("gnus-art" "gnus-sum"))
-(put 'customize 'custom-loads '("cus-face" "wid-edit" "cus-edit"))
-(put 'w3-printing 'custom-loads '("w3-cus"))
-(put 'nnmail-duplicate 'custom-loads '("nnmail"))
-(put 'verilog 'custom-loads '("verilog-mode"))
-(put 'supercite-attr 'custom-loads '("supercite"))
-(put 'gnus-summary-visual 'custom-loads '("gnus-sum" "gnus"))
-(put 'w3-images 'custom-loads '("w3-cus"))
-(put 'shell-directories 'custom-loads '("shell"))
-(put 'desktop 'custom-loads '("desktop"))
-(put 'gnus-group-various 'custom-loads '("gnus-group"))
-(put 'abbrev 'custom-loads '("cus-edit" "dabbrev"))
-(put 'f90-indent 'custom-loads '("f90"))
-(put 'nnmail-retrieve 'custom-loads '("nnmail"))
-(put 'ediff-ptch 'custom-loads '())
-(put 'url-history 'custom-loads '("url-vars"))
-(put 'strokes 'custom-loads '("strokes"))
-(put 'message-interface 'custom-loads '("message"))
-(put 'gnus-group 'custom-loads '("gnus-topic" "gnus"))
-(put 'remote-compile 'custom-loads '("rcompile"))
-(put 'programming 'custom-loads '("cus-edit" "compile"))
-(put 'gnus-article-signature 'custom-loads '("gnus-art"))
-(put 'metamail 'custom-loads '("metamail"))
-(put 'toolbar 'custom-loads '("x-toolbar"))
-(put 'compilation 'custom-loads '("compile"))
-(put 'dired 'custom-loads '("dired-faces"))
-(put 'gnus-duplicate 'custom-loads '("gnus-dup"))
-(put 'url-hairy 'custom-loads '("url-vars"))
-(put 'sgml 'custom-loads '("psgml-html" "psgml"))
-(put 'gnus-score-adapt 'custom-loads '("gnus-score"))
-(put 'comint-source 'custom-loads '("comint"))
-(put 'makeinfo 'custom-loads '("makeinfo"))
-(put 'nnmail-various 'custom-loads '("nnmail"))
-(put 'fume 'custom-loads '("func-menu"))
-(put 'cc-auto 'custom-loads '("cc-mode"))
-(put 'nnmail-files 'custom-loads '("nnmail"))
-(put 'gnus-asynchronous 'custom-loads '("gnus-async"))
-(put 'url-mime 'custom-loads '("url-vars"))
-(put 'gnus-visual 'custom-loads '("earcon" "gnus-art" "gnus-picon" "gnus" "smiley"))
-(put 'c-macro 'custom-loads '("cmacexp"))
-(put 'message-forwarding 'custom-loads '("message"))
-(put 'TeX-indentation 'custom-loads '("latex"))
-(put 'killing 'custom-loads '("simple"))
-(put 'smtpmail 'custom-loads '("smtpmail"))
-(put 'widget-button 'custom-loads '("wid-edit"))
-(put 'message-news 'custom-loads '("message"))
-(put 'paren-blinking 'custom-loads '("simple"))
-(put 'vrml 'custom-loads '("vrml-mode"))
-(put 'games 'custom-loads '("xmine"))
-(put 'gnus-edit-form 'custom-loads '("gnus-eform"))
-(put 'fast-lock 'custom-loads '("fast-lock"))
-(put 'external 'custom-loads '("cus-edit"))
-(put 'gnus-files 'custom-loads '("gnus" "nnmail"))
-(put 'TeX-macro 'custom-loads '("latex"))
-(put 'fortran 'custom-loads '("f90" "fortran"))
-(put 'ediff-merge 'custom-loads '("ediff-merg"))
-(put 'gnus-cite 'custom-loads '("gnus-cite"))
-(put 'gnus-demon 'custom-loads '("gnus-demon"))
-(put 'gnus-summary-choose 'custom-loads '("gnus-sum"))
-(put 'cc-mode 'custom-loads '("cc-mode"))
-(put 'development 'custom-loads '("cus-edit"))
-(put 'mh-buffer 'custom-loads '("mh-utils"))
-(put 'tempo 'custom-loads '("tempo"))
-(put 'gnuserv 'custom-loads '("gnuserv"))
-(put 'ps-print-horizontal 'custom-loads '("ps-print"))
-(put 'gnus-windows 'custom-loads '("gnus-win"))
-(put 'maint 'custom-loads '("add-log" "upd-copyr"))
-(put 'detached-minibuf 'custom-loads '("detached-minibuf"))
-(put 'message-mail 'custom-loads '("message"))
-(put 'ediff-mult 'custom-loads '("ediff-mult"))
-(put 'windows 'custom-loads '())
-(put 'widget-faces 'custom-loads '("wid-edit"))
-(put 'message-various 'custom-loads '("message"))
-(put 'resize-minibuffer 'custom-loads '("rsz-minibuf"))
-(put 'gnus-group-levels 'custom-loads '("gnus-group"))
-(put 'languages 'custom-loads '("cus-edit" "asm-mode" "fortran" "icon" "pascal" "prolog" "rexx-mode" "sh-script" "tcl" "verilog-mode" "vrml-mode" "xrdb-mode" "psgml"))
-(put 'gnus-summary-format 'custom-loads '("gnus-sum"))
-(put 'gnus-score-decay 'custom-loads '("gnus-score"))
-(put 'fill 'custom-loads '("filladapt"))
-(put 'edmacro 'custom-loads '("edmacro"))
-(put 'custom-magic-faces 'custom-loads '("cus-edit"))
-(put 'balloon-help 'custom-loads '("balloon-help"))
-(put 'gnus-extract-post 'custom-loads '("gnus-uu"))
-(put 'debug 'custom-loads '())
-(put 'supercite-hooks 'custom-loads '("supercite"))
-(put 'display 'custom-loads '())
-(put 'texinfo-tex 'custom-loads '("texnfo-tex"))
-(put 'faces 'custom-loads '("cus-edit" "wid-edit" "gnus" "message" "fast-lock" "ps-print" "highlight-headers" "font"))
-(put 'passwd 'custom-loads '("passwd"))
-(put 'pages 'custom-loads '("page-ext"))
-(put 'diary 'custom-loads '("calendar"))
-(put 'gnus-various 'custom-loads '("gnus-sum"))
-(put 'cc-syntax 'custom-loads '("cc-mode"))
-(put 'smiley 'custom-loads '())
-(put 'mh-compose 'custom-loads '("mh-comp"))
-(put 'xmine 'custom-loads '("xmine"))
-(put 'supercite-frames 'custom-loads '("supercite"))
-(put 'browse-url 'custom-loads '("browse-url"))
-(put 'feedmail 'custom-loads '("feedmail"))
-(put 'enriched 'custom-loads '("enriched"))
-(put 'gnus-article-highlight 'custom-loads '("gnus-art"))
-(put 'emacs 'custom-loads '("cus-edit"))
-(put 'processes 'custom-loads '("background" "comint" "rlogin" "shell" "ssh" "cus-edit" "term" "executable" "gnuserv" "ispell" "metamail" "rcompile" "passwd"))
-(put 'news 'custom-loads '("gnus" "message" "supercite" "highlight-headers"))
-(put 'rexx 'custom-loads '("rexx-mode"))
-(put 'w3-hooks 'custom-loads '("w3-cus"))
-(put 'executable 'custom-loads '("executable"))
-(put 'LaTeX-indentation 'custom-loads '("latex"))
-(put 'highlight-headers 'custom-loads '("highlight-headers"))
-(put 'gnus-cache 'custom-loads '())
-(put 'message-insertion 'custom-loads '("message"))
-(put 'hyper-apropos 'custom-loads '("hyper-apropos"))
-(put 'psgml-insert 'custom-loads '("psgml"))
-(put 'savehist 'custom-loads '("savehist"))
-(put 'LaTeX 'custom-loads '("latex" "tex"))
-(put 'wp 'custom-loads '("cus-edit" "enriched" "lpr" "ps-print"))
-(put 'background 'custom-loads '("background"))
-(put 'message-faces 'custom-loads '("message"))
-(put 'w3 'custom-loads '("w3-cus" "w3-script"))
-(put 'sh 'custom-loads '("sh-script"))
-(put 'ps-print-vertical 'custom-loads '("ps-print"))
-(put 'url-file 'custom-loads '("url-cache" "url-vars"))
-(put 'alloc 'custom-loads '())
-(put 'isearch 'custom-loads '("isearch-mode"))
-(put 'ph 'custom-loads '("ph"))
-(put 'mh 'custom-loads '("mh-comp" "mh-e" "mh-utils"))
-(put 'gnus-score-files 'custom-loads '("gnus-score"))
-(put 'gopher 'custom-loads '("gopher"))
-(put 'modeline 'custom-loads '("modeline"))
-(put 'hypropos-faces 'custom-loads '("hyper-apropos"))
-(put 'makefile-mode 'custom-loads '("make-mode"))
-(put 'gnus-summary-marks 'custom-loads '("gnus-sum"))
-(put 'appt 'custom-loads '("appt"))
-(put 'picons 'custom-loads '("gnus-picon"))
-(put 'processes-basics 'custom-loads '())
-(put 'nnmail-prepare 'custom-loads '("nnmail"))
-(put 'whitespace 'custom-loads '("whitespace-mode"))
-(put 'w3-display 'custom-loads '("w3-cus"))
-(put 'w3-parsing 'custom-loads '("w3-cus"))
-(put 'message-buffers 'custom-loads '("message"))
-(put 'editing 'custom-loads '("simple" "cus-edit"))
-(put 'matching 'custom-loads '("simple" "isearch-mode" "whitespace-mode" "completion" "hyper-apropos"))
-(put 'ediff 'custom-loads '("ediff-diff" "ediff-merg" "ediff-mult" "ediff-ptch" "ediff-wind" "ediff"))
-(put 'gnus-article-mime 'custom-loads '("gnus-art" "gnus-sum"))
-(put 'i18n 'custom-loads '("cus-edit" "url-vars"))
-(put 'ps-print-color 'custom-loads '("ps-print"))
-(put 'info 'custom-loads '("info"))
-(put 'w3-scripting 'custom-loads '("w3-script"))
-(put 'TeX-file 'custom-loads '("tex"))
-(put 'unix 'custom-loads '("rlogin" "shell" "ssh" "term" "sh-script"))
-(put 'x 'custom-loads '())
-(put 'c 'custom-loads '("cc-mode" "cmacexp"))
+;;; cus-load.el --- Batch load all available cus-load files
+
+;; Copyright (C) 1997 by Free Software Foundation, Inc.
+
+;; Author: Steven L Baur <steve@altair.xemacs.org>
+;; Keywords: internal, help, faces
+
+;; 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:
+
+;; custom loads are no longer in a single file.  So, collect the whole set!
+
+;;; Code:
+
+(let ((dir load-path))
+  (while dir
+    (condition-case nil
+	(load (concat (car dir) "/cus-load"))
+      (file-error nil))
+    (pop dir)))
+
+(provide 'cus-load)
+
+;;; cus-load.el ends here
diff -r 4de2936b4e77 -r 0132846995bd lisp/prim/cus-start.el
--- a/lisp/prim/cus-start.el	Mon Aug 13 09:42:28 2007 +0200
+++ b/lisp/prim/cus-start.el	Mon Aug 13 09:43:35 2007 +0200
@@ -5,6 +5,25 @@
 ;; Author: Per Abrahamsen <abraham@dina.kvl.dk>
 ;; Keywords: internal
 
+;; This file is part of XEmacs.
+
+;; XEmacs is free software; you can redistribute it and/or modify it
+;; under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 2, or (at your option)
+;; any later version.
+
+;; XEmacs is distributed in the hope that it will be useful, but
+;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+;; General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with XEmacs; see the file COPYING.  If not, write to the Free
+;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+;; 02111-1307, USA.
+
+;;; Synched up with: Not synched.
+
 ;;; Commentary:
 ;;
 ;; Must be run before the user has changed the value of any options!
@@ -28,7 +47,6 @@
       sexp
     (list 'quote sexp)))
 
-;; The file names below are unreliable, as they are from Emacs 19.34.
 (let ((all '(;; boolean
 	     (abbrev-all-caps abbrev boolean)
 	     (allow-deletion-of-last-visible-frame frames boolean)
@@ -62,6 +80,9 @@
 	     (completion-ignored-extensions minibuffer
 					    (repeat
 					     (string :format "%v")))
+	     (debug-ignored-errors debug (repeat (choice :format "%v"
+							 (symbol :tag "Class")
+							 regexp)))
 	     (debug-on-error debug  (choice (const :tag "off" nil)
 					    (const :tag "Always" t)
 					    (repeat :menu-tag "When"
@@ -105,11 +126,18 @@
 	     (truncate-lines display boolean)
 	     ;; not documented as user-options, but should still be
 	     ;; customizable:
+	     (bar-cursor display (choice (const :tag "Block Cursor" nil)
+					 (const :tag "Bar Cursor (1 pixel)" t)
+					 (sexp :tag "Bar Cursor (2 pixels)"
+					       :format "%t\n" 'other)))
 	     (default-frame-plist frames (repeat
 					  (list :inline t
 						:format "%v"
 						(symbol :tag "Parameter")
 						(sexp :tag "Value"))))
+	     (disable-auto-save-when-buffer-shrinks auto-save boolean)
+	     (find-file-compare-truenames find-file boolean)
+	     (focus-follows-mouse x boolean)
 	     (help-char keyboard character)
 	     (max-lisp-eval-depth limits integer)
 	     (max-specpdl-size limits integer)
@@ -123,13 +151,15 @@
 					(const :tag "on" t)))
 	     (selective-display-ellipses display boolean)
 	     (signal-error-on-buffer-boundary internal boolean)
-	     (words-include-escapes editing-basics boolean)
 	     (temp-buffer-show-function
 	      windows (radio (function-item :tag "Temp Buffers Always in Same Frame"
 					    :format "%t\n"
 					    show-temp-buffer-in-current-frame)
 			     (const :tag "Temp Buffers Like Other Buffers" nil)
-			     (function :tag "Other")))))
+			     (function :tag "Other")))
+	     (undo-threshold undo integer)
+	     (undo-high-threshold undo integer)
+	     (words-include-escapes editing-basics boolean)))
       this symbol group type)
   (while all 
     (setq this (car all)
diff -r 4de2936b4e77 -r 0132846995bd lisp/prim/custom-load.el
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lisp/prim/custom-load.el	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,65 @@
+(put 'copyright 'custom-loads '())
+(put 'eldoc 'custom-loads '())
+(put 'execute 'custom-loads '())
+(put 'mouse 'custom-loads '("mouse"))
+(put 'mail-abbrevs 'custom-loads '())
+(put 'etags 'custom-loads '())
+(put 'limits 'custom-loads '())
+(put 'minibuffer 'custom-loads '("minibuf"))
+(put 'environment 'custom-loads '("frame" "minibuf" "modeline" "sound"))
+(put 'sound 'custom-loads '("sound"))
+(put 'holidays 'custom-loads '())
+(put 'auto-save 'custom-loads '("files"))
+(put 'ispell 'custom-loads '())
+(put 'fortran-indent 'custom-loads '())
+(put 'lpr 'custom-loads '())
+(put 'message-headers 'custom-loads '())
+(put 'editing-basics 'custom-loads '("simple" "files" "lisp"))
+(put 'internal 'custom-loads '())
+(put 'calendar 'custom-loads '())
+(put 'help-appearance 'custom-loads '("help"))
+(put 'display-time 'custom-loads '())
+(put 'lisp 'custom-loads '("lisp"))
+(put 'diff 'custom-loads '())
+(put 'paren-matching 'custom-loads '())
+(put 'help 'custom-loads '("help"))
+(put 'local 'custom-loads '())
+(put 'keyboard 'custom-loads '())
+(put 'minubuffer 'custom-loads '("minibuf"))
+(put 'message-sending 'custom-loads '())
+(put 'data 'custom-loads '("files"))
+(put 'ps-print 'custom-loads '())
+(put 'backup 'custom-loads '("files"))
+(put 'frames 'custom-loads '("frame" "window-xemacs"))
+(put 'customize 'custom-loads '())
+(put 'abbrev 'custom-loads '("files"))
+(put 'toolbar 'custom-loads '())
+(put 'compilation 'custom-loads '())
+(put 'dired 'custom-loads '("files"))
+(put 'killing 'custom-loads '("simple"))
+(put 'paren-blinking 'custom-loads '("simple"))
+(put 'find-file 'custom-loads '("files"))
+(put 'gnuserv 'custom-loads '())
+(put 'maint 'custom-loads '())
+(put 'fill-comments 'custom-loads '("simple"))
+(put 'message-mail 'custom-loads '())
+(put 'windows 'custom-loads '("window" "window-xemacs"))
+(put 'message-various 'custom-loads '())
+(put 'resize-minibuffer 'custom-loads '())
+(put 'fill 'custom-loads '("simple"))
+(put 'debug 'custom-loads '())
+(put 'display 'custom-loads '())
+(put 'diary 'custom-loads '())
+(put 'browse-url 'custom-loads '())
+(put 'message-insertion 'custom-loads '())
+(put 'hyper-apropos 'custom-loads '())
+(put 'vc 'custom-loads '("files"))
+(put 'alloc 'custom-loads '())
+(put 'isearch 'custom-loads '("isearch-mode"))
+(put 'modeline 'custom-loads '("modeline"))
+(put 'processes-basics 'custom-loads '())
+(put 'editing 'custom-loads '("simple"))
+(put 'matching 'custom-loads '("simple" "isearch-mode"))
+(put 'ps-print-color 'custom-loads '())
+(put 'undo 'custom-loads '())
+(put 'x 'custom-loads '())
diff -r 4de2936b4e77 -r 0132846995bd lisp/prim/dumped-lisp.el
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lisp/prim/dumped-lisp.el	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,188 @@
+(setq dumped-lisp-packages '(
+"backquote" 		; needed for defsubst etc.
+"bytecomp-runtime"	; define defsubst
+"subr" 			; load the most basic Lisp functions
+"replace" 		; match-string used in version.el.
+"version.el"		; Ignore compiled-by-mistake version.elc
+"cl"
+;;"featurep"
+"widget"
+"custom"		; Before the world so everything can be customized
+"cus-start"		; for customization of builtin variables
+"cmdloop"
+			; (or (fboundp 'recursive-edit) (load-gc "cmdloop1"))
+"keymap"
+"syntax"
+"device"
+"console"
+"obsolete"
+"specifier"
+"faces"			; must be loaded before any make-face call
+;;(load-gc "facemenu") #### not yet ported
+"glyphs"
+"objects"
+"extents"
+"events"
+"text-props"
+"process"
+"frame"			; move up here cause some stuff needs it here
+"map-ynp"
+"simple"
+"keydefs"		; Before loaddefs so that keymap vars exist.
+"abbrev"
+"derived"
+"minibuf"
+"list-mode"
+"modeline"		; needs simple.el to be loaded first
+;; If SparcWorks support is included some additional packages are
+;; dumped which would normally have autoloads.  To avoid
+;; duplicate doc string warnings, SparcWorks uses a separate
+;; autoloads file with the dumped packages removed.
+;; 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"))
+"loaddefs"		; <=== autoloads get loaded here
+"misc"
+;; (load-gc "profile")
+"help"
+;; (load-gc "hyper-apropos")  Soon...
+#-mule "files-nomule"
+"files"
+"lib-complete"
+"format"
+"indent"
+"isearch-mode"
+"buffer"
+"buff-menu"
+"undo-stack"
+"window"
+"window-xemacs"
+"paths.el"		; don't get confused if paths compiled.
+"startup"
+"lisp"
+"page"
+"register"
+"iso8859-1"		; This must be before any modes
+			; (sets standard syntax table.)
+"paragraphs"
+"lisp-mode"
+"text-mode"
+"fill"
+;; (load-gc "cc-mode")		; as FSF goes so go we ..
+;; (load-gc "scroll-in-place")	; We're not ready for this :-(
+;; we no longer load buff-menu automatically.
+;; it will get autoloaded if needed.
+
+;; Before this will work again, the different system types will need
+;; to have features named for them.
+
+;     (cond  ; Differences based on system-type
+;      ((eq system-type 'vax-vms)
+;       (load-gc "vmsproc")
+;       (load-gc "vms-patch"))
+;      ((eq system-type 'windows-nt)
+;       ;; (load-gc "ls-lisp")
+;       (load-gc "winnt"))
+;      ((eq system-type 'ms-dos)
+;       ;; (load-gc "ls-lisp")
+;       (load-gc "dos-fns")
+;       (load-gc "disp-table")))	; needed to setup ibm-pc char set,
+				; see internal.el
+#+lisp-float-type "float-sup"
+"itimer"		; for vars auto-save-timeout and auto-gc-threshold
+"itimer-autosave"
+#+toolbar "toolbar"
+;       ;; else still define a few functions.
+;       (defun toolbar-button-p    (obj) "No toolbar support." nil)
+;       (defun toolbar-specifier-p (obj) "No toolbar support." nil))
+#+scrollbar "scrollbar"
+#+menubar "menubar"
+#+dialog "dialog"
+#+mule "mule-charset"
+#+mule "mule-coding"
+;; Handle I/O of files with extended characters.
+#+mule "mule-files"
+;; Load the remaining basic files.
+#+mule "mule-category"
+#+mule "mule-ccl"
+#+mule "mule-misc"
+#+mule "kinsoku"
+#+(and mule x) "mule-x-init"
+#+mule "mule-cmds" ; to sync with Emacs 20.1
+
+;; after this goes the specific lisp routines for a particular input system
+;; 97.2.5 JHod Shouldn't these go into a site-load file to allow site
+;; or user switching of input systems???
+;(if (featurep 'wnn)
+;    (progn
+;      (load-gc "egg")
+;      (load-gc "egg-wnn")
+;      (setq egg-default-startup-file "eggrc-wnn")))
+
+;; (if (and (boundp 'CANNA) CANNA)
+;;     (load-gc "canna")
+;;   )
+
+;; Now load files to set up all the different languages/environments
+;; that Mule knows about.
+
+#+mule "arabic-hooks"
+#+mule "language/chinese"
+#+mule "language/cyrillic"
+#+mule "language/english"
+#+mule "ethiopic-hooks"
+#+mule "language/european"
+#+mule "language/greek"
+#+mule "hebrew-hooks"
+#+mule "language/japanese"
+#+mule "language/korean"
+#+mule "language/misc-lang"
+#+mule "language/thai"
+#+mule "vietnamese-hooks-1"
+#+mule "vietnamese-hooks-2"
+
+;; Set up the XEmacs environment for Mule.
+;; Assumes the existence of various stuff above.
+#+mule "mule-init"
+
+;; Enable Mule capability for Gnus, mail, etc...
+;; Moved to sunpro-load.el - the default only for Sun.
+;;(load-gc "mime-setup")
+;;; mule-load.el ends here
+#+window-system "gui"
+#+window-system "mode-motion"
+#+window-system "mouse"
+;; preload the X code, for faster startup.
+#+(and x menubar) "x-menubar"
+#+x "x-faces"
+#+x "x-iso8859-1"
+#+x "x-mouse"
+#+x "x-select"
+#+(and x scrollbar) "x-scrollbar"
+#+x "x-misc"
+#+x "x-init"
+#+(and x toolbar) "x-toolbar"
+;; preload the TTY init code.
+#+tty "tty-init"
+;;; Formerly in tooltalk/tooltalk-load.el
+#+tooltalk "tooltalk/tooltalk-macros"
+#+tooltalk "tooltalk/tooltalk-util"
+#+tooltalk "tooltalk/tooltalk-init"
+"vc-hooks"
+"ediff-hook"
+"fontl-hooks"
+"auto-show"
+;; #+energize "energize/energize-load.el"
+;;; formerly in sunpro/sunpro-load.el
+#+sparcworks "cc-mode"
+#+sparcworks "sunpro-init"
+#+sparcworks "annotations"
+;;; formerly in eos/sun-eos-load.el
+#+sparcworks "sun-eos-init"
+#+sparcworks "sun-eos-common"
+#+sparcworks "sun-eos-editor"
+#+sparcworks "sun-eos-browser"
+#+sparcworks "sun-eos-debugger"
+#+sparcworks "sun-eos-debugger-extra"
+#+sparcworks "sun-eos-menubar"
+))
diff -r 4de2936b4e77 -r 0132846995bd lisp/prim/files.el
--- a/lisp/prim/files.el	Mon Aug 13 09:42:28 2007 +0200
+++ b/lisp/prim/files.el	Mon Aug 13 09:43:35 2007 +0200
@@ -35,13 +35,22 @@
 (defvar coding-system-for-read)
 (defvar buffer-file-coding-system)
 
+(defgroup backup nil
+  "Backups of edited data files."
+  :group 'data)
+
+(defgroup find-file nil
+  "Finding and editing files."
+  :group 'data)
+
+
 ;; XEmacs: In buffer.c
 ;(defconst delete-auto-save-files t
 ;  "*Non-nil means delete auto-save file when a buffer is saved or killed.")
 
 ;; FSF has automount-dir-prefix.  Our directory-abbrev-alist is more general.
 ;; note: tmp_mnt bogosity conversion is established in paths.el.
-(defvar directory-abbrev-alist nil
+(defcustom directory-abbrev-alist nil
   "*Alist of abbreviations for file directories.
 A list of elements of the form (FROM . TO), each meaning to replace
 FROM with TO when it appears in a directory name.
@@ -51,10 +60,15 @@
 Use this feature when you have directories which you normally refer to
 via absolute symbolic links or to eliminate automounter mount points
 from the beginning of your filenames.  Make TO the name of the link,
-and FROM the name it is linked to.")
+and FROM the name it is linked to."
+  :type '(repeat (cons :format "%v"
+		       :value ("\\`" . "")
+		       (regexp :tag "From")
+		       (regexp :tag "To")))
+  :group 'find-file)
 
 ;;; Turn off backup files on VMS since it has version numbers.
-(defconst make-backup-files (not (eq system-type 'vax-vms))
+(defcustom make-backup-files (not (eq system-type 'vax-vms))
   "*Non-nil means make a backup of a file the first time it is saved.
 This can be done by renaming the file or by copying.
 
@@ -70,7 +84,9 @@
 
 The choice of renaming or copying is controlled by the variables
 `backup-by-copying', `backup-by-copying-when-linked' and
-`backup-by-copying-when-mismatch'.  See also `backup-inhibited'.")
+`backup-by-copying-when-mismatch'.  See also `backup-inhibited'."
+  :type 'boolean
+  :group 'backup)
 
 ;; Do this so that local variables based on the file name
 ;; are not overridden by the major mode.
@@ -80,22 +96,28 @@
 But it is local only if you make it local.")
 (put 'backup-inhibited 'permanent-local t)
 
-(defconst backup-by-copying nil
+(defcustom backup-by-copying nil
  "*Non-nil means always use copying to create backup files.
-See documentation of variable `make-backup-files'.")
+See documentation of variable `make-backup-files'."
+ :type 'boolean
+ :group 'backup)
 
-(defconst backup-by-copying-when-linked nil
+(defcustom backup-by-copying-when-linked nil
  "*Non-nil means use copying to create backups for files with multiple names.
 This causes the alternate names to refer to the latest version as edited.
-This variable is relevant only if `backup-by-copying' is nil.")
+This variable is relevant only if `backup-by-copying' is nil."
+ :type 'boolean
+ :group 'backup)
 
-(defconst backup-by-copying-when-mismatch nil
+(defcustom backup-by-copying-when-mismatch nil
   "*Non-nil means create backups by copying if this preserves owner or group.
 Renaming may still be used (subject to control of other variables)
 when it would not result in changing the owner or group of the file;
 that is, for files which are owned by you and whose group matches
 the default for a new file created there by you.
-This variable is relevant only if `backup-by-copying' is nil.")
+This variable is relevant only if `backup-by-copying' is nil."
+  :type 'boolean
+  :group 'backup)
 
 (defvar backup-enable-predicate
   '(lambda (name)
@@ -104,10 +126,12 @@
   "Predicate that looks at a file name and decides whether to make backups.
 Called with an absolute file name as argument, it returns t to enable backup.")
 
-(defconst buffer-offer-save nil
+(defcustom buffer-offer-save nil
   "*Non-nil in a buffer means offer to save the buffer on exit
 even if the buffer is not visiting a file.
-Automatically local in all buffers.")
+Automatically local in all buffers."
+  :type 'boolean
+  :group 'find-file)
 (make-variable-buffer-local 'buffer-offer-save)
 
 ;; FSF uses normal defconst
@@ -125,7 +149,7 @@
 (defvar buffer-file-numbers-unique (not (memq system-type '(windows-nt)))
   "Non-nil means that buffer-file-number uniquely identifies files.")
 
-(defconst file-precious-flag nil
+(defcustom file-precious-flag nil
   "*Non-nil means protect against I/O errors while saving files.
 Some modes set this non-nil in particular buffers.
 
@@ -136,47 +160,72 @@
 
 Note that this feature forces backups to be made by copying.
 Yet, at the same time, saving a precious file
-breaks any hard links between it and other files.")
+breaks any hard links between it and other files."
+  :type 'boolean
+  :group 'backup)
 
-(defvar version-control nil
+(defcustom version-control nil
   "*Control use of version numbers for backup files.
 t means make numeric backup versions unconditionally.
 nil means make them for files that have some already.
-`never' means do not make them.")
+`never' means do not make them."
+  :type 'boolean
+  :group 'backup
+  :group 'vc)
 
 ;; This is now defined in efs.
 ;(defvar dired-kept-versions 2
 ;  "*When cleaning directory, number of versions to keep.")
 
-(defvar delete-old-versions nil
+(defcustom delete-old-versions nil
   "*If t, delete excess backup versions silently.
-If nil, ask confirmation.  Any other value prevents any trimming.")
+If nil, ask confirmation.  Any other value prevents any trimming."
+  :type '(choice (const :tag "Delete" t)
+                 (const :tag "Ask" nil)
+                 (sexp :tag "Leave" :format "%t\n" other))
+  :group 'backup)
 
-(defvar kept-old-versions 2
-  "*Number of oldest versions to keep when a new numbered backup is made.")
+(defcustom kept-old-versions 2
+  "*Number of oldest versions to keep when a new numbered backup is made."
+  :type 'integer
+  :group 'backup)
 
-(defvar kept-new-versions 2
+(defcustom kept-new-versions 2
   "*Number of newest versions to keep when a new numbered backup is made.
-Includes the new backup.  Must be > 0")
+Includes the new backup.  Must be > 0"
+  :type 'integer
+  :group 'backup)
 
-(defconst require-final-newline nil
+(defcustom require-final-newline nil
   "*Value of t says silently ensure a file ends in a newline when it is saved.
 Non-nil but not t says ask user whether to add a newline when there isn't one.
-nil means don't add newlines.")
+nil means don't add newlines."
+  :type '(choice (const :tag "Off" nil)
+		 (const :tag "Add" t)
+		 (sexp :tag "Ask" :format "%t\n" ask))
+  :group 'editing-basics)
 
-(defconst auto-save-default t
-  "*Non-nil says by default do auto-saving of every file-visiting buffer.")
+(defcustom auto-save-default t
+  "*Non-nil says by default do auto-saving of every file-visiting buffer."
+  :type 'boolean
+  :group 'auto-save)
 
-(defconst auto-save-visited-file-name nil
+(defcustom auto-save-visited-file-name nil
   "*Non-nil says auto-save a buffer in the file it is visiting, when practical.
-Normally auto-save files are written under other names.")
+Normally auto-save files are written under other names."
+  :type 'boolean
+  :group 'auto-save)
 
-(defconst save-abbrevs nil
+(defcustom save-abbrevs nil
   "*Non-nil means save word abbrevs too when files are saved.
-Loading an abbrev file sets this to t.")
+Loading an abbrev file sets this to t."
+  :type 'boolean
+  :group 'abbrev)
 
-(defconst find-file-run-dired t
-  "*Non-nil says run dired if `find-file' is given the name of a directory.")
+(defcustom find-file-run-dired t
+  "*Non-nil says run dired if `find-file' is given the name of a directory."
+  :type 'boolean
+  :group 'find-file)
 
 ;;;It is not useful to make this a local variable.
 ;;;(put 'find-file-not-found-hooks 'permanent-local t)
@@ -253,23 +302,31 @@
 So this list is cleared if you change the visited file name.
 See also `write-file-hooks'.")
 
-(defconst enable-local-variables t
+(defcustom enable-local-variables t
   "*Control use of local-variables lists in files you visit.
 The value can be t, nil or something else.
 A value of t means local-variables lists are obeyed;
 nil means they are ignored; anything else means query.
 
 The command \\[normal-mode] always obeys local-variables lists
-and ignores this variable.")
+and ignores this variable."
+  :type '(choice (const :tag "Obey" t)
+		 (const :tag "Ignore" nil)
+		 (sexp :tag "Query" :format "%t\n" other))
+  :group 'find-file)
 
-(defconst enable-local-eval 'maybe
+(defcustom enable-local-eval 'maybe
   "*Control processing of the \"variable\" `eval' in a file's local variables.
 The value can be t, nil or something else.
 A value of t means obey `eval' variables;
 nil means ignore them; anything else means query.
 
 The command \\[normal-mode] always obeys local-variables lists
-and ignores this variable.")
+and ignores this variable."
+  :type '(choice (const :tag "Obey" t)
+		 (const :tag "Ignore" nil)
+		 (sexp :tag "Query" :format "%t\n" other))
+  :group 'find-file)
 
 ;; Avoid losing in versions where CLASH_DETECTION is disabled.
 (or (fboundp 'lock-buffer)
@@ -817,12 +874,14 @@
 			      (substring filename (match-end 0)))))))
       filename)))
 
-(defvar find-file-not-true-dirname-list nil
+(defcustom find-file-not-true-dirname-list nil
   "*List of logical names for which visiting shouldn't save the true dirname.
 On VMS, when you visit a file using a logical name that searches a path,
 you may or may not want the visited file name to record the specific
 directory where the file was found.  If you *do not* want that, add the logical
-name to this list as a string.")
+name to this list as a string."
+  :type '(repeat (string :tag "Name"))
+  :group 'find-file)
 
 ;; This function is needed by FSF vc.el.  I hope somebody can make it
 ;; work for XEmacs.  -sb.
@@ -1160,6 +1219,8 @@
     ("\\.ml\\'" . lisp-mode)
     ("\\.ma?k\\'" . makefile-mode)
     ("[Mm]akefile\\(\\.\\|\\'\\)" . makefile-mode)
+    ("\\.X\\(defaults\\|environment\\|resources\\|modmap\\)\\'" . xrdb-mode)
+    ("/app-defaults/" . xrdb-mode)
     )
 "Alist of filename patterns vs. corresponding major mode functions.
 Each element looks like (REGEXP . FUNCTION) or (REGEXP FUNCTION NON-NIL).
@@ -2204,13 +2265,20 @@
 	(basic-save-buffer-1))
     'continue-save-buffer))
 
+(defcustom save-some-buffers-query-display-buffer xemacs-betaname
+  "*Non-nil makes `\\[save-some-buffers]' switch to the buffer offered for saving."
+  :type 'boolean
+  :group 'editing-basics)
+
 (defun save-some-buffers (&optional arg exiting)
   "Save some modified file-visiting buffers.  Asks user about each one.
 Optional argument (the prefix) non-nil means save all with no questions.
 Optional second argument EXITING means ask about certain non-file buffers
  as well as about file buffers."
   (interactive "P")
-  (save-window-excursion
+  (save-excursion
+    (save-window-excursion
+    ;; XEmacs - do not use queried flag
     (let ((files-done
 	   (map-y-or-n-p
 	    (function
@@ -2227,6 +2295,11 @@
 			    (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))
@@ -2267,7 +2340,7 @@
 		  (setq abbrevs-changed nil)
 		  t))))
       (or (> files-done 0) abbrevs-done
-	  (message "(No files need saving)")))))
+	  (message "(No files need saving)"))))))
 
 
 (defun not-modified (&optional arg)
@@ -2782,15 +2855,19 @@
 You can redefine this for customization."
   (string-match "\\`#.*#\\'" filename))
 
-(defconst list-directory-brief-switches
+(defcustom list-directory-brief-switches
   (if (eq system-type 'vax-vms) "" "-CF")
-  "*Switches for list-directory to pass to `ls' for brief listing,")
+  "*Switches for list-directory to pass to `ls' for brief listing."
+  :type 'string
+  :group 'dired)
 
-(defconst list-directory-verbose-switches
+(defcustom list-directory-verbose-switches
   (if (eq system-type 'vax-vms)
       "/PROTECTION/SIZE/DATE/OWNER/WIDTH=(OWNER:10)"
     "-l")
-  "*Switches for list-directory to pass to `ls' for verbose listing,")
+  "*Switches for list-directory to pass to `ls' for verbose listing,"
+  :type 'string
+  :group 'dired)
 
 (defun list-directory (dirname &optional verbose)
   "Display a list of files in or matching DIRNAME, a la `ls'.
diff -r 4de2936b4e77 -r 0132846995bd lisp/prim/frame.el
--- a/lisp/prim/frame.el	Mon Aug 13 09:42:28 2007 +0200
+++ b/lisp/prim/frame.el	Mon Aug 13 09:43:35 2007 +0200
@@ -27,12 +27,16 @@
 
 ;;; Code:
 
+(defgroup frames nil
+  "Support for Emacs frames and window systems."
+  :group 'environment)
+
 ; No need for `frame-creation-function'.
 
 ;;; The initial value given here for this must ask for a minibuffer.
 ;;; There must always exist a frame with a minibuffer, and after we
 ;;; delete the terminal frame, this will be the only frame.
-(defvar initial-frame-plist '(minibuffer t)
+(defcustom initial-frame-plist '(minibuffer t)
   "Plist of frame properties for creating the initial X window frame.
 You can set this in your `.emacs' file; for example,
   (setq initial-frame-plist '(top 1 left 1 width 80 height 55))
@@ -52,30 +56,42 @@
 * Set `default-frame-plist' to override these options so that they
   don't affect subsequent frames.
 * Set `initial-frame-plist' in a way that matches the X resources,
-  to override what you put in `default-frame-plist'.")
+  to override what you put in `default-frame-plist'."
+  :type '(repeat (group :inline t
+			(symbol :tag "Property")
+			(sexp :tag "Value")))
+  :group 'frames)
 
-(defvar minibuffer-frame-plist '(width 80 height 2 menubar-visible-p nil
+(defcustom minibuffer-frame-plist '(width 80 height 2 menubar-visible-p nil
 				       default-toolbar-visible-p nil)
   "Plist of frame properties for initially creating a minibuffer frame.
 You can set this in your `.emacs' file; for example,
   (setq minibuffer-frame-plist '(top 1 left 1 width 80 height 2))
 Properties specified here supersede the values given in
 `default-frame-plist'.
-The format of this can also be an alist for backward compatibility.")
+The format of this can also be an alist for backward compatibility."
+  :type '(repeat (group :inline t
+			(symbol :tag "Property")
+			(sexp :tag "Value")))
+  :group 'frames)
 
-(defvar pop-up-frame-plist nil
+(defcustom pop-up-frame-plist nil
   "Plist of frame properties used when creating pop-up frames.
 Pop-up frames are used for completions, help, and the like.
 This variable can be set in your init file, like this:
   (setq pop-up-frame-plist '(width 80 height 20))
 These supersede the values given in `default-frame-plist'.
-The format of this can also be an alist for backward compatibility.")
+The format of this can also be an alist for backward compatibility."
+  :type '(repeat (group :inline t
+			(symbol :tag "Property")
+			(sexp :tag "Value")))
+  :group 'frames)
 
 (setq pop-up-frame-function
       (function (lambda ()
 		  (make-frame pop-up-frame-plist))))
 
-(defvar special-display-frame-plist '(height 14 width 80 unsplittable t)
+(defcustom special-display-frame-plist '(height 14 width 80 unsplittable t)
   "*Plist of frame properties used when creating special frames.
 Special frames are used for buffers whose names are in
 `special-display-buffer-names' and for buffers whose names match
@@ -83,7 +99,11 @@
 This variable can be set in your init file, like this:
   (setq special-display-frame-plist '(width 80 height 20))
 These supersede the values given in `default-frame-plist'.
-The format of this can also be an alist for backward compatibility.")
+The format of this can also be an alist for backward compatibility."
+  :type '(repeat (group :inline t
+			(symbol :tag "Property")
+			(sexp :tag "Value")))
+  :group 'frames)
 
 (defun safe-alist-to-plist (cruftiness)
   (if (consp (car cruftiness))
@@ -767,15 +787,19 @@
 
 ;;; auto-raise and auto-lower
 
-(defvar auto-raise-frame nil
+(defcustom auto-raise-frame nil
   "*If true, frames will be raised to the top when selected.
 Under X, most ICCCM-compliant window managers will have an option to do this
-for you, but this variable is provided in case you're using a broken WM.")
+for you, but this variable is provided in case you're using a broken WM."
+  :type 'boolean
+  :group 'frames)
 
-(defvar auto-lower-frame nil
+(defcustom auto-lower-frame nil
   "*If true, frames will be lowered to the bottom when no longer selected.
 Under X, most ICCCM-compliant window managers will have an option to do this
-for you, but this variable is provided in case you're using a broken WM.")
+for you, but this variable is provided in case you're using a broken WM."
+  :type 'boolean
+  :group 'frames)
 
 (defun default-select-frame-hook ()
   "Implements the `auto-raise-frame' variable.
@@ -1050,11 +1074,15 @@
 	(append (list save-frame) frames)
       frames)))
 
-(defvar temp-buffer-shrink-to-fit nil
-  "*When non-nil resize temporary output buffers to minimize blank lines.")
+(defcustom temp-buffer-shrink-to-fit nil
+  "*When non-nil resize temporary output buffers to minimize blank lines."
+  :type 'boolean
+  :group 'frames)
 
-(defvar temp-buffer-max-height .5
-  "*Proportion of frame to use for temp windows.")
+(defcustom temp-buffer-max-height .5
+  "*Proportion of frame to use for temp windows."
+  :type 'number
+  :group 'frames)
 
 (defun show-temp-buffer-in-current-frame (buffer)
   "For use as the value of temp-buffer-show-function:
diff -r 4de2936b4e77 -r 0132846995bd lisp/prim/lisp.el
--- a/lisp/prim/lisp.el	Mon Aug 13 09:42:28 2007 +0200
+++ b/lisp/prim/lisp.el	Mon Aug 13 09:43:35 2007 +0200
@@ -34,14 +34,21 @@
 ;;; Code:
 
 ;; Note that this variable is used by non-lisp modes too.
-(defvar defun-prompt-regexp nil
+(defcustom defun-prompt-regexp nil
   "*Non-nil => regexp to ignore, before the character that starts a defun.
 This is only necessary if the opening paren or brace is not in column 0.
-See `beginning-of-defun'.")
+See `beginning-of-defun'."
+  :type '(choice (const :tag "none" nil)
+		 regexp)
+  :group 'lisp)
+
 (make-variable-buffer-local 'defun-prompt-regexp)
 
-(defvar parens-require-spaces t
-  "Non-nil => `insert-parentheses' should insert whitespace as needed.")
+(defcustom parens-require-spaces t
+  "Non-nil => `insert-parentheses' should insert whitespace as needed."
+  :type 'boolean
+  :group 'editing-basics
+  :group 'lisp)
 
 (defun forward-sexp (&optional arg)
   "Move forward across one balanced expression (sexp).
diff -r 4de2936b4e77 -r 0132846995bd lisp/prim/loaddefs.el
--- a/lisp/prim/loaddefs.el	Mon Aug 13 09:42:28 2007 +0200
+++ b/lisp/prim/loaddefs.el	Mon Aug 13 09:43:35 2007 +0200
@@ -90,6 +90,75 @@
 		  ".lof" ".blg" ".bbl" ".glo" ".idx" ".lot" ".fmt"
 		  ".diff" ".oi"))))
 
+(setq debug-ignored-errors
+      '(beginning-of-line
+	beginning-of-buffer
+	end-of-line
+        end-of-buffer
+	end-of-file buffer-read-only
+	"^Previous command was not a yank\\'"
+	"^Minibuffer window is not active\\'"
+	"^End of history; no next item\\'"
+	"^Beginning of history; no preceding item\\'"
+	"^No recursive edit is in progress\\'"
+	"^Changes to be undone are outside visible portion of buffer\\'"
+	"^No undo information in this buffer\\'"
+	"^No further undo information\\'"
+	"^Save not confirmed\\'"
+	"^Recover-file cancelled\\.\\'"
+
+	;; comint
+	"^Not at command line\\'"
+	"^Empty input ring\\'"
+	"^No history\\'"
+	"^Not found\\'";; To common?
+	"^Current buffer has no process\\'"
+
+	;; dabbrev
+	"^No dynamic expansion for \".*\" found\\.\\'"
+	"^No further dynamic expansions for \".*\" found\\.\\'"
+	"^No further dynamic expansions for `.*' found\\'"
+
+	;; Completion
+	"^To complete, the point must be after a symbol at least [0-9]* character long\\.\\'"
+	"^The string \".*\" is too short to be saved as a completion\\.\\'"
+
+	;; Compile
+	"^No more errors\\( yet\\|\\)\\'"
+
+	;; Gnus
+	"^NNTP: Connection closed\\.\\'"
+
+	;; info
+	"^Node has no Previous\\'"
+	"^No \".*\" in index\\'"
+
+	;; imenu
+	"^No items suitable for an index found in this buffer\\.\\'"
+	"^The mode \".*\" does not take full advantage of imenu\\.el yet\\.\\'"
+
+	;; ispell
+	"^No word found to check!\\'"
+
+	;; man
+
+	;; etags
+	"^No tags table in use!  Use .* to select one\\.\\'"
+	"^There is no default tag\\'"
+	"^No previous tag locations\\'"
+	"^File .* is not a valid tags table\\'"
+	"^No \\(more \\|\\)tags \\(matching\\|containing\\) "
+	"^Rerun etags: `.*' not found in "
+	"^All files processed\\.\\'"
+	"^No .* or .* in progress.\\'"
+	"^File .* not in current tags tables\\'"
+	"No tags table loaded."
+	"^Nothing to complete\\'"
+
+	;; BBDB
+	"^no previous record\\'"
+	"^no next record\\'"))
+
 (make-variable-buffer-local 'indent-tabs-mode)
 
 
@@ -310,9 +379,15 @@
 
 
 ;;; Load in generated autoloads (made by autoload.el).
-(condition-case nil
-    (load "auto-autoloads")
-  (file-error nil))
+;; (condition-case nil
+    ;; (load "auto-autoloads")
+  ;; (file-error nil))
+(let ((dir load-path))
+  (while dir
+    (condition-case nil
+	(load (concat (car dir) "/auto-autoloads"))
+      (file-error nil))
+    (pop dir)))
 
 ;;; Local Variables:
 ;;; no-byte-compile: t
diff -r 4de2936b4e77 -r 0132846995bd lisp/prim/loadup.el
--- a/lisp/prim/loadup.el	Mon Aug 13 09:42:28 2007 +0200
+++ b/lisp/prim/loadup.el	Mon Aug 13 09:43:35 2007 +0200
@@ -72,146 +72,25 @@
      ;; with garbage-collected junk)
      (defmacro load-gc (file)
        (list 'prog1 (list 'load file) '(garbage-collect)))
-     (load-gc "backquote") 		; needed for defsubst etc.
-     (load-gc "bytecomp-runtime")	; define defsubst
-     (load-gc "subr") 			; load the most basic Lisp functions
-     (load-gc "replace") 		; match-string used in version.el.
-     (load-gc "version.el")		; Ignore compiled-by-mistake version.elc
-     (load-gc "cl")
-     (load-gc "featurep")
-     (load-gc "widget")
-     (load-gc "custom") ; Before the world so everything can be customized
-     (load-gc "cus-start") ; for customization of builtin variables
-     (load-gc "cmdloop")
-     (or (fboundp 'recursive-edit) (load-gc "cmdloop1"))
-     (load-gc "keymap")
-     (load-gc "syntax")
-     (load-gc "device")
-     (load-gc "console")
-     (load-gc "obsolete")
-     (load-gc "specifier")
-     (load-gc "faces")	; must be loaded before any make-face call
-     ;;(load-gc "facemenu") #### not yet ported
-     (load-gc "glyphs")
-     (load-gc "objects")
-     (load-gc "extents")
-     (load-gc "events")
-     (load-gc "text-props")
-     (load-gc "process")
-     (load-gc "frame") ; move up here cause some stuff needs it here
-     (load-gc "map-ynp")
-     (load-gc "simple")
-     (load-gc "keydefs") ; Before loaddefs so that keymap vars exist.
-     (load-gc "abbrev")
-     (load-gc "derived")
-     (load-gc "minibuf")
-     (load-gc "list-mode")
-     (load-gc "modeline") ; needs simple.el to be loaded first
-     ;; If SparcWorks support is included some additional packages are
-     ;; dumped which would normally have autoloads.  To avoid
-     ;; duplicate doc string warnings, SparcWorks uses a separate
-     ;; autoloads file with the dumped packages removed.
-     ;; 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"))
-     (load-gc "loaddefs") ; <=== autoloads get put here
-     (load-gc "misc")
-     ;; (load-gc "profile")
-     (load-gc "help")
-     ;; (load-gc "hyper-apropos")  Soon...
-     (when (not (featurep 'mule))
-       (load-gc "files-nomule"))
-     (load-gc "files")
-     (load-gc "lib-complete")
-     (load-gc "format")
-     (load-gc "indent")
-     (load-gc "isearch-mode")
-     (load-gc "buffer")
-     (load-gc "buff-menu")
-     (load-gc "undo-stack")
-     (load-gc "window")
-     (load-gc "window-xemacs")
-     (load-gc "paths.el")		; don't get confused if paths compiled.
-     (load-gc "startup")
-     (load-gc "lisp")
-     (load-gc "page")
-     (load-gc "register")
-     (load-gc "iso8859-1")		; This must be before any modes
-                                        ; (sets standard syntax table.)
-     (load-gc "paragraphs")
-     (load-gc "lisp-mode")
-     (load-gc "text-mode")
-     (load-gc "fill")
-     ;; (load-gc "cc-mode")		; as FSF goes so go we ..
-     ;; (load-gc "scroll-in-place")	; We're not ready for this :-(
-     ;; we no longer load buff-menu automatically.
-     ;; it will get autoloaded if needed.
-     
-     (cond  ; Differences based on system-type
-      ((eq system-type 'vax-vms)
-       (load-gc "vmsproc")
-       (load-gc "vms-patch"))
-      ((eq system-type 'windows-nt)
-       ;; (load-gc "ls-lisp")
-       (load-gc "winnt"))
-      ((eq system-type 'ms-dos)
-       ;; (load-gc "ls-lisp")
-       (load-gc "dos-fns")
-       (load-gc "disp-table")))	; needed to setup ibm-pc char set,
-				; see internal.el
-     (when (featurep 'lisp-float-type)
-       (load-gc "float-sup"))
-     (load-gc "itimer") ; for vars auto-save-timeout and auto-gc-threshold
-     (load-gc "itimer-autosave")
-     (if (featurep 'toolbar)
-	 (load-gc "toolbar")
-       ;; else still define a few functions.
-       (defun toolbar-button-p    (obj) "No toolbar support." nil)
-       (defun toolbar-specifier-p (obj) "No toolbar support." nil))
-     (when (featurep 'scrollbar)
-       (load-gc "scrollbar"))
-     (when (featurep 'menubar)
-       (load-gc "menubar"))
-     (when (featurep 'dialog)
-       (load-gc "dialog"))
-     (when (featurep 'mule)
-       (load-gc "mule-load.el"))
-     (when (featurep 'window-system)
-       (load-gc "gui")
-       (load-gc "mode-motion")
-       (load-gc "mouse"))
-     (when (featurep 'x)
-       ;; preload the X code, for faster startup.
-       (when (featurep 'menubar)
-	 (load-gc "x-menubar")
-	 ;; autoload this.
-	 ;;(load-gc "x-font-menu")
-	 )
-       (load-gc "x-faces")
-       (load-gc "x-iso8859-1")
-       (load-gc "x-mouse")
-       (load-gc "x-select")
-       (when (featurep 'scrollbar)
-	 (load-gc "x-scrollbar"))
-       (load-gc "x-misc")
-       (load-gc "x-init")
-       (when (featurep 'toolbar)
-	 (load-gc "x-toolbar"))
-       )
-     (when (featurep 'tty)
-       ;; preload the TTY init code.
-       (load-gc "tty-init"))
-     (when (featurep 'tooltalk)
-       (load-gc "tooltalk/tooltalk-load"))
-     (load-gc "vc-hooks")
-     (load-gc "ediff-hook")
-     (load-gc "fontl-hooks")
-     (load-gc "auto-show")
-     (when (featurep 'energize)
-       (load-gc "energize/energize-load.el"))
-     (when (featurep 'sparcworks)
-       (load-gc "sunpro/sunpro-load.el"))
-     (fmakunbound 'load-gc)
+     ;; Need a minimal number hardcoded to get going for now.
+     ;; (load-gc "backquote")		; needed for defsubst etc.
+     ;; (load-gc "bytecomp-runtime")	; define defsubst
+     ;; (load-gc "subr")		; load the most basic Lisp functions
+     ;; (load-gc "replace")		; match-string used in version.el.
+     ;; (load-gc "version.el")	; Ignore compiled-by-mistake version.elc
+     ;; (load-gc "cl")
+     ;; (load-gc "featurep") ; OBSOLETE now
+     (let (dumped-lisp-packages file)
+       (load "dumped-lisp.el")
+       (while (setq file (car dumped-lisp-packages))
+	 (load-gc file)
+	 (setq dumped-lisp-packages (cdr dumped-lisp-packages)))
+       (if (not (featurep 'toolbar))
+	   (progn
+	     ;; else still define a few functions.
+	     (defun toolbar-button-p    (obj) "No toolbar support." nil)
+	     (defun toolbar-specifier-p (obj) "No toolbar support." nil)))
+       (fmakunbound 'load-gc))
      )) ;; end of call-with-condition-handler
 
 
diff -r 4de2936b4e77 -r 0132846995bd lisp/prim/make-docfile.el
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lisp/prim/make-docfile.el	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,149 @@
+;;; make-docfile.el --- Cache docstrings in external file
+
+;; Copyright (C) 1985, 1986, 1992-1995, 1997 Free Software Foundation, Inc.
+
+;; Author: Unknown
+;; Maintainer: Steven L Baur <steve@altair.xemacs.org>
+;; Keywords: internal
+
+;; 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:
+
+;; This is a front-end to the make-docfile program that gathers up all the
+;; lisp files that will be dumped with XEmacs.  It would probably be best
+;; to just move make-docfile.c completely to lisp and be done with it.
+
+;;; Code:
+
+(defvar options nil)
+(defvar processed nil)
+(defvar docfile nil)
+(defvar docfile-buffer nil)
+(defvar site-file-list nil)
+
+;; Gobble up the stuff we don't wish to pass on.
+(setq command-line-args (cdr (cdr (cdr (cdr command-line-args)))))
+
+;; First gather up the command line options.
+(let (done)
+  (while (and (null done) command-line-args)
+    (let ((arg (car command-line-args)))
+      (cond ((or (string-equal arg "-o") ; Specify DOC file name
+		 (string-equal arg "-a") ; Append to DOC file
+		 (string-equal arg "-d")) ; Set working directory
+	     (if (string-equal arg "-o")
+		 (setq docfile (car (cdr command-line-args))))
+	     (setq options (cons arg options))
+	     (setq options (cons (car (cdr command-line-args)) options)))
+	    ((string-equal arg "-i") ; Set site files to scan
+	     (setq site-file-list (car (cdr command-line-args))))
+	    (t (setq done t)))
+      (if (null done)
+	  (setq command-line-args (cdr (cdr command-line-args)))))))
+(setq options (nreverse options))
+
+;; (print (concat "Options: " (prin1-to-string options)))
+
+;; Next process the list of C files.
+(while command-line-args
+  (let ((arg (car command-line-args)))
+    (if (null (member arg processed))
+	(setq processed (cons arg processed))))
+  (setq command-line-args (cdr command-line-args)))
+
+;; Then process the list of Lisp files.
+(define-function 'defalias 'define-function)
+(let ((temp-path (expand-file-name ".." (car load-path))))
+  (setq load-path (nconc (directory-files temp-path t "^[^-.]"
+					  nil 'dirs-only)
+			 (cons temp-path load-path))))
+
+;; Then process the autoloads
+(setq autoload-file-name "auto-autoloads.elc")
+(setq source-directory (concat default-directory "../lisp"))
+;; (print (concat "Source directory: " source-directory))
+(require 'packages)
+
+;; We must have some lisp support at this point
+
+;(load "backquote")
+;(load "bytecomp-runtime")
+;(load "subr")
+;(load "replace")
+;(load "version.el")
+;(load "cl")
+
+;; (load "featurep")
+
+(let (dumped-lisp-packages)
+ (load (concat default-directory "../lisp/prim/dumped-lisp.el"))
+ (setq dumped-lisp-packages
+       (append dumped-lisp-packages packages-hardcoded-lisp))
+ (while dumped-lisp-packages
+   (let ((arg (packages-add-suffix (car dumped-lisp-packages))))
+     (setq arg (locate-library arg))
+     (if (null (member arg processed))
+	 (setq processed (cons arg processed)))
+     (setq dumped-lisp-packages (cdr dumped-lisp-packages)))))
+
+;; Finally process the list of site-loaded files.
+(if site-file-list
+    (let (site-load-packages)
+      (load site-file-list t t)
+      (while site-load-packages
+	(let ((arg (car site-load-packages)))
+	  (if (not (member arg processed))
+	      (setq processed (cons arg processed))))
+	(setq site-load-packages (cdr site-load-packages)))))
+
+(let ((autoloads (list-autoloads)))
+  ;; (print (concat "Autoloads: " (prin1-to-string autoloads)))
+  (while autoloads
+    (let ((arg (car autoloads)))
+      (if (null (member arg processed))
+	  (setq processed (cons arg processed)))
+      (setq autoloads (cdr autoloads)))))
+
+;; Now fire up make-docfile and we're done
+
+(setq processed (nreverse processed))
+
+;; (print (prin1-to-string (append options processed)))
+
+(print "Spawning make-docfile ...")
+;; (print (prin1-to-string (append options processed)))
+
+(setq exec-path (list (concat default-directory "../lib-src")))
+
+;; (locate-file-clear-hashing nil)
+(apply 'call-process-internal
+       ;; (concat default-directory "../lib-src/make-docfile")
+       "make-docfile"
+       nil
+       t
+       nil
+       (append options processed))
+
+;; (write-region-internal (point-min) (point-max) "/tmp/DOC")
+
+(kill-emacs)
+
+;;; make-docfile.el ends here
diff -r 4de2936b4e77 -r 0132846995bd lisp/prim/minibuf.el
--- a/lisp/prim/minibuf.el	Mon Aug 13 09:42:28 2007 +0200
+++ b/lisp/prim/minibuf.el	Mon Aug 13 09:43:35 2007 +0200
@@ -515,7 +515,7 @@
 	(save-excursion
 	  (set-buffer
 	   (find-file-noselect
-	    (substitute-in-file-name "~/.emacs")))
+	    (substitute-in-file-name custom-file)))
 	  (goto-char (point-min))
 	  (if (re-search-forward 
 	       "^(setq minibuffer-max-depth \\([0-9]+\\|'?nil\\|'?()\\))\n"
diff -r 4de2936b4e77 -r 0132846995bd lisp/prim/novice.el
--- a/lisp/prim/novice.el	Mon Aug 13 09:42:28 2007 +0200
+++ b/lisp/prim/novice.el	Mon Aug 13 09:43:35 2007 +0200
@@ -123,13 +123,13 @@
 ;;;###autoload
 (defun enable-command (command)
   "Allow COMMAND to be executed without special confirmation from now on.
-The user's .emacs file is altered so that this will apply
+The user's `custom-file' is altered so that this will apply
 to future sessions."
   (interactive "CEnable command: ")
   (put command 'disabled nil)
   (save-excursion
    (set-buffer (find-file-noselect
-		(substitute-in-file-name user-init-file)))
+		(substitute-in-file-name custom-file)))
    (goto-char (point-min))
    (if (search-forward (concat "(put '" (symbol-name command) " ") nil t)
        (delete-region
diff -r 4de2936b4e77 -r 0132846995bd lisp/prim/overlay.el
--- a/lisp/prim/overlay.el	Mon Aug 13 09:42:28 2007 +0200
+++ b/lisp/prim/overlay.el	Mon Aug 13 09:43:35 2007 +0200
@@ -2,7 +2,8 @@
 
 ;;;; Copyright (C) 1997 Free Software Foundation, Inc.
 
-;; Maintainer: XEmacs
+;; Author: Joe Nuspl <nuspl@sequent.com>
+;; Maintainer: XEmacs Development Team (in <hniksic@srce.hr> incarnation)
 ;; Keywords: internal
 
 ;; This file is part of XEmacs.
@@ -24,6 +25,45 @@
 
 ;;; Synched up with: Not in FSF.
 
+;;; Commentary:
+
+;; Unlike the text-properties interface, these functions are in fact
+;; totally useless in XEmacs.  They are a more or less straightforward
+;; interface to the much better extent API, provided exclusively for
+;; GNU Emacs compatibility.  If you notice an incompatibility not
+;; mentioned below, be sure to mention it.  Anyways, you should really
+;; not use this.
+
+;; Known incompatibilities with the FSF interface:
+
+;; 1. There is not an `overlay' type.  Any extent with non-nil
+;;    'overlay property is considered an "overlay".
+;;
+;; 2. Some features of FSF overlays have not been implemented in
+;;    extents (or are unneeded).  Specifically, those are the
+;;    following special properties: window, insert-in-front-hooks,
+;;    insert-behind-hooks, and modification-hooks.  Some of these will
+;;    probably be implemented for extents in the future.
+;;
+;; 3. In FSF, beginning and end of an overlay are markers, which means
+;;    that you can use `insert-before-markers' to change insertion
+;;    property of overlay.  It will not work in this emulation, and we
+;;    have no plans of providing it.
+;;
+;; 4. The `overlays-in' and `overlays-at' functions in some cases
+;;    don't work as they should.  To be fixed RSN.
+;;
+;; 5. Finally, setting or modification of overlay properties specific
+;;    to extents will have unusual results.  While (overlay-put
+;;    overlay 'start-open t) does nothing under FSF, it has a definite
+;;    effect under XEmacs.  This is solved by simply avoiding such
+;;    names (see `set-extent-property' for a list).
+
+;; Some functions were broken; fixed-up by Hrvoje Niksic, June 1997.
+
+
+;;; Code:
+
 (defun overlayp (object)
   "Return t if OBJECT is an overlay."
   (and (extentp object)
@@ -37,23 +77,17 @@
 front delimiter advance when text is inserted there.
 The fifth arg REAR-ADVANCE, if non-nil, makes the
 rear delimiter advance when text is inserted there."
-  (let (overlay temp)
-    (if (null buffer)
-	(setq buffer (current-buffer))
-      (check-argument-type 'bufferp buffer))
+  (if (null buffer)
+      (setq buffer (current-buffer))
+    (check-argument-type 'bufferp buffer))
+  (when (> beg end)
+    (setq beg (prog1 end (setq end beg))))
 
-    (if (> beg end)
-	(setq temp beg
-	      beg end
-	      end temp))
-
-    (setq overlay (make-extent beg end buffer))
+  (let ((overlay (make-extent beg end buffer)))
     (set-extent-property overlay 'overlay t)
-
     (if front-advance
 	(set-extent-property overlay 'start-open t)
       (set-extent-property overlay 'start-closed t))
-
     (if rear-advance
 	(set-extent-property overlay 'end-closed t)
       (set-extent-property overlay 'end-open t))
@@ -65,27 +99,19 @@
 If BUFFER is omitted, leave OVERLAY in the same buffer it inhabits now.
 If BUFFER is omitted, and OVERLAY is in no buffer, put it in the current
 buffer."
-  (let (temp)
-    (check-argument-type 'overlayp overlay)
-    (if (null buffer)
-	(setq buffer (extent-object overlay)))
-    
-    (if (null buffer)
-	(setq buffer (current-buffer)))
-    
-    (check-argument-type 'bufferp buffer)
-    
-    (if (and (= beg end)
-	     (not (null (extent-property overlay 'evaporate))))
-	(delete-overlay overlay)
-
-      (if (> beg end)
-	  (setq temp beg
-		beg end
-		end temp))
-
-      (set-extent-endpoints overlay beg end buffer)
-      overlay)))
+  (check-argument-type 'overlayp overlay)
+  (if (null buffer)
+      (setq buffer (extent-object overlay)))
+  (if (null buffer)
+      (setq buffer (current-buffer)))
+  (check-argument-type 'bufferp buffer)
+  (and (= beg end)
+       (extent-property overlay 'evaporate)
+       (delete-overlay overlay))
+  (when (> beg end)
+    (setq beg (prog1 end (setq end beg))))
+  (set-extent-endpoints overlay beg end buffer)
+  overlay)
 
 (defun delete-overlay (overlay)
   "Delete the overlay OVERLAY from its buffer."
@@ -125,37 +151,38 @@
 and also contained within the specified region.
 Empty overlays are included in the result if they are located at BEG
 or between BEG and END."
-  (let (lst)
-    (mapcar (function
-	     (lambda (overlay)
-	       (and (extent-property overlay 'overlay)
-		    (setq lst (append lst (list overlay))))))
-	    (extent-list nil beg end))
-    lst))
+  (mapcar-extents #'identity nil nil beg end nil 'overlay))
 
 (defun next-overlay-change (pos)
   "Return the next position after POS where an overlay starts or ends.
 If there are no more overlay boundaries after POS, return (point-max)."
   (let ((next (point-max))
-	end)
-    (mapcar (function
-	     (lambda (overlay)
-	       (if (< (setq end (extent-end-position overlay)) next)
-		   (setq next end))))
-	    (overlays-in pos end))
+	tmp)
+    (map-extents
+     (lambda (overlay ignore)
+	    (when (or (and (< (setq tmp (extent-start-position overlay)) next)
+			   (> tmp pos))
+		      (and (< (setq tmp (extent-end-position overlay)) next)
+			   (> tmp pos)))
+	      (setq next tmp))
+       nil)
+     nil pos nil nil nil 'overlay)
     next))
 
 (defun previous-overlay-change (pos)
   "Return the previous position before POS where an overlay starts or ends.
 If there are no more overlay boundaries before POS, return (point-min)."
   (let ((prev (point-min))
-	beg)
-    (mapcar (function
-	     (lambda (overlay)
-	       (if (and (> (setq beg (extent-start-position overlay)) prev)
-			(< beg pos))
-		   (setq prev beg))))
-	    (overlays-in prev pos))
+	tmp)
+    (map-extents
+     (lambda (overlay ignore)
+       (when (or (and (> (setq tmp (extent-end-position overlay)) prev)
+		      (< tmp pos))
+		 (and (> (setq tmp (extent-start-position overlay)) prev)
+		      (< tmp pos)))
+	 (setq prev tmp))
+       nil)
+     nil nil pos nil nil 'overlay)
     prev))
 
 (defun overlay-lists ()
@@ -165,19 +192,17 @@
 Recentering overlays moves overlays between these lists.
 The lists you get are copies, so that changing them has no effect.
 However, the overlays you get are the real objects that the buffer uses."
-  (if (not (boundp 'xemacs-internal-overlay-center-pos))
-      (overlay-recenter (/ (- (point-max) (point-min)) 2)))
+  (or (boundp 'xemacs-internal-overlay-center-pos)
+      (overlay-recenter (1+ (/ (- (point-max) (point-min)) 2))))
   (let ((pos xemacs-internal-overlay-center-pos)
 	before after)
-    (mapcar
-     (function
-      (lambda (overlay)
-	(if (extent-property overlay 'overlay)
-	    (if (> pos (extent-end-position overlay))
-		(setq before (append before (list overlay)))
-	      (setq after (append after (list overlay)))))))
-     (extent-list))
-    (cons before after)))
+    (map-extents (lambda (overlay ignore)
+		   (if (> pos (extent-end-position overlay))
+		       (push overlay before)
+		     (push overlay after))
+		   nil)
+		 nil nil nil nil nil 'overlay)
+    (cons (nreverse before) (nreverse after))))
 
 (defun overlay-recenter (pos)
   "Recenter the overlays of the current buffer around position POS."
@@ -186,7 +211,12 @@
 (defun overlay-get (overlay prop)
   "Get the property of overlay OVERLAY with property name PROP."
   (check-argument-type 'overlayp overlay)
-  (extent-property overlay prop))
+  (let ((value (extent-property overlay prop))
+	category)
+    (if (and (null value)
+	     (setq category (extent-property overlay 'category)))
+	(get category prop)
+      value)))
 
 (defun overlay-put (overlay prop value)
   "Set one property of overlay OVERLAY: give property PROP value VALUE."
@@ -199,6 +229,8 @@
 	((eq prop 'after-string)
 	 (set-extent-property overlay 'end-glyph
 			      (make-glyph (vector 'string :data value))))
+	((eq prop 'local-map)
+	 (set-extent-property overlay 'keymap value))
 	((memq prop '(window insert-in-front-hooks insert-behind-hooks
 			     modification-hooks))
 	 (error "cannot support overlay '%s property under XEmacs"
diff -r 4de2936b4e77 -r 0132846995bd lisp/prim/packages.el
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lisp/prim/packages.el	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,135 @@
+;;; packages.el --- Low level support for XEmacs packages
+
+;; Copyright (C) 1997 Free Software Foundation, Inc.
+
+;; Author: Steven L Baur <steve@altair.xemacs.org>
+;; Keywords: internal, lisp
+
+;; 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:
+
+;; This file provides low level facilities for XEmacs startup.  Special
+;; requirements apply to some of these functions because they can be called
+;; during build from temacs and much of the usual lisp environment may
+;; be missing.
+
+;;; Code:
+
+(defvar autoload-file-name "auto-autoloads.el"
+  "Filename that autoloads are expected to be found in.")
+
+(defvar packages-hardcoded-lisp
+  '("cl-defs"
+    "startup"
+    )
+  "Lisp packages that are always dumped with XEmacs")
+
+(defvar packages-useful-lisp
+  '("bytecomp"
+    "byte-optimize"
+    "advice")
+  "Lisp packages that need early byte compilation.")
+
+(defvar packages-unbytecompiled-lisp
+  '("paths.el"
+    "version.el")
+  "Lisp packages that should not be byte compiled.")
+
+;; Copied from subr.el
+(if (null (fboundp 'lambda))
+    (defmacro lambda (&rest cdr)
+      (list 'function (cons 'lambda cdr))))
+
+;; Copied from help.el, could possibly move it to here permanently.
+;; This is taken directly from Emacs 19.34.94.
+
+(defun locate-library (library &optional nosuffix path interactive-call)
+  "Show the precise file name of Emacs library LIBRARY.
+This command searches the directories in `load-path' like `M-x load-library'
+to find the file that `M-x load-library RET LIBRARY RET' would load.
+Optional second arg NOSUFFIX non-nil means don't add suffixes `.elc' or `.el'
+to the specified name LIBRARY.
+
+If the optional third arg PATH is specified, that list of directories
+is used instead of `load-path'."
+  (interactive (list (read-string "Locate library: ")
+                     nil nil
+                     t))
+  (let (result)
+    (catch 'answer
+      (mapcar
+       (lambda (dir)
+         (mapcar
+          (lambda (suf)
+            (let ((try (expand-file-name (concat library suf) dir)))
+              (and (file-readable-p try)
+                   (null (file-directory-p try))
+                   (progn
+                     (setq result try)
+                     (throw 'answer try)))))
+          (if nosuffix
+              '("")
+            (let ((basic '(".elc" ".el" ""))
+                  (compressed '(".Z" ".gz" "")))
+              ;; If autocompression mode is on,
+              ;; consider all combinations of library suffixes
+              ;; and compression suffixes.
+              (if (rassq 'jka-compr-handler file-name-handler-alist)
+                  (apply 'nconc
+                         (mapcar (lambda (compelt)
+                                   (mapcar (lambda (baselt)
+                                             (concat baselt compelt))
+                                           basic))
+                                 compressed))
+                basic)))))
+       (or path load-path)))
+    (and interactive-call
+         (if result
+             (message "Library is file %s" result)
+           (message "No library %s in search path" library)))
+    result))
+
+(defun packages-add-suffix (str)
+  (if (null (string-match "\\.el\\'" str))
+      (concat str ".elc")
+    str))
+
+(defun list-autoloads ()
+  "List autoload files in (what will be) the normal lisp search path.
+This function is used during build to find where the global symbol files so
+they can be perused for their useful information."
+  ;; Source directory may not be initialized yet.
+  ;; (print (prin1-to-string load-path))
+  (if (null source-directory)
+      (setq source-directory (concat (car load-path) "/..")))
+  (let ((files (directory-files source-directory t ".*"))
+	file autolist)
+    (while (setq file (car-safe files))
+      (if (and (file-directory-p file)
+	       (file-exists-p (concat file "/" autoload-file-name)))
+	  (setq autolist (cons (concat file "/" autoload-file-name)
+			       autolist)))
+      (setq files (cdr files)))
+    autolist))
+
+(provide 'packages)
+
+;;; packages.el ends here
diff -r 4de2936b4e77 -r 0132846995bd lisp/prim/simple.el
--- a/lisp/prim/simple.el	Mon Aug 13 09:42:28 2007 +0200
+++ b/lisp/prim/simple.el	Mon Aug 13 09:43:35 2007 +0200
@@ -63,13 +63,18 @@
 ;;; Code:
 
 (defgroup editing-basics nil
-  "Most basic editing variables"
+  "Most basic editing variables."
   :group 'editing)
 
 (defgroup killing nil
-  "Killing and yanking commands"
+  "Killing and yanking commands."
   :group 'editing)
 
+(defgroup fill-comments nil
+  "Indenting and filling of comments."
+  :prefix "comment-"
+  :group 'fill)
+
 (defgroup paren-matching nil
   "Highlight (un)matching of parens and expressions."
   :prefix "paren-"
@@ -1149,10 +1154,11 @@
   (or (and beg end) (if zmacs-regions ;; rewritten for I18N3 snarfing
 			(error "The region is not active now")
 		      (error "The mark is not set now")))
-  (if (> beg end) (setq beg (prog1 end (setq end beg))))
   (if verbose (if buffer-read-only
-		  (message "Copying %d characters" (- end beg))
-		  (message "Killing %d characters" (- end beg))))
+		  (message "Copying %d characters"
+			   (- (max beg end) (min beg end)))
+		(message "Killing %d characters"
+			 (- (max beg end) (min beg end)))))
   (cond
 
    ;; I don't like this large change in behavior -- jwz
@@ -1991,24 +1997,34 @@
     (delete-char (length word1))
     (insert word2)))
 
-(defconst comment-column 32
+(defcustom comment-column 32
   "*Column to indent right-margin comments to.
 Setting this variable automatically makes it local to the current buffer.
 Each mode establishes a different default value for this variable; you
-can set the value for a particular mode using that mode's hook.")
+can set the value for a particular mode using that mode's hook."
+  :type 'integer
+  :group 'fill-comments)
 (make-variable-buffer-local 'comment-column)
 
-(defconst comment-start nil
-  "*String to insert to start a new comment, or nil if no comment syntax.")
-
-(defconst comment-start-skip nil
+(defcustom comment-start nil
+  "*String to insert to start a new comment, or nil if no comment syntax."
+  :type '(choice (const :tag "None" nil)
+		 string)
+  :group 'fill-comments)
+
+(defcustom comment-start-skip nil
   "*Regexp to match the start of a comment plus everything up to its body.
 If there are any \\(...\\) pairs, the comment delimiter text is held to begin
-at the place matched by the close of the first pair.")
-
-(defconst comment-end ""
+at the place matched by the close of the first pair."
+  :type '(choice (const :tag "None" nil)
+		 regexp)
+  :group 'fill-comments)
+
+(defcustom comment-end ""
   "*String to insert to end a new comment.
-Should be an empty string if comments are terminated by end-of-line.")
+Should be an empty string if comments are terminated by end-of-line."
+  :type 'string
+  :group 'fill-comments)
 
 (defconst comment-indent-hook nil
   "Obsolete variable for function to compute desired indentation for a comment.
@@ -2033,16 +2049,22 @@
 This function is called with no args with point at the beginning of
 the comment's starting delimiter.")
 
-(defconst block-comment-start nil
+(defcustom block-comment-start nil
   "*String to insert to start a new comment on a line by itself.
 If nil, use `comment-start' instead.
 Note that the regular expression `comment-start-skip' should skip this string
-as well as the `comment-start' string.")
-
-(defconst block-comment-end nil
+as well as the `comment-start' string."
+  :type '(choice (const :tag "Use `comment-start'" nil)
+		 string)
+  :group 'fill-comments)
+
+(defcustom block-comment-end nil
   "*String to insert to end a new comment on a line by itself.
 Should be an empty string if comments are terminated by end-of-line.
-If nil, use `comment-end' instead.")
+If nil, use `comment-end' instead."
+  :type '(choice (const :tag "Use `comment-end'" nil)
+		 string)
+  :group 'fill-comments)
 
 (defun indent-for-comment ()
   "Indent this line's comment to comment column, or insert an empty comment."
@@ -2296,13 +2318,19 @@
 		 (buffer-substring start end)))
           (buffer-substring start end)))))
 
-(defconst fill-prefix nil
+(defcustom fill-prefix nil
   "*String for filling to insert at front of new line, or nil for none.
-Setting this variable automatically makes it local to the current buffer.")
+Setting this variable automatically makes it local to the current buffer."
+  :type '(choice (const :tag "None" nil)
+		 string)
+  :group 'fill)
 (make-variable-buffer-local 'fill-prefix)
 
-(defconst auto-fill-inhibit-regexp nil
-  "*Regexp to match lines which should not be auto-filled.")
+(defcustom auto-fill-inhibit-regexp nil
+  "*Regexp to match lines which should not be auto-filled."
+  :type '(choice (const :tag "None" nil)
+		 regexp)
+  :group 'fill)
 
 ;; This function is the auto-fill-function of a buffer
 ;; when Auto-Fill mode is enabled.
@@ -2549,10 +2577,12 @@
 	 (error "set-fill-column requires an explicit argument")))
   (message "fill-column set to %d" fill-column))
 
-(defvar comment-multi-line t ; XEmacs - this works well with adaptive fill
+(defcustom comment-multi-line t ; XEmacs - this works well with adaptive fill
   "*Non-nil means \\[indent-new-comment-line] should continue same comment
 on new line, with no new terminator or starter.
-This is obsolete because you might as well use \\[newline-and-indent].")
+This is obsolete because you might as well use \\[newline-and-indent]."
+  :type 'boolean
+  :group 'fill-comments)
 
 (defun indent-new-comment-line (&optional soft)
   "Break line at point and indent, continuing comment if within one.
diff -r 4de2936b4e77 -r 0132846995bd lisp/prim/startup.el
--- a/lisp/prim/startup.el	Mon Aug 13 09:42:28 2007 +0200
+++ b/lisp/prim/startup.el	Mon Aug 13 09:43:35 2007 +0200
@@ -547,18 +547,32 @@
 	    (setq term (substring term 0 hyphend))
 	  (setq term nil))))))
 
+
+
 (defun load-user-init-file (init-file-user)
-  ;; This function actually reads the init files.
+  "This function actually reads the init files.
+First try .xemacs, then try .emacs, but only load one of the two."
   (when init-file-user
     (setq user-init-file
 	  (cond
 	   ((eq system-type 'ms-dos)
-	    (concat "~" init-file-user "/_emacs"))
+	    (concat "~" init-file-user "/_xemacs"))
 	   ((eq system-type 'vax-vms)
-	    "sys$login:.emacs")
+	    "sys$login:.xemacs")
 	   (t
-	    (concat "~" init-file-user "/.emacs"))))
+	    (concat "~" init-file-user "/.xemacs"))))
+    (unless (file-exists-p (expand-file-name user-init-file))
+      (setq user-init-file
+	    (cond
+	     ((eq system-type 'ms-dos)
+	      (concat "~" init-file-user "/_emacs"))
+	     ((eq system-type 'vax-vms)
+	      "sys$login:.emacs")
+	     (t
+	      (concat "~" init-file-user "/.emacs")))))
     (load user-init-file t t t)
+    (when (string= custom-file (concat "~" init-file-user "/.xemacs-custom"))
+      (load (concat "~" init-file-user "/.xemacs-custom") t t))
     (unless inhibit-default-init
       (let ((inhibit-startup-message nil))
 	;; Users are supposed to be told their rights.
diff -r 4de2936b4e77 -r 0132846995bd lisp/prim/subr.el
--- a/lisp/prim/subr.el	Mon Aug 13 09:42:28 2007 +0200
+++ b/lisp/prim/subr.el	Mon Aug 13 09:43:35 2007 +0200
@@ -238,21 +238,6 @@
 (define-function 'rplaca 'setcar)
 (define-function 'rplacd 'setcdr)
 
-;; XEmacs
-(defun mapvector (__function __seq)
-  "Apply FUNCTION to each element of SEQ, making a vector of the results.
-The result is a vector of the same length as SEQ.
-SEQ may be a list, a vector or a string."
-  (let* ((len (length __seq))
-	 (vec (make-vector len 'nil))
-	 (i 0))
-    (while (< i len)
-      (aset vec i (funcall __function (cond ((listp __seq)
-					     (nth i __seq))
-					    (t (aref __seq i)))))
-      (setq i (+ i 1)))
-    vec))
-
 ;;;; String functions.
 
 ;; XEmacs
@@ -322,8 +307,7 @@
   "Collect output to `standard-output' while evaluating FORMS and return
 it as a string."
   ;; by "William G. Dubuque" <wgd@zurich.ai.mit.edu> w/ mods from Stig
-  (` (save-excursion
-       (set-buffer (get-buffer-create " *string-output*"))
+  (` (with-current-buffer (get-buffer-create " *string-output*")
        (setq buffer-read-only nil)
        (buffer-disable-undo (current-buffer))
        (erase-buffer)
@@ -366,8 +350,7 @@
     `(let ((,temp-buffer
 	    (get-buffer-create (generate-new-buffer-name " *temp*"))))
        (unwind-protect
-	   (save-excursion
-	     (set-buffer ,temp-buffer)
+	   (with-current-buffer ,temp-buffer
 	     ,@forms)
 	 (and (buffer-name ,temp-buffer)
 	      (kill-buffer ,temp-buffer))))))
@@ -377,18 +360,16 @@
   "With the contents of the current buffer being STR, run BODY.
 Returns the new contents of the buffer, as modified by BODY.
 The original current buffer is restored afterwards."
-  `(let ((curbuf (current-buffer))
-         (tempbuf (get-buffer-create " *string-as-buffer-contents*")))
-     (unwind-protect
-         (progn
-           (set-buffer tempbuf)
-           (buffer-disable-undo (current-buffer))
-           (erase-buffer)
-           (insert ,str)
-           ,@body
-           (buffer-string))
-       (erase-buffer tempbuf)
-       (set-buffer curbuf))))
+  `(let ((tempbuf (get-buffer-create " *string-as-buffer-contents*")))
+     (with-current-buffer tempbuf
+       (unwind-protect
+	   (progn
+	     (buffer-disable-undo (current-buffer))
+	     (erase-buffer)
+	     (insert ,str)
+	     ,@body
+	     (buffer-string))
+	 (erase-buffer tempbuf)))))
 
 (defun insert-face (string face)
   "Insert STRING and highlight with FACE.  Returns the extent created."
diff -r 4de2936b4e77 -r 0132846995bd lisp/prim/tabify.el
--- a/lisp/prim/tabify.el	Mon Aug 13 09:42:28 2007 +0200
+++ b/lisp/prim/tabify.el	Mon Aug 13 09:43:35 2007 +0200
@@ -54,7 +54,8 @@
 		(progn
 		  (message "untabify: %d%% ..." percent)
 		  (setq percent (+ 5 percent)))))))
-      (message "untabify: done"))))
+      (message "untabify: done")))
+  nil)
 
 ;;;###autoload
 (defun tabify (start end)
diff -r 4de2936b4e77 -r 0132846995bd lisp/prim/update-elc.el
--- a/lisp/prim/update-elc.el	Mon Aug 13 09:42:28 2007 +0200
+++ b/lisp/prim/update-elc.el	Mon Aug 13 09:43:35 2007 +0200
@@ -44,31 +44,98 @@
 
 ;;; Code:
 
-(setq update-elc-files-to-compile
-      (delq nil
-	    (mapcar (function
-		     (lambda (x)
-		       (if (string-match "\.elc$" x)
-			   (let ((src (substring x 0 -1)))
-			     (if (file-newer-than-file-p src x)
-				 (progn
-				   (and (file-exists-p x)
-					(null (file-writable-p x))
-					(set-file-modes x (logior (file-modes x) 128)))
-				   src))))))
-		    ;; -batch gets filtered out.
-		    (nthcdr 3 command-line-args))))
+(defvar processed nil)
+(defvar update-elc-files-to-compile nil)
+
+;(setq update-elc-files-to-compile
+;      (delq nil
+;	    (mapcar (function
+;		     (lambda (x)
+;		       (if (string-match "\.elc$" x)
+;			   (let ((src (substring x 0 -1)))
+;			     (if (file-newer-than-file-p src x)
+;				 (progn
+;				   (and (file-exists-p x)
+;					(null (file-writable-p x))
+;					(set-file-modes x (logior (file-modes x) 128)))
+;				   src))))))
+;		    ;; -batch gets filtered out.
+;		    (nthcdr 3 command-line-args))))
+
+(define-function 'defalias 'define-function)
+(require 'packages)
+
+(let ((autol (list-autoloads)))
+  ;; (print (prin1-to-string autol))
+  (while autol
+    (let ((src (car autol)))
+      (if (and (file-exists-p src)
+	       (file-newer-than-file-p src (concat src "c")))
+	  (setq update-elc-files-to-compile
+		(cons src update-elc-files-to-compile))))
+    (setq autol (cdr autol))))
+
+;; We must have some lisp support at this point
+(let ((temp-path (expand-file-name ".." (car load-path))))
+  (setq load-path (nconc (directory-files temp-path t "^[^-.]"
+					  nil 'dirs-only)
+			 (cons temp-path load-path))))
+
+;(load "backquote")
+;(load "bytecomp-runtime")
+;(load "subr")
+;(load "replace")
+;(load "version.el")
+;(load "cl")
+;(load "featurep")
+
+;; (print (prin1-to-string update-elc-files-to-compile))
+
+(let (dumped-lisp-packages site-load-packages)
+  (load (concat default-directory "../lisp/prim/dumped-lisp.el"))
+  ;; (print (prin1-to-string dumped-lisp-packages))
+  (load (concat default-directory "../site-packages") t t)
+  (setq dumped-lisp-packages
+	(append packages-hardcoded-lisp
+		dumped-lisp-packages
+		packages-useful-lisp
+		site-load-packages))
+  (while dumped-lisp-packages
+    (let ((arg (car dumped-lisp-packages)))
+      ;; (print (prin1-to-string arg))
+      (if (null (member arg packages-unbytecompiled-lisp))
+	  (progn
+	    (setq arg (locate-library arg))
+	    (if (null arg)
+		(progn
+		  (print (format "Library file %s: not found"
+				 (car dumped-lisp-packages)))
+		  (kill-emacs)))
+	    (if (string-match "\\.elc?\\'" arg)
+		(setq arg (substring arg 0 (match-beginning 0))))
+	    (if (and (null (member arg processed))
+		     (file-exists-p (concat arg ".el"))
+		     (file-newer-than-file-p (concat arg ".el")
+					     (concat arg ".elc")))
+		(setq processed (cons (concat arg ".el") processed)))))
+      (setq dumped-lisp-packages (cdr dumped-lisp-packages)))))
+
+(setq update-elc-files-to-compile (append update-elc-files-to-compile
+					  processed))
+
+;; (print (prin1-to-string update-elc-files-to-compile))
 
 (if update-elc-files-to-compile
     (progn
       (setq command-line-args
-	    (cons (car 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")))
+		   update-elc-files-to-compile)) ;; )
+      (load "loadup-el.el")
+))
 
 (kill-emacs)
 
diff -r 4de2936b4e77 -r 0132846995bd lisp/prim/window-xemacs.el
--- a/lisp/prim/window-xemacs.el	Mon Aug 13 09:42:28 2007 +0200
+++ b/lisp/prim/window-xemacs.el	Mon Aug 13 09:43:35 2007 +0200
@@ -111,9 +111,11 @@
 ;; front of frame property 'window-config-unpop-stack, so you can
 ;; retrieve it using unpop-window-configuration.
 
-(defvar window-config-stack-max 16
+(defcustom window-config-stack-max 16
   "*Maximum size of window configuration stack.
-Start discarding off end if it gets this big.")
+Start discarding off end if it gets this big."
+  :type 'integer
+  :group 'windows)
 
 (defun window-config-stack (&optional frame)
   (or frame (setq frame (selected-frame)))
@@ -212,8 +214,10 @@
 If the return value of this function is non-nil, it should be a frame,
 and that frame will be used to display the buffer.")
 
-(defvar pop-up-frames nil
-  "*Non-nil means `display-buffer' should make a separate frame.")
+(defcustom pop-up-frames nil
+  "*Non-nil means `display-buffer' should make a separate frame."
+  :type 'boolean
+  :group 'frames)
 
 (defvar pop-up-frame-function nil
   "Function to call to handle automatic new frame creation.
@@ -222,7 +226,7 @@
 A typical value might be `(lambda () (new-frame pop-up-frame-alist))'
 where `pop-up-frame-alist' would hold the default frame parameters.")
 
-(defvar special-display-buffer-names nil
+(defcustom special-display-buffer-names nil
   "*List of buffer names that should have their own special frames.
 Displaying a buffer whose name is in this list makes a special frame for it
 using `special-display-function'.
@@ -232,9 +236,19 @@
 parameters for creating the frame for that buffer.
 More precisely, the cdr is passed as the second argument to
 the function found in `special-display-function', when making that frame.
-See also `special-display-regexps'.")
+See also `special-display-regexps'."
+  :type '(repeat (choice :value ""
+			 (string :tag "Name")
+			 (cons :menu-tag "Properties"
+			       :value ("" . nil)
+			       (string :tag "Name")
+			       (repeat :tag "Properties"
+				       (group :inline t
+					      (symbol :tag "Property")
+					      (sexp :tag "Value"))))))
+  :group 'frames)
 
-(defvar special-display-regexps nil
+(defcustom special-display-regexps nil
   "*List of regexps saying which buffers should have their own special frames.
 If a buffer name matches one of these regexps, it gets its own frame.
 Displaying a buffer whose name is in this list makes a special frame for it
@@ -245,7 +259,17 @@
 parameters for creating the frame for buffers that match.
 More precisely, the cdr is passed as the second argument to
 the function found in `special-display-function', when making that frame.
-See also `special-display-buffer-names'.")
+See also `special-display-buffer-names'."
+  :type '(repeat (choice :value ""
+			 regexp
+			 (cons :menu-tag "Properties"
+			       :value ("" . nil)
+			       regexp
+			       (repeat :tag "Properties"
+				       (group :inline t
+					      (symbol :tag "Property")
+					      (sexp :tag "Value"))))))
+  :group 'frames)
 
 (defvar special-display-function nil
   "Function to call to make a new frame for a special buffer.
@@ -257,7 +281,7 @@
 A buffer is special if its is listed in `special-display-buffer-names'
 or matches a regexp in `special-display-regexps'.")
 
-(defvar same-window-buffer-names nil
+(defcustom same-window-buffer-names nil
   "*List of buffer names that should appear in the selected window.
 Displaying one of these buffers using `display-buffer' or `pop-to-buffer'
 switches to it in the selected window, rather than making it appear
@@ -268,9 +292,11 @@
 This is for compatibility with `special-display-buffer-names';
 the cdr of the cons cell is ignored.
 
-See also `same-window-regexps'.")
+See also `same-window-regexps'."
+  :type '(repeat (string :tag "Name"))
+  :group 'windows)
 
-(defvar same-window-regexps nil
+(defcustom same-window-regexps nil
   "*List of regexps saying which buffers should appear in the selected window.
 If a buffer name matches one of these regexps, then displaying it
 using `display-buffer' or `pop-to-buffer' switches to it
@@ -281,18 +307,26 @@
 This is for compatibility with `special-display-buffer-names';
 the cdr of the cons cell is ignored.
 
-See also `same-window-buffer-names'.")
+See also `same-window-buffer-names'."
+  :type '(repeat regexp)
+  :group 'windows)
 
-(defvar pop-up-windows t
-  "*Non-nil means display-buffer should make new windows.")
+(defcustom pop-up-windows t
+  "*Non-nil means display-buffer should make new windows."
+  :type 'boolean
+  :group 'windows)
 
-(defvar split-height-threshold 500
+(defcustom split-height-threshold 500
  "*display-buffer would prefer to split the largest window if this large.
-If there is only one window, it is split regardless of this value.")
+If there is only one window, it is split regardless of this value."
+ :type 'integer
+ :group 'windows)
 
-(defvar split-width-threshold 500
+(defcustom split-width-threshold 500
   "*display-buffer would prefer to split the largest window if this large.
-If there is only one window, it is split regardless of this value.")
+If there is only one window, it is split regardless of this value."
+  :type 'integer
+  :group 'windows)
 
 ;; Deiconify the frame containing the window WINDOW, then return WINDOW.
 
diff -r 4de2936b4e77 -r 0132846995bd lisp/prim/window.el
--- a/lisp/prim/window.el	Mon Aug 13 09:42:28 2007 +0200
+++ b/lisp/prim/window.el	Mon Aug 13 09:43:35 2007 +0200
@@ -188,11 +188,13 @@
                   'nomini)))
 
 ;;; I think this should be the default; I think people will prefer it--rms.
-(defvar split-window-keep-point t
+(defcustom split-window-keep-point t
   "*If non-nil, split windows keeps the original point in both children.
 This is often more convenient for editing.
 If nil, adjust point in each of the two windows to minimize redisplay.
-This is convenient on slow terminals, but point can move strangely.")
+This is convenient on slow terminals, but point can move strangely."
+  :type 'boolean
+  :group 'windows)
 
 (defun split-window-vertically (&optional arg)
   "Split current window into two windows, one above the other.
diff -r 4de2936b4e77 -r 0132846995bd lisp/psgml/ChangeLog
--- a/lisp/psgml/ChangeLog	Mon Aug 13 09:42:28 2007 +0200
+++ b/lisp/psgml/ChangeLog	Mon Aug 13 09:43:35 2007 +0200
@@ -1,3 +1,8 @@
+1997-06-15  Steven L Baur  <steve@altair.xemacs.org>
+
+	* psgml-parse.el (sgml-parse-chars): De-ebolify.
+	(sgml-read-peek): Use char-after not following-char.
+
 1997-06-14  Steven L Baur  <steve@altair.xemacs.org>
 
 	* psgml-parse.el (sgml-read-model): Ebola vaccine.
diff -r 4de2936b4e77 -r 0132846995bd lisp/psgml/auto-autoloads.el
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lisp/psgml/auto-autoloads.el	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,97 @@
+;;; DO NOT MODIFY THIS FILE
+(if (not (featurep 'psgml-autoloads))
+    (progn
+
+;;;### (autoloads (style-format) "psgml-fs" "psgml/psgml-fs.el")
+
+(autoload 'style-format "psgml-fs" nil t nil)
+
+;;;***
+
+;;;### (autoloads nil "psgml-html" "psgml/psgml-html.el")
+
+(autoload 'html-mode "psgml-html" "\
+HTML mode." t)
+
+(autoload 'html3-mode "psgml-html" "\
+HTML3 mode." t)
+
+;;;***
+
+;;;### (autoloads (sgml-mode) "psgml" "psgml/psgml.el")
+
+(autoload 'sgml-mode "psgml" "\
+Major mode for editing SGML.\\<sgml-mode-map>
+Makes > display the matching <.  Makes / display matching /.
+Use \\[sgml-validate] to validate your document with an SGML parser.
+
+You can find information with:
+\\[sgml-show-context]  Show the nesting of elements at cursor position.
+\\[sgml-list-valid-tags]  Show the tags valid at cursor position.
+
+Insert tags with completion of contextually valid tags with \\[sgml-insert-tag].
+End the current element with \\[sgml-insert-end-tag].  Insert an element (i.e.
+both start and end tag) with \\[sgml-insert-element].  Or tag a region with 
+\\[sgml-tag-region]. 
+
+To tag a region with the mouse, use transient mark mode or secondary selection.
+
+Structure editing:
+\\[sgml-backward-element]  Moves backwards over the previous element.
+\\[sgml-forward-element]  Moves forward over the next element.
+\\[sgml-down-element]  Move forward and down one level in the element structure.
+\\[sgml-backward-up-element]  Move backward out of this element level.
+\\[sgml-beginning-of-element]  Move to after the start tag of the current element.
+\\[sgml-end-of-element]  Move to before the end tag of the current element.
+\\[sgml-kill-element]  Kill the element following the cursor.
+
+Finding interesting positions
+\\[sgml-next-data-field]  Move forward to next point where data is allowed.
+\\[sgml-next-trouble-spot]  Move forward to next point where something is 
+	amiss with the structure.
+
+Folding and unfolding
+\\[sgml-fold-element]  Fold the lines comprising the current element, leaving 
+	the first line visible.
+\\[sgml-fold-subelement]  Fold the elements in the content of the current element.
+	Leaving the first line of every element visible.
+\\[sgml-unfold-line]  Show hidden lines in current line.
+
+User options:
+
+sgml-omittag  Set this to reflect OMITTAG in the SGML declaration.
+sgml-shortag  Set this to reflect SHORTTAG in the SGML declaration.
+sgml-auto-insert-required-elements  If non-nil, automatically insert required 
+	elements in the content of an inserted element.
+sgml-balanced-tag-edit  If non-nil, always insert start-end tag pairs.
+sgml-omittag-transparent  If non-nil, will show legal tags inside elements
+	with omitable start tags and legal tags beyond omitable end tags.
+sgml-leave-point-after-insert  If non-nil, the point will remain after 
+	inserted tag(s).
+sgml-warn-about-undefined-elements  If non-nil, print a warning when a tag 
+	for a undefined element is found.
+sgml-max-menu-size  Max number of entries in Tags and Entities menus before
+ 	they are split into several panes.
+sgml-always-quote-attributes  If non-nil, quote all attribute values 
+	inserted after finishing edit attributes.
+sgml-minimize-attributes  Determines minimization of attributes inserted by 
+	edit-attributes.
+sgml-normalize-trims  If non-nil, sgml-normalize will trim off white space 
+	from end of element when adding end tag.
+sgml-indent-step  How much to increament indent for every element level.
+sgml-indent-data  If non-nil, indent in data/mixed context also.
+sgml-set-face     If non-nil, psgml will set the face of parsed markup.
+sgml-markup-faces The faces used when the above variable is non-nil.
+sgml-system-path  List of directories used to look for system identifiers.
+sgml-public-map  Mapping from public identifiers to file names.
+sgml-offer-save  If non-nil, ask about saving modified buffers before
+		\\[sgml-validate] is run.
+
+All bindings:
+\\{sgml-mode-map}
+" t nil)
+
+;;;***
+
+(provide 'psgml-autoloads)
+))
diff -r 4de2936b4e77 -r 0132846995bd lisp/psgml/custom-load.el
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lisp/psgml/custom-load.el	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,75 @@
+(put 'extensions 'custom-loads '("tempo"))
+(put 'message 'custom-loads '())
+(put 'psgml-dtd 'custom-loads '("psgml"))
+(put 'copyright 'custom-loads '())
+(put 'eldoc 'custom-loads '())
+(put 'execute 'custom-loads '())
+(put 'mouse 'custom-loads '())
+(put 'mail-abbrevs 'custom-loads '())
+(put 'etags 'custom-loads '())
+(put 'limits 'custom-loads '())
+(put 'minibuffer 'custom-loads '())
+(put 'environment 'custom-loads '())
+(put 'sound 'custom-loads '())
+(put 'html 'custom-loads '("psgml-html"))
+(put 'holidays 'custom-loads '())
+(put 'auto-save 'custom-loads '())
+(put 'ispell 'custom-loads '())
+(put 'fortran-indent 'custom-loads '())
+(put 'lpr 'custom-loads '())
+(put 'message-headers 'custom-loads '())
+(put 'editing-basics 'custom-loads '())
+(put 'internal 'custom-loads '())
+(put 'calendar 'custom-loads '())
+(put 'help-appearance 'custom-loads '())
+(put 'display-time 'custom-loads '())
+(put 'lisp 'custom-loads '())
+(put 'diff 'custom-loads '())
+(put 'psgml 'custom-loads '("psgml-html" "psgml"))
+(put 'paren-matching 'custom-loads '())
+(put 'help 'custom-loads '())
+(put 'local 'custom-loads '())
+(put 'keyboard 'custom-loads '())
+(put 'minubuffer 'custom-loads '())
+(put 'message-sending 'custom-loads '())
+(put 'data 'custom-loads '())
+(put 'ps-print 'custom-loads '())
+(put 'backup 'custom-loads '())
+(put 'frames 'custom-loads '())
+(put 'psgml-html 'custom-loads '("psgml-html"))
+(put 'customize 'custom-loads '())
+(put 'abbrev 'custom-loads '())
+(put 'toolbar 'custom-loads '())
+(put 'compilation 'custom-loads '())
+(put 'dired 'custom-loads '())
+(put 'sgml 'custom-loads '("psgml-html" "psgml"))
+(put 'killing 'custom-loads '())
+(put 'paren-blinking 'custom-loads '())
+(put 'find-file 'custom-loads '())
+(put 'tempo 'custom-loads '("tempo"))
+(put 'gnuserv 'custom-loads '())
+(put 'maint 'custom-loads '())
+(put 'fill-comments 'custom-loads '())
+(put 'message-mail 'custom-loads '())
+(put 'windows 'custom-loads '())
+(put 'message-various 'custom-loads '())
+(put 'resize-minibuffer 'custom-loads '())
+(put 'languages 'custom-loads '("psgml"))
+(put 'fill 'custom-loads '())
+(put 'debug 'custom-loads '())
+(put 'display 'custom-loads '())
+(put 'diary 'custom-loads '())
+(put 'browse-url 'custom-loads '())
+(put 'message-insertion 'custom-loads '())
+(put 'hyper-apropos 'custom-loads '())
+(put 'psgml-insert 'custom-loads '("psgml"))
+(put 'vc 'custom-loads '())
+(put 'alloc 'custom-loads '())
+(put 'isearch 'custom-loads '())
+(put 'modeline 'custom-loads '())
+(put 'processes-basics 'custom-loads '())
+(put 'editing 'custom-loads '())
+(put 'matching 'custom-loads '())
+(put 'ps-print-color 'custom-loads '())
+(put 'undo 'custom-loads '())
+(put 'x 'custom-loads '())
diff -r 4de2936b4e77 -r 0132846995bd lisp/psgml/psgml-parse.el
--- a/lisp/psgml/psgml-parse.el	Mon Aug 13 09:42:28 2007 +0200
+++ b/lisp/psgml/psgml-parse.el	Mon Aug 13 09:43:35 2007 +0200
@@ -1,5 +1,5 @@
 ;;;; psgml-parse.el --- Parser for SGML-editing mode with parsing support
-;; $Id: psgml-parse.el,v 1.6 1997/06/14 20:31:36 steve Exp $
+;; $Id: psgml-parse.el,v 1.7 1997/06/21 20:03:09 steve Exp $
 
 ;; Copyright (C) 1994, 1995 Lennart Staflin
 
@@ -1005,7 +1005,7 @@
     (sgml-read-octet)))
 
 (defsubst sgml-read-peek ()
-  (following-char))
+  (char-after (point)))
 
 (defun sgml-read-sexp ()
   (prog1
@@ -1463,11 +1463,11 @@
 (defmacro sgml-parse-chars (char1 char2 &optional char3)
   "Parse two or three chars; return nil if can't"
   (if (null char3)
-      (` (cond ((and (eq (, char1) (following-char))
+      (` (cond ((and (eq (, char1) (char-after (point)))
 		 (eq (, char2) (char-after (1+ (point)))))
 	    (forward-char 2)
 	    t)))
-    (` (cond ((and (eq (, char1) (following-char))
+    (` (cond ((and (eq (, char1) (char-after (point)))
 		 (eq (, char2) (char-after (1+ (point))))
 		 (eq (, char3) (char-after (1+ (1+ (point))))))
 	    (forward-char 3)
diff -r 4de2936b4e77 -r 0132846995bd lisp/rmail/auto-autoloads.el
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lisp/rmail/auto-autoloads.el	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,118 @@
+;;; DO NOT MODIFY THIS FILE
+(if (not (featurep 'rmail-autoloads))
+    (progn
+
+;;;### (autoloads (rmail-input rmail-mode rmail) "rmail" "rmail/rmail.el")
+
+(defvar rmail-dont-reply-to-names nil "\
+*A regexp specifying names to prune of reply to messages.
+A value of nil means exclude your own name only.")
+
+(defvar rmail-default-dont-reply-to-names "info-" "\
+A regular expression specifying part of the value of the default value of
+the variable `rmail-dont-reply-to-names', for when the user does not set
+`rmail-dont-reply-to-names' explicitly.  (The other part of the default
+value is the user's name.)
+It is useful to set this variable in the site customization file.")
+
+(defvar rmail-delete-after-output nil "\
+*Non-nil means automatically delete a message that is copied to a file.")
+
+(defvar rmail-primary-inbox-list nil "\
+*List of files which are inboxes for user's primary mail file `~/RMAIL'.
+`nil' means the default, which is (\"/usr/spool/mail/$USER\")
+\(the name varies depending on the operating system,
+and the value of the environment variable MAIL overrides it).")
+
+(defvar rmail-mail-new-frame nil "\
+*Non-nil means Rmail makes a new frame for composing outgoing mail.")
+
+(defvar rmail-retry-setup-hook nil "\
+Hook that `rmail-retry-failure' uses in place of `mail-setup-hook'.")
+
+(defvar rmail-last-file nil)
+
+(autoload 'rmail "rmail" "\
+Read and edit incoming mail.
+Moves messages into file named by `rmail-file-name' (a babyl format file)
+ and edits that file in RMAIL Mode.
+Type \\[describe-mode] once editing that file, for a list of RMAIL commands.
+
+May be called with filename as argument; then performs rmail editing on
+that file, but does not copy any new mail into the file." t nil)
+
+(autoload 'rmail-mode "rmail" "\
+Rmail Mode is used by \\<rmail-mode-map>\\[rmail] for editing Rmail files.
+All normal editing commands are turned off.
+Instead, these commands are available:
+
+\\[rmail-beginning-of-message]	Move point to front of this message (same as \\[beginning-of-buffer]).
+\\[scroll-up]	Scroll to next screen of this message.
+\\[scroll-down]	Scroll to previous screen of this message.
+\\[rmail-next-undeleted-message]	Move to Next non-deleted message.
+\\[rmail-previous-undeleted-message]	Move to Previous non-deleted message.
+\\[rmail-next-message]	Move to Next message whether deleted or not.
+\\[rmail-previous-message]	Move to Previous message whether deleted or not.
+\\[rmail-first-message]	Move to the first message in Rmail file.
+\\[rmail-last-message]	Move to the last message in Rmail file.
+\\[rmail-show-message]	Jump to message specified by numeric position in file.
+\\[rmail-search]	Search for string and show message it is found in.
+\\[rmail-delete-forward]	Delete this message, move to next nondeleted.
+\\[rmail-delete-backward]	Delete this message, move to previous nondeleted.
+\\[rmail-undelete-previous-message]	Undelete message.  Tries current message, then earlier messages
+	till a deleted message is found.
+\\[rmail-edit-current-message]	Edit the current message.  \\[rmail-cease-edit] to return to Rmail.
+\\[rmail-expunge]	Expunge deleted messages.
+\\[rmail-expunge-and-save]	Expunge and save the file.
+\\[rmail-quit]       Quit Rmail: expunge, save, then switch to another buffer.
+\\[save-buffer] Save without expunging.
+\\[rmail-get-new-mail]	Move new mail from system spool directory into this file.
+\\[rmail-mail]	Mail a message (same as \\[mail-other-window]).
+\\[rmail-continue]	Continue composing outgoing message started before.
+\\[rmail-reply]	Reply to this message.  Like \\[rmail-mail] but initializes some fields.
+\\[rmail-retry-failure]	Send this message again.  Used on a mailer failure message.
+\\[rmail-forward]	Forward this message to another user.
+\\[rmail-output-to-rmail-file]       Output this message to an Rmail file (append it).
+\\[rmail-output]	Output this message to a Unix-format mail file (append it).
+\\[rmail-input]	Input Rmail file.  Run Rmail on that file.
+\\[rmail-add-label]	Add label to message.  It will be displayed in the mode line.
+\\[rmail-kill-label]	Kill label.  Remove a label from current message.
+\\[rmail-next-labeled-message]   Move to Next message with specified label
+          (label defaults to last one specified).
+          Standard labels: filed, unseen, answered, forwarded, deleted.
+          Any other label is present only if you add it with \\[rmail-add-label].
+\\[rmail-previous-labeled-message]   Move to Previous message with specified label
+\\[rmail-summary]	Show headers buffer, with a one line summary of each message.
+\\[rmail-summary-by-labels]	Summarize only messages with particular label(s).
+\\[rmail-summary-by-recipients]   Summarize only messages with particular recipient(s).
+\\[rmail-summary-by-regexp]   Summarize only messages with particular regexp(s).
+\\[rmail-summary-by-topic]   Summarize only messages with subject line regexp(s).
+\\[rmail-toggle-header]	Toggle display of complete header." t nil)
+
+(autoload 'rmail-input "rmail" "\
+Run Rmail on file FILENAME." t nil)
+
+;;;***
+
+;;;### (autoloads (rmail-file-p) "rmailout" "rmail/rmailout.el")
+
+(autoload 'rmail-file-p "rmailout" nil nil nil)
+
+;;;***
+
+;;;### (autoloads (unrmail batch-unrmail) "unrmail" "rmail/unrmail.el")
+
+(autoload 'batch-unrmail "unrmail" "\
+Convert Rmail files to mailbox files.
+Specify the input Rmail file names as command line arguments.
+For each Rmail file, the corresponding output file name
+is made by adding `.mail' at the end.
+For example, invoke `emacs -batch -f batch-unrmail RMAIL'." nil nil)
+
+(autoload 'unrmail "unrmail" "\
+Convert Rmail file FILE to mailbox-format file TO-FILE." t nil)
+
+;;;***
+
+(provide 'rmail-autoloads)
+))
diff -r 4de2936b4e77 -r 0132846995bd lisp/rmail/custom-load.el
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lisp/rmail/custom-load.el	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,65 @@
+(put 'copyright 'custom-loads '())
+(put 'eldoc 'custom-loads '())
+(put 'execute 'custom-loads '())
+(put 'mouse 'custom-loads '())
+(put 'mail-abbrevs 'custom-loads '())
+(put 'etags 'custom-loads '())
+(put 'limits 'custom-loads '())
+(put 'minibuffer 'custom-loads '())
+(put 'environment 'custom-loads '())
+(put 'sound 'custom-loads '())
+(put 'holidays 'custom-loads '())
+(put 'auto-save 'custom-loads '())
+(put 'ispell 'custom-loads '())
+(put 'fortran-indent 'custom-loads '())
+(put 'lpr 'custom-loads '())
+(put 'message-headers 'custom-loads '())
+(put 'editing-basics 'custom-loads '())
+(put 'internal 'custom-loads '())
+(put 'calendar 'custom-loads '())
+(put 'help-appearance 'custom-loads '())
+(put 'display-time 'custom-loads '())
+(put 'lisp 'custom-loads '())
+(put 'diff 'custom-loads '())
+(put 'paren-matching 'custom-loads '())
+(put 'help 'custom-loads '())
+(put 'local 'custom-loads '())
+(put 'keyboard 'custom-loads '())
+(put 'minubuffer 'custom-loads '())
+(put 'message-sending 'custom-loads '())
+(put 'data 'custom-loads '())
+(put 'ps-print 'custom-loads '())
+(put 'backup 'custom-loads '())
+(put 'frames 'custom-loads '())
+(put 'customize 'custom-loads '())
+(put 'abbrev 'custom-loads '())
+(put 'toolbar 'custom-loads '())
+(put 'compilation 'custom-loads '())
+(put 'dired 'custom-loads '())
+(put 'killing 'custom-loads '())
+(put 'paren-blinking 'custom-loads '())
+(put 'find-file 'custom-loads '())
+(put 'gnuserv 'custom-loads '())
+(put 'maint 'custom-loads '())
+(put 'fill-comments 'custom-loads '())
+(put 'message-mail 'custom-loads '())
+(put 'windows 'custom-loads '())
+(put 'message-various 'custom-loads '())
+(put 'resize-minibuffer 'custom-loads '())
+(put 'fill 'custom-loads '())
+(put 'debug 'custom-loads '())
+(put 'display 'custom-loads '())
+(put 'diary 'custom-loads '())
+(put 'browse-url 'custom-loads '())
+(put 'message-insertion 'custom-loads '())
+(put 'hyper-apropos 'custom-loads '())
+(put 'vc 'custom-loads '())
+(put 'alloc 'custom-loads '())
+(put 'isearch 'custom-loads '())
+(put 'modeline 'custom-loads '())
+(put 'processes-basics 'custom-loads '())
+(put 'editing 'custom-loads '())
+(put 'matching 'custom-loads '())
+(put 'ps-print-color 'custom-loads '())
+(put 'undo 'custom-loads '())
+(put 'x 'custom-loads '())
diff -r 4de2936b4e77 -r 0132846995bd lisp/sunpro/custom-load.el
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lisp/sunpro/custom-load.el	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,65 @@
+(put 'copyright 'custom-loads '())
+(put 'eldoc 'custom-loads '())
+(put 'execute 'custom-loads '())
+(put 'mouse 'custom-loads '())
+(put 'mail-abbrevs 'custom-loads '())
+(put 'etags 'custom-loads '())
+(put 'limits 'custom-loads '())
+(put 'minibuffer 'custom-loads '())
+(put 'environment 'custom-loads '())
+(put 'sound 'custom-loads '())
+(put 'holidays 'custom-loads '())
+(put 'auto-save 'custom-loads '())
+(put 'ispell 'custom-loads '())
+(put 'fortran-indent 'custom-loads '())
+(put 'lpr 'custom-loads '())
+(put 'message-headers 'custom-loads '())
+(put 'editing-basics 'custom-loads '())
+(put 'internal 'custom-loads '())
+(put 'calendar 'custom-loads '())
+(put 'help-appearance 'custom-loads '())
+(put 'display-time 'custom-loads '())
+(put 'lisp 'custom-loads '())
+(put 'diff 'custom-loads '())
+(put 'paren-matching 'custom-loads '())
+(put 'help 'custom-loads '())
+(put 'local 'custom-loads '())
+(put 'keyboard 'custom-loads '())
+(put 'minubuffer 'custom-loads '())
+(put 'message-sending 'custom-loads '())
+(put 'data 'custom-loads '())
+(put 'ps-print 'custom-loads '())
+(put 'backup 'custom-loads '())
+(put 'frames 'custom-loads '())
+(put 'customize 'custom-loads '())
+(put 'abbrev 'custom-loads '())
+(put 'toolbar 'custom-loads '())
+(put 'compilation 'custom-loads '())
+(put 'dired 'custom-loads '())
+(put 'killing 'custom-loads '())
+(put 'paren-blinking 'custom-loads '())
+(put 'find-file 'custom-loads '())
+(put 'gnuserv 'custom-loads '())
+(put 'maint 'custom-loads '())
+(put 'fill-comments 'custom-loads '())
+(put 'message-mail 'custom-loads '())
+(put 'windows 'custom-loads '())
+(put 'message-various 'custom-loads '())
+(put 'resize-minibuffer 'custom-loads '())
+(put 'fill 'custom-loads '())
+(put 'debug 'custom-loads '())
+(put 'display 'custom-loads '())
+(put 'diary 'custom-loads '())
+(put 'browse-url 'custom-loads '())
+(put 'message-insertion 'custom-loads '())
+(put 'hyper-apropos 'custom-loads '())
+(put 'vc 'custom-loads '())
+(put 'alloc 'custom-loads '())
+(put 'isearch 'custom-loads '())
+(put 'modeline 'custom-loads '())
+(put 'processes-basics 'custom-loads '())
+(put 'editing 'custom-loads '())
+(put 'matching 'custom-loads '())
+(put 'ps-print-color 'custom-loads '())
+(put 'undo 'custom-loads '())
+(put 'x 'custom-loads '())
diff -r 4de2936b4e77 -r 0132846995bd lisp/term/custom-load.el
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lisp/term/custom-load.el	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,65 @@
+(put 'copyright 'custom-loads '())
+(put 'eldoc 'custom-loads '())
+(put 'execute 'custom-loads '())
+(put 'mouse 'custom-loads '())
+(put 'mail-abbrevs 'custom-loads '())
+(put 'etags 'custom-loads '())
+(put 'limits 'custom-loads '())
+(put 'minibuffer 'custom-loads '())
+(put 'environment 'custom-loads '())
+(put 'sound 'custom-loads '())
+(put 'holidays 'custom-loads '())
+(put 'auto-save 'custom-loads '())
+(put 'ispell 'custom-loads '())
+(put 'fortran-indent 'custom-loads '())
+(put 'lpr 'custom-loads '())
+(put 'message-headers 'custom-loads '())
+(put 'editing-basics 'custom-loads '())
+(put 'internal 'custom-loads '())
+(put 'calendar 'custom-loads '())
+(put 'help-appearance 'custom-loads '())
+(put 'display-time 'custom-loads '())
+(put 'lisp 'custom-loads '())
+(put 'diff 'custom-loads '())
+(put 'paren-matching 'custom-loads '())
+(put 'help 'custom-loads '())
+(put 'local 'custom-loads '())
+(put 'keyboard 'custom-loads '())
+(put 'minubuffer 'custom-loads '())
+(put 'message-sending 'custom-loads '())
+(put 'data 'custom-loads '())
+(put 'ps-print 'custom-loads '())
+(put 'backup 'custom-loads '())
+(put 'frames 'custom-loads '())
+(put 'customize 'custom-loads '())
+(put 'abbrev 'custom-loads '())
+(put 'toolbar 'custom-loads '())
+(put 'compilation 'custom-loads '())
+(put 'dired 'custom-loads '())
+(put 'killing 'custom-loads '())
+(put 'paren-blinking 'custom-loads '())
+(put 'find-file 'custom-loads '())
+(put 'gnuserv 'custom-loads '())
+(put 'maint 'custom-loads '())
+(put 'fill-comments 'custom-loads '())
+(put 'message-mail 'custom-loads '())
+(put 'windows 'custom-loads '())
+(put 'message-various 'custom-loads '())
+(put 'resize-minibuffer 'custom-loads '())
+(put 'fill 'custom-loads '())
+(put 'debug 'custom-loads '())
+(put 'display 'custom-loads '())
+(put 'diary 'custom-loads '())
+(put 'browse-url 'custom-loads '())
+(put 'message-insertion 'custom-loads '())
+(put 'hyper-apropos 'custom-loads '())
+(put 'vc 'custom-loads '())
+(put 'alloc 'custom-loads '())
+(put 'isearch 'custom-loads '())
+(put 'modeline 'custom-loads '())
+(put 'processes-basics 'custom-loads '())
+(put 'editing 'custom-loads '())
+(put 'matching 'custom-loads '())
+(put 'ps-print-color 'custom-loads '())
+(put 'undo 'custom-loads '())
+(put 'x 'custom-loads '())
diff -r 4de2936b4e77 -r 0132846995bd lisp/tl/custom-load.el
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lisp/tl/custom-load.el	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,65 @@
+(put 'copyright 'custom-loads '())
+(put 'eldoc 'custom-loads '())
+(put 'execute 'custom-loads '())
+(put 'mouse 'custom-loads '())
+(put 'mail-abbrevs 'custom-loads '())
+(put 'etags 'custom-loads '())
+(put 'limits 'custom-loads '())
+(put 'minibuffer 'custom-loads '())
+(put 'environment 'custom-loads '())
+(put 'sound 'custom-loads '())
+(put 'holidays 'custom-loads '())
+(put 'auto-save 'custom-loads '())
+(put 'ispell 'custom-loads '())
+(put 'fortran-indent 'custom-loads '())
+(put 'lpr 'custom-loads '())
+(put 'message-headers 'custom-loads '())
+(put 'editing-basics 'custom-loads '())
+(put 'internal 'custom-loads '())
+(put 'calendar 'custom-loads '())
+(put 'help-appearance 'custom-loads '())
+(put 'display-time 'custom-loads '())
+(put 'lisp 'custom-loads '())
+(put 'diff 'custom-loads '())
+(put 'paren-matching 'custom-loads '())
+(put 'help 'custom-loads '())
+(put 'local 'custom-loads '())
+(put 'keyboard 'custom-loads '())
+(put 'minubuffer 'custom-loads '())
+(put 'message-sending 'custom-loads '())
+(put 'data 'custom-loads '())
+(put 'ps-print 'custom-loads '())
+(put 'backup 'custom-loads '())
+(put 'frames 'custom-loads '())
+(put 'customize 'custom-loads '())
+(put 'abbrev 'custom-loads '())
+(put 'toolbar 'custom-loads '())
+(put 'compilation 'custom-loads '())
+(put 'dired 'custom-loads '())
+(put 'killing 'custom-loads '())
+(put 'paren-blinking 'custom-loads '())
+(put 'find-file 'custom-loads '())
+(put 'gnuserv 'custom-loads '())
+(put 'maint 'custom-loads '())
+(put 'fill-comments 'custom-loads '())
+(put 'message-mail 'custom-loads '())
+(put 'windows 'custom-loads '())
+(put 'message-various 'custom-loads '())
+(put 'resize-minibuffer 'custom-loads '())
+(put 'fill 'custom-loads '())
+(put 'debug 'custom-loads '())
+(put 'display 'custom-loads '())
+(put 'diary 'custom-loads '())
+(put 'browse-url 'custom-loads '())
+(put 'message-insertion 'custom-loads '())
+(put 'hyper-apropos 'custom-loads '())
+(put 'vc 'custom-loads '())
+(put 'alloc 'custom-loads '())
+(put 'isearch 'custom-loads '())
+(put 'modeline 'custom-loads '())
+(put 'processes-basics 'custom-loads '())
+(put 'editing 'custom-loads '())
+(put 'matching 'custom-loads '())
+(put 'ps-print-color 'custom-loads '())
+(put 'undo 'custom-loads '())
+(put 'x 'custom-loads '())
diff -r 4de2936b4e77 -r 0132846995bd lisp/tm/auto-autoloads.el
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lisp/tm/auto-autoloads.el	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,149 @@
+;;; DO NOT MODIFY THIS FILE
+(if (not (featurep 'tm-autoloads))
+    (progn
+
+;;;### (autoloads (mime/editor-mode) "tm-edit" "tm/tm-edit.el")
+
+(autoload 'mime/editor-mode "tm-edit" "\
+MIME minor mode for editing the tagged MIME message.
+
+In this mode, basically, the message is composed in the tagged MIME
+format. The message tag looks like:
+
+	--[[text/plain; charset=ISO-2022-JP][7bit]]
+
+The tag specifies the MIME content type, subtype, optional parameters
+and transfer encoding of the message following the tag. Messages
+without any tag are treated as `text/plain' by default. Charset and
+transfer encoding are automatically defined unless explicitly
+specified. Binary messages such as audio and image are usually hidden.
+The messages in the tagged MIME format are automatically translated
+into a MIME compliant message when exiting this mode.
+
+Available charsets depend on Emacs version being used. The following
+lists the available charsets of each emacs.
+
+EMACS 18:	US-ASCII is only available.
+NEmacs:		US-ASCII and ISO-2022-JP are available.
+EMACS 19:	US-ASCII and ISO-8859-1 (or other charset) are available.
+XEmacs 19:	US-ASCII and ISO-8859-1 (or other charset) are available.
+Mule:		US-ASCII, ISO-8859-* (except for ISO-8859-5), KOI8-R,
+		ISO-2022-JP, ISO-2022-JP-2, ISO-2022-KR, BIG5 and
+		ISO-2022-INT-1 are available.
+
+ISO-2022-JP-2 and ISO-2022-INT-1 charsets used in mule is expected to
+be used to represent multilingual text in intermixed manner. Any
+languages that has no registered charset are represented as either
+ISO-2022-JP-2 or ISO-2022-INT-1 in mule.
+
+If you want to use non-ISO-8859-1 charset in EMACS 19 or XEmacs 19,
+please set variable `default-mime-charset'. This variable must be
+symbol of which name is a MIME charset.
+
+If you want to add more charsets in mule, please set variable
+`charsets-mime-charset-alist'. This variable must be alist of which
+key is list of leading-char/charset and value is symbol of MIME
+charset. (leading-char is a term of MULE 1.* and 2.*. charset is a
+term of XEmacs/mule, mule merged EMACS and MULE 3.*) If name of
+coding-system is different as MIME charset, please set variable
+`mime-charset-coding-system-alist'. This variable must be alist of
+which key is MIME charset and value is coding-system.
+
+Following commands are available in addition to major mode commands:
+
+[make single part]
+\\[mime-editor/insert-text]	insert a text message.
+\\[mime-editor/insert-file]	insert a (binary) file.
+\\[mime-editor/insert-external]	insert a reference to external body.
+\\[mime-editor/insert-voice]	insert a voice message.
+\\[mime-editor/insert-message]	insert a mail or news message.
+\\[mime-editor/insert-mail]	insert a mail message.
+\\[mime-editor/insert-signature]	insert a signature file at end.
+\\[mime-editor/insert-key]	insert PGP public key.
+\\[mime-editor/insert-tag]	insert a new MIME tag.
+
+[make enclosure (maybe multipart)]
+\\[mime-editor/enclose-alternative-region]	enclose as multipart/alternative.
+\\[mime-editor/enclose-parallel-region]	enclose as multipart/parallel.
+\\[mime-editor/enclose-mixed-region]	enclose as multipart/mixed.
+\\[mime-editor/enclose-digest-region]	enclose as multipart/digest.
+\\[mime-editor/enclose-signed-region]	enclose as PGP signed.
+\\[mime-editor/enclose-encrypted-region]	enclose as PGP encrypted.
+\\[mime-editor/enclose-quote-region]	enclose as verbose mode (to avoid to expand tags)
+
+[other commands]
+\\[mime-editor/set-transfer-level-7bit]	set transfer-level as 7.
+\\[mime-editor/set-transfer-level-8bit]	set transfer-level as 8.
+\\[mime-editor/set-split]	set message splitting mode.
+\\[mime-editor/set-sign]	set PGP-sign mode.
+\\[mime-editor/set-encrypt]	set PGP-encryption mode.
+\\[mime-editor/preview-message]	preview editing MIME message.
+\\[mime-editor/exit]	exit and translate into a MIME compliant message.
+\\[mime-editor/help]	show this help.
+\\[mime-editor/maybe-translate]	exit and translate if in MIME mode, then split.
+
+Additional commands are available in some major modes:
+C-c C-c		exit, translate and run the original command.
+C-c C-s		exit, translate and run the original command.
+
+The following is a message example written in the tagged MIME format.
+TABs at the beginning of the line are not a part of the message:
+
+	This is a conventional plain text.  It should be translated
+	into text/plain.
+	--[[text/plain]]
+	This is also a plain text.  But, it is explicitly specified as
+	is.
+	--[[text/plain; charset=ISO-8859-1]]
+	This is also a plain text.  But charset is specified as
+	iso-8859-1.
+
+	�Hola!  Buenos d�as.  �C�mo est� usted?
+	--[[text/enriched]]
+	This is a <bold>enriched text</bold>.
+	--[[image/gif][base64]]...image encoded in base64 here...
+	--[[audio/basic][base64]]...audio encoded in base64 here...
+
+User customizable variables (not documented all of them):
+ mime-prefix
+    Specifies a key prefix for MIME minor mode commands.
+
+ mime-ignore-preceding-spaces
+    Preceding white spaces in a message body are ignored if non-nil.
+
+ mime-ignore-trailing-spaces
+    Trailing white spaces in a message body are ignored if non-nil.
+
+ mime-auto-hide-body
+    Hide a non-textual body message encoded in base64 after insertion
+    if non-nil.
+
+ mime-editor/transfer-level
+    A number of network transfer level.  It should be bigger than 7.
+    If you are in 8bit-through environment, please set 8.
+
+ mime-editor/voice-recorder
+    Specifies a function to record a voice message and encode it.
+    The function `mime-editor/voice-recorder-for-sun' is for Sun
+    SparcStations.
+
+ mime/editor-mode-hook
+    Turning on MIME mode calls the value of mime/editor-mode-hook, if
+    it is non-nil.
+
+ mime-editor/translate-hook
+    The value of mime-editor/translate-hook is called just before translating
+    the tagged MIME format into a MIME compliant message if it is
+    non-nil.  If the hook call the function mime-editor/insert-signature,
+    the signature file will be inserted automatically.
+
+ mime-editor/exit-hook
+    Turning off MIME mode calls the value of mime-editor/exit-hook, if it is
+    non-nil." t nil)
+
+(defalias 'edit-mime 'mime/editor-mode)
+
+;;;***
+
+(provide 'tm-autoloads)
+))
diff -r 4de2936b4e77 -r 0132846995bd lisp/tm/custom-load.el
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lisp/tm/custom-load.el	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,65 @@
+(put 'copyright 'custom-loads '())
+(put 'eldoc 'custom-loads '())
+(put 'execute 'custom-loads '())
+(put 'mouse 'custom-loads '())
+(put 'mail-abbrevs 'custom-loads '())
+(put 'etags 'custom-loads '())
+(put 'limits 'custom-loads '())
+(put 'minibuffer 'custom-loads '())
+(put 'environment 'custom-loads '())
+(put 'sound 'custom-loads '())
+(put 'holidays 'custom-loads '())
+(put 'auto-save 'custom-loads '())
+(put 'ispell 'custom-loads '())
+(put 'fortran-indent 'custom-loads '())
+(put 'lpr 'custom-loads '())
+(put 'message-headers 'custom-loads '())
+(put 'editing-basics 'custom-loads '())
+(put 'internal 'custom-loads '())
+(put 'calendar 'custom-loads '())
+(put 'help-appearance 'custom-loads '())
+(put 'display-time 'custom-loads '())
+(put 'lisp 'custom-loads '())
+(put 'diff 'custom-loads '())
+(put 'paren-matching 'custom-loads '())
+(put 'help 'custom-loads '())
+(put 'local 'custom-loads '())
+(put 'keyboard 'custom-loads '())
+(put 'minubuffer 'custom-loads '())
+(put 'message-sending 'custom-loads '())
+(put 'data 'custom-loads '())
+(put 'ps-print 'custom-loads '())
+(put 'backup 'custom-loads '())
+(put 'frames 'custom-loads '())
+(put 'customize 'custom-loads '())
+(put 'abbrev 'custom-loads '())
+(put 'toolbar 'custom-loads '())
+(put 'compilation 'custom-loads '())
+(put 'dired 'custom-loads '())
+(put 'killing 'custom-loads '())
+(put 'paren-blinking 'custom-loads '())
+(put 'find-file 'custom-loads '())
+(put 'gnuserv 'custom-loads '())
+(put 'maint 'custom-loads '())
+(put 'fill-comments 'custom-loads '())
+(put 'message-mail 'custom-loads '())
+(put 'windows 'custom-loads '())
+(put 'message-various 'custom-loads '())
+(put 'resize-minibuffer 'custom-loads '())
+(put 'fill 'custom-loads '())
+(put 'debug 'custom-loads '())
+(put 'display 'custom-loads '())
+(put 'diary 'custom-loads '())
+(put 'browse-url 'custom-loads '())
+(put 'message-insertion 'custom-loads '())
+(put 'hyper-apropos 'custom-loads '())
+(put 'vc 'custom-loads '())
+(put 'alloc 'custom-loads '())
+(put 'isearch 'custom-loads '())
+(put 'modeline 'custom-loads '())
+(put 'processes-basics 'custom-loads '())
+(put 'editing 'custom-loads '())
+(put 'matching 'custom-loads '())
+(put 'ps-print-color 'custom-loads '())
+(put 'undo 'custom-loads '())
+(put 'x 'custom-loads '())
diff -r 4de2936b4e77 -r 0132846995bd lisp/tm/tm-vm.el
--- a/lisp/tm/tm-vm.el	Mon Aug 13 09:42:28 2007 +0200
+++ b/lisp/tm/tm-vm.el	Mon Aug 13 09:43:35 2007 +0200
@@ -9,7 +9,7 @@
 ;;         Oscar Figueiredo <Oscar.Figueiredo@di.epfl.ch>
 ;; Maintainer: Oscar Figueiredo <Oscar.Figueiredo@di.epfl.ch>
 ;; Created: 1994/10/29
-;; Version: $Revision: 1.6 $
+;; Version: $Revision: 1.7 $
 ;; Keywords: mail, MIME, multimedia, multilingual, encoded-word
 
 ;; This file is part of tm (Tools for MIME).
@@ -103,7 +103,7 @@
 ;;; @@ System/Information variables
 
 (defconst tm-vm/RCS-ID
-  "$Id: tm-vm.el,v 1.6 1997/05/14 02:01:47 steve Exp $")
+  "$Id: tm-vm.el,v 1.7 1997/06/21 20:03:15 steve Exp $")
 (defconst tm-vm/version (get-version-string tm-vm/RCS-ID))
 
 ; Ensure vm-menu-mail-menu gets properly defined *before* tm-vm/vm-emulation-map
@@ -127,7 +127,7 @@
 	   ["      Subject:" mail-subject	t]
 	   ["      CC:" mail-cc t]
 	   ["      BCC:" mail-bcc t]
-	   ["      Reply-To:" mail-replyto t]
+	   ["      Reply-To:" mail-reply-to t]
 	   ["      Text" mail-text t]
 	   "----"
 	   ["Yank Original" vm-menu-yank-original vm-reply-list]
diff -r 4de2936b4e77 -r 0132846995bd lisp/tooltalk/custom-load.el
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lisp/tooltalk/custom-load.el	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,65 @@
+(put 'copyright 'custom-loads '())
+(put 'eldoc 'custom-loads '())
+(put 'execute 'custom-loads '())
+(put 'mouse 'custom-loads '())
+(put 'mail-abbrevs 'custom-loads '())
+(put 'etags 'custom-loads '())
+(put 'limits 'custom-loads '())
+(put 'minibuffer 'custom-loads '())
+(put 'environment 'custom-loads '())
+(put 'sound 'custom-loads '())
+(put 'holidays 'custom-loads '())
+(put 'auto-save 'custom-loads '())
+(put 'ispell 'custom-loads '())
+(put 'fortran-indent 'custom-loads '())
+(put 'lpr 'custom-loads '())
+(put 'message-headers 'custom-loads '())
+(put 'editing-basics 'custom-loads '())
+(put 'internal 'custom-loads '())
+(put 'calendar 'custom-loads '())
+(put 'help-appearance 'custom-loads '())
+(put 'display-time 'custom-loads '())
+(put 'lisp 'custom-loads '())
+(put 'diff 'custom-loads '())
+(put 'paren-matching 'custom-loads '())
+(put 'help 'custom-loads '())
+(put 'local 'custom-loads '())
+(put 'keyboard 'custom-loads '())
+(put 'minubuffer 'custom-loads '())
+(put 'message-sending 'custom-loads '())
+(put 'data 'custom-loads '())
+(put 'ps-print 'custom-loads '())
+(put 'backup 'custom-loads '())
+(put 'frames 'custom-loads '())
+(put 'customize 'custom-loads '())
+(put 'abbrev 'custom-loads '())
+(put 'toolbar 'custom-loads '())
+(put 'compilation 'custom-loads '())
+(put 'dired 'custom-loads '())
+(put 'killing 'custom-loads '())
+(put 'paren-blinking 'custom-loads '())
+(put 'find-file 'custom-loads '())
+(put 'gnuserv 'custom-loads '())
+(put 'maint 'custom-loads '())
+(put 'fill-comments 'custom-loads '())
+(put 'message-mail 'custom-loads '())
+(put 'windows 'custom-loads '())
+(put 'message-various 'custom-loads '())
+(put 'resize-minibuffer 'custom-loads '())
+(put 'fill 'custom-loads '())
+(put 'debug 'custom-loads '())
+(put 'display 'custom-loads '())
+(put 'diary 'custom-loads '())
+(put 'browse-url 'custom-loads '())
+(put 'message-insertion 'custom-loads '())
+(put 'hyper-apropos 'custom-loads '())
+(put 'vc 'custom-loads '())
+(put 'alloc 'custom-loads '())
+(put 'isearch 'custom-loads '())
+(put 'modeline 'custom-loads '())
+(put 'processes-basics 'custom-loads '())
+(put 'editing 'custom-loads '())
+(put 'matching 'custom-loads '())
+(put 'ps-print-color 'custom-loads '())
+(put 'undo 'custom-loads '())
+(put 'x 'custom-loads '())
diff -r 4de2936b4e77 -r 0132846995bd lisp/tooltalk/tooltalk-load.el
--- a/lisp/tooltalk/tooltalk-load.el	Mon Aug 13 09:42:28 2007 +0200
+++ b/lisp/tooltalk/tooltalk-load.el	Mon Aug 13 09:43:35 2007 +0200
@@ -2,6 +2,8 @@
 ;;;
 ;;; @(#)tooltalk-load.el 1.3 92/12/16
 
+;; This file is obsoleted by dumped=-lisp.el and will be removed shortly.
+
 (load "tooltalk/tooltalk-macros")
 (load "tooltalk/tooltalk-util")
 (load "tooltalk/tooltalk-init")
diff -r 4de2936b4e77 -r 0132846995bd lisp/utils/auto-autoloads.el
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lisp/utils/auto-autoloads.el	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,1085 @@
+;;; DO NOT MODIFY THIS FILE
+(if (not (featurep 'utils-autoloads))
+    (progn
+
+;;;### (autoloads (defadvice ad-add-advice) "advice" "utils/advice.el")
+
+(defvar ad-redefinition-action 'warn "\
+*Defines what to do with redefinitions during Advice de/activation.
+Redefinition occurs if a previously activated function that already has an
+original definition associated with it gets redefined and then de/activated.
+In such a case we can either accept the current definition as the new
+original definition, discard the current definition and replace it with the
+old original, or keep it and raise an error.  The values `accept', `discard',
+`error' or `warn' govern what will be done.  `warn' is just like `accept' but
+it additionally prints a warning message.  All other values will be
+interpreted as `error'.")
+
+(defvar ad-default-compilation-action 'maybe "\
+*Defines whether to compile advised definitions during activation.
+A value of `always' will result in unconditional compilation, `never' will
+always avoid compilation, `maybe' will compile if the byte-compiler is already
+loaded, and `like-original' will compile if the original definition of the
+advised function is compiled or a built-in function. Every other value will
+be interpreted as `maybe'. This variable will only be considered if the 
+COMPILE argument of `ad-activate' was supplied as nil.")
+
+(autoload 'ad-add-advice "advice" "\
+Adds a piece of ADVICE to FUNCTION's list of advices in CLASS.
+If FUNCTION already has one or more pieces of advice of the specified
+CLASS then POSITION determines where the new piece will go.  The value
+of POSITION can either be `first', `last' or a number where 0 corresponds
+to `first'.  Numbers outside the range will be mapped to the closest
+extreme position.  If there was already a piece of ADVICE with the same
+name, then the position argument will be ignored and the old advice
+will be overwritten with the new one.
+    If the FUNCTION was not advised already, then its advice info will be 
+initialized.  Redefining a piece of advice whose name is part of the cache-id
+will clear the cache." nil nil)
+
+(autoload 'defadvice "advice" "\
+Defines a piece of advice for FUNCTION (a symbol).
+The syntax of `defadvice' is as follows:
+
+  (defadvice FUNCTION (CLASS NAME [POSITION] [ARGLIST] FLAG...)
+    [DOCSTRING] [INTERACTIVE-FORM]
+    BODY... )
+
+FUNCTION ::= Name of the function to be advised.
+CLASS ::= `before' | `around' | `after' | `activation' | `deactivation'.
+NAME ::= Non-nil symbol that names this piece of advice.
+POSITION ::= `first' | `last' | NUMBER. Optional, defaults to `first',
+    see also `ad-add-advice'.
+ARGLIST ::= An optional argument list to be used for the advised function
+    instead of the argument list of the original.  The first one found in
+    before/around/after-advices will be used.
+FLAG ::= `protect'|`disable'|`activate'|`compile'|`preactivate'|`freeze'.
+    All flags can be specified with unambiguous initial substrings.
+DOCSTRING ::= Optional documentation for this piece of advice.
+INTERACTIVE-FORM ::= Optional interactive form to be used for the advised
+    function.  The first one found in before/around/after-advices will be used.
+BODY ::= Any s-expression.
+
+Semantics of the various flags:
+`protect': The piece of advice will be protected against non-local exits in
+any code that precedes it.  If any around-advice of a function is protected
+then automatically all around-advices will be protected (the complete onion).
+
+`activate': All advice of FUNCTION will be activated immediately if
+FUNCTION has been properly defined prior to this application of `defadvice'.
+
+`compile': In conjunction with `activate' specifies that the resulting
+advised function should be compiled.
+
+`disable': The defined advice will be disabled, hence, it will not be used 
+during activation until somebody enables it.
+
+`preactivate': Preactivates the advised FUNCTION at macro-expansion/compile
+time.  This generates a compiled advised definition according to the current
+advice state that will be used during activation if appropriate.  Only use
+this if the `defadvice' gets actually compiled.
+
+`freeze': Expands the `defadvice' into a redefining `defun/defmacro' according
+to this particular single advice.  No other advice information will be saved.
+Frozen advices cannot be undone, they behave like a hard redefinition of
+the advised function.  `freeze' implies `activate' and `preactivate'.  The
+documentation of the advised function can be dumped onto the `DOC' file
+during preloading.
+
+Look at the file `advice.el' for comprehensive documentation." nil 'macro)
+
+;;;***
+
+;;;### (autoloads (all-annotations annotation-list annotations-at annotations-in-region annotation-at annotationp delete-annotation make-annotation) "annotations" "utils/annotations.el")
+
+(defvar make-annotation-hook nil "\
+*Function or functions to run immediately after creating an annotation.")
+
+(defvar before-delete-annotation-hook nil "\
+*Function or functions to run immediately before deleting an annotation.")
+
+(defvar after-delete-annotation-hook nil "\
+*Function or functions to run immediately after deleting an annotation.")
+
+(autoload 'make-annotation "annotations" "\
+Create a marginal annotation, displayed using GLYPH, at position POS.
+GLYPH may be either a glyph object or a string.  Use layout policy
+LAYOUT and place the annotation in buffer BUFFER.  If POS is nil, point is
+used.  If LAYOUT is nil, `whitespace' is used.  If BUFFER is nil, the
+current buffer is used.  If WITH-EVENT is non-nil, then when an annotation
+is activated, the triggering event is passed as the second arg to the
+annotation function.  If D-GLYPH is non-nil then it is used as the glyph 
+that will be displayed when button1 is down.  If RIGHTP is non-nil then
+the glyph will be displayed on the right side of the buffer instead of the
+left." nil nil)
+
+(autoload 'delete-annotation "annotations" "\
+Remove ANNOTATION from its buffer.  This does not modify the buffer text." nil nil)
+
+(autoload 'annotationp "annotations" "\
+T if OBJECT is an annotation." nil nil)
+
+(autoload 'annotation-at "annotations" "\
+Return the first annotation at POS in BUFFER.
+BUFFER defaults to the current buffer.  POS defaults to point in BUFFER." nil nil)
+
+(autoload 'annotations-in-region "annotations" "\
+Return all annotations in BUFFER between START and END inclusively." nil nil)
+
+(autoload 'annotations-at "annotations" "\
+Return a list of all annotations at POS in BUFFER.
+If BUFFER is nil, the current buffer is used.  If POS is nil, point is used." nil nil)
+
+(autoload 'annotation-list "annotations" "\
+Return a list of all annotations in BUFFER.
+If BUFFER is nil, the current buffer is used." nil nil)
+
+(autoload 'all-annotations "annotations" "\
+Return a list of all annotations in existence." nil nil)
+
+;;;***
+
+;;;### (autoloads (batch-update-directory batch-update-autoloads update-autoloads-from-directory update-autoloads-here update-file-autoloads generate-file-autoloads) "autoload" "utils/autoload.el")
+
+(autoload 'generate-file-autoloads "autoload" "\
+Insert at point a loaddefs autoload section for FILE.
+autoloads are generated for defuns and defmacros in FILE
+marked by `generate-autoload-cookie' (which see).
+If FILE is being visited in a buffer, the contents of the buffer
+are used." t nil)
+
+(autoload 'update-file-autoloads "autoload" "\
+Update the autoloads for FILE in `generated-autoload-file'
+\(which FILE might bind in its local variables)." t nil)
+
+(autoload 'update-autoloads-here "autoload" "\
+Update sections of the current buffer generated by `update-file-autoloads'." t nil)
+
+(autoload 'update-autoloads-from-directory "autoload" "\
+Update `generated-autoload-file' with all the current autoloads from DIR.
+This runs `update-file-autoloads' on each .el file in DIR.
+Obsolete autoload entries for files that no longer exist are deleted." t nil)
+
+(autoload 'batch-update-autoloads "autoload" "\
+Update the autoloads for the files or directories on the command line.
+Runs `update-file-autoloads' on files and `update-directory-autoloads'
+on directories.  Must be used only with -batch, and kills Emacs on completion.
+Each file will be processed even if an error occurred previously.
+For example, invoke `xemacs -batch -f batch-update-autoloads *.el'." nil nil)
+
+(autoload 'batch-update-directory "autoload" "\
+Update the autoloads for the directory on the command line.
+Runs `update-file-autoloads' on each file in the given directory, and must
+be used only with -batch, and kills XEmacs on completion." nil nil)
+
+;;;***
+
+;;;### (autoloads (browse-url-lynx-emacs browse-url-lynx-xterm browse-url-w3 browse-url-iximosaic browse-url-grail browse-url-mosaic browse-url-netscape) "browse-url" "utils/browse-url.el")
+
+(defcustom browse-url-browser-function 'browse-url-w3 "*Function to display the current buffer in a WWW browser.\nUsed by the `browse-url-at-point', `browse-url-at-mouse', and\n`browse-url-of-file' commands." :type 'function :group 'browse-url)
+
+(autoload 'browse-url-netscape "browse-url" "\
+Ask the Netscape WWW browser to load URL.
+
+Default to the URL around or before point.  The strings in variable
+`browse-url-netscape-arguments' are also passed to Netscape.
+
+When called interactively, if variable `browse-url-new-window-p' is
+non-nil, load the document in a new Netscape window, otherwise use a
+random existing one.  A non-nil interactive prefix argument reverses
+the effect of browse-url-new-window-p.
+
+When called non-interactively, optional second argument NEW-WINDOW is
+used instead of browse-url-new-window-p." t nil)
+
+(autoload 'browse-url-mosaic "browse-url" "\
+Ask the XMosaic WWW browser to load URL.
+Default to the URL around or before point." t nil)
+
+(autoload 'browse-url-grail "browse-url" "\
+Ask the Grail WWW browser to load URL.
+Default to the URL around or before point.  Runs the program in the
+variable `browse-url-grail'." t nil)
+
+(autoload 'browse-url-iximosaic "browse-url" "\
+Ask the IXIMosaic WWW browser to load URL.
+Default to the URL around or before point." t nil)
+
+(autoload 'browse-url-w3 "browse-url" "\
+Ask the w3 WWW browser to load URL.
+Default to the URL around or before point." t nil)
+
+(autoload 'browse-url-lynx-xterm "browse-url" "\
+Ask the Lynx WWW browser to load URL.
+Default to the URL around or before point.  A new Lynx process is run
+in an Xterm window." t nil)
+
+(autoload 'browse-url-lynx-emacs "browse-url" "\
+Ask the Lynx WWW browser to load URL.
+Default to the URL around or before point.  Run a new Lynx process in
+an Emacs buffer." t nil)
+
+;;;***
+
+;;;### (autoloads (docref-setup) "docref" "utils/docref.el")
+
+(autoload 'docref-setup "docref" "\
+Process docref cross-references in the current buffer.
+See also \\(f@docref-subst)." t nil)
+
+;;;***
+
+;;;### (autoloads (easy-menu-define) "easymenu" "utils/easymenu.el")
+
+(autoload 'easy-menu-define "easymenu" "\
+Define a menu bar submenu in maps MAPS, according to MENU.
+The arguments SYMBOL and DOC are ignored; they are present for
+compatibility only.  SYMBOL is not evaluated.  In other Emacs versions
+these arguments may be used as a variable to hold the menu data, and a
+doc string for that variable.
+
+The first element of MENU must be a string.  It is the menu bar item name.
+The rest of the elements are menu items.
+
+A menu item is usually a vector of three elements:  [NAME CALLBACK ENABLE]
+
+NAME is a string--the menu item name.
+
+CALLBACK is a command to run when the item is chosen,
+or a list to evaluate when the item is chosen.
+
+ENABLE is an expression; the item is enabled for selection
+whenever this expression's value is non-nil.
+
+Alternatively, a menu item may have the form: 
+
+   [ NAME CALLBACK [ KEYWORD ARG ] ... ]
+
+Where KEYWORD is one of the symbol defined below.
+
+   :keys KEYS
+
+KEYS is a string; a complex keyboard equivalent to this menu item.
+
+   :active ENABLE
+
+ENABLE is an expression; the item is enabled for selection
+whenever this expression's value is non-nil.
+
+   :suffix NAME
+
+NAME is a string; the name of an argument to CALLBACK.
+
+   :style STYLE
+   
+STYLE is a symbol describing the type of menu item.  The following are
+defined:  
+
+toggle: A checkbox.  
+        Currently just prepend the name with the string \"Toggle \".
+radio: A radio button. 
+nil: An ordinary menu item.
+
+   :selected SELECTED
+
+SELECTED is an expression; the checkbox or radio button is selected
+whenever this expression's value is non-nil.
+Currently just disable radio buttons, no effect on checkboxes.
+
+A menu item can be a string.  Then that string appears in the menu as
+unselectable text.  A string consisting solely of hyphens is displayed
+as a solid horizontal line.
+
+A menu item can be a list.  It is treated as a submenu.
+The first element should be the submenu name.  That's used as the
+menu item in the top-level menu.  The cdr of the submenu list
+is a list of menu items, as above." nil 'macro)
+
+;;;***
+
+;;;### (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")
+
+(define-key ctl-x-map "\C-k" 'edit-kbd-macro)
+
+(autoload 'edit-kbd-macro "edmacro" "\
+Edit a keyboard macro.
+At the prompt, type any key sequence which is bound to a keyboard macro.
+Or, type `C-x e' or RET to edit the last keyboard macro, `C-h l' to edit
+the last 100 keystrokes as a keyboard macro, or `M-x' to edit a macro by
+its command name.
+With a prefix argument, format the macro in a more concise way." t nil)
+
+(autoload 'edit-last-kbd-macro "edmacro" "\
+Edit the most recently defined keyboard macro." t nil)
+
+(autoload 'edit-named-kbd-macro "edmacro" "\
+Edit a keyboard macro which has been given a name by `name-last-kbd-macro'." t nil)
+
+(autoload 'read-kbd-macro "edmacro" "\
+Read the region as a keyboard macro definition.
+The region is interpreted as spelled-out keystrokes, e.g., \"M-x abc RET\".
+See documentation for `edmacro-mode' for details.
+Leading/trailing \"C-x (\" and \"C-x )\" in the text are allowed and ignored.
+The resulting macro is installed as the \"current\" keyboard macro.
+
+In Lisp, may also be called with a single STRING argument in which case
+the result is returned rather than being installed as the current macro.
+The result will be a string if possible, otherwise an event vector.
+Second argument NEED-VECTOR means to return an event vector always." t nil)
+
+(autoload 'kbd "edmacro" "\
+Convert KEYS to the internal Emacs key representation." nil 'macro)
+
+(autoload 'format-kbd-macro "edmacro" "\
+Return the keyboard macro MACRO as a human-readable string.
+This string is suitable for passing to `read-kbd-macro'.
+Second argument VERBOSE means to put one command per line with comments.
+If VERBOSE is `1', put everything on one line.  If VERBOSE is omitted
+or nil, use a compact 80-column format." 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")
+
+(defcustom eldoc-mode nil "*If non-nil, show the defined parameters for the elisp function near point.\n\nFor the emacs lisp function at the beginning of the sexp which point is\nwithin, show the defined parameters for the function in the echo area.\nThis information is extracted directly from the function or macro if it is\nin pure lisp.  If the emacs function is a subr, the parameters are obtained\nfrom the documentation string if possible.\n\nIf point is over a documented variable, print that variable's docstring\ninstead.\n\nThis variable is buffer-local." :type 'boolean :group 'eldoc)
+
+(autoload 'eldoc-mode "eldoc" "\
+*Enable or disable eldoc mode.
+See documentation for the variable of the same name for more details.
+
+If called interactively with no prefix argument, toggle current condition
+of the mode.
+If called with a positive or negative prefix argument, enable or disable
+the mode, respectively." t nil)
+
+(autoload 'turn-on-eldoc-mode "eldoc" "\
+Unequivocally turn on eldoc-mode (see variable documentation)." t nil)
+
+;;;***
+
+;;;### (autoloads (elp-submit-bug-report elp-results elp-instrument-package elp-instrument-list elp-restore-function elp-instrument-function) "elp" "utils/elp.el")
+
+(autoload 'elp-instrument-function "elp" "\
+Instrument FUNSYM for profiling.
+FUNSYM must be a symbol of a defined function." t nil)
+
+(autoload 'elp-restore-function "elp" "\
+Restore an instrumented function to its original definition.
+Argument FUNSYM is the symbol of a defined function." t nil)
+
+(autoload 'elp-instrument-list "elp" "\
+Instrument for profiling, all functions in `elp-function-list'.
+Use optional LIST if provided instead." t nil)
+
+(autoload 'elp-instrument-package "elp" "\
+Instrument for profiling, all functions which start with PREFIX.
+For example, to instrument all ELP functions, do the following:
+
+    \\[elp-instrument-package] RET elp- RET" t nil)
+
+(autoload 'elp-results "elp" "\
+Display current profiling results.
+If `elp-reset-after-results' is non-nil, then current profiling
+information for all instrumented functions are reset after results are
+displayed." t nil)
+
+(autoload 'elp-submit-bug-report "elp" "\
+Submit via mail, a bug report on elp." t nil)
+
+;;;***
+
+;;;### (autoloads (list-colors-display facemenu-read-color list-text-properties-at facemenu-remove-special facemenu-remove-props facemenu-set-read-only facemenu-set-intangible facemenu-set-invisible facemenu-make-much-smaller facemenu-make-much-larger facemenu-make-smaller facemenu-make-larger facemenu-set-size-default facemenu-set-face-from-menu facemenu-set-background facemenu-set-foreground facemenu-set-face) "facemenu" "utils/facemenu.el")
+
+(define-key ctl-x-map "F" 'facemenu-keymap)
+
+(defvar facemenu-menu nil "\
+Facemenu top-level menu keymap.")
+
+(defvar facemenu-keymap (let ((map (make-sparse-keymap "Set face"))) (define-key map ?o 'facemenu-set-face) map) "\
+Keymap for face-changing commands.
+`Facemenu-update' fills in the keymap according to the bindings
+requested in `facemenu-keybindings'.")
+
+(autoload 'facemenu-set-face "facemenu" "\
+Add FACE to the region or next character typed.
+It will be added to the top of the face list; any faces lower on the list that
+will not show through at all will be removed.
+
+Interactively, the face to be used is read with the minibuffer.
+
+If the region is active and there is no prefix argument,
+this command sets the region to the requested face.
+
+Otherwise, this command specifies the face for the next character
+inserted.  Moving point or switching buffers before
+typing a character to insert cancels the specification." t nil)
+
+(autoload 'facemenu-set-foreground "facemenu" "\
+Set the foreground color of the region or next character typed.
+The color is prompted for.  A face named `fg:color' is used (or created).
+If the region is active, it will be set to the requested face.  If
+it is inactive (even if mark-even-if-inactive is set) the next
+character that is typed (via `self-insert-command') will be set to
+the selected face.  Moving point or switching buffers before
+typing a character cancels the request." t nil)
+
+(autoload 'facemenu-set-background "facemenu" "\
+Set the background color of the region or next character typed.
+The color is prompted for.  A face named `bg:color' is used (or created).
+If the region is active, it will be set to the requested face.  If
+it is inactive (even if mark-even-if-inactive is set) the next
+character that is typed (via `self-insert-command') will be set to
+the selected face.  Moving point or switching buffers before
+typing a character cancels the request." t nil)
+
+(autoload 'facemenu-set-face-from-menu "facemenu" "\
+Set the face of the region or next character typed.
+This function is designed to be called from a menu; the face to use
+is the menu item's name.
+
+If the region is active and there is no prefix argument,
+this command sets the region to the requested face.
+
+Otherwise, this command specifies the face for the next character
+inserted.  Moving point or switching buffers before
+typing a character to insert cancels the specification." t nil)
+
+(autoload 'facemenu-set-size-default "facemenu" nil t nil)
+
+(autoload 'facemenu-make-larger "facemenu" nil t nil)
+
+(autoload 'facemenu-make-smaller "facemenu" nil t nil)
+
+(autoload 'facemenu-make-much-larger "facemenu" nil t nil)
+
+(autoload 'facemenu-make-much-smaller "facemenu" nil t nil)
+
+(autoload 'facemenu-set-invisible "facemenu" "\
+Make the region invisible.
+This sets the `invisible' text property; it can be undone with
+`facemenu-remove-special'." t nil)
+
+(autoload 'facemenu-set-intangible "facemenu" "\
+Make the region intangible: disallow moving into it.
+This sets the `intangible' text property; it can be undone with
+`facemenu-remove-special'." t nil)
+
+(autoload 'facemenu-set-read-only "facemenu" "\
+Make the region unmodifiable.
+This sets the `read-only' text property; it can be undone with
+`facemenu-remove-special'." t nil)
+
+(autoload 'facemenu-remove-props "facemenu" "\
+Remove all text properties that facemenu added to region." t nil)
+
+(autoload 'facemenu-remove-special "facemenu" "\
+Remove all the \"special\" text properties from the region.
+These special properties include `invisible', `intangible' and `read-only'." t nil)
+
+(autoload 'list-text-properties-at "facemenu" "\
+Pop up a buffer listing text-properties at LOCATION." t nil)
+
+(autoload 'facemenu-read-color "facemenu" "\
+Read a color using the minibuffer." nil nil)
+
+(autoload 'list-colors-display "facemenu" "\
+Display names of defined colors, and show what they look like.
+If the optional argument LIST is non-nil, it should be a list of
+colors to display.  Otherwise, this command computes a list
+of colors that the current display can handle." t nil)
+
+;;;***
+
+;;;### (autoloads (floating-toolbar-from-extent-or-popup-mode-menu floating-toolbar-or-popup-mode-menu floating-toolbar) "floating-toolbar" "utils/floating-toolbar.el")
+
+(autoload 'floating-toolbar "floating-toolbar" "\
+Popup a toolbar near the current mouse position.
+The toolbar instantiator used is taken from the 'floating-toolbar
+property of any extent under the mouse.  If no such non-nil
+property exists for any extent under the mouse, then the value of the
+variable `floating-toolbar' is checked.  If its value si nil, then
+no toolbar will be displayed.
+
+This command should be bound to a button press event.
+
+When called from a program, first arg EVENT should be the button
+press event.  Optional second arg EXTENT-LOCAL-ONLY specifies
+that only extent local toolbars should be used; this means the
+`floating-toolbar' variable will not be consulted." t nil)
+
+(autoload 'floating-toolbar-or-popup-mode-menu "floating-toolbar" "\
+Like floating-toolbar, but if no toolbar is displayed
+run popup-mode-menu." t nil)
+
+(autoload 'floating-toolbar-from-extent-or-popup-mode-menu "floating-toolbar" "\
+Like floating-toolbar-or-popup-mode-menu, but search only for an
+extent local toolbar." t nil)
+
+;;;***
+
+;;;### (autoloads (enable-flow-control-on enable-flow-control) "flow-ctrl" "utils/flow-ctrl.el")
+
+(autoload 'enable-flow-control "flow-ctrl" "\
+Toggle flow control handling.
+When handling is enabled, user can type C-s as C-\\, and C-q as C-^.
+With arg, enable flow control mode if arg is positive, otherwise disable." t nil)
+
+(autoload 'enable-flow-control-on "flow-ctrl" "\
+Enable flow control if using one of a specified set of terminal types.
+Use `(enable-flow-control-on \"vt100\" \"h19\")' to enable flow control
+on VT-100 and H19 terminals.  When flow control is enabled,
+you must type C-\\ to get the effect of a C-s, and type C-^
+to get the effect of a C-q.
+
+This function has no effect unless the current device is a tty.
+
+The tty terminal type is determined from the TERM environment variable.
+Trailing hyphens and everything following is stripped, so a TERM
+value of \"vt100-nam\" is treated the same as \"vt100\"." nil nil)
+
+;;;***
+
+;;;### (autoloads (forms-find-file-other-window forms-find-file forms-mode) "forms" "utils/forms.el")
+
+(autoload 'forms-mode "forms" "\
+Major mode to visit files in a field-structured manner using a form.
+
+Commands:                        Equivalent keys in read-only mode:
+ TAB            forms-next-field          TAB
+ \\C-c TAB       forms-next-field          
+ \\C-c <         forms-first-record         <
+ \\C-c >         forms-last-record          >
+ \\C-c ?         describe-mode              ?
+ \\C-c \\C-k      forms-delete-record
+ \\C-c \\C-q      forms-toggle-read-only     q
+ \\C-c \\C-o      forms-insert-record
+ \\C-c \\C-l      forms-jump-record          l
+ \\C-c \\C-n      forms-next-record          n
+ \\C-c \\C-p      forms-prev-record          p
+ \\C-c \\C-r      forms-search-backward      r
+ \\C-c \\C-s      forms-search-forward       s
+ \\C-c \\C-x      forms-exit                 x
+" t nil)
+
+(autoload 'forms-find-file "forms" "\
+Visit a file in Forms mode." t nil)
+
+(autoload 'forms-find-file-other-window "forms" "\
+Visit a file in Forms mode in other window." t nil)
+
+;;;***
+
+;;;### (autoloads (unhide-copyleft-region hide-copyleft-region) "hide-copyleft" "utils/hide-copyleft.el")
+
+(autoload 'hide-copyleft-region "hide-copyleft" "\
+Make the legal drivel at the front of this file invisible.  Unhide it again
+with C-u \\[hide-copyleft-region]." t nil)
+
+(autoload 'unhide-copyleft-region "hide-copyleft" "\
+If the legal nonsense at the top of this file is elided, make it visible again." nil nil)
+
+;;;***
+
+;;;### (autoloads (highlight-headers-follow-url highlight-headers-follow-url-mosaic highlight-headers-follow-url-netscape highlight-headers) "highlight-headers" "utils/highlight-headers.el")
+
+(autoload 'highlight-headers "highlight-headers" "\
+Highlight message headers between start and end.
+Faces used:
+  message-headers			the part before the colon
+  message-header-contents		the part after the colon
+  message-highlighted-header-contents	contents of \"special\" headers
+  message-cited-text			quoted text from other messages
+
+Variables used:
+
+  highlight-headers-regexp			what makes a \"special\" header
+  highlight-headers-citation-regexp		matches lines of quoted text
+  highlight-headers-citation-header-regexp	matches headers for quoted text
+
+If HACK-SIG is true,then we search backward from END for something that
+looks like the beginning of a signature block, and don't consider that a
+part of the message (this is because signatures are often incorrectly
+interpreted as cited text.)" nil nil)
+
+(autoload 'highlight-headers-follow-url-netscape "highlight-headers" nil nil nil)
+
+(autoload 'highlight-headers-follow-url-mosaic "highlight-headers" nil nil nil)
+
+(autoload 'highlight-headers-follow-url "highlight-headers" nil t nil)
+
+;;;***
+
+;;;### (autoloads (make-hippie-expand-function hippie-expand) "hippie-exp" "utils/hippie-exp.el")
+
+(defvar hippie-expand-try-functions-list '(try-complete-file-name-partially try-complete-file-name try-expand-all-abbrevs try-expand-list try-expand-line try-expand-dabbrev try-expand-dabbrev-all-buffers try-expand-dabbrev-from-kill try-complete-lisp-symbol-partially try-complete-lisp-symbol) "\
+The list of expansion functions tried in order by `hippie-expand'.
+To change the behavior of `hippie-expand', remove, change the order of,
+or insert functions in this list.")
+
+(defvar hippie-expand-verbose t "\
+*Non-nil makes `hippie-expand' output which function it is trying.")
+
+(defvar hippie-expand-max-buffers nil "\
+*The maximum number of buffers (apart from the current) searched.
+If nil, all buffers are searched.")
+
+(defvar hippie-expand-ignore-buffers '("^ \\*.*\\*$" dired-mode) "\
+*A list specifying which buffers not to search (if not current).
+Can contain both regexps matching buffer names (as strings) and major modes
+\(as atoms)")
+
+(autoload 'hippie-expand "hippie-exp" "\
+Try to expand text before point, using multiple methods.
+The expansion functions in `hippie-expand-try-functions-list' are
+tried in order, until a possible expansion is found.  Repeated
+application of `hippie-expand' inserts successively possible
+expansions.  
+With a positive numeric argument, jumps directly to the ARG next
+function in this list.  With a negative argument or just \\[universal-argument], 
+undoes the expansion." t nil)
+
+(autoload 'make-hippie-expand-function "hippie-exp" "\
+Construct a function similar to `hippie-expand'.
+Make it use the expansion functions in TRY-LIST.  An optional second
+argument VERBOSE non-nil makes the function verbose." nil 'macro)
+
+;;;***
+
+;;;### (autoloads (id-select-double-click-hook id-select-and-kill-thing id-select-and-copy-thing id-select-goto-matching-tag id-select-thing-with-mouse id-select-thing) "id-select" "utils/id-select.el")
+
+(autoload 'id-select-thing "id-select" "\
+Mark the region selected by the syntax of the thing at point.
+If invoked repeatedly, selects bigger and bigger things.
+If `id-select-display-type' is non-nil, the type of selection is displayed in
+the minibuffer." t nil)
+
+(autoload 'id-select-thing-with-mouse "id-select" "\
+Select a region based on the syntax of the character from a mouse click.
+If the click occurs at the same point as the last click, select
+the next larger syntactic structure.  If `id-select-display-type' is non-nil,
+the type of selection is displayed in the minibuffer." t nil)
+
+(autoload 'id-select-goto-matching-tag "id-select" "\
+If in a major mode listed in `id-select-markup-modes,' moves point to the start of the tag paired with the closest tag that point is within or precedes.
+Returns t if point is moved, else nil.
+Signals an error if no tag is found following point or if the closing tag
+does not have a `>' terminator character." t nil)
+
+(autoload 'id-select-and-copy-thing "id-select" "\
+Copy the region surrounding the syntactical unit at point." t nil)
+
+(autoload 'id-select-and-kill-thing "id-select" "\
+Kill the region surrounding the syntactical unit at point." t nil)
+
+(autoload 'id-select-double-click-hook "id-select" "\
+Select a region based on the syntax of the character wherever the mouse is double-clicked.
+If the double-click occurs at the same point as the last double-click, select
+the next larger syntactic structure.  If `id-select-display-type' is non-nil,
+the type of selection is displayed in the minibuffer." nil nil)
+
+;;;***
+
+;;;### (autoloads (unload-feature) "loadhist" "utils/loadhist.el")
+
+(autoload 'unload-feature "loadhist" "\
+Unload the library that provided FEATURE, restoring all its autoloads.
+If the feature is required by any other loaded code, and optional FORCE
+is nil, raise an error." t nil)
+
+;;;***
+
+;;;### (autoloads (what-domain mail-extract-address-components) "mail-extr" "utils/mail-extr.el")
+
+(autoload 'mail-extract-address-components "mail-extr" "\
+Given an RFC-822 ADDRESS, extract full name and canonical address.
+Returns a list of the form (FULL-NAME CANONICAL-ADDRESS).
+If no name can be extracted, FULL-NAME will be nil.
+ADDRESS may be a string or a buffer.  If it is a buffer, the visible 
+ (narrowed) portion of the buffer will be interpreted as the address.
+ (This feature exists so that the clever caller might be able to avoid
+ consing a string.)
+If ADDRESS contains more than one RFC-822 address, only the first is
+ returned.  Some day this function may be extended to extract multiple
+ addresses, or perhaps return the position at which parsing stopped." nil nil)
+
+(autoload 'what-domain "mail-extr" "\
+Prompts for a mail domain, and prints the country it corresponds to
+in the minibuffer." t nil)
+
+;;;***
+
+;;;### (autoloads (mail-fetch-field mail-file-babyl-p) "mail-utils" "utils/mail-utils.el")
+
+(defvar mail-use-rfc822 nil "\
+*If non-nil, use a full, hairy RFC822 parser on mail addresses.
+Otherwise, (the default) use a smaller, somewhat faster, and
+often correct parser.")
+
+(autoload 'mail-file-babyl-p "mail-utils" nil nil nil)
+
+(autoload 'mail-fetch-field "mail-utils" "\
+Return the value of the header field FIELD-NAME.
+The buffer is expected to be narrowed to just the headers of the message.
+If second arg LAST is non-nil, use the last such field if there are several.
+If third arg ALL is non-nil, concatenate all such fields with commas between." nil nil)
+
+;;;***
+
+;;;### (autoloads (read-passwd) "passwd" "utils/passwd.el")
+
+(autoload 'read-passwd "passwd" "\
+Prompts for a password in the minibuffer, and returns it as a string.
+If PROMPT may be a prompt string or an alist of elements 
+'(prompt . default).
+If optional arg CONFIRM is true, then ask the user to type the password
+again to confirm that they typed it correctly.
+If optional arg DEFAULT is provided, then it is a string to insert as
+the default choice (it is not, of course, displayed.)
+
+If running under X, the keyboard will be grabbed (with XGrabKeyboard())
+to reduce the possibility that eavesdropping is occuring.
+
+When reading a password, all keys self-insert, except for:
+\\<read-passwd-map>
+	\\[read-passwd-erase-line]	Erase the entire line.
+	\\[quoted-insert]	Insert the next character literally.
+	\\[delete-backward-char]	Delete the previous character.
+	\\[exit-minibuffer]	Accept what you have typed.
+	\\[keyboard-quit]	Abort the command.
+
+The returned value is always a newly-created string.  No additional copies
+of the password remain after this function has returned.
+
+NOTE: unless great care is taken, the typed password will exist in plaintext
+form in the running image for an arbitrarily long time.  Priveleged users may
+be able to extract it from memory.  If emacs crashes, it may appear in the
+resultant core file.
+
+Some steps you can take to prevent the password from being copied around:
+
+ - as soon as you are done with the returned string, destroy it with
+   (fillarray string 0).  The same goes for any default passwords
+   or password histories.
+
+ - do not copy the string, as with concat or substring - if you do, be
+   sure to keep track of and destroy all copies.
+
+ - do not insert the password into a buffer - if you do, be sure to 
+   overwrite the buffer text before killing it, as with the functions 
+   `passwd-erase-buffer' or `passwd-kill-buffer'.  Note that deleting
+   the text from the buffer does NOT necessarily remove the text from
+   memory.
+
+ - be careful of the undo history - if you insert the password into a 
+   buffer which has undo recording turned on, the password will be 
+   copied onto the undo list, and thus recoverable.
+
+ - do not pass it as an argument to a shell command - anyone will be
+   able to see it if they run `ps' at the right time.
+
+Note that the password will be temporarily recoverable with the `view-lossage'
+command.  This data will not be overwritten until another hundred or so 
+characters are typed.  There's not currently a way around this." nil nil)
+
+;;;***
+
+;;;### (autoloads (pp-eval-last-sexp pp-eval-expression pp) "pp" "utils/pp.el")
+
+(defalias 'pprint 'pp)
+
+(autoload 'pp "pp" "\
+Output the pretty-printed representation of OBJECT, any Lisp object.
+Quoting characters are printed when needed to make output that `read'
+can handle, whenever this is possible.
+Output stream is STREAM, or value of `standard-output' (which see)." nil nil)
+
+(autoload 'pp-eval-expression "pp" "\
+Evaluate EXPRESSION and pretty-print value into a new display buffer.
+If the pretty-printed value fits on one line, the message line is used
+instead.  Value is also consed on to front of variable  values 's
+value." t nil)
+
+(autoload 'pp-eval-last-sexp "pp" "\
+Run `pp-eval-expression' on sexp before point (which see).
+With argument, pretty-print output into current buffer.
+Ignores leading comment characters." t nil)
+
+;;;***
+
+;;;### (autoloads (prettyexpand-all-sexp prettyexpand-sexp macroexpand-all-sexp macroexpand-sexp pp-plist pp-variable pp-function) "pretty-print" "utils/pretty-print.el")
+
+(autoload 'pp-function "pretty-print" "\
+Pretty print the function definition of SYMBOL in a separate buffer" t nil)
+
+(autoload 'pp-variable "pretty-print" "\
+Pretty print the variable value of SYMBOL in a separate buffer" t nil)
+
+(autoload 'pp-plist "pretty-print" "\
+Pretty print the property list of SYMBOL in a separate buffer" t nil)
+
+(autoload 'macroexpand-sexp "pretty-print" "\
+Macro expand the sexpression following point. Pretty print expansion in a
+temporary buffer. With prefix argument, replace the original
+sexpression by its expansion in the current buffer." t nil)
+
+(autoload 'macroexpand-all-sexp "pretty-print" "\
+Macro expand recursively the sexpression following point. Pretty print
+expansion in a temporary buffer. With prefix argument, replace the
+original sexpression by its expansion in the current buffer." t nil)
+
+(autoload 'prettyexpand-sexp "pretty-print" "\
+Macro expand the sexpression following point. Pretty print expansion
+in a temporary buffer. With prefix argument, replace the original
+sexpression by its expansion in the current buffer.  
+	However, calls to macros specified in the variable
+`pp-shadow-expansion-list' are not expanded, in order to make the code
+look nicer." t nil)
+
+(autoload 'prettyexpand-all-sexp "pretty-print" "\
+Macro expand recursively the sexpression following point. Pretty print
+expansion in a temporary buffer. With prefix argument, replace the
+original sexpression by its expansion in the current buffer.
+	However, calls to macros specified in the variable
+`pp-shadow-expansion-list' are not expanded, in order to make the code
+look nicer." t nil)
+
+;;;***
+
+;;;### (autoloads (reporter-submit-bug-report) "reporter" "utils/reporter.el")
+
+(autoload 'reporter-submit-bug-report "reporter" nil nil nil)
+
+;;;***
+
+;;;### (autoloads (make-ring ringp) "ring" "utils/ring.el")
+
+(autoload 'ringp "ring" "\
+Returns t if X is a ring; nil otherwise." nil nil)
+
+(define-obsolete-function-alias 'ring-p 'ringp)
+
+(autoload 'make-ring "ring" "\
+Make a ring that can contain SIZE elements." nil nil)
+
+;;;***
+
+;;;### (autoloads (savehist-save savehist-load) "savehist" "utils/savehist.el")
+
+(autoload 'savehist-load "savehist" "\
+Load the histories saved to `savehist-file'.
+Unless PREFIX is non-nil, the function will also add the save function to
+`kill-emacs-hook'.
+
+This function should be normally used from your Emacs init file.  Since it
+removes your current minibuffer histories (if any), it is unwise to call it
+at any other time." t nil)
+
+(autoload 'savehist-save "savehist" "\
+Save the histories from `savehist-history-variables' to `savehist-file'.
+A variable will be saved if it is bound and non-nil." t nil)
+
+;;;***
+
+;;;### (autoloads (skeleton-pair-insert-maybe skeleton-insert skeleton-proxy skeleton-proxy-new define-skeleton) "skeleton" "utils/skeleton.el")
+
+(defvar skeleton-filter 'identity "\
+Function for transforming a skeleton proxy's aliases' variable value.")
+
+(autoload 'define-skeleton "skeleton" "\
+Define a user-configurable COMMAND that enters a statement skeleton.
+DOCUMENTATION is that of the command, while the variable of the same name,
+which contains the skeleton, has a documentation to that effect.
+INTERACTOR and ELEMENT ... are as defined under `skeleton-insert'." nil 'macro)
+
+(autoload 'skeleton-proxy-new "skeleton" "\
+Insert skeleton defined by variable of same name (see `skeleton-insert').
+Prefix ARG allows wrapping around words or regions (see `skeleton-insert').
+If no ARG was given, but the region is visible, ARG defaults to -1 depending
+on `skeleton-autowrap'.  An ARG of  M-0  will prevent this just for once.
+This command can also be an abbrev expansion (3rd and 4th columns in
+\\[edit-abbrevs]  buffer: \"\"  command-name).
+ 
+When called as a function, optional first argument STR may also be a string
+which will be the value of `str' whereas the skeleton's interactor is then
+ignored." t nil)
+
+(autoload 'skeleton-proxy "skeleton" "\
+Insert skeleton defined by variable of same name (see `skeleton-insert').
+Prefix ARG allows wrapping around words or regions (see `skeleton-insert').
+If no ARG was given, but the region is visible, ARG defaults to -1 depending
+on `skeleton-autowrap'.  An ARG of  M-0  will prevent this just for once.
+This command can also be an abbrev expansion (3rd and 4th columns in
+\\[edit-abbrevs]  buffer: \"\"  command-name).
+
+When called as a function, optional first argument STR may also be a string
+which will be the value of `str' whereas the skeleton's interactor is then
+ignored." t nil)
+
+(autoload 'skeleton-insert "skeleton" "\
+Insert the complex statement skeleton SKELETON describes very concisely.
+
+With optional third REGIONS wrap first interesting point (`_') in skeleton
+around next REGIONS words, if REGIONS is positive.  If REGIONS is negative,
+wrap REGIONS preceding interregions into first REGIONS interesting positions
+\(successive `_'s) in skeleton.  An interregion is the stretch of text between
+two contiguous marked points.  If you marked A B C [] (where [] is the cursor)
+in alphabetical order, the 3 interregions are simply the last 3 regions.  But
+if you marked B A [] C, the interregions are B-A, A-[], []-C.
+
+Optional fourth STR is the value for the variable `str' within the skeleton.
+When this is non-`nil' the interactor gets ignored, and this should be a valid
+skeleton element.
+
+SKELETON is made up as (INTERACTOR ELEMENT ...).  INTERACTOR may be nil if
+not needed, a prompt-string or an expression for complex read functions.
+
+If ELEMENT is a string or a character it gets inserted (see also
+`skeleton-transformation').  Other possibilities are:
+
+	\\n	go to next line and indent according to mode
+	_	interesting point, interregion here, point after termination
+	>	indent line (or interregion if > _) according to major mode
+	&	do next ELEMENT if previous moved point
+	|	do next ELEMENT if previous didn't move point
+	-num	delete num preceding characters (see `skeleton-untabify')
+	resume:	skipped, continue here if quit is signaled
+	nil	skipped
+
+Further elements can be defined via `skeleton-further-elements'.  ELEMENT may
+itself be a SKELETON with an INTERACTOR.  The user is prompted repeatedly for
+different inputs.  The SKELETON is processed as often as the user enters a
+non-empty string.  \\[keyboard-quit] terminates skeleton insertion, but
+continues after `resume:' and positions at `_' if any.  If INTERACTOR in such
+a subskeleton is a prompt-string which contains a \".. %s ..\" it is
+formatted with `skeleton-subprompt'.  Such an INTERACTOR may also a list of
+strings with the subskeleton being repeated once for each string.
+
+Quoted Lisp expressions are evaluated evaluated for their side-effect.
+Other Lisp expressions are evaluated and the value treated as above.
+Note that expressions may not return `t' since this implies an
+endless loop.  Modes can define other symbols by locally setting them
+to any valid skeleton element.  The following local variables are
+available:
+
+	str	first time: read a string according to INTERACTOR
+		then: insert previously read string once more
+	help	help-form during interaction with the user or `nil'
+	input	initial input (string or cons with index) while reading str
+	v1, v2	local variables for memorizing anything you want
+
+When done with skeleton, but before going back to `_'-point call
+`skeleton-end-hook' if that is non-`nil'." nil nil)
+
+(autoload 'skeleton-pair-insert-maybe "skeleton" "\
+Insert the character you type ARG times.
+
+With no ARG, if `skeleton-pair' is non-nil, pairing can occur.  If the region
+is visible the pair is wrapped around it depending on `skeleton-autowrap'.
+Else, if `skeleton-pair-on-word' is non-nil or we are not before or inside a
+word, and if `skeleton-pair-filter' returns nil, pairing is performed.
+
+If a match is found in `skeleton-pair-alist', that is inserted, else
+the defaults are used.  These are (), [], {}, <> and `' for the
+symmetrical ones, and the same character twice for the others." t nil)
+
+;;;***
+
+;;;### (autoloads (speedbar-frame-mode) "speedbar" "utils/speedbar.el")
+
+(autoload 'speedbar-frame-mode "speedbar" "\
+Enable or disable use of a speedbar.  Positive number means turn
+on, negative turns speedbar off, and nil means toggle.  Once the
+speedbar frame is activated, a buffer in `speedbar-mode' will be
+displayed.  Currently, only one speedbar is supported at a time." t nil)
+
+;;;***
+
+;;;### (autoloads nil "timezone" "utils/timezone.el")
+
+(define-error 'invalid-date "Invalid date string")
+
+;;;***
+
+;;;### (autoloads (tq-create) "tq" "utils/tq.el")
+
+(autoload 'tq-create "tq" "\
+Create and return a transaction queue communicating with PROCESS.
+PROCESS should be a subprocess capable of sending and receiving
+streams of bytes.  It may be a local process, or it may be connected
+to a tcp server on another machine." nil nil)
+
+;;;***
+
+;;;### (autoloads (trace-function-background trace-function) "trace" "utils/trace.el")
+
+(defvar trace-buffer "*trace-output*" "\
+*Trace output will by default go to that buffer.")
+
+(autoload 'trace-function "trace" "\
+Traces FUNCTION with trace output going to BUFFER.
+For every call of FUNCTION Lisp-style trace messages that display argument
+and return values will be inserted into BUFFER. This function generates the
+trace advice for FUNCTION and activates it together with any other advice
+there might be!! The trace BUFFER will popup whenever FUNCTION is called.
+Do not use this to trace functions that switch buffers or do any other
+display oriented stuff, use `trace-function-background' instead." t nil)
+
+(autoload 'trace-function-background "trace" "\
+Traces FUNCTION with trace output going quietly to BUFFER.
+For every call of FUNCTION Lisp-style trace messages that display argument
+and return values will be inserted into BUFFER. This function generates the
+trace advice for FUNCTION and activates it together with any other advice
+there might be!! Trace output will quietly go to BUFFER without changing
+the window or buffer configuration at all." t nil)
+
+;;;***
+
+;;;### (autoloads (xbm-button-create) "xbm-button" "utils/xbm-button.el")
+
+(autoload 'xbm-button-create "xbm-button" "\
+Returns a list of XBM image instantiators for a button displaying TEXT.
+The list is of the form
+   (UP DOWN DISABLED)
+where UP, DOWN, and DISABLED are the up, down and disabled image
+instantiators for the button.
+
+BORDER-THICKNESS specifies how many pixels should be used for the
+borders on the edges of the buttons.  It should be a positive integer,
+or 0 to mean no border." nil nil)
+
+;;;***
+
+;;;### (autoloads (xpm-button-create) "xpm-button" "utils/xpm-button.el")
+
+(autoload 'xpm-button-create "xpm-button" "\
+Returns a list of XPM image instantiators for a button displaying TEXT.
+The list is of the form
+   (UP DOWN DISABLED)
+where UP, DOWN, and DISABLED are the up, down and disabled image
+instantiators for the button.
+
+SHADOW-THICKNESS specifies how many pixels should be used for the
+shadows on the edges of the buttons.  It should be a positive integer,
+or 0 to mean no shadows on the edges.
+FG-COLOR is the color used to display the text.  It should be a string.
+BG-COLOR is the background color the text will be displayed upon.
+It should be a string." nil nil)
+
+;;;***
+
+(provide 'utils-autoloads)
+))
diff -r 4de2936b4e77 -r 0132846995bd lisp/utils/autoload.el
--- a/lisp/utils/autoload.el	Mon Aug 13 09:42:28 2007 +0200
+++ b/lisp/utils/autoload.el	Mon Aug 13 09:43:35 2007 +0200
@@ -331,14 +331,30 @@
 	(message "Generating autoloads for %s...done" file))))
 
 
+(defconst autoload-file-name "auto-autoloads.el"
+  "Generic filename to put autoloads into.
+Unless you are an XEmacs maintainer, it is probably unwise to change this.")
+
+(defvar autoload-target-directory "../lisp/prim/"
+  "Directory to put autoload declaration file into.
+Unless you know what you're doing, don't mess with this.")
+
 (defvar generated-autoload-file
-  (expand-file-name "../lisp/prim/auto-autoloads.el" data-directory)
+  (expand-file-name (concat autoload-target-directory
+			    autoload-file-name)
+		    data-directory)
   "*File `update-file-autoloads' puts autoloads into.
 A .el file can set this in its local variables section to make its
 autoloads go somewhere else.")
 
+(defconst cusload-file-name "custom-load.el"
+  "Generic filename ot put custom loads into.
+Unless you are an XEmacs maintainr, it is probably unwise to change this.")
+
 (defvar generated-custom-file
-  (expand-file-name "../lisp/prim/cus-load.el" data-directory)
+  (expand-file-name (concat autoload-target-directory
+			    cusload-file-name)
+		    data-directory)
   "*File `update-file-autoloads' puts customization into.")
 
 ;; Written by Per Abrahamsen
@@ -498,7 +514,9 @@
     (insert
      (with-output-to-string
       (mapatoms (lambda (symbol)
-		  (let ((members (get symbol 'custom-group))
+		  (let ((members (condition-case nil
+				     (get symbol 'custom-group)
+				   (t nil)))
 			item where found)
 		    (when members
 		      (princ "(put '")
@@ -542,6 +560,45 @@
     (message "Done")
     (kill-emacs 0)))
 
+(defun fixup-autoload-buffer (sym)
+  (save-excursion
+    (set-buffer (find-file-noselect generated-autoload-file))
+    (goto-char (point-min))
+    (if (and (not (= (point-min) (point-max)))
+	     (not (looking-at ";;; DO NOT MODIFY THIS FILE")))
+	(progn
+	  (insert ";;; DO NOT MODIFY THIS FILE\n")
+	  (insert "(if (not (featurep '" sym "))\n")
+	  (insert "    (progn\n")
+	  (goto-char (point-max))
+	  (insert "\n(provide '" sym ")\n))\n")))))
+
+;;;###autoload
+(defun batch-update-directory ()
+  "Update the autoloads for the directory on the command line.
+Runs `update-file-autoloads' on each file in the given directory, and must
+be used only with -batch, and kills XEmacs on completion."
+  (unless noninteractive
+    (error "batch-update-autoloads is to be used only with -batch"))
+  (let ((defdir default-directory)
+	(enable-local-eval nil))	; Don't query in batch mode.
+    (dolist (arg command-line-args-left)
+      (setq arg (expand-file-name arg defdir))
+      (let ((generated-autoload-file (concat arg "/" autoload-file-name))
+	    (generated-custom-file (concat arg "/" cusload-file-name)))
+	(cond
+	 ((file-directory-p arg)
+	  (message "Updating autoloads in directory %s..." arg)
+	  (update-autoloads-from-directory arg))
+	 (t (error "No such file or directory: %s" arg)))
+	(autoload-save-customization)
+	(fixup-autoload-buffer (concat (file-name-nondirectory arg)
+				       "-autoloads"))
+	(save-some-buffers t))
+      (message "Done")
+      ;; (kill-emacs 0)
+      )))
+
 (provide 'autoload)
 
 ;;; autoload.el ends here
diff -r 4de2936b4e77 -r 0132846995bd lisp/utils/custom-load.el
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lisp/utils/custom-load.el	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,83 @@
+(put 'extensions 'custom-loads '("eldoc"))
+(put 'copyright 'custom-loads '())
+(put 'eldoc 'custom-loads '("eldoc"))
+(put 'execute 'custom-loads '())
+(put 'mouse 'custom-loads '())
+(put 'mail-abbrevs 'custom-loads '())
+(put 'etags 'custom-loads '())
+(put 'limits 'custom-loads '())
+(put 'minibuffer 'custom-loads '("detached-minibuf" "savehist"))
+(put 'environment 'custom-loads '())
+(put 'sound 'custom-loads '())
+(put 'holidays 'custom-loads '())
+(put 'auto-save 'custom-loads '())
+(put 'ispell 'custom-loads '())
+(put 'mail 'custom-loads '("highlight-headers" "ph" "smtpmail"))
+(put 'fortran-indent 'custom-loads '())
+(put 'lpr 'custom-loads '())
+(put 'message-headers 'custom-loads '())
+(put 'uniquify 'custom-loads '("uniquify"))
+(put 'editing-basics 'custom-loads '())
+(put 'internal 'custom-loads '())
+(put 'calendar 'custom-loads '())
+(put 'help-appearance 'custom-loads '())
+(put 'display-time 'custom-loads '())
+(put 'hypermedia 'custom-loads '("browse-url"))
+(put 'lisp 'custom-loads '("elp"))
+(put 'diff 'custom-loads '())
+(put 'elp 'custom-loads '("elp"))
+(put 'applications 'custom-loads '("uniquify"))
+(put 'paren-matching 'custom-loads '())
+(put 'help 'custom-loads '())
+(put 'local 'custom-loads '())
+(put 'keyboard 'custom-loads '("edmacro"))
+(put 'minubuffer 'custom-loads '())
+(put 'message-sending 'custom-loads '())
+(put 'data 'custom-loads '())
+(put 'ps-print 'custom-loads '())
+(put 'comm 'custom-loads '("ph"))
+(put 'backup 'custom-loads '())
+(put 'id-select 'custom-loads '("id-select"))
+(put 'frames 'custom-loads '("detached-minibuf"))
+(put 'customize 'custom-loads '())
+(put 'abbrev 'custom-loads '())
+(put 'toolbar 'custom-loads '())
+(put 'compilation 'custom-loads '())
+(put 'dired 'custom-loads '())
+(put 'killing 'custom-loads '())
+(put 'smtpmail 'custom-loads '("smtpmail"))
+(put 'paren-blinking 'custom-loads '())
+(put 'find-file 'custom-loads '())
+(put 'gnuserv 'custom-loads '())
+(put 'maint 'custom-loads '())
+(put 'detached-minibuf 'custom-loads '("detached-minibuf"))
+(put 'fill-comments 'custom-loads '())
+(put 'message-mail 'custom-loads '())
+(put 'windows 'custom-loads '())
+(put 'message-various 'custom-loads '())
+(put 'resize-minibuffer 'custom-loads '())
+(put 'fill 'custom-loads '())
+(put 'edmacro 'custom-loads '("edmacro"))
+(put 'debug 'custom-loads '())
+(put 'display 'custom-loads '())
+(put 'faces 'custom-loads '("highlight-headers"))
+(put 'passwd 'custom-loads '("passwd"))
+(put 'diary 'custom-loads '())
+(put 'browse-url 'custom-loads '("browse-url"))
+(put 'processes 'custom-loads '("passwd"))
+(put 'news 'custom-loads '("highlight-headers"))
+(put 'highlight-headers 'custom-loads '("highlight-headers"))
+(put 'message-insertion 'custom-loads '())
+(put 'hyper-apropos 'custom-loads '())
+(put 'savehist 'custom-loads '("savehist"))
+(put 'vc 'custom-loads '())
+(put 'alloc 'custom-loads '())
+(put 'isearch 'custom-loads '())
+(put 'ph 'custom-loads '("ph"))
+(put 'modeline 'custom-loads '())
+(put 'processes-basics 'custom-loads '())
+(put 'editing 'custom-loads '())
+(put 'matching 'custom-loads '())
+(put 'ps-print-color 'custom-loads '())
+(put 'undo 'custom-loads '())
+(put 'x 'custom-loads '())
diff -r 4de2936b4e77 -r 0132846995bd lisp/utils/edmacro.el
--- a/lisp/utils/edmacro.el	Mon Aug 13 09:42:28 2007 +0200
+++ b/lisp/utils/edmacro.el	Mon Aug 13 09:43:35 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.15
+;; Version: 3.16
 ;; Keywords: abbrev
 
 ;; This file is part of XEmacs.
@@ -538,6 +538,12 @@
 	      (if (/= (length word) 2)
 		  (error "^ must be followed by one character"))
 	      `((control ,(aref word 1))))
+	     ((string-match "^M--?[0-9]+$" word)
+	      ;; Special case: M- followed by an optional hyphen and
+	      ;; one or more digits
+	      (mapcar (lambda (digit)
+			(list 'meta digit))
+		      (substring word 2)))
 	     ((string-match "^\\([MCSsAH]\\|Sh\\)-" word)
 	      ;; Parse C-* and stuff
 	      (list
diff -r 4de2936b4e77 -r 0132846995bd lisp/utils/hippie-exp.el
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lisp/utils/hippie-exp.el	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,1129 @@
+;;; hippie-exp.el --- expand text trying various ways to find its expansion.
+
+;; Copyright (C) 1992 Free Software Foundation, Inc.
+
+;; Author: Anders Holst <aho@sans.kth.se>
+;; Last change: 6 August 1995
+;; Version: 1.4
+;; Keywords: abbrev
+
+;; This file is part of GNU Emacs.
+
+;; 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
+;; 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.
+
+;; 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.
+
+;;; Synched up with: Emacs/Mule zeta
+
+;;; Commentary:
+
+;;  `hippie-expand' is a single function for a lot of different kinds
+;;  of completions and expansions.  Called repeatedly it tries all
+;;  possible completions in succession. 
+;;  Which kinds of completions to try, and in which order, is
+;;  determined by the contents of `hippie-expand-try-functions-list'.
+;;  Much customization of `hippie-expand' can be made by changing the
+;;  order of, removing, or inserting new functions in this list.
+;;  Given a positive numeric argument, `hippie-expand' jumps directly
+;;  ARG functions forward in this list.  Given some other argument
+;;  (a negative argument or just Ctrl-U) it undoes the tried
+;;  completion.
+;;
+;;  If the variable `hippie-expand-verbose' is non-nil, `hippie-expand'
+;;  outputs in a message which try-function in the list that is used
+;;  currently (ie. was used currently and will be tried first the next
+;;  time).
+;;  The variable `hippie-expand-max-buffers' determines in how many
+;;  buffers, apart from the current, to search for expansions in.  It
+;;  is used by the try-functions named "-all-buffers".
+;;  The variable `hippie-expand-ignore-buffers' is a list of regexps
+;;  matching buffer names (as strings) or major modes (as atoms) of
+;;  buffers that should not be searched by the try-functions named
+;;  "-all-buffers".
+;;  See also the macro `make-hippie-expand-function' below.
+;;  
+;;  A short description of the current try-functions in this file:
+;;    `try-complete-file-name' : very convenient to have in any buffer,
+;;      and not just in the minibuffer or (some) shell-mode.  It goes
+;;      through all possible completions instead of just completing as
+;;      much as is unique.
+;;    `try-complete-file-name-partially' : To insert in the list just
+;;      before `try-complete-file-name' for those who want first to get
+;;      a file name completed only as many characters as is unique.
+;;    `try-expand-all-abbrevs' : can be removed if you don't use abbrevs.
+;;      Otherwise it looks through all abbrev-tables, starting with
+;;      the local followed by the global. 
+;;    `try-expand-line' : Searches the buffer for an entire line that 
+;;      begins exactly as the current line.  Convenient sometimes, for 
+;;      example as a substitute for (or complement to) the history
+;;      list in shell-like buffers.  At other times, only confusing.
+;;    `try-expand-line-all-buffers' : Like `try-expand-line' but searches
+;;      in all buffers (except the current).  (This may be a little
+;;      slow, don't use it unless you are really fond of `hippie-expand'.)
+;;    `try-expand-list' : Tries to expand the text back to the nearest
+;;      open delimiter, to a whole list from the buffer. Convenient for
+;;      example when writing lisp or TeX.
+;;    `try-expand-list-all-buffers' : Like `try-expand-list' but searches 
+;;      in all buffers (except the current).  
+;;    `try-expand-dabbrev' : works exactly as dabbrev-expand (but of
+;;      course in a way compatible with the other try-functions).
+;;    `try-expand-dabbrev-all-buffers' : perhaps the most useful of them,
+;;      like `dabbrev-expand' but searches all Emacs buffers (except the
+;;      current) for matching words.  (No, I don't find this one
+;;      particularly slow.) 
+;;    `try-expand-dabbrev-visible': Searches the currently visible parts of
+;;      all windows.  Can be put before `try-expand-dabbrev-all-buffers' to
+;;      first try the expansions you can see.
+;;    `try-expand-dabbrev-from-kill': Searches the kill ring for a suitable
+;;      completion of the word.  Good to have, just in case the word was not
+;;      found elsewhere.
+;;    `try-expand-whole-kill' : Tries to complete text with a whole entry
+;;      from the kill ring.  May be good if you don't know how far up in
+;;      the kill-ring the required entry is, and don't want to mess with
+;;      "Choose Next Paste".
+;;    `try-complete-lisp-symbol' : like `lisp-complete-symbol', but goes
+;;      through all possibilities instead of completing what is unique.
+;;      Might be tedious (usually a lot of possible completions) and
+;;      since its function is much like `lisp-complete-symbol', which
+;;      already has a key of its own, you might want to remove this.
+;;    `try-complete-lisp-symbol-partially' : To insert in the list just
+;;      before `try-complete-lisp-symbol' for those who first want to get
+;;      completion of what is unique in the name.  
+;;
+;;  Not all of the above functions are by default in
+;;  `hippie-expand-try-functions-list'.  This variable is better set
+;;  in ".emacs" to make `hippie-expand' behave maximally convenient
+;;  according to personal taste.  Also, instead of loading the
+;;  variable with all kinds of try-functions above, it might be an
+;;  idea to use `make-hippie-expand-function' to construct different
+;;  `hippie-expand'-like functions, with different try-lists and bound
+;;  to different keys. It is also possible to make
+;;  `hippie-expand-try-functions-list' a buffer local variable, and
+;;  let it depend on the mode (by setting it in the mode-hooks).
+;;
+;;  To write new try-functions, consider the following:
+;;  Each try-function takes one argument OLD which is nil the first
+;;  time the function is called and true in succeeding calls for the
+;;  same string to complete.  The first time the function has to
+;;  extract the string before point to complete, and substitute the
+;;  first completion alternative for it.  On following calls it has to
+;;  substitute the next possible completion for the last tried string.
+;;  The try-function is to return t as long as it finds new
+;;  possible completions.  When there are no more alternatives it has
+;;  to restore the text before point to its original contents, and
+;;  return nil (don't beep or message or anything).
+;;  The try-function can (should) use the following functions:
+;;    `he-init-string' : Initializes the text to substitute to the
+;;      contents of the region BEGIN to END.  Also sets the variable
+;;      `he-search-string' to the text to expand.
+;;    `he-substitute-string' : substitutes STR into the region
+;;      initialized with `he-init-string'.  (An optional second argument
+;;      TRANS-CASE non-nil, means transfer of case from the abbreviation
+;;      to the expansion is ok if that is enabled in the buffer.)
+;;    `he-reset-string' : Resets the initialized region to its original
+;;      contents.
+;;  There is also a variable: `he-tried-table' which is meant to contain
+;;  all tried expansions so far.  The try-function can check this 
+;;  variable to see whether an expansion has already been tried
+;;  (hint: `he-string-member').
+;;
+;;  Known bugs
+;;
+;;  It may happen that some completion suggestion occurs twice, in
+;;  spite of the use of `he-tried-table' to prevent that.  This is 
+;;  because different try-functions may try to complete different
+;;  lengths of text, and thus put different amounts of the
+;;  text in `he-tried-table'.  Anyway this seems to occur seldom enough
+;;  not to be too disturbing.  Also it should NOT be possible for the
+;;  opposite situation to occur, that `hippie-expand' misses some
+;;  suggestion because it thinks it has already tried it.
+;;
+;;  Acknowledgement
+;;
+;;  I want to thank Mikael Djurfeldt in discussions with whom the idea
+;;  of this function took form.
+;;  I am also grateful to all those who have given me suggestions on
+;;  how to improve it, and all those who helped to find and remove bugs.
+;;
+
+;;; Code:
+
+(defvar he-num -1)
+
+(defvar he-string-beg (make-marker))
+
+(defvar he-string-end (make-marker))
+
+(defvar he-search-string ())
+
+(defvar he-expand-list ())
+
+(defvar he-tried-table ())
+
+(defvar he-search-loc (make-marker))
+
+(defvar he-search-loc2 ())
+
+(defvar he-search-bw ())
+
+(defvar he-search-bufs ())
+
+(defvar he-searched-n-bufs ())
+
+(defvar he-search-window ())
+
+;;;###autoload
+(defvar hippie-expand-try-functions-list '(try-complete-file-name-partially
+					   try-complete-file-name
+					   try-expand-all-abbrevs
+					   try-expand-list
+					   try-expand-line
+					   try-expand-dabbrev
+					   try-expand-dabbrev-all-buffers
+					   try-expand-dabbrev-from-kill
+					   try-complete-lisp-symbol-partially
+					   try-complete-lisp-symbol)
+  "The list of expansion functions tried in order by `hippie-expand'.
+To change the behavior of `hippie-expand', remove, change the order of,
+or insert functions in this list.")
+
+;;;###autoload
+(defvar hippie-expand-verbose t
+  "*Non-nil makes `hippie-expand' output which function it is trying.")
+
+;;;###autoload
+(defvar hippie-expand-max-buffers ()
+  "*The maximum number of buffers (apart from the current) searched.
+If nil, all buffers are searched.")
+
+;;;###autoload
+(defvar hippie-expand-ignore-buffers '("^ \\*.*\\*$" dired-mode)
+  "*A list specifying which buffers not to search (if not current).
+Can contain both regexps matching buffer names (as strings) and major modes
+\(as atoms)")
+
+;;;###autoload
+(defun hippie-expand (arg)
+  "Try to expand text before point, using multiple methods.
+The expansion functions in `hippie-expand-try-functions-list' are
+tried in order, until a possible expansion is found.  Repeated
+application of `hippie-expand' inserts successively possible
+expansions.  
+With a positive numeric argument, jumps directly to the ARG next
+function in this list.  With a negative argument or just \\[universal-argument], 
+undoes the expansion." 
+  (interactive "P")
+  (if (or (not arg) 
+	  (and (integerp arg) (> arg 0)))
+      (let ((first (or (= he-num -1)
+		       (not (equal this-command last-command)))))
+	(if first
+	    (progn
+	      (setq he-num -1)
+	      (setq he-tried-table nil)))
+	(if arg
+	    (if (not first) (he-reset-string))
+	    (setq arg 0))
+	(let ((i (max (+ he-num arg) 0)))
+	  (while (not (or (>= i (length hippie-expand-try-functions-list))
+			  (apply (nth i hippie-expand-try-functions-list) 
+				 (list (= he-num i)))))
+	    (setq i (1+ i)))
+	  (setq he-num i))
+	(if (>= he-num (length hippie-expand-try-functions-list))
+	    (progn
+	      (setq he-num -1)
+	      (if first
+		  (message "No expansion found")
+		  (message "No further expansions found"))
+	      (ding))
+	    (if (and hippie-expand-verbose
+		     (not (window-minibuffer-p (selected-window))))
+		(message "Using %s"
+			 (prin1-to-string (nth he-num 
+				   hippie-expand-try-functions-list))))))
+      (if (and (>= he-num 0)
+	       (eq (marker-buffer he-string-beg) (current-buffer)))
+	  (progn
+	    (setq he-num -1)
+	    (he-reset-string)
+	    (if (and hippie-expand-verbose
+		     (not (window-minibuffer-p (selected-window))))
+		(message "Undoing expansions"))))))
+
+;; Initializes the region to expand (to between BEG and END).
+(defun he-init-string (beg end)
+  (set-marker he-string-beg beg)
+  (set-marker he-string-end end)
+  (setq he-search-string (buffer-substring beg end)))
+
+;; Resets the expanded region to its original contents.
+(defun he-reset-string ()
+  (let ((newpos (point-marker)))
+    (goto-char he-string-beg)
+    (insert he-search-string)
+    (delete-region (point) he-string-end)
+    (goto-char newpos)))
+
+;; Substitutes an expansion STR into the correct region (the region
+;; initialized with `he-init-string'). 
+;; An optional argument TRANS-CASE means that it is ok to transfer case
+;; from the abbreviation to the expansion if that is possible, and is
+;; enabled in the buffer.
+(defun he-substitute-string (str &optional trans-case)
+  (let ((trans-case (and trans-case
+			 case-replace
+			 case-fold-search))
+	(newpos (point-marker))
+	(subst ()))
+    (goto-char he-string-beg)
+    (setq subst (if trans-case (he-transfer-case he-search-string str) str))
+    (setq he-tried-table (cons subst he-tried-table))
+    (insert subst)
+    (delete-region (point) he-string-end)
+    (goto-char newpos)))
+
+(defun he-capitalize-first (str)
+  (save-match-data
+    (if (string-match "\\Sw*\\(\\sw\\).*" str)
+	(let ((res (downcase str))
+	      (no (match-beginning 1)))
+	  (aset res no (upcase (aref str no)))
+	  res)
+      str)))
+
+(defun he-ordinary-case-p (str)
+  (or (string= str (downcase str))
+      (string= str (upcase str))
+      (string= str (capitalize str))
+      (string= str (he-capitalize-first str))))
+
+(defun he-transfer-case (from-str to-str)
+  (cond ((string= from-str (substring to-str 0 (min (length from-str)
+						    (length to-str))))
+	 to-str)
+	((not (he-ordinary-case-p to-str))
+	 to-str)
+	((string= from-str (downcase from-str))
+	 (downcase to-str))
+	((string= from-str (upcase from-str))
+	 (upcase to-str))
+	((string= from-str (he-capitalize-first from-str))
+	 (he-capitalize-first to-str))
+	((string= from-str (capitalize from-str))
+	 (capitalize to-str))
+	(t
+	 to-str)))
+
+
+;; Check if STR is a member of LST.
+;; Transform to the final case if optional TRANS-CASE is non-NIL.
+(defun he-string-member (str lst &optional trans-case)
+  (if str
+      (member (if (and trans-case
+		       case-replace
+		       case-fold-search)
+		  (he-transfer-case he-search-string str)
+		str)
+	      lst)))
+
+;; Check if STR matches any regexp in LST.
+;; Ignore possible non-strings in LST.
+(defun he-regexp-member (str lst)
+  (while (and lst
+	      (or (not (stringp (car lst)))
+		  (not (string-match (car lst) str))))
+    (setq lst (cdr lst)))
+  lst)
+
+;;  For the real hippie-expand enthusiast: A macro that makes it
+;;  possible to use many functions like hippie-expand, but with
+;;  different try-functions-lists.
+;;  Usage is for example:
+;;    (fset 'my-complete-file (make-hippie-expand-function
+;;                             '(try-complete-file-name-partially
+;;                               try-complete-file-name)))
+;;    (fset 'my-complete-line (make-hippie-expand-function
+;;                             '(try-expand-line
+;;                               try-expand-line-all-buffers)))
+;;  
+;;;###autoload
+(defmacro make-hippie-expand-function (try-list &optional verbose)
+  "Construct a function similar to `hippie-expand'.
+Make it use the expansion functions in TRY-LIST.  An optional second
+argument VERBOSE non-nil makes the function verbose."
+  (` (function (lambda (arg)
+       (, (concat 
+	   "Try to expand text before point, using the following functions: \n"
+	   (mapconcat 'prin1-to-string (eval try-list) ", ")))
+       (interactive "P")
+       (let ((hippie-expand-try-functions-list (, try-list))
+	     (hippie-expand-verbose (, verbose)))
+	 (hippie-expand arg))))))
+
+
+;;;  Here follows the try-functions and their requisites:
+
+
+(defun try-complete-file-name (old)
+  "Try to complete text as a file name.
+The argument OLD has to be nil the first call of this function, and t
+for subsequent calls (for further possible completions of the same
+string).  It returns t if a new completion is found, nil otherwise."
+  (if (not old)
+      (progn 
+	(he-init-string (he-file-name-beg) (point))
+	(let ((name-part (he-file-name-nondirectory he-search-string))
+	      (dir-part (expand-file-name (or (he-file-name-directory
+					       he-search-string) ""))))
+	  (if (not (he-string-member name-part he-tried-table))
+	      (setq he-tried-table (cons name-part he-tried-table)))
+	  (if (and (not (equal he-search-string ""))
+		   (he-file-directory-p dir-part))
+	      (setq he-expand-list (sort (file-name-all-completions 
+					  name-part
+					  dir-part)
+					 'string-lessp))
+	      (setq he-expand-list ())))))
+
+  (while (and he-expand-list
+	      (he-string-member (car he-expand-list) he-tried-table))
+    (setq he-expand-list (cdr he-expand-list)))
+  (if (null he-expand-list)
+      (progn
+	(if old (he-reset-string))
+	())
+      (let ((filename (he-concat-directory-file-name
+		       (he-file-name-directory he-search-string)
+		       (car he-expand-list))))
+	(he-substitute-string filename)
+	(setq he-tried-table (cons (car he-expand-list) (cdr he-tried-table)))
+	(setq he-expand-list (cdr he-expand-list))
+	t)))
+
+(defun try-complete-file-name-partially (old)
+  "Try to complete text as a file name, as many characters as unique.
+The argument OLD has to be nil the first call of this function.  It
+returns t if a unique, possibly partial, completion is found, nil 
+otherwise."
+  (let ((expansion ()))
+    (if (not old)
+	(progn 
+	  (he-init-string (he-file-name-beg) (point))
+	  (let ((name-part (he-file-name-nondirectory he-search-string))
+		(dir-part (expand-file-name (or (he-file-name-directory
+						 he-search-string) ""))))
+	    (if (and (not (equal he-search-string ""))
+		     (he-file-directory-p dir-part))
+		(setq expansion (file-name-completion name-part
+						      dir-part)))
+	    (if (or (eq expansion t)
+		    (string= expansion name-part)
+		    (he-string-member expansion he-tried-table))
+		(setq expansion ())))))
+
+    (if (not expansion)
+	(progn
+	  (if old (he-reset-string))
+	  ())
+	(let ((filename (he-concat-directory-file-name
+			 (he-file-name-directory he-search-string)
+			 expansion)))
+	  (he-substitute-string filename)
+	  (setq he-tried-table (cons expansion (cdr he-tried-table)))
+	  t))))
+
+(defvar he-file-name-chars
+  (cond ((memq system-type '(vax-vms axp-vms))
+	 "-a-zA-Z0-9_/.,~^#$+=:\\[\\]")
+	((memq system-type '(ms-dos windows-nt))
+	 "-a-zA-Z0-9_/.,~^#$+=:\\\\")
+	(t			    ;; More strange file formats ?
+	 "-a-zA-Z0-9_/.,~^#$+="))
+  "Characters that are considered part of the file name to expand.")
+
+(defun he-file-name-beg ()
+  (save-excursion
+    (skip-chars-backward he-file-name-chars)
+    (point)))
+
+;; Thanks go to Richard Levitte <levitte@e.kth.se> who helped to make these
+;; work under VMS, and to David Hughes <ukchugd@ukpmr.cs.philips.nl> who 
+;; helped to make it work on PC.
+(defun he-file-name-nondirectory (file)
+  "Fix to make `file-name-nondirectory' work for hippie-expand under VMS."
+  (if (memq system-type '(axp-vms vax-vms))
+      (let ((n (file-name-nondirectory file)))
+	(if (string-match "^\\(\\[.*\\)\\.\\([^\\.]*\\)$" n)
+	    (concat "[." (substring n (match-beginning 2) (match-end 2)))
+	  n))
+    (file-name-nondirectory file)))
+
+(defun he-file-name-directory (file)
+  "Fix to make `file-name-directory' work for hippie-expand under VMS."
+  (if (memq system-type '(axp-vms vax-vms))
+      (let ((n (file-name-nondirectory file))
+	    (d (file-name-directory file)))
+	(if (string-match "^\\(\\[.*\\)\\.\\([^\\.]*\\)$" n)
+	    (concat d (substring n (match-beginning 1) (match-end 1)) "]")
+	  d))
+    (file-name-directory file)))
+
+(defun he-file-directory-p (file)
+  "Fix to make `file-directory-p' work for hippie-expand under VMS."
+  (if (memq system-type '(vax-vms axp-vms))
+      (or (file-directory-p file)
+	  (file-directory-p (concat file "[000000]")))
+    (file-directory-p file)))
+  
+(defun he-concat-directory-file-name (dir-part name-part)
+  "Try to slam together two parts of a file specification, system dependently."
+  (cond ((null dir-part) name-part)
+	((memq system-type '(axp-vms vax-vms))
+	 (if (and (string= (substring dir-part -1) "]")
+		  (string= (substring name-part 0 2) "[."))
+	     (concat (substring dir-part 0 -1) (substring name-part 1))
+	   (concat dir-part name-part)))
+	((memq system-type '(ms-dos w32))
+	 (if (and (string-match "\\\\" dir-part)
+		  (not (string-match "/" dir-part))
+		  (= (aref name-part (1- (length name-part))) ?/))
+	     (aset name-part (1- (length name-part)) ?\\))
+	 (concat dir-part name-part))
+	(t 
+	 (concat dir-part name-part))))
+			
+(defun try-complete-lisp-symbol (old)
+  "Try to complete word as an Emacs Lisp symbol.
+The argument OLD has to be nil the first call of this function, and t
+for subsequent calls (for further possible completions of the same
+string).  It returns t if a new completion is found, nil otherwise."
+  (if (not old)
+      (progn 
+	(he-init-string (he-lisp-symbol-beg) (point))
+	(if (not (he-string-member he-search-string he-tried-table))
+	    (setq he-tried-table (cons he-search-string he-tried-table)))
+	(setq he-expand-list 
+	      (and (not (equal he-search-string ""))
+		   (sort (all-completions he-search-string obarray
+					  (function (lambda (sym)
+					    (or (boundp sym)
+						(fboundp sym)
+						(symbol-plist sym)))))
+			 'string-lessp)))))
+  (while (and he-expand-list
+	      (he-string-member (car he-expand-list) he-tried-table))
+    (setq he-expand-list (cdr he-expand-list)))
+  (if (null he-expand-list)
+      (progn
+	(if old (he-reset-string))
+	())
+      (progn
+	(he-substitute-string (car he-expand-list))
+	(setq he-expand-list (cdr he-expand-list))
+	t)))
+
+(defun try-complete-lisp-symbol-partially (old)
+  "Try to complete as an Emacs Lisp symbol, as many characters as unique.
+The argument OLD has to be nil the first call of this function.  It
+returns t if a unique, possibly partial, completion is found, nil 
+otherwise."
+  (let ((expansion ()))
+    (if (not old)
+	(progn 
+	  (he-init-string (he-lisp-symbol-beg) (point))
+	  (if (not (string= he-search-string ""))
+	      (setq expansion 
+		    (try-completion he-search-string obarray
+				    (function (lambda (sym)
+				      (or (boundp sym)
+					  (fboundp sym)
+					  (symbol-plist sym)))))))
+	  (if (or (eq expansion t)
+		  (string= expansion he-search-string)
+		  (he-string-member expansion he-tried-table))
+	      (setq expansion ()))))
+
+  (if (not expansion)
+      (progn
+	(if old (he-reset-string))
+	())
+      (progn
+	(he-substitute-string expansion)
+	t))))
+
+(defun he-lisp-symbol-beg ()
+  (let ((skips "-a-zA-Z0-9_."))
+    (save-excursion
+      (skip-chars-backward skips)
+      (point))))
+
+(defun try-expand-line (old)
+  "Try to complete the current line to an entire line in the buffer.
+The argument OLD has to be nil the first call of this function, and t
+for subsequent calls (for further possible completions of the same
+string).  It returns t if a new completion is found, nil otherwise."
+  (let ((expansion ())
+	(strip-prompt (and (get-buffer-process (current-buffer))
+			   comint-prompt-regexp)))
+    (if (not old)
+	(progn
+	  (he-init-string (he-line-beg strip-prompt) (point))
+	  (set-marker he-search-loc he-string-beg)
+	  (setq he-search-bw t)))
+
+    (if (not (equal he-search-string ""))
+	(save-excursion
+	  ;; Try looking backward unless inhibited.
+	  (if he-search-bw
+	      (progn 
+		(goto-char he-search-loc)
+		(setq expansion (he-line-search he-search-string
+						strip-prompt t))
+		(set-marker he-search-loc (point))
+		(if (not expansion)
+		    (progn
+		      (set-marker he-search-loc he-string-end)
+		      (setq he-search-bw ())))))
+	  
+	  (if (not expansion) ; Then look forward.
+	      (progn 
+		(goto-char he-search-loc)
+		(setq expansion (he-line-search he-search-string 
+						strip-prompt nil))
+		(set-marker he-search-loc (point))))))
+
+    (if (not expansion)
+	(progn
+	  (if old (he-reset-string))
+	  ())
+	(progn
+	  (he-substitute-string expansion t)
+	  t))))
+
+(defun try-expand-line-all-buffers (old)
+  "Try to complete the current line, searching all other buffers.
+The argument OLD has to be nil the first call of this function, and t
+for subsequent calls (for further possible completions of the same
+string).  It returns t if a new completion is found, nil otherwise."
+  (let ((expansion ())
+	(strip-prompt (and (get-buffer-process (current-buffer))
+			   comint-prompt-regexp))
+	(buf (current-buffer))
+	(orig-case-fold-search case-fold-search))
+    (if (not old)
+	(progn
+	  (he-init-string (he-line-beg strip-prompt) (point))
+	  (setq he-search-bufs (buffer-list))
+	  (setq he-searched-n-bufs 0)
+	  (set-marker he-search-loc 1 (car he-search-bufs))))
+
+    (if (not (equal he-search-string ""))
+	(while (and he-search-bufs 
+		    (not expansion)
+		    (or (not hippie-expand-max-buffers)
+			(< he-searched-n-bufs hippie-expand-max-buffers)))
+	  (set-buffer (car he-search-bufs))
+	  (if (and (not (eq (current-buffer) buf))
+		   (not (memq major-mode hippie-expand-ignore-buffers))
+		   (not (he-regexp-member (buffer-name)
+					  hippie-expand-ignore-buffers)))
+	      (save-excursion
+		(goto-char he-search-loc)
+		(setq strip-prompt (and (get-buffer-process (current-buffer))
+					comint-prompt-regexp))
+		(setq expansion (let ((case-fold-search orig-case-fold-search))
+				  (he-line-search he-search-string
+						  strip-prompt nil)))
+		(set-marker he-search-loc (point))
+		(if (not expansion)
+		    (progn
+		      (setq he-search-bufs (cdr he-search-bufs))
+		      (setq he-searched-n-bufs (1+ he-searched-n-bufs))
+		      (set-marker he-search-loc 1 (car he-search-bufs)))))
+	    (setq he-search-bufs (cdr he-search-bufs))
+	    (set-marker he-search-loc 1 (car he-search-bufs)))))
+
+    (set-buffer buf)
+    (if (not expansion)
+	(progn
+	  (if old (he-reset-string))
+	  ())
+	(progn
+	  (he-substitute-string expansion t)
+	  t))))
+
+(defun he-line-search (str strip-prompt reverse) 
+  (let ((result ()))
+    (while (and (not result)
+		(if reverse
+		    (re-search-backward 
+		     (he-line-search-regexp str strip-prompt)
+		     nil t)
+		    (re-search-forward
+		     (he-line-search-regexp str strip-prompt)
+		     nil t)))
+      (setq result (buffer-substring (match-beginning 2) (match-end 2)))
+      (if (he-string-member result he-tried-table t)
+	  (setq result nil)))		    ; if already in table, ignore
+    result))
+
+(defun he-line-beg (strip-prompt)
+  (save-excursion
+    (if (re-search-backward (he-line-search-regexp "" strip-prompt) 
+			    (save-excursion (beginning-of-line)
+					    (point)) t)
+	(match-beginning 2)
+      (point))))
+
+(defun he-line-search-regexp (pat strip-prompt)
+  (if strip-prompt
+      (concat "\\(" comint-prompt-regexp "\\|^\\s-*\\)\\("
+	      (regexp-quote pat)
+	      "[^\n]*[^ \t\n]\\)")
+      (concat "^\\(\\s-*\\)\\(" 
+	      (regexp-quote pat)
+	      "[^\n]*[^ \t\n]\\)")))
+
+(defun try-expand-list (old)
+  "Try to complete the current beginning of a list.
+The argument OLD has to be nil the first call of this function, and t
+for subsequent calls (for further possible completions of the same
+string).  It returns t if a new completion is found, nil otherwise."
+  (let ((expansion ()))
+    (if (not old)
+	(progn
+	  (he-init-string (he-list-beg) (point))
+	  (set-marker he-search-loc he-string-beg)
+	  (setq he-search-bw t)))
+
+    (if (not (equal he-search-string ""))
+	(save-excursion
+	  ;; Try looking backward unless inhibited.
+	  (if he-search-bw
+	      (progn 
+		(goto-char he-search-loc)
+		(setq expansion (he-list-search he-search-string t))
+		(set-marker he-search-loc (point))
+		(if (not expansion)
+		    (progn
+		      (set-marker he-search-loc he-string-end)
+		      (setq he-search-bw ())))))
+	  
+	  (if (not expansion) ; Then look forward.
+	      (progn 
+		(goto-char he-search-loc)
+		(setq expansion (he-list-search he-search-string nil))
+		(set-marker he-search-loc (point))))))
+
+    (if (not expansion)
+	(progn
+	  (if old (he-reset-string))
+	  ())
+	(progn
+	  (he-substitute-string expansion t)
+	  t))))
+
+(defun try-expand-list-all-buffers (old)
+  "Try to complete the current list, searching all other buffers.
+The argument OLD has to be nil the first call of this function, and t
+for subsequent calls (for further possible completions of the same
+string).  It returns t if a new completion is found, nil otherwise."
+  (let ((expansion ())
+	(buf (current-buffer))
+	(orig-case-fold-search case-fold-search))
+    (if (not old)
+	(progn
+	  (he-init-string (he-list-beg) (point))
+	  (setq he-search-bufs (buffer-list))
+	  (setq he-searched-n-bufs 0)
+	  (set-marker he-search-loc 1 (car he-search-bufs))))
+
+    (if (not (equal he-search-string ""))
+	(while (and he-search-bufs 
+		    (not expansion)
+		    (or (not hippie-expand-max-buffers)
+			(< he-searched-n-bufs hippie-expand-max-buffers)))
+	  (set-buffer (car he-search-bufs))
+	  (if (and (not (eq (current-buffer) buf))
+		   (not (memq major-mode hippie-expand-ignore-buffers))
+		   (not (he-regexp-member (buffer-name)
+					  hippie-expand-ignore-buffers)))
+	      (save-excursion
+		(goto-char he-search-loc)
+		(setq expansion (let ((case-fold-search orig-case-fold-search))
+				  (he-list-search he-search-string nil)))
+		(set-marker he-search-loc (point))
+		(if (not expansion)
+		    (progn
+		      (setq he-search-bufs (cdr he-search-bufs))
+		      (setq he-searched-n-bufs (1+ he-searched-n-bufs))
+		      (set-marker he-search-loc 1 (car he-search-bufs)))))
+	    (setq he-search-bufs (cdr he-search-bufs))
+	    (set-marker he-search-loc 1 (car he-search-bufs)))))
+
+    (set-buffer buf)
+    (if (not expansion)
+	(progn
+	  (if old (he-reset-string))
+	  ())
+	(progn
+	  (he-substitute-string expansion t)
+	  t))))
+
+(defun he-list-search (str reverse) 
+  (let ((result ())
+	beg pos err)
+    (while (and (not result)
+		(if reverse
+		    (search-backward str nil t)
+		    (search-forward str nil t)))
+      (setq pos (point))
+      (setq beg (match-beginning 0))
+      (goto-char beg)
+      (setq err ())
+      (condition-case ()
+	  (forward-list 1)
+	(error (setq err t)))
+      (if (and reverse 
+	       (> (point) he-string-beg))
+	  (setq err t))
+      (if (not err)
+	  (progn
+	    (setq result (buffer-substring beg (point)))
+	    (if (he-string-member result he-tried-table t)
+		(setq result nil))))	       ; if already in table, ignore
+      (goto-char pos))
+    result))
+
+(defun he-list-beg ()
+  (save-excursion
+    (condition-case ()
+	(backward-up-list 1)
+      (error ()))
+    (point)))
+
+(defun try-expand-all-abbrevs (old)
+  "Try to expand word before point according to all abbrev tables.
+The argument OLD has to be nil the first call of this function, and t
+for subsequent calls (for further possible expansions of the same
+string).  It returns t if a new expansion is found, nil otherwise."
+  (if (not old)
+      (progn
+	(he-init-string (he-dabbrev-beg) (point))
+	(setq he-expand-list 
+	      (and (not (equal he-search-string ""))
+		   (mapcar (function (lambda (sym)
+			     (if (and (boundp sym) (vectorp (eval sym)))
+				 (abbrev-expansion (downcase he-search-string)
+						   (eval sym)))))
+			   (append '(local-abbrev-table 
+				     global-abbrev-table)
+				   abbrev-table-name-list))))))
+  (while (and he-expand-list
+	      (or (not (car he-expand-list))
+		  (he-string-member (car he-expand-list) he-tried-table t)))
+    (setq he-expand-list (cdr he-expand-list)))
+  (if (null he-expand-list)
+      (progn
+	(if old (he-reset-string))
+	())
+      (progn
+	(he-substitute-string (car he-expand-list) t)
+	(setq he-expand-list (cdr he-expand-list))
+	t)))
+
+(defun try-expand-dabbrev (old)
+  "Try to expand word \"dynamically\", searching the current buffer.
+The argument OLD has to be nil the first call of this function, and t
+for subsequent calls (for further possible expansions of the same
+string).  It returns t if a new expansion is found, nil otherwise."
+  (let ((expansion ()))
+    (if (not old)
+	(progn
+	  (he-init-string (he-dabbrev-beg) (point))
+	  (set-marker he-search-loc he-string-beg)
+	  (setq he-search-bw t)))
+
+    (if (not (equal he-search-string ""))
+	(save-excursion
+	  ;; Try looking backward unless inhibited.
+	  (if he-search-bw
+	      (progn 
+		(goto-char he-search-loc)
+		(setq expansion (he-dabbrev-search he-search-string t))
+		(set-marker he-search-loc (point))
+		(if (not expansion)
+		    (progn
+		      (set-marker he-search-loc he-string-end)
+		      (setq he-search-bw ())))))
+	  
+	  (if (not expansion) ; Then look forward.
+	      (progn 
+		(goto-char he-search-loc)
+		(setq expansion (he-dabbrev-search he-search-string nil))
+		(set-marker he-search-loc (point))))))
+	
+    (if (not expansion)
+	(progn
+	  (if old (he-reset-string))
+	  ())
+	(progn
+	  (he-substitute-string expansion t)
+	  t))))
+
+(defun try-expand-dabbrev-all-buffers (old)
+  "Tries to expand word \"dynamically\", searching all other buffers.
+The argument OLD has to be nil the first call of this function, and t
+for subsequent calls (for further possible expansions of the same
+string).  It returns t if a new expansion is found, nil otherwise."
+  (let ((expansion ())
+	(buf (current-buffer))
+	(orig-case-fold-search case-fold-search))
+    (if (not old)
+	(progn
+	  (he-init-string (he-dabbrev-beg) (point))
+	  (setq he-search-bufs (buffer-list))
+	  (setq he-searched-n-bufs 0)
+	  (set-marker he-search-loc 1 (car he-search-bufs))))
+
+    (if (not (equal he-search-string ""))
+	(while (and he-search-bufs 
+		    (not expansion)
+		    (or (not hippie-expand-max-buffers)
+			(< he-searched-n-bufs hippie-expand-max-buffers)))
+	  (set-buffer (car he-search-bufs))
+	  (if (and (not (eq (current-buffer) buf))
+		   (not (memq major-mode hippie-expand-ignore-buffers))
+		   (not (he-regexp-member (buffer-name)
+					  hippie-expand-ignore-buffers)))
+	      (save-excursion
+		(goto-char he-search-loc)
+		(setq expansion (let ((case-fold-search orig-case-fold-search))
+				  (he-dabbrev-search he-search-string nil)))
+		(set-marker he-search-loc (point))
+		(if (not expansion)
+		    (progn
+		      (setq he-search-bufs (cdr he-search-bufs))
+		      (setq he-searched-n-bufs (1+ he-searched-n-bufs))
+		      (set-marker he-search-loc 1 (car he-search-bufs)))))
+	    (setq he-search-bufs (cdr he-search-bufs))
+	    (set-marker he-search-loc 1 (car he-search-bufs)))))
+
+    (set-buffer buf)
+    (if (not expansion)
+	(progn
+	  (if old (he-reset-string))
+	  ())
+	(progn
+	  (he-substitute-string expansion t)
+	  t))))
+
+;; Thanks go to Jeff Dairiki <dairiki@faraday.apl.washington.edu> who
+;; suggested this one.
+(defun try-expand-dabbrev-visible (old)
+  "Try to expand word \"dynamically\", searching visible window parts.
+The argument OLD has to be nil the first call of this function, and t
+for subsequent calls (for further possible expansions of the same
+string).  It returns t if a new expansion is found, nil otherwise."
+  (let ((expansion ())
+	(buf (current-buffer))
+	(flag (if (frame-visible-p (window-frame (selected-window)))
+		  'visible t)))
+    (if (not old)
+	(progn
+	   (he-init-string (he-dabbrev-beg) (point))
+	   (setq he-search-window (selected-window))
+	   (set-marker he-search-loc
+		       (window-start he-search-window)
+		       (window-buffer he-search-window))))
+
+    (while (and (not (equal he-search-string ""))
+		(marker-position he-search-loc)
+		(not expansion))
+      (save-excursion
+	(set-buffer (marker-buffer he-search-loc))
+	(goto-char he-search-loc)
+	(setq expansion (he-dabbrev-search he-search-string ()
+					   (window-end he-search-window)))
+	(if (and expansion
+		 (eq (marker-buffer he-string-beg) (current-buffer))
+		 (eq (marker-position he-string-beg) (match-beginning 0)))
+	    (setq expansion (he-dabbrev-search he-search-string ()
+					       (window-end he-search-window))))
+	(set-marker he-search-loc (point) (current-buffer)))
+      (if (not expansion)
+	  (progn 
+	    (setq he-search-window (next-window he-search-window nil flag))
+	    (if (eq he-search-window (selected-window))
+		(set-marker he-search-loc nil)
+	      (set-marker he-search-loc (window-start he-search-window)
+			  (window-buffer he-search-window))))))
+    
+    (set-buffer buf)
+    (if (not expansion)
+	(progn
+	  (if old (he-reset-string))
+	  ())
+	(progn
+	  (he-substitute-string expansion t)
+	  t))))
+
+(defun he-dabbrev-search (pattern &optional reverse limit)
+  (let ((result ())
+	(regpat (if (eq (char-syntax (aref pattern 0)) ?_)
+		    (concat (regexp-quote pattern) "\\(\\sw\\|\\s_\\)+")
+		  (concat "\\<" (regexp-quote pattern) "\\(\\sw\\|\\s_\\)+"))))
+    (while (and (not result) 
+		(if reverse
+		     (re-search-backward regpat limit t)
+		     (re-search-forward regpat limit t)))
+      (setq result (buffer-substring (match-beginning 0) (match-end 0)))
+      (if (or (and (> (match-beginning 0) (point-min))
+		   (memq (char-syntax (char-after (1- (match-beginning 0))))
+			 '(?_ ?w)))
+	      (he-string-member result he-tried-table t))
+	  (setq result nil)))     ; ignore if bad prefix or already in table
+    result))
+
+(defvar he-dabbrev-skip-space ()
+  "Non-NIL means tolerate trailing spaces in the abbreviation to expand.")
+
+(defun he-dabbrev-beg ()
+  (let ((op (point)))
+    (save-excursion
+      (if he-dabbrev-skip-space
+	  (skip-syntax-backward ". "))
+      (if (= (skip-syntax-backward "w_") 0)
+	  op
+	(point)))))
+
+(defun try-expand-dabbrev-from-kill (old)
+  "Try to expand word \"dynamically\", searching the kill ring.
+The argument OLD has to be nil the first call of this function, and t
+for subsequent calls (for further possible completions of the same
+string).  It returns t if a new completion is found, nil otherwise."
+  (let ((expansion ()))
+    (if (not old)
+	(progn 
+	  (he-init-string (he-dabbrev-beg) (point))
+	  (setq he-expand-list
+		(if (not (equal he-search-string ""))
+		    kill-ring))
+	  (setq he-search-loc2 0)))
+    (if (not (equal he-search-string ""))
+	(setq expansion (he-dabbrev-kill-search he-search-string)))
+    (if (not expansion)
+	(progn
+	  (if old (he-reset-string))
+	  ())
+	(progn
+	  (he-substitute-string expansion t)
+	  t))))
+
+(defun he-dabbrev-kill-search (pattern)
+  (let ((result ())
+	(regpat (if (eq (char-syntax (aref pattern 0)) ?_)
+		    (concat (regexp-quote pattern) "\\(\\sw\\|\\s_\\)+")
+		  (concat "\\<" (regexp-quote pattern) "\\(\\sw\\|\\s_\\)+")))
+	(killstr (car he-expand-list)))
+    (while (and (not result) 
+		he-expand-list)
+      (while (and (not result)
+		  (string-match regpat killstr he-search-loc2))
+	(setq result (substring killstr (match-beginning 0) (match-end 0)))
+	(setq he-search-loc2 (1+ (match-beginning 0)))
+	(if (or (and (> (match-beginning 0) 0)
+		     (memq (char-syntax (aref killstr (1- (match-beginning 0))))
+			   '(?_ ?w)))
+		(he-string-member result he-tried-table t))
+	    (setq result nil)))     ; ignore if bad prefix or already in table
+      (if (and (not result) 
+		he-expand-list)
+	  (progn
+	    (setq he-expand-list (cdr he-expand-list)) 
+	    (setq killstr (car he-expand-list))
+	    (setq he-search-loc2 0))))
+    result))
+
+(defun try-expand-whole-kill (old)
+  "Try to complete text with something from the kill ring.
+The argument OLD has to be nil the first call of this function, and t
+for subsequent calls (for further possible completions of the same
+string).  It returns t if a new completion is found, nil otherwise."
+  (let ((expansion ()))
+    (if (not old)
+	(progn 
+	  (he-init-string (he-kill-beg) (point))
+	  (if (not (he-string-member he-search-string he-tried-table))
+	      (setq he-tried-table (cons he-search-string he-tried-table)))
+	  (setq he-expand-list 
+		(if (not (equal he-search-string ""))
+		    kill-ring))
+	  (setq he-search-loc2 ())))
+    (if (not (equal he-search-string ""))
+	(setq expansion (he-whole-kill-search he-search-string)))
+    (if (not expansion)
+	(progn
+	  (if old (he-reset-string))
+	  ())
+	(progn
+	  (he-substitute-string expansion)
+	  t))))
+
+(defun he-whole-kill-search (str)
+  (let ((case-fold-search ())
+	(result ())
+	(str (regexp-quote str))
+	(killstr (car he-expand-list))
+	(pos -1))
+    (while (and (not result)
+		he-expand-list)
+      (if (not he-search-loc2)
+	  (while (setq pos (string-match str killstr (1+ pos)))
+	    (setq he-search-loc2 (cons pos he-search-loc2))))
+      (while (and (not result)
+		  he-search-loc2)
+	(setq pos (car he-search-loc2))
+	(setq he-search-loc2 (cdr he-search-loc2))
+	(save-excursion
+	  (goto-char he-string-beg)
+	  (if (and (>= (- (point) pos) (point-min))   ; avoid some string GC
+		   (eq (char-after (- (point) pos)) (aref killstr 0))
+		   (search-backward (substring killstr 0 pos)
+				    (- (point) pos) t))
+	      (setq result (substring killstr pos))))
+	(if (and result
+		 (he-string-member result he-tried-table))
+	    (setq result nil)))     ; ignore if already in table
+      (if (and (not result)
+		he-expand-list)
+	  (progn
+	    (setq he-expand-list (cdr he-expand-list)) 
+	    (setq killstr (car he-expand-list))
+	    (setq pos -1))))
+    result))
+
+(defun he-kill-beg ()
+  (let ((op (point)))
+    (save-excursion
+      (skip-syntax-backward "^w_")
+      (if (= (skip-syntax-backward "w_") 0)
+	  op
+	(point)))))
+
+
+(provide 'hippie-exp)
+
+;;; hippie-exp.el ends here
diff -r 4de2936b4e77 -r 0132846995bd lisp/version.el
--- a/lisp/version.el	Mon Aug 13 09:42:28 2007 +0200
+++ b/lisp/version.el	Mon Aug 13 09:43:35 2007 +0200
@@ -22,40 +22,53 @@
 
 ;;; Code:
 
-(defconst emacs-version "20.3"
-  "Version numbers of this version of XEmacs.")
+;;(defconst emacs-version "20.3"
+;;  "Version numbers of this version of XEmacs.")
+
+;;(defconst xemacs-codename "Copenhagen"
+;;  "Release nickname, primarily useful for trial prereleases.
+;;Warning, this variable did not exist in XEmacs versions prior to 20.3")
 
-(defconst xemacs-codename "Oslo"
-  "Release nickname, primarily useful for trial prereleases.
-Warning, this variable did not exist in XEmacs versions prior to 20.3")
+;;(defconst xemacs-betaname "(beta8)"
+;;  "Non-nil when this is a test (beta) version of XEmacs.
+;;Warning, this variable did not exist in XEmacs versions prior to 20.3")
 
-(defconst xemacs-betaname "(beta7)"
+(defconst xemacs-betaname
+  (and emacs-beta-version (format "(beta%d)" emacs-beta-version))
   "Non-nil when this is a test (beta) version of XEmacs.
 Warning, this variable did not exist in XEmacs versions prior to 20.3")
 
-(setq emacs-version (purecopy (concat emacs-version
-				      " \""
-				      xemacs-codename
-				      "\" XEmacs Lucid "
-				      xemacs-betaname)))
+(defconst emacs-version
+  (purecopy
+   (format "%d.%d \"%s\"%s%s"
+	   emacs-major-version
+	   emacs-minor-version
+	   xemacs-codename
+	   " XEmacs Lucid"
+	   (if xemacs-betaname
+	       (concat " " xemacs-betaname)
+	     "")))
+  "Version numbers of this version of XEmacs.")
 
-(defconst emacs-major-version
-  (progn (or (string-match "^[0-9]+" emacs-version)
-	     (error "emacs-version unparsable"))
-         (string-to-int (match-string 0 emacs-version)))
-  "Major version number of this version of Emacs, as an integer.
-Warning, this variable did not exist in Emacs versions earlier than:
-  FSF Emacs:   19.23
-  XEmacs:      19.10")
+;; Moved to C code as of XEmacs 20.3
+;(defconst emacs-major-version
+;  (progn (or (string-match "^[0-9]+" emacs-version)
+;	     (error "emacs-version unparsable"))
+;         (string-to-int (match-string 0 emacs-version)))
+;  "Major version number of this version of Emacs, as an integer.
+;Warning, this variable did not exist in Emacs versions earlier than:
+;  FSF Emacs:   19.23
+;  XEmacs:      19.10")
 
-(defconst emacs-minor-version
-  (progn (or (string-match "^[0-9]+\\.\\([0-9]+\\)" emacs-version)
-	     (error "emacs-version unparsable"))
-         (string-to-int (match-string 1 emacs-version)))
-  "Minor version number of this version of Emacs, as an integer.
-Warning, this variable did not exist in Emacs versions earlier than:
-  FSF Emacs:   19.23
-  XEmacs:      19.10")
+;; Moved to C code as of XEmacs 20.3
+;(defconst emacs-minor-version
+;  (progn (or (string-match "^[0-9]+\\.\\([0-9]+\\)" emacs-version)
+;	     (error "emacs-version unparsable"))
+;         (string-to-int (match-string 1 emacs-version)))
+;  "Minor version number of this version of Emacs, as an integer.
+;Warning, this variable did not exist in Emacs versions earlier than:
+;  FSF Emacs:   19.23
+;  XEmacs:      19.10")
 
 (defconst emacs-build-time (current-time-string)
   "Time at which Emacs was dumped out.")
diff -r 4de2936b4e77 -r 0132846995bd lisp/viper/Makefile
--- a/lisp/viper/Makefile	Mon Aug 13 09:42:28 2007 +0200
+++ b/lisp/viper/Makefile	Mon Aug 13 09:43:35 2007 +0200
@@ -25,10 +25,10 @@
 INSTALL = install
 
 # --------- ONLY AUTHORIZED PERSONNEL BEYOND THIS POINT!!! ------------
-VIPER = viper.el viper-util.el viper-mous.el viper-ex.el \
+VIPER = viper.el viper-cmd.el viper-util.el viper-mous.el viper-ex.el \
         viper-macs.el viper-keym.el viper-init.el
 VIPERelc = viper-util.elc viper-mous.elc viper-ex.elc viper-macs.elc \
-	   viper-keym.elc viper.elc viper-init.elc
+	   viper-keym.elc viper.elc viper-cmd.elc viper-init.elc
 
 all: dvi info hello elc goodbye
 
@@ -57,7 +57,7 @@
 	@echo ""
 	@echo ""
 
-viper.dvi: viper.texi viper-cmd.texi
+viper.dvi: viper.texi
 	@echo ""
 	@echo ""
 	@echo "Making viper.dvi --- a Printable Version of the Viper Manual";
@@ -75,7 +75,7 @@
 	@echo "Texing Again";
 	$(TeX) viper.texi
 
-viper.info: viper.texi viper-cmd.texi
+viper: viper.texi 
 	@echo ""
 	@echo ""
 	@echo "Making Info Files for the Viper Manual"
@@ -117,10 +117,14 @@
 	@echo ""
 	$(EMACS) -batch -f batch-byte-compile viper.el
 
+viper-cmd.elc: viper-cmd.el viper.el viper-util.el viper-init.el
+	@echo ""
+	$(EMACS) -batch -f batch-byte-compile viper-cmd.el
+
 
 dvi: viper.dvi viperCard.dvi
 
-info: viper.info
+info: viper
 
 install: all
 	$(INSTALL) -m444 $(VIPER) $(LISPDIR)
@@ -128,8 +132,7 @@
 	$(INSTALL) -m444 viper viper-? $(INFODIR)
 	$(INSTALL) -m644 viper.dvi viperCard.dvi $(ETCDIR)
 	@echo ""
-	@echo "Please move viper.texi and viper-cmd.texi to"
-	@echo "            emacs-distribution-directory/man/"
+	@echo "Please move viper.texi to emacs-distribution-directory/man/"
 	@echo ""
 
 clean:
@@ -138,7 +141,7 @@
 distclean: clean
  
 realclean: clean
-	rm -f *.dvi viper.info*
+	rm -f *.dvi ../info/viper ../info/viper-?
 	rm -f viper.aux viper.cp viper.cps viper.fn viper.fns viper.ky \
 	      viper.kys viper.log viper.pg viper.pgs viper.toc viper.tp \
 	      viper.tps viper.vr viper.vrs
diff -r 4de2936b4e77 -r 0132846995bd lisp/viper/README
--- a/lisp/viper/README	Mon Aug 13 09:42:28 2007 +0200
+++ b/lisp/viper/README	Mon Aug 13 09:43:35 2007 +0200
@@ -6,6 +6,7 @@
 Makefile	-- Automated installation file
 
 viper.el    	-- Viper Emacs Lisp code
+viper-cmd.el   	-- Viper Emacs Lisp code
 viper-macs.el	-- Viper Emacs Lisp code
 viper-ex.el	-- Viper Emacs Lisp code
 viper-init.el	-- Viper Emacs Lisp code
@@ -13,8 +14,7 @@
 viper-mous.el	-- Viper Emacs Lisp code
 viper-keym.el	-- Viper Emacs Lisp code
 
-viper.texi  	-- Manual in Texinfo format, main part
-viper-cmd.texi  -- Command reference part of the manual
+viper.texi  	-- Manual in Texinfo format
 
 viperCard.tex   -- Reference card in TeX format
 
diff -r 4de2936b4e77 -r 0132846995bd lisp/viper/auto-autoloads.el
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lisp/viper/auto-autoloads.el	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,15 @@
+;;; DO NOT MODIFY THIS FILE
+(if (not (featurep 'viper-autoloads))
+    (progn
+
+;;;### (autoloads (viper-mode) "viper" "viper/viper.el")
+
+(defalias 'vip-mode 'viper-mode)
+
+(autoload 'viper-mode "viper" "\
+Turn on Viper emulation of Vi." t nil)
+
+;;;***
+
+(provide 'viper-autoloads)
+))
diff -r 4de2936b4e77 -r 0132846995bd lisp/viper/custom-load.el
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lisp/viper/custom-load.el	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,65 @@
+(put 'copyright 'custom-loads '())
+(put 'eldoc 'custom-loads '())
+(put 'execute 'custom-loads '())
+(put 'mouse 'custom-loads '())
+(put 'mail-abbrevs 'custom-loads '())
+(put 'etags 'custom-loads '())
+(put 'limits 'custom-loads '())
+(put 'minibuffer 'custom-loads '())
+(put 'environment 'custom-loads '())
+(put 'sound 'custom-loads '())
+(put 'holidays 'custom-loads '())
+(put 'auto-save 'custom-loads '())
+(put 'ispell 'custom-loads '())
+(put 'fortran-indent 'custom-loads '())
+(put 'lpr 'custom-loads '())
+(put 'message-headers 'custom-loads '())
+(put 'editing-basics 'custom-loads '())
+(put 'internal 'custom-loads '())
+(put 'calendar 'custom-loads '())
+(put 'help-appearance 'custom-loads '())
+(put 'display-time 'custom-loads '())
+(put 'lisp 'custom-loads '())
+(put 'diff 'custom-loads '())
+(put 'paren-matching 'custom-loads '())
+(put 'help 'custom-loads '())
+(put 'local 'custom-loads '())
+(put 'keyboard 'custom-loads '())
+(put 'minubuffer 'custom-loads '())
+(put 'message-sending 'custom-loads '())
+(put 'data 'custom-loads '())
+(put 'ps-print 'custom-loads '())
+(put 'backup 'custom-loads '())
+(put 'frames 'custom-loads '())
+(put 'customize 'custom-loads '())
+(put 'abbrev 'custom-loads '())
+(put 'toolbar 'custom-loads '())
+(put 'compilation 'custom-loads '())
+(put 'dired 'custom-loads '())
+(put 'killing 'custom-loads '())
+(put 'paren-blinking 'custom-loads '())
+(put 'find-file 'custom-loads '())
+(put 'gnuserv 'custom-loads '())
+(put 'maint 'custom-loads '())
+(put 'fill-comments 'custom-loads '())
+(put 'message-mail 'custom-loads '())
+(put 'windows 'custom-loads '())
+(put 'message-various 'custom-loads '())
+(put 'resize-minibuffer 'custom-loads '())
+(put 'fill 'custom-loads '())
+(put 'debug 'custom-loads '())
+(put 'display 'custom-loads '())
+(put 'diary 'custom-loads '())
+(put 'browse-url 'custom-loads '())
+(put 'message-insertion 'custom-loads '())
+(put 'hyper-apropos 'custom-loads '())
+(put 'vc 'custom-loads '())
+(put 'alloc 'custom-loads '())
+(put 'isearch 'custom-loads '())
+(put 'modeline 'custom-loads '())
+(put 'processes-basics 'custom-loads '())
+(put 'editing 'custom-loads '())
+(put 'matching 'custom-loads '())
+(put 'ps-print-color 'custom-loads '())
+(put 'undo 'custom-loads '())
+(put 'x 'custom-loads '())
diff -r 4de2936b4e77 -r 0132846995bd lisp/viper/viper-cmd.el
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lisp/viper/viper-cmd.el	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,4562 @@
+;;; viper-cmd.el --- Vi command support for Viper
+;; Copyright (C) 1997 Free Software Foundation, Inc.
+
+
+;; Code
+
+(provide 'viper-cmd)
+(require 'advice)
+
+;; Compiler pacifier
+(defvar vip-minibuffer-current-face)
+(defvar vip-minibuffer-insert-face)
+(defvar vip-minibuffer-vi-face)
+(defvar vip-minibuffer-emacs-face)
+(defvar viper-always)
+(defvar vip-mode-string	)
+(defvar iso-accents-mode)
+(defvar zmacs-region-stays)
+(defvar mark-even-if-inactive)
+
+;; loading happens only in non-interactive compilation
+;; in order to spare non-viperized emacs from being viperized
+(if noninteractive
+    (eval-when-compile
+      (let ((load-path (cons (expand-file-name ".") load-path)))
+	(or (featurep 'viper-util)
+	    (load "viper-util.el" nil nil 'nosuffix))
+	(or (featurep 'viper-keym)
+	    (load "viper-keym.el" nil nil 'nosuffix))
+	(or (featurep 'viper-mous)
+	    (load "viper-mous.el" nil nil 'nosuffix))
+	(or (featurep 'viper-macs)
+	    (load "viper-macs.el" nil nil 'nosuffix))
+	(or (featurep 'viper-ex)
+	    (load "viper-ex.el" nil nil 'nosuffix))
+	)))
+;; end pacifier
+
+
+(require 'viper-util)
+(require 'viper-keym)
+(require 'viper-mous)
+(require 'viper-macs)
+(require 'viper-ex)
+
+
+
+;; Generic predicates
+
+;; These test functions are shamelessly lifted from vip 4.4.2 by Aamod Sane
+
+;; generate test functions
+;; given symbol foo, foo-p is the test function, foos is the set of
+;; Viper command keys
+;; (macroexpand '(vip-test-com-defun foo))
+;; (defun foo-p (com) (consp (memq (if (< com 0) (- com) com) foos)))
+
+(defmacro vip-test-com-defun (name)
+  (let* ((snm (symbol-name name))
+	 (nm-p (intern (concat snm "-p")))
+	 (nms (intern (concat snm "s"))))
+    (` (defun (, nm-p) (com) 
+	 (consp (memq (if (< com 0) (- com) com) (, nms)))))))
+  
+;; Variables for defining VI commands
+
+;; Modifying commands that can be prefixes to movement commands
+(defconst vip-prefix-commands '(?c ?d ?y ?! ?= ?# ?< ?> ?\"))
+;; define vip-prefix-command-p
+(vip-test-com-defun vip-prefix-command)
+  
+;; Commands that are pairs eg. dd. r and R here are a hack
+(defconst vip-charpair-commands '(?c ?d ?y ?! ?= ?< ?> ?r ?R))
+;; define vip-charpair-command-p
+(vip-test-com-defun vip-charpair-command)
+
+(defconst vip-movement-commands '(?b ?B ?e ?E ?f ?F ?G ?h ?H ?j ?k ?l
+				     ?H ?M ?L ?n ?t ?T ?w ?W ?$ ?%
+				     ?^ ?( ?) ?- ?+ ?| ?{ ?} ?[ ?] ?' ?`
+				     ?; ?, ?0 ?? ?/
+				     )
+				     "Movement commands")
+;; define vip-movement-command-p
+(vip-test-com-defun vip-movement-command)
+
+(defconst vip-digit-commands '(?1 ?2 ?3 ?4 ?5 ?6 ?7 ?8 ?9)
+  "Digit commands")
+;; define vip-digit-command-p
+(vip-test-com-defun vip-digit-command)
+
+;; Commands that can be repeated by . (dotted)
+(defconst vip-dotable-commands '(?c ?d ?C ?s ?S ?D ?> ?<))
+;; define vip-dotable-command-p
+(vip-test-com-defun vip-dotable-command)
+
+;; Commands that can follow a #
+(defconst vip-hash-commands '(?c ?C ?g ?q ?s))
+;; define vip-hash-command-p
+(vip-test-com-defun vip-hash-command)
+
+;; Commands that may have registers as prefix
+(defconst vip-regsuffix-commands '(?d ?y ?Y ?D ?p ?P ?x ?X))
+;; define vip-regsuffix-command-p
+(vip-test-com-defun vip-regsuffix-command)
+
+(defconst vip-vi-commands (append vip-movement-commands
+				  vip-digit-commands
+				  vip-dotable-commands
+				  vip-charpair-commands
+				  vip-hash-commands
+				  vip-prefix-commands
+				  vip-regsuffix-commands)
+  "The list of all commands in Vi-state.")
+;; define vip-vi-command-p
+(vip-test-com-defun vip-vi-command)
+
+
+;;; CODE
+
+;; sentinels
+
+;; Runs vip-after-change-functions inside after-change-functions
+(defun vip-after-change-sentinel (beg end len)
+  (let ((list vip-after-change-functions))
+    (while list
+      (funcall (car list) beg end len)
+      (setq list (cdr list)))))
+      
+;; Runs vip-before-change-functions inside before-change-functions
+(defun vip-before-change-sentinel (beg end)
+  (let ((list vip-before-change-functions))
+    (while list
+      (funcall (car list) beg end)
+      (setq list (cdr list)))))
+
+(defsubst vip-post-command-sentinel ()
+  (run-hooks 'vip-post-command-hooks))
+  
+(defsubst vip-pre-command-sentinel ()
+  (run-hooks 'vip-pre-command-hooks))
+  
+;; Needed so that Viper will be able to figure the last inserted
+;; chunk of text with reasonable accuracy.
+(defsubst vip-insert-state-post-command-sentinel ()
+  (if (and (memq vip-current-state '(insert-state replace-state))
+	   vip-insert-point
+	   (>= (point) vip-insert-point))
+      (setq vip-last-posn-while-in-insert-state (point-marker)))
+  (if (eq vip-current-state 'insert-state)
+      (progn
+	(or (stringp vip-saved-cursor-color)
+	    (string= (vip-get-cursor-color) vip-insert-state-cursor-color)
+	    (setq vip-saved-cursor-color (vip-get-cursor-color)))
+	(if (stringp vip-saved-cursor-color)
+	    (vip-change-cursor-color vip-insert-state-cursor-color))
+	))
+  (if (and (eq this-command 'dabbrev-expand)
+	   (integerp vip-pre-command-point)
+	   (> vip-insert-point vip-pre-command-point))
+      (move-marker vip-insert-point vip-pre-command-point))
+  )
+  
+(defsubst vip-insert-state-pre-command-sentinel ()
+  (or (memq this-command '(self-insert-command))
+      (memq (vip-event-key last-command-event)
+	    '(up down left right (meta f) (meta b)
+		 (control n) (control p) (control f) (control b)))
+      (vip-restore-cursor-color-after-insert))
+  (if (and (eq this-command 'dabbrev-expand)
+	   (markerp vip-insert-point)
+	   (marker-position vip-insert-point))
+      (setq vip-pre-command-point (marker-position vip-insert-point))))
+	
+(defsubst vip-R-state-post-command-sentinel ()
+  ;; Restoring cursor color is needed despite
+  ;; vip-replace-state-pre-command-sentinel: When you jump to another buffer in
+  ;; another frame, the pre-command hook won't change cursor color to default
+  ;; in that other frame.  So, if the second frame cursor was red and we set
+  ;; the point outside the replacement region, then the cursor color will
+  ;; remain red. Restoring the default, below, prevents this.
+  (if (and (<= (vip-replace-start) (point))
+	   (<=  (point) (vip-replace-end)))
+      (vip-change-cursor-color vip-replace-overlay-cursor-color)
+    (vip-restore-cursor-color-after-replace)
+    ))
+
+;; to speed up, don't change cursor color before self-insert
+;; and common move commands
+(defsubst vip-replace-state-pre-command-sentinel ()
+  (or (memq this-command '(self-insert-command))
+      (memq (vip-event-key last-command-event)
+	    '(up down left right (meta f) (meta b)
+		 (control n) (control p) (control f) (control b)))
+      (vip-restore-cursor-color-after-replace)))
+  
+(defun vip-replace-state-post-command-sentinel ()
+  ;; Restoring cursor color is needed despite
+  ;; vip-replace-state-pre-command-sentinel: When one jumps to another buffer
+  ;; in another frame, the pre-command hook won't change cursor color to
+  ;; default in that other frame.  So, if the second frame cursor was red and
+  ;; we set the point outside the replacement region, then the cursor color
+  ;; will remain red. Restoring the default, below, fixes this problem.
+  ;;
+  ;; We optimize for self-insert-command's here, since they either don't change
+  ;; cursor color or, if they terminate replace mode, the color will be changed
+  ;; in vip-finish-change
+  (or (memq this-command '(self-insert-command))
+      (vip-restore-cursor-color-after-replace))
+  (cond 
+   ((eq vip-current-state 'replace-state)
+    ;; delete characters to compensate for inserted chars.
+    (let ((replace-boundary (vip-replace-end)))
+      (save-excursion
+	(goto-char vip-last-posn-in-replace-region)
+	(delete-char vip-replace-chars-to-delete)
+	(setq vip-replace-chars-to-delete 0
+	      vip-replace-chars-deleted 0)
+	;; terminate replace mode if reached replace limit
+	(if (= vip-last-posn-in-replace-region 
+	       (vip-replace-end))
+	    (vip-finish-change vip-last-posn-in-replace-region)))
+      
+      (if (and (<= (vip-replace-start) (point))
+	       (<=  (point) replace-boundary))
+	  (progn
+	    ;; the state may have changed in vip-finish-change above
+	    (if (eq vip-current-state 'replace-state)
+		(vip-change-cursor-color vip-replace-overlay-cursor-color))
+	    (setq vip-last-posn-in-replace-region (point-marker))))
+      ))
+   
+   (t ;; terminate replace mode if changed Viper states.
+    (vip-finish-change vip-last-posn-in-replace-region))))
+
+
+;; changing mode
+
+;; Change state to NEW-STATE---either emacs-state, vi-state, or insert-state.
+(defun vip-change-state (new-state)
+  ;; Keep vip-post/pre-command-hooks fresh.
+  ;; We remove then add vip-post/pre-command-sentinel since it is very
+  ;; desirable that vip-pre-command-sentinel is the last hook and
+  ;; vip-post-command-sentinel is the first hook.
+  (remove-hook 'post-command-hook 'vip-post-command-sentinel)
+  (add-hook 'post-command-hook 'vip-post-command-sentinel)
+  (remove-hook 'pre-command-hook 'vip-pre-command-sentinel)
+  (add-hook 'pre-command-hook 'vip-pre-command-sentinel t)
+  ;; These hooks will be added back if switching to insert/replace mode
+  (vip-remove-hook 'vip-post-command-hooks
+		   'vip-insert-state-post-command-sentinel)
+  (vip-remove-hook 'vip-pre-command-hooks
+		   'vip-insert-state-pre-command-sentinel)
+  (cond ((eq new-state 'vi-state)
+	 (cond ((member vip-current-state '(insert-state replace-state))
+		    
+		;; move vip-last-posn-while-in-insert-state
+		;; This is a normal hook that is executed in insert/replace
+		;; states after each command. In Vi/Emacs state, it does
+		;; nothing. We need to execute it here to make sure that
+		;; the last posn was recorded when we hit ESC.
+		;; It may be left unrecorded if the last thing done in
+		;; insert/repl state was dabbrev-expansion or abbrev
+		;; expansion caused by hitting ESC
+		(vip-insert-state-post-command-sentinel)
+		
+		(condition-case conds
+		    (progn
+		      (vip-save-last-insertion
+		       vip-insert-point 
+		       vip-last-posn-while-in-insert-state)
+		      (if vip-began-as-replace
+			  (setq vip-began-as-replace nil)
+			;; repeat insert commands if numerical arg > 1
+			(save-excursion
+			  (vip-repeat-insert-command))))
+		  (error
+		   (vip-message-conditions conds)))
+		     
+		(if (> (length vip-last-insertion) 0)
+		    (vip-push-onto-ring vip-last-insertion
+					'vip-insertion-ring))
+		
+		(if vip-ex-style-editing-in-insert
+		    (or (bolp) (backward-char 1))))
+	       ))
+	 
+	;; insert or replace
+	((memq new-state '(insert-state replace-state))
+	 (if (memq vip-current-state '(emacs-state vi-state))
+	     (vip-move-marker-locally 'vip-insert-point (point)))
+	 (vip-move-marker-locally 'vip-last-posn-while-in-insert-state (point))
+	 (vip-add-hook 'vip-post-command-hooks
+		       'vip-insert-state-post-command-sentinel t)
+	 (vip-add-hook 'vip-pre-command-hooks
+		       'vip-insert-state-pre-command-sentinel t))
+	) ; outermost cond
+  
+  ;; Nothing needs to be done to switch to emacs mode! Just set some
+  ;; variables, which is already done in vip-change-state-to-emacs!
+
+  (setq vip-current-state new-state)
+  (vip-normalize-minor-mode-map-alist)
+  (vip-adjust-keys-for new-state)
+  (vip-set-mode-vars-for new-state)
+  (vip-refresh-mode-line)
+  )
+
+
+    
+(defun vip-adjust-keys-for (state)
+  "Make necessary adjustments to keymaps before entering STATE."
+  (cond ((memq state '(insert-state replace-state))
+	 (if vip-auto-indent
+	     (progn
+	       (define-key vip-insert-basic-map "\C-m" 'vip-autoindent)
+	       (if vip-want-emacs-keys-in-insert
+		   ;; expert
+		   (define-key vip-insert-basic-map "\C-j" nil)
+		 ;; novice
+		 (define-key vip-insert-basic-map "\C-j" 'vip-autoindent)))
+	   (define-key vip-insert-basic-map "\C-m" nil)
+	   (define-key vip-insert-basic-map "\C-j" nil))
+		    
+	 (setq vip-insert-diehard-minor-mode
+	       (not vip-want-emacs-keys-in-insert))
+		   
+	 (if vip-want-ctl-h-help
+	     (progn 
+	       (define-key vip-insert-basic-map [(control h)] 'help-command)
+	       (define-key vip-replace-map [(control h)] 'help-command))
+	   (define-key vip-insert-basic-map 
+	     [(control h)] 'vip-del-backward-char-in-insert)
+	   (define-key vip-replace-map
+	     [(control h)] 'vip-del-backward-char-in-replace)))
+		     
+	(t ; Vi state
+	 (setq vip-vi-diehard-minor-mode (not vip-want-emacs-keys-in-vi))
+	 (if vip-want-ctl-h-help
+	     (define-key vip-vi-basic-map [(control h)] 'help-command)
+	   (define-key vip-vi-basic-map [(control h)] 'vip-backward-char)))
+	))
+	     
+    
+;; Normalizes minor-mode-map-alist by putting Viper keymaps first.
+;; This ensures that Viper bindings are in effect, regardless of which minor
+;; modes were turned on by the user or by other packages.
+(defun vip-normalize-minor-mode-map-alist ()
+  (setq minor-mode-map-alist 
+	(vip-append-filter-alist
+	 (list
+	       (cons 'vip-vi-intercept-minor-mode vip-vi-intercept-map)
+	       (cons 'vip-vi-minibuffer-minor-mode vip-minibuffer-map) 
+	       (cons 'vip-vi-local-user-minor-mode vip-vi-local-user-map)
+	       (cons 'vip-vi-kbd-minor-mode vip-vi-kbd-map)
+	       (cons 'vip-vi-global-user-minor-mode vip-vi-global-user-map)
+	       (cons 'vip-vi-state-modifier-minor-mode
+		     (if (keymapp
+			  (cdr (assoc major-mode vip-vi-state-modifier-alist)))
+			 (cdr (assoc major-mode vip-vi-state-modifier-alist))
+		       vip-empty-keymap))
+	       (cons 'vip-vi-diehard-minor-mode  vip-vi-diehard-map)
+	       (cons 'vip-vi-basic-minor-mode     vip-vi-basic-map)
+	       (cons 'vip-insert-intercept-minor-mode vip-insert-intercept-map)
+	       (cons 'vip-replace-minor-mode  vip-replace-map)
+	       ;; vip-insert-minibuffer-minor-mode must come after
+	       ;; vip-replace-minor-mode 
+	       (cons 'vip-insert-minibuffer-minor-mode
+		     vip-minibuffer-map) 
+	       (cons 'vip-insert-local-user-minor-mode
+		     vip-insert-local-user-map)
+	       (cons 'vip-insert-kbd-minor-mode vip-insert-kbd-map)
+	       (cons 'vip-insert-global-user-minor-mode
+		     vip-insert-global-user-map)
+	       (cons 'vip-insert-state-modifier-minor-mode
+		     (if (keymapp
+			  (cdr
+			   (assoc major-mode vip-insert-state-modifier-alist)))
+			 (cdr
+			  (assoc major-mode vip-insert-state-modifier-alist))
+		       vip-empty-keymap))
+	       (cons 'vip-insert-diehard-minor-mode vip-insert-diehard-map)
+	       (cons 'vip-insert-basic-minor-mode vip-insert-basic-map)
+	       (cons 'vip-emacs-intercept-minor-mode
+		     vip-emacs-intercept-map)
+	       (cons 'vip-emacs-local-user-minor-mode
+		     vip-emacs-local-user-map)
+	       (cons 'vip-emacs-kbd-minor-mode vip-emacs-kbd-map)
+	       (cons 'vip-emacs-global-user-minor-mode
+		     vip-emacs-global-user-map)
+	       (cons 'vip-emacs-state-modifier-minor-mode
+		     (if (keymapp
+			  (cdr
+			   (assoc major-mode vip-emacs-state-modifier-alist)))
+			 (cdr
+			  (assoc major-mode vip-emacs-state-modifier-alist))
+		       vip-empty-keymap))
+	       )
+	 minor-mode-map-alist)))
+	 
+ 
+
+
+
+;; Viper mode-changing commands and utilities
+
+;; Modifies mode-line-buffer-identification.
+(defun vip-refresh-mode-line ()
+  (setq vip-mode-string	
+	(cond ((eq vip-current-state 'emacs-state) vip-emacs-state-id)
+	      ((eq vip-current-state 'vi-state) vip-vi-state-id)
+	      ((eq vip-current-state 'replace-state) vip-replace-state-id)
+	      ((eq vip-current-state 'insert-state) vip-insert-state-id)))
+    
+  ;; Sets Viper mode string in global-mode-string
+  (force-mode-line-update))
+	
+
+;; Switch from Insert state to Vi state.
+(defun vip-exit-insert-state ()
+  (interactive)
+  (vip-change-state-to-vi))
+
+(defun vip-set-mode-vars-for (state)
+  "Sets Viper minor mode variables to put Viper's state STATE in effect."
+  
+  ;; Emacs state
+  (setq vip-vi-minibuffer-minor-mode	   nil
+        vip-insert-minibuffer-minor-mode   nil
+	vip-vi-intercept-minor-mode	   nil
+	vip-insert-intercept-minor-mode	   nil
+	
+	vip-vi-local-user-minor-mode       nil
+	vip-vi-kbd-minor-mode        	   nil
+	vip-vi-global-user-minor-mode      nil
+	vip-vi-state-modifier-minor-mode   nil
+	vip-vi-diehard-minor-mode     	   nil
+        vip-vi-basic-minor-mode       	   nil
+	
+	vip-replace-minor-mode 	      	   nil
+	
+	vip-insert-local-user-minor-mode     nil
+	vip-insert-kbd-minor-mode     	     nil
+	vip-insert-global-user-minor-mode    nil
+	vip-insert-state-modifier-minor-mode nil
+	vip-insert-diehard-minor-mode 	     nil
+	vip-insert-basic-minor-mode   	     nil
+	vip-emacs-intercept-minor-mode       t
+	vip-emacs-local-user-minor-mode      t
+	vip-emacs-kbd-minor-mode             (not (vip-is-in-minibuffer))
+	vip-emacs-global-user-minor-mode     t
+	vip-emacs-state-modifier-minor-mode  t
+	)
+  
+  ;; Vi state
+  (if (eq state 'vi-state) ; adjust for vi-state
+      (setq 
+       vip-vi-intercept-minor-mode	   t 
+       vip-vi-minibuffer-minor-mode	   (vip-is-in-minibuffer)
+       vip-vi-local-user-minor-mode	   t
+       vip-vi-kbd-minor-mode        	   (not (vip-is-in-minibuffer))
+       vip-vi-global-user-minor-mode	   t
+       vip-vi-state-modifier-minor-mode    t
+       ;; don't let the diehard keymap block command completion 
+       ;; and other things in the minibuffer
+       vip-vi-diehard-minor-mode    	   (not
+					    (or vip-want-emacs-keys-in-vi
+						(vip-is-in-minibuffer)))
+       vip-vi-basic-minor-mode      	    t 
+       vip-emacs-intercept-minor-mode       nil
+       vip-emacs-local-user-minor-mode      nil
+       vip-emacs-kbd-minor-mode     	    nil
+       vip-emacs-global-user-minor-mode     nil
+       vip-emacs-state-modifier-minor-mode  nil
+       ))
+  
+  ;; Insert and Replace states
+  (if (member state '(insert-state replace-state))
+      (setq 
+       vip-insert-intercept-minor-mode	    t 
+       vip-replace-minor-mode	     	    (eq state 'replace-state)
+       vip-insert-minibuffer-minor-mode	    (vip-is-in-minibuffer)
+       vip-insert-local-user-minor-mode     t
+       vip-insert-kbd-minor-mode     	    (not (vip-is-in-minibuffer))
+       vip-insert-global-user-minor-mode    t
+       vip-insert-state-modifier-minor-mode  t
+       ;; don't let the diehard keymap block command completion 
+       ;; and other things in the minibuffer
+       vip-insert-diehard-minor-mode 	    (not
+					     (or vip-want-emacs-keys-in-insert
+						 (vip-is-in-minibuffer)))
+       vip-insert-basic-minor-mode   	    t
+       vip-emacs-intercept-minor-mode       nil
+       vip-emacs-local-user-minor-mode      nil
+       vip-emacs-kbd-minor-mode     	    nil
+       vip-emacs-global-user-minor-mode     nil
+       vip-emacs-state-modifier-minor-mode  nil
+       ))
+       
+  ;; minibuffer faces
+  (if (vip-has-face-support-p)
+      (setq vip-minibuffer-current-face
+	    (cond ((eq state 'emacs-state) vip-minibuffer-emacs-face)
+		  ((eq state 'vi-state) vip-minibuffer-vi-face)
+		  ((memq state '(insert-state replace-state))
+		   vip-minibuffer-insert-face))))
+  
+  (if (vip-is-in-minibuffer)
+      (vip-set-minibuffer-overlay))
+  )
+
+;; This also takes care of the annoying incomplete lines in files.
+;; Also, this fixes `undo' to work vi-style for complex commands.
+(defun vip-change-state-to-vi ()
+  "Change Viper state to Vi."
+  (interactive)
+  (if (and vip-first-time (not (vip-is-in-minibuffer)))
+      (viper-mode)
+    (if overwrite-mode (overwrite-mode nil))
+    (if abbrev-mode (expand-abbrev))
+    (if (and auto-fill-function (> (current-column) fill-column))
+	(funcall auto-fill-function))
+    ;; don't leave whitespace lines around
+    (if (and (memq last-command
+		   '(vip-autoindent
+		     vip-open-line vip-Open-line
+		     vip-replace-state-exit-cmd))
+	     (vip-over-whitespace-line))
+	(indent-to-left-margin))
+    (vip-add-newline-at-eob-if-necessary)
+    (if vip-undo-needs-adjustment  (vip-adjust-undo))
+    (vip-change-state 'vi-state)
+
+    ;; always turn off iso-accents-mode, or else we won't be able to use the
+    ;; keys `,',^ in Vi state, as they will do accents instead of Vi actions.
+    (if (and (boundp 'iso-accents-mode) iso-accents-mode)
+	(iso-accents-mode -1))
+
+    (vip-restore-cursor-color-after-insert)
+    
+    ;; Protection against user errors in hooks
+    (condition-case conds
+	(run-hooks 'vip-vi-state-hook)
+      (error
+       (vip-message-conditions conds)))))
+
+(defun vip-change-state-to-insert ()
+  "Change Viper state to Insert."
+  (interactive)
+  (vip-change-state 'insert-state)
+  (if (and vip-automatic-iso-accents (fboundp 'iso-accents-mode))
+      (iso-accents-mode 1)) ; turn iso accents on
+  
+  (or (stringp vip-saved-cursor-color)
+      (string= (vip-get-cursor-color) vip-insert-state-cursor-color)
+      (setq vip-saved-cursor-color (vip-get-cursor-color)))
+  ;; Commented out, because if vip-change-state-to-insert is executed
+  ;; non-interactively then the old cursor color may get lost. Same old Emacs
+  ;; bug related to local variables?
+;;;(if (stringp vip-saved-cursor-color)
+;;;      (vip-change-cursor-color vip-insert-state-cursor-color))
+  ;; Protection against user errors in hooks
+  (condition-case conds
+      (run-hooks 'vip-insert-state-hook)
+    (error
+     (vip-message-conditions conds))))
+     
+(defsubst vip-downgrade-to-insert ()
+ (setq vip-current-state 'insert-state
+       vip-replace-minor-mode nil)
+ )
+
+    
+  
+;; Change to replace state. When the end of replacement region is reached,
+;; replace state changes to insert state.
+(defun vip-change-state-to-replace (&optional non-R-cmd)
+  (vip-change-state 'replace-state)
+  (if (and vip-automatic-iso-accents (fboundp 'iso-accents-mode))
+      (iso-accents-mode 1)) ; turn iso accents on
+  ;; Run insert-state-hook
+  (condition-case conds
+      (run-hooks 'vip-insert-state-hook 'vip-replace-state-hook)
+    (error
+     (vip-message-conditions conds)))
+  
+  (if non-R-cmd
+      (vip-start-replace)
+    ;; 'R' is implemented using Emacs's overwrite-mode
+    (vip-start-R-mode))
+  )
+
+    
+(defun vip-change-state-to-emacs ()
+  "Change Viper state to Emacs."
+  (interactive)
+  (vip-change-state 'emacs-state)
+  (if (and vip-automatic-iso-accents (fboundp 'iso-accents-mode))
+      (iso-accents-mode 1)) ; turn iso accents on
+  
+  ;; Protection agains user errors in hooks
+  (condition-case conds
+      (run-hooks 'vip-emacs-state-hook)
+    (error
+     (vip-message-conditions conds))))
+  
+;; escape to emacs mode termporarily
+(defun vip-escape-to-emacs (arg &optional events)
+  "Escape to Emacs state from Vi state for one Emacs command.
+ARG is used as the prefix value for the executed command.  If
+EVENTS is a list of events, which become the beginning of the command."
+  (interactive "P")
+  (if (= last-command-char ?\\)
+      (message "Switched to EMACS state for the next command..."))
+  (vip-escape-to-state arg events 'emacs-state))
+  
+;; escape to Vi mode termporarily
+(defun vip-escape-to-vi (arg)
+  "Escape from Emacs state to Vi state for one Vi 1-character command.
+If the Vi command that the user types has a prefix argument, e.g., `d2w', then
+Vi's prefix argument will be used. Otherwise, the prefix argument passed to
+`vip-escape-to-vi' is used."
+  (interactive "P")
+  (message "Switched to VI state for the next command...")
+  (vip-escape-to-state arg nil 'vi-state))
+  
+;; Escape to STATE mode for one Emacs command.
+(defun vip-escape-to-state (arg events state)
+  ;;(let (com key prefix-arg)
+  (let (com key)
+    ;; this temporarily turns off Viper's minor mode keymaps
+    (vip-set-mode-vars-for state)
+    (vip-normalize-minor-mode-map-alist)
+    (if events (vip-set-unread-command-events events))
+    
+    ;; protect against keyboard quit and other errors
+    (condition-case nil
+	(let (vip-vi-kbd-minor-mode 
+	      vip-insert-kbd-minor-mode
+	      vip-emacs-kbd-minor-mode)
+	  (unwind-protect
+	      (progn
+		(setq com (key-binding (setq key 
+					     (if vip-xemacs-p
+						 (read-key-sequence nil)
+					       (read-key-sequence nil t)))))
+		;; In case of binding indirection--chase definitions.
+		;; Have to do it here because we execute this command under
+		;; different keymaps, so command-execute may not do the
+		;; right thing there
+		(while (vectorp com) (setq com (key-binding com))))
+	    nil)
+	  ;; Execute command com in the original Viper state, not in state
+	  ;; `state'. Otherwise, if we switch buffers while executing the
+	  ;; escaped to command, Viper's mode vars will remain those of
+	  ;; `state'. When we return to the orig buffer, the bindings will be
+	  ;; screwed up.
+	  (vip-set-mode-vars-for vip-current-state)
+	  
+	  ;; this-command, last-command-char, last-command-event
+	  (setq this-command com)
+	  (if vip-xemacs-p ; XEmacs represents key sequences as vectors
+	      (setq last-command-event (vip-copy-event (vip-seq-last-elt key))
+		    last-command-char (event-to-character last-command-event))
+	    ;; Emacs represents them as sequences (str or vec)
+	    (setq last-command-event (vip-copy-event (vip-seq-last-elt key))
+		  last-command-char last-command-event))
+	    
+	  (if (commandp com)
+	      (progn
+		(setq prefix-arg (or prefix-arg arg))
+		(command-execute com)))
+	  )
+      (quit (ding))
+      (error (beep 1))))
+  ;; set state in the new buffer
+  (vip-set-mode-vars-for vip-current-state))
+      
+(defun vip-exec-form-in-vi  (form)
+  "Execute FORM in Vi state, regardless of the Ccurrent Vi state."
+  (let ((buff (current-buffer))
+	result)
+    (vip-set-mode-vars-for 'vi-state)
+
+    (condition-case nil
+	(setq result (eval form))
+      (error
+       (signal 'quit nil)))
+
+    (if (not (equal buff (current-buffer))) ; cmd switched buffer
+	(save-excursion
+	  (set-buffer buff)
+	  (vip-set-mode-vars-for vip-current-state)))
+    (vip-set-mode-vars-for vip-current-state)
+    result))
+
+(defun vip-exec-form-in-emacs  (form)
+  "Execute FORM in Emacs, temporarily disabling Viper's minor modes.
+Similar to vip-escape-to-emacs, but accepts forms rather than keystrokes."
+  (let ((buff (current-buffer))
+	result)
+    (vip-set-mode-vars-for 'emacs-state)
+    (setq result (eval form))
+    (if (not (equal buff (current-buffer))) ; cmd switched buffer
+	(save-excursion
+	  (set-buffer buff)
+	  (vip-set-mode-vars-for vip-current-state)))
+    (vip-set-mode-vars-for vip-current-state)
+    result))
+
+  
+;; This is needed because minor modes sometimes override essential Viper
+;; bindings. By letting Viper know which files these modes are in, it will
+;; arrange to reorganize minor-mode-map-alist so that things will work right.
+(defun vip-harness-minor-mode (load-file)
+  "Familiarize Viper with a minor mode defined in LOAD_FILE.
+Minor modes that have their own keymaps may overshadow Viper keymaps.
+This function is designed to make Viper aware of the packages that define
+such minor modes.
+Usage:
+    (vip-harness-minor-mode load-file)
+
+LOAD-FILE is a name of the file where the specific minor mode is defined.
+Suffixes such as .el or .elc should be stripped."
+
+  (interactive "sEnter name of the load file: ")
+  
+  (vip-eval-after-load load-file '(vip-normalize-minor-mode-map-alist))
+  
+  ;; Change the default for minor-mode-map-alist each time a harnessed minor
+  ;; mode adds its own keymap to the a-list.
+  (vip-eval-after-load
+   load-file '(setq-default minor-mode-map-alist minor-mode-map-alist))
+  )
+
+
+(defun vip-ESC (arg)
+  "Emulate ESC key in Emacs.
+Prevents multiple escape keystrokes if vip-no-multiple-ESC is true.
+If vip-no-multiple-ESC is 'twice double ESC would ding in vi-state.
+Other ESC sequences are emulated via the current Emacs's major mode
+keymap. This is more convenient on TTYs, since this won't block
+function keys such as up,down, etc. ESC will also will also work as
+a Meta key in this case. When vip-no-multiple-ESC is nil, ESC functions
+as a Meta key and any number of multiple escapes is allowed."
+  (interactive "P")
+  (let (char)
+    (cond ((and (not vip-no-multiple-ESC) (eq vip-current-state 'vi-state))
+	   (setq char (vip-read-char-exclusive))
+	   (vip-escape-to-emacs arg (list ?\e char) ))
+	  ((and (eq vip-no-multiple-ESC 'twice) 
+		(eq vip-current-state 'vi-state))
+	   (setq char (vip-read-char-exclusive))
+	   (if (= char (string-to-char vip-ESC-key))
+	       (ding)
+	     (vip-escape-to-emacs arg (list ?\e char) )))
+	  (t (ding)))
+    ))
+
+(defun vip-alternate-Meta-key (arg)
+  "Simulate Emacs Meta key."
+  (interactive "P")
+  (sit-for 1) (message "ESC-")
+  (vip-escape-to-emacs arg '(?\e)))
+
+(defun vip-toggle-key-action ()
+  "Action bound to `vip-toggle-key'."
+  (interactive)
+  (if (and (< vip-expert-level 2) (equal vip-toggle-key "\C-z"))
+      (if (vip-window-display-p)
+	  (vip-iconify)
+	(suspend-emacs))
+    (vip-change-state-to-emacs)))
+
+
+;; Intercept ESC sequences on dumb terminals.
+;; Based on the idea contributed by Marcelino Veiga Tuimil <mveiga@dit.upm.es>
+
+;; Check if last key was ESC and if so try to reread it as a function key.
+;; But only if there are characters to read during a very short time.
+;; Returns the last event, if any.
+(defun vip-envelop-ESC-key ()
+  (let ((event last-input-event)
+	(keyseq [nil])
+	inhibit-quit)
+    (if (vip-ESC-event-p event)
+	(progn 
+	  (if (vip-fast-keysequence-p)
+	      (progn
+		(let (minor-mode-map-alist)
+		  (vip-set-unread-command-events event)
+		  (setq keyseq
+			(funcall
+			 (ad-get-orig-definition 'read-key-sequence) nil))
+		  ) ; let
+		;; If keyseq translates into something that still has ESC
+		;; at the beginning, separate ESC from the rest of the seq.
+		;; In XEmacs we check for events that are keypress meta-key
+		;; and convert them into [escape key]
+		;;
+		;; This is needed for the following reason:
+		;; If ESC is the first symbol, we interpret it as if the
+		;; user typed ESC and then quickly some other symbols.
+		;; If ESC is not the first one, then the key sequence
+		;; entered was apparently translated into a function key or
+		;; something (e.g., one may have
+		;; (define-key function-key-map "\e[192z" [f11])
+		;; which would translate the escape-sequence generated by
+		;; f11 in an xterm window into the symbolic key f11.
+		;;
+		;; If `first-key' is not an ESC event, we make it into the
+		;; last-command-event in order to pretend that this key was
+		;; pressed. This is needed to allow arrow keys to be bound to
+		;; macros. Otherwise, vip-exec-mapped-kbd-macro will think that
+		;; the last event was ESC and so it'll execute whatever is
+		;; bound to ESC. (Viper macros can't be bound to
+		;; ESC-sequences).
+		(let* ((first-key (elt keyseq 0))
+		       (key-mod (event-modifiers first-key)))
+		  (cond ((vip-ESC-event-p first-key)
+			 ;; put keys following ESC on the unread list
+			 ;; and return ESC as the key-sequence
+			 (vip-set-unread-command-events (subseq keyseq 1))
+			 (setq last-input-event event
+			       keyseq (if vip-emacs-p
+					  "\e"
+					(vector (character-to-event ?\e)))))
+			((and vip-xemacs-p
+			      (key-press-event-p first-key)
+			      (equal '(meta) key-mod))
+			 (vip-set-unread-command-events 
+			  (vconcat (vector
+				    (character-to-event (event-key first-key)))
+				   (subseq keyseq 1)))
+			 (setq last-input-event event
+			       keyseq (vector (character-to-event ?\e))))
+			((eventp first-key)
+			 (setq last-command-event (vip-copy-event first-key)))
+			))
+		) ; end progn
+		
+	    ;; this is escape event with nothing after it
+	    ;; put in unread-command-event and then re-read
+	    (vip-set-unread-command-events event)
+	    (setq keyseq
+		  (funcall (ad-get-orig-definition 'read-key-sequence) nil))
+	    ))
+      ;; not an escape event
+      (setq keyseq (vector event)))
+    keyseq))
+
+    
+
+;; Listen to ESC key.
+;; If a sequence of keys starting with ESC is issued with very short delays,
+;; interpret these keys in Emacs mode, so ESC won't be interpreted as a Vi key.
+(defun vip-intercept-ESC-key ()
+  "Function that implements ESC key in Viper emulation of Vi."
+  (interactive)
+  (let ((cmd (or (key-binding (vip-envelop-ESC-key)) 
+		 '(lambda () (interactive) (error "")))))
+    
+    ;; call the actual function to execute ESC (if no other symbols followed)
+    ;; or the key bound to the ESC sequence (if the sequence was issued
+    ;; with very short delay between characters.
+    (if (eq cmd 'vip-intercept-ESC-key)
+	(setq cmd
+	      (cond ((eq vip-current-state 'vi-state)
+		     'vip-ESC)
+		    ((eq vip-current-state 'insert-state)
+		     'vip-exit-insert-state) 
+		    ((eq vip-current-state 'replace-state)
+		     'vip-replace-state-exit-cmd)
+		    (t 'vip-change-state-to-vi)
+		    )))
+    (call-interactively cmd)))
+
+	   
+
+
+;; prefix argument for Vi mode
+
+;; In Vi mode, prefix argument is a dotted pair (NUM . COM) where NUM
+;; represents the numeric value of the prefix argument and COM represents
+;; command prefix such as "c", "d", "m" and "y".
+
+;; Get value part of prefix-argument ARG.
+(defsubst vip-p-val (arg)
+  (cond ((null arg) 1)
+	((consp arg)
+	 (if (or (null (car arg)) (equal (car arg) '(nil)))
+	     1 (car arg)))
+	(t arg)))
+
+;; Get raw value part of prefix-argument ARG.
+(defsubst vip-P-val (arg)
+  (cond ((consp arg) (car arg))
+	(t arg)))
+
+;; Get com part of prefix-argument ARG.
+(defsubst vip-getcom (arg)
+  (cond ((null arg) nil)
+	((consp arg) (cdr arg))
+	(t nil)))
+
+;; Get com part of prefix-argument ARG and modify it.
+(defun vip-getCom (arg)
+  (let ((com (vip-getcom arg)))
+    (cond ((equal com ?c) ?C)
+	  ((equal com ?d) ?D)
+	  ((equal com ?y) ?Y)
+	  (t com))))
+
+
+;; Compute numeric prefix arg value. 
+;; Invoked by EVENT. COM is the command part obtained so far.
+(defun vip-prefix-arg-value (event com)
+  (let (value func)
+    ;; read while number
+    (while (and (vip-characterp event) (>= event ?0) (<= event ?9))
+      (setq value (+ (* (if (integerp value) value 0) 10) (- event ?0)))
+      (setq event (vip-read-event-convert-to-char)))
+    
+    (setq prefix-arg value)
+    (if com (setq prefix-arg (cons prefix-arg com)))
+    (while (eq event ?U)
+      (vip-describe-arg prefix-arg)
+      (setq event (vip-read-event-convert-to-char)))
+    
+    (if (or com (and (not (eq vip-current-state 'vi-state))
+		     ;; make sure it is a Vi command
+		     (vip-characterp event) (vip-vi-command-p event)
+		     ))
+	;; If appears to be one of the vi commands,
+	;; then execute it with funcall and clear prefix-arg in order to not
+	;; confuse subsequent commands
+	(progn
+	  ;; last-command-char is the char we want emacs to think was typed
+	  ;; last. If com is not nil, the vip-digit-argument command was called
+	  ;; from within vip-prefix-arg command, such as `d', `w', etc., i.e., 
+	  ;; the user typed, say, d2. In this case, `com' would be `d', `w',
+	  ;; etc.
+	  ;; If vip-digit-argument was invoked by vip-escape-to-vi (which is
+	  ;; indicated by the fact that the current state is not vi-state),
+	  ;; then `event' represents the vi command to be executed (e.g., `d',
+	  ;; `w', etc). Again, last-command-char must make emacs believe that
+	  ;; this is the command we typed.
+	  (setq last-command-char (or com event))
+	  (setq func (vip-exec-form-in-vi 
+		      (` (key-binding (char-to-string (, event))))))
+	  (funcall func prefix-arg)
+	  (setq prefix-arg nil))
+      ;; some other command -- let emacs do it in its own way
+      (vip-set-unread-command-events event))
+    ))
+		     
+
+;; Vi operator as prefix argument."
+(defun vip-prefix-arg-com (char value com)
+  (let ((cont t)
+	cmd-info mv-or-digit-cmd)
+    (while (and cont
+		(memq char
+		      (list ?c ?d ?y ?! ?< ?> ?= ?# ?r ?R ?\"
+			    vip-buffer-search-char)))
+      (if com
+	  ;; this means that we already have a command character, so we
+	  ;; construct a com list and exit while.  however, if char is "
+	  ;; it is an error.
+	  (progn
+	    ;; new com is (CHAR . OLDCOM)
+	    (if (memq char '(?# ?\")) (error ""))
+	    (setq com (cons char com))
+	    (setq cont nil))
+	;; If com is nil we set com as char, and read more.  Again, if char
+	;; is ", we read the name of register and store it in vip-use-register.
+	;; if char is !, =, or #, a complete com is formed so we exit the
+	;; while loop.
+	(cond ((memq char '(?! ?=))
+	       (setq com char)
+	       (setq char (read-char))
+	       (setq cont nil))
+	      ((= char ?#)
+	       ;; read a char and encode it as com
+	       (setq com (+ 128 (read-char)))
+	       (setq char (read-char)))
+	      ((= char ?\")
+	       (let ((reg (read-char)))
+		 (if (vip-valid-register reg)
+		     (setq vip-use-register reg)
+		   (error ""))
+		 (setq char (read-char))))
+	      (t
+	       (setq com char)
+	       (setq char (read-char))))))
+
+  (if (atom com)
+      ;; `com' is a single char, so we construct the command argument
+      ;; and if `char' is `?', we describe the arg; otherwise 
+      ;; we prepare the command that will be executed at the end.
+      (progn
+	(setq cmd-info (cons value com))
+	(while (= char ?U)
+	  (vip-describe-arg cmd-info)
+	  (setq char (read-char)))
+	;; `char' is a movement cmd, a digit arg cmd, or a register cmd---so we
+	;; execute it at the very end 
+	(or (vip-movement-command-p char)
+	    (vip-digit-command-p char)
+	    (vip-regsuffix-command-p char)
+	    (error ""))
+	(setq mv-or-digit-cmd
+	      (vip-exec-form-in-vi 
+	       (` (key-binding (char-to-string (, char)))))))
+    
+    ;; as com is non-nil, this means that we have a command to execute
+    (if (memq (car com) '(?r ?R))
+	;; execute apropriate region command.
+	(let ((char (car com)) (com (cdr com)))
+	  (setq prefix-arg (cons value com))
+	  (if (= char ?r) (vip-region prefix-arg)
+	    (vip-Region prefix-arg))
+	  ;; reset prefix-arg
+	  (setq prefix-arg nil))
+      ;; otherwise, reset prefix arg and call appropriate command
+      (setq value (if (null value) 1 value))
+      (setq prefix-arg nil)
+      (cond ((equal com '(?c . ?c)) (vip-line (cons value ?C)))
+	    ((equal com '(?d . ?d)) (vip-line (cons value ?D)))
+	    ((equal com '(?d . ?y)) (vip-yank-defun))
+	    ((equal com '(?y . ?y)) (vip-line (cons value ?Y)))
+	    ((equal com '(?< . ?<)) (vip-line (cons value ?<)))
+	    ((equal com '(?> . ?>)) (vip-line (cons value ?>)))
+	    ((equal com '(?! . ?!)) (vip-line (cons value ?!)))
+	    ((equal com '(?= . ?=)) (vip-line (cons value ?=)))
+	    (t (error "")))))
+  
+  (if mv-or-digit-cmd
+      (progn
+	(setq last-command-char char)
+	(setq last-command-event 
+	      (vip-copy-event
+	       (if vip-xemacs-p (character-to-event char) char)))
+	(condition-case nil
+	    (funcall mv-or-digit-cmd cmd-info)
+	  (error
+	   (error "")))))
+  ))
+
+(defun vip-describe-arg (arg)
+  (let (val com)
+    (setq val (vip-P-val arg)
+	  com (vip-getcom arg))
+    (if (null val)
+	(if (null com)
+	    (message "Value is nil, and command is nil")
+	  (message "Value is nil, and command is `%c'" com))
+      (if (null com)
+	  (message "Value is `%d', and command is nil" val)
+	(message "Value is `%d', and command is `%c'" val com)))))
+
+(defun vip-digit-argument (arg)
+  "Begin numeric argument for the next command."
+  (interactive "P")
+  (vip-leave-region-active)
+  (vip-prefix-arg-value
+   last-command-char (if (consp arg) (cdr arg) nil)))
+
+(defun vip-command-argument (arg)
+  "Accept a motion command as an argument."
+  (interactive "P")
+  (let ((vip-inside-command-argument-action t))
+    (condition-case nil
+	(vip-prefix-arg-com
+	 last-command-char   
+	 (cond ((null arg) nil)
+	       ((consp arg) (car arg))
+	       ((integerp arg) arg)
+	       (t (error vip-InvalidCommandArgument)))
+	 (cond ((null arg) nil)
+	       ((consp arg) (cdr arg))
+	       ((integerp arg) nil)
+	       (t (error vip-InvalidCommandArgument))))
+      (quit (setq vip-use-register nil)
+	    (signal 'quit nil)))
+    (vip-deactivate-mark)))
+
+
+;; repeat last destructive command
+
+;; Append region to text in register REG.
+;; START and END are buffer positions indicating what to append.
+(defsubst vip-append-to-register (reg start end)
+  (set-register reg (concat (if (stringp (get-register reg))
+				(get-register reg) "")
+			    (buffer-substring start end))))
+
+;; Saves last inserted text for possible use by vip-repeat command.
+(defun vip-save-last-insertion (beg end)
+  (setq vip-last-insertion (buffer-substring beg end))
+  (or (< (length vip-d-com) 5)
+      (setcar (nthcdr 4 vip-d-com) vip-last-insertion))
+  (or (null vip-command-ring)
+      (ring-empty-p vip-command-ring)
+      (progn
+	(setcar (nthcdr 4 (vip-current-ring-item vip-command-ring))
+		vip-last-insertion)
+	;; del most recent elt, if identical to the second most-recent
+	(vip-cleanup-ring vip-command-ring)))
+  )
+    
+(defsubst vip-yank-last-insertion ()
+  "Inserts the text saved by the previous vip-save-last-insertion command."
+  (condition-case nil
+      (insert vip-last-insertion)
+    (error nil)))
+  
+			    
+;; define functions to be executed
+
+;; invoked by the `C' command
+(defun vip-exec-change (m-com com) 
+  (or (and (markerp vip-com-point) (marker-position vip-com-point))
+      (set-marker vip-com-point (point) (current-buffer)))
+  ;; handle C cmd at the eol and at eob.
+  (if (or (and (eolp) (= vip-com-point (point)))
+	  (= vip-com-point (point-max)))
+      (progn
+	(insert " ")(backward-char 1)))
+  (if (= vip-com-point (point))
+      (vip-forward-char-carefully))
+  (if (= com ?c)
+      (vip-change vip-com-point (point))
+    (vip-change-subr vip-com-point (point))))
+
+;; this is invoked by vip-substitute-line
+(defun vip-exec-Change (m-com com)
+  (save-excursion
+    (set-mark vip-com-point)
+    (vip-enlarge-region (mark t) (point))
+    (if vip-use-register
+	(progn
+	  (cond ((vip-valid-register vip-use-register '(letter digit))
+		 ;;(vip-valid-register vip-use-register '(letter)
+		 (copy-to-register
+		  vip-use-register (mark t) (point) nil))
+		((vip-valid-register vip-use-register '(Letter))
+		 (vip-append-to-register
+		  (downcase vip-use-register) (mark t) (point)))
+		(t (setq vip-use-register nil)
+		   (error vip-InvalidRegister vip-use-register)))
+	  (setq vip-use-register nil)))
+    (delete-region (mark t) (point)))
+  (open-line 1)
+  (if (= com ?C) (vip-change-mode-to-insert) (vip-yank-last-insertion)))
+
+(defun vip-exec-delete (m-com com)
+  (or (and (markerp vip-com-point) (marker-position vip-com-point))
+      (set-marker vip-com-point (point) (current-buffer)))
+  (if vip-use-register
+      (progn
+	(cond ((vip-valid-register vip-use-register '(letter digit))
+	       ;;(vip-valid-register vip-use-register '(letter))
+	       (copy-to-register
+		vip-use-register vip-com-point (point) nil))
+	      ((vip-valid-register vip-use-register '(Letter))
+	       (vip-append-to-register
+		(downcase vip-use-register) vip-com-point (point)))
+	      (t (setq vip-use-register nil)
+		 (error vip-InvalidRegister vip-use-register)))
+	(setq vip-use-register nil)))
+  (setq last-command
+	(if (eq last-command 'd-command) 'kill-region nil))
+  (kill-region vip-com-point (point))
+  (setq this-command 'd-command)
+  (if vip-ex-style-motion
+      (if (and (eolp) (not (bolp))) (backward-char 1))))
+
+(defun vip-exec-Delete (m-com com)
+  (save-excursion
+    (set-mark vip-com-point)
+    (vip-enlarge-region (mark t) (point))
+    (if vip-use-register
+	(progn
+	  (cond ((vip-valid-register vip-use-register '(letter digit))
+		 ;;(vip-valid-register vip-use-register '(letter))
+		 (copy-to-register
+		  vip-use-register (mark t) (point) nil))
+		((vip-valid-register vip-use-register '(Letter))
+		 (vip-append-to-register
+		  (downcase vip-use-register) (mark t) (point)))
+		(t (setq vip-use-register nil)
+		   (error vip-InvalidRegister vip-use-register)))
+	  (setq vip-use-register nil)))
+    (setq last-command
+	  (if (eq last-command 'D-command) 'kill-region nil))
+    (kill-region (mark t) (point))
+    (if (eq m-com 'vip-line) (setq this-command 'D-command)))
+  (back-to-indentation))
+
+(defun vip-exec-yank (m-com com)
+  (or (and (markerp vip-com-point) (marker-position vip-com-point))
+      (set-marker vip-com-point (point) (current-buffer)))
+  (if vip-use-register
+      (progn
+	(cond ((vip-valid-register vip-use-register '(letter digit))
+	       ;; (vip-valid-register vip-use-register '(letter))
+	       (copy-to-register
+		vip-use-register vip-com-point (point) nil))
+	      ((vip-valid-register vip-use-register '(Letter))
+	       (vip-append-to-register
+		(downcase vip-use-register) vip-com-point (point)))
+	      (t (setq vip-use-register nil)
+		 (error vip-InvalidRegister vip-use-register)))
+	(setq vip-use-register nil)))
+  (setq last-command nil)
+  (copy-region-as-kill vip-com-point (point))
+  (goto-char vip-com-point))
+
+(defun vip-exec-Yank (m-com com)
+  (save-excursion
+    (set-mark vip-com-point)
+    (vip-enlarge-region (mark t) (point))
+    (if vip-use-register
+	(progn
+	  (cond ((vip-valid-register vip-use-register '(letter digit))
+		 (copy-to-register
+		  vip-use-register (mark t) (point) nil))
+		((vip-valid-register vip-use-register '(Letter))
+		 (vip-append-to-register
+		  (downcase vip-use-register) (mark t) (point)))
+		(t (setq vip-use-register nil)
+		   (error vip-InvalidRegister  vip-use-register)))
+	  (setq vip-use-register nil)))
+    (setq last-command nil)
+    (copy-region-as-kill (mark t) (point)))
+  (vip-deactivate-mark)
+  (goto-char vip-com-point))
+
+(defun vip-exec-bang (m-com com)
+  (save-excursion
+    (set-mark vip-com-point)
+    (vip-enlarge-region (mark t) (point))
+    (shell-command-on-region
+     (mark t) (point)
+     (if (= com ?!)
+	 (setq vip-last-shell-com
+	       (vip-read-string-with-history 
+		"!"
+		nil
+		'vip-shell-history
+		(car vip-shell-history)
+		))
+       vip-last-shell-com)
+     t)))
+
+(defun vip-exec-equals (m-com com)
+  (save-excursion
+    (set-mark vip-com-point)
+    (vip-enlarge-region (mark t) (point))
+    (if (> (mark t) (point)) (exchange-point-and-mark))
+    (indent-region (mark t) (point) nil)))
+
+(defun vip-exec-shift (m-com com)
+  (save-excursion
+    (set-mark vip-com-point)
+    (vip-enlarge-region (mark t) (point))
+    (if (> (mark t) (point)) (exchange-point-and-mark))
+    (indent-rigidly (mark t) (point) 
+		    (if (= com ?>)
+			vip-shift-width
+		      (- vip-shift-width))))
+  ;; return point to where it was before shift
+  (goto-char vip-com-point))
+
+;; this is needed because some commands fake com by setting it to ?r, which
+;; denotes repeated insert command.
+(defsubst vip-exec-dummy (m-com com)
+  nil)
+
+(defun vip-exec-buffer-search (m-com com)
+  (setq vip-s-string (buffer-substring (point) vip-com-point))
+  (setq vip-s-forward t)
+  (setq vip-search-history (cons vip-s-string vip-search-history))
+  (vip-search vip-s-string vip-s-forward 1))
+
+(defvar vip-exec-array (make-vector 128 nil))
+
+;; Using a dispatch array allows adding functions like buffer search
+;; without affecting other functions. Buffer search can now be bound
+;; to any character.
+
+(aset vip-exec-array ?c 'vip-exec-change)
+(aset vip-exec-array ?C 'vip-exec-Change)
+(aset vip-exec-array ?d 'vip-exec-delete)
+(aset vip-exec-array ?D 'vip-exec-Delete)
+(aset vip-exec-array ?y 'vip-exec-yank)
+(aset vip-exec-array ?Y 'vip-exec-Yank)
+(aset vip-exec-array ?r 'vip-exec-dummy)
+(aset vip-exec-array ?! 'vip-exec-bang)
+(aset vip-exec-array ?< 'vip-exec-shift)
+(aset vip-exec-array ?> 'vip-exec-shift)
+(aset vip-exec-array ?= 'vip-exec-equals)
+
+
+
+;; This function is called by various movement commands to execute a
+;; destructive command on the region specified by the movement command. For
+;; instance, if the user types cw, then the command vip-forward-word will
+;; call vip-execute-com to execute vip-exec-change, which eventually will
+;; call vip-change to invoke the replace mode on the region.
+;;
+;; The list (M-COM VAL COM REG INSETED-TEXT COMMAND-KEYS) is set to
+;; vip-d-com for later use by vip-repeat.
+(defun vip-execute-com (m-com val com)
+  (let ((reg vip-use-register))
+    ;; this is the special command `#'
+    (if (> com 128)
+	(vip-special-prefix-com (- com 128))
+      (let ((fn (aref vip-exec-array (if (< com 0) (- com) com))))
+	(if (null fn)
+	    (error "%c: %s" com vip-InvalidViCommand)
+	  (funcall fn m-com com))))
+    (if (vip-dotable-command-p com)
+	(vip-set-destructive-command
+	 (list m-com val
+	       (if (memq com (list ?c ?C ?!)) (- com) com)
+	       reg nil nil)))
+    ))
+
+
+(defun vip-repeat (arg)
+  "Re-execute last destructive command.
+Use the info in vip-d-com, which has the form
+\(com val ch reg inserted-text command-keys\),
+where `com' is the command to be re-executed, `val' is the
+argument to `com', `ch' is a flag for repeat, and `reg' is optional;
+if it exists, it is the name of the register for `com'.
+If the prefix argument, ARG, is non-nil, it is used instead of `val'."
+  (interactive "P")
+  (let ((save-point (point)) ; save point before repeating prev cmd
+	;; Pass along that we are repeating a destructive command
+	;; This tells vip-set-destructive-command not to update
+	;; vip-command-ring
+	(vip-intermediate-command 'vip-repeat))
+    (if (eq last-command 'vip-undo)
+	;; if the last command was vip-undo, then undo-more
+	(vip-undo-more)
+      ;; otherwise execute the command stored in vip-d-com.  if arg is non-nil
+      ;; its prefix value is used as new prefix value for the command.
+      (let ((m-com (car vip-d-com))
+	    (val (vip-P-val arg))
+	    (com (nth 2 vip-d-com))
+	    (reg (nth 3 vip-d-com)))
+        (if (null val) (setq val (nth 1 vip-d-com)))
+        (if (null m-com) (error "No previous command to repeat."))
+        (setq vip-use-register reg)
+	(if (nth 4 vip-d-com) ; text inserted by command
+	    (setq vip-last-insertion (nth 4 vip-d-com)
+		  vip-d-char (nth 4 vip-d-com)))
+        (funcall m-com (cons val com))
+        (if (and vip-keep-point-on-repeat (< save-point (point)))
+	    (goto-char save-point)) ; go back to before repeat.
+	(if (and (eolp) (not (bolp)))
+	    (backward-char 1))
+     ))
+  (if vip-undo-needs-adjustment (vip-adjust-undo)) ; take care of undo
+  ;; If the prev cmd was rotating the command ring, this means that `.' has
+  ;; just executed a command from that ring. So, push it on the ring again.
+  ;; If we are just executing previous command , then don't push vip-d-com
+  ;; because vip-d-com is not fully constructed in this case (its keys and
+  ;; the inserted text may be nil). Besides, in this case, the command
+  ;; executed by `.' is already on the ring.
+  (if (eq last-command 'vip-display-current-destructive-command)
+      (vip-push-onto-ring vip-d-com 'vip-command-ring))
+  (vip-deactivate-mark)
+  ))
+  
+(defun vip-repeat-from-history ()
+  "Repeat a destructive command from history.
+Doesn't change vip-command-ring in any way, so `.' will work as before
+executing this command.
+This command is supposed to be bound to a two-character Vi macro where
+the second character is a digit 0 to 9. The digit indicates which
+history command to execute. `<char>0' is equivalent to `.', `<char>1'
+invokes the command before that, etc."
+  (interactive)
+  (let* ((vip-intermediate-command 'repeating-display-destructive-command)
+	 (idx (cond (vip-this-kbd-macro
+		      (string-to-number
+		       (symbol-name (elt vip-this-kbd-macro 1))))
+		    (t 0)))
+	 (num idx)
+	 (vip-d-com vip-d-com))
+
+    (or (and (numberp num) (<= 0 num) (<= num 9))
+	(progn
+	  (setq idx 0
+		num 0)
+	  (message
+	   "`vip-repeat-from-history' must be invoked as a Vi macro bound to `<key><digit>'")))
+    (while (< 0 num)
+      (setq vip-d-com (vip-special-ring-rotate1 vip-command-ring -1))
+      (setq num (1- num)))
+    (vip-repeat nil)
+    (while (> idx num)
+      (vip-special-ring-rotate1 vip-command-ring 1)
+      (setq num (1+ num)))
+    ))
+      
+
+;; The hash-command. It is invoked interactively by the key sequence #<char>.
+;; The chars that can follow `#' are determined by vip-hash-command-p
+(defun vip-special-prefix-com (char)
+  (cond ((= char ?c)
+	 (downcase-region (min vip-com-point (point))
+			  (max vip-com-point (point))))
+	((= char ?C)
+	 (upcase-region (min vip-com-point (point))
+			(max vip-com-point (point))))
+	((= char ?g)
+	 (push-mark vip-com-point t)
+	 (vip-global-execute))
+	((= char ?q)
+	 (push-mark vip-com-point t)
+	 (vip-quote-region))
+	((= char ?s) (funcall vip-spell-function vip-com-point (point)))
+	(t (error "#%c: %s" char vip-InvalidViCommand))))
+
+
+;; undoing
+
+(defun vip-undo ()
+  "Undo previous change."
+  (interactive)
+  (message "undo!")
+  (let ((modified (buffer-modified-p))
+        (before-undo-pt (point-marker))
+	(after-change-functions after-change-functions)
+	undo-beg-posn undo-end-posn)
+	
+    ;; no need to remove this hook, since this var has scope inside a let.
+    (add-hook 'after-change-functions
+	      '(lambda (beg end len)
+		 (setq undo-beg-posn beg
+		       undo-end-posn (or end beg))))
+  
+    (undo-start)
+    (undo-more 2)
+    (setq undo-beg-posn (or undo-beg-posn before-undo-pt)
+	  undo-end-posn (or undo-end-posn undo-beg-posn))
+    
+    (goto-char undo-beg-posn)
+    (sit-for 0)
+    (if (and vip-keep-point-on-undo
+	     (pos-visible-in-window-p before-undo-pt))
+	(progn
+	  (push-mark (point-marker) t) 
+	  (vip-sit-for-short 300)
+	  (goto-char undo-end-posn)
+	  (vip-sit-for-short 300)
+	  (if (and (> (abs (- undo-beg-posn before-undo-pt)) 1)
+		  (> (abs (- undo-end-posn before-undo-pt)) 1))
+	      (goto-char before-undo-pt)
+	    (goto-char undo-beg-posn)))
+      (push-mark before-undo-pt t))
+    (if (and (eolp) (not (bolp))) (backward-char 1))
+    (if (not modified) (set-buffer-modified-p t)))
+  (setq this-command 'vip-undo))
+
+;; Continue undoing previous changes.
+(defun vip-undo-more ()
+  (message "undo more!")
+  (condition-case nil
+      (undo-more 1)
+    (error (beep)
+	   (message "No further undo information in this buffer")))
+  (if (and (eolp) (not (bolp))) (backward-char 1))
+  (setq this-command 'vip-undo))
+
+;; The following two functions are used to set up undo properly.
+;; In VI, unlike Emacs, if you open a line, say, and add a bunch of lines,
+;; they are undone all at once.  
+(defun vip-adjust-undo ()
+  (let ((inhibit-quit t)
+	tmp tmp2)
+    (setq vip-undo-needs-adjustment nil)
+    (if (listp buffer-undo-list)
+	(if (setq tmp (memq vip-buffer-undo-list-mark buffer-undo-list))
+	    (progn
+	      (setq tmp2 (cdr tmp)) ; the part after mark
+	      
+	      ;; cut tail from buffer-undo-list temporarily by direct
+	      ;; manipulation with pointers in buffer-undo-list
+	      (setcdr tmp nil)
+	      
+	      (setq buffer-undo-list (delq nil buffer-undo-list))
+	      (setq buffer-undo-list
+		    (delq vip-buffer-undo-list-mark buffer-undo-list))
+	      ;; restore tail of buffer-undo-list
+	      (setq buffer-undo-list (nconc buffer-undo-list tmp2)))
+	  (setq buffer-undo-list (delq nil buffer-undo-list))))))
+  
+
+(defun vip-set-complex-command-for-undo ()  
+  (if (listp buffer-undo-list)
+      (if (not vip-undo-needs-adjustment)
+	  (let ((inhibit-quit t))
+	    (setq buffer-undo-list 
+		  (cons vip-buffer-undo-list-mark buffer-undo-list))
+	    (setq vip-undo-needs-adjustment t)))))
+
+
+
+      
+(defun vip-display-current-destructive-command ()
+  (let ((text (nth 4 vip-d-com))
+	(keys (nth 5 vip-d-com))
+	(max-text-len 30))
+    
+    (setq this-command 'vip-display-current-destructive-command)
+	
+    (message " `.' runs  %s%s"
+	     (concat "`" (vip-array-to-string keys) "'")
+	     (vip-abbreviate-string text max-text-len
+				    "  inserting  `" "'" "    ......."))
+    ))
+    
+    
+;; don't change vip-d-com if it was vip-repeat command invoked with `.'
+;; or in some other way (non-interactively).
+(defun vip-set-destructive-command (list)
+  (or (eq vip-intermediate-command 'vip-repeat)
+      (progn
+	(setq vip-d-com list)
+	(setcar (nthcdr 5 vip-d-com)
+		(vip-array-to-string (this-command-keys)))
+	(vip-push-onto-ring vip-d-com 'vip-command-ring))))
+    
+(defun vip-prev-destructive-command (next)
+  "Find previous destructive command in the history of destructive commands.
+With prefix argument, find next destructive command."
+  (interactive "P")
+  (let (cmd vip-intermediate-command)
+    (if (eq last-command 'vip-display-current-destructive-command)
+	;; repeated search through command history
+	(setq vip-intermediate-command 'repeating-display-destructive-command)
+      ;; first search through command history--set temp ring
+      (setq vip-temp-command-ring (copy-list vip-command-ring))) 
+    (setq cmd (if next
+		  (vip-special-ring-rotate1 vip-temp-command-ring 1)
+		(vip-special-ring-rotate1 vip-temp-command-ring -1)))
+    (if (null cmd)
+	()
+      (setq vip-d-com cmd))
+    (vip-display-current-destructive-command)))
+      
+(defun vip-next-destructive-command ()
+  "Find next destructive command in the history of destructive commands."
+  (interactive)
+  (vip-prev-destructive-command 'next))
+  
+(defun vip-insert-prev-from-insertion-ring (arg)
+  "Cycle through insertion ring in the direction of older insertions.
+Undoes previous insertion and inserts new.
+With prefix argument, cycles in the direction of newer elements.
+In minibuffer, this command executes whatever the invocation key is bound
+to in the global map, instead of cycling through the insertion ring."
+  (interactive "P")
+  (let (vip-intermediate-command)
+    (if (eq last-command 'vip-insert-from-insertion-ring)
+	(progn  ; repeated search through insertion history
+	  (setq vip-intermediate-command 'repeating-insertion-from-ring)
+	  (if (eq vip-current-state 'replace-state)
+	      (undo 1)
+	    (if vip-last-inserted-string-from-insertion-ring
+		(backward-delete-char
+		 (length vip-last-inserted-string-from-insertion-ring))))
+	  )
+      ;;first search through insertion history
+      (setq vip-temp-insertion-ring (copy-list vip-insertion-ring)))
+    (setq this-command 'vip-insert-from-insertion-ring)
+    ;; so that things will be undone properly
+    (setq buffer-undo-list (cons nil buffer-undo-list))
+    (setq vip-last-inserted-string-from-insertion-ring
+	  (vip-special-ring-rotate1 vip-temp-insertion-ring (if arg 1 -1)))
+    
+    ;; this change of vip-intermediate-command must come after
+    ;; vip-special-ring-rotate1, so that the ring will rotate, but before the
+    ;; insertion.
+    (setq vip-intermediate-command nil)
+    (if vip-last-inserted-string-from-insertion-ring
+	(insert vip-last-inserted-string-from-insertion-ring))
+    ))
+
+(defun vip-insert-next-from-insertion-ring ()
+  "Cycle through insertion ring in the direction of older insertions.
+Undo previous insertion and inserts new."
+  (interactive)
+  (vip-insert-prev-from-insertion-ring 'next))
+    
+
+;; some region utilities
+
+;; If at the last line of buffer, add \\n before eob, if newline is missing.
+(defun vip-add-newline-at-eob-if-necessary ()
+  (save-excursion
+      (end-of-line)
+      ;; make sure all lines end with newline, unless in the minibuffer or
+      ;; when requested otherwise (require-final-newline is nil)
+      (if (and (eobp)
+	       (not (bolp))
+	       require-final-newline
+	       (not (vip-is-in-minibuffer))
+	       (not buffer-read-only))
+	  (insert "\n"))))
+
+(defun vip-yank-defun ()
+  (mark-defun)
+  (copy-region-as-kill (point) (mark t)))
+
+;; Enlarge region between BEG and END.
+(defun vip-enlarge-region (beg end)
+  (or beg (setq beg end)) ; if beg is nil, set to end
+  (or end (setq end beg)) ; if end is nil, set to beg
+  
+  (if (< beg end)
+      (progn (goto-char beg) (set-mark end))
+    (goto-char end)
+    (set-mark beg))
+  (beginning-of-line)
+  (exchange-point-and-mark)
+  (if (or (not (eobp)) (not (bolp))) (forward-line 1))
+  (if (not (eobp)) (beginning-of-line))
+  (if (> beg end) (exchange-point-and-mark)))
+
+
+;; Quote region by each line with a user supplied string.
+(defun vip-quote-region ()
+  (setq vip-quote-string
+	(vip-read-string-with-history
+	 "Quote string: "
+	 nil
+	 'vip-quote-region-history
+	 vip-quote-string))
+  (vip-enlarge-region (point) (mark t))
+  (if (> (point) (mark t)) (exchange-point-and-mark))
+  (insert vip-quote-string)
+  (beginning-of-line)
+  (forward-line 1)
+  (while (and (< (point) (mark t)) (bolp))
+    (insert vip-quote-string)
+    (beginning-of-line)
+    (forward-line 1)))
+
+;;  Tells whether BEG is on the same line as END.
+;;  If one of the args is nil, it'll return nil.
+(defun vip-same-line (beg end)
+   (let ((selective-display nil)
+	 (incr 0)
+	 temp)
+     (if (and beg end (> beg end))
+	 (setq temp beg
+	       beg end
+	       end temp))
+     (if (and beg end)
+	 (cond ((or (> beg (point-max)) (> end (point-max))) ; out of range
+		nil)
+	       (t
+		;; This 'if' is needed because Emacs treats the next empty line
+		;; as part of the previous line.
+		(if (= (vip-line-pos 'start) end)
+		    (setq incr 1))
+		(<= (+ incr (count-lines beg end)) 1))))
+     ))
+	 
+	 
+;; Check if the string ends with a newline.
+(defun vip-end-with-a-newline-p (string)
+  (or (string= string "")
+      (= (vip-seq-last-elt string) ?\n)))
+
+(defun vip-tmp-insert-at-eob (msg)
+  (let ((savemax (point-max)))
+      (goto-char savemax)
+      (insert msg)
+      (sit-for 2)
+      (goto-char savemax) (delete-region (point) (point-max))
+      ))  
+      
+
+
+;;; Minibuffer business
+	    
+(defsubst vip-set-minibuffer-style ()
+  (add-hook 'minibuffer-setup-hook 'vip-minibuffer-setup-sentinel))
+  
+  
+(defun vip-minibuffer-setup-sentinel ()
+  (let ((hook (if vip-vi-style-in-minibuffer
+		  'vip-change-state-to-insert
+		'vip-change-state-to-emacs)))
+    (funcall hook)
+    ))
+  
+;; Interpret last event in the local map
+(defun vip-exit-minibuffer ()
+  (interactive)
+  (let (command)
+    (setq command (local-key-binding (char-to-string last-command-char)))
+    (if command
+	(command-execute command)
+      (exit-minibuffer))))
+  
+
+;;; Reading string with history  
+    
+(defun vip-read-string-with-history (prompt &optional initial 
+					    history-var default keymap)
+  ;; Read string, prompting with PROMPT and inserting the INITIAL
+  ;; value. Uses HISTORY-VAR. DEFAULT is the default value to accept if the
+  ;; input is an empty string. Use KEYMAP, if given, or the
+  ;; minibuffer-local-map.
+  ;; Default value is displayed until the user types something in the
+  ;; minibuffer. 
+  (let ((minibuffer-setup-hook 
+	 '(lambda ()
+	    (if (stringp initial)
+		(progn
+		  ;; don't wait if we have unread events or in kbd macro
+		  (or unread-command-events
+		      executing-kbd-macro
+		      (sit-for 840))
+		  (erase-buffer)
+		  (insert initial)))
+	    (vip-minibuffer-setup-sentinel)))
+	(val "")
+	(padding "")
+	temp-msg)
+    
+    (setq keymap (or keymap minibuffer-local-map)
+	  initial (or initial "")
+	  temp-msg (if default
+		       (format "(default: %s) " default)
+		     ""))
+		   
+    (setq vip-incomplete-ex-cmd nil)
+    (setq val (read-from-minibuffer prompt 
+				    (concat temp-msg initial val padding)
+				    keymap nil history-var))
+    (setq minibuffer-setup-hook nil
+	  padding (vip-array-to-string (this-command-keys))
+	  temp-msg "")
+    ;; the following tries to be smart about what to put in history
+    (if (not (string= val (car (eval history-var))))
+	(set history-var (cons val (eval history-var))))
+    (if (or (string= (nth 0 (eval history-var)) (nth 1 (eval history-var)))
+	    (string= (nth 0 (eval history-var)) ""))
+	(set history-var (cdr (eval history-var))))
+    ;; If the user enters nothing but the prev cmd wasn't vip-ex,
+    ;; vip-command-argument, or `! shell-command', this probably means 
+    ;; that the user typed something then erased. Return "" in this case, not
+    ;; the default---the default is too confusing in this case.
+    (cond ((and (string= val "")
+		(not (string= prompt "!")) ; was a `! shell-command'
+		(not (memq last-command
+			   '(vip-ex
+			     vip-command-argument
+			     t)
+			   )))
+	   "")
+	  ((string= val "") (or default ""))
+	  (t val))
+    ))
+  
+
+
+;; insertion commands
+
+;; Called when state changes from Insert Vi command mode.
+;; Repeats the insertion command if Insert state was entered with prefix
+;; argument > 1.
+(defun vip-repeat-insert-command ()
+  (let ((i-com (car vip-d-com))
+	(val   (nth 1 vip-d-com))
+	(char  (nth 2 vip-d-com)))
+    (if (and val (> val 1)) ; first check that val is non-nil
+	(progn        
+	  (setq vip-d-com (list i-com (1- val) ?r nil nil nil))
+	  (vip-repeat nil)
+	  (setq vip-d-com (list i-com val char nil nil nil))
+	  ))))
+
+(defun vip-insert (arg)
+  "Insert before point."
+  (interactive "P")
+  (vip-set-complex-command-for-undo)
+  (let ((val (vip-p-val arg))
+	(com (vip-getcom arg)))
+    (vip-set-destructive-command (list 'vip-insert val ?r nil nil nil))
+    (if com
+	(vip-loop val (vip-yank-last-insertion))
+      (vip-change-state-to-insert))))
+
+(defun vip-append (arg)
+  "Append after point."
+  (interactive "P")
+  (vip-set-complex-command-for-undo)
+  (let ((val (vip-p-val arg))
+	(com (vip-getcom arg)))
+    (vip-set-destructive-command (list 'vip-append val ?r nil nil nil))
+    (if (not (eolp)) (forward-char))
+    (if (equal com ?r)
+	(vip-loop val (vip-yank-last-insertion))
+      (vip-change-state-to-insert))))
+
+(defun vip-Append (arg)
+  "Append at end of line."
+  (interactive "P")
+  (vip-set-complex-command-for-undo)
+  (let ((val (vip-p-val arg))
+	(com (vip-getcom arg)))
+    (vip-set-destructive-command (list 'vip-Append val ?r nil nil nil))
+    (end-of-line)
+    (if (equal com ?r)
+	(vip-loop val (vip-yank-last-insertion))
+      (vip-change-state-to-insert))))
+
+(defun vip-Insert (arg)
+  "Insert before first non-white."
+  (interactive "P")
+  (vip-set-complex-command-for-undo)
+  (let ((val (vip-p-val arg))
+	(com (vip-getcom arg)))
+    (vip-set-destructive-command (list 'vip-Insert val ?r nil nil nil))
+    (back-to-indentation)
+    (if (equal com ?r)
+	(vip-loop val (vip-yank-last-insertion))
+      (vip-change-state-to-insert))))
+
+(defun vip-open-line (arg)
+  "Open line below."
+  (interactive "P")
+  (vip-set-complex-command-for-undo)
+  (let ((val (vip-p-val arg))
+	(com (vip-getcom arg)))
+    (vip-set-destructive-command (list 'vip-open-line val ?r nil nil nil))
+    (let ((col (current-indentation)))
+      (if (equal com ?r)
+	  (vip-loop val
+		    (progn
+		      (end-of-line)
+		      (newline 1)
+		      (if vip-auto-indent 
+			  (progn
+			    (setq vip-cted t)
+			    (if vip-electric-mode
+				(indent-according-to-mode)
+			      (indent-to col))
+			    ))
+		      (vip-yank-last-insertion)))
+	(end-of-line)
+	(newline 1)
+	(if vip-auto-indent
+	    (progn
+	      (setq vip-cted t)
+	      (if vip-electric-mode
+		  (indent-according-to-mode)
+		(indent-to col))))
+	(vip-change-state-to-insert)))))
+
+(defun vip-Open-line (arg)
+  "Open line above."
+  (interactive "P")
+  (vip-set-complex-command-for-undo)
+  (let ((val (vip-p-val arg))
+	(com (vip-getcom arg)))
+    (vip-set-destructive-command (list 'vip-Open-line val ?r nil nil nil))
+    (let ((col (current-indentation)))
+      (if (equal com ?r)
+	  (vip-loop val
+		    (progn
+		      (beginning-of-line)
+		      (open-line 1)
+		      (if vip-auto-indent 
+			  (progn
+			    (setq vip-cted t)
+			    (if vip-electric-mode
+				(indent-according-to-mode)
+			      (indent-to col))
+			    ))
+		      (vip-yank-last-insertion)))
+	(beginning-of-line)
+	(open-line 1)
+	(if vip-auto-indent
+	    (progn
+	      (setq vip-cted t)
+	      (if vip-electric-mode
+		  (indent-according-to-mode)
+		(indent-to col))
+	      ))
+	(vip-change-state-to-insert)))))
+
+(defun vip-open-line-at-point (arg)
+  "Open line at point."
+  (interactive "P")
+  (vip-set-complex-command-for-undo)
+  (let ((val (vip-p-val arg))
+	(com (vip-getcom arg)))
+    (vip-set-destructive-command
+     (list 'vip-open-line-at-point val ?r nil nil nil))
+    (if (equal com ?r)
+	(vip-loop val
+		  (progn
+		    (open-line 1)
+		    (vip-yank-last-insertion)))
+      (open-line 1)
+      (vip-change-state-to-insert))))
+
+(defun vip-substitute (arg)
+  "Substitute characters."
+  (interactive "P")
+  (let ((val (vip-p-val arg))
+	(com (vip-getcom arg)))
+    (push-mark nil t)
+    (forward-char val)
+    (if (equal com ?r)
+	(vip-change-subr (mark t) (point))
+      (vip-change (mark t) (point)))
+    (vip-set-destructive-command (list 'vip-substitute val ?r nil nil nil))
+    ))
+
+(defun vip-substitute-line (arg)
+  "Substitute lines."
+  (interactive "p")
+  (vip-set-complex-command-for-undo)
+  (vip-line (cons arg ?C)))
+
+;; Prepare for replace
+(defun vip-start-replace ()
+  (setq vip-began-as-replace t
+	vip-sitting-in-replace t
+	vip-replace-chars-to-delete 0
+	vip-replace-chars-deleted 0)
+  (vip-add-hook 'vip-after-change-functions 'vip-replace-mode-spy-after t)
+  (vip-add-hook 'vip-before-change-functions 'vip-replace-mode-spy-before t)
+  ;; this will get added repeatedly, but no harm
+  (add-hook 'after-change-functions 'vip-after-change-sentinel t)
+  (add-hook 'before-change-functions 'vip-before-change-sentinel t)
+  (vip-move-marker-locally 'vip-last-posn-in-replace-region
+			   (vip-replace-start))
+  (vip-add-hook
+   'vip-post-command-hooks 'vip-replace-state-post-command-sentinel t)
+  (vip-add-hook
+   'vip-pre-command-hooks 'vip-replace-state-pre-command-sentinel t)
+  ;; guard against a smartie who switched from R-replace to normal replace
+  (vip-remove-hook
+   'vip-post-command-hooks 'vip-R-state-post-command-sentinel)
+  (if overwrite-mode (overwrite-mode nil))
+  )
+  
+
+;; checks how many chars were deleted by the last change
+(defun vip-replace-mode-spy-before (beg end)
+  (setq vip-replace-chars-deleted
+	(- end beg
+	   (max 0 (- end (vip-replace-end)))
+	   (max 0 (- (vip-replace-start) beg))
+	   )))
+
+;; Invoked as an after-change-function to set up parameters of the last change
+(defun vip-replace-mode-spy-after (beg end length)
+  (if (memq vip-intermediate-command '(repeating-insertion-from-ring))
+      (progn
+	(setq vip-replace-chars-to-delete 0)
+	(vip-move-marker-locally 
+	 'vip-last-posn-in-replace-region (point)))
+    
+    (let (beg-col end-col real-end chars-to-delete)
+      (setq real-end (min end (vip-replace-end)))
+      (save-excursion
+	(goto-char beg)
+	(setq beg-col (current-column))
+	(goto-char real-end)
+	(setq end-col (current-column)))
+      
+      ;; If beg of change is outside the replacement region, then don't
+      ;; delete anything in the repl region (set chars-to-delete to 0).
+      ;;
+      ;; This works fine except that we have to take special care of
+      ;; dabbrev-expand.  The problem stems from new-dabbrev.el, which
+      ;; sometimes simply shifts the repl region rightwards, without
+      ;; deleting an equal amount of characters.
+      ;;
+      ;; The reason why new-dabbrev.el causes this are this:
+      ;; if one dinamically completes a partial word that starts before the
+      ;; replacement region (but ends inside) then new-dabbrev.el first
+      ;; moves cursor backwards, to the beginning of the word to be
+      ;; completed (say, pt A). Then it inserts the 
+      ;; completed word and then deletes the old, incomplete part.
+      ;; Since the complete word is inserted at position before the repl
+      ;; region, the next If-statement would have set chars-to-delete to 0
+      ;; unless we check for the current command, which must be
+      ;; dabbrev-expand.
+      ;;
+      ;; In fact, it might be also useful to have overlays for insert
+      ;; regions as well, since this will let us capture the situation when
+      ;; dabbrev-expand goes back past the insertion point to find the
+      ;; beginning of the word to be expanded.
+      (if (or (and (<= (vip-replace-start) beg)
+		   (<= beg (vip-replace-end)))
+	      (and (= length 0) (eq this-command 'dabbrev-expand)))
+	  (setq chars-to-delete
+		(max (- end-col beg-col) (- real-end beg) 0))
+	(setq chars-to-delete 0))
+      
+      ;; if beg = last change position, it means that we are within the
+      ;; same command that does multiple changes. Moreover, it means
+      ;; that we have two subsequent changes (insert/delete) that
+      ;; complement each other.
+      (if (= beg (marker-position vip-last-posn-in-replace-region))
+	  (setq vip-replace-chars-to-delete 
+		(- (+ chars-to-delete vip-replace-chars-to-delete)
+		   vip-replace-chars-deleted)) 
+	(setq vip-replace-chars-to-delete chars-to-delete))
+      
+      (vip-move-marker-locally 
+       'vip-last-posn-in-replace-region
+       (max (if (> end (vip-replace-end)) (vip-replace-start) end)
+	    (or (marker-position vip-last-posn-in-replace-region)
+		(vip-replace-start)) 
+	    ))
+      
+      (setq vip-replace-chars-to-delete
+	    (max 0
+		 (min vip-replace-chars-to-delete
+		      (- (vip-replace-end) vip-last-posn-in-replace-region)
+		      (- (vip-line-pos 'end) vip-last-posn-in-replace-region)
+		      )))
+      )))
+
+
+;; Delete stuff between posn and the end of vip-replace-overlay-marker, if
+;; posn is within the overlay.
+(defun vip-finish-change (posn)
+  (vip-remove-hook 'vip-after-change-functions 'vip-replace-mode-spy-after)
+  (vip-remove-hook 'vip-before-change-functions 'vip-replace-mode-spy-before)
+  (vip-remove-hook 'vip-post-command-hooks
+		   'vip-replace-state-post-command-sentinel) 
+  (vip-remove-hook
+   'vip-pre-command-hooks 'vip-replace-state-pre-command-sentinel) 
+  (vip-restore-cursor-color-after-replace)
+  (setq vip-sitting-in-replace nil) ; just in case we'll need to know it
+  (save-excursion
+    (if (and 
+	 vip-replace-overlay
+	 (>= posn (vip-replace-start))
+	 (<  posn (vip-replace-end)))
+	   (delete-region posn (vip-replace-end)))
+    )
+  
+  (if (eq vip-current-state 'replace-state)
+      (vip-downgrade-to-insert))
+  ;; replace mode ended => nullify vip-last-posn-in-replace-region
+  (vip-move-marker-locally 'vip-last-posn-in-replace-region nil)
+  (vip-hide-replace-overlay)
+  (vip-refresh-mode-line)
+  (vip-put-string-on-kill-ring vip-last-replace-region)
+  )
+
+;; Make STRING be the first element of the kill ring.
+(defun vip-put-string-on-kill-ring (string)
+  (setq kill-ring (cons string kill-ring))
+  (if (> (length kill-ring) kill-ring-max)
+      (setcdr (nthcdr (1- kill-ring-max) kill-ring) nil))
+  (setq kill-ring-yank-pointer kill-ring))
+
+(defun vip-finish-R-mode ()
+  (vip-remove-hook 'vip-post-command-hooks 'vip-R-state-post-command-sentinel)
+  (vip-remove-hook
+   'vip-pre-command-hooks 'vip-replace-state-pre-command-sentinel)
+  (vip-downgrade-to-insert))
+  
+(defun vip-start-R-mode ()
+  ;; Leave arg as 1, not t: XEmacs insists that it must be a pos number
+  (overwrite-mode 1)
+  (vip-add-hook
+   'vip-post-command-hooks 'vip-R-state-post-command-sentinel t)
+  (vip-add-hook
+   'vip-pre-command-hooks 'vip-replace-state-pre-command-sentinel t)
+  ;; guard against a smartie who switched from R-replace to normal replace
+  (vip-remove-hook
+   'vip-post-command-hooks 'vip-replace-state-post-command-sentinel)
+  )
+
+
+  
+(defun vip-replace-state-exit-cmd ()
+  "Binding for keys that cause Replace state to switch to Vi or to Insert.
+These keys are ESC, RET, and LineFeed"
+  (interactive)
+  (if overwrite-mode  ;; If you are in replace mode invoked via 'R'
+      (vip-finish-R-mode)
+    (vip-finish-change vip-last-posn-in-replace-region))
+  (let (com)
+    (if (eq this-command 'vip-intercept-ESC-key)
+	(setq com 'vip-exit-insert-state)
+      (vip-set-unread-command-events last-input-char)
+      (setq com (key-binding (read-key-sequence nil))))
+      
+    (condition-case conds
+	(command-execute com)
+      (error
+       (vip-message-conditions conds)))
+    )
+  (vip-hide-replace-overlay))
+
+(defun vip-replace-state-carriage-return ()
+  "Implements carriage return in Viper replace state."
+  (interactive)
+  ;; If Emacs start supporting overlay maps, as it currently supports
+  ;; text-property maps, we could do away with vip-replace-minor-mode and
+  ;; just have keymap attached to replace overlay. Then the "if part" of this
+  ;; statement can be deleted.
+  (if (or (< (point) (vip-replace-start))
+	  (> (point) (vip-replace-end)))
+      (let (vip-replace-minor-mode com)
+	(vip-set-unread-command-events last-input-char)
+	(setq com (key-binding (read-key-sequence nil)))
+	(condition-case conds
+	    (command-execute com)
+	  (error
+	   (vip-message-conditions conds))))
+    (if (not vip-allow-multiline-replace-regions)
+	(vip-replace-state-exit-cmd)
+      (if (vip-same-line (point) (vip-replace-end))
+	  (vip-replace-state-exit-cmd)
+	(vip-kill-line nil)
+	(vip-next-line-at-bol nil)))))
+
+  
+;; This is the function bound to 'R'---unlimited replace.
+;; Similar to Emacs's own overwrite-mode.
+(defun vip-overwrite (arg) 
+  "Begin overwrite mode."
+  (interactive "P")
+  (let ((val (vip-p-val arg))
+	(com (vip-getcom arg)) (len))
+    (vip-set-destructive-command (list 'vip-overwrite val ?r nil nil nil))
+    (if com
+	(progn 
+	  ;; Viper saves inserted text in vip-last-insertion
+	  (setq len (length vip-last-insertion))
+	  (delete-char len)	
+	  (vip-loop val (vip-yank-last-insertion)))
+      (setq last-command 'vip-overwrite)
+      (vip-set-complex-command-for-undo)
+      (vip-set-replace-overlay (point) (vip-line-pos 'end))
+      (vip-change-state-to-replace)
+      )))
+
+
+;; line commands
+
+(defun vip-line (arg)
+  (let ((val (car arg))
+	(com (cdr arg)))
+    (vip-move-marker-locally 'vip-com-point (point))
+    (if (not (eobp))
+	(vip-next-line-carefully (1- val)))
+    ;; this ensures that dd, cc, D, yy will do the right thing on the last
+    ;; line of buffer when this line has no \n.
+    (vip-add-newline-at-eob-if-necessary)
+    (vip-execute-com 'vip-line val com))
+  (if (and (eobp) (not (bobp))) (forward-line -1))
+  )
+
+(defun vip-yank-line (arg)
+  "Yank ARG lines (in Vi's sense)."
+  (interactive "P")
+  (let ((val (vip-p-val arg)))
+    (vip-line (cons val ?Y))))
+
+
+;; region commands
+
+(defun vip-region (arg)
+  "Execute command on a region."
+  (interactive "P")
+  (let ((val (vip-P-val arg))
+	(com (vip-getcom arg)))
+    (vip-move-marker-locally 'vip-com-point (point))
+    (exchange-point-and-mark)
+    (vip-execute-com 'vip-region val com)))
+
+(defun vip-Region (arg)
+  "Execute command on a Region."
+  (interactive "P")
+  (let ((val (vip-P-val arg))
+	(com (vip-getCom arg)))
+    (vip-move-marker-locally 'vip-com-point (point))
+    (exchange-point-and-mark)
+    (vip-execute-com 'vip-Region val com)))
+
+(defun vip-replace-char (arg)
+  "Replace the following ARG chars by the character read."
+  (interactive "P")
+  (if (and (eolp) (bolp)) (error "No character to replace here"))
+  (let ((val (vip-p-val arg))
+	(com (vip-getcom arg)))
+    (vip-replace-char-subr com val)
+    (if (and (eolp) (not (bolp))) (forward-char 1))
+    (vip-set-destructive-command
+     (list 'vip-replace-char val ?r nil vip-d-char nil))
+  ))
+
+(defun vip-replace-char-subr (com arg)
+  (let ((take-care-of-iso-accents
+	 (and (boundp 'iso-accents-mode) vip-automatic-iso-accents))
+	char)
+    (setq char (if (equal com ?r)
+		   vip-d-char
+		 (read-char)))
+    (if (and  take-care-of-iso-accents (memq char '(?' ?\" ?^ ?~)))
+	;; get European characters
+	(progn
+	  (iso-accents-mode 1)
+	  (vip-set-unread-command-events char)
+	  (setq char (aref (read-key-sequence nil) 0))
+	  (iso-accents-mode -1)))
+    (delete-char arg t)
+    (setq vip-d-char char)
+    (vip-loop (if (> arg 0) arg (- arg)) 
+	    (if (eq char ?\C-m) (insert "\n") (insert char)))
+    (backward-char arg)))
+
+
+;; basic cursor movement.  j, k, l, h commands.
+
+(defun vip-forward-char (arg)
+  "Move point right ARG characters (left if ARG negative).
+On reaching end of line, stop and signal error."
+  (interactive "P")
+  (vip-leave-region-active)
+  (let ((val (vip-p-val arg))
+	(com (vip-getcom arg)))
+    (if com (vip-move-marker-locally 'vip-com-point (point)))
+    (if vip-ex-style-motion
+	(progn
+	  ;; the boundary condition check gets weird here because
+	  ;; forward-char may be the parameter of a delete, and 'dl' works
+	  ;; just like 'x' for the last char on a line, so we have to allow
+	  ;; the forward motion before the 'vip-execute-com', but, of
+	  ;; course, 'dl' doesn't work on an empty line, so we have to
+	  ;; catch that condition before 'vip-execute-com'
+	  (if (and (eolp) (bolp)) (error "") (forward-char val))
+	  (if com (vip-execute-com 'vip-forward-char val com))
+	  (if (eolp) (progn (backward-char 1) (error ""))))
+      (forward-char val)
+      (if com (vip-execute-com 'vip-forward-char val com)))))
+
+(defun vip-backward-char (arg)
+  "Move point left ARG characters (right if ARG negative). 
+On reaching beginning of line, stop and signal error."
+  (interactive "P")
+  (vip-leave-region-active)
+  (let ((val (vip-p-val arg))
+	(com (vip-getcom arg)))
+    (if com (vip-move-marker-locally 'vip-com-point (point)))
+    (if vip-ex-style-motion
+	(progn
+	  (if (bolp) (error "") (backward-char val))
+	  (if com (vip-execute-com 'vip-backward-char val com)))
+      (backward-char val)
+      (if com (vip-execute-com 'vip-backward-char val com)))))
+      
+;; Like forward-char, but doesn't move at end of buffer.
+(defun vip-forward-char-carefully (&optional arg)      
+  (setq arg (or arg 1))
+  (if (>= (point-max) (+ (point) arg))
+      (forward-char arg)
+    (goto-char (point-max))))
+      
+;; Like backward-char, but doesn't move at end of buffer.
+(defun vip-backward-char-carefully (&optional arg)      
+  (setq arg (or arg 1))
+  (if (<= (point-min) (- (point) arg))
+      (backward-char arg)
+    (goto-char (point-min))))
+
+(defun vip-next-line-carefully (arg)
+  (condition-case nil
+      (next-line arg)
+    (error nil)))
+
+
+
+;;; Word command
+
+;; Words are formed from alpha's and nonalphas - <sp>,\t\n are separators
+;; for word movement. When executed with a destructive command, \n is
+;; usually left untouched for the last word.
+;; Viper uses syntax table to determine what is a word and what is a
+;; separator. However, \n is always a separator. Also, if vip-syntax-preference
+;; is 'vi, then `_' is part of the word.
+
+;; skip only one \n
+(defun vip-skip-separators (forward)
+  (if forward
+      (progn
+	(vip-skip-all-separators-forward 'within-line)
+	(if (looking-at "\n")
+	    (progn
+	      (forward-char)
+	      (vip-skip-all-separators-forward  'within-line))))
+    (vip-skip-all-separators-backward 'within-line)
+    (backward-char)
+    (if (looking-at "\n")
+	(vip-skip-all-separators-backward 'within-line)
+      (forward-char))))
+      
+(defun vip-forward-word-kernel (val)
+  (while (> val 0)
+    (cond ((vip-looking-at-alpha)
+	   (vip-skip-alpha-forward "_")
+	   (vip-skip-separators t))
+	  ((vip-looking-at-separator)
+	   (vip-skip-separators t))
+	  ((not (vip-looking-at-alphasep))
+	   (vip-skip-nonalphasep-forward)
+	   (vip-skip-separators t)))
+    (setq val (1- val))))
+
+;; first search backward for pat. Then skip chars backwards using aux-pat
+(defun vip-fwd-skip (pat aux-pat lim)
+  (if (and (save-excursion 
+	     (re-search-backward pat lim t))
+	   (= (point) (match-end 0)))
+      (goto-char (match-beginning 0)))
+  (skip-chars-backward aux-pat lim)
+  (if (= (point) lim)
+      (vip-forward-char-carefully))
+  )
+
+	  
+(defun vip-forward-word (arg)
+  "Forward word."
+  (interactive "P")
+  (vip-leave-region-active)
+  (let ((val (vip-p-val arg))
+	(com (vip-getcom arg)))
+    (if com (vip-move-marker-locally 'vip-com-point (point)))
+    (vip-forward-word-kernel val)
+    (if com (progn
+	      (cond ((memq com (list ?c (- ?c)))
+		     (vip-fwd-skip "\n[ \t]*" " \t" vip-com-point))
+		    ;; Yank words including the whitespace, but not newline
+		    ((memq com (list ?y (- ?y)))
+		     (vip-fwd-skip "\n[ \t]*" "" vip-com-point))
+		    ((vip-dotable-command-p com)
+		     (vip-fwd-skip "\n[ \t]*" "" vip-com-point)))
+	      (vip-execute-com 'vip-forward-word val com)))))
+	  
+
+(defun vip-forward-Word (arg)
+  "Forward word delimited by white characters."
+  (interactive "P")
+  (vip-leave-region-active)
+  (let ((val (vip-p-val arg))
+	(com (vip-getcom arg)))
+    (if com (vip-move-marker-locally 'vip-com-point (point)))
+    (vip-loop val
+	      (progn
+		(vip-skip-nonseparators 'forward)
+		(vip-skip-separators t)))
+    (if com (progn
+	      (cond ((memq com (list ?c (- ?c)))
+		     (vip-fwd-skip "\n[ \t]*" " \t" vip-com-point))
+		    ;; Yank words including the whitespace, but not newline
+		    ((memq com (list ?y (- ?y)))
+		     (vip-fwd-skip "\n[ \t]*" "" vip-com-point))
+		    ((vip-dotable-command-p com)
+		     (vip-fwd-skip "\n[ \t]*" "" vip-com-point)))
+	      (vip-execute-com 'vip-forward-Word val com)))))
+
+
+;; this is a bit different from Vi, but Vi's end of word 
+;; makes no sense whatsoever
+(defun vip-end-of-word-kernel ()
+  (if (vip-end-of-word-p) (forward-char))
+  (if (vip-looking-at-separator)
+      (vip-skip-all-separators-forward))
+  
+  (cond ((vip-looking-at-alpha) (vip-skip-alpha-forward "_"))
+	((not (vip-looking-at-alphasep)) (vip-skip-nonalphasep-forward)))
+  (vip-backward-char-carefully))
+
+(defun vip-end-of-word-p ()
+  (or (eobp) 
+      (save-excursion
+	(cond ((vip-looking-at-alpha)
+	       (forward-char)
+	       (not (vip-looking-at-alpha)))
+	      ((not (vip-looking-at-alphasep))
+	       (forward-char)
+	       (vip-looking-at-alphasep))))))
+
+
+(defun vip-end-of-word (arg &optional careful)
+  "Move point to end of current word."
+  (interactive "P")
+  (vip-leave-region-active)
+  (let ((val (vip-p-val arg))
+	(com (vip-getcom arg)))
+    (if com (vip-move-marker-locally 'vip-com-point (point)))
+    (vip-loop val (vip-end-of-word-kernel))
+    (if com 
+	(progn
+	  (forward-char)
+	  (vip-execute-com 'vip-end-of-word val com)))))
+
+(defun vip-end-of-Word (arg)
+  "Forward to end of word delimited by white character."
+  (interactive "P")
+  (vip-leave-region-active)
+  (let ((val (vip-p-val arg))
+	(com (vip-getcom arg)))
+    (if com (vip-move-marker-locally 'vip-com-point (point)))
+    (vip-loop val
+	      (progn
+		(vip-end-of-word-kernel)
+		(vip-skip-nonseparators 'forward)
+		(backward-char)))
+    (if com 
+	(progn
+	  (forward-char)
+	  (vip-execute-com 'vip-end-of-Word val com)))))
+
+(defun vip-backward-word-kernel (val)
+  (while (> val 0)
+    (backward-char)
+    (cond ((vip-looking-at-alpha)
+	   (vip-skip-alpha-backward "_"))
+	  ((vip-looking-at-separator)
+	   (forward-char)
+	   (vip-skip-separators nil)
+	   (backward-char)
+	   (cond ((vip-looking-at-alpha)
+		  (vip-skip-alpha-backward "_"))
+		 ((not (vip-looking-at-alphasep))
+		  (vip-skip-nonalphasep-backward))
+		 (t (forward-char))))
+	  ((not (vip-looking-at-alphasep))
+	   (vip-skip-nonalphasep-backward)))
+    (setq val (1- val))))
+
+(defun vip-backward-word (arg)
+  "Backward word."
+  (interactive "P")
+  (vip-leave-region-active)
+  (let ((val (vip-p-val arg))
+	(com (vip-getcom arg)))
+    (if com
+	(let (i)
+	  (if (setq i (save-excursion (backward-char) (looking-at "\n")))
+	      (backward-char))
+	  (vip-move-marker-locally 'vip-com-point (point))
+	  (if i (forward-char))))
+    (vip-backward-word-kernel val)
+    (if com (vip-execute-com 'vip-backward-word val com))))
+
+(defun vip-backward-Word (arg)
+  "Backward word delimited by white character."
+  (interactive "P")
+  (vip-leave-region-active)
+  (let ((val (vip-p-val arg))
+	(com (vip-getcom arg)))
+    (if com
+	(let (i)
+	  (if (setq i (save-excursion (backward-char) (looking-at "\n")))
+	      (backward-char))
+	  (vip-move-marker-locally 'vip-com-point (point))
+	  (if i (forward-char))))
+    (vip-loop val
+	      (progn 
+		(vip-skip-separators nil)
+		(vip-skip-nonseparators 'backward)))
+    (if com (vip-execute-com 'vip-backward-Word val com))))
+
+
+
+;; line commands
+
+(defun vip-beginning-of-line (arg)
+  "Go to beginning of line."
+  (interactive "P")
+  (vip-leave-region-active)
+  (let ((val (vip-p-val arg))
+	(com (vip-getcom arg)))
+    (if com (vip-move-marker-locally 'vip-com-point (point)))
+    (beginning-of-line val)
+    (if com (vip-execute-com 'vip-beginning-of-line val com))))
+
+(defun vip-bol-and-skip-white (arg)
+  "Beginning of line at first non-white character."
+  (interactive "P")
+  (vip-leave-region-active)
+  (let ((val (vip-p-val arg))
+	(com (vip-getcom arg)))
+    (if com (vip-move-marker-locally 'vip-com-point (point)))
+    (forward-to-indentation (1- val))
+    (if com (vip-execute-com 'vip-bol-and-skip-white val com))))
+
+(defun vip-goto-eol (arg)
+  "Go to end of line."
+  (interactive "P")
+  (vip-leave-region-active)
+  (let ((val (vip-p-val arg))
+	(com (vip-getcom arg)))
+    (if com (vip-move-marker-locally 'vip-com-point (point)))
+    (end-of-line val)
+    (if com (vip-execute-com 'vip-goto-eol val com))
+    (if vip-ex-style-motion
+	(if (and (eolp) (not (bolp)) 
+		 ;; a fix for vip-change-to-eol
+		 (not (equal vip-current-state 'insert-state)))
+	    (backward-char 1)
+    ))))
+
+
+(defun vip-goto-col (arg)
+  "Go to ARG's column."
+  (interactive "P")
+  (vip-leave-region-active)
+  (let ((val (vip-p-val arg))
+	(com (vip-getcom arg))
+	line-len)
+    (setq line-len (- (vip-line-pos 'end) (vip-line-pos 'start)))
+    (if com (vip-move-marker-locally 'vip-com-point (point)))
+    (beginning-of-line)
+    (forward-char (1- (min line-len val)))
+    (while (> (current-column) (1- val))
+      (backward-char 1))
+    (if com (vip-execute-com 'vip-goto-col val com))
+    (save-excursion
+      (end-of-line)
+      (if (> val (current-column)) (error "")))
+    ))
+    
+
+(defun vip-next-line (arg)
+  "Go to next line."
+  (interactive "P")
+  (vip-leave-region-active)
+  (let ((val (vip-p-val arg))
+	(com (vip-getCom arg)))
+    (if com (vip-move-marker-locally 'vip-com-point (point)))
+    (next-line val)
+    (if vip-ex-style-motion
+	(if (and (eolp) (not (bolp))) (backward-char 1)))
+    (setq this-command 'next-line)
+    (if com (vip-execute-com 'vip-next-line val com))))
+
+(defun vip-next-line-at-bol (arg)
+  "Next line at beginning of line."
+  (interactive "P")
+  (vip-leave-region-active)
+  (save-excursion
+    (end-of-line)
+    (if (eobp) (error "Last line in buffer")))
+  (let ((val (vip-p-val arg))
+	(com (vip-getCom arg)))
+    (if com (vip-move-marker-locally 'vip-com-point (point)))
+    (forward-line val)
+    (back-to-indentation)
+    (if com (vip-execute-com 'vip-next-line-at-bol val com))))
+
+(defun vip-previous-line (arg)	 
+  "Go to previous line."    	
+  (interactive "P")
+  (vip-leave-region-active)
+  (let ((val (vip-p-val arg))
+	(com (vip-getCom arg)))
+    (if com (vip-move-marker-locally 'vip-com-point (point)))
+    (previous-line val)
+    (if vip-ex-style-motion
+	(if (and (eolp) (not (bolp))) (backward-char 1)))
+    (setq this-command 'previous-line)
+    (if com (vip-execute-com 'vip-previous-line val com))))
+
+
+(defun vip-previous-line-at-bol (arg)
+  "Previous line at beginning of line."
+  (interactive "P")
+  (vip-leave-region-active)
+  (save-excursion
+    (beginning-of-line)
+    (if (bobp) (error "First line in buffer")))
+  (let ((val (vip-p-val arg))
+	(com (vip-getCom arg)))
+    (if com (vip-move-marker-locally 'vip-com-point (point)))
+    (forward-line (- val))
+    (back-to-indentation)
+    (if com (vip-execute-com 'vip-previous-line val com))))
+
+(defun vip-change-to-eol (arg)
+  "Change to end of line."
+  (interactive "P")
+  (vip-goto-eol (cons arg ?c)))
+
+(defun vip-kill-line (arg)
+  "Delete line."
+  (interactive "P")
+  (vip-goto-eol (cons arg ?d)))
+
+(defun vip-erase-line (arg)
+  "Erase line."
+  (interactive "P")
+  (vip-beginning-of-line (cons arg ?d)))
+
+
+;;; Moving around
+
+(defun vip-goto-line (arg)
+  "Go to ARG's line.  Without ARG go to end of buffer."
+  (interactive "P")
+  (let ((val (vip-P-val arg))
+	(com (vip-getCom arg)))
+    (vip-move-marker-locally 'vip-com-point (point))
+    (vip-deactivate-mark)
+    (push-mark nil t)
+    (if (null val)
+	(goto-char (point-max))
+      (goto-char (point-min))
+      (forward-line (1- val)))
+    
+    ;; positioning is done twice: before and after command execution
+    (if (and (eobp) (bolp) (not (bobp))) (forward-line -1))
+    (back-to-indentation)
+    
+    (if com (vip-execute-com 'vip-goto-line val com))
+    
+    (if (and (eobp) (bolp) (not (bobp))) (forward-line -1))
+    (back-to-indentation)
+    ))
+
+;; Find ARG's occurrence of CHAR on the current line. 
+;; If FORWARD then search is forward, otherwise backward.  OFFSET is used to
+;; adjust point after search.
+(defun vip-find-char (arg char forward offset)
+  (or (char-or-string-p char) (error ""))
+  (let ((arg (if forward arg (- arg)))
+	(cmd (if (eq vip-intermediate-command 'vip-repeat)
+		 (nth 5 vip-d-com)
+	       (vip-array-to-string (this-command-keys))))
+	point)
+    (save-excursion
+      (save-restriction
+	(if (> arg 0)
+	    (narrow-to-region
+	     ;; forward search begins here
+	     (if (eolp) (error "Command `%s':  At end of line" cmd) (point))
+	     ;; forward search ends here
+	     (progn (end-of-line) (point)))
+	  (narrow-to-region
+	   ;; backward search begins from here
+	   (if (bolp)
+	       (error "Command `%s':  At beginning of line" cmd) (point))
+	   ;; backward search ends here
+	   (progn (beginning-of-line) (point))))
+	;; if arg > 0, point is forwarded before search.
+	(if (> arg 0) (goto-char (1+ (point-min)))
+	  (goto-char (point-max)))
+	(if (let ((case-fold-search nil))
+	      (search-forward (char-to-string char) nil 0 arg))
+	    (setq point (point))
+	  (error "Command `%s':  `%c' not found" cmd char))))
+    (goto-char (+ point (if (> arg 0) (if offset -2 -1) (if offset 1 0))))))
+
+(defun vip-find-char-forward (arg)
+  "Find char on the line. 
+If called interactively read the char to find from the terminal, and if
+called from vip-repeat, the char last used is used.  This behaviour is
+controlled by the sign of prefix numeric value."
+  (interactive "P")
+  (let ((val (vip-p-val arg))
+	(com (vip-getcom arg))
+	(cmd-representation (nth 5 vip-d-com)))
+    (if (> val 0)
+	;; this means that the function was called interactively
+	(setq vip-f-char (read-char)
+	      vip-f-forward t
+	      vip-f-offset nil)
+      ;; vip-repeat --- set vip-F-char from command-keys
+      (setq vip-F-char (if (stringp cmd-representation)
+			   (vip-seq-last-elt cmd-representation)
+			 vip-F-char)
+	    vip-f-char vip-F-char)
+      (setq val (- val)))
+    (if com (vip-move-marker-locally 'vip-com-point (point)))
+    (vip-find-char val (if (> (vip-p-val arg) 0) vip-f-char vip-F-char) t nil)
+    (setq val (- val))
+    (if com
+	(progn
+	  (setq vip-F-char vip-f-char) ; set new vip-F-char
+	  (forward-char)
+	  (vip-execute-com 'vip-find-char-forward val com)))))
+
+(defun vip-goto-char-forward (arg)
+  "Go up to char ARG forward on line."
+  (interactive "P")
+  (let ((val (vip-p-val arg))
+	(com (vip-getcom arg))
+	(cmd-representation (nth 5 vip-d-com)))
+    (if (> val 0)
+	;; this means that the function was called interactively
+	(setq vip-f-char (read-char)
+	      vip-f-forward t
+	      vip-f-offset t)
+      ;; vip-repeat --- set vip-F-char from command-keys
+      (setq vip-F-char (if (stringp cmd-representation)
+			   (vip-seq-last-elt cmd-representation)
+			 vip-F-char)
+	    vip-f-char vip-F-char)
+      (setq val (- val)))
+    (if com (vip-move-marker-locally 'vip-com-point (point)))
+    (vip-find-char val (if (> (vip-p-val arg) 0) vip-f-char vip-F-char) t t)
+    (setq val (- val))
+    (if com
+	(progn
+	  (setq vip-F-char vip-f-char) ; set new vip-F-char
+	  (forward-char)
+	  (vip-execute-com 'vip-goto-char-forward val com)))))
+
+(defun vip-find-char-backward (arg)
+  "Find char ARG on line backward."
+  (interactive "P")
+  (let ((val (vip-p-val arg))
+	(com (vip-getcom arg))
+	(cmd-representation (nth 5 vip-d-com)))
+    (if (> val 0)
+	;; this means that the function was called interactively
+	(setq vip-f-char (read-char)
+	      vip-f-forward nil
+	      vip-f-offset nil)
+      ;; vip-repeat --- set vip-F-char from command-keys
+      (setq vip-F-char (if (stringp cmd-representation)
+			   (vip-seq-last-elt cmd-representation)
+			 vip-F-char)
+	    vip-f-char vip-F-char)
+      (setq val (- val)))
+    (if com (vip-move-marker-locally 'vip-com-point (point)))
+    (vip-find-char
+     val (if (> (vip-p-val arg) 0) vip-f-char vip-F-char) nil nil)
+    (setq val (- val))
+    (if com
+	(progn
+	  (setq vip-F-char vip-f-char) ; set new vip-F-char
+	  (vip-execute-com 'vip-find-char-backward val com)))))
+
+(defun vip-goto-char-backward (arg)
+  "Go up to char ARG backward on line."
+  (interactive "P")
+  (let ((val (vip-p-val arg))
+	(com (vip-getcom arg))
+	(cmd-representation (nth 5 vip-d-com)))
+    (if (> val 0)
+	;; this means that the function was called interactively
+	(setq vip-f-char (read-char)
+	      vip-f-forward nil
+	      vip-f-offset t)
+      ;; vip-repeat --- set vip-F-char from command-keys
+      (setq vip-F-char (if (stringp cmd-representation)
+			   (vip-seq-last-elt cmd-representation)
+			 vip-F-char)
+	    vip-f-char vip-F-char)
+      (setq val (- val)))
+    (if com (vip-move-marker-locally 'vip-com-point (point)))
+    (vip-find-char val (if (> (vip-p-val arg) 0) vip-f-char vip-F-char) nil t)
+    (setq val (- val))
+    (if com
+	(progn
+	  (setq vip-F-char vip-f-char) ; set new vip-F-char
+	  (vip-execute-com 'vip-goto-char-backward val com)))))
+
+(defun vip-repeat-find (arg)
+  "Repeat previous find command."
+  (interactive "P")
+  (let ((val (vip-p-val arg))
+	(com (vip-getcom arg)))
+    (vip-deactivate-mark)
+    (if com (vip-move-marker-locally 'vip-com-point (point)))
+    (vip-find-char val vip-f-char vip-f-forward vip-f-offset)
+    (if com
+	(progn
+	  (if vip-f-forward (forward-char))
+	  (vip-execute-com 'vip-repeat-find val com)))))
+
+(defun vip-repeat-find-opposite (arg)
+  "Repeat previous find command in the opposite direction."
+  (interactive "P")
+  (let ((val (vip-p-val arg))
+	(com (vip-getcom arg)))
+    (vip-deactivate-mark)
+    (if com (vip-move-marker-locally 'vip-com-point (point)))
+    (vip-find-char val vip-f-char (not vip-f-forward) vip-f-offset)
+    (if com
+	(progn
+	  (if vip-f-forward (forward-char))
+	  (vip-execute-com 'vip-repeat-find-opposite val com)))))
+
+
+;; window scrolling etc.
+
+(defun vip-other-window (arg)
+  "Switch to other window."
+  (interactive "p")
+  (other-window arg)
+  (or (not (eq vip-current-state 'emacs-state))
+      (string= (buffer-name (current-buffer)) " *Minibuf-1*")
+      (vip-change-state-to-vi)))
+
+(defun vip-window-top (arg)
+  "Go to home window line."
+  (interactive "P")
+  (let ((val (vip-p-val arg))
+	(com (vip-getCom arg)))
+    (if com (vip-move-marker-locally 'vip-com-point (point)))
+    (push-mark nil t) 
+    (move-to-window-line (1- val))
+
+    ;; positioning is done twice: before and after command execution
+    (if (and (eobp) (bolp) (not (bobp))) (forward-line -1))
+    (back-to-indentation)
+    
+    (if com (vip-execute-com 'vip-window-top val com))
+    
+    (if (and (eobp) (bolp) (not (bobp))) (forward-line -1))
+    (back-to-indentation)
+    ))
+
+(defun vip-window-middle (arg)
+  "Go to middle window line."
+  (interactive "P")
+  (let ((val (vip-p-val arg))
+	(com (vip-getCom arg))
+	lines)
+    (if com (vip-move-marker-locally 'vip-com-point (point)))
+    (push-mark nil t) 
+    (if (not (pos-visible-in-window-p (point-max)))
+	(move-to-window-line (+ (/ (1- (window-height)) 2) (1- val)))
+      (setq lines (count-lines (window-start) (point-max)))
+      (move-to-window-line (+ (/ lines 2) (1- val))))
+      
+    ;; positioning is done twice: before and after command execution
+    (if (and (eobp) (bolp) (not (bobp))) (forward-line -1))
+    (back-to-indentation)
+
+    (if com (vip-execute-com 'vip-window-middle val com))
+    
+    (if (and (eobp) (bolp) (not (bobp))) (forward-line -1))
+    (back-to-indentation)
+    ))
+
+(defun vip-window-bottom (arg)
+  "Go to last window line."
+  (interactive "P")
+  (let ((val (vip-p-val arg))
+	(com (vip-getCom arg)))
+    (if com (vip-move-marker-locally 'vip-com-point (point)))
+    (push-mark nil t) 
+    (move-to-window-line (- val))
+    
+    ;; positioning is done twice: before and after command execution
+    (if (and (eobp) (bolp) (not (bobp))) (forward-line -1))
+    (back-to-indentation)
+
+    (if com (vip-execute-com 'vip-window-bottom val com))
+    
+    (if (and (eobp) (bolp) (not (bobp))) (forward-line -1))
+    (back-to-indentation)
+    ))
+
+(defun vip-line-to-top (arg)
+  "Put current line on the home line."
+  (interactive "p")
+  (recenter (1- arg)))
+
+(defun vip-line-to-middle (arg)
+  "Put current line on the middle line."
+  (interactive "p")
+  (recenter (+ (1- arg) (/ (1- (window-height)) 2))))
+
+(defun vip-line-to-bottom (arg)
+  "Put current line on the last line."
+  (interactive "p")
+  (recenter (- (window-height) (1+ arg))))
+
+;; If point is within vip-search-scroll-threshold of window top or bottom,
+;; scroll up or down 1/7 of window height, depending on whether we are at the
+;; bottom or at the top of the  window. This function is called by vip-search
+;; (which is called from vip-search-forward/backward/next). If the value of
+;; vip-search-scroll-threshold is negative - don't scroll.
+(defun vip-adjust-window ()
+  (let ((win-height (if vip-emacs-p
+			(1- (window-height)) ; adjust for modeline
+		      (window-displayed-height)))
+	(pt (point))
+	at-top-p at-bottom-p
+	min-scroll direction)
+    (save-excursion
+      (move-to-window-line 0) ; top
+      (setq at-top-p
+	    (<= (count-lines pt (point))
+		vip-search-scroll-threshold))
+      (move-to-window-line -1) ; bottom
+      (setq at-bottom-p
+	    (<= (count-lines pt (point)) vip-search-scroll-threshold))
+      )
+    (cond (at-top-p (setq min-scroll (1- vip-search-scroll-threshold)
+			  direction  1))
+	  (at-bottom-p (setq min-scroll (1+ vip-search-scroll-threshold)
+			     direction -1)))
+    (if min-scroll
+	(recenter
+	 (* (max min-scroll (/ win-height 7)) direction)))
+    ))
+
+
+;; paren match
+;; must correct this to only match ( to ) etc. On the other hand
+;; it is good that paren match gets confused, because that way you
+;; catch _all_ imbalances. 
+
+(defun vip-paren-match (arg)
+  "Go to the matching parenthesis."
+  (interactive "P")
+  (vip-leave-region-active)
+  (let ((com (vip-getcom arg))
+	(parse-sexp-ignore-comments vip-parse-sexp-ignore-comments)
+	anchor-point)
+    (if (integerp arg)
+	(if (or (> arg 99) (< arg 1))
+	    (error "Prefix must be between 1 and 99")
+	  (goto-char
+	   (if (> (point-max) 80000)
+	       (* (/ (point-max) 100) arg)
+	     (/ (* (point-max) arg) 100)))
+	  (back-to-indentation))
+      (let (beg-lim end-lim)
+	(if (and (eolp) (not (bolp))) (forward-char -1))
+	(if (not (looking-at "[][(){}]"))
+	    (setq anchor-point (point)))
+	(save-excursion
+	  (beginning-of-line)
+	  (setq beg-lim (point))
+	  (end-of-line)
+	  (setq end-lim (point)))
+	(cond ((re-search-forward "[][(){}]" end-lim t) 
+	       (backward-char) )
+	      ((re-search-backward "[][(){}]" beg-lim t))
+	      (t
+	       (error "No matching character on line"))))
+      (cond ((looking-at "[\(\[{]")
+	     (if com (vip-move-marker-locally 'vip-com-point (point)))
+	     (forward-sexp 1)
+	     (if com
+		 (vip-execute-com 'vip-paren-match nil com)
+	       (backward-char)))
+	    (anchor-point
+	     (if com
+		 (progn
+		   (vip-move-marker-locally 'vip-com-point anchor-point)
+		   (forward-char 1)
+		   (vip-execute-com 'vip-paren-match nil com)
+		   )))
+	    ((looking-at "[])}]")
+	     (forward-char)
+	     (if com (vip-move-marker-locally 'vip-com-point (point)))
+	     (backward-sexp 1)
+	     (if com (vip-execute-com 'vip-paren-match nil com)))
+	    (t (error ""))))))
+
+(defun vip-toggle-parse-sexp-ignore-comments ()
+  (interactive)
+  (setq vip-parse-sexp-ignore-comments (not vip-parse-sexp-ignore-comments))
+  (prin1 (format "`%%' will %signore parentheses inside the comments"
+	   (if vip-parse-sexp-ignore-comments "" "NOT ")))
+  )
+
+
+;; sentence ,paragraph and heading
+
+(defun vip-forward-sentence (arg)
+  "Forward sentence."
+  (interactive "P")
+  (push-mark nil t) 
+  (let ((val (vip-p-val arg))
+	(com (vip-getcom arg)))
+    (if com (vip-move-marker-locally 'vip-com-point (point)))
+    (forward-sentence val)
+    (if com (vip-execute-com 'vip-forward-sentence nil com))))
+
+(defun vip-backward-sentence (arg)
+  "Backward sentence."
+  (interactive "P")
+  (push-mark nil t) 
+  (let ((val (vip-p-val arg))
+	(com (vip-getcom arg)))
+    (if com (vip-move-marker-locally 'vip-com-point (point)))
+    (backward-sentence val)
+    (if com (vip-execute-com 'vip-backward-sentence nil com))))
+
+(defun vip-forward-paragraph (arg)
+  "Forward paragraph."
+  (interactive "P")
+  (push-mark nil t) 
+  (let ((val (vip-p-val arg))
+	(com (vip-getCom arg)))
+    (if com (vip-move-marker-locally 'vip-com-point (point)))
+    (forward-paragraph val)
+    (if com
+	(progn
+	  (backward-char 1)
+	  (vip-execute-com 'vip-forward-paragraph nil com)))))
+
+(defun vip-backward-paragraph (arg)
+  "Backward paragraph."
+  (interactive "P")
+  (push-mark nil t) 
+  (let ((val (vip-p-val arg))
+	(com (vip-getCom arg)))
+    (if com (vip-move-marker-locally 'vip-com-point (point)))
+    (backward-paragraph val)
+    (if com
+	(progn
+	  (forward-char 1)
+	  (vip-execute-com 'vip-backward-paragraph nil com)
+	  (backward-char 1)))))
+
+;; should be mode-specific etc.
+
+(defun vip-prev-heading (arg)
+  (interactive "P")
+  (let ((val (vip-p-val arg))
+	(com (vip-getCom arg)))
+    (if com (vip-move-marker-locally 'vip-com-point (point)))
+    (re-search-backward vip-heading-start nil t val)
+    (goto-char (match-beginning 0))
+    (if com (vip-execute-com 'vip-prev-heading nil com))))
+
+(defun vip-heading-end (arg)
+  (interactive "P")
+  (let ((val (vip-p-val arg))
+	(com (vip-getCom arg)))
+    (if com (vip-move-marker-locally 'vip-com-point (point)))
+    (re-search-forward vip-heading-end nil t val)
+    (goto-char (match-beginning 0))
+    (if com (vip-execute-com 'vip-heading-end nil com))))
+
+(defun vip-next-heading (arg)
+  (interactive "P")
+  (let ((val (vip-p-val arg))
+	(com (vip-getCom arg)))
+    (if com (vip-move-marker-locally 'vip-com-point (point)))
+    (end-of-line)
+    (re-search-forward vip-heading-start nil t val)
+    (goto-char (match-beginning 0))
+    (if com (vip-execute-com 'vip-next-heading nil com))))
+
+
+;; scrolling
+
+(defun vip-scroll-screen (arg)
+  "Scroll to next screen."
+  (interactive "p")
+  (condition-case nil
+      (if (> arg 0)
+	  (while (> arg 0)
+	    (scroll-up)
+	    (setq arg (1- arg)))
+	(while (> 0 arg)
+	  (scroll-down)
+	  (setq arg (1+ arg))))
+    (error (beep 1)
+	   (if (> arg 0)
+	       (progn
+		 (message "End of buffer")
+		 (goto-char (point-max)))
+	     (message "Beginning of buffer")
+	     (goto-char (point-min))))
+    ))
+
+(defun vip-scroll-screen-back (arg)
+  "Scroll to previous screen."
+  (interactive "p")
+  (vip-scroll-screen (- arg)))
+
+(defun vip-scroll-down (arg)
+  "Pull down half screen."
+  (interactive "P")
+  (condition-case nil
+      (if (null arg)
+	  (scroll-down (/ (window-height) 2))
+	(scroll-down arg))
+    (error (beep 1)
+	   (message "Beginning of buffer")
+	   (goto-char (point-min)))))
+
+(defun vip-scroll-down-one (arg)
+  "Scroll up one line."
+  (interactive "p")
+  (scroll-down arg))
+
+(defun vip-scroll-up (arg)
+  "Pull up half screen."
+  (interactive "P")
+  (condition-case nil
+      (if (null arg)
+	  (scroll-up (/ (window-height) 2))
+	(scroll-up arg))
+    (error (beep 1)
+	   (message "End of buffer")
+	   (goto-char (point-max)))))
+
+(defun vip-scroll-up-one (arg)
+  "Scroll down one line."
+  (interactive "p")
+  (scroll-up arg))
+
+
+;; searching
+
+(defun vip-if-string (prompt)
+  (let ((s (vip-read-string-with-history
+	    prompt
+	    nil ; no initial
+	    'vip-search-history
+	    (car vip-search-history))))
+    (if (not (string= s ""))
+	(setq vip-s-string s))))  
+	
+    
+(defun vip-toggle-search-style (arg) 
+  "Toggle the value of vip-case-fold-search/vip-re-search.
+Without prefix argument, will ask which search style to toggle. With prefix
+arg 1,toggles vip-case-fold-search; with arg 2 toggles vip-re-search.
+
+Although this function is bound to \\[vip-toggle-search-style], the most
+convenient way to use it is to bind `//' to the macro
+`1 M-x vip-toggle-search-style' and `///' to
+`2 M-x vip-toggle-search-style'. In this way, hitting `//' quickly will
+toggle case-fold-search and hitting `/' three times witth toggle regexp
+search. Macros are more convenient in this case because they don't affect
+the Emacs binding of `/'."
+  (interactive "P")
+  (let (msg)
+    (cond ((or (eq arg 1)
+	       (and (null arg)
+		    (y-or-n-p (format "Search style: '%s'. Want '%s'? "
+				      (if vip-case-fold-search
+					  "case-insensitive" "case-sensitive")
+				      (if vip-case-fold-search
+					  "case-sensitive"
+					"case-insensitive")))))
+	   (setq vip-case-fold-search (null vip-case-fold-search))
+	   (if vip-case-fold-search
+	       (setq msg "Search becomes case-insensitive")
+	     (setq msg "Search becomes case-sensitive")))
+	  ((or (eq arg 2)
+	       (and (null arg)
+		    (y-or-n-p (format "Search style: '%s'. Want '%s'? "
+				      (if vip-re-search
+					  "regexp-search" "vanilla-search")
+				      (if vip-re-search
+					  "vanilla-search"
+					"regexp-search")))))
+	   (setq vip-re-search (null vip-re-search))
+	   (if vip-re-search
+	       (setq msg "Search becomes regexp-style")
+	     (setq msg "Search becomes vanilla-style")))
+	  (t
+	   (setq msg "Search style remains unchanged")))
+    (prin1 msg t)))
+
+(defun vip-set-vi-search-style-macros (unset)
+  "Set the macros for toggling the search style in Viper's vi-state.
+The macro that toggles case sensitivity is bound to `//', and the one that
+toggles regexp search is bound to `///'.
+With a prefix argument, this function unsets the macros. "
+  (interactive "P")
+  (or noninteractive
+      (if (not unset)
+	  (progn
+	    ;; toggle case sensitivity in search
+	    (vip-record-kbd-macro
+	     "//" 'vi-state
+	     [1 (meta x) v i p - t o g g l e - s e a r c h - s t y l e return]
+	     't)
+	    ;; toggle regexp/vanila search
+	    (vip-record-kbd-macro
+	     "///" 'vi-state
+	     [2 (meta x) v i p - t o g g l e - s e a r c h - s t y l e return]
+	     't)
+	    (if (interactive-p)
+		(message
+		 "// and /// now toggle case-sensitivity and regexp search.")))
+	(vip-unrecord-kbd-macro "//" 'vi-state)
+	(sit-for 2)
+	(vip-unrecord-kbd-macro "///" 'vi-state))))
+
+(defun vip-set-emacs-search-style-macros (unset &optional arg-majormode)
+  "Set the macros for toggling the search style in Viper's emacs-state.
+The macro that toggles case sensitivity is bound to `//', and the one that
+toggles regexp search is bound to `///'.
+With a prefix argument, this function unsets the macros. 
+If the optional prefix argument is non-nil and specifies a valid major mode,
+this sets the macros only in the macros in that major mode. Otherwise,
+the macros are set in the current major mode.
+\(When unsetting the macros, the second argument has no effect.\)"
+  (interactive "P")
+  (or noninteractive
+      (if (not unset)
+	  (progn
+	    ;; toggle case sensitivity in search
+	    (vip-record-kbd-macro
+	     "//" 'emacs-state
+	     [1 (meta x) v i p - t o g g l e - s e a r c h - s t y l e return] 
+	     (or arg-majormode major-mode))
+	    ;; toggle regexp/vanila search
+	    (vip-record-kbd-macro
+	     "///" 'emacs-state
+	     [2 (meta x) v i p - t o g g l e - s e a r c h - s t y l e return]
+	     (or arg-majormode major-mode))
+	    (if (interactive-p)
+		(message
+		 "// and /// now toggle case-sensitivity and regexp search.")))
+	(vip-unrecord-kbd-macro "//" 'emacs-state)
+	(sit-for 2)
+	(vip-unrecord-kbd-macro "///" 'emacs-state))))
+
+
+(defun vip-search-forward (arg)
+  "Search a string forward. 
+ARG is used to find the ARG's occurrence of the string.
+Null string will repeat previous search."
+  (interactive "P")
+  (let ((val (vip-P-val arg))
+	(com (vip-getcom arg))
+	(old-str vip-s-string))
+    (setq vip-s-forward t)
+    (vip-if-string "/")
+    ;; this is not used at present, but may be used later
+    (if (or (not (equal old-str vip-s-string))
+	    (not (markerp vip-local-search-start-marker))
+	    (not (marker-buffer vip-local-search-start-marker)))
+	(setq vip-local-search-start-marker (point-marker)))
+    (vip-search vip-s-string t val)
+    (if com
+	(progn
+	  (vip-move-marker-locally 'vip-com-point (mark t))
+	  (vip-execute-com 'vip-search-next val com)))))
+
+(defun vip-search-backward (arg)
+  "Search a string backward. 
+ARG is used to find the ARG's occurrence of the string.
+Null string will repeat previous search."
+  (interactive "P")
+  (let ((val (vip-P-val arg))
+	(com (vip-getcom arg))
+	(old-str vip-s-string))
+    (setq vip-s-forward nil)
+    (vip-if-string "?")
+    ;; this is not used at present, but may be used later
+    (if (or (not (equal old-str vip-s-string))
+	    (not (markerp vip-local-search-start-marker))
+	    (not (marker-buffer vip-local-search-start-marker)))
+	(setq vip-local-search-start-marker (point-marker)))
+    (vip-search vip-s-string nil val)
+    (if com
+	(progn
+	  (vip-move-marker-locally 'vip-com-point (mark t))
+	  (vip-execute-com 'vip-search-next val com)))))
+	  
+
+;; Search for COUNT's occurrence of STRING.
+;; Search is forward if FORWARD is non-nil, otherwise backward.
+;; INIT-POINT is the position where search is to start.
+;; Arguments:
+;;   (STRING FORW COUNT &optional NO-OFFSET INIT-POINT LIMIT FAIL-IF-NOT-FOUND)
+(defun vip-search (string forward arg
+			  &optional no-offset init-point fail-if-not-found)
+  (if (not (equal string ""))
+    (let ((val (vip-p-val arg))
+	  (com (vip-getcom arg))
+	  (offset (not no-offset))
+	  (case-fold-search vip-case-fold-search)
+	  (start-point (or init-point (point))))
+      (vip-deactivate-mark)
+      (if forward
+	  (condition-case nil
+	      (progn
+	        (if offset (vip-forward-char-carefully))
+	        (if vip-re-search
+		    (progn
+		      (re-search-forward string nil nil val)
+		      (re-search-backward string))
+		  (search-forward string nil nil val)
+		  (search-backward string))
+		(if (not (equal start-point (point)))
+		    (push-mark start-point t))) 
+	    (search-failed
+	     (if (and (not fail-if-not-found) vip-search-wrap-around-t)
+	         (progn
+		   (message "Search wrapped around BOTTOM of buffer")
+		   (goto-char (point-min))
+		   (vip-search string forward (cons 1 com) t start-point 'fail)
+		   ;; don't wait in macros
+		   (or executing-kbd-macro (sit-for 2))
+		   ;; delete the wrap-around message
+		   (message "")
+		   )
+	       (goto-char start-point)
+	       (error "`%s': %s not found"
+		      string
+		      (if vip-re-search "Pattern" "String"))
+	       )))
+	;; backward
+        (condition-case nil
+	    (progn
+	      (if vip-re-search
+		  (re-search-backward string nil nil val)
+	        (search-backward string nil nil val))
+	      (if (not (equal start-point (point)))
+		  (push-mark start-point t))) 
+	  (search-failed
+	   (if (and (not fail-if-not-found) vip-search-wrap-around-t)
+	       (progn
+		 (message "Search wrapped around TOP of buffer")
+	         (goto-char (point-max))
+	         (vip-search string forward (cons 1 com) t start-point 'fail)
+		 ;; don't wait in macros
+		 (or executing-kbd-macro (sit-for 2))
+		 ;; delete the wrap-around message
+		 (message "")
+		 )
+	     (goto-char start-point)
+	     (error "`%s': %s not found"
+		    string
+		    (if vip-re-search "Pattern" "String"))
+	     ))))
+      ;; pull up or down if at top/bottom of window
+      (vip-adjust-window)
+      ;; highlight the result of search
+      ;; don't wait and don't highlight in macros
+      (or executing-kbd-macro
+	  vip-inside-command-argument-action
+	  (vip-flash-search-pattern))
+      )))
+
+(defun vip-search-next (arg)
+  "Repeat previous search."
+  (interactive "P")
+  (let ((val (vip-p-val arg))
+	(com (vip-getcom arg)))
+    (if (null vip-s-string) (error vip-NoPrevSearch))
+    (vip-search vip-s-string vip-s-forward arg)
+    (if com
+	(progn
+	  (vip-move-marker-locally 'vip-com-point (mark t))
+	  (vip-execute-com 'vip-search-next val com)))))
+
+(defun vip-search-Next (arg)
+  "Repeat previous search in the reverse direction."
+  (interactive "P")
+  (let ((val (vip-p-val arg))
+	(com (vip-getcom arg)))
+    (if (null vip-s-string) (error vip-NoPrevSearch))
+    (vip-search vip-s-string (not vip-s-forward) arg)
+    (if com
+	(progn
+	  (vip-move-marker-locally 'vip-com-point (mark t))
+	  (vip-execute-com 'vip-search-Next val com)))))
+
+
+;; Search contents of buffer defined by one of Viper's motion commands.
+;; Repeatable via `n' and `N'.
+(defun vip-buffer-search-enable (&optional c)
+  (cond (c (setq vip-buffer-search-char c))
+	((null vip-buffer-search-char)
+	 (setq vip-buffer-search-char ?g)))
+  (define-key vip-vi-basic-map
+    (char-to-string vip-buffer-search-char) 'vip-command-argument)
+  (aset vip-exec-array vip-buffer-search-char 'vip-exec-buffer-search)
+  (setq vip-prefix-commands (cons vip-buffer-search-char vip-prefix-commands)))
+
+;; This is a Viper wraper for isearch-forward.
+(defun vip-isearch-forward (arg)
+  "Do incremental search forward."
+  (interactive "P")
+  ;; emacs bug workaround
+  (if (listp arg) (setq arg (car arg)))
+  (vip-exec-form-in-emacs (list 'isearch-forward arg)))
+
+;; This is a Viper wraper for isearch-backward."
+(defun vip-isearch-backward (arg)
+  "Do incremental search backward."
+  (interactive "P")
+  ;; emacs bug workaround
+  (if (listp arg) (setq arg (car arg)))
+  (vip-exec-form-in-emacs (list 'isearch-backward arg)))
+
+
+;; visiting and killing files, buffers
+
+(defun vip-switch-to-buffer ()
+  "Switch to buffer in the current window."
+  (interactive)
+  (let (buffer)
+    (setq buffer
+	  (read-buffer
+	   (format "Switch to buffer in this window \(%s\): "
+		   (buffer-name (other-buffer (current-buffer))))))
+    (switch-to-buffer buffer)
+    ))
+
+(defun vip-switch-to-buffer-other-window ()
+  "Switch to buffer in another window."
+  (interactive)
+  (let (buffer)
+    (setq buffer
+	  (read-buffer
+	   (format "Switch to buffer in another window \(%s\): "
+		   (buffer-name (other-buffer (current-buffer))))))
+    (switch-to-buffer-other-window buffer)
+    ))
+
+(defun vip-kill-buffer ()
+  "Kill a buffer."
+  (interactive)
+  (let (buffer buffer-name)
+    (setq buffer-name
+	  (read-buffer
+	   (format "Kill buffer \(%s\): "
+		   (buffer-name (current-buffer)))))
+    (setq buffer
+	  (if (null buffer-name)
+	      (current-buffer)
+	    (get-buffer buffer-name)))
+    (if (null buffer) (error "`%s': No such buffer" buffer-name))
+    (if (or (not (buffer-modified-p buffer))
+	    (y-or-n-p 
+	     (format
+	      "Buffer `%s' is modified, are you sure you want to kill it? "
+	      buffer-name)))
+	(kill-buffer buffer)
+      (error "Buffer not killed"))))
+
+
+(defvar vip-smart-suffix-list
+  '("" "tex" "c" "cc" "C" "el" "java" "html" "htm" "pl" "P" "p")
+  "*List of suffixes that Viper automatically tries to append to filenames ending with a `.'.
+This is useful when you the current directory contains files with the same
+prefix and many different suffixes. Usually, only one of the suffixes
+represents an editable file. However, file completion will stop at the `.'
+The smart suffix feature lets you hit RET in such a case, and Viper will
+select the appropriate suffix.
+
+Suffixes are tried in the order given and the first suffix for which a
+corresponding file exists is selected. If no file exists for any of the
+suffixes, the user is asked to confirm.
+
+To turn this feature off, set this variable to nil.")
+    
+;; Try to add suffix to files ending with a `.'
+;; Useful when the user hits RET on a non-completed file name.
+(defun vip-file-add-suffix ()
+  (let ((count 0)
+	(len (length vip-smart-suffix-list))
+	(file (buffer-string))
+	found key cmd suff)
+    (goto-char (point-max))
+    (if (and vip-smart-suffix-list (string-match "\\.$" file))
+	(progn
+	  (while (and (not found) (< count len))
+	    (setq suff (nth count vip-smart-suffix-list)
+		  count (1+ count))
+	    (if (file-exists-p (format "%s%s" file suff))
+		(progn
+		  (setq found t)
+		  (insert suff))))
+      
+	  (if found
+	      ()
+	    (vip-tmp-insert-at-eob " [Please complete file name]")
+	    (unwind-protect 
+		(while (not (memq cmd '(exit-minibuffer vip-exit-minibuffer)))
+		  (setq cmd
+			(key-binding (setq key (read-key-sequence nil))))
+		  (cond ((eq cmd 'self-insert-command)
+			 (if vip-xemacs-p
+			     (insert (events-to-keys key))
+			   (insert key)))
+			((memq cmd '(exit-minibuffer vip-exit-minibuffer))
+			 nil)
+			(t (command-execute cmd)))
+		  )))
+	      ))
+    ))
+
+
+     
+
+;; yank and pop
+
+(defsubst vip-yank (text)
+  "Yank TEXT silently. This works correctly with Emacs's yank-pop command."
+    (insert text)
+    (setq this-command 'yank))
+
+(defun vip-put-back (arg)
+  "Put back after point/below line."
+  (interactive "P")
+  (let ((val (vip-p-val arg))
+	(text (if vip-use-register
+		  (cond ((vip-valid-register vip-use-register '(digit))
+			 (current-kill (- vip-use-register ?1) 'do-not-rotate))
+			((vip-valid-register vip-use-register)
+			 (get-register (downcase vip-use-register)))
+			(t (error vip-InvalidRegister vip-use-register)))
+		(current-kill 0))))
+    (if (null text)
+	(if vip-use-register
+	    (let ((reg vip-use-register))
+	      (setq vip-use-register nil)
+	      (error vip-EmptyRegister reg))
+	  (error "")))
+    (setq vip-use-register nil)
+    (if (vip-end-with-a-newline-p text)
+	(progn
+	  (end-of-line)
+	  (if (eobp)
+	      (insert "\n")
+	    (forward-line 1))
+	  (beginning-of-line))
+      (if (not (eolp)) (vip-forward-char-carefully)))
+    (set-marker (vip-mark-marker) (point) (current-buffer))
+    (vip-set-destructive-command
+     (list 'vip-put-back val nil vip-use-register nil nil))
+    (vip-loop val (vip-yank text)))
+  ;; Vi puts cursor on the last char when the yanked text doesn't contain a
+  ;; newline; it leaves the cursor at the beginning when the text contains 
+  ;; a newline
+  (if (vip-same-line (point) (mark))
+      (or (= (point) (mark)) (vip-backward-char-carefully))
+    (exchange-point-and-mark)
+    (if (bolp)
+	(back-to-indentation)))
+  (vip-deactivate-mark))
+
+(defun vip-Put-back (arg)
+  "Put back at point/above line."
+  (interactive "P")
+  (let ((val (vip-p-val arg))
+	(text (if vip-use-register
+		  (cond ((vip-valid-register vip-use-register '(digit))
+			 (current-kill (- vip-use-register ?1) 'do-not-rotate))
+			((vip-valid-register vip-use-register)
+			 (get-register (downcase vip-use-register)))
+			(t (error vip-InvalidRegister vip-use-register)))
+		(current-kill 0))))
+    (if (null text)
+	(if vip-use-register
+	    (let ((reg vip-use-register))
+	      (setq vip-use-register nil)
+	      (error vip-EmptyRegister reg))
+	  (error "")))
+    (setq vip-use-register nil)
+    (if (vip-end-with-a-newline-p text) (beginning-of-line))
+    (vip-set-destructive-command
+     (list 'vip-Put-back val nil vip-use-register nil nil))
+    (set-marker (vip-mark-marker) (point) (current-buffer))
+    (vip-loop val (vip-yank text)))
+  ;; Vi puts cursor on the last char when the yanked text doesn't contain a
+  ;; newline; it leaves the cursor at the beginning when the text contains 
+  ;; a newline
+  (if (vip-same-line (point) (mark))
+      (or (= (point) (mark)) (vip-backward-char-carefully))
+    (exchange-point-and-mark)
+    (if (bolp)
+	(back-to-indentation)))
+  (vip-deactivate-mark))
+    
+
+;; Copy region to kill-ring.
+;; If BEG and END do not belong to the same buffer, copy empty region.
+(defun vip-copy-region-as-kill (beg end)
+  (condition-case nil
+      (copy-region-as-kill beg end)
+    (error (copy-region-as-kill beg beg))))
+    
+
+(defun vip-delete-char (arg)
+  "Delete character."
+  (interactive "P")
+  (let ((val (vip-p-val arg)))
+    (vip-set-destructive-command (list 'vip-delete-char val nil nil nil nil))
+    (if (> val 1)
+	(save-excursion
+	  (let ((here (point)))
+	    (end-of-line)
+	    (if (> val (- (point) here))
+		(setq val (- (point) here))))))
+    (if (and (eq val 0) (not vip-ex-style-motion)) (setq val 1))
+    (if (and vip-ex-style-motion (eolp))
+	(if (bolp) (error "") (setq val 0))) ; not bol---simply back 1 ch
+    (if vip-use-register
+	(progn
+	  (cond ((vip-valid-register vip-use-register '((Letter)))
+		 (vip-append-to-register
+		  (downcase vip-use-register) (point) (- (point) val)))
+		((vip-valid-register vip-use-register)
+		 (copy-to-register
+		  vip-use-register (point) (- (point) val) nil))
+		(t (error vip-InvalidRegister vip-use-register)))
+	  (setq vip-use-register nil)))
+    (if vip-ex-style-motion
+	(progn
+	  (delete-char val t)
+	  (if (and (eolp) (not (bolp))) (backward-char 1)))
+      (if (eolp)
+          (delete-backward-char val t)
+        (delete-char val t)))))
+
+(defun vip-delete-backward-char (arg)
+  "Delete previous character. On reaching beginning of line, stop and beep."
+  (interactive "P")
+  (let ((val (vip-p-val arg)))
+    (vip-set-destructive-command
+     (list 'vip-delete-backward-char val nil nil nil nil))
+    (if (> val 1)
+	(save-excursion
+	  (let ((here (point)))
+	    (beginning-of-line)
+	    (if (> val (- here (point)))
+		(setq val (- here (point)))))))
+    (if vip-use-register
+	(progn
+	  (cond ((vip-valid-register vip-use-register '(Letter))
+		 (vip-append-to-register
+		  (downcase vip-use-register) (point) (+ (point) val)))
+		((vip-valid-register vip-use-register)
+		 (copy-to-register
+		  vip-use-register (point) (+ (point) val) nil))
+		(t (error vip-InvalidRegister vip-use-register)))
+	  (setq vip-use-register nil)))
+    (if (bolp) (ding)
+      (delete-backward-char val t))))
+      
+(defun vip-del-backward-char-in-insert ()
+  "Delete 1 char backwards while in insert mode."
+  (interactive)      
+  (if (and vip-ex-style-editing-in-insert (bolp))
+      (beep 1)
+    (delete-backward-char 1 t)))
+      
+(defun vip-del-backward-char-in-replace ()
+  "Delete one character in replace mode.
+If `vip-delete-backwards-in-replace' is t, then DEL key actually deletes
+charecters. If it is nil, then the cursor just moves backwards, similarly
+to Vi. The variable `vip-ex-style-editing-in-insert', if t, doesn't let the
+cursor move past the beginning of line."
+  (interactive)
+  (cond (vip-delete-backwards-in-replace
+	 (cond ((not (bolp))
+		(delete-backward-char 1 t))
+	       (vip-ex-style-editing-in-insert
+		(beep 1))
+	       ((bobp)
+		(beep 1))
+	       (t
+		(delete-backward-char 1 t))))
+	(vip-ex-style-editing-in-insert
+	 (if (bolp)
+	     (beep 1)
+	   (backward-char 1)))
+	(t 
+	 (backward-char 1))))
+
+
+
+;; join lines.
+
+(defun vip-join-lines (arg)
+  "Join this line to next, if ARG is nil.  Otherwise, join ARG lines."
+  (interactive "*P")
+  (let ((val (vip-P-val arg)))
+    (vip-set-destructive-command (list 'vip-join-lines val nil nil nil nil))
+    (vip-loop (if (null val) 1 (1- val))
+	      (progn
+		(end-of-line)
+		(if (not (eobp))
+		    (progn
+		      (forward-line 1)
+		      (delete-region (point) (1- (point)))
+		      (fixup-whitespace)))))))
+
+
+;; Replace state
+
+(defun vip-change (beg end)
+  (if (markerp beg) (setq beg (marker-position beg)))
+  (if (markerp end) (setq end (marker-position end)))
+  ;; beg is sometimes (mark t), which may be nil
+  (or beg (setq beg end))
+  
+  (vip-set-complex-command-for-undo)
+  (if vip-use-register
+      (progn
+	(copy-to-register vip-use-register beg end nil)
+	(setq vip-use-register nil)))
+  (vip-set-replace-overlay beg end)
+  (setq last-command nil) ; separate repl text from prev kills
+  
+  (if (= (vip-replace-start) (point-max))
+      (error "End of buffer"))
+      
+  (setq vip-last-replace-region
+	(buffer-substring (vip-replace-start)
+			  (vip-replace-end)))
+  
+  ;; protect against error while inserting "@" and other disasters
+  ;; (e.g., read-only buff)
+  (condition-case conds
+      (if (or vip-allow-multiline-replace-regions
+	      (vip-same-line (vip-replace-start)
+			     (vip-replace-end)))
+	  (progn
+	    ;; tabs cause problems in replace, so untabify
+	    (goto-char (vip-replace-end))
+	    (insert-before-markers "@") ; put placeholder after the TAB
+	    (untabify (vip-replace-start) (point))
+	    ;; del @, don't put on kill ring 
+	    (delete-backward-char 1)
+	    
+	    (vip-set-replace-overlay-glyphs
+	     vip-replace-region-start-delimiter
+	     vip-replace-region-end-delimiter)
+	    ;; this move takes care of the last posn in the overlay, which
+	    ;; has to be shifted because of insert. We can't simply insert
+	    ;; "$" before-markers because then overlay-start will shift the
+	    ;; beginning of the overlay in case we are replacing a single
+	    ;; character. This fixes the bug with `s' and `cl' commands.
+	    (vip-move-replace-overlay (vip-replace-start) (point))
+	    (goto-char (vip-replace-start))
+	    (vip-change-state-to-replace t))
+	(kill-region (vip-replace-start)
+		     (vip-replace-end))
+	(vip-hide-replace-overlay)
+	(vip-change-state-to-insert))
+    (error ;; make sure that the overlay doesn't stay.
+           ;; go back to the original point
+     (goto-char (vip-replace-start))
+     (vip-hide-replace-overlay)
+     (vip-message-conditions conds))))
+
+
+(defun vip-change-subr (beg end)
+  ;; beg is sometimes (mark t), which may be nil
+  (or beg (setq beg end))
+  
+  (if vip-use-register
+      (progn
+	(copy-to-register vip-use-register beg end nil)
+	(setq vip-use-register nil)))
+  (kill-region beg end)
+  (setq this-command 'vip-change)
+  (vip-yank-last-insertion))
+
+(defun vip-toggle-case (arg)
+  "Toggle character case."
+  (interactive "P")
+  (let ((val (vip-p-val arg)) (c))
+    (vip-set-destructive-command (list 'vip-toggle-case val nil nil nil nil))
+    (while (> val 0)
+      (setq c (following-char))
+      (delete-char 1 nil)
+      (if (eq c (upcase c))
+	  (insert-char (downcase c) 1)
+	(insert-char (upcase c) 1))
+      (if (eolp) (backward-char 1))
+      (setq val (1- val)))))
+
+
+;; query replace
+
+(defun vip-query-replace ()
+  "Query replace. 
+If a null string is suplied as the string to be replaced,
+the query replace mode will toggle between string replace
+and regexp replace."
+  (interactive)
+  (let (str)
+    (setq str (vip-read-string-with-history
+	       (if vip-re-query-replace "Query replace regexp: "
+		 "Query replace: ")
+	       nil  ; no initial
+	       'vip-replace1-history
+	       (car vip-replace1-history) ; default
+	       ))
+    (if (string= str "")
+	(progn
+	  (setq vip-re-query-replace (not vip-re-query-replace))
+	  (message "Query replace mode changed to %s"
+		   (if vip-re-query-replace "regexp replace"
+		     "string replace")))
+      (if vip-re-query-replace
+	  (query-replace-regexp
+	   str
+	   (vip-read-string-with-history
+	    (format "Query replace regexp `%s' with: " str)
+	    nil  ; no initial
+	    'vip-replace1-history
+	    (car vip-replace1-history) ; default
+	    ))
+	(query-replace
+	 str
+	 (vip-read-string-with-history
+	  (format "Query replace `%s' with: " str)
+	  nil  ; no initial
+	  'vip-replace1-history
+	  (car vip-replace1-history) ; default
+	  ))))))
+
+
+;; marking
+
+(defun vip-mark-beginning-of-buffer ()
+  "Mark beginning of buffer."
+  (interactive)
+  (push-mark (point))
+  (goto-char (point-min))
+  (exchange-point-and-mark)
+  (message "Mark set at the beginning of buffer"))
+
+(defun vip-mark-end-of-buffer ()
+  "Mark end of buffer."
+  (interactive)
+  (push-mark (point))
+  (goto-char (point-max))
+  (exchange-point-and-mark)
+  (message "Mark set at the end of buffer"))
+
+(defun vip-mark-point ()
+  "Set mark at point of buffer."
+  (interactive)
+  (let ((char (read-char)))
+    (cond ((and (<= ?a char) (<= char ?z))
+	   (point-to-register (1+ (- char ?a))))
+	  ((= char ?<) (vip-mark-beginning-of-buffer))
+	  ((= char ?>) (vip-mark-end-of-buffer))
+	  ((= char ?.) (vip-set-mark-if-necessary))
+	  ((= char ?,) (vip-cycle-through-mark-ring))
+	  ((= char ?D) (mark-defun))
+	  (t (error ""))
+	  )))
+	
+;; Algorithm: If first invocation of this command save mark on ring, goto
+;; mark, M0, and pop the most recent elt from the mark ring into mark,
+;; making it into the new mark, M1.
+;; Push this mark back and set mark to the original point position, p1.
+;; So, if you hit '' or `` then you can return to p1.
+;;
+;; If repeated command, pop top elt from the ring into mark and
+;; jump there. This forgets the position, p1, and puts M1 back into mark.
+;; Then we save the current pos, which is M0, jump to M1 and pop M2 from
+;; the ring into mark.  Push M2 back on the ring and set mark to M0.
+;; etc.
+(defun vip-cycle-through-mark-ring ()
+  "Visit previous locations on the mark ring.
+One can use `` and '' to temporarily jump 1 step back."
+  (let* ((sv-pt (point)))
+       ;; if repeated `m,' command, pop the previously saved mark.
+       ;; Prev saved mark is actually prev saved point. It is used if the
+       ;; user types `` or '' and is discarded 
+       ;; from the mark ring by the next `m,' command. 
+       ;; In any case, go to the previous or previously saved mark.
+       ;; Then push the current mark (popped off the ring) and set current
+       ;; point to be the mark. Current pt as mark is discarded by the next
+       ;; m, command.
+       (if (eq last-command 'vip-cycle-through-mark-ring)
+	   ()
+	 ;; save current mark if the first iteration
+	 (setq mark-ring (delete (vip-mark-marker) mark-ring))
+	 (if (mark t)
+	     (push-mark (mark t) t)) )
+       (pop-mark)
+       (set-mark-command 1)
+       ;; don't duplicate mark on the ring
+       (setq mark-ring (delete (vip-mark-marker) mark-ring))
+       (push-mark sv-pt t)
+       (vip-deactivate-mark)
+       (setq this-command 'vip-cycle-through-mark-ring)
+       ))
+       
+
+(defun vip-goto-mark (arg)
+  "Go to mark."
+  (interactive "P")
+  (let ((char (read-char))
+	(com (vip-getcom arg)))
+    (vip-goto-mark-subr char com nil)))
+
+(defun vip-goto-mark-and-skip-white (arg)
+  "Go to mark and skip to first non-white character on line."
+  (interactive "P")
+  (let ((char (read-char))
+	(com (vip-getCom arg)))
+    (vip-goto-mark-subr char com t)))
+
+(defun vip-goto-mark-subr (char com skip-white)
+  (if (eobp) 
+      (if (bobp)
+	  (error "Empty buffer")
+	(backward-char 1)))
+  (cond ((vip-valid-register char '(letter))
+	 (let* ((buff (current-buffer))
+	        (reg (1+ (- char ?a)))
+	        (text-marker (get-register reg)))
+	   (if com (vip-move-marker-locally 'vip-com-point (point)))
+	   (if (not (vip-valid-marker text-marker))
+	       (error vip-EmptyTextmarker char))
+	   (if (and (vip-same-line (point) vip-last-jump)
+		    (= (point) vip-last-jump-ignore))
+	       (push-mark vip-last-jump t) 
+	     (push-mark nil t)) ; no msg
+	   (vip-register-to-point reg)
+	   (setq vip-last-jump (point-marker))
+	   (cond (skip-white 
+		  (back-to-indentation)
+		  (setq vip-last-jump-ignore (point))))
+	   (if com
+	       (if (equal buff (current-buffer))
+		   (vip-execute-com (if skip-white
+					'vip-goto-mark-and-skip-white
+				      'vip-goto-mark)
+				    nil com)
+		 (switch-to-buffer buff)
+		 (goto-char vip-com-point)
+		 (vip-change-state-to-vi)
+		 (error "")))))
+	((and (not skip-white) (= char ?`))
+	 (if com (vip-move-marker-locally 'vip-com-point (point)))
+	 (if (and (vip-same-line (point) vip-last-jump)
+		  (= (point) vip-last-jump-ignore))
+	     (goto-char vip-last-jump))
+	 (if (null (mark t)) (error "Mark is not set in this buffer"))
+	 (if (= (point) (mark t)) (pop-mark))
+	 (exchange-point-and-mark)
+	 (setq vip-last-jump (point-marker)
+	       vip-last-jump-ignore 0)
+	 (if com (vip-execute-com 'vip-goto-mark nil com)))
+	((and skip-white (= char ?'))
+	 (if com (vip-move-marker-locally 'vip-com-point (point)))
+	 (if (and (vip-same-line (point) vip-last-jump)
+		  (= (point) vip-last-jump-ignore))
+	     (goto-char vip-last-jump))
+	 (if (= (point) (mark t)) (pop-mark))
+	 (exchange-point-and-mark)
+	 (setq vip-last-jump (point))
+	 (back-to-indentation)
+	 (setq vip-last-jump-ignore (point))
+	 (if com (vip-execute-com 'vip-goto-mark-and-skip-white nil com)))
+	(t (error vip-InvalidTextmarker char))))
+	
+(defun vip-insert-tab ()
+  (interactive)
+  (insert-tab))
+
+(defun vip-exchange-point-and-mark ()
+  (interactive)
+  (exchange-point-and-mark)
+  (back-to-indentation))
+
+;; Input Mode Indentation
+
+;; Returns t, if the string before point matches the regexp STR.
+(defsubst vip-looking-back (str)
+  (and (save-excursion (re-search-backward str nil t))
+       (= (point) (match-end 0))))
+
+
+(defun vip-forward-indent ()
+  "Indent forward -- `C-t' in Vi."
+  (interactive)
+  (setq vip-cted t)
+  (indent-to (+ (current-column) vip-shift-width)))
+
+(defun vip-backward-indent ()
+  "Backtab, C-d in VI"
+  (interactive)
+  (if vip-cted
+      (let ((p (point)) (c (current-column)) bol (indent t))
+	(if (vip-looking-back "[0^]")
+	    (progn
+	      (if (eq ?^ (preceding-char))
+		  (setq vip-preserve-indent t))
+	      (delete-backward-char 1)
+	      (setq p (point))
+	      (setq indent nil)))
+	(save-excursion
+	  (beginning-of-line)
+	  (setq bol (point)))
+	(if (re-search-backward "[^ \t]" bol 1) (forward-char))
+	(delete-region (point) p)
+	(if indent
+	    (indent-to (- c vip-shift-width)))
+	(if (or (bolp) (vip-looking-back "[^ \t]"))
+	    (setq vip-cted nil)))))
+
+(defun vip-autoindent ()
+  "Auto Indentation, Vi-style."
+  (interactive)
+  (let ((col (current-indentation)))
+    (if abbrev-mode (expand-abbrev))
+    (if vip-preserve-indent
+	(setq vip-preserve-indent nil)
+      (setq vip-current-indent col))
+    ;; don't leave whitespace lines around
+    (if (memq last-command
+	      '(vip-autoindent
+		vip-open-line vip-Open-line
+		vip-replace-state-exit-cmd))
+	(indent-to-left-margin))
+    ;; use \n instead of newline, or else <Return> will move the insert point
+    ;;(newline 1)
+    (insert "\n")
+    (if vip-auto-indent
+	(progn
+	  (setq vip-cted t)
+	  (if (and vip-electric-mode
+		   (not (eq major-mode 'fundamental-mode)))
+	      (indent-according-to-mode)
+	    (indent-to vip-current-indent))
+	  ))
+    ))
+
+	   
+;; Viewing registers
+
+(defun vip-ket-function (arg)
+  "Function called by \], the ket. View registers and call \]\]."
+  (interactive "P")
+  (let ((reg (read-char)))
+    (cond ((vip-valid-register reg '(letter Letter))
+	   (view-register (downcase reg)))
+	  ((vip-valid-register reg '(digit))
+	   (let ((text (current-kill (- reg ?1) 'do-not-rotate)))
+	     (save-excursion 
+	       (set-buffer (get-buffer-create "*Output*"))
+	       (delete-region (point-min) (point-max))
+	       (insert (format "Register %c contains the string:\n" reg))
+	       (insert text)
+	       (goto-char (point-min)))
+	     (display-buffer "*Output*")))
+	  ((= ?\] reg)
+	   (vip-next-heading arg))
+	  (t (error
+	      vip-InvalidRegister reg)))))
+
+(defun vip-brac-function (arg)
+  "Function called by \[, the brac. View textmarkers and call \[\["
+  (interactive "P")
+  (let ((reg (read-char)))
+    (cond ((= ?\[ reg)
+	   (vip-prev-heading arg))
+	  ((= ?\] reg)
+	   (vip-heading-end arg))
+	  ((vip-valid-register reg '(letter))
+	   (let* ((val (get-register (1+ (- reg ?a))))
+		  (buf (if (not val) 
+			   (error vip-EmptyTextmarker reg)
+			 (marker-buffer val)))
+		  (pos (marker-position val))
+		  line-no text (s pos) (e pos))
+	     (save-excursion 
+	       (set-buffer (get-buffer-create "*Output*"))
+	       (delete-region (point-min) (point-max))
+	       (if (and buf pos)
+		   (progn
+		     (save-excursion 
+		       (set-buffer buf)
+		       (setq line-no (1+ (count-lines (point-min) val)))
+		       (goto-char pos)
+		       (beginning-of-line)
+		       (if (re-search-backward "[^ \t]" nil t)
+			   (progn
+			     (beginning-of-line)
+			     (setq s (point))))
+		       (goto-char pos)
+		       (forward-line 1)
+		       (if (re-search-forward "[^ \t]" nil t)
+			   (progn
+			     (end-of-line)
+			     (setq e (point))))
+		       (setq text (buffer-substring s e))
+		       (setq text (format "%s<%c>%s" 
+					  (substring text 0 (- pos s)) 
+					  reg (substring text (- pos s)))))
+		     (insert
+		      (format
+		       "Textmarker `%c' is in buffer `%s' at line %d.\n"
+				     reg (buffer-name buf) line-no))
+		     (insert (format "Here is some text around %c:\n\n %s" 
+				     reg text)))
+		 (insert (format vip-EmptyTextmarker reg)))
+	       (goto-char (point-min)))
+	     (display-buffer "*Output*")))
+	  (t (error vip-InvalidTextmarker reg)))))
+  
+
+
+;; commands in insertion mode
+
+(defun vip-delete-backward-word (arg)
+  "Delete previous word."
+  (interactive "p")
+  (save-excursion
+    (push-mark nil t)
+    (backward-word arg)
+    (delete-region (point) (mark t))
+    (pop-mark)))
+
+
+(defun vip-set-expert-level (&optional dont-change-unless)
+  "Sets the expert level for a Viper user.
+Can be called interactively to change (temporarily or permanently) the
+current expert level.
+
+The optional argument DONT-CHANGE-UNLESS, if not nil, says that
+the level should not be changed, unless its current value is
+meaningless (i.e., not one of 1,2,3,4,5).
+
+User level determines the setting of Viper variables that are most
+sensitive for VI-style look-and-feel."
+  
+  (interactive)
+  
+  (if (not (natnump vip-expert-level)) (setq vip-expert-level 0))
+  
+  (save-window-excursion
+    (delete-other-windows)
+    ;; if 0 < vip-expert-level < vip-max-expert-level
+    ;;    & dont-change-unless = t -- use it; else ask
+    (vip-ask-level dont-change-unless))
+  
+  (setq viper-always          	    	t
+	vip-ex-style-motion 	    	t
+	vip-ex-style-editing-in-insert  t
+	vip-want-ctl-h-help nil)
+
+  (cond ((eq vip-expert-level 1) ; novice or beginner
+	 (global-set-key   ; in emacs-state 
+	  vip-toggle-key
+	  (if (vip-window-display-p) 'vip-iconify 'suspend-emacs))
+	 (setq vip-no-multiple-ESC	     t
+	       vip-re-search	    	     t
+	       vip-vi-style-in-minibuffer    t
+	       vip-search-wrap-around-t	     t
+	       vip-electric-mode	     nil
+	       vip-want-emacs-keys-in-vi     nil
+	       vip-want-emacs-keys-in-insert nil))
+	
+	((and (> vip-expert-level 1) (< vip-expert-level 5))
+	 ;; intermediate to guru
+	 (setq vip-no-multiple-ESC           (if (vip-window-display-p)
+						 t 'twice)
+	       vip-electric-mode	     t
+	       vip-want-emacs-keys-in-vi     t
+	       vip-want-emacs-keys-in-insert (> vip-expert-level 2))
+
+	 (if (eq vip-expert-level 4) ; respect user's ex-style motion
+	     	    	    	     ; and vip-no-multiple-ESC
+	     (progn
+	       (setq-default vip-ex-style-editing-in-insert
+			     (cdr (assoc 'vip-ex-style-editing-in-insert
+					 vip-saved-user-settings))
+			     vip-ex-style-motion
+			     (cdr (assoc 'vip-ex-style-motion
+					 vip-saved-user-settings)))
+	       (setq vip-ex-style-motion 
+		     (cdr (assoc 'vip-ex-style-motion vip-saved-user-settings))
+		     vip-ex-style-editing-in-insert
+		     (cdr (assoc 'vip-ex-style-editing-in-insert
+				 vip-saved-user-settings))
+		     vip-re-search
+		     (cdr (assoc 'vip-re-search vip-saved-user-settings))
+		     vip-no-multiple-ESC 
+		     (cdr (assoc 'vip-no-multiple-ESC
+				 vip-saved-user-settings))))))
+	       
+	;; A wizard!!
+	;; Ideally, if 5 is selected, a buffer should pop up to let the
+	;; user toggle the values of variables.
+	(t (setq-default vip-ex-style-editing-in-insert
+			 (cdr (assoc 'vip-ex-style-editing-in-insert
+				     vip-saved-user-settings))
+			 vip-ex-style-motion
+			 (cdr (assoc 'vip-ex-style-motion
+				     vip-saved-user-settings)))
+	   (setq  vip-want-ctl-h-help 
+		  (cdr (assoc 'vip-want-ctl-h-help vip-saved-user-settings))
+		  viper-always
+		  (cdr (assoc 'viper-always vip-saved-user-settings))
+		  vip-no-multiple-ESC 
+		  (cdr (assoc 'vip-no-multiple-ESC vip-saved-user-settings))
+		  vip-ex-style-motion 
+		  (cdr (assoc 'vip-ex-style-motion vip-saved-user-settings))
+		  vip-ex-style-editing-in-insert
+		  (cdr (assoc 'vip-ex-style-editing-in-insert
+			      vip-saved-user-settings))
+		  vip-re-search
+		  (cdr (assoc 'vip-re-search vip-saved-user-settings))
+		  vip-electric-mode 
+		  (cdr (assoc 'vip-electric-mode
+			      vip-saved-user-settings))
+		  vip-want-emacs-keys-in-vi 
+		  (cdr (assoc 'vip-want-emacs-keys-in-vi
+			      vip-saved-user-settings))
+		  vip-want-emacs-keys-in-insert
+		  (cdr (assoc 'vip-want-emacs-keys-in-insert
+			      vip-saved-user-settings)))))
+  (vip-set-mode-vars-for vip-current-state)
+  (if (or viper-always
+	  (and (> vip-expert-level 0) (> 5 vip-expert-level)))
+      (vip-set-hooks)))
+
+;; Ask user expert level.
+(defun vip-ask-level (dont-change-unless)
+  (let ((ask-buffer " *vip-ask-level*")
+	level-changed repeated)
+    (save-window-excursion
+      (switch-to-buffer ask-buffer)
+	      
+      (or (eq this-command 'vip-set-expert-level)
+	  (and
+	   (<= vip-expert-level vip-max-expert-level)
+	   (>= vip-expert-level 1))
+	  (progn
+	    (insert "
+	      
+	      *** Important Notice for VIP users***
+	      
+			  This is VIPER
+	      
+@joke
+Viper Is a Package for Emacs Rebels,
+a VI Plan for Emacs Rescue,
+and a venomous VI PERil.
+@end joke
+
+Technically speaking, Viper is a new Vi emulator that replaces
+the old VIP package.
+
+Viper emulates Vi much better than VIP.  It also significantly
+extends and improves upon Vi in many useful ways.
+
+Although many VIP settings in your ~/.vip are compatible with Viper,
+you may have to change some of them. Please refer to the documentation,
+which can be obtained by executing
+
+:help
+
+when Viper is in Vi state.
+
+If you will be so lucky as to find a bug, report it via the command
+
+:submitReport
+
+Type any key to continue... ")
+	    
+	    (read-char)
+	    (erase-buffer)))
+	      
+      (while (or (> vip-expert-level vip-max-expert-level)
+		 (< vip-expert-level 1)
+		 (null dont-change-unless))
+	(erase-buffer)
+	(if repeated
+	    (progn
+	      (message "Invalid user level")
+	      (beep 1))
+	  (setq repeated t))
+	(setq dont-change-unless t
+	      level-changed t)
+	(insert "
+Please specify your level of familiarity with the venomous VI PERil
+(and the VI Plan for Emacs Rescue).
+You can change it at any time by typing `M-x vip-set-expert-level RET'
+	
+ 1 -- BEGINNER: Almost all Emacs features are suppressed.
+          Feels almost like straight Vi. File name completion and
+          command history in the minibuffer are thrown in as a bonus. 
+          To use Emacs productively, you must reach level 3 or higher.
+ 2 -- MASTER: C-c now has its standard Emacs meaning in Vi command state,
+	  so most Emacs commands can be used when Viper is in Vi state.
+	  Good progress---you are well on the way to level 3!
+ 3 -- GRAND MASTER: Like 3, but most Emacs commands are available also
+          in Viper's insert state.
+ 4 -- GURU: Like 3, but user settings are respected for vip-no-multiple-ESC,
+	  vip-re-search, vip-ex-style-motion, & vip-ex-style-editing-in-insert
+	  variables. Adjust these settings to your taste.
+ 5 -- WIZARD: Like 4, but user settings are also respected for viper-always,
+	  vip-electric-mode, vip-want-ctl-h-help, vip-want-emacs-keys-in-vi,
+	  and vip-want-emacs-keys-in-insert. Adjust these to your taste.
+      
+Please, specify your level now: ")
+	  
+	(setq vip-expert-level (- (vip-read-char-exclusive) ?0))
+	) ; end while
+      
+      ;; tell the user if level was changed
+      (and level-changed
+	   (progn
+	     (insert
+	      (format "\n\n\n\n\n\t\tYou have selected user level %d"
+		      vip-expert-level))
+	     (if (y-or-n-p "Do you wish to make this change permanent? ")
+		 ;; save the setting for vip-expert-level
+		 (vip-save-setting
+		  'vip-expert-level
+		  (format "Saving user level %d ..." vip-expert-level)
+		  vip-custom-file-name))
+	     ))
+      (bury-buffer) ; remove ask-buffer from screen
+      (message "")
+      )))
+
+
+(defun vip-nil ()
+  (interactive)
+  (beep 1))
+  
+    
+;; if ENFORCE-BUFFER is not nil, error if CHAR is a marker in another buffer
+(defun vip-register-to-point (char &optional enforce-buffer)
+  "Like jump-to-register, but switches to another buffer in another window."
+  (interactive "cViper register to point: ")
+  (let ((val (get-register char)))
+    (cond
+     ((and (fboundp 'frame-configuration-p)
+	   (frame-configuration-p val))
+      (set-frame-configuration val))
+     ((window-configuration-p val)
+      (set-window-configuration val))
+     ((vip-valid-marker val)
+      (if (and enforce-buffer
+	       (not (equal (current-buffer) (marker-buffer val))))
+	  (error (concat vip-EmptyTextmarker " in this buffer")
+		 (1- (+ char ?a))))
+      (pop-to-buffer  (marker-buffer val))
+      (goto-char val))
+     ((and (consp val) (eq (car val) 'file))
+      (find-file (cdr val)))
+     (t
+      (error vip-EmptyTextmarker (1- (+ char ?a)))))))
+
+
+(defun vip-save-kill-buffer ()
+  "Save then kill current buffer. "
+  (interactive)
+  (if (< vip-expert-level 2)
+      (save-buffers-kill-emacs)
+    (save-buffer)
+    (kill-buffer (current-buffer))))
+
+
+
+;;; Bug Report
+
+(defun vip-submit-report ()
+  "Submit bug report on Viper."
+  (interactive)
+  (let ((reporter-prompt-for-summary-p t)
+	(vip-device-type (vip-device-type))
+	color-display-p frame-parameters
+	minibuffer-emacs-face minibuffer-vi-face minibuffer-insert-face
+	varlist salutation window-config)
+    
+    ;; If mode info is needed, add variable to `let' and then set it below,
+    ;; like we did with color-display-p.
+    (setq color-display-p (if (vip-window-display-p) 
+			      (vip-color-display-p)
+			    'non-x)
+	  minibuffer-vi-face (if (vip-has-face-support-p)
+				 (vip-get-face vip-minibuffer-vi-face)
+			       'non-x)
+	  minibuffer-insert-face (if (vip-has-face-support-p)
+				     (vip-get-face vip-minibuffer-insert-face)
+				   'non-x)
+	  minibuffer-emacs-face (if (vip-has-face-support-p)
+				    (vip-get-face vip-minibuffer-emacs-face)
+				  'non-x)
+	  frame-parameters (if (fboundp 'frame-parameters)
+			       (frame-parameters (selected-frame))))
+    
+    (setq varlist (list 'vip-vi-minibuffer-minor-mode
+		        'vip-insert-minibuffer-minor-mode
+		        'vip-vi-intercept-minor-mode
+		        'vip-vi-local-user-minor-mode     
+		        'vip-vi-kbd-minor-mode        	
+		        'vip-vi-global-user-minor-mode
+		        'vip-vi-state-modifier-minor-mode
+		        'vip-vi-diehard-minor-mode   
+		        'vip-vi-basic-minor-mode    
+		        'vip-replace-minor-mode 	  
+		        'vip-insert-intercept-minor-mode
+		        'vip-insert-local-user-minor-mode 
+		        'vip-insert-kbd-minor-mode     	
+		        'vip-insert-global-user-minor-mode
+		        'vip-insert-state-modifier-minor-mode
+		        'vip-insert-diehard-minor-mode 	
+		        'vip-insert-basic-minor-mode   
+		        'vip-emacs-intercept-minor-mode 
+		        'vip-emacs-local-user-minor-mode 
+		        'vip-emacs-kbd-minor-mode 
+		        'vip-emacs-global-user-minor-mode
+		        'vip-emacs-state-modifier-minor-mode
+		        'vip-automatic-iso-accents
+		        'vip-want-emacs-keys-in-insert
+		        'vip-want-emacs-keys-in-vi
+		        'vip-keep-point-on-undo
+		        'vip-no-multiple-ESC
+		        'vip-electric-mode
+		        'vip-ESC-key
+		        'vip-want-ctl-h-help
+		        'vip-ex-style-editing-in-insert
+		        'vip-delete-backwards-in-replace
+		        'vip-vi-style-in-minibuffer
+		        'vip-vi-state-hook
+		        'vip-insert-state-hook
+		        'vip-replace-state-hook
+		        'vip-emacs-state-hook
+		        'ex-cycle-other-window
+		        'ex-cycle-through-non-files
+		        'vip-expert-level
+		        'major-mode
+		        'vip-device-type
+			'color-display-p
+			'frame-parameters
+			'minibuffer-vi-face
+			'minibuffer-insert-face
+			'minibuffer-emacs-face
+			))
+	  (setq salutation "
+Congratulations! You may have unearthed a bug in Viper!
+Please mail a concise, accurate summary of the problem to the address above.
+
+-------------------------------------------------------------------")
+	  (setq window-config (current-window-configuration))
+	  (with-output-to-temp-buffer " *vip-info*"
+	    (switch-to-buffer " *vip-info*")
+	    (delete-other-windows)
+	    (princ "
+PLEASE FOLLOW THESE PROCEDURES
+------------------------------
+
+Before reporting a bug, please verify that it is related to Viper, and is
+not cause by other packages you are using.
+
+Don't report compilation warnings, unless you are certain that there is a
+problem. These warnings are normal and unavoidable.
+
+Please note that users should not modify variables and keymaps other than
+those advertised in the manual. Such `customization' is likely to crash
+Viper, as it would any other improperly customized Emacs package.
+
+If you are reporting an error message received while executing one of the
+Viper commands, type:
+
+    M-x set-variable <Return> debug-on-error <Return> t <Return>
+	
+Then reproduce the error. The above command will cause Emacs to produce a
+back trace of the execution that leads to the error. Please include this
+trace in your bug report.
+
+If you believe that one of Viper's commands goes into an infinite loop
+\(e.g., Emacs freezes\), type:
+
+    M-x set-variable <Return> debug-on-quit <Return> t <Return>
+	
+Then reproduce the problem. Wait for a few seconds, then type C-g to abort
+the current command. Include the resulting back trace in the bug report.
+
+Mail anyway (y or n)? ")
+	    (if (y-or-n-p "Mail anyway? ")
+		()
+	      (set-window-configuration window-config)
+	      (error "Bug report aborted")))
+
+	  (require 'reporter)
+	  (set-window-configuration window-config)
+    
+	  (reporter-submit-bug-report "kifer@cs.sunysb.edu"
+				      (vip-version)
+				      varlist
+				      nil 'delete-other-windows
+				      salutation)
+	  ))
+		    
+
+    
+		
+;; Smoothes out the difference between Emacs' unread-command-events
+;; and XEmacs unread-command-event. Arg is a character, an event, a list of
+;; events or a sequence of keys.
+;;
+;; Due to the way unread-command-events in Emacs (not XEmacs), a non-event
+;; symbol in unread-command-events list may cause Emacs to turn this symbol
+;; into an event. Below, we delete nil from event lists, since nil is the most
+;; common symbol that might appear in this wrong context.
+(defun vip-set-unread-command-events (arg)
+  (if vip-emacs-p
+      (setq
+       unread-command-events
+       (let ((new-events
+	      (cond ((eventp arg) (list arg))
+		    ((listp arg) arg)
+		    ((sequencep arg)
+		     (listify-key-sequence arg))
+		    (t (error
+			"vip-set-unread-command-events: Invalid argument, %S"
+			arg)))))
+	 (if (not (eventp nil))
+	     (setq new-events (delq nil new-events)))
+	 (append new-events unread-command-events)))
+    ;; XEmacs
+    (setq
+     unread-command-events
+     (append
+      (cond ((vip-characterp arg) (list (character-to-event arg)))
+	    ((eventp arg)  (list arg))
+	    ((stringp arg) (mapcar 'character-to-event arg))
+	    ((vectorp arg) (append arg nil)) ; turn into list
+	    ((listp arg) (vip-eventify-list-xemacs arg))
+	    (t (error
+		"vip-set-unread-command-events: Invalid argument, %S" arg)))
+      unread-command-events))))
+
+;; list is assumed to be a list of events of characters
+(defun vip-eventify-list-xemacs (lis)
+  (mapcar
+   (function (lambda (elt)
+	       (cond ((vip-characterp elt) (character-to-event elt))
+		     ((eventp elt)  elt)
+		     (t (error
+			 "vip-eventify-list-xemacs: can't convert to event, %S"
+			 elt)))))
+   lis))
+  
+  
+
+;;;  viper-cmd.el ends here
diff -r 4de2936b4e77 -r 0132846995bd lisp/viper/viper-ex.el
--- a/lisp/viper/viper-ex.el	Mon Aug 13 09:42:28 2007 +0200
+++ b/lisp/viper/viper-ex.el	Mon Aug 13 09:43:35 2007 +0200
@@ -34,16 +34,20 @@
 (defvar vip-expert-level)
 (defvar vip-custom-file-name)
 (defvar vip-case-fold-search)
+(defvar explicit-shell-file-name)
 
-(eval-when-compile
-  (let ((load-path (cons (expand-file-name ".") load-path)))
-    (or (featurep 'viper-util)
-	(load "viper-util.el" nil nil 'nosuffix))
-    (or (featurep 'viper-keym)
-	(load "viper-keym.el" nil nil 'nosuffix))
-    (or (featurep 'viper)
-	(load "viper.el" nil nil 'nosuffix))
-    ))
+;; loading happens only in non-interactive compilation
+;; in order to spare non-viperized emacs from being viperized
+(if noninteractive
+    (eval-when-compile
+      (let ((load-path (cons (expand-file-name ".") load-path)))
+	(or (featurep 'viper-util)
+	    (load "viper-util.el" nil nil 'nosuffix))
+	(or (featurep 'viper-keym)
+	    (load "viper-keym.el" nil nil 'nosuffix))
+	(or (featurep 'viper-cmd)
+	    (load "viper-cmd.el" nil nil 'nosuffix))
+	)))
 ;; end pacifier
 
 (require 'viper-util)
@@ -73,15 +77,16 @@
 ;; A-list of Ex variables that can be set using the :set command.
 (defconst ex-variable-alist 
   '(("wrapscan") ("ws") ("wrapmargin") ("wm")
-    ("global-tabstop") ("gts") ("tabstop") ("ts")
+    ("tabstop-global") ("ts-g") ("tabstop") ("ts")
     ("showmatch") ("sm") ("shiftwidth") ("sw") ("shell") ("sh")
     ("readonly") ("ro") 
     ("nowrapscan") ("nows") ("noshowmatch") ("nosm")
     ("noreadonly") ("noro") ("nomagic") ("noma")
     ("noignorecase") ("noic")
-    ("global-noautoindent") ("gnoai") ("noautoindent") ("noai")
+    ("noautoindent-global") ("noai-g") ("noautoindent") ("noai")
     ("magic") ("ma") ("ignorecase") ("ic")
-    ("global-autoindent") ("gai") ("autoindent") ("ai")
+    ("autoindent-global") ("ai-g") ("autoindent") ("ai") 
+    ("all") 
     ))
 
   
@@ -1561,7 +1566,7 @@
     (while (string-match "^[ \\t\\n]*$"
 			 (setq str
 			       (completing-read ":set " ex-variable-alist)))
-      (message ":set <Variable> ")
+      (message ":set <Variable> [= <Value>]")
       ;; if there are unread events, don't wait
       (or (vip-set-unread-command-events "") (sit-for 2))
       ) ; while
@@ -1579,12 +1584,15 @@
 	actual-lisp-cmd lisp-cmd-del-pattern
 	val2 orig-var)
     (setq orig-var var)
-    (cond ((member var '("ai" "autoindent"))
+    (cond ((string= var "all")
+	   (setq ask-if-save nil
+		 set-cmd nil))
+	  ((member var '("ai" "autoindent"))
 	   (setq var "vip-auto-indent"
 		 set-cmd "setq"
 		 ask-if-save nil
 		 val "t"))
-	  ((member var '("gai" "global-autoindent"))
+	  ((member var '("ai-g" "autoindent-global"))
 	   (kill-local-variable 'vip-auto-indent)
 	   (setq var "vip-auto-indent"
 		 set-cmd "setq-default"
@@ -1593,7 +1601,7 @@
 	   (setq var "vip-auto-indent"
 		 ask-if-save nil
 		 val "nil"))
-	  ((member var '("gnoai" "global-noautoindent"))
+	  ((member var '("noai-g" "noautoindent-global"))
 	   (kill-local-variable 'vip-auto-indent)
 	   (setq var "vip-auto-indent"
 		 set-cmd "setq-default"
@@ -1607,7 +1615,7 @@
 	  ((member var '("ma" "magic"))
 	   (setq var "vip-re-search"
 		 val "t"))
-	  ((member var '("noma" "nomagic"))
+  	  ((member var '("noma" "nomagic"))
 	   (setq var "vip-re-search"
 		 val "nil"))
 	  ((member var '("ro" "readonly"))
@@ -1628,7 +1636,7 @@
 	  ((member var '("nows" "nowrapscan"))
 	   (setq var "vip-search-wrap-around-t"
 		 val "nil")))
-    (if (eq val 0) ; value must be set by the user
+    (if (and set-cmd (eq val 0)) ; value must be set by the user
 	(let ((cursor-in-echo-area t))
 	  (message ":set %s = <Value>" var)
 	  ;; if there are unread events, don't wait
@@ -1640,7 +1648,7 @@
 	  (if (member var
 		      '("sw" "shiftwidth"
 			"ts" "tabstop"
-			"gts" "global-tabstop"
+			"ts-g" "tabstop-global"
 			"wm" "wrapmargin")) 
 	      (condition-case nil
 		  (or (numberp (setq val2 (car (read-from-string val))))
@@ -1656,7 +1664,7 @@
 	    (setq var "tab-width"
 		  set-cmd "setq"
 		  ask-if-save nil))
-	   ((member var '("gts" "global-tabstop"))
+	   ((member var '("ts-g" "tabstop-global"))
 	    (kill-local-variable 'tab-width)
 	    (setq var "tab-width"
 		  set-cmd "setq-default"))
@@ -1671,11 +1679,12 @@
 		  val (format "\"%s\"" val)))))
       (ex-fixup-history "set" orig-var))
     
-    (setq actual-lisp-cmd (format "\n(%s %s %s) %s"
-				  set-cmd var val auto-cmd-label))
-    (setq lisp-cmd-del-pattern
-	  (format "^\n?[ \t]*([ \t]*%s[ \t]+%s[ \t].*)[ \t]*%s"
-		  set-cmd var auto-cmd-label))
+    (if set-cmd
+	(setq actual-lisp-cmd
+	      (format "\n(%s %s %s) %s" set-cmd var val auto-cmd-label)
+	      lisp-cmd-del-pattern
+	      (format "^\n?[ \t]*([ \t]*%s[ \t]+%s[ \t].*)[ \t]*%s"
+		      set-cmd var auto-cmd-label)))
     
     (if (and ask-if-save
 	     (y-or-n-p (format "Do you want to save this setting in %s "
@@ -1702,15 +1711,19 @@
 		))
 	  ))
     
-    (message "%s %s %s" set-cmd var (if (string-match "^[ \t]*$" val)
-					(format "%S" val)
-				      val))
-    (eval (car (read-from-string actual-lisp-cmd)))
-	(if (string= var "fill-column")
-		(if (> val2 0)
-			(auto-fill-mode 1)
-		  (auto-fill-mode -1)))
-		
+    (if set-cmd
+	(message "%s %s %s"
+		 set-cmd var
+		 (if (string-match "^[ \t]*$" val)
+		     (format "%S" val)
+		   val)))
+    (if actual-lisp-cmd
+	(eval (car (read-from-string actual-lisp-cmd))))
+    (if (string= var "fill-column")
+	(if (> val2 0)
+	    (auto-fill-mode 1)
+	  (auto-fill-mode -1)))
+    (if (string= var "all") (ex-show-vars))
     ))
 
 ;; In inline args, skip regex-forw and (optionally) chars-back.
@@ -2074,5 +2087,32 @@
 	(kill-buffer " *vip-info*")))
     ))
 
+;; display all variables set through :set
+(defun ex-show-vars ()
+  (with-output-to-temp-buffer " *vip-info*"
+    (princ (if vip-auto-indent
+	       "autoindent (local)\n" "noautoindent (local)\n"))
+    (princ (if (default-value 'vip-auto-indent) 
+	       "autoindent (global) \n" "noautoindent (global) \n"))
+    (princ (if vip-case-fold-search "ignorecase\n" "noignorecase\n"))
+    (princ (if vip-re-search "magic\n" "nomagic\n"))
+    (princ (if buffer-read-only "readonly\n" "noreadonly\n"))
+    (princ (if blink-matching-paren "showmatch\n" "noshowmatch\n"))
+    (princ (if vip-search-wrap-around-t "wrapscan\n" "nowrapscan\n"))
+    (princ (format "shiftwidth \t\t= %S\n" vip-shift-width))
+    (princ (format "tabstop (local) \t= %S\n" tab-width))
+    (princ (format "tabstop (global) \t= %S\n" (default-value 'tab-width)))
+    (princ (format "wrapmargin (local) \t= %S\n"
+		   (- (window-width) fill-column)))
+    (princ (format "wrapmargin (global) \t= %S\n"
+		   (- (window-width) (default-value 'fill-column))))
+    (princ (format "shell \t\t\t= %S\n" (if (boundp 'explicit-shell-file-name)
+					    explicit-shell-file-name
+					  'none)))
+    ))
+
+
+
+
 
 ;;;  viper-ex.el ends here
diff -r 4de2936b4e77 -r 0132846995bd lisp/viper/viper-init.el
--- a/lisp/viper/viper-init.el	Mon Aug 13 09:42:28 2007 +0200
+++ b/lisp/viper/viper-init.el	Mon Aug 13 09:43:35 2007 +0200
@@ -25,8 +25,16 @@
 
 ;; compiler pacifier
 (defvar mark-even-if-inactive)
+(defvar viper-version)
 ;; end pacifier
 
+
+;; Viper version
+(defun viper-version ()
+  (interactive)
+  (message "Viper version is %s" viper-version)) 
+(defalias 'vip-version 'viper-version)
+
 ;; Is it XEmacs?
 (defconst vip-xemacs-p (string-match "\\(Lucid\\|XEmacs\\)" emacs-version))
 ;; Is it Emacs?
@@ -122,15 +130,6 @@
 
 ;;; Viper minor modes
 
-;; This is not local in Emacs, so we make it local.
-;; This must be local because although the stack of minor modes can be the same
-;; for all buffers, the associated *keymaps* can be different. In Viper,
-;; vip-vi-local-user-map, vip-insert-local-user-map, and others can have
-;; different keymaps for different buffers.
-;; Also, the keymaps associated with vip-vi/insert-state-modifier-minor-mode
-;; can be different.
-(make-variable-buffer-local 'minor-mode-map-alist)
-
 ;; Mode for vital things like \e, C-z.
 (vip-deflocalvar vip-vi-intercept-minor-mode nil)
 
@@ -597,16 +596,10 @@
 
 ;;; Miscellaneous
 
-;; don't bark when mark is inactive
-(setq mark-even-if-inactive t)
-
 (defvar vip-inhibit-startup-message nil
   "Whether Viper startup message should be inhibited.")
 
-(defvar vip-always t
-  "t means, arrange that vi-state will be a default.")
-
-(defvar vip-custom-file-name (vip-convert-standard-file-name "~/.vip")
+(defvar vip-custom-file-name (vip-convert-standard-file-name "~/.viper")
   "Viper customisation file.
 This variable must be set _before_ loading Viper.")
 
@@ -634,12 +627,6 @@
 ;; Beginning with Emacs 19.26, the standard `minibuffer-exit-hook' is run
 ;; *after* exiting the minibuffer
 (defvar vip-minibuffer-exit-hook nil)
-
-;; setup emacs-supported vi-style feel
-(setq next-line-add-newlines nil
-      require-final-newline t)
-
-(make-variable-buffer-local 'require-final-newline)
        
 
 ;; Mode line
@@ -652,15 +639,6 @@
 (defconst vip-replace-state-id	"<R> "
   "Mode line tag identifying the Replace mode of Viper.")
 
-;; Viper changes the default mode-line-buffer-identification
-(setq-default mode-line-buffer-identification '(" %b"))
-
-;; Variable displaying the current Viper state in the mode line.
-(vip-deflocalvar vip-mode-string vip-emacs-state-id)
-(or (memq 'vip-mode-string global-mode-string)
-    (setq global-mode-string
-	  (append '("" vip-mode-string) (cdr global-mode-string))))
-
 
 (defvar vip-vi-state-hook nil
   "*Hooks run just before the switch to Vi mode is completed.")
diff -r 4de2936b4e77 -r 0132846995bd lisp/viper/viper-keym.el
--- a/lisp/viper/viper-keym.el	Mon Aug 13 09:42:28 2007 +0200
+++ b/lisp/viper/viper-keym.el	Mon Aug 13 09:43:35 2007 +0200
@@ -24,18 +24,21 @@
 (provide 'viper-keym)
 
 ;; compiler pacifier
-(defvar vip-always)
+(defvar viper-always)
 (defvar vip-current-state)
 (defvar vip-mode-string)
 (defvar vip-expert-level)
 (defvar vip-ex-style-editing-in-insert)
 (defvar vip-ex-style-motion)
 
-(eval-when-compile
-  (let ((load-path (cons (expand-file-name ".") load-path)))
-    (or (featurep 'viper-util)
-	(load "viper-util.el" nil nil 'nosuffix))
-    ))
+;; loading happens only in non-interactive compilation
+;; in order to spare non-viperized emacs from being viperized
+(if noninteractive
+    (eval-when-compile
+      (let ((load-path (cons (expand-file-name ".") load-path)))
+	(or (featurep 'viper-util)
+	    (load "viper-util.el" nil nil 'nosuffix))
+	)))
 ;; end pacifier
 
 (require 'viper-util)
@@ -583,7 +586,7 @@
     
     (princ (format "\nvip-expert-level  %S\n" vip-expert-level))
     (princ (format "vip-no-multiple-ESC  %S\n" vip-no-multiple-ESC))
-    (princ (format "vip-always  %S\n" vip-always))
+    (princ (format "viper-always  %S\n" viper-always))
     (princ (format "vip-ex-style-motion  %S\n"
 		   vip-ex-style-motion))
     (princ (format "vip-ex-style-editing-in-insert  %S\n"
diff -r 4de2936b4e77 -r 0132846995bd lisp/viper/viper-macs.el
--- a/lisp/viper/viper-macs.el	Mon Aug 13 09:42:28 2007 +0200
+++ b/lisp/viper/viper-macs.el	Mon Aug 13 09:43:35 2007 +0200
@@ -28,17 +28,20 @@
 (defvar vip-custom-file-name)
 (defvar vip-current-state)
 
-(eval-when-compile
-  (let ((load-path (cons (expand-file-name ".") load-path)))
-    (or (featurep 'viper-util)
-	(load "viper-util.el" nil nil 'nosuffix))
-    (or (featurep 'viper-keym)
-	(load "viper-keym.el" nil nil 'nosuffix))
-    (or (featurep 'viper-mous)
-	(load "viper-mous.el" nil nil 'nosuffix))
-    (or (featurep 'viper)
-	(load "viper.el" nil nil 'nosuffix))
-    ))
+;; loading happens only in non-interactive compilation
+;; in order to spare non-viperized emacs from being viperized
+(if noninteractive
+    (eval-when-compile
+      (let ((load-path (cons (expand-file-name ".") load-path)))
+	(or (featurep 'viper-util)
+	    (load "viper-util.el" nil nil 'nosuffix))
+	(or (featurep 'viper-keym)
+	    (load "viper-keym.el" nil nil 'nosuffix))
+	(or (featurep 'viper-mous)
+	    (load "viper-mous.el" nil nil 'nosuffix))
+	(or (featurep 'viper-cmd)
+	    (load "viper-cmd.el" nil nil 'nosuffix))
+	)))
 ;; end pacifier
 
 (require 'viper-util)
@@ -317,14 +320,6 @@
 
 
 
-(defadvice start-kbd-macro (after vip-kbd-advice activate)
-  "Remove Viper's intercepting bindings for C-x ).
-This may be needed if the previous `:map' command terminated abnormally."
-  (define-key vip-vi-intercept-map "\C-x)" nil)
-  (define-key vip-insert-intercept-map "\C-x)" nil)
-  (define-key vip-emacs-intercept-map "\C-x)" nil))
-
-
 
 ;;; Recording, unrecording, executing
 
diff -r 4de2936b4e77 -r 0132846995bd lisp/viper/viper-mous.el
--- a/lisp/viper/viper-mous.el	Mon Aug 13 09:42:28 2007 +0200
+++ b/lisp/viper/viper-mous.el	Mon Aug 13 09:43:35 2007 +0200
@@ -32,13 +32,16 @@
 (defvar vip-s-string)
 (defvar vip-re-search)
 
-(eval-when-compile
-  (let ((load-path (cons (expand-file-name ".") load-path)))
-    (or (featurep 'viper-util)
-	(load "viper-util.el" nil nil 'nosuffix))
-    (or (featurep 'viper)
-	(load "viper.el" nil nil 'nosuffix))
-    ))
+;; loading happens only in non-interactive compilation
+;; in order to spare non-viperized emacs from being viperized
+(if noninteractive
+    (eval-when-compile
+      (let ((load-path (cons (expand-file-name ".") load-path)))
+	(or (featurep 'viper-util)
+	    (load "viper-util.el" nil nil 'nosuffix))
+	(or (featurep 'viper-cmd)
+	    (load "viper-cmd.el" nil nil 'nosuffix))
+	)))
 ;; end pacifier
 
 (require 'viper-util)
@@ -63,9 +66,11 @@
        
 ;; time interval in millisecond within which successive clicks are
 ;; considered related
-(defconst vip-multiclick-timeout (if vip-xemacs-p
-				     mouse-track-multi-click-time
-				   double-click-time)
+(defconst vip-multiclick-timeout (if (vip-window-display-p)
+				     (if vip-xemacs-p
+					 mouse-track-multi-click-time
+				       double-click-time)
+				   500)
   "*Time interval in millisecond within which successive clicks are
 considered related.")
 
@@ -396,7 +401,7 @@
 (defun vip-mouse-catch-frame-switch (event arg)
   "Catch the event of switching frame.
 Usually is bound to a 'down-mouse' event to work properly. See sample
-bindings in viper.el and in the Viper manual."
+bindings in the Viper manual."
   (interactive "e\nP")
   (setq vip-frame-of-focus nil)
   ;; pass prefix arg along to vip-mouse-click-search/insert-word
@@ -427,46 +432,5 @@
 	vip-current-frame-saved (selected-frame)))
 
 
-(cond ((vip-window-display-p)
-       (let* ((search-key (if vip-xemacs-p
-			      [(meta shift button1up)] [M-S-mouse-1]))
-	      (search-key-catch (if vip-xemacs-p
-				    [(meta shift button1)] [M-S-down-mouse-1]))
-	      (insert-key (if vip-xemacs-p
-			      [(meta shift button2up)] [M-S-mouse-2]))
-	      (insert-key-catch (if vip-xemacs-p
-				    [(meta shift button2)] [M-S-down-mouse-2]))
-	      (search-key-unbound (and (not (key-binding search-key))
-				       (not (key-binding search-key-catch))))
-	      (insert-key-unbound (and (not (key-binding insert-key))
-				       (not (key-binding insert-key-catch))))
-	      )
-	     
-	 (if search-key-unbound
-	     (global-set-key search-key 'vip-mouse-click-search-word))
-	 (if insert-key-unbound
-	     (global-set-key insert-key 'vip-mouse-click-insert-word))
-    
-	 ;; The following would be needed if you want to use the above two
-	 ;; while clicking in another frame. If you only want to use them
-	 ;; by clicking in another window, not frame, the bindings below
-	 ;; aren't necessary.
-	 
-	 ;; These must be bound to mouse-down event for the same mouse
-	 ;; buttons as 'vip-mouse-click-search-word and
-	 ;; 'vip-mouse-click-insert-word
-	 (if search-key-unbound
-	     (global-set-key search-key-catch   'vip-mouse-catch-frame-switch))
-	 (if insert-key-unbound
-	     (global-set-key insert-key-catch   'vip-mouse-catch-frame-switch))
-	 
-	 (if vip-xemacs-p
-	     (add-hook 'mouse-leave-frame-hook
-		       'vip-remember-current-frame)
-	   (defadvice handle-switch-frame (before vip-frame-advice activate)
-	     "Remember the selected frame before the switch-frame event." 
-	     (vip-remember-current-frame (selected-frame))))
-       )))
-
 
 ;;;  viper-mous.el ends here
diff -r 4de2936b4e77 -r 0132846995bd lisp/viper/viper-util.el
--- a/lisp/viper/viper-util.el	Mon Aug 13 09:42:28 2007 +0200
+++ b/lisp/viper/viper-util.el	Mon Aug 13 09:43:35 2007 +0200
@@ -39,12 +39,12 @@
 (require 'cl)
 (require 'ring)
 
-(and noninteractive
-     (eval-when-compile
-       (let ((load-path (cons (expand-file-name ".") load-path)))
-	 (or (featurep 'viper-init)
-	     (load "viper-init.el" nil nil 'nosuffix))
-	 )))
+(if noninteractive
+    (eval-when-compile
+      (let ((load-path (cons (expand-file-name ".") load-path)))
+	(or (featurep 'viper-init)
+	    (load "viper-init.el" nil nil 'nosuffix))
+	)))
 ;; end pacifier
 
 (require 'viper-init)
diff -r 4de2936b4e77 -r 0132846995bd lisp/viper/viper.el
--- a/lisp/viper/viper.el	Mon Aug 13 09:42:28 2007 +0200
+++ b/lisp/viper/viper.el	Mon Aug 13 09:43:35 2007 +0200
@@ -8,7 +8,7 @@
 
 ;; Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
 
-(defconst viper-version "2.93 of May 20, 1997"
+(defconst viper-version "2.94 of June 12, 1997"
   "The current version of Viper")
 
 ;; This file is part of GNU Emacs.
@@ -300,416 +300,62 @@
 (require 'cl)
 (require 'ring)
 
-(provide 'viper)
-
-;; Compiler pacifier
-(defvar vip-minibuffer-current-face)
-(defvar vip-minibuffer-insert-face)
-(defvar vip-minibuffer-vi-face)
-(defvar vip-minibuffer-emacs-face)
-(defvar iso-accents-mode)
-(defvar zmacs-region-stays)
+;; compiler pacifier
 (defvar mark-even-if-inactive)
 
-(eval-when-compile
-  (let ((load-path (cons (expand-file-name ".") load-path)))
-    (or (featurep 'viper-util)
-	(load "viper-util.el" nil nil 'nosuffix))
-    (or (featurep 'viper-keym)
-	(load "viper-keym.el" nil nil 'nosuffix))
-    (or (featurep 'viper-mous)
-	(load "viper-mous.el" nil nil 'nosuffix))
-    (or (featurep 'viper-macs)
-	(load "viper-macs.el" nil nil 'nosuffix))
-    (or (featurep 'viper-ex)
-	(load "viper-ex.el" nil nil 'nosuffix))
-    ))
+;; loading happens only in non-interactive compilation
+;; in order to spare non-viperized emacs from being viperized
+(if noninteractive
+    (eval-when-compile
+      (let ((load-path (cons (expand-file-name ".") load-path)))
+	(or (featurep 'viper-cmd)
+	    (load "viper-cmd.el" nil nil 'nosuffix))
+	)))
 ;; end pacifier
 
-
-(require 'viper-util)
-(require 'viper-keym)
-(require 'viper-mous)
-(require 'viper-macs)
-(require 'viper-ex)
-
-
-
-;; Generic predicates
-
-;; These test functions are shamelessly lifted from vip 4.4.2 by Aamod Sane
-
-;; generate test functions
-;; given symbol foo, foo-p is the test function, foos is the set of
-;; Viper command keys
-;; (macroexpand '(vip-test-com-defun foo))
-;; (defun foo-p (com) (consp (memq (if (< com 0) (- com) com) foos)))
-
-(defmacro vip-test-com-defun (name)
-  (let* ((snm (symbol-name name))
-	 (nm-p (intern (concat snm "-p")))
-	 (nms (intern (concat snm "s"))))
-    (` (defun (, nm-p) (com) 
-	 (consp (memq (if (< com 0) (- com) com) (, nms)))))))
-  
-;; Variables for defining VI commands
-
-;; Modifying commands that can be prefixes to movement commands
-(defconst vip-prefix-commands '(?c ?d ?y ?! ?= ?# ?< ?> ?\"))
-;; define vip-prefix-command-p
-(vip-test-com-defun vip-prefix-command)
-  
-;; Commands that are pairs eg. dd. r and R here are a hack
-(defconst vip-charpair-commands '(?c ?d ?y ?! ?= ?< ?> ?r ?R))
-;; define vip-charpair-command-p
-(vip-test-com-defun vip-charpair-command)
+(require 'viper-cmd)
 
-(defconst vip-movement-commands '(?b ?B ?e ?E ?f ?F ?G ?h ?H ?j ?k ?l
-				     ?H ?M ?L ?n ?t ?T ?w ?W ?$ ?%
-				     ?^ ?( ?) ?- ?+ ?| ?{ ?} ?[ ?] ?' ?`
-				     ?; ?, ?0 ?? ?/
-				     )
-				     "Movement commands")
-;; define vip-movement-command-p
-(vip-test-com-defun vip-movement-command)
-
-(defconst vip-digit-commands '(?1 ?2 ?3 ?4 ?5 ?6 ?7 ?8 ?9)
-  "Digit commands")
-;; define vip-digit-command-p
-(vip-test-com-defun vip-digit-command)
-
-;; Commands that can be repeated by . (dotted)
-(defconst vip-dotable-commands '(?c ?d ?C ?s ?S ?D ?> ?<))
-;; define vip-dotable-command-p
-(vip-test-com-defun vip-dotable-command)
+(defvar vip-always t
+  "See `viper-always'. This variable is for compatibility with older Vipers.")
+(defvar viper-always vip-always
+  "Non-nil means, arrange for vi-state to be a default when appropriate.
+This is different from `viper-mode' variable in that `viper-mode' determines
+whether to use Viper in the first place, while `viper-always', if nil, lets
+user decide when to invoke Viper in a major mode.")
 
-;; Commands that can follow a #
-(defconst vip-hash-commands '(?c ?C ?g ?q ?s))
-;; define vip-hash-command-p
-(vip-test-com-defun vip-hash-command)
-
-;; Commands that may have registers as prefix
-(defconst vip-regsuffix-commands '(?d ?y ?Y ?D ?p ?P ?x ?X))
-;; define vip-regsuffix-command-p
-(vip-test-com-defun vip-regsuffix-command)
+(defvar viper-mode (cond (noninteractive nil)
+			 (t 'ask))
+  "Viperize or not Viperize.
+If t, viperize emacs. If nil -- don't. If `ask', ask the user.
+This variable is used primatily when Viper is being loaded.
 
-(defconst vip-vi-commands (append vip-movement-commands
-				  vip-digit-commands
-				  vip-dotable-commands
-				  vip-charpair-commands
-				  vip-hash-commands
-				  vip-prefix-commands
-				  vip-regsuffix-commands)
-  "The list of all commands in Vi-state.")
-;; define vip-vi-command-p
-(vip-test-com-defun vip-vi-command)
+Must be set in `~/.emacs' before Viper is loaded.
+DO NOT set this variable interactively.")
 
 
-;;; CODE
-
-;; sentinels
-
-;; Runs vip-after-change-functions inside after-change-functions
-(defun vip-after-change-sentinel (beg end len)
-  (let ((list vip-after-change-functions))
-    (while list
-      (funcall (car list) beg end len)
-      (setq list (cdr list)))))
-      
-;; Runs vip-before-change-functions inside before-change-functions
-(defun vip-before-change-sentinel (beg end)
-  (let ((list vip-before-change-functions))
-    (while list
-      (funcall (car list) beg end)
-      (setq list (cdr list)))))
-
-(defsubst vip-post-command-sentinel ()
-  (run-hooks 'vip-post-command-hooks))
-  
-(defsubst vip-pre-command-sentinel ()
-  (run-hooks 'vip-pre-command-hooks))
-  
-;; Needed so that Viper will be able to figure the last inserted
-;; chunk of text with reasonable accuracy.
-(defsubst vip-insert-state-post-command-sentinel ()
-  (if (and (memq vip-current-state '(insert-state replace-state))
-	   vip-insert-point
-	   (>= (point) vip-insert-point))
-      (setq vip-last-posn-while-in-insert-state (point-marker)))
-  (if (eq vip-current-state 'insert-state)
-      (progn
-	(or (stringp vip-saved-cursor-color)
-	    (string= (vip-get-cursor-color) vip-insert-state-cursor-color)
-	    (setq vip-saved-cursor-color (vip-get-cursor-color)))
-	(if (stringp vip-saved-cursor-color)
-	    (vip-change-cursor-color vip-insert-state-cursor-color))
-	))
-  (if (and (eq this-command 'dabbrev-expand)
-	   (integerp vip-pre-command-point)
-	   (> vip-insert-point vip-pre-command-point))
-      (move-marker vip-insert-point vip-pre-command-point))
-  )
-  
-(defsubst vip-insert-state-pre-command-sentinel ()
-  (or (memq this-command '(self-insert-command))
-      (memq (vip-event-key last-command-event)
-	    '(up down left right (meta f) (meta b)
-		 (control n) (control p) (control f) (control b)))
-      (vip-restore-cursor-color-after-insert))
-  (if (and (eq this-command 'dabbrev-expand)
-	   (markerp vip-insert-point)
-	   (marker-position vip-insert-point))
-      (setq vip-pre-command-point (marker-position vip-insert-point))))
-	
-(defsubst vip-R-state-post-command-sentinel ()
-  ;; Restoring cursor color is needed despite
-  ;; vip-replace-state-pre-command-sentinel: When you jump to another buffer in
-  ;; another frame, the pre-command hook won't change cursor color to default
-  ;; in that other frame.  So, if the second frame cursor was red and we set
-  ;; the point outside the replacement region, then the cursor color will
-  ;; remain red. Restoring the default, below, prevents this.
-  (if (and (<= (vip-replace-start) (point))
-	   (<=  (point) (vip-replace-end)))
-      (vip-change-cursor-color vip-replace-overlay-cursor-color)
-    (vip-restore-cursor-color-after-replace)
-    ))
-
-;; to speed up, don't change cursor color before self-insert
-;; and common move commands
-(defsubst vip-replace-state-pre-command-sentinel ()
-  (or (memq this-command '(self-insert-command))
-      (memq (vip-event-key last-command-event)
-	    '(up down left right (meta f) (meta b)
-		 (control n) (control p) (control f) (control b)))
-      (vip-restore-cursor-color-after-replace)))
-  
-(defun vip-replace-state-post-command-sentinel ()
-  ;; Restoring cursor color is needed despite
-  ;; vip-replace-state-pre-command-sentinel: When one jumps to another buffer
-  ;; in another frame, the pre-command hook won't change cursor color to
-  ;; default in that other frame.  So, if the second frame cursor was red and
-  ;; we set the point outside the replacement region, then the cursor color
-  ;; will remain red. Restoring the default, below, fixes this problem.
-  ;;
-  ;; We optimize for self-insert-command's here, since they either don't change
-  ;; cursor color or, if they terminate replace mode, the color will be changed
-  ;; in vip-finish-change
-  (or (memq this-command '(self-insert-command))
-      (vip-restore-cursor-color-after-replace))
-  (cond 
-   ((eq vip-current-state 'replace-state)
-    ;; delete characters to compensate for inserted chars.
-    (let ((replace-boundary (vip-replace-end)))
-      (save-excursion
-	(goto-char vip-last-posn-in-replace-region)
-	(delete-char vip-replace-chars-to-delete)
-	(setq vip-replace-chars-to-delete 0
-	      vip-replace-chars-deleted 0)
-	;; terminate replace mode if reached replace limit
-	(if (= vip-last-posn-in-replace-region 
-	       (vip-replace-end))
-	    (vip-finish-change vip-last-posn-in-replace-region)))
-      
-      (if (and (<= (vip-replace-start) (point))
-	       (<=  (point) replace-boundary))
-	  (progn
-	    ;; the state may have changed in vip-finish-change above
-	    (if (eq vip-current-state 'replace-state)
-		(vip-change-cursor-color vip-replace-overlay-cursor-color))
-	    (setq vip-last-posn-in-replace-region (point-marker))))
-      ))
-   
-   (t ;; terminate replace mode if changed Viper states.
-    (vip-finish-change vip-last-posn-in-replace-region))))
-
-
-;; changing mode
+;; The following are provided for compatibility with older VIP's
 
-;; Change state to NEW-STATE---either emacs-state, vi-state, or insert-state.
-(defun vip-change-state (new-state)
-  ;; Keep vip-post/pre-command-hooks fresh.
-  ;; We remove then add vip-post/pre-command-sentinel since it is very
-  ;; desirable that vip-pre-command-sentinel is the last hook and
-  ;; vip-post-command-sentinel is the first hook.
-  (remove-hook 'post-command-hook 'vip-post-command-sentinel)
-  (add-hook 'post-command-hook 'vip-post-command-sentinel)
-  (remove-hook 'pre-command-hook 'vip-pre-command-sentinel)
-  (add-hook 'pre-command-hook 'vip-pre-command-sentinel t)
-  ;; These hooks will be added back if switching to insert/replace mode
-  (vip-remove-hook 'vip-post-command-hooks
-		   'vip-insert-state-post-command-sentinel)
-  (vip-remove-hook 'vip-pre-command-hooks
-		   'vip-insert-state-pre-command-sentinel)
-  (cond ((eq new-state 'vi-state)
-	 (cond ((member vip-current-state '(insert-state replace-state))
-		    
-		;; move vip-last-posn-while-in-insert-state
-		;; This is a normal hook that is executed in insert/replace
-		;; states after each command. In Vi/Emacs state, it does
-		;; nothing. We need to execute it here to make sure that
-		;; the last posn was recorded when we hit ESC.
-		;; It may be left unrecorded if the last thing done in
-		;; insert/repl state was dabbrev-expansion or abbrev
-		;; expansion caused by hitting ESC
-		(vip-insert-state-post-command-sentinel)
-		
-		(condition-case conds
-		    (progn
-		      (vip-save-last-insertion
-		       vip-insert-point 
-		       vip-last-posn-while-in-insert-state)
-		      (if vip-began-as-replace
-			  (setq vip-began-as-replace nil)
-			;; repeat insert commands if numerical arg > 1
-			(save-excursion
-			  (vip-repeat-insert-command))))
-		  (error
-		   (vip-message-conditions conds)))
-		     
-		(if (> (length vip-last-insertion) 0)
-		    (vip-push-onto-ring vip-last-insertion
-					'vip-insertion-ring))
-		
-		(if vip-ex-style-editing-in-insert
-		    (or (bolp) (backward-char 1))))
-	       ))
-	 
-	;; insert or replace
-	((memq new-state '(insert-state replace-state))
-	 (if (memq vip-current-state '(emacs-state vi-state))
-	     (vip-move-marker-locally 'vip-insert-point (point)))
-	 (vip-move-marker-locally 'vip-last-posn-while-in-insert-state (point))
-	 (vip-add-hook 'vip-post-command-hooks
-		       'vip-insert-state-post-command-sentinel t)
-	 (vip-add-hook 'vip-pre-command-hooks
-		       'vip-insert-state-pre-command-sentinel t))
-	) ; outermost cond
-  
-  ;; Nothing needs to be done to switch to emacs mode! Just set some
-  ;; variables, which is already done in vip-change-state-to-emacs!
-
-  (setq vip-current-state new-state)
-  (vip-normalize-minor-mode-map-alist)
-  (vip-adjust-keys-for new-state)
-  (vip-set-mode-vars-for new-state)
-  (vip-refresh-mode-line)
-  )
-
+;;;###autoload
+(defalias 'vip-mode 'viper-mode)
 
-    
-(defun vip-adjust-keys-for (state)
-  "Make necessary adjustments to keymaps before entering STATE."
-  (cond ((memq state '(insert-state replace-state))
-	 (if vip-auto-indent
-	     (progn
-	       (define-key vip-insert-basic-map "\C-m" 'vip-autoindent)
-	       (if vip-want-emacs-keys-in-insert
-		   ;; expert
-		   (define-key vip-insert-basic-map "\C-j" nil)
-		 ;; novice
-		 (define-key vip-insert-basic-map "\C-j" 'vip-autoindent)))
-	   (define-key vip-insert-basic-map "\C-m" nil)
-	   (define-key vip-insert-basic-map "\C-j" nil))
-		    
-	 (setq vip-insert-diehard-minor-mode
-	       (not vip-want-emacs-keys-in-insert))
-		   
-	 (if vip-want-ctl-h-help
-	     (progn 
-	       (define-key vip-insert-basic-map [(control h)] 'help-command)
-	       (define-key vip-replace-map [(control h)] 'help-command))
-	   (define-key vip-insert-basic-map 
-	     [(control h)] 'vip-del-backward-char-in-insert)
-	   (define-key vip-replace-map
-	     [(control h)] 'vip-del-backward-char-in-replace)))
-		     
-	(t ; Vi state
-	 (setq vip-vi-diehard-minor-mode (not vip-want-emacs-keys-in-vi))
-	 (if vip-want-ctl-h-help
-	     (define-key vip-vi-basic-map [(control h)] 'help-command)
-	   (define-key vip-vi-basic-map [(control h)] 'vip-backward-char)))
-	))
-	     
-    
-;; Normalizes minor-mode-map-alist by putting Viper keymaps first.
-;; This ensures that Viper bindings are in effect, regardless of which minor
-;; modes were turned on by the user or by other packages.
-(defun vip-normalize-minor-mode-map-alist ()
-  (setq minor-mode-map-alist 
-	(vip-append-filter-alist
-	 (list
-	       (cons 'vip-vi-intercept-minor-mode vip-vi-intercept-map)
-	       (cons 'vip-vi-minibuffer-minor-mode vip-minibuffer-map) 
-	       (cons 'vip-vi-local-user-minor-mode vip-vi-local-user-map)
-	       (cons 'vip-vi-kbd-minor-mode vip-vi-kbd-map)
-	       (cons 'vip-vi-global-user-minor-mode vip-vi-global-user-map)
-	       (cons 'vip-vi-state-modifier-minor-mode
-		     (if (keymapp
-			  (cdr (assoc major-mode vip-vi-state-modifier-alist)))
-			 (cdr (assoc major-mode vip-vi-state-modifier-alist))
-		       vip-empty-keymap))
-	       (cons 'vip-vi-diehard-minor-mode  vip-vi-diehard-map)
-	       (cons 'vip-vi-basic-minor-mode     vip-vi-basic-map)
-	       (cons 'vip-insert-intercept-minor-mode vip-insert-intercept-map)
-	       (cons 'vip-replace-minor-mode  vip-replace-map)
-	       ;; vip-insert-minibuffer-minor-mode must come after
-	       ;; vip-replace-minor-mode 
-	       (cons 'vip-insert-minibuffer-minor-mode
-		     vip-minibuffer-map) 
-	       (cons 'vip-insert-local-user-minor-mode
-		     vip-insert-local-user-map)
-	       (cons 'vip-insert-kbd-minor-mode vip-insert-kbd-map)
-	       (cons 'vip-insert-global-user-minor-mode
-		     vip-insert-global-user-map)
-	       (cons 'vip-insert-state-modifier-minor-mode
-		     (if (keymapp
-			  (cdr
-			   (assoc major-mode vip-insert-state-modifier-alist)))
-			 (cdr
-			  (assoc major-mode vip-insert-state-modifier-alist))
-		       vip-empty-keymap))
-	       (cons 'vip-insert-diehard-minor-mode vip-insert-diehard-map)
-	       (cons 'vip-insert-basic-minor-mode vip-insert-basic-map)
-	       (cons 'vip-emacs-intercept-minor-mode
-		     vip-emacs-intercept-map)
-	       (cons 'vip-emacs-local-user-minor-mode
-		     vip-emacs-local-user-map)
-	       (cons 'vip-emacs-kbd-minor-mode vip-emacs-kbd-map)
-	       (cons 'vip-emacs-global-user-minor-mode
-		     vip-emacs-global-user-map)
-	       (cons 'vip-emacs-state-modifier-minor-mode
-		     (if (keymapp
-			  (cdr
-			   (assoc major-mode vip-emacs-state-modifier-alist)))
-			 (cdr
-			  (assoc major-mode vip-emacs-state-modifier-alist))
-		       vip-empty-keymap))
-	       )
-	 minor-mode-map-alist)))
-	 
- 
-
+(defalias 'vip-change-mode-to-vi 'vip-change-state-to-vi)
+(defalias 'vip-change-mode-to-insert 'vip-change-state-to-insert)
+(defalias 'vip-change-mode-to-emacs 'vip-change-state-to-emacs)
 
 
-;; Viper mode-changing commands and utilities
 
-;; Modifies mode-line-buffer-identification.
-(defun vip-refresh-mode-line ()
-  (setq vip-mode-string	
-	(cond ((eq vip-current-state 'emacs-state) vip-emacs-state-id)
-	      ((eq vip-current-state 'vi-state) vip-vi-state-id)
-	      ((eq vip-current-state 'replace-state) vip-replace-state-id)
-	      ((eq vip-current-state 'insert-state) vip-insert-state-id)))
-    
-  ;; Sets Viper mode string in global-mode-string
-  (force-mode-line-update))
-  
 ;;;###autoload
 (defun viper-mode ()
   "Turn on Viper emulation of Vi."
   (interactive)
   (if (not noninteractive)
       (progn
+	;; if the user requested viper-mode explicitly
+	(if viper-mode
+	    ()
+	  (setq viper-mode 1)
+	  (load-library "viper"))
+
 	(if vip-first-time ; This check is important. Without it, startup and 
 	    (progn	   ; expert-level msgs mix up when viper-mode recurses
 	      (setq vip-first-time nil)
@@ -773,4240 +419,8 @@
 		    ))
 	      (vip-set-expert-level 'dont-change-unless)))
 	(vip-change-state-to-vi))))
-	
-;;;###autoload
-(defalias 'vip-mode 'viper-mode)
-
-
-;; Switch from Insert state to Vi state.
-(defun vip-exit-insert-state ()
-  (interactive)
-  (vip-change-state-to-vi))
-
-(defun vip-set-mode-vars-for (state)
-  "Sets Viper minor mode variables to put Viper's state STATE in effect."
-  
-  ;; Emacs state
-  (setq vip-vi-minibuffer-minor-mode	   nil
-        vip-insert-minibuffer-minor-mode   nil
-	vip-vi-intercept-minor-mode	   nil
-	vip-insert-intercept-minor-mode	   nil
-	
-	vip-vi-local-user-minor-mode       nil
-	vip-vi-kbd-minor-mode        	   nil
-	vip-vi-global-user-minor-mode      nil
-	vip-vi-state-modifier-minor-mode   nil
-	vip-vi-diehard-minor-mode     	   nil
-        vip-vi-basic-minor-mode       	   nil
-	
-	vip-replace-minor-mode 	      	   nil
-	
-	vip-insert-local-user-minor-mode     nil
-	vip-insert-kbd-minor-mode     	     nil
-	vip-insert-global-user-minor-mode    nil
-	vip-insert-state-modifier-minor-mode nil
-	vip-insert-diehard-minor-mode 	     nil
-	vip-insert-basic-minor-mode   	     nil
-	vip-emacs-intercept-minor-mode       t
-	vip-emacs-local-user-minor-mode      t
-	vip-emacs-kbd-minor-mode             (not (vip-is-in-minibuffer))
-	vip-emacs-global-user-minor-mode     t
-	vip-emacs-state-modifier-minor-mode  t
-	)
-  
-  ;; Vi state
-  (if (eq state 'vi-state) ; adjust for vi-state
-      (setq 
-       vip-vi-intercept-minor-mode	   t 
-       vip-vi-minibuffer-minor-mode	   (vip-is-in-minibuffer)
-       vip-vi-local-user-minor-mode	   t
-       vip-vi-kbd-minor-mode        	   (not (vip-is-in-minibuffer))
-       vip-vi-global-user-minor-mode	   t
-       vip-vi-state-modifier-minor-mode    t
-       ;; don't let the diehard keymap block command completion 
-       ;; and other things in the minibuffer
-       vip-vi-diehard-minor-mode    	   (not
-					    (or vip-want-emacs-keys-in-vi
-						(vip-is-in-minibuffer)))
-       vip-vi-basic-minor-mode      	    t 
-       vip-emacs-intercept-minor-mode       nil
-       vip-emacs-local-user-minor-mode      nil
-       vip-emacs-kbd-minor-mode     	    nil
-       vip-emacs-global-user-minor-mode     nil
-       vip-emacs-state-modifier-minor-mode  nil
-       ))
-  
-  ;; Insert and Replace states
-  (if (member state '(insert-state replace-state))
-      (setq 
-       vip-insert-intercept-minor-mode	    t 
-       vip-replace-minor-mode	     	    (eq state 'replace-state)
-       vip-insert-minibuffer-minor-mode	    (vip-is-in-minibuffer)
-       vip-insert-local-user-minor-mode     t
-       vip-insert-kbd-minor-mode     	    (not (vip-is-in-minibuffer))
-       vip-insert-global-user-minor-mode    t
-       vip-insert-state-modifier-minor-mode  t
-       ;; don't let the diehard keymap block command completion 
-       ;; and other things in the minibuffer
-       vip-insert-diehard-minor-mode 	    (not
-					     (or vip-want-emacs-keys-in-insert
-						 (vip-is-in-minibuffer)))
-       vip-insert-basic-minor-mode   	    t
-       vip-emacs-intercept-minor-mode       nil
-       vip-emacs-local-user-minor-mode      nil
-       vip-emacs-kbd-minor-mode     	    nil
-       vip-emacs-global-user-minor-mode     nil
-       vip-emacs-state-modifier-minor-mode  nil
-       ))
-       
-  ;; minibuffer faces
-  (if (vip-has-face-support-p)
-      (setq vip-minibuffer-current-face
-	    (cond ((eq state 'emacs-state) vip-minibuffer-emacs-face)
-		  ((eq state 'vi-state) vip-minibuffer-vi-face)
-		  ((memq state '(insert-state replace-state))
-		   vip-minibuffer-insert-face))))
-  
-  (if (vip-is-in-minibuffer)
-      (vip-set-minibuffer-overlay))
-  )
-
-;; This also takes care of the annoying incomplete lines in files.
-;; Also, this fixes `undo' to work vi-style for complex commands.
-(defun vip-change-state-to-vi ()
-  "Change Viper state to Vi."
-  (interactive)
-  (if (and vip-first-time (not (vip-is-in-minibuffer)))
-      (viper-mode)
-    (if overwrite-mode (overwrite-mode nil))
-    (if abbrev-mode (expand-abbrev))
-    (if (and auto-fill-function (> (current-column) fill-column))
-	(funcall auto-fill-function))
-    ;; don't leave whitespace lines around
-    (if (and (memq last-command
-		   '(vip-autoindent
-		     vip-open-line vip-Open-line
-		     vip-replace-state-exit-cmd))
-	     (vip-over-whitespace-line))
-	(indent-to-left-margin))
-    (vip-add-newline-at-eob-if-necessary)
-    (if vip-undo-needs-adjustment  (vip-adjust-undo))
-    (vip-change-state 'vi-state)
-
-    ;; always turn off iso-accents-mode, or else we won't be able to use the
-    ;; keys `,',^ in Vi state, as they will do accents instead of Vi actions.
-    (if (and (boundp 'iso-accents-mode) iso-accents-mode)
-	(iso-accents-mode -1))
-
-    (vip-restore-cursor-color-after-insert)
-    
-    ;; Protection against user errors in hooks
-    (condition-case conds
-	(run-hooks 'vip-vi-state-hook)
-      (error
-       (vip-message-conditions conds)))))
-
-(defun vip-change-state-to-insert ()
-  "Change Viper state to Insert."
-  (interactive)
-  (vip-change-state 'insert-state)
-  (if (and vip-automatic-iso-accents (fboundp 'iso-accents-mode))
-      (iso-accents-mode 1)) ; turn iso accents on
-  
-  (or (stringp vip-saved-cursor-color)
-      (string= (vip-get-cursor-color) vip-insert-state-cursor-color)
-      (setq vip-saved-cursor-color (vip-get-cursor-color)))
-  ;; Commented out, because if vip-change-state-to-insert is executed
-  ;; non-interactively then the old cursor color may get lost. Same old Emacs
-  ;; bug related to local variables?
-;;;(if (stringp vip-saved-cursor-color)
-;;;      (vip-change-cursor-color vip-insert-state-cursor-color))
-  ;; Protection against user errors in hooks
-  (condition-case conds
-      (run-hooks 'vip-insert-state-hook)
-    (error
-     (vip-message-conditions conds))))
-     
-(defsubst vip-downgrade-to-insert ()
- (setq vip-current-state 'insert-state
-       vip-replace-minor-mode nil)
- )
-
-    
-  
-;; Change to replace state. When the end of replacement region is reached,
-;; replace state changes to insert state.
-(defun vip-change-state-to-replace (&optional non-R-cmd)
-  (vip-change-state 'replace-state)
-  (if (and vip-automatic-iso-accents (fboundp 'iso-accents-mode))
-      (iso-accents-mode 1)) ; turn iso accents on
-  ;; Run insert-state-hook
-  (condition-case conds
-      (run-hooks 'vip-insert-state-hook 'vip-replace-state-hook)
-    (error
-     (vip-message-conditions conds)))
-  
-  (if non-R-cmd
-      (vip-start-replace)
-    ;; 'R' is implemented using Emacs's overwrite-mode
-    (vip-start-R-mode))
-  )
-
-    
-(defun vip-change-state-to-emacs ()
-  "Change Viper state to Emacs."
-  (interactive)
-  (vip-change-state 'emacs-state)
-  (if (and vip-automatic-iso-accents (fboundp 'iso-accents-mode))
-      (iso-accents-mode 1)) ; turn iso accents on
-  
-  ;; Protection agains user errors in hooks
-  (condition-case conds
-      (run-hooks 'vip-emacs-state-hook)
-    (error
-     (vip-message-conditions conds))))
-  
-;; escape to emacs mode termporarily
-(defun vip-escape-to-emacs (arg &optional events)
-  "Escape to Emacs state from Vi state for one Emacs command.
-ARG is used as the prefix value for the executed command.  If
-EVENTS is a list of events, which become the beginning of the command."
-  (interactive "P")
-  (if (= last-command-char ?\\)
-      (message "Switched to EMACS state for the next command..."))
-  (vip-escape-to-state arg events 'emacs-state))
-  
-;; escape to Vi mode termporarily
-(defun vip-escape-to-vi (arg)
-  "Escape from Emacs state to Vi state for one Vi 1-character command.
-If the Vi command that the user types has a prefix argument, e.g., `d2w', then
-Vi's prefix argument will be used. Otherwise, the prefix argument passed to
-`vip-escape-to-vi' is used."
-  (interactive "P")
-  (message "Switched to VI state for the next command...")
-  (vip-escape-to-state arg nil 'vi-state))
-  
-;; Escape to STATE mode for one Emacs command.
-(defun vip-escape-to-state (arg events state)
-  ;;(let (com key prefix-arg)
-  (let (com key)
-    ;; this temporarily turns off Viper's minor mode keymaps
-    (vip-set-mode-vars-for state)
-    (vip-normalize-minor-mode-map-alist)
-    (if events (vip-set-unread-command-events events))
-    
-    ;; protect against keyboard quit and other errors
-    (condition-case nil
-	(let (vip-vi-kbd-minor-mode 
-	      vip-insert-kbd-minor-mode
-	      vip-emacs-kbd-minor-mode)
-	  (unwind-protect
-	      (progn
-		(setq com (key-binding (setq key 
-					     (if vip-xemacs-p
-						 (read-key-sequence nil)
-					       (read-key-sequence nil t)))))
-		;; In case of binding indirection--chase definitions.
-		;; Have to do it here because we execute this command under
-		;; different keymaps, so command-execute may not do the
-		;; right thing there
-		(while (vectorp com) (setq com (key-binding com))))
-	    nil)
-	  ;; Execute command com in the original Viper state, not in state
-	  ;; `state'. Otherwise, if we switch buffers while executing the
-	  ;; escaped to command, Viper's mode vars will remain those of
-	  ;; `state'. When we return to the orig buffer, the bindings will be
-	  ;; screwed up.
-	  (vip-set-mode-vars-for vip-current-state)
-	  
-	  ;; this-command, last-command-char, last-command-event
-	  (setq this-command com)
-	  (if vip-xemacs-p ; XEmacs represents key sequences as vectors
-	      (setq last-command-event (vip-copy-event (vip-seq-last-elt key))
-		    last-command-char (event-to-character last-command-event))
-	    ;; Emacs represents them as sequences (str or vec)
-	    (setq last-command-event (vip-copy-event (vip-seq-last-elt key))
-		  last-command-char last-command-event))
-	    
-	  (if (commandp com)
-	      (progn
-		(setq prefix-arg (or prefix-arg arg))
-		(command-execute com)))
-	  )
-      (quit (ding))
-      (error (beep 1))))
-  ;; set state in the new buffer
-  (vip-set-mode-vars-for vip-current-state))
-      
-(defun vip-exec-form-in-vi  (form)
-  "Execute FORM in Vi state, regardless of the Ccurrent Vi state."
-  (let ((buff (current-buffer))
-	result)
-    (vip-set-mode-vars-for 'vi-state)
-
-    (condition-case nil
-	(setq result (eval form))
-      (error
-       (signal 'quit nil)))
-
-    (if (not (equal buff (current-buffer))) ; cmd switched buffer
-	(save-excursion
-	  (set-buffer buff)
-	  (vip-set-mode-vars-for vip-current-state)))
-    (vip-set-mode-vars-for vip-current-state)
-    result))
-
-(defun vip-exec-form-in-emacs  (form)
-  "Execute FORM in Emacs, temporarily disabling Viper's minor modes.
-Similar to vip-escape-to-emacs, but accepts forms rather than keystrokes."
-  (let ((buff (current-buffer))
-	result)
-    (vip-set-mode-vars-for 'emacs-state)
-    (setq result (eval form))
-    (if (not (equal buff (current-buffer))) ; cmd switched buffer
-	(save-excursion
-	  (set-buffer buff)
-	  (vip-set-mode-vars-for vip-current-state)))
-    (vip-set-mode-vars-for vip-current-state)
-    result))
-
-  
-;; This is needed because minor modes sometimes override essential Viper
-;; bindings. By letting Viper know which files these modes are in, it will
-;; arrange to reorganize minor-mode-map-alist so that things will work right.
-(defun vip-harness-minor-mode (load-file)
-  "Familiarize Viper with a minor mode defined in LOAD_FILE.
-Minor modes that have their own keymaps may overshadow Viper keymaps.
-This function is designed to make Viper aware of the packages that define
-such minor modes.
-Usage:
-    (vip-harness-minor-mode load-file)
-
-LOAD-FILE is a name of the file where the specific minor mode is defined.
-Suffixes such as .el or .elc should be stripped."
-
-  (interactive "sEnter name of the load file: ")
-  
-  (vip-eval-after-load load-file '(vip-normalize-minor-mode-map-alist))
-  
-  ;; Change the default for minor-mode-map-alist each time a harnessed minor
-  ;; mode adds its own keymap to the a-list.
-  (vip-eval-after-load
-   load-file '(setq-default minor-mode-map-alist minor-mode-map-alist))
-  )
-
-
-(defun vip-ESC (arg)
-  "Emulate ESC key in Emacs.
-Prevents multiple escape keystrokes if vip-no-multiple-ESC is true.
-If vip-no-multiple-ESC is 'twice double ESC would ding in vi-state.
-Other ESC sequences are emulated via the current Emacs's major mode
-keymap. This is more convenient on TTYs, since this won't block
-function keys such as up,down, etc. ESC will also will also work as
-a Meta key in this case. When vip-no-multiple-ESC is nil, ESC functions
-as a Meta key and any number of multiple escapes is allowed."
-  (interactive "P")
-  (let (char)
-    (cond ((and (not vip-no-multiple-ESC) (eq vip-current-state 'vi-state))
-	   (setq char (vip-read-char-exclusive))
-	   (vip-escape-to-emacs arg (list ?\e char) ))
-	  ((and (eq vip-no-multiple-ESC 'twice) 
-		(eq vip-current-state 'vi-state))
-	   (setq char (vip-read-char-exclusive))
-	   (if (= char (string-to-char vip-ESC-key))
-	       (ding)
-	     (vip-escape-to-emacs arg (list ?\e char) )))
-	  (t (ding)))
-    ))
-
-(defun vip-alternate-Meta-key (arg)
-  "Simulate Emacs Meta key."
-  (interactive "P")
-  (sit-for 1) (message "ESC-")
-  (vip-escape-to-emacs arg '(?\e)))
-
-(defun vip-toggle-key-action ()
-  "Action bound to `vip-toggle-key'."
-  (interactive)
-  (if (and (< vip-expert-level 2) (equal vip-toggle-key "\C-z"))
-      (if (vip-window-display-p)
-	  (vip-iconify)
-	(suspend-emacs))
-    (vip-change-state-to-emacs)))
-
-
-;; Intercept ESC sequences on dumb terminals.
-;; Based on the idea contributed by Marcelino Veiga Tuimil <mveiga@dit.upm.es>
-
-;; Check if last key was ESC and if so try to reread it as a function key.
-;; But only if there are characters to read during a very short time.
-;; Returns the last event, if any.
-(defun vip-envelop-ESC-key ()
-  (let ((event last-input-event)
-	(keyseq [nil])
-	inhibit-quit)
-    (if (vip-ESC-event-p event)
-	(progn 
-	  (if (vip-fast-keysequence-p)
-	      (progn
-		(let (minor-mode-map-alist)
-		  (vip-set-unread-command-events event)
-		  (setq keyseq
-			(funcall
-			 (ad-get-orig-definition 'read-key-sequence) nil))
-		  ) ; let
-		;; If keyseq translates into something that still has ESC
-		;; at the beginning, separate ESC from the rest of the seq.
-		;; In XEmacs we check for events that are keypress meta-key
-		;; and convert them into [escape key]
-		;;
-		;; This is needed for the following reason:
-		;; If ESC is the first symbol, we interpret it as if the
-		;; user typed ESC and then quickly some other symbols.
-		;; If ESC is not the first one, then the key sequence
-		;; entered was apparently translated into a function key or
-		;; something (e.g., one may have
-		;; (define-key function-key-map "\e[192z" [f11])
-		;; which would translate the escape-sequence generated by
-		;; f11 in an xterm window into the symbolic key f11.
-		;;
-		;; If `first-key' is not an ESC event, we make it into the
-		;; last-command-event in order to pretend that this key was
-		;; pressed. This is needed to allow arrow keys to be bound to
-		;; macros. Otherwise, vip-exec-mapped-kbd-macro will think that
-		;; the last event was ESC and so it'll execute whatever is
-		;; bound to ESC. (Viper macros can't be bound to
-		;; ESC-sequences).
-		(let* ((first-key (elt keyseq 0))
-		       (key-mod (event-modifiers first-key)))
-		  (cond ((vip-ESC-event-p first-key)
-			 ;; put keys following ESC on the unread list
-			 ;; and return ESC as the key-sequence
-			 (vip-set-unread-command-events (subseq keyseq 1))
-			 (setq last-input-event event
-			       keyseq (if vip-emacs-p
-					  "\e"
-					(vector (character-to-event ?\e)))))
-			((and vip-xemacs-p
-			      (key-press-event-p first-key)
-			      (equal '(meta) key-mod))
-			 (vip-set-unread-command-events 
-			  (vconcat (vector
-				    (character-to-event (event-key first-key)))
-				   (subseq keyseq 1)))
-			 (setq last-input-event event
-			       keyseq (vector (character-to-event ?\e))))
-			((eventp first-key)
-			 (setq last-command-event (vip-copy-event first-key)))
-			))
-		) ; end progn
-		
-	    ;; this is escape event with nothing after it
-	    ;; put in unread-command-event and then re-read
-	    (vip-set-unread-command-events event)
-	    (setq keyseq
-		  (funcall (ad-get-orig-definition 'read-key-sequence) nil))
-	    ))
-      ;; not an escape event
-      (setq keyseq (vector event)))
-    keyseq))
-
-    
-    
-(defadvice read-key-sequence (around vip-read-keyseq-ad activate)
-  "Harness to work for Viper. This advice is harmless---don't worry!"
-  (let (inhibit-quit event keyseq)
-    (setq keyseq ad-do-it)
-    (setq event (if vip-xemacs-p
-		    (elt keyseq 0) ; XEmacs returns vector of events
-		  (elt (listify-key-sequence keyseq) 0)))
-    (if (vip-ESC-event-p event)
-	(let (unread-command-events)
-	  (vip-set-unread-command-events keyseq)
-	  (if (vip-fast-keysequence-p)
-	      (let ((vip-vi-global-user-minor-mode  nil)
-		    (vip-vi-local-user-minor-mode  nil)
-		    (vip-replace-minor-mode nil) ; actually unnecessary
-		    (vip-insert-global-user-minor-mode  nil)
-		    (vip-insert-local-user-minor-mode  nil))
-		(setq keyseq ad-do-it)) 
-	    (setq keyseq ad-do-it))))
-    keyseq))
-    
-(defadvice describe-key (before vip-read-keyseq-ad protect activate)
-  "Force to read key via `read-key-sequence'."
-  (interactive (list (vip-events-to-keys
-		      (read-key-sequence "Describe key: ")))))
-
-(defadvice describe-key-briefly (before vip-read-keyseq-ad protect activate)
-  "Force to read key via `read-key-sequence'."
-  (interactive (list (vip-events-to-keys
-		      (read-key-sequence "Describe key briefly: ")))))
-
-;; Listen to ESC key.
-;; If a sequence of keys starting with ESC is issued with very short delays,
-;; interpret these keys in Emacs mode, so ESC won't be interpreted as a Vi key.
-(defun vip-intercept-ESC-key ()
-  "Function that implements ESC key in Viper emulation of Vi."
-  (interactive)
-  (let ((cmd (or (key-binding (vip-envelop-ESC-key)) 
-		 '(lambda () (interactive) (error "")))))
-    
-    ;; call the actual function to execute ESC (if no other symbols followed)
-    ;; or the key bound to the ESC sequence (if the sequence was issued
-    ;; with very short delay between characters.
-    (if (eq cmd 'vip-intercept-ESC-key)
-	(setq cmd
-	      (cond ((eq vip-current-state 'vi-state)
-		     'vip-ESC)
-		    ((eq vip-current-state 'insert-state)
-		     'vip-exit-insert-state) 
-		    ((eq vip-current-state 'replace-state)
-		     'vip-replace-state-exit-cmd)
-		    (t 'vip-change-state-to-vi)
-		    )))
-    (call-interactively cmd)))
-
-	   
-
-
-;; prefix argument for Vi mode
-
-;; In Vi mode, prefix argument is a dotted pair (NUM . COM) where NUM
-;; represents the numeric value of the prefix argument and COM represents
-;; command prefix such as "c", "d", "m" and "y".
-
-;; Get value part of prefix-argument ARG.
-(defsubst vip-p-val (arg)
-  (cond ((null arg) 1)
-	((consp arg)
-	 (if (or (null (car arg)) (equal (car arg) '(nil)))
-	     1 (car arg)))
-	(t arg)))
-
-;; Get raw value part of prefix-argument ARG.
-(defsubst vip-P-val (arg)
-  (cond ((consp arg) (car arg))
-	(t arg)))
-
-;; Get com part of prefix-argument ARG.
-(defsubst vip-getcom (arg)
-  (cond ((null arg) nil)
-	((consp arg) (cdr arg))
-	(t nil)))
-
-;; Get com part of prefix-argument ARG and modify it.
-(defun vip-getCom (arg)
-  (let ((com (vip-getcom arg)))
-    (cond ((equal com ?c) ?C)
-	  ((equal com ?d) ?D)
-	  ((equal com ?y) ?Y)
-	  (t com))))
-
-
-;; Compute numeric prefix arg value. 
-;; Invoked by EVENT. COM is the command part obtained so far.
-(defun vip-prefix-arg-value (event com)
-  (let (value func)
-    ;; read while number
-    (while (and (vip-characterp event) (>= event ?0) (<= event ?9))
-      (setq value (+ (* (if (integerp value) value 0) 10) (- event ?0)))
-      (setq event (vip-read-event-convert-to-char)))
-    
-    (setq prefix-arg value)
-    (if com (setq prefix-arg (cons prefix-arg com)))
-    (while (eq event ?U)
-      (vip-describe-arg prefix-arg)
-      (setq event (vip-read-event-convert-to-char)))
-    
-    (if (or com (and (not (eq vip-current-state 'vi-state))
-		     ;; make sure it is a Vi command
-		     (vip-characterp event) (vip-vi-command-p event)
-		     ))
-	;; If appears to be one of the vi commands,
-	;; then execute it with funcall and clear prefix-arg in order to not
-	;; confuse subsequent commands
-	(progn
-	  ;; last-command-char is the char we want emacs to think was typed
-	  ;; last. If com is not nil, the vip-digit-argument command was called
-	  ;; from within vip-prefix-arg command, such as `d', `w', etc., i.e., 
-	  ;; the user typed, say, d2. In this case, `com' would be `d', `w',
-	  ;; etc.
-	  ;; If vip-digit-argument was invoked by vip-escape-to-vi (which is
-	  ;; indicated by the fact that the current state is not vi-state),
-	  ;; then `event' represents the vi command to be executed (e.g., `d',
-	  ;; `w', etc). Again, last-command-char must make emacs believe that
-	  ;; this is the command we typed.
-	  (setq last-command-char (or com event))
-	  (setq func (vip-exec-form-in-vi 
-		      (` (key-binding (char-to-string (, event))))))
-	  (funcall func prefix-arg)
-	  (setq prefix-arg nil))
-      ;; some other command -- let emacs do it in its own way
-      (vip-set-unread-command-events event))
-    ))
-		     
-
-;; Vi operator as prefix argument."
-(defun vip-prefix-arg-com (char value com)
-  (let ((cont t)
-	cmd-info mv-or-digit-cmd)
-    (while (and cont
-		(memq char
-		      (list ?c ?d ?y ?! ?< ?> ?= ?# ?r ?R ?\"
-			    vip-buffer-search-char)))
-      (if com
-	  ;; this means that we already have a command character, so we
-	  ;; construct a com list and exit while.  however, if char is "
-	  ;; it is an error.
-	  (progn
-	    ;; new com is (CHAR . OLDCOM)
-	    (if (memq char '(?# ?\")) (error ""))
-	    (setq com (cons char com))
-	    (setq cont nil))
-	;; If com is nil we set com as char, and read more.  Again, if char
-	;; is ", we read the name of register and store it in vip-use-register.
-	;; if char is !, =, or #, a complete com is formed so we exit the
-	;; while loop.
-	(cond ((memq char '(?! ?=))
-	       (setq com char)
-	       (setq char (read-char))
-	       (setq cont nil))
-	      ((= char ?#)
-	       ;; read a char and encode it as com
-	       (setq com (+ 128 (read-char)))
-	       (setq char (read-char)))
-	      ((= char ?\")
-	       (let ((reg (read-char)))
-		 (if (vip-valid-register reg)
-		     (setq vip-use-register reg)
-		   (error ""))
-		 (setq char (read-char))))
-	      (t
-	       (setq com char)
-	       (setq char (read-char))))))
-
-  (if (atom com)
-      ;; `com' is a single char, so we construct the command argument
-      ;; and if `char' is `?', we describe the arg; otherwise 
-      ;; we prepare the command that will be executed at the end.
-      (progn
-	(setq cmd-info (cons value com))
-	(while (= char ?U)
-	  (vip-describe-arg cmd-info)
-	  (setq char (read-char)))
-	;; `char' is a movement cmd, a digit arg cmd, or a register cmd---so we
-	;; execute it at the very end 
-	(or (vip-movement-command-p char)
-	    (vip-digit-command-p char)
-	    (vip-regsuffix-command-p char)
-	    (error ""))
-	(setq mv-or-digit-cmd
-	      (vip-exec-form-in-vi 
-	       (` (key-binding (char-to-string (, char)))))))
-    
-    ;; as com is non-nil, this means that we have a command to execute
-    (if (memq (car com) '(?r ?R))
-	;; execute apropriate region command.
-	(let ((char (car com)) (com (cdr com)))
-	  (setq prefix-arg (cons value com))
-	  (if (= char ?r) (vip-region prefix-arg)
-	    (vip-Region prefix-arg))
-	  ;; reset prefix-arg
-	  (setq prefix-arg nil))
-      ;; otherwise, reset prefix arg and call appropriate command
-      (setq value (if (null value) 1 value))
-      (setq prefix-arg nil)
-      (cond ((equal com '(?c . ?c)) (vip-line (cons value ?C)))
-	    ((equal com '(?d . ?d)) (vip-line (cons value ?D)))
-	    ((equal com '(?d . ?y)) (vip-yank-defun))
-	    ((equal com '(?y . ?y)) (vip-line (cons value ?Y)))
-	    ((equal com '(?< . ?<)) (vip-line (cons value ?<)))
-	    ((equal com '(?> . ?>)) (vip-line (cons value ?>)))
-	    ((equal com '(?! . ?!)) (vip-line (cons value ?!)))
-	    ((equal com '(?= . ?=)) (vip-line (cons value ?=)))
-	    (t (error "")))))
-  
-  (if mv-or-digit-cmd
-      (progn
-	(setq last-command-char char)
-	(setq last-command-event 
-	      (vip-copy-event
-	       (if vip-xemacs-p (character-to-event char) char)))
-	(condition-case nil
-	    (funcall mv-or-digit-cmd cmd-info)
-	  (error
-	   (error "")))))
-  ))
-
-(defun vip-describe-arg (arg)
-  (let (val com)
-    (setq val (vip-P-val arg)
-	  com (vip-getcom arg))
-    (if (null val)
-	(if (null com)
-	    (message "Value is nil, and command is nil")
-	  (message "Value is nil, and command is `%c'" com))
-      (if (null com)
-	  (message "Value is `%d', and command is nil" val)
-	(message "Value is `%d', and command is `%c'" val com)))))
-
-(defun vip-digit-argument (arg)
-  "Begin numeric argument for the next command."
-  (interactive "P")
-  (vip-leave-region-active)
-  (vip-prefix-arg-value
-   last-command-char (if (consp arg) (cdr arg) nil)))
-
-(defun vip-command-argument (arg)
-  "Accept a motion command as an argument."
-  (interactive "P")
-  (let ((vip-inside-command-argument-action t))
-    (condition-case nil
-	(vip-prefix-arg-com
-	 last-command-char   
-	 (cond ((null arg) nil)
-	       ((consp arg) (car arg))
-	       ((integerp arg) arg)
-	       (t (error vip-InvalidCommandArgument)))
-	 (cond ((null arg) nil)
-	       ((consp arg) (cdr arg))
-	       ((integerp arg) nil)
-	       (t (error vip-InvalidCommandArgument))))
-      (quit (setq vip-use-register nil)
-	    (signal 'quit nil)))
-    (vip-deactivate-mark)))
-
-
-;; repeat last destructive command
-
-;; Append region to text in register REG.
-;; START and END are buffer positions indicating what to append.
-(defsubst vip-append-to-register (reg start end)
-  (set-register reg (concat (if (stringp (get-register reg))
-				(get-register reg) "")
-			    (buffer-substring start end))))
-
-;; Saves last inserted text for possible use by vip-repeat command.
-(defun vip-save-last-insertion (beg end)
-  (setq vip-last-insertion (buffer-substring beg end))
-  (or (< (length vip-d-com) 5)
-      (setcar (nthcdr 4 vip-d-com) vip-last-insertion))
-  (or (null vip-command-ring)
-      (ring-empty-p vip-command-ring)
-      (progn
-	(setcar (nthcdr 4 (vip-current-ring-item vip-command-ring))
-		vip-last-insertion)
-	;; del most recent elt, if identical to the second most-recent
-	(vip-cleanup-ring vip-command-ring)))
-  )
-    
-(defsubst vip-yank-last-insertion ()
-  "Inserts the text saved by the previous vip-save-last-insertion command."
-  (condition-case nil
-      (insert vip-last-insertion)
-    (error nil)))
-  
-			    
-;; define functions to be executed
-
-;; invoked by the `C' command
-(defun vip-exec-change (m-com com) 
-  (or (and (markerp vip-com-point) (marker-position vip-com-point))
-      (set-marker vip-com-point (point) (current-buffer)))
-  ;; handle C cmd at the eol and at eob.
-  (if (or (and (eolp) (= vip-com-point (point)))
-	  (= vip-com-point (point-max)))
-      (progn
-	(insert " ")(backward-char 1)))
-  (if (= vip-com-point (point))
-      (vip-forward-char-carefully))
-  (if (= com ?c)
-      (vip-change vip-com-point (point))
-    (vip-change-subr vip-com-point (point))))
-
-;; this is invoked by vip-substitute-line
-(defun vip-exec-Change (m-com com)
-  (save-excursion
-    (set-mark vip-com-point)
-    (vip-enlarge-region (mark t) (point))
-    (if vip-use-register
-	(progn
-	  (cond ((vip-valid-register vip-use-register '(letter digit))
-		 ;;(vip-valid-register vip-use-register '(letter)
-		 (copy-to-register
-		  vip-use-register (mark t) (point) nil))
-		((vip-valid-register vip-use-register '(Letter))
-		 (vip-append-to-register
-		  (downcase vip-use-register) (mark t) (point)))
-		(t (setq vip-use-register nil)
-		   (error vip-InvalidRegister vip-use-register)))
-	  (setq vip-use-register nil)))
-    (delete-region (mark t) (point)))
-  (open-line 1)
-  (if (= com ?C) (vip-change-mode-to-insert) (vip-yank-last-insertion)))
-
-(defun vip-exec-delete (m-com com)
-  (or (and (markerp vip-com-point) (marker-position vip-com-point))
-      (set-marker vip-com-point (point) (current-buffer)))
-  (if vip-use-register
-      (progn
-	(cond ((vip-valid-register vip-use-register '(letter digit))
-	       ;;(vip-valid-register vip-use-register '(letter))
-	       (copy-to-register
-		vip-use-register vip-com-point (point) nil))
-	      ((vip-valid-register vip-use-register '(Letter))
-	       (vip-append-to-register
-		(downcase vip-use-register) vip-com-point (point)))
-	      (t (setq vip-use-register nil)
-		 (error vip-InvalidRegister vip-use-register)))
-	(setq vip-use-register nil)))
-  (setq last-command
-	(if (eq last-command 'd-command) 'kill-region nil))
-  (kill-region vip-com-point (point))
-  (setq this-command 'd-command)
-  (if vip-ex-style-motion
-      (if (and (eolp) (not (bolp))) (backward-char 1))))
-
-(defun vip-exec-Delete (m-com com)
-  (save-excursion
-    (set-mark vip-com-point)
-    (vip-enlarge-region (mark t) (point))
-    (if vip-use-register
-	(progn
-	  (cond ((vip-valid-register vip-use-register '(letter digit))
-		 ;;(vip-valid-register vip-use-register '(letter))
-		 (copy-to-register
-		  vip-use-register (mark t) (point) nil))
-		((vip-valid-register vip-use-register '(Letter))
-		 (vip-append-to-register
-		  (downcase vip-use-register) (mark t) (point)))
-		(t (setq vip-use-register nil)
-		   (error vip-InvalidRegister vip-use-register)))
-	  (setq vip-use-register nil)))
-    (setq last-command
-	  (if (eq last-command 'D-command) 'kill-region nil))
-    (kill-region (mark t) (point))
-    (if (eq m-com 'vip-line) (setq this-command 'D-command)))
-  (back-to-indentation))
-
-(defun vip-exec-yank (m-com com)
-  (or (and (markerp vip-com-point) (marker-position vip-com-point))
-      (set-marker vip-com-point (point) (current-buffer)))
-  (if vip-use-register
-      (progn
-	(cond ((vip-valid-register vip-use-register '(letter digit))
-	       ;; (vip-valid-register vip-use-register '(letter))
-	       (copy-to-register
-		vip-use-register vip-com-point (point) nil))
-	      ((vip-valid-register vip-use-register '(Letter))
-	       (vip-append-to-register
-		(downcase vip-use-register) vip-com-point (point)))
-	      (t (setq vip-use-register nil)
-		 (error vip-InvalidRegister vip-use-register)))
-	(setq vip-use-register nil)))
-  (setq last-command nil)
-  (copy-region-as-kill vip-com-point (point))
-  (goto-char vip-com-point))
-
-(defun vip-exec-Yank (m-com com)
-  (save-excursion
-    (set-mark vip-com-point)
-    (vip-enlarge-region (mark t) (point))
-    (if vip-use-register
-	(progn
-	  (cond ((vip-valid-register vip-use-register '(letter digit))
-		 (copy-to-register
-		  vip-use-register (mark t) (point) nil))
-		((vip-valid-register vip-use-register '(Letter))
-		 (vip-append-to-register
-		  (downcase vip-use-register) (mark t) (point)))
-		(t (setq vip-use-register nil)
-		   (error vip-InvalidRegister  vip-use-register)))
-	  (setq vip-use-register nil)))
-    (setq last-command nil)
-    (copy-region-as-kill (mark t) (point)))
-  (vip-deactivate-mark)
-  (goto-char vip-com-point))
-
-(defun vip-exec-bang (m-com com)
-  (save-excursion
-    (set-mark vip-com-point)
-    (vip-enlarge-region (mark t) (point))
-    (shell-command-on-region
-     (mark t) (point)
-     (if (= com ?!)
-	 (setq vip-last-shell-com
-	       (vip-read-string-with-history 
-		"!"
-		nil
-		'vip-shell-history
-		(car vip-shell-history)
-		))
-       vip-last-shell-com)
-     t)))
-
-(defun vip-exec-equals (m-com com)
-  (save-excursion
-    (set-mark vip-com-point)
-    (vip-enlarge-region (mark t) (point))
-    (if (> (mark t) (point)) (exchange-point-and-mark))
-    (indent-region (mark t) (point) nil)))
-
-(defun vip-exec-shift (m-com com)
-  (save-excursion
-    (set-mark vip-com-point)
-    (vip-enlarge-region (mark t) (point))
-    (if (> (mark t) (point)) (exchange-point-and-mark))
-    (indent-rigidly (mark t) (point) 
-		    (if (= com ?>)
-			vip-shift-width
-		      (- vip-shift-width))))
-  ;; return point to where it was before shift
-  (goto-char vip-com-point))
-
-;; this is needed because some commands fake com by setting it to ?r, which
-;; denotes repeated insert command.
-(defsubst vip-exec-dummy (m-com com)
-  nil)
-
-(defun vip-exec-buffer-search (m-com com)
-  (setq vip-s-string (buffer-substring (point) vip-com-point))
-  (setq vip-s-forward t)
-  (setq vip-search-history (cons vip-s-string vip-search-history))
-  (vip-search vip-s-string vip-s-forward 1))
-
-(defvar vip-exec-array (make-vector 128 nil))
-
-;; Using a dispatch array allows adding functions like buffer search
-;; without affecting other functions. Buffer search can now be bound
-;; to any character.
-
-(aset vip-exec-array ?c 'vip-exec-change)
-(aset vip-exec-array ?C 'vip-exec-Change)
-(aset vip-exec-array ?d 'vip-exec-delete)
-(aset vip-exec-array ?D 'vip-exec-Delete)
-(aset vip-exec-array ?y 'vip-exec-yank)
-(aset vip-exec-array ?Y 'vip-exec-Yank)
-(aset vip-exec-array ?r 'vip-exec-dummy)
-(aset vip-exec-array ?! 'vip-exec-bang)
-(aset vip-exec-array ?< 'vip-exec-shift)
-(aset vip-exec-array ?> 'vip-exec-shift)
-(aset vip-exec-array ?= 'vip-exec-equals)
-
-
-
-;; This function is called by various movement commands to execute a
-;; destructive command on the region specified by the movement command. For
-;; instance, if the user types cw, then the command vip-forward-word will
-;; call vip-execute-com to execute vip-exec-change, which eventually will
-;; call vip-change to invoke the replace mode on the region.
-;;
-;; The list (M-COM VAL COM REG INSETED-TEXT COMMAND-KEYS) is set to
-;; vip-d-com for later use by vip-repeat.
-(defun vip-execute-com (m-com val com)
-  (let ((reg vip-use-register))
-    ;; this is the special command `#'
-    (if (> com 128)
-	(vip-special-prefix-com (- com 128))
-      (let ((fn (aref vip-exec-array (if (< com 0) (- com) com))))
-	(if (null fn)
-	    (error "%c: %s" com vip-InvalidViCommand)
-	  (funcall fn m-com com))))
-    (if (vip-dotable-command-p com)
-	(vip-set-destructive-command
-	 (list m-com val
-	       (if (memq com (list ?c ?C ?!)) (- com) com)
-	       reg nil nil)))
-    ))
-
-
-(defun vip-repeat (arg)
-  "Re-execute last destructive command.
-Use the info in vip-d-com, which has the form
-\(com val ch reg inserted-text command-keys\),
-where `com' is the command to be re-executed, `val' is the
-argument to `com', `ch' is a flag for repeat, and `reg' is optional;
-if it exists, it is the name of the register for `com'.
-If the prefix argument, ARG, is non-nil, it is used instead of `val'."
-  (interactive "P")
-  (let ((save-point (point)) ; save point before repeating prev cmd
-	;; Pass along that we are repeating a destructive command
-	;; This tells vip-set-destructive-command not to update
-	;; vip-command-ring
-	(vip-intermediate-command 'vip-repeat))
-    (if (eq last-command 'vip-undo)
-	;; if the last command was vip-undo, then undo-more
-	(vip-undo-more)
-      ;; otherwise execute the command stored in vip-d-com.  if arg is non-nil
-      ;; its prefix value is used as new prefix value for the command.
-      (let ((m-com (car vip-d-com))
-	    (val (vip-P-val arg))
-	    (com (nth 2 vip-d-com))
-	    (reg (nth 3 vip-d-com)))
-        (if (null val) (setq val (nth 1 vip-d-com)))
-        (if (null m-com) (error "No previous command to repeat."))
-        (setq vip-use-register reg)
-	(if (nth 4 vip-d-com) ; text inserted by command
-	    (setq vip-last-insertion (nth 4 vip-d-com)
-		  vip-d-char (nth 4 vip-d-com)))
-        (funcall m-com (cons val com))
-        (if (and vip-keep-point-on-repeat (< save-point (point)))
-	    (goto-char save-point)) ; go back to before repeat.
-	(if (and (eolp) (not (bolp)))
-	    (backward-char 1))
-     ))
-  (if vip-undo-needs-adjustment (vip-adjust-undo)) ; take care of undo
-  ;; If the prev cmd was rotating the command ring, this means that `.' has
-  ;; just executed a command from that ring. So, push it on the ring again.
-  ;; If we are just executing previous command , then don't push vip-d-com
-  ;; because vip-d-com is not fully constructed in this case (its keys and
-  ;; the inserted text may be nil). Besides, in this case, the command
-  ;; executed by `.' is already on the ring.
-  (if (eq last-command 'vip-display-current-destructive-command)
-      (vip-push-onto-ring vip-d-com 'vip-command-ring))
-  (vip-deactivate-mark)
-  ))
-  
-(defun vip-repeat-from-history ()
-  "Repeat a destructive command from history.
-Doesn't change vip-command-ring in any way, so `.' will work as before
-executing this command.
-This command is supposed to be bound to a two-character Vi macro where
-the second character is a digit 0 to 9. The digit indicates which
-history command to execute. `<char>0' is equivalent to `.', `<char>1'
-invokes the command before that, etc."
-  (interactive)
-  (let* ((vip-intermediate-command 'repeating-display-destructive-command)
-	 (idx (cond (vip-this-kbd-macro
-		      (string-to-number
-		       (symbol-name (elt vip-this-kbd-macro 1))))
-		    (t 0)))
-	 (num idx)
-	 (vip-d-com vip-d-com))
-
-    (or (and (numberp num) (<= 0 num) (<= num 9))
-	(progn
-	  (setq idx 0
-		num 0)
-	  (message
-	   "`vip-repeat-from-history' must be invoked as a Vi macro bound to `<key><digit>'")))
-    (while (< 0 num)
-      (setq vip-d-com (vip-special-ring-rotate1 vip-command-ring -1))
-      (setq num (1- num)))
-    (vip-repeat nil)
-    (while (> idx num)
-      (vip-special-ring-rotate1 vip-command-ring 1)
-      (setq num (1+ num)))
-    ))
-      
-
-;; The hash-command. It is invoked interactively by the key sequence #<char>.
-;; The chars that can follow `#' are determined by vip-hash-command-p
-(defun vip-special-prefix-com (char)
-  (cond ((= char ?c)
-	 (downcase-region (min vip-com-point (point))
-			  (max vip-com-point (point))))
-	((= char ?C)
-	 (upcase-region (min vip-com-point (point))
-			(max vip-com-point (point))))
-	((= char ?g)
-	 (push-mark vip-com-point t)
-	 (vip-global-execute))
-	((= char ?q)
-	 (push-mark vip-com-point t)
-	 (vip-quote-region))
-	((= char ?s) (funcall vip-spell-function vip-com-point (point)))
-	(t (error "#%c: %s" char vip-InvalidViCommand))))
-
-
-;; undoing
-
-(defun vip-undo ()
-  "Undo previous change."
-  (interactive)
-  (message "undo!")
-  (let ((modified (buffer-modified-p))
-        (before-undo-pt (point-marker))
-	(after-change-functions after-change-functions)
-	undo-beg-posn undo-end-posn)
-	
-    ;; no need to remove this hook, since this var has scope inside a let.
-    (add-hook 'after-change-functions
-	      '(lambda (beg end len)
-		 (setq undo-beg-posn beg
-		       undo-end-posn (or end beg))))
-  
-    (undo-start)
-    (undo-more 2)
-    (setq undo-beg-posn (or undo-beg-posn before-undo-pt)
-	  undo-end-posn (or undo-end-posn undo-beg-posn))
-    
-    (goto-char undo-beg-posn)
-    (sit-for 0)
-    (if (and vip-keep-point-on-undo
-	     (pos-visible-in-window-p before-undo-pt))
-	(progn
-	  (push-mark (point-marker) t) 
-	  (vip-sit-for-short 300)
-	  (goto-char undo-end-posn)
-	  (vip-sit-for-short 300)
-	  (if (and (> (abs (- undo-beg-posn before-undo-pt)) 1)
-		  (> (abs (- undo-end-posn before-undo-pt)) 1))
-	      (goto-char before-undo-pt)
-	    (goto-char undo-beg-posn)))
-      (push-mark before-undo-pt t))
-    (if (and (eolp) (not (bolp))) (backward-char 1))
-    (if (not modified) (set-buffer-modified-p t)))
-  (setq this-command 'vip-undo))
-
-;; Continue undoing previous changes.
-(defun vip-undo-more ()
-  (message "undo more!")
-  (condition-case nil
-      (undo-more 1)
-    (error (beep)
-	   (message "No further undo information in this buffer")))
-  (if (and (eolp) (not (bolp))) (backward-char 1))
-  (setq this-command 'vip-undo))
-
-;; The following two functions are used to set up undo properly.
-;; In VI, unlike Emacs, if you open a line, say, and add a bunch of lines,
-;; they are undone all at once.  
-(defun vip-adjust-undo ()
-  (let ((inhibit-quit t)
-	tmp tmp2)
-    (setq vip-undo-needs-adjustment nil)
-    (if (listp buffer-undo-list)
-	(if (setq tmp (memq vip-buffer-undo-list-mark buffer-undo-list))
-	    (progn
-	      (setq tmp2 (cdr tmp)) ; the part after mark
-	      
-	      ;; cut tail from buffer-undo-list temporarily by direct
-	      ;; manipulation with pointers in buffer-undo-list
-	      (setcdr tmp nil)
-	      
-	      (setq buffer-undo-list (delq nil buffer-undo-list))
-	      (setq buffer-undo-list
-		    (delq vip-buffer-undo-list-mark buffer-undo-list))
-	      ;; restore tail of buffer-undo-list
-	      (setq buffer-undo-list (nconc buffer-undo-list tmp2)))
-	  (setq buffer-undo-list (delq nil buffer-undo-list))))))
-  
-
-(defun vip-set-complex-command-for-undo ()  
-  (if (listp buffer-undo-list)
-      (if (not vip-undo-needs-adjustment)
-	  (let ((inhibit-quit t))
-	    (setq buffer-undo-list 
-		  (cons vip-buffer-undo-list-mark buffer-undo-list))
-	    (setq vip-undo-needs-adjustment t)))))
-
-
-
-      
-(defun vip-display-current-destructive-command ()
-  (let ((text (nth 4 vip-d-com))
-	(keys (nth 5 vip-d-com))
-	(max-text-len 30))
-    
-    (setq this-command 'vip-display-current-destructive-command)
-	
-    (message " `.' runs  %s%s"
-	     (concat "`" (vip-array-to-string keys) "'")
-	     (vip-abbreviate-string text max-text-len
-				    "  inserting  `" "'" "    ......."))
-    ))
-    
-    
-;; don't change vip-d-com if it was vip-repeat command invoked with `.'
-;; or in some other way (non-interactively).
-(defun vip-set-destructive-command (list)
-  (or (eq vip-intermediate-command 'vip-repeat)
-      (progn
-	(setq vip-d-com list)
-	(setcar (nthcdr 5 vip-d-com)
-		(vip-array-to-string (this-command-keys)))
-	(vip-push-onto-ring vip-d-com 'vip-command-ring))))
-    
-(defun vip-prev-destructive-command (next)
-  "Find previous destructive command in the history of destructive commands.
-With prefix argument, find next destructive command."
-  (interactive "P")
-  (let (cmd vip-intermediate-command)
-    (if (eq last-command 'vip-display-current-destructive-command)
-	;; repeated search through command history
-	(setq vip-intermediate-command 'repeating-display-destructive-command)
-      ;; first search through command history--set temp ring
-      (setq vip-temp-command-ring (copy-list vip-command-ring))) 
-    (setq cmd (if next
-		  (vip-special-ring-rotate1 vip-temp-command-ring 1)
-		(vip-special-ring-rotate1 vip-temp-command-ring -1)))
-    (if (null cmd)
-	()
-      (setq vip-d-com cmd))
-    (vip-display-current-destructive-command)))
-      
-(defun vip-next-destructive-command ()
-  "Find next destructive command in the history of destructive commands."
-  (interactive)
-  (vip-prev-destructive-command 'next))
-  
-(defun vip-insert-prev-from-insertion-ring (arg)
-  "Cycle through insertion ring in the direction of older insertions.
-Undoes previous insertion and inserts new.
-With prefix argument, cycles in the direction of newer elements.
-In minibuffer, this command executes whatever the invocation key is bound
-to in the global map, instead of cycling through the insertion ring."
-  (interactive "P")
-  (let (vip-intermediate-command)
-    (if (eq last-command 'vip-insert-from-insertion-ring)
-	(progn  ; repeated search through insertion history
-	  (setq vip-intermediate-command 'repeating-insertion-from-ring)
-	  (if (eq vip-current-state 'replace-state)
-	      (undo 1)
-	    (if vip-last-inserted-string-from-insertion-ring
-		(backward-delete-char
-		 (length vip-last-inserted-string-from-insertion-ring))))
-	  )
-      ;;first search through insertion history
-      (setq vip-temp-insertion-ring (copy-list vip-insertion-ring)))
-    (setq this-command 'vip-insert-from-insertion-ring)
-    ;; so that things will be undone properly
-    (setq buffer-undo-list (cons nil buffer-undo-list))
-    (setq vip-last-inserted-string-from-insertion-ring
-	  (vip-special-ring-rotate1 vip-temp-insertion-ring (if arg 1 -1)))
-    
-    ;; this change of vip-intermediate-command must come after
-    ;; vip-special-ring-rotate1, so that the ring will rotate, but before the
-    ;; insertion.
-    (setq vip-intermediate-command nil)
-    (if vip-last-inserted-string-from-insertion-ring
-	(insert vip-last-inserted-string-from-insertion-ring))
-    ))
-
-(defun vip-insert-next-from-insertion-ring ()
-  "Cycle through insertion ring in the direction of older insertions.
-Undo previous insertion and inserts new."
-  (interactive)
-  (vip-insert-prev-from-insertion-ring 'next))
-    
-
-;; some region utilities
-
-;; If at the last line of buffer, add \\n before eob, if newline is missing.
-(defun vip-add-newline-at-eob-if-necessary ()
-  (save-excursion
-      (end-of-line)
-      ;; make sure all lines end with newline, unless in the minibuffer or
-      ;; when requested otherwise (require-final-newline is nil)
-      (if (and (eobp)
-	       (not (bolp))
-	       require-final-newline
-	       (not (vip-is-in-minibuffer))
-	       (not buffer-read-only))
-	  (insert "\n"))))
-
-(defun vip-yank-defun ()
-  (mark-defun)
-  (copy-region-as-kill (point) (mark t)))
-
-;; Enlarge region between BEG and END.
-(defun vip-enlarge-region (beg end)
-  (or beg (setq beg end)) ; if beg is nil, set to end
-  (or end (setq end beg)) ; if end is nil, set to beg
-  
-  (if (< beg end)
-      (progn (goto-char beg) (set-mark end))
-    (goto-char end)
-    (set-mark beg))
-  (beginning-of-line)
-  (exchange-point-and-mark)
-  (if (or (not (eobp)) (not (bolp))) (forward-line 1))
-  (if (not (eobp)) (beginning-of-line))
-  (if (> beg end) (exchange-point-and-mark)))
-
-
-;; Quote region by each line with a user supplied string.
-(defun vip-quote-region ()
-  (setq vip-quote-string
-	(vip-read-string-with-history
-	 "Quote string: "
-	 nil
-	 'vip-quote-region-history
-	 vip-quote-string))
-  (vip-enlarge-region (point) (mark t))
-  (if (> (point) (mark t)) (exchange-point-and-mark))
-  (insert vip-quote-string)
-  (beginning-of-line)
-  (forward-line 1)
-  (while (and (< (point) (mark t)) (bolp))
-    (insert vip-quote-string)
-    (beginning-of-line)
-    (forward-line 1)))
-
-;;  Tells whether BEG is on the same line as END.
-;;  If one of the args is nil, it'll return nil.
-(defun vip-same-line (beg end)
-   (let ((selective-display nil)
-	 (incr 0)
-	 temp)
-     (if (and beg end (> beg end))
-	 (setq temp beg
-	       beg end
-	       end temp))
-     (if (and beg end)
-	 (cond ((or (> beg (point-max)) (> end (point-max))) ; out of range
-		nil)
-	       (t
-		;; This 'if' is needed because Emacs treats the next empty line
-		;; as part of the previous line.
-		(if (= (vip-line-pos 'start) end)
-		    (setq incr 1))
-		(<= (+ incr (count-lines beg end)) 1))))
-     ))
-	 
-	 
-;; Check if the string ends with a newline.
-(defun vip-end-with-a-newline-p (string)
-  (or (string= string "")
-      (= (vip-seq-last-elt string) ?\n)))
-
-(defun vip-tmp-insert-at-eob (msg)
-  (let ((savemax (point-max)))
-      (goto-char savemax)
-      (insert msg)
-      (sit-for 2)
-      (goto-char savemax) (delete-region (point) (point-max))
-      ))  
-      
-
-
-;;; Minibuffer business
-	    
-(defsubst vip-set-minibuffer-style ()
-  (add-hook 'minibuffer-setup-hook 'vip-minibuffer-setup-sentinel))
-  
-  
-(defun vip-minibuffer-setup-sentinel ()
-  (let ((hook (if vip-vi-style-in-minibuffer
-		  'vip-change-state-to-insert
-		'vip-change-state-to-emacs)))
-    (funcall hook)
-    ))
-  
-;; Interpret last event in the local map
-(defun vip-exit-minibuffer ()
-  (interactive)
-  (let (command)
-    (setq command (local-key-binding (char-to-string last-command-char)))
-    (if command
-	(command-execute command)
-      (exit-minibuffer))))
-  
-
-;;; Reading string with history  
-    
-(defun vip-read-string-with-history (prompt &optional initial 
-					    history-var default keymap)
-  ;; Read string, prompting with PROMPT and inserting the INITIAL
-  ;; value. Uses HISTORY-VAR. DEFAULT is the default value to accept if the
-  ;; input is an empty string. Use KEYMAP, if given, or the
-  ;; minibuffer-local-map.
-  ;; Default value is displayed until the user types something in the
-  ;; minibuffer. 
-  (let ((minibuffer-setup-hook 
-	 '(lambda ()
-	    (if (stringp initial)
-		(progn
-		  ;; don't wait if we have unread events or in kbd macro
-		  (or unread-command-events
-		      executing-kbd-macro
-		      (sit-for 840))
-		  (erase-buffer)
-		  (insert initial)))
-	    (vip-minibuffer-setup-sentinel)))
-	(val "")
-	(padding "")
-	temp-msg)
-    
-    (setq keymap (or keymap minibuffer-local-map)
-	  initial (or initial "")
-	  temp-msg (if default
-		       (format "(default: %s) " default)
-		     ""))
-		   
-    (setq vip-incomplete-ex-cmd nil)
-    (setq val (read-from-minibuffer prompt 
-				    (concat temp-msg initial val padding)
-				    keymap nil history-var))
-    (setq minibuffer-setup-hook nil
-	  padding (vip-array-to-string (this-command-keys))
-	  temp-msg "")
-    ;; the following tries to be smart about what to put in history
-    (if (not (string= val (car (eval history-var))))
-	(set history-var (cons val (eval history-var))))
-    (if (or (string= (nth 0 (eval history-var)) (nth 1 (eval history-var)))
-	    (string= (nth 0 (eval history-var)) ""))
-	(set history-var (cdr (eval history-var))))
-    ;; If the user enters nothing but the prev cmd wasn't vip-ex,
-    ;; vip-command-argument, or `! shell-command', this probably means 
-    ;; that the user typed something then erased. Return "" in this case, not
-    ;; the default---the default is too confusing in this case.
-    (cond ((and (string= val "")
-		(not (string= prompt "!")) ; was a `! shell-command'
-		(not (memq last-command
-			   '(vip-ex
-			     vip-command-argument
-			     t)
-			   )))
-	   "")
-	  ((string= val "") (or default ""))
-	  (t val))
-    ))
-  
-
-
-;; insertion commands
-
-;; Called when state changes from Insert Vi command mode.
-;; Repeats the insertion command if Insert state was entered with prefix
-;; argument > 1.
-(defun vip-repeat-insert-command ()
-  (let ((i-com (car vip-d-com))
-	(val   (nth 1 vip-d-com))
-	(char  (nth 2 vip-d-com)))
-    (if (and val (> val 1)) ; first check that val is non-nil
-	(progn        
-	  (setq vip-d-com (list i-com (1- val) ?r nil nil nil))
-	  (vip-repeat nil)
-	  (setq vip-d-com (list i-com val char nil nil nil))
-	  ))))
-
-(defun vip-insert (arg)
-  "Insert before point."
-  (interactive "P")
-  (vip-set-complex-command-for-undo)
-  (let ((val (vip-p-val arg))
-	(com (vip-getcom arg)))
-    (vip-set-destructive-command (list 'vip-insert val ?r nil nil nil))
-    (if com
-	(vip-loop val (vip-yank-last-insertion))
-      (vip-change-state-to-insert))))
-
-(defun vip-append (arg)
-  "Append after point."
-  (interactive "P")
-  (vip-set-complex-command-for-undo)
-  (let ((val (vip-p-val arg))
-	(com (vip-getcom arg)))
-    (vip-set-destructive-command (list 'vip-append val ?r nil nil nil))
-    (if (not (eolp)) (forward-char))
-    (if (equal com ?r)
-	(vip-loop val (vip-yank-last-insertion))
-      (vip-change-state-to-insert))))
-
-(defun vip-Append (arg)
-  "Append at end of line."
-  (interactive "P")
-  (vip-set-complex-command-for-undo)
-  (let ((val (vip-p-val arg))
-	(com (vip-getcom arg)))
-    (vip-set-destructive-command (list 'vip-Append val ?r nil nil nil))
-    (end-of-line)
-    (if (equal com ?r)
-	(vip-loop val (vip-yank-last-insertion))
-      (vip-change-state-to-insert))))
-
-(defun vip-Insert (arg)
-  "Insert before first non-white."
-  (interactive "P")
-  (vip-set-complex-command-for-undo)
-  (let ((val (vip-p-val arg))
-	(com (vip-getcom arg)))
-    (vip-set-destructive-command (list 'vip-Insert val ?r nil nil nil))
-    (back-to-indentation)
-    (if (equal com ?r)
-	(vip-loop val (vip-yank-last-insertion))
-      (vip-change-state-to-insert))))
-
-(defun vip-open-line (arg)
-  "Open line below."
-  (interactive "P")
-  (vip-set-complex-command-for-undo)
-  (let ((val (vip-p-val arg))
-	(com (vip-getcom arg)))
-    (vip-set-destructive-command (list 'vip-open-line val ?r nil nil nil))
-    (let ((col (current-indentation)))
-      (if (equal com ?r)
-	  (vip-loop val
-		    (progn
-		      (end-of-line)
-		      (newline 1)
-		      (if vip-auto-indent 
-			  (progn
-			    (setq vip-cted t)
-			    (if vip-electric-mode
-				(indent-according-to-mode)
-			      (indent-to col))
-			    ))
-		      (vip-yank-last-insertion)))
-	(end-of-line)
-	(newline 1)
-	(if vip-auto-indent
-	    (progn
-	      (setq vip-cted t)
-	      (if vip-electric-mode
-		  (indent-according-to-mode)
-		(indent-to col))))
-	(vip-change-state-to-insert)))))
-
-(defun vip-Open-line (arg)
-  "Open line above."
-  (interactive "P")
-  (vip-set-complex-command-for-undo)
-  (let ((val (vip-p-val arg))
-	(com (vip-getcom arg)))
-    (vip-set-destructive-command (list 'vip-Open-line val ?r nil nil nil))
-    (let ((col (current-indentation)))
-      (if (equal com ?r)
-	  (vip-loop val
-		    (progn
-		      (beginning-of-line)
-		      (open-line 1)
-		      (if vip-auto-indent 
-			  (progn
-			    (setq vip-cted t)
-			    (if vip-electric-mode
-				(indent-according-to-mode)
-			      (indent-to col))
-			    ))
-		      (vip-yank-last-insertion)))
-	(beginning-of-line)
-	(open-line 1)
-	(if vip-auto-indent
-	    (progn
-	      (setq vip-cted t)
-	      (if vip-electric-mode
-		  (indent-according-to-mode)
-		(indent-to col))
-	      ))
-	(vip-change-state-to-insert)))))
-
-(defun vip-open-line-at-point (arg)
-  "Open line at point."
-  (interactive "P")
-  (vip-set-complex-command-for-undo)
-  (let ((val (vip-p-val arg))
-	(com (vip-getcom arg)))
-    (vip-set-destructive-command
-     (list 'vip-open-line-at-point val ?r nil nil nil))
-    (if (equal com ?r)
-	(vip-loop val
-		  (progn
-		    (open-line 1)
-		    (vip-yank-last-insertion)))
-      (open-line 1)
-      (vip-change-state-to-insert))))
-
-(defun vip-substitute (arg)
-  "Substitute characters."
-  (interactive "P")
-  (let ((val (vip-p-val arg))
-	(com (vip-getcom arg)))
-    (push-mark nil t)
-    (forward-char val)
-    (if (equal com ?r)
-	(vip-change-subr (mark t) (point))
-      (vip-change (mark t) (point)))
-    (vip-set-destructive-command (list 'vip-substitute val ?r nil nil nil))
-    ))
-
-(defun vip-substitute-line (arg)
-  "Substitute lines."
-  (interactive "p")
-  (vip-set-complex-command-for-undo)
-  (vip-line (cons arg ?C)))
-
-;; Prepare for replace
-(defun vip-start-replace ()
-  (setq vip-began-as-replace t
-	vip-sitting-in-replace t
-	vip-replace-chars-to-delete 0
-	vip-replace-chars-deleted 0)
-  (vip-add-hook 'vip-after-change-functions 'vip-replace-mode-spy-after t)
-  (vip-add-hook 'vip-before-change-functions 'vip-replace-mode-spy-before t)
-  ;; this will get added repeatedly, but no harm
-  (add-hook 'after-change-functions 'vip-after-change-sentinel t)
-  (add-hook 'before-change-functions 'vip-before-change-sentinel t)
-  (vip-move-marker-locally 'vip-last-posn-in-replace-region
-			   (vip-replace-start))
-  (vip-add-hook
-   'vip-post-command-hooks 'vip-replace-state-post-command-sentinel t)
-  (vip-add-hook
-   'vip-pre-command-hooks 'vip-replace-state-pre-command-sentinel t)
-  ;; guard against a smartie who switched from R-replace to normal replace
-  (vip-remove-hook
-   'vip-post-command-hooks 'vip-R-state-post-command-sentinel)
-  (if overwrite-mode (overwrite-mode nil))
-  )
-  
-
-;; checks how many chars were deleted by the last change
-(defun vip-replace-mode-spy-before (beg end)
-  (setq vip-replace-chars-deleted
-	(- end beg
-	   (max 0 (- end (vip-replace-end)))
-	   (max 0 (- (vip-replace-start) beg))
-	   )))
-
-;; Invoked as an after-change-function to set up parameters of the last change
-(defun vip-replace-mode-spy-after (beg end length)
-  (if (memq vip-intermediate-command '(repeating-insertion-from-ring))
-      (progn
-	(setq vip-replace-chars-to-delete 0)
-	(vip-move-marker-locally 
-	 'vip-last-posn-in-replace-region (point)))
-    
-    (let (beg-col end-col real-end chars-to-delete)
-      (setq real-end (min end (vip-replace-end)))
-      (save-excursion
-	(goto-char beg)
-	(setq beg-col (current-column))
-	(goto-char real-end)
-	(setq end-col (current-column)))
-      
-      ;; If beg of change is outside the replacement region, then don't
-      ;; delete anything in the repl region (set chars-to-delete to 0).
-      ;;
-      ;; This works fine except that we have to take special care of
-      ;; dabbrev-expand.  The problem stems from new-dabbrev.el, which
-      ;; sometimes simply shifts the repl region rightwards, without
-      ;; deleting an equal amount of characters.
-      ;;
-      ;; The reason why new-dabbrev.el causes this are this:
-      ;; if one dinamically completes a partial word that starts before the
-      ;; replacement region (but ends inside) then new-dabbrev.el first
-      ;; moves cursor backwards, to the beginning of the word to be
-      ;; completed (say, pt A). Then it inserts the 
-      ;; completed word and then deletes the old, incomplete part.
-      ;; Since the complete word is inserted at position before the repl
-      ;; region, the next If-statement would have set chars-to-delete to 0
-      ;; unless we check for the current command, which must be
-      ;; dabbrev-expand.
-      ;;
-      ;; In fact, it might be also useful to have overlays for insert
-      ;; regions as well, since this will let us capture the situation when
-      ;; dabbrev-expand goes back past the insertion point to find the
-      ;; beginning of the word to be expanded.
-      (if (or (and (<= (vip-replace-start) beg)
-		   (<= beg (vip-replace-end)))
-	      (and (= length 0) (eq this-command 'dabbrev-expand)))
-	  (setq chars-to-delete
-		(max (- end-col beg-col) (- real-end beg) 0))
-	(setq chars-to-delete 0))
-      
-      ;; if beg = last change position, it means that we are within the
-      ;; same command that does multiple changes. Moreover, it means
-      ;; that we have two subsequent changes (insert/delete) that
-      ;; complement each other.
-      (if (= beg (marker-position vip-last-posn-in-replace-region))
-	  (setq vip-replace-chars-to-delete 
-		(- (+ chars-to-delete vip-replace-chars-to-delete)
-		   vip-replace-chars-deleted)) 
-	(setq vip-replace-chars-to-delete chars-to-delete))
-      
-      (vip-move-marker-locally 
-       'vip-last-posn-in-replace-region
-       (max (if (> end (vip-replace-end)) (vip-replace-start) end)
-	    (or (marker-position vip-last-posn-in-replace-region)
-		(vip-replace-start)) 
-	    ))
-      
-      (setq vip-replace-chars-to-delete
-	    (max 0
-		 (min vip-replace-chars-to-delete
-		      (- (vip-replace-end) vip-last-posn-in-replace-region)
-		      (- (vip-line-pos 'end) vip-last-posn-in-replace-region)
-		      )))
-      )))
-
-
-;; Delete stuff between posn and the end of vip-replace-overlay-marker, if
-;; posn is within the overlay.
-(defun vip-finish-change (posn)
-  (vip-remove-hook 'vip-after-change-functions 'vip-replace-mode-spy-after)
-  (vip-remove-hook 'vip-before-change-functions 'vip-replace-mode-spy-before)
-  (vip-remove-hook 'vip-post-command-hooks
-		   'vip-replace-state-post-command-sentinel) 
-  (vip-remove-hook
-   'vip-pre-command-hooks 'vip-replace-state-pre-command-sentinel) 
-  (vip-restore-cursor-color-after-replace)
-  (setq vip-sitting-in-replace nil) ; just in case we'll need to know it
-  (save-excursion
-    (if (and 
-	 vip-replace-overlay
-	 (>= posn (vip-replace-start))
-	 (<  posn (vip-replace-end)))
-	   (delete-region posn (vip-replace-end)))
-    )
-  
-  (if (eq vip-current-state 'replace-state)
-      (vip-downgrade-to-insert))
-  ;; replace mode ended => nullify vip-last-posn-in-replace-region
-  (vip-move-marker-locally 'vip-last-posn-in-replace-region nil)
-  (vip-hide-replace-overlay)
-  (vip-refresh-mode-line)
-  (vip-put-string-on-kill-ring vip-last-replace-region)
-  )
-
-;; Make STRING be the first element of the kill ring.
-(defun vip-put-string-on-kill-ring (string)
-  (setq kill-ring (cons string kill-ring))
-  (if (> (length kill-ring) kill-ring-max)
-      (setcdr (nthcdr (1- kill-ring-max) kill-ring) nil))
-  (setq kill-ring-yank-pointer kill-ring))
-
-(defun vip-finish-R-mode ()
-  (vip-remove-hook 'vip-post-command-hooks 'vip-R-state-post-command-sentinel)
-  (vip-remove-hook
-   'vip-pre-command-hooks 'vip-replace-state-pre-command-sentinel)
-  (vip-downgrade-to-insert))
-  
-(defun vip-start-R-mode ()
-  ;; Leave arg as 1, not t: XEmacs insists that it must be a pos number
-  (overwrite-mode 1)
-  (vip-add-hook
-   'vip-post-command-hooks 'vip-R-state-post-command-sentinel t)
-  (vip-add-hook
-   'vip-pre-command-hooks 'vip-replace-state-pre-command-sentinel t)
-  ;; guard against a smartie who switched from R-replace to normal replace
-  (vip-remove-hook
-   'vip-post-command-hooks 'vip-replace-state-post-command-sentinel)
-  )
-
-
-  
-(defun vip-replace-state-exit-cmd ()
-  "Binding for keys that cause Replace state to switch to Vi or to Insert.
-These keys are ESC, RET, and LineFeed"
-  (interactive)
-  (if overwrite-mode  ;; If you are in replace mode invoked via 'R'
-      (vip-finish-R-mode)
-    (vip-finish-change vip-last-posn-in-replace-region))
-  (let (com)
-    (if (eq this-command 'vip-intercept-ESC-key)
-	(setq com 'vip-exit-insert-state)
-      (vip-set-unread-command-events last-input-char)
-      (setq com (key-binding (read-key-sequence nil))))
-      
-    (condition-case conds
-	(command-execute com)
-      (error
-       (vip-message-conditions conds)))
-    )
-  (vip-hide-replace-overlay))
-
-(defun vip-replace-state-carriage-return ()
-  "Implements carriage return in Viper replace state."
-  (interactive)
-  ;; If Emacs start supporting overlay maps, as it currently supports
-  ;; text-property maps, we could do away with vip-replace-minor-mode and
-  ;; just have keymap attached to replace overlay. Then the "if part" of this
-  ;; statement can be deleted.
-  (if (or (< (point) (vip-replace-start))
-	  (> (point) (vip-replace-end)))
-      (let (vip-replace-minor-mode com)
-	(vip-set-unread-command-events last-input-char)
-	(setq com (key-binding (read-key-sequence nil)))
-	(condition-case conds
-	    (command-execute com)
-	  (error
-	   (vip-message-conditions conds))))
-    (if (not vip-allow-multiline-replace-regions)
-	(vip-replace-state-exit-cmd)
-      (if (vip-same-line (point) (vip-replace-end))
-	  (vip-replace-state-exit-cmd)
-	(vip-kill-line nil)
-	(vip-next-line-at-bol nil)))))
-
-  
-;; This is the function bound to 'R'---unlimited replace.
-;; Similar to Emacs's own overwrite-mode.
-(defun vip-overwrite (arg) 
-  "Begin overwrite mode."
-  (interactive "P")
-  (let ((val (vip-p-val arg))
-	(com (vip-getcom arg)) (len))
-    (vip-set-destructive-command (list 'vip-overwrite val ?r nil nil nil))
-    (if com
-	(progn 
-	  ;; Viper saves inserted text in vip-last-insertion
-	  (setq len (length vip-last-insertion))
-	  (delete-char len)	
-	  (vip-loop val (vip-yank-last-insertion)))
-      (setq last-command 'vip-overwrite)
-      (vip-set-complex-command-for-undo)
-      (vip-set-replace-overlay (point) (vip-line-pos 'end))
-      (vip-change-state-to-replace)
-      )))
-
-
-;; line commands
-
-(defun vip-line (arg)
-  (let ((val (car arg))
-	(com (cdr arg)))
-    (vip-move-marker-locally 'vip-com-point (point))
-    (if (not (eobp))
-	(vip-next-line-carefully (1- val)))
-    ;; this ensures that dd, cc, D, yy will do the right thing on the last
-    ;; line of buffer when this line has no \n.
-    (vip-add-newline-at-eob-if-necessary)
-    (vip-execute-com 'vip-line val com))
-  (if (and (eobp) (not (bobp))) (forward-line -1))
-  )
-
-(defun vip-yank-line (arg)
-  "Yank ARG lines (in Vi's sense)."
-  (interactive "P")
-  (let ((val (vip-p-val arg)))
-    (vip-line (cons val ?Y))))
-
-
-;; region commands
-
-(defun vip-region (arg)
-  "Execute command on a region."
-  (interactive "P")
-  (let ((val (vip-P-val arg))
-	(com (vip-getcom arg)))
-    (vip-move-marker-locally 'vip-com-point (point))
-    (exchange-point-and-mark)
-    (vip-execute-com 'vip-region val com)))
-
-(defun vip-Region (arg)
-  "Execute command on a Region."
-  (interactive "P")
-  (let ((val (vip-P-val arg))
-	(com (vip-getCom arg)))
-    (vip-move-marker-locally 'vip-com-point (point))
-    (exchange-point-and-mark)
-    (vip-execute-com 'vip-Region val com)))
-
-(defun vip-replace-char (arg)
-  "Replace the following ARG chars by the character read."
-  (interactive "P")
-  (if (and (eolp) (bolp)) (error "No character to replace here"))
-  (let ((val (vip-p-val arg))
-	(com (vip-getcom arg)))
-    (vip-replace-char-subr com val)
-    (if (and (eolp) (not (bolp))) (forward-char 1))
-    (vip-set-destructive-command
-     (list 'vip-replace-char val ?r nil vip-d-char nil))
-  ))
-
-(defun vip-replace-char-subr (com arg)
-  (let ((take-care-of-iso-accents
-	 (and (boundp 'iso-accents-mode) vip-automatic-iso-accents))
-	char)
-    (setq char (if (equal com ?r)
-		   vip-d-char
-		 (read-char)))
-    (if (and  take-care-of-iso-accents (memq char '(?' ?\" ?^ ?~)))
-	;; get European characters
-	(progn
-	  (iso-accents-mode 1)
-	  (vip-set-unread-command-events char)
-	  (setq char (aref (read-key-sequence nil) 0))
-	  (iso-accents-mode -1)))
-    (delete-char arg t)
-    (setq vip-d-char char)
-    (vip-loop (if (> arg 0) arg (- arg)) 
-	    (if (eq char ?\C-m) (insert "\n") (insert char)))
-    (backward-char arg)))
-
-
-;; basic cursor movement.  j, k, l, h commands.
-
-(defun vip-forward-char (arg)
-  "Move point right ARG characters (left if ARG negative).
-On reaching end of line, stop and signal error."
-  (interactive "P")
-  (vip-leave-region-active)
-  (let ((val (vip-p-val arg))
-	(com (vip-getcom arg)))
-    (if com (vip-move-marker-locally 'vip-com-point (point)))
-    (if vip-ex-style-motion
-	(progn
-	  ;; the boundary condition check gets weird here because
-	  ;; forward-char may be the parameter of a delete, and 'dl' works
-	  ;; just like 'x' for the last char on a line, so we have to allow
-	  ;; the forward motion before the 'vip-execute-com', but, of
-	  ;; course, 'dl' doesn't work on an empty line, so we have to
-	  ;; catch that condition before 'vip-execute-com'
-	  (if (and (eolp) (bolp)) (error "") (forward-char val))
-	  (if com (vip-execute-com 'vip-forward-char val com))
-	  (if (eolp) (progn (backward-char 1) (error ""))))
-      (forward-char val)
-      (if com (vip-execute-com 'vip-forward-char val com)))))
-
-(defun vip-backward-char (arg)
-  "Move point left ARG characters (right if ARG negative). 
-On reaching beginning of line, stop and signal error."
-  (interactive "P")
-  (vip-leave-region-active)
-  (let ((val (vip-p-val arg))
-	(com (vip-getcom arg)))
-    (if com (vip-move-marker-locally 'vip-com-point (point)))
-    (if vip-ex-style-motion
-	(progn
-	  (if (bolp) (error "") (backward-char val))
-	  (if com (vip-execute-com 'vip-backward-char val com)))
-      (backward-char val)
-      (if com (vip-execute-com 'vip-backward-char val com)))))
-      
-;; Like forward-char, but doesn't move at end of buffer.
-(defun vip-forward-char-carefully (&optional arg)      
-  (setq arg (or arg 1))
-  (if (>= (point-max) (+ (point) arg))
-      (forward-char arg)
-    (goto-char (point-max))))
-      
-;; Like backward-char, but doesn't move at end of buffer.
-(defun vip-backward-char-carefully (&optional arg)      
-  (setq arg (or arg 1))
-  (if (<= (point-min) (- (point) arg))
-      (backward-char arg)
-    (goto-char (point-min))))
-
-(defun vip-next-line-carefully (arg)
-  (condition-case nil
-      (next-line arg)
-    (error nil)))
-
-
-
-;;; Word command
-
-;; Words are formed from alpha's and nonalphas - <sp>,\t\n are separators
-;; for word movement. When executed with a destructive command, \n is
-;; usually left untouched for the last word.
-;; Viper uses syntax table to determine what is a word and what is a
-;; separator. However, \n is always a separator. Also, if vip-syntax-preference
-;; is 'vi, then `_' is part of the word.
-
-;; skip only one \n
-(defun vip-skip-separators (forward)
-  (if forward
-      (progn
-	(vip-skip-all-separators-forward 'within-line)
-	(if (looking-at "\n")
-	    (progn
-	      (forward-char)
-	      (vip-skip-all-separators-forward  'within-line))))
-    (vip-skip-all-separators-backward 'within-line)
-    (backward-char)
-    (if (looking-at "\n")
-	(vip-skip-all-separators-backward 'within-line)
-      (forward-char))))
-      
-(defun vip-forward-word-kernel (val)
-  (while (> val 0)
-    (cond ((vip-looking-at-alpha)
-	   (vip-skip-alpha-forward "_")
-	   (vip-skip-separators t))
-	  ((vip-looking-at-separator)
-	   (vip-skip-separators t))
-	  ((not (vip-looking-at-alphasep))
-	   (vip-skip-nonalphasep-forward)
-	   (vip-skip-separators t)))
-    (setq val (1- val))))
-
-;; first search backward for pat. Then skip chars backwards using aux-pat
-(defun vip-fwd-skip (pat aux-pat lim)
-  (if (and (save-excursion 
-	     (re-search-backward pat lim t))
-	   (= (point) (match-end 0)))
-      (goto-char (match-beginning 0)))
-  (skip-chars-backward aux-pat lim)
-  (if (= (point) lim)
-      (vip-forward-char-carefully))
-  )
-
-	  
-(defun vip-forward-word (arg)
-  "Forward word."
-  (interactive "P")
-  (vip-leave-region-active)
-  (let ((val (vip-p-val arg))
-	(com (vip-getcom arg)))
-    (if com (vip-move-marker-locally 'vip-com-point (point)))
-    (vip-forward-word-kernel val)
-    (if com (progn
-	      (cond ((memq com (list ?c (- ?c)))
-		     (vip-fwd-skip "\n[ \t]*" " \t" vip-com-point))
-		    ;; Yank words including the whitespace, but not newline
-		    ((memq com (list ?y (- ?y)))
-		     (vip-fwd-skip "\n[ \t]*" "" vip-com-point))
-		    ((vip-dotable-command-p com)
-		     (vip-fwd-skip "\n[ \t]*" "" vip-com-point)))
-	      (vip-execute-com 'vip-forward-word val com)))))
-	  
-
-(defun vip-forward-Word (arg)
-  "Forward word delimited by white characters."
-  (interactive "P")
-  (vip-leave-region-active)
-  (let ((val (vip-p-val arg))
-	(com (vip-getcom arg)))
-    (if com (vip-move-marker-locally 'vip-com-point (point)))
-    (vip-loop val
-	      (progn
-		(vip-skip-nonseparators 'forward)
-		(vip-skip-separators t)))
-    (if com (progn
-	      (cond ((memq com (list ?c (- ?c)))
-		     (vip-fwd-skip "\n[ \t]*" " \t" vip-com-point))
-		    ;; Yank words including the whitespace, but not newline
-		    ((memq com (list ?y (- ?y)))
-		     (vip-fwd-skip "\n[ \t]*" "" vip-com-point))
-		    ((vip-dotable-command-p com)
-		     (vip-fwd-skip "\n[ \t]*" "" vip-com-point)))
-	      (vip-execute-com 'vip-forward-Word val com)))))
-
-
-;; this is a bit different from Vi, but Vi's end of word 
-;; makes no sense whatsoever
-(defun vip-end-of-word-kernel ()
-  (if (vip-end-of-word-p) (forward-char))
-  (if (vip-looking-at-separator)
-      (vip-skip-all-separators-forward))
-  
-  (cond ((vip-looking-at-alpha) (vip-skip-alpha-forward "_"))
-	((not (vip-looking-at-alphasep)) (vip-skip-nonalphasep-forward)))
-  (vip-backward-char-carefully))
-
-(defun vip-end-of-word-p ()
-  (or (eobp) 
-      (save-excursion
-	(cond ((vip-looking-at-alpha)
-	       (forward-char)
-	       (not (vip-looking-at-alpha)))
-	      ((not (vip-looking-at-alphasep))
-	       (forward-char)
-	       (vip-looking-at-alphasep))))))
-
-
-(defun vip-end-of-word (arg &optional careful)
-  "Move point to end of current word."
-  (interactive "P")
-  (vip-leave-region-active)
-  (let ((val (vip-p-val arg))
-	(com (vip-getcom arg)))
-    (if com (vip-move-marker-locally 'vip-com-point (point)))
-    (vip-loop val (vip-end-of-word-kernel))
-    (if com 
-	(progn
-	  (forward-char)
-	  (vip-execute-com 'vip-end-of-word val com)))))
-
-(defun vip-end-of-Word (arg)
-  "Forward to end of word delimited by white character."
-  (interactive "P")
-  (vip-leave-region-active)
-  (let ((val (vip-p-val arg))
-	(com (vip-getcom arg)))
-    (if com (vip-move-marker-locally 'vip-com-point (point)))
-    (vip-loop val
-	      (progn
-		(vip-end-of-word-kernel)
-		(vip-skip-nonseparators 'forward)
-		(backward-char)))
-    (if com 
-	(progn
-	  (forward-char)
-	  (vip-execute-com 'vip-end-of-Word val com)))))
-
-(defun vip-backward-word-kernel (val)
-  (while (> val 0)
-    (backward-char)
-    (cond ((vip-looking-at-alpha)
-	   (vip-skip-alpha-backward "_"))
-	  ((vip-looking-at-separator)
-	   (forward-char)
-	   (vip-skip-separators nil)
-	   (backward-char)
-	   (cond ((vip-looking-at-alpha)
-		  (vip-skip-alpha-backward "_"))
-		 ((not (vip-looking-at-alphasep))
-		  (vip-skip-nonalphasep-backward))
-		 (t (forward-char))))
-	  ((not (vip-looking-at-alphasep))
-	   (vip-skip-nonalphasep-backward)))
-    (setq val (1- val))))
-
-(defun vip-backward-word (arg)
-  "Backward word."
-  (interactive "P")
-  (vip-leave-region-active)
-  (let ((val (vip-p-val arg))
-	(com (vip-getcom arg)))
-    (if com
-	(let (i)
-	  (if (setq i (save-excursion (backward-char) (looking-at "\n")))
-	      (backward-char))
-	  (vip-move-marker-locally 'vip-com-point (point))
-	  (if i (forward-char))))
-    (vip-backward-word-kernel val)
-    (if com (vip-execute-com 'vip-backward-word val com))))
-
-(defun vip-backward-Word (arg)
-  "Backward word delimited by white character."
-  (interactive "P")
-  (vip-leave-region-active)
-  (let ((val (vip-p-val arg))
-	(com (vip-getcom arg)))
-    (if com
-	(let (i)
-	  (if (setq i (save-excursion (backward-char) (looking-at "\n")))
-	      (backward-char))
-	  (vip-move-marker-locally 'vip-com-point (point))
-	  (if i (forward-char))))
-    (vip-loop val
-	      (progn 
-		(vip-skip-separators nil)
-		(vip-skip-nonseparators 'backward)))
-    (if com (vip-execute-com 'vip-backward-Word val com))))
-
-
+   
 
-;; line commands
-
-(defun vip-beginning-of-line (arg)
-  "Go to beginning of line."
-  (interactive "P")
-  (vip-leave-region-active)
-  (let ((val (vip-p-val arg))
-	(com (vip-getcom arg)))
-    (if com (vip-move-marker-locally 'vip-com-point (point)))
-    (beginning-of-line val)
-    (if com (vip-execute-com 'vip-beginning-of-line val com))))
-
-(defun vip-bol-and-skip-white (arg)
-  "Beginning of line at first non-white character."
-  (interactive "P")
-  (vip-leave-region-active)
-  (let ((val (vip-p-val arg))
-	(com (vip-getcom arg)))
-    (if com (vip-move-marker-locally 'vip-com-point (point)))
-    (forward-to-indentation (1- val))
-    (if com (vip-execute-com 'vip-bol-and-skip-white val com))))
-
-(defun vip-goto-eol (arg)
-  "Go to end of line."
-  (interactive "P")
-  (vip-leave-region-active)
-  (let ((val (vip-p-val arg))
-	(com (vip-getcom arg)))
-    (if com (vip-move-marker-locally 'vip-com-point (point)))
-    (end-of-line val)
-    (if com (vip-execute-com 'vip-goto-eol val com))
-    (if vip-ex-style-motion
-	(if (and (eolp) (not (bolp)) 
-		 ;; a fix for vip-change-to-eol
-		 (not (equal vip-current-state 'insert-state)))
-	    (backward-char 1)
-    ))))
-
-
-(defun vip-goto-col (arg)
-  "Go to ARG's column."
-  (interactive "P")
-  (vip-leave-region-active)
-  (let ((val (vip-p-val arg))
-	(com (vip-getcom arg))
-	line-len)
-    (setq line-len (- (vip-line-pos 'end) (vip-line-pos 'start)))
-    (if com (vip-move-marker-locally 'vip-com-point (point)))
-    (beginning-of-line)
-    (forward-char (1- (min line-len val)))
-    (while (> (current-column) (1- val))
-      (backward-char 1))
-    (if com (vip-execute-com 'vip-goto-col val com))
-    (save-excursion
-      (end-of-line)
-      (if (> val (current-column)) (error "")))
-    ))
-    
-
-(defun vip-next-line (arg)
-  "Go to next line."
-  (interactive "P")
-  (vip-leave-region-active)
-  (let ((val (vip-p-val arg))
-	(com (vip-getCom arg)))
-    (if com (vip-move-marker-locally 'vip-com-point (point)))
-    (next-line val)
-    (if vip-ex-style-motion
-	(if (and (eolp) (not (bolp))) (backward-char 1)))
-    (setq this-command 'next-line)
-    (if com (vip-execute-com 'vip-next-line val com))))
-
-(defun vip-next-line-at-bol (arg)
-  "Next line at beginning of line."
-  (interactive "P")
-  (vip-leave-region-active)
-  (save-excursion
-    (end-of-line)
-    (if (eobp) (error "Last line in buffer")))
-  (let ((val (vip-p-val arg))
-	(com (vip-getCom arg)))
-    (if com (vip-move-marker-locally 'vip-com-point (point)))
-    (forward-line val)
-    (back-to-indentation)
-    (if com (vip-execute-com 'vip-next-line-at-bol val com))))
-
-(defun vip-previous-line (arg)	 
-  "Go to previous line."    	
-  (interactive "P")
-  (vip-leave-region-active)
-  (let ((val (vip-p-val arg))
-	(com (vip-getCom arg)))
-    (if com (vip-move-marker-locally 'vip-com-point (point)))
-    (previous-line val)
-    (if vip-ex-style-motion
-	(if (and (eolp) (not (bolp))) (backward-char 1)))
-    (setq this-command 'previous-line)
-    (if com (vip-execute-com 'vip-previous-line val com))))
-
-
-(defun vip-previous-line-at-bol (arg)
-  "Previous line at beginning of line."
-  (interactive "P")
-  (vip-leave-region-active)
-  (save-excursion
-    (beginning-of-line)
-    (if (bobp) (error "First line in buffer")))
-  (let ((val (vip-p-val arg))
-	(com (vip-getCom arg)))
-    (if com (vip-move-marker-locally 'vip-com-point (point)))
-    (forward-line (- val))
-    (back-to-indentation)
-    (if com (vip-execute-com 'vip-previous-line val com))))
-
-(defun vip-change-to-eol (arg)
-  "Change to end of line."
-  (interactive "P")
-  (vip-goto-eol (cons arg ?c)))
-
-(defun vip-kill-line (arg)
-  "Delete line."
-  (interactive "P")
-  (vip-goto-eol (cons arg ?d)))
-
-(defun vip-erase-line (arg)
-  "Erase line."
-  (interactive "P")
-  (vip-beginning-of-line (cons arg ?d)))
-
-
-;;; Moving around
-
-(defun vip-goto-line (arg)
-  "Go to ARG's line.  Without ARG go to end of buffer."
-  (interactive "P")
-  (let ((val (vip-P-val arg))
-	(com (vip-getCom arg)))
-    (vip-move-marker-locally 'vip-com-point (point))
-    (vip-deactivate-mark)
-    (push-mark nil t)
-    (if (null val)
-	(goto-char (point-max))
-      (goto-char (point-min))
-      (forward-line (1- val)))
-    
-    ;; positioning is done twice: before and after command execution
-    (if (and (eobp) (bolp) (not (bobp))) (forward-line -1))
-    (back-to-indentation)
-    
-    (if com (vip-execute-com 'vip-goto-line val com))
-    
-    (if (and (eobp) (bolp) (not (bobp))) (forward-line -1))
-    (back-to-indentation)
-    ))
-
-;; Find ARG's occurrence of CHAR on the current line. 
-;; If FORWARD then search is forward, otherwise backward.  OFFSET is used to
-;; adjust point after search.
-(defun vip-find-char (arg char forward offset)
-  (or (char-or-string-p char) (error ""))
-  (let ((arg (if forward arg (- arg)))
-	(cmd (if (eq vip-intermediate-command 'vip-repeat)
-		 (nth 5 vip-d-com)
-	       (vip-array-to-string (this-command-keys))))
-	point)
-    (save-excursion
-      (save-restriction
-	(if (> arg 0)
-	    (narrow-to-region
-	     ;; forward search begins here
-	     (if (eolp) (error "Command `%s':  At end of line" cmd) (point))
-	     ;; forward search ends here
-	     (progn (end-of-line) (point)))
-	  (narrow-to-region
-	   ;; backward search begins from here
-	   (if (bolp)
-	       (error "Command `%s':  At beginning of line" cmd) (point))
-	   ;; backward search ends here
-	   (progn (beginning-of-line) (point))))
-	;; if arg > 0, point is forwarded before search.
-	(if (> arg 0) (goto-char (1+ (point-min)))
-	  (goto-char (point-max)))
-	(if (let ((case-fold-search nil))
-	      (search-forward (char-to-string char) nil 0 arg))
-	    (setq point (point))
-	  (error "Command `%s':  `%c' not found" cmd char))))
-    (goto-char (+ point (if (> arg 0) (if offset -2 -1) (if offset 1 0))))))
-
-(defun vip-find-char-forward (arg)
-  "Find char on the line. 
-If called interactively read the char to find from the terminal, and if
-called from vip-repeat, the char last used is used.  This behaviour is
-controlled by the sign of prefix numeric value."
-  (interactive "P")
-  (let ((val (vip-p-val arg))
-	(com (vip-getcom arg))
-	(cmd-representation (nth 5 vip-d-com)))
-    (if (> val 0)
-	;; this means that the function was called interactively
-	(setq vip-f-char (read-char)
-	      vip-f-forward t
-	      vip-f-offset nil)
-      ;; vip-repeat --- set vip-F-char from command-keys
-      (setq vip-F-char (if (stringp cmd-representation)
-			   (vip-seq-last-elt cmd-representation)
-			 vip-F-char)
-	    vip-f-char vip-F-char)
-      (setq val (- val)))
-    (if com (vip-move-marker-locally 'vip-com-point (point)))
-    (vip-find-char val (if (> (vip-p-val arg) 0) vip-f-char vip-F-char) t nil)
-    (setq val (- val))
-    (if com
-	(progn
-	  (setq vip-F-char vip-f-char) ; set new vip-F-char
-	  (forward-char)
-	  (vip-execute-com 'vip-find-char-forward val com)))))
-
-(defun vip-goto-char-forward (arg)
-  "Go up to char ARG forward on line."
-  (interactive "P")
-  (let ((val (vip-p-val arg))
-	(com (vip-getcom arg))
-	(cmd-representation (nth 5 vip-d-com)))
-    (if (> val 0)
-	;; this means that the function was called interactively
-	(setq vip-f-char (read-char)
-	      vip-f-forward t
-	      vip-f-offset t)
-      ;; vip-repeat --- set vip-F-char from command-keys
-      (setq vip-F-char (if (stringp cmd-representation)
-			   (vip-seq-last-elt cmd-representation)
-			 vip-F-char)
-	    vip-f-char vip-F-char)
-      (setq val (- val)))
-    (if com (vip-move-marker-locally 'vip-com-point (point)))
-    (vip-find-char val (if (> (vip-p-val arg) 0) vip-f-char vip-F-char) t t)
-    (setq val (- val))
-    (if com
-	(progn
-	  (setq vip-F-char vip-f-char) ; set new vip-F-char
-	  (forward-char)
-	  (vip-execute-com 'vip-goto-char-forward val com)))))
-
-(defun vip-find-char-backward (arg)
-  "Find char ARG on line backward."
-  (interactive "P")
-  (let ((val (vip-p-val arg))
-	(com (vip-getcom arg))
-	(cmd-representation (nth 5 vip-d-com)))
-    (if (> val 0)
-	;; this means that the function was called interactively
-	(setq vip-f-char (read-char)
-	      vip-f-forward nil
-	      vip-f-offset nil)
-      ;; vip-repeat --- set vip-F-char from command-keys
-      (setq vip-F-char (if (stringp cmd-representation)
-			   (vip-seq-last-elt cmd-representation)
-			 vip-F-char)
-	    vip-f-char vip-F-char)
-      (setq val (- val)))
-    (if com (vip-move-marker-locally 'vip-com-point (point)))
-    (vip-find-char
-     val (if (> (vip-p-val arg) 0) vip-f-char vip-F-char) nil nil)
-    (setq val (- val))
-    (if com
-	(progn
-	  (setq vip-F-char vip-f-char) ; set new vip-F-char
-	  (vip-execute-com 'vip-find-char-backward val com)))))
-
-(defun vip-goto-char-backward (arg)
-  "Go up to char ARG backward on line."
-  (interactive "P")
-  (let ((val (vip-p-val arg))
-	(com (vip-getcom arg))
-	(cmd-representation (nth 5 vip-d-com)))
-    (if (> val 0)
-	;; this means that the function was called interactively
-	(setq vip-f-char (read-char)
-	      vip-f-forward nil
-	      vip-f-offset t)
-      ;; vip-repeat --- set vip-F-char from command-keys
-      (setq vip-F-char (if (stringp cmd-representation)
-			   (vip-seq-last-elt cmd-representation)
-			 vip-F-char)
-	    vip-f-char vip-F-char)
-      (setq val (- val)))
-    (if com (vip-move-marker-locally 'vip-com-point (point)))
-    (vip-find-char val (if (> (vip-p-val arg) 0) vip-f-char vip-F-char) nil t)
-    (setq val (- val))
-    (if com
-	(progn
-	  (setq vip-F-char vip-f-char) ; set new vip-F-char
-	  (vip-execute-com 'vip-goto-char-backward val com)))))
-
-(defun vip-repeat-find (arg)
-  "Repeat previous find command."
-  (interactive "P")
-  (let ((val (vip-p-val arg))
-	(com (vip-getcom arg)))
-    (vip-deactivate-mark)
-    (if com (vip-move-marker-locally 'vip-com-point (point)))
-    (vip-find-char val vip-f-char vip-f-forward vip-f-offset)
-    (if com
-	(progn
-	  (if vip-f-forward (forward-char))
-	  (vip-execute-com 'vip-repeat-find val com)))))
-
-(defun vip-repeat-find-opposite (arg)
-  "Repeat previous find command in the opposite direction."
-  (interactive "P")
-  (let ((val (vip-p-val arg))
-	(com (vip-getcom arg)))
-    (vip-deactivate-mark)
-    (if com (vip-move-marker-locally 'vip-com-point (point)))
-    (vip-find-char val vip-f-char (not vip-f-forward) vip-f-offset)
-    (if com
-	(progn
-	  (if vip-f-forward (forward-char))
-	  (vip-execute-com 'vip-repeat-find-opposite val com)))))
-
-
-;; window scrolling etc.
-
-(defun vip-other-window (arg)
-  "Switch to other window."
-  (interactive "p")
-  (other-window arg)
-  (or (not (eq vip-current-state 'emacs-state))
-      (string= (buffer-name (current-buffer)) " *Minibuf-1*")
-      (vip-change-state-to-vi)))
-
-(defun vip-window-top (arg)
-  "Go to home window line."
-  (interactive "P")
-  (let ((val (vip-p-val arg))
-	(com (vip-getCom arg)))
-    (if com (vip-move-marker-locally 'vip-com-point (point)))
-    (push-mark nil t) 
-    (move-to-window-line (1- val))
-
-    ;; positioning is done twice: before and after command execution
-    (if (and (eobp) (bolp) (not (bobp))) (forward-line -1))
-    (back-to-indentation)
-    
-    (if com (vip-execute-com 'vip-window-top val com))
-    
-    (if (and (eobp) (bolp) (not (bobp))) (forward-line -1))
-    (back-to-indentation)
-    ))
-
-(defun vip-window-middle (arg)
-  "Go to middle window line."
-  (interactive "P")
-  (let ((val (vip-p-val arg))
-	(com (vip-getCom arg))
-	lines)
-    (if com (vip-move-marker-locally 'vip-com-point (point)))
-    (push-mark nil t) 
-    (if (not (pos-visible-in-window-p (point-max)))
-	(move-to-window-line (+ (/ (1- (window-height)) 2) (1- val)))
-      (setq lines (count-lines (window-start) (point-max)))
-      (move-to-window-line (+ (/ lines 2) (1- val))))
-      
-    ;; positioning is done twice: before and after command execution
-    (if (and (eobp) (bolp) (not (bobp))) (forward-line -1))
-    (back-to-indentation)
-
-    (if com (vip-execute-com 'vip-window-middle val com))
-    
-    (if (and (eobp) (bolp) (not (bobp))) (forward-line -1))
-    (back-to-indentation)
-    ))
-
-(defun vip-window-bottom (arg)
-  "Go to last window line."
-  (interactive "P")
-  (let ((val (vip-p-val arg))
-	(com (vip-getCom arg)))
-    (if com (vip-move-marker-locally 'vip-com-point (point)))
-    (push-mark nil t) 
-    (move-to-window-line (- val))
-    
-    ;; positioning is done twice: before and after command execution
-    (if (and (eobp) (bolp) (not (bobp))) (forward-line -1))
-    (back-to-indentation)
-
-    (if com (vip-execute-com 'vip-window-bottom val com))
-    
-    (if (and (eobp) (bolp) (not (bobp))) (forward-line -1))
-    (back-to-indentation)
-    ))
-
-(defun vip-line-to-top (arg)
-  "Put current line on the home line."
-  (interactive "p")
-  (recenter (1- arg)))
-
-(defun vip-line-to-middle (arg)
-  "Put current line on the middle line."
-  (interactive "p")
-  (recenter (+ (1- arg) (/ (1- (window-height)) 2))))
-
-(defun vip-line-to-bottom (arg)
-  "Put current line on the last line."
-  (interactive "p")
-  (recenter (- (window-height) (1+ arg))))
-
-;; If point is within vip-search-scroll-threshold of window top or bottom,
-;; scroll up or down 1/7 of window height, depending on whether we are at the
-;; bottom or at the top of the  window. This function is called by vip-search
-;; (which is called from vip-search-forward/backward/next). If the value of
-;; vip-search-scroll-threshold is negative - don't scroll.
-(defun vip-adjust-window ()
-  (let ((win-height (if vip-emacs-p
-			(1- (window-height)) ; adjust for modeline
-		      (window-displayed-height)))
-	(pt (point))
-	at-top-p at-bottom-p
-	min-scroll direction)
-    (save-excursion
-      (move-to-window-line 0) ; top
-      (setq at-top-p
-	    (<= (count-lines pt (point))
-		vip-search-scroll-threshold))
-      (move-to-window-line -1) ; bottom
-      (setq at-bottom-p
-	    (<= (count-lines pt (point)) vip-search-scroll-threshold))
-      )
-    (cond (at-top-p (setq min-scroll (1- vip-search-scroll-threshold)
-			  direction  1))
-	  (at-bottom-p (setq min-scroll (1+ vip-search-scroll-threshold)
-			     direction -1)))
-    (if min-scroll
-	(recenter
-	 (* (max min-scroll (/ win-height 7)) direction)))
-    ))
-
-
-;; paren match
-;; must correct this to only match ( to ) etc. On the other hand
-;; it is good that paren match gets confused, because that way you
-;; catch _all_ imbalances. 
-
-(defun vip-paren-match (arg)
-  "Go to the matching parenthesis."
-  (interactive "P")
-  (vip-leave-region-active)
-  (let ((com (vip-getcom arg))
-	(parse-sexp-ignore-comments vip-parse-sexp-ignore-comments)
-	anchor-point)
-    (if (integerp arg)
-	(if (or (> arg 99) (< arg 1))
-	    (error "Prefix must be between 1 and 99")
-	  (goto-char
-	   (if (> (point-max) 80000)
-	       (* (/ (point-max) 100) arg)
-	     (/ (* (point-max) arg) 100)))
-	  (back-to-indentation))
-      (let (beg-lim end-lim)
-	(if (and (eolp) (not (bolp))) (forward-char -1))
-	(if (not (looking-at "[][(){}]"))
-	    (setq anchor-point (point)))
-	(save-excursion
-	  (beginning-of-line)
-	  (setq beg-lim (point))
-	  (end-of-line)
-	  (setq end-lim (point)))
-	(cond ((re-search-forward "[][(){}]" end-lim t) 
-	       (backward-char) )
-	      ((re-search-backward "[][(){}]" beg-lim t))
-	      (t
-	       (error "No matching character on line"))))
-      (cond ((looking-at "[\(\[{]")
-	     (if com (vip-move-marker-locally 'vip-com-point (point)))
-	     (forward-sexp 1)
-	     (if com
-		 (vip-execute-com 'vip-paren-match nil com)
-	       (backward-char)))
-	    (anchor-point
-	     (if com
-		 (progn
-		   (vip-move-marker-locally 'vip-com-point anchor-point)
-		   (forward-char 1)
-		   (vip-execute-com 'vip-paren-match nil com)
-		   )))
-	    ((looking-at "[])}]")
-	     (forward-char)
-	     (if com (vip-move-marker-locally 'vip-com-point (point)))
-	     (backward-sexp 1)
-	     (if com (vip-execute-com 'vip-paren-match nil com)))
-	    (t (error ""))))))
-
-(defun vip-toggle-parse-sexp-ignore-comments ()
-  (interactive)
-  (setq vip-parse-sexp-ignore-comments (not vip-parse-sexp-ignore-comments))
-  (prin1 (format "`%%' will %signore parentheses inside the comments"
-	   (if vip-parse-sexp-ignore-comments "" "NOT ")))
-  )
-
-
-;; sentence ,paragraph and heading
-
-(defun vip-forward-sentence (arg)
-  "Forward sentence."
-  (interactive "P")
-  (push-mark nil t) 
-  (let ((val (vip-p-val arg))
-	(com (vip-getcom arg)))
-    (if com (vip-move-marker-locally 'vip-com-point (point)))
-    (forward-sentence val)
-    (if com (vip-execute-com 'vip-forward-sentence nil com))))
-
-(defun vip-backward-sentence (arg)
-  "Backward sentence."
-  (interactive "P")
-  (push-mark nil t) 
-  (let ((val (vip-p-val arg))
-	(com (vip-getcom arg)))
-    (if com (vip-move-marker-locally 'vip-com-point (point)))
-    (backward-sentence val)
-    (if com (vip-execute-com 'vip-backward-sentence nil com))))
-
-(defun vip-forward-paragraph (arg)
-  "Forward paragraph."
-  (interactive "P")
-  (push-mark nil t) 
-  (let ((val (vip-p-val arg))
-	(com (vip-getCom arg)))
-    (if com (vip-move-marker-locally 'vip-com-point (point)))
-    (forward-paragraph val)
-    (if com
-	(progn
-	  (backward-char 1)
-	  (vip-execute-com 'vip-forward-paragraph nil com)))))
-
-(defun vip-backward-paragraph (arg)
-  "Backward paragraph."
-  (interactive "P")
-  (push-mark nil t) 
-  (let ((val (vip-p-val arg))
-	(com (vip-getCom arg)))
-    (if com (vip-move-marker-locally 'vip-com-point (point)))
-    (backward-paragraph val)
-    (if com
-	(progn
-	  (forward-char 1)
-	  (vip-execute-com 'vip-backward-paragraph nil com)
-	  (backward-char 1)))))
-
-;; should be mode-specific etc.
-
-(defun vip-prev-heading (arg)
-  (interactive "P")
-  (let ((val (vip-p-val arg))
-	(com (vip-getCom arg)))
-    (if com (vip-move-marker-locally 'vip-com-point (point)))
-    (re-search-backward vip-heading-start nil t val)
-    (goto-char (match-beginning 0))
-    (if com (vip-execute-com 'vip-prev-heading nil com))))
-
-(defun vip-heading-end (arg)
-  (interactive "P")
-  (let ((val (vip-p-val arg))
-	(com (vip-getCom arg)))
-    (if com (vip-move-marker-locally 'vip-com-point (point)))
-    (re-search-forward vip-heading-end nil t val)
-    (goto-char (match-beginning 0))
-    (if com (vip-execute-com 'vip-heading-end nil com))))
-
-(defun vip-next-heading (arg)
-  (interactive "P")
-  (let ((val (vip-p-val arg))
-	(com (vip-getCom arg)))
-    (if com (vip-move-marker-locally 'vip-com-point (point)))
-    (end-of-line)
-    (re-search-forward vip-heading-start nil t val)
-    (goto-char (match-beginning 0))
-    (if com (vip-execute-com 'vip-next-heading nil com))))
-
-
-;; scrolling
-
-(setq scroll-step 1)
-
-(defun vip-scroll-screen (arg)
-  "Scroll to next screen."
-  (interactive "p")
-  (condition-case nil
-      (if (> arg 0)
-	  (while (> arg 0)
-	    (scroll-up)
-	    (setq arg (1- arg)))
-	(while (> 0 arg)
-	  (scroll-down)
-	  (setq arg (1+ arg))))
-    (error (beep 1)
-	   (if (> arg 0)
-	       (progn
-		 (message "End of buffer")
-		 (goto-char (point-max)))
-	     (message "Beginning of buffer")
-	     (goto-char (point-min))))
-    ))
-
-(defun vip-scroll-screen-back (arg)
-  "Scroll to previous screen."
-  (interactive "p")
-  (vip-scroll-screen (- arg)))
-
-(defun vip-scroll-down (arg)
-  "Pull down half screen."
-  (interactive "P")
-  (condition-case nil
-      (if (null arg)
-	  (scroll-down (/ (window-height) 2))
-	(scroll-down arg))
-    (error (beep 1)
-	   (message "Beginning of buffer")
-	   (goto-char (point-min)))))
-
-(defun vip-scroll-down-one (arg)
-  "Scroll up one line."
-  (interactive "p")
-  (scroll-down arg))
-
-(defun vip-scroll-up (arg)
-  "Pull up half screen."
-  (interactive "P")
-  (condition-case nil
-      (if (null arg)
-	  (scroll-up (/ (window-height) 2))
-	(scroll-up arg))
-    (error (beep 1)
-	   (message "End of buffer")
-	   (goto-char (point-max)))))
-
-(defun vip-scroll-up-one (arg)
-  "Scroll down one line."
-  (interactive "p")
-  (scroll-up arg))
-
-
-;; searching
-
-(defun vip-if-string (prompt)
-  (let ((s (vip-read-string-with-history
-	    prompt
-	    nil ; no initial
-	    'vip-search-history
-	    (car vip-search-history))))
-    (if (not (string= s ""))
-	(setq vip-s-string s))))  
-	
-    
-(defun vip-toggle-search-style (arg) 
-  "Toggle the value of vip-case-fold-search/vip-re-search.
-Without prefix argument, will ask which search style to toggle. With prefix
-arg 1,toggles vip-case-fold-search; with arg 2 toggles vip-re-search.
-
-Although this function is bound to \\[vip-toggle-search-style], the most
-convenient way to use it is to bind `//' to the macro
-`1 M-x vip-toggle-search-style' and `///' to
-`2 M-x vip-toggle-search-style'. In this way, hitting `//' quickly will
-toggle case-fold-search and hitting `/' three times witth toggle regexp
-search. Macros are more convenient in this case because they don't affect
-the Emacs binding of `/'."
-  (interactive "P")
-  (let (msg)
-    (cond ((or (eq arg 1)
-	       (and (null arg)
-		    (y-or-n-p (format "Search style: '%s'. Want '%s'? "
-				      (if vip-case-fold-search
-					  "case-insensitive" "case-sensitive")
-				      (if vip-case-fold-search
-					  "case-sensitive"
-					"case-insensitive")))))
-	   (setq vip-case-fold-search (null vip-case-fold-search))
-	   (if vip-case-fold-search
-	       (setq msg "Search becomes case-insensitive")
-	     (setq msg "Search becomes case-sensitive")))
-	  ((or (eq arg 2)
-	       (and (null arg)
-		    (y-or-n-p (format "Search style: '%s'. Want '%s'? "
-				      (if vip-re-search
-					  "regexp-search" "vanilla-search")
-				      (if vip-re-search
-					  "vanilla-search"
-					"regexp-search")))))
-	   (setq vip-re-search (null vip-re-search))
-	   (if vip-re-search
-	       (setq msg "Search becomes regexp-style")
-	     (setq msg "Search becomes vanilla-style")))
-	  (t
-	   (setq msg "Search style remains unchanged")))
-    (prin1 msg t)))
-
-(defun vip-set-vi-search-style-macros (unset)
-  "Set the macros for toggling the search style in Viper's vi-state.
-The macro that toggles case sensitivity is bound to `//', and the one that
-toggles regexp search is bound to `///'.
-With a prefix argument, this function unsets the macros. "
-  (interactive "P")
-  (or noninteractive
-      (if (not unset)
-	  (progn
-	    ;; toggle case sensitivity in search
-	    (vip-record-kbd-macro
-	     "//" 'vi-state
-	     [1 (meta x) v i p - t o g g l e - s e a r c h - s t y l e return]
-	     't)
-	    ;; toggle regexp/vanila search
-	    (vip-record-kbd-macro
-	     "///" 'vi-state
-	     [2 (meta x) v i p - t o g g l e - s e a r c h - s t y l e return]
-	     't)
-	    (if (interactive-p)
-		(message
-		 "// and /// now toggle case-sensitivity and regexp search.")))
-	(vip-unrecord-kbd-macro "//" 'vi-state)
-	(sit-for 2)
-	(vip-unrecord-kbd-macro "///" 'vi-state))))
-
-(defun vip-set-emacs-search-style-macros (unset &optional arg-majormode)
-  "Set the macros for toggling the search style in Viper's emacs-state.
-The macro that toggles case sensitivity is bound to `//', and the one that
-toggles regexp search is bound to `///'.
-With a prefix argument, this function unsets the macros. 
-If the optional prefix argument is non-nil and specifies a valid major mode,
-this sets the macros only in the macros in that major mode. Otherwise,
-the macros are set in the current major mode.
-\(When unsetting the macros, the second argument has no effect.\)"
-  (interactive "P")
-  (or noninteractive
-      (if (not unset)
-	  (progn
-	    ;; toggle case sensitivity in search
-	    (vip-record-kbd-macro
-	     "//" 'emacs-state
-	     [1 (meta x) v i p - t o g g l e - s e a r c h - s t y l e return] 
-	     (or arg-majormode major-mode))
-	    ;; toggle regexp/vanila search
-	    (vip-record-kbd-macro
-	     "///" 'emacs-state
-	     [2 (meta x) v i p - t o g g l e - s e a r c h - s t y l e return]
-	     (or arg-majormode major-mode))
-	    (if (interactive-p)
-		(message
-		 "// and /// now toggle case-sensitivity and regexp search.")))
-	(vip-unrecord-kbd-macro "//" 'emacs-state)
-	(sit-for 2)
-	(vip-unrecord-kbd-macro "///" 'emacs-state))))
-
-
-(defun vip-search-forward (arg)
-  "Search a string forward. 
-ARG is used to find the ARG's occurrence of the string.
-Null string will repeat previous search."
-  (interactive "P")
-  (let ((val (vip-P-val arg))
-	(com (vip-getcom arg))
-	(old-str vip-s-string))
-    (setq vip-s-forward t)
-    (vip-if-string "/")
-    ;; this is not used at present, but may be used later
-    (if (or (not (equal old-str vip-s-string))
-	    (not (markerp vip-local-search-start-marker))
-	    (not (marker-buffer vip-local-search-start-marker)))
-	(setq vip-local-search-start-marker (point-marker)))
-    (vip-search vip-s-string t val)
-    (if com
-	(progn
-	  (vip-move-marker-locally 'vip-com-point (mark t))
-	  (vip-execute-com 'vip-search-next val com)))))
-
-(defun vip-search-backward (arg)
-  "Search a string backward. 
-ARG is used to find the ARG's occurrence of the string.
-Null string will repeat previous search."
-  (interactive "P")
-  (let ((val (vip-P-val arg))
-	(com (vip-getcom arg))
-	(old-str vip-s-string))
-    (setq vip-s-forward nil)
-    (vip-if-string "?")
-    ;; this is not used at present, but may be used later
-    (if (or (not (equal old-str vip-s-string))
-	    (not (markerp vip-local-search-start-marker))
-	    (not (marker-buffer vip-local-search-start-marker)))
-	(setq vip-local-search-start-marker (point-marker)))
-    (vip-search vip-s-string nil val)
-    (if com
-	(progn
-	  (vip-move-marker-locally 'vip-com-point (mark t))
-	  (vip-execute-com 'vip-search-next val com)))))
-	  
-
-;; Search for COUNT's occurrence of STRING.
-;; Search is forward if FORWARD is non-nil, otherwise backward.
-;; INIT-POINT is the position where search is to start.
-;; Arguments:
-;;   (STRING FORW COUNT &optional NO-OFFSET INIT-POINT LIMIT FAIL-IF-NOT-FOUND)
-(defun vip-search (string forward arg
-			  &optional no-offset init-point fail-if-not-found)
-  (if (not (equal string ""))
-    (let ((val (vip-p-val arg))
-	  (com (vip-getcom arg))
-	  (offset (not no-offset))
-	  (case-fold-search vip-case-fold-search)
-	  (start-point (or init-point (point))))
-      (vip-deactivate-mark)
-      (if forward
-	  (condition-case nil
-	      (progn
-	        (if offset (vip-forward-char-carefully))
-	        (if vip-re-search
-		    (progn
-		      (re-search-forward string nil nil val)
-		      (re-search-backward string))
-		  (search-forward string nil nil val)
-		  (search-backward string))
-		(if (not (equal start-point (point)))
-		    (push-mark start-point t))) 
-	    (search-failed
-	     (if (and (not fail-if-not-found) vip-search-wrap-around-t)
-	         (progn
-		   (message "Search wrapped around BOTTOM of buffer")
-		   (goto-char (point-min))
-		   (vip-search string forward (cons 1 com) t start-point 'fail)
-		   ;; don't wait in macros
-		   (or executing-kbd-macro (sit-for 2))
-		   ;; delete the wrap-around message
-		   (message "")
-		   )
-	       (goto-char start-point)
-	       (error "`%s': %s not found"
-		      string
-		      (if vip-re-search "Pattern" "String"))
-	       )))
-	;; backward
-        (condition-case nil
-	    (progn
-	      (if vip-re-search
-		  (re-search-backward string nil nil val)
-	        (search-backward string nil nil val))
-	      (if (not (equal start-point (point)))
-		  (push-mark start-point t))) 
-	  (search-failed
-	   (if (and (not fail-if-not-found) vip-search-wrap-around-t)
-	       (progn
-		 (message "Search wrapped around TOP of buffer")
-	         (goto-char (point-max))
-	         (vip-search string forward (cons 1 com) t start-point 'fail)
-		 ;; don't wait in macros
-		 (or executing-kbd-macro (sit-for 2))
-		 ;; delete the wrap-around message
-		 (message "")
-		 )
-	     (goto-char start-point)
-	     (error "`%s': %s not found"
-		    string
-		    (if vip-re-search "Pattern" "String"))
-	     ))))
-      ;; pull up or down if at top/bottom of window
-      (vip-adjust-window)
-      ;; highlight the result of search
-      ;; don't wait and don't highlight in macros
-      (or executing-kbd-macro
-	  vip-inside-command-argument-action
-	  (vip-flash-search-pattern))
-      )))
-
-(defun vip-search-next (arg)
-  "Repeat previous search."
-  (interactive "P")
-  (let ((val (vip-p-val arg))
-	(com (vip-getcom arg)))
-    (if (null vip-s-string) (error vip-NoPrevSearch))
-    (vip-search vip-s-string vip-s-forward arg)
-    (if com
-	(progn
-	  (vip-move-marker-locally 'vip-com-point (mark t))
-	  (vip-execute-com 'vip-search-next val com)))))
-
-(defun vip-search-Next (arg)
-  "Repeat previous search in the reverse direction."
-  (interactive "P")
-  (let ((val (vip-p-val arg))
-	(com (vip-getcom arg)))
-    (if (null vip-s-string) (error vip-NoPrevSearch))
-    (vip-search vip-s-string (not vip-s-forward) arg)
-    (if com
-	(progn
-	  (vip-move-marker-locally 'vip-com-point (mark t))
-	  (vip-execute-com 'vip-search-Next val com)))))
-
-
-;; Search contents of buffer defined by one of Viper's motion commands.
-;; Repeatable via `n' and `N'.
-(defun vip-buffer-search-enable (&optional c)
-  (cond (c (setq vip-buffer-search-char c))
-	((null vip-buffer-search-char)
-	 (setq vip-buffer-search-char ?g)))
-  (define-key vip-vi-basic-map
-    (char-to-string vip-buffer-search-char) 'vip-command-argument)
-  (aset vip-exec-array vip-buffer-search-char 'vip-exec-buffer-search)
-  (setq vip-prefix-commands (cons vip-buffer-search-char vip-prefix-commands)))
-
-;; This is a Viper wraper for isearch-forward.
-(defun vip-isearch-forward (arg)
-  "Do incremental search forward."
-  (interactive "P")
-  ;; emacs bug workaround
-  (if (listp arg) (setq arg (car arg)))
-  (vip-exec-form-in-emacs (list 'isearch-forward arg)))
-
-;; This is a Viper wraper for isearch-backward."
-(defun vip-isearch-backward (arg)
-  "Do incremental search backward."
-  (interactive "P")
-  ;; emacs bug workaround
-  (if (listp arg) (setq arg (car arg)))
-  (vip-exec-form-in-emacs (list 'isearch-backward arg)))
-
-
-;; visiting and killing files, buffers
-
-(defun vip-switch-to-buffer ()
-  "Switch to buffer in the current window."
-  (interactive)
-  (let (buffer)
-    (setq buffer
-	  (read-buffer
-	   (format "Switch to buffer in this window \(%s\): "
-		   (buffer-name (other-buffer (current-buffer))))))
-    (switch-to-buffer buffer)
-    ))
-
-(defun vip-switch-to-buffer-other-window ()
-  "Switch to buffer in another window."
-  (interactive)
-  (let (buffer)
-    (setq buffer
-	  (read-buffer
-	   (format "Switch to buffer in another window \(%s\): "
-		   (buffer-name (other-buffer (current-buffer))))))
-    (switch-to-buffer-other-window buffer)
-    ))
-
-(defun vip-kill-buffer ()
-  "Kill a buffer."
-  (interactive)
-  (let (buffer buffer-name)
-    (setq buffer-name
-	  (read-buffer
-	   (format "Kill buffer \(%s\): "
-		   (buffer-name (current-buffer)))))
-    (setq buffer
-	  (if (null buffer-name)
-	      (current-buffer)
-	    (get-buffer buffer-name)))
-    (if (null buffer) (error "`%s': No such buffer" buffer-name))
-    (if (or (not (buffer-modified-p buffer))
-	    (y-or-n-p 
-	     (format
-	      "Buffer `%s' is modified, are you sure you want to kill it? "
-	      buffer-name)))
-	(kill-buffer buffer)
-      (error "Buffer not killed"))))
-
-
-(defvar vip-smart-suffix-list
-  '("" "tex" "c" "cc" "C" "el" "java" "html" "htm" "pl" "P" "p")
-  "*List of suffixes that Viper automatically tries to append to filenames ending with a `.'.
-This is useful when you the current directory contains files with the same
-prefix and many different suffixes. Usually, only one of the suffixes
-represents an editable file. However, file completion will stop at the `.'
-The smart suffix feature lets you hit RET in such a case, and Viper will
-select the appropriate suffix.
-
-Suffixes are tried in the order given and the first suffix for which a
-corresponding file exists is selected. If no file exists for any of the
-suffixes, the user is asked to confirm.
-
-To turn this feature off, set this variable to nil.")
-    
-;; Try to add suffix to files ending with a `.'
-;; Useful when the user hits RET on a non-completed file name.
-(defun vip-file-add-suffix ()
-  (let ((count 0)
-	(len (length vip-smart-suffix-list))
-	(file (buffer-string))
-	found key cmd suff)
-    (goto-char (point-max))
-    (if (and vip-smart-suffix-list (string-match "\\.$" file))
-	(progn
-	  (while (and (not found) (< count len))
-	    (setq suff (nth count vip-smart-suffix-list)
-		  count (1+ count))
-	    (if (file-exists-p (format "%s%s" file suff))
-		(progn
-		  (setq found t)
-		  (insert suff))))
-      
-	  (if found
-	      ()
-	    (vip-tmp-insert-at-eob " [Please complete file name]")
-	    (unwind-protect 
-		(while (not (memq cmd '(exit-minibuffer vip-exit-minibuffer)))
-		  (setq cmd
-			(key-binding (setq key (read-key-sequence nil))))
-		  (cond ((eq cmd 'self-insert-command)
-			 (if vip-xemacs-p
-			     (insert (events-to-keys key))
-			   (insert key)))
-			((memq cmd '(exit-minibuffer vip-exit-minibuffer))
-			 nil)
-			(t (command-execute cmd)))
-		  )))
-	      ))
-    ))
-
-
-;; Advice for use in find-file and read-file-name commands.
-(defadvice exit-minibuffer (before vip-exit-minibuffer-advice activate)
-  "Run `vip-minibuffer-exit-hook' just before exiting the minibuffer."
-  (run-hooks 'vip-minibuffer-exit-hook))
-
-(defadvice find-file (before vip-add-suffix-advice activate)
-  "Use `read-file-name' for reading arguments."
-  (interactive (cons (read-file-name "Find file: " nil default-directory)
-		     ;; if Mule and prefix argument, ask for coding system
-		     (if (or (boundp 'MULE)    ; mule integrated Emacs 19
-			     (featurep 'mule)) ; mule integrated XEmacs 20
-			 (list
-			  (and current-prefix-arg
-			       (read-coding-system "Coding-system: "))))
-		     )))
-    
-(defadvice find-file-other-window (before vip-add-suffix-advice activate)
-  "Use `read-file-name' for reading arguments."
-  (interactive (cons (read-file-name "Find file in other window: "
-				     nil default-directory)
-		     ;; if Mule and prefix argument, ask for coding system
-		     (if (or (boundp 'MULE)    ; mule integrated Emacs 19
-			     (featurep 'mule)) ; mule integrated XEmacs 20
-			 (list
-			  (and current-prefix-arg
-			       (read-coding-system "Coding-system: "))))
-		     )))
-    
-(defadvice find-file-other-frame (before vip-add-suffix-advice activate)
-  "Use `read-file-name' for reading arguments."
-  (interactive (cons (read-file-name "Find file in other frame: "
-				     nil default-directory)
-		     ;; if Mule and prefix argument, ask for coding system
-		     (if (or (boundp 'MULE)    ; mule integrated Emacs 19
-			     (featurep 'mule)) ; mule integrated XEmacs 20
-			 (list
-			  (and current-prefix-arg
-			       (read-coding-system "Coding-system: "))))
-		     )))
-
-(defadvice read-file-name (around vip-suffix-advice activate)
-  "Tell `exit-minibuffer' to run `vip-file-add-suffix' as a hook."
-  (let ((vip-minibuffer-exit-hook 'vip-file-add-suffix))
-    ad-do-it))
-
-     
-
-;; yank and pop
-
-(defsubst vip-yank (text)
-  "Yank TEXT silently. This works correctly with Emacs's yank-pop command."
-    (insert text)
-    (setq this-command 'yank))
-
-(defun vip-put-back (arg)
-  "Put back after point/below line."
-  (interactive "P")
-  (let ((val (vip-p-val arg))
-	(text (if vip-use-register
-		  (cond ((vip-valid-register vip-use-register '(digit))
-			 (current-kill (- vip-use-register ?1) 'do-not-rotate))
-			((vip-valid-register vip-use-register)
-			 (get-register (downcase vip-use-register)))
-			(t (error vip-InvalidRegister vip-use-register)))
-		(current-kill 0))))
-    (if (null text)
-	(if vip-use-register
-	    (let ((reg vip-use-register))
-	      (setq vip-use-register nil)
-	      (error vip-EmptyRegister reg))
-	  (error "")))
-    (setq vip-use-register nil)
-    (if (vip-end-with-a-newline-p text)
-	(progn
-	  (end-of-line)
-	  (if (eobp)
-	      (insert "\n")
-	    (forward-line 1))
-	  (beginning-of-line))
-      (if (not (eolp)) (vip-forward-char-carefully)))
-    (set-marker (vip-mark-marker) (point) (current-buffer))
-    (vip-set-destructive-command
-     (list 'vip-put-back val nil vip-use-register nil nil))
-    (vip-loop val (vip-yank text)))
-  ;; Vi puts cursor on the last char when the yanked text doesn't contain a
-  ;; newline; it leaves the cursor at the beginning when the text contains 
-  ;; a newline
-  (if (vip-same-line (point) (mark))
-      (or (= (point) (mark)) (vip-backward-char-carefully))
-    (exchange-point-and-mark)
-    (if (bolp)
-	(back-to-indentation)))
-  (vip-deactivate-mark))
-
-(defun vip-Put-back (arg)
-  "Put back at point/above line."
-  (interactive "P")
-  (let ((val (vip-p-val arg))
-	(text (if vip-use-register
-		  (cond ((vip-valid-register vip-use-register '(digit))
-			 (current-kill (- vip-use-register ?1) 'do-not-rotate))
-			((vip-valid-register vip-use-register)
-			 (get-register (downcase vip-use-register)))
-			(t (error vip-InvalidRegister vip-use-register)))
-		(current-kill 0))))
-    (if (null text)
-	(if vip-use-register
-	    (let ((reg vip-use-register))
-	      (setq vip-use-register nil)
-	      (error vip-EmptyRegister reg))
-	  (error "")))
-    (setq vip-use-register nil)
-    (if (vip-end-with-a-newline-p text) (beginning-of-line))
-    (vip-set-destructive-command
-     (list 'vip-Put-back val nil vip-use-register nil nil))
-    (set-marker (vip-mark-marker) (point) (current-buffer))
-    (vip-loop val (vip-yank text)))
-  ;; Vi puts cursor on the last char when the yanked text doesn't contain a
-  ;; newline; it leaves the cursor at the beginning when the text contains 
-  ;; a newline
-  (if (vip-same-line (point) (mark))
-      (or (= (point) (mark)) (vip-backward-char-carefully))
-    (exchange-point-and-mark)
-    (if (bolp)
-	(back-to-indentation)))
-  (vip-deactivate-mark))
-    
-
-;; Copy region to kill-ring.
-;; If BEG and END do not belong to the same buffer, copy empty region.
-(defun vip-copy-region-as-kill (beg end)
-  (condition-case nil
-      (copy-region-as-kill beg end)
-    (error (copy-region-as-kill beg beg))))
-    
-
-(defun vip-delete-char (arg)
-  "Delete character."
-  (interactive "P")
-  (let ((val (vip-p-val arg)))
-    (vip-set-destructive-command (list 'vip-delete-char val nil nil nil nil))
-    (if (> val 1)
-	(save-excursion
-	  (let ((here (point)))
-	    (end-of-line)
-	    (if (> val (- (point) here))
-		(setq val (- (point) here))))))
-    (if (and (eq val 0) (not vip-ex-style-motion)) (setq val 1))
-    (if (and vip-ex-style-motion (eolp))
-	(if (bolp) (error "") (setq val 0))) ; not bol---simply back 1 ch
-    (if vip-use-register
-	(progn
-	  (cond ((vip-valid-register vip-use-register '((Letter)))
-		 (vip-append-to-register
-		  (downcase vip-use-register) (point) (- (point) val)))
-		((vip-valid-register vip-use-register)
-		 (copy-to-register
-		  vip-use-register (point) (- (point) val) nil))
-		(t (error vip-InvalidRegister vip-use-register)))
-	  (setq vip-use-register nil)))
-    (if vip-ex-style-motion
-	(progn
-	  (delete-char val t)
-	  (if (and (eolp) (not (bolp))) (backward-char 1)))
-      (if (eolp)
-          (delete-backward-char val t)
-        (delete-char val t)))))
-
-(defun vip-delete-backward-char (arg)
-  "Delete previous character. On reaching beginning of line, stop and beep."
-  (interactive "P")
-  (let ((val (vip-p-val arg)))
-    (vip-set-destructive-command
-     (list 'vip-delete-backward-char val nil nil nil nil))
-    (if (> val 1)
-	(save-excursion
-	  (let ((here (point)))
-	    (beginning-of-line)
-	    (if (> val (- here (point)))
-		(setq val (- here (point)))))))
-    (if vip-use-register
-	(progn
-	  (cond ((vip-valid-register vip-use-register '(Letter))
-		 (vip-append-to-register
-		  (downcase vip-use-register) (point) (+ (point) val)))
-		((vip-valid-register vip-use-register)
-		 (copy-to-register
-		  vip-use-register (point) (+ (point) val) nil))
-		(t (error vip-InvalidRegister vip-use-register)))
-	  (setq vip-use-register nil)))
-    (if (bolp) (ding)
-      (delete-backward-char val t))))
-      
-(defun vip-del-backward-char-in-insert ()
-  "Delete 1 char backwards while in insert mode."
-  (interactive)      
-  (if (and vip-ex-style-editing-in-insert (bolp))
-      (beep 1)
-    (delete-backward-char 1 t)))
-      
-(defun vip-del-backward-char-in-replace ()
-  "Delete one character in replace mode.
-If `vip-delete-backwards-in-replace' is t, then DEL key actually deletes
-charecters. If it is nil, then the cursor just moves backwards, similarly
-to Vi. The variable `vip-ex-style-editing-in-insert', if t, doesn't let the
-cursor move past the beginning of line."
-  (interactive)
-  (cond (vip-delete-backwards-in-replace
-	 (cond ((not (bolp))
-		(delete-backward-char 1 t))
-	       (vip-ex-style-editing-in-insert
-		(beep 1))
-	       ((bobp)
-		(beep 1))
-	       (t
-		(delete-backward-char 1 t))))
-	(vip-ex-style-editing-in-insert
-	 (if (bolp)
-	     (beep 1)
-	   (backward-char 1)))
-	(t 
-	 (backward-char 1))))
-
-
-
-;; join lines.
-
-(defun vip-join-lines (arg)
-  "Join this line to next, if ARG is nil.  Otherwise, join ARG lines."
-  (interactive "*P")
-  (let ((val (vip-P-val arg)))
-    (vip-set-destructive-command (list 'vip-join-lines val nil nil nil nil))
-    (vip-loop (if (null val) 1 (1- val))
-	      (progn
-		(end-of-line)
-		(if (not (eobp))
-		    (progn
-		      (forward-line 1)
-		      (delete-region (point) (1- (point)))
-		      (fixup-whitespace)))))))
-
-
-;; Replace state
-
-(defun vip-change (beg end)
-  (if (markerp beg) (setq beg (marker-position beg)))
-  (if (markerp end) (setq end (marker-position end)))
-  ;; beg is sometimes (mark t), which may be nil
-  (or beg (setq beg end))
-  
-  (vip-set-complex-command-for-undo)
-  (if vip-use-register
-      (progn
-	(copy-to-register vip-use-register beg end nil)
-	(setq vip-use-register nil)))
-  (vip-set-replace-overlay beg end)
-  (setq last-command nil) ; separate repl text from prev kills
-  
-  (if (= (vip-replace-start) (point-max))
-      (error "End of buffer"))
-      
-  (setq vip-last-replace-region
-	(buffer-substring (vip-replace-start)
-			  (vip-replace-end)))
-  
-  ;; protect against error while inserting "@" and other disasters
-  ;; (e.g., read-only buff)
-  (condition-case conds
-      (if (or vip-allow-multiline-replace-regions
-	      (vip-same-line (vip-replace-start)
-			     (vip-replace-end)))
-	  (progn
-	    ;; tabs cause problems in replace, so untabify
-	    (goto-char (vip-replace-end))
-	    (insert-before-markers "@") ; put placeholder after the TAB
-	    (untabify (vip-replace-start) (point))
-	    ;; del @, don't put on kill ring 
-	    (delete-backward-char 1)
-	    
-	    (vip-set-replace-overlay-glyphs
-	     vip-replace-region-start-delimiter
-	     vip-replace-region-end-delimiter)
-	    ;; this move takes care of the last posn in the overlay, which
-	    ;; has to be shifted because of insert. We can't simply insert
-	    ;; "$" before-markers because then overlay-start will shift the
-	    ;; beginning of the overlay in case we are replacing a single
-	    ;; character. This fixes the bug with `s' and `cl' commands.
-	    (vip-move-replace-overlay (vip-replace-start) (point))
-	    (goto-char (vip-replace-start))
-	    (vip-change-state-to-replace t))
-	(kill-region (vip-replace-start)
-		     (vip-replace-end))
-	(vip-hide-replace-overlay)
-	(vip-change-state-to-insert))
-    (error ;; make sure that the overlay doesn't stay.
-           ;; go back to the original point
-     (goto-char (vip-replace-start))
-     (vip-hide-replace-overlay)
-     (vip-message-conditions conds))))
-
-
-(defun vip-change-subr (beg end)
-  ;; beg is sometimes (mark t), which may be nil
-  (or beg (setq beg end))
-  
-  (if vip-use-register
-      (progn
-	(copy-to-register vip-use-register beg end nil)
-	(setq vip-use-register nil)))
-  (kill-region beg end)
-  (setq this-command 'vip-change)
-  (vip-yank-last-insertion))
-
-(defun vip-toggle-case (arg)
-  "Toggle character case."
-  (interactive "P")
-  (let ((val (vip-p-val arg)) (c))
-    (vip-set-destructive-command (list 'vip-toggle-case val nil nil nil nil))
-    (while (> val 0)
-      (setq c (following-char))
-      (delete-char 1 nil)
-      (if (eq c (upcase c))
-	  (insert-char (downcase c) 1)
-	(insert-char (upcase c) 1))
-      (if (eolp) (backward-char 1))
-      (setq val (1- val)))))
-
-
-;; query replace
-
-(defun vip-query-replace ()
-  "Query replace. 
-If a null string is suplied as the string to be replaced,
-the query replace mode will toggle between string replace
-and regexp replace."
-  (interactive)
-  (let (str)
-    (setq str (vip-read-string-with-history
-	       (if vip-re-query-replace "Query replace regexp: "
-		 "Query replace: ")
-	       nil  ; no initial
-	       'vip-replace1-history
-	       (car vip-replace1-history) ; default
-	       ))
-    (if (string= str "")
-	(progn
-	  (setq vip-re-query-replace (not vip-re-query-replace))
-	  (message "Query replace mode changed to %s"
-		   (if vip-re-query-replace "regexp replace"
-		     "string replace")))
-      (if vip-re-query-replace
-	  (query-replace-regexp
-	   str
-	   (vip-read-string-with-history
-	    (format "Query replace regexp `%s' with: " str)
-	    nil  ; no initial
-	    'vip-replace1-history
-	    (car vip-replace1-history) ; default
-	    ))
-	(query-replace
-	 str
-	 (vip-read-string-with-history
-	  (format "Query replace `%s' with: " str)
-	  nil  ; no initial
-	  'vip-replace1-history
-	  (car vip-replace1-history) ; default
-	  ))))))
-
-
-;; marking
-
-(defun vip-mark-beginning-of-buffer ()
-  "Mark beginning of buffer."
-  (interactive)
-  (push-mark (point))
-  (goto-char (point-min))
-  (exchange-point-and-mark)
-  (message "Mark set at the beginning of buffer"))
-
-(defun vip-mark-end-of-buffer ()
-  "Mark end of buffer."
-  (interactive)
-  (push-mark (point))
-  (goto-char (point-max))
-  (exchange-point-and-mark)
-  (message "Mark set at the end of buffer"))
-
-(defun vip-mark-point ()
-  "Set mark at point of buffer."
-  (interactive)
-  (let ((char (read-char)))
-    (cond ((and (<= ?a char) (<= char ?z))
-	   (point-to-register (1+ (- char ?a))))
-	  ((= char ?<) (vip-mark-beginning-of-buffer))
-	  ((= char ?>) (vip-mark-end-of-buffer))
-	  ((= char ?.) (vip-set-mark-if-necessary))
-	  ((= char ?,) (vip-cycle-through-mark-ring))
-	  ((= char ?D) (mark-defun))
-	  (t (error ""))
-	  )))
-	
-;; Algorithm: If first invocation of this command save mark on ring, goto
-;; mark, M0, and pop the most recent elt from the mark ring into mark,
-;; making it into the new mark, M1.
-;; Push this mark back and set mark to the original point position, p1.
-;; So, if you hit '' or `` then you can return to p1.
-;;
-;; If repeated command, pop top elt from the ring into mark and
-;; jump there. This forgets the position, p1, and puts M1 back into mark.
-;; Then we save the current pos, which is M0, jump to M1 and pop M2 from
-;; the ring into mark.  Push M2 back on the ring and set mark to M0.
-;; etc.
-(defun vip-cycle-through-mark-ring ()
-  "Visit previous locations on the mark ring.
-One can use `` and '' to temporarily jump 1 step back."
-  (let* ((sv-pt (point)))
-       ;; if repeated `m,' command, pop the previously saved mark.
-       ;; Prev saved mark is actually prev saved point. It is used if the
-       ;; user types `` or '' and is discarded 
-       ;; from the mark ring by the next `m,' command. 
-       ;; In any case, go to the previous or previously saved mark.
-       ;; Then push the current mark (popped off the ring) and set current
-       ;; point to be the mark. Current pt as mark is discarded by the next
-       ;; m, command.
-       (if (eq last-command 'vip-cycle-through-mark-ring)
-	   ()
-	 ;; save current mark if the first iteration
-	 (setq mark-ring (delete (vip-mark-marker) mark-ring))
-	 (if (mark t)
-	     (push-mark (mark t) t)) )
-       (pop-mark)
-       (set-mark-command 1)
-       ;; don't duplicate mark on the ring
-       (setq mark-ring (delete (vip-mark-marker) mark-ring))
-       (push-mark sv-pt t)
-       (vip-deactivate-mark)
-       (setq this-command 'vip-cycle-through-mark-ring)
-       ))
-       
-
-(defun vip-goto-mark (arg)
-  "Go to mark."
-  (interactive "P")
-  (let ((char (read-char))
-	(com (vip-getcom arg)))
-    (vip-goto-mark-subr char com nil)))
-
-(defun vip-goto-mark-and-skip-white (arg)
-  "Go to mark and skip to first non-white character on line."
-  (interactive "P")
-  (let ((char (read-char))
-	(com (vip-getCom arg)))
-    (vip-goto-mark-subr char com t)))
-
-(defun vip-goto-mark-subr (char com skip-white)
-  (if (eobp) 
-      (if (bobp)
-	  (error "Empty buffer")
-	(backward-char 1)))
-  (cond ((vip-valid-register char '(letter))
-	 (let* ((buff (current-buffer))
-	        (reg (1+ (- char ?a)))
-	        (text-marker (get-register reg)))
-	   (if com (vip-move-marker-locally 'vip-com-point (point)))
-	   (if (not (vip-valid-marker text-marker))
-	       (error vip-EmptyTextmarker char))
-	   (if (and (vip-same-line (point) vip-last-jump)
-		    (= (point) vip-last-jump-ignore))
-	       (push-mark vip-last-jump t) 
-	     (push-mark nil t)) ; no msg
-	   (vip-register-to-point reg)
-	   (setq vip-last-jump (point-marker))
-	   (cond (skip-white 
-		  (back-to-indentation)
-		  (setq vip-last-jump-ignore (point))))
-	   (if com
-	       (if (equal buff (current-buffer))
-		   (vip-execute-com (if skip-white
-					'vip-goto-mark-and-skip-white
-				      'vip-goto-mark)
-				    nil com)
-		 (switch-to-buffer buff)
-		 (goto-char vip-com-point)
-		 (vip-change-state-to-vi)
-		 (error "")))))
-	((and (not skip-white) (= char ?`))
-	 (if com (vip-move-marker-locally 'vip-com-point (point)))
-	 (if (and (vip-same-line (point) vip-last-jump)
-		  (= (point) vip-last-jump-ignore))
-	     (goto-char vip-last-jump))
-	 (if (null (mark t)) (error "Mark is not set in this buffer"))
-	 (if (= (point) (mark t)) (pop-mark))
-	 (exchange-point-and-mark)
-	 (setq vip-last-jump (point-marker)
-	       vip-last-jump-ignore 0)
-	 (if com (vip-execute-com 'vip-goto-mark nil com)))
-	((and skip-white (= char ?'))
-	 (if com (vip-move-marker-locally 'vip-com-point (point)))
-	 (if (and (vip-same-line (point) vip-last-jump)
-		  (= (point) vip-last-jump-ignore))
-	     (goto-char vip-last-jump))
-	 (if (= (point) (mark t)) (pop-mark))
-	 (exchange-point-and-mark)
-	 (setq vip-last-jump (point))
-	 (back-to-indentation)
-	 (setq vip-last-jump-ignore (point))
-	 (if com (vip-execute-com 'vip-goto-mark-and-skip-white nil com)))
-	(t (error vip-InvalidTextmarker char))))
-	
-(defun vip-insert-tab ()
-  (interactive)
-  (insert-tab))
-
-(defun vip-exchange-point-and-mark ()
-  (interactive)
-  (exchange-point-and-mark)
-  (back-to-indentation))
-
-;; Input Mode Indentation
-
-;; Returns t, if the string before point matches the regexp STR.
-(defsubst vip-looking-back (str)
-  (and (save-excursion (re-search-backward str nil t))
-       (= (point) (match-end 0))))
-
-
-(defun vip-forward-indent ()
-  "Indent forward -- `C-t' in Vi."
-  (interactive)
-  (setq vip-cted t)
-  (indent-to (+ (current-column) vip-shift-width)))
-
-(defun vip-backward-indent ()
-  "Backtab, C-d in VI"
-  (interactive)
-  (if vip-cted
-      (let ((p (point)) (c (current-column)) bol (indent t))
-	(if (vip-looking-back "[0^]")
-	    (progn
-	      (if (eq ?^ (preceding-char))
-		  (setq vip-preserve-indent t))
-	      (delete-backward-char 1)
-	      (setq p (point))
-	      (setq indent nil)))
-	(save-excursion
-	  (beginning-of-line)
-	  (setq bol (point)))
-	(if (re-search-backward "[^ \t]" bol 1) (forward-char))
-	(delete-region (point) p)
-	(if indent
-	    (indent-to (- c vip-shift-width)))
-	(if (or (bolp) (vip-looking-back "[^ \t]"))
-	    (setq vip-cted nil)))))
-
-(defun vip-autoindent ()
-  "Auto Indentation, Vi-style."
-  (interactive)
-  (let ((col (current-indentation)))
-    (if abbrev-mode (expand-abbrev))
-    (if vip-preserve-indent
-	(setq vip-preserve-indent nil)
-      (setq vip-current-indent col))
-    ;; don't leave whitespace lines around
-    (if (memq last-command
-	      '(vip-autoindent
-		vip-open-line vip-Open-line
-		vip-replace-state-exit-cmd))
-	(indent-to-left-margin))
-    ;; use \n instead of newline, or else <Return> will move the insert point
-    ;;(newline 1)
-    (insert "\n")
-    (if vip-auto-indent
-	(progn
-	  (setq vip-cted t)
-	  (if vip-electric-mode
-	      (indent-according-to-mode)
-	    (indent-to vip-current-indent))
-	  ))
-    ))
-
-	   
-;; Viewing registers
-
-(defun vip-ket-function (arg)
-  "Function called by \], the ket. View registers and call \]\]."
-  (interactive "P")
-  (let ((reg (read-char)))
-    (cond ((vip-valid-register reg '(letter Letter))
-	   (view-register (downcase reg)))
-	  ((vip-valid-register reg '(digit))
-	   (let ((text (current-kill (- reg ?1) 'do-not-rotate)))
-	     (save-excursion 
-	       (set-buffer (get-buffer-create "*Output*"))
-	       (delete-region (point-min) (point-max))
-	       (insert (format "Register %c contains the string:\n" reg))
-	       (insert text)
-	       (goto-char (point-min)))
-	     (display-buffer "*Output*")))
-	  ((= ?\] reg)
-	   (vip-next-heading arg))
-	  (t (error
-	      vip-InvalidRegister reg)))))
-
-(defun vip-brac-function (arg)
-  "Function called by \[, the brac. View textmarkers and call \[\["
-  (interactive "P")
-  (let ((reg (read-char)))
-    (cond ((= ?\[ reg)
-	   (vip-prev-heading arg))
-	  ((= ?\] reg)
-	   (vip-heading-end arg))
-	  ((vip-valid-register reg '(letter))
-	   (let* ((val (get-register (1+ (- reg ?a))))
-		  (buf (if (not val) 
-			   (error vip-EmptyTextmarker reg)
-			 (marker-buffer val)))
-		  (pos (marker-position val))
-		  line-no text (s pos) (e pos))
-	     (save-excursion 
-	       (set-buffer (get-buffer-create "*Output*"))
-	       (delete-region (point-min) (point-max))
-	       (if (and buf pos)
-		   (progn
-		     (save-excursion 
-		       (set-buffer buf)
-		       (setq line-no (1+ (count-lines (point-min) val)))
-		       (goto-char pos)
-		       (beginning-of-line)
-		       (if (re-search-backward "[^ \t]" nil t)
-			   (progn
-			     (beginning-of-line)
-			     (setq s (point))))
-		       (goto-char pos)
-		       (forward-line 1)
-		       (if (re-search-forward "[^ \t]" nil t)
-			   (progn
-			     (end-of-line)
-			     (setq e (point))))
-		       (setq text (buffer-substring s e))
-		       (setq text (format "%s<%c>%s" 
-					  (substring text 0 (- pos s)) 
-					  reg (substring text (- pos s)))))
-		     (insert
-		      (format
-		       "Textmarker `%c' is in buffer `%s' at line %d.\n"
-				     reg (buffer-name buf) line-no))
-		     (insert (format "Here is some text around %c:\n\n %s" 
-				     reg text)))
-		 (insert (format vip-EmptyTextmarker reg)))
-	       (goto-char (point-min)))
-	     (display-buffer "*Output*")))
-	  (t (error vip-InvalidTextmarker reg)))))
-  
-
-
-;; commands in insertion mode
-
-(defun vip-delete-backward-word (arg)
-  "Delete previous word."
-  (interactive "p")
-  (save-excursion
-    (push-mark nil t)
-    (backward-word arg)
-    (delete-region (point) (mark t))
-    (pop-mark)))
-
-
-(defun vip-set-expert-level (&optional dont-change-unless)
-  "Sets the expert level for a Viper user.
-Can be called interactively to change (temporarily or permanently) the
-current expert level.
-
-The optional argument DONT-CHANGE-UNLESS if not nil, says that
-the level should not be changed, unless its current value is
-meaningless (i.e., not one of 1,2,3,4,5).
-
-User level determines the setting of Viper variables that are most
-sensitive for VI-style look-and-feel."
-  
-  (interactive)
-  
-  (if (not (natnump vip-expert-level)) (setq vip-expert-level 0))
-  
-  (save-window-excursion
-    (delete-other-windows)
-    ;; if 0 < vip-expert-level < vip-max-expert-level
-    ;;    & dont-change-unless = t -- use it; else ask
-    (vip-ask-level dont-change-unless))
-  
-  (setq vip-always          	    	t
-	vip-ex-style-motion 	    	t
-	vip-ex-style-editing-in-insert  t
-	vip-want-ctl-h-help nil)
-
-  (cond ((eq vip-expert-level 1) ; novice or beginner
-	 (global-set-key   ; in emacs-state 
-	  vip-toggle-key
-	  (if (vip-window-display-p) 'vip-iconify 'suspend-emacs))
-	 (setq vip-no-multiple-ESC	     t
-	       vip-re-search	    	     t
-	       vip-vi-style-in-minibuffer    t
-	       vip-search-wrap-around-t	     t
-	       vip-want-emacs-keys-in-vi     nil
-	       vip-want-emacs-keys-in-insert nil))
-	
-	((and (> vip-expert-level 1) (< vip-expert-level 5))
-	 ;; intermediate to guru
-	 (setq vip-no-multiple-ESC     (if (vip-window-display-p) t 'twice)
-	       vip-want-emacs-keys-in-vi     t
-	       vip-want-emacs-keys-in-insert (> vip-expert-level 2))
-
-	 (if (eq vip-expert-level 4) ; respect user's ex-style motions
-	     	    	    	     ; and vip-no-multiple-ESC
-	     (progn
-	       (setq-default vip-ex-style-editing-in-insert
-			     (cdr (assoc 'vip-ex-style-editing-in-insert
-					 vip-saved-user-settings))
-			     vip-ex-style-motion
-			     (cdr (assoc 'vip-ex-style-motion
-					 vip-saved-user-settings)))
-	       (setq vip-ex-style-motion 
-		     (cdr (assoc 'vip-ex-style-motion vip-saved-user-settings))
-		     vip-ex-style-editing-in-insert
-		     (cdr (assoc 'vip-ex-style-editing-in-insert
-				 vip-saved-user-settings))
-		     vip-re-search
-		     (cdr (assoc 'vip-re-search vip-saved-user-settings))
-		     vip-no-multiple-ESC 
-		     (cdr (assoc 'vip-no-multiple-ESC
-				 vip-saved-user-settings))))))
-	       
-	;; A wizard!!
-	;; Ideally, if 5 is selected, a buffer should pop up to let the
-	;; user toggle the values of variables.
-	(t (setq-default vip-ex-style-editing-in-insert
-			 (cdr (assoc 'vip-ex-style-editing-in-insert
-				     vip-saved-user-settings))
-			 vip-ex-style-motion
-			 (cdr (assoc 'vip-ex-style-motion
-				     vip-saved-user-settings)))
-	   (setq  vip-want-ctl-h-help 
-		  (cdr (assoc 'vip-want-ctl-h-help vip-saved-user-settings))
-		  vip-always
-		  (cdr (assoc 'vip-always vip-saved-user-settings))
-		  vip-no-multiple-ESC 
-		  (cdr (assoc 'vip-no-multiple-ESC vip-saved-user-settings))
-		  vip-ex-style-motion 
-		  (cdr (assoc 'vip-ex-style-motion vip-saved-user-settings))
-		  vip-ex-style-editing-in-insert
-		  (cdr (assoc 'vip-ex-style-editing-in-insert
-			      vip-saved-user-settings))
-		  vip-re-search
-		  (cdr (assoc 'vip-re-search vip-saved-user-settings))
-		  vip-want-emacs-keys-in-vi 
-		  (cdr (assoc 'vip-want-emacs-keys-in-vi
-			      vip-saved-user-settings))
-		  vip-want-emacs-keys-in-insert
-		  (cdr (assoc 'vip-want-emacs-keys-in-insert
-			      vip-saved-user-settings)))))
-  (vip-set-mode-vars-for vip-current-state)
-  (if (or vip-always
-	  (and (> vip-expert-level 0) (> 5 vip-expert-level)))
-      (vip-set-hooks)))
-
-;; Ask user expert level.
-(defun vip-ask-level (dont-change-unless)
-  (let ((ask-buffer " *vip-ask-level*")
-	level-changed repeated)
-    (save-window-excursion
-      (switch-to-buffer ask-buffer)
-	      
-      (or (eq this-command 'vip-set-expert-level)
-	  (and
-	   (<= vip-expert-level vip-max-expert-level)
-	   (>= vip-expert-level 1))
-	  (progn
-	    (insert "
-	      
-	      *** Important Notice for VIP users***
-	      
-			  This is VIPER
-	      
-@joke
-Viper Is a Package for Emacs Rebels,
-a VI Plan for Emacs Rescue,
-and a venomous VI PERil.
-@end joke
-
-Technically speaking, Viper is a new Vi emulator that replaces
-the old VIP package.
-
-Viper emulates Vi much better than VIP.  It also significantly
-extends and improves upon Vi in many useful ways.
-
-Although many VIP settings in your ~/.vip are compatible with Viper,
-you may have to change some of them. Please refer to the documentation,
-which can be obtained by executing
-
-:help
-
-when Viper is in Vi state.
-
-If you will be so lucky as to find a bug, report it via the command
-
-:submitReport
-
-Type any key to continue... ")
-	    
-	    (read-char)
-	    (erase-buffer)))
-	      
-      (while (or (> vip-expert-level vip-max-expert-level)
-		 (< vip-expert-level 1)
-		 (null dont-change-unless))
-	(erase-buffer)
-	(if repeated
-	    (progn
-	      (message "Invalid user level")
-	      (beep 1))
-	  (setq repeated t))
-	(setq dont-change-unless t
-	      level-changed t)
-	(insert "
-Please specify your level of familiarity with the venomous VI PERil
-(and the VI Plan for Emacs Rescue).
-You can change it at any time by typing `M-x vip-set-expert-level RET'
-	
- 1 -- BEGINNER: Almost all Emacs features are suppressed.
-          Feels almost like straight Vi. File name completion and
-          command history in the minibuffer are thrown in as a bonus. 
-          To use Emacs productively, you must reach level 3 or higher.
- 2 -- MASTER: C-c now has its standard Emacs meaning in Vi command state,
-	  so most Emacs commands can be used when Viper is in Vi state.
-	  Good progress---you are well on the way to level 3!
- 3 -- GRAND MASTER: Like 3, but most Emacs commands are available also
-          in Viper's insert state.
- 4 -- GURU: Like 3, but user settings are respected for vip-no-multiple-ESC,
-	  vip-re-search, vip-ex-style-motion, & vip-ex-style-editing-in-insert
-	  variables. Adjust these settings to your taste.
- 5 -- WIZARD: Like 4, but user settings are also respected for vip-always,
-	  vip-want-ctl-h-help, vip-want-emacs-keys-in-vi, and 
-	  vip-want-emacs-keys-in-insert. Adjust these to your taste.
-      
-Please, specify your level now: ")
-	  
-	(setq vip-expert-level (- (vip-read-char-exclusive) ?0))
-	) ; end while
-      
-      ;; tell the user if level was changed
-      (and level-changed
-	   (progn
-	     (insert
-	      (format "\n\n\n\n\n\t\tYou have selected user level %d"
-		      vip-expert-level))
-	     (if (y-or-n-p "Do you wish to make this change permanent? ")
-		 ;; save the setting for vip-expert-level
-		 (vip-save-setting
-		  'vip-expert-level
-		  (format "Saving user level %d ..." vip-expert-level)
-		  vip-custom-file-name))
-	     ))
-      (bury-buffer) ; remove ask-buffer from screen
-      (message "")
-      )))
-
-
-(defun viper-version ()
-  (interactive)
-  (message "Viper version is %s" viper-version)) 
-  
-(defalias 'vip-version 'viper-version)
-
-(defun vip-nil ()
-  (interactive)
-  (beep 1))
-  
-    
-;; if ENFORCE-BUFFER is not nil, error if CHAR is a marker in another buffer
-(defun vip-register-to-point (char &optional enforce-buffer)
-  "Like jump-to-register, but switches to another buffer in another window."
-  (interactive "cViper register to point: ")
-  (let ((val (get-register char)))
-    (cond
-     ((and (fboundp 'frame-configuration-p)
-	   (frame-configuration-p val))
-      (set-frame-configuration val))
-     ((window-configuration-p val)
-      (set-window-configuration val))
-     ((vip-valid-marker val)
-      (if (and enforce-buffer
-	       (not (equal (current-buffer) (marker-buffer val))))
-	  (error (concat vip-EmptyTextmarker " in this buffer")
-		 (1- (+ char ?a))))
-      (pop-to-buffer  (marker-buffer val))
-      (goto-char val))
-     ((and (consp val) (eq (car val) 'file))
-      (find-file (cdr val)))
-     (t
-      (error vip-EmptyTextmarker (1- (+ char ?a)))))))
-
-
-(defun vip-save-kill-buffer ()
-  "Save then kill current buffer. "
-  (interactive)
-  (if (< vip-expert-level 2)
-      (save-buffers-kill-emacs)
-    (save-buffer)
-    (kill-buffer (current-buffer))))
-
-
-
-;;; Bug Report
-
-(defun vip-submit-report ()
-  "Submit bug report on Viper."
-  (interactive)
-  (let ((reporter-prompt-for-summary-p t)
-	(vip-device-type (vip-device-type))
-	color-display-p frame-parameters
-	minibuffer-emacs-face minibuffer-vi-face minibuffer-insert-face
-	varlist salutation window-config)
-    
-    ;; If mode info is needed, add variable to `let' and then set it below,
-    ;; like we did with color-display-p.
-    (setq color-display-p (if (vip-window-display-p) 
-			      (vip-color-display-p)
-			    'non-x)
-	  minibuffer-vi-face (if (vip-has-face-support-p)
-				 (vip-get-face vip-minibuffer-vi-face)
-			       'non-x)
-	  minibuffer-insert-face (if (vip-has-face-support-p)
-				     (vip-get-face vip-minibuffer-insert-face)
-				   'non-x)
-	  minibuffer-emacs-face (if (vip-has-face-support-p)
-				    (vip-get-face vip-minibuffer-emacs-face)
-				  'non-x)
-	  frame-parameters (if (fboundp 'frame-parameters)
-			       (frame-parameters (selected-frame))))
-    
-    (setq varlist (list 'vip-vi-minibuffer-minor-mode
-		        'vip-insert-minibuffer-minor-mode
-		        'vip-vi-intercept-minor-mode
-		        'vip-vi-local-user-minor-mode     
-		        'vip-vi-kbd-minor-mode        	
-		        'vip-vi-global-user-minor-mode
-		        'vip-vi-state-modifier-minor-mode
-		        'vip-vi-diehard-minor-mode   
-		        'vip-vi-basic-minor-mode    
-		        'vip-replace-minor-mode 	  
-		        'vip-insert-intercept-minor-mode
-		        'vip-insert-local-user-minor-mode 
-		        'vip-insert-kbd-minor-mode     	
-		        'vip-insert-global-user-minor-mode
-		        'vip-insert-state-modifier-minor-mode
-		        'vip-insert-diehard-minor-mode 	
-		        'vip-insert-basic-minor-mode   
-		        'vip-emacs-intercept-minor-mode 
-		        'vip-emacs-local-user-minor-mode 
-		        'vip-emacs-kbd-minor-mode 
-		        'vip-emacs-global-user-minor-mode
-		        'vip-emacs-state-modifier-minor-mode
-		        'vip-automatic-iso-accents
-		        'vip-want-emacs-keys-in-insert
-		        'vip-want-emacs-keys-in-vi
-		        'vip-keep-point-on-undo
-		        'vip-no-multiple-ESC
-		        'vip-ESC-key
-		        'vip-want-ctl-h-help
-		        'vip-ex-style-editing-in-insert
-		        'vip-delete-backwards-in-replace
-		        'vip-vi-style-in-minibuffer
-		        'vip-vi-state-hook
-		        'vip-insert-state-hook
-		        'vip-replace-state-hook
-		        'vip-emacs-state-hook
-		        'ex-cycle-other-window
-		        'ex-cycle-through-non-files
-		        'vip-expert-level
-		        'major-mode
-		        'vip-device-type
-			'color-display-p
-			'frame-parameters
-			'minibuffer-vi-face
-			'minibuffer-insert-face
-			'minibuffer-emacs-face
-			))
-	  (setq salutation "
-Congratulations! You may have unearthed a bug in Viper!
-Please mail a concise, accurate summary of the problem to the address above.
-
--------------------------------------------------------------------")
-	  (setq window-config (current-window-configuration))
-	  (with-output-to-temp-buffer " *vip-info*"
-	    (switch-to-buffer " *vip-info*")
-	    (delete-other-windows)
-	    (princ "
-PLEASE FOLLOW THESE PROCEDURES
-------------------------------
-
-Before reporting a bug, please verify that it is related to Viper, and is
-not cause by other packages you are using.
-
-Don't report compilation warnings, unless you are certain that there is a
-problem. These warnings are normal and unavoidable.
-
-Please note that users should not modify variables and keymaps other than
-those advertised in the manual. Such `customization' is likely to crash
-Viper, as it would any other improperly customized Emacs package.
-
-If you are reporting an error message received while executing one of the
-Viper commands, type:
-
-    M-x set-variable <Return> debug-on-error <Return> t <Return>
-	
-Then reproduce the error. The above command will cause Emacs to produce a
-back trace of the execution that leads to the error. Please include this
-trace in your bug report.
-
-If you believe that one of Viper's commands goes into an infinite loop
-\(e.g., Emacs freezes\), type:
-
-    M-x set-variable <Return> debug-on-quit <Return> t <Return>
-	
-Then reproduce the problem. Wait for a few seconds, then type C-g to abort
-the current command. Include the resulting back trace in the bug report.
-
-Mail anyway (y or n)? ")
-	    (if (y-or-n-p "Mail anyway? ")
-		()
-	      (set-window-configuration window-config)
-	      (error "Bug report aborted")))
-
-	  (require 'reporter)
-	  (set-window-configuration window-config)
-    
-	  (reporter-submit-bug-report "kifer@cs.sunysb.edu"
-				      (vip-version)
-				      varlist
-				      nil 'delete-other-windows
-				      salutation)
-	  ))
-		    
-
-    
-		
-;; Smoothes out the difference between Emacs' unread-command-events
-;; and XEmacs unread-command-event. Arg is a character, an event, a list of
-;; events or a sequence of keys.
-;;
-;; Due to the way unread-command-events in Emacs (not XEmacs), a non-event
-;; symbol in unread-command-events list may cause Emacs to turn this symbol
-;; into an event. Below, we delete nil from event lists, since nil is the most
-;; common symbol that might appear in this wrong context.
-(defun vip-set-unread-command-events (arg)
-  (if vip-emacs-p
-      (setq
-       unread-command-events
-       (let ((new-events
-	      (cond ((eventp arg) (list arg))
-		    ((listp arg) arg)
-		    ((sequencep arg)
-		     (listify-key-sequence arg))
-		    (t (error
-			"vip-set-unread-command-events: Invalid argument, %S"
-			arg)))))
-	 (if (not (eventp nil))
-	     (setq new-events (delq nil new-events)))
-	 (append new-events unread-command-events)))
-    ;; XEmacs
-    (setq
-     unread-command-events
-     (append
-      (cond ((vip-characterp arg) (list (character-to-event arg)))
-	    ((eventp arg)  (list arg))
-	    ((stringp arg) (mapcar 'character-to-event arg))
-	    ((vectorp arg) (append arg nil)) ; turn into list
-	    ((listp arg) (vip-eventify-list-xemacs arg))
-	    (t (error
-		"vip-set-unread-command-events: Invalid argument, %S" arg)))
-      unread-command-events))))
-
-;; list is assumed to be a list of events of characters
-(defun vip-eventify-list-xemacs (lis)
-  (mapcar
-   (function (lambda (elt)
-	       (cond ((vip-characterp elt) (character-to-event elt))
-		     ((eventp elt)  elt)
-		     (t (error
-			 "vip-eventify-list-xemacs: can't convert to event, %S"
-			 elt)))))
-   lis))
-  
-  
-
-;; The following is provided for compatibility with older VIP's
-
-(defalias 'vip-change-mode-to-vi 'vip-change-state-to-vi)
-(defalias 'vip-change-mode-to-insert 'vip-change-state-to-insert)
-(defalias 'vip-change-mode-to-emacs 'vip-change-state-to-emacs)
-   
-
-
-;;; Load .vip and set up hooks
-
 ;; This hook designed to enable Vi-style editing in comint-based modes."
 (defun vip-comint-mode-hook ()
   (setq require-final-newline nil
@@ -5043,14 +457,16 @@
   (add-hook 'html-mode-hook 'viper-mode)
   (defvar html-helper-mode-hook)
   (add-hook 'html-helper-mode-hook 'viper-mode)
+
   (defvar java-mode-hook)
   (add-hook 'java-mode-hook 'viper-mode)
   
   (defvar emacs-lisp-mode-hook)
   (add-hook 'emacs-lisp-mode-hook 'viper-mode)
-
   (defvar lisp-mode-hook)
   (add-hook 'lisp-mode-hook 'viper-mode)
+  (defvar lisp-interaction-mode-hook)
+  (add-hook 'lisp-interaction-mode-hook 'viper-mode)
   
   (defvar bibtex-mode-hook)
   (add-hook 'bibtex-mode-hook 'viper-mode) 	  
@@ -5063,17 +479,22 @@
       
   (defvar c++-mode-hook)
   (add-hook 'c++-mode-hook 'viper-mode)
-  
-  (defvar lisp-interaction-mode-hook)
-  (add-hook 'lisp-interaction-mode-hook 'viper-mode)
 
   (defvar fortran-mode-hook)
-  (add-hook 'fortran-mode-hook 'vip-mode)
+  (add-hook 'fortran-mode-hook 'viper-mode)
+  (defvar f90-mode-hook)
+  (add-hook 'f90-mode-hook 'viper-mode)
 
   (defvar basic-mode-hook)
-  (add-hook 'basic-mode-hook 'vip-mode)
+  (add-hook 'basic-mode-hook 'viper-mode)
   (defvar bat-mode-hook)
-  (add-hook 'bat-mode-hook 'vip-mode)
+  (add-hook 'bat-mode-hook 'viper-mode)
+  
+  (defvar asm-mode-hook)
+  (add-hook 'asm-mode-hook 'viper-mode)
+
+  (defvar prolog-mode-hook)
+  (add-hook 'prolog-mode-hook 'viper-mode)
       
   (defvar text-mode-hook)
   (add-hook 'text-mode-hook 'viper-mode)
@@ -5081,7 +502,7 @@
   (add-hook 'completion-list-mode-hook 'viper-mode)  
   (add-hook 'compilation-mode-hook     'viper-mode)  
 
-  (add-hook 'perl-mode-hook     'viper-mode)  
+  (add-hook 'perl-mode-hook    'viper-mode)  
   (add-hook 'tcl-mode-hook     'viper-mode)  
   
   (defvar emerge-startup-hook)
@@ -5108,12 +529,6 @@
     "Run `vip-change-state-to-vi' after quitting emerge."
     (vip-change-state-to-vi))
   
-  (vip-eval-after-load
-   "asm-mode"
-   '(defadvice asm-mode (after vip-asm-mode-ad activate)
-      "Run `vip-change-state-to-vi' on entry."
-      (vip-change-state-to-vi)))
-  
   ;; passwd.el sets up its own buffer, which turns up in Vi mode,
   ;; thus overriding the local map. We don't need Vi mode here.
   (vip-eval-after-load
@@ -5121,12 +536,6 @@
    '(defadvice read-passwd-1 (before vip-passwd-ad activate)
       "Switch to emacs state while reading password."
       (vip-change-state-to-emacs)))
-
-  (vip-eval-after-load
-   "prolog"
-   '(defadvice prolog-mode (after vip-prolog-ad activate)
-      "Switch to Vi state in Prolog mode."
-      (vip-change-state-to-vi)))
   
   ;; Emacs shell, ange-ftp, and comint-based modes
   (defvar comint-mode-hook)
@@ -5202,15 +611,10 @@
     (vip-change-state-to-emacs))
 
   ;; View mode
-  (if vip-emacs-p
-      (progn
-	(defvar view-mode-hook)
-	(add-hook 'view-mode-hook 'vip-change-state-to-emacs))
-    (defadvice view-minor-mode (after vip-view-ad activate)
-      "Switch to Emacs state in View mode."
-      (vip-change-state-to-emacs))
-    (defvar view-hook)
-    (add-hook 'view-hook 'vip-change-state-to-emacs))
+  (defvar view-mode-hook)
+  (defvar view-hook)
+  (add-hook 'view-hook 'vip-change-state-to-emacs)
+  (add-hook 'view-mode-hook 'vip-change-state-to-emacs)
   
   ;; For VM users.
   ;; Put summary and other VM buffers in Emacs state.
@@ -5231,31 +635,228 @@
     "Switch to emacs state when done editing message."
     (vip-change-state-to-emacs))
   ) ; vip-set-hooks
-      
-;; Set some useful macros
-;; These must be before we load .vip, so the user can unrecord them.
+
+
+;; these are primarily advices and Vi-ish variable settings
+(defun vip-non-hook-settings ()
+
+  ;; This var is not local in Emacs, so we make it local.
+  ;; It must be local because although the stack of minor modes can be the same
+  ;; for all buffers, the associated *keymaps* can be different. In Viper,
+  ;; vip-vi-local-user-map, vip-insert-local-user-map, and others can have
+  ;; different keymaps for different buffers.
+  ;; Also, the keymaps associated with vip-vi/insert-state-modifier-minor-mode
+  ;; can be different.
+  (make-variable-buffer-local 'minor-mode-map-alist)
+  
+  ;; Viper changes the default mode-line-buffer-identification
+  (setq-default mode-line-buffer-identification '(" %b"))
+  
+  ;; setup emacs-supported vi-style feel
+  (setq next-line-add-newlines nil
+	require-final-newline t)
+  
+  (make-variable-buffer-local 'require-final-newline)
+  
+  ;; don't bark when mark is inactive
+  (setq mark-even-if-inactive t)
+  
+  (setq scroll-step 1)
+  
+  ;; Variable displaying the current Viper state in the mode line.
+  (vip-deflocalvar vip-mode-string vip-emacs-state-id)
+  (or (memq 'vip-mode-string global-mode-string)
+      (setq global-mode-string
+	    (append '("" vip-mode-string) (cdr global-mode-string))))
 
-;; repeat the 2nd previous command without rotating the command history
-(vip-record-kbd-macro
- (vector vip-repeat-from-history-key '\1) 'vi-state
- [(meta x) v i p - r e p e a t - f r o m - h i s t o r y return] 't)
-;; repeat the 3d previous command without rotating the command history
-(vip-record-kbd-macro
- (vector vip-repeat-from-history-key '\2) 'vi-state
- [(meta x) v i p - r e p e a t - f r o m - h i s t o r y return] 't)
- 
-;; set the toggle case sensitivity and regexp search macros
-(vip-set-vi-search-style-macros nil)
+  (defadvice read-key-sequence (around vip-read-keyseq-ad activate)
+    "Harness to work for Viper. This advice is harmless---don't worry!"
+    (let (inhibit-quit event keyseq)
+      (setq keyseq ad-do-it)
+      (setq event (if vip-xemacs-p
+		      (elt keyseq 0) ; XEmacs returns vector of events
+		    (elt (listify-key-sequence keyseq) 0)))
+      (if (vip-ESC-event-p event)
+	  (let (unread-command-events)
+	    (vip-set-unread-command-events keyseq)
+	    (if (vip-fast-keysequence-p)
+		(let ((vip-vi-global-user-minor-mode  nil)
+		      (vip-vi-local-user-minor-mode  nil)
+		      (vip-replace-minor-mode nil) ; actually unnecessary
+		      (vip-insert-global-user-minor-mode  nil)
+		      (vip-insert-local-user-minor-mode  nil))
+		  (setq keyseq ad-do-it)) 
+	      (setq keyseq ad-do-it))))
+      keyseq))
+  
+  (defadvice describe-key (before vip-read-keyseq-ad protect activate)
+    "Force to read key via `read-key-sequence'."
+    (interactive (list (vip-events-to-keys
+			(read-key-sequence "Describe key: ")))))
+  
+  (defadvice describe-key-briefly (before vip-read-keyseq-ad protect activate)
+    "Force to read key via `read-key-sequence'."
+    (interactive (list (vip-events-to-keys
+			(read-key-sequence "Describe key briefly: ")))))
+  
+  
+  ;; Advice for use in find-file and read-file-name commands.
+  (defadvice exit-minibuffer (before vip-exit-minibuffer-advice activate)
+    "Run `vip-minibuffer-exit-hook' just before exiting the minibuffer."
+    (run-hooks 'vip-minibuffer-exit-hook))
+  
+  (defadvice find-file (before vip-add-suffix-advice activate)
+    "Use `read-file-name' for reading arguments."
+    (interactive (cons (read-file-name "Find file: " nil default-directory)
+		       ;; if Mule and prefix argument, ask for coding system
+		       (if (or (boundp 'MULE)    ; mule integrated Emacs 19
+			       (featurep 'mule)) ; mule integrated XEmacs 20
+			   (list
+			    (and current-prefix-arg
+				 (read-coding-system "Coding-system: "))))
+		       )))
+  
+  (defadvice find-file-other-window (before vip-add-suffix-advice activate)
+    "Use `read-file-name' for reading arguments."
+    (interactive (cons (read-file-name "Find file in other window: "
+				       nil default-directory)
+		       ;; if Mule and prefix argument, ask for coding system
+		       (if (or (boundp 'MULE)    ; mule integrated Emacs 19
+			       (featurep 'mule)) ; mule integrated XEmacs 20
+			   (list
+			    (and current-prefix-arg
+				 (read-coding-system "Coding-system: "))))
+		       )))
+  
+  (defadvice find-file-other-frame (before vip-add-suffix-advice activate)
+    "Use `read-file-name' for reading arguments."
+    (interactive (cons (read-file-name "Find file in other frame: "
+				       nil default-directory)
+		       ;; if Mule and prefix argument, ask for coding system
+		       (if (or (boundp 'MULE)    ; mule integrated Emacs 19
+			       (featurep 'mule)) ; mule integrated XEmacs 20
+			   (list
+			    (and current-prefix-arg
+				 (read-coding-system "Coding-system: "))))
+		       )))
+  
+  (defadvice read-file-name (around vip-suffix-advice activate)
+    "Tell `exit-minibuffer' to run `vip-file-add-suffix' as a hook."
+    (let ((vip-minibuffer-exit-hook 'vip-file-add-suffix))
+      ad-do-it))
+  
+  (defadvice start-kbd-macro (after vip-kbd-advice activate)
+    "Remove Viper's intercepting bindings for C-x ).
+  This may be needed if the previous `:map' command terminated abnormally."
+    (define-key vip-vi-intercept-map "\C-x)" nil)
+    (define-key vip-insert-intercept-map "\C-x)" nil)
+    (define-key vip-emacs-intercept-map "\C-x)" nil))
+  
+  (cond ((vip-window-display-p)
+	 (let* ((search-key (if vip-xemacs-p
+				[(meta shift button1up)] [M-S-mouse-1]))
+		(search-key-catch
+		 (if vip-xemacs-p [(meta shift button1)] [M-S-down-mouse-1]))
+		(insert-key (if vip-xemacs-p
+				[(meta shift button2up)] [M-S-mouse-2]))
+		(insert-key-catch
+		 (if vip-xemacs-p [(meta shift button2)] [M-S-down-mouse-2]))
+		(search-key-unbound (and (not (key-binding search-key))
+					 (not (key-binding search-key-catch))))
+		(insert-key-unbound (and (not (key-binding insert-key))
+					 (not (key-binding insert-key-catch))))
+		)
+	   
+	   (if search-key-unbound
+	       (global-set-key search-key 'vip-mouse-click-search-word))
+	   (if insert-key-unbound
+	       (global-set-key insert-key 'vip-mouse-click-insert-word))
+	   
+	   ;; The following would be needed if you want to use the above two
+	   ;; while clicking in another frame. If you only want to use them
+	   ;; by clicking in another window, not frame, the bindings below
+	   ;; aren't necessary.
+	   
+	   ;; These must be bound to mouse-down event for the same mouse
+	   ;; buttons as 'vip-mouse-click-search-word and
+	   ;; 'vip-mouse-click-insert-word
+	   (if search-key-unbound
+	       (global-set-key search-key-catch 'vip-mouse-catch-frame-switch))
+	   (if insert-key-unbound
+	       (global-set-key insert-key-catch 'vip-mouse-catch-frame-switch))
+	   
+	   (if vip-xemacs-p
+	       (add-hook 'mouse-leave-frame-hook
+			 'vip-remember-current-frame)
+	     (defadvice handle-switch-frame (before vip-frame-advice activate)
+	       "Remember the selected frame before the switch-frame event." 
+	       (vip-remember-current-frame (selected-frame))))
+	   )))
+  ) ; end vip-non-hook-settings
 
-;; Make %%% toggle parsing comments for matching parentheses
-(vip-record-kbd-macro
- "%%%" 'vi-state
- [(meta x) v i p - t o g g l e - p a r s e - s e x p - i g n o r e - c o m m e n t s return]
- 't)
+
+(if (eq viper-mode 'ask)
+    (progn
+      (save-window-excursion
+	(with-output-to-temp-buffer " *vip-info*"
+	  (princ "
+You have loaded Viper, and are about to Viperize your emacs!
+
+Viper is a Package for Emacs Rebels
+and a venomous VI PERil,
+
+It's time to decide: to Viperize or not to Viperize...
+
+If you wish to Viperize AND make this your way of life, please put 
+
+	(setq viper-mode t)
+	(require 'viper)
+
+in your .emacs file (preferably, close to the top).
+These two lines must come in the order given.
+
+Also, the startup file name has changed from .vip to .viper"))
+	(if (y-or-n-p "Viperize? ")
+	    (setq viper-mode t)
+	  (setq viper-mode nil))
+	(message "")
+	(kill-buffer " *vip-info*"))))
+
+
+
+
+      
+;; Set some useful macros, advices
+;; These must be BEFORE we ~/.vip is loaded, 
+;; so the user can unrecord them in ~/.vip.
+(if viper-mode
+    (progn
+      ;; set advices and some variables that give emacs Vi look.
+      (vip-non-hook-settings)
+
+      ;; repeat the 2nd previous command without rotating the command history
+      (vip-record-kbd-macro
+       (vector vip-repeat-from-history-key '\1) 'vi-state
+       [(meta x) v i p - r e p e a t - f r o m - h i s t o r y return] 't)
+      ;; repeat the 3d previous command without rotating the command history
+      (vip-record-kbd-macro
+       (vector vip-repeat-from-history-key '\2) 'vi-state
+       [(meta x) v i p - r e p e a t - f r o m - h i s t o r y return] 't)
+      
+      ;; set the toggle case sensitivity and regexp search macros
+      (vip-set-vi-search-style-macros nil)
+      
+      ;; Make %%% toggle parsing comments for matching parentheses
+      (vip-record-kbd-macro
+       "%%%" 'vi-state
+       [(meta x) v i p - t o g g l e - p a r s e - s e x p - i g n o r e - c o m m e n t s return]
+       't)
+      ))
  
 
 ;; ~/.vip is loaded if it exists
 (if (and (file-exists-p vip-custom-file-name)
+	 viper-mode
 	 (not noninteractive))
     (load vip-custom-file-name))
 
@@ -5269,34 +870,42 @@
 ;; Save user settings or Viper defaults for vars controled by vip-expert-level
 (setq vip-saved-user-settings 
       (list (cons 'vip-want-ctl-h-help vip-want-ctl-h-help)
-	    (cons 'vip-always vip-always)
+	    (cons 'viper-always viper-always)
 	    (cons 'vip-no-multiple-ESC vip-no-multiple-ESC)
 	    (cons 'vip-ex-style-motion vip-ex-style-motion)
 	    (cons 'vip-ex-style-editing-in-insert
 		    	    	    	    vip-ex-style-editing-in-insert) 
 	    (cons 'vip-want-emacs-keys-in-vi vip-want-emacs-keys-in-vi)
+	    (cons 'vip-electric-mode vip-electric-mode)
 	    (cons 'vip-want-emacs-keys-in-insert vip-want-emacs-keys-in-insert)
 	    (cons 'vip-re-search vip-re-search)))
 	      
 
-(vip-set-minibuffer-style)
-(if vip-buffer-search-char
-    (vip-buffer-search-enable))
-(vip-update-alphanumeric-class)
+(if viper-mode
+    (progn
+      (vip-set-minibuffer-style)
+      (if vip-buffer-search-char
+	  (vip-buffer-search-enable))
+      (vip-update-alphanumeric-class)
+      ))
    
+
 ;;; Familiarize Viper with some minor modes that have their own keymaps
-(vip-harness-minor-mode "compile")
-(vip-harness-minor-mode "outline")
-(vip-harness-minor-mode "allout")
-(vip-harness-minor-mode "xref")
-(vip-harness-minor-mode "lmenu")
-(vip-harness-minor-mode "vc")
-(vip-harness-minor-mode "ltx-math") ; LaTeX-math-mode in AUC-TeX
-(vip-harness-minor-mode "latex")    ; which is in one of these two files
-(vip-harness-minor-mode "cyrillic")
-(vip-harness-minor-mode "russian")
-(vip-harness-minor-mode "view-less")
-(vip-harness-minor-mode "view")
+(if viper-mode
+    (progn
+      (vip-harness-minor-mode "compile")
+      (vip-harness-minor-mode "outline")
+      (vip-harness-minor-mode "allout")
+      (vip-harness-minor-mode "xref")
+      (vip-harness-minor-mode "lmenu")
+      (vip-harness-minor-mode "vc")
+      (vip-harness-minor-mode "ltx-math") ; LaTeX-math-mode in AUC-TeX
+      (vip-harness-minor-mode "latex")    ; which is in one of these two files
+      (vip-harness-minor-mode "cyrillic")
+      (vip-harness-minor-mode "russian")
+      (vip-harness-minor-mode "view-less")
+      (vip-harness-minor-mode "view")
+      ))
 
 
 ;; Intercept maps could go in viper-keym.el
@@ -5315,8 +924,9 @@
 (define-key vip-emacs-intercept-map vip-toggle-key 'vip-change-state-to-vi)
 
 
-(if (or vip-always 
-	(and (< vip-expert-level 5) (> vip-expert-level 0)))
+(if (and viper-mode
+	 (or viper-always 
+	     (and (< vip-expert-level 5) (> vip-expert-level 0))))
     (vip-set-hooks))
     
 ;; Let all minor modes take effect after loading
@@ -5330,9 +940,10 @@
       ))
     
 
+
 (run-hooks 'vip-load-hook) ; the last chance to change something
 
-(provide 'vip19)
 (provide 'vip)
+(provide 'viper)
 
 ;;;  viper.el ends here
diff -r 4de2936b4e77 -r 0132846995bd lisp/vm/auto-autoloads.el
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lisp/vm/auto-autoloads.el	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,76 @@
+;;; DO NOT MODIFY THIS FILE
+(if (not (featurep 'vm-autoloads))
+    (progn
+
+;;;### (autoloads (vm-easy-menu-create-keymaps vm-easy-menu-define) "vm-easymenu" "vm/vm-easymenu.el")
+
+(autoload 'vm-easy-menu-define "vm-easymenu" "\
+Define a menu bar submenu in maps MAPS, according to MENU.
+The menu keymap is stored in symbol SYMBOL, both as its value
+and as its function definition.   DOC is used as the doc string for SYMBOL.
+
+The first element of MENU must be a string.  It is the menu bar item name.
+The rest of the elements are menu items.
+
+A menu item is usually a vector of three elements:  [NAME CALLBACK ENABLE]
+
+NAME is a string--the menu item name.
+
+CALLBACK is a command to run when the item is chosen,
+or a list to evaluate when the item is chosen.
+
+ENABLE is an expression; the item is enabled for selection
+whenever this expression's value is non-nil.
+
+Alternatively, a menu item may have the form: 
+
+   [ NAME CALLBACK [ KEYWORD ARG ] ... ]
+
+Where KEYWORD is one of the symbol defined below.
+
+   :keys KEYS
+
+KEYS is a string; a complex keyboard equivalent to this menu item.
+This is normally not needed because keyboard equivalents are usually
+computed automatically.
+
+   :active ENABLE
+
+ENABLE is an expression; the item is enabled for selection
+whenever this expression's value is non-nil.
+
+   :suffix NAME
+
+NAME is a string; the name of an argument to CALLBACK.
+
+   :style 
+   
+STYLE is a symbol describing the type of menu item.  The following are
+defined:  
+
+toggle: A checkbox.  
+        Currently just prepend the name with the string \"Toggle \".
+radio: A radio button. 
+nil: An ordinary menu item.
+
+   :selected SELECTED
+
+SELECTED is an expression; the checkbox or radio button is selected
+whenever this expression's value is non-nil.
+Currently just disable radio buttons, no effect on checkboxes.
+
+A menu item can be a string.  Then that string appears in the menu as
+unselectable text.  A string consisting solely of hyphens is displayed
+as a solid horizontal line.
+
+A menu item can be a list.  It is treated as a submenu.
+The first element should be the submenu name.  That's used as the
+menu item in the top-level menu.  The cdr of the submenu list
+is a list of menu items, as above." nil 'macro)
+
+(autoload 'vm-easy-menu-create-keymaps "vm-easymenu" nil nil nil)
+
+;;;***
+
+(provide 'vm-autoloads)
+))
diff -r 4de2936b4e77 -r 0132846995bd lisp/vm/custom-load.el
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lisp/vm/custom-load.el	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,65 @@
+(put 'copyright 'custom-loads '())
+(put 'eldoc 'custom-loads '())
+(put 'execute 'custom-loads '())
+(put 'mouse 'custom-loads '())
+(put 'mail-abbrevs 'custom-loads '())
+(put 'etags 'custom-loads '())
+(put 'limits 'custom-loads '())
+(put 'minibuffer 'custom-loads '())
+(put 'environment 'custom-loads '())
+(put 'sound 'custom-loads '())
+(put 'holidays 'custom-loads '())
+(put 'auto-save 'custom-loads '())
+(put 'ispell 'custom-loads '())
+(put 'fortran-indent 'custom-loads '())
+(put 'lpr 'custom-loads '())
+(put 'message-headers 'custom-loads '())
+(put 'editing-basics 'custom-loads '())
+(put 'internal 'custom-loads '())
+(put 'calendar 'custom-loads '())
+(put 'help-appearance 'custom-loads '())
+(put 'display-time 'custom-loads '())
+(put 'lisp 'custom-loads '())
+(put 'diff 'custom-loads '())
+(put 'paren-matching 'custom-loads '())
+(put 'help 'custom-loads '())
+(put 'local 'custom-loads '())
+(put 'keyboard 'custom-loads '())
+(put 'minubuffer 'custom-loads '())
+(put 'message-sending 'custom-loads '())
+(put 'data 'custom-loads '())
+(put 'ps-print 'custom-loads '())
+(put 'backup 'custom-loads '())
+(put 'frames 'custom-loads '())
+(put 'customize 'custom-loads '())
+(put 'abbrev 'custom-loads '())
+(put 'toolbar 'custom-loads '())
+(put 'compilation 'custom-loads '())
+(put 'dired 'custom-loads '())
+(put 'killing 'custom-loads '())
+(put 'paren-blinking 'custom-loads '())
+(put 'find-file 'custom-loads '())
+(put 'gnuserv 'custom-loads '())
+(put 'maint 'custom-loads '())
+(put 'fill-comments 'custom-loads '())
+(put 'message-mail 'custom-loads '())
+(put 'windows 'custom-loads '())
+(put 'message-various 'custom-loads '())
+(put 'resize-minibuffer 'custom-loads '())
+(put 'fill 'custom-loads '())
+(put 'debug 'custom-loads '())
+(put 'display 'custom-loads '())
+(put 'diary 'custom-loads '())
+(put 'browse-url 'custom-loads '())
+(put 'message-insertion 'custom-loads '())
+(put 'hyper-apropos 'custom-loads '())
+(put 'vc 'custom-loads '())
+(put 'alloc 'custom-loads '())
+(put 'isearch 'custom-loads '())
+(put 'modeline 'custom-loads '())
+(put 'processes-basics 'custom-loads '())
+(put 'editing 'custom-loads '())
+(put 'matching 'custom-loads '())
+(put 'ps-print-color 'custom-loads '())
+(put 'undo 'custom-loads '())
+(put 'x 'custom-loads '())
diff -r 4de2936b4e77 -r 0132846995bd lisp/w3/auto-autoloads.el
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lisp/w3/auto-autoloads.el	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,191 @@
+;;; DO NOT MODIFY THIS FILE
+(if (not (featurep 'w3-autoloads))
+    (progn
+
+;;;### (autoloads (x-font-build-cache font-default-size-for-device font-default-encoding-for-device font-default-registry-for-device font-default-family-for-device font-default-object-for-device font-default-font-for-device font-create-object) "font" "w3/font.el")
+
+(autoload 'font-create-object "font" nil nil nil)
+
+(autoload 'font-default-font-for-device "font" nil nil nil)
+
+(autoload 'font-default-object-for-device "font" nil nil nil)
+
+(autoload 'font-default-family-for-device "font" nil nil nil)
+
+(autoload 'font-default-registry-for-device "font" nil nil nil)
+
+(autoload 'font-default-encoding-for-device "font" nil nil nil)
+
+(autoload 'font-default-size-for-device "font" nil nil nil)
+
+(autoload 'x-font-build-cache "font" nil nil nil)
+
+;;;***
+
+;;;### (autoloads (url-cache-expired url-cache-extract url-is-cached url-store-in-cache) "url-cache" "w3/url-cache.el")
+
+(autoload 'url-store-in-cache "url-cache" "\
+Store buffer BUFF in the cache" nil nil)
+
+(autoload 'url-is-cached "url-cache" "\
+Return non-nil if the URL is cached." nil nil)
+
+(autoload 'url-cache-extract "url-cache" "\
+Extract FNAM from the local disk cache" nil nil)
+
+(autoload 'url-cache-expired "url-cache" "\
+Return t iff a cached file has expired." nil nil)
+
+;;;***
+
+;;;### (autoloads (url-gateway-nslookup-host) "url-gw" "w3/url-gw.el")
+
+(autoload 'url-gateway-nslookup-host "url-gw" "\
+Attempt to resolve the given HOSTNAME using nslookup if possible." t nil)
+
+;;;***
+
+;;;### (autoloads (url-retrieve url-popup-info url-get-url-at-point url-buffer-visiting url-normalize-url url-file-attributes) "url" "w3/url.el")
+
+(autoload 'url-file-attributes "url" "\
+Return a list of attributes of URL.
+Value is nil if specified file cannot be opened.
+Otherwise, list elements are:
+ 0. t for directory, string (name linked to) for symbolic link, or nil.
+ 1. Number of links to file.
+ 2. File uid.
+ 3. File gid.
+ 4. Last access time, as a list of two integers.
+  First integer has high-order 16 bits of time, second has low 16 bits.
+ 5. Last modification time, likewise.
+ 6. Last status change time, likewise.
+ 7. Size in bytes. (-1, if number is out of range).
+ 8. File modes, as a string of ten letters or dashes as in ls -l.
+    If URL is on an http server, this will return the content-type if possible.
+ 9. t iff file's gid would change if file were deleted and recreated.
+10. inode number.
+11. Device number.
+
+If file does not exist, returns nil." nil nil)
+
+(autoload 'url-normalize-url "url" "\
+Return a 'normalized' version of URL.  This strips out default port
+numbers, etc." nil nil)
+
+(autoload 'url-buffer-visiting "url" "\
+Return the name of a buffer (if any) that is visiting URL." nil nil)
+
+(autoload 'url-get-url-at-point "url" "\
+Get the URL closest to point, but don't change your
+position. Has a preference for looking backward when not
+directly on a symbol." nil nil)
+
+(autoload 'url-popup-info "url" "\
+Retrieve the HTTP/1.0 headers and display them in a temp buffer." nil nil)
+
+(autoload 'url-retrieve "url" "\
+Retrieve a document over the World Wide Web.
+The document should be specified by its fully specified
+Uniform Resource Locator.  No parsing is done, just return the
+document as the server sent it.  The document is left in the
+buffer specified by url-working-buffer.  url-working-buffer is killed
+immediately before starting the transfer, so that no buffer-local
+variables interfere with the retrieval.  HTTP/1.0 redirection will
+be honored before this function exits." nil nil)
+
+;;;***
+
+;;;### (autoloads (w3-hotlist-add-document w3-use-hotlist w3-hotlist-append w3-hotlist-rename-entry w3-hotlist-delete) "w3-hot" "w3/w3-hot.el")
+
+(autoload 'w3-hotlist-delete "w3-hot" "\
+Deletes a document from your hotlist file" t nil)
+
+(autoload 'w3-hotlist-rename-entry "w3-hot" "\
+Rename a hotlist item" t nil)
+
+(autoload 'w3-hotlist-append "w3-hot" "\
+Append a hotlist to the one in memory" t nil)
+
+(autoload 'w3-use-hotlist "w3-hot" "\
+Possibly go to a link in your W3/Mosaic hotlist.
+This is part of the emacs World Wide Web browser.  It will prompt for
+one of the items in your 'hotlist'.  A hotlist is a list of often
+visited or interesting items you have found on the World Wide Web." t nil)
+
+(autoload 'w3-hotlist-add-document "w3-hot" "\
+Add this documents url to the hotlist" t nil)
+
+;;;***
+
+;;;### (autoloads (w3-follow-link w3-follow-link-other-frame w3-do-setup w3 w3-preview-this-buffer w3-follow-url-at-point w3-follow-url-at-point-other-frame w3-maybe-follow-link w3-maybe-follow-link-mouse w3-fetch w3-fetch-other-frame w3-find-file w3-open-local) "w3" "w3/w3.el")
+
+(autoload 'w3-open-local "w3" "\
+Find a local file, and interpret it as a hypertext document.
+It will prompt for an existing file or directory, and retrieve it as a
+hypertext document." t nil)
+
+(autoload 'w3-find-file "w3" "\
+Find a local file, and interpret it as a hypertext document.
+It will prompt for an existing file or directory, and retrieve it as a
+hypertext document." t nil)
+
+(autoload 'w3-fetch-other-frame "w3" "\
+Attempt to follow the hypertext reference under point in a new frame.
+With prefix-arg P, ignore viewers and dump the link straight
+to disk." t nil)
+
+(autoload 'w3-fetch "w3" "\
+Retrieve a document over the World Wide Web.
+Defaults to URL of the current document, if any.
+With prefix argument, use the URL of the hyperlink under point instead." t nil)
+
+(autoload 'w3-maybe-follow-link-mouse "w3" "\
+Maybe follow a hypertext link under point.
+If there is no link under point, this will try using
+url-get-url-at-point" t nil)
+
+(autoload 'w3-maybe-follow-link "w3" "\
+Maybe follow a hypertext link under point.
+If there is no link under point, this will try using
+url-get-url-at-point" t nil)
+
+(autoload 'w3-follow-url-at-point-other-frame "w3" "\
+Follow the URL under PT, defaults to link under (point)" t nil)
+
+(autoload 'w3-follow-url-at-point "w3" "\
+Follow the URL under PT, defaults to link under (point)" t nil)
+
+(autoload 'w3-preview-this-buffer "w3" "\
+See what this buffer will look like when its formatted as HTML.
+HTML is the HyperText Markup Language used by the World Wide Web to
+specify formatting for text.  More information on HTML can be found at
+ftp.w3.org:/pub/www/doc." t nil)
+
+(autoload 'w3 "w3" "\
+Retrieve the default World Wide Web home page.
+The World Wide Web is a global hypertext system started by CERN in
+Switzerland in 1991.
+
+The home page is specified by the variable w3-default-homepage.  The
+document should be specified by its fully specified Uniform Resource
+Locator.  The document will be parsed as HTML (if appropriate) and
+displayed in a new buffer." t nil)
+
+(autoload 'w3-do-setup "w3" "\
+Do setup - this is to avoid conflict with user settings when W3 is
+dumped with emacs." nil nil)
+
+(autoload 'w3-follow-link-other-frame "w3" "\
+Attempt to follow the hypertext reference under point in a new frame.
+With prefix-arg P, ignore viewers and dump the link straight
+to disk." nil nil)
+
+(autoload 'w3-follow-link "w3" "\
+Attempt to follow the hypertext reference under point.
+With prefix-arg P, ignore viewers and dump the link straight
+to disk." t nil)
+
+;;;***
+
+(provide 'w3-autoloads)
+))
diff -r 4de2936b4e77 -r 0132846995bd lisp/w3/custom-load.el
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lisp/w3/custom-load.el	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,88 @@
+(put 'copyright 'custom-loads '())
+(put 'eldoc 'custom-loads '())
+(put 'url 'custom-loads '("url-gw" "url-irc" "url-vars" "url"))
+(put 'execute 'custom-loads '())
+(put 'mouse 'custom-loads '())
+(put 'mail-abbrevs 'custom-loads '())
+(put 'ssl 'custom-loads '("ssl"))
+(put 'etags 'custom-loads '())
+(put 'limits 'custom-loads '())
+(put 'minibuffer 'custom-loads '())
+(put 'environment 'custom-loads '())
+(put 'sound 'custom-loads '())
+(put 'holidays 'custom-loads '())
+(put 'auto-save 'custom-loads '())
+(put 'ispell 'custom-loads '())
+(put 'fortran-indent 'custom-loads '())
+(put 'lpr 'custom-loads '())
+(put 'message-headers 'custom-loads '())
+(put 'url-cookie 'custom-loads '("url-cookie" "url-vars"))
+(put 'editing-basics 'custom-loads '())
+(put 'internal 'custom-loads '())
+(put 'calendar 'custom-loads '())
+(put 'help-appearance 'custom-loads '())
+(put 'display-time 'custom-loads '())
+(put 'hypermedia 'custom-loads '("url-vars" "w3-cus"))
+(put 'w3-advanced 'custom-loads '("w3-cus"))
+(put 'lisp 'custom-loads '())
+(put 'diff 'custom-loads '())
+(put 'w3-menus 'custom-loads '("w3-cus" "w3-menu"))
+(put 'paren-matching 'custom-loads '())
+(put 'help 'custom-loads '())
+(put 'local 'custom-loads '())
+(put 'keyboard 'custom-loads '())
+(put 'minubuffer 'custom-loads '())
+(put 'url-gateway 'custom-loads '("url-gw"))
+(put 'message-sending 'custom-loads '())
+(put 'w3-files 'custom-loads '("w3-cus"))
+(put 'data 'custom-loads '())
+(put 'ps-print 'custom-loads '())
+(put 'comm 'custom-loads '("ssl"))
+(put 'backup 'custom-loads '())
+(put 'url-cache 'custom-loads '("url-cache" "url-vars"))
+(put 'frames 'custom-loads '())
+(put 'customize 'custom-loads '())
+(put 'w3-printing 'custom-loads '("w3-cus"))
+(put 'w3-images 'custom-loads '("w3-cus"))
+(put 'abbrev 'custom-loads '())
+(put 'url-history 'custom-loads '("url-vars"))
+(put 'toolbar 'custom-loads '())
+(put 'compilation 'custom-loads '())
+(put 'dired 'custom-loads '())
+(put 'url-hairy 'custom-loads '("url-vars"))
+(put 'url-mime 'custom-loads '("url-vars"))
+(put 'killing 'custom-loads '())
+(put 'paren-blinking 'custom-loads '())
+(put 'find-file 'custom-loads '())
+(put 'gnuserv 'custom-loads '())
+(put 'maint 'custom-loads '())
+(put 'fill-comments 'custom-loads '())
+(put 'message-mail 'custom-loads '())
+(put 'windows 'custom-loads '())
+(put 'message-various 'custom-loads '())
+(put 'resize-minibuffer 'custom-loads '())
+(put 'fill 'custom-loads '())
+(put 'debug 'custom-loads '())
+(put 'display 'custom-loads '())
+(put 'faces 'custom-loads '("font"))
+(put 'diary 'custom-loads '())
+(put 'browse-url 'custom-loads '())
+(put 'w3-hooks 'custom-loads '("w3-cus"))
+(put 'message-insertion 'custom-loads '())
+(put 'hyper-apropos 'custom-loads '())
+(put 'vc 'custom-loads '())
+(put 'w3 'custom-loads '("w3-cus" "w3-script"))
+(put 'url-file 'custom-loads '("url-cache" "url-vars"))
+(put 'alloc 'custom-loads '())
+(put 'isearch 'custom-loads '())
+(put 'modeline 'custom-loads '())
+(put 'processes-basics 'custom-loads '())
+(put 'w3-display 'custom-loads '("w3-cus"))
+(put 'w3-parsing 'custom-loads '("w3-cus"))
+(put 'editing 'custom-loads '())
+(put 'matching 'custom-loads '())
+(put 'i18n 'custom-loads '("url-vars"))
+(put 'ps-print-color 'custom-loads '())
+(put 'w3-scripting 'custom-loads '("w3-script"))
+(put 'undo 'custom-loads '())
+(put 'x 'custom-loads '())
diff -r 4de2936b4e77 -r 0132846995bd lisp/x11/auto-autoloads.el
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lisp/x11/auto-autoloads.el	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,33 @@
+;;; DO NOT MODIFY THIS FILE
+(if (not (featurep 'x11-autoloads))
+    (progn
+
+;;;### (autoloads (font-menu-weight-constructor font-menu-size-constructor font-menu-family-constructor reset-device-font-menus) "x-font-menu" "x11/x-font-menu.el")
+
+(defvar font-menu-ignore-scaled-fonts t "\
+*If non-nil, then the font menu will try to show only bitmap fonts.")
+
+(defvar font-menu-this-frame-only-p nil "\
+*If non-nil, then changing the default font from the font menu will only
+affect one frame instead of all frames.")
+
+(fset 'install-font-menus 'reset-device-font-menus)
+
+(autoload 'reset-device-font-menus "x-font-menu" "\
+Generates the `Font', `Size', and `Weight' submenus for the Options menu.
+This is run the first time that a font-menu is needed for each device.
+If you don't like the lazy invocation of this function, you can add it to
+`create-device-hook' and that will make the font menus respond more quickly
+when they are selected for the first time.  If you add fonts to your system, 
+or if you change your font path, you can call this to re-initialize the menus." nil nil)
+
+(autoload 'font-menu-family-constructor "x-font-menu" nil nil nil)
+
+(autoload 'font-menu-size-constructor "x-font-menu" nil nil nil)
+
+(autoload 'font-menu-weight-constructor "x-font-menu" nil nil nil)
+
+;;;***
+
+(provide 'x11-autoloads)
+))
diff -r 4de2936b4e77 -r 0132846995bd lisp/x11/custom-load.el
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lisp/x11/custom-load.el	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,65 @@
+(put 'copyright 'custom-loads '())
+(put 'eldoc 'custom-loads '())
+(put 'execute 'custom-loads '())
+(put 'mouse 'custom-loads '())
+(put 'mail-abbrevs 'custom-loads '())
+(put 'etags 'custom-loads '())
+(put 'limits 'custom-loads '())
+(put 'minibuffer 'custom-loads '())
+(put 'environment 'custom-loads '("x-toolbar"))
+(put 'sound 'custom-loads '())
+(put 'holidays 'custom-loads '())
+(put 'auto-save 'custom-loads '())
+(put 'ispell 'custom-loads '())
+(put 'fortran-indent 'custom-loads '())
+(put 'lpr 'custom-loads '())
+(put 'message-headers 'custom-loads '())
+(put 'editing-basics 'custom-loads '())
+(put 'internal 'custom-loads '())
+(put 'calendar 'custom-loads '())
+(put 'help-appearance 'custom-loads '())
+(put 'display-time 'custom-loads '())
+(put 'lisp 'custom-loads '())
+(put 'diff 'custom-loads '())
+(put 'paren-matching 'custom-loads '())
+(put 'help 'custom-loads '())
+(put 'local 'custom-loads '())
+(put 'keyboard 'custom-loads '())
+(put 'minubuffer 'custom-loads '())
+(put 'message-sending 'custom-loads '())
+(put 'data 'custom-loads '())
+(put 'ps-print 'custom-loads '())
+(put 'backup 'custom-loads '())
+(put 'frames 'custom-loads '())
+(put 'customize 'custom-loads '())
+(put 'abbrev 'custom-loads '())
+(put 'toolbar 'custom-loads '("x-toolbar"))
+(put 'compilation 'custom-loads '())
+(put 'dired 'custom-loads '())
+(put 'killing 'custom-loads '())
+(put 'paren-blinking 'custom-loads '())
+(put 'find-file 'custom-loads '())
+(put 'gnuserv 'custom-loads '())
+(put 'maint 'custom-loads '())
+(put 'fill-comments 'custom-loads '())
+(put 'message-mail 'custom-loads '())
+(put 'windows 'custom-loads '())
+(put 'message-various 'custom-loads '())
+(put 'resize-minibuffer 'custom-loads '())
+(put 'fill 'custom-loads '())
+(put 'debug 'custom-loads '())
+(put 'display 'custom-loads '())
+(put 'diary 'custom-loads '())
+(put 'browse-url 'custom-loads '())
+(put 'message-insertion 'custom-loads '())
+(put 'hyper-apropos 'custom-loads '())
+(put 'vc 'custom-loads '())
+(put 'alloc 'custom-loads '())
+(put 'isearch 'custom-loads '())
+(put 'modeline 'custom-loads '())
+(put 'processes-basics 'custom-loads '())
+(put 'editing 'custom-loads '())
+(put 'matching 'custom-loads '())
+(put 'ps-print-color 'custom-loads '())
+(put 'undo 'custom-loads '())
+(put 'x 'custom-loads '())
diff -r 4de2936b4e77 -r 0132846995bd lwlib/Makefile.in.in
--- a/lwlib/Makefile.in.in	Mon Aug 13 09:42:28 2007 +0200
+++ b/lwlib/Makefile.in.in	Mon Aug 13 09:43:35 2007 +0200
@@ -1,37 +1,27 @@
-/* Makefile for Lucid Widget Library
-   Copyright (C) 1994 Lucid, Inc.
-   Copyright (C) 1995 Tinker Systems and INS Engineering Corp.
-   Copyright (C) 1994, 1995 Board of Trustees, University of Illinois
-
-This file is part of the Lucid Widget Library.
+##   Makefile for Lucid Widget Library
+##   Copyright (C) 1994 Lucid, Inc.
+##   Copyright (C) 1995 Tinker Systems and INS Engineering Corp.
+##   Copyright (C) 1994, 1995 Board of Trustees, University of Illinois
+##   Copyright (C) 1996, 1997 Sun Microsystems, Inc.
 
-The Lucid Widget Library 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.
-
-The Lucid Widget Library 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.
+## This file is part of the Lucid Widget Library.
 
-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.  */
+## The Lucid Widget Library 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.
 
-/* Some people use these in paths they define.  We do not want their paths
-   getting changed on them. */
-#undef sparc
-#undef sun
-#undef unix
-#undef sgi
-#undef NeXT
-#undef mips
-#undef i386
-#undef linux
+## The Lucid Widget Library 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.
 
-/* For performance and consistency, no built-in rules */
+## 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.
+
+## For performance and consistency, no built-in rules
 .SUFFIXES:
 .SUFFIXES: .c .o .i .h
 
@@ -62,9 +52,9 @@
 
 #ifdef ENERGIZE
 EZ_OBJS =\
- energize/blpsheet.o energize/build.o energize/classbr_ps.o \
- energize/ctreebr_ps.o energize/debuggerps.o energize/editmode.o \
- energize/leb_psheet.o energize/projectdisp.o energize/projectps.o \
+ energize/blpsheet.o energize/build.o energize/classbr_ps.o\
+ energize/ctreebr_ps.o energize/debuggerps.o energize/editmode.o\
+ energize/leb_psheet.o energize/projectdisp.o energize/projectps.o\
  energize/search.o energize/target.o
 ENERGIZEP = -DENERGIZE
 EZ_SUBDIR = ez_dialog
@@ -91,14 +81,14 @@
 .c.o:
 	$(CC) -c $(cflags) $<
 
-/* Create preprocessor output (debugging purposes only) */
+## Create preprocessor output (debugging purposes only)
 .c.i:
 	$(CC) -P $(cppflags) $<
 
 liblw.a: $(objs)
 	$(RM) $@
 	$(AR) $@ $(objs)
-	-test -n "$(RANLIB)" && $(RANLIB) $@
+	@-test -n "$(RANLIB)" && $(RANLIB) $@
 
 #ifdef ENERGIZE
 ez_dialog:
@@ -108,25 +98,26 @@
 .PHONY : mostlyclean clean distclean realclean extraclean
 FRC.mostlyclean:
 mostlyclean: FRC.mostlyclean
-	rm -f liblw.a liblw_pure_*.a *.o
+	$(RM) liblw.a liblw_pure_*.a *.o *.i
 clean: mostlyclean
 #ifdef ENERGIZE
 	cd energize && $(MAKE) $(MFLAGS) clean
 #endif
 distclean: clean
-	rm -f Makefile Makefile.in config.h .pure
+	$(RM) Makefile Makefile.in config.h .pure
 realclean: distclean
 extraclean: distclean
-	-rm -f *~ \#* m/?*~ s/?*~
+	$(RM) *~ \#* m/?*~ s/?*~
 
+CONFIG_H = ../src/config.h config.h
 
-lwlib-config.o:	lwlib.h ../src/config.h
-lwlib-Xaw.o:	lwlib.h lwlib-internal.h lwlib-Xaw.h ../src/config.h
-lwlib-Xlw.o:	lwlib.h lwlib-internal.h lwlib-Xlw.h xlwmenu.h ../src/config.h
-lwlib-Xm.o:	lwlib.h lwlib-internal.h lwlib-utils.h lwlib-Xm.h
-lwlib-Xm.o:	../src/config.h
-lwlib-utils.o:	lwlib-utils.h ../src/config.h
-lwlib.o:	lwlib.h lwlib-internal.h lwlib-utils.h ../src/config.h
-lwlib.o:	lwlib-Xlw.h lwlib-Xm.h lwlib-Xaw.h ../src/config.h
-xlwmenu.o:	lwlib.h xlwmenu.h xlwmenuP.h ../src/config.h
-xlwscrollbar.o:	lwlib.h xlwscrollbar.h xlwscrollbarP.h ../src/config.h
+lwlib-config.o:	lwlib.h $(CONFIG_H)
+lwlib-Xaw.o:	lwlib.h lwlib-internal.h lwlib-Xaw.h $(CONFIG_H)
+lwlib-Xlw.o:	lwlib.h lwlib-internal.h lwlib-Xlw.h xlwmenu.h $(CONFIG_H)
+lwlib-Xm.o:	lwlib.h lwlib-internal.h lwlib-utils.h lwlib-Xm.h $(CONFIG_H)
+lwlib-Xm.o:	$(CONFIG_H)
+lwlib-utils.o:	lwlib-utils.h $(CONFIG_H)
+lwlib.o:	lwlib.h lwlib-internal.h lwlib-utils.h $(CONFIG_H)
+lwlib.o:	lwlib-Xlw.h lwlib-Xm.h lwlib-Xaw.h $(CONFIG_H)
+xlwmenu.o:	lwlib.h xlwmenu.h xlwmenuP.h $(CONFIG_H)
+xlwscrollbar.o:	lwlib.h xlwscrollbar.h xlwscrollbarP.h $(CONFIG_H)
diff -r 4de2936b4e77 -r 0132846995bd lwlib/config.h.in
--- a/lwlib/config.h.in	Mon Aug 13 09:42:28 2007 +0200
+++ b/lwlib/config.h.in	Mon Aug 13 09:43:35 2007 +0200
@@ -20,9 +20,11 @@
 
 /* Not in FSF. */
 
-#ifndef _CONFIG_H_
-#define _CONFIG_H_
+#ifndef _LWLIB_CONFIG_H_
+#define _LWLIB_CONFIG_H_
 
+#include <../src/config.h>
+#if 0
 /* alloca twiddling belongs in one place, not the s&m headers
    AIX requires this to be the first thing in the file.  */
 #undef HAVE_ALLOCA_H
@@ -42,6 +44,7 @@
 
 #undef HAVE_UNISTD_H
 #undef HAVE_LIMITS_H
+#undef STDC_HEADERS
 #undef CONST_IS_LOSING
 
 #ifndef NeedFunctionPrototypes
@@ -54,7 +57,7 @@
 
 /* Required for most XFree86 systems */
 #undef NARROWPROTO
-
+#endif
 /* widget feature definitions */
 #undef LWLIB_MENUBARS_LUCID
 #undef LWLIB_MENUBARS_MOTIF
diff -r 4de2936b4e77 -r 0132846995bd lwlib/lwlib-Xaw.c
--- a/lwlib/lwlib-Xaw.c	Mon Aug 13 09:42:28 2007 +0200
+++ b/lwlib/lwlib-Xaw.c	Mon Aug 13 09:43:35 2007 +0200
@@ -21,6 +21,10 @@
 #include <config.h>
 #include <stdio.h>
 
+#ifdef STDC_HEADERS
+#include <stdlib.h>
+#endif
+
 #include "lwlib-Xaw.h"
 
 #include <X11/StringDefs.h>
@@ -75,7 +79,7 @@
 		     XtNy, data->scrollbar_y,
 		     XtNwidth, data->scrollbar_width,
 		     XtNheight, data->scrollbar_height,
-		     0);
+		     NULL);
 
       /*
        * Now the size the scrollbar's slider.
@@ -84,7 +88,7 @@
       XtVaGetValues (widget,
 		     XtNtopOfThumb, &widget_topOfThumb,
 		     XtNshown, &widget_shown,
-		     0);
+		     NULL);
 
       new_shown = (double) data->slider_size /
 	(double) (data->maximum - data->minimum);
@@ -123,12 +127,12 @@
 #ifdef DIALOGS_ATHENA
   else if (XtIsSubclass (widget, dialogWidgetClass))
       {
-	XtVaSetValues (widget, XtNlabel, val->contents->value, 0);
+	XtVaSetValues (widget, XtNlabel, val->contents->value, NULL);
       }
   else if (XtIsSubclass (widget, commandWidgetClass))
     {
       Dimension bw = 0;
-      XtVaGetValues (widget, XtNborderWidth, &bw, 0);
+      XtVaGetValues (widget, XtNborderWidth, &bw, NULL);
 
 #ifndef LWLIB_DIALOGS_ATHENA3D
       if (bw == 0)
@@ -138,7 +142,7 @@
 	   that I don't feel like opening right now.  Making Athena widgets
 	   not look like shit is just entirely too much work.
 	 */
-	XtVaSetValues (widget, XtNborderWidth, 1, 0);
+	XtVaSetValues (widget, XtNborderWidth, 1, NULL);
 #endif
 
       XtVaSetValues (widget,
@@ -146,7 +150,7 @@
 		     XtNsensitive, val->enabled,
 		     /* Force centered button text.  Se above. */
 		     XtNjustify, XtJustifyCenter,
-		     0);
+		     NULL);
 
       XtRemoveAllCallbacks (widget, XtNcallback);
       XtAddCallback (widget, XtNcallback, xaw_generic_callback, instance);
@@ -448,7 +452,7 @@
 
 #if 0
   user_data = NULL;
-  XtVaGetValues (widget, XtNuserData, &user_data, 0);
+  XtVaGetValues (widget, XtNuserData, &user_data, NULL);
 #else
   /* Damn!  Athena doesn't give us a way to hang our own data on the
      buttons, so we have to go find it...  I guess this assumes that
@@ -481,7 +485,7 @@
   Widget widget;
   if (! XtIsSubclass (shell, shellWidgetClass))
     abort ();
-  XtVaGetValues (shell, XtNchildren, &kids, 0);
+  XtVaGetValues (shell, XtNchildren, &kids, NULL);
   if (!kids || !*kids)
     abort ();
   widget = kids [0];
diff -r 4de2936b4e77 -r 0132846995bd lwlib/lwlib-Xlw.c
--- a/lwlib/lwlib-Xlw.c	Mon Aug 13 09:42:28 2007 +0200
+++ b/lwlib/lwlib-Xlw.c	Mon Aug 13 09:43:35 2007 +0200
@@ -110,7 +110,7 @@
     XtVaCreateWidget (instance->info->name, xlwMenuWidgetClass,
 		      instance->parent,
 		      XtNmenu, instance->info->val,
-		      0);
+		      NULL);
   XtAddCallback (widget, XtNopen,   pre_hook,  (XtPointer)instance);
   XtAddCallback (widget, XtNselect, pick_hook, (XtPointer)instance);
   return widget;
@@ -128,7 +128,7 @@
 			     popup_shell,
 			     XtNmenu, instance->info->val,
 			     XtNhorizontal, False,
-			     0);
+			     NULL);
 
   XtAddCallback (widget, XtNselect, pick_hook, (XtPointer)instance);
 
@@ -269,13 +269,13 @@
 		     XtNy, data->scrollbar_y,
 		     XtNwidth, data->scrollbar_width,
 		     XtNheight, data->scrollbar_height,
-		     0);
+		     NULL);
 
       /* Now size the scrollbar's slider. */
       XtVaGetValues (widget,
 		     XmNsliderSize, &widget_sliderSize,
 		     XmNvalue,      &widget_val,
-		     0);
+		     NULL);
 
       percent = (double) data->slider_size /
 	(double) (data->maximum - data->minimum);
@@ -357,7 +357,7 @@
 	mw = (XlwMenuWidget)((CompositeWidget)widget)->composite.children [0];
       else
 	mw = (XlwMenuWidget)widget;
-      XtVaSetValues (widget, XtNmenu, val, 0);
+      XtVaSetValues (widget, XtNmenu, val, NULL);
     }
 #endif
 #ifdef SCROLLBARS_LUCID
diff -r 4de2936b4e77 -r 0132846995bd lwlib/lwlib-Xm.c
--- a/lwlib/lwlib-Xm.c	Mon Aug 13 09:42:28 2007 +0200
+++ b/lwlib/lwlib-Xm.c	Mon Aug 13 09:43:35 2007 +0200
@@ -335,7 +335,7 @@
 xm_update_pushbutton (widget_instance* instance, Widget widget,
 		      widget_value* val)
 {
-  XtVaSetValues (widget, XmNalignment, XmALIGNMENT_CENTER, 0);
+  XtVaSetValues (widget, XmNalignment, XmALIGNMENT_CENTER, NULL);
   XtRemoveAllCallbacks (widget, XmNactivateCallback);
   XtAddCallback (widget, XmNactivateCallback, xm_generic_callback, instance);
 }
@@ -383,7 +383,7 @@
                 xm_internal_update_other_instances, instance);
 #endif 
   XtVaSetValues (widget, XmNset, val->selected,
-		 XmNalignment, XmALIGNMENT_BEGINNING, 0);
+		 XmNalignment, XmALIGNMENT_BEGINNING, NULL);
 }
 
 static void
@@ -408,11 +408,11 @@
       toggle = XtNameToWidget (widget, cur->value);
       if (toggle)
 	{
-	  XtVaSetValues (toggle, XmNsensitive, cur->enabled, 0);
+	  XtVaSetValues (toggle, XmNsensitive, cur->enabled, NULL);
 	  if (!val->value && cur->selected)
-	    XtVaSetValues (toggle, XmNset, cur->selected, 0);
+	    XtVaSetValues (toggle, XmNset, cur->selected, NULL);
 	  if (val->value && strcmp (val->value, cur->value))
-	    XtVaSetValues (toggle, XmNset, False, 0);
+	    XtVaSetValues (toggle, XmNset, False, NULL);
 	}
     }
 
@@ -421,7 +421,7 @@
     {
       toggle = XtNameToWidget (widget, val->value);
       if (toggle)
-	XtVaSetValues (toggle, XmNset, True, 0);
+	XtVaSetValues (toggle, XmNset, True, NULL);
     }
 }
 
@@ -568,7 +568,7 @@
   XtVaSetValues (widget,
 		 XmNsensitive, val->enabled,
 		 XmNuserData, val->call_data,
-		 0);
+		 NULL);
 
   /* update the menu button as a label. */
   if (val->change >= VISIBLE_CHANGE)
@@ -722,7 +722,7 @@
 		     XtNy, data->scrollbar_y,
 		     XtNwidth, data->scrollbar_width,
 		     XtNheight, data->scrollbar_height,
-		     0);
+		     NULL);
 
       /*
        * Now the size the scrollbar's slider.
@@ -731,7 +731,7 @@
       XtVaGetValues (widget,
 		     XmNsliderSize, &widget_sliderSize,
 		     XmNvalue, &widget_val,
-		     0);
+		     NULL);
 
       percent = (double) data->slider_size /
 	(double) (data->maximum - data->minimum);
@@ -790,7 +790,7 @@
   XtVaSetValues (widget,
 		 XmNsensitive, val->enabled,
 		 XmNuserData,  val->call_data,
-		 0);
+		 NULL);
 
 #if defined (DIALOGS_MOTIF) || defined (MENUBARS_MOTIF)
   /* Common to all label like widgets */
@@ -869,7 +869,7 @@
   
   if (class == xmToggleButtonWidgetClass || class == xmToggleButtonGadgetClass)
     {
-      XtVaGetValues (widget, XmNset, &val->selected, 0);
+      XtVaGetValues (widget, XmNset, &val->selected, NULL);
       val->edited = True;
     }
 #ifdef DIALOGS_MOTIF
@@ -903,7 +903,7 @@
 	      int set = False;
 	      Widget toggle = radio->composite.children [i];
 	      
-	      XtVaGetValues (toggle, XmNset, &set, 0);
+	      XtVaGetValues (toggle, XmNset, &set, NULL);
 	      if (set)
 		{
 		  if (val->value)
@@ -1348,9 +1348,9 @@
   Position x;
   Position y;
 
-  XtVaGetValues (widget, XtNwidth, &child_width, XtNheight, &child_height, 0);
+  XtVaGetValues (widget, XtNwidth, &child_width, XtNheight, &child_height, NULL);
   XtVaGetValues (parent, XtNwidth, &parent_width, XtNheight, &parent_height,
-		 0);
+		 NULL);
 
   x = (((Position)parent_width) - ((Position)child_width)) / 2;
   y = (((Position)parent_height) - ((Position)child_height)) / 2;
@@ -1367,7 +1367,7 @@
   if (y < 0)
     y = 0;
 
-  XtVaSetValues (widget, XtNx, x, XtNy, y, 0);
+  XtVaSetValues (widget, XtNx, x, XtNy, y, NULL);
 }
 
 static Widget
@@ -1397,7 +1397,7 @@
       /* shrink the separator label back to their original size */
       separator = XtNameToWidget (widget, "*separator_button");
       if (separator)
-	XtVaSetValues (separator, XtNwidth, 5, XtNheight, 5, 0);
+	XtVaSetValues (separator, XtNwidth, 5, XtNheight, 5, NULL);
 
       /* Center the dialog in its parent */
       recenter_widget (widget);
@@ -1749,7 +1749,7 @@
       else if (event->xbutton.state & Button3Mask) trans = "<Btn3Down>";
       else if (event->xbutton.state & Button2Mask) trans = "<Btn2Down>";
       else if (event->xbutton.state & Button1Mask) trans = "<Btn1Down>";
-      if (trans) XtVaSetValues (widget, XmNmenuPost, trans, 0);
+      if (trans) XtVaSetValues (widget, XmNmenuPost, trans, NULL);
       XmMenuPosition (widget, (XButtonPressedEvent *) event);
     }
   XtManageChild (widget);
@@ -1764,8 +1764,8 @@
 {
   short width;
   short height;
-  XtVaGetValues (w, XmNwidth, &width, XmNheight, &height, 0);
-  XtVaSetValues (w, XmNminWidth, width, XmNminHeight, height, 0);
+  XtVaGetValues (w, XmNwidth, &width, XmNheight, &height, NULL);
+  XtVaSetValues (w, XmNminWidth, width, XmNminHeight, height, NULL);
 }
 
 #endif
@@ -1874,8 +1874,8 @@
       || XtClass (widget) == xmToggleButtonGadgetClass)
     {
       Boolean check;
-      XtVaGetValues (widget, XmNset, &check, 0);
-      XtVaSetValues (widget, XmNset, !check, 0);
+      XtVaGetValues (widget, XmNset, &check, NULL);
+      XtVaSetValues (widget, XmNset, !check, NULL);
     }
 #endif 
   lw_internal_update_other_instances (widget, closure, call_data);
diff -r 4de2936b4e77 -r 0132846995bd lwlib/lwlib.c
--- a/lwlib/lwlib.c	Mon Aug 13 09:42:28 2007 +0200
+++ b/lwlib/lwlib.c	Mon Aug 13 09:43:35 2007 +0200
@@ -24,11 +24,13 @@
 #endif
 
 #include <config.h>
+#include <stdio.h>
 #include <stdlib.h>
-#include <unistd.h>
+#include <string.h>
 #include <sys/types.h>
-#include <string.h>
-#include <stdio.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
 #include <X11/StringDefs.h>
 #include "lwlib-internal.h"
 #include "lwlib-utils.h"
@@ -1257,11 +1259,11 @@
   XtVaGetValues (widget_to_invert,
 		 XtNforeground, &foreground,
 		 XtNbackground, &background,
-		 0);
+		 NULL);
   XtVaSetValues (widget_to_invert,
 		 XtNforeground, background,
 		 XtNbackground, foreground,
-		 0);
+		 NULL);
 }
 
 void
diff -r 4de2936b4e77 -r 0132846995bd lwlib/xlwmenu.c
--- a/lwlib/xlwmenu.c	Mon Aug 13 09:42:28 2007 +0200
+++ b/lwlib/xlwmenu.c	Mon Aug 13 09:43:35 2007 +0200
@@ -34,7 +34,9 @@
 #include <unistd.h>
 #endif
 
+#if 0 /* mrb */
 #include <X11/Xos.h>
+#endif
 #include <X11/IntrinsicP.h>
 #include <X11/StringDefs.h>
 #include <X11/cursorfont.h>
diff -r 4de2936b4e77 -r 0132846995bd man/custom.texi
--- a/man/custom.texi	Mon Aug 13 09:42:28 2007 +0200
+++ b/man/custom.texi	Mon Aug 13 09:43:35 2007 +0200
@@ -373,10 +373,6 @@
 Add an easy way to display the standard settings when an item is modified.
 
 @item
-Option or command to create new buffer instead of expanding a group
-inline. 
-
-@item
 See if it is feasible to scan files for customization information
 instead of loading them, 
 
@@ -386,6 +382,25 @@
 Suggest that the user unhide if hidden, and edit the value directly
 otherwise.
 
+@item
+Use checkboxes and radio buttons in the state menus.
+
+@item
+Add option to hide @samp{[hide]} for short options.  Default, on.
+
+@item 
+Add option to hide @samp{[state]} for options with their standard
+settings.
+
+@item 
+There should be a way to specify site defaults for user options.
+
+@item
+There should be more buffer styles.  The default `nested style, the old
+`outline' style, a `numeric' style with numbers instead of stars, an
+`empty' style with just the group name, and `compact' with only one line
+per item.
+
 @end itemize
 
 @contents
diff -r 4de2936b4e77 -r 0132846995bd man/gnus.texi
--- a/man/gnus.texi	Mon Aug 13 09:42:28 2007 +0200
+++ b/man/gnus.texi	Mon Aug 13 09:43:35 2007 +0200
@@ -1,7 +1,7 @@
 \input texinfo                  @c -*-texinfo-*-
 
 @setfilename gnus
-@settitle Gnus 5.4.56 Manual
+@settitle Gnus 5.4.59 Manual
 @synindex fn cp
 @synindex vr cp
 @synindex pg cp
@@ -12,11 +12,11 @@
 
 @iftex
 @iflatex
-\documentclass[twoside,a4paper,openright]{book}
+\documentclass[twoside,a4paper,openright,11pt]{book}
 \usepackage[latin1]{inputenc}
 \usepackage{pagestyle}
 \usepackage{epsfig}
-\fontfamily{bembo}\selectfont
+\usepackage{bembo}
 
 \makeindex
 \begin{document}
@@ -32,9 +32,9 @@
 \newcommand{\gnuskindex}[1]{\index{#1}}
 \newcommand{\gnusindex}[1]{\index{#1}}
 
-\newcommand{\gnustt}[1]{{\textbf{\textsf{#1}}}}
+\newcommand{\gnustt}[1]{{\fontfamily{pfu}\fontsize{10pt}{10}\selectfont #1}}
 \newcommand{\gnuscode}[1]{\gnustt{#1}}
-\newcommand{\gnussamp}[1]{``\gnustt{#1}''}
+\newcommand{\gnussamp}[1]{``{\fontencoding{OT1}\fontfamily{pcr}\fontsize{10pt}{10}\selectfont #1}''}
 \newcommand{\gnuslisp}[1]{\gnustt{#1}}
 \newcommand{\gnuskbd}[1]{`\gnustt{#1}'}
 \newcommand{\gnusfile}[1]{`\gnustt{#1}'}
@@ -42,7 +42,7 @@
 \newcommand{\gnusi}[1]{\textit{#1}}
 \newcommand{\gnusstrong}[1]{\textbf{#1}}
 \newcommand{\gnusemph}[1]{\textit{#1}}
-\newcommand{\gnusvar}[1]{\textsl{\textsf{#1}}}
+\newcommand{\gnusvar}[1]{{\fontsize{10pt}{10}\selectfont\textsl{\textsf{#1}}}}
 \newcommand{\gnussc}[1]{\textsc{#1}}
 \newcommand{\gnustitle}[1]{{\huge\textbf{#1}}}
 \newcommand{\gnusauthor}[1]{{\large\textbf{#1}}}
@@ -61,7 +61,7 @@
 
 \newcommand{\gnushead}{\raisebox{-1cm}{\epsfig{figure=gnus-head.eps,height=1cm}}}
 \newcommand{\gnusinteresting}{
-\marginpar[\hspace{2.5cm}\gnushead]{\gnushead}
+\marginpar[\mbox{}\hfill\gnushead]{\gnushead}
 }
 
 \newcommand{\gnuscleardoublepage}{\ifodd\count0\mbox{}\clearpage\thispagestyle{empty}\mbox{}\clearpage\else\clearpage\fi}
@@ -82,12 +82,34 @@
 \thispagestyle{empty}
 \hspace*{-2cm}
 \begin{picture}(500,500)(0,0)
-\put(0,0){\makebox(480,350)[tr]{#1}}
+\put(480,350){\makebox(0,0)[tr]{#1}}
 \put(40,300){\makebox(500,50)[bl]{{\Huge\bf{#2}}}}
 \end{picture}
 \clearpage
 }
 
+\newcommand{\gnusfigure}[3]{
+\begin{figure}
+\mbox{}\ifodd\count0\hspace*{-0.8cm}\else\hspace*{-3cm}\fi\begin{picture}(440,#2)
+#3
+\end{picture}
+\caption{#1}
+\end{figure}
+}
+
+\newcommand{\gnusicon}[1]{
+\marginpar[\mbox{}\hfill\raisebox{-1.5cm}{\epsfig{figure=tmp/#1-up.ps,height=1.5cm}}]{\raisebox{-1cm}{\epsfig{figure=tmp/#1-up.ps,height=1cm}}}
+}
+
+\newcommand{\gnuspicon}[1]{
+\marginpar[\mbox{}\hfill\epsfig{figure=#1,height=1.5cm}]{\epsfig{figure=#1,height=1.5cm}}
+}
+
+\newcommand{\gnusxface}[1]{
+\marginpar[\mbox{}\hfill\epsfig{figure=#1,height=1cm}]{\epsfig{figure=#1,height=1cm}}
+}
+
+
 \newcommand{\gnusitemx}[1]{\mbox{}\vspace*{-\itemsep}\vspace*{-\parsep}\item#1}
 
 \newcommand{\gnussection}[1]{
@@ -189,11 +211,11 @@
 {
 \ifodd\count0
 {
-\hspace*{-0.23cm}\underline{\makebox[\gnusheadtextwidth]{\textbf{\arabic{chapter}.\arabic{section}} \textbf{\gnussectionname\hfill\arabic{page}}}}
+\makebox[12cm]{\hspace*{3.1cm}\underline{\makebox[\gnusheadtextwidth]{\textbf{\arabic{chapter}.\arabic{section}} \textbf{\gnussectionname\hfill\arabic{page}}}}}
 }
 \else
 {
-\hspace*{-3.25cm}\underline{\makebox[\gnusheadtextwidth]{\textbf{\arabic{page}\hfill\gnuschaptername}}}
+\makebox[12cm]{\hspace*{-2.95cm}\underline{\makebox[\gnusheadtextwidth]{\textbf{\arabic{page}\hfill\gnuschaptername}}}}
 }
 \fi
 }
@@ -227,7 +249,7 @@
 \gnustitle{\gnustitlename}\\
 \rule{15cm}{1mm}\\
 \vfill
-\hspace*{-1cm}\epsfig{figure=gnus-big-logo.eps,height=15cm}
+\hspace*{0cm}\epsfig{figure=gnus-big-logo.eps,height=15cm}
 \vfill
 \rule{15cm}{1mm}\\
 \gnusauthor{by Lars Magne Ingebrigtsen}
@@ -287,7 +309,7 @@
 @tex
 
 @titlepage
-@title Gnus 5.4.56 Manual
+@title Gnus 5.4.59 Manual
 
 @author by Lars Magne Ingebrigtsen
 @page
@@ -323,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.56.
+This manual corresponds to Gnus 5.4.59.
 
 @end ifinfo
 
@@ -438,7 +460,7 @@
 @code{NNTPSERVER} environment variable.  If that variable isn't set,
 Gnus will see whether @code{gnus-nntpserver-file}
 (@file{/etc/nntpserver} by default) has any opinions on the matter.  If
-that fails as well, Gnus will will try to use the machine that is
+that fails as well, Gnus will try to use the machine that is
 running Emacs as an @sc{nntp} server.  That's a long shot, though.
 
 @vindex gnus-nntp-server
@@ -494,8 +516,8 @@
 something useful.
 
 Since she hasn't, Gnus will just subscribe you to a few arbitrarily
-picked groups (i.e., @samp{*.newusers}).  (@dfn{Arbitrary} is here
-defined as @dfn{whatever Lars thinks you should read}.)
+picked groups (i.e., @samp{*.newusers}).  (@dfn{Arbitrary} is defined
+here as @dfn{whatever Lars thinks you should read}.)
 
 You'll also be subscribed to the Gnus documentation group, which should
 help you with most common problems.  
@@ -571,7 +593,7 @@
 @cindex fetching a group
 
 @findex gnus-fetch-group
-It it sometimes convenient to be able to just say ``I want to read this
+It is sometimes convenient to be able to just say ``I want to read this
 group and I don't care whether Gnus has been started or not''.  This is
 perhaps more useful for people who write code than for users, but the
 command @code{gnus-fetch-group} provides this functionality in any case.
@@ -691,7 +713,8 @@
 will ask you for each sub-hierarchy whether you want to descend the
 hierarchy or not.  
 
-One common mistake is to set the variable a few paragraphs above to
+One common mistake is to set the variable a few paragraphs above
+(@code{gnus-subscribe-newsgroup-method}) to
 @code{gnus-subscribe-hierarchical-interactive}.  This is an error.  This
 will not work.  This is ga-ga.  So don't do it.
 
@@ -723,7 +746,7 @@
 set the two variables @code{gnus-options-subscribe} and
 @code{gnus-options-not-subscribe}.  These two variables do exactly the
 same as the @file{.newsrc} @samp{options -n} trick.  Both are regexps,
-and if the the new group matches the former, it will be unconditionally
+and if the new group matches the former, it will be unconditionally
 subscribed, and if it matches the latter, it will be ignored.
 
 @vindex gnus-auto-subscribed-groups
@@ -833,7 +856,7 @@
 @vindex gnus-startup-file
 The @code{gnus-startup-file} variable says where the startup files are.
 The default value is @file{~/.newsrc}, with the Gnus (El Dingo) startup
-file being whatever that one is with a @samp{.eld} appended.
+file being whatever that one is, with a @samp{.eld} appended.
 
 @vindex gnus-save-newsrc-hook
 @vindex gnus-save-quick-newsrc-hook
@@ -1011,6 +1034,20 @@
 is the first buffer shown when Gnus starts, and will never be killed as
 long as Gnus is active.
 
+@iftex
+@iflatex
+\gnusfigure{The Group Buffer}{320}{
+\put(75,50){\epsfig{figure=tmp/group.ps,height=9cm}}
+\put(120,37){\makebox(0,0)[t]{Buffer name}}
+\put(120,38){\vector(1,2){10}}
+\put(40,60){\makebox(0,0)[r]{Mode line}}
+\put(40,58){\vector(1,0){30}}
+\put(200,28){\makebox(0,0)[t]{Native select method}}
+\put(200,26){\vector(-1,2){15}}
+}
+@end iflatex
+@end iftex
+
 @menu
 * Group Buffer Format::    Information listed and how you can change it.
 * Group Maneuvering::      Commands for moving in the group buffer.
@@ -1061,7 +1098,7 @@
 You can see that there are 25 unread articles in
 @samp{news.announce.newusers}.  There are no unread articles, but some
 ticked articles, in @samp{alt.fan.andrea-dworkin} (see that little
-asterisk at the beginning of the line?)
+asterisk at the beginning of the line?).
 
 @vindex gnus-group-line-format
 You can change that format to whatever you want by fiddling with the
@@ -1164,7 +1201,7 @@
 
 @item u
 User defined specifier.  The next character in the format string should
-be a letter.  @sc{gnus} will call the function
+be a letter.  Gnus will call the function
 @code{gnus-user-format-function-}@samp{X}, where @samp{X} is the letter
 following @samp{%u}.  The function will be passed a single dummy
 parameter as argument.  The function should return a string, which will
@@ -1243,7 +1280,7 @@
 The number of ticked articles in the group.
 @item total
 The total number of articles in the group.  Or rather, MAX-NUMBER minus
-MIN-NUMBER.
+MIN-NUMBER plus one.
 @item topic
 When using the topic minor mode, this variable is bound to the current
 topic being inserted.
@@ -1440,6 +1477,7 @@
 @kindex S t (Group)
 @kindex u (Group)
 @findex gnus-group-unsubscribe-current-group
+@c @icon{gnus-group-unsubscribe}
 Toggle subscription to the current group
 (@code{gnus-group-unsubscribe-current-group}).  
 
@@ -1457,6 +1495,7 @@
 @kindex S k (Group)
 @kindex C-k (Group)
 @findex gnus-group-kill-group
+@c @icon{gnus-group-kill-group}
 Kill the current group (@code{gnus-group-kill-group}).
 
 @item S y
@@ -1510,6 +1549,7 @@
 @kindex c (Group)
 @findex gnus-group-catchup-current
 @vindex gnus-group-catchup-group-hook
+@c @icon{gnus-group-catchup-current}
 Mark all unticked articles in this group as read
 (@code{gnus-group-catchup-current}).
 @code{gnus-group-catchup-group-hook} is called when catching up a group from
@@ -1565,17 +1605,17 @@
 @vindex gnus-level-zombie
 @vindex gnus-level-unsubscribed
 @vindex gnus-level-subscribed
-Gnus considers groups on between levels 1 and
+Gnus considers groups from levels 1 to
 @code{gnus-level-subscribed} (inclusive) (default 5) to be subscribed,
 @code{gnus-level-subscribed} (exclusive) and
 @code{gnus-level-unsubscribed} (inclusive) (default 7) to be
 unsubscribed, @code{gnus-level-zombie} to be zombies (walking dead)
-(default 8) and @code{gnus-level-killed} to be killed (default 9),
-completely dead.  Gnus treats subscribed and unsubscribed groups exactly
-the same, but zombie and killed groups have no information on what
-articles you have read, etc, stored.  This distinction between dead and
-living groups isn't done because it is nice or clever, it is done purely
-for reasons of efficiency.
+(default 8) and @code{gnus-level-killed} to be killed (completely dead)
+(default 9).  Gnus treats subscribed and unsubscribed groups exactly the
+same, but zombie and killed groups have no information on what articles
+you have read, etc, stored.  This distinction between dead and living
+groups isn't done because it is nice or clever, it is done purely for
+reasons of efficiency.
 
 It is recommended that you keep all your mail groups (if any) on quite
 low levels (e.g. 1 or 2).
@@ -1804,7 +1844,7 @@
 @kindex G D (Group)
 @findex gnus-group-enter-directory
 @cindex nneething
-Read an arbitrary directory as if with were a newsgroup with the
+Read an arbitrary directory as if it were a newsgroup with the
 @code{nneething} backend (@code{gnus-group-enter-directory}).
 @xref{Anything Groups}. 
 
@@ -1897,7 +1937,7 @@
 @cindex to-list
 If the group parameter list has an element that looks like
 @code{(to-list . "some@@where.com")}, that address will be used when
-doing a @kbd{a} in any group.  It is totally ignored when doing a
+doing a @kbd{a} in that group.  It is totally ignored when doing a
 followup---except that if it is present in a news group, you'll get mail
 group semantics when doing @kbd{f}.
 
@@ -1905,6 +1945,12 @@
 @code{to-list} group parameter, one will be added automatically upon
 sending the message.
 
+@item visible
+@cindex visible
+If the group parameter list has the element @code{(visible . t)},
+that group will always be visible in the Group buffer, regardless
+of whether it has any unread articles.
+
 @item broken-reply-to
 @cindex broken-reply-to
 Elements like @code{(broken-reply-to . t)} signals that @code{Reply-To}
@@ -1927,7 +1973,7 @@
 @item gcc-self
 @cindex gcc-self
 If this symbol is present in the group parameter list and set to
-@code{t}, new composed messages will be @code{Gcc}'d to the current
+@code{t}, newly composed messages will be @code{Gcc}'d to the current
 group. If it is present and set to @code{none}, no @code{Gcc:} header
 will be generated, if it is present and a string, this string will be
 inserted literally as a @code{gcc} header (this symbol takes precedence over
@@ -1936,7 +1982,7 @@
 @item auto-expire
 @cindex auto-expire
 If the group parameter has an element that looks like @code{(auto-expire
-. t)}, , all articles that are read will be marked as expirable.  For an
+. t)}, all articles that are read will be marked as expirable.  For an
 alternative approach, @pxref{Expiring Mail}.
 
 @item total-expire
@@ -1965,17 +2011,17 @@
 @item adapt-file
 @cindex adapt file group parameter
 Elements that look like @code{(adapt-file . "file")} will make
-@file{file} into the current adaptive file for the group in question.
-All adaptive score entries will be put into this file.
+@file{file} into the current adaptive score file for the group in
+question.  All adaptive score entries will be put into this file.
 
 @item admin-address
-When unsubscribing to a mailing list you should never send the
+When unsubscribing from a mailing list you should never send the
 unsubscription notice to the mailing list itself.  Instead, you'd send
 messages to the administrative address.  This parameter allows you to
 put the admin address somewhere convenient.
 
 @item display
-Elements that look like @code{(display . MODE)} says which articles to
+Elements that look like @code{(display . MODE)} say which articles to
 display on entering the group.  Legal values are:
 
 @table @code
@@ -2011,7 +2057,7 @@
 
 Use the @kbd{G p} command to edit group parameters of a group.
 
-Also @pxref{Topic Parameters}.
+@pxref{Topic Parameters}.
 
 Here's an example group parameter list:
 
@@ -2090,8 +2136,8 @@
 server(s) you are connected to (@code{gnus-group-list-active}).  This
 might very well take quite a while.  It might actually be a better idea
 to do a @kbd{A M} to list all matching, and just give @samp{.} as the
-thing to match on.  Also note that this command may list group that
-don't exist (yet)---these will be listed as if they are killed groups.
+thing to match on.  Also note that this command may list groups that
+don't exist (yet)---these will be listed as if they were killed groups.
 Take the output with some grains of salt.
 
 @item A a
@@ -2309,7 +2355,7 @@
 
 @findex gnus-browse-mode
 A new buffer with a list of available groups will appear.  This buffer
-will be use the @code{gnus-browse-mode}.  This buffer looks a bit (well,
+will use the @code{gnus-browse-mode}.  This buffer looks a bit (well,
 a lot) like a normal group buffer.
 
 Here's a list of keystrokes available in the browse mode:
@@ -2374,6 +2420,7 @@
 @item q
 @kindex q (Group)
 @findex gnus-group-exit
+@c @icon{gnus-group-exit}
 Quit Gnus (@code{gnus-group-exit}).
 
 @item Q
@@ -2417,6 +2464,14 @@
 even group the Emacs sex groups as a sub-topic to either the Emacs
 groups or the sex groups---or both!  Go wild!
 
+@iftex
+@iflatex
+\gnusfigure{Group Topics}{400}{
+\put(75,50){\epsfig{figure=tmp/group-topic.ps,height=9cm}}
+}
+@end iflatex
+@end iftex
+
 Here's an example:
 
 @example
@@ -2464,7 +2519,7 @@
 @subsection Topic Variables
 @cindex topic variables
 
-Now, if you select a topic, if will fold/unfold that topic, which is
+Now, if you select a topic, it will fold/unfold that topic, which is
 really neat, I think.
 
 @vindex gnus-topic-line-format
@@ -2810,12 +2865,12 @@
 
 @item gnus-group-mode-hook
 @vindex gnus-group-mode-hook
-@code{gnus-group-mode-hook} is called after the group buffer has been
+is called after the group buffer has been
 created. 
 
 @item gnus-group-prepare-hook
 @vindex gnus-group-prepare-hook
-@code{gnus-group-prepare-hook} is called after the group buffer is
+is called after the group buffer is
 generated.  It may be used to modify the buffer in some strange,
 unnatural way.
 
@@ -2837,16 +2892,18 @@
 @item g
 @kindex g (Group)
 @findex gnus-group-get-new-news
+@c @icon{gnus-group-get-new-news}
 Check the server(s) for new articles.  If the numerical prefix is used,
 this command will check only groups of level @var{arg} and lower
 (@code{gnus-group-get-new-news}).  If given a non-numerical prefix, this
-command will force a total rereading of the active file(s) from the
+command will force a total re-reading of the active file(s) from the
 backend(s).
 
 @item M-g
 @kindex M-g (Group)
 @findex gnus-group-get-new-news-this-group
 @vindex gnus-goto-next-group-when-activating
+@c @icon{gnus-group-get-new-news-this-group}
 Check whether new articles have arrived in the current group
 (@code{gnus-group-get-new-news-this-group}).
 @code{gnus-goto-next-group-when-activating} says whether this command is
@@ -2903,6 +2960,7 @@
 
 @item H d
 @itemx C-c C-d
+@c @icon{gnus-group-describe-group}
 @kindex H d (Group)
 @kindex C-c C-d (Group)
 @cindex describing groups
@@ -3056,6 +3114,15 @@
 @section Summary Buffer Format
 @cindex summary buffer format
 
+@iftex
+@iflatex
+\gnusfigure{The Summary Buffer}{180}{
+\put(0,0){\epsfig{figure=tmp/summary.ps,width=7.5cm}}
+\put(445,0){\makebox(0,0)[br]{\epsfig{figure=tmp/summary-article.ps,width=7.5cm}}}
+}
+@end iflatex
+@end iftex
+
 @menu
 * Summary Buffer Lines::     You can specify how summary lines should look.
 * Summary Buffer Mode Line:: You can say how the mode line should look.
@@ -3067,7 +3134,7 @@
 @vindex gnus-extract-address-components
 Gnus will use the value of the @code{gnus-extract-address-components}
 variable as a function for getting the name and address parts of a
-@code{From} header.  Two pre-defined function exist:
+@code{From} header.  Two pre-defined functions exist:
 @code{gnus-extract-address-components}, which is the default, quite
 fast, and too simplistic solution; and
 @code{mail-extract-address-components}, which works very nicely, but is
@@ -3086,7 +3153,7 @@
 @vindex gnus-summary-line-format
 You can change the format of the lines in the summary buffer by changing
 the @code{gnus-summary-line-format} variable.  It works along the same
-lines a a normal @code{format} string, with some extensions
+lines as a normal @code{format} string, with some extensions
 (@pxref{Formatting Variables}).
 
 The default string is @samp{%U%R%z%I%(%[%4L: %-20,20n%]%) %s\n}.
@@ -3154,7 +3221,7 @@
 @item d
 The @code{Date} in @code{DD-MMM} format.
 @item o
-The @code{Date} in @code{YYYYMMDDTHHMMSS} format.
+The @code{Date} in @var{YYYYMMDD}@code{T}@var{HHMMSS} format.
 @item M
 @code{Message-ID}.
 @item r
@@ -3169,7 +3236,7 @@
 The line number.
 @item u
 User defined specifier.  The next character in the format string should
-be a letter.  @sc{gnus} will call the function
+be a letter.  Gnus will call the function
 @code{gnus-user-format-function-}@samp{X}, where @samp{X} is the letter
 following @samp{%u}.  The function will be passed the current header as
 argument.  The function should return a string, which will be inserted
@@ -3261,7 +3328,7 @@
 @item gnus-summary-highlight
 @vindex gnus-summary-highlight
 Summary lines are highlighted according to this variable, which is a
-list where the elements are on the format @var{(FORM . FACE)}.  If you
+list where the elements are of the format @var{(FORM . FACE)}.  If you
 would, for instance, like ticked articles to be italic and high-scored
 articles to be bold, you could set this variable to something like
 @lisp
@@ -3310,7 +3377,7 @@
 @item G g
 @kindex G g (Summary)
 @findex gnus-summary-goto-subject
-Ask for an article number and then go the summary line of that article
+Ask for an article number and then go to the summary line of that article
 without displaying the article (@code{gnus-summary-goto-subject}).
 @end table
 
@@ -3393,12 +3460,14 @@
 @kindex n (Summary)
 @kindex G n (Summary)
 @findex gnus-summary-next-unread-article
+@c @icon{gnus-summary-next-unread}
 Go to next unread article (@code{gnus-summary-next-unread-article}).
 
 @item G p
 @itemx p
 @kindex p (Summary)
 @findex gnus-summary-prev-unread-article
+@c @icon{gnus-summary-prev-unread}
 Go to previous unread article (@code{gnus-summary-prev-unread-article}).
 
 @item G N
@@ -3579,6 +3648,8 @@
 @kindex S r (Summary)
 @kindex r (Summary)
 @findex gnus-summary-reply
+@c @icon{gnus-summary-mail-reply}
+@c @icon{gnus-summary-reply}
 Mail a reply to the author of the current article
 (@code{gnus-summary-reply}). 
 
@@ -3587,6 +3658,7 @@
 @kindex R (Summary)
 @kindex S R (Summary)
 @findex gnus-summary-reply-with-original
+@c @icon{gnus-summary-reply-with-original}
 Mail a reply to the author of the current article and include the
 original message (@code{gnus-summary-reply-with-original}).  This
 command uses the process/prefix convention.
@@ -3595,7 +3667,9 @@
 @kindex S w (Summary)
 @findex gnus-summary-wide-reply
 Mail a wide reply to the author of the current article
-(@code{gnus-summary-wide-reply}). 
+(@code{gnus-summary-wide-reply}).  A @dfn{wide reply} is a reply that
+goes out to all people listed in the @code{To}, @code{From} (or
+@code{Reply-to}) and @code{Cc} headers.
 
 @item S W
 @kindex S W (Summary)
@@ -3607,6 +3681,7 @@
 @item S o m
 @kindex S o m (Summary)
 @findex gnus-summary-mail-forward
+@c @icon{gnus-summary-mail-forward}
 Forward the current article to some other person
 (@code{gnus-summary-mail-forward}).  If given a prefix, include the full
 headers of the forwarded article.
@@ -3616,6 +3691,7 @@
 @kindex m (Summary)
 @kindex S m (Summary)
 @findex gnus-summary-mail-other-window
+@c @icon{gnus-summary-mail-originate}
 Send a mail to some other person
 (@code{gnus-summary-mail-other-window}).
 
@@ -3691,6 +3767,7 @@
 @kindex a (Summary)
 @kindex S p (Summary)
 @findex gnus-summary-post-news
+@c @icon{gnus-summary-post-news}
 Post an article to the current group
 (@code{gnus-summary-post-news}).
 
@@ -3699,12 +3776,14 @@
 @kindex f (Summary)
 @kindex S f (Summary)
 @findex gnus-summary-followup
+@c @icon{gnus-summary-followup}
 Post a followup to the current article (@code{gnus-summary-followup}).
 
 @item S F
 @itemx F
 @kindex S F (Summary)
 @kindex F (Summary)
+@c @icon{gnus-summary-followup-with-original}
 @findex gnus-summary-followup-with-original
 Post a followup to the current article and include the original message
 (@code{gnus-summary-followup-with-original}).   This command uses the
@@ -3743,6 +3822,7 @@
 @item S u
 @kindex S u (Summary)
 @findex gnus-uu-post-news
+@c @icon{gnus-uu-post-news}
 Uuencode a file, split it into parts, and post it as a series
 (@code{gnus-uu-post-news}). (@pxref{Uuencoding and Posting}). 
 @end table
@@ -3760,6 +3840,7 @@
 
 @findex gnus-summary-cancel-article
 @kindex C (Summary)
+@c @icon{gnus-summary-cancel-article}
 Find the article you wish to cancel (you can only cancel your own
 articles, so don't try any funny stuff).  Then press @kbd{C} or @kbd{S
 c} (@code{gnus-summary-cancel-article}).  Your article will be
@@ -3893,7 +3974,7 @@
 
 @item Y
 @vindex gnus-low-score-mark
-Marked as read by having a too low score (@code{gnus-low-score-mark}).
+Marked as read by having too low a score (@code{gnus-low-score-mark}).
 
 @item C
 @vindex gnus-catchup-mark
@@ -3931,7 +4012,7 @@
 
 Marking articles as @dfn{expirable} (or have them marked as such
 automatically) doesn't make much sense in normal groups---a user doesn't
-control the expiring of news articles, but in mail groups, for instance,
+control expiring of news articles, but in mail groups, for instance,
 articles that are marked as @dfn{expirable} can be deleted by Gnus at
 any time.
 @end table
@@ -3969,18 +4050,18 @@
 @vindex gnus-saved-mark
 Articles that are ``saved'' (in some manner or other; not necessarily
 religiously) are marked with an @samp{S} in the second column
-(@code{gnus-saved-mark}.
+(@code{gnus-saved-mark}).
 
 @item 
 @vindex gnus-not-empty-thread-mark
 @vindex gnus-empty-thread-mark
-It the @samp{%e} spec is used, the presence of threads or not will be
+If the @samp{%e} spec is used, the presence of threads or not will be
 marked with @code{gnus-not-empty-thread-mark} and
 @code{gnus-empty-thread-mark} in the third column, respectively.
 
 @item 
 @vindex gnus-process-mark
-Finally we have the @dfn{process mark} (@code{gnus-process-mark}.  A
+Finally we have the @dfn{process mark} (@code{gnus-process-mark}).  A
 variety of commands react to the presence of the process mark.  For
 instance, @kbd{X u} (@code{gnus-uu-decode-uu}) will uudecode and view
 all articles that have been marked with the process mark.  Articles
@@ -4053,6 +4134,7 @@
 @item M C
 @kindex M C (Summary)
 @findex gnus-summary-catchup
+@c @icon{gnus-summary-catchup}
 Mark all unread articles as read (@code{gnus-summary-catchup}).
 
 @item M C-c
@@ -4392,7 +4474,7 @@
 Fetching old headers can be slow.  A low-rent similar effect can be
 gotten by setting this variable to @code{some}.  Gnus will then look at
 the complete @code{References} headers of all articles and try to string
-articles that belong in the same thread together.  This will leave
+together articles that belong in the same thread.  This will leave
 @dfn{gaps} in the threading display where Gnus guesses that an article
 is missing from the thread.  (These gaps appear like normal summary
 lines.  If you select a gap, Gnus will try to fetch the article in
@@ -4408,7 +4490,7 @@
 variable is @code{nil}, Gnus requires an exact match between the
 subjects of the loose threads before gathering them into one big
 super-thread.  This might be too strict a requirement, what with the
-presence of stupid newsreaders that chop off long subjects lines.  If
+presence of stupid newsreaders that chop off long subject lines.  If
 you think so, set this variable to, say, 20 to require that only the
 first 20 characters of the subjects have to match.  If you set this
 variable to a really low number, you'll find that Gnus will gather
@@ -4461,8 +4543,8 @@
 to many false hits, especially with certain common subjects like
 @samp{} and @samp{(none)}.  To make the situation slightly better,
 you can use the regexp @code{gnus-summary-gather-exclude-subject} to say
-what subjects should be excluded from the gathering process.  The
-default is @samp{^ *$\\|^(none)$}.  
+what subjects should be excluded from the gathering process.@*
+The default is @samp{^ *$\\|^(none)$}.  
 
 @item gnus-summary-thread-gathering-function
 @vindex gnus-summary-thread-gathering-function
@@ -4470,8 +4552,8 @@
 that totally unrelated articles may end up in the same ``thread'', which
 is confusing.  An alternate approach is to look at all the
 @code{Message-ID}s in all the @code{References} headers to find matches.
-This will ensure that no gathered threads ever includes unrelated
-articles, but it's also means that people who have posted with broken
+This will ensure that no gathered threads ever include unrelated
+articles, but it also means that people who have posted with broken
 newsreaders won't be gathered properly.  The choice is yours---plague or
 cholera:
 
@@ -4505,6 +4587,17 @@
 something.  This variable says what fudging method Gnus should use.
 There are four possible values:
 
+@iftex
+@iflatex
+\gnusfigure{The Summary Buffer}{390}{
+\put(0,0){\epsfig{figure=tmp/summary-adopt.ps,width=7.5cm}}
+\put(445,0){\makebox(0,0)[br]{\epsfig{figure=tmp/summary-empty.ps,width=7.5cm}}}
+\put(0,400){\makebox(0,0)[tl]{\epsfig{figure=tmp/summary-none.ps,width=7.5cm}}}
+\put(445,400){\makebox(0,0)[tr]{\epsfig{figure=tmp/summary-dummy.ps,width=7.5cm}}}
+}
+@end iflatex
+@end iftex
+
 @cindex adopting articles
 
 @table @code
@@ -4648,7 +4741,7 @@
 @item T t
 @kindex T t (Summary)
 @findex gnus-summary-rethread-current
-Re-thread the thread the current article is part of
+Re-thread the current article's thread
 (@code{gnus-summary-rethread-current}).  This works even when the
 summary buffer is otherwise unthreaded.
 
@@ -4656,7 +4749,7 @@
 @kindex T ^ (Summary)
 @findex gnus-summary-reparent-thread
 Make the current article the child of the marked (or previous) article
-(@code{gnus-summary-reparent-thread}.
+(@code{gnus-summary-reparent-thread}).
 
 @end table
 
@@ -4697,7 +4790,7 @@
 a command like `T k' (@code{gnus-summary-kill-thread}) you might not
 wish to kill the entire thread, but just those parts of the thread that
 have the same subject as the current article.  If you like this idea,
-you can fiddle with @code{gnus-thread-operation-ignore-subject}.  If is
+you can fiddle with @code{gnus-thread-operation-ignore-subject}.  If it
 is non-@code{nil} (which it is by default), subjects will be ignored
 when doing thread commands.  If this variable is @code{nil}, articles in
 the same thread with different subjects will not be included in the
@@ -4724,7 +4817,7 @@
 @code{gnus-thread-sort-by-date}, @code{gnus-thread-sort-by-score}, and
 @code{gnus-thread-sort-by-total-score}.
 
-Each function takes two threads and return non-@code{nil} if the first
+Each function takes two threads and returns non-@code{nil} if the first
 thread should be sorted before the other.  Note that sorting really is
 normally done by looking only at the roots of each thread.  If you use
 more than one function, the primary sort key should be the last function
@@ -4756,7 +4849,7 @@
 @lisp
 (setq gnus-thread-sort-functions
       '((lambda (t1 t2) 
-          (not (gnus-thread-sort-by-number t1 t2)))
+          (not (gnus-thread-sort-by-number t2 t1)))
         gnus-thread-sort-by-score))
 @end lisp
 
@@ -4831,18 +4924,17 @@
 happen automatically.
 
 @vindex gnus-use-article-prefetch
-You can control how many articles that are to be pre-fetched by setting
+You can control how many articles are to be pre-fetched by setting
 @code{gnus-use-article-prefetch}.  This is 30 by default, which means
 that when you read an article in the group, the backend will pre-fetch
 the next 30 articles.  If this variable is @code{t}, the backend will
-pre-fetch all the articles that it can without bound.  If it is
-@code{nil}, no pre-fetching will be made.
+pre-fetch all the articles it can without bound.  If it is
+@code{nil}, no pre-fetching will be done.
 
 @vindex gnus-async-prefetch-article-p
 @findex gnus-async-read-p
 There are probably some articles that you don't want to pre-fetch---read
-articles, for instance.  Which articles to pre-fetch is controlled by
-the @code{gnus-async-prefetch-article-p} variable.  This function should
+articles, for instance.  The @code{gnus-async-prefetch-article-p} variable controls whether an article is to be pre-fetched.  This function should
 return non-@code{nil} when the article in question is to be
 pre-fetched.  The default is @code{gnus-async-read-p}, which returns
 @code{nil} on read articles.  The function is called with an article
@@ -4862,8 +4954,8 @@
 @end lisp
 
 These functions will be called many, many times, so they should
-preferrably be short and sweet to avoid slowing down Gnus too much.
-It's also probably a good idea to byte-compile things like this.
+preferably be short and sweet to avoid slowing down Gnus too much.
+It's probably a good idea to byte-compile things like this.
 
 @vindex gnus-prefetched-article-deletion-strategy
 Articles have to be removed from the asynch buffer sooner or later.  The
@@ -4907,7 +4999,7 @@
 cache is flat or hierarchal is controlled by the
 @code{gnus-use-long-file-name} variable, as usual.
 
-When re-select a ticked or dormant article, it will be fetched from the
+When re-selecting a ticked or dormant article, it will be fetched from the
 cache instead of from the server.  As articles in your cache will never
 expire, this might serve as a method of saving articles while still
 keeping them where they belong.  Just mark all articles you want to save
@@ -5051,6 +5143,7 @@
 @kindex O o (Summary)
 @kindex o (Summary)
 @findex gnus-summary-save-article
+@c @icon{gnus-summary-save-article}
 Save the current article using the default article saver
 (@code{gnus-summary-save-article}). 
 
@@ -5069,6 +5162,7 @@
 @item O f
 @kindex O f (Summary)
 @findex gnus-summary-save-article-file
+@c @icon{gnus-summary-save-article-file}
 Save the current article in plain file format
 (@code{gnus-summary-save-article-file}). 
 
@@ -5165,8 +5259,7 @@
 library.  Uses the function in the @code{gnus-folder-save-name} variable
 to get a file name to save the article in.  The default is
 @code{gnus-folder-save-name}, but you can also use
-@code{gnus-Folder-save-name}.  The former creates capitalized names, and
-the latter does not.
+@code{gnus-Folder-save-name}, which creates capitalized names.
 
 @item gnus-summary-save-in-vm
 @findex gnus-summary-save-in-vm
@@ -5315,7 +5408,7 @@
 will find all the articles that match the regexp @samp{^cat.gif
 ([0-9]+/[0-9]+).*$}.  
 
-Subjects that are nonstandard, like @samp{cat.gif (2/3) Part 6 of a
+Subjects that are non-standard, like @samp{cat.gif (2/3) Part 6 of a
 series}, will not be properly recognized by any of the automatic viewing
 commands, and you have to mark the articles manually with @kbd{#}.
 
@@ -5330,6 +5423,7 @@
 @item X u
 @kindex X u (Summary)
 @findex gnus-uu-decode-uu
+@c @icon{gnus-uu-decode-uu}
 Uudecodes the current series (@code{gnus-uu-decode-uu}).
 
 @item X U
@@ -5449,7 +5543,7 @@
 @cindex rule variables
 
 Gnus uses @dfn{rule variables} to decide how to view a file.  All these
-variables are on the form
+variables are of the form
   
 @lisp
       (list '(regexp1 command2)
@@ -5489,7 +5583,7 @@
 @vindex gnus-uu-grabbed-file-functions
 
 @item gnus-uu-grabbed-file-functions
-All functions in this list will be called right each file has been
+All functions in this list will be called right after each file has been
 successfully decoded---so that you can move or view files right away,
 and don't have to wait for all files to be decoded before you can do
 anything.  Ready-made functions you can put in this list are:
@@ -5554,8 +5648,8 @@
 
 @item gnus-uu-unmark-articles-not-decoded
 @vindex gnus-uu-unmark-articles-not-decoded
-Non-@code{nil} means that @code{gnus-uu} will mark articles that were
-unsuccessfully decoded as unread.
+Non-@code{nil} means that @code{gnus-uu} will mark unsuccessfully
+decoded articles as unread.
 
 @item gnus-uu-correct-stripped-uucode
 @vindex gnus-uu-correct-stripped-uucode
@@ -5602,7 +5696,7 @@
 @item gnus-uu-post-threaded
 @vindex gnus-uu-post-threaded
 Non-@code{nil} means that @code{gnus-uu} will post the encoded file in a
-thread.  This may not be smart, as no other decoder I have seen are able
+thread.  This may not be smart, as no other decoder I have seen is able
 to follow threads when collecting uuencoded articles.  (Well, I have
 seen one package that does that---@code{gnus-uu}, but somehow, I don't
 think that counts...) Default is @code{nil}.
@@ -5665,7 +5759,7 @@
 @section Article Treatment
 
 Reading through this huge manual, you may have quite forgotten that the
-object of newsreaders are to actually, like, read what people have
+object of newsreaders is to actually, like, read what people have
 written.  Reading articles.  Unfortunately, people are quite bad at
 writing, so there are tons of functions and variables to make reading
 these articles easier.
@@ -5796,7 +5890,7 @@
 How the emphasis is computed is controlled by the
 @code{gnus-article-emphasis} variable.  This is an alist where the first
 element is a regular expression to be matched.  The second is a number
-that says what regular expression grouping used to find the entire
+that says what regular expression grouping is used to find the entire
 emphasized word.  The third is a number that says what regexp grouping
 should be displayed and highlighted.  (The text between these two
 groupings will be hidden.)  The fourth is the face used for
@@ -5819,7 +5913,7 @@
 @code{gnus-emphasis-bold}, @code{gnus-emphasis-italic},
 @code{gnus-emphasis-underline}, @code{gnus-emphasis-bold-italic},
 @code{gnus-emphasis-underline-italic},
-@code{gnus-emphasis-undeline-bold}, and
+@code{gnus-emphasis-underline-bold}, and
 @code{gnus-emphasis-underline-bold-italic}.  
 
 If you want to change these faces, you can either use @kbd{M-x
@@ -5875,7 +5969,7 @@
 @item W W P
 @kindex W W P (Summary)
 @findex gnus-article-hide-pem
-Hide @sc{pem} (privacy enhanced messages) gruft
+Hide @sc{pem} (privacy enhanced messages) cruft
 (@code{gnus-article-hide-pem}).
 
 @item W W c
@@ -5893,12 +5987,12 @@
 
 @item gnus-cite-hide-absolute
 @vindex gnus-cite-hide-absolute
-The cited text must be have at least this length (default 10) before it
+The cited text must have at least this length (default 10) before it
 is hidden.
 
 @item gnus-cited-text-button-line-format
 @vindex gnus-cited-text-button-line-format
-Gnus adds buttons show where the cited text has been hidden, and to
+Gnus adds buttons to show where the cited text has been hidden, and to
 allow toggle hiding the text.  The format of the variable is specified
 by this format-like variable (@pxref{Formatting Variables}).  These
 specs are legal:
@@ -5959,6 +6053,7 @@
 @item W r
 @kindex W r (Summary)
 @findex gnus-summary-caesar-message
+@c @icon{gnus-summary-caesar-message}
 Do a Caesar rotate (rot13) on the article buffer
 (@code{gnus-summary-caesar-message}). 
 
@@ -6012,6 +6107,13 @@
 @findex gnus-article-x-face-command
 @vindex gnus-article-x-face-command
 @vindex gnus-article-x-face-too-ugly
+@iftex
+@iflatex
+\gnusxface{tmp/xface-karlheg.ps}
+\gnusxface{tmp/xface-kyle.ps}
+\gnusxface{tmp/xface-smb.ps}
+@end iflatex
+@end iftex
 Look for and display any X-Face headers
 (@code{gnus-article-display-x-face}).  The command executed by this
 function is given by the @code{gnus-article-x-face-command} variable.
@@ -6100,12 +6202,12 @@
 
 @item regexp
 All text that match this regular expression will be considered an
-external reference.  Here's a typical regexp that match embedded URLs:
+external reference.  Here's a typical regexp that matches embedded URLs:
 @samp{<URL:\\([^\n\r>]*\\)>}. 
 
 @item button-par
-Gnus has to know which parts of the match is to be highlighted.  This is
-a number that says what sub-expression of the regexp that is to be
+Gnus has to know which parts of the matches is to be highlighted.  This
+is a number that says what sub-expression of the regexp is to be
 highlighted.  If you want it all highlighted, you use 0 here.
 
 @item use-p
@@ -6138,7 +6240,7 @@
 (HEADER REGEXP BUTTON-PAR USE-P FUNCTION DATA-PAR)
 @end lisp
 
-@var{header} is a regular expression.
+@var{HEADER} is a regular expression.
 
 @item gnus-button-url-regexp
 @vindex gnus-button-url-regexp
@@ -6151,7 +6253,7 @@
 
 @item gnus-article-mouse-face
 @vindex gnus-article-mouse-face
-Face is used when the mouse cursor is over a button.
+Face used when the mouse cursor is over a button.
 
 @end table
 
@@ -6185,19 +6287,19 @@
 (@code{gnus-article-date-user}).  The format is specified by the
 @code{gnus-article-time-format} variable, and is a string that's passed
 to @code{format-time-string}.  See the documentation of that variable
-for a list possible format specs.
+for a list of possible format specs.
 
 @item W T e
 @kindex W T e (Summary)
 @findex gnus-article-date-lapsed
-Say how much time has (e)lapsed between the article was posted and now
+Say how much time has elapsed between the article was posted and now
 (@code{gnus-article-date-lapsed}).
 
 @item W T o
 @kindex W T o (Summary)
 @findex gnus-article-date-original
 Display the original date (@code{gnus-article-date-original}).  This can
-be useful if you normally use some other conversion function and is
+be useful if you normally use some other conversion function and are
 worried that it might be doing something totally wrong.  Say, claiming
 that the article was posted in 1854.  Although something like that is
 @emph{totally} impossible.  Don't you trust me? *titter*
@@ -6371,12 +6473,12 @@
 If the group you are reading is located on a backend that does not
 support fetching by @code{Message-ID} very well (like @code{nnspool}),
 you can set @code{gnus-refer-article-method} to an @sc{nntp} method.  It
-would, perhaps, be best if the @sc{nntp} server you consult is the same
-as the one that keeps the spool you are reading from updated, but that's
-not really necessary.
+would, perhaps, be best if the @sc{nntp} server you consult is the one
+updating the spool you are reading from, but that's not really
+necessary.
 
 Most of the mail backends support fetching by @code{Message-ID}, but do
-not do a particularly excellent job of it.  That is, @code{nnmbox} and
+not do a particularly excellent job at it.  That is, @code{nnmbox} and
 @code{nnbabyl} are able to locate articles from any groups, while
 @code{nnml} and @code{nnfolder} are only able to locate articles that
 have been posted to the current group.  (Anything else would be too time
@@ -6400,8 +6502,8 @@
 @cindex pick and read
 
 Some newsreaders (like @code{nn} and, uhm, @code{Netnews} on VM/CMS) use
-a two-phased reading interface.  The user first marks the articles she
-wants to read from a summary buffer.  Then she starts reading the
+a two-phased reading interface.  The user first marks in a summary
+buffer the articles she wants to read.  Then she starts reading the
 articles with just an article buffer displayed.
 
 @findex gnus-pick-mode
@@ -6409,8 +6511,7 @@
 Gnus provides a summary buffer minor mode that allows
 this---@code{gnus-pick-mode}.  This basically means that a few process
 mark commands become one-keystroke commands to allow easy marking, and
-it makes one additional command for switching to the summary buffer
-available. 
+it provides one additional command for switching to the summary buffer.
 
 Here are the available keystrokes when using pick mode:
 
@@ -6420,8 +6521,8 @@
 @findex gnus-summary-mark-as-processable
 Pick the article on the current line
 (@code{gnus-summary-mark-as-processable}).  If given a numerical prefix,
-go to the article on that line and pick that article.  (The line number
-is normally displayed on the beginning of the summary pick lines.)
+go to that article and pick it.  (The line number is normally displayed
+at the beginning of the summary pick lines.)
 
 @item SPACE
 @kindex SPACE (Pick)
@@ -6504,7 +6605,7 @@
 all unpicked articles as read.  The default is @code{nil}.
 
 @vindex gnus-summary-pick-line-format
-The summary line format in pick mode is slightly different than the
+The summary line format in pick mode is slightly different from the
 standard format.  At the beginning of each line the line number is
 displayed.  The pick mode line format is controlled by the
 @code{gnus-summary-pick-line-format} variable (@pxref{Formatting
@@ -6526,8 +6627,9 @@
 
 @kindex g (Binary)
 @findex gnus-binary-show-article
-In fact, the only way to see the actual articles if you have turned this
-mode on is the @kbd{g} command (@code{gnus-binary-show-article}). 
+The only way, in fact, to see the actual articles is the @kbd{g}
+command, when you have turned on this mode
+(@code{gnus-binary-show-article}).
 
 @vindex gnus-binary-mode-hook
 @code{gnus-binary-mode-hook} is called in binary minor mode buffers.
@@ -6613,7 +6715,7 @@
 higher than that number.  The default is @code{t}.  Note that if you
 have several windows displayed side-by-side in a frame and the tree
 buffer is one of these, minimizing the tree window will also resize all
-other windows that are displayed next to it.
+other windows displayed next to it.
 
 @item gnus-generate-tree-function
 @vindex gnus-generate-tree-function
@@ -6625,7 +6727,7 @@
 
 @end table
 
-Here's and example from a horizontal tree buffer:
+Here's an example from a horizontal tree buffer:
 
 @example
 @{***@}-(***)-[odd]-[Gun]
@@ -6658,7 +6760,7 @@
 @cindex mail group commands
 
 Some commands only make sense in mail groups.  If these commands are
-illegal in the current group, they will raise a hell and let you know.
+illegal in the current group, they will raise hell and let you know.
 
 All these commands (except the expiry and edit commands) use the
 process/prefix convention (@pxref{Process/Prefix}).
@@ -6682,6 +6784,7 @@
 @item B DEL
 @kindex B DEL (Summary)
 @findex gnus-summary-delete-article
+@c @icon{gnus-summary-mail-delete}
 Delete the mail article.  This is ``delete'' as in ``delete it from your
 disk forever and ever, never to return again.'' Use with caution.
 (@code{gnus-summary-delete-article}).
@@ -6697,6 +6800,7 @@
 @kindex B c (Summary)
 @cindex copy mail
 @findex gnus-summary-copy-article
+@c @icon{gnus-summary-mail-copy}
 Copy the article from one group (mail group or not) to a mail group
 (@code{gnus-summary-copy-article}).
 
@@ -6794,11 +6898,11 @@
 generation of the summary buffer.  It's quite convenient for customizing
 the threading variables based on what data the newsgroup has.  This hook
 is called from the summary buffer after most summary buffer variables
-has been set.
+have been set.
 
 @vindex gnus-summary-prepare-hook
 @item gnus-summary-prepare-hook
-Is is called after the summary buffer has been generated.  You might use
+It is called after the summary buffer has been generated.  You might use
 it to, for instance, highlight lines or modify the look of the buffer in
 some other ungodly manner.  I don't care.
 
@@ -6830,8 +6934,8 @@
 FAQ from @code{gnus-group-faq-directory}, which is usually a directory
 on a remote machine.  This variable can also be a list of directories.
 In that case, giving a prefix to this command will allow you to choose
-between the various sites.  @code{ange-ftp} probably will be used for
-fetching the file.
+between the various sites.  @code{ange-ftp} or @code{efs} will probably
+be used for fetching the file.
 
 @item H d
 @kindex H d (Summary)
@@ -6875,7 +6979,8 @@
 @findex gnus-summary-execute-command
 This command will prompt you for a header field, a regular expression to
 match on this field, and a command to be executed if the match is made
-(@code{gnus-summary-execute-command}).
+(@code{gnus-summary-execute-command}).  If given a prefix, search
+backward instead.
 
 @item M-&
 @kindex M-& (Summary)
@@ -6916,7 +7021,7 @@
 article (@code{gnus-summary-enter-digest-group}).  Gnus will try to
 guess what article type is currently displayed unless you give a prefix
 to this command, which forces a ``digest'' interpretation.  Basically,
-whenever you see a message that is a collection of other messages on
+whenever you see a message that is a collection of other messages of
 some format, you @kbd{C-d} and read these messages in a more convenient
 fashion.
 
@@ -6965,11 +7070,12 @@
 @findex gnus-summary-exit
 @vindex gnus-summary-exit-hook
 @vindex gnus-summary-prepare-exit-hook
+@c @icon{gnus-summary-exit}
 Exit the current group and update all information on the group
 (@code{gnus-summary-exit}). @code{gnus-summary-prepare-exit-hook} is
-called before doing much of the exiting, and calls
+called before doing much of the exiting, which calls
 @code{gnus-summary-expire-articles} by default.
-@code{gnus-summary-exit-hook} is called after finishing the exiting
+@code{gnus-summary-exit-hook} is called after finishing the exit
 process.  @code{gnus-group-no-more-groups-hook} is run when returning to
 group mode having no more (unread) groups.
 
@@ -6986,6 +7092,7 @@
 @kindex Z c (Summary)
 @kindex c (Summary)
 @findex gnus-summary-catchup-and-exit
+@c @icon{gnus-summary-catchup-and-exit}
 Mark all unticked articles in the group as read and then exit
 (@code{gnus-summary-catchup-and-exit}).
 
@@ -7013,6 +7120,7 @@
 @kindex Z G (Summary)
 @kindex M-g (Summary)
 @findex gnus-summary-rescan-group
+@c @icon{gnus-summary-mail-get}
 Exit the group, check for new articles in the group, and select the
 group (@code{gnus-summary-rescan-group}).  If given a prefix, select all
 articles, both read and unread.
@@ -7127,7 +7235,7 @@
 By default, Gnus tries to make sure that you don't have to read the same
 article more than once by utilizing the crossposting mechanism
 (@pxref{Crosspost Handling}).  However, that simple and efficient
-approach may not work satisfactorily for some users for various
+approach may not work satisfactory for some users for various
 reasons.  
 
 @enumerate
@@ -7147,7 +7255,7 @@
 You may be getting mail that duplicates articles posted to groups.
 @end enumerate
 
-I'm sure there are other situations that @code{Xref} handling fails as
+I'm sure there are other situations where @code{Xref} handling fails as
 well, but these four are the most common situations.
 
 If, and only if, @code{Xref} handling fails for you, then you may
@@ -7163,7 +7271,7 @@
 sledge hammer than anything else.  It works in a very simple
 fashion---if you have marked an article as read, it adds this Message-ID
 to a cache.  The next time it sees this Message-ID, it will mark the
-article as read the the @samp{M} mark.  It doesn't care what group it
+article as read with the @samp{M} mark.  It doesn't care what group it
 saw the article in.
 
 @table @code
@@ -7175,17 +7283,17 @@
 @vindex gnus-save-duplicate-list
 If non-@code{nil}, save the list of duplicates to a file.  This will
 make startup and shutdown take longer, so the default is @code{nil}.
-However, this means that only duplicate articles that is read in a
-single Gnus session are suppressed.  
+However, this means that only duplicate articles read in a single Gnus
+session are suppressed.
 
 @item gnus-duplicate-list-length
 @vindex gnus-duplicate-list-length
-This variables says how many @code{Message-ID}s to keep in the duplicate
+This variable says how many @code{Message-ID}s to keep in the duplicate
 suppression list.  The default is 10000.  
 
 @item gnus-duplicate-file
 @vindex gnus-duplicate-file
-The name of the file to store the duplicate suppression list.  The
+The name of the file to store the duplicate suppression list in.  The
 default is @file{~/News/suppression}.
 @end table
 
@@ -7361,7 +7469,7 @@
 buffer to avoid getting nasty surprises. (For instance, you enter the
 group @samp{alt.sing-a-long} and, before you know it, @sc{mime} has
 decoded the sound file in the article and some horrible sing-a-long song
-comes streaming out out your speakers, and you can't find the volume
+comes screaming out your speakers, and you can't find the volume
 button, because there isn't one, and people are starting to look at you,
 and you try to stop the program, but you can't, and you can't find the
 program to control the volume, and everybody else in the room suddenly
@@ -7447,13 +7555,13 @@
 @item TAB
 @kindex TAB (Article)
 @findex gnus-article-next-button
-Go to the next button, if any (@code{gnus-article-next-button}.  This
+Go to the next button, if any (@code{gnus-article-next-button}).  This
 only makes sense if you have buttonizing turned on.
 
 @item M-TAB
 @kindex M-TAB (Article)
 @findex gnus-article-prev-button
-Go to the previous button, if any (@code{gnus-article-prev-button}.  
+Go to the previous button, if any (@code{gnus-article-prev-button}).  
 
 @end table
 
@@ -7515,7 +7623,7 @@
 @item gnus-page-delimiter
 @vindex gnus-page-delimiter
 This is the delimiter mentioned above.  By default, it is @samp{^L}
-(form linefeed).
+(formfeed).
 @end table
 
 
@@ -7578,7 +7686,7 @@
 Gnus will keep a @code{Message-ID} history file of all the mails it has
 sent.  If it discovers that it has already sent a mail, it will ask the
 user whether to re-send the mail.  (This is primarily useful when
-dealing with @sc{soup} packets and the like where one is apt to sent the
+dealing with @sc{soup} packets and the like where one is apt to send the
 same packet multiple times.)  This variable says what the name of this
 history file is.  It is @file{~/News/Sent-Message-IDs} by default.  Set
 this variable to @code{nil} if you don't want Gnus to keep a history
@@ -7636,12 +7744,12 @@
 @findex gnus-mailing-list-groups
 @cindex mailing lists
 
-If your news server offers groups that are really mailing lists that are
+If your news server offers groups that are really mailing lists
 gatewayed to the @sc{nntp} server, you can read those groups without
 problems, but you can't post/followup to them without some difficulty.
 One solution is to add a @code{to-address} to the group parameters
 (@pxref{Group Parameters}).  An easier thing to do is set the
-@code{gnus-mailing-list-groups} to a regexp that match the groups that
+@code{gnus-mailing-list-groups} to a regexp that matches the groups that
 really are mailing lists.  Then, at least, followups to the mailing
 lists will work most of the time.  Posting to these groups (@kbd{a}) is
 still a pain, though.
@@ -7698,7 +7806,7 @@
 to one or more group(s) on that server.  Which group to use is
 determined by the @code{gnus-message-archive-group} variable.  
 
-This variable can be:
+This variable can be used to do the following:
 
 @itemize @bullet
 @item a string
@@ -7750,6 +7858,9 @@
                            "%Y-%m" (current-time))))))
 @end lisp
 
+(XEmacs 19.13 doesn't have @code{format-time-string}, so you'll have to
+use a different value for @code{gnus-message-archive-group} there.)
+
 Now, when you send a message off, it will be stored in the appropriate
 group.  (If you want to disable storing for just one particular message,
 you can just remove the @code{Gcc} header that has been inserted.)  The
@@ -7761,14 +7872,11 @@
 nice---@samp{misc-mail-september-1995}, or whatever.  New messages will
 continue to be stored in the old (now empty) group.
 
-That's the default method of archiving sent messages.  Gnus also a
+That's the default method of archiving sent messages.  Gnus offers a
 different way for the people who don't like the default method.  In that
 case you should set @code{gnus-message-archive-group} to @code{nil};
 this will disable archiving.
 
-XEmacs 19.13 doesn't have @code{format-time-string}, so you'll have to
-use a different value for @code{gnus-message-archive-group} there.
-
 @table @code
 @item gnus-outgoing-message-group 
 @vindex gnus-outgoing-message-group 
@@ -8005,7 +8113,7 @@
 on the same actual @sc{nntp} server.  You tell Gnus which backend to
 use, and what parameters to set by specifying a @dfn{select method}.
 
-These select methods specifications can sometimes become quite
+These select method specifications can sometimes become quite
 complicated---say, for instance, that you want to read from the
 @sc{nntp} server @samp{news.funet.fi} on port number 13, which
 hangs if queried for @sc{nov} headers and has a buggy select.  Ahem.
@@ -8152,11 +8260,11 @@
 backend, and the second is the @dfn{address}, or @dfn{name}, if you
 will. 
 
-After these two elements, there may be a arbitrary number of
+After these two elements, there may be an arbitrary number of
 @var{(variable form)} pairs.
 
 To go back to the first example---imagine that you want to read from
-port 15 from that machine.  This is what the select method should
+port 15 on that machine.  This is what the select method should
 look like then:
 
 @lisp
@@ -8164,7 +8272,7 @@
 @end lisp
 
 You should read the documentation to each backend to find out what
-variables are relevant, but here's an @code{nnmh} example. 
+variables are relevant, but here's an @code{nnmh} example:
 
 @code{nnmh} is a mail backend that reads a spool-like structure.  Say
 you have two structures that you wish to access: One is your private
@@ -8285,10 +8393,10 @@
 actually the case or not.
 
 That might seem quite naughty, but it does make sense most of the time.
-Let's say you have 10 groups subscribed to the server
+Let's say you have 10 groups subscribed to on server
 @samp{nephelococcygia.com}.  This server is located somewhere quite far
 away from you and the machine is quite slow, so it takes 1 minute just
-to find out that it refuses connection from you today.  If Gnus were to
+to find out that it refuses connection to you today.  If Gnus were to
 attempt to do that 10 times, you'd be quite annoyed, so Gnus won't
 attempt to do that.  Once it has gotten a single ``connection refused'',
 it will regard that server as ``down''.
@@ -8334,7 +8442,7 @@
 @item R
 @kindex R (Server)
 @findex gnus-server-remove-denials
-Remove all marks to whether Gnus was denied connection from all servers
+Remove all marks to whether Gnus was denied connection from any servers
 (@code{gnus-server-remove-denials}). 
 
 @end table
@@ -8385,10 +8493,10 @@
 @cindex nntp authentification
 @findex nntp-send-authinfo
 @findex nntp-send-mode-reader
-@code{nntp-server-opened-hook} 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 is sends the command @code{MODE READER} to
-the server with the @code{nntp-send-mode-reader} function. 
+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.
 
 @item nntp-authinfo-function 
 @vindex nntp-authinfo-function 
@@ -8398,7 +8506,7 @@
 @table @code
 @item nntp-send-authinfo
 @findex nntp-send-authinfo
-This function will used you current login name as the user name and will
+This function will use your current login name as the user name and will
 prompt you for the password.  This is the default.
 
 @item nntp-send-nosy-authinfo
@@ -8413,7 +8521,7 @@
 
 @item nntp-server-action-alist 
 @vindex nntp-server-action-alist 
-This is an list of regexps to match on server types and actions to be
+This is a list of regexps to match on server types and actions to be
 taken when matches are made.  For instance, if you want Gnus to beep
 every time you connect to innd, you could say something like:
 
@@ -8463,10 +8571,10 @@
 changes after connecting to the @sc{nntp} server, Gnus will simply sit
 waiting forever for replies from the server.  To help with this
 unfortunate problem, you can set this command to a number.  Gnus will
-then, if it sits waiting longer than that number of seconds for a reply
-from the server, shut down the connection, start a new one, and resend
+then, if it sits waiting for a reply from the server longer than that
+number of seconds, shut down the connection, start a new one, and resend
 the command.  This should hopefully be transparent to the user.  A
-likely number is 30 seconds. 
+likely number is 30 seconds.
 
 @item nntp-retry-on-break
 @vindex nntp-retry-on-break
@@ -8512,15 +8620,15 @@
 @table @code
 @item nntp-telnet-command
 @vindex nntp-telnet-command
-Command used to start @samp{telnet}.
+Command used to start @code{telnet}.
 
 @item nntp-telnet-switches
 @vindex nntp-telnet-switches
-List of strings to be used as the switches to the telnet command.
+List of strings to be used as the switches to the @code{telnet} command.
 
 @item nntp-telnet-user-name
 @vindex nntp-telnet-user-name
-User name to log in on the remote system as.
+User name for log in on the remote system.
 
 @item nntp-telnet-passwd
 @vindex nntp-telnet-passwd
@@ -8528,14 +8636,14 @@
 
 @item nntp-telnet-parameters
 @vindex nntp-telnet-parameters
-A list of strings that will be executed as a command after logging in
-via telnet.
+A list of strings executed as a command after logging in
+via @code{telnet}.
 
 @end table
 
 @item nntp-end-of-line
 @vindex nntp-end-of-line
-String to use as end-of-line markers when talking to the @sc{nntp}
+String to use as end-of-line marker when talking to the @sc{nntp}
 server.  This is @samp{\r\n} by default, but should be @samp{\n} when
 using @code{rlogin} to talk to the server.
 
@@ -8560,8 +8668,8 @@
 @item nntp-nov-is-evil 
 @vindex nntp-nov-is-evil 
 If the @sc{nntp} server does not support @sc{nov}, you could set this
-variable to @code{t}, but @code{nntp} usually checks whether @sc{nov}
-can be used automatically.
+variable to @code{t}, but @code{nntp} usually checks automatically whether @sc{nov}
+can be used.
 
 @item nntp-xover-commands
 @vindex nntp-xover-commands
@@ -8577,7 +8685,7 @@
 the server.  The server responds with one huge list of lines.  However,
 if you have read articles 2-5000 in the group, and only want to read
 article 1 and 5001, that means that @code{nntp} will fetch 4999 @sc{nov}
-lines that you do not want, and will not use.  This variable says how
+lines that you will not need.  This variable says how
 big a gap between two consecutive articles is allowed to be before the
 @code{XOVER} request is split into several request.  Note that if your
 network is fast, setting this variable to a really small number means
@@ -8640,19 +8748,19 @@
 
 @item nnspool-active-file
 @vindex nnspool-active-file
-The path of the active file.
+The path to the active file.
 
 @item nnspool-newsgroups-file
 @vindex nnspool-newsgroups-file
-The path of the group descriptions file.
+The path to the group descriptions file.
 
 @item nnspool-history-file
 @vindex nnspool-history-file
-The path of the news history file.
+The path to the news history file.
 
 @item nnspool-active-times-file
 @vindex nnspool-active-times-file
-The path of the active date file.
+The path to the active date file.
 
 @item nnspool-nov-is-evil
 @vindex nnspool-nov-is-evil
@@ -8699,8 +8807,8 @@
 mail backend of your choice into @code{gnus-secondary-select-methods},
 and things will happen automatically.
 
-For instance, if you want to use @code{nnml} (which is a one file per
-mail backend), you could put the following in your @file{.gnus} file:
+For instance, if you want to use @code{nnml} (which is a "one file per
+mail" backend), you could put the following in your @file{.gnus} file:
 
 @lisp
 (setq gnus-secondary-select-methods
@@ -8725,11 +8833,11 @@
 This will result in three new @code{nnml} mail groups being created:
 @samp{nnml:junk}, @samp{nnml:crazy}, and @samp{nnml:other}.  All the
 mail that doesn't fit into the first two groups will be placed in the
-latter group.
+last group.
 
 This should be sufficient for reading mail with Gnus.  You might want to
-give the other sections in this part of the manual a perusal, though,
-especially @pxref{Choosing a Mail Backend} and @pxref{Expiring Mail}. 
+give the other sections in this part of the manual a perusal, though.
+Especially @pxref{Choosing a Mail Backend} and @pxref{Expiring Mail}. 
 
 
 @node Splitting Mail
@@ -8773,10 +8881,10 @@
 If you like to tinker with this yourself, you can set this variable to a
 function of your choice.  This function will be called without any
 arguments in a buffer narrowed to the headers of an incoming mail
-message.  The function should return a list of groups names that it
+message.  The function should return a list of group names that it
 thinks should carry this mail message.
 
-Note that the mail backends are free to maul the poor, innocent
+Note that the mail backends are free to maul the poor, innocent,
 incoming headers all they want to.  They all add @code{Lines} headers;
 some add @code{X-Gnus-Group} headers; most rename the Unix mbox
 @code{From<SPACE>} line to something else.
@@ -8791,7 +8899,7 @@
 @cindex crosspost
 @cindex links
 @code{nnmh} and @code{nnml} makes crossposts by creating hard links to
-the crossposted articles.  However, not all files systems support hard
+the crossposted articles.  However, not all file systems support hard
 links.  If that's the case for you, set
 @code{nnmail-crosspost-link-function} to @code{copy-file}.  (This
 variable is @code{add-name-to-file} by default.)  
@@ -8869,7 +8977,7 @@
 
 @vindex nnmail-crash-box
 @item nnmail-crash-box
-When the mail backends read a spool file, it is first moved to this
+When a mail backend reads a spool file, mail is first moved to this
 file, which is @file{~/.gnus-crash-box} by default.  If this file
 already exists, it will always be read (and incorporated) before any
 other spool files.
@@ -8911,9 +9019,9 @@
 
 @item nnmail-tmp-directory
 @vindex nnmail-tmp-directory
-This variable says where to move the incoming mail to while processing
+This variable says where to move incoming mail to -- while processing
 it.  This is usually done in the same directory that the mail backend
-inhabits (i.e., @file{~/Mail/}), but if this variable is non-@code{nil},
+inhabits (e.g., @file{~/Mail/}), but if this variable is non-@code{nil},
 it will be used instead.
 
 @item nnmail-movemail-program
@@ -8939,18 +9047,19 @@
 @c Since Red Gnus is an alpha release, it is to be expected to lose mail.
 (No Gnus release since (ding) Gnus 0.10 (or something like that) have
 lost mail, I think, but that's not the point.  (Except certain versions
-of Red Gnus.))  By not deleting the Incoming* files, one can be sure to
-not lose mail -- if Gnus totally whacks out, one can always recover what
+of Red Gnus.))  By not deleting the Incoming* files, one can be sure not
+to lose mail -- if Gnus totally whacks out, one can always recover what
 was lost.
 
-Delete the @file{Incoming*} files at will.
+You may delete the @file{Incoming*} files at will.
 
 @item nnmail-use-long-file-names
 @vindex nnmail-use-long-file-names
 If non-@code{nil}, the mail backends will use long file and directory
-names.  Groups like @samp{mail.misc} will end up in directories like
-@file{mail.misc/}.  If it is @code{nil}, the same group will end up in
-@file{mail/misc/}.
+names.  Groups like @samp{mail.misc} will end up in directories
+(assuming use of @code{nnml} backend) or files (assuming use of
+@code{nnfolder} backend) like @file{mail.misc}.  If it is @code{nil},
+the same group will end up in @file{mail/misc}.
 
 @item nnmail-delete-file-function
 @vindex nnmail-delete-file-function
@@ -9010,10 +9119,9 @@
 @samp{group}: If the split is a string, that will be taken as a group name. 
 
 @item
-@var{(FIELD VALUE SPLIT)}: If the split is a list, and the first
-element is a string, then that means that if header FIELD (a regexp)
-contains VALUE (also a regexp), then store the message as specified by
-SPLIT.
+@var{(FIELD VALUE SPLIT)}: If the split is a list, the first element of
+which is a string, then store the message as specified by SPLIT, if
+header FIELD (a regexp) contains VALUE (also a regexp).
 
 @item
 @var{(| SPLIT...)}: If the split is a list, and the first element is
@@ -9047,22 +9155,21 @@
 @var{FIELD} and @var{VALUE} can also be lisp symbols, in that case they
 are expanded as specified by the variable
 @code{nnmail-split-abbrev-alist}.  This is an alist of cons cells, where
-the car of the cells contains the key, and the cdr contains a string.
+the car of a cell contains the key, and the cdr contains the associated
+value.
 
 @vindex nnmail-split-fancy-syntax-table
 @code{nnmail-split-fancy-syntax-table} is the syntax table in effect
 when all this splitting is performed.
 
 If you want to have Gnus create groups dynamically based on some
-information in the headers, you can say things like:
+information in the headers (i.e., do @code{replace-match}-like
+substitions in the group names), you can say things like:
 
 @example
 (any "debian-\(\\w*\\)@@lists.debian.org" "mail.debian.\\1")
 @end example
 
-That is, do @code{replace-match}-like substitions in the group names. 
-
-
 @node Mail and Procmail
 @subsection Mail and Procmail
 @cindex procmail
@@ -9081,15 +9188,15 @@
 
 When a mail backend is queried for what groups it carries, it replies
 with the contents of that variable, along with any groups it has figured
-out that it carries by other means.  None of the backends (except
-@code{nnmh}) actually go out to the disk and check what groups actually
+out that it carries by other means.  None of the backends, except
+@code{nnmh}, actually go out to the disk and check what groups actually
 exist.  (It's not trivial to distinguish between what the user thinks is
 a basis for a newsgroup and what is just a plain old file or directory.)
 
-This means that you have to tell Gnus (and the backends) what groups
-exist by hand.
-
-Let's take the @code{nnmh} backend as an example. 
+This means that you have to tell Gnus (and the backends) by hand what
+groups exist.
+
+Let's take the @code{nnmh} backend as an example:
 
 The folders are located in @code{nnmh-directory}, say, @file{~/Mail/}.
 There are three folders, @file{foo}, @file{bar} and @file{mail.baz}.
@@ -9118,14 +9225,14 @@
 @code{nnmail-resplit-incoming} to @code{t}.
 
 @vindex nnmail-keep-last-article
-If you use @code{procmail} to split things directory into an @code{nnmh}
+If you use @code{procmail} to split things directly into an @code{nnmh}
 directory (which you shouldn't do), you should set
 @code{nnmail-keep-last-article} to non-@code{nil} to prevent Gnus from
-ever expiring the final article (i. e., the article with the highest
+ever expiring the final article (i.e., the article with the highest
 article number) in a mail newsgroup.  This is quite, quite important.
 
 Here's an example setup:  The incoming spools are located in
-@file{~/incoming/} and have @samp{""} as suffixes (i. e., the incoming
+@file{~/incoming/} and have @samp{""} as suffixes (i.e., the incoming
 spool files have the same names as the equivalent groups).  The
 @code{nnfolder} backend is to be used as the mail interface, and the
 @code{nnfolder} directory is @file{~/fMail/}.
@@ -9162,15 +9269,15 @@
 Go to the group buffer.
 
 @item 
-Type `G f' and give the path of the mbox file when prompted to create an
+Type `G f' and give the path to the mbox file when prompted to create an
 @code{nndoc} group from the mbox file (@pxref{Foreign Groups}).
 
 @item 
 Type `SPACE' to enter the newly created group.
 
 @item
-Type `M P b' to process-mark all articles in this group (@pxref{Setting
-Process Marks}).
+Type `M P b' to process-mark all articles in this group's buffer
+(@pxref{Setting Process Marks}).
 
 @item 
 Type `B r' to respool all the process-marked articles, and answer
@@ -9233,9 +9340,9 @@
 (add-hook 'gnus-mark-article-hook 'gnus-summary-mark-unread-as-read)
 @end lisp
 
-Note that making a group auto-expirable don't mean that all read
+Note that making a group auto-expirable doesn't mean that all read
 articles are expired---only the articles that are marked as expirable
-will be expired.  Also note the using the @kbd{d} command won't make
+will be expired.  Also note that using the @kbd{d} command won't make
 groups expirable---only semi-automatic marking of articles as read will
 mark the articles as expirable in auto-expirable groups.
 
@@ -9252,7 +9359,7 @@
 
 If you use adaptive scoring (@pxref{Adaptive Scoring}) and
 auto-expiring, you'll have problems.  Auto-expiring and adaptive scoring
-doesn't really mix very well.  
+don't really mix very well.  
 
 @vindex nnmail-expiry-wait
 The @code{nnmail-expiry-wait} variable supplies the default time an
@@ -9280,13 +9387,13 @@
                6))))
 @end lisp
 
-The group names that this function is fed are ``unadorned'' group
+The group names this function is fed are ``unadorned'' group
 names---no @samp{nnml:} prefixes and the like.
 
 The @code{nnmail-expiry-wait} variable and
-@code{nnmail-expiry-wait-function} function can be either a number (not
-necessarily an integer) or the symbols @code{immediate} or
-@code{never}.  
+@code{nnmail-expiry-wait-function} function can either be a number (not
+necessarily an integer) or one of the symbols @code{immediate} or
+@code{never}.
 
 You can also use the @code{expiry-wait} group parameter to selectively
 change the expiry period (@pxref{Group Parameters}).
@@ -9297,8 +9404,8 @@
 easier for procmail users.
 
 @vindex gnus-total-expirable-newsgroups
-By the way, that line up there about Gnus never expiring non-expirable
-articles is a lie.  If you put @code{total-expire} in the group
+By the way: That line up there, about Gnus never expiring non-expirable
+articles, is a lie.  If you put @code{total-expire} in the group
 parameters, articles will not be marked as expirable, but all read
 articles will be put through the expiry process.  Use with extreme
 caution.  Even more dangerous is the
@@ -9360,7 +9467,7 @@
 @item nnmail-remove-leading-whitespace
 @findex nnmail-remove-leading-whitespace
 Clear leading white space that ``helpful'' listservs have added to the
-headers too make them look nice.  Aaah.  
+headers to make them look nice.  Aaah.  
 
 @item nnmail-remove-list-identifiers
 @findex nnmail-remove-list-identifiers
@@ -9405,7 +9512,7 @@
 @vindex nnmail-message-id-cache-length
 @vindex nnmail-message-id-cache-file
 @cindex duplicate mails
-If you are a member of a couple of mailing list, you will sometime
+If you are a member of a couple of mailing lists, you will sometimes
 receive two copies of the same mail.  This can be quite annoying, so
 @code{nnmail} checks for and treats any duplicates it might find.  To do
 this, it keeps a cache of old @code{Message-ID}s---
@@ -9565,8 +9672,8 @@
 format.  It should be used with some caution.
 
 @vindex nnml-directory
-If you use this backend, Gnus will split all incoming mail into files;
-one file for each mail, and put the articles into the correct
+If you use this backend, Gnus will split all incoming mail into files,
+one file for each mail, and put the articles into the corresponding
 directories under the directory specified by the @code{nnml-directory}
 variable.  The default value is @file{~/Mail/}.
 
@@ -9584,7 +9691,7 @@
 
 @code{nnml} is probably the slowest backend when it comes to article
 splitting.  It has to create lots of files, and it also generates
-@sc{nov} databases for the incoming mails.  This makes is the fastest
+@sc{nov} databases for the incoming mails.  This makes it the fastest
 backend when it comes to reading mail.
 
 Virtual server settings:
@@ -9734,8 +9841,8 @@
 
 @code{ange-ftp} changes that picture dramatically.  For instance, if you
 enter the @code{ange-ftp} file name
-@file{/ftp.hpc.uh.edu:/pub/emacs/ding-list/} as the the directory name,
-@code{ange-ftp} will actually allow you to read this directory over at
+@file{/ftp.hpc.uh.edu:/pub/emacs/ding-list/} as the directory name,
+@code{ange-ftp} or @code{efs} will actually allow you to read this directory over at
 @samp{sina} as a newsgroup.  Distributed news ahoy!
 
 @code{nndir} will use @sc{nov} files if they are present.
@@ -9882,9 +9989,9 @@
 @item nndoc-article-type
 @vindex nndoc-article-type
 This should be one of @code{mbox}, @code{babyl}, @code{digest},
-@code{mmdf}, @code{forward}, @code{rfc934}, @code{rfc822-forward},
-@code{news}, @code{rnews}, @code{mime-digest}, @code{clari-briefs}, or
-@code{guess}.
+@code{news}, @code{rnews}, @code{mmdf}, @code{forward}, @code{rfc934},
+@code{rfc822-forward}, @code{mime-digest}, @code{standard-digest},
+@code{slack-digest}, @code{clari-briefs} or @code{guess}.
 
 @item nndoc-post-type
 @vindex nndoc-post-type
@@ -9976,7 +10083,7 @@
 
 @item article-transform-function
 If present, this function is called when requesting an article.  It's
-meant to be used how more wide-ranging transformation of both head and
+meant to be used for more wide-ranging transformation of both head and
 body of the article.
 
 @item generate-head-function
@@ -10012,8 +10119,7 @@
 @code{nndoc-add-type} function.  It takes two parameters---the first is
 the definition itself and the second (optional) parameter says where in
 the document type definition alist to put this definition.  The alist is
-traversed sequentially, and @code{nndoc-TYPE-type-p} is called for each
-type.  So @code{nndoc-mmdf-type-p} is called to see whether a document
+traversed sequentially, and @code{nndoc-TYPE-type-p} is called for a given type @code{TYPE}.  So @code{nndoc-mmdf-type-p} is called to see whether a document
 is of @code{mmdf} type, and so on.  These type predicates should return
 @code{nil} if the document is not of the correct type; @code{t} if it is
 of the correct type; and a number if the document might be of the
@@ -10061,7 +10167,7 @@
 
 @table @dfn
 @item message packets
-These are packets made at the server, and typically contains lots of
+These are packets made at the server, and typically contain lots of
 messages for you to read.  These are called @file{SoupoutX.tgz} by
 default, where @var{X} is a number.
 
@@ -10232,7 +10338,7 @@
 
 @item nnsoup-replies-directory 
 @vindex nnsoup-replies-directory 
-All replies will stored in this directory before being packed into a
+All replies will be stored in this directory before being packed into a
 reply packet.  The default is @file{~/SOUP/replies/"}.
 
 @item nnsoup-replies-format-type
@@ -10243,8 +10349,8 @@
 
 @item nnsoup-replies-index-type
 @vindex nnsoup-replies-index-type
-The index type of the replies packet.  The is @samp{?n}, which means
-``none''.  Don't fiddle with this one either!
+The index type of the replies packet.  The default is @samp{?n}, which
+means ``none''.  Don't fiddle with this one either!
 
 @item nnsoup-active-file
 @vindex nnsoup-active-file
@@ -10325,13 +10431,13 @@
 groups---they have a very fleeting idea of article numbers.  In fact,
 each time you enter an @code{nnweb} group (not even changing the search
 pattern), you are likely to get the articles ordered in a different
-manner.  Not even using duplicate suppression (@code{Duplicate
+manner.  Not even using duplicate suppression (@pxref{Duplicate
 Suppression}) will help, since @code{nnweb} doesn't even know the
 @code{Message-ID} of the articles before reading them using some search
 engines (DejaNews, for instance).  The only possible way to keep track
 of which articles you've read is by scoring on the @code{Date}
-header---mark all articles that were posted before the last date you
-read the group as read.
+header---mark all articles posted before the last date you read the
+group as read.
 
 If the search engine changes its output substantially, @code{nnweb}
 won't be able to parse it and will fail.  One could hardly fault the Web
@@ -10410,7 +10516,7 @@
 
 @item nngateway-header-transformation
 @vindex nngateway-header-transformation
-News headers have often have to be transformed in some odd way or other
+News headers often have to be transformed in some odd way or other
 for the mail-to-news gateway to accept it.  This variable says what 
 transformation should be called, and defaults to
 @code{nngateway-simple-header-transformation}.  The function is called
@@ -10418,8 +10524,8 @@
 gateway address.
 
 This default function just inserts a new @code{To} header based on the
-@code{Newsgroups} header and the gateway address---an article with this
-@code{Newsgroups} header:
+@code{Newsgroups} header and the gateway address.
+For instance, an article with this @code{Newsgroups} header:
 
 @example
 Newsgroups: alt.religion.emacs
@@ -10460,7 +10566,7 @@
 An @dfn{nnvirtual group} is really nothing more than a collection of
 other groups.
 
-For instance, if you are tired of reading many small group, you can
+For instance, if you are tired of reading many small groups, you can
 put them all in one big group, and then grow tired of reading one
 big, unwieldy group.  The joys of computing!
 
@@ -10496,10 +10602,10 @@
 end up in this one, and there should be no duplicates.  Threading (and
 the rest) will still work as usual, but there might be problems with the
 sequence of articles.  Sorting on date might be an option here
-(@pxref{Selecting a Group}.
+(@pxref{Selecting a Group}).
 
 One limitation, however---all groups that are included in a virtual
-group has to be alive (i.e., subscribed or unsubscribed).  Killed or
+group have to be alive (i.e., subscribed or unsubscribed).  Killed or
 zombie groups can't be component groups for @code{nnvirtual} groups.
 
 @vindex nnvirtual-always-rescan
@@ -10509,8 +10615,8 @@
 default) and you read articles in a component group after the virtual
 group has been activated, the read articles from the component group
 will show up when you enter the virtual group.  You'll also see this
-effect if you have two virtual groups that contain the same component
-group.  If that's the case, you should set this variable to @code{t}.
+effect if you have two virtual groups that have a component group in
+common.  If that's the case, you should set this variable to @code{t}.
 Or you can just tap @code{M-g} on the virtual group every time before
 you enter it---it'll have much the same effect.
 
@@ -10531,11 +10637,11 @@
 
 The address field of the @code{nnkiboze} method is, as with
 @code{nnvirtual}, a regexp to match groups to be ``included'' in the
-@code{nnkiboze} group.  There most similarities between @code{nnkiboze}
-and @code{nnvirtual} ends.
+@code{nnkiboze} group.  That's where most similarities between @code{nnkiboze}
+and @code{nnvirtual} end.
 
 In addition to this regexp detailing component groups, an @code{nnkiboze} group
-must have a score file to say what articles that are to be included in
+must have a score file to say what articles are to be included in
 the group (@pxref{Scoring}).
 
 @kindex M-x nnkiboze-generate-groups
@@ -10543,7 +10649,7 @@
 You must run @kbd{M-x nnkiboze-generate-groups} after creating the
 @code{nnkiboze} groups you want to have.  This command will take time.  Lots of
 time.  Oodles and oodles of time.  Gnus has to fetch the headers from
-all the articles in all the components groups and run them through the
+all the articles in all the component groups and run them through the
 scoring process to determine if there are any articles in the groups
 that are to be part of the @code{nnkiboze} groups.
 
@@ -10560,11 +10666,10 @@
 @code{nnkiboze-directory}, which is @file{~/News/} by default.  One
 contains the @sc{nov} header lines for all the articles in the group,
 and the other is an additional @file{.newsrc} file to store information
-on what groups that have been searched through to find component
-articles.
-
-Articles that are marked as read in the @code{nnkiboze} group will have their
-@sc{nov} lines removed from the @sc{nov} file.
+on what groups have been searched through to find component articles.
+
+Articles that are marked as read in the @code{nnkiboze} group will have
+their @sc{nov} lines removed from the @sc{nov} file.
 
 
 @node Scoring
@@ -13030,7 +13135,7 @@
 (gnus-demon-scan-pgp 60 t)
 @end lisp
 
-This @var{time} parameter and than @var{idle} parameter works together
+This @var{time} parameter and than @var{idle} parameter work together
 in a strange, but wonderful fashion.  Basically, if @var{idle} is
 @code{nil}, then the function will be called every @var{time} minutes.
 
@@ -13207,6 +13312,23 @@
 @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.
@@ -13295,6 +13417,20 @@
 
 @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.
 
diff -r 4de2936b4e77 -r 0132846995bd man/message.texi
--- a/man/message.texi	Mon Aug 13 09:42:28 2007 +0200
+++ b/man/message.texi	Mon Aug 13 09:43:35 2007 +0200
@@ -1,7 +1,7 @@
 \input texinfo                  @c -*-texinfo-*-
 
 @setfilename message
-@settitle Message 5.4.56 Manual
+@settitle Message 5.4.59 Manual
 @synindex fn cp
 @synindex vr cp
 @synindex pg cp
@@ -39,7 +39,7 @@
 @tex
 
 @titlepage
-@title Message 5.4.56 Manual
+@title Message 5.4.59 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.56.  Message is distributed with
+This manual corresponds to Message 5.4.59.  Message is distributed with
 the Gnus distribution bearing the same version number as this manual
 has. 
 
@@ -176,7 +176,7 @@
 The @code{message-wide-reply} pops up a message buffer that's a wide
 reply to the message in the current buffer.  A @dfn{wide reply} is a
 reply that goes out to all people listed in the @code{To}, @code{From}
-and @code{Cc} headers.
+(or @code{Reply-to}) and @code{Cc} headers.
 
 @vindex message-wide-reply-to-function
 Message uses the normal methods to determine where wide replies are to go,
diff -r 4de2936b4e77 -r 0132846995bd man/viper-cmd.texi
--- a/man/viper-cmd.texi	Mon Aug 13 09:42:28 2007 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1294 +0,0 @@
-@node Commands,,Customization,Top,Top
-@chapter Commands
-
-This section is a semi-automatically bowdlerized version of the Vi 
-reference created by @* @samp{maart@@cs.vu.nl} and others. It can be 
-found on the Vi archives. Very little has been changed for Viper.@refill
-
-@menu
-* Groundwork::			Textual Conventions and Viper basics
-* Text Handling::		Moving, Editing, Undoing.
-* Display::			Scrolling.
-* File and Buffer Handling::	Editing, Writing and Quitting.
-* Mapping::			Mapping Keys, Keyboard Macros
-* Shell Commands::		Accessing Shell Commands, Processing Text
-* Options::			Ex options, the @kbd{:set} commands
-* Emacs Related Commands::	Meta Keys, Windows
-* Mouse-bound Commands::        Search and insertion of text
-@end menu
-
-@node Groundwork, Text Handling, Commands, Commands
-@comment  node-name,  next,  previous,  up
-@section Groundwork
-
-The VI command set is based on the idea of combining motion commands
-with other commands. The motion command is used as a text region
-specifier for other commands.
-We classify motion commands into @dfn{point commands} and
-@dfn{line commands}.@refill
-
-@cindex point commands
-
-The point commands are:
-
-@quotation
-@kbd{h}, @kbd{l}, @kbd{0},  @kbd{$}, @kbd{w}, @kbd{W}, @kbd{b}, @kbd{B},
-@kbd{e}, @kbd{E}, @kbd{(}, @kbd{)}, @kbd{/}, @kbd{?}, @kbd{`}, @kbd{f},
-@kbd{F}, @kbd{t}, @kbd{T}, @kbd{%}, @kbd{;}, @kbd{,}, @kbd{^}
-@end quotation
-
-@cindex line commands
-
-The line commands are:
-
-@quotation
-@kbd{j}, @kbd{k}, @kbd{+}, @kbd{-}, @kbd{H}, @kbd{M}, @kbd{L}, @kbd{@{},
-@kbd{@}}, @kbd{G}, @kbd{'},  @kbd{[[}, @kbd{]]}, @kbd{[]}
-@end quotation
-@noindent
-
-Text Deletion Commands (@xref{Deleting Text}), Change commands
-(@xref{Changing Text}), even Shell Commands (@xref{Shell Commands})
-use these commands to describe a region of text to operate on.
-
-@cindex r and R region specifiers
-
-Viper adds two region descriptors, @kbd{r} and @kbd{R}. These describe
-the Emacs regions (@xref{Basics}), but they are not movement commands.
-
-The command description uses angle brackets @samp{<>} to indicate
-metasyntactic variables, since the normal conventions of using simple
-text can be confusing with Viper where the commands themselves are
-characters. Watch out where @kbd{<} shift commands and @kbd{<count>} are
-mentioned together!!!
-
-@kindex <move>
-@kindex <a-z>
-@kindex <address>
-@cindex <move>
-@cindex <a-z>
-@cindex <address>
-@cindex movements
-
-@samp{<move>} refers to the above movement commands, and @samp{<a-z>}
-refers to registers or textmarkers from @samp{a} to @samp{z}. Note
-that the @samp{<move>}  is described by full move commands, that is to
-say they will take counts, and otherwise behave like normal move commands.
-@cindex Ex addresses
-@samp{<address>} refers to Ex line addresses, which include
-
-@table @kbd
-@item . <No address>
-Current line
-@item .+n .-n
-Add or subtract for current line
-@item number
-Actual line number, use @kbd{.=} to get the line number
-@item '<a-z>
-Textmarker
-@item $
-Last line
-@item x,y
-Where x and y are one of the above
-@item %
-@cindex % (Ex address)
-For the whole file, same as (1,$).
-@item /pat/
-@item ?pat?
-Next or previous line with pattern pat
-@end table
-
-@cindex % (Current file)
-Note that @samp{%} is used in Ex commands to mean current file. If you
-want a @samp{%} in your command, it must be escaped as @samp{\%}.
-@cindex # (Previous file)
-Similarly, @samp{#} expands to the previous file. The previous file is
-the first file in @kbd{:args} listing. This defaults to previous window
-in the VI sense if you have one window only.
-
-@kindex <args>
-@kindex <cmd>
-@cindex <args>
-@cindex <cmd>
-@noindent
-Others like @samp{<args> -- arguments}, @samp{<cmd> -- command} etc.
-should be fairly obvious.
-
-@noindent
-Common characters referred to include:
-
-@table @kbd
-@item <sp>
-Space 
-@item <ht>
-Tab 
-@item <lf>
-Linefeed 
-@item <esc>
-Escape
-@item <cr>
-Return, Enter
-@end table
-@cindex <cr>
-@cindex <esc>
-@cindex <lf>
-@cindex <ht>
-@cindex <sp>
-
-@cindex words
-@cindex WORDS
-@cindex char
-@cindex CHAR
-
-We also use @samp{word} for alphanumeric/non-alphanumeric words, and 
-@samp{WORD} for whitespace delimited words. @samp{char} refers to any
-ASCII character, @samp{CHAR} to non-whitespace character. 
-Brackets @samp{[]} indicate optional parameters; @samp{<count>} also 
-optional, usually defaulting to 1. Brackets are elided for
-@samp{<count>} to eschew obfuscation.
-
-Viper's idea of Vi's words is slightly different from Vi. First, Viper
-words understand Emacs symbol tables. Therefore, all symbols declared to be
-alphanumeric in a symbol table can automatically be made part of the Viper
-word.  This is useful when, for instance, editing text containing European,
-Cyrillic, etc., letters.
-
-Second, Viper lets you depart from Vi's idea of a word by changing the
-value of @code{vip-syntax-preference}. By default, this variable is set to
-@code{'strict-vi}, which means that alphanumeric symbols are exactly as
-in Vi.
-However, if the value is @code{'reformed-vi} then alphanumeric
-symbols will be those specified by the current Emacs syntax table (which
-may be different for different major modes) plus the underscore symbol
-@code{_}. The user can also specify the value @code{'emacs}, which would
-make Viper use exactly the Emacs notion of word. In particular, the
-underscore may not be part of a word. Finally, if
-@code{vip-syntax-preference} is set to @code{'extended}, Viper words would
-consist of characters that are classified as alphanumeric @emph{or} as
-parts of symbols. This is convenient for writing programs and in many other
-situations.
-
-@vindex @code{vip-syntax-preference}
-@cindex syntax table
-
-@code{vip-syntax-preference} is a local variable, so it can have different
-values for different major modes. For instance, in programming modes it can
-have the value @code{'extended}. In text modes where words contain special
-characters, such as European (non-English) letters, Cyrillic letters, etc.,
-the value can be @code{'reformed-vi} or @code{'emacs}.
-
-Changes to @code{vip-syntax-preference} should be done in the hooks to
-various major modes. Furthermore, for these changes to take effect, you
-should execute @code{(vip-update-alphanumeric-class)} right after changing
-the value of @code{vip-syntax-preference}.
-
-The above discussion concerns only the movement commands. In regular
-expressions, words remain the same as in Emacs.  That is, the expressions
-@code{\w}, @code{\>}, @code{\<}, etc., use Emacs' idea of what is a word,
-and they don't look into the value of variable
-@code{vip-syntax-preference}. This is because Viper doesn't change syntax
-tables in order to not thwart the various major modes that set these
-tables.
-
-The usual Emacs convention is used to indicate Control Characters, i.e
-C-h for Control-h. @emph{Do not confuse this to mean the separate
-characters C - h!!!} The @kbd{^} is itself, never used to indicate a
-Control character.
-
-@node Text Handling, Display, Groundwork, Commands
-@section Text Handling
-
-@menu
-* Move Commands::		Moving, Searching
-* Marking::		        Textmarkers in Viper and the Emacs Mark.
-* Appending Text::		Text insertion, Shifting, Putting
-* Editing in Insert State::	Autoindent, Quoting etc.
-* Deleting Text::		Deleting
-* Changing Text::		Changing, Replacement, Joining
-* Search and Replace::		Searches, Query Replace, Pattern Commands
-* Yanking::			Yanking, Viewing Registers
-* Undoing::			Multiple Undo, Backups
-@end menu
-
-@node Move Commands,Marking,,Text Handling
-@subsection Move Commands
-
-@cindex movement commands
-@cindex searching
-@cindex textmarkers
-@cindex markers
-@cindex column movement
-@cindex paragraphs
-@cindex headings
-@cindex sections
-@cindex sentences
-@cindex matching parens
-@cindex paren matching
-
-@table @kbd
-@item <count>  h  C-h
-<count> chars to the left.
-@item <count>  j  <lf> C-n
-<count> lines downward.
-@item <count>  l  <sp>
-<count> chars to the right.
-@item <count>  k  C-p
-<count> lines upward.
-@item <count>  $
-To the end of line <count> from the cursor.
-@item <count>  ^
-To the first CHAR <count> - 1 lines lower.
-@item <count>  -
-To the first CHAR <count> lines higher.
-@item <count>  +  <cr>
-To the first CHAR <count> lines lower.
-@item  0
-To the first char of the line.
-@item <count> |
-To column <count>
-@item <count>  f<char>
-<count> <char>s to the right (find).
-@item <count>  t<char>
-Till before <count> <char>s to the right.
-@item <count>  F<char>
-<count> <char>s to the left.
-@item <count>  T<char>
-Till after <count> <char>s to the left.
-@item <count>  ;
-Repeat latest @kbd{f t F T} <count> times.
-@item <count>  ,
-Repeat latest @kbd{f t F T}
-<count> times in opposite direction.
-@item <count>  w
-<count> words forward.
-@item <count>  W
-<count> WORDS forward.
-@item <count>  b
-<count> words backward.
-@item <count>  B
-<count> WORDS backward.
-@item <count>  e
-To the end of word <count> forward.
-@item <count>  E
-To the end of WORD <count> forward.
-@item <count>  G
-Go to line <count> (default end-of-file).
-@item <count>  H
-To line <count> from top of the screen (home).
-@item <count>  L
-To line <count> from bottom of the screen (last).
-@item  M
-To the middle line of the screen.
-@item <count>  )
-<count> sentences forward.
-@item <count>  (
-<count> sentences backward.
-@item <count>  @}
-<count> paragraphs forward.
-@item <count>  @{
-<count> paragraphs backward.
-@item <count>  ]]
-To the <count>th heading.
-@item <count>  [[
-To the <count>th previous heading.
-@item <count>  []
-To the end of <count>th heading.
-@item  m<a-z>
-Mark the cursor position with a letter.
-@item  `<a-z>
-To the mark.
-@item  '<a-z>
-To the first CHAR of the line with the mark.
-@item [<a-z>
-Show contents of textmarker.
-@item ]<a-z>
-Show contents of register.
-@item  ``
-To the cursor position before the latest absolute
-jump (of which are examples @kbd{/} and @kbd{G}).
-@item  ''
-To the first CHAR of the line on which the cursor
-was placed before the latest absolute jump.
-@item <count>  /<string>
-To the <count>th occurrence of <string>.
-@item <count>  /<cr>
-To the <count>th occurrence of <string> from previous @kbd{/ or ?}.
-@item <count>  ?<string>
-To the <count>th previous occurrence of <string>.
-@item <count>  ?<cr>
-To the <count>th previous occurrence of <string> from previous @kbd{? or /}.
-@item  n
-Repeat latest @kbd{/} @kbd{?} (next).
-@item  N
-Repeat latest search in opposite direction.
-@item C-c /
-Without a prefix argument, this command toggles
-case-sensitive/case-insensitive search modes and plain vanilla/regular
-expression search. With the prefix argument 1, i.e.,
-@kbd{1 C-c /}, this toggles case-sensitivity; with the prefix argument 2,
-toggles plain vanilla search and search using
-regular expressions. @xref{Viper Specials}, for alternative ways to invoke
-this function.
-@cindex vanilla search
-@cindex case-sensitive search
-@cindex case-insensitive search
-@item  %
-Find the next bracket/parenthesis/brace and go to its match.
-By default, Viper ignores brackets/parentheses/braces that occur inside
-parentheses. You can change this by setting
-@code{vip-parse-sexp-ignore-comments} to nil in your @file{.vip} fipe.
-This option can also be toggled interactively if you quickly hit @kbd{%}
-three times.
-@end table
-@kindex @kbd{%}
-@kindex @kbd{C-c /}
-@kindex @kbd{N}
-@kindex @kbd{n}
-@kindex @kbd{?<cr>}
-@kindex @kbd{/<cr>}
-@kindex @kbd{?<string>}
-@kindex @kbd{/<string>}
-@kindex @kbd{''}
-@kindex @kbd{``}
-@kindex @kbd{]<a-z>}
-@kindex @kbd{[<a-z>}
-@kindex @kbd{'<a-z>}
-@kindex @kbd{`<a-z>}
-@kindex @kbd{m<a-z>}
-@kindex @kbd{[]}
-@kindex @kbd{[[}
-@kindex @kbd{]]}
-@kindex @kbd{@{}
-@kindex @kbd{@}}
-@kindex @kbd{(}
-@kindex @kbd{)}
-@kindex @kbd{M}
-@kindex @kbd{L}
-@kindex @kbd{H}
-@kindex @kbd{G}
-@kindex @kbd{E}
-@kindex @kbd{e}
-@kindex @kbd{B}
-@kindex @kbd{b}
-@kindex @kbd{W}
-@kindex @kbd{w}
-@kindex @kbd{,}
-@kindex @kbd{;}
-@kindex @kbd{T<char>}
-@kindex @kbd{F<char>}
-@kindex @kbd{t<char>}
-@kindex @kbd{f<char>}
-@kindex @kbd{|}
-@kindex @kbd{0}
-@kindex @kbd{<cr>}
-@kindex @kbd{+}
-@kindex @kbd{-}
-@kindex @kbd{^}
-@kindex @kbd{$}
-@kindex @kbd{C-p}
-@kindex @kbd{<lf>}
-@kindex @kbd{<sp>}
-@kindex @kbd{C-n}
-@kindex @kbd{C-h}
-@kindex @kbd{h}
-@kindex @kbd{j}
-@kindex @kbd{k}
-@kindex @kbd{l}
-@vindex @code{vip-parse-sexp-ignore-comments}
-
-@node Marking,Appending Text,Move Commands,Text Handling
-@subsection Marking
-
-Emacs mark is referred to in the region specifiers @kbd{r} and @kbd{R}.
-@xref{Emacs Preliminaries} and @pxref{Basics} for explanation. Also
-see @ref{Mark,,Mark,emacs,The GNU Emacs manual}, for an explanation of
-the Emacs mark ring.
-
-@cindex marking
-
-@table @kbd
-@item m<a-z>
-Mark the current file and position with the specified letter.
-@item m .
-Set the Emacs mark (@xref{Emacs Preliminaries}) at point.
-@item m <
-Set the Emacs mark at beginning of buffer.
-@item m >
-Set the Emacs mark at end of buffer.
-@item m ,
-Jump to the Emacs mark.
-@item :mark <char>
- Mark position with text marker named <char>. This is an Ex command.
-@item :k <char>
- Same as @kbd{:mark}.
-@item ``
-Exchange point and mark.
-@item ''
-Exchange point and mark and go to the first CHAR on line.
-@item '<a-z>
-Go to specified Viper mark.
-@item
-Go to specified Viper mark and go to the first CHAR on line.
-@end table
-@kindex @kbd{m<a-z>}
-@kindex @kbd{m.}
-@kindex @kbd{m>}
-@kindex @kbd{m<}
-@kindex @kbd{m,}
-@findex @kbd{:mark}
-@findex @kbd{:k}
-@kindex @kbd{''}
-@kindex @kbd{``}
-@kindex @kbd{`<a-z>}
-@kindex @kbd{'<a-z>}
-
-@node  Appending Text, Editing in Insert State, Marking,Text Handling
-@subsection Appending Text
-
-@xref{Options} to see how to change tab and shiftwidth size. See the GNU
-Emacs manual, or try @kbd{C-ha tabs} (If you have turned Emacs help on).
-Check out the variable @code{indent-tabs-mode} to put in just spaces.
-Also see options for word-wrap.
-
-@cindex inserting
-@cindex appending
-@cindex paste
-@cindex put
-
-@table @kbd
-@item <count>  a
-<count> times after the cursor.
-@item <count>  A
-<count> times at the end of line.
-@item <count>  i
-<count> times before the cursor (insert).
-@item <count>  I
-<count> times before the first CHAR of the line
-@item <count>  o
-On a new line below the current (open).
-The count is only useful on a slow terminal.
-@item <count>  O
-On a new line above the current.
-The count is only useful on a slow terminal.
-@item <count>  ><move>
-Shift the lines described by <count><move> one
-shiftwidth to the right (layout!).
-@item <count>  >>
-Shift <count> lines one shiftwidth to the right.
-@item <count>  ["<a-z1-9>]p
-Put the contents of the (default undo) buffer
-<count> times after the cursor. The register will
-be automatically downcased.
-@item <count>  ["<a-z1-9>]P
-Put the contents of the (default undo) buffer
-<count> times before the cursor. The register will
-@item [<a-z>
-Show contents of textmarker.
-@item ]<a-z>
-Show contents of register.
-@item <count>  .
-Repeat previous command <count> times. For destructive
-commands as well as undo.
-@item f1 1 and f1 2
-While @kbd{.} repeats the last destructive command,
-these two macros repeat the second-last and the third-last destructive
-commands. @xref{Vi Macros}, for more information on Vi macros.
-@item C-c M-p and C-c M-n
-In Vi state,
-these commands help peruse the history of Vi's destructive commands.
-Successive typing of @kbd{C-c M-p} causes Viper to search the history in
-the direction 
-of older commands, while hitting @kbd{C-c M-n} does so in reverse
-order. Each command in the history is displayed in the Minibuffer. The
-displayed command can 
-then be executed by typing `@kbd{.}'.
-
-Since typing the above sequences of keys may be tedious, the
-functions doing the perusing can be bound to unused keyboard keys in the
-@file{~/.vip} file. @xref{Viper Specials}, for details.
-@end table
-@kindex @kbd{C-c M-p}
-@kindex @kbd{C-c M-n}
-@kindex @kbd{.}
-@kindex @kbd{]<a-z>}
-@kindex @kbd{[<a-z>}
-@kindex @kbd{P}
-@kindex @kbd{p}
-@kindex @kbd{"<a-z1-9>p}
-@kindex @kbd{"<a-z1-9>P}
-@kindex @kbd{>>}
-@kindex @kbd{><move>}
-@kindex @kbd{O}
-@kindex @kbd{o}
-@kindex @kbd{i}
-@kindex @kbd{A}
-@kindex @kbd{a}
-
-@node Editing in Insert State, Deleting Text, Appending Text,Text Handling
-@subsection Editing in Insert State
-
-Minibuffer can be edited similarly to Insert state, and you can switch
-between Insert/Replace/Vi states at will.
-Some users prefer plain Emacs feel in the Minibuffer. To this end, set
-@var{vip-vi-style-in-minibuffer} to @code{nil}.
-
-@cindex Insert state
-
-@table @kbd
-@item C-v
-Deprive the next char of its special meaning (quoting).
-@item C-h
-One char back.
-@item C-w
-One word back.
-@item C-u
-Back to the begin of the change on the
-current line.
-
-@end table
-@kindex @kbd{C-u}
-@kindex @kbd{C-w}
-@kindex @kbd{C-v}
-
-@node Deleting Text, Changing Text, Editing in Insert State, Text Handling
-@subsection Deleting Text
-
-
-There is one difference in text deletion that you should be
-aware of. This difference comes from Emacs and was adopted in Viper
-because we find it very useful. In Vi, if you delete a line, say, and then
-another line, these two deletions are separated and are put back
-separately if you use the @samp{p} command. In Emacs (and Viper), successive
-series of deletions that are @emph{not interrupted} by other commands are
-lumped together, so the deleted text gets accumulated and can be put back
-as one chunk. If you want to break a sequence of deletions so that the
-newly deleted text could be put back separately from the previously deleted
-text, you should perform a non-deleting action, e.g., move the cursor one
-character in any direction.
-
-@cindex shifting text
-
-@table @kbd
-@item <count>  x
-Delete <count> chars under and after the cursor.
-@item <count>  X
-Delete <count> chars before the cursor.
-@item <count>  d<move>
-Delete from point to endpoint of <count><move>.
-@item <count>  dd
-Delete <count> lines.
-@item  D
-The rest of the line.
-@item <count>  <<move>
-Shift the lines described by <count><move> one
-shiftwidth to the left (layout!).
-@item <count>  <<
-Shift <count> lines one shiftwidth to the left.
-@end table
-@kindex @kbd{<<}
-@kindex @kbd{<<move>}
-@kindex @kbd{D}
-@kindex @kbd{dd}
-@kindex @kbd{d<move>}
-@kindex @kbd{X}
-@kindex @kbd{x}
-
-@node Changing Text, Search and Replace, Deleting Text,Text Handling
-@subsection Changing Text
-
-@cindex joining lines
-@cindex changing case
-@cindex quoting regions
-@cindex substitution
-
-@table @kbd
-@item <count>  r<char>
-Replace <count> chars by <char> - no <esc>.
-@item <count>  R
-Overwrite the rest of the line,
-appending change @var{count - 1} times.
-@item <count>  s
-Substitute <count> chars.
-@item <count>  S
-Change <count> lines.
-@item <count>  c<move>
-Change from begin to endpoint of <count><move>.
-@item <count>  cc
-Change <count> lines.
-@item <count>  C
-The rest of the line and <count> - 1 next lines.
-@item <count>  =<move>
-Reindent the region described by move.
-@item <count>  ~
-Switch lower and upper cases.
-@item <count>  J
-Join <count> lines (default 2).
-@item  :[x,y]s/<p>/<r>/<f>
-Substitute (on lines x through y) the pattern
-<p> (default the last pattern) with <r>.  Useful
-flags <f> are @samp{g} for @samp{global} (i.e. change every
-non-overlapping occurrence of <p>) and @samp{c} for
-@samp{confirm} (type @samp{y} to confirm a particular
-substitution, else @samp{n} ).  Instead of @kbd{/} any
-punctuation CHAR unequal to <space> <tab> and <lf> can be used as
-delimiter.
-@item  :[x,y]copy [z]
- Copy text between @kbd{x} and @kbd{y} to the position after @kbd{z}.
-@item  :[x,y]t [z]
- Same as @kbd{:copy}.
-@item  :[x,y]move [z]
- Move text between @kbd{x} and @kbd{y} to the position after @kbd{z}.
-@item  &
-Repeat latest Ex substitute command, e.g.
-@kbd{:s/wrong/good}.
-@item C-c /
-Toggle case-sensitive search. With prefix argument, toggle vanilla/regular
-expression search.
-@item #c<move>
-Change upper case characters in the region to lower case.
-@item #C<move>
-Change lower case characters in the region to upper case.
-@item #q<move> 
-Insert specified string at the beginning of each line in the region
-@item C-c M-p and C-c M-n
-In Insert and Replace states, these keys are bound to commands that peruse
-the history of the text 
-previously inserted in other insert or replace commands. By repeatedly typing
-@kbd{C-c M-p} or @kbd{C-c M-n}, you will cause Viper to
-insert these previously used strings one by one.
-When a new string is inserted, the previous one is deleted. 
-
-In Vi state, these keys are bound to functions that peruse the history of
-destructive Vi commands.
-@xref{Viper Specials}, for details.
-@end table
-@kindex @kbd{C-c M-p}
-@kindex @kbd{C-c M-n}
-@kindex @kbd{#q<move> }
-@kindex @kbd{#C<move>}
-@kindex @kbd{#c<move>}
-@kindex @kbd{&}
-@findex @kbd{:substitute/<p>/<r>/<f>}
-@findex @kbd{:s/<p>/<r>/<f>}
-@findex @kbd{:copy [z]}
-@findex @kbd{:t [z]}
-@findex @kbd{:move [z]}
-@kindex @kbd{J}
-@kindex @kbd{~}
-@kindex @kbd{=<move>}
-@kindex @kbd{C}
-@kindex @kbd{cc}
-@kindex @kbd{c<move>}
-@kindex @kbd{S}
-@kindex @kbd{s}
-@kindex @kbd{R}
-@kindex @kbd{r<char>}
-
-@node Search and Replace, Yanking, Changing Text,Text Handling
-@subsection Search and Replace
-
-@xref{Groundwork}, for Ex address syntax. @xref{Options} to see how to
-get literal (non-regular-expression) search and how to stop search from
-wrapping around.
-
-@table @kbd
-@item <count>  /<string>
-To the <count>th occurrence of <string>.
-@item <count>  ?<string>
-To the <count>th previous occurrence of <string>.
-@item <count>  g<move>
-Search for the text described by move. (off by default)
-@item n
-Repeat latest @kbd{/} @kbd{?} (next).
-@item N
-Idem in opposite direction.
-@item %
-Find the next bracket and go to its match
-@item :[x,y]g/<string>/<cmd>
-@cindex text processing
-Search globally [from line x to y] for <string>
-and execute the Ex <cmd> on each occurrence.
-@item :[x,y]v/<string>/<cmd>
-Execute <cmd> on the lines that don't match.
-@item #g<move>
-Execute the last keyboard macro for each line in the region.
-@xref{Macros and Registers}, for more info.
-@item Q
-Query Replace.
-@item :ta <name>
-Search in the tags file where <name> is defined (file, line), and go to it.
-@item  :[x,y]s/<p>/<r>/<f>
-Substitute (on lines x through y) the pattern <p> (default the last
-pattern) with <r>.  Useful
-flags <f> are @samp{g} for @samp{global} (i.e. change every
-non-overlapping occurrence of <p>) and @samp{c} for
-@samp{confirm} (type @samp{y} to confirm a particular
-substitution, else @samp{n}).  Instead of @kbd{/} any
-punctuation CHAR unequal to <space> <tab> and <lf> can be used as delimiter.
-@item  &
- Repeat latest Ex substitute command, e.g. @kbd{:s/wrong/good}.
-@end table
-@kindex @kbd{&}
-@findex @kbd{:substitute/<p>/<r>/<f>}
-@kindex @kbd{Q}
-@kindex @kbd{#g<move>}
-@findex @kbd{:v/<string>/<cmd>}
-@findex @kbd{:g/<string>/<cmd>}
-@findex @kbd{:global/<string>/<cmd>}
-@findex @kbd{:tag <name>}
-@kindex @kbd{%}
-@kindex @kbd{N}
-@kindex @kbd{n}
-@kindex @kbd{g<move>}
-@kindex @kbd{?<string>}
-@kindex @kbd{/<string>}
-
-@node Yanking,Undoing,Search and Replace,Text Handling
-@subsection Yanking
-
-@cindex cut and paste
-@cindex paste
-
-@table @kbd
-@item <count>  y<move>
-Yank from begin to endpoint of <count><move>.
-@item <count>  "<a-z>y<move>
-Yank from begin to endpoint of <count><move> to register.
-@item <count>  "<A-Z>y<move>
-Yank from begin to endpoint of <count><move> and append
-to register.
-@item <count>  yy
-<count> lines.
-@item <count>  Y
-Idem (should be equivalent to @kbd{y$} though).
-@item  m<a-z>
-Mark the cursor position with a letter.
-@item [<a-z>
-Show contents of textmarker.
-@item ]<a-z>
-Show contents of register.
-@item <count>  ["<a-z1-9>]p
-Put the contents of the (default undo) buffer
-<count> times after the cursor. The register will
-be automatically downcased.
-@item <count>  ["<a-z1-9>]P
-Put the contents of the (default undo) buffer
-<count> times before the cursor. The register will
-@end table
-@kindex @kbd{P}
-@kindex @kbd{p}
-@kindex @kbd{"<a-z1-9>p}
-@kindex @kbd{"<a-z1-9>P}
-@kindex @kbd{]<a-z>}
-@kindex @kbd{[<a-z>}
-@kindex @kbd{m<a-z>}
-@kindex @kbd{Y}
-@kindex @kbd{yy}
-@kindex @kbd{"<A-Z>y<move>}
-@kindex @kbd{"<a-z>y<move>}
-@kindex @kbd{y<move>}
-@kindex @kbd{yank}
-@findex @kbd{:yank}
-
-@node Undoing,, Yanking,Text Handling
-@subsection Undoing
-
-@cindex undo
-@cindex backup files
-
-@table @kbd
-@item  u U
-Undo the latest change.
-@item  .
-Repeat undo.
-@item :q!
-Quit Vi without writing.
-@item :e!
-Re-edit a messed-up file.
-@item :rec
-Recover file from autosave. Viper also creates backup files
-that have a @samp{~} appended to them.
-@end table
-@findex @kbd{:rec}
-@findex @kbd{:e!}
-@findex @kbd{:q!}
-@kindex @kbd{.}
-@kindex @kbd{U}
-@kindex @kbd{u}
-
-@node Display, File and Buffer Handling, Text Handling, Commands
-@section Display
-
-@cindex scrolling
-
-@table @kbd
-@item C-g
-At user level 1,
-give file name, status, current line number
-and relative position. @*
-At user levels 2 and higher, abort the current command.
-@item C-c g
-Give file name, status, current line number and relative position -- all
-user levels.
-@item C-l
-Refresh the screen. 
-@item <count> C-e
-Expose <count> more lines at bottom, cursor stays put (if possible).
-@item <count> C-y
-Expose <count> more lines at top, cursor stays put (if possible).
-@item <count> C-d
-Scroll <count> lines downward (default the number of the previous scroll;
-initialization: half a page).
-@item <count> C-u
-Scroll <count> lines upward (default the number of the previous scroll;
-initialization: half a page). 
-@item <count> C-f
-<count> pages forward.
-@item <count> C-b
-<count> pages backward (in older versions @kbd{C-b} only works without count).
-@item <count> z<cr>
-@item zH
-Put line <count> at the top of the window (default the current line).
-@item <count> z-
-@item zL
-Put line <count> at the bottom of the window
-(default the current line).
-@item <count> z.
-@item zM
-Put line <count> in the center of the window
-(default the current line).
-@end table
-@kindex @kbd{zM}
-@kindex @kbd{zL}
-@kindex @kbd{zH}
-@kindex @kbd{z<cr>}
-@kindex @kbd{z.}
-@kindex @kbd{z-}
-@kindex @kbd{z<cr>}
-@kindex @kbd{C-b}
-@kindex @kbd{C-f}
-@kindex @kbd{C-u}
-@kindex @kbd{C-d}
-@kindex @kbd{C-y}
-@kindex @kbd{C-e}
-@kindex @kbd{C-l}
-@kindex @kbd{C-g}
-
-
-@node File and Buffer Handling, Mapping, Display,Commands
-@section File and Buffer Handling
-
-@cindex multiple files
-
-In all file handling commands, space should be typed before entering the file
-name. If you need  to type a modifier, such as @kbd{>>} or @kbd{!}, don't
-put any space between the command and the modifier.
-
-@table @kbd
-@item :q
-Quit buffer except if modified.
-@item :q!
-Quit buffer without checking. In Viper, these two commands
-are identical. Confirmation is required if exiting modified buffers that
-visit files.
-@item :susp
-@item :stop
-Suspend Viper
-@item :[x,y] w
-Write the file. Viper nakes sure that a final newline is always added to
-any file where this newline is missing. This is done by setting Emacs
-variable @code{require-final-newline} to @code{t}. If you don't like this
-feature, use @code{setq-default} to set @code{require-final-newline} to
-@code{nil}. This must be done either in @file{.vip} file or in
-@code{.emacs} after Viper is loaded.
-@item :[x,y] w <name>
-Write to the file <name>.
-@item :[x,y] w>> <name>
-Append the buffer to the file <name>.  There should be no space between
-@kbd{w} and @kbd{>>}. Type space after the @kbd{>>} and see what happens.
-@item :w! <name>
-Overwrite the file <name>. In Viper, @kbd{:w} and @kbd{:w!} are identical.
-Confirmation is required for writing to an existing file (if this is not
-the file the buffer is visiting) or to a read-only file.
-@item :x,y w <name>
-Write lines x through y to the file <name>.
-@item :wq
-Write the file and kill buffer.
-@item :r <file> [<file> ...]
-Read file into a buffer, inserting its contents after the current line.
-@item :xit
-Same as @kbd{:wq}.
-@item :W
-Save unsaved buffers, asking for confirmation.
-@item :WW
-Like @kbd{W}, but without asking for confirmation. 
-@item ZZ
-Save current buffer and kill it. If user level is 1, then save all files
-and kill Emacs. Killing Emacs is the wrong way to use it, so you should
-switch to  higher user levels as soon as possible.
-@item :x [<file>]
-Save and kill buffer.
-@item :x! [<file>]
-@kbd{:w![<file>]} and @kbd{:q}.
-@item :pre
-Preserve the file -- autosave buffers.
-@item :rec
-Recover file from autosave.
-@item :f
-Print file name and lines.
-@item :cd [<dir>]
-Set the working directory to <dir> (default home directory).
-@item :pwd
-Print present working directory.
-@item :e [+<cmd>] <files>
-Edit files. If no filename is given, edit the file visited by the current
-buffer. If buffer was modified or the file changed on disk, ask for
-confirmation. Unlike Vi, Viper allows @kbd{:e} to take multiple arguments.
-The first file is edited the same way as in Vi. The rest are visited
-in the usual Emacs way.
-@item :e! [+<cmd>] <files>
-Re-edit file. If no filename, reedit current file.
-In Viper, unlike Vi, @kbd{e!} is identical to @kbd{:e}. In both cases, the
-user is asked to confirm if there is a danger of discarding changes to a
-buffer.
-@item :q!
-Quit Vi without writing.
-@item C-^
-Edit the alternate (normally the previous) file.
-@item :rew
-Obsolete
-@item :args
-List files not shown anywhere with counts for next
-@item :n [count]  [+<cmd>] [<files>]
-Edit <count> file, or edit files. The count comes from :args. 
-@item :N [count] [+<cmd>] [<files>] 
-Like @kbd{:n}, but the meaning of the variable
-@var{ex-cycle-other-window} is reversed.
-@item :b    
-Switch to another buffer. If @var{ex-cycle-other-window} is @code{t},
-switch in another window. Buffer completion is supported.
-@item :B    
-Like @kbd{:b}, but the meaning of @var{ex-cycle-other-window} is reversed.
-@item :<address>r <name>
-Read the file <name> into the buffer after the line <address>.
-@item v, V, C-v
-Edit a file in current or another window, or in another frame. File name
-is typed in Minibuffer. File completion and history are supported.
-@end table
-@kindex @kbd{v}
-@kindex @kbd{V}
-@findex @kbd{:args}
-@findex @kbd{:rew}
-@kindex @kbd{C-^}
-@findex @kbd{:e! [<files>]}
-@findex @kbd{:e [<files>]}
-@findex @kbd{:edit [<files>]}
-@findex @kbd{:edit! [<files>]}
-@findex @kbd{:q!}
-@findex @kbd{:q}
-@findex @kbd{:quit}
-@findex @kbd{:quit!}
-@findex @kbd{:f}
-@findex @kbd{:rec}
-@findex @kbd{:r}
-@findex @kbd{:read}
-@findex @kbd{:pre}
-@kindex @kbd{ZZ}
-@findex @kbd{:wq}
-@findex @kbd{:w <file>}
-@findex @kbd{:w! <file>}
-@findex @kbd{:w >> <file>}
-@findex @kbd{:write <file>}
-@findex @kbd{:write! <file>}
-@findex @kbd{:write >> <file>}
-@findex @kbd{:W}
-@findex @kbd{:WW}
-@findex @kbd{:Write}
-@findex @kbd{:WWrite}
-@findex @kbd{:WWrite}
-@findex @kbd{:x}
-@findex @kbd{:x!}
-@findex @kbd{:susp}
-@findex @kbd{:stop}
-@findex @kbd{:n [<count> | <file>]}
-@findex @kbd{:cd [<dir>]}
-@findex @kbd{:pwd}
-
-@node Mapping, Shell Commands, File and Buffer Handling, Commands
-@section Mapping
-
-@cindex keybindings
-@cindex keymapping
-
-@table @kbd
-@item :map <string>
- Start defining a Vi-style keyboard macro.
- For instance, typing
- @kbd{:map www} followed by @kbd{:!wc %} and then typing @kbd{C-x )}
- will cause @kbd{www} to run wc on
- current file (Vi replaces @samp{%} with the current file name).
-@item C-x )
- Finish defining a keyboard macro.
- In Viper, this command completes the process of defining all keyboard
-macros, whether they are Emacs-style or Vi-style.
-This is a departure from Vi, needed to allow WYSIWYG mapping of
-keyboard macros and to permit the use of function keys and arbitrary Emacs
-functions in the macros.
-@item :unmap <string>
- Deprive <string> of its mappings in Vi state.
-@item :map! <string>
- Map a macro for Insert state.
-@item :unmap! <string>
- Deprive <string> of its mapping in Insert state (see @kbd{:unmap}).
-@item @@<a-z>
- In Vi state,
- execute the contents of register as a command.
-@item @@@@
- In Vi state,
- repeat last register command. 
-@item @@#
-In Vi state,
- begin keyboard macro. End with @@<a-z>. This will
- put the macro in the proper register. Register will
- be automatically downcased.
- @xref{Macros and Registers}, for more info.
-@item @@!<a-z>
- In Vi state,
- yank anonymous macro to register
-@item *
- In Vi state,
- execute anonymous macro (defined by C-x( and C-x )).
-@item C-x e
- Like @kbd{*}, but works in all Viper states.
-@item #g<move>
- Execute the last keyboard macro for each line in the region.
- @xref{Macros and Registers}, for more info.
-@item [<a-z>
- Show contents of textmarker.
-@item ]<a-z>
- Show contents of register.
-@end table
-@kindex @kbd{]<a-z>}
-@kindex @kbd{[<a-z>}
-@kindex @kbd{#g<move>}
-@kindex @kbd{*}
-@kindex @kbd{@@!<a-z>}
-@kindex @kbd{@@#}
-@kindex @kbd{@@@@}
-@kindex @kbd{@@<a-z>}
-@findex @kbd{:unmap <char>}
-@findex @kbd{:map <char> <seq>}
-@findex @kbd{:unmap! <char>}
-@findex @kbd{:map! <char> <seq>}
-
-@node Shell Commands, Options, Mapping, Commands
-@section Shell Commands
-
-@cindex % (Current file)
-
-Note that % is used in Ex commands to mean current file. If you want a %
-in your command, it must be escaped as @samp{\%}. 
-@cindex % (Ex address)
-However if % is the
-first character, it stands as the address for the whole file.
-@cindex # (Previous file)
-Similarly, @samp{#} expands to the previous file. The previous file is
-the first file in @kbd{:args} listing. This defaults
-to the previous file in the VI sense if you have one window.@refill
-
-@cindex shell commands
-
-@table @kbd
-@item :sh
-Execute a subshell in another window
-@item :[x,y]!<cmd>
-Execute a shell <cmd> [on lines x through y;
-% is replace by current file, \% is changed to %
-@item :[x,y]!! [<args>]
-Repeat last shell command [and append <args>].
-@item :!<cmd>
-Just execute command and display result in a buffer.
-@item :!! <args>
-Repeat last shell command and append <args>
-@item <count> !<move><cmd>
-The shell executes <cmd>, with standard
-input the lines described by <count><move>,
-next the standard output replaces those lines
-(think of @samp{cb}, @samp{sort}, @samp{nroff}, etc.).
-@item <count> !!<cmd>
-Give <count> lines as standard input to the
-shell <cmd>, next let the standard output
-replace those lines.
-@item :[x,y] w !<cmd>
-Let lines x to y be standard input for <cmd>
-(notice the <sp> between @kbd{w} and @kbd{!}).
-@item :<address>r !<cmd>
-Put the output of <cmd> after the line <address> (default current).
-@item :<address>r <name>
-Read the file <name> into the buffer after the line <address> (default
-current).
-@end table
-@findex @kbd{:<address>r <name>}
-@findex @kbd{:<address>r !<cmd>}
-@findex @kbd{!<cmd>}
-@findex @kbd{!!<cmd>}
-@findex @kbd{!<move><cmd>}
-@findex @kbd{:w !<cmd>}
-@findex @kbd{:x,y w !<cmd>}
-@findex @kbd{:!! <args>}
-@findex @kbd{:!<cmd>}
-@findex @kbd{:sh}
-
-@node Options,Emacs Related Commands,Shell Commands,Commands
-@section Options
-
-@cindex Vi options
-
-@table @kbd
-@item ai
-@cindex autoindent
-autoindent -- In append mode after a <cr> the
-cursor will move directly below the first
-CHAR on the previous line.  
-@item ic
-@cindex case and searching
-ignorecase -- No distinction between upper and
-lower cases when searching.
-@item magic
-@cindex literal searching
-Regular expressions used in searches; nomagic means no regexps.
-@item ro
-@cindex readonly files
-readonly -- The file is not to be changed.
-If the user attempts to write to this file, confirmation will be requested.
-@item sh=<string>
-@cindex shell
-shell -- The program to be used for shell escapes
-(default @samp{$SHELL} (default @file{/bin/sh})).
-@item sw=<count>
-@cindex layout
-@cindex shifting text
-shiftwidth -- Gives the shiftwidth (default 8 positions).
-@item sm
-@cindex paren matching
-@cindex matching parens
-showmatch -- Whenever you append a @kbd{)}, Vi shows
-its match if it's on the same page; also with
-@kbd{@{} and @kbd{@}}.  If there's no match, Vi will beep.
-@item ts=<count>
-@cindex changing tab width
-@cindex tabbing
-tabstop -- The length of a <ht>; warning: this is
-only IN the editor, outside of it <ht>s have
-their normal length (default 8 positions).
-@item wm=<count>
-@cindex auto fill
-@cindex word wrap
-wrapmargin -- In append mode Vi automatically
-puts a <lf> whenever there is a <sp> or <ht>
-within <wm> columns from the right margin.
-@item ws
-@cindex searching
-wrapscan -- When searching, the end is
-considered @samp{stuck} to the begin of the file.
-@item :set <option>
-Turn <option> on.
-@item :set no<option>
-Turn <option> off.
-@item :set <option>=<value>
-Set <option> to <value>.
-@end table
-@findex @kbd{:set <option>=<value>}
-@findex @kbd{:set no<option>}
-@findex @kbd{:set <option>}
-@findex @kbd{:set ws}
-@findex @kbd{:set wrapscan}
-@findex @kbd{:set wm=<count>}
-@findex @kbd{:set wrapmargin=<count>}
-@findex @kbd{:set ts=<count>}
-@findex @kbd{:set tabstop=<count>}
-@findex @kbd{:set tab-stop-local=<count>}
-@findex @kbd{:set sm}
-@findex @kbd{:set showmatch}
-@findex @kbd{:set sw=<count>}
-@findex @kbd{:set shiftwidth=<count>}
-@findex @kbd{:set sh=<string>}
-@findex @kbd{:set shell=<string>}
-@findex @kbd{:set ro}
-@findex @kbd{:set readonly}
-@findex @kbd{:set magic}
-@findex @kbd{:set ic}
-@findex @kbd{:set ignorecase}
-@findex @kbd{:set ai}
-@findex @kbd{:set autoindent}
-
-@node Emacs Related Commands,,Options,Commands
-@section Emacs Related Commands
-
-@table @kbd
-@item _
-Begin Meta command in Vi state. Most often used as _x (M-x).
-@item C-z
-Begin Meta command in Insert state.
-@item C-z
-Switch between Emacs and Vi states.
-@item C-x0
-Close Window
-@item C-x1
-Close Other Windows
-@item C-x2
-Split Window
-@item C-xo
-Move among windows
-@item C-xC-f
-Emacs find-file, useful in Insert state
-@item C-y 
-Put back the last killed text. Similar to Vi's @kbd{p}, but also works in
-Insert and Replace state. This command doesn't work in Vi command state,
-since this binding is taken for something else.
-@item M-y
-Undoes the last @kbd{C-y} and puts another kill from the kill ring.
-Using this command, you can try may different kills until you find the one
-you need.
-@end table
-@kindex @kbd{M-y}
-@kindex @kbd{C-y}
-@kindex @kbd{C-xC-f}
-@kindex @kbd{C-xo}
-@kindex @kbd{C-x2}
-@kindex @kbd{C-x1}
-@kindex @kbd{C-x0}
-@kindex @kbd{C-z}
-@kindex @kbd{C-z}
-@kindex @kbd{_}
-
-@node Mouse-bound Commands,,,Commands
-@section Mouse-bound Commands
-
-The following two mouse actions are normally bound to to special search and
-insert commands in of Viper:
-
-@table @kbd
-@item S-mouse-1 (Emacs)
-@item meta button1up (XEmacs)
-Holding Shift (or Meta, if XEmacs) and clicking mouse button 1 will
-initiate search for 
-a region under the mouse pointer.
-This command can take a prefix argument. Note: Viper sets this
-binding only if this mouse action is not 
-already bound to something else.
-@xref{Viper Specials}, for more information.@refill
-
-@item S-mouse-2 (Emacs)
-@item meta button2up (XEmacs)
-Holding Shift (or Meta, if XEmacs) and clicking button 2 of the mouse will
-insert a region surrounding the mouse pointer.
-This command can also take a prefix argument.
-Note: Viper sets this binding only if this mouse action is not
-already bound to something else.
-@xref{Viper Specials}, for more details.@refill
-@end table        
-@kindex @kbd{S-mouse-1}
-@kindex @kbd{S-mouse-2}
-@kindex @kbd{meta button1up}
-@kindex @kbd{meta button2up}
diff -r 4de2936b4e77 -r 0132846995bd man/viper.texi
--- a/man/viper.texi	Mon Aug 13 09:42:28 2007 +0200
+++ b/man/viper.texi	Mon Aug 13 09:43:35 2007 +0200
@@ -4,9 +4,9 @@
 \input texinfo
 
 @comment Using viper.info instead of viper in setfilename breaks DOS.
-@setfilename viper
-@comment @setfilename ../info/viper
+@comment @setfilename viper
 @comment @setfilename viper.info
+@setfilename ../info/viper
 
 @iftex
 @finalout
@@ -15,7 +15,7 @@
 @titlepage
 @title Viper Is a Package for Emacs Rebels
 @subtitle a Vi emulator for GNU Emacs 19 and XEmacs 19
-@subtitle May 1997, Viper Version 2.93
+@subtitle June 1997, Viper Version 2.94
 
 @author Masahiko Sato (VIP 3.5)
 @author Aamod Sane (VIP 4.4)
@@ -146,7 +146,7 @@
 
 You should also learn to use the Info on-line hypertext manual system that
 comes with Emacs. This manual can be read as an Info file. Try the command
-@kbd{ESC x info} with vanilla Emacs sometime.
+@kbd{@key{ESC} x info} with vanilla Emacs sometime.
 
 Comments and bug reports are welcome.
 @code{kifer@@cs.sunysb.edu} is the current address for Viper bug reports.
@@ -288,7 +288,7 @@
 in a manner similar to the Control key, e.g., @kbd{M-x} means typing
 @kbd{x} while holding the Meta key down.
 For keyboards that do not have a Meta key, @key{ESC} is used as Meta.
-Thus @kbd{M-x} is typed as @kbd{ESC x}. Viper uses @key{ESC} to switch
+Thus @kbd{M-x} is typed as @kbd{@key{ESC} x}. Viper uses @key{ESC} to switch
 from Insert state to Vi state. Therefore Viper defines @kbd{C-\} as its Meta
 key in Vi state. @xref{Vi State}, for more info.@refill
 
@@ -299,73 +299,39 @@
 @node Loading Viper, States in Viper, Emacs Preliminaries, Overview
 @section Loading Viper
 
-First, make sure that all six Viper files @file{viper*.el} are somewhere on
-Emacs @dfn{load path}. The load path is a list of directories where Emacs
-looks for its Lisp code; it is similar to Unix environment variable
-@var{PATH}.  The load path is determined by the Lisp variable
-@code{load-path}.
-
-Type @code{C-h v load-path RET} to check the current load path of your
-Emacs. (Here and later, @kbd{RET} stands for carriage return.) If the files
-@file{viper*.el} are not in any directory on the load path, you should
-create your own directory and put it on the load path; then put
-@file{viper*.el} in that directory.  To put a new directory, say
-@file{~/emacslib}, on your load path, add the following line at the
-beginning of your @file{~/.emacs} file:
-@lisp
-(setq load-path (cons "~/emacslib" load-path))
-@end lisp
-It is recommended that you compile @file{viper.el} by running 
-@example
-make all
-@end example
-in the directory where Viper was unpacked. The best way to ensure that
-Viper is installed properly is to run
-@example
-make install
-@end example
-in the directory where Viper was unpacked. See README in the Viper
-distribution for the details on which modifications to the make file may be
-necessary.
-
-Once Viper is settled on the load path,
-the most common way to load it automatically is to include the line:
+The most common way to load it automatically is to include the lines (in
+the given order!):
 
 @lisp
+(setq viper-mode t)
 (require 'viper)
 @end lisp
 
 @noindent
-in your @file{~/.emacs} file.  The @file{.emacs} file is placed in your home
-directory and it will be executed every time you invoke Emacs.  
-Viper also uses the file @file{~/.vip} for Viper-specific customization.
-If you wish
-to be in Vi command state whenever this is appropriate, you can include the
-following 
-line in your @file{.vip}:
+in your @file{~/.emacs} file.  The @file{.emacs} file is placed in your
+home directory and it is be executed every time you invoke Emacs.  Viper
+also uses the file @file{~/.viper} for Viper-specific customization.  If you
+wish to be in Vi command state whenever this is deemed appropriate by the
+author, you can include the following line in your @file{.viper}:
 @lisp
-(setq vip-always t)
+(setq viper-always t)
 @end lisp
 @noindent
-(@xref{Vi State}, for the explanation of Vi mode.)
+(@xref{Vi State}, for the explanation of Vi command state.)
 
 Once invoked, Viper will arrange to bring up Emacs buffers in Vi state
 whenever this makes sense.
 @xref{Packages that Change Keymaps}, to find out when forcing Vi command state
 on a buffer may be counter-productive.
 
-Even if your @file{.emacs} and @file{.vip} files do not contain any of the
-above lines, you can still load Viper and enter Vi state by typing the
+Even if your @file{.emacs} and @file{.viper} files do not contain any of the
+above lines, you can still load Viper and enter Vi command state by typing the
 following from within Emacs:
 
 @lisp
-M-x load-library RET viper RET
 M-x viper-mode
 @end lisp
 
-@noindent
-Ask your local Emacs administrator if this fails to work.
-
 When Emacs first comes up, if you have not specified a file on the
 command line, it will show the @samp{*scratch*} buffer, in the
 @samp{Lisp Interaction} mode. After you invoke Viper, you can start
@@ -378,7 +344,7 @@
 @section States in Viper
 
 @kindex @kbd{C-z}
-@kindex @kbd{ESC}
+@kindex @key{ESC}
 @kindex @kbd{i}
 @cindex Emacs state
 @cindex Vi state
@@ -390,7 +356,7 @@
 
 @table @samp
 @item Emacs state
-This is the mode plain vanilla Emacs is normally in. After you have loaded
+This is the state plain vanilla Emacs is normally in. After you have loaded
 Viper, @kbd{C-z} will normally take you to Vi command state. Another
 @kbd{C-z} will take you back to Emacs state.  This toggle key can be
 changed, @pxref{Customization} You can also type @kbd{M-x viper-mode} to
@@ -407,14 +373,14 @@
 @dots{}, will take you to Insert state. All Vi commands may
 be used in this mode. Most Ex commands can also be used.
 For a full list of Ex commands supported by Viper, type
-@kbd{:} and then @kbd{TAB}. To get help on any issue, including the Ex
+@kbd{:} and then @key{TAB}. To get help on any issue, including the Ex
 commands, type @kbd{:help}. This will invoke Viper Info 
 (if it is installed). Then typing @kbd{i} will prompt you for a topic to
 search in the index. Note, to search for Ex commands in the index, you
 should start them with a ``@kbd{:}'', e.g., @kbd{:WW}.
 
 @item Insert state
-Insert state is the Vi insertion mode. @kbd{ESC} will take you back to
+Insert state is the Vi insertion mode. @key{ESC} will take you back to
 Vi state. Insert state editing can be done, including auto-indentation. By
 default, Viper disables Emacs keybindings in Insert state.
 
@@ -423,7 +389,7 @@
 boundary of a replacement region (usually designated via a @samp{$} sign),
 it will automatically change to Insert state. You do not have to worry
 about it. The key bindings remain practically the same as in Insert
-state. If you type ESC, Viper will switch to Vi command mode, terminating the
+state. If you type @key{ESC}, Viper will switch to Vi command mode, terminating the
 replacement state. @refill
 @end table
 
@@ -547,17 +513,17 @@
 @kindex @kbd{C-\}
 @cindex Meta key
 
-Viper uses @kbd{ESC} as a switch between Insert and Vi states. Emacs uses
-@kbd{ESC} for Meta. We need a Meta key to call the Meta key functions
+Viper uses @key{ESC} as a switch between Insert and Vi states. Emacs uses
+@key{ESC} for Meta. We need a Meta key to call the Meta key functions
 such as @kbd{M-x function name}. This role is played by the key @kbd{C-\}.
 Thus, to
 get @kbd{M-x}, you should type @kbd{C-\ x} (if the keyboard has no Meta key).
 This works both in the Vi state and the Insert state.
-Alternatively, you can use @kbd{\ ESC} in Vi state to simulate the meta
+Alternatively, you can use @kbd{\ @key{ESC}} in Vi state to simulate the meta
 key.
-It is possible to use @kbd{ESC} as Meta, but then you cannot
-press @kbd{ESC} multiple times in Vi state. @xref{Customization}, to find
-out how to rebind ESC to be Meta.@refill
+It is possible to use @key{ESC} as Meta, but then you cannot
+press @key{ESC} multiple times in Vi state. @xref{Customization}, to find
+out how to rebind @key{ESC} to be Meta.@refill
 @end table
 @noindent
 Other differences are mostly improvements. The ones you should know
@@ -608,9 +574,9 @@
 It is designed to minimize the need for deleting path names that Emacs
 provides in its prompts. (This is usually convenient, but occasionally
 the prompt may suggest a wrong path name for you.) If you see a prompt
-@kbd{/usr/foo/} and you wish to edit the file @kbd{~/.vip}, you don't
+@kbd{/usr/foo/} and you wish to edit the file @kbd{~/.viper}, you don't
 have to erase the prompt. Instead, simply continue typing what you
-need. Emacs will interpret @kbd{/usr/foo/~/.vip} correctly. Similarly,
+need. Emacs will interpret @kbd{/usr/foo/~/.viper} correctly. Similarly,
 if the prompt is @kbd{~/foo/} and you need to get to @kbd{/bar/file}, keep
 typing. Emacs interprets @kbd{~/foo//bar/} as @kbd{/bar/file}, since when it
 sees @samp{//}, it understands that @kbd{~/foo/} is to be discarded.
@@ -625,7 +591,7 @@
 windows).
 
 When applicable, Ex commands support file completion and history. This
-means that by typing a partial file name and then @kbd{TAB}, Emacs will try
+means that by typing a partial file name and then @key{TAB}, Emacs will try
 to complete the name or it will offer a menu of possible completions.
 This works similarly to Tcsh and extends the behavior of Csh. While Emacs
 is waiting for a file name, you can type @kbd{M-p} to get the previous file
@@ -633,13 +599,13 @@
 browse through the file history. 
 
 Like file names, partially typed Ex commands can be completed by typing
-@kbd{TAB}, and Viper keeps the history of Ex commands. After typing
+@key{TAB}, and Viper keeps the history of Ex commands. After typing
 @kbd{:}, you can browse through the previously entered Ex commands by
 typing @kbd{M-p} and @kbd{M-n}.  Viper tries to rationalize when it puts Ex
 commands on the history list.  For instance, if you typed @kbd{:w! foo},
 only @kbd{:w!}  will be placed on the history list. This is because the
 last history element is the default that can be invoked simply by typing
-@kbd{: RET}. If @kbd{:w! foo} were placed on the list, it would be all to
+@kbd{: @key{RET}}. If @kbd{:w! foo} were placed on the list, it would be all to
 easy to override valuable data in another file. Reconstructing the full
 command, @kbd{:w!  foo}, from the history is still not that hard, since Viper
 has a separate history for file names. By typing @kbd{: M-p}, you will get
@@ -723,9 +689,10 @@
 This state is entered through Vi replacement commands, such as @kbd{C},
 @kbd{cw}, etc., or by typing @kbd{R}. In Replace state, Viper puts <R> in the
 mode line to let you know which state is in effect. If Replace state is
-entered through @kbd{R}, Viper stays in that state until the user hits ESC.
+entered through @kbd{R}, Viper stays in that state until the user hits
+@key{ESC}.
 If this state is entered via the other replacement commands, then Replace
-state is in effect until you hit @kbd{ESC} or until you cross the rightmost
+state is in effect until you hit @key{ESC} or until you cross the rightmost
 boundary of the replacement region. In the latter case, Viper changes its
 state from Replace to Insert (which you will notice by the change in the
 mode line).
@@ -738,7 +705,7 @@
 the need to enable text selection and region-setting with the mouse.)
 
 The issue then arises as to what to do when the user
-hits the ESC key. In Vi, this would cause the text between cursor and
+hits the @key{ESC} key. In Vi, this would cause the text between cursor and
 the end of the replacement region to be deleted. But what if, as is
 possible in Viper, the cursor is not inside the replacement region?
 
@@ -764,7 +731,7 @@
 Erase line
 @item C-v
 Quote the following character
-@item RET
+@item @key{RET}
 Execute command
 @item C-g and C-]
 Emacs quit and abort keys. These may be necessary. @xref{Vi State}, for an
@@ -783,7 +750,7 @@
 Initially, the Minibuffer comes up in Insert state.
 
 Some users prefer plain Emacs bindings in the Minibuffer. To this end, set
-@code{vip-vi-style-in-minibuffer} to @code{nil} in @file{.vip}.
+@code{vip-vi-style-in-minibuffer} to @code{nil} in @file{.viper}.
 @xref{Customization}, to learn how to do this.
 
 When the Minibuffer changes Viper states, you will notice that the appearance
@@ -817,8 +784,8 @@
 last @kbd{!} command whichever file it was issued from.
 Typing @kbd{.} will repeat the last command from any file, and
 searches will repeat the last search. Ex commands can be repeated by typing
-@kbd{:RET}.@refill
-Note: in some rare cases, that @kbd{:RET} may do something dangerous.
+@kbd{: @key{RET}}.@refill
+Note: in some rare cases, that @kbd{: @key{RET}} may do something dangerous.
 However, usually its effect can be undone by typing @kbd{u}.
 @item Registers
 @cindex registers
@@ -846,7 +813,7 @@
 current directory). 
 This directory is inserted in the Minibuffer once you type space after
 @kbd{:e, r}, etc. Viper also supports completion of file names and Ex
-commands (@kbd{TAB}), and it keeps track of
+commands (@key{TAB}), and it keeps track of
 command and file history (@kbd{M-p}, @kbd{M-n}).
 Absolute filenames are required less
 often in Viper.
@@ -978,7 +945,7 @@
 (@xref{Multiple Files in Viper}). In addition to the files, Emacs has
 buffers. These can be seen in the @kbd{:args} list and switched using
 @kbd{:next} if you type @kbd{:set ex-cycle-through-non-files t}, or
-specify @code{(setq ex-cycle-through-non-files t)} in your @file{.vip}
+specify @code{(setq ex-cycle-through-non-files t)} in your @file{.viper}
 file. @xref{Customization}, for details.
 
 @node Undo and Backups, History, Basics, Improvements over Vi
@@ -1038,8 +1005,8 @@
 simply type Return to execute.
 @item M-r and M-s
 To search backward and forward through the history.
-@item RET
-Type RET to accept a default (which is displayed in the prompt).
+@item @key{RET}
+Type @key{RET} to accept a default (which is displayed in the prompt).
 @end table
 
 The history of insertions  can be perused by
@@ -1071,7 +1038,7 @@
 where @samp{register} is any character from @samp{a} through @samp{z}. Then
 you can execute this macro using @kbd{@@register}. It is, of course,
 possible to yank some text into a register and execute it using
-@kbd{@@register}. Typing @kbd{@@@@}, @kbd{@@RET}, or @kbd{@@LF} will
+@kbd{@@register}. Typing @kbd{@@@@}, @kbd{@@RET}, or @kbd{@@C-j} will
 execute the last macro that was executed using @kbd{@@register}.@refill
 
 Viper will automatically lowercase the register, so that pressing the
@@ -1108,7 +1075,7 @@
 
 @cindex completion
 
-Completion is done when you type @kbd{TAB}. The Emacs completer does not
+Completion is done when you type @key{TAB}. The Emacs completer does not
 grok wildcards in filenames. Once you type a wildcard, the completer will
 no longer work for that path.  Remember that Emacs interprets a file name
 of the form @kbd{/foo//bar} as @kbd{/bar} and @kbd{/foo/~/bar} as
@@ -1121,7 +1088,7 @@
 @cindex word search
 
 Viper provides buffer search, the ability to search the buffer for a region
-under the cursor. You have to turn this on in @file{.vip} either by calling
+under the cursor. You have to turn this on in @file{.viper} either by calling
 
 @example
 (vip-buffer-search-enable)
@@ -1172,7 +1139,7 @@
 @end example
 @vindex @code{vip-search-face}
 @noindent
-in @file{~/.vip}. If you want to change how patterns are highlighted, you
+in @file{~/.viper}. If you want to change how patterns are highlighted, you
 will have to set the variable @code{vip-search-face} to some other face,
 such as @code{highlight}. If none of the existing faces fits the bill, you
 would have to create your own. Further details on faces can be found
@@ -1198,7 +1165,7 @@
 will search further back in the buffer, so that one could get
 @samp{Abbrevs} by repeating the 
 keystroke, which appears earlier in the text. Emacs binds this to
-@kbd{ESC /}, so you will have to find a key and bind the function
+@kbd{@key{ESC} /}, so you will have to find a key and bind the function
 @code{dabbrev-expand} to that key.
 Facilities like this make Vi's @kbd{:ab} command obsolete.
 
@@ -1209,8 +1176,8 @@
 @cindex line editor motion
 
 Viper can be set free from the line--limited movements in Vi, such as @kbd{l}
-refusing to move beyond the line, @kbd{ESC} moving one character back,
-etc. These derive from Ex, which is a line editor. If your @file{.vip}
+refusing to move beyond the line, @key{ESC} moving one character back,
+etc. These derive from Ex, which is a line editor. If your @file{.viper}
 contains
 
 @example
@@ -1229,24 +1196,24 @@
 The word-movement commands @kbd{w}, @kbd{e}, etc., and the associated
 deletion/yanking commands, @kbd{dw}, @kbd{yw}, etc., can be made to
 understand Emacs syntax tables. If the variable
-@code{vip-syntax-preference} is set to @code{'strict-vi} (the default) then
+@code{vip-syntax-preference} is set to @code{strict-vi} (the default) then
 the meaning of @emph{word} is the same as in
-Vi. However, if the value is @code{'reformed-vi} then the alphanumeric
+Vi. However, if the value is @code{reformed-vi} then the alphanumeric
 symbols will be those specified by the current Emacs syntax table (which
 may be different for different major modes) plus the underscore symbol
-@code{_}. The user can also specify the value @code{'emacs}, which would
+@code{_}. The user can also specify the value @code{emacs}, which would
 make Viper use exactly the Emacs notion of word. In particular, the
 underscore may not be part of a word. Finally, if
-@code{vip-syntax-preference} is set to @code{'extended}, Viper words would
+@code{vip-syntax-preference} is set to @code{extended}, Viper words would
 consist of characters that are classified as alphanumeric @emph{or} as
 parts of symbols. This is convenient for writing programs and in many other
 situations.
 
 @code{vip-syntax-preference} is a local variable, so it can have different
 values for different major modes. For instance, in programming modes it can
-have the value @code{'extended}. In text modes where words contain special
+have the value @code{extended}. In text modes where words contain special
 characters, such as European (non-English) letters, Cyrillic letters, etc.,
-the value can be @code{'reformed-vi} or @code{'emacs}.
+the value can be @code{reformed-vi} or @code{emacs}.
 
 Changes to @code{vip-syntax-preference} should be done in the hooks to
 various major modes. Furthermore, for these changes to take effect, you
@@ -1284,14 +1251,14 @@
 will be in Vi state again. Except for novice users, @kbd{C-c} is also set
 to temporarily escape to Emacs and execute a command from the current
 major mode.
-@kbd{ESC} will do the same, if
+@key{ESC} will do the same, if
 you configure @key{ESC} as Meta by setting @code{vip-no-multiple-ESC} to nil
-in @file{.vip}. @xref{Customization}. @kbd{C-\}
+in @file{.viper}. @xref{Customization}. @kbd{C-\}
 in Insert or Vi states will make Emacs think @kbd{Meta} has been hit.@refill
 @item \
 @kindex @kbd{\}
-Escape to Emacs to execute a single Emacs command. For instance, @kbd{\
-ESC} will act like a Meta key.
+Escape to Emacs to execute a single Emacs command. For instance,
+@kbd{\ @key{ESC}} will act like a Meta key.
 @item Q
 @kindex @kbd{Q}
 @cindex query replace
@@ -1322,12 +1289,12 @@
 @item # c
 @kindex @kbd{#c<move>}
 @cindex changing case
-Change upper case characters in the region to lower case
+Change upper-case characters in the region to lower-case
 (@code{downcase-region}).
 Emacs command @kbd{M-l} does the same for words.
 @item # C
 @kindex @kbd{#C<move>}
-Change lower case characters in the region to upper case. For instance,
+Change lower-case characters in the region to upper-case. For instance,
 @kbd{# C 3 w} will capitalize 3 words from the current point
 (@code{upcase-region}).
 Emacs command @kbd{M-u} does the same for words.
@@ -1546,9 +1513,9 @@
 @itemize @bullet
 @item
 @cindex initialization
-@cindex .vip
-Elisp code in a @file{.vip} file in your home directory. Viper
-loads @file{.vip} just before it does the binding for mode
+@cindex .viper
+Elisp code in a @file{.viper} file in your home directory. Viper
+loads @file{.viper} just before it does the binding for mode
 hooks. This is the recommended method.
 @item
 @cindex .emacs
@@ -1582,25 +1549,25 @@
 @code{t} and @code{nil} represent ``true'' and ``false'' in Lisp).
 
 Viper supports both the abbreviated Vi variable names and their full
-names. Variable completion is done on full names only. @kbd{TAB} and
-@kbd{SPC} complete
+names. Variable completion is done on full names only. @key{TAB} and
+@key{SPC} complete
 variable names. Typing `=' will complete the name and then will prompt for
-a value, if applicable. For instance, @kbd{:se auSPC} will complete the
-command to @kbd{:set autoindent}; @kbd{:se taSPC} will complete the command
+a value, if applicable. For instance, @kbd{:se au @key{SPC}} will complete the
+command to @kbd{:set autoindent}; @kbd{:se ta @key{SPC}} will complete the command
 and prompt further like this: @kbd{:set tabstop = }.
-However, typing @kbd{:se tsSPC} will produce a ``No match'' message
+However, typing @kbd{:se ts @key{SPC}} will produce a ``No match'' message
 because @kbd{ts} is an abbreviation for @kbd{tabstop} and Viper supports
-completion on full names only. However, you can still hit @kbd{RET}
+completion on full names only. However, you can still hit @key{RET}
 or @kbd{=}, which will complete the command like this: @kbd{:set ts = } and
 Viper will be waiting for you to type a value for the tabstop variable.
-To get the full list of Vi variables, type @kbd{:se SPC TAB}.
+To get the full list of Vi variables, type @kbd{:se @key{SPC} @key{TAB}}.
 
 @table @code
 @item vip-auto-indent nil
 @itemx :se ai (:se autoindent)
-@itemx :se gai (:se global-autoindent)
+@itemx :se ai-g (:se autoindent-global)
 If @code{t}, enable auto indentation.
-by @kbd{RET}, @kbd{o} or @kbd{O} command.
+by @key{RET}, @kbd{o} or @kbd{O} command.
 
 @code{vip-auto-indent} is a local variable. To change the value globally, use
 @code{setq-default}. It may be useful for certain major modes to have their
@@ -1612,7 +1579,7 @@
 buffer only; @kbd{:se gai} does the same globally.
 @item vip-electric-mode t
 If not @code{nil}, auto-indentation becomes electric, which means that
-@kbd{RET}, @kbd{O}, and @kbd{o} indent cursor according to the current
+@key{RET}, @kbd{O}, and @kbd{o} indent cursor according to the current
 major mode. In the future, this variable may control additional electric
 features.
 
@@ -1637,7 +1604,7 @@
 Show matching parens by blinking cursor. 
 @item tab-width t (default setting via @code{setq-default})
 @itemx :se ts=value (:se tabstop=value)
-@itemx :se gts=value (:se global-tabstop=value)
+@itemx :se ts-g=value (:se tabstop-global=value)
 @code{tab-width} is a local variable that controls the width of the tab stops.
 To change the value globally, use @code{setq-default}; for local settings,
 use @code{setq}.
@@ -1650,14 +1617,14 @@
 for all buffers where the tab is not yet set locally,
 including the new buffers.
 
-Note that typing @kbd{TAB} normally
+Note that typing @key{TAB} normally
 doesn't insert the tab, since this key is usually bound to 
 a text-formatting function, @code{indent-for-tab-command} (which facilitates
 programming and document writing). Instead, the tab is inserted via the
 command @code{vip-insert-tab}, which is bound to @kbd{S-tab} (shift + tab).
 
-On some non-windowing terminals, Shift doesn't modify the @kbd{TAB} key, so
-@kbd{S-tab} behaves as if it were @kbd{TAB}. In such a case, you will have
+On some non-windowing terminals, Shift doesn't modify the @key{TAB} key, so
+@kbd{S-tab} behaves as if it were @key{TAB}. In such a case, you will have
 to bind @code{vip-insert-tab} to some other convenient key.
 
 @item vip-shift-width 8
@@ -1682,34 +1649,38 @@
 insert mode when you type text in the Minibuffer; if @code{nil}, typing in
 the Minibuffer feels like plain Emacs.
 @item vip-no-multiple-ESC t
-If you set this to @code{nil}, you can use @kbd{ESC} as Meta in Vi state.
+If you set this to @code{nil}, you can use @key{ESC} as Meta in Vi state.
 Normally, this is not necessary, since graphical displays have separate
 Meta keys (usually on each side of the space bar). On a dumb terminal, Viper
 sets this variable to @code{twice}, which is almost like @code{nil}, except
-that double @kbd{ESC} beeps. This, too, lets ESC to be used as a Meta.
+that double @key{ESC} beeps. This, too, lets @key{ESC} to be used as a Meta.
 @item vip-keysequence-delay 140
 Escape sequences separated by this much delay are interpreted as command,
-ignoring the special meaning of ESC in VI. The default is suitable for most
-terminals. However, if your terminal is extremely slow, you
-might want to increase this slightly. You will know if your terminal is
-slow if the ESC key sequences emitted by the arrow keys are interpreted as
-separately typed characters (and thus the arrow keys won't work).
-Making this value too large will slow you down, so exercise restraint.
+ignoring the special meaning of @key{ESC} in VI. The default is suitable
+for most terminals. However, if your terminal is extremely slow, you might
+want to increase this slightly. You will know if your terminal is slow if
+the @key{ESC} key sequences emitted by the arrow keys are interpreted as
+separately typed characters (and thus the arrow keys won't work).  Making
+this value too large will slow you down, so exercise restraint.
 @item vip-ex-style-motion t
 Set this to @code{nil}, if you want @kbd{l,h} to cross
 lines, etc. @xref{Movement and Markers}, for more info.
 @item vip-ex-style-editing-in-insert t
-Set this to to @code{nil}, if you want @kbd{ESC} to not move back and
+Set this to to @code{nil}, if you want @key{ESC} to not move back and
 @kbd{C-h} to not stop
 at the beginning of a line in Insert state.
-@item vip-always t
-Leave it to Viper to decide when a buffer must be brought up in Vi state,
+@item viper-always t
+@code{t} means: leave it to Viper to decide when a buffer must be brought
+up in Vi state, 
 Insert state, or Emacs state. This heuristics works well in virtually all
-cases.
-This option must be
-set before Viper is loaded or in the @file{.vip} file.
-@item vip-custom-file-name "~/.vip"
-Change this if you want. Must be set in @file{.emacs} (not @file{.vip}!)
+cases. @code{nil} means you either has to invoke @code{viper-mode} manually
+for each buffer (or you can add @code{viper-mode} to the appropriate major mode
+hooks using @code{vip-load-hook}).
+
+This option must be set in the file @file{~/.viper}.
+@item vip-custom-file-name "~/.viper"
+File used for Viper-specific customization.
+Change this setting, if you want. Must be set in @file{.emacs} (not @file{.viper}!)
 before Viper is loaded. Note that you 
 have to set it as a string inside double quotes.
 @item vip-spell-function 'ispell-region
@@ -1768,7 +1739,7 @@
 @code{vip-repeat-from-history},
 which checks the second key by which it is invoked to see which of the
 previous commands to invoke. Viper binds @kbd{f12 1} and @kbd{f12 2} only,
-but the user can bind more in @file{~/.vip}. @xref{Vi Macros}, for how to do
+but the user can bind more in @file{~/.viper}. @xref{Vi Macros}, for how to do
 this.
 @item vip-keep-point-on-undo nil
 If not @code{nil}, Viper tries to not move point when undoing commands.
@@ -1777,7 +1748,7 @@
 then point will be moved to the place where the change took place.
 Set it to @code{t} and see if you like it better.
 @item vip-delete-backwards-in-replace nil
-If not @code{nil}, DEL key will delete characters while moving the cursor
+If not @code{nil}, @key{DEL} key will delete characters while moving the cursor
 backwards.  If @code{nil}, the cursor will move backwards without deleting
 anything.
 @item vip-replace-overlay-face 'vip-replace-overlay-face
@@ -1837,7 +1808,7 @@
 replacement regions (and multi-line replacement regions are deleted).
 @item vip-toggle-key "\C-z"
 Specifies the key used to switch from Emacs to Vi and back.
-Must be set in @file{.vip} or prior to loading Viper. This variable can't be
+Must be set in @file{.viper} or prior to loading Viper. This variable can't be
 changed interactively after Viper is loaded.
 
 In Insert state, this key acts as a temporary escape to Vi state, i.e., it
@@ -1845,7 +1816,7 @@
 were typed in Vi state.
 @item vip-ESC-key "\e"
 Specifies the key used to escape from Insert/Replace states to Vi.
-Must be set in @file{.vip} or prior to loading Viper. This variable cannot be
+Must be set in @file{.viper} or prior to loading Viper. This variable cannot be
 changed interactively after Viper is loaded.
 @item vip-buffer-search-char nil
 Key used for buffer search. @xref{Viper Specials}, for details.
@@ -1874,7 +1845,7 @@
 @noindent
 You can reset some of these constants in Viper with the Ex command @kbd{:set}
 (when so indicated in the table).  Or you
-can include a line like this in your @file{.vip} file:
+can include a line like this in your @file{.viper} file:
 @example
 (setq vip-case-fold-search t)
 @end example
@@ -1892,7 +1863,7 @@
 @vindex @code{vip-want-ctl-h-help}
 @vindex @code{vip-vi-style-in-minibuffer}
 @vindex @code{vip-no-multiple-ESC}
-@vindex @code{vip-always}
+@vindex @code{viper-always}
 @vindex @code{vip-keysequence-delay}
 @vindex @code{vip-ex-style-motion}
 @vindex @code{vip-ex-style-editing-in-insert}
@@ -1987,7 +1958,7 @@
 If you want to
 bind a key, say @kbd{C-v}, to the function that scrolls
 page down and to make @kbd{0} display information on the current buffer,
-putting this in @file{.vip} will do the trick in Vi state:
+putting this in @file{.viper} will do the trick in Vi state:
 @example
 (define-key vip-vi-global-user-map "\C-v" 'scroll-down)
 @end example
@@ -2035,11 +2006,11 @@
 @end example
 
 @noindent
-in @file{~/.vip}. To do the same in Vi and Insert states, one should use
+in @file{~/.viper}. To do the same in Vi and Insert states, one should use
 @code{vi-state} and @code{insert-state}. Changes in Insert state are also
 in effect in Replace state.  For instance, suppose that the user wants to
 use @kbd{dd} in Vi state under Dired mode to delete files, @kbd{u} to unmark
-files, etc. The following code in @file{~/.vip} will then do the job:
+files, etc. The following code in @file{~/.viper} will then do the job:
 
 @example
 (setq my-dired-modifier-map (make-sparse-keymap))
@@ -2075,7 +2046,7 @@
 avoid this, one should add @code{vip-change-state-to-emacs} to an
 appropriate hook of that major mode. (Check the function
 @code{vip-set-hooks} in @file{viper.el} for examples.)  However, if you
-have set @code{vip-always} to @code{t}, chances are that you won't need to
+have set @code{viper-always} to @code{t}, chances are that you won't need to
 perform the above procedure, because Viper will take care of most useful
 defaults.
 
@@ -2122,13 +2093,13 @@
 
 You can also use @code{vip-add-local-keys} to set per buffer
 bindings in Insert state and Emacs state by passing as a parameter the
-symbols @code{'insert-state} and @code{'emacs-state}, respectively.
+symbols @code{insert-state} and @code{emacs-state}, respectively.
 As with global bindings, customized local bindings done to Emacs state
 are not inherited by Insert state.
 
 On rare occasions, local keys may be added by mistake. Usually this is done
 indirectly, by invoking a major mode that adds local keys (e.g.,
-@code{shell-mode} redefines @kbd{RET}). In such a case, exiting the wrong
+@code{shell-mode} redefines @key{RET}). In such a case, exiting the wrong
 major mode won't rid you from unwanted local keys, since these keys are
 local to Viper state and the current buffer, not to the major mode.
 In such situations, the remedy is to type @kbd{M-x vip-zap-local-keys}.
@@ -2155,8 +2126,8 @@
 (unless you explicitly prohibit them by setting
 @code{vip-want-emacs-keys-in-vi} and @code{vip-want-emacs-keys-in-insert} to 
 @code{nil}). 
-If @code{vip-always} is set to @code{t}, Viper will try to bring each buffer
-in the a Viper state that is most appropriate for that buffer.
+If @code{viper-always} is set to @code{t}, Viper will try to bring each buffer
+in the Viper state that is most appropriate for that buffer.
 Usually, this would be the Vi state, but sometimes it could be the Insert
 state or the Emacs state.
 
@@ -2166,33 +2137,33 @@
 typically do not bind such keys. Instead, they use key sequences that start
 with @kbd{C-x} and @kbd{C-c}. This is why it was so important for us to
 free up @kbd{C-x} and @kbd{C-c}.
-It is common for language-specific major modes to bind @kbd{TAB} and
-@kbd{LFD} (the line feed) keys to various formatting functions. This is
+It is common for language-specific major modes to bind @key{TAB} and
+@kbd{C-j} (the line feed) keys to various formatting functions. This is
 extremely useful, but may require some getting used to for a Vi user. If you
 decide that this feature is not for you, you can re-bind these keys as
 explained earlier (@xref{Customization}).
 
-Binding for @kbd{TAB} is one of the most unusual aspects of Viper for many
-novice users.  In Emacs, @kbd{TAB} is used to format text and programs, and
-is extremely useful. For instance, hitting @kbd{TAB} causes the current
+Binding for @key{TAB} is one of the most unusual aspects of Viper for many
+novice users.  In Emacs, @key{TAB} is used to format text and programs, and
+is extremely useful. For instance, hitting @key{TAB} causes the current
 line to be re-indented in accordance with the context.  In programming,
 this is very important, since improper automatic indentation would
 immediately alert the programmer to a possible error. For instance, if a
 @kbd{)} or a @kbd{"} is missing somewhere above the current
-line, @kbd{TAB} is likely to mis-indent the line.
+line, @key{TAB} is likely to mis-indent the line.
 
 For this reason, Viper doesn't change the standard Emacs binding of
-@kbd{TAB}, thereby sacrificing Vi compatibility
+@key{TAB}, thereby sacrificing Vi compatibility
 (except for users at level 1). Instead, in Viper, the key
-@kbd{S-tab} (shift+ tab) is chosen to emulate Vi's @kbd{TAB}.
+@kbd{S-tab} (shift+ tab) is chosen to emulate Vi's @key{TAB}.
 
 We should note that on some non-windowing terminals, Shift doesn't modify
-the @kbd{TAB} key, so @kbd{S-tab} behaves as if it were @kbd{TAB}. In such
+the @key{TAB} key, so @kbd{S-tab} behaves as if it were @key{TAB}. In such
 a case, you will have to bind @code{vip-insert-tab} to some other
 convenient key.
 
 Some packages, notably Dired, Gnus, Info, etc., attach special meaning to
-common keys like @kbd{SPC}, @kbd{x}, @kbd{d}, @kbd{v}, and others. This
+common keys like @key{SPC}, @kbd{x}, @kbd{d}, @kbd{v}, and others. This
 means that Vi command state is inappropriate for working with these
 packages. Fortunately, these modes operate on read-only buffers and are
 designed not for editing files, but for special-purpose browsing, reading
@@ -2210,8 +2181,8 @@
 It is also possible to harness some major modes, even though they may bind
 common keys to specialized commands. Harnessing can make sense for modes
 that bind only a small number of common keys.  For instance, if
-@code{vip-always} is set to @code{t} in your @file{~/.vip} file, Viper will
-harness the Shell mode by changing the bindings for @kbd{C-m} and @kbd{C-d}
+@code{viper-always} is set to @code{t} in your @file{~/.viper} file, Viper will
+harness Shell mode by changing the bindings for @kbd{C-m} and @kbd{C-d}
 using @code{vip-add-local-keys} described in section on customization
 (@xref{Customization}). In general, there is no single recipe for
 harnessing modes. It can be as simple as adding the function
@@ -2221,10 +2192,10 @@
 
 Conversely, it may be the case that most of the major modes harnessed 
 by @code{vip-set-hooks} function fit your working style, except one or two
-cases. In this case, you may still be able to set @code{vip-always} to
+cases. In this case, you may still be able to set @code{viper-always} to
 @code{t} and then remove a hook that forces Vi command state. For instance,
 to unharness @code{lisp-interaction-mode}, you can put the following line
-in your @file{.emacs} (not @code{.vip}!) file after @code{(require 'viper)}:
+in your @file{.emacs} (not @code{.viper}!) file after @code{(require 'viper)}:
 @lisp
 (remove-hook 'lisp-interaction-mode-hook 'viper-mode)
 @end lisp
@@ -2236,7 +2207,7 @@
 several such minor modes and takes care of them, so that the above trick
 is usually not necessary.  If you find that some minor mode, e.g.,
 @code{nasty-mode.el} interferes with Viper, putting the following in
-@file{.vip} should fix the problem:
+@file{.viper} should fix the problem:
 @lisp
 (vip-harness-minor-mode "nasty-mode")
 @end lisp
@@ -2259,7 +2230,7 @@
 
 @vindex @code{vip-want-emacs-keys-in-vi}
 @vindex @code{vip-want-emacs-keys-in-insert}
-@vindex @code{vip-always}
+@vindex @code{viper-always}
 @findex @code{vip-set-hooks}
 @findex @code{viper-mode}
 @findex @code{vip-harness-minor-mode}
@@ -2281,7 +2252,7 @@
 @item vip-buffer-search-char nil
 Enable buffer search. Explicit call to @code{vip-buffer-search-enable}
 sets @code{vip-buffer-search-char} to @kbd{g}. Alternatively, the user can
-set @code{vip-buffer-search-char} in @file{.vip} to a key sequence
+set @code{vip-buffer-search-char} in @file{.viper} to a key sequence
 to be used for buffer search. There is no need to call
 @code{vip-buffer-search-enable} in that case.
 @findex @code{vip-buffer-search-enable}
@@ -2305,8 +2276,8 @@
 second @kbd{/} doesn't follow quickly enough, then Viper will issue the
 usual prompt @kbd{/} and will wait for input, as usual in Vi.
 If you don't like this behavior, you can ``unrecord'' these macros in your
-@file{~/.vip} file. For instance, if you don't like the above feature, put
-this in @file{~/.vip}:
+@file{~/.viper} file. For instance, if you don't like the above feature, put
+this in @file{~/.viper}:
 @example
 (vip-set-vi-search-style-macros 'undefine)
 @end example
@@ -2362,7 +2333,8 @@
 try these suffixes 
 in the order listed and will check if the corresponding file exists.
 
-For instance, if completion stopped at `paper.' and the user typed RET,
+For instance, if completion stopped at `paper.' and the user typed
+@key{RET},
 then Viper will check if the files `paper.', `paper.tex', `paper.c', etc., exist.
 It will take the first such file. If no file exists, Viper will give a chance
 to complete the file name by typing the appropriate suffix. If `paper.' was
@@ -2384,7 +2356,7 @@
 in succession 
 will undo the previous insertion from the ring and insert the next item on
 the ring. If a larger ring size is needed, change the value of the above
-variable in the @file{~/.vip} file.
+variable in the @file{~/.viper} file.
 
 Since typing these sequences of keys may be tedious, it is suggested that the
 user should bind a function key, such as @kbd{f31}, as follows:
@@ -2459,9 +2431,9 @@
 (copy-face 'default 'vip-minibuffer-insert-face)
 (copy-face 'default 'vip-minibuffer-emacs-face)
 @end example
-in the @file{~/.vip} file. However, in that case, the user will not have any
+in the @file{~/.viper} file. However, in that case, the user will not have any
 indication of the current Viper state in the minibuffer. (This is important
-if the user accidentally switches to another Viper state by typing @kbd{ESC} or
+if the user accidentally switches to another Viper state by typing @key{ESC} or
 @kbd{C-z}).
 @end table
 
@@ -2695,7 +2667,7 @@
 not just to printable keys. For instance, one can define a macro that will
 be invoked by hitting @kbd{f3} then @kbd{f2} function keys. (The keys
 @kbd{delete} and @kbd{backspace} are excluded; also, a macro invocation
-sequence can't start with ESC. Some other keys, such as @kbd{f1} and
+sequence can't start with @key{ESC}. Some other keys, such as @kbd{f1} and
 @kbd{help}, can't be bound to macros under Emacs (not XEmacs), since they
 are bound in @code{key-translation-map}, which overrides any other binding
 the user gives to keys. In general, keys that have a binding in
@@ -2719,7 +2691,7 @@
 When the user finishes defining a macro (which is done by typing @kbd{C-x)} ---
 a departure from Vi), you will be asked whether you want this
 macro to be global, mode-specific, or buffer-specific. You will also be
-given a chance to save the macro in your @file{~/.vip} file.
+given a chance to save the macro in your @file{~/.viper} file.
 This is the easiest way to save a macro and make
 it permanently available. If you work your startup files with bare hands,
 here is how Viper saves the above macro so that it will be
@@ -2749,7 +2721,7 @@
 instance, holding Meta and Control and pressing @kbd{f4} is represented as
 @kbd{(control meta f4)}.
 If all members of a vectors are printable characters (or sequences, such as
-@kbd{\e}, @kbd{\t}, for ESC and TAB), then they can also be represented as
+@kbd{\e}, @kbd{\t}, for @key{ESC} and @key{TAB}), then they can also be represented as
 strings:
 
 @example
@@ -2768,14 +2740,14 @@
 
 For convenience, Viper also lets you define Vi-style macros in its Emacs
 state. There is no Ex command, like @kbd{:map} and @kbd{:map!} for doing
-this, but the user can include such a macro in the @file{~/.vip} file. The
+this, but the user can include such a macro in the @file{~/.viper} file. The
 only thing is that the @code{vip-record-kbd-macro} command should specify
-@code{'emacs-state} instead of @code{'vi-state} or @code{'insert-state}.
+@code{emacs-state} instead of @code{vi-state} or @code{insert-state}.
 
 The user can get rid of a macro either by using the Ex commands @kbd{:unmap}
 and @kbd{:unmap!} or by issuing a call to @code{vip-unrecord-kbd-macro}.
 The latter is more powerful, since it can delete macros even in
-@code{'emacs-state}. However, @code{vip-unrecord-kbd-macro} is usually
+@code{emacs-state}. However, @code{vip-unrecord-kbd-macro} is usually
 needed only when the user needs to get rid of the macros that are already
 predefined in Viper.
 The syntax is:
@@ -2784,8 +2756,8 @@
 (vip-unrecord-kbd-macro macro state)
 @end example
 @noindent
-The second argument must be @code{'vi-state}, @code{'insert-state}, or
-@code{'emacs-state}. The first argument is a name of a macro.  To avoid
+The second argument must be @code{vi-state}, @code{insert-state}, or
+@code{emacs-state}. The first argument is a name of a macro.  To avoid
 mistakes in specifying names of existing macros, type @kbd{M-x
 vip-describe-kbd-macros} and use a name from the list displayed by this
 command.
@@ -2826,14 +2798,14 @@
 other function. Emacs doesn't allow the user to do that, but Viper does
 this through its keyboard macro facility. To do this, type @kbd{:map }
 first. When you are asked to enter a macro name, hit f13 twice, followed by
-RET or SPC.
+@key{RET} or @key{SPC}.
 
 Emacs will now start the mapping process by actually executing 
 Vi and Emacs commands, so that you could see what will happen each time the
 macro is executed. Suppose now we wanted to bind the key sequence
 @kbd{f13 f13} to the command @code{eval-last-sexp}. To accomplish this, we
 can type @kbd{M-x eval-last-sexp} followed by @kbd{C-x )}.
-If you answer positively to Viper's offer to save this macro in @file{~/.vip}
+If you answer positively to Viper's offer to save this macro in @file{~/.viper}
 for future uses, the following will be inserted in that file:
 
 @example
@@ -2882,7 +2854,7 @@
 the actual key @kbd{f6} if it is to be part of a macro name; you do
 @emph{not} write `f 6'. When entering keys, Viper displays them as strings or
 vectors (e.g., "abc" or [f6 f7 a]). The same holds for unmapping. Hitting
-TAB while typing a macro name in the @kbd{:unmap} or @kbd{:unmap!} command
+@key{TAB} while typing a macro name in the @kbd{:unmap} or @kbd{:unmap!} command
 will cause name completion. Completions are displayed as strings or vectors.
 However, as before, you don't actually type ``"'', ``['', or ``]'' that
 appear in the completions. These are meta-symbols that indicate whether
@@ -2905,7 +2877,7 @@
 @code{vip-fast-keyseq-timeout}, which defaults to 200 milliseconds.
 @vindex @code{vip-fast-keyseq-timeout}
 
-For the most part, Viper macros defined in @file{~/.vip} can be shared
+For the most part, Viper macros defined in @file{~/.viper} can be shared
 between Emacs, XEmacs, and X and TTY modes.  However, macros defined via
 function keys may need separate definitions when XEmacs and Emacs have
 different names for the same keyboard key. For instance, the `Page Up' key
@@ -2925,7 +2897,1299 @@
 currently defined. To see all macros along with their definitions, type
 @kbd{M-x vip-describe-kbd-macros}.
 
-@include viper-cmd.texi
+@node Commands,,Customization,Top,Top
+@chapter Commands
+
+This section is a semi-automatically bowdlerized version of the Vi 
+reference created by @* @samp{maart@@cs.vu.nl} and others. It can be 
+found on the Vi archives. This reference has been adapted for Viper.@refill
+
+@menu
+* Groundwork::			Textual Conventions and Viper basics
+* Text Handling::		Moving, Editing, Undoing.
+* Display::			Scrolling.
+* File and Buffer Handling::	Editing, Writing and Quitting.
+* Mapping::			Mapping Keys, Keyboard Macros
+* Shell Commands::		Accessing Shell Commands, Processing Text
+* Options::			Ex options, the @kbd{:set} commands
+* Emacs Related Commands::	Meta Keys, Windows
+* Mouse-bound Commands::        Search and insertion of text
+@end menu
+
+@node Groundwork, Text Handling, Commands, Commands
+@comment  node-name,  next,  previous,  up
+@section Groundwork
+
+The VI command set is based on the idea of combining motion commands
+with other commands. The motion command is used as a text region
+specifier for other commands.
+We classify motion commands into @dfn{point commands} and
+@dfn{line commands}.@refill
+
+@cindex point commands
+
+The point commands are:
+
+@quotation
+@kbd{h}, @kbd{l}, @kbd{0},  @kbd{$}, @kbd{w}, @kbd{W}, @kbd{b}, @kbd{B},
+@kbd{e}, @kbd{E}, @kbd{(}, @kbd{)}, @kbd{/}, @kbd{?}, @kbd{`}, @kbd{f},
+@kbd{F}, @kbd{t}, @kbd{T}, @kbd{%}, @kbd{;}, @kbd{,}, @kbd{^}
+@end quotation
+
+@cindex line commands
+
+The line commands are:
+
+@quotation
+@kbd{j}, @kbd{k}, @kbd{+}, @kbd{-}, @kbd{H}, @kbd{M}, @kbd{L}, @kbd{@{},
+@kbd{@}}, @kbd{G}, @kbd{'},  @kbd{[[}, @kbd{]]}, @kbd{[]}
+@end quotation
+@noindent
+
+Text Deletion Commands (@xref{Deleting Text}), Change commands
+(@xref{Changing Text}), even Shell Commands (@xref{Shell Commands})
+use these commands to describe a region of text to operate on.
+
+@cindex r and R region specifiers
+
+Viper adds two region descriptors, @kbd{r} and @kbd{R}. These describe
+the Emacs regions (@xref{Basics}), but they are not movement commands.
+
+The command description uses angle brackets @samp{<>} to indicate
+metasyntactic variables, since the normal conventions of using simple
+text can be confusing with Viper where the commands themselves are
+characters. Watch out where @kbd{<} shift commands and @kbd{<count>} are
+mentioned together!!!
+
+@kindex <move>
+@kindex <a-z>
+@kindex <address>
+@cindex <move>
+@cindex <a-z>
+@cindex <address>
+@cindex movements
+
+@samp{<move>} refers to the above movement commands, and @samp{<a-z>}
+refers to registers or textmarkers from @samp{a} to @samp{z}. Note
+that the @samp{<move>}  is described by full move commands, that is to
+say they will take counts, and otherwise behave like normal move commands.
+@cindex Ex addresses
+@samp{<address>} refers to Ex line addresses, which include
+
+@table @kbd
+@item . <No address>
+Current line
+@item .+n .-n
+Add or subtract for current line
+@item number
+Actual line number, use @kbd{.=} to get the line number
+@item '<a-z>
+Textmarker
+@item $
+Last line
+@item x,y
+Where x and y are one of the above
+@item %
+@cindex % (Ex address)
+For the whole file, same as (1,$).
+@item /pat/
+@item ?pat?
+Next or previous line with pattern pat
+@end table
+
+@cindex % (Current file)
+Note that @samp{%} is used in Ex commands to mean current file. If you
+want a @samp{%} in your command, it must be escaped as @samp{\%}.
+@cindex # (Previous file)
+Similarly, @samp{#} expands to the previous file. The previous file is
+the first file in @kbd{:args} listing. This defaults to previous window
+in the VI sense if you have one window only.
+
+@kindex <args>
+@kindex <cmd>
+@cindex <args>
+@cindex <cmd>
+@noindent
+Others like @samp{<args> -- arguments}, @samp{<cmd> -- command} etc.
+should be fairly obvious.
+
+@noindent
+Common characters referred to include:
+
+@table @kbd
+@item <sp>
+Space 
+@item <ht>
+Tab 
+@item <lf>
+Linefeed 
+@item <esc>
+Escape
+@item <cr>
+Return, Enter
+@end table
+@cindex <cr>
+@cindex <esc>
+@cindex <lf>
+@cindex <ht>
+@cindex <sp>
+
+@cindex words
+@cindex WORDS
+@cindex char
+@cindex CHAR
+
+We also use @samp{word} for alphanumeric/non-alphanumeric words, and 
+@samp{WORD} for whitespace delimited words. @samp{char} refers to any
+ASCII character, @samp{CHAR} to non-whitespace character. 
+Brackets @samp{[]} indicate optional parameters; @samp{<count>} also 
+optional, usually defaulting to 1. Brackets are elided for
+@samp{<count>} to eschew obfuscation.
+
+Viper's idea of Vi's words is slightly different from Vi. First, Viper
+words understand Emacs symbol tables. Therefore, all symbols declared to be
+alphanumeric in a symbol table can automatically be made part of the Viper
+word.  This is useful when, for instance, editing text containing European,
+Cyrillic, etc., letters.
+
+Second, Viper lets you depart from Vi's idea of a word by changing the
+value of @code{vip-syntax-preference}. By default, this variable is set to
+@code{strict-vi}, which means that alphanumeric symbols are exactly as
+in Vi.
+However, if the value is @code{reformed-vi} then alphanumeric
+symbols will be those specified by the current Emacs syntax table (which
+may be different for different major modes) plus the underscore symbol
+@code{_}. The user can also specify the value @code{emacs}, which would
+make Viper use exactly the Emacs notion of word. In particular, the
+underscore may not be part of a word. Finally, if
+@code{vip-syntax-preference} is set to @code{extended}, Viper words would
+consist of characters that are classified as alphanumeric @emph{or} as
+parts of symbols. This is convenient for writing programs and in many other
+situations.
+
+@vindex @code{vip-syntax-preference}
+@cindex syntax table
+
+@code{vip-syntax-preference} is a local variable, so it can have different
+values for different major modes. For instance, in programming modes it can
+have the value @code{extended}. In text modes where words contain special
+characters, such as European (non-English) letters, Cyrillic letters, etc.,
+the value can be @code{reformed-vi} or @code{emacs}.
+
+Changes to @code{vip-syntax-preference} should be done in the hooks to
+various major modes. Furthermore, for these changes to take effect, you
+should execute @code{(vip-update-alphanumeric-class)} right after changing
+the value of @code{vip-syntax-preference}.
+
+The above discussion concerns only the movement commands. In regular
+expressions, words remain the same as in Emacs.  That is, the expressions
+@code{\w}, @code{\>}, @code{\<}, etc., use Emacs' idea of what is a word,
+and they don't look into the value of variable
+@code{vip-syntax-preference}. This is because Viper doesn't change syntax
+tables in order to not thwart the various major modes that set these
+tables.
+
+The usual Emacs convention is used to indicate Control Characters, i.e
+C-h for Control-h. @emph{Do not confuse this to mean the separate
+characters C - h!!!} The @kbd{^} is itself, never used to indicate a
+Control character.
+
+@node Text Handling, Display, Groundwork, Commands
+@section Text Handling
+
+@menu
+* Move Commands::		Moving, Searching
+* Marking::		        Textmarkers in Viper and the Emacs Mark.
+* Appending Text::		Text insertion, Shifting, Putting
+* Editing in Insert State::	Autoindent, Quoting etc.
+* Deleting Text::		Deleting
+* Changing Text::		Changing, Replacement, Joining
+* Search and Replace::		Searches, Query Replace, Pattern Commands
+* Yanking::			Yanking, Viewing Registers
+* Undoing::			Multiple Undo, Backups
+@end menu
+
+@node Move Commands,Marking,,Text Handling
+@subsection Move Commands
+
+@cindex movement commands
+@cindex searching
+@cindex textmarkers
+@cindex markers
+@cindex column movement
+@cindex paragraphs
+@cindex headings
+@cindex sections
+@cindex sentences
+@cindex matching parens
+@cindex paren matching
+
+@table @kbd
+@item <count>  h  C-h
+<count> chars to the left.
+@item <count>  j  <lf> C-n
+<count> lines downward.
+@item <count>  l  <sp>
+<count> chars to the right.
+@item <count>  k  C-p
+<count> lines upward.
+@item <count>  $
+To the end of line <count> from the cursor.
+@item <count>  ^
+To the first CHAR <count> - 1 lines lower.
+@item <count>  -
+To the first CHAR <count> lines higher.
+@item <count>  +  <cr>
+To the first CHAR <count> lines lower.
+@item  0
+To the first char of the line.
+@item <count> |
+To column <count>
+@item <count>  f<char>
+<count> <char>s to the right (find).
+@item <count>  t<char>
+Till before <count> <char>s to the right.
+@item <count>  F<char>
+<count> <char>s to the left.
+@item <count>  T<char>
+Till after <count> <char>s to the left.
+@item <count>  ;
+Repeat latest @kbd{f t F T} <count> times.
+@item <count>  ,
+Repeat latest @kbd{f t F T}
+<count> times in opposite direction.
+@item <count>  w
+<count> words forward.
+@item <count>  W
+<count> WORDS forward.
+@item <count>  b
+<count> words backward.
+@item <count>  B
+<count> WORDS backward.
+@item <count>  e
+To the end of word <count> forward.
+@item <count>  E
+To the end of WORD <count> forward.
+@item <count>  G
+Go to line <count> (default end-of-file).
+@item <count>  H
+To line <count> from top of the screen (home).
+@item <count>  L
+To line <count> from bottom of the screen (last).
+@item  M
+To the middle line of the screen.
+@item <count>  )
+<count> sentences forward.
+@item <count>  (
+<count> sentences backward.
+@item <count>  @}
+<count> paragraphs forward.
+@item <count>  @{
+<count> paragraphs backward.
+@item <count>  ]]
+To the <count>th heading.
+@item <count>  [[
+To the <count>th previous heading.
+@item <count>  []
+To the end of <count>th heading.
+@item  m<a-z>
+Mark the cursor position with a letter.
+@item  `<a-z>
+To the mark.
+@item  '<a-z>
+To the first CHAR of the line with the mark.
+@item [<a-z>
+Show contents of textmarker.
+@item ]<a-z>
+Show contents of register.
+@item  ``
+To the cursor position before the latest absolute
+jump (of which are examples @kbd{/} and @kbd{G}).
+@item  ''
+To the first CHAR of the line on which the cursor
+was placed before the latest absolute jump.
+@item <count>  /<string>
+To the <count>th occurrence of <string>.
+@item <count>  /<cr>
+To the <count>th occurrence of <string> from previous @kbd{/ or ?}.
+@item <count>  ?<string>
+To the <count>th previous occurrence of <string>.
+@item <count>  ?<cr>
+To the <count>th previous occurrence of <string> from previous @kbd{? or /}.
+@item  n
+Repeat latest @kbd{/} @kbd{?} (next).
+@item  N
+Repeat latest search in opposite direction.
+@item C-c /
+Without a prefix argument, this command toggles
+case-sensitive/case-insensitive search modes and plain vanilla/regular
+expression search. With the prefix argument 1, i.e.,
+@kbd{1 C-c /}, this toggles case-sensitivity; with the prefix argument 2,
+toggles plain vanilla search and search using
+regular expressions. @xref{Viper Specials}, for alternative ways to invoke
+this function.
+@cindex vanilla search
+@cindex case-sensitive search
+@cindex case-insensitive search
+@item  %
+Find the next bracket/parenthesis/brace and go to its match.
+By default, Viper ignores brackets/parentheses/braces that occur inside
+parentheses. You can change this by setting
+@code{vip-parse-sexp-ignore-comments} to nil in your @file{.viper} fipe.
+This option can also be toggled interactively if you quickly hit @kbd{%}
+three times.
+@end table
+@kindex @kbd{%}
+@kindex @kbd{C-c /}
+@kindex @kbd{N}
+@kindex @kbd{n}
+@kindex @kbd{?<cr>}
+@kindex @kbd{/<cr>}
+@kindex @kbd{?<string>}
+@kindex @kbd{/<string>}
+@kindex @kbd{''}
+@kindex @kbd{``}
+@kindex @kbd{]<a-z>}
+@kindex @kbd{[<a-z>}
+@kindex @kbd{'<a-z>}
+@kindex @kbd{`<a-z>}
+@kindex @kbd{m<a-z>}
+@kindex @kbd{[]}
+@kindex @kbd{[[}
+@kindex @kbd{]]}
+@kindex @kbd{@{}
+@kindex @kbd{@}}
+@kindex @kbd{(}
+@kindex @kbd{)}
+@kindex @kbd{M}
+@kindex @kbd{L}
+@kindex @kbd{H}
+@kindex @kbd{G}
+@kindex @kbd{E}
+@kindex @kbd{e}
+@kindex @kbd{B}
+@kindex @kbd{b}
+@kindex @kbd{W}
+@kindex @kbd{w}
+@kindex @kbd{,}
+@kindex @kbd{;}
+@kindex @kbd{T<char>}
+@kindex @kbd{F<char>}
+@kindex @kbd{t<char>}
+@kindex @kbd{f<char>}
+@kindex @kbd{|}
+@kindex @kbd{0}
+@kindex @kbd{<cr>}
+@kindex @kbd{+}
+@kindex @kbd{-}
+@kindex @kbd{^}
+@kindex @kbd{$}
+@kindex @kbd{C-p}
+@kindex @kbd{<lf>}
+@kindex @kbd{<sp>}
+@kindex @kbd{C-n}
+@kindex @kbd{C-h}
+@kindex @kbd{h}
+@kindex @kbd{j}
+@kindex @kbd{k}
+@kindex @kbd{l}
+@vindex @code{vip-parse-sexp-ignore-comments}
+
+@node Marking,Appending Text,Move Commands,Text Handling
+@subsection Marking
+
+Emacs mark is referred to in the region specifiers @kbd{r} and @kbd{R}.
+@xref{Emacs Preliminaries} and @pxref{Basics} for explanation. Also
+see @ref{Mark,,Mark,emacs,The GNU Emacs manual}, for an explanation of
+the Emacs mark ring.
+
+@cindex marking
+
+@table @kbd
+@item m<a-z>
+Mark the current file and position with the specified letter.
+@item m .
+Set the Emacs mark (@xref{Emacs Preliminaries}) at point.
+@item m <
+Set the Emacs mark at beginning of buffer.
+@item m >
+Set the Emacs mark at end of buffer.
+@item m ,
+Jump to the Emacs mark.
+@item :mark <char>
+ Mark position with text marker named <char>. This is an Ex command.
+@item :k <char>
+ Same as @kbd{:mark}.
+@item ``
+Exchange point and mark.
+@item ''
+Exchange point and mark and go to the first CHAR on line.
+@item '<a-z>
+Go to specified Viper mark.
+@item
+Go to specified Viper mark and go to the first CHAR on line.
+@end table
+@kindex @kbd{m<a-z>}
+@kindex @kbd{m.}
+@kindex @kbd{m>}
+@kindex @kbd{m<}
+@kindex @kbd{m,}
+@findex @kbd{:mark}
+@findex @kbd{:k}
+@kindex @kbd{''}
+@kindex @kbd{``}
+@kindex @kbd{`<a-z>}
+@kindex @kbd{'<a-z>}
+
+@node  Appending Text, Editing in Insert State, Marking,Text Handling
+@subsection Appending Text
+
+@xref{Options} to see how to change tab and shiftwidth size. See the GNU
+Emacs manual, or try @kbd{C-ha tabs} (If you have turned Emacs help on).
+Check out the variable @code{indent-tabs-mode} to put in just spaces.
+Also see options for word-wrap.
+
+@cindex inserting
+@cindex appending
+@cindex paste
+@cindex put
+
+@table @kbd
+@item <count>  a
+<count> times after the cursor.
+@item <count>  A
+<count> times at the end of line.
+@item <count>  i
+<count> times before the cursor (insert).
+@item <count>  I
+<count> times before the first CHAR of the line
+@item <count>  o
+On a new line below the current (open).
+The count is only useful on a slow terminal.
+@item <count>  O
+On a new line above the current.
+The count is only useful on a slow terminal.
+@item <count>  ><move>
+Shift the lines described by <count><move> one
+shiftwidth to the right (layout!).
+@item <count>  >>
+Shift <count> lines one shiftwidth to the right.
+@item <count>  ["<a-z1-9>]p
+Put the contents of the (default undo) buffer
+<count> times after the cursor. The register will
+be automatically downcased.
+@item <count>  ["<a-z1-9>]P
+Put the contents of the (default undo) buffer
+<count> times before the cursor. The register will
+@item [<a-z>
+Show contents of textmarker.
+@item ]<a-z>
+Show contents of register.
+@item <count>  .
+Repeat previous command <count> times. For destructive
+commands as well as undo.
+@item f1 1 and f1 2
+While @kbd{.} repeats the last destructive command,
+these two macros repeat the second-last and the third-last destructive
+commands. @xref{Vi Macros}, for more information on Vi macros.
+@item C-c M-p and C-c M-n
+In Vi state,
+these commands help peruse the history of Vi's destructive commands.
+Successive typing of @kbd{C-c M-p} causes Viper to search the history in
+the direction 
+of older commands, while hitting @kbd{C-c M-n} does so in reverse
+order. Each command in the history is displayed in the Minibuffer. The
+displayed command can 
+then be executed by typing `@kbd{.}'.
+
+Since typing the above sequences of keys may be tedious, the
+functions doing the perusing can be bound to unused keyboard keys in the
+@file{~/.viper} file. @xref{Viper Specials}, for details.
+@end table
+@kindex @kbd{C-c M-p}
+@kindex @kbd{C-c M-n}
+@kindex @kbd{.}
+@kindex @kbd{]<a-z>}
+@kindex @kbd{[<a-z>}
+@kindex @kbd{P}
+@kindex @kbd{p}
+@kindex @kbd{"<a-z1-9>p}
+@kindex @kbd{"<a-z1-9>P}
+@kindex @kbd{>>}
+@kindex @kbd{><move>}
+@kindex @kbd{O}
+@kindex @kbd{o}
+@kindex @kbd{i}
+@kindex @kbd{A}
+@kindex @kbd{a}
+
+@node Editing in Insert State, Deleting Text, Appending Text,Text Handling
+@subsection Editing in Insert State
+
+Minibuffer can be edited similarly to Insert state, and you can switch
+between Insert/Replace/Vi states at will.
+Some users prefer plain Emacs feel in the Minibuffer. To this end, set
+@var{vip-vi-style-in-minibuffer} to @code{nil}.
+
+@cindex Insert state
+
+@table @kbd
+@item C-v
+Deprive the next char of its special meaning (quoting).
+@item C-h
+One char back.
+@item C-w
+One word back.
+@item C-u
+Back to the begin of the change on the
+current line.
+
+@end table
+@kindex @kbd{C-u}
+@kindex @kbd{C-w}
+@kindex @kbd{C-v}
+
+@node Deleting Text, Changing Text, Editing in Insert State, Text Handling
+@subsection Deleting Text
+
+
+There is one difference in text deletion that you should be
+aware of. This difference comes from Emacs and was adopted in Viper
+because we find it very useful. In Vi, if you delete a line, say, and then
+another line, these two deletions are separated and are put back
+separately if you use the @samp{p} command. In Emacs (and Viper), successive
+series of deletions that are @emph{not interrupted} by other commands are
+lumped together, so the deleted text gets accumulated and can be put back
+as one chunk. If you want to break a sequence of deletions so that the
+newly deleted text could be put back separately from the previously deleted
+text, you should perform a non-deleting action, e.g., move the cursor one
+character in any direction.
+
+@cindex shifting text
+
+@table @kbd
+@item <count>  x
+Delete <count> chars under and after the cursor.
+@item <count>  X
+Delete <count> chars before the cursor.
+@item <count>  d<move>
+Delete from point to endpoint of <count><move>.
+@item <count>  dd
+Delete <count> lines.
+@item  D
+The rest of the line.
+@item <count>  <<move>
+Shift the lines described by <count><move> one
+shiftwidth to the left (layout!).
+@item <count>  <<
+Shift <count> lines one shiftwidth to the left.
+@end table
+@kindex @kbd{<<}
+@kindex @kbd{<<move>}
+@kindex @kbd{D}
+@kindex @kbd{dd}
+@kindex @kbd{d<move>}
+@kindex @kbd{X}
+@kindex @kbd{x}
+
+@node Changing Text, Search and Replace, Deleting Text,Text Handling
+@subsection Changing Text
+
+@cindex joining lines
+@cindex changing case
+@cindex quoting regions
+@cindex substitution
+
+@table @kbd
+@item <count>  r<char>
+Replace <count> chars by <char> - no <esc>.
+@item <count>  R
+Overwrite the rest of the line,
+appending change @var{count - 1} times.
+@item <count>  s
+Substitute <count> chars.
+@item <count>  S
+Change <count> lines.
+@item <count>  c<move>
+Change from begin to endpoint of <count><move>.
+@item <count>  cc
+Change <count> lines.
+@item <count>  C
+The rest of the line and <count> - 1 next lines.
+@item <count>  =<move>
+Reindent the region described by move.
+@item <count>  ~
+Switch lower and upper cases.
+@item <count>  J
+Join <count> lines (default 2).
+@item  :[x,y]s/<p>/<r>/<f>
+Substitute (on lines x through y) the pattern
+<p> (default the last pattern) with <r>.  Useful
+flags <f> are @samp{g} for @samp{global} (i.e. change every
+non-overlapping occurrence of <p>) and @samp{c} for
+@samp{confirm} (type @samp{y} to confirm a particular
+substitution, else @samp{n} ).  Instead of @kbd{/} any
+punctuation CHAR unequal to <space> <tab> and <lf> can be used as
+delimiter.
+@item  :[x,y]copy [z]
+ Copy text between @kbd{x} and @kbd{y} to the position after @kbd{z}.
+@item  :[x,y]t [z]
+ Same as @kbd{:copy}.
+@item  :[x,y]move [z]
+ Move text between @kbd{x} and @kbd{y} to the position after @kbd{z}.
+@item  &
+Repeat latest Ex substitute command, e.g.
+@kbd{:s/wrong/good}.
+@item C-c /
+Toggle case-sensitive search. With prefix argument, toggle vanilla/regular
+expression search.
+@item #c<move>
+Change upper-case characters in the region to lower-case.
+@item #C<move>
+Change lower-case characters in the region to upper-case.
+@item #q<move> 
+Insert specified string at the beginning of each line in the region
+@item C-c M-p and C-c M-n
+In Insert and Replace states, these keys are bound to commands that peruse
+the history of the text 
+previously inserted in other insert or replace commands. By repeatedly typing
+@kbd{C-c M-p} or @kbd{C-c M-n}, you will cause Viper to
+insert these previously used strings one by one.
+When a new string is inserted, the previous one is deleted. 
+
+In Vi state, these keys are bound to functions that peruse the history of
+destructive Vi commands.
+@xref{Viper Specials}, for details.
+@end table
+@kindex @kbd{C-c M-p}
+@kindex @kbd{C-c M-n}
+@kindex @kbd{#q<move> }
+@kindex @kbd{#C<move>}
+@kindex @kbd{#c<move>}
+@kindex @kbd{&}
+@findex @kbd{:substitute/<p>/<r>/<f>}
+@findex @kbd{:s/<p>/<r>/<f>}
+@findex @kbd{:copy [z]}
+@findex @kbd{:t [z]}
+@findex @kbd{:move [z]}
+@kindex @kbd{J}
+@kindex @kbd{~}
+@kindex @kbd{=<move>}
+@kindex @kbd{C}
+@kindex @kbd{cc}
+@kindex @kbd{c<move>}
+@kindex @kbd{S}
+@kindex @kbd{s}
+@kindex @kbd{R}
+@kindex @kbd{r<char>}
+
+@node Search and Replace, Yanking, Changing Text,Text Handling
+@subsection Search and Replace
+
+@xref{Groundwork}, for Ex address syntax. @xref{Options} to see how to
+get literal (non-regular-expression) search and how to stop search from
+wrapping around.
+
+@table @kbd
+@item <count>  /<string>
+To the <count>th occurrence of <string>.
+@item <count>  ?<string>
+To the <count>th previous occurrence of <string>.
+@item <count>  g<move>
+Search for the text described by move. (off by default)
+@item n
+Repeat latest @kbd{/} @kbd{?} (next).
+@item N
+Idem in opposite direction.
+@item %
+Find the next bracket and go to its match
+@item :[x,y]g/<string>/<cmd>
+@cindex text processing
+Search globally [from line x to y] for <string>
+and execute the Ex <cmd> on each occurrence.
+@item :[x,y]v/<string>/<cmd>
+Execute <cmd> on the lines that don't match.
+@item #g<move>
+Execute the last keyboard macro for each line in the region.
+@xref{Macros and Registers}, for more info.
+@item Q
+Query Replace.
+@item :ta <name>
+Search in the tags file where <name> is defined (file, line), and go to it.
+@item  :[x,y]s/<p>/<r>/<f>
+Substitute (on lines x through y) the pattern <p> (default the last
+pattern) with <r>.  Useful
+flags <f> are @samp{g} for @samp{global} (i.e. change every
+non-overlapping occurrence of <p>) and @samp{c} for
+@samp{confirm} (type @samp{y} to confirm a particular
+substitution, else @samp{n}).  Instead of @kbd{/} any
+punctuation CHAR unequal to <space> <tab> and <lf> can be used as delimiter.
+@item  &
+ Repeat latest Ex substitute command, e.g. @kbd{:s/wrong/good}.
+@end table
+@kindex @kbd{&}
+@findex @kbd{:substitute/<p>/<r>/<f>}
+@kindex @kbd{Q}
+@kindex @kbd{#g<move>}
+@findex @kbd{:v/<string>/<cmd>}
+@findex @kbd{:g/<string>/<cmd>}
+@findex @kbd{:global/<string>/<cmd>}
+@findex @kbd{:tag <name>}
+@kindex @kbd{%}
+@kindex @kbd{N}
+@kindex @kbd{n}
+@kindex @kbd{g<move>}
+@kindex @kbd{?<string>}
+@kindex @kbd{/<string>}
+
+@node Yanking,Undoing,Search and Replace,Text Handling
+@subsection Yanking
+
+@cindex cut and paste
+@cindex paste
+
+@table @kbd
+@item <count>  y<move>
+Yank from begin to endpoint of <count><move>.
+@item <count>  "<a-z>y<move>
+Yank from begin to endpoint of <count><move> to register.
+@item <count>  "<A-Z>y<move>
+Yank from begin to endpoint of <count><move> and append
+to register.
+@item <count>  yy
+<count> lines.
+@item <count>  Y
+Idem (should be equivalent to @kbd{y$} though).
+@item  m<a-z>
+Mark the cursor position with a letter.
+@item [<a-z>
+Show contents of textmarker.
+@item ]<a-z>
+Show contents of register.
+@item <count>  ["<a-z1-9>]p
+Put the contents of the (default undo) buffer
+<count> times after the cursor. The register will
+be automatically downcased.
+@item <count>  ["<a-z1-9>]P
+Put the contents of the (default undo) buffer
+<count> times before the cursor. The register will
+@end table
+@kindex @kbd{P}
+@kindex @kbd{p}
+@kindex @kbd{"<a-z1-9>p}
+@kindex @kbd{"<a-z1-9>P}
+@kindex @kbd{]<a-z>}
+@kindex @kbd{[<a-z>}
+@kindex @kbd{m<a-z>}
+@kindex @kbd{Y}
+@kindex @kbd{yy}
+@kindex @kbd{"<A-Z>y<move>}
+@kindex @kbd{"<a-z>y<move>}
+@kindex @kbd{y<move>}
+@kindex @kbd{yank}
+@findex @kbd{:yank}
+
+@node Undoing,, Yanking,Text Handling
+@subsection Undoing
+
+@cindex undo
+@cindex backup files
+
+@table @kbd
+@item  u U
+Undo the latest change.
+@item  .
+Repeat undo.
+@item :q!
+Quit Vi without writing.
+@item :e!
+Re-edit a messed-up file.
+@item :rec
+Recover file from autosave. Viper also creates backup files
+that have a @samp{~} appended to them.
+@end table
+@findex @kbd{:rec}
+@findex @kbd{:e!}
+@findex @kbd{:q!}
+@kindex @kbd{.}
+@kindex @kbd{U}
+@kindex @kbd{u}
+
+@node Display, File and Buffer Handling, Text Handling, Commands
+@section Display
+
+@cindex scrolling
+
+@table @kbd
+@item C-g
+At user level 1,
+give file name, status, current line number
+and relative position. @*
+At user levels 2 and higher, abort the current command.
+@item C-c g
+Give file name, status, current line number and relative position -- all
+user levels.
+@item C-l
+Refresh the screen. 
+@item <count> C-e
+Expose <count> more lines at bottom, cursor stays put (if possible).
+@item <count> C-y
+Expose <count> more lines at top, cursor stays put (if possible).
+@item <count> C-d
+Scroll <count> lines downward (default the number of the previous scroll;
+initialization: half a page).
+@item <count> C-u
+Scroll <count> lines upward (default the number of the previous scroll;
+initialization: half a page). 
+@item <count> C-f
+<count> pages forward.
+@item <count> C-b
+<count> pages backward (in older versions @kbd{C-b} only works without count).
+@item <count> z<cr>
+@item zH
+Put line <count> at the top of the window (default the current line).
+@item <count> z-
+@item zL
+Put line <count> at the bottom of the window
+(default the current line).
+@item <count> z.
+@item zM
+Put line <count> in the center of the window
+(default the current line).
+@end table
+@kindex @kbd{zM}
+@kindex @kbd{zL}
+@kindex @kbd{zH}
+@kindex @kbd{z<cr>}
+@kindex @kbd{z.}
+@kindex @kbd{z-}
+@kindex @kbd{z<cr>}
+@kindex @kbd{C-b}
+@kindex @kbd{C-f}
+@kindex @kbd{C-u}
+@kindex @kbd{C-d}
+@kindex @kbd{C-y}
+@kindex @kbd{C-e}
+@kindex @kbd{C-l}
+@kindex @kbd{C-g}
+
+
+@node File and Buffer Handling, Mapping, Display,Commands
+@section File and Buffer Handling
+
+@cindex multiple files
+
+In all file handling commands, space should be typed before entering the file
+name. If you need  to type a modifier, such as @kbd{>>} or @kbd{!}, don't
+put any space between the command and the modifier.
+
+@table @kbd
+@item :q
+Quit buffer except if modified.
+@item :q!
+Quit buffer without checking. In Viper, these two commands
+are identical. Confirmation is required if exiting modified buffers that
+visit files.
+@item :susp
+@item :stop
+Suspend Viper
+@item :[x,y] w
+Write the file. Viper nakes sure that a final newline is always added to
+any file where this newline is missing. This is done by setting Emacs
+variable @code{require-final-newline} to @code{t}. If you don't like this
+feature, use @code{setq-default} to set @code{require-final-newline} to
+@code{nil}. This must be done either in @file{.viper} file or in
+@code{.emacs} after Viper is loaded.
+@item :[x,y] w <name>
+Write to the file <name>.
+@item :[x,y] w>> <name>
+Append the buffer to the file <name>.  There should be no space between
+@kbd{w} and @kbd{>>}. Type space after the @kbd{>>} and see what happens.
+@item :w! <name>
+Overwrite the file <name>. In Viper, @kbd{:w} and @kbd{:w!} are identical.
+Confirmation is required for writing to an existing file (if this is not
+the file the buffer is visiting) or to a read-only file.
+@item :x,y w <name>
+Write lines x through y to the file <name>.
+@item :wq
+Write the file and kill buffer.
+@item :r <file> [<file> ...]
+Read file into a buffer, inserting its contents after the current line.
+@item :xit
+Same as @kbd{:wq}.
+@item :W
+Save unsaved buffers, asking for confirmation.
+@item :WW
+Like @kbd{W}, but without asking for confirmation. 
+@item ZZ
+Save current buffer and kill it. If user level is 1, then save all files
+and kill Emacs. Killing Emacs is the wrong way to use it, so you should
+switch to  higher user levels as soon as possible.
+@item :x [<file>]
+Save and kill buffer.
+@item :x! [<file>]
+@kbd{:w![<file>]} and @kbd{:q}.
+@item :pre
+Preserve the file -- autosave buffers.
+@item :rec
+Recover file from autosave.
+@item :f
+Print file name and lines.
+@item :cd [<dir>]
+Set the working directory to <dir> (default home directory).
+@item :pwd
+Print present working directory.
+@item :e [+<cmd>] <files>
+Edit files. If no filename is given, edit the file visited by the current
+buffer. If buffer was modified or the file changed on disk, ask for
+confirmation. Unlike Vi, Viper allows @kbd{:e} to take multiple arguments.
+The first file is edited the same way as in Vi. The rest are visited
+in the usual Emacs way.
+@item :e! [+<cmd>] <files>
+Re-edit file. If no filename, reedit current file.
+In Viper, unlike Vi, @kbd{e!} is identical to @kbd{:e}. In both cases, the
+user is asked to confirm if there is a danger of discarding changes to a
+buffer.
+@item :q!
+Quit Vi without writing.
+@item C-^
+Edit the alternate (normally the previous) file.
+@item :rew
+Obsolete
+@item :args
+List files not shown anywhere with counts for next
+@item :n [count]  [+<cmd>] [<files>]
+Edit <count> file, or edit files. The count comes from :args. 
+@item :N [count] [+<cmd>] [<files>] 
+Like @kbd{:n}, but the meaning of the variable
+@var{ex-cycle-other-window} is reversed.
+@item :b    
+Switch to another buffer. If @var{ex-cycle-other-window} is @code{t},
+switch in another window. Buffer completion is supported.
+@item :B    
+Like @kbd{:b}, but the meaning of @var{ex-cycle-other-window} is reversed.
+@item :<address>r <name>
+Read the file <name> into the buffer after the line <address>.
+@item v, V, C-v
+Edit a file in current or another window, or in another frame. File name
+is typed in Minibuffer. File completion and history are supported.
+@end table
+@kindex @kbd{v}
+@kindex @kbd{V}
+@findex @kbd{:args}
+@findex @kbd{:rew}
+@kindex @kbd{C-^}
+@findex @kbd{:e! [<files>]}
+@findex @kbd{:e [<files>]}
+@findex @kbd{:edit [<files>]}
+@findex @kbd{:edit! [<files>]}
+@findex @kbd{:q!}
+@findex @kbd{:q}
+@findex @kbd{:quit}
+@findex @kbd{:quit!}
+@findex @kbd{:f}
+@findex @kbd{:rec}
+@findex @kbd{:r}
+@findex @kbd{:read}
+@findex @kbd{:pre}
+@kindex @kbd{ZZ}
+@findex @kbd{:wq}
+@findex @kbd{:w <file>}
+@findex @kbd{:w! <file>}
+@findex @kbd{:w >> <file>}
+@findex @kbd{:write <file>}
+@findex @kbd{:write! <file>}
+@findex @kbd{:write >> <file>}
+@findex @kbd{:W}
+@findex @kbd{:WW}
+@findex @kbd{:Write}
+@findex @kbd{:WWrite}
+@findex @kbd{:WWrite}
+@findex @kbd{:x}
+@findex @kbd{:x!}
+@findex @kbd{:susp}
+@findex @kbd{:stop}
+@findex @kbd{:n [<count> | <file>]}
+@findex @kbd{:cd [<dir>]}
+@findex @kbd{:pwd}
+
+@node Mapping, Shell Commands, File and Buffer Handling, Commands
+@section Mapping
+
+@cindex keybindings
+@cindex keymapping
+
+@table @kbd
+@item :map <string>
+ Start defining a Vi-style keyboard macro.
+ For instance, typing
+ @kbd{:map www} followed by @kbd{:!wc %} and then typing @kbd{C-x )}
+ will cause @kbd{www} to run wc on
+ current file (Vi replaces @samp{%} with the current file name).
+@item C-x )
+ Finish defining a keyboard macro.
+ In Viper, this command completes the process of defining all keyboard
+macros, whether they are Emacs-style or Vi-style.
+This is a departure from Vi, needed to allow WYSIWYG mapping of
+keyboard macros and to permit the use of function keys and arbitrary Emacs
+functions in the macros.
+@item :unmap <string>
+ Deprive <string> of its mappings in Vi state.
+@item :map! <string>
+ Map a macro for Insert state.
+@item :unmap! <string>
+ Deprive <string> of its mapping in Insert state (see @kbd{:unmap}).
+@item @@<a-z>
+ In Vi state,
+ execute the contents of register as a command.
+@item @@@@
+ In Vi state,
+ repeat last register command. 
+@item @@#
+In Vi state,
+ begin keyboard macro. End with @@<a-z>. This will
+ put the macro in the proper register. Register will
+ be automatically downcased.
+ @xref{Macros and Registers}, for more info.
+@item @@!<a-z>
+ In Vi state,
+ yank anonymous macro to register
+@item *
+ In Vi state,
+ execute anonymous macro (defined by C-x( and C-x )).
+@item C-x e
+ Like @kbd{*}, but works in all Viper states.
+@item #g<move>
+ Execute the last keyboard macro for each line in the region.
+ @xref{Macros and Registers}, for more info.
+@item [<a-z>
+ Show contents of textmarker.
+@item ]<a-z>
+ Show contents of register.
+@end table
+@kindex @kbd{]<a-z>}
+@kindex @kbd{[<a-z>}
+@kindex @kbd{#g<move>}
+@kindex @kbd{*}
+@kindex @kbd{@@!<a-z>}
+@kindex @kbd{@@#}
+@kindex @kbd{@@@@}
+@kindex @kbd{@@<a-z>}
+@findex @kbd{:unmap <char>}
+@findex @kbd{:map <char> <seq>}
+@findex @kbd{:unmap! <char>}
+@findex @kbd{:map! <char> <seq>}
+
+@node Shell Commands, Options, Mapping, Commands
+@section Shell Commands
+
+@cindex % (Current file)
+
+Note that % is used in Ex commands to mean current file. If you want a %
+in your command, it must be escaped as @samp{\%}. 
+@cindex % (Ex address)
+However if % is the
+first character, it stands as the address for the whole file.
+@cindex # (Previous file)
+Similarly, @samp{#} expands to the previous file. The previous file is
+the first file in @kbd{:args} listing. This defaults
+to the previous file in the VI sense if you have one window.@refill
+
+@cindex shell commands
+
+@table @kbd
+@item :sh
+Execute a subshell in another window
+@item :[x,y]!<cmd>
+Execute a shell <cmd> [on lines x through y;
+% is replace by current file, \% is changed to %
+@item :[x,y]!! [<args>]
+Repeat last shell command [and append <args>].
+@item :!<cmd>
+Just execute command and display result in a buffer.
+@item :!! <args>
+Repeat last shell command and append <args>
+@item <count> !<move><cmd>
+The shell executes <cmd>, with standard
+input the lines described by <count><move>,
+next the standard output replaces those lines
+(think of @samp{cb}, @samp{sort}, @samp{nroff}, etc.).
+@item <count> !!<cmd>
+Give <count> lines as standard input to the
+shell <cmd>, next let the standard output
+replace those lines.
+@item :[x,y] w !<cmd>
+Let lines x to y be standard input for <cmd>
+(notice the <sp> between @kbd{w} and @kbd{!}).
+@item :<address>r !<cmd>
+Put the output of <cmd> after the line <address> (default current).
+@item :<address>r <name>
+Read the file <name> into the buffer after the line <address> (default
+current).
+@end table
+@findex @kbd{:<address>r <name>}
+@findex @kbd{:<address>r !<cmd>}
+@findex @kbd{!<cmd>}
+@findex @kbd{!!<cmd>}
+@findex @kbd{!<move><cmd>}
+@findex @kbd{:w !<cmd>}
+@findex @kbd{:x,y w !<cmd>}
+@findex @kbd{:!! <args>}
+@findex @kbd{:!<cmd>}
+@findex @kbd{:sh}
+
+@node Options,Emacs Related Commands,Shell Commands,Commands
+@section Options
+
+@cindex Vi options
+
+@table @kbd
+@item ai
+@cindex autoindent
+autoindent -- In append mode after a <cr> the
+cursor will move directly below the first
+CHAR on the previous line.  
+@item ic
+@cindex case and searching
+ignorecase -- No distinction between upper and lower cases when searching.
+@item magic
+@cindex literal searching
+Regular expressions used in searches; nomagic means no regexps.
+@item ro
+@cindex readonly files
+readonly -- The file is not to be changed.
+If the user attempts to write to this file, confirmation will be requested.
+@item sh=<string>
+@cindex shell
+shell -- The program to be used for shell escapes
+(default @samp{$SHELL} (default @file{/bin/sh})).
+@item sw=<count>
+@cindex layout
+@cindex shifting text
+shiftwidth -- Gives the shiftwidth (default 8 positions).
+@item sm
+@cindex paren matching
+@cindex matching parens
+showmatch -- Whenever you append a @kbd{)}, Vi shows
+its match if it's on the same page; also with
+@kbd{@{} and @kbd{@}}.  If there's no match, Vi will beep.
+@item ts=<count>
+@cindex changing tab width
+@cindex tabbing
+tabstop -- The length of a <ht>; warning: this is
+only IN the editor, outside of it <ht>s have
+their normal length (default 8 positions).
+@item wm=<count>
+@cindex auto fill
+@cindex word wrap
+wrapmargin -- In append mode Vi automatically
+puts a <lf> whenever there is a <sp> or <ht>
+within <wm> columns from the right margin.
+@item ws
+@cindex searching
+wrapscan -- When searching, the end is
+considered @samp{stuck} to the begin of the file.
+@item :set <option>
+Turn <option> on.
+@item :set no<option>
+Turn <option> off.
+@item :set <option>=<value>
+Set <option> to <value>.
+@end table
+@findex @kbd{:set <option>=<value>}
+@findex @kbd{:set no<option>}
+@findex @kbd{:set <option>}
+@findex @kbd{:set ws}
+@findex @kbd{:set wrapscan}
+@findex @kbd{:set wm=<count>}
+@findex @kbd{:set wrapmargin=<count>}
+@findex @kbd{:set ts=<count>}
+@findex @kbd{:set tabstop=<count>}
+@findex @kbd{:set tab-stop-local=<count>}
+@findex @kbd{:set sm}
+@findex @kbd{:set showmatch}
+@findex @kbd{:set sw=<count>}
+@findex @kbd{:set shiftwidth=<count>}
+@findex @kbd{:set sh=<string>}
+@findex @kbd{:set shell=<string>}
+@findex @kbd{:set ro}
+@findex @kbd{:set readonly}
+@findex @kbd{:set magic}
+@findex @kbd{:set ic}
+@findex @kbd{:set ignorecase}
+@findex @kbd{:set ai}
+@findex @kbd{:set autoindent}
+
+@node Emacs Related Commands,,Options,Commands
+@section Emacs Related Commands
+
+@table @kbd
+@item _
+Begin Meta command in Vi state. Most often used as _x (M-x).
+@item C-z
+Begin Meta command in Insert state.
+@item C-z
+Switch between Emacs and Vi states.
+@item C-x0
+Close Window
+@item C-x1
+Close Other Windows
+@item C-x2
+Split Window
+@item C-xo
+Move among windows
+@item C-xC-f
+Emacs find-file, useful in Insert state
+@item C-y 
+Put back the last killed text. Similar to Vi's @kbd{p}, but also works in
+Insert and Replace state. This command doesn't work in Vi command state,
+since this binding is taken for something else.
+@item M-y
+Undoes the last @kbd{C-y} and puts another kill from the kill ring.
+Using this command, you can try may different kills until you find the one
+you need.
+@end table
+@kindex @kbd{M-y}
+@kindex @kbd{C-y}
+@kindex @kbd{C-xC-f}
+@kindex @kbd{C-xo}
+@kindex @kbd{C-x2}
+@kindex @kbd{C-x1}
+@kindex @kbd{C-x0}
+@kindex @kbd{C-z}
+@kindex @kbd{C-z}
+@kindex @kbd{_}
+
+@node Mouse-bound Commands,,,Commands
+@section Mouse-bound Commands
+
+The following two mouse actions are normally bound to to special search and
+insert commands in of Viper:
+
+@table @kbd
+@item S-mouse-1 (Emacs)
+@item meta button1up (XEmacs)
+Holding Shift (or Meta, if XEmacs) and clicking mouse button 1 will
+initiate search for 
+a region under the mouse pointer.
+This command can take a prefix argument. Note: Viper sets this
+binding only if this mouse action is not 
+already bound to something else.
+@xref{Viper Specials}, for more information.@refill
+
+@item S-mouse-2 (Emacs)
+@item meta button2up (XEmacs)
+Holding Shift (or Meta, if XEmacs) and clicking button 2 of the mouse will
+insert a region surrounding the mouse pointer.
+This command can also take a prefix argument.
+Note: Viper sets this binding only if this mouse action is not
+already bound to something else.
+@xref{Viper Specials}, for more details.@refill
+@end table        
+@kindex @kbd{S-mouse-1}
+@kindex @kbd{S-mouse-2}
+@kindex @kbd{meta button1up}
+@kindex @kbd{meta button2up}
 
 @node Acknowledgments,,,Top
 @comment  node-name,  next,  previous,  up
diff -r 4de2936b4e77 -r 0132846995bd man/widget.texi
--- a/man/widget.texi	Mon Aug 13 09:42:28 2007 +0200
+++ b/man/widget.texi	Mon Aug 13 09:43:35 2007 +0200
@@ -13,7 +13,7 @@
 @comment  node-name,  next,  previous,  up
 @top The Emacs Widget Library
 
-Version: 1.9916
+Version: 1.9931
 
 @menu
 * Introduction::                
@@ -1605,6 +1605,20 @@
 @item 
 A mailto widget.
 
+@item 
+@kbd{C-e e} in a fixed size field should go to the end of the text in
+the field, not the end of the field itself. 
+
+@item
+Use and overlay instead of markers to delimit the widget.  Create
+accessors for the end points.
+
+@item
+Clicking on documentation links should call @code{describe-function} or
+@code{widget-browse-other-window} and friends directly, instead of going
+through @code{apropos}.  If more than one function is valid for the
+symbol, it should pop up a menu.
+
 @end itemize
 
 @contents
diff -r 4de2936b4e77 -r 0132846995bd man/xemacs-faq.texi
--- a/man/xemacs-faq.texi	Mon Aug 13 09:42:28 2007 +0200
+++ b/man/xemacs-faq.texi	Mon Aug 13 09:43:35 2007 +0200
@@ -8,7 +8,7 @@
 @titlepage
 @title XEmacs FAQ
 @subtitle Frequently asked questions about XEmacs
-@subtitle Last Modified:  1997/04/15
+@subtitle Last Modified:  1997-06-18
 @sp 1
 @author Tony Rossini <arossini@@stat.sc.edu>
 @author Ben Wing <wing@@netcom.com>
@@ -32,7 +32,7 @@
 FITNESS FOR A PARTICULAR PURPOSE.
 
 If you have a Web browser, the official hypertext version is at
-<URL:http://www.miranova.com/~steve/xemacs-faq.html> and also at
+<URL:http://www.sccon.com/~andreas/xemacs-faq.html> and also at
 <URL:http://www.xemacs.org/faq/xemacs-faq.html>.  This version is much
 nicer than the unofficial hypertext versions that are archived at
 Utrecht, Oxford, Smart Pages, and other FAQ archives.
@@ -83,10 +83,10 @@
 * Q1.0.3::      Where can I find it?
 * Q1.0.4::      Why Another Version of Emacs?
 * Q1.0.5::      Why Haven't XEmacs and GNU Emacs Merged?
-* Q1.0.6::      Where can I get help?  @strong{update 4/97}
+* Q1.0.6::      Where can I get help?  
 * Q1.0.7::      Where is the mailing list archived?
 * Q1.0.8::      How do you pronounce XEmacs?
-* Q1.0.9::      What does XEmacs look like?  @strong{updated 4/97}
+* Q1.0.9::      What does XEmacs look like? 
 * Q1.0.10::     Is there a port of XEmacs to Microsoft ('95 or NT)?
 * Q1.0.11::     Is there a port of XEmacs to the Macintosh?
 * Q1.0.12::     Is there a port of XEmacs to NextStep?
@@ -100,21 +100,21 @@
 
 Credits:
 * Q1.2.1::      Who wrote XEmacs?
-* Q1.2.2::      Who contributed to this version of the FAQ?  @strong{updated 4/97}
-* Q1.2.3::      Who contributed to the FAQ in the past?  @strong{updated 4/97}
+* Q1.2.2::      Who contributed to this version of the FAQ? 
+* Q1.2.3::      Who contributed to the FAQ in the past? 
 
 Internationalization:
-* Q1.3.1::      What is the status of XEmacs v20?  @strong{updated 4/97}
+* Q1.3.1::      What is the status of XEmacs v20? 
 * Q1.3.2::      What is the status of Asian-language support, aka @var{mule}?
 * Q1.3.3::      How do I type non-ASCII characters?
 * Q1.3.4::      Can XEmacs messages come out in a different language?
 * Q1.3.5::      Please explain the various input methods in MULE/XEmacs 20.0
 * Q1.3.6::      How do I portably code for MULE/XEmacs 20.0?
-* Q1.3.7::      How about Cyrillic Modes?  @strong{updated 4/97}
+* Q1.3.7::      How about Cyrillic Modes? 
 
 Getting Started:
 * Q1.4.1::      What is a @file{.emacs} and is there a sample one?
-* Q1.4.2::      Can I use the same @file{.emacs} with the other Emacs?  @strong{updated 4/97}
+* Q1.4.2::      Can I use the same @file{.emacs} with the other Emacs?
 * Q1.4.3::      Any good XEmacs tutorials around?
 * Q1.4.4::      May I see an example of a useful XEmacs Lisp function?
 * Q1.4.5::      And how do I bind it to a key?
@@ -134,13 +134,21 @@
 @node Q1.0.2, Q1.0.3, Q1.0.1, Introduction
 @section What is the current version of XEmacs?
 
-The current version is 19.15, released in March, 1997.
-
-It has been decided that XEmacs 19.15 will be the final release of v19.
-XEmacs 19.15 is scheduled for release in late March.  After a brief
-period of further testing, XEmacs v20.1 will be released the later part
-of April, 1997.
-
+The current stable version of XEmacs is 20.2, released in May, 1997.
+The next feature release will XEmacs 20.3.
+
+XEmacs 19.15 was the last release of v19, released in March, 1997.
+
+To help users who are not yet ready to move to XEmacs 20, we run a
+patch-page with official bugfixes for 19.15 at:
+
+@example
+<URL:http://www.xemacs.org/xemacs-19.15-patches/patch-page.html>
+@end example
+
+The page is maintained by Vinnie Shelton @code{<acs@@acm.org>}.  These
+fixes will be integrated to a XEmacs and released as 19.16, which would
+serve as stable XEmacs until 20.x settles completely.
 
 @node Q1.0.3, Q1.0.4, Q1.0.2, Introduction
 @section Where can I find it?
@@ -187,7 +195,8 @@
 Better Motif compliance.
 
 @item
-Some internationalization support (full MULE support starting with 20.0).
+Some internationalization support (including full MULE support, if
+compiled with it.)
 
 @item
 Variable-width fonts.
@@ -288,22 +297,15 @@
 @node Q1.0.10, Q1.0.11, Q1.0.9, Introduction
 @section Is there a port of XEmacs to Microsoft ('95 or NT)?
 
+Altrasoft is actively seeking corporate and government sponsors to help
+fund a fully native port of XEmacs to Windows 95 and NT using full-time,
+senior-level staff working under a professionally managed project
+structure.  See <URL:http://www.altrasoft.com/> for more details or
+contact Altrasoft directly at 1-888-ALTSOFT.
+
 The closest is @dfn{Win-Emacs}, which is based on Lucid Emacs 19.6.
 Available from <URL:http://www.pearlsoft.com/>.
 
-There are some people actively working on a NT port of v20.1: David
-Hobley started the port.  Marc Paquette
-@example
-<marcpa@@cam.org>
-@end example
-has also became part of this effort.
-
-Email the beta list
-@example
-<xemacs-beta@@xemacs.org>
-@end example
-if you are interested in helping.
-
 There's a port of GNU Emacs (not XEmacs) at
 @example
 <URL:http://www.cs.washington.edu/homes/voelker/ntemacs.html>.
@@ -352,7 +354,7 @@
 month.  Preexisting questions that have been changed are marked as such.
 Brand new questions are tagged.
 
-All submissions are welcome.  E-mail submissions to
+All submissions are welcome.  E-mail submissions to Andreas Kaempf
 <andreas@@sccon.com>.
 
 Please make sure that @samp{XEmacs FAQ} appears on the Subject: line.
@@ -453,11 +455,8 @@
 @itemize @bullet
 @item Steven L Baur <steve@@miranova.com>
 
-@item Richard Cognot <cognot@@ensg.u-nancy.fr>
-
 @item Hrvoje Niksic <hniksic@@srce.hr>
 
-@item Aki Vehtari <Aki.Vehtari@@hut.fi>
 @end itemize
 
 @node Q1.2.3, Q1.3.1, Q1.2.2, Introduction
@@ -471,6 +470,8 @@
 
 @item Richard Caley <rjc@@cogsci.ed.ac.uk>
 
+@item Richard Cognot <cognot@@ensg.u-nancy.fr>
+
 @item William G. Dubuque <wgd@@martigny.ai.mit.edu>
 
 @item Eric Eide <eeide@@cs.utah.edu>
@@ -483,7 +484,7 @@
 
 @item Darrell Kindred <dkindred@@cmu.edu>
 
-@item  David Moore <dmoore@@ucsd.edu>
+@item David Moore <dmoore@@ucsd.edu>
 
 @item Arup Mukherjee <arup+@@cmu.edu>
 
@@ -494,17 +495,19 @@
 @item Justin Sheehy <dworkin@@ccs.neu.edu>
 
 @item Stig <stig@@hackvan.com>
+
+@item Aki Vehtari <Aki.Vehtari@@hut.fi>
 @end itemize
 
 @node Q1.3.1, Q1.3.2, Q1.2.3, Introduction
 @section What is the status of XEmacs v20?
 
 XEmacs v20 is the version of XEmacs that includes MULE (Asian-language)
-support.  XEmacs 20.0 was released in February 1997.  When compiled
-without MULE support 20.0 is currently very similar to 19.15 (except for
-some changes to the byte-code format, some new primitive types including
-@code{char}, @code{char-table}, and @code{range-table}) and equally
-stable.
+support.  XEmacs 20.0 was released in February 1997, followed by XEmacs
+20.2 in May.  When compiled without MULE support 20.2 is currently very
+similar to 19.15 (except for some changes to the byte-code format, some
+new primitive types including @code{char}, @code{char-table}, and
+@code{range-table}) and equally stable.
 
 @node Q1.3.2, Q1.3.3, Q1.3.1, Introduction
 @section What is the status of Asian-language support, aka MULE?
@@ -590,7 +593,7 @@
 @end quotation
 
 @node Q1.3.6, Q1.3.7, Q1.3.5, Introduction
-@section How do I portably code for MULE/XEmacs 20.0?
+@section How do I portably code for MULE/XEmacs 20?
 
 MORIOKA Tomohiko <morioka@@jaist.ac.jp> writes:
 
@@ -716,9 +719,8 @@
       (setq there (point))
       (setq string (buffer-substring here there)))
     (while (>= count 1)
-      (progn
-	(insert string)
-	(setq count (1- count))))))
+      (insert string)
+      (decf count))))
 @end lisp
 
 The best way to see what is going on here is to let XEmacs tell you.
@@ -741,13 +743,16 @@
 
 Or interactively, @kbd{M-x global-set-key} and follow the prompts.
 
-Jari Aalto has written a guide to Emacs keys binding, available at
-<URL:ftp://cs.uta.fi/pub/ssjaaa/ema-keys.gui>.
+You can also view Jari Aalto's <jaalto@@tre.ntc.nokia.com> file:
+
+@example
+<URL:ftp://cs.uta.fi/pub/ssjaaa/ema-keys.html>
+@end example
 
 @node Q1.4.6, Q1.4.7, Q1.4.5, Introduction
 @section What's the difference between a macro and a function?
 
-Quoting from the Lisp Reference (a.k.a @dfn{lispref}) Manual:
+Quoting from the Lisp Reference (a.k.a @dfn{Lispref}) Manual:
 
 @dfn{Macros} enable you to define new control constructs and other
 language features.  A macro is defined much like a function, but instead
@@ -760,6 +765,10 @@
 therefore construct an expansion containing these argument expressions
 or parts of them.
 
+Do not confuse the two terms with @dfn{keyboard macros}, which are
+another matter, entirely.  A keyboard macro is a key bound to several
+other keys.  Refer to manual for details.
+
 @node Q1.4.7,  , Q1.4.6, Introduction
 @section How come options saved with 19.13 don't work with 19.14 or later?
 
@@ -787,6 +796,7 @@
                 (>= emacs-minor-version 12))
            (>= emacs-major-version 20)))
  ...
+ ))
 @end lisp
 
 @node Installation, Customization, Introduction, Top
@@ -797,25 +807,25 @@
 
 @menu
 Installation:
-* Q2.0.1::      Running XEmacs without installing.  @strong{updated 4/97}
-* Q2.0.2::      XEmacs is too big.  @strong{updated 4/97}
+* Q2.0.1::      Running XEmacs without installing. 
+* Q2.0.2::      XEmacs is too big. 
 * Q2.0.3::      Compiling XEmacs with Netaudio.
-* Q2.0.4::      Problems with Linux and ncurses.  @strong{updated 4/97}
+* Q2.0.4::      Problems with Linux and ncurses.
 * Q2.0.5::      Do I need X11 to run XEmacs?
 * Q2.0.6::      I'm having strange crashes.  What do I do?
 * Q2.0.7::      Libraries in non-standard locations.
 * Q2.0.8::      can't resolve symbol _h_errno
-* Q2.0.9::      Where do I find external libraries?  @strong{updated 4/97}
+* Q2.0.9::      Where do I find external libraries? 
 * Q2.0.10::     After I run configure I find a coredump, is something wrong?
 * Q2.0.11::     XEmacs can't resolve host names.
-* Q2.0.12::     Why can't I strip XEmacs?  @strong{updated 4/97}
+* Q2.0.12::     Why can't I strip XEmacs? 
 * Q2.0.13::     Can't link XEmacs on Solaris with Gcc.
-* Q2.0.14::     Make on HP/UX 9 fails after linking temacs  @strong{new 4/97}
+* Q2.0.14::     Make on HP/UX 9 fails after linking temacs 
 
 Trouble Shooting:
 * Q2.1.1::      XEmacs just crashed on me!
 * Q2.1.2::      Cryptic Minibuffer messages.
-* Q2.1.3::      Translation Table Syntax messages at Startup. @strong{updated 4/97}
+* Q2.1.3::      Translation Table Syntax messages at Startup.
 * Q2.1.4::      Startup warnings about deducing proper fonts?
 * Q2.1.5::      XEmacs cannot connect to my X Terminal.
 * Q2.1.6::      XEmacs just locked up my Linux X server.
@@ -823,7 +833,7 @@
 * Q2.1.8::      got (wrong-type-argument color-instance-p nil)!
 * Q2.1.9::      XEmacs causes my OpenWindows 3.0 server to crash.
 * Q2.1.10::     Warnings from incorrect key modifiers.
-* Q2.1.11::     [This question intentionally left blank] @strong{removed 4/97}
+* Q2.1.11::     [This question intentionally left blank]
 * Q2.1.12::     Regular Expression Problems on DEC OSF1.
 * Q2.1.13::     HP/UX 10.10 and @code{create_process} failure
 * Q2.1.14::     @kbd{C-g} doesn't work for me.  Is it broken?
@@ -835,7 +845,7 @@
 * Q2.1.20::     @samp{Symbol's function definition is void: hkey-help-show.}
 * Q2.1.21::     Every so often the XEmacs frame freezes.
 * Q2.1.22::     XEmacs seems to take a really long time to do some things.
-* Q2.1.23::     Movemail on Linux does not work for XEmacs 19.15 and later.  @strong{new 4/97}
+* Q2.1.23::     Movemail on Linux does not work for XEmacs 19.15 and later.
 @end menu
 
 @node Q2.0.1, Q2.0.2, Installation, Installation
@@ -852,11 +862,11 @@
 A good method is to make a shell alias for xemacs:
 
 @example
-alias xemacs=/i/xemacs-19.15/src/xemacs
+alias xemacs=/i/xemacs-20.2/src/xemacs
 @end example
 
 (You will obviously use whatever directory you downloaded the source
-tree to instead of @file{/i/xemacs-19.15}).
+tree to instead of @file{/i/xemacs-20.2}).
 
 This will let you run XEmacs without massive copying.
 
@@ -866,7 +876,7 @@
 Steve Baur <steve@@altair.xemacs.org> writes:
 
 @quotation
-XEmacs 20.2 will unbundle the lisp hierarchy and allow the installer
+XEmacs 20.3 will unbundle the lisp hierarchy and allow the installer
 to choose exactly how much support code gets installed.
 @end quotation
 
@@ -1003,7 +1013,7 @@
 All external libraries used by XEmacs can be found at the XEmacs FTP
 site <URL:ftp://ftp.xemacs.org/pub/aux/>.
 
-The canonical locations are as follows:
+The canonical locations (at the time of this writing) are as follows:
 
 @table @asis
 @item JPEG
@@ -1108,19 +1118,13 @@
 
 @enumerate
 @item
-[ configure; make ]
-
-@item
-cd src
+[ ./configure; make ]
 
 @item
-rm xemacs
+rm src/xemacs
 
 @item
-strip temacs
-
-@item
-cd ..
+strip src/temacs
 
 @item
 make
@@ -1176,9 +1180,9 @@
 @section Help!  XEmacs just crashed on me!
 
 First of all, don't panic.  Whenever XEmacs crashes, it tries extremely
-hard to auto-save all of your files before dying. (The main time that
+hard to auto-save all of your files before dying.  (The main time that
 this will not happen is if the machine physically lost power or if you
-killed the XEmacs process using @code{kill -9}). The next time you try
+killed the XEmacs process using @code{kill -9}).  The next time you try
 to edit those files, you will be informed that a more recent auto-save
 file exists.  You can use @kbd{M-x recover-file} to retrieve the
 auto-saved version of the file.
@@ -1339,12 +1343,10 @@
 @node Q2.1.6, Q2.1.7, Q2.1.5, Installation
 @section XEmacs just locked up my Linux X server!
 
-Help! XEmacs just locked up my X server on my Linux box!
-
 There have been several reports of the X server locking up under Linux.
 In all reported cases removing speedo and scaled fonts from the font
 path corrected the problem.  This can be done with the command
-'@code{xset}.
+@code{xset}.
 
 It is possible that using a font server may also solve the problem.
 
@@ -1652,11 +1654,11 @@
 use the narrowing-down process described above.
 
 @item
-If you compiled 19.14 with @samp{--debug} (or by default in 19.15), you
-will get a Lisp backtrace output when XEmacs crashes, so you'll have
-something useful.  If you're in 19.13, you could try doing @code{call
-debug_backtrace()}---sometimes this works even after a fatal signal has
-been received.
+If you compiled 19.14 with @samp{--debug} (or by default in later
+versions), you will get a Lisp backtrace output when XEmacs crashes, so
+you'll have something useful.  If you're in 19.13, you could try doing
+@code{call debug_backtrace()}---sometimes this works even after a fatal
+signal has been received.
 @end enumerate
 @end itemize
 @end quotation
@@ -1732,10 +1734,21 @@
 @node Q2.1.17, Q2.1.18, Q2.1.16, Installation
 @section @samp{Marker does not point anywhere}
 
-This is a problem with line-number-mode in XEmacs 19.14, and affects a
-large number of other packages.  If you see this error message, turn off
+As with other errors, set @code{debug-on-error} to @code{t} to get the
+backtrace when the error occurs.  Specifically, two problems have been
+reported (and fixed).
+
+@enumerate
+@item
+A problem with line-number-mode in XEmacs 19.14 affected a large number
+of other packages.  If you see this error message, turn off
 line-number-mode.
 
+@item
+A problem with some early versions of Gnus 5.4 caused this error.
+Upgrade your Gnus.
+@end enumerate
+
 @node Q2.1.18, Q2.1.19, Q2.1.17, Installation
 @section 19.14 hangs on HP/UX 10.10.
 
@@ -1780,7 +1793,7 @@
 @item
 A more serious problem I had discovered in the meantime, that is the
 fact that subprocess handling was seriously broken: subprocesses
-e.g. started by AUCTeX for TeX compilation of a buffer would
+e.g. started by AUC TeX for TeX compilation of a buffer would
 @emph{hang}.  Actually they would wait forever for emacs to read the
 socket which connects stdout...
 @end enumerate
@@ -1835,12 +1848,12 @@
 gdb /path/to/xemacs/xemacs ####
 @end example
 
-Where #### is the process id of your xemacs, instead of specifying the
-core.  When gdb attaches, the xemacs will stop [1] and you can type
-`where' in gdb to get a stack trace as usual.  To get things moving
-again, you can just type `quit' in gdb.  It'll tell you the program is
-running and ask if you want to quit anyways.  Say 'y' and it'll quit and
-have your emacs continue from where it was at.
+Where @code{####} is the process id of your xemacs, instead of
+specifying the core.  When gdb attaches, the xemacs will stop [1] and
+you can type `where' in gdb to get a stack trace as usual.  To get
+things moving again, you can just type `quit' in gdb.  It'll tell you
+the program is running and ask if you want to quit anyways.  Say 'y' and
+it'll quit and have your emacs continue from where it was at.
 
 2) Lisp level:
 
@@ -1861,12 +1874,14 @@
 Steven L Baur <steve@@miranova.com> writes:
 
 @quotation
-Movemail on Linux used to default to using flock file locking.
-With 19.15 and 20.0 it now defaults to using .lock file locking.
-If this is not appropriate for your system, edit src/s/linux.h and 
-uncomment the line that reads:
-
-@code{#define MAIL_USE_FLOCK}
+Movemail on Linux used to default to using flock file locking.  With
+19.15 and later versions it now defaults to using @code{.lock} file
+locking.  If this is not appropriate for your system, edit src/s/linux.h
+and uncomment the line that reads:
+
+@example
+#define MAIL_USE_FLOCK
+@end example
 @end quotation
 
 @node Customization, Subsystems, Installation, Top
@@ -1877,20 +1892,20 @@
 
 @menu
 Customization---Emacs Lisp and @file{.emacs}:
-* Q3.0.1::      What version of Emacs am I running?  @strong{updated 4/97}
+* Q3.0.1::      What version of Emacs am I running? 
 * Q3.0.2::      How do I evaluate Elisp expressions?
 * Q3.0.3::      @code{(setq tab-width 6)} behaves oddly.
 * Q3.0.4::      How can I add directories to the @code{load-path}?
 * Q3.0.5::      How to check if a lisp function is defined?
 * Q3.0.6::      Can I force the output of @code{(face-list)} to a buffer?
-* Q3.0.7::      Font selections don't get saved after @code{Save Options}. @strong{updated 4/97}
+* Q3.0.7::      Font selections don't get saved after @code{Save Options}. 
 * Q3.0.8::      How do I make a single minibuffer frame?
 
 X Window System & Resources:
 * Q3.1.1::      Where is a list of X resources?
 * Q3.1.2::      How can I detect a color display?
 * Q3.1.3::      @code{(set-screen-width)} worked in 19.6, but not in 19.13?
-* Q3.1.4::      Specifiying @code{Emacs*EmacsScreen.geometry} in @file{.emacs} does not work in 19.15?  @strong{updated 4/97}
+* Q3.1.4::      Specifiying @code{Emacs*EmacsScreen.geometry} in @file{.emacs} does not work in 19.15?
 * Q3.1.5::      How can I get the icon to just say @samp{XEmacs}?
 * Q3.1.6::      How can I have the window title area display the full path?
 * Q3.1.7::      @samp{xemacs -name junk} doesn't work?
@@ -1900,18 +1915,18 @@
 * Q3.2.1::      How can I set color options from @file{.emacs}?
 * Q3.2.2::      How do I set the text, menu and modeline fonts?
 * Q3.2.3::      How can I set the colors when highlighting a region?
-* Q3.2.4::      How can I limit color map usage?  @strong{updated 4/97}
+* Q3.2.4::      How can I limit color map usage? 
 * Q3.2.5::      My tty supports color, but XEmacs doesn't use them.
 
 The Modeline:
 * Q3.3.1::      How can I make the modeline go away?
 * Q3.3.2::      How do you have XEmacs display the line number in the modeline?
 * Q3.3.3::      How do I get XEmacs to put the time of day on the modeline?
-* Q3.3.4::      How do I turn off current chapter from AUC-TeX modeline?
-* Q3.3.5::      How can one change the modeline color based on the mode used?  @strong{updated 4/97}
+* Q3.3.4::      How do I turn off current chapter from AUC TeX modeline?
+* Q3.3.5::      How can one change the modeline color based on the mode used?
 
 3.4 Multiple Device Support:
-* Q3.4.1::      How do I open a frame on another screen of my multi-headed display?  @strong{updated 4/97}
+* Q3.4.1::      How do I open a frame on another screen of my multi-headed display?  
 * Q3.4.2::      Can I really connect to a running XEmacs after calling up over a modem?  How?
 
 3.5 The Keyboard:
@@ -1920,7 +1935,7 @@
 * Q3.5.3::      How do I bind C-. and C-; to scroll one line up and down?
 * Q3.5.4::      Globally binding @kbd{Delete}?
 * Q3.5.5::      Scrolling one line at a time.
-* Q3.5.6::      How to map @kbd{Help} key alone on Sun type4 keyboard?  @strong{updated 4/97}
+* Q3.5.6::      How to map @kbd{Help} key alone on Sun type4 keyboard? 
 * Q3.5.7::      How can you type in special characters in XEmacs?
 * Q3.5.8::      Why does @code{(global-set-key [delete-forward] 'delete-char)} complain?
 * Q3.5.9::      How do I make the Delete key delete forward?
@@ -1955,7 +1970,7 @@
 * Q3.9.4::      How can I get automatic horizontal scrolling?
 
 Text Selections:
-* Q3.10.1::     How can I turn off or change highlighted selections?  @strong{updated 4/97}
+* Q3.10.1::     How can I turn off or change highlighted selections? 
 * Q3.10.2::     How do I get that typing on an active region removes it?
 * Q3.10.3::     Can I turn off the highlight during isearch?
 * Q3.10.4::     How do I turn off highlighting after @kbd{C-x C-p} (mark-page)?
@@ -1986,14 +2001,10 @@
 with @kbd{C-j} after the expression.  How do I do it from another
 buffer?
 
-Use the following code:
-
-@lisp
-(put 'eval-expression 'disabled nil)
-@end lisp
-
-This sets it so that hitting @kbd{M-:} lets you type a single expression
-to be evaluated.  This line can also be put into your @file{.emacs}.
+Press @kbd{M-:} (the default binding of @code{eval-expression}), and
+enter the expression to the minibuffer.  In XEmacs prior to 19.15
+@code{eval-expression} used to be a disabled command by default.  If
+this is the case, upgrade your XEmacs.
 
 @node Q3.0.3, Q3.0.4, Q3.0.2, Customization
 @section @code{(setq tab-width 6)} behaves oddly.
@@ -2014,14 +2025,12 @@
 @lisp
 ;;; Add things at the beginning of the load-path, do not add
 ;;; duplicate directories:
-(if (null (member "bar" load-path))
-    (setq load-path (cons "bar" load-path)))
-
-(if (null (member "foo" load-path))
-    (setq load-path (cons "foo" load-path)))
+(pushnew "bar" load-path :test 'equal)
+
+(pushnew "foo" load-path :test 'equal)
 
 ;;; Add things at the end, unconditionally
-(setq load-path (append load-path '("foo" "bar")))
+(setq load-path (nconc load-path '("foo" "bar")))
 @end lisp
 
 keith (k.p.) hanlan <keithh@@nortel.ca> writes:
@@ -2031,7 +2040,7 @@
 @file{expand-file-name} like this:
 
 @lisp
-(setq load-path (cons (expand-file-name "~keithh/.emacsdir") load-path))
+(push (expand-file-name "~keithh/.emacsdir") load-path)
 @end lisp
 @end quotation
 
@@ -2069,6 +2078,10 @@
 Evaluate the expression in the @samp{*scratch*} buffer with point after
 the rightmost paren and typing @kbd{C-j}.
 
+If the minibuffer smallness is the only problem you encounter, you can
+simply press @kbd{C-h l} to get the former minibuffer contents in a
+buffer.
+
 @node Q3.0.7, Q3.0.8, Q3.0.6, Customization
 @section Font selections in don't get saved after @code{Save Options}.
 
@@ -2088,7 +2101,7 @@
 Implement the above as well as set the following in your @file{.emacs} 
 
 @lisp
-(setq options-save-faces 't)
+(setq options-save-faces t)
 @end lisp
 
 @node Q3.0.8, Q3.1.1, Q3.0.7, Customization
@@ -2324,9 +2337,6 @@
 @code{font}.  With Motif it may be necessary to use @code{fontList}
 instead of @code{font}.
 
-Suggestions on improving the answer to this question would be
-appreciated.
-
 @node Q3.2.3, Q3.2.4, Q3.2.2, Customization
 @section How can I set the colors when highlighting a region?
 
@@ -2415,12 +2425,12 @@
 @end lisp
 
 @node Q3.3.4, Q3.3.5, Q3.3.3, Customization
-@section How do I turn off current chapter from AUC-TeX modeline?
-
-With AUC-TeX, fast typing is hard because the current chapter, section
+@section How do I turn off current chapter from AUC TeX modeline?
+
+With AUC TeX, fast typing is hard because the current chapter, section
 etc. are given in the modeline.  How can I turn this off?
 
-It's not auc-tex, it comes from @code{func-menu} in @file{func-menu.el}.
+It's not AUC TeX, it comes from @code{func-menu} in @file{func-menu.el}.
 Add this code to your @file{.emacs} to turn it off:
 
 @lisp
@@ -2455,8 +2465,8 @@
 
 @lisp
 (add-hook 'lisp-mode-hook 
-        '(lambda () (set-face-background 'modeline "red" (current-buffer))
-                    (set-face-foreground 'modeline "yellow" (current-buffer))))
+          (lambda ()
+            (set-face-background 'modeline "red" (current-buffer))))
 @end lisp
 
 Then, when editing a Lisp file (i.e. when in Lisp mode), the modeline
@@ -2494,18 +2504,21 @@
 @node Q3.4.1, Q3.4.2, Q3.3.5, Customization
 @section How do I open a frame on another screen of my multi-headed display?
 
-The support for this has been revamped for 19.14.  Use the command
+The support for this was revamped for 19.14.  Use the command
 @kbd{M-x make-frame-on-display}.  This command is also on the File menu
 in the menubar.
 
-XEmacs 19.14 and later also has the command @code{make-frame-on-tty}
-which will establish a connection to any tty-like device.
+XEmacs 19.14 and later also have the command @code{make-frame-on-tty}
+which will establish a connection to any tty-like device.  Opening the
+TTY devices should be left to @code{gnuclient}, though.
 
 @node Q3.4.2, Q3.5.1, Q3.4.1, Customization
 @section Can I really connect to a running XEmacs after calling up over a modem?  How?
 
 If you're not running at least XEmacs 19.14, you can't.  Otherwise check
-out the @code{gnuattach} program supplied with XEmacs.
+out the @code{gnuattach} program supplied with XEmacs.  Starting with
+XEmacs 20.3, @code{gnuattach} and @code{gnudoit} functionality will be
+provided by @code{gnuclient}.
 
 @node Q3.5.1, Q3.5.2, Q3.4.2, Customization
 @section How can I bind complex functions (or macros) to keys?
@@ -2526,21 +2539,21 @@
 the call in a 'lambda form:
 
 @lisp
-(define-key global-map [f18]
-  (function (lambda () (interactive) (x-insert-selection t nil))))
+(global-set-key [f18]
+                (lambda () (interactive) (x-insert-selection t nil)))
 @end lisp
 
 This binds the f18 key to a @dfn{generic} functional object.  The
 interactive spec is required because only interactive functions can be
-bound to keys.  Also take a look at the doc for @code{function}.
+bound to keys.
 
 For the FAQ example you could use:
 
 @lisp
 (global-set-key [(control ?.)]
-		(function (lambda () (interactive) (scroll-up 1))))
+		(lambda () (interactive) (scroll-up 1)))
 (global-set-key [(control ?;)]
-	        (function (lambda () (interactive) (scroll-up -1))))
+	        (lambda () (interactive) (scroll-up -1)))
 @end lisp
 
 This is fine if you only need a few functions within the lambda body.
@@ -2556,6 +2569,8 @@
 (setq next-line-add-newlines nil)
 @end lisp
 
+This has been the default setting in XEmacs for some time.
+
 @node Q3.5.3, Q3.5.4, Q3.5.2, Customization
 @section How do I bind C-. and C-; to scroll one line up and down?
 
@@ -2571,8 +2586,8 @@
   (interactive)
   (scroll-down 1))
 
-(global-set-key [(control ?.)]   'scroll-up-one-line)        ; C-.
-(global-set-key [(control ?;)]   'scroll-down-one-line)      ; C-;
+(global-set-key [(control ?.)] 'scroll-up-one-line)        ; C-.
+(global-set-key [(control ?;)] 'scroll-down-one-line)      ; C-;
 @end lisp
 
 The key point is that you can only bind simple functions to keys; you
@@ -2586,11 +2601,11 @@
 than the default.  How does one do this?
 
 @lisp
-(defun Foo ()
+(defun foo ()
   (interactive)
-    (message "You hit DELETE"))
-
-(global-set-key 'delete 'Foo)
+  (message "You hit DELETE"))
+
+(global-set-key 'delete 'foo)
 @end lisp
 
 However, some modes explicitly bind @kbd{Delete}, so you would need to
@@ -2621,11 +2636,10 @@
   (interactive "p")
   (scroll-down (or arg 1)))
 
-(global-set-key 'up 'scroll-one-line-up)
-(global-set-key 'down  'scroll-one-line-down)
+(global-set-key [up]   'scroll-one-line-up)
+(global-set-key [down] 'scroll-one-line-down)
 @end lisp
 
-
 The following will also work but will affect more than just the cursor
 keys (i.e. @kbd{C-n} and @kbd{C-p}):
 
@@ -2665,7 +2679,8 @@
 One way is to use the package @samp{x-compose}.  Then you can use
 sequences like @kbd{Compose " a} to get �, etc.
 
-Another way is to use the iso8859-1 package.
+Another way is to use the iso-ascii package, provided in XEmacs 19.15
+and later.
 
 @node Q3.5.8, Q3.5.9, Q3.5.7, Customization
 @section Why does @code{(global-set-key [delete-forward] 'delete-char)} complain?
@@ -2694,12 +2709,16 @@
 @node Q3.5.9, Q3.5.10, Q3.5.8, Customization
 @section How do I make the Delete key delete forward?
 
-Use the @file{delbackspace} package:
+Use the @file{delbs} package:
 
 @lisp
-(load-library "delbackspace")
+(require 'delbs)
 @end lisp
 
+This will give you the functions @code{delbs-enable-delete-forward} to
+set things up, and @code{delbs-disable-delete-forward} to revert to
+``normal'' behavior.
+
 Also @xref{Q3.5.4}.
 
 @node Q3.5.10, Q3.6.1, Q3.5.9, Customization
@@ -2714,7 +2733,7 @@
 
 @quotation
 One thing about the sticky modifiers is that if you move the mouse out
-of the frame and back in, it cancels all currently "stuck" modifiers.
+of the frame and back in, it cancels all currently ``stuck'' modifiers.
 @end quotation
 
 @node Q3.6.1, Q3.6.2, Q3.5.10, Customization
@@ -2774,13 +2793,12 @@
 use @code{define-key} or @code{global-set-key}.
 
 @lisp
-(defun Mouse-Set-Point-and-Select (event)
+(defun mouse-set-point-and-select (event)
   "Sets the point at the mouse location, then marks following form"
   (interactive "@@e")
   (mouse-set-point event)
-  (mark-sexp 1)
-  )
-(define-key global-map 'button2 'Mouse-Set-Point-and-Select)
+  (mark-sexp 1))
+(define-key global-map [button2] 'mouse-set-point-and-select)
 @end lisp
 
 @node Q3.7.2, Q3.7.3, Q3.7.1, Customization
@@ -2811,16 +2829,10 @@
 @node Q3.7.4, Q3.7.5, Q3.7.3, Customization
 @section How can I get a list of buffers when I hit mouse button 3?
 
-The following code will actually replace the default popup on button3:
+The following code will replace the default popup on button3:
 
 @lisp
-(defun cw-build-buffers ()
-  "Popup buffer menu."
-  (interactive "@@")
-  (run-hooks 'activate-menubar-hook)
-  (popup-menu (car (find-menu-item current-menubar '("Buffers")))))
-
-(define-key global-map [(button3)] 'cw-build-buffers)
+(global-set-key [button3] 'popup-buffer-menu)
 @end lisp
 
 @node Q3.7.5, Q3.7.6, Q3.7.4, Customization
@@ -2958,11 +2970,11 @@
 Try something like:
 
 @lisp
-(global-set-key [(control x) T]
-		'(lambda () (interactive)
-		   (set-specifier default-toolbar-visible-p 
-				  (not (specifier-instance
-					default-toolbar-visible-p)))))
+(defun my-toggle-toolbar ()
+  (interactive)
+  (set-specifier default-toolbar-visible-p
+                 (not (specifier-instance default-toolbar-visible-p))))
+(global-set-key "\C-xT" 'my-toggle-toolbar)
 @end lisp
 
 There are redisplay bugs in 19.14 that may make the preceding result in
@@ -2987,7 +2999,7 @@
 function:
 
 @lisp
-(set-specifier scrollbar-width (cons (selected-frame) 0))
+(set-specifier scrollbar-width 0 (selected-frame))
 @end lisp
 
 You can actually turn the scrollbars on at any level you want by
@@ -2995,13 +3007,13 @@
 turn the scrollbars off only in a single buffer:
 
 @lisp
-(set-specifier scrollbar-width (cons (current-buffer) 0))
+(set-specifier scrollbar-width 0 (current-buffer))
 @end lisp
 
-Starting with 19.14 you can use the more logical form:
+In XEmacs versions prior to 19.14, you had to use the hairier construct:
 
 @lisp
-(set-specifier scrollbar-width 0 (selected-frame))
+(set-specifier scrollbar-width (cons (selected-frame) 0))
 @end lisp
 
 @node Q3.9.2, Q3.9.3, Q3.9.1, Customization
@@ -3180,9 +3192,10 @@
 Web browsing with W3:
 * Q4.1.1::      What is W3?
 * Q4.1.2::      How do I run W3 from behind a firewall?
+* Q4.1.3::      Is it true that W3 supports style sheets and tables?
 
 Reading Netnews and Mail with Gnus:
-* Q4.2.1::      GNUS, (ding) Gnus, Gnus 5, September Gnus, Red Gnus,argh!  @strong{updated 4/97}
+* Q4.2.1::      GNUS, (ding) Gnus, Gnus 5, September Gnus, Red Gnus,argh! 
 * Q4.2.2::      [This question intentionally left blank]
 * Q4.2.3::      How do I make Gnus stay within a single frame?
 * Q4.2.4::      How do I customize the From: line?
@@ -3195,7 +3208,7 @@
 * Q4.3.5::      Where do I find pstogif (required by tm)?
 
 Sparcworks, EOS, and WorkShop:
-* Q4.4.1::      What is SPARCworks, EOS, and WorkShop  @strong{updated 4/97}
+* Q4.4.1::      What is SPARCworks, EOS, and WorkShop 
 
 Energize:
 * Q4.5.1::      What is/was Energize?
@@ -3204,10 +3217,11 @@
 * Q4.6.1::      What is Infodock?
 
 Other Unbundled Packages:
-* Q4.7.1::      What is AucTeX?  Where do you get it?
+* Q4.7.1::      What is AUC TeX?  Where do you get it?
 * Q4.7.2::      Are there any Emacs Lisp Spreadsheets?
-* Q4.7.3::      Byte compiling AucTeX on XEmacs 19.14
-* Q4.7.4::      Problems installing AucTeX
+* Q4.7.3::      Byte compiling AUC TeX on XEmacs 19.14
+* Q4.7.4::      Problems installing AUC TeX
+* Q4.7.5::      Is there a reason for an Emacs package not to be included in XEmacs?
 @end menu
 
 @node Q4.0.1, Q4.0.2, Subsystems, Subsystems
@@ -3233,9 +3247,6 @@
 Also see the Mail Filtering FAQ at:
 <URL:http://www.cis.ohio-state.edu/hypertext/faq/usenet/mail/filtering-faq/faq.html>.
 
-Another possibility is to check out Gnus 5.  Gnus 5 has mail splitting
-capability, and can use VM as a mail reading backend.
-
 @node Q4.0.3, Q4.0.4, Q4.0.2, Subsystems
 @section How can I get VM to automatically check for new mail?
 
@@ -3287,7 +3298,7 @@
 the last release.
 @end quotation
 
-VM has its own newsgroup gnu.emacs.vm.info.
+VM has its own newsgroups gnu.emacs.vm.info and gnu.emacs.vm.bug.
 
 @node Q4.0.8, Q4.0.9, Q4.0.7, Subsystems
 @section Remote Mailreading with VM.
@@ -3330,7 +3341,7 @@
 @node Q4.0.9, Q4.0.10, Q4.0.8, Subsystems
 @section rmail or VM gets an error incorporating new mail.
 
->From the XEmacs PROBLEMS file:
+Quoting the XEmacs PROBLEMS file:
 
 @quotation
 rmail and VM get new mail from @file{/usr/spool/mail/$USER} using a
@@ -3448,16 +3459,28 @@
 It has a home web page at
 <URL:http://www.cs.indiana.edu/elisp/w3/docs.html>.
 
-@node Q4.1.2, Q4.2.1, Q4.1.1, Subsystems
+@node Q4.1.2, Q4.1.3, Q4.1.1, Subsystems
 @section How do I run W3 from behind a firewall?
 
 There is a long, well-written, detailed section in the W3 manual that
 describes how to do this.  Look in the section entitled "Firewalls".
 
-@node Q4.2.1, Q4.2.2, Q4.1.2, Subsystems
+@node Q4.1.3, Q4.2.1, Q4.1.2, Subsystems
+@section Is it true that W3 supports style sheets and tables?
+
+Yes, and much more.  W3, as distributed with the latest XEmacs is a
+full-featured web browser.
+
+@node Q4.2.1, Q4.2.2, Q4.1.3, Subsystems
 @section GNUS, (ding) Gnus, Gnus 5, September Gnus, Red Gnus, Mamey Sapote Gnus, argh!
 
-Please see the FAQ <URL:http://www.ccs.neu.edu/software/gnus/> for details.
+The Gnus numbering issues are not meant for mere mortals to know them.
+If you feel you @emph{must} enter the muddy waters of Gnus, visit the
+excellent FAQ, maintained by Justin Sheehy, at:
+
+@example
+<URL:http://www.ccs.neu.edu/software/gnus/>
+@end example
 
 @node Q4.2.2, Q4.2.3, Q4.2.1, Subsystems
 @section This question intentionally left blank.
@@ -3467,25 +3490,17 @@
 @node Q4.2.3, Q4.2.4, Q4.2.2, Subsystems
 @section How do I make Gnus stay within a single frame?
 
-When starting Gnus from the toolbar it is automatically put into a new
-frame.  Gnus not being frame-aware code, has no provision to disable
-this feature.  If you feel this is a problem here are some workarounds:
-
-@enumerate
-@item
-Don't start Gnus from the toolbar, use @kbd{M-x gnus}.  This is what I
-do.
-
-@item
-Redefine the function called by the toolbar:
+The toolbar code to start Gnus opens the new frame---and it's a feature
+rather than a bug.  If you don't like it, but would still like to click
+on the seemly icon, use the following code:
 
 @lisp
 (defun toolbar-news ()
-  "Run Gnus in the frame it was started from."
-  (interactive)
   (gnus))
 @end lisp
-@end enumerate
+
+It will redefine the callback function of the icon to just call
+@code{gnus}, without all the fancy frame stuff.
 
 @node Q4.2.4, Q4.3.1, Q4.2.3, Subsystems
 @section How do I customize the From: line?
@@ -3817,10 +3832,11 @@
 step-by-step installation instructions.
 
 @node Q4.7.1, Q4.7.2, Q4.6.1, Subsystems
-@section What is AucTeX?  Where do you get it?
-
-AucTeX is a package written by Per Abrahamsen <abraham@@dina.kvl.dk>.
-The following information is from the @file{README} and website.
+@section What is AUC TeX?  Where do you get it?
+
+AUC TeX is a package written by Per Abrahamsen <abraham@@dina.kvl.dk>.
+Starting with XEmacs 19.15, AUC TeX is bundled with XEmacs.  The
+following information is from the @file{README} and website.
 
 AUC TeX is an extensible package that supports writing and formatting
 TeX files for most variants of GNU Emacs. Many different macro packages
@@ -3842,7 +3858,7 @@
 <URL:ftp://cs.nyu.edu/pub/local/fox/dismal/>.
 
 @node Q4.7.3, Q4.7.4, Q4.7.2, Subsystems
-@section Byte compiling AucTeX on XEmacs 19.14.
+@section Byte compiling AUC TeX on XEmacs 19.14.
 
 Georges Brun-Cottan <bruncott@@dormeur.inria.fr> writes:
 
@@ -3854,26 +3870,26 @@
 @end example
 @end quotation
 
-@node Q4.7.4,  , Q4.7.3, Subsystems
-@section Problems installing AucTeX.
+@node Q4.7.4, Q4.7.5, Q4.7.3, Subsystems
+@section Problems installing AUC TeX.
 
 Jan Vroonhof <vroonhof@@math.ethz.ch> writes:
 
 @quotation
-AucTeX works fine on both stock Emacs and XEmacs has been doing so for a
-very very long time. This is mostly due to the work of Per Abrahamsen
+AUC TeX works fine on both stock Emacs and XEmacs has been doing so for
+a very very long time. This is mostly due to the work of Per Abrahamsen
 <abraham@@dina.kvl.dk> (clap clap) in particular his @file{easymenu}
 package.  Which leads to what is probably the problem...
 @end quotation
 
-Most problems with AucTeX are one of two things:
+Most problems with AUC TeX are one of two things:
 
 @itemize @bullet
 @item
 The TeX-lisp-directory in @file{tex-site.el} and the makefile don't
 match.
 
-Fix: make sure you configure AucTeX properly @strong{before} installing.
+Fix: make sure you configure AUC TeX properly @strong{before} installing.
 
 @item
 You have an old version of easymenu.el in your path.
@@ -3882,6 +3898,46 @@
 @strong{only} finds the one that came with XEmacs.
 @end itemize
 
+
+@node Q4.7.5,  , Q4.7.4, Subsystems
+@section Is there a reason for an Emacs package not to be included in XEmacs?
+
+The reason for an Emacs package not to be included in XEmacs is
+usually one or more of the following:
+
+@enumerate
+@item
+The package has not been ported to XEmacs.  This will typically happen
+when it uses GNU-Emacs-specific features, which make it fail under
+XEmacs.
+
+Porting a package to XEmacs can range from a trivial amount of change to
+a partial or full rewrite.  Fortunately, the authors of modern packages
+usually choose to support both Emacsen themselves.
+
+@item
+The package has been decided not to be appropriate for XEmacs.  It may
+have an equivalent or better replacement within XEmacs, in which case
+the developers may choose not to burden themselves with supporting an
+additional package.
+
+Each package bundled with XEmacs means more work for the maintainers,
+whether they want it or not.  If you are ready to take over the
+maintainence responsibilities for the package you port, be sure to say
+so -- we will more likely include it.
+
+@item
+The package simply hasn't been noted by the XEmacs development.  If
+that's the case, the messages like yours are very useful for attracting
+our attention.
+
+@item
+The package was noted by the developers, but they simply haven't yet
+gotten around to including/porting it.  Wait for the next release or,
+even better, offer your help.  It will be gladly accepted and
+appreciated.
+@end enumerate
+
 @node Miscellaneous, Current Events, Subsystems, Top
 @chapter The Miscellaneous Stuff
 
@@ -3900,8 +3956,8 @@
 * Q5.0.7::      Telnet from shell filters too much.
 * Q5.0.8::      Why does edt emulation not work?
 * Q5.0.9::      How can I emulate VI and use it as my default mode?
-* Q5.0.10::     [This question intentionally left blank]  @strong{removed 4/97}
-* Q5.0.11::     Filladapt doesn't work in 19.15?  @strong{updated 4/97}
+* Q5.0.10::     [This question intentionally left blank] 
+* Q5.0.11::     Filladapt doesn't work in 19.15? 
 * Q5.0.12::     How do I disable gnuserv from opening a new frame?
 * Q5.0.13::     How do I start gnuserv so that each subsequent XEmacs is a client?
 * Q5.0.14::     Strange things are happening in Shell Mode.
@@ -3914,13 +3970,17 @@
 Emacs Lisp Programming Techniques:
 * Q5.1.1::      The difference in key sequences between XEmacs and GNU Emacs?
 * Q5.1.2::      Can I generate "fake" keyboard events?
-* Q5.1.3::      [This question intentionally left blank]  @strong{removed 4/97}
-* Q5.1.4::      In 19.13, why do I get @samp{set-text-something} lisp errors with Gnus and AUC-TeX?
-* Q5.1.5::      How do I put a glyph as annotation in a buffer?
+* Q5.1.3::      Could you explain @code{read-kbd-macro} in more detail?
+* Q5.1.4::      What is the performance hit of @code{let}?
+* Q5.1.5::      What is the recommended use of @code{setq}?
+* Q5.1.6::      What is the typical misuse of @code{setq} ?
+* Q5.1.7::      I like the the @code{do} form of cl, does it slow things down?
+* Q5.1.8::      I like recursion, does it slow things down?
+* Q5.1.9::      How do I put a glyph as annotation in a buffer?
 
 Sound:
 * Q5.2.1::      How do I turn off the sound?
-* Q5.2.2::      How do I get funky sounds instead of a boring beep?  @strong{updated 4/97}
+* Q5.2.2::      How do I get funky sounds instead of a boring beep?
 * Q5.2.3::      What's NAS, how do I get it?
 * Q5.2.4::      Sunsite sounds don't play.
 
@@ -3980,14 +4040,23 @@
 @node Q5.0.3, Q5.0.4, Q5.0.2, Miscellaneous
 @section How do I get @samp{More} Syntax Highlighting on by default?
 
-For C, C++, and Lisp, you can add the following to your @file{.emacs}:
+Use the following code in your @file{.emacs}:
 
 @lisp
-(setq c-font-lock-keywords c-font-lock-keywords-2)
-(setq c++-font-lock-keywords c++-font-lock-keywords-2)
-(setq lisp-font-lock-keywords lisp-font-lock-keywords-2)
+(setq-default font-lock-maximum-decoration t)
 @end lisp
 
+In versions of XEmacs prior to 19.14, you had to use a kludgy solution
+like this:
+
+@lisp
+(setq c-font-lock-keywords c-font-lock-keywords-2
+      c++-font-lock-keywords c++-font-lock-keywords-2
+      lisp-font-lock-keywords lisp-font-lock-keywords-2)
+@end lisp
+
+It will work for C, C++ and Lisp.
+
 @node Q5.0.4, Q5.0.5, Q5.0.3, Miscellaneous
 @section How can I enable auto-indent?
 
@@ -4003,10 +4072,13 @@
 @lisp
 (require 'filladapt)
 (add-hook 'text-mode-hook    'turn-on-filladapt-mode)
-(add-hook 'message-mode-hook 'turn-on-filladapt-mode)
-;;; and so forth ...
+;;; and others ...
 @end lisp
 
+Note that well-behaving text-lookalike modes will run
+@code{text-mode-hook} by default (e.g. that's what Message does).  For
+the nasty ones, you'll have to provide the @code{add-hook}s yourself.
+
 Please note that the @code{fa-extras} package is no longer useful.
 
 @node Q5.0.5, Q5.0.6, Q5.0.4, Miscellaneous
@@ -4034,17 +4106,17 @@
 
 @lisp
 (setq initial-major-mode
-      (function (lambda ()
+      (lambda ()
         (text-mode)
-        (turn-on-auto-fill))))
+        (turn-on-auto-fill)))
 @end lisp
 
 Note that after your init file is loaded, if
-@code{inhibit-startup-message} is null (the default) and the startup
-buffer is @code{*scratch*} then the startup message will be inserted
-into @code{*scratch*}; it will be removed after a timeout by erasing the
-entire @code{*scratch*} buffer. Keep in mind this default usage of
-@code{*scratch*} if you desire any prior manipulation of
+@code{inhibit-startup-message} is @code{nil} (the default) and the
+startup buffer is @code{*scratch*} then the startup message will be
+inserted into @code{*scratch*}; it will be removed after a timeout by
+erasing the entire @code{*scratch*} buffer.  Keep in mind this default
+usage of @code{*scratch*} if you desire any prior manipulation of
 @code{*scratch*} from within your Emacs init file. In particular,
 anything you insert into @code{*scratch*} from your init file will be
 later erased. Also, if you change the mode of the @code{*scratch*}
@@ -4087,14 +4159,14 @@
 this, add the following line to your @file{.emacs}:
 
 @lisp
-(load "tpu-edt")
+(tpu-edt)
 @end lisp
 
 If you don't want it to replace @kbd{C-h} with an edt-style help menu
 add this as well:
 
 @lisp
-(global-set-key '(control h) 'help-for-help)
+(global-set-key [(control h)] 'help-for-help)
 @end lisp
 
 @node Q5.0.9, Q5.0.10, Q5.0.8, Miscellaneous
@@ -4242,7 +4314,7 @@
 
 @quotation
 The standard TeX modes leave much to be desired, and are somewhat
-leniently maintained.  Serious TeX users use AucTeX (@xref{Q4.7.1}).
+leniently maintained.  Serious TeX users use AUC TeX (@xref{Q4.7.1}).
 @end quotation
 
 @node Q5.1.1, Q5.1.2, Q5.0.19, Miscellaneous
@@ -4256,27 +4328,34 @@
 today.  XEmacs is instead optimized for X events.  This causes an
 incompatibility in the way key sequences are specified, but both Emacs
 and XEmacs will accept a key sequence as a vector of lists of modifiers
-that ends with a key, e.g., to bind M-C-a, you would say [(meta control
-a)] in both Emacsen.  XEmacs has an abbreviated form for a single key,
-just (meta control a).  Emacs has an abbreviated form for the Control
-and the Meta modifiers to string-characters (the ASCII characters), as
-in "\M-\C-a".  XEmacs users need to be aware that the abbreviated form
-works only for one-character key sequences, while Emacs users need to be
-aware that the string-character is rather limited.  Specifically, the
-string-character can accomodate only 256 different values, 128 of which
-have the Meta modifier and 128 of which have not.  In each of these
-blocks, only 32 characters have the Control modifier.  Whereas [(meta
-control A)] differs from [(meta control a)] because the case differs,
-"\M-\C-a" and "\M-\C-A" do not.  Programmers are advised to use the full
-common form, both because it is more readable and less error-prone, and
-because it is supported by both Emacsen.
+that ends with a key, e.g., to bind @kbd{M-C-a}, you would say
+@code{[(meta control a)]} in both Emacsen.  XEmacs has an abbreviated
+form for a single key, just (meta control a).  Emacs has an abbreviated
+form for the Control and the Meta modifiers to string-characters (the
+ASCII characters), as in @samp{\M-\C-a}.  XEmacs users need to be aware
+that the abbreviated form works only for one-character key sequences,
+while Emacs users need to be aware that the string-character is rather
+limited.  Specifically, the string-character can accomodate only 256
+different values, 128 of which have the Meta modifier and 128 of which
+have not.  In each of these blocks, only 32 characters have the Control
+modifier.  Whereas @code{[(meta control A)]} differs from @code{[(meta
+control a)]} because the case differs, @samp{\M-\C-a} and @samp{\M-\C-A}
+do not.  Programmers are advised to use the full common form, both
+because it is more readable and less error-prone, and because it is
+supported by both Emacsen.
 @end quotation
 
+Another (even safer) way to be sure of the key-sequences is to use the
+@code{read-kbd-macro} function, which takes a string like @samp{C-c
+<up>}, and converts it to the internal key representation of the Emacs
+you use.  The function is available both on XEmacs and GNU Emacs.
+
 @node Q5.1.2, Q5.1.3, Q5.1.1, Miscellaneous
 @section Can I generate "fake" keyboard events?
 
-I wonder if there is an interactive function that can generate "fake"
-keyboard events.  This way, I could simply map them inside XEmacs.
+I wonder if there is an interactive function that can generate
+@dfn{fake} keyboard events.  This way, I could simply map them inside
+XEmacs.
 
 This seems to work:
 
@@ -4286,90 +4365,291 @@
   (dispatch-event (character-to-event ch)))
 
 ;;  Backspace and Delete stuff
-(global-set-key '(backspace)
-                '(lambda () (interactive) (cg--generate-char-event 127)))
-(global-set-key '(unknown_keysym_0x4)
-                '(lambda () (interactive) (cg--generate-char-event 4)))
+(global-set-key [backspace]
+                (lambda () (interactive) (cg--generate-char-event 127)))
+(global-set-key [unknown_keysym_0x4]
+                (lambda () (interactive) (cg--generate-char-event 4)))
 @end lisp
 
 @node Q5.1.3, Q5.1.4, Q5.1.2, Miscellaneous
-@section [This question intentionally left blank]
-
-Obsolete question, left blank to avoid renumbering.
-
-@node Q5.1.4, Q5.1.5, Q5.1.3, Miscellaneous
-@section In 19.13, why do I get @samp{set-text-something} lisp errors with Gnus and AUC-TeX?
-
-The real problem is out of date software.  Upgrade to later versions of
-Gnus and AUC-TeX where this problem doesn't exist.
-
-The problem lies with the needs for an Emacs function,
-@code{set-text-properties}, which generally isn't required by XEmacs.
-The solutions include adding the following code to your @file{.emacs}:
+@section Could you explain @code{read-kbd-macro} in more detail?
+
+The @code{read-kbd-macro} function returns the internal Emacs
+representation of a human-readable string (which is its argument).
+Thus:
 
 @lisp
-(fset 'set-text-properties (symbol-function 'ignore))
+(read-kbd-macro "C-c C-a")
+     @result{} [(control ?c) (control ?a)]
+
+(read-kbd-macro "C-c C-. <up>")
+     @result{} [(control ?c) (control ?.) up]
 @end lisp
 
-or 
+In GNU Emacs the same forms will be evaluated to what GNU Emacs
+understands internally---the sequences @code{"\C-x\C-c"} and @code{[3
+67108910 up]}, respectively.
+
+The exact @dfn{human-readable} syntax is defined in the docstring of
+@code{edmacro-mode}.  I'll repeat it here, for completeness.
+
+@quotation
+Format of keyboard macros during editing:
+
+Text is divided into @dfn{words} separated by whitespace.  Except for
+the words described below, the characters of each word go directly as
+characters of the macro.  The whitespace that separates words is
+ignored.  Whitespace in the macro must be written explicitly, as in
+@kbd{foo SPC bar RET}.
+
+@itemize @bullet
+@item
+The special words @kbd{RET}, @kbd{SPC}, @kbd{TAB}, @kbd{DEL}, @kbd{LFD},
+@kbd{ESC}, and @kbd{NUL} represent special control characters.  The
+words must be written in uppercase.
+
+@item
+A word in angle brackets, e.g., @code{<return>}, @code{<down>}, or
+@code{<f1>}, represents a function key.  (Note that in the standard
+configuration, the function key @code{<return>} and the control key
+@kbd{RET} are synonymous.)  You can use angle brackets on the words
+@kbd{RET}, @kbd{SPC}, etc., but they are not required there.
+
+@item
+Keys can be written by their @sc{ascii} code, using a backslash followed
+by up to six octal digits.  This is the only way to represent keys with
+codes above \377.
+
+@item
+One or more prefixes @kbd{M-} (meta), @kbd{C-} (control), @kbd{S-}
+(shift), @kbd{A-} (alt), @kbd{H-} (hyper), and @kbd{s-} (super) may
+precede a character or key notation.  For function keys, the prefixes
+may go inside or outside of the brackets: @code{C-<down>} @equiv{}
+@code{<C-down>}.  The prefixes may be written in any order: @kbd{M-C-x}
+@equiv{} @kbd{C-M-x}.
+
+Prefixes are not allowed on multi-key words, e.g., @kbd{C-abc}, except
+that the Meta prefix is allowed on a sequence of digits and optional
+minus sign: @kbd{M--123} @equiv{} @kbd{M-- M-1 M-2 M-3}.
+
+@item
+The @code{^} notation for control characters also works: @kbd{^M}
+@equiv{} @kbd{C-m}.
+
+@item
+Double angle brackets enclose command names: @code{<<next-line>>} is
+shorthand for @kbd{M-x next-line RET}.
+
+@item
+Finally, @code{REM} or @code{;;} causes the rest of the line to be
+ignored as a comment.
+@end itemize
+
+Any word may be prefixed by a multiplier in the form of a decimal number
+and @code{*}: @code{3*<right>} @equiv{} @code{<right> <right> <right>},
+and @code{10*foo} @equiv{} @code{foofoofoofoofoofoofoofoofoofoo}.
+
+Multiple text keys can normally be strung together to form a word, but
+you may need to add whitespace if the word would look like one of the
+above notations: @code{; ; ;} is a keyboard macro with three semicolons,
+but @code{;;;} is a comment.  Likewise, @code{\ 1 2 3} is four keys but
+@code{\123} is a single key written in octal, and @code{< right >} is
+seven keys but @code{<right>} is a single function key.  When in doubt,
+use whitespace.
+@end quotation
+
+@node Q5.1.4, Q5.1.5, Q5.1.3, Miscellaneous
+@section What is the performance hit of @code{let}?
+
+In most cases, not noticable.  Besides, there's no avoiding
+@code{let}---you have to bind your local variables, after all.  Some
+pose a question whether to nest @code{let}s, or use one @code{let} per
+function.  I think because of clarity and maintenance (and possible
+future implementation), @code{let}-s should be used (nested) in a way to
+provide the clearest code.
+
+@node Q5.1.5, Q5.1.6, Q5.1.4, Miscellaneous
+@section What is the recommended use of @code{setq}?
+
+@itemize @bullet
+@item Global variables
+
+You will typically @code{defvar} your global variable to a default
+value, and use @code{setq} to set it later.
+
+It is never a good practice to @code{setq} user variables (like
+@code{case-fold-search}, etc.), as it ignores the user's choice
+unconditionally.  Note that @code{defvar} doesn't change the value of a
+variable if it was bound previously.  If you wish to change a
+user-variable temporarily, use @code{let}:
 
 @lisp
-(defadvice set-text-properties (around ignore-strings activate)
-  "Ignore strings."
-  (or (stringp (ad-get-arg 3))
-      ad-do-it))
+(let ((case-fold-search nil))
+  ...       ; code with searches that must be case-sensitive
+  ...)
 @end lisp
 
-The best is probably the canonical solution (posted by C.Thompson, on
-10/17/95):
+You will notice the user-variables by their docstrings beginning with an
+asterisk (a convention).
+
+@item Local variables
+
+Bind them with @code{let}, which will unbind them (or restore their
+previous value, if they were bound) after exiting from the @code{let}
+form.  Change the value of local variables with @code{setq} or whatever
+you like (e.g. @code{incf}, @code{setf} and such).  The @code{let} form
+can even return one of its local variables.
+
+Typical usage:
 
 @lisp
-(defun set-text-properties (start end props &optional buffer)
-  "You should NEVER use this function.  It is ideologically blasphemous.
-It is provided only to ease porting of broken FSF Emacs programs."
-  (if (stringp buffer) nil
-    (map-extents 
-     #'(lambda (extent ignored)
-	 (remove-text-properties
-	  start end (list (extent-property extent 'text-prop) nil)
-	  buffer))
-     buffer start end nil nil 'text-prop)
-    (add-text-properties start end props buffer)))
+;; iterate through the elements of the list returned by
+;; `hairy-function-that-returns-list'
+(let ((l (hairy-function-that-returns-list)))
+  (while l
+    ... do something with (car l) ...
+    (setq l (cdr l))))
+@end lisp
+
+Another typical usage includes building a value simply to work with it.
+
+@lisp
+;; Build the mode keymap out of the key-translation-alist
+(let ((inbox (file-truename (expand-file-name box)))
+      (i 0))
+  ... code dealing with inbox ...
+  inbox)
+@end lisp
+
+This piece of code uses the local variable @code{inbox}, which becomes
+unbound (or regains old value) after exiting the form.  The form also
+returns the value of @code{inbox}, which can be reused, for instance:
+
+@lisp
+(setq foo-processed-inbox
+      (let .....))
 @end lisp
-
-@node Q5.1.5, Q5.2.1, Q5.1.4, Miscellaneous
-@section How do I put a glyph as annotation in a buffer?
-
-Thomas Feuster <feuster@@tp4.physik.uni-giessen.de> writes:
+@end itemize
+
+@node Q5.1.6, Q5.1.7, Q5.1.5, Miscellaneous
+@section What is the typical misuse of @code{setq} ?
+
+A typical misuse is probably @code{setq}ing a variable that was meant to
+be local.  Such a variable will remain bound forever, never to be
+garbage-collected.  For example, the code doing:
+
+@lisp
+(defun my-function (whatever)
+  (setq a nil)
+  ... build a large list ...
+  ... and exit ...)
+@end lisp
+
+does a bad thing, as @code{a} will keep consuming memory, never to be
+unbound.  The correct thing is to do it like this:
+
+@lisp
+(defun my-function (whatever)
+  (let (a)             ; default initialization is to nil
+    ... build a large list ...
+    ... and exit, unbinding `a' in the process  ...)
+@end lisp
+
+Not only is this prettier syntactically, but it makes it possible for
+Emacs to garbage-collect the objects which @code{a} used to reference.
+
+Note that even global variables should not be @code{setq}ed without
+@code{defvar}ing them first, because the byte-compiler issues warnings.
+The reason for the warning is the following:
+
+@lisp
+(defun flurgoze nil)          ; ok, global internal variable
+...
+
+(setq flurghoze t)      ; ops!  a typo, but semantically correct.
+                        ; however, the byte-compiler warns.
+
+While compiling toplevel forms:
+  ** assignment to free variable flurghoze
+@end lisp
+
+@node Q5.1.7, Q5.1.8, Q5.1.6, Miscellaneous
+@section I like the the @code{do} form of cl, does it slow things down?
+
+It shouldn't.  Here is what Dave Gillespie has to say about cl.el
+performance:
 
 @quotation
-@lisp
-(let ((image-glyph (make-glyph-internal)))
-(seems to be unavoidable to do 'make-glyph-internal')
-@end lisp
-
-Now for viewing files:
+Many of the advanced features of this package, such as @code{defun*},
+@code{loop}, and @code{setf}, are implemented as Lisp macros.  In
+byte-compiled code, these complex notations will be expanded into
+equivalent Lisp code which is simple and efficient.  For example, the
+forms
 
 @lisp
-(set-glyph-image image-glyph view-graph-file-buf))
+(incf i n)
+(push x (car p))
 @end lisp
 
-For viewing already loaded buffers:
+are expanded at compile-time to the Lisp forms
 
 @lisp
-(setq image-glyph (make-glyph 
-                   (vector view-graph-file-format :data 
-		           (buffer-substring 
-			   (point-min) 
-		       	   (point-max)))))
+(setq i (+ i n))
+(setcar p (cons x (car p)))
 @end lisp
 
-The thing I couldn't figure out is how to make XEmacs guess the format
-from the contents - like it does for files. So it's a real pain to
-extract the format from the extensions of the file-name...
+which are the most efficient ways of doing these respective operations
+in Lisp.  Thus, there is no performance penalty for using the more
+readable @code{incf} and @code{push} forms in your compiled code.
+
+@emph{Interpreted} code, on the other hand, must expand these macros
+every time they are executed.  For this reason it is strongly
+recommended that code making heavy use of macros be compiled.  (The
+features labelled @dfn{Special Form} instead of @dfn{Function} in this
+manual are macros.)  A loop using @code{incf} a hundred times will
+execute considerably faster if compiled, and will also garbage-collect
+less because the macro expansion will not have to be generated, used,
+and thrown away a hundred times.
+
+You can find out how a macro expands by using the @code{cl-prettyexpand}
+function.
 @end quotation
 
-@node Q5.2.1, Q5.2.2, Q5.1.5, Miscellaneous
+@node Q5.1.8, Q5.1.9, Q5.1.7, Miscellaneous
+@section I like recursion, does it slow things down?
+
+Yes.  Emacs byte-compiler cannot do much to optimize recursion.  But
+think well whether this is a real concern in Emacs.  Much of the Emacs
+slowness comes from internal mechanisms such as redisplay, or from the
+fact that it is an interpreter.
+
+Please try not to make your code much uglier to gain a very small speed
+gain.  It's not usually worth it.
+
+@node Q5.1.9, Q5.2.1, Q5.1.8, Miscellaneous
+@section How do I put a glyph as annotation in a buffer?
+
+Here is a solution that will insert the glyph annotation at the
+beginning of buffer:
+
+@lisp
+(make-annotation (make-glyph '([FORMAT :file FILE]
+                               [string :data "fallback-text"]))
+                 (point-min)
+                 'text
+                 (current-buffer))
+@end lisp
+
+Replace @samp{FORMAT} with an unquoted symbol representing the format of 
+the image (e.g. @code{xpm}, @code{xbm}, @code{gif}, @code{jpeg}, etc.)
+Instead of @samp{FILE}, use the image file name
+(e.g. @file{/usr/local/lib/xemacs-20.2/etc/recycle.xpm}).
+
+You can turn this to a function (that optionally prompts you for a file
+name), and inserts the glyph at @code{(point)} instead of
+@code{(point-min)}.
+
+@node Q5.2.1, Q5.2.2, Q5.1.9, Miscellaneous
 @section How do I turn off the sound?
 
 Add the following line to your @file{.emacs}:
@@ -4379,6 +4659,9 @@
 (setq sound-alist nil)
 @end lisp
 
+That will make your XEmacs totally silent -- even the default ding sound 
+(TTY beep on TTY-s) will be gone.
+
 @node Q5.2.2, Q5.2.3, Q5.2.1, Miscellaneous
 @section How do I get funky sounds instead of a boring beep?
 
@@ -4452,11 +4735,6 @@
 than previous versions.  This may prove useful if you need to customize
 any indent-functions.
 
-NB: I would have thought with the passage of time this would be the
-standard version by now, but that appears not to be the case.  The
-version of filladapt included with 19.14 is last dated 1993, and does
-not have a version number.
-
 @node Q5.3.2, Q5.3.3, Q5.3.1, Miscellaneous
 @section Fontifying hang when editing a postscript file.
 
@@ -4529,20 +4807,64 @@
 @node Q5.3.7, Q5.3.8, Q5.3.6, Miscellaneous
 @section Can I have the end of the buffer delimited in some way?
 
-Say, with: [END]?
-
-Use this:
+Say, with: @samp{[END]}?
+
+Try this:
+
+@lisp
+(let ((ext (make-extent (point-min) (point-max))))
+  (set-extent-property ext 'start-closed t)
+  (set-extent-property ext 'end-closed t)
+  (set-extent-property ext 'detachable nil)  
+  (set-extent-end-glyph ext (make-glyph [string :data "[END]"])))
+@end lisp
+
+Since this is XEmacs, you can specify an icon to be shown on
+window-system devices.  To do so, change the @code{make-glyph} call to
+something like this:
+
+@lisp
+(make-glyph '([xpm :file "~/something.xpm"]
+              [string :data "[END]"]))
+@end lisp
+
+You can inline the @sc{xpm} definition yourself by specifying
+@code{:data} instead of @code{:file}.  Here is such a full-featured
+version that works on both X and TTY devices:
 
 @lisp
-(make-annotation "[END]" (point-max) 'text (current-buffer))
+(let ((ext (make-extent (point-min) (point-max))))
+  (set-extent-property ext 'start-closed t)
+  (set-extent-property ext 'end-closed t)
+  (set-extent-property ext 'detachable nil)  
+  (set-extent-end-glyph ext (make-glyph '([xpm :data "\
+/* XPM */
+static char* eye = @{
+\"20 11 7 2\",
+\"__ c None\"
+\"_` c #7f7f7f\",
+\"_a c #fefefe\",
+\"_b c #7f0000\",
+\"_c c #fefe00\",
+\"_d c #fe0000\",
+\"_e c #bfbfbf\",
+\"___________`_`_`___b_b_b_b_________`____\", 
+\"_________`_`_`___b_c_c_c_b_b____________\", 
+\"_____`_`_`_e___b_b_c_c_c___b___b_______`\", 
+\"___`_`_e_a___b_b_d___b___b___b___b______\", 
+\"_`_`_e_a_e___b_b_d_b___b___b___b___b____\", 
+\"_`_`_a_e_a___b_b_d___b___b___b___b___b__\", 
+\"_`_`_e_a_e___b_b_d_b___b___b___b___b_b__\", 
+\"___`_`_e_a___b_b_b_d_c___b___b___d_b____\", 
+\"_____`_`_e_e___b_b_b_d_c___b_b_d_b______\", 
+\"_`_____`_`_`_`___b_b_b_d_d_d_d_b________\", 
+\"___`_____`_`_`_`___b_b_b_b_b_b__________\", 
+@} ;"]
+                                          [string :data "[END]"]))))
 @end lisp
 
-Note that you might want to put this in a hook.  Since
-@code{make-annotation} is not defined by default, you might also need:
-
-@lisp
-(require 'annotations)
-@end lisp
+Note that you might want to make this a function, and put it to a hook.
+We leave that as an excercise for the reader.
 
 @node Q5.3.8, Q5.3.9, Q5.3.7, Miscellaneous
 @section How do I insert today's date into a buffer?
@@ -4571,6 +4893,16 @@
 read this question/answer again.
 @end quotation
 
+Hrvoje Niksic <hniksic@@srce.hr> writes:
+
+@quotation
+I consider this a bug.  I may attempt to fix it one day (and add a
+variable to revert to the current behavior).
+
+If many people wants to see this fixed, send me mails---they will move
+me to start hacking sooner.
+@end quotation
+
 @node Q5.3.10, Q5.3.11, Q5.3.9, Miscellaneous
 @section How can I get those oh-so-neat X-Face lines?
 
@@ -4616,9 +4948,9 @@
   (save-excursion 
     (goto-char (point-min))
     (search-forward mail-header-separator)
-    (beginning-of-line nil)
+    (beginning-of-line)
     (insert "X-Face:")
-    (insert-file "~/.face")))
+    (insert-file-contents "~/.face")))
 
 (add-hook 'mail-setup-hook 'mail-insert-x-face)
 @end lisp
@@ -4751,22 +5083,41 @@
 various FAQ FTP sites, as this file is surely out of date.
 
 @menu
-* Q6.0.1::      What is new in 20.1?  @strong{updated 4/97}
+* Q6.0.1::      What is new in 20.2?
+* Q6.0.2::      What is new in 20.3?
 * Q6.0.3::      Procedural changes in XEmacs development.
 @end menu
 
-@node Q6.0.1, Q6.0.3, Current Events, Current Events
-@section What is new in 20.1?
-
-The biggest changes in 20.1 include intergration of EFS (the next
-generation of ange-ftp) and AUC Tex (the Emacs subsystem that includes a 
+@node Q6.0.1, Q6.0.2, Current Events, Current Events
+@section What is new in 20.2?
+
+The biggest changes in 20.2 include intergration of EFS (the next
+generation of ange-ftp) and AUC Tex (the Emacs subsystem that includes a
 major mode for editing Tex and LaTeX, and a lot of other stuff).  Many
-bugs from 20.0 have been fixed for this release.
-
-XEmacs 20.1 is the development release, and is no longer considered
-unstable.
-
-@node Q6.0.3,  , Q6.0.1, Current Events
+bugs from 20.0 have been fixed for this release.  20.2 also contains a
+new system for customizing XEmacs options, invoked via @kbd{M-x
+customize}.
+
+XEmacs 20.2 is the development release (20.0 was beta), and is no longer
+considered unstable.
+
+@node Q6.0.2, Q6.0.3, Q6.0.1, Current Events
+@section What is new in 20.3?
+
+XEmacs release 20.3 is planned for autumn 1997.  It will likely contain
+a much smaller amount of code for basic functionality, with all the
+popular Lisp packages being available in the form of easy-to-install
+add-ons.
+
+Other input methods (such as skk) will be made available for Mule, as
+well as more user-level documentation.
+
+Many new features are planned, such as multiple TTY frames, support for
+Autoconf 2, synches with Emacs 20.1, and more; much of this is already
+running in various beta versions.  Ask at
+@code{<xemacs-beta-request@@xemacs.org>} for more details.
+
+@node Q6.0.3,  , Q6.0.2, Current Events
 @section Procedural changes in XEmacs development.
 
 @enumerate
@@ -4783,11 +5134,13 @@
 decided that intermediate versions will be made available in source only
 form for the truly interested.
 
-No further XEmacs 19 releases are planned.
+No further XEmacs 19 feature releases are planned.  XEmacs 19.16 will
+consist of 19.15 plus the collected bugfixes, and will probably be the
+final version of XEmacs 19.
 
 @item
 As of December 1996, Steve Baur <steve@@altair.xemacs.org> has become
 the lead maintainer of XEmacs.
+@end enumerate
 
 @bye
-<
diff -r 4de2936b4e77 -r 0132846995bd man/xemacs/mark.texi
--- a/man/xemacs/mark.texi	Mon Aug 13 09:42:28 2007 +0200
+++ b/man/xemacs/mark.texi	Mon Aug 13 09:43:35 2007 +0200
@@ -139,7 +139,7 @@
 @item
 Evaluate it as Lisp code with @kbd{M-x eval-region} (@pxref{Lisp Eval}).
 @item
-Fill it as text with @kbd{M-g} (@pxref{Filling}).
+Fill it as text with @kbd{M-q} (@pxref{Filling}).
 @item
 Print hardcopy with @kbd{M-x print-region} (@pxref{Hardcopy}).
 @item
diff -r 4de2936b4e77 -r 0132846995bd pkg-src/tree-nx/English.lproj/DocWindow.nib/data.classes
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pkg-src/tree-nx/English.lproj/DocWindow.nib/data.classes	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,31 @@
+TreeController = {
+    ACTIONS = {
+	info:;
+	open:;
+    };
+    OUTLETS = {
+	treeView;
+	infoPanel;
+    };
+    SUPERCLASS = Object;
+};
+FirstResponder = {
+    ACTIONS = {
+    };
+    SUPERCLASS = Object;
+};
+TreeView = {
+    ACTIONS = {
+	setCurrButtonByName:;
+	scale:;
+	displayButByName:;
+    };
+    OUTLETS = {
+	selectedField;
+	lineList;
+	treeRoot;
+	currentButton;
+	priorButton;
+    };
+    SUPERCLASS = View;
+};
diff -r 4de2936b4e77 -r 0132846995bd pkg-src/tree-nx/English.lproj/DocWindow.nib/data.nib
Binary file pkg-src/tree-nx/English.lproj/DocWindow.nib/data.nib has changed
diff -r 4de2936b4e77 -r 0132846995bd pkg-src/tree-nx/English.lproj/InfoPanel.nib/data.classes
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pkg-src/tree-nx/English.lproj/InfoPanel.nib/data.classes	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,14 @@
+TreeController = {
+    ACTIONS = {
+    };
+    OUTLETS = {
+	treeView;
+	infoPanel;
+    };
+    SUPERCLASS = Object;
+};
+FirstResponder = {
+    ACTIONS = {
+    };
+    SUPERCLASS = Object;
+};
diff -r 4de2936b4e77 -r 0132846995bd pkg-src/tree-nx/English.lproj/InfoPanel.nib/data.nib
Binary file pkg-src/tree-nx/English.lproj/InfoPanel.nib/data.nib has changed
diff -r 4de2936b4e77 -r 0132846995bd pkg-src/tree-nx/English.lproj/TreeView.nib/data.classes
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pkg-src/tree-nx/English.lproj/TreeView.nib/data.classes	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,56 @@
+TreeButton = {
+    ACTIONS = {
+    };
+    OUTLETS = {
+	myTreeNode;
+    };
+    SUPERCLASS = Button;
+};
+TreeController = {
+    ACTIONS = {
+	info:;
+	open:;
+    };
+    OUTLETS = {
+	infoPanel;
+	openMenuItem;
+	treeView;
+    };
+    SUPERCLASS = Object;
+};
+Tree = {
+    ACTIONS = {
+    };
+    OUTLETS = {
+	label;
+	branches;
+    };
+    SUPERCLASS = Object;
+};
+FirstResponder = {
+    ACTIONS = {
+    };
+    SUPERCLASS = Object;
+};
+String = {
+    ACTIONS = {
+	setStringValue:;
+	concatenate:;
+    };
+    OUTLETS = {
+    };
+    SUPERCLASS = Object;
+};
+TreeView = {
+    ACTIONS = {
+	setCurrButtonByName:;
+	scale:;
+    };
+    OUTLETS = {
+	treeRoot;
+	lineList;
+	priorButton;
+	currentButton;
+    };
+    SUPERCLASS = View;
+};
diff -r 4de2936b4e77 -r 0132846995bd pkg-src/tree-nx/English.lproj/TreeView.nib/data.nib
Binary file pkg-src/tree-nx/English.lproj/TreeView.nib/data.nib has changed
diff -r 4de2936b4e77 -r 0132846995bd pkg-src/tree-nx/History.rtf
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pkg-src/tree-nx/History.rtf	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,74 @@
+{\rtf0\ansi{\fonttbl\f0\fswiss Helvetica;\f2\fmodern Courier;\f1\fmodern Ohlfs;}
+\paperw9840
+\paperh11200
+\margl120
+\margr120
+\pard\tx520\tx1060\tx1600\tx2120\tx2660\tx3200\tx3720\tx4260\tx4800\tx5320\f0\b0\i0\ulnone\fs24\fc0\cf0 \
+Here's why this thing exists.  You'll notice from the dates that it's taken me quite a while to get around to actually doing this; it ended up being quite simple to get it put together.  (What took me so long is the fact that in the meantime I had to write a simple optimizing compiler for one of my classes, and only had three weeks to do it in.)  The tree object just happens to be an enhancement of the object I used/subclassed to build the parse tree in the aforementioned compiler, so I know that the Tree class can be useful, at any rate.\
+\
+The other classes in here won't be particularly useful to most folks, but there are examples of (1) multiple .nib files, (2) simple use of multiple documents�notice that I don't track multiple instances except as I open them, so the Windows menu and the user's mouse clicks do all the work here�I didn't really have to do anything special to get it to work, in other words, since NeXTSTEP does this for me.  There's also examples of using an Open Panel and of getting the WorkSpace to open double-clicked documents.  All this stuff is easy to do anyway, but I suppose that this program could serve as an example for the beginner.\
+\
+As you'll notice from below, the main thing to show is how to use PostScript to draw lines and how to display the tree.  For most folks, the Tree object�and not this part�will be useful, but it's all in there with everything else for you to look at.  You'll notice that I took the simplest and least efficient route to implement the drawing, thus it should make sense to a beginner.  For better performance, other methods (described in the Adobe Purple book primarily) could be used.  I figured that simply calling the PS() functions would be good enough here, but ideally a PS wrap or better would be used.  Also, I redraw the entire View  every time even though I should really check the arguments to -drawSelf:: so that only the necessary parts get redrawn.  Although that would improve performance, it wasn't worth bothering with for this program.\
+\
+My notes about the program are included in the message below in 
+\i italics
+\i0 .\
+\
+
+Date: Thu, 18 Mar 93 19:01:39 -0500\
+From: Bob Weiner <weiner@pts.mot.com>\
+Message-Id: <9303190001.AA02300@info.>\
+To: yackd@maine.et.byu.edu\
+In-Reply-To: Don Yacktman's message of Thu, 18 Mar 93 16:34:14 -0700 <9303182334.AA29304@maine.et.byu.edu>\
+Subject: Re: Anyone have a tree display class that can read a tree from a text file?\
+Status: R\
+
+\f0\fs24 \
+\
+The tree class could read in a tree from\
+a file in textual form.  The first line is the name of the tree.\
+In textual form, each node in the tree is given by its label, which can be\
+any text, including spaces on a single line.  The node's position in the tree\
+is given by its preceding indentation, normally using 3 spaces of indentation\
+per level (the amount can be figured out by examining the first indented\
+label and counting its spaces.  An example:\
+\
+
+\f2 Tree Name\
+Root\
+   Node 1\
+      Node 1.1\
+         Node 1.1.1\
+   Node 2 has this longer label.\
+
+\f0 \
+
+\i I read in the first two lines with the assumption that there is no indentation.  On the third line, I use the number of spaces to determine the indent.  Do not use tabs; I didn't bother to write code which can deal with them.  Be sure that the file ends with ".tree" so that the app will load it.  If you make the file incorrectly, you will cause weird things to happen, since I didn't bother to do much error checking while parsing.  Obviously, for this program to be more "useful" that ought to be rectified.\
+
+\i0 \
+After the tree is read in, it is displayed within a new view.  Each node is\
+created as a selectable button with the appropriate label and lines\
+connecting it to its parent and children.  (Let's assume only one button can\
+be selected at a time.)\
+\
+
+\i For simplicity's sake, all buttons are the same size.  If  the node's label is really long or really short, this might cause a problem.  The View would have to do tricky calculations in order to do better, and I deamed this a "not worth bothering with" thing.\
+
+\i0 \
+When a button is selected, a string consisting of the tree name and the node\
+selected is sent to an output stream.  (stdout is fine as a default.), e.g.\
+\
+	Tree Name^^Node 1.1 \
+\
+could be output with ^^ indicating separation of the two arguments.\
+\
+
+\i This is what I do.  If launched from Workspace, look for the text in the Console window, which is where stdout goes to.  It would probably be better to have a UI "Console" window for this output and allow the user to select a file to "save" to, but it wasn't worth the effort to this this here, easy though it is.\
+
+\i0 \
+That's it.  Then my other program takes this standard output and displays\
+text associated with the selected node.\
+\
+\
+
+}
diff -r 4de2936b4e77 -r 0132846995bd pkg-src/tree-nx/Line.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pkg-src/tree-nx/Line.h	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,13 @@
+
+#import <appkit/appkit.h>
+
+@interface Line:Object
+{
+	NXPoint start;
+	NXPoint end;
+}
+
+- setStart:(NXPoint *)s end:(NXPoint *)e;
+- render;
+
+@end
diff -r 4de2936b4e77 -r 0132846995bd pkg-src/tree-nx/Line.m
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pkg-src/tree-nx/Line.m	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,23 @@
+
+#import "Line.h"
+
+@implementation Line
+
+- setStart:(NXPoint *)s end:(NXPoint *)e
+{
+	start.x = s->x;
+	start.y = s->y;
+	end.x = e->x;
+	end.y = e->y;
+	return self;
+}
+
+- render
+{
+	PSmoveto(start.x, start.y);
+	PSlineto(end.x, end.y);
+	PSstroke();
+	return self;
+}
+
+@end
diff -r 4de2936b4e77 -r 0132846995bd pkg-src/tree-nx/Makefile
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pkg-src/tree-nx/Makefile	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,50 @@
+#
+# Generated by the NeXT Project Builder.
+#
+# NOTE: Do NOT change this file -- Project Builder maintains it.
+#
+# Put all of your customizations in files called Makefile.preamble
+# and Makefile.postamble (both optional), and Makefile will include them.
+#
+
+NAME = TreeView
+
+PROJECTVERSION = 1.1
+LANGUAGE = English
+
+APPICON = Tree.tiff
+DOCICONS = Tree2.tiff
+
+LOCAL_RESOURCES = DocWindow.nib InfoPanel.nib TreeView.nib
+
+CLASSES = Line.m NamedTree.m String.m Tree.m TreeButton.m TreeButtonCell.m \
+          TreeController.m TreeView.m
+
+HFILES = Line.h NamedTree.h String.h Tree.h TreeButton.h TreeButtonCell.h \
+         TreeController.h TreeView.h
+
+MFILES = TreeView_main.m
+
+OTHERSRCS = Makefile
+
+
+MAKEFILEDIR = /NextDeveloper/Makefiles/app
+INSTALLDIR = /LocalApps
+INSTALLFLAGS = -c -s -m 755
+SOURCEMODE = 444
+
+ICONSECTIONS =	-sectcreate __ICON app Tree.tiff \
+		-sectcreate __ICON Tree2 Tree2.tiff
+
+LIBS = -lMedia_s -lNeXT_s
+DEBUG_LIBS = $(LIBS)
+PROF_LIBS = $(LIBS)
+
+
+-include Makefile.preamble
+
+include $(MAKEFILEDIR)/app.make
+
+-include Makefile.postamble
+
+-include Makefile.dependencies
diff -r 4de2936b4e77 -r 0132846995bd pkg-src/tree-nx/NamedTree.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pkg-src/tree-nx/NamedTree.h	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,38 @@
+//
+//	NamedTree.h -- a generic class to build tree data structures
+//		This class requires the String class, also by Don Yacktman.
+//		Written by Don Yacktman (c) 1993 by Don Yacktman.
+//				All rights reserved.
+//
+//	This Tree subclass allows an entire tree to be given a name, other than
+//		the root node's name.
+//
+//		You may use and copy this class freely as long as you
+//		comply with the following terms:
+//			(1) If you use this class in an application which you
+//				intend to sell commercially, as shareware, or otherwise,
+//				you may only do so with express written permission
+//				of the author.  Use in applications which will
+//				be distributed free of charge is encouraged.
+//			(2) You must include the source code to this object and
+//				all accompanying documentation with your application,
+//				or provide it to users if requested, free of charge.
+//			(3) Do not remove the author's name or any of the
+//				copyright notices
+//
+
+#import "Tree.h" 	// superclass is in there
+
+@interface NamedTree:Tree
+{
+	id treeName;	// a String object that all nodes should point to
+}
+
+// set and retrieve the tree's name
+- setTreeName:string;
+- (const char *)treeName;
+
+- act:sender;            // action performed when node is activated
+- activateNode:sender;	 // message sent to "activate" the node
+
+@end
diff -r 4de2936b4e77 -r 0132846995bd pkg-src/tree-nx/NamedTree.m
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pkg-src/tree-nx/NamedTree.m	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,54 @@
+//
+//	NamedTree.m -- a generic class to build tree data structures
+//		This class requires the String class, also by Don Yacktman.
+//		Written by Don Yacktman (c) 1993 by Don Yacktman.
+//				All rights reserved.
+//
+//		You may use and copy this class freely as long as you
+//		comply with the following terms:
+//			(1) If you use this class in an application which you
+//				intend to sell commercially, as shareware, or otherwise,
+//				you may only do so with express written permission
+//				of the author.  Use in applications which will
+//				be distributed free of charge is encouraged.
+//			(2) You must include the source code to this object and
+//				all accompanying documentation with your application,
+//				or provide it to users if requested, free of charge.
+//			(3) Do not remove the author's name or any of the
+//				copyright notices
+//
+
+#import "NamedTree.h"
+#import "TreeView.h"
+
+@implementation NamedTree
+
+- setTreeName:string { treeName = string; return self; }
+- (const char *)treeName { return [treeName stringValue]; }
+
+- activateNode:sender
+{
+//        int     msgDelivered;
+
+	// this action message is sent whenever the button associated with
+	// this node is clicked by the user.
+	[[sender superview] setCurrentButton:sender];
+        [self act:sender];
+	return self;
+}
+
+- act:sender
+{
+	const char* nodeVal = [((value) ? value : label) stringValue];
+
+	printf("%s^^%s^^%s\n", [self treeName], "br-edit", nodeVal);
+//	msgDelivered = [[NXApp appSpeaker] selectorRPC:"nxBrowserMsg"
+//			             paramTypes:"ccc",
+//			             [self treeName], "br-edit", nodeVal];
+//	if (msgDelivered != 0)
+//	  fprintf(stderr, "Class display request not accepted.\n");
+
+	return self;
+}
+
+@end
diff -r 4de2936b4e77 -r 0132846995bd pkg-src/tree-nx/PB.gdbinit
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pkg-src/tree-nx/PB.gdbinit	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,7 @@
+#
+# Generated by the NeXT Project Builder.
+#
+# NOTE: Do NOT change this file -- Project Builder maintains it.
+#
+view
+
diff -r 4de2936b4e77 -r 0132846995bd pkg-src/tree-nx/PB.project
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pkg-src/tree-nx/PB.project	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,26 @@
+INSTALLDIR = /LocalApps;
+APPICON = Tree.tiff;
+GENERATEMAIN = YES;
+DOCICONFILES = (Tree2.tiff);
+FILESTABLE = {
+    OTHER_LIBS = (Media_s, NeXT_s);
+    CLASSES = (Line.m, NamedTree.m, String.m, Tree.m, TreeButton.m, TreeButtonCell.m, TreeController.m, TreeView.m);
+    OTHER_SOURCES = (Makefile);
+    H_FILES = (Line.h, NamedTree.h, String.h, Tree.h, TreeButton.h, TreeButtonCell.h, TreeController.h, TreeView.h);
+    INTERFACES = (DocWindow.nib, InfoPanel.nib, TreeView.nib);
+    OTHER_LINKED = ();
+    M_FILES = (TreeView_main.m);
+};
+APPCLASS = Application;
+MAINNIB = TreeView;
+DOCEXTENSIONS = (tree);
+PROJECTTYPE = Application;
+PROJECTVERSION = 1.1;
+LOCALIZABLE_FILES = {
+    InfoPanel.nib;
+    TreeView.nib;
+    DocWindow.nib;
+};
+PROJECTNAME = TreeView;
+SYSTEMEXTENSIONS = ();
+LANGUAGE = English;
diff -r 4de2936b4e77 -r 0132846995bd pkg-src/tree-nx/README.rtf
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pkg-src/tree-nx/README.rtf	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,24 @@
+{\rtf0\ansi{\fonttbl\f0\fswiss Helvetica;\f1\fmodern Ohlfs;}
+\paperw9840
+\paperh14020
+\margl120
+\margr120
+\pard\tx520\tx1060\tx1600\tx2120\tx2660\tx3200\tx3720\tx4260\tx4800\tx5320\f0\b0\i0\ulnone\fs24\fc0\cf0 \
+
+\fs36 This program is released under the terms of the GNU General Public License.  Do what you want with it.\
+
+\fs24 \
+See the History.rtf file to see what this program is all about.\
+\
+To run, launch it from the Workspace and have it read in a .tree file (format is in ascii, as described in History.rtf).  The tree will be displayed graphically.  Click on a button to activate a node.  When a node gets sent an activation message, it prints it's contents to stdout, which means that you will see feedback in the WorkSpace Console.\
+\
+And that's all there is.  This program mainly serves as a programming example and a way to make available a generic Tree class.  The Tree class is particularly useful for building parse trees, and subclasses could easily be made to create a recursive pretty-printer automatically.  (I have used the Tree class in an optimizing compiler which deals with a subset of Pascal, and the Tree did pretty printing and three-address code generation automatically by just sending the appropriate message to the root node.  It worked out quite nicely.  Each subclass corresponded to a different type of programming construct�)  Also of note is the way I use a List as a display List for the line objects.  Any type of object that can render itself could be placed in that list, which is part of how my gamekit deals with multiple types of sprites...  and in the file parsing is an example of how a List object can be used as a stack.  (It could be used as a queue, too, if you think about it.  Quite a nifty object IMHO.)\
+\
+If you have any questions, requests, whatever, feel free to contact me.\
+\
+\
+Don_Yacktman@byu.edu\
+\
+\
+\
+}
diff -r 4de2936b4e77 -r 0132846995bd pkg-src/tree-nx/String.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pkg-src/tree-nx/String.h	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,92 @@
+//
+//	String.h -- a generic class to simplify manipulation of (char *)'s
+//		Written by Don Yacktman (c) 1993 by Don Yacktman.
+//				Version 1.1.  All rights reserved.
+//
+//		You may use and copy this class freely as long as you
+//		comply with the following terms:
+//			(1) If you use this class in an application which you
+//				intend to sell commercially, as shareware, or otherwise,
+//				you may only do so with express written permission
+//				of the author.  Use in applications which will
+//				be distributed free of charge is encouraged.
+//			(2) You must include the source code to this object and
+//				all accompanying documentation with your application,
+//				or provide it to users if requested, free of charge.
+//			(3) Do not remove the author's name or any of the
+//				copyright notices
+//
+
+#import <appkit/appkit.h>
+
+@interface String:Object
+{
+	 char *buffer;
+	 NXStringOrderTable *orderTable;
+	 int length, _length;
+}
+
+// basic allocation, deallocation methods
+- init;
+- initString:(const char *)aString;
+- allocateBuffer:(int)size;
+- allocateBuffer:(int)size fromZone:(NXZone *)zone;
+- read:(NXTypedStream *)stream;
+- write:(NXTypedStream *)stream;
+- freeString;
+- free;
+
+// strcpy(), strlen() covers 
+- copyFromZone:(NXZone *)zone; // a -copy message calls this.
+- setString:(const char *)aString;
+- setString:(const char *)aString fromZone:(NXZone *)zone;
+- setStringValue:sender;
+- setStringValue:sender fromZone:(NXZone *)zone;
+- (const char *)stringValue;
+- (int)length;
+
+// strcat(), strncat() covers
+- concatenate:sender;
+- concatenate:sender n:(int)n;
+- concatenate:sender fromZone:(NXZone *)zone;
+- concatenate:sender n:(int)n fromZone:(NXZone *)zone;
+- cat:(const char *)aString;
+- cat:(const char *)aString n:(int)n;
+- cat:(const char *)aString fromZone:(NXZone *)zone;
+- cat:(const char *)aString n:(int)n fromZone:(NXZone *)zone;
+
+// index(), rindex() covers
+- (const char *)rindex:(char)aChar;
+- (const char *)index:(char)aChar;
+
+// strcmp(), strncmp(), strcasecmp(), strncasecmp() covers
+- setStringOrderTable:(NXStringOrderTable *)table;
+- (NXStringOrderTable *)stringOrderTable;
+- (BOOL)isEqual:anObject;
+- (int)compareTo:sender;
+- (int)compareTo:sender n:(int)n;
+- (int)compareTo:sender caseSensitive:(BOOL)sense;
+- (int)compareTo:sender n:(int)n caseSensitive:(BOOL)sense;
+- (int)cmp:(const char *)aString;
+- (int)cmp:(const char *)aString n:(int)n;
+- (int)casecmp:(const char *)aString;
+- (int)casecmp:(const char *)aString n:(int)n;
+- (const char *)strstr:(const char *)subString;
+
+// like BASIC's left$(), right$(), and mid$(); all return a new instance.
+- left:(int)count;
+- right:(int)count;
+- midFrom:(int)start to:(int)end;
+- midFrom:(int)start length:(int)len;
+- left:(int)count fromZone:(NXZone *)zone;
+- right:(int)count fromZone:(NXZone *)zone;
+- midFrom:(int)start to:(int)end fromZone:(NXZone *)zone;
+- midFrom:(int)start length:(int)len fromZone:(NXZone *)zone;
+- subStringRight:subString;
+- subStringLeft:subString;
+
+// private methods: do not use these!
+- _unhookBuffer;
+
+
+@end
diff -r 4de2936b4e77 -r 0132846995bd pkg-src/tree-nx/String.m
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pkg-src/tree-nx/String.m	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,376 @@
+//
+//	String.m -- a generic class to simplify manipulation of (char *)'s
+//		Written by Don Yacktman (c) 1993 by Don Yacktman.
+//				Version 1.1.  All rights reserved.
+//
+//		You may use and copy this class freely as long as you
+//		comply with the following terms:
+//			(1) If you use this class in an application which you
+//				intend to sell commercially, as shareware, or otherwise,
+//				you may only do so with express written permission
+//				of the author.  Use in applications which will
+//				be distributed free of charge is encouraged.
+//			(2) You must include the source code to this object and
+//				all accompanying documentation with your application,
+//				or provide it to users if requested, free of charge.
+//			(3) Do not remove the author's name or any of the
+//				copyright notices
+//
+
+#import "String.h"
+#import <strings.h>
+#import <appkit/appkit.h>
+
+@implementation String
+
+- init
+{
+	 [super init];
+	 [self setStringOrderTable:NXDefaultStringOrderTable()];
+	 buffer = NULL;
+	 length = 0;
+	 _length = 0;
+	 return self;
+}
+
+- initString:(const char *)aString
+{
+	[self init];
+	return [self setString:aString];
+}
+
+- setStringOrderTable:(NXStringOrderTable *)table
+{
+	orderTable = table;
+	return self;
+}
+
+- (NXStringOrderTable *)stringOrderTable
+{
+	return orderTable;
+}
+
+- allocateBuffer:(int)size
+{
+	return [self allocateBuffer:size fromZone:[self zone]];
+}
+
+- allocateBuffer:(int)size fromZone:(NXZone *)zone
+{
+	if (size <= _length) return self;
+	[self freeString];
+	buffer = (char *)NXZoneMalloc(zone, size);
+	buffer[0] = 0;
+	_length = size;
+
+	return self;
+}
+
+- setString:(const char *)aString
+{
+	return [self setString:aString fromZone:[self zone]];
+}
+
+- setString:(const char *)aString fromZone:(NXZone *)zone
+{
+	if (!aString) return self;
+	// Note that I could have used NXCopyStringBufferFromZone() here
+	// instead.  This works just as well, but it may be slower...
+	// I haven't checked that out, though.  It might be worth doing.
+	[self allocateBuffer:strlen(aString)+1 fromZone:zone];
+	strcpy(buffer, aString);
+	length = strlen(buffer);
+	return self;
+}
+
+- setStringValue:sender
+{
+	if (![sender respondsTo:@selector(stringValue)]) return self;
+	return [self setString:[sender stringValue] fromZone:[self zone]];
+}
+
+- setStringValue:sender fromZone:(NXZone *)zone
+{
+	if (![sender respondsTo:@selector(stringValue)]) return self;
+	return [self setString:[sender stringValue] fromZone:zone];
+}
+
+- (const char *)stringValue
+{
+	return buffer;
+}
+
+- read:(NXTypedStream *)stream
+{
+	char *tmpStr;
+	[super read:stream];
+	NXReadType(stream, "i", &_length);
+	tmpStr = (char *)malloc(_length + 1);
+	NXReadType(stream, "*", &tmpStr);
+	[self setString:tmpStr fromZone:[self zone]];
+	free(tmpStr);
+	return self;
+}
+
+- write:(NXTypedStream *)stream
+{
+	[super write:stream];
+	NXWriteTypes(stream, "i*", &_length, &buffer);
+	return self;
+}
+
+- copyFromZone:(NXZone *)zone
+{
+	String *myCopy = [super copyFromZone:zone];
+	// force child to have it's own copy of the string buffer
+	[myCopy _unhookBuffer];
+	[myCopy allocateBuffer:_length fromZone:zone];
+	[myCopy setString:buffer fromZone:zone];
+	return myCopy;
+}
+
+- _unhookBuffer
+{ // used by the copy method so that we don't free the buffer from orig. 
+	buffer = NULL; _length = 0;
+	return self;
+}
+
+- freeString
+{
+	if(buffer) free(buffer);
+	buffer = NULL;
+	length = 0;
+	_length = 0;
+	return self;
+}
+
+- free
+{
+	 [self freeString];
+	 return [super free];
+}
+
+- cat:(const char *)aString
+{
+	return [self cat:aString
+				 n:strlen(aString)
+				 fromZone:[self zone]];
+}
+
+- cat:(const char *)aString n:(int)n
+{
+	return [self cat:aString n:n fromZone:[self zone]];
+}
+
+- cat:(const char *)aString fromZone:(NXZone *)zone
+{
+	return [self cat:aString n:strlen(aString) fromZone:zone];
+}
+
+- cat:(const char *)aString n:(int)n fromZone:(NXZone *)zone
+{
+	char *newBuffer; int newSize;
+	newSize = length + n + 1;
+	if (newSize > _length) {
+		newBuffer = (char *)NXZoneMalloc(zone, newSize);
+		_length = newSize;
+		newBuffer[0] = '\0';
+		strcat(newBuffer, buffer);
+		strncat(newBuffer, aString, n);
+		free(buffer);
+		buffer = newBuffer;
+	} else  strncat(buffer, aString, n);
+	length = strlen(buffer);
+	return self;
+}
+
+- concatenate:sender
+{
+	if (![sender respondsTo:@selector(stringValue)]) return self;
+	return [self cat:[sender stringValue]
+				 n:strlen([sender stringValue])
+				 fromZone:[self zone]];
+}
+
+- concatenate:sender n:(int)n
+{
+	if (![sender respondsTo:@selector(stringValue)]) return self;
+	return [self cat:[sender stringValue] n:n fromZone:[self zone]];
+}
+
+- concatenate:sender fromZone:(NXZone *)zone
+{
+	if (![sender respondsTo:@selector(stringValue)]) return self;
+	return [self cat:[sender stringValue]
+			n:strlen([sender stringValue]) fromZone:zone];
+}
+
+- concatenate:sender n:(int)n fromZone:(NXZone *)zone
+{
+	if (![sender respondsTo:@selector(stringValue)]) return self;
+	return [self cat:[sender stringValue] n:n fromZone:zone];
+}
+
+- (const char *)rindex:(char)aChar
+{
+	return rindex(buffer, aChar);
+}
+
+- (const char *)index:(char)aChar
+{
+	return index(buffer, aChar);
+}
+
+- (const char *)strstr:(const char *)subString
+{
+	return strstr(buffer, subString);
+}
+
+- subStringRight:subString
+{
+	const char *sub;
+	if ([subString respondsTo:@selector(stringValue)])
+		sub = [subString stringValue];
+	else return nil;	// error if can't get string value
+	return [[String allocFromZone:[self zone]]
+			initString:strstr(buffer, sub)];
+}
+
+- subStringLeft:subString
+{
+	const char *sub;
+	char *tempString = NXCopyStringBufferFromZone(buffer, [self zone]);
+	char *temp2;
+	id retVal = [String alloc];
+	
+	if ([subString respondsTo:@selector(stringValue)])
+		sub = [subString stringValue];
+	else return nil;	// error if can't get string value
+	temp2 = strstr(tempString, sub); 
+	if (temp2) {
+		temp2[0] = '\0';	// terminate it early
+		[retVal initString:tempString];
+	} else { // substring not found
+		return [self copy];
+	}
+	free(tempString);
+	return retVal;
+}
+
+- (int)length
+{
+	return length;
+}
+
+- (BOOL)isEqual:anObject
+{
+	if (anObject == self) return YES;
+	// doesn't have to be a String object to be equal...
+	if ([anObject respondsTo:@selector(stringValue)]) {
+		if (!NXOrderStrings(buffer, [anObject stringValue],
+				YES, -1, orderTable)) return YES;
+	}
+	return NO;
+}
+
+- (int)compareTo:sender
+{
+	return [self compareTo:sender n:(-1) caseSensitive:YES];
+}
+
+- (int)compareTo:sender n:(int)n
+{
+	return [self compareTo:sender n:n caseSensitive:YES];
+}
+
+- (int)cmp:(const char *)aString
+{
+	return strcmp(buffer, aString);
+}
+
+- (int)cmp:(const char *)aString n:(int)n
+{
+	return strncmp(buffer, aString, n);
+}
+
+- (int)compareTo:sender caseSensitive:(BOOL)sense
+{
+	return [self compareTo:sender n:(-1) caseSensitive:sense];
+}
+
+- (int)compareTo:sender n:(int)n caseSensitive:(BOOL)sense
+{
+	if (![sender respondsTo:@selector(stringValue)]) return 1; // !=
+	return NXOrderStrings(buffer, [sender stringValue], sense, n, orderTable);
+}
+
+- (int)casecmp:(const char *)aString
+{
+	return strcasecmp(buffer, aString);
+}
+
+- (int)casecmp:(const char *)aString n:(int)n
+{
+	return strncasecmp(buffer, aString, n);
+}
+
+- left:(int)count
+{
+	return [self left:count fromZone:[self zone]];
+}
+
+- right:(int)count
+{
+	return [self right:count fromZone:[self zone]];
+}
+
+- midFrom:(int)start to:(int)end
+{
+	return [self midFrom:start to:end fromZone:[self zone]];
+}
+
+- midFrom:(int)start length:(int)len
+{
+	return [self midFrom:start length:len fromZone:[self zone]];
+}
+
+- left:(int)count fromZone:(NXZone *)zone
+{
+	char smash = buffer[count];
+	id newString = [[String allocFromZone:zone] init];
+	buffer[count] = '\0';
+	[newString setString:buffer fromZone:zone];
+	buffer[count] = smash;
+	return newString;
+}
+
+- right:(int)count fromZone:(NXZone *)zone
+{
+	id newString = [[String allocFromZone:zone] init];
+	[newString setString:&buffer[length - count] fromZone:zone];
+	return newString;
+}
+
+- midFrom:(int)start to:(int)end fromZone:(NXZone *)zone
+{
+	char smash = buffer[end];
+	id newString = [[String allocFromZone:zone] init];
+	buffer[end] = '\0'; // inclusive; end-1 is not.
+	[newString setString:&buffer[start - 1] fromZone:zone];
+	buffer[end] = smash;
+	return newString;
+}
+
+- midFrom:(int)start length:(int)len fromZone:(NXZone *)zone
+{
+	register int spot = start + len - 1;
+	char smash = buffer[spot];
+	id newString = [[String allocFromZone:zone] init];
+	buffer[spot] = '\0';
+	[newString setString:&buffer[start - 1] fromZone:zone];
+	buffer[spot] = smash;
+	return newString;
+}
+
+
+@end
diff -r 4de2936b4e77 -r 0132846995bd pkg-src/tree-nx/Test.tree
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pkg-src/tree-nx/Test.tree	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,21 @@
+Tree Name
+Root
+   Node 1
+      Node 1.1
+         Node 1.1.1
+         Node 1.1.2
+         Node 1.1.3
+      Node 1.2
+      Node 1.3
+   Node 2 has this longer label.
+   Node 3 has this label.
+      Node 3.1
+      Node 3.2
+         Node 3.2.1
+         Node 3.2.2
+         Node 3.2.3
+            Node 3.2.3.1
+            Node 3.2.3.2
+      Node 3.3
+      Node 3.4
+   Node 4 has a label.
diff -r 4de2936b4e77 -r 0132846995bd pkg-src/tree-nx/Tree.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pkg-src/tree-nx/Tree.h	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,84 @@
+//
+//	Tree.h -- a generic class to build tree data structures
+//		This class requires the String class, also by Don Yacktman.
+//		Written by Don Yacktman (c) 1993 by Don Yacktman.
+//				All rights reserved.
+//
+//	Subclasses should be designed to hold more data than just children and
+// 		a String-based label...That's where the usefulness of the class
+//		becomes apparent.  By using a list, any number of children is ok.
+//
+//		You may use and copy this class freely as long as you
+//		comply with the following terms:
+//			(1) If you use this class in an application which you
+//				intend to sell commercially, as shareware, or otherwise,
+//				you may only do so with express written permission
+//				of the author.  Use in applications which will
+//				be distributed free of charge is encouraged.
+//			(2) You must include the source code to this object and
+//				all accompanying documentation with your application,
+//				or provide it to users if requested, free of charge.
+//			(3) Do not remove the author's name or any of the
+//				copyright notices
+//
+
+#import <appkit/appkit.h> 	// superclass is in there
+#import <stdio.h>
+#import "String.h"
+
+@interface Tree:Object
+{
+	id branches;	// an instance of the list class
+	id label;	// node name
+	id value;       // must be a string
+	BOOL notCollapsed;	// print children when dumping if true.
+}
+
+
+// init with null label
+- init;
+
+// designated initializer
+- initLabel:(const char *)newLabel;	// send a char* string
+- initLabelString:string;		// send a String object
+
+// access to the label of this node
+- setLabel:(const char *)newLabel;      // send a char* string
+- (const char *)label;
+
+// access to the value of this node
+- setValue:newValue;                    // send a String object
+- (const char *)value;
+
+// clean up our mess
+- free;
+
+// add a new child node
+- addBranch:child;
+
+// Print the tree to a stream (file, whatever).  Call the root with level
+// set to zero, and set the indent string however you like; the indent
+// string should be something like "  " or "\t" to show how to indent to
+// the next level.  This method recursively traverses the tree's children.
+- dumpTree:(NXStream *)file level:(int)lev indent:(const char *)ind;
+
+// set whether or not we print the children (we don't if collapsed)
+// when dumping.  This does NOT affect the tree's width or depth!
+- collapse;
+- uncollapse;
+- (BOOL)collapsed;
+
+// when dumping the tree, if you want to add extra data to the output
+// before the newline and before children are printed, add it here.  If
+// you return NO, then the children won't be printed; this is how the
+// collapse stuff works.
+- (BOOL)moreData:(NXStream *)file level:(int)lev indent:(const char *)ind;
+
+// How deep or wide is the tree?
+- (int) width;
+- (int) depth;
+
+// Return the List object that contains ids of all the kids.
+- branches;
+
+@end
diff -r 4de2936b4e77 -r 0132846995bd pkg-src/tree-nx/Tree.m
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pkg-src/tree-nx/Tree.m	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,148 @@
+//
+//	Tree.m -- a generic class to build tree data structures
+//		This class requires the String class, also by Don Yacktman.
+//		Written by Don Yacktman (c) 1993 by Don Yacktman.
+//				All rights reserved.
+//
+//		You may use and copy this class freely as long as you
+//		comply with the following terms:
+//			(1) If you use this class in an application which you
+//				intend to sell commercially, as shareware, or otherwise,
+//				you may only do so with express written permission
+//				of the author.  Use in applications which will
+//				be distributed free of charge is encouraged.
+//			(2) You must include the source code to this object and
+//				all accompanying documentation with your application,
+//				or provide it to users if requested, free of charge.
+//			(3) Do not remove the author's name or any of the
+//				copyright notices
+//
+
+#import "Tree.h"
+
+@implementation Tree
+
+- init			// special init for this class
+{
+	[self initLabel:""];
+	return self;
+}
+
+- initLabel:(const char *)newLabel
+{
+	[super init];
+	notCollapsed = YES;
+	// set up a list class to hold pointers to other Tree objects (branches).
+	branches = [[List alloc] init];	// make a dynamic-sized array of objects
+	label = [[String alloc] init];	// make a string for the label
+	[label setString:newLabel];
+	return self;
+}
+
+- initLabelString:string	// send in a String object
+{
+	[self init];
+	if (label) [label free];
+	label = string;
+	return self;
+}
+
+- setLabel:(const char *)newLabel
+{
+	[label setString:newLabel];
+	return self;
+}
+
+- setValue:newValue
+{
+	if (value) [value free];
+	value = newValue;
+	return self;
+}
+
+- free			// clean up our mess
+{
+	[branches freeObjects];	// free the branches we're responsible for
+	// (I assumed that each branch only has one parent...if that's not
+	// the case, then the above line should be axed.)
+	[branches free];		// get rid of the List object
+	return [super free];
+}
+
+- addBranch:child	// add a new child node
+{	// add to the end of the "branches" List object
+	return [branches addObject:child];
+}
+
+- dumpTree:(NXStream *)file level:(int)lev indent:(const char *)ind
+{
+	int i; BOOL doKids;
+	
+	for (i=0; i<lev; i++) NXPrintf(file, "%s", ind);	// indent
+	NXPrintf(file, "%s", [label stringValue]);		// and print label
+	doKids = [self moreData:file level:lev indent:ind];
+	NXPrintf(file, "\n");		       			// print newline
+	if (doKids)
+		for (i=0; i<[branches count]; i++)		// then do children
+			[[branches objectAt:i]
+			 dumpTree:file level:(lev + 1) indent:ind];
+	return self;
+}
+
+- (BOOL)moreData:(NXStream *)file level:(int)lev indent:(const char *)ind
+{	// Subclass responsibility -- you can dynamically control collapsing
+	// (for example, cut off at a certain level, etc.) and also add info
+	// to the end of a dumped node's line from here.  Be sure to message
+	// super when you override this method; if this method returns a NO
+	// then you should return a NO, regardless.  Don't just use the
+	// notCollapsed instance var, since it may change in the future; look
+	// at the return value from super!
+	//
+	// Here's how you might override to keep from printing levels deeper
+	// than level 2 (remember that the root level is zero):
+	//
+	// - (BOOL)moreData:(NXStream *)file level:(int)lev indent:(const char *)ind
+	// {
+	//    if ((lev > 2) || ![super moreData:file level:lev indent:ind])
+	//	 return NO;
+	//    return YES;
+	// }
+	//
+	return notCollapsed;
+}
+
+- (int)width
+{
+	int num = [branches count];
+	int i, count = 0;
+	
+	if (!num) return 1;	// No children, so we're only one node wide...
+	
+	// have kids, so sum up their widths.
+	for (i=0; i<num; i++) count += [[branches objectAt:i] width];
+	return count;
+}
+
+- (int)depth
+{
+	int num = [branches count];
+	int i, temp, deepest = 1;
+	
+	if (!num) return 1;	// No children, so only one node deep
+	
+	// have kids, so see which branch is deepest.
+	for (i=0; i<num; i++) {
+		temp = [[branches objectAt:i] depth];
+		if (temp > deepest) deepest = temp;
+	}
+	return (deepest + 1);	// we are one deeper than the deepest child.
+}
+
+- branches { return branches; }
+- collapse { notCollapsed = NO; return self; }
+- uncollapse { notCollapsed = YES; return self; }
+- (BOOL)collapsed { return !notCollapsed; }
+- (const char *)label { return [label stringValue]; }
+- (const char *)value { return [value stringValue]; }
+
+@end
diff -r 4de2936b4e77 -r 0132846995bd pkg-src/tree-nx/Tree.tiff
Binary file pkg-src/tree-nx/Tree.tiff has changed
diff -r 4de2936b4e77 -r 0132846995bd pkg-src/tree-nx/Tree2.tiff
Binary file pkg-src/tree-nx/Tree2.tiff has changed
diff -r 4de2936b4e77 -r 0132846995bd pkg-src/tree-nx/TreeButton.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pkg-src/tree-nx/TreeButton.h	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,41 @@
+//
+//	TreeButton.h -- a class to attach to tree data structures
+//		This class requires the String class, also by Don Yacktman.
+//		Written by Don Yacktman (c) 1993 by Don Yacktman.
+//				All rights reserved.
+//
+//	I doubt this will be useful for much beyond what it does in the demo
+//		program supplied in this directory.
+//
+//		You may use and copy this class freely as long as you
+//		comply with the following terms:
+//			(1) If you use this class in an application which you
+//				intend to sell commercially, as shareware, or otherwise,
+//				you may only do so with express written permission
+//				of the author.  Use in applications which will
+//				be distributed free of charge is encouraged.
+//			(2) You must include the source code to this object and
+//				all accompanying documentation with your application,
+//				or provide it to users if requested, free of charge.
+//			(3) Do not remove the author's name or any of the
+//				copyright notices
+//
+
+#import <appkit/appkit.h> 	// superclass is in there
+#import <stdio.h>
+#import "String.h"
+
+@interface TreeButton:Button
+{
+	id myTreeNode;	// this is the tree node we represent
+}
+
++ initialize;
++ setCellClass:classId;
+- initFrame:(const NXRect *)frameRect;
+- wasSelected:sender;
+- treeNode;
+- setTreeNode:node;
+
+@end
+
diff -r 4de2936b4e77 -r 0132846995bd pkg-src/tree-nx/TreeButton.m
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pkg-src/tree-nx/TreeButton.m	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,67 @@
+//
+//	TreeButton.m -- a class to attach to tree data structures
+//		This class requires the String class, also by Don Yacktman.
+//		Written by Don Yacktman (c) 1993 by Don Yacktman.
+//				All rights reserved.
+//
+//	I doubt this will be useful for much beyond what it does in the demo
+//		program supplied in this directory.
+//
+//		You may use and copy this class freely as long as you
+//		comply with the following terms:
+//			(1) If you use this class in an application which you
+//				intend to sell commercially, as shareware, or otherwise,
+//				you may only do so with express written permission
+//				of the author.  Use in applications which will
+//				be distributed free of charge is encouraged.
+//			(2) You must include the source code to this object and
+//				all accompanying documentation with your application,
+//				or provide it to users if requested, free of charge.
+//			(3) Do not remove the author's name or any of the
+//				copyright notices
+//
+
+#import "TreeButton.h"
+#import "TreeButtonCell.h"
+#import "NamedTree.h"
+
+@implementation TreeButton
+
+static id treeButtonCell;
+
++ initialize
+{
+	if (self == [TreeButton class]) {
+		treeButtonCell = [TreeButtonCell class]; // default cell class
+	}
+	return self;
+}
+
++ setCellClass:classId
+{
+	treeButtonCell = classId;
+	return self;
+}
+
+- initFrame:(const NXRect *)frameRect
+{
+	id oldCell;
+	
+	[super initFrame:frameRect];
+	oldCell = [self setCell:[[[treeButtonCell alloc] init] setParent:self]];
+	[oldCell free];
+	
+	return self;
+}
+
+- wasSelected:sender
+{	// message is sent here by the Cell if the user clicked the button
+	if ([myTreeNode respondsTo:@selector(activateNode:)])
+		[myTreeNode activateNode:self];
+	return self;
+}
+
+- treeNode { return myTreeNode; }
+- setTreeNode:node { myTreeNode = node; return self; }
+
+@end
diff -r 4de2936b4e77 -r 0132846995bd pkg-src/tree-nx/TreeButtonCell.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pkg-src/tree-nx/TreeButtonCell.h	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,15 @@
+
+#import <appkit/appkit.h>
+
+@interface TreeButtonCell:ButtonCell
+{
+	id parent;
+}
+
+- parent;
+- setParent:anObject;
+- (BOOL)trackMouse:(NXEvent *)theEvent
+		inRect:(const NXRect *)cellFrame ofView:aView;
+- performClick:sender;
+
+@end
diff -r 4de2936b4e77 -r 0132846995bd pkg-src/tree-nx/TreeButtonCell.m
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pkg-src/tree-nx/TreeButtonCell.m	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,33 @@
+
+#import "TreeButtonCell.h"
+#import "TreeButton.h"
+
+@implementation TreeButtonCell
+
+- parent { return parent; }
+- setParent:anObject
+{	// anObject should be the parent Control object subclass
+	parent = anObject;
+	return self;
+}
+
+- (BOOL)trackMouse:(NXEvent *)theEvent
+		inRect:(const NXRect *)cellFrame ofView:aView
+{	// this traps the button being selected.
+	BOOL result = [super trackMouse:theEvent inRect:cellFrame ofView:aView];
+	if (result && [parent respondsTo:@selector(wasSelected:)]) {
+		[parent wasSelected:self];
+	}
+	return result;
+}
+
+- performClick:sender
+{
+	[super performClick:sender];
+	if ([parent respondsTo:@selector(wasSelected:)]) {
+		[parent wasSelected:self];
+	}
+	return self;
+}
+
+@end
diff -r 4de2936b4e77 -r 0132846995bd pkg-src/tree-nx/TreeController.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pkg-src/tree-nx/TreeController.h	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,23 @@
+
+#import <appkit/appkit.h>
+
+@interface TreeController:Object
+{
+    id	treeView;
+    id  infoPanel;
+    int nextX, nextY;
+    BOOL first;
+}
+
+- init;
+- info:sender;
+- open:sender;
+- (BOOL)openFile:(const char *)name;
+
+/* Application delegate methods */
+
+- appDidInit:(Application *)sender;
+- (int)app:sender openFile:(const char *)file type:(const char *)type;
+- (BOOL)appAcceptsAnotherFile:sender;
+
+@end
diff -r 4de2936b4e77 -r 0132846995bd pkg-src/tree-nx/TreeController.m
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pkg-src/tree-nx/TreeController.m	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,265 @@
+
+#import <stdio.h>
+
+#import "TreeController.h"
+#import "NamedTree.h"
+#import "TreeView.h"
+
+@implementation TreeController
+
+- appDidInit:(Application *)sender
+{
+  BOOL haveOpenedDocument = NO;	// whether we have opened a document
+
+//  // Gets the public port for SomeApp
+//  port_t  thePort = NXPortFromName("Emacs", NULL); 
+//
+//  if (thePort != PORT_NULL)
+//    // Sets the Speaker to send its next message to SomeApp's port
+//    [[NXApp appSpeaker] setSendPort:thePort]; 
+
+  if (NXArgc > 1)
+  {
+     int i;
+
+     for (i = 1; i < NXArgc; i++)
+     {
+	haveOpenedDocument = [self openFile: NXArgv[i]] || haveOpenedDocument;
+     }
+  }
+
+    return self;
+}
+
+- init
+{
+	[super init];
+    first = YES;
+    nextX = 200;
+    nextY = 600;
+      return self;
+}
+
+- info:sender // bring up the info panel, obviously
+{
+	if(!infoPanel)
+		[NXApp loadNibSection:"InfoPanel.nib" owner:self withNames:NO];
+	return [infoPanel orderFront:sender];
+}
+
+- open:sender
+{	// use open panel to select a file -- only with .tree extension.
+	// only one file may be loaded at a time.
+	const char *const *files;
+	char *file;
+	const char *dir;
+	static const char *const ft[2] = {"tree", NULL};
+
+	id openPanel = [OpenPanel new];
+	[openPanel allowMultipleFiles:NO];
+	if (first) {
+		[openPanel runModalForDirectory:[[NXBundle mainBundle] directory]
+				file:NULL types:ft];
+		first = NO;
+	} else  [openPanel runModalForTypes:ft];
+	files = [openPanel filenames];
+	dir = [openPanel directory];
+	file = malloc(strlen(files[0]) + strlen(dir) + 8);
+	strcpy(file, dir);
+	strcat(file,"/");
+	strcat(file, files[0]);
+	strcat(file, "\0");
+	[self openFile:file];
+	return self;
+}
+
+char nextChar; // This allows me to do single character lookahead in scan
+
+id readToNewline(FILE *file) // used to parse a file; reads until a newline
+{	// returns a string object... reads until EOL to get string value.
+	id newString = [[String alloc] init];
+	char *buffer = (char *)malloc(1024);	// should be plenty big
+	char *spot = buffer;
+
+	while (nextChar != '\n')
+	  {
+	    spot[0] = nextChar; spot++; nextChar = fgetc(file);
+	  }	
+	spot[0] = '\0'; // terminate the string
+	nextChar = fgetc(file);  // Get next char for next invocation of this function
+	[newString setString:buffer];
+	free(buffer);
+	return newString;
+}
+
+char prevChar; // This allows me to do single character lookback in scan
+
+id readToSep(FILE *file) // used to parse a file; reads until a newline or a "^^" sequence
+{	// returns a string object... reads until EOL to get string value.
+	id newString = [[String alloc] init];
+	char *buffer = (char *)malloc(1024);	// should be plenty big
+	char *spot = buffer;
+	int c;
+
+	while (nextChar != '\n')
+	  {
+	    if (nextChar == '^')
+	      if ((c = fgetc(file)) == '^')
+		break;
+	      else
+		ungetc(c, file);
+	    spot[0] = nextChar; spot++; nextChar = fgetc(file);
+	  }	
+	spot[0] = '\0'; // terminate the string
+	prevChar = nextChar;
+	nextChar = fgetc(file);  // Get next char for next invocation of this function
+	[newString setString:buffer];
+	free(buffer);
+	return newString;
+}
+
+// This actually opens a file.  WorkSpace and Open panel methods both
+// eventually get to here to do the real work.  This code is pretty much
+// worth ignoring, unless you _really_ care about how I read in the
+// files.  It's mostly specific to the file format so it's not
+// generally useful.  The framework for this code came from the
+// code in my "Viewer.app" that is in with some PD raytracers I ported
+// to the NeXT--allows viewing an rgb bitmap file; I wrote it before
+// GW and ImageViewer existed...  (See raytracers.tar.Z on sonata/orst)
+- (BOOL)openFile:(const char *)name
+{
+	// id alert;
+	id aString, treeName, rootNode, workingNode, tempNode;
+	id newString, stack = [[List alloc] init];
+	int indLevel, numSpaces, indent = 0;
+	char *tempString;
+	BOOL rStat = YES;
+	FILE *file;
+	// for debugging:
+	//NXStream *out = NXOpenFile(fileno(stdout), NX_WRITEONLY);
+
+	// get a new doc window.
+	[NXApp loadNibSection:"DocWindow.nib" owner:self withNames:NO];
+	[[treeView window] setTitleAsFilename:name];
+	// put up an alert panel to let user know we're busy
+	// alert = NXGetAlertPanel(NULL, "Reading tree and creating image.",
+	//		NULL, NULL, NULL);
+	// [alert makeKeyAndOrderFront:self];
+	// Read the tree file.  NOTE THAT THIS DOES NOT DO ERROR CHECKING.
+	file = fopen(name, "r");
+	nextChar = fgetc(file);	// prime the system
+	treeName = readToNewline(file); // first line is tree's name
+	aString = readToSep(file);	// Get the name of the root node.
+	rootNode = [[[NamedTree alloc]
+			initLabelString:aString] setTreeName:treeName];
+	if (prevChar != '\n')
+	  [rootNode setValue: readToSep(file)];  // Set the node's value.
+	[stack insertObject:rootNode at:0];
+	workingNode = rootNode;
+	// figure out the indentation
+	while (nextChar == ' ') {
+		indent++;
+		nextChar = fgetc(file);
+	}
+	aString = readToSep(file); // get name of child node
+	tempNode = [[[NamedTree alloc]
+			initLabelString:aString] setTreeName:treeName];
+	if (prevChar != '\n')
+	  [tempNode setValue: readToSep(file)];  // Set the node's value.
+	[workingNode addBranch:tempNode];
+	[stack insertObject:tempNode at:0];
+	workingNode = tempNode;
+	// now that we know the file's char's, we read in the other nodes
+	// I use a List object as if it were a stack and push parent nodes on
+	// it while working on children rather than doing a recursive function.
+	// the comments are sparse, just know that it's mostly pushing and
+	// popping from the stack to get at the right parent to add a child to.
+	while (!feof(file)) {
+		aString = readToSep(file); // next node name + indentation.
+		// find out # of indentation spaces and strip them off
+		// *** This gives a warning: ignore it, it's unimportant here.
+		tempString = [aString stringValue]; numSpaces = 0;
+		while (tempString[0] == ' ') {
+			numSpaces++; tempString++;
+		}
+		indLevel = numSpaces / indent;
+		if (indLevel == ([stack count] - 1)) // same level as last object
+		  {
+			[stack removeObjectAt:0];
+			workingNode = [stack objectAt:0];
+			newString = [[String alloc] initString:tempString];
+			[aString free];
+			tempNode = [[[NamedTree alloc]
+					initLabelString:newString] setTreeName:treeName];
+                        if (prevChar != '\n')
+			  [tempNode setValue: readToSep(file)];  // Set the node's value.
+			[workingNode addBranch:tempNode];
+			[stack insertObject:tempNode at:0];
+			workingNode = tempNode;
+		} else if (indLevel == ([stack count])) { // child of last node
+			newString = [[String alloc] initString:tempString];
+			[aString free];
+			tempNode = [[[NamedTree alloc]
+					initLabelString:newString] setTreeName:treeName];
+                        if (prevChar != '\n')
+			  [tempNode setValue: readToSep(file)];  // Set the node's value.
+			[workingNode addBranch:tempNode];
+			[stack insertObject:tempNode at:0];
+			workingNode = tempNode;
+		} else if (indLevel < [stack count]) { // higher level, so pop
+			while (indLevel < [stack count]) { // pop until at right level
+				[stack removeObjectAt:0];
+				workingNode = [stack objectAt:0];
+			} // now add new node since we're at the level
+			newString = [[String alloc] initString:tempString];
+			[aString free];
+			tempNode = [[[NamedTree alloc]
+					initLabelString:newString] setTreeName:treeName];
+                        if (prevChar != '\n')
+			  [tempNode setValue: readToSep(file)];  // Set the node's value.
+			[workingNode addBranch:tempNode];
+			[stack insertObject:tempNode at:0];
+			workingNode = tempNode;
+		} else { // typically, if user goes in two levels at once, which
+			// doesn't make any sense semantically
+			fprintf(stderr, "Error: level too deep!\n");
+			rStat = NO;
+		}
+	}
+	// Debugging code to pretty print the parsed tree.  If this output
+	// is correct, then we know that the parse was OK.
+	//printf("\nHere's the parsed tree:\n");
+	//printf("Tree name:  \"%s\".", [treeName stringValue]);
+	//[rootNode dumpTree:out level:0 indent:"   "];
+	//printf("\n\n");
+	//NXClose(out);
+	// end debug code
+	// rStat = return status of tree reader  YES = success
+	// Now attach the Tree to the TreeView...
+	[treeView attachTree:rootNode];
+	// and now bring up the window for the user
+	[[treeView window] moveTo:nextX :(nextY-218)];
+	// Get rid of the alert
+	// [alert orderOut:self];
+	// [alert free];
+	nextX += 22; nextY -= 25;
+	if (nextX > 370)
+	{
+		nextX = 200; nextY = 600;
+	}
+	[[treeView window] makeKeyAndOrderFront:self];
+	return rStat;
+}
+
+
+// The next two methods allow the WorkSpace to open a .tree file when
+// it is double-clicked.  (Or any file that's cmd-dragged over our icon.)
+
+- (BOOL)appAcceptsAnotherFile:sender { return YES; }
+- (int)app:sender openFile:(const char *)file type:(const char *)type
+{
+	return [self openFile:file];
+}
+
+
+@end
diff -r 4de2936b4e77 -r 0132846995bd pkg-src/tree-nx/TreeView.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pkg-src/tree-nx/TreeView.h	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,42 @@
+
+#import <appkit/appkit.h>
+#import "TreeButton.h"
+
+@interface TreeView:View
+{
+	id currentButton;
+	id lineList;
+	id priorButton;
+	id selectedField;
+	id treeRoot;
+
+	NXCoord currScale;
+	NXCoord origWidth;
+	NXCoord origHeight;
+}
+
+- attachTree:aTree;
+- buildTreeFromNode:aNode bottom:(double)ybot
+		top:(double)ytop atX:(double)xpos parent:(NXPoint *)pos;
+- displayBut:but;
+- displayButByName:sender;
+- drawSelf:(NXRect *)rects :(int)rectCount;  	// standard rendering method
+- getButByName:(const char*)name;
+- initFrame:(const NXRect *)frameRect;
+- scale:sender;
+- setCurrentButton:but;
+- setCurrButtonByName:sender;
+
+@end
+
+/* Color Dragging */
+
+@interface TreeView(Drag)
+
+- registerForDragging;
+- (NXDragOperation)draggingEntered:(id <NXDraggingInfo>)sender;
+- (BOOL)prepareForDragOperation:(id <NXDraggingInfo>)sender;
+- (BOOL)performDragOperation:(id <NXDraggingInfo>)sender;
+- concludeDragOperation:(id <NXDraggingInfo>)sender;
+
+@end
diff -r 4de2936b4e77 -r 0132846995bd pkg-src/tree-nx/TreeView.iconheader
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pkg-src/tree-nx/TreeView.iconheader	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,3 @@
+F	TreeView.app	TreeView	app
+F	TreeView	TreeView	app
+S	tree	TreeView	Tree2
diff -r 4de2936b4e77 -r 0132846995bd pkg-src/tree-nx/TreeView.m
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pkg-src/tree-nx/TreeView.m	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,274 @@
+
+#import "TreeView.h"
+#import "TreeButton.h"
+#import "NamedTree.h"
+#import "Line.h"
+
+// constants to determine how the buttons are laid out
+#define BUTTONWIDTH	155.0
+#define BUTTONHEIGHT	 24.0
+#define VERTSPACING 	  8.0
+#define HORIZSPACING	 40.0
+
+@implementation TreeView
+
+- initFrame:(const NXRect *)frameRect
+{
+  [super initFrame:frameRect];
+  [self setAutosizing:(unsigned int) (NX_WIDTHSIZABLE | NX_HEIGHTSIZABLE)];
+
+  currentButton = nil;
+  lineList = nil;
+  priorButton = nil;
+  [selectedField setNextText: selectedField];
+  [selectedField setPreviousText: selectedField];
+  currScale  = 1.0;
+
+  [self registerForDragging];
+  [self setOpaque:YES];
+
+  return self;
+}
+
+- buildTreeFromNode:aNode bottom:(double)ybot
+		top:(double)ytop atX:(double)xpos parent:(NXPoint *)pos
+{	// add a button representing the node to the View
+	// This method is recursive.
+	NXRect butFrame = {{(xpos + HORIZSPACING),
+			(ybot + (ytop - ybot) / 2 - BUTTONHEIGHT / 2)},
+			{BUTTONWIDTH, BUTTONHEIGHT}};
+	id newButton = [[[TreeButton alloc] initFrame:&butFrame]
+			setTreeNode:aNode];
+	id kid, kids = [aNode branches];
+	int numBranches = [kids count];
+	int i, treeWidth; double diff, accum = ybot;
+	NXPoint myCenter = {(NX_X(&butFrame)),
+			    (NX_Y(&butFrame) + BUTTONHEIGHT / 2)};
+	id newLine;
+	
+	[newButton setTitle:[aNode label]];
+	[self addSubview:newButton];
+	// line to parent:
+	if (pos) {	// NULL if root, so no line
+		NXPoint parentRight = { pos->x + BUTTONWIDTH, pos->y };
+		newLine = [[Line alloc] init];
+		[newLine setStart:&parentRight end:&myCenter];
+		[lineList addObject:newLine];
+	}
+	// now add any children and the lines to them.
+	for (i=numBranches - 1; i >= 0; i--) { // loop isn't entered if no kids.
+		kid = [kids objectAt:i];
+		treeWidth = [kid width];
+		diff = (treeWidth * (BUTTONHEIGHT + VERTSPACING));
+		[self buildTreeFromNode:kid bottom:accum
+				top:(accum + diff + VERTSPACING)
+				atX:(xpos + BUTTONWIDTH + HORIZSPACING)
+				parent:&myCenter];
+		accum += diff;
+	}
+	return self;
+}
+
+- attachTree:aTree
+{
+	int treeWidth = [aTree width];
+	int treeDepth = [aTree depth];
+	double height = (treeWidth * (BUTTONHEIGHT + VERTSPACING) + VERTSPACING);
+	double width  = (treeDepth * (BUTTONWIDTH + HORIZSPACING) + HORIZSPACING);
+	
+	treeRoot = aTree;
+	if (lineList) [[lineList freeObjects] free];
+	lineList = [[List alloc] init];
+	// resize the View to accomodate the Buttons
+	[self sizeTo:width :height];
+	[self buildTreeFromNode:aTree bottom:0.0 top:height atX:0.0 parent:NULL];
+
+	return self;
+}
+
+- drawSelf:(NXRect *)rects :(int)rectCount  	// standard rendering method
+{
+    NXColor color = [[self window] backgroundColor];
+
+    if (NXEqualColor(color, NX_COLORLTGRAY))
+       color = NX_COLORDKGRAY;
+
+    // PSsetgray(NX_DKGRAY);
+    NXSetColor(color);
+    NXRectFill(&bounds);
+    // PSsetgray(NX_BLACK);
+    NXSetColor(NX_COLORBLACK);
+    PSsetlinewidth(2.0);
+
+    [lineList makeObjectsPerform:@selector(render)];
+    [[self subviews] makeObjectsPerform:@selector(display)];
+    return self;
+}
+
+- scale:sender
+{
+  id popUp = [sender window];
+  short index = [popUp indexOfItem:[popUp selectedItem]];
+  //                   25%   50%  75%  100%  125%  150%  200%  SizeToFit
+  //                   0     1      2     3     4     5     6    7
+  float factors[] = {0.25,  0.50, 0.75,  1.0, 1.25, 1.50, 2.0, 0.20};
+  NXPoint center;
+  NXCoord scale = factors[index];
+
+  // Initialize width and height bounds when view is not scaled.
+  if (currScale == 1.0)
+    {
+      origWidth = NX_WIDTH(&bounds);
+      origHeight = NX_HEIGHT(&bounds);
+    }
+
+  // Remember the center to we can reset it after the scaling.
+  center.x = NX_X(&bounds) + NX_WIDTH(&bounds) / 2;
+  center.y = NX_Y(&bounds) + NX_HEIGHT(&bounds) / 2;
+
+  // Scale the view to its new size
+  if (index == 3) // 100% (Normal Size)
+    {
+     [self setDrawSize:origWidth :origHeight];
+     currScale  = 1.0;
+    }
+  else
+    {
+      currScale *= scale;
+      [self setDrawSize:NX_WIDTH(&bounds) / currScale
+                       :NX_HEIGHT(&bounds) / currScale];
+    }
+
+  // Reset the center point
+  [self setDrawOrigin:center.x - NX_WIDTH(&bounds) / 2
+	 	     :center.y - NX_HEIGHT(&bounds) / 2];
+
+  // Ensure that selected button, if any, is visible.
+  [self displayBut:currentButton];
+
+  [self update];
+
+  return self;
+}
+
+- setCurrentButton:but
+{
+  if (but)
+    {
+      priorButton = currentButton;
+      if (priorButton)
+	{
+	  [priorButton setType:NX_MOMENTARYPUSH];
+	  [priorButton setState:0];
+	}
+      currentButton = but;
+      [currentButton setType:NX_ONOFF]; [currentButton setState:1];
+      // [selectedField setStringValueNoCopy: [but title]];
+    }
+  return but;
+}
+
+- setCurrButtonByName:sender
+{
+  id currBut = [self getButByName:[sender stringValue]];
+
+  [self displayBut:[self setCurrentButton:currBut]];
+  [treeRoot act:currBut];
+  return currBut;
+}
+
+- getButByName:(const char*)name
+{
+  id butList = [self subviews];
+  id but = nil;
+  id currBut = nil;
+  int i = 0;
+
+  while (!currBut && (but = [butList objectAt:i++]))
+    {
+      if (!strcmp([but title], name))
+	currBut = but;
+    }
+  return currBut;
+}
+
+- displayButByName:sender
+{
+  id but = [self getButByName:[sender stringValue]];
+
+  if (but)
+    [self displayBut:but];
+  return but;
+}
+
+- displayBut:but
+{
+  NXRect butRect;
+
+  if (but)
+    {
+      [[but getBounds:&butRect] convertRectToSuperview:&butRect];
+      [self scrollRectToVisible:&butRect];
+    }
+  return self;
+}
+
+@end
+
+
+
+// Color dragging support
+
+BOOL includesType(const NXAtom *types, NXAtom type)
+{
+    if (types)
+      while (*types)
+	if (*types++ == type)
+	  return YES;
+    return NO;
+}
+
+@implementation TreeView(Drag)
+
+- registerForDragging
+{
+ [self registerForDraggedTypes:&NXColorPboardType count:1];
+ return self;
+}
+
+- (NXDragOperation)draggingEntered:(id <NXDraggingInfo>)sender
+{
+  NXDragOperation sourceMask = [sender draggingSourceOperationMask];
+  Pasteboard *pboard = [sender draggingPasteboard];
+
+  return ((includesType([pboard types], NXColorPboardType))
+	   ? NX_DragOperationGeneric : NX_DragOperationNone);
+}
+
+- (BOOL)prepareForDragOperation:(id <NXDraggingInfo>)sender
+{
+  return YES;
+}
+
+- (BOOL)performDragOperation:(id <NXDraggingInfo>)sender
+{
+    Pasteboard *pboard = [sender draggingPasteboard];
+
+    if (includesType([pboard types], NXColorPboardType))
+      {
+	NXColor color = NXReadColorFromPasteboard(pboard);
+	[[self window] setBackgroundColor:color];
+	[self display];  // reflect color change
+	return YES;
+      }
+    else
+      return NO;
+}
+
+- concludeDragOperation:(id <NXDraggingInfo>)sender
+{
+  // Return value ignored.
+  return nil;
+}
+
+@end
diff -r 4de2936b4e77 -r 0132846995bd pkg-src/tree-nx/TreeView_main.m
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pkg-src/tree-nx/TreeView_main.m	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,15 @@
+/* Generated by the NeXT Project Builder 
+   NOTE: Do NOT change this file -- Project Builder maintains it.
+*/
+
+#import <appkit/Application.h>
+
+void main(int argc, char *argv[]) {
+
+    [Application new];
+    if ([NXApp loadNibSection:"TreeView.nib" owner:NXApp withNames:NO])
+	    [NXApp run];
+	    
+    [NXApp free];
+    exit(0);
+}
diff -r 4de2936b4e77 -r 0132846995bd pkg-src/tree-x/BUGS
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pkg-src/tree-x/BUGS	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,11 @@
+From: Torgeir Veimo <torgeir@ii.uib.no>
+Subject: Unresolved issues with the X OO-Browser.
+Date: Fri, 03 Mar 1995 19:21:03 +0100
+
+Saving to a file does not work properly, and the save option on the tree menu
+isn't set unsensitive when asked to, but these operations are not used
+by the OO-Browser.
+
+--
+Torgeir @ http://www.ii.uib.no/~torgeir/
+
diff -r 4de2936b4e77 -r 0132846995bd pkg-src/tree-x/Makefile
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pkg-src/tree-x/Makefile	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,94 @@
+#
+# SUMMARY:      Makefile for the OO-Browser
+#
+# AUTHOR:       Bob Weiner / Mark Stern
+# ORG:          InfoDock Associates / Brown U.
+#
+# ORIG-DATE:    15-Oct-90
+# LAST-MOD:     19-Oct-96 at 00:53:29 by Bob Weiner
+#
+# Copyright (C) 1990-1996  Free Software Foundation, Inc.
+# See the file BR-COPY for license information.
+#
+# This file is part of the OO-Browser.
+
+# If the usleep () system call exists on your system, uncomment the following line.
+DEFINES         = -DHAVE_USLEEP
+
+# Root directory of your X distribution.  Note how this is used in succeeding
+# variables.
+XROOT           = /usr/X11
+LD_LIBRARY_PATH = $(XROOT)/lib
+INCLUDEDIRS     = -I$(XROOT)/include
+LIBDIRS         = -L$(XROOT)/lib
+
+# Use this for the standard Athena widgets.
+XAW = -lXaw
+# Use this instead for the 3D Athena widget library.
+XAW3D = -lXaw3d
+# Set this to one of the 2 above variable names.
+DEFXAW = XAW
+# Set this to one of the 2 above variable values.
+LIBXAW = $(XAW)
+
+# C compiler
+CC		= gcc
+# Compiler flags
+CFLAGS		= -g -O $(INCLUDEDIRS) $(DEFINES) -D$(DEFXAW)
+
+#   Set XVERSION to the proper relase of X11 for your system.
+#   Use X11R5 if you system is not on X11R6 or above.
+X11R5 = 
+X11R6 = -lSM -lICE
+XVERSION = $(X11R6)
+
+#   X11 libraries used by all system configurations.
+XCOMMON = -lXmu -lXt -lX11 -lXext
+
+#   This is used for static linking on a generic platform such as SunOS 4.
+LD_STATIC   	 = -static $(LIBDIRS) $(LIBXAW) $(XCOMMON) $(XVERSION)
+#   This is used for dynamic linking under Solaris.
+LD_SOLARIS       = $(LIBDIRS) $(LIBXAW) $(XCOMMON) -lsocket $(XVERSION)
+#   This is used for dynamic linking under Linux.
+LD_LINUX         = $(LIBDIRS) $(LIBXAW) $(XCOMMON) $(XVERSION)
+
+# Set this to be the directory in which to install the X OO-Browser
+# executable.  This should be a directory in all users' search paths or the
+# value of the Emacs variable, exec-directory.
+# Use 'make install' to install the binary.
+BINDIR          = /home/infodock/lib-bin-linux-elf
+
+NAME		= xoobr
+C_FILES 	= draw.c tree.c input.c dissolve.c dbl.c intf.c usleep.c
+O_FILES		= draw.o tree.o input.o dissolve.o dbl.o intf.o usleep.o
+INC_FILES	= defs.h tree.h input.h dissolve.h dbl.h rsrc.h intf.h help.h
+SRC_FILES	= $(INC_FILES) $(C_FILES)
+
+$(NAME):	linux
+
+static:		$(O_FILES)
+		$(CC) $(CFLAGS) -o $(NAME) $(O_FILES) $(LD_STATIC)
+
+solaris:	$(O_FILES)
+		$(CC) $(CFLAGS) -DSYSV -o $(NAME) $(O_FILES) $(LD_SOLARIS)
+
+linux:		$(O_FILES)
+		$(CC) $(CFLAGS) -o $(NAME) $(O_FILES) $(LD_LINUX)
+
+
+install:	$(NAME)
+		chmod 755 $(NAME)
+		mv $(NAME) $(BINDIR)/$(NAME)
+
+clean:
+		rm -f *.o *.orig *.rej $(NAME) core *~
+
+size:
+		wc $(SRC_FILES)
+
+dbl.o: 		dbl.h 
+dissolve.o:	dissolve.h
+draw.o: 	defs.h tree.h dbl.h intf.h
+input.o: 	defs.h tree.h input.h
+intf.o: 	defs.h tree.h dbl.h intf.h rsrc.h input.h help.h
+tree.o: 	defs.h tree.h intf.h
diff -r 4de2936b4e77 -r 0132846995bd pkg-src/tree-x/OOBR
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pkg-src/tree-x/OOBR	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,48 @@
+
+(setq
+br-env-version
+"02.09.11"
+
+br-sys-search-dirs
+'(".")
+
+br-lib-search-dirs
+'nil
+
+br-lang-prefix
+'"c++-"
+
+br-env-spec
+'nil
+
+br-children-alist
+'(
+)
+
+br-sys-paths-alist
+'(
+(("line" "tnode") . "/home/infodock/lisp/oobr/tree-x/tree.h")
+(("[constant]" "[enumeration]" "[function]" "[macro]" "[structure]" "[type]" "[union]") . "<none>")
+)
+
+br-lib-paths-alist
+'(
+)
+
+br-sys-parents-alist
+'(
+(nil . "[union]")
+(nil . "[type]")
+(nil . "[structure]")
+(nil . "[macro]")
+(nil . "[function]")
+(nil . "[enumeration]")
+(nil . "[constant]")
+(nil . "line")
+(nil . "tnode")
+)
+
+br-lib-parents-alist
+'(
+)
+)
diff -r 4de2936b4e77 -r 0132846995bd pkg-src/tree-x/OOBR-FTR
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pkg-src/tree-x/OOBR-FTR	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,25 @@
+
+/home/infodock/lisp/oobr/tree-x/draw.c
+[function]@- BeginFrame@void BeginFrame() {
+[function]@- EndFrame@void EndFrame() {
+
+/home/infodock/lisp/oobr/tree-x/intf.c
+[function]@- Pause@void Pause() {
+[function]@- UserEventLoop@void UserEventLoop() {
+
+/home/infodock/lisp/oobr/tree-x/tree.c
+[function]@- MakeNode@Tree* MakeNode() {
+
+/home/infodock/lisp/oobr/tree-x/usleep.c
+[function]@- usleep@int usleep( unsigned long int microSeconds ) {
+
+/home/infodock/lisp/oobr/tree-x/intf.c
+#defi@- GLOBALS@#define GLOBALS
+#defi@- gray_width@#define gray_width
+#defi@- gray_height@#define gray_height
+#defi@- check_width@#define check_width
+#defi@- check_height@#define check_height
+#defi@- slider_pixmap_width@#define slider_pixmap_width
+#defi@- slider_pixmap_height@#define slider_pixmap_height
+#defi@- shell_tra@#define shell_translations
+
diff -r 4de2936b4e77 -r 0132846995bd pkg-src/tree-x/README
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pkg-src/tree-x/README	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,10 @@
+This is the source code for the X interface to the OO-Browser.
+Mark Stern wrote the original version of the program as a tree browser, for a
+class in 1990, while at Brown University.
+
+Bob Weiner adapted the program for use as the X OO-Browser.  He
+and Torgeir Veimo maintain the current version.
+
+Send comments and issues to the mail list, <oo-browser@infodock.com>.
+
+The program is freely redistributable.
diff -r 4de2936b4e77 -r 0132846995bd pkg-src/tree-x/TREE.c++
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pkg-src/tree-x/TREE.c++	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,86 @@
+^^c++-^^/usr1/dingus/weiner/projs/oobr/samples-c++/templates/OOBR
+NO-ROOT
+  ConstPtrList<T>
+    +ConstPtrList^^ConstPtrList<T>@+ ConstPtrList@ConstPtrList(const ConstPtrList<T> &) : List<__AnyConstPtr>() {
+    +ConstPtrList^^ConstPtrList<T>@+ ConstPtrList@ConstPtrList(long size) : List<__AnyConstPtr>(size) {
+    +ConstPtrList^^ConstPtrList<T>@+ ConstPtrList@ConstPtrList() : List<__AnyConstPtr>() {
+    -append^^ConstPtrList<T>@- append@void append(const ConstPtrList<T>& list) {
+    -append^^ConstPtrList<T>@- append@void append(const T* item) {
+    -count^^ConstPtrList<T>@- count@long count() const {
+    -insert^^ConstPtrList<T>@- insert@void insert(long index, const ConstPtrList<T>& list) {
+    -insert^^ConstPtrList<T>@- insert@void insert(long index, const T* item) {
+    -item^^ConstPtrList<T>@- item@const T* item(long index) const {
+    -operator =^^ConstPtrList<T>@- operator =@ConstPtrList<T>& operator = (const ConstPtrList<T>& l) {
+    -prepend^^ConstPtrList<T>@- prepend@void prepend(const ConstPtrList<T>& list) {
+    -prepend^^ConstPtrList<T>@- prepend@void prepend(const T* item) {
+    -remove^^ConstPtrList<T>@- remove@void remove(long index) {
+    -remove_all^^ConstPtrList<T>@- remove_all@void remove_all() {
+  ConstPtrListItr<T>
+    +ConstPtrListItr^^ConstPtrListItr<T>@+ ConstPtrListItr@ConstPtrListItr(const ConstPtrList<T>& l) : ListItr<__AnyConstPtr>(l) {
+    -cur^^ConstPtrListItr<T>@- cur@const T* cur() const {
+    -more^^ConstPtrListItr<T>@- more@boolean more() const {
+    -next^^ConstPtrListItr<T>@- next@void next() {
+  ConstPtrListUpdater<T>
+    +ConstPtrListUpdater^^ConstPtrListUpdater<T>@+ ConstPtrListUpdater@ConstPtrListUpdater(ConstPtrList<T>& l) : ListUpdater<__AnyConstPtr>(l) {
+    -cur^^ConstPtrListUpdater<T>@- cur@const T* cur() const {
+    -more^^ConstPtrListUpdater<T>@- more@boolean more() const {
+    -next^^ConstPtrListUpdater<T>@- next@void next() {
+    -remove_cur^^ConstPtrListUpdater<T>@- remove_cur@void remove_cur() {
+  List<T>
+    +List^^List<T>@+ List@template <class T> List<T>::List(const List<T> &l) {
+    +List^^List<T>@+ List@template <class T> List<T>::List() {
+    +List^^List<T>@+ List@template <class T> List<T>::List(long size) {
+    -append^^List<T>@- append@void append(const List<T>& list) {
+    -append^^List<T>@- append@void append(const T& item) {
+    -copy^^List<T>@- copy@template <class T> void List<T>::copy(const List<T> &l) {
+    -count^^List<T>@- count@long count() const {
+    -insert^^List<T>@- insert@template <class T> void List<T>::insert(long index, const List<T>& list) {
+    -insert^^List<T>@- insert@template <class T> void List<T>::insert(long index, const T& item) {
+    -item^^List<T>@- item@T item(long index) const {
+    -item_ref^^List<T>@- item_ref@T& item_ref(long index) const{
+    -operator =^^List<T>@- operator =@template <class T> List<T>& List<T>::operator = (const List<T> &l) {
+    -prepend^^List<T>@- prepend@void prepend(const List<T>& list) {
+    -prepend^^List<T>@- prepend@void prepend(const T& item) {
+    -remove^^List<T>@- remove@template <class T> void List<T>::remove(long index) {
+    -remove_all^^List<T>@- remove_all@template <class T> void List<T>::remove_all() {
+    +~List^^List<T>@+ ~List@template <class T> List<T>::~List() {
+  ListItr<T>
+    +ListItr^^ListItr<T>@+ ListItr@template <class T> ListItr<T>::ListItr(const List<T>& list) {
+    -cur^^ListItr<T>@- cur@T cur() const {
+    -cur_ref^^ListItr<T>@- cur_ref@T& cur_ref() const {
+    -more^^ListItr<T>@- more@boolean more() const {
+    -next^^ListItr<T>@- next@void next() {
+  ListUpdater<T>
+    +ListUpdater^^ListUpdater<T>@+ ListUpdater@template <class T> ListUpdater<T>::ListUpdater(List<T>& list) {
+    -cur^^ListUpdater<T>@- cur@T cur() const {
+    -cur_ref^^ListUpdater<T>@- cur_ref@T& cur_ref() const {
+    -more^^ListUpdater<T>@- more@boolean more() const {
+    -next^^ListUpdater<T>@- next@void next() {
+    -remove_cur^^ListUpdater<T>@- remove_cur@void remove_cur() {
+  PtrList<T>
+    +PtrList^^PtrList<T>@+ PtrList@PtrList(const PtrList<T> &) : List<__AnyPtr>() {
+    +PtrList^^PtrList<T>@+ PtrList@PtrList(long size) : List<__AnyPtr>(size) {
+    +PtrList^^PtrList<T>@+ PtrList@PtrList() : List<__AnyPtr>() {
+    -append^^PtrList<T>@- append@void append(const PtrList<T>& list) {
+    -append^^PtrList<T>@- append@void append(T* item) {
+    -count^^PtrList<T>@- count@long count() const {
+    -insert^^PtrList<T>@- insert@void insert(long index, const PtrList<T>& list) {
+    -insert^^PtrList<T>@- insert@void insert(long index, T* item) {
+    -item^^PtrList<T>@- item@T* item(long index) const {
+    -item_ref^^PtrList<T>@- item_ref@T*& item_ref(long index) const {
+    -operator =^^PtrList<T>@- operator =@PtrList<T>& operator = (const PtrList<T>& l) {
+    -prepend^^PtrList<T>@- prepend@void prepend(const PtrList<T>& list) {
+    -prepend^^PtrList<T>@- prepend@void prepend(T* item) {
+    -remove^^PtrList<T>@- remove@void remove(long index) {
+    -remove_all^^PtrList<T>@- remove_all@void remove_all() {
+  PtrListItr<T>
+    +PtrListItr^^PtrListItr<T>@+ PtrListItr@PtrListItr(const PtrList<T>& l) : ListItr<__AnyPtr>(l) {
+    -cur^^PtrListItr<T>@- cur@T* cur() const {
+    -more^^PtrListItr<T>@- more@boolean more() const {
+    -next^^PtrListItr<T>@- next@void next() {
+  PtrListUpdater<T>
+    +PtrListUpdater^^PtrListUpdater<T>@+ PtrListUpdater@PtrListUpdater(PtrList<T>& l) : ListUpdater<__AnyPtr>(l) {
+    -cur^^PtrListUpdater<T>@- cur@T* cur() const {
+    -more^^PtrListUpdater<T>@- more@boolean more() const {
+    -next^^PtrListUpdater<T>@- next@void next() {
+    -remove_cur^^PtrListUpdater<T>@- remove_cur@void remove_cur() {
diff -r 4de2936b4e77 -r 0132846995bd pkg-src/tree-x/TREE.objc
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pkg-src/tree-x/TREE.objc	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,4 @@
+^^objc-^^/usr/home/samples-objc/gnu-libobjects/OOBR
+BinaryTreeNode
+  @<BinaryTreeComprising>^^BinaryTreeNode@@ <BinaryTreeComprising>@<BinaryTreeComprising>
+  @<Coding>^^BinaryTreeNode@@ <Coding>@<Coding>
diff -r 4de2936b4e77 -r 0132846995bd pkg-src/tree-x/Xoobr-color.ad
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pkg-src/tree-x/Xoobr-color.ad	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,92 @@
+! Generic athena widget font selection
+
+*Text.Font:			-*-lucidatypewriter-medium-r-*-*-12-*-*-*-*-*-iso8859-1
+*Label.Font:			-*-helvetica-medium-r-*-*-12-*-*-*-*-*-iso8859-1
+*Command.Font:			-*-helvetica-bold-r-*-*-12-*-*-*-*-*-iso8859-1
+*SimpleMenu.Font:		-*-helvetica-bold-r-*-*-12-*-*-*-*-*-iso8859-1
+*SmeBSB.Font:			-*-helvetica-bold-r-*-*-12-*-*-*-*-*-iso8859-1
+*MenuButton.Font:		-*-helvetica-bold-r-*-*-12-*-*-*-*-*-iso8859-1
+*List.Font:			-*-helvetica-bold-r-*-*-12-*-*-*-*-*-iso8859-1
+
+! Menu Button Labels
+
+*treeMenuBtn.label:			Tree
+*layoutMenuBtn.label:			Layout
+*helpBtn.label:				Help...
+
+! Menu Entry Labels
+
+*treeMenu*treeMenuNew.label:		New Tree
+*treeMenu*treeMenuLoad.label:		Load Tree
+*treeMenu*treeMenuSave.label:		Save Tree
+*treeMenu*treeMenuQuit.label:		Quit
+
+*layoutMenu*layoutMenuSpacing.label:	Layout Spacing...
+*layoutMenu*layoutMenuAlignNodes.label:	Align Nodes on Level
+
+! Dialog (Button) Labels
+
+*dlgNewTree.title:			New Tree
+*dlgNodeName.title:			Node Name
+*dlgInfo.title:				Information
+*dlgError.title:			Error!
+*dlgSpacing.title:			Tree Node Spacing
+*helpShell.title:			Help
+
+*dlgNewTreeForm.label:			Enter name of root node:
+*dlgNodeNameForm.label:			Enter name of new node:
+*dlgFileForm.label:			Enter name of file:
+*dlgInfoForm.label:			Information:
+*dlgErrorForm.label:			Error:
+*dlgSpacing.label:			Spacing Dialog
+*dlgLevelLabel.label:			Level spacing:
+*dlgSiblingLabel.label:			Sibling spacing:
+*dlgLevelValuator.width:		40
+*dlgLevelValuator.width:		40
+
+
+*dlgNewTreeOk.label:			Ok
+*dlgNewTreeCancel.label:		Cancel
+*dlgFileOk.label:			Ok
+*dlgFileCancel.label:			Cancel
+*dlgInfoButton.label:			Acknowledged
+*dlgErrorButton.label:			Acknowledged
+*dlgOkButton.label:			Ok
+*dlgCancelButton.label:			Cancel
+*dlgNodeNameOk.label:			Ok
+*dlgNodeNameCancel.label:		Cancel
+
+*helpDoneButton.label:			Dismiss
+*helpTitle.label:			Help for Drawing Dynamic Trees
+
+*statusText.width:			310
+*treeDrawingArea.width:			310
+*treeDrawingArea.height:		400
+*treeDrawingArea.Translations: #override \n\
+                                <Btn1Down>:	node_select(EDIT)\n\
+                                <Btn2Down>:	node_select(VIEW)\n\
+                                <Btn3Down>:	XawPositionSimpleMenu(nodeMenu)node_menu_prepare()XtMenuPopup(nodeMenu)\n
+!                                <Btn3Down>:	XawPositionSimpleMenu(nodeMenu)node_menu_prepare()maybe_menu_popup(nodeMenu)\n
+	
+
+
+! Color Specifications
+
+Xoobr*backgroundColor: 			gray90
+!Xoobr*treeColor:       		lightyellow
+!Xoobr*contourColor:    		black
+!Xoobr*splitColor:      		green
+!Xoobr*highlightColor:  		red
+
+*Paned.background:			gray
+*Box.background:			gray
+*Form.background:			gray
+*Dialog.background:			gray
+*Label.background:			gray
+*Panner.background:			gray
+*Panner.foreground:			gray50
+*Scrollbar.background:			gray
+*Viewport.background:			gray
+*MenuButton.background:			lightgrey
+*SimpleMenu.background:			lightgrey
+*Command.background:			lightgrey
\ No newline at end of file
diff -r 4de2936b4e77 -r 0132846995bd pkg-src/tree-x/Xoobr.ad
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pkg-src/tree-x/Xoobr.ad	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,71 @@
+! Generic athena widget font selection
+
+*Text.Font:			-*-lucidatypewriter-medium-r-*-*-12-*-*-*-*-*-iso8859-1
+*Label.Font:			-*-helvetica-medium-r-*-*-12-*-*-*-*-*-iso8859-1
+*Command.Font:			-*-helvetica-bold-r-*-*-12-*-*-*-*-*-iso8859-1
+*SimpleMenu.Font:		-*-helvetica-bold-r-*-*-12-*-*-*-*-*-iso8859-1
+*SmeBSB.Font:			-*-helvetica-bold-r-*-*-12-*-*-*-*-*-iso8859-1
+*MenuButton.Font:		-*-helvetica-bold-r-*-*-12-*-*-*-*-*-iso8859-1
+*List.Font:			-*-helvetica-bold-r-*-*-12-*-*-*-*-*-iso8859-1
+
+! Menu Button Labels
+
+*treeMenuBtn.label:			Tree
+*layoutMenuBtn.label:			Layout
+*helpBtn.label:				Help...
+
+! Menu Entry Labels
+
+*treeMenu*treeMenuNew.label:		New Tree
+*treeMenu*treeMenuLoad.label:		Load Tree
+*treeMenu*treeMenuSave.label:		Save Tree
+*treeMenu*treeMenuQuit.label:		Quit
+
+*layoutMenu*layoutMenuFixed.label:	Fixed
+*layoutMenu*layoutMenuVariable.label:	Variable
+*layoutMenu*layoutMenuSpacing.label:	Spacing...
+*layoutMenu*layoutMenuAlignNodes.label:	Align Nodes on Level
+
+! Dialog (Button) Labels
+
+*dlgNewTree.title:			New Tree
+*dlgNodeName.title:			Node Name
+*dlgInfo.title:				Information
+*dlgError.title:			Error!
+*dlgSpacing.title:			Tree Node Spacing
+*helpShell.title:			Help
+
+*dlgNewTreeForm.label:			Enter name of root node:
+*dlgNodeNameForm.label:			Enter name of new node:
+*dlgFileForm.label:			Enter name of file:
+*dlgInfoForm.label:			Information:
+*dlgErrorForm.label:			Error:
+*dlgSpacing.label:			Spacing Dialog
+*dlgLevelLabel.label:			Level spacing:
+*dlgSiblingLabel.label:			Sibling spacing:
+*dlgLevelValuator.width:		40
+*dlgLevelValuator.width:		40
+
+
+*dlgNewTreeOk.label:			Ok
+*dlgNewTreeCancel.label:		Cancel
+*dlgFileOk.label:			Ok
+*dlgFileCancel.label:			Cancel
+*dlgInfoButton.label:			Acknowledged
+*dlgErrorButton.label:			Acknowledged
+*dlgOkButton.label:			Ok
+*dlgCancelButton.label:			Cancel
+*dlgNodeNameOk.label:			Ok
+*dlgNodeNameCancel.label:		Cancel
+
+*helpDoneButton.label:			Dismiss
+*helpTitle.label:			Help for Drawing Dynamic Trees
+
+*statusText.width:			310
+*treeDrawingArea.width:			310
+*treeDrawingArea.height:		400
+*treeDrawingArea.Translations: #override \n\
+                                <Btn1Down>:	node_select(EDIT)\n\
+                                <Btn2Down>:	node_select(VIEW)\n\
+                                <Btn3Down>:	XawPositionSimpleMenu(nodeMenu)node_menu_prepare()XtMenuPopup(nodeMenu)\n
+!                                <Btn3Down>:	XawPositionSimpleMenu(nodeMenu)node_menu_prepare()maybe_menu_popup(nodeMenu)\n
diff -r 4de2936b4e77 -r 0132846995bd pkg-src/tree-x/dbl.c
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pkg-src/tree-x/dbl.c	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,377 @@
+/* ----------------------------------------------------------------------------
+ *     Double buffering code
+ * ----------------------------------------------------------------------------
+ */
+
+
+#include "dbl.h"
+
+struct {                                               
+    unsigned short red;                                        
+    unsigned short green;
+    unsigned short blue;
+} color[] = {
+    { 65280, 65280, 65280 }, /* white  */                      
+    {     0,     0, 65280 }, /* blue   */
+    {     0, 65280,     0 }, /* green  */
+    { 65280,     0,     0 }, /* red    */
+    { 42240, 10752, 10752 }, /* brown  */
+    { 65280, 32512,     0 }, /* orange */
+    { 32512, 32512, 32512 }, /* gray   */
+    {     0,     0,     0 }  /* black  */
+};                       
+
+/* ------------------------------------------------------------------------- */
+
+DoubleBuffer *
+DBLcreate_double_buffer (display, window, backing_store, colors, num_colors)
+   Display *display;
+   Window   window;
+   int      backing_store;
+   XColor  *colors;
+   int      num_colors;
+{                                                                
+   int i, j, k, l, m, offset, mask, size;
+   int max_planes;
+
+   char         *string;
+   Surface     *surface;
+   DoubleBuffer     *db;
+   XGCValues       xgcv;
+   unsigned long   xgcvmask;
+
+/* allocate the double buffer structure,  and then open the display */
+
+   if ((db = (DoubleBuffer *)calloc(1, sizeof(DoubleBuffer))) == 0) {
+      printf("DBLopen_double_buffer : memory allocation error\n");
+      return (NULL);
+   }                                                          
+
+/* note the display */
+
+   db->display  = display;
+
+/* first some information about our display */
+
+   db->screen   = DefaultScreenOfDisplay(db->display);
+   db->window   = window;
+
+/* now get some information on color resources */
+
+   db->visual   = DefaultVisualOfScreen(db->screen);
+   db->depth    = DefaultDepthOfScreen(db->screen);
+   db->colormap = DefaultColormapOfScreen(db->screen);
+
+/* set up colors */
+
+   for (i = 0 ; i < num_colors; i++) {
+      color[i].red   = colors[i].red;
+      color[i].green = colors[i].green;
+      color[i].blue  = colors[i].blue;
+   }
+   
+/* see if the user wanted to limit the number of planes used
+   then see how many are available,  make it a multiple of 2 */
+
+   if ((string = getenv("DBL_MAX_PLANES")) == NULL)
+      max_planes = DBL_MAX_PLANES;
+   else {
+      max_planes = atoi(string);
+   }
+
+   if ((db->num_planes = PlanesOfScreen(db->screen)) > max_planes) {
+      db->num_planes = max_planes;
+   }
+
+   db->num_planes = (db->num_planes >> 1) << 1;
+
+
+/* otherwise allocate contiguous planes to do double buffering */
+
+   while (db->num_planes >= DBL_MIN_PLANES) {
+      if (XAllocColorCells (db->display, db->colormap, 1, db->planes,
+			    db->num_planes, db->pixels, 1)) {
+	 break;
+      }
+
+      db->num_planes -= 2;
+   }
+
+/* if we have at least minimum planes, then we can do double
+   buffering and we want to setup our surfaces and colormaps */
+
+   if (db->num_planes < DBL_MIN_PLANES)
+      db->num_surfaces = 0;
+   else {
+      db->num_colors   = 1 << (db->num_planes >> 1);
+      db->num_surfaces = DBL_MAX_SURFACES;
+
+   /* if the number of colors is less than DBL_MAX_COLORS,
+      then we want to make sure black is the  last  color */
+
+      for (i = db->num_colors - 1; i < DBL_MAX_COLORS; i++) {
+         color[i].red   = color[DBL_MAX_COLORS - 1].red;
+         color[i].green = color[DBL_MAX_COLORS - 1].green;
+         color[i].blue  = color[DBL_MAX_COLORS - 1].blue;
+      }
+
+   /* we have a set of contiguous planes.  compute a mask for
+      the planes,  and figure out the offset in the  hardware */
+
+      for (i = 0; i < db->num_planes; i++) {
+         db->mask |= db->planes[i];
+      }
+
+      mask   = db->mask;
+      offset = 0;
+
+      while ((mask & 1) == 0) {
+         mask = mask >> 1;
+         offset = offset + 1;
+      }
+
+      mask = (1 << (db->num_planes >> 1)) - 1;                             
+
+   /* now create the surfaces that will contain plane mask and
+      colormap information that we use to do double  buffering */
+
+      for (i = 0; i < db->num_surfaces; i++) {
+         size = sizeof(Surface) + sizeof(XColor) * (1 << db->num_planes);
+
+         if ((surface = (Surface *)malloc(size)) != NULL)
+            db->surface[i] = surface;
+         else {
+            printf("DBLcreate_double_buffer : memory allocation error\n");
+            DBLdelete_double_buffer(db);
+            return(NULL);
+         }
+
+         surface->offset     = offset + i * (db->num_planes >> 1);
+         surface->mask       = mask << surface->offset;
+         surface->num_colors = 1 << db->num_planes;
+  
+      /* compute our pixel values by taking every permutation
+         of the pixel and planes returned by XAllocColorCells */
+
+         for (j = 0; j < (surface->num_colors); j++) {
+            surface->color[j].pixel = db->pixels[0];
+         }
+
+         for (j = 0; j < db->num_planes; j++) {
+            for (k = (1 << j); k < (surface->num_colors); k += (2 << j)) {
+               for (l = k; l < (k + (1 << j)); l++) {                  
+                  surface->color[l].pixel |= db->planes[j];
+               }
+            }
+         }
+
+       /* now populate those pixels with the proper  colors  so             
+          that we can do animation by banging in a new colormap */
+
+         for (j = 0; j < surface->num_colors; j++) {
+            k = (j & surface->mask) >> surface->offset;
+
+            surface->color[j].red   = color[k].red;                 
+            surface->color[j].green = color[k].green;
+            surface->color[j].blue  = color[k].blue;
+
+            surface->color[j].flags = DoRed | DoGreen | DoBlue;
+         }
+      }
+
+      db->current_surface = 0;
+   }
+
+
+/* now figure out what pixel values we will use to draw with
+   and store them in the double buffer structure */
+
+   if (db->num_surfaces == 0) {
+      db->num_colors = DBL_MAX_COLORS;
+      db->colors[0]  = WhitePixelOfScreen(db->screen);
+
+      for (i = 1; i < db->num_colors; i++) {
+	 db->colors[i] = BlackPixelOfScreen(db->screen);
+      }
+   }
+   else {
+      for (i = 0; i < db->num_colors; i++) {
+         j = (i << (db->num_planes >> 1)) + i;
+         db->colors[i] = db->surface[0]->color[j].pixel;
+      }
+   }
+
+/* fill out the remaining colors with the last color */
+
+   for (; i < DBL_MAX_COLORS; i++) {
+      db->colors[i] = db->colors[db->num_colors - 1];
+   }
+
+   db->width   = WidthOfScreen(db->screen);
+   db->height  = HeightOfScreen(db->screen);
+
+/* if there are no surfaces then we are doing animation with
+   a frame buffer,  so create a pixmap as our frame buffer   */
+                         
+   if (db->num_surfaces > 0)
+      db->drawable = db->window;   
+   else {
+      db->frame = XCreatePixmap(db->display, db->window,
+				db->width, db->height, db->depth);
+      db->drawable = db->frame;
+   }                                                                    
+
+/* if they have requested backing store,  then create an extra
+   pixmap which we can use as backing store to handle exposures */
+
+   if (backing_store) {
+      db->backing = XCreatePixmap(db->display, db->window,
+				  db->width, db->height, db->depth);
+   }                                                   
+
+/*  use the 0 pixel from one of the surfaces for the background */
+
+   xgcv.background = DBLinq_background(db);
+   xgcv.line_style = LineSolid;
+   xgcv.line_width = 0;
+   xgcv.cap_style  = CapButt;
+   xgcv.join_style = JoinRound;
+   xgcvmask = GCBackground | GCLineStyle | GCLineWidth | GCCapStyle | 
+              GCJoinStyle;
+   
+   db->gc = XCreateGC(db->display, db->drawable, xgcvmask, &xgcv);
+
+/* do an initial frame to setup the colormap,  and return */
+
+   DBLbegin_frame(db);
+   DBLend_frame(db, 1);
+   return (db);
+}
+
+/* ------------------------------------------------------------------------- */
+
+void
+DBLdelete_double_buffer (db)
+     DoubleBuffer *db;
+{
+  int i;
+
+  /* remove and and all surfaces that are out there */
+  
+  for (i = 0; i < DBL_MAX_SURFACES; i++) {
+    if (db->surface[i] != 0) {
+      free(db->surface[i]);                               
+    }
+  }
+
+  /* now clean up the various resources used for this double buffer */
+  
+  if (db->frame != 0) {
+    XFreePixmap(db->display, db->frame);
+  }
+  
+  if (db->backing != 0) {
+    XFreePixmap(db->display, db->backing);
+  }
+  
+  /* if we created our own private colormap,  then free the colormap */
+  
+  if (db->colormap != DefaultColormapOfScreen(db->screen)) {
+    XFreeColormap(db->display, db->colormap);
+  }
+  
+  free (db);
+}
+
+/* ------------------------------------------------------------------------- */
+
+unsigned long
+DBLinq_background(db)
+   DoubleBuffer *db;
+{
+   if (db->num_surfaces > 0)
+      return(db->surface[0]->color[0].pixel);
+   else 
+      return(WhitePixelOfScreen(db->screen));
+}
+
+/* ------------------------------------------------------------------------- */
+
+DBLbegin_frame(db)
+     DoubleBuffer *db;
+{
+  Surface   *surface;
+  
+  /* there will be at most two surfaces optimize with "&"*/
+  
+  if (db->num_surfaces > 0) {                       
+    db->current_surface = (db->current_surface + 1) & 1;                  
+    surface = db->surface[db->current_surface];
+  }
+   
+  /* clear the back surface of the window which may actually be a pixmap */ 
+  
+  if (db->num_surfaces > 0) 
+    XSetPlaneMask (db->display, db->gc, surface->mask);
+  
+  /* clear out the back surface or frame buffer as appropriate */
+  
+  XSetFunction(db->display, db->gc, GXclear);
+  XFillRectangle(db->display, db->drawable, db->gc,
+		 0, 0, db->width, db->height);
+  
+  /* set writing mode back to copy */
+  XSetFunction (db->display, db->gc, GXcopy);
+  
+  XSync(db->display, False);
+}  
+         
+
+/* ------------------------------------------------------------------------- */
+                                            
+
+DBLend_frame(db, init)
+     DoubleBuffer *db;                                                   
+     short init;
+{
+  Surface  *surface;
+  
+  /* if there are no drawing surfaces,  then we are doing animation   
+     with a frame buffer, copy the frame buffers to their viewports */
+
+  if (db->num_surfaces == 0) {
+     if (! init)
+        XCopyArea (db->display, db->frame, db->window,
+	           db->gc, 0,0, db->width, db->height, 0,0);
+  } else {
+    
+    /* otherwise,  we can flip the surface by banging in the new colormap */
+
+    XSync(db->display, False);
+    surface = db->surface[db->current_surface];
+    XStoreColors (db->display, db->colormap,
+		  surface->color, surface->num_colors);
+  }
+
+  if (db->backing != 0) {
+    XCopyArea (db->display, db->window, db->backing,
+	       db->gc, 0,0, db->width, db->height, 0,0);
+  }
+  
+  /* make sure this all goes off to the server,  right away */
+  
+  XSync(db->display, False);
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
diff -r 4de2936b4e77 -r 0132846995bd pkg-src/tree-x/dbl.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pkg-src/tree-x/dbl.h	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,66 @@
+/* ----------------------------------------------------------------------------
+ *     Double buffering code
+ * ----------------------------------------------------------------------------
+ */
+
+#include <stdio.h>
+#include <X11/Xlib.h>
+
+#define DBL_MAX_SURFACES 2
+#define DBL_MIN_PLANES   2
+#define DBL_MAX_PLANES   6
+#define DBL_MAX_COLORS   (1 << (DBL_MAX_PLANES >> 1))
+
+typedef struct _surface {
+    int	         mask;          /* mask to use this surface           */
+    int	       offset;          /* offset within colormap             */
+    int	   num_colors;          /* number of colors in color array    */
+    XColor   color[1];          /* the actual color array             */
+} Surface;
+
+typedef struct _doublebuffer {
+    Display     *display;       /* X display for windows and pixmaps  */
+    Screen      *screen;	/* X screen                           */
+    Window	 window;	/* X window for this double buffer    */
+
+    int		 width;		/* width of window                    */
+    int          height;	/* height of window                   */
+
+    Pixmap	 frame;	        /* pixmap for frame buffer            */
+    Pixmap       backing;       /* pixmap for backing store           */
+    Drawable     drawable;      /* copy of window/pixmap we draw in   */
+
+    GC		 gc;		/* GC used to draw the drawable       */
+    Visual      *visual;	/* X visual                           */
+    Colormap     colormap;	/* X colormap identifier              */
+    int          depth;	        /* depth of screen in planes          */
+    int          num_planes;    /* number of planes used              */
+
+/* surface information is used to do double buffering                 */ 
+
+   int       num_surfaces;
+   int       current_surface;
+   Surface  *surface[DBL_MAX_SURFACES];
+
+/* we need to remember which pixels and planes we allocated           */
+
+   int       mask;
+   long      pixels[DBL_MAX_COLORS];                                  
+   long      planes[DBL_MAX_PLANES];
+
+/* the pixel values one should use when drawing to the viewports      */
+
+   int       num_colors; 
+   int       colors[DBL_MAX_COLORS];
+} DoubleBuffer;
+
+
+extern DoubleBuffer  *DBLcreate_double_buffer();
+extern void           DBLdelete_double_buffer();
+extern unsigned long  DBLinq_background();
+extern char          *getenv();
+
+
+
+
+
diff -r 4de2936b4e77 -r 0132846995bd pkg-src/tree-x/defs.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pkg-src/tree-x/defs.h	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,50 @@
+/* ----------------------------------------------------------------------------
+ * File    : defs.h
+ * Purpose : general defines for dynamic tree program
+ * ----------------------------------------------------------------------------
+ */
+
+#include <stdio.h>
+
+#define ASSERT(x, msg) \
+   if ((x) == NULL) { fprintf(stderr, "%s: %s\n", ProgramName, msg); exit(0); }
+
+#define NASSERT(x, msg) \
+   if ((x) == NULL) { fprintf(stderr, "%s: %s\n", ProgramName, msg); \
+		      return (NULL); }
+
+#define WARN(msg) \
+   fprintf(stderr, "%s: %s\n", ProgramName, msg)
+
+#define WARN_1(msg, arg1) \
+   fprintf(stderr, "%s: %s %s", ProgramName, msg, arg1)
+
+#define WARN_4(msg1, arg1, msg2, arg2) \
+    fprintf(stderr, "%s: %s %s; %s %s\n", ProgramName, msg1, arg1, msg2, arg2)
+
+#ifdef GLOBALS
+#define Global
+#else
+#define Global extern
+#endif
+
+Global char        *ProgramName;
+
+#undef Global
+#undef GLOBALS
+
+#ifndef TRUE
+#define TRUE 1
+#endif
+
+#ifndef FALSE
+#define FALSE 0
+#endif
+
+#ifndef NULL
+#define NULL 0L
+#endif
+
+#ifndef MAX
+#define MAX(x, y) ((x) < (y)) ? (y) : (x)
+#endif
diff -r 4de2936b4e77 -r 0132846995bd pkg-src/tree-x/dissolve.c
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pkg-src/tree-x/dissolve.c	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,245 @@
+/* ----------------------------------------------------------------------------
+ * Animated display of collapse and expansion of nodes in a tree.
+ * ----------------------------------------------------------------------------
+ */
+
+#include <X11/Xlib.h>
+
+#include "dissolve.h"
+
+static Pixmap DissolvePixmaps[NUM_DISSOLVE_STEPS];
+static GC     DissolveInGC;
+static GC     DissolveOutGC;
+static GC     DissolveInLineGC[NUM_LINE_STEPS];
+static GC     DissolveOutLineGC[NUM_LINE_STEPS];
+
+static unsigned char first_dash[] =  {1, 3}; 
+static unsigned char second_dash[] = {1, 1}; 
+
+InitializeDissolveEffect(dpy, drawable, fg_pixel, bg_pixel)
+   Display *dpy;
+   Drawable drawable;
+   int fg_pixel;
+   int bg_pixel;
+{   
+   unsigned long  gcvaluemask;
+   XGCValues      gcvalues;
+   int i;
+
+   /* make DissolveOutGC */
+   gcvalues.background = bg_pixel; 
+   gcvalues.foreground = bg_pixel;
+   gcvalues.function   = GXcopy;
+   gcvalues.fill_style = FillStippled;
+   gcvalues.line_width = 0;
+   gcvaluemask = GCFunction | GCForeground | GCBackground | GCFillStyle |
+                 GCLineWidth;
+   DissolveOutGC = XCreateGC(dpy, drawable, gcvaluemask, &gcvalues);
+   XSetTSOrigin(dpy, DissolveOutGC, 0, 0);
+
+   /* make DissolveInGC */
+   gcvalues.foreground = fg_pixel;
+   DissolveInGC = XCreateGC(dpy, drawable, gcvaluemask, &gcvalues);
+   XSetTSOrigin(dpy, DissolveInGC, 0, 0);
+
+   /* make DissolveOutLineGC */
+   i = 0;
+   gcvalues.foreground = bg_pixel;
+   gcvalues.fill_style = FillSolid;
+   gcvalues.line_style = LineOnOffDash;
+   gcvalues.line_width = 0;
+   gcvaluemask = GCFunction | GCForeground | GCBackground |
+                 GCFillStyle | GCLineStyle | GCLineWidth ;
+   DissolveOutLineGC[i] = XCreateGC(dpy, drawable, gcvaluemask, &gcvalues);
+   XSetDashes(dpy, DissolveOutLineGC[i], 0, first_dash, 2);
+   i++;
+   DissolveOutLineGC[i] = XCreateGC(dpy, drawable, gcvaluemask, &gcvalues);
+   XSetDashes(dpy, DissolveOutLineGC[i], 0, second_dash, 2);
+   i++;
+   DissolveOutLineGC[i] = XCreateGC(dpy, drawable, gcvaluemask, &gcvalues);
+   XSetDashes(dpy, DissolveOutLineGC[i], 3, first_dash, 2);
+   i++;
+   gcvalues.line_style = LineSolid;
+   DissolveOutLineGC[i] = XCreateGC(dpy, drawable, gcvaluemask, &gcvalues);   
+
+   /* make DissolveInLineGC */
+   i = 0;
+   gcvalues.foreground = fg_pixel;
+   gcvalues.fill_style = FillSolid;
+   gcvalues.line_style = LineOnOffDash;
+   gcvalues.line_width = 0;
+   gcvaluemask = GCFunction | GCForeground | GCBackground |
+                 GCFillStyle | GCLineStyle | GCLineWidth;
+   DissolveInLineGC[i] = XCreateGC(dpy, drawable, gcvaluemask, &gcvalues);
+   XSetDashes(dpy, DissolveInLineGC[i], 0, first_dash, 2);
+   i++;
+   DissolveInLineGC[i] = XCreateGC(dpy, drawable, gcvaluemask, &gcvalues);
+   XSetDashes(dpy, DissolveInLineGC[i], 0, second_dash, 2);
+   i++;
+   DissolveInLineGC[i] = XCreateGC(dpy, drawable, gcvaluemask, &gcvalues);
+   XSetDashes(dpy, DissolveInLineGC[i], 3, first_dash, 2);
+   i++;
+   gcvalues.line_style = LineSolid;
+   DissolveInLineGC[i] = XCreateGC(dpy, drawable, gcvaluemask, &gcvalues);   
+
+   i = 0;
+   DissolvePixmaps[i] = XCreateBitmapFromData(dpy, drawable,
+					      first_bits,
+					      first_width,
+					      first_height);
+   i++;
+   DissolvePixmaps[i] = XCreateBitmapFromData(dpy, drawable,
+					      second_bits,
+					      second_width,
+					      second_height);
+   i++;
+   DissolvePixmaps[i] = XCreateBitmapFromData(dpy, drawable,
+					      third_bits,
+					      third_width,
+					      third_height);
+   i++;
+   DissolvePixmaps[i] = XCreateBitmapFromData(dpy, drawable,
+					      fourth_bits,
+					      fourth_width,
+					      fourth_height);
+   i++;
+   DissolvePixmaps[i] = XCreateBitmapFromData(dpy, drawable,
+					      fifth_bits,
+					      fifth_width,
+					      fifth_height);
+   i++;
+   DissolvePixmaps[i] = XCreateBitmapFromData(dpy, drawable,
+					      sixth_bits,
+					      sixth_width,
+					      sixth_height);
+   i++;
+   DissolvePixmaps[i] = XCreateBitmapFromData(dpy, drawable,
+					      seventh_bits,
+					      seventh_width,
+					      seventh_height);
+   i++;
+   DissolvePixmaps[i] = XCreateBitmapFromData(dpy, drawable,
+					      eighth_bits,
+					      eighth_width,
+					      eighth_height);
+}
+
+DissolveRectangle(dpy, drawable, x, y, width, height, mode)
+   Display *dpy;
+   Window drawable;
+   int x, y, width, height;
+   int mode;
+{
+   int i;
+   GC gc;
+
+   gc = mode ? DissolveOutGC : DissolveInGC;
+
+   for (i = 0 ; i < NUM_DISSOLVE_STEPS ; i++) {
+      XSetStipple(dpy, gc, DissolvePixmaps[i]);
+      if (mode)
+	 XFillRectangle(dpy, drawable, gc, x, y, width, height);
+      else
+	 XDrawRectangle(dpy, drawable, gc, x, y, width, height);
+      XFlush(dpy);
+      usleep(50000);
+   }
+}
+   
+DissolveRectangles(dpy, drawable, rectangles, nrectangles, mode)
+   Display *dpy;
+   Window drawable;
+   XRectangle rectangles[];
+   int nrectangles;
+   int mode;
+{
+   int i;
+   GC gc;
+
+   gc = mode ? DissolveOutGC : DissolveInGC;
+
+   for (i = 0 ; i < NUM_DISSOLVE_STEPS ; i++) {
+      XSetStipple(dpy, gc, DissolvePixmaps[i]);
+      if (mode)
+	 XFillRectangles(dpy, drawable, gc, rectangles, nrectangles);
+      else
+	 XDrawRectangles(dpy, drawable, gc, rectangles, nrectangles);
+      XFlush(dpy);
+      usleep(50000);
+   }
+}
+
+DissolveSegments(dpy, drawable, segments, nsegments, mode)
+   Display *dpy;
+   Window drawable;
+   XSegment segments[];
+   int nsegments;
+   int mode;
+{
+   int i;
+   GC *gc;
+
+   gc = mode ? DissolveOutLineGC : DissolveInLineGC;
+
+   for (i = 0 ; i < NUM_LINE_STEPS ; i++) {
+      XDrawSegments(dpy, drawable, gc[i], segments, nsegments);
+      XFlush(dpy);
+      usleep(50000);
+   }
+}
+
+DissolveTree(dpy, drawable, rectangles, nrectangles, segments, nsegments, mode)
+   Display *dpy;
+   Window drawable;
+   XRectangle rectangles[];
+   int nrectangles;
+   XSegment segments[];
+   int nsegments;
+   int mode;
+{
+   int i;
+   int j = 0;
+   int idle;
+   GC gc;
+   GC *lineGC;
+
+   gc = mode ? DissolveOutGC : DissolveInGC;
+   lineGC = mode ? DissolveOutLineGC : DissolveInLineGC;
+
+   /* speed up if there are lots of nodes */
+   idle = nrectangles > 50 ? 0 : 25000;
+   
+   for (i = 0 ; i < NUM_DISSOLVE_STEPS ; i++) {
+      XSetStipple(dpy, gc, DissolvePixmaps[i]);
+      if (mode)
+	 XFillRectangles(dpy, drawable, gc, rectangles, nrectangles);
+      else
+	 XDrawRectangles(dpy, drawable, gc, rectangles, nrectangles);
+      if (i % 2)
+	 XDrawSegments(dpy, drawable, lineGC[j++], segments, nsegments);
+      XFlush(dpy);
+      usleep(idle);
+   }
+}
+
+DissolvePolygon(dpy, drawable, pts, num_pts, mode)
+   Display *dpy;
+   Window drawable;
+   XPoint *pts;
+   int num_pts;
+   int mode;
+{
+   int i;
+   GC gc;
+
+   gc = mode ? DissolveOutGC : DissolveInGC;
+
+   for (i = 0 ; i < NUM_DISSOLVE_STEPS ; i++) {
+      XSetStipple(dpy, gc, DissolvePixmaps[i]);
+      XFillPolygon(dpy, drawable, gc, pts, num_pts,
+		   Nonconvex, CoordModeOrigin);
+      XFlush(dpy);
+      usleep(50000);
+   }
+}
+
diff -r 4de2936b4e77 -r 0132846995bd pkg-src/tree-x/dissolve.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pkg-src/tree-x/dissolve.h	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,64 @@
+/* ----------------------------------------------------------------------------
+ * Animated display of collapse and expansion of nodes in a tree.
+ * ----------------------------------------------------------------------------
+ */
+
+#define NUM_DISSOLVE_STEPS 8
+#define NUM_LINE_STEPS     4
+
+#define first_width 16
+#define first_height 16
+
+static char first_bits[] = {
+ 0x88, 0x04, 0x00, 0x80, 0x20, 0x10, 0x00, 0x81, 0x12, 0x00, 0x00, 0x00,
+ 0x00, 0x02, 0x82, 0x40, 0x00, 0x00, 0x12, 0x14, 0x00, 0x00, 0x0a, 0x28,
+ 0x40, 0x01, 0x05, 0x00, 0xa0, 0x92, 0x08, 0x00 };
+#define second_width 16
+#define second_height 16
+
+static char second_bits[] = {
+ 0x51, 0x20, 0x04, 0x02, 0x00, 0x88, 0x02, 0x00, 0x08, 0x09, 0x40, 0x00,
+ 0x04, 0x04, 0x00, 0xa0, 0x80, 0x08, 0x08, 0x00, 0x00, 0xa8, 0x00, 0x00,
+ 0x28, 0x28, 0x00, 0x80, 0x01, 0x00, 0x10, 0x82 };
+#define third_width 16
+#define third_height 16
+
+static char third_bits[] = {
+ 0x00, 0x01, 0x12, 0x44, 0x00, 0x01, 0x00, 0x08, 0x00, 0x42, 0x2a, 0x08,
+ 0x80, 0x00, 0x04, 0x10, 0x01, 0x04, 0x00, 0x80, 0xa9, 0x04, 0x00, 0x00,
+ 0x00, 0x10, 0x0a, 0x05, 0x40, 0x00, 0x00, 0x50 };
+#define fourth_width 16
+#define fourth_height 16
+
+static char fourth_bits[] = {
+ 0x02, 0x88, 0x80, 0x00, 0x04, 0x40, 0x11, 0x02, 0x40, 0x90, 0x05, 0x00,
+ 0x00, 0x08, 0x11, 0x01, 0x40, 0x00, 0x00, 0x41, 0x14, 0x00, 0x00, 0x12,
+ 0x10, 0x00, 0x40, 0x40, 0x08, 0x00, 0xa0, 0x04 };
+#define fifth_width 16
+#define fifth_height 16
+
+static char fifth_bits[] = {
+ 0x24, 0x00, 0x00, 0x08, 0x09, 0x20, 0x20, 0x04, 0x00, 0x00, 0x00, 0x85,
+ 0x10, 0x20, 0x40, 0x02, 0x14, 0x40, 0x00, 0x08, 0x02, 0x01, 0x10, 0x40,
+ 0x04, 0x04, 0x20, 0x20, 0x00, 0x00, 0x42, 0x29 };
+#define sixth_width 16
+#define sixth_height 16
+
+static char sixth_bits[] = {
+ 0x00, 0x12, 0x28, 0x00, 0x02, 0x00, 0x88, 0x00, 0x01, 0x20, 0x90, 0x02,
+ 0x01, 0x50, 0x20, 0x04, 0x08, 0xa0, 0x41, 0x00, 0x00, 0x00, 0x24, 0x05,
+ 0x00, 0x80, 0x00, 0x10, 0x10, 0x40, 0x05, 0x00 };
+#define seventh_width 16
+#define seventh_height 16
+
+static char seventh_bits[] = {
+ 0x00, 0x40, 0x01, 0x10, 0x90, 0x02, 0x00, 0x50, 0xa4, 0x04, 0x00, 0x20,
+ 0x20, 0x80, 0x08, 0x08, 0x00, 0x01, 0x04, 0x00, 0x40, 0x52, 0x00, 0x00,
+ 0x81, 0x42, 0x10, 0x00, 0x04, 0x25, 0x00, 0x00 };
+#define eighth_width 16
+#define eighth_height 16
+
+static char eighth_bits[] = {
+ 0x00, 0x00, 0x40, 0x21, 0x40, 0x04, 0x44, 0x20, 0x00, 0x00, 0x00, 0x50,
+ 0x4a, 0x01, 0x00, 0x00, 0x22, 0x12, 0xa0, 0x22, 0x00, 0x00, 0xc1, 0x80,
+ 0x02, 0x00, 0x80, 0x0a, 0x02, 0x08, 0x00, 0x00 };
diff -r 4de2936b4e77 -r 0132846995bd pkg-src/tree-x/draw.c
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pkg-src/tree-x/draw.c	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,1280 @@
+/* ----------------------------------------------------------------------------
+ * File    : draw.c
+ * Purpose : drawing-specific routines for dynamic tree program
+ * ----------------------------------------------------------------------------
+ */
+
+#include <X11/Intrinsic.h>
+#include <X11/StringDefs.h>
+
+#include "defs.h"
+#include "tree.h"
+#include "dbl.h"
+#include "intf.h"
+
+/* ------------------------------------------------------------------------- */
+/*				Global Variables                             */
+/* ------------------------------------------------------------------------- */
+
+Tree *TheTree;
+
+
+/* ------------------------------------------------------------------------- */
+/*				Local Variables                              */
+/* ------------------------------------------------------------------------- */
+
+static char AnimationMode = FALSE;        
+static char strbuf[BUFSIZ];
+static int  AnimationStep = ANIMATION_STEP;
+
+/* ------------------------------------------------------------------------- */
+/*			 Forward Function Declarations                       */
+/* ------------------------------------------------------------------------- */
+
+void DrawNode();
+void DrawTreeContour();
+
+
+/* ------------------------------------------------------------------------- */
+/*				   Functions                                 */
+/* ------------------------------------------------------------------------- */
+
+
+/* ----------------------------------------------------------------------------
+ * 
+ *   BeginFrame() provides an abstraction for double buffering. It should
+ *   be called prior to creating a new frame of animation.
+ * 
+ * ----------------------------------------------------------------------------
+ */
+
+void
+BeginFrame()
+{
+  DBLbegin_frame(TreeDrawingAreaDB);
+}
+
+
+/* ----------------------------------------------------------------------------
+ * 
+ *   EndFrame() provides an abstraction for double buffering. It should
+ *   be called after creating a new frame of animation.
+ * 
+ * ----------------------------------------------------------------------------
+ */
+
+void
+EndFrame()
+{
+  DBLend_frame(TreeDrawingAreaDB, 0);
+}
+
+
+/* ----------------------------------------------------------------------------
+ * 
+ *   GetDrawingSize() gets the size of the drawing area, and returns the
+ *   dimensions in the arguments.
+ * 
+ * ----------------------------------------------------------------------------
+ */
+
+void
+GetDrawingSize(width, height)
+     int *width, *height;
+{
+  Dimension w, h;
+  
+  XtVaGetValues(TreeDrawingArea, 
+		XtNwidth, &w,
+		XtNheight, &h,
+		NULL);
+
+  *width  = (int) w;
+  *height = (int) h;
+}
+
+
+/* ----------------------------------------------------------------------------
+ * 
+ *   SetDrawingSize() sets the size of the drawing area to the given
+ *   dimensions. 
+ * 
+ * ----------------------------------------------------------------------------
+ */
+
+void
+SetDrawingSize(width, height)
+     int width, height;
+{
+  XtVaSetValues(TreeDrawingArea,
+		XtNwidth, (Dimension) width,
+		XtNheight,  (Dimension) height,
+		NULL);
+}
+
+
+/* ----------------------------------------------------------------------------
+ * 
+ *   SetDrawingTree() is used to specify what tree is to be drawn in the
+ *   drawing area. 
+ * 
+ * ----------------------------------------------------------------------------
+ */
+
+void
+SetDrawingTree(tree)
+   Tree *tree;
+{
+   TheTree = tree;
+}
+
+
+/* ----------------------------------------------------------------------------
+ * 
+ *   SetNodeLabel() sets the label text of the specified node and computes
+ *   the bounding rectangle so that the layout can be determined. This
+ *   function is called when new nodes are created. If TreeAlignNodes is
+ *   True, the string is truncated so that the node's width is no longer
+ *   than TreeParentDistance.
+ * 
+ * ----------------------------------------------------------------------------
+ */
+
+void
+SetNodeLabel(node, label)
+     Tree *node;
+     char *label;
+{
+  int         len;
+  int         dummy;
+  XCharStruct rtrn;
+  
+  len = strlen(label);
+  while (len > 1) {
+    XTextExtents(TreeLabelFont, label, len, &dummy, &dummy, &dummy, &rtrn);
+    node->width  = rtrn.lbearing + rtrn.rbearing + (LABEL_MAT_WIDTH * 2) + 1;
+    node->height = rtrn.ascent + rtrn.descent + (LABEL_MAT_HEIGHT * 2) + 1;
+    if (TreeAlignNodes) {
+      if (node->width <= (2 * TreeParentDistance))
+	break;
+      else
+	len--;
+    }
+    else
+      break;
+  }
+  
+  node->label.text = label;
+  node->label.len  = len;
+  node->label.xoffset = LABEL_MAT_WIDTH + 1,
+  node->label.yoffset = rtrn.ascent + LABEL_MAT_HEIGHT + 1;
+}
+
+
+/* ----------------------------------------------------------------------------
+ * 
+ *   SetDrawColor() sets the drawing color of the TreeDrawingArea. 
+ * 
+ * ----------------------------------------------------------------------------
+ */
+
+void
+SetDrawColor(color)
+     int color;
+{
+  XSetForeground(TreeDrawingAreaDB->display, TreeDrawingAreaDB->gc,
+		 TreeDrawingAreaDB->colors[color]);
+}
+
+/* ----------------------------------------------------------------------------
+ * 
+ *   SetLineWidth() sets the line width of lines drawn in the TreeDrawingArea.
+ * 
+ * ----------------------------------------------------------------------------
+ */
+
+void
+SetLineWidth(width)
+     unsigned int width;
+{
+  XSetLineAttributes(TreeDrawingAreaDB->display, TreeDrawingAreaDB->gc,
+		     width, LineSolid, CapButt, JoinRound);
+}
+
+
+/* ----------------------------------------------------------------------------
+ * 
+ *   SetContours() sets the visibility of three possible contour modes: 
+ *   the outside contour, all subtree contours, or selected contours.
+ * 
+ * ----------------------------------------------------------------------------
+ */
+
+void
+SetContours(option)
+     ContourOption option;
+{
+  if (option == NoContours) {
+    switch (TreeShowContourOption) {
+    case OutsideContour:
+      DrawTreeContour(TheTree, New, BACKGROUND_COLOR, FALSE, FALSE, FALSE);
+      break;
+    case AllContours:
+      DrawTreeContour(TheTree, New, BACKGROUND_COLOR, FALSE, FALSE, TRUE);
+      break;
+    case SelectedContours:
+      DrawTreeContour(TheTree, New, BACKGROUND_COLOR, FALSE, TRUE, TRUE);
+      break;
+    default:
+      ;
+    }
+    DrawTreeContour(TheTree, New, BACKGROUND_COLOR, FALSE, FALSE, TRUE);
+  }
+  else if (option == OutsideContour) {
+    switch (TreeShowContourOption) {
+    case AllContours:
+      DrawTreeContour(TheTree, New, BACKGROUND_COLOR, FALSE, FALSE, TRUE);
+      break;
+    case SelectedContours:
+      DrawTreeContour(TheTree, New, BACKGROUND_COLOR, FALSE, TRUE, TRUE);
+      break;
+    default:
+      ;
+    }
+    DrawTreeContour(TheTree, New, CONTOUR_COLOR, FALSE, FALSE, FALSE);
+  } else if (option == AllContours) {
+    DrawTreeContour(TheTree, New, CONTOUR_COLOR, FALSE, FALSE, TRUE);
+  } else if (option == SelectedContours) {
+    switch (TreeShowContourOption) {
+    case AllContours:
+      DrawTreeContour(TheTree, New, BACKGROUND_COLOR, FALSE, FALSE, TRUE);
+      break;
+    case OutsideContour:
+      DrawTreeContour(TheTree, New, BACKGROUND_COLOR, FALSE, FALSE, FALSE);
+      break;
+    default:
+      DrawTreeContour(TheTree, New, BACKGROUND_COLOR, FALSE, FALSE, TRUE);
+    }
+    DrawTreeContour(TheTree, New, CONTOUR_COLOR, FALSE, TRUE, TRUE);
+  }
+  TreeShowContourOption = option;
+}
+
+
+/* ----------------------------------------------------------------------------
+ * 
+ *   HiliteNode() is called by Unzip() to change the color of a node. 
+ * 
+ * ----------------------------------------------------------------------------
+ */
+
+void
+HiliteNode(tree, pos_mode)
+     Tree *tree;
+{
+  SetDrawColor(HIGHLIGHT_COLOR);
+  DrawNode(tree, pos_mode);
+  SetDrawColor(TREE_COLOR);
+}
+
+
+/* ----------------------------------------------------------------------------
+ * 
+ *   DrawNode() takes a node and draws the node in the specified widget
+ *   at its (x,y) coordinate. (x, y) indicates the upper-left corner where
+ *   the node is drawn. Also, a line is drawn from the center of the left
+ *   edge to the center of the parent's right edge. 'draw_mode' specifies 
+ *   the drawing mode (whether or not the node is erased, rather than drawn).
+ *   'pos_mode' determines whether or not to use the old position of the node.
+ *   This flag is used in animating the movement of a node from its old
+ *   position to its new position.
+ * 
+ * ----------------------------------------------------------------------------
+ */
+
+void
+DrawNode(node, pos_mode)
+     Tree     *node;
+     PosMode  pos_mode;
+{
+  Widget   w;
+  GC       gc;
+  
+  w  = TreeDrawingArea;
+  gc = TreeDrawingAreaDB->gc;
+  
+  if (pos_mode == Old) {
+    XDrawString(XtDisplay(w), XtWindow(w), gc,
+		node->old_pos.x + node->label.xoffset,
+		node->old_pos.y + node->label.yoffset,
+		node->label.text, node->label.len);
+    XDrawRectangle(XtDisplay(w), XtWindow(w), gc,
+		   node->old_pos.x, node->old_pos.y,
+		   node->width, node->height);
+    if (node->parent) 
+      XDrawLine(XtDisplay(w), XtWindow(w), gc,
+		node->old_pos.x - 1,
+		node->old_pos.y + (node->height / 2),
+		node->parent->old_pos.x + node->parent->width + 1,
+		node->parent->old_pos.y + (node->parent->height / 2));
+    if (node->elision) {
+      XSetFillStyle(TreeDrawingAreaDB->display, TreeDrawingAreaDB->gc,
+		    FillTiled);
+      XFillRectangle(XtDisplay(w), XtWindow(w), gc,
+		     node->old_pos.x + node->width - ELISION_WIDTH,
+		     node->old_pos.y + 1, ELISION_WIDTH, node->height - 1);
+      XSetFillStyle(TreeDrawingAreaDB->display, TreeDrawingAreaDB->gc,
+		    FillSolid);
+    }
+  } else {
+    XDrawString(XtDisplay(w), XtWindow(w), gc,
+		node->pos.x + node->label.xoffset,
+		node->pos.y + node->label.yoffset,
+		node->label.text, node->label.len);
+    
+    XDrawRectangle(XtDisplay(w), XtWindow(w), gc,
+		   node->pos.x, node->pos.y,
+		   node->width, node->height);
+    if (node->parent) 
+      XDrawLine(XtDisplay(w), XtWindow(w), gc,
+		node->pos.x - 1,
+		node->pos.y + (node->height / 2),
+		node->parent->pos.x + node->parent->width + 1,
+		node->parent->pos.y + (node->parent->height / 2));
+    if (node->elision) {
+      XSetFillStyle(TreeDrawingAreaDB->display, TreeDrawingAreaDB->gc,
+		    FillTiled);
+      XFillRectangle(XtDisplay(w), XtWindow(w), gc,
+		     node->pos.x + node->width - ELISION_WIDTH,
+		     node->pos.y + 1, ELISION_WIDTH, node->height - 1);
+      XSetFillStyle(TreeDrawingAreaDB->display, TreeDrawingAreaDB->gc,
+		    FillSolid);
+    }
+  }
+}
+
+
+/* ----------------------------------------------------------------------------
+ * 
+ *   DrawTreeContour() draws the contour of the specified subtree. Bridges
+ *   are not traversed, so the actual subtree contour is drawn, as opposed
+ *   to the merged contour. 'color' specifies the drawing color. If 'detach'
+ *   is True,  the lines attaching the subtree contour to the node are not
+ *   drawn.  If 'select' is true, then only subtrees that are flagged as
+ *   selected are shown. If 'recursive' is True, the entire tree is traversed.
+ * 
+ * ----------------------------------------------------------------------------
+ */
+
+void
+DrawTreeContour(tree, pos_mode, color, detach, select, recursive)
+     Tree *tree;
+     PosMode pos_mode;
+     int color;
+     int detach;
+     int select;
+     int recursive;
+{
+  Widget w = TreeDrawingArea;
+  Polyline *contour, *tail;
+  Tree *child;
+  int x, y, i;
+
+  if (tree == NULL)
+    return;
+
+  if ((select && tree->show_contour) || !select) {
+
+    SetDrawColor(color);
+    SetLineWidth(TreeContourWidth);
+   
+    /* draw upper contour */
+    contour = tree->contour.upper.head;
+    tail    = tree->contour.upper.tail;
+    if (pos_mode == Old) {
+      x = tree->old_pos.x - tree->border;
+      y = tree->old_pos.y - tree->border;
+    }
+    else {
+      x = tree->pos.x - tree->border;
+      y = tree->pos.y - tree->border;
+    }
+
+    if (detach) {		/* skip over attaching lines */
+      for (i = 0 ; i < 2 ; i++) {
+	x += contour->dx;
+	y += contour->dy;
+	contour = contour->link;
+      }
+    }
+    
+    while (contour) {
+      XDrawLine(XtDisplay(w), XtWindow(w), TreeDrawingAreaDB->gc,
+		x, y, x + contour->dx, y + contour->dy);
+      x += contour->dx;
+      y += contour->dy;
+      if (contour == tail)	/* make sure you don't follow bridges */
+	contour = NULL;
+      else
+	contour = contour->link;
+    }
+
+    /* draw lower contour */
+    contour = tree->contour.lower.head;
+    tail    = tree->contour.lower.tail;
+    if (pos_mode == Old) {
+      x = tree->old_pos.x - tree->border;
+      y = tree->old_pos.y + tree->border + tree->height;
+    } else {
+      x = tree->pos.x - tree->border;
+      y = tree->pos.y + tree->border + tree->height;
+    }
+
+    if (detach) {		/* skip over attaching lines */
+      for (i = 0 ; i < 2 ; i++) {
+	x += contour->dx;
+	y += contour->dy;
+	contour = contour->link;
+      }
+    }
+
+    while (contour) {
+      XDrawLine(XtDisplay(w), XtWindow(w), TreeDrawingAreaDB->gc,
+		x, y, x + contour->dx, y + contour->dy);
+      x += contour->dx;
+      y += contour->dy;
+      if (contour == tail)	/* make sure you don't follow bridges */
+	contour = NULL;
+      else
+	contour = contour->link;
+    }
+  }
+  
+  if (recursive) {
+    FOREACH_CHILD(child, tree)
+      if (!child->elision)
+	DrawTreeContour(child, pos_mode, color,
+			detach, select, recursive);
+  }
+
+  SetDrawColor(TREE_COLOR);
+  SetLineWidth(0);
+}
+
+
+/* ----------------------------------------------------------------------------
+ * 
+ *   DrawTree() traverses the given tree, drawing the node and connecting
+ *   segments. The tree contours are also drawn at each step, if enabled.
+ *   'draw_mode' specifies the drawing mode in which the tree is drawn.
+ *   'pos_mode' determines whether or not to use the old position of the node.
+ *   This flag is used in animating the movement of a node from its old
+ *   position to its new position. DrawNode() is called to draw an individual 
+ *   node.
+ * 
+ * ----------------------------------------------------------------------------
+ */
+
+void
+DrawTree(tree, pos_mode)
+     Tree     *tree;
+     PosMode  pos_mode;
+{
+  if (tree == NULL)
+    return;
+
+  DrawNode(tree, pos_mode);
+
+  /* do stuff that animates Unzip() */
+  if (tree->split) {
+    if (!AnimationMode ||
+	(tree->pos.x == tree->old_pos.x &&
+	 tree->pos.y == tree->old_pos.y))
+      DrawTreeContour(tree, pos_mode, SPLIT_COLOR, FALSE, FALSE, FALSE);
+    else
+      DrawTreeContour(tree, pos_mode, ACTION_COLOR, FALSE, FALSE, FALSE);
+  }
+  if (tree->on_path)
+    HiliteNode(tree, pos_mode);
+
+  if (tree->child && !tree->elision) 
+    DrawTree(tree->child, pos_mode);
+  if (tree->sibling)
+    DrawTree(tree->sibling, pos_mode);
+}
+
+
+/* ----------------------------------------------------------------------------
+ * 
+ *   ShiftTree() adjusts the positions of each node so that it moves from
+ *   the "old" position towards the "new position". This is used by
+ *   AnimateTree(). 'done' is set to FALSE if the tree is not in its
+ *   final position; it is used to determine when to stop animating the tree.
+ * 
+ * ----------------------------------------------------------------------------
+ */
+
+void
+ShiftTree(tree, done)
+     Tree *tree;
+     int  *done;
+{
+  Tree *child;
+  
+  if (tree->old_pos.x != tree->pos.x ||
+      tree->old_pos.y != tree->pos.y)
+    {
+      tree->old_pos.x = tree->pos.x;
+      tree->old_pos.y = tree->pos.y;
+    }
+  
+  FOREACH_CHILD(child, tree)
+    ShiftTree(child, done);
+}
+
+
+/* ----------------------------------------------------------------------------
+ * 
+ *   AnimateTree() draws the given tree in a series of steps to give the
+ *   effect of animation from the "old" layout to the "new" layout of the
+ *   tree. 
+ * 
+ *   The algorithm used here is not efficient; the entire tree is drawn
+ *   on each iteration of the animation sequence; it would be more efficient
+ *   to only redraw what is necessary. However, the method used here takes
+ *   advantage of existing code without modification.
+ * 
+ * ----------------------------------------------------------------------------
+ */
+
+void
+AnimateTree(tree)
+     Tree *tree;
+{
+  int done = FALSE;
+
+  AnimationMode = FALSE;
+  /* highlight which nodes have to move */
+  BeginFrame();
+    DrawTree(tree, Old);
+  EndFrame();
+  Pause(); 
+  if (PauseAfterStep)
+    AnimationStep = ANIMATION_STEP_STEP;
+  while (!done) {
+    done = TRUE;
+    ShiftTree(tree, &done);
+    BeginFrame();
+      DrawTree(tree, Old);
+    EndFrame();
+    if (PauseAfterStep)
+      Pause();
+  }
+  if (PauseAfterStep)
+    AnimationStep = ANIMATION_STEP;
+  AnimationMode = FALSE;
+}
+
+
+/* ----------------------------------------------------------------------------
+ * 
+ *   AnimateZip() generates a sequence of frames that animates the Zip() step.
+ *   It is similar in logical structure to Zip().
+ * 
+ * ----------------------------------------------------------------------------
+ */
+
+void 
+AnimateZip(tree)
+     Tree *tree;
+{
+  Tree *child;
+   
+  /* show results of Join() step */
+  if (tree->child) {
+    BeginFrame();
+      FOREACH_CHILD(child, tree)
+        child->split = FALSE;
+      DrawTree(TheTree, New);
+      DrawTreeContour(tree, New, CONTOUR_COLOR, TRUE, FALSE, FALSE);
+    EndFrame();
+
+    StatusMsg("Zip: merge and join contours", FALSE);
+    Pause(); 
+   
+    /* show results of AttachParent() step */
+    BeginFrame();
+      DrawTree(TheTree, New);
+      DrawTreeContour(tree, New, CONTOUR_COLOR, FALSE, FALSE, FALSE);
+    EndFrame();
+
+    StatusMsg("Zip: attach parents", FALSE);
+    Pause(); 
+  }
+  
+  tree->on_path = FALSE;
+   
+  if (tree->parent)
+    AnimateZip(tree->parent);
+  else {
+    tree->on_path = FALSE;
+    BeginFrame();
+      DrawTree(TheTree, New);
+      DrawTreeContour(TheTree, New, CONTOUR_COLOR, FALSE, FALSE, FALSE);
+    EndFrame();
+    StatusMsg("Zip: reassemble entire contour", FALSE);
+    Pause(); 
+  }
+}
+
+
+/* ----------------------------------------------------------------------------
+ * 
+ *   CountNodes() returns the number of nodes in the specified tree. 
+ *   Nodes below a node that has been collapsed are ignored. 
+ * 
+ * ----------------------------------------------------------------------------
+ */
+
+int
+CountNodes(tree)
+     Tree *tree;
+{
+  int num_nodes = 1;		/* count root of subtree */
+  Tree *child;
+  
+  if (!tree->elision) {
+    FOREACH_CHILD(child, tree)
+      num_nodes += CountNodes(child);
+  }
+  return (num_nodes);
+}
+
+
+/* ----------------------------------------------------------------------------
+ * 
+ *   CollectNodeRectangles() is a recursive function used by
+ *   GetSubTreeRectangles() to collect the rectangles of descendant nodes
+ *   into the pre-allocated storage passed to this function.
+ * 
+ * ----------------------------------------------------------------------------
+ */
+
+void
+CollectNodeRectangles(node, rectangles, fill)
+     Tree *node;
+     XRectangle **rectangles;
+     int fill;
+{
+  Tree *child;
+   
+  (*rectangles)->x = node->pos.x;
+  (*rectangles)->y = node->pos.y;
+  if (fill) {
+    (*rectangles)->width = node->width + 1;
+    (*rectangles)->height = node->height + 1;
+  } else {
+    (*rectangles)->width = node->width;
+    (*rectangles)->height = node->height;
+  }
+  (*rectangles)++;
+  
+  if (!node->elision)
+    FOREACH_CHILD(child, node) 
+      CollectNodeRectangles(child, rectangles, fill);
+}
+
+
+/* ----------------------------------------------------------------------------
+ * 
+ *   GetSubTreeRectangles() builds an array of XRectangles that contain
+ *   all the node rectangles in the tree, except the root node itself. 
+ *   The array is returned in 'rectangles' and the number of rectangles
+ *   is returned in 'nrectangles.' Storage for the rectangles is allocated
+ *   in this function. This function is used by PickAction to determine
+ *   what rectangles need to be dissolved away. 'fill', if True, specifies
+ *   that the rectangles should be 1 pixel larger in each dimension to 
+ *   compensate for FillRectangle behavior. 
+ * 
+ * ----------------------------------------------------------------------------
+ */
+
+void
+GetSubTreeRectangles(tree, rectangles, nrectangles, fill)
+     Tree *tree;
+     XRectangle **rectangles;
+     int *nrectangles, fill;
+{
+  Tree *child;
+  XRectangle *crect;		/* current rectangle */
+  
+  *nrectangles = CountNodes(tree) - 1;        /* don't count root node */
+  *rectangles = (XRectangle *) malloc(sizeof(XRectangle) * *nrectangles);
+  ASSERT(*rectangles, "could not allocate memory for rectangles");
+  
+  crect = *rectangles;
+  if (!tree->elision)
+    FOREACH_CHILD(child, tree)
+      CollectNodeRectangles(child, &crect, fill);
+}
+
+
+/* ----------------------------------------------------------------------------
+ * 
+ *   CollectNodeSegments() is a recursive function used by GetSubTreeSegments()
+ *   to collect the line segments connecting nodes into the pre-allocated 
+ *   storage passed to this function.
+ * 
+ * ----------------------------------------------------------------------------
+ */
+
+void
+CollectNodeSegments(node, segments)
+     Tree *node;
+     XSegment **segments;
+{
+  Tree *child;
+   
+  (*segments)->x1 = node->pos.x - 1;
+  (*segments)->y1 = node->pos.y + (node->height / 2),
+  (*segments)->x2 = node->parent->pos.x + node->parent->width + 1;
+  (*segments)->y2 = node->parent->pos.y + (node->parent->height / 2);
+  (*segments)++;
+
+  if (!node->elision)
+    FOREACH_CHILD(child, node) 
+      CollectNodeSegments(child, segments);
+}
+
+
+/* ----------------------------------------------------------------------------
+ * 
+ *   GetSubTreeSegments() builds an array of XSegments that contain
+ *   all the line segments connecting the nodes in the tree. The array is
+ *   returned in 'segments' and the number of segments is returned in
+ *   'nsegments.' Storage for the segments is allocated in this function.
+ *   This function is used by PickAction to determine what line segments
+ *   rectangles need to be dissolved away.
+ * 
+ * ----------------------------------------------------------------------------
+ */
+
+void
+GetSubTreeSegments(tree, segments, nsegments)
+     Tree *tree;
+     XSegment **segments;
+     int *nsegments;
+{
+  Tree *child;
+  XSegment *cseg;		/* current segment */
+
+  *nsegments = CountNodes(tree) - 1;
+  *segments = (XSegment *) malloc(sizeof(XSegment) * *nsegments);
+  ASSERT(*segments, "could not allocate memory for segments");
+  
+  cseg = *segments;
+  if (!tree->elision)
+    FOREACH_CHILD(child, tree)
+      CollectNodeSegments(child, &cseg);
+}
+
+
+/* ----------------------------------------------------------------------------
+ * 
+ *   ComputeSubTreeExtent() computes the extent of a subtree. This is
+ *   easily computed based on the tree's contour, as in ComputeTreeSize().
+ *   This extent is stored in the node, and used by SearchTree for 
+ *   pick-correlation. 
+ * 
+ *   This function assumes that the given tree has at least one child; do not
+ *   pass a leaf node to this function. 
+ * 
+ * ----------------------------------------------------------------------------
+ */
+
+void
+ComputeSubTreeExtent(tree)
+     Tree *tree;
+{
+  int width, height;
+  int x_offset, y_offset;
+
+  ComputeTreeSize(tree, &width, &height, &x_offset, &y_offset);
+  tree->subextent.pos.x  = tree->child->pos.x - tree->child->border;
+  tree->subextent.pos.y  = tree->pos.y - y_offset;
+  tree->subextent.width  = width - (tree->child->pos.x - tree->pos.x) - 1;
+  tree->subextent.height = height - 1;
+}
+
+
+/* ----------------------------------------------------------------------------
+ * 
+ *   SearchTree() determines if a node's rectangular region encloses the
+ *   specified point in (x,y). Rather than using a brute-force search 
+ *   through all node rectangles of a given tree, the subtree extents
+ *   are used in a recursive fashion to drive the search as long as the
+ *   given point is enclosed in an extent. In the worst case, the search
+ *   time would be on the order of a brute-force search, but with complex
+ *   trees, this method reduces the number of visits. 
+ * 
+ *   The extent of a subtree is computed by ComputeSubTreeExtent() and is
+ *   stored in each node of the tree.
+ * 
+ * ----------------------------------------------------------------------------
+ */
+
+int
+SearchTree(tree, x, y, node)
+     Tree *tree, **node;
+     int x, y;
+{
+  Tree *child;
+  
+  if (tree == NULL)
+    return (FALSE);
+
+  if (PT_IN_RECT(x, y, tree->pos.x, tree->pos.y,
+		 tree->pos.x + tree->width,
+		 tree->pos.y + tree->height)) {
+    *node = tree;
+    return (TRUE);
+  }
+  if (tree->child && (PT_IN_EXTENT(x, y, tree->subextent))) 
+    FOREACH_CHILD(child, tree) {
+      if (SearchTree(child, x, y, node)) 
+	return (TRUE);
+    }
+  return (FALSE);
+}
+
+
+/* ----------------------------------------------------------------------------
+ * 
+ *   ExposeHandler() handles expose events in the TreeDrawingArea. This
+ *   function is not intelligent; it just redraws the entire contents.
+ * 
+ * ----------------------------------------------------------------------------
+ */
+
+void
+ExposeHandler(w, client_data, event)
+     Widget   w;
+     caddr_t client_data;
+     XExposeEvent  *event;
+{
+  
+  if (event->count == 0) {
+    BeginFrame();
+      SetContours(TreeShowContourOption);
+      DrawTree(TheTree, New);
+    EndFrame();
+  }
+}
+
+
+/* ----------------------------------------------------------------------------
+ * 
+ *   ExpandCollapseNode is called to expand or collapse a node in the tree.
+ * 
+ * ----------------------------------------------------------------------------
+ */
+
+void
+ExpandCollapseNode(node)
+     Tree *node;
+{
+  int        width, height;
+  int        old_width, old_height;
+  int        x_offset, y_offset;
+  XRectangle *rectangles;
+  XSegment   *segments;
+  int        nrectangles, nsegments;
+  int        expand = FALSE;
+  Widget     w = TreeDrawingArea;
+  
+  StatusMsg("", TRUE);
+  
+  /* hilite node so that we know where we are */
+  /* DrawTree will hilite it as a side effect */
+  if (TreeShowSteps)
+    node->on_path = TRUE;
+  
+  /* erase the contour before changing in the tree */
+  if ((TreeShowContourOption != NoContours) || TreeShowSteps) {
+    BeginFrame();
+      DrawTree(TheTree, New);
+    EndFrame();
+  }
+   
+  sprintf(strbuf, "Node `%s' selected for %s", node->label.text,
+	  node->elision ? "expansion" : "collapse");
+  StatusMsg(strbuf, FALSE);
+  Pause(); 
+
+  if (node->parent)
+    Unzip(node->parent);
+  else {
+    StatusMsg("Show entire contour", FALSE);
+    if (TreeShowSteps) {
+      BeginFrame();
+        DrawTreeContour(TheTree, New, CONTOUR_COLOR, FALSE, FALSE, FALSE);
+        DrawTree(TheTree, New);
+      EndFrame();
+      Pause(); 
+    }
+  }
+
+  /* are we collapsing a subtree? */
+  if (!node->elision) {
+    StatusMsg("Collapse subtree", FALSE);
+    GetSubTreeRectangles(node, &rectangles, &nrectangles, TRUE);
+    GetSubTreeSegments(node, &segments, &nsegments);
+    DissolveTree(XtDisplay(w), XtWindow(w),
+		 rectangles, nrectangles,
+		 segments, nsegments, TRUE);
+    free(rectangles);
+    free(segments);
+    Pause(); 
+    
+    StatusMsg("Replace subtree contour with leaf contour", FALSE);
+    node->elision = TRUE;
+    if (TreeShowSteps)
+      node->split = TRUE;	/* turned off in AnimateZip */
+    node->old_contour = node->contour;
+    node->width += ELISION_WIDTH;
+    LayoutLeaf(node);
+    BeginFrame();
+      SetContours(TreeShowContourOption);
+      DrawTree(TheTree, New);
+    EndFrame();
+    Pause();  
+  } else {
+    StatusMsg("Replace leaf contour with old subtree contour", FALSE);
+    if (TreeShowSteps)
+      node->split = TRUE;	/* turned off in AnimateZip */
+    RuboutLeaf(node);
+    node->contour = node->old_contour;
+    expand = TRUE;
+  }
+  
+  if (node->parent)
+    Zip(node->parent);
+  
+  ComputeTreeSize(TheTree, &width, &height, &x_offset, &y_offset);
+  PetrifyTree(TheTree, x_offset + MAT_SIZE, y_offset + MAT_SIZE);
+  GetDrawingSize(&old_width, &old_height);
+
+  if (expand) {
+    SetDrawingSize(width + (2 * MAT_SIZE), height + (2 * MAT_SIZE));
+    BeginFrame();
+      DrawTree(TheTree, Old);
+    EndFrame();
+    Pause(); 
+    StatusMsg("Move tree to new configuration", FALSE);
+    AnimateTree(TheTree);
+  } else {
+    /* we are shrinking or staying the same */
+    StatusMsg("Move tree to new configuration", FALSE);
+    AnimateTree(TheTree);
+    SetDrawingSize(width + (2 * MAT_SIZE), height + (2 * MAT_SIZE));
+  }
+
+  if (expand) {
+    StatusMsg("Expand subtree", FALSE);
+    node->elision = FALSE;
+    
+    /* erase elision marker */
+    XSetFunction(TreeDrawingAreaDB->display, TreeDrawingAreaDB->gc,
+		 GXclear);
+    XFillRectangle(XtDisplay(w), XtWindow(w), TreeDrawingAreaDB->gc,
+		   node->pos.x + node->width - ELISION_WIDTH + 1,
+		   node->pos.y, ELISION_WIDTH, node->height + 1);
+    XSetFunction(TreeDrawingAreaDB->display, TreeDrawingAreaDB->gc,
+		 GXcopy);
+    node->width -= ELISION_WIDTH;
+    
+    GetSubTreeRectangles(node, &rectangles, &nrectangles, FALSE);
+    GetSubTreeSegments(node, &segments, &nsegments);
+    /* dissolve the tree back in */
+    DissolveTree(XtDisplay(w), XtWindow(w),
+		 rectangles, nrectangles,
+		 segments, nsegments, FALSE);
+    free(rectangles);
+    free(segments);
+    
+    /* draw text of nodes */
+    BeginFrame();
+      SetContours(TreeShowContourOption);
+      DrawTree(TheTree, New);
+    EndFrame();
+    Pause(); 
+  }
+  
+  if (TreeShowSteps) {
+    node->on_path = FALSE;
+    if (node->parent)
+      AnimateZip(node->parent);
+    else
+      node->split = FALSE;
+  }
+  
+  /* BUG: the display isn't properly updated here! */
+  /* There should probably be some code here that
+     clears the tree below the node currently being 
+     collapsed or expanded. Hack added 20.03.95 (torgeir@ii.uib.no). 
+     I'll try to fix this later. */
+
+  XClearArea(TreeDisplay, XtWindow(TreeDrawingArea), 0, 0, 0, 0, FALSE);
+
+  BeginFrame();
+    SetContours(TreeShowContourOption);
+    DrawTree(TheTree, New);
+  EndFrame();
+  
+  StatusMsg("Ready", TRUE);
+}
+
+/* ----------------------------------------------------------------------------
+ * 
+ *   InsertNode() handles the task of inserting a new node in the tree,
+ *   at the given position with respect to 'base_node'. When 'node_pos' is
+ *   either Before or After, it is assumed that 'base_node' has a parent.
+ * 
+ * ----------------------------------------------------------------------------
+ */
+
+void
+InsertNode(base_node, node_pos, new_node_text)
+     Tree *base_node;
+     NodePosition node_pos;
+     char *new_node_text;
+{
+  Tree *new_node;
+  Tree *parent;
+  Tree *sibling = NULL;
+  Tree *child;
+
+  int  width, height;
+  int  x_offset, y_offset;
+
+  StatusMsg("", TRUE);
+
+  new_node = MakeNode();	/* should check for memory failure */
+  SetNodeLabel(new_node, new_node_text);
+  LayoutLeaf(new_node);
+
+  /* figure out parent & sibling */
+  if (node_pos == Child) {
+    parent = base_node;
+    /* find last child, if one exists */
+    FOREACH_CHILD(child, parent)
+      sibling = child;
+  } else if (node_pos == After) {
+    parent = base_node->parent;
+    sibling = base_node;
+  } else if (node_pos == Before) {
+    parent = base_node->parent;
+    FOREACH_CHILD(child, parent)
+      if (child->sibling == base_node) {
+	sibling = child;
+	break;
+      }
+  }
+
+  if (TreeShowSteps)
+    parent->on_path = TRUE;
+  
+  if ((TreeShowContourOption != NoContours) ||
+      TreeShowSteps) {
+    BeginFrame();
+      DrawTree(TheTree, New);
+    EndFrame();
+  }
+
+  sprintf(strbuf, "Inserting `%s' as child of node `%s'",
+	  new_node_text, parent->label.text);
+  StatusMsg(strbuf, FALSE);
+  Pause(); 
+   
+  /* erase the contour before changing in the tree */
+  
+  Insert(parent, new_node, sibling);
+  
+  ComputeTreeSize(TheTree, &width, &height, &x_offset, &y_offset);
+  PetrifyTree(TheTree, x_offset + MAT_SIZE, y_offset + MAT_SIZE);
+  
+  if (sibling)
+    new_node->old_pos = sibling->old_pos;
+  else if (new_node->sibling)
+    new_node->old_pos = new_node->sibling->old_pos;
+  else {
+    new_node->old_pos.x = new_node->pos.x;
+    new_node->old_pos.y = parent->old_pos.y;
+  }
+  
+  if (TreeShowSteps)
+    new_node->split = TRUE;
+
+  SetDrawingSize(width + (2 * MAT_SIZE), height + (2 * MAT_SIZE));
+  BeginFrame();
+    DrawTree(TheTree, Old);
+  EndFrame();
+  StatusMsg("Insert: add new node and contour", FALSE);
+  Pause(); 
+   
+  StatusMsg("Move tree to new configuration", FALSE);
+  AnimateTree(TheTree);
+
+  if (TreeShowSteps) {
+    if (parent)
+      AnimateZip(parent);
+  }
+
+  BeginFrame();
+    SetContours(TreeShowContourOption);
+    DrawTree(TheTree, New);
+  EndFrame();
+
+  StatusMsg("Ready", TRUE);
+}   
+
+/* ----------------------------------------------------------------------------
+ * 
+ *   DeleteNode() handles the task of deleting a given node in the tree.
+ * 
+ * ----------------------------------------------------------------------------
+ */
+
+void
+DeleteNode(node)
+     Tree *node;
+{
+  Tree *parent;
+
+  XRectangle *rectangles;
+  XSegment   *segments;
+  int         nrectangles, nsegments;
+  Widget      w = TreeDrawingArea;
+  int  width, height;
+  int  x_offset, y_offset;
+  
+  StatusMsg("", TRUE);
+
+  if (TreeShowSteps)
+    node->on_path = TRUE;
+   
+  /* erase the contour before changing in the tree */
+  if ((TreeShowContourOption != NoContours) ||
+      TreeShowSteps) {
+    BeginFrame();
+      DrawTree(TheTree, New);
+    EndFrame();
+  }
+
+  sprintf(strbuf, "Node `%s' selected for deletion", node->label.text);
+  StatusMsg(strbuf, FALSE);
+  Pause(); 
+  
+  parent = node->parent;
+  
+  if (parent)
+    Unzip(parent);
+  else
+    TheTree = NULL;		/* delete root of tree */
+
+  /* fade out deleted subtree */
+  StatusMsg("Delete subtree", FALSE);
+  GetSubTreeRectangles(node, &rectangles, &nrectangles, TRUE);
+  GetSubTreeSegments(node, &segments, &nsegments);
+  DissolveTree(XtDisplay(w), XtWindow(w),
+	       rectangles, nrectangles,
+	       segments, nsegments, TRUE);
+  free(rectangles);
+  free(segments);
+
+  Delete(node);
+
+  BeginFrame();
+  if (TheTree) 
+    DrawTree(TheTree, New);
+  EndFrame();
+  Pause(); 
+
+  if (parent)
+    Zip(parent);
+  
+  if (TheTree) {
+    ComputeTreeSize(TheTree, &width, &height, &x_offset, &y_offset);
+    PetrifyTree(TheTree, x_offset + MAT_SIZE, y_offset + MAT_SIZE);
+    StatusMsg("Move tree to new configuration", FALSE);
+    AnimateTree(TheTree);
+    SetDrawingSize(width + (2 * MAT_SIZE), height + (2 * MAT_SIZE));
+    Pause(); 
+
+    if (TreeShowSteps) {
+      if (parent)
+	AnimateZip(parent);
+    }
+
+    BeginFrame();
+      SetContours(TreeShowContourOption);
+      DrawTree(TheTree, New);
+    EndFrame();
+
+  }
+
+  StatusMsg("Ready", TRUE);
+}
+
+
+/* ----------------------------------------------------------------------------
+ * 
+ *   ResetLabels() is called when the TreeAlignNodes mode is changed. 
+ *   When TreeParentDistance changes, the node width changes, so this
+ *   function forces each node's width to be recomputed. 
+ * 
+ * ----------------------------------------------------------------------------
+ */
+
+ResetLabels(tree)
+     Tree *tree;
+{
+  Tree *child;
+  
+  SetNodeLabel(tree, tree->label.text);
+  FOREACH_CHILD(child, tree)
+    ResetLabels(child);
+}
+
+
+/* ----------------------------------------------------------------------------
+ * 
+ *   SetupTree() handles the task of setting up the specified tree in 
+ *   the drawing area.
+ * 
+ * ----------------------------------------------------------------------------
+ */
+
+void
+SetupTree(tree)
+     Tree *tree;
+{
+  int width, height;
+  int x_offset, y_offset;
+  
+  LayoutTree(tree);
+  ComputeTreeSize(tree, &width, &height, &x_offset, &y_offset);
+  PetrifyTree(tree, x_offset + MAT_SIZE, y_offset + MAT_SIZE);
+  SetDrawingTree(tree);
+  SetDrawingSize(width + (2 * MAT_SIZE), height + (2 * MAT_SIZE));
+  BeginFrame();
+    SetContours(TreeShowContourOption);
+    DrawTree(tree, New);
+  EndFrame();
+}
+
+
+
+
+
+
diff -r 4de2936b4e77 -r 0132846995bd pkg-src/tree-x/help.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pkg-src/tree-x/help.h	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,189 @@
+static char help_text[] ="\n"
+"Introduction\n"
+"\n"
+"		The OO-Browser Graphical Interface\n"
+"\n"
+"	This program demonstrates a dynamic tree-drawing \n"
+"	algorithm developed by Sven Moen.  The algorithm is \n"
+"	published in \"IEEE Software\", July 1990, pp. 21-28.\n"
+"	If you desire more information than the description\n"
+"	given below, see the above-referenced article. \n"
+"\n"
+"	A number of the features mentioned herein are not\n"
+"	included in this version of the program.\n"
+"\n"
+"Algorithm\n"
+"\n"
+"	Unlike other algorithms, Moen's algorithm uses an \n"
+"	explicit representation of node and subtree contours\n"
+"	and it stores each contour as a polygon. \n"
+"\n"
+"	Trees with nodes of any polygonal shape can be drawn\n"
+"	compactly, and the data structure supports insert and\n"
+"	delete operations on subtrees.  The results are tidy\n"
+"	trees and efficient relayouts when the tree changes.\n"
+"\n"
+"	In the Layout step, the tree is traversed in depth-first\n"
+"	fashion until the leaf nodes are reached.  The contour\n"
+"	of each leaf node is formed by creating a linked list of\n"
+"	lines that wrap around the node's shape.  This is the \n"
+"	LayoutLeaf step.  As the return trip is made back to the\n"
+"	root, the contour of each interior node is formed by\n"
+"	joining the individual contours of each child. This Join\n"
+"	step involves a Merge step where the offset between\n"
+"	two neighboring contours is computed to avoid overlap. \n"
+"	Since the width of each subtree contour is known at\n"
+"	each step, each interior node is centered over its\n"
+"	children, and the subtree contour is extended to include\n"
+"	the interior node.  This is the AttachParent step.\n"
+"\n"
+"	In a dynamic update operation (insert or delete), the\n"
+"	algorithm reuses the contours not influenced by the\n"
+"	change and updates them efficiently. When a given \n"
+"	node changes, subtree contours at higher levels must\n"
+"	be disassembled before the change. This is called\n"
+"	the Unzip step, which call RuboutLeaf, Split, and\n"
+"	DetachParent, all inverses of LayoutLeaf, Join, and\n"
+"	AttachParent, respectively.  After the change is made,\n"
+"	the Zip step reassembles the contours by again calling\n"
+"	Layout, Join, and AttachParent.\n"
+"\n"
+"User Interface\n"
+"	\n"
+"	This program offers an interactive environment for \n"
+"	creating and updating trees of arbitrary size. Trees\n"
+"	can be loaded from a file or created on-the-fly.  You\n"
+"	can also save trees, and specify various layout and\n"
+"	animation options.  Each feature is associated with \n"
+"	a menu item which is explained in the next section.\n"
+"\n"
+"	When invoking the program, you may specify a single\n"
+"	argument indicating the name of a tree file. This file\n"
+"	will be loaded upon startup. If you start the program\n"
+"	without arguments, the canvas will be blank.\n"
+"\n"
+"Tree Menu\n"
+"\n"
+"	New Tree...	Create a new tree. You specify \n"
+"			a new root, and the existing tree, \n"
+"			if any, is deleted.\n"
+"\n"
+"	Load Tree...	Load a tree specification file.\n"
+"			(see the File Format section)\n"
+"\n"
+"	Save Tree...	Save a tree specification file.\n"
+"			(see the File Format section)\n"
+"\n"
+"	Quit		Exits the program.\n"
+"\n"
+"Layout Menu\n"
+"\n"
+"	Layout Spacing...\n"
+"			Displays a dialog that allows you\n"
+"			to change the spacing between nodes\n"
+"			on the same level and the spacing\n"
+"			between levels. \n"
+"\n"
+"	Align Nodes on Level\n"
+"			Adds a constraint to the layout\n"
+"			algorithm that forces all nodes\n"
+"			on the same level to have the same\n"
+"			x-position. This leads to truncation\n"
+"			of nodes if necessary. The maximum\n"
+"			node width is controlled by the\n"
+"			Level Spacing. By default, this is\n"
+"			disabled.\n"
+"\n"
+"Node Menu\n"
+"\n"
+"	This popup menu is invoked by pressing and holding\n"
+"	the left mouse button on a node. This menu offers\n"
+"	several actions that can be performed on nodes.\n"
+"\n"
+"	Add Child	Add a child to the node. The new child\n"
+"			is added after the bottommost child.\n"
+"\n"
+"	Add Sibling Before\n"
+"			Add a sibling before this node.\n"
+"\n"
+"	Add Sibling After\n"
+"			Add a sibling after this node.\n"
+"\n"
+"	Collapse Node	Collapses or expands the subtree\n"
+"	Expand Node	beginning at the specified node.\n"
+"			This operation is similiar to a\n"
+"			Delete operation, except that the\n"
+"			subtree is preserved so that you\n"
+"			can display it again. Collapsed\n"
+"			nodes are marked with a gray box.\n"
+"\n"
+"	Delete Node	Delete the subtree beginning at the\n"
+"			specified node.\n"
+"\n"
+"Tree File Format\n"
+"\n"
+"	If you wish to load a file, you can load a file created\n"
+"	by the OO-Browser with the {C-c d}, (br-xbr) command.\n"
+"\n"
+"	Node labels are sequences of characters delimited by\n"
+"	newlines or end-of-file. \n"
+"\n"
+"	Files must begin with an OO-Browser Environment path\n"
+"	name.  The next line must be a label, which indicates the\n"
+"	root node.  Optionally, lists containing labels may\n"
+"	follow. Each child label is indented two spaces more \n"
+"	its parent. Lists of labels are nested to produce trees. \n"
+"\n"
+"	For example, a three-level binary tree is as follows:\n"
+"\n"
+"		^^c++-^^~/OOBR\n"
+"		root node level1\n"
+"		  level2-1\n"
+"		    level3-1\n"
+"		    level3-2\n"
+"		  level2-2\n"
+"		    level3-3\n"
+"		    level3-4\n"
+"\n"
+"X11 Resources\n"
+"\n"
+"	Various settings in the program can be manipulated by \n"
+"	using X11 resources, specified either on the command\n"
+"	line or in a resource setting file. The supported \n"
+"	resources are:\n"
+"\n"
+"	tree.font:	Sets the font of the label nodes.\n"
+"			Default is \"fixed\".\n"
+"\n"
+"	tree.backgroundColor:\n"
+"			Sets the background color of the \n"
+"			canvas.  Default is \"white\".\n"
+"\n"
+"	tree.treeColor:	Sets the color of the displayed tree.\n"
+"			Default is \"black\".\n"
+"\n"
+"	tree.splitColor:\n"
+"			Sets the color of split contours which\n"
+"			appear during a dynamic update.\n"
+"			Default is \"goldenrod\".\n"
+"	\n"
+"	tree.highlightColor:\n"
+"			Sets the color of highlighted nodes.\n"
+"			Default is \"OrangeRed\".\n"
+"\n"
+"Help\n"
+"\n"
+"	If you are reading this, chances are that you found the\n"
+"	Help button on the menubar. \n"
+"\n"
+"Author\n"
+"	\n"
+"	This program was written by Mark L. Stern during\n"
+"	the summer of 1990.  It was redone by Bob Weiner for\n"
+"	use with the OO-Browser.\n"
+"\n"
+"	Stephan Zachwieja contributed the double-buffering\n"
+"	code used for smooth animations in this program.\n"
+"\n"
+"	The other authors have permitted Bob Weiner to distribute\n"
+"	the code freely as part of the OO-Browser.\n";
diff -r 4de2936b4e77 -r 0132846995bd pkg-src/tree-x/input.c
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pkg-src/tree-x/input.c	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,347 @@
+/* ----------------------------------------------------------------------------
+ * File    : input.c
+ * Purpose : input routine to create a Tree from an input file
+ * ----------------------------------------------------------------------------
+ */
+
+#include <ctype.h>
+#include <string.h>
+#include "defs.h"
+#include "tree.h"
+#include "input.h"
+
+char *EnvNm;                 /* Stores name of current Envir file */
+static int tokDepth = 0;     /* Depth in tree of current token */
+static int prevTokDepth;     /* Depth in tree of prev token */
+
+static void SaveSubtree();
+
+/* ----------------------------------------------------------------------------
+ * 
+ *   GetNextToken() reads the next token from the file indicated by 'fp' and
+ *   returns a token. If the token is TOKEN_LABEL, the lexeme is returned
+ *   in 'lexeme'. If memory could not be allocated for 'lexeme', it is NULL.
+ * 
+ *   The following tokens are supported:
+ * 
+ *     - TOKEN_LABEL: a string of characters, up to 'TOKEN-MAXSIZ'
+ *       characters, delimited by number of leading spaces and newlines.
+ *       If a label has more than this number of characters, the rest are
+ *       ignored. 
+ *     - TOKEN_EOF
+ * 
+ * ----------------------------------------------------------------------------
+ */
+
+int
+  GetNextToken(fp, lexeme)
+FILE *fp;
+char **lexeme;
+{
+  static   char  lexbuf[INPUT_BUFSIZ];
+  register char *curbuf = lexbuf;
+  register int   charct = 0;
+  register int   c;
+  int done = FALSE;
+  
+  prevTokDepth = tokDepth;
+  tokDepth = 0;
+  
+  c = getc(fp);
+  
+  /* skip over leading whitespace */
+  while (c == ' ')
+    {
+      tokDepth++;
+      c = getc(fp);
+    }
+  tokDepth /= 2;
+  
+  while (1)
+    {
+      switch (c)
+	{
+	case EOF:
+	  return (TOKEN_EOF);
+	case '\n':
+	  *curbuf = '\0';
+	  *lexeme = strdup(lexbuf);
+	  return (TOKEN_LABEL);
+	  break;
+	default:
+	  *curbuf++ = c;
+	  charct++;
+	  /* check for buffer overflow */
+	  if (charct >= TOKEN_MAXSIZ)
+	    {
+	      *curbuf = '\0';
+	      *lexeme = strdup(lexbuf);
+	      /* since buffer is full, skip over remaining chars */
+	      c = getc(fp);
+	      while (c != '\n' && c != EOF)
+		c = getc(fp);
+	      if (c == EOF)
+		ungetc(c, fp);
+	      return (TOKEN_LABEL);
+	    }
+	  else
+	    c = getc(fp);
+	}
+    }
+}
+
+
+/* ----------------------------------------------------------------------------
+ * 
+ *   SetNodeLabelAndValue() sets the label text of the specified node and
+ *   stores any string value following the label and preceded by a "^^"
+ *   delimiter. 
+ * 
+ * ----------------------------------------------------------------------------
+ */
+
+void
+SetNodeLabelAndValue(node, label_and_value)
+   Tree *node;
+   char *label_and_value;
+{
+   char*       val;
+
+   if (val = strstr(label_and_value, "^^"))
+       {
+           /* Set node value to string following ^^ delimiter. */
+           node->value = val+2;
+           /* Erase value from input string, leaving only label. */
+           *val = '\0';
+       }
+   else
+       {   node->value = NULL; }
+   SetNodeLabel(node, label_and_value);
+}
+
+
+/* ----------------------------------------------------------------------------
+ * 
+ *   ReadTreeFromFile() takes a filename argument and constructs
+ *   a Tree from the labels in the file. If a tree could be constructed,
+ *   even partially, it is returned by the function. NULL is returned if
+ *   the file could not be opened or there was insufficient memory for
+ *   creating the tree.
+ * 
+ * ----------------------------------------------------------------------------
+ */
+
+Tree*
+  ReadTreeFromFile(fname, error)
+char *fname;
+ErrCode *error;
+{
+  FILE *infile;
+  int   inside_list = 0;	/* for semantic checking */
+  int   first_child = TRUE;
+  
+  int   token;
+  char *label;
+  
+  Tree *tree = NULL;		/* the return value of this function  */
+  Tree *parent = NULL;		/* parent of 'node'                   */
+  Tree *node;			/* current node                       */
+  Tree *new_node;		/* new node to add after current node */
+  
+  *error = ERR_NONE;
+  
+  infile = fopen(fname, "r");
+  if (infile == NULL)
+    {
+      *error = ERR_OPENFAIL;
+      return (NULL);
+    }
+  
+  /* first line of file is Envir file name, save */
+  token = GetNextToken(infile, &label);
+  if (token == TOKEN_EOF)
+    {
+      *error = ERR_EMPTYFILE;
+      fclose(infile);
+      return (NULL);
+    }
+  else if (token == TOKEN_LABEL)
+    {
+      if (label == NULL)
+	{
+	  *error = ERR_MEMALLOC;
+	  fclose(infile);
+	  return (NULL);
+	}
+      EnvNm = strdup(label);
+    }
+  
+  /* set up root node */
+  token = GetNextToken(infile, &label);
+  if (token == TOKEN_EOF)
+    {
+      *error = ERR_EMPTYFILE;
+      fclose(infile);
+      return (NULL);
+    }
+  else if (token == TOKEN_LABEL)
+    {
+      if (label == NULL)
+	{
+	  *error = ERR_MEMALLOC;
+	  fclose(infile);
+	  return (NULL);
+	}
+      tree = MakeNode();
+      if (tree == NULL)
+	{
+	  *error = ERR_MEMALLOC;
+	  fclose(infile);
+	  free(label);
+	  return(NULL);
+	}
+      SetNodeLabelAndValue(tree, label);
+      tree->parent = NULL;
+      node = tree;
+    }
+  else
+    {
+      *error = ERR_NOROOT;
+      fclose(infile);
+      return (NULL);
+    }
+  
+  /* add children and siblings */
+  while (1)
+    {
+      token = GetNextToken(infile, &label);
+      if (token == TOKEN_EOF)
+	break;
+      
+      if (tokDepth > prevTokDepth)  /* then new subtree */
+	{
+	  inside_list++;
+	  first_child = TRUE;
+	  parent = node;
+	}
+      else if (tokDepth < prevTokDepth)  /* then end of subtree */
+	if (!inside_list)
+	  {
+	    *error = ERR_NOBEGIN;
+	    fclose(infile);
+	    return (tree);
+	  }
+	else
+	  while (tokDepth < inside_list)
+	    {
+	      inside_list--;
+	      node = node->parent;
+	      parent = node->parent;
+	    }
+      
+      if (label == NULL)
+	{
+	  *error = ERR_MEMALLOC;
+	  fclose(infile);
+	  return (tree);
+	}
+      if (parent == NULL)
+	{
+	  *error = ERR_MANYROOT;
+	  fclose(infile);
+	  free(label);
+	  return (tree);
+	}
+      else
+	{
+	  new_node = MakeNode();
+	  if (new_node == NULL)
+	    {
+	      *error = ERR_MEMALLOC;
+	      fclose(infile);
+	      free(label);
+	      return (tree);
+	    }
+	  SetNodeLabelAndValue(new_node, label);
+	  new_node->parent = parent;
+	  
+	  if (first_child)
+	    {
+	      new_node->parent->child = new_node;
+	      first_child = FALSE;
+	    }
+	  else
+	    node->sibling = new_node;
+	  
+	  node = new_node;
+/*
+ *	  printf("%3d tok: '%s'; tokDepth: %d; prevTokDepth: %d; inside_list: %d\n",
+ *	     NumNodes, node->label.text, tokDepth, prevTokDepth, inside_list);
+ */
+	}
+    }
+  fclose(infile);
+  return (tree);
+}
+
+
+/* ----------------------------------------------------------------------------
+ * 
+ *   SaveTreeToFile() takes a tree and saves it to a file specified by 'fname.'
+ *   If the file could not be opened for writing, False is returned. Otherwise,
+ *   True is returned.
+ * 
+ * ----------------------------------------------------------------------------
+ */
+
+SaveTreeToFile(tree, fname)
+     Tree *tree;
+     char *fname;
+{
+  FILE *outfile;
+  
+  outfile = fopen(fname, "w");
+  if (outfile == NULL)
+    return (FALSE);
+  
+  fprintf(outfile, "%s\n", EnvNm);   /* Save Env File Name */
+  fprintf(outfile, "%s\n", tree->label.text);
+  if (tree->child)
+    SaveSubtree(tree->child, 0, outfile);
+  
+  fclose(outfile);
+  return (TRUE);
+}
+
+
+/* ----------------------------------------------------------------------------
+ * 
+ *   SaveSubtree() is the recursive procedure that supports SaveTreeToFile().
+ *
+ * ----------------------------------------------------------------------------
+ */
+
+static void
+  SaveSubtree(tree, level, fp)
+Tree *tree;
+int level;
+FILE *fp;
+{
+  int i;
+  
+  level++;
+  for ( ; tree ; tree = tree->sibling)
+    {
+      for (i = 0 ; i < level ; i++)
+	{
+	  putc(' ', fp);
+	  putc(' ', fp);
+	}
+      fprintf(fp, "%s\n", tree->label.text);
+      if (tree->child)
+	SaveSubtree(tree->child, level, fp);
+    }
+  level--;
+}
+
+
diff -r 4de2936b4e77 -r 0132846995bd pkg-src/tree-x/input.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pkg-src/tree-x/input.h	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,37 @@
+/* ----------------------------------------------------------------------------
+ * File    : input.h
+ * Purpose : header file for input.c
+ * ----------------------------------------------------------------------------
+ */
+
+#define TOKEN_MAXSIZ          1023             /* maximum size of token      */
+#define INPUT_BUFSIZ          TOKEN_MAXSIZ + 1 /* allow for terminating null */
+/*
+ *  #define DELIMITER_BEGIN_LIST '{'
+ *  #define DELIMITER_END_LIST   '}'
+ */ 
+
+/* Possible token types in file */
+
+enum { TOKEN_LABEL,
+/*
+ *     TOKEN_BEGIN_LIST,
+ *     TOKEN_END_LIST,
+ */
+       TOKEN_EOF };
+
+
+typedef enum { 
+   ERR_OPENFAIL,
+   ERR_EMPTYFILE,
+   ERR_MEMALLOC,
+   ERR_NOBEGIN,
+   ERR_NOEND,
+   ERR_NOROOT,
+   ERR_MANYROOT,
+   ERR_NONE,
+} ErrCode;
+
+#define NUM_ERRS             7	/* don't count ERR_NONE */
+
+
diff -r 4de2936b4e77 -r 0132846995bd pkg-src/tree-x/intf.c
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pkg-src/tree-x/intf.c	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,2004 @@
+/* ----------------------------------------------------------------------------
+ * File    : intf.c
+ * Purpose : X11/Athena interface code
+ * ----------------------------------------------------------------------------
+ */
+
+#define GLOBALS 1
+
+#include <stdio.h>
+#include <string.h>
+#include <fcntl.h>
+
+#include <X11/IntrinsicP.h>
+#include <X11/ShellP.h>
+
+#include <X11/Intrinsic.h>
+#include <X11/StringDefs.h>
+
+#ifdef XAW3D
+  #include <X11/Xaw3d/Box.h>
+  #include <X11/Xaw3d/Simple.h>
+  #include <X11/Xaw3d/MenuButton.h>
+  #include <X11/Xaw3d/SimpleMenu.h>
+  #include <X11/Xaw3d/SmeBSB.h>
+  #include <X11/Xaw3d/SmeLine.h>
+  #include <X11/Xaw3d/Form.h>
+  #include <X11/Xaw3d/Label.h>
+  #include <X11/Xaw3d/Dialog.h>
+  #include <X11/Xaw3d/AsciiText.h>
+  #include <X11/Xaw3d/AsciiSrc.h>
+  #include <X11/Xaw3d/Viewport.h>
+  #include <X11/Xaw3d/Scrollbar.h>
+  #include <X11/Xaw3d/Paned.h>
+  #include <X11/Xaw3d/Panner.h>
+  #include <X11/Xaw3d/Reports.h>
+#else  
+  #include <X11/Xaw/Box.h>
+  #include <X11/Xaw/Simple.h>
+  #include <X11/Xaw/MenuButton.h>
+  #include <X11/Xaw/SimpleMenu.h>
+  #include <X11/Xaw/SmeBSB.h>
+  #include <X11/Xaw/SmeLine.h>
+  #include <X11/Xaw/Form.h>
+  #include <X11/Xaw/Label.h>
+  #include <X11/Xaw/Dialog.h>
+  #include <X11/Xaw/AsciiText.h>
+  #include <X11/Xaw/AsciiSrc.h>
+  #include <X11/Xaw/Viewport.h>
+  #include <X11/Xaw/Scrollbar.h>
+  #include <X11/Xaw/Paned.h>
+  #include <X11/Xaw/Panner.h>
+  #include <X11/Xaw/Reports.h>
+  #endif
+
+#include "defs.h"
+#include "tree.h"
+#include "dbl.h"
+#include "intf.h"
+#include "rsrc.h"
+#include "input.h"
+#include "help.h"
+
+#include <X11/cursorfont.h>
+
+
+/* ------------------------------------------------------------------------- */
+/*				Global Variables                             */
+/* ------------------------------------------------------------------------- */
+
+extern char  *EnvNm;    /* Stores name of current Envir file */
+
+Atom	      wm_delete_window;
+Widget        TreeTopLevel;
+Widget        TreeDrawingArea;
+Display      *TreeDisplay;
+XtAppContext  app;
+int           TreeScreen;
+int           TreeContourWidth;
+int           TreeBorderSize = BORDER_SIZE;
+int           TreeParentDistance = PARENT_DISTANCE;
+XFontStruct  *TreeLabelFont;
+DoubleBuffer *TreeDrawingAreaDB;
+ContourOption TreeShowContourOption = NoContours;
+DensityOption TreeLayoutDensity = Fixed;
+char          TreeShowSteps =  FALSE;
+char          TreeAlignNodes = FALSE;
+char          PauseAfterStep    = FALSE;
+
+/* ------------------------------------------------------------------------- */
+/*				Local Variables                              */
+/* ------------------------------------------------------------------------- */
+
+static Tree *PopupNode;		/* node selected for popup */
+static NodePosition NodePos;
+
+static Widget mainWindow;
+static Widget topForm;
+
+static Widget statusLabel;
+static Widget statusText;
+
+static Widget scrolledWindow;
+
+static Widget helpShell;
+static Widget helpForm;
+static Widget helpScrollWindow;
+static Widget helpText;
+static Widget helpDoneButton;
+static Widget helpTitle;
+static Widget helpFrame;
+
+static Widget treeMenubar;
+static Widget treeMenus[NUM_MENUS];
+static Widget treeMenuBtns[NUM_MENUS - 1];   /* don't need button for */
+					     /* node popup menu       */
+
+static Widget treeMenuItems[TREE_MENU_ITEMS];
+static Widget layoutMenuItems[LAYOUT_MENU_ITEMS];
+static Widget nodeMenuItems[NODE_MENU_ITEMS];
+static Widget helpBtn;
+
+static String labelStr[NUM_MENU_STRS];
+static String errStr[NUM_ERRS];
+
+static Widget dialog[NUM_DLG];
+
+/* globals used for state values */
+
+static Widget dlgLevelScale, dlgLevelValuator, 
+              dlgSiblingValuator, dlgSiblingScale;
+static int dlgLevelValue;
+static int dlgSiblingValue;
+static int loading_file = 0;
+
+static Pixmap check_pixmap, slider_pixmap;
+
+static Boolean nodeFound;
+
+static int    PauseTime         = ANIMATION_SPEED_FAST;
+static Cursor PauseCursor;
+
+static XtResource applRsrcsDesc[] = {
+   {
+      TrNbackgroundColor,       TrCBackgroundColor,
+      XtRPixel,                 sizeof(Pixel),
+      XtOffset(ApplRsrcDataPtr, background_color),
+      XtRString,                TrDefaultBackgroundColor
+   },
+   {
+      TrNtreeColor,             TrCTreeColor,
+      XtRPixel,                 sizeof(Pixel),
+      XtOffset(ApplRsrcDataPtr, tree_color),
+      XtRString,                TrDefaultTreeColor
+   },
+   {
+      TrNcontourColor,          TrCContourColor,
+      XtRPixel,                 sizeof(Pixel),
+      XtOffset(ApplRsrcDataPtr, contour_color),
+      XtRString,                TrDefaultContourColor
+   },
+   {
+      TrNsplitColor,            TrCSplitColor,
+      XtRPixel,                 sizeof(Pixel),
+      XtOffset(ApplRsrcDataPtr, split_color),
+      XtRString,                TrDefaultSplitColor
+   },
+   {
+      TrNhighlightColor,        TrCHighlightColor,
+      XtRPixel,                 sizeof(Pixel),
+      XtOffset(ApplRsrcDataPtr, highlight_color),
+      XtRString,                TrDefaultHighlightColor
+   },
+   {
+      TrNactionColor,           TrCActionColor,
+      XtRPixel,                 sizeof(Pixel),
+      XtOffset(ApplRsrcDataPtr, action_color),
+      XtRString,                TrDefaultActionColor
+   },
+   {
+      TrNcontourWidth,          TrCContourWidth,
+      XtRInt,                   sizeof(int),
+      XtOffset(ApplRsrcDataPtr, contour_width),
+      XtRImmediate,             (XtPointer) TrDefaultContourWidth
+   },
+};
+
+static void popdown_action();
+static void activate_action();
+static void quit_action();
+static void Action();
+
+static void select_action();
+static void button_action();
+static void menu_popup_action();
+
+static void set_levelscale_CB();
+static void levelscale_CB();
+static void set_siblingscale_CB();
+static void siblingscale_CB();
+static void set_levelvalue_CB();
+static void set_siblingvalue_CB();
+static void levelvalue_CB();
+static void siblingvalue_CB();
+
+static void center_widget();
+
+static XtActionsRec local_actions[] = {
+  {"wmpopdown", popdown_action},
+  {"dlg_activate", activate_action},
+  {"node_select", select_action},
+  {"node_menu_prepare", button_action},
+  {"maybe_menu_popup", menu_popup_action},
+  {"quit", quit_action},
+};
+
+String fallback_resources[]  = {
+"*statusText.width:                      310",
+"*treeDrawingArea.width:                 310",
+"*treeDrawingArea.height:                400",
+"*Text.Font:	      -*-lucidatypewriter-medium-r-*-*-12-*-*-*-*-*-iso8859-1",
+"*Label.Font:	      -*-helvetica-medium-r-*-*-12-*-*-*-*-*-iso8859-1",
+"*Command.Font:	      -*-helvetica-bold-r-*-*-12-*-*-*-*-*-iso8859-1",
+"*SimpleMenu.Font:    -*-helvetica-bold-r-*-*-12-*-*-*-*-*-iso8859-1",
+"*SmeBSB.Font:	      -*-helvetica-bold-r-*-*-12-*-*-*-*-*-iso8859-1",
+"*MenuButton.Font:    -*-helvetica-bold-r-*-*-12-*-*-*-*-*-iso8859-1",
+"*List.Font:	      -*-helvetica-bold-r-*-*-12-*-*-*-*-*-iso8859-1",
+"*treeMenuBtn.label:			Tree",
+"*layoutMenuBtn.label:			Layout",
+"*helpBtn.label:			Help...",
+"*treeMenu*treeMenuNew.label:		New Tree",
+"*treeMenu*treeMenuLoad.label:		Load Tree",
+"*treeMenu*treeMenuSave.label:		Save Tree",
+"*treeMenu*treeMenuQuit.label:		Quit",
+"*layoutMenu*layoutMenuFixed.label:	Fixed",
+"*layoutMenu*layoutMenuVariable.label:	Variable",
+"*layoutMenu*layoutMenuSpacing.label:	Spacing...",
+"*layoutMenu*layoutMenuAlignNodes.label: Align Nodes on Level",
+"*dlgNewTree.title:			New Tree",
+"*dlgNodeName.title:			Node Name",
+"*dlgInfo.title:			Information",
+"*dlgError.title:			Error!",
+"*dlgSpacing.title:			Tree Node Spacing",
+"*helpShell.title:			Help",
+"*dlgNewTreeForm.label:			Enter name of root node:",
+"*dlgNodeNameForm.label:		Enter name of new node:",
+"*dlgFileForm.label:			Enter name of file:",
+"*dlgInfoForm.label:			Information:",
+"*dlgErrorForm.label:			Error:",
+"*dlgSpacing.label:			Spacing Dialog",
+"*dlgLevelLabel.label:			Level spacing:",
+"*dlgSiblingLabel.label:		Sibling spacing:",
+"*dlgLevelValuator.width:		40",
+"*dlgLevelValuator.width:		40",
+"*dlgNewTreeOk.label:			Ok",
+"*dlgNewTreeCancel.label:		Cancel",
+"*dlgFileOk.label:			Ok",
+"*dlgFileCancel.label:			Cancel",
+"*dlgInfoButton.label:			Acknowledged",
+"*dlgErrorButton.label:			Acknowledged",
+"*dlgOkButton.label:			Ok",
+"*dlgCancelButton.label:		Cancel",
+"*dlgNodeNameOk.label:			Ok",
+"*dlgNodeNameCancel.label:		Cancel",
+"*helpDoneButton.label:			Dismiss",
+"*helpTitle.label:			Help for Drawing Dynamic Trees",
+"*treeDrawingArea.Translations: #override \\n\
+                                <Btn1Down>:	node_select(EDIT)\\n\
+                                <Btn2Down>:	node_select(VIEW)\\n\
+                                <Btn3Down>:	XawPositionSimpleMenu(nodeMenu)node_menu_prepare()XtMenuPopup(nodeMenu)\\n",
+NULL,
+};
+
+static ApplRsrcData    applRsrcs;
+static ApplRsrcDataPtr applRsrcsPtr;
+
+/* included bitmaps */
+
+#define gray_width 8
+#define gray_height 8
+static unsigned char gray_bits[] = {
+  0x55, 0xaa, 0x55, 0xaa, 0x55, 0xaa, 0x55, 0xaa
+};
+
+/* This is a check mark stolen from the xmh application. :) */
+#define check_width 9
+#define check_height 8
+static unsigned char check_bits[] = {
+  0x00, 0x01, 0x80, 0x01, 0xc0, 0x00, 0x60, 0x00,
+  0x31, 0x00, 0x1b, 0x00, 0x0e, 0x00, 0x04, 0x00
+};
+
+#define slider_pixmap_width 4
+#define slider_pixmap_height 4
+static char slider_pixmap_bits[] = {
+  0x05, 0x0a, 0x05, 0x0a
+};
+
+/* ------------------------------------------------------------------------- */
+/*			 Forward Function Declarations                       */
+/* ------------------------------------------------------------------------- */
+
+static void popup_dialog();
+
+static void Quit_CB();
+
+static void Contours_CB();
+static void ShowContours_CB();
+static void Pause_CB();
+static void Speed_CB();
+
+static void Help_CB();
+static void HelpDone_CB();
+static void Scale_CB();
+
+static void TreeMenu_CB();
+static void LayoutMenu_CB();
+static void NodeMenu_CB();
+
+static void NodeLabel_CB();
+static void NewTree_CB();
+static void File_CB();
+
+static void Popdown_CB();
+static void ButtonHandler();
+
+extern void ExposeHandler();
+
+/* ------------------------------------------------------------------------- */
+/*				   Functions                                 */
+/* ------------------------------------------------------------------------- */
+
+/* ----------------------------------------------------------------------------
+ * 
+ *   Status() displays the specified text in the status area.
+ *   'urgent' overrides the value of TreeShowSteps.
+ * 
+ * ----------------------------------------------------------------------------
+ */
+
+void
+StatusMsg(msg, urgent)
+     char *msg;
+     int  urgent;
+{
+  if (TreeShowSteps || urgent) 
+    XtVaSetValues(statusText, XtNlabel, msg, NULL);
+}
+
+
+/* ----------------------------------------------------------------------------
+ * 
+ *  Pause is a trivial function, for the benefit of interface-dependent code
+ *  inside tree.c. This avoids having to include X11 stuff inside that file.
+ *  PauseTime is expected to contain an integer indicating 1/10ths of a sec.
+ * 
+ * ----------------------------------------------------------------------------
+ */
+
+void
+Pause()
+{
+  XEvent event;
+  
+  if (PauseAfterStep) {
+    XGrabKeyboard(TreeDisplay, XtWindow(TreeTopLevel), False,
+		  GrabModeAsync, GrabModeAsync, CurrentTime);
+    XGrabPointer(TreeDisplay, XtWindow(TreeTopLevel), False,
+		 ButtonPressMask | ButtonReleaseMask,
+		 GrabModeAsync, GrabModeAsync, None,
+		 PauseCursor, CurrentTime);
+    XMaskEvent(TreeDisplay, ButtonPressMask | KeyPress, &event);
+    XUngrabPointer(TreeDisplay, CurrentTime);
+    XUngrabKeyboard(TreeDisplay, CurrentTime);
+  }
+  else if (TreeShowSteps) {
+    XSync(TreeDisplay, 0);
+    usleep(PauseTime * 100000);
+  }
+}
+
+/* ----------------------------------------------------------------------------
+ * 
+ *   BuildPopupMenus() builds the popup menus for use in the application
+ *   window.
+ * 
+ * ----------------------------------------------------------------------------
+ */
+
+void
+BuildPopupMenus(parent)
+     Widget parent;
+{
+  Arg      args[2];
+  String   xstr;
+  
+  labelStr[STR_NODE_COLLAPSE] = "Collapse Node";
+  labelStr[STR_NODE_EXPAND]   = "Expand Node";
+  
+  treeMenus[NODE_MENU] = XtVaCreatePopupShell("nodeMenu",
+					      simpleMenuWidgetClass,
+					      parent, 
+					      XtNlabel, " ",
+					      NULL);
+  
+  (void)  XtVaCreateManagedWidget("nodeMenuAddChild", smeLineObjectClass,
+				  treeMenus[NODE_MENU],
+				  NULL);
+  
+  nodeMenuItems[NODE_MENU_ADD_CHILD] = 
+    XtVaCreateManagedWidget("nodeMenuAddChild", smeBSBObjectClass,
+			    treeMenus[NODE_MENU],
+			    XtNlabel, "Add Child",
+			    NULL);
+  XtAddCallback(nodeMenuItems[NODE_MENU_ADD_CHILD],
+		XtNcallback, NodeMenu_CB, (XtPointer) NODE_MENU_ADD_CHILD);
+  
+  nodeMenuItems[NODE_MENU_ADD_BEFORE] = 
+    XtVaCreateManagedWidget("nodeMenuAddSiblingBefore", smeBSBObjectClass,
+			    treeMenus[NODE_MENU],
+			    XtNlabel, "Add Sibling Before",
+			    NULL);
+  XtAddCallback(nodeMenuItems[NODE_MENU_ADD_BEFORE],
+		 XtNcallback, NodeMenu_CB, (XtPointer) NODE_MENU_ADD_BEFORE);
+		 
+   nodeMenuItems[NODE_MENU_ADD_AFTER] = 
+       XtVaCreateManagedWidget("nodeMenuAddSiblingAfter", smeBSBObjectClass,
+			       treeMenus[NODE_MENU],
+			       XtNlabel, "Add Sibling After",
+			       NULL);
+   XtAddCallback(nodeMenuItems[NODE_MENU_ADD_AFTER],
+		 XtNcallback, NodeMenu_CB, (XtPointer) NODE_MENU_ADD_AFTER);
+
+   nodeMenuItems[NODE_MENU_ELISION] =
+       XtVaCreateManagedWidget("nodeMenuElision", smeBSBObjectClass,
+			       treeMenus[NODE_MENU],
+			       XtNlabel, labelStr[STR_NODE_COLLAPSE],
+			       NULL);
+   XtAddCallback(nodeMenuItems[NODE_MENU_ELISION],
+		 XtNcallback, NodeMenu_CB, (XtPointer) NODE_MENU_ELISION);
+
+   
+   nodeMenuItems[NODE_MENU_DELETE] =
+       XtVaCreateManagedWidget("nodeMenuDeleteNode", smeBSBObjectClass,
+			       treeMenus[NODE_MENU],
+			       XtNlabel, "Delete Node",
+			       NULL);
+   XtAddCallback(nodeMenuItems[NODE_MENU_DELETE],
+		 XtNcallback, NodeMenu_CB, (XtPointer) NODE_MENU_DELETE);
+
+		 
+}
+
+/* ----------------------------------------------------------------------------
+ * 
+ *   BuildMenubar() builds the menubar that appears in the main window.
+ * 
+ * ----------------------------------------------------------------------------
+ */
+
+
+void
+BuildMenubar(parent)
+   Widget parent;
+{
+   Arg args[4];
+   int i;
+   Widget box;
+
+   box = XtVaCreateManagedWidget("menuBox",
+				 boxWidgetClass,
+				 parent,
+				 XtNshowGrip, FALSE,
+				 XtNborderWidth, 0,
+				 NULL);
+				 
+
+   /* menu button widgets */
+   treeMenuBtns[TREE_MENU] = 
+       XtVaCreateManagedWidget("treeMenuBtn",
+			       menuButtonWidgetClass,
+			       box,
+			       XtNmenuName, "treeMenu",
+			       NULL);
+   treeMenuBtns[LAYOUT_MENU] =
+       XtVaCreateManagedWidget("layoutMenuBtn",
+			       menuButtonWidgetClass,
+			       box,
+			       XtNmenuName, "layoutMenu",
+			       NULL);
+
+   helpBtn = XtVaCreateManagedWidget("helpBtn",
+				     commandWidgetClass,
+				     box,
+				     NULL);
+
+   XtAddCallback(helpBtn, XtNcallback, Help_CB, NULL);
+
+   /* create pulldwon menus */
+
+   treeMenus[TREE_MENU] = XtVaCreatePopupShell("treeMenu",
+					       simpleMenuWidgetClass,
+					       treeMenuBtns[TREE_MENU],
+					       NULL, 0);
+   treeMenus[LAYOUT_MENU] = XtVaCreatePopupShell("layoutMenu",
+						 simpleMenuWidgetClass,
+						 treeMenuBtns[LAYOUT_MENU],
+						 NULL, 0);
+
+
+   /* adding menu entries */
+   
+   /* Tree menu */
+
+   treeMenuItems[TREE_MENU_NEW] = 
+       XtVaCreateManagedWidget("treeMenuNew", smeBSBObjectClass,
+			       treeMenus[TREE_MENU],
+			       NULL);
+   XtAddCallback(treeMenuItems[TREE_MENU_NEW],
+		 XtNcallback, TreeMenu_CB, TREE_MENU_NEW);
+   
+   treeMenuItems[TREE_MENU_LOAD] = 
+       XtVaCreateManagedWidget("treeMenuLoad", smeBSBObjectClass,
+			       treeMenus[TREE_MENU],
+			       NULL);
+   XtAddCallback(treeMenuItems[TREE_MENU_LOAD],
+		 XtNcallback, TreeMenu_CB, (XtPointer) TREE_MENU_LOAD);
+		 
+   treeMenuItems[TREE_MENU_SAVE] = 
+       XtVaCreateManagedWidget("treeMenuSave", smeBSBObjectClass,
+			       treeMenus[TREE_MENU],
+			       NULL);
+   XtAddCallback(treeMenuItems[TREE_MENU_SAVE],
+		 XtNcallback, TreeMenu_CB, (XtPointer) TREE_MENU_SAVE);
+		 
+   treeMenuItems[TREE_MENU_SEP1] = 
+       XtVaCreateManagedWidget("treeMenuSep1", smeLineObjectClass,
+			       treeMenus[TREE_MENU],
+			       NULL);
+
+#ifdef COMMENT
+   treeMenuItems[TREE_MENU_STATS] = 
+       XtVaCreateManagedWidget("treeMenuStats", smeBSBObjectClass,
+			       treeMenus[TREE_MENU],
+			       XtNlabel, labelStr[STR_SHOW_STATS],
+			       NULL);
+
+   XtAddCallback(treeMenuItems[TREE_MENU_STATS],
+		 XtNcallback, TreeMenu_CB, (XtPointer) TREE_MENU_STATS);
+
+   XtSetSensitive(treeMenuItems[TREE_MENU_STATS], FALSE);
+
+   treeMenuItems[TREE_MENU_SEP2] = 
+       XtVaCreateManagedWidget("treeMenuSep2", smeLineObjectClass,
+			       treeMenus[TREE_MENU],
+			       NULL);
+#endif /* COMMENT */
+   
+   treeMenuItems[TREE_MENU_QUIT] = 
+       XtVaCreateManagedWidget("treeMenuQuit", smeBSBObjectClass,
+			       treeMenus[TREE_MENU],
+			       NULL);
+   XtAddCallback(treeMenuItems[TREE_MENU_QUIT],
+		 XtNcallback, TreeMenu_CB, (XtPointer) TREE_MENU_QUIT);
+		 
+
+
+   /* Layout menu */
+
+#ifdef COMMENT
+   treeMenuItems[LAYOUT_MENU_FIXED] = 
+       XtVaCreateManagedWidget("layoutMenuFixed", smeBSBObjectClass,
+			       treeMenus[LAYOUT_MENU],
+			       XtNleftMargin, 18,
+			       NULL);
+
+   XtAddCallback(treeMenuItems[LAYOUT_MENU_FIXED],
+		 XtNcallback, LayoutMenu_CB, (XtPointer) LAYOUT_MENU_FIXED);
+
+   treeMenuItems[LAYOUT_MENU_VARIABLE] = 
+       XtVaCreateManagedWidget("layoutMenuVariable", smeBSBObjectClass,
+			       treeMenus[LAYOUT_MENU],
+			       XtNleftMargin, 18,
+			       NULL);
+
+   XtAddCallback(treeMenuItems[LAYOUT_MENU_VARIABLE],
+		 XtNcallback, LayoutMenu_CB, (XtPointer) LAYOUT_MENU_VARIABLE);
+
+
+   treeMenuItems[LAYOUT_MENU_SEP1] = 
+       XtVaCreateManagedWidget("layoutSep1", smeLineObjectClass,
+			       treeMenus[LAYOUT_MENU],
+			       NULL);
+#endif /* COMMENT */
+
+   treeMenuItems[LAYOUT_MENU_SPACING] = 
+       XtVaCreateManagedWidget("layoutMenuSpacing", smeBSBObjectClass,
+			       treeMenus[LAYOUT_MENU],
+			       XtNleftMargin, 18,
+			       NULL);
+   XtAddCallback(treeMenuItems[LAYOUT_MENU_SPACING],
+		 XtNcallback, LayoutMenu_CB, (XtPointer) LAYOUT_MENU_SPACING);
+
+   treeMenuItems[LAYOUT_MENU_SEP2] = 
+       XtVaCreateManagedWidget("layoutMenuSep2", smeLineObjectClass,
+			       treeMenus[LAYOUT_MENU],
+			       NULL);
+
+   /* the following is a toggle button - we hack it using a bitmap */
+   treeMenuItems[LAYOUT_MENU_ALIGN_NODES] = 
+       XtVaCreateManagedWidget("layoutMenuAlignNodes", smeBSBObjectClass,
+			       treeMenus[LAYOUT_MENU],
+			       XtNleftMargin, 18,
+			       NULL);
+   XtAddCallback(treeMenuItems[LAYOUT_MENU_ALIGN_NODES],
+		 XtNcallback, LayoutMenu_CB, 
+		 (XtPointer) LAYOUT_MENU_ALIGN_NODES);
+
+}
+
+/* ----------------------------------------------------------------------------
+ * 
+ *   BuildDialogs() builds all the dialogs used in this application. 
+ * 
+ * ----------------------------------------------------------------------------
+ */
+
+
+BuildDialogs(parent)
+     Widget parent;
+{
+  int	i;
+  Widget 
+    tmpwidget, dlgForm, dlgValue, 
+    dlgLevelLabel, dlgSiblingLabel, 
+    dlgOkButton, dlgCancelButton;
+  
+  labelStr[STR_LOAD_FILE] = "Name of file to load:";
+  labelStr[STR_SAVE_FILE] = "Name of file to save:";
+  
+  errStr[ERR_OPENFAIL]  = "Failed to open file.";
+  errStr[ERR_EMPTYFILE] = "Input file is empty.";
+  errStr[ERR_MEMALLOC]  = "Memory allocation failed.";
+  errStr[ERR_NOBEGIN] = "End of list does not have a matching beginning.";
+  errStr[ERR_NOEND] = "Beginning of list does not have a matching end.";
+  errStr[ERR_NOROOT] = "Input file does not have a root label.";
+  errStr[ERR_MANYROOT] = "Input file has more than one root label.";
+  
+  
+  dialog[DLG_NEW] = XtVaCreatePopupShell("dlgNewTree",
+					 transientShellWidgetClass,
+					 parent,
+					 XtNresizable, TRUE,
+					 NULL);
+  
+  tmpwidget = XtVaCreateManagedWidget("dlgNewTreeForm",
+				      dialogWidgetClass,
+				      dialog[DLG_NEW], 
+				      XtNresizable, TRUE,
+				      XtNvalue, "",
+				      NULL);
+  
+  XawDialogAddButton(tmpwidget, "dlgNewTreeOk", NewTree_CB, 
+		     (XtPointer) TRUE);
+  XawDialogAddButton(tmpwidget, "dlgNewTreeCancel", NewTree_CB, 
+		     (XtPointer) FALSE);
+  
+  dlgValue = XtNameToWidget(tmpwidget, "value");
+  
+  XtOverrideTranslations
+    (dlgValue, XtParseTranslationTable
+     ("<Key>Return:dlg_activate(dlgNewTreeOk)\n"));
+  
+  
+  dialog[DLG_NODE_NAME] = XtVaCreatePopupShell("dlgNodeName",
+					       transientShellWidgetClass,
+					       TreeTopLevel,
+					       XtNresizable, TRUE,
+					       NULL);
+				    
+  
+  tmpwidget= XtVaCreateManagedWidget("dlgNodeNameForm",
+				     dialogWidgetClass,
+				     dialog[DLG_NODE_NAME], 
+				     XtNresizable, TRUE,
+				     XtNvalue, "",
+				     NULL);
+  
+  XawDialogAddButton(tmpwidget, "dlgNodeNameOk", NodeLabel_CB, 
+		     (XtPointer) TRUE);
+  XawDialogAddButton(tmpwidget, "dlgNodeNameCancel", NodeLabel_CB, 
+		     (XtPointer) FALSE);
+  
+  dlgValue = XtNameToWidget(tmpwidget, "value");
+  
+  XtOverrideTranslations
+    (dlgValue, XtParseTranslationTable
+     ("<Key>Return: dlg_activate(dlgNodeNameOk)\n"));
+  
+
+  dialog[DLG_FILE] = XtVaCreatePopupShell("dlgFile",
+					  transientShellWidgetClass,
+					  TreeTopLevel, 
+					  XtNresizable, TRUE,
+					  NULL);
+
+  tmpwidget = XtVaCreateManagedWidget("dlgFileForm",
+				      dialogWidgetClass,
+				      dialog[DLG_FILE], 
+				      XtNresizable, TRUE,
+				      XtNvalue, "",
+				      NULL);
+   
+  XawDialogAddButton(tmpwidget, "dlgFileOk", File_CB, (XtPointer) TRUE);
+  XawDialogAddButton(tmpwidget, "dlgFileCancel", File_CB, (XtPointer) FALSE);
+
+  dlgValue = XtNameToWidget(tmpwidget, "value");
+  
+  XtOverrideTranslations
+    (dlgValue, XtParseTranslationTable
+     ("<Key>Return:dlg_activate(dlgFileOk)\n"));
+  
+
+  dialog[DLG_INFO] = XtVaCreatePopupShell("dlgInfo",
+					  transientShellWidgetClass,
+					  TreeTopLevel, 
+					  XtNresizable, TRUE,
+					  NULL);
+  
+  tmpwidget = XtVaCreatePopupShell("dlgInfoForm",
+				   dialogWidgetClass,
+				   dialog[DLG_INFO], 
+				   XtNresizable, TRUE,
+				   XtNvalue, "",
+				   NULL);
+  
+  XawDialogAddButton(tmpwidget, "dlgInfoButton", Popdown_CB, 
+		     (XtPointer) dialog[DLG_INFO]);
+  
+  
+  dialog[DLG_ERROR] = XtVaCreatePopupShell("dlgError",
+					   transientShellWidgetClass,
+					   TreeTopLevel, 
+					   XtNresizable, TRUE,
+					   NULL);
+   
+  tmpwidget = XtVaCreateManagedWidget("dlgErrorForm",
+				      dialogWidgetClass,
+				      dialog[DLG_ERROR], 
+				      XtNresizable, TRUE,
+				      XtNvalue, "",
+				      NULL);
+   
+  XawDialogAddButton(tmpwidget, "dlgErrorButton", Popdown_CB, 
+		     (XtPointer) dialog[DLG_ERROR]);
+   
+
+  dialog[DLG_SPACING] = XtVaCreatePopupShell("dlgSpacing",
+					     transientShellWidgetClass,
+					     TreeTopLevel, 
+					     XtNresizable, FALSE,
+					     NULL);
+  dlgForm = XtVaCreateManagedWidget("dlgSpacingForm",
+				    formWidgetClass,
+				    dialog[DLG_SPACING],
+				    XtNresizable, FALSE,
+				    NULL);
+   
+  dlgLevelLabel = XtVaCreateManagedWidget("dlgLevelLabel",
+					  labelWidgetClass,
+					  dlgForm,
+					  XtNfromVert, NULL,
+					  XtNfromHoriz, NULL,
+					  XtNtop, XawChainTop,
+					  XtNbottom, XawChainTop,
+					  XtNleft, XawChainLeft,
+					  XtNright, XawChainLeft,
+					  XtNborderWidth, 0,
+					  NULL);
+
+  dlgLevelValuator = XtVaCreateManagedWidget("dlgLevelValuator",
+					     labelWidgetClass,
+					     dlgForm,
+					     XtNfromVert, NULL,
+					     XtNfromHoriz, dlgLevelLabel,
+					     XtNtop, XawChainTop,
+					     XtNbottom, XawChainTop,
+					     XtNleft, XawChainLeft,
+					     XtNright, XawChainLeft,
+					     XtNlabel, "   ",
+					     NULL);
+
+  
+  dlgLevelScale = XtVaCreateManagedWidget("dlgLevelScale",
+					  pannerWidgetClass,
+					  dlgForm,
+					  XtNfromVert, dlgLevelLabel,
+					  XtNfromHoriz, NULL,
+					  XtNtop, XawChainTop,
+					  XtNbottom, XawChainTop,
+					  XtNleft, XawChainLeft,
+					  XtNright, XawChainLeft,
+					  XtNcanvasWidth, 110,
+					  XtNdefaultScale, 1,
+					  XtNinternalSpace, 1,
+					  XtNrubberBand, FALSE,
+					  XtNshadowThickness, 0,
+					  XtNallowOff, FALSE,
+					  XtNwidth, 200,
+					  XtNsliderWidth, 10,
+					  XtNheight, 15,
+					  NULL);
+  
+  XtOverrideTranslations(dlgLevelScale, XtParseTranslationTable("\
+<Btn2Down>:		start()\n\
+<Btn2Motion>:		move()\n\
+<Btn2Up>:		notify()stop()\n\
+<Btn3Down>:		abort()\n"));
+
+  XtAddCallback(dlgLevelScale, XtNreportCallback, levelscale_CB,
+		(XtPointer) dlgLevelValuator);
+  XtAddCallback(dlgLevelScale, XtNreportCallback, levelvalue_CB,
+		(XtPointer) &dlgLevelValue);
+
+  dlgSiblingLabel = XtVaCreateManagedWidget("dlgSiblingLabel",
+					    labelWidgetClass,
+					    dlgForm,
+					    XtNfromVert, dlgLevelScale,
+					    XtNfromHoriz, NULL,
+					    XtNtop, XawChainTop,
+					    XtNbottom, XawChainTop,
+					    XtNleft, XawChainLeft,
+					    XtNright, XawChainLeft,
+					    XtNborderWidth, 0,
+					    NULL);
+
+  dlgSiblingValuator = XtVaCreateManagedWidget("dlgLevelValuator",
+					       labelWidgetClass,
+					       dlgForm,
+					       XtNfromVert, dlgLevelScale,
+					       XtNfromHoriz, dlgSiblingLabel,
+					       XtNtop, XawChainTop,
+					       XtNbottom, XawChainTop,
+					       XtNleft, XawChainLeft,
+					       XtNright, XawChainLeft,
+					       XtNlabel, "   ",
+					       NULL);
+  dlgSiblingScale = XtVaCreateManagedWidget("dlgSiblingScale",
+					    pannerWidgetClass,
+					    dlgForm,
+					    XtNfromVert, dlgSiblingLabel,
+					    XtNfromHoriz, NULL,
+					    XtNtop, XawChainTop,
+					    XtNbottom, XawChainTop,
+					    XtNleft, XawChainLeft,
+					    XtNright, XawChainLeft,
+					    XtNcanvasWidth, 110,
+					    XtNdefaultScale, 1,
+					    XtNinternalSpace, 1,
+					    XtNrubberBand, FALSE,
+					    XtNshadowThickness, 0,
+					    XtNallowOff, FALSE,
+					    XtNwidth, 200,
+					    XtNsliderWidth, 10,
+					    XtNheight, 15,
+					    NULL);
+  
+  XtOverrideTranslations(dlgSiblingScale, XtParseTranslationTable("\
+<Btn2Down>:		start()\n\
+<Btn2Motion>:		move()\n\
+<Btn2Up>:		notify()stop()\n\
+<Btn3Down>:		abort()\n"));
+
+  XtAddCallback(dlgSiblingScale, XtNreportCallback, siblingscale_CB,
+		(XtPointer) dlgSiblingValuator);
+  XtAddCallback(dlgSiblingScale, XtNreportCallback, siblingvalue_CB,
+		(XtPointer) &dlgSiblingValue);
+  
+  dlgOkButton = XtVaCreateManagedWidget("dlgOkButton",
+					commandWidgetClass,
+					dlgForm,
+					XtNfromVert, dlgSiblingScale,
+					XtNfromHoriz, NULL,
+					XtNtop, XawChainTop,
+					XtNbottom, XawChainTop,
+					XtNleft, XawChainLeft,
+					XtNright, XawChainLeft,
+					NULL);
+  
+  dlgCancelButton = XtVaCreateManagedWidget("dlgCancelButton",
+					    commandWidgetClass,
+					    dlgForm,
+					    XtNfromVert, dlgSiblingScale,
+					    XtNfromHoriz, dlgOkButton,
+					    XtNtop, XawChainTop,
+					    XtNbottom, XawChainTop,
+					    XtNleft, XawChainLeft,
+					    XtNright, XawChainLeft,
+					    NULL);
+  
+  XtAddCallback(dlgOkButton, XtNcallback, Scale_CB, (XtPointer) TRUE);
+  XtAddCallback(dlgCancelButton, XtNcallback, Scale_CB, (XtPointer) FALSE);
+}
+
+/* ----------------------------------------------------------------------------
+ * 
+ *   BuildHelpWindow() builds the help window that is displayed when the
+ *   Help button on the application main window is pressed.
+ * 
+ * ----------------------------------------------------------------------------
+ */
+
+
+static void
+BuildHelpWindow(parent)
+     Widget parent;
+{
+  int	i;
+
+  helpShell = XtVaCreatePopupShell("helpShell", transientShellWidgetClass,
+				   parent,
+				   NULL);
+  
+  helpForm = XtVaCreateManagedWidget("helpForm",
+				     formWidgetClass,
+				     helpShell,
+				     NULL);
+
+  helpDoneButton = XtVaCreateManagedWidget("helpDoneButton",
+					   commandWidgetClass,
+					   helpForm,
+					   XtNfromVert, NULL,
+					   XtNfromHoriz, NULL,
+					   XtNtop, XawChainTop,
+					   XtNbottom, XawChainTop,
+					   XtNleft, XawChainLeft,
+					   XtNright, XawChainLeft,
+					   NULL);
+  
+  XtAddCallback(helpDoneButton, XtNcallback, Popdown_CB, 
+		(XtPointer) helpShell);
+
+  helpTitle = XtVaCreateManagedWidget("helpTitle",
+				      labelWidgetClass,
+				      helpForm,
+				      XtNfromVert, NULL,
+				      XtNfromHoriz, helpDoneButton,
+				      XtNtop, XawChainTop,
+				      XtNbottom, XawChainTop,
+				      XtNleft, XawChainLeft,
+				      XtNright, XawChainLeft,
+				      XtNborderWidth, 0,
+				      XtNlabel, "",
+				      NULL);
+
+  helpText = XtVaCreateManagedWidget("helpText",
+				     asciiTextWidgetClass,
+				     helpForm,
+				     XtNfromVert, helpDoneButton,
+				     XtNfromHoriz, NULL,
+				     XtNtop, XawChainTop,
+				     XtNbottom, XawChainBottom,
+				     XtNleft, XawChainLeft,
+				     XtNright, XawChainRight,
+				     XtNeditType, XawtextRead,
+				     XtNdisplayCaret, FALSE,
+				     XtNscrollVertical, XawtextScrollAlways,
+				     XtNscrollHorizontal, 
+				     XawtextScrollWhenNeeded,
+				     XtNuseStringInPlace, TRUE,
+				     XtNstring, help_text,
+				     XtNwidth, 530,
+				     XtNheight, 650,
+				     NULL);
+}
+
+/* ----------------------------------------------------------------------------
+ * 
+ *   BuildApplicationWindow() assumes that TreeTopLevel has been initialized 
+ *   by XtInitialize(). TreeDrawingArea is set to the drawing area in this
+ *   application window.
+ * 
+ * ----------------------------------------------------------------------------
+ */
+
+
+static void
+BuildApplicationWindow(parent)
+     Widget parent;
+{
+  Widget	topPane, box;
+
+  topPane = XtVaCreateManagedWidget("topPane",
+				    panedWidgetClass,
+				    parent,
+				    XtNorientation, XtorientVertical,
+				    NULL);
+
+  BuildMenubar(topPane);
+
+  statusText = XtVaCreateManagedWidget("statusText",
+				       labelWidgetClass,
+				       topPane,
+				       XtNborderWidth, 0,
+				       NULL);
+
+  scrolledWindow = XtVaCreateManagedWidget("scrolledWindow",
+					   viewportWidgetClass,
+					   topPane, 
+					   XtNshowGrip, FALSE,
+					   XtNallowHoriz, TRUE,
+					   XtNallowVert, TRUE,
+					   XtNuseBottom, TRUE,
+					   XtNuseRight, TRUE,
+					   NULL);
+
+  TreeDrawingArea = XtVaCreateManagedWidget("treeDrawingArea",
+					    simpleWidgetClass,
+					    scrolledWindow,
+					    NULL);
+}
+
+/* ----------------------------------------------------------------------------
+ * 
+ *   HandleError() is used when ReadTreeFromFile() or SaveTreeToFile() returns
+ *   an error. 
+ * 
+ * ----------------------------------------------------------------------------
+ */
+
+void
+HandleError(error, tree)
+     ErrCode error;
+     Tree *tree;
+{
+  Widget	dlg, text;
+  
+  if (tree) {
+    dlg = XtNameToWidget(dialog[DLG_INFO], "dlgInfoForm");
+    if (dlg) {
+      XtVaSetValues(dlg, 
+		    XtNvalue, errStr[error],
+		    XtNwidth, 200,
+		    NULL);
+      text = XtNameToWidget(dlg, "value");
+      if (text) {
+	XtVaSetValues(text, XtNdisplayCaret, FALSE, NULL);
+	XtVaSetValues(XawTextGetSource(text), XtNeditType, XawtextRead, NULL);
+      }
+    }
+    popup_dialog(dialog[DLG_INFO], XtGrabExclusive);
+  } else {
+    dlg = XtNameToWidget(dialog[DLG_ERROR], "dlgErrorForm");
+    if (dlg) {
+      XtVaSetValues(dlg, 
+		    XtNvalue, errStr[error], 
+		    XtNwidth, 200,
+		    NULL);
+      text = XtNameToWidget(dlg, "value");
+      if (text) {
+	XtVaSetValues(text, XtNdisplayCaret, FALSE, NULL);
+	XtVaSetValues(XawTextGetSource(text), XtNeditType, XawtextRead, NULL);
+      }
+    }
+    popup_dialog(dialog[DLG_ERROR], XtGrabExclusive);
+  }
+}
+
+
+/* ----------------------------------------------------------------------------
+ * 
+ *   InitializeInterface() initializes the environment for displaying
+ *   the tree and creates the necessary supporting structures for interaction
+ *   and display. This function should be called only once.
+ * 
+ * ----------------------------------------------------------------------------
+ */
+
+void
+InitializeInterface(argc, argv)
+     int *argc;
+     char *argv[];
+{
+  XrmValue       rmvalue;
+  char          *rmtype;
+  Window         win;
+  Pixel          background;
+  XColor         colors[NUM_COLORS];
+  Colormap       cmap;
+  Pixmap         gray_pixmap;
+  Atom		 wm_delete_window;
+
+  /* XtSetLanguageProc is broken on some systems.
+     The symptom is an error of the form:
+        Warning: X locale modifiers not supported, using default
+     so don't use this call:
+
+        XtSetLanguageProc(NULL, NULL, NULL);
+  */
+  
+  TreeTopLevel = XtVaAppInitialize(&app, "Xoobr", 
+				   NULL, 0,
+				   argc, argv, 
+				   fallback_resources, 
+				   NULL);
+  
+  ASSERT(TreeTopLevel, "failed to open connection to X server");
+  
+  TreeDisplay = XtDisplay(TreeTopLevel);
+  TreeScreen  = DefaultScreen(TreeDisplay);
+
+  /* set up color resources */
+  applRsrcsPtr = &applRsrcs;
+  XtGetApplicationResources(TreeTopLevel, applRsrcsPtr,
+			    applRsrcsDesc, XtNumber(applRsrcsDesc),
+			    NULL, 0);
+
+  /* add actions */
+  XtAppAddActions(app, local_actions, 6);
+  XawSimpleMenuAddGlobalActions(app);
+  
+  TreeContourWidth = applRsrcsPtr->contour_width;
+  
+  /* set up label font info */
+  if (XrmGetResource(XtDatabase(TreeDisplay),
+		     X11_FONT_RESOURCE, X11_FONT_CLASS_RESOURCE,
+		     &rmtype, &rmvalue)) {
+    if (! (TreeLabelFont = XLoadQueryFont(TreeDisplay, rmvalue.addr)) ) {
+      WARN_4("cannot load user-specified font:", rmvalue.addr,
+	     "using font:", X11_DEFAULT_FONT);
+      TreeLabelFont = XLoadQueryFont(TreeDisplay, X11_DEFAULT_FONT);
+    }
+  }
+  else
+    TreeLabelFont = XLoadQueryFont(TreeDisplay, X11_DEFAULT_FONT);
+  TreeLabelFont = XLoadQueryFont(TreeDisplay, "fixed");
+  
+  check_pixmap =
+    XCreateBitmapFromData(TreeDisplay, RootWindow(TreeDisplay, TreeScreen),
+			  check_bits, check_width, check_height);
+  
+  slider_pixmap =
+    XCreateBitmapFromData(TreeDisplay, RootWindow(TreeDisplay, TreeScreen),
+			  slider_pixmap_bits, slider_pixmap_width, 
+			  slider_pixmap_height);
+  
+  BuildApplicationWindow(TreeTopLevel);
+  BuildHelpWindow(TreeTopLevel);
+  BuildPopupMenus(TreeTopLevel);
+  BuildDialogs(TreeTopLevel);
+  
+  
+  XtAddEventHandler(TreeDrawingArea, ExposureMask, FALSE,
+		    ExposeHandler, (XtPointer) NULL);
+  
+  XtVaSetValues(TreeDrawingArea, 
+		XtNbackground, applRsrcsPtr->background_color, 
+		NULL);
+  
+  XtRealizeWidget(TreeTopLevel);
+  
+  XtOverrideTranslations
+    (TreeTopLevel,
+     XtParseTranslationTable("<Message>WM_PROTOCOLS: quit()"));
+
+  wm_delete_window = XInternAtom(TreeDisplay, "WM_DELETE_WINDOW", FALSE);
+  (void) XSetWMProtocols(TreeDisplay, XtWindow(TreeTopLevel),
+			 &wm_delete_window, 1);
+
+
+  win = XtWindow(TreeDrawingArea);
+  cmap = DefaultColormap(TreeDisplay, TreeScreen);
+  
+  /* set up double buffer */
+  colors[BACKGROUND_COLOR].pixel = applRsrcsPtr->background_color;
+  XQueryColor(TreeDisplay, cmap, &(colors[BACKGROUND_COLOR]));
+  colors[TREE_COLOR].pixel = applRsrcsPtr->tree_color;
+  XQueryColor(TreeDisplay, cmap, &(colors[TREE_COLOR]));
+  colors[CONTOUR_COLOR].pixel = applRsrcsPtr->contour_color;
+  XQueryColor(TreeDisplay, cmap, &(colors[CONTOUR_COLOR]));
+  colors[HIGHLIGHT_COLOR].pixel = applRsrcsPtr->highlight_color;
+  XQueryColor(TreeDisplay, cmap, &(colors[HIGHLIGHT_COLOR]));
+  colors[SPLIT_COLOR].pixel = applRsrcsPtr->split_color;
+  XQueryColor(TreeDisplay, cmap, &(colors[SPLIT_COLOR]));
+  colors[ACTION_COLOR].pixel = applRsrcsPtr->action_color;
+  XQueryColor(TreeDisplay, cmap, &(colors[ACTION_COLOR]));
+  
+  TreeDrawingAreaDB = 
+    DBLcreate_double_buffer(TreeDisplay, 
+			    XtWindow(TreeDrawingArea), TRUE,
+			    colors, NUM_COLORS);
+
+  ASSERT(TreeDrawingAreaDB, "could not create double buffer");
+  
+  background = DBLinq_background(TreeDrawingAreaDB);
+  
+  
+  XtVaSetValues(TreeDrawingArea, XtNbackground, background, NULL);
+  
+  /* also set the scrolledWindow background to same color */
+  XtVaSetValues(XtParent(TreeDrawingArea), XtNbackground, background, NULL);
+  
+  XSetFont(TreeDrawingAreaDB->display, TreeDrawingAreaDB->gc,
+	   TreeLabelFont->fid); 
+  
+  gray_pixmap =
+    XCreatePixmapFromBitmapData(TreeDisplay, XtWindow(TreeDrawingArea),
+				gray_bits, gray_width, gray_height,
+				TreeDrawingAreaDB->colors[TREE_COLOR],
+				background,
+				DefaultDepth(TreeDisplay, TreeScreen));
+  
+#ifdef COMMENT
+  XtVaSetValues(treeMenuItems[LAYOUT_MENU_VARIABLE],
+		XtNleftBitmap, check_pixmap, 
+		NULL);
+#endif
+
+  XSetTile(TreeDrawingAreaDB->display, TreeDrawingAreaDB->gc, gray_pixmap);
+  SetDrawColor(TREE_COLOR);
+  
+  InitializeDissolveEffect(TreeDisplay, XtWindow(TreeDrawingArea),
+			   TreeDrawingAreaDB->colors[TREE_COLOR], background);
+  
+  PauseCursor = XCreateFontCursor(TreeDisplay, XC_watch);
+  
+  StatusMsg("Ready", TRUE);
+}
+
+
+/* ----------------------------------------------------------------------------
+ * 
+ *   UserEventLoop() is called after InitializeInterface() to handle
+ *   processing of events.
+ * 
+ * ----------------------------------------------------------------------------
+ */
+
+void
+UserEventLoop()
+{
+  XtAppMainLoop(app);
+}
+
+
+/* ------------------------------------------------------------------------- */
+/*			  Callback Routines                                  */
+/* ------------------------------------------------------------------------- */
+
+static void
+TreeMenu_CB(w, client_data, call_data)
+     Widget w;
+     XtPointer client_data;
+     XtPointer call_data;
+{
+  long		menuItem = (long) client_data;
+  Widget	dlgFileForm;
+  
+  switch (menuItem) {
+  case TREE_MENU_NEW:
+    popup_dialog(dialog[DLG_NEW], XtGrabExclusive);
+    break;
+  case TREE_MENU_LOAD:
+    loading_file = 1;
+    XtVaSetValues(dialog[DLG_FILE],  XtNtitle, "Load File", NULL);
+    dlgFileForm = XtNameToWidget(dialog[DLG_FILE], "dlgFileForm");
+    XtVaSetValues(dlgFileForm, XtNvalue, "", NULL);
+    popup_dialog(dialog[DLG_FILE], XtGrabExclusive);
+    break;
+  case TREE_MENU_SAVE:
+    loading_file = 0;
+    XtVaSetValues(dialog[DLG_FILE],  XtNtitle, "Save File", NULL);
+    dlgFileForm = XtNameToWidget(dialog[DLG_FILE], "dlgFileForm");
+    XtVaSetValues(dlgFileForm, XtNvalue, "", NULL);
+    popup_dialog(dialog[DLG_FILE], XtGrabExclusive);
+    break;
+  case TREE_MENU_QUIT:
+    exit(0);
+    break;
+    
+  default:
+    WARN("unknown menu item in TreeMenu_CB");
+  }
+}
+
+
+/* ------------------------------------------------------------------------- */
+
+static void
+LayoutMenu_CB(w, client_data, call_data)
+     Widget w;
+     XtPointer client_data;
+     XtPointer call_data;
+{
+  long	menuItem = (long) client_data;
+  char	tmpstr[10];
+  
+  switch (menuItem) {
+#ifdef COMMENT
+  case LAYOUT_MENU_FIXED:
+    XtVaSetValues(layoutMenuItems[LAYOUT_MENU_VARIABLE],
+                  XtNleftBitmap, None, NULL);
+    XtVaSetValues(layoutMenuItems[LAYOUT_MENU_FIXED], 
+                  XtNleftBitmap, check_pixmap, NULL);
+
+    if (TreeLayoutDensity != Fixed) {
+      TreeLayoutDensity = Fixed;
+      DeleteTree(TheTree, TRUE);
+      SetupTree(TheTree);
+    }
+    break;    
+  case LAYOUT_MENU_VARIABLE:
+    XtVaSetValues(layoutMenuItems[LAYOUT_MENU_VARIABLE],
+                  XtNleftBitmap, check_pixmap, NULL);
+    XtVaSetValues(layoutMenuItems[LAYOUT_MENU_FIXED], 
+                  XtNleftBitmap, None, NULL);
+    
+    if (TreeLayoutDensity != Variable) {
+      TreeLayoutDensity = Variable;
+      DeleteTree(TheTree, TRUE);
+      SetupTree(TheTree);
+    }
+    break;
+#endif COMMENT
+  case LAYOUT_MENU_SPACING:
+    dlgLevelValue = TreeParentDistance;
+    dlgSiblingValue = TreeBorderSize;
+    sprintf(tmpstr, "%d  ", dlgLevelValue);
+    XtVaSetValues(dlgLevelValuator, XtNlabel, tmpstr, NULL);
+
+    /* These setvalues need some adjustments... */
+    XtVaSetValues(dlgLevelScale, 
+		  XtNsliderX, (dlgLevelValue * 2),
+		  NULL);
+    sprintf(tmpstr, "%d  ", dlgSiblingValue);
+    XtVaSetValues(dlgSiblingValuator, XtNlabel, tmpstr, NULL);
+    XtVaSetValues(dlgSiblingScale, 
+		  XtNsliderX, (dlgSiblingValue * 4),
+		  NULL);
+    popup_dialog(dialog[DLG_SPACING], XtGrabNone);
+    break;
+  case LAYOUT_MENU_ALIGN_NODES:
+    TreeAlignNodes = !TreeAlignNodes;
+    XtVaSetValues(treeMenuItems[LAYOUT_MENU_ALIGN_NODES],
+		  XtNleftBitmap, TreeAlignNodes ? check_pixmap : None, 
+		  NULL);
+    DeleteTree(TheTree, TRUE);
+    ResetLabels(TheTree);
+    SetupTree(TheTree);
+    break;
+  default:
+    WARN("unknown menu item in LayoutMenu_CB");
+  }
+}
+
+
+/* ------------------------------------------------------------------------- */
+
+static void
+NodeMenu_CB(w, client_data, call_data)
+     Widget w;
+     XtPointer client_data;
+     XtPointer call_data;
+{
+  long	menuItem = (long) client_data;
+   
+  switch (menuItem) {
+  case NODE_MENU_ADD_CHILD:
+    NodePos = Child;
+    popup_dialog(dialog[DLG_NODE_NAME], XtGrabExclusive);
+    break;
+  case NODE_MENU_ADD_BEFORE:
+    NodePos = Before;
+    popup_dialog(dialog[DLG_NODE_NAME], XtGrabExclusive);
+    break;
+  case NODE_MENU_ADD_AFTER:
+    NodePos = After;
+    popup_dialog(dialog[DLG_NODE_NAME], XtGrabExclusive);
+    break;
+  case NODE_MENU_ELISION:
+    ExpandCollapseNode(PopupNode);
+    break;
+  case NODE_MENU_DELETE:
+    DeleteNode(PopupNode);
+    if (TheTree == NULL)
+      XtSetSensitive(treeMenuItems[TREE_MENU_SAVE], FALSE);
+    break;
+  default:
+    WARN("unknown menu item in NodeMenu_CB");
+  }
+}
+
+
+/* ------------------------------------------------------------------------- */
+
+static void
+Help_CB(w, client_data, call_data)
+     Widget w;
+     XtPointer client_data;
+     XtPointer call_data;
+{
+  popup_dialog(helpShell, XtGrabNone);
+}
+
+
+/* ------------------------------------------------------------------------- */
+
+static void
+HelpDone_CB(w, client_data, call_data)
+     Widget w;
+     XtPointer client_data;
+     XtPointer call_data;
+{
+  XtPopdown(helpShell);
+}
+
+
+/* ------------------------------------------------------------------------- */
+
+static void
+NodeLabel_CB(w, client_data, call_data)
+     Widget w;
+     XtPointer client_data;
+     XtPointer call_data;
+{
+  char	*node_label;
+
+  XtPopdown(dialog[DLG_NODE_NAME]);
+  if (client_data == (XtPointer) TRUE) {
+    node_label = XtMalloc(strlen(XawDialogGetValueString(XtParent(w)))
+			  * sizeof(char));
+    node_label = strcpy(node_label, XawDialogGetValueString(XtParent(w)));
+    if (*node_label) 
+      InsertNode(PopupNode, NodePos, node_label);
+  }
+}
+      
+
+/* ------------------------------------------------------------------------- */
+
+static void
+NewTree_CB(w, client_data, call_data)
+     Widget w;
+     XtPointer client_data;
+     XtPointer call_data;
+{
+  char	*node_label;
+  Tree	*tree;
+  
+  XtPopdown(dialog[DLG_NEW]);
+  if (client_data == (XtPointer) TRUE) {
+    node_label = XtMalloc((strlen(XawDialogGetValueString(XtParent(w))) + 1)
+			  * sizeof(char));
+    node_label = strcpy(node_label, XawDialogGetValueString(XtParent(w)));
+    if (*node_label) {
+      if (TheTree) {
+	Delete(TheTree);
+	XtSetSensitive(treeMenuItems[TREE_MENU_SAVE], FALSE);
+      }
+      tree = MakeNode();
+      SetNodeLabel(tree, node_label);
+      SetupTree(tree);
+      XtSetSensitive(treeMenuItems[TREE_MENU_SAVE], TRUE);
+    }
+  }
+  XSync(TreeDisplay, FALSE);
+}
+
+
+/* ------------------------------------------------------------------------- */
+
+static void
+File_CB(w, client_data, call_data)
+     Widget w;
+     XtPointer client_data;
+     XtPointer call_data;
+{
+  char *fname;
+  Tree *tree;
+  ErrCode error;
+  Arg args[1];
+  int menuItem;
+  
+  if (client_data == (XtPointer) TRUE) {
+    fname = XawDialogGetValueString(XtParent(w));
+    if (*fname) { 
+      
+      if (loading_file == 1) {
+	if (TheTree) {
+	  Delete(TheTree);
+	  XtSetSensitive(treeMenuItems[TREE_MENU_SAVE], FALSE);
+	}
+	tree = ReadTreeFromFile(fname, &error);
+	XtPopdown(dialog[DLG_FILE]);
+	if (error != ERR_NONE)
+	  HandleError(error, tree);
+	XSync(TreeDisplay, 0);
+	if (tree) {
+	  SetupTree(tree);
+	  XtSetSensitive(treeMenuItems[TREE_MENU_SAVE], TRUE);
+	} else {
+	  SetDrawingTree(NULL);
+	  BeginFrame();
+	  EndFrame();
+	}
+      } else if (menuItem == TREE_MENU_SAVE) {
+	if (!SaveTreeToFile(TheTree, fname)) {
+	  XtPopdown(dialog[DLG_FILE]);
+	  HandleError(ERR_OPENFAIL, NULL);
+	} else
+	  XtPopdown(dialog[DLG_FILE]);
+      }
+    } else
+      XtPopdown(dialog[DLG_FILE]);
+  } else 
+    XtPopdown(dialog[DLG_FILE]); 
+}
+
+
+/* ------------------------------------------------------------------------- */
+
+static void
+Scale_CB(w, client_data, call_data)
+     Widget w;
+     XtPointer client_data;
+     XtPointer call_data;
+{
+  int	level_value, sibling_value;
+  float	tmp;
+    
+  XtPopdown(dialog[DLG_SPACING]);
+
+  /* check if OK button was selected */
+  if (client_data) {
+    level_value = dlgLevelValue;
+    
+    sibling_value = dlgSiblingValue;
+    
+    if (level_value != TreeParentDistance ||
+	sibling_value != TreeBorderSize) {
+      
+      TreeParentDistance = level_value;
+      TreeBorderSize = sibling_value;
+      XSync(TreeDisplay, 0);
+      if (TheTree) {
+	DeleteTree(TheTree, TRUE);
+	if (TreeAlignNodes)
+	  ResetLabels(TheTree);
+	SetupTree(TheTree);
+      }
+    }
+  }
+}
+
+
+/* ------------------------------------------------------------------------- */
+/*									     */
+/* Auxilary actions and callback functions                                   */
+/*									     */
+/* ------------------------------------------------------------------------- */
+
+static void
+Popdown_CB(w, client_data, call_data)
+     Widget w;
+     XtPointer client_data;
+     XtPointer call_data;
+{
+  Widget	widget = (Widget) client_data;
+    
+  XtPopdown(widget);
+}
+
+static void
+activate_action(w, event, params, num_params)
+     Widget w;
+     XButtonEvent *event;
+     String *params;
+     Cardinal *num_params;
+{
+  Widget	button;
+  
+  if (*num_params == 1) {
+    button = XtNameToWidget(XtParent(w), params[0]);
+    
+    if (button)
+      XtCallCallbacks(button, XtNcallback, (XtPointer) TRUE);
+  }
+}
+
+static void
+quit_action(w, event, params, num_params)
+     Widget w;
+     XButtonEvent *event;
+     String *params;
+     Cardinal *num_params;
+{
+  exit(0);
+}
+
+
+
+/* ------------------------------------------------------------------------- */
+
+static void 
+select_action(w, event, params, num_params)
+     Widget w;
+     XButtonEvent *event;
+     String *params;
+     Cardinal *num_params;
+{
+  Tree		*node;
+  int		height;
+  Boolean	edit = FALSE;
+
+  if ((*num_params > 0) && 
+      (!strcmp(params[0], "EDIT") ||
+       !strcmp(params[0], "edit")))
+    edit = TRUE;
+
+  if (SearchTree(TheTree, event->x, event->y, &node)) {
+    static Tree *PrevNode = NULL;
+    Tree *ParNode = NULL;
+    
+    PopupNode = node;
+    if (PrevNode != NULL)
+      DrawNode(PrevNode, New);
+    PrevNode = PopupNode;
+    
+    printf("%s^^%s^^%s\n", 
+	   EnvNm,
+	   edit ? "br-edit" : "br-view",
+	   (PopupNode->value) ? PopupNode->value : PopupNode->label.text);
+
+    StatusMsg(PopupNode->label.text, 1);
+    
+    ParNode = PopupNode->parent;
+    PopupNode->parent = NULL;
+    HiliteNode(PopupNode, New);
+    PopupNode->parent = ParNode;
+  }
+}
+
+static void 
+menu_popup_action(w, event, params, num_params)
+     Widget w;
+     XEvent *event;
+     String *params;
+     Cardinal *num_params;
+{
+  Widget menu;
+  Boolean popup;
+  ShellWidget shell_widget;
+
+  char	    *strargs[] = {"nodeMenu", NULL};
+  
+  menu = XtNameToWidget(TreeTopLevel, params[0]);
+  shell_widget = (ShellWidget) menu;
+  
+  if (nodeFound) {
+
+    /* This is giving me a headache. 
+     * Why does popup menus come up unselectable? 
+     */
+
+    XtCallActionProc(TreeDrawingArea,
+		     "XtMenuPopup",
+		     event,
+		     strargs,
+		     1);
+		 
+/*
+    XtSetSensitive(menu, TRUE);
+    XtPopupSpringLoaded(menu);
+ */
+
+/*    if (!XtIsShell(menu)) {
+      printf("error: not shell widget!\n");
+    } else {
+      if (! shell_widget->shell.popped_up) {
+	
+	XtGrabKind call_data = XtGrabExclusive;
+	
+	XtCallCallbacks(menu, XtNpopupCallback, (XtPointer) &call_data);
+	
+	shell_widget->shell.popped_up = TRUE;
+	shell_widget->shell.grab_kind = XtGrabExclusive;
+	shell_widget->shell.spring_loaded = TRUE;
+	
+	if (shell_widget->shell.create_popup_child_proc != NULL) {
+	  (*(shell_widget->shell.create_popup_child_proc))(menu);
+	}
+	
+	XtAddGrab(menu, TRUE, TRUE);
+	
+	XtRealizeWidget(menu);
+	
+	XMapRaised(XtDisplay(menu), XtWindow(menu));
+	
+      } else
+	XRaiseWindow(XtDisplay(menu), XtWindow(menu));   
+    }
+    */
+  }
+}
+
+
+static void 
+button_action(w, event, params, num_params)
+     Widget w;
+     XEvent *event;
+     String *params;
+     Cardinal *num_params;
+{
+  Tree     *node;
+  
+  if (SearchTree(TheTree, event->xbutton.x, event->xbutton.y, &node)) {
+    
+    nodeFound = TRUE;
+    
+    XtSetSensitive(nodeMenuItems[NODE_MENU_DELETE], TRUE);
+
+    XtVaSetValues(treeMenus[NODE_MENU], 
+		  XtNlabel, node->label.text, 
+		  NULL);
+    PopupNode = node;
+    if (IS_LEAF(node))  {
+      
+      XtSetSensitive(nodeMenuItems[NODE_MENU_ELISION], FALSE);
+      
+      XtVaSetValues(nodeMenuItems[NODE_MENU_ELISION], 
+		    XtNlabel, labelStr[STR_NODE_COLLAPSE], 
+		    NULL);
+      
+    } else {
+      
+      XtSetSensitive(nodeMenuItems[NODE_MENU_ELISION], TRUE);
+      if (node->elision) {
+	XtVaSetValues(nodeMenuItems[NODE_MENU_ELISION],
+		      XtNlabel, labelStr[STR_NODE_EXPAND],
+		      NULL);
+      } else {
+	XtVaSetValues(nodeMenuItems[NODE_MENU_ELISION],
+		      XtNlabel, labelStr[STR_NODE_COLLAPSE],
+		      NULL);
+      }
+    }
+    
+    if (node->parent) {
+      XtSetSensitive(nodeMenuItems[NODE_MENU_ADD_BEFORE], TRUE);
+      XtSetSensitive(nodeMenuItems[NODE_MENU_ADD_AFTER], TRUE);
+    } else {
+      XtSetSensitive(nodeMenuItems[NODE_MENU_ADD_BEFORE], FALSE);
+      XtSetSensitive(nodeMenuItems[NODE_MENU_ADD_AFTER], FALSE);
+    }
+    
+    if (node->elision) {
+      XtSetSensitive(nodeMenuItems[NODE_MENU_ADD_CHILD], FALSE);
+    } else {
+      XtSetSensitive(nodeMenuItems[NODE_MENU_ADD_CHILD], TRUE);
+    }
+    
+  } else {
+    nodeFound = FALSE;
+
+    XtVaSetValues(treeMenus[NODE_MENU], 
+		  XtNlabel, " ", 
+		  NULL);
+
+    XtSetSensitive(nodeMenuItems[NODE_MENU_ADD_BEFORE], FALSE);
+    XtSetSensitive(nodeMenuItems[NODE_MENU_ADD_AFTER], FALSE);
+    XtSetSensitive(nodeMenuItems[NODE_MENU_ADD_CHILD], FALSE);
+    XtSetSensitive(nodeMenuItems[NODE_MENU_ELISION], FALSE);
+    XtSetSensitive(nodeMenuItems[NODE_MENU_DELETE], FALSE);
+  }
+}
+
+
+/* ------------------------------------------------------------------------- */
+/*									     */
+/* General purpose popdown widget callback (for dialog popdown buttons)      */
+/*									     */
+/* ------------------------------------------------------------------------- */
+
+static void center_widget(w, x, y)
+Widget w;
+int x, y;
+{
+  Dimension	width, height, border;
+  Position	max_x, max_y;
+  
+  XtVaGetValues(w,
+		XtNwidth, &width,
+		XtNheight, &height,
+		XtNborderWidth, &border,
+		NULL);
+  
+  width += 2 * border;
+  height += 2 * border;
+  
+  x -= ((Position) width / 2);
+  y -= ((Position) height / 2);
+  
+  if (x < 0) x = 0;
+  if (y < 0) y = 0;
+  
+  if (x > (max_x = (Position) (XtScreen(w)->width - width)) )
+    x = max_x;
+  
+  if (y > (max_y = (Position) (XtScreen(w)->height - height)) )
+    y = max_y;
+  
+  XtVaSetValues(w,
+		XtNx, x,
+		XtNy, y,
+		NULL);
+}
+
+#define shell_translations "<Message>WM_PROTOCOLS: wmpopdown()\n"
+		     
+static void 
+popup_dialog(shell, grab_kind)
+     Widget shell;
+     XtGrabKind grab_kind;
+{
+  int		idummy, x, y;
+  Window	wdummy;
+
+  XtOverrideTranslations(shell, XtParseTranslationTable(shell_translations));
+  XtRealizeWidget(shell);
+  wm_delete_window = XInternAtom(XtDisplay(shell), "WM_DELETE_WINDOW", 
+				 FALSE);
+  (void) XSetWMProtocols(XtDisplay(shell), XtWindow(shell),
+			 &wm_delete_window, 1);
+  
+  XQueryPointer(TreeDisplay, DefaultRootWindow(TreeDisplay), 
+		&wdummy, &wdummy,
+		&x, &y, &idummy, &idummy, &idummy);
+  
+  center_widget(shell, x, y);
+  
+  XtPopup(shell, grab_kind);
+}
+
+static void 
+popdown_action(widget, event, params, num_params)
+     Widget widget;
+     XEvent *event;
+     String *params;
+     Cardinal *num_params;
+{
+  XtPopdown(widget);
+}
+
+static void 
+set_siblingscale_CB(widget, w, percent_ptr)
+     Widget widget;
+     XtPointer w;
+     XtPointer percent_ptr;
+{
+  char tmpstr[10];
+  
+  sprintf(tmpstr, "%d  ", (int) (*(float*) percent_ptr*MAX_BORDER_SIZE));
+  
+  XtVaSetValues((Widget) w, XtNlabel, tmpstr, NULL);
+}
+
+static void 
+siblingscale_CB(widget, w, report)
+     Widget widget;
+     XtPointer w;
+     XawPannerReport *report;
+{
+  char tmpstr[10];
+  
+  sprintf(tmpstr, "%d ", (int) 
+	  ((float) report->slider_x / report->slider_width 
+	   * MAX_BORDER_SIZE / 10));
+  
+  XtVaSetValues((Widget) w, XtNlabel, tmpstr, NULL);
+}
+
+static void
+set_levelscale_CB(widget, w, percent_ptr)
+     Widget widget;
+     XtPointer w;
+     XtPointer percent_ptr;
+{
+  char	tmpstr[10];
+
+  sprintf(tmpstr, "%d  ", (int) (*(float*) percent_ptr*MAX_PARENT_DISTANCE));
+
+  XtVaSetValues((Widget) w, XtNlabel, tmpstr, NULL);
+}
+
+static void
+levelscale_CB(widget, w, report)
+     Widget widget;
+     XtPointer w;
+     XawPannerReport *report;
+{
+  char	tmpstr[10];
+  
+  sprintf(tmpstr, "%d ", (int) 
+	  ((float) report->slider_x / report->slider_width 
+	   * MAX_PARENT_DISTANCE / 10));
+  
+  XtVaSetValues((Widget) w, XtNlabel, tmpstr, NULL);
+}
+
+static void 
+set_siblingvalue_CB(widget, var_ptr, percent_ptr)
+     Widget widget;
+     XtPointer var_ptr;
+     XtPointer percent_ptr;
+{
+  * (int *)var_ptr = (int) (*(float*) percent_ptr*MAX_BORDER_SIZE);
+}
+
+static void 
+set_levelvalue_CB(widget, var_ptr, percent_ptr)
+     Widget widget;
+     XtPointer var_ptr;
+     XtPointer percent_ptr;
+{
+  * (int *)var_ptr = (int) (*(float*) percent_ptr*MAX_PARENT_DISTANCE);
+}
+
+
+static void 
+siblingvalue_CB(widget, var_ptr, report)
+     Widget widget;
+     XtPointer var_ptr;
+     XawPannerReport *report;
+{
+  * (int *) var_ptr = (int) 
+    ((float) report->slider_x / report->slider_width 
+     * MAX_BORDER_SIZE / 10);
+}
+
+static void 
+levelvalue_CB(widget, var_ptr, report)
+     Widget widget;
+     XtPointer var_ptr;
+     XawPannerReport *report;
+{
+  * (int *) var_ptr = (int) 
+    ((float) report->slider_x / report->slider_width 
+     * MAX_PARENT_DISTANCE / 10);
+}
+
+
+/* ----------------------------------------------------------------------------
+ * 
+ *   Main routine
+ * 
+ * ----------------------------------------------------------------------------
+ */
+
+main(argc, argv)
+     int argc;
+     char *argv[];
+{
+  Tree *tree = NULL;
+  ErrCode error = ERR_NONE;
+  
+  ProgramName = strdup(argv[0]);
+  if (ProgramName == NULL) {
+    fprintf(stderr, "%s: insufficient memory available\n", argv[0]);
+    exit(0);
+  }
+  
+  InitializeInterface(&argc, argv);
+  XSync(TreeDisplay, 0);
+
+  if (argc >= 2) {
+    tree = ReadTreeFromFile(argv[1], &error);
+    if (tree) StatusMsg(argv[1], TRUE);
+    if (argc > 2)
+      WARN("extraneous arguments ignored");
+  } 
+     
+  if (tree) {
+    SetupTree(tree);
+    XtSetSensitive(treeMenuItems[TREE_MENU_SAVE], TRUE);
+  } else {
+    SetDrawingTree(NULL);
+    XtSetSensitive(treeMenuItems[TREE_MENU_SAVE], FALSE);
+  }
+
+  if (error != ERR_NONE)
+    HandleError(error, tree);
+  
+  StatusMsg("Left = Edit Node; Mid = View Node; Right = Node Menu", 1);
+  UserEventLoop();
+}
+
+/* ------------------------------------------------------------------------- */
+/*				  End of File                                */
+/* ------------------------------------------------------------------------- */
+
+
+
+
+
+
diff -r 4de2936b4e77 -r 0132846995bd pkg-src/tree-x/intf.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pkg-src/tree-x/intf.h	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,124 @@
+/* ----------------------------------------------------------------------------
+ * File    : intf.h
+ * Purpose : include file for intf.c and draw.c 
+ * ----------------------------------------------------------------------------
+ */
+
+#include <X11/Intrinsic.h>
+#include <X11/StringDefs.h>
+#define DEFAULT_FONT	"-adobe-helvetica-bold-r-normal--12-*"
+#define BIG_FONT	"-adobe-helvetica-bold-r-normal--12-*"
+
+#define X11_APPLICATION_CLASS    "Tree"
+#define X11_DEFAULT_FONT         "fixed"
+#define X11_FONT_RESOURCE        "tree.font"
+#define X11_FONT_CLASS_RESOURCE  "Tree.Font"
+
+#define HELP_FILE                 "tree.help"
+
+#define LABEL_MAT_WIDTH           3
+#define LABEL_MAT_HEIGHT          3
+#define BORDER_SIZE               4      /* beginning border size     */
+#define MAX_BORDER_SIZE           25
+#define PARENT_DISTANCE           30     /* beginning parent distance */
+#define MAX_PARENT_DISTANCE       50
+#define DENSITY_FACTOR            1.50
+#define MAT_SIZE                  BORDER_SIZE * 2
+#define ELISION_WIDTH             5
+#define ANIMATION_STEP            3
+#define ANIMATION_STEP_STEP       4
+
+#define BACKGROUND_COLOR          0
+#define TREE_COLOR                1
+#define CONTOUR_COLOR             2
+#define HIGHLIGHT_COLOR           3
+#define SPLIT_COLOR               4
+#define ACTION_COLOR              5  
+#define NUM_COLORS                6
+
+#define TREE_MENU_NEW             0
+#define TREE_MENU_LOAD            1
+#define TREE_MENU_SAVE            2
+#define TREE_MENU_SEP1            3
+#define TREE_MENU_QUIT            4
+#define TREE_MENU_STATS           6
+#define TREE_MENU_ITEMS           5
+
+#define TREE_MENU_SEP2            5
+
+#define LAYOUT_MENU_FIXED         0 /* not used at this time */
+#define LAYOUT_MENU_VARIABLE      1
+#define LAYOUT_MENU_SEP1          2
+
+#define LAYOUT_MENU_SPACING       3
+#define LAYOUT_MENU_SEP2          4
+#define LAYOUT_MENU_ALIGN_NODES   5
+#define LAYOUT_MENU_ITEMS         5
+
+#define NODE_MENU_LABEL           0
+#define NODE_MENU_SEP1            1
+#define NODE_MENU_ADD_CHILD       2
+#define NODE_MENU_ADD_BEFORE      3
+#define NODE_MENU_ADD_AFTER       4
+#define NODE_MENU_ELISION         5
+#define NODE_MENU_DELETE          6
+#define NODE_MENU_ITEMS           7
+
+#define TREE_MENU                 0
+#define LAYOUT_MENU               1
+#define NODE_MENU                 2
+#define NUM_MENUS                 3
+
+#define STR_SHOW_STATS            0
+#define STR_HIDE_STATS            1
+#define STR_NODE_COLLAPSE         2
+#define STR_NODE_EXPAND           3
+#define STR_SHOW_CONTOUR          4
+#define STR_HIDE_CONTOUR          5
+#define STR_LOAD_FILE             6
+#define STR_SAVE_FILE             7
+#define NUM_MENU_STRS             8 
+
+#define DLG_NEW                   0
+#define DLG_NODE_NAME             1
+#define DLG_FILE                  2
+#define DLG_INFO                  3
+#define DLG_ERROR                 4
+#define DLG_SPACING               5
+#define NUM_DLG                   6
+
+/* in 1/10ths of a second */
+#define ANIMATION_SPEED_FAST       1
+
+typedef enum {
+   NoContours,
+   OutsideContour,
+   AllContours,
+   SelectedContours
+} ContourOption;
+
+typedef enum {
+   Child,
+   Before,
+   After
+} NodePosition;
+
+typedef enum {
+   Fixed,
+   Variable
+} DensityOption;
+
+extern  Widget        TreeTopLevel;
+extern  Widget        TreeDrawingArea;
+extern  Display      *TreeDisplay;
+extern  int           TreeScreen;
+extern  int           TreeContourWidth;
+extern  int           TreeBorderSize;
+extern  int           TreeParentDistance;
+extern  XFontStruct  *TreeLabelFont;
+extern  DoubleBuffer *TreeDrawingAreaDB;
+extern  char          TreeShowSteps;
+extern  ContourOption TreeShowContourOption;
+extern  DensityOption TreeLayoutDensity;
+extern  char          TreeAlignNodes;   
+extern  char          PauseAfterStep;
diff -r 4de2936b4e77 -r 0132846995bd pkg-src/tree-x/rsrc.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pkg-src/tree-x/rsrc.h	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,34 @@
+#define TrNbackgroundColor "backgroundColor"
+#define TrNtreeColor       "treeColor"
+#define TrNcontourColor    "contourColor"
+#define TrNsplitColor      "splitColor"
+#define TrNhighlightColor  "highlightColor"
+#define TrNactionColor     "actionColor"   
+#define TrNcontourWidth    "contourWidth"
+
+#define TrCBackgroundColor "BackgroundColor"
+#define TrCTreeColor       "TreeColor"
+#define TrCContourColor    "ContourColor"
+#define TrCSplitColor      "SplitColor"
+#define TrCHighlightColor  "HighlightColor"
+#define TrCActionColor     "ActionColor"    
+#define TrCContourWidth    "ContourWidth"
+
+#define TrDefaultBackgroundColor "white"
+#define TrDefaultTreeColor       "black"
+#define TrDefaultContourColor    "Blue"
+#define TrDefaultSplitColor      "brown"
+#define TrDefaultHighlightColor  "red"
+#define TrDefaultActionColor     "red"
+#define TrDefaultContourWidth    2
+
+typedef struct {
+   Pixel background_color;
+   Pixel tree_color;
+   Pixel contour_color;
+   Pixel split_color;
+   Pixel highlight_color;
+   Pixel action_color;
+   int   contour_width;
+} ApplRsrcData, *ApplRsrcDataPtr;
+
diff -r 4de2936b4e77 -r 0132846995bd pkg-src/tree-x/tree.c
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pkg-src/tree-x/tree.c	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,725 @@
+/* ----------------------------------------------------------------------------
+ * File    : tree.c
+ * Purpose : dynamic tree program based on Sven Moen's algorithm
+ * ----------------------------------------------------------------------------
+ */
+
+#include "defs.h"
+#include "tree.h"
+#include "dbl.h"
+#include "intf.h"
+#include <string.h>
+
+/* ------------------------------------------------------------------------- */
+/*				Global Variables                             */
+/* ------------------------------------------------------------------------- */
+
+int NumLines = 0;
+int NumNodes = 0;
+
+
+/* ----------------------------------------------------------------------------
+ * 
+ *   MakeLine() allocates the memory required for a Polyline and 
+ *   initializes the fields of a Polyline to the arguments. The
+ *   newly-allocated Polyline is returned by the function.
+ * 
+ * ----------------------------------------------------------------------------
+ */
+
+Polyline*
+MakeLine(dx, dy, link)
+   short dx;
+   short dy;
+   Polyline *link;
+{
+   Polyline *new;
+
+   new = (Polyline *) malloc(sizeof(Polyline));
+   NASSERT(new, "could not allocate memory for polyline");
+   NumLines++;
+
+   new->dx = dx;
+   new->dy = dy;
+   new->link = link;
+
+   return (new);
+}
+
+/* ----------------------------------------------------------------------------
+ * 
+ *   MakeNode() allocates the memory required for a tree node, and
+ *   zeros out all the fields in the Node. It returns a pointer to the
+ *   tree node upon success, and NULL upon failure.
+ * 
+ * ----------------------------------------------------------------------------
+ */
+
+Tree*
+MakeNode()
+{
+   Tree *node;
+   
+   node = (Tree *) malloc(sizeof(Tree));
+   NASSERT(node, "could not allocate memory for node");
+   NumNodes++;
+
+   if (node == NULL)
+      return (NULL);
+   else {
+#ifdef SYSV
+      memset((char *) node, 0, sizeof(Tree));
+#else
+      bzero((char *) node, sizeof(Tree));
+#endif
+      return (node);
+   }
+}
+
+/* ----------------------------------------------------------------------------
+ * 
+ *   MakeBridge()
+ * 
+ * ----------------------------------------------------------------------------
+ */
+
+Polyline*
+MakeBridge(line1, x1, y1, line2, x2, y2)
+   Polyline *line1, *line2;
+   int x1, x2, y1, y2;
+{
+   int dx, dy, s;
+   Polyline *r;
+
+   dx = x2 + line2->dx - x1;
+   if (line2->dx == 0)
+      dy = line2->dy;
+   else {
+      s = dx * line2->dy;
+      dy = s / line2->dx;
+   }
+   r = MakeLine(dx, dy, line2->link);
+   line1->link = MakeLine(0, y2 + line2->dy - dy - y1, r);
+
+   return (r);
+}
+
+/* ----------------------------------------------------------------------------
+ * 
+ *   Offset() computes the necessary offset that prevents two line segments
+ *   from intersecting each other. This is the "heart" of the merge step
+ *   that computes how two subtree contours should be separated. 
+ * 
+ *   The code is taken directly from Sven Moen's paper, with changes in
+ *   some variable names to give more meaning: 
+ *   
+ *   - px,py indicate the x- and y-coordinates of the point on the longer
+ *     segment if the previous Offset() call had two unequal segments
+ * 
+ *   - lx,ly indicate the dx and dy values of the "lower" line segment
+ * 
+ *   - ux,uy indicate the dx and dy values of the "upper" line segment
+ * 
+ * ----------------------------------------------------------------------------
+ */
+
+int
+Offset(px, py, lx, ly, ux, uy)
+   int px, py, lx, ly, ux, uy;
+{
+   int d, s, t;
+
+   if (ux <= px || px+lx <= 0)
+      return 0;
+
+   t = ux*ly - lx*uy;
+
+   if (t > 0) {
+      if (px < 0) {
+	 s = px*ly;
+	 d = s/lx - py;
+      }
+      else if (px > 0) {
+	 s = px*uy;
+	 d = s/ux - py;
+      }
+      else {
+	 d = -py;
+      }
+   }
+   else {
+      if (ux < px+lx) {
+	 s = (ux-px) * ly;
+	 d = uy - (py + s/lx);
+      }
+      else if (ux > px+lx) {
+	 s = (lx+px) * uy;
+	 d = s/ux - (py+ly);
+      }
+      else {
+	 d = uy - (py+ly);
+      }
+   }
+
+   return MAX(0, d);
+}
+
+/* ----------------------------------------------------------------------------
+ * 
+ *   Merge()
+ * 
+ * ----------------------------------------------------------------------------
+ */
+
+int
+Merge(c1, c2)
+   Polygon *c1, *c2;
+{
+   int x, y, total, d;
+   Polyline *lower, *upper, *bridge;
+
+   x = y = total = 0;
+
+   /*  compare lower part of upper child's contour 
+    *  with upper part of lower child's contour
+    */
+   upper = c1->lower.head;
+   lower = c2->upper.head;
+
+   while (lower && upper) {
+      d = Offset(x, y, lower->dx, lower->dy, upper->dx, upper->dy);
+      y += d;
+      total += d;
+
+      if (x + lower->dx <= upper->dx) {
+	 x += lower->dx;
+	 y += lower->dy;
+	 lower = lower->link;
+      }
+      else {
+	 x -= upper->dx;
+	 y -= upper->dy;
+	 upper = upper->link;
+      }
+   }
+	 
+   if (lower) {
+      bridge = MakeBridge(c1->upper.tail, 0, 0, lower, x, y);
+      c1->upper.tail = (bridge->link) ? c2->upper.tail : bridge;
+      c1->lower.tail = c2->lower.tail;
+   }
+   else {
+      bridge = MakeBridge(c2->lower.tail, x, y, upper, 0, 0);
+      if (!bridge->link) 
+	 c1->lower.tail = bridge;
+   }
+   c1->lower.head = c2->lower.head;
+
+   return (total);
+}
+
+/* ----------------------------------------------------------------------------
+ * 
+ *   DetachParent() reverses the effects of AttachParent by removing
+ *   the four line segments that connect the subtree contour to the
+ *   node specified by 'tree'. 
+ * 
+ * ----------------------------------------------------------------------------
+ */
+
+void
+DetachParent(tree)
+   Tree *tree;
+{
+   free(tree->contour.upper.head->link);
+   free(tree->contour.upper.head);
+   tree->contour.upper.head = NULL;
+   tree->contour.upper.tail = NULL;
+
+   free(tree->contour.lower.head->link);
+   free(tree->contour.lower.head);
+   tree->contour.lower.head = NULL;
+   tree->contour.lower.tail = NULL;
+
+   NumLines -= 4;
+}
+
+/* ----------------------------------------------------------------------------
+ * 
+ *   AttachParent() 
+ *   This function also establishes the position of the first child
+ *   The code follows Sven Moen's version, with slight modification to
+ *   support varying borders at different levels.
+ * 
+ * ----------------------------------------------------------------------------
+ */
+
+void
+AttachParent(tree, h)
+   Tree *tree;
+   int h;
+{
+   int x, y1, y2;
+
+   if (TreeAlignNodes)
+      x = tree->border + (TreeParentDistance * 2) +
+	 (TreeParentDistance - tree->width);
+   else
+      x = tree->border + TreeParentDistance;
+   y2 = (h - tree->height)/2 - tree->border;
+   y1 = y2 + tree->height + (2 * tree->border) - h; 
+   tree->child->offset.x = x + tree->width;
+   tree->child->offset.y = y1;
+   tree->contour.upper.head = MakeLine(tree->width, 0,
+				       MakeLine(x, y1,
+						tree->contour.upper.head));
+   tree->contour.lower.head = MakeLine(tree->width, 0,
+				       MakeLine(x, y2,
+						tree->contour.lower.head));
+}
+
+/* ----------------------------------------------------------------------------
+ * 
+ *   Split()
+ *   The tree passed to Split() must have at least 1 child, because
+ *   it doesn't make sense to split a leaf (there are no bridges)
+ * 
+ * ----------------------------------------------------------------------------
+ */
+
+void
+Split(tree)
+   Tree *tree;
+{
+   Tree *child;
+   Polyline *link;
+
+   FOREACH_CHILD(child, tree) {
+      if (link = child->contour.upper.tail->link) {
+	 free(link->link);
+	 free(link);
+	 child->contour.upper.tail->link = NULL;
+	 NumLines -= 2;
+      }
+      if (link = child->contour.lower.tail->link) {
+	 free(link->link);
+	 free(link);
+	 NumLines -= 2;
+	 child->contour.lower.tail->link = NULL;
+      }
+   }
+}
+
+/* ----------------------------------------------------------------------------
+ * 
+ *   Join() merges all subtree contours of the given tree and returns the
+ *   height of the entire tree contour. 
+ * 
+ * ----------------------------------------------------------------------------
+ */
+
+int
+Join(tree)
+   Tree *tree;
+{
+   Tree *child;
+   int d, h, sum;
+
+   /*   to start, set the parent's contour and height
+    *   to contour and height of first child 
+    */
+   child = tree->child;
+   tree->contour = child->contour;
+   sum = h = child->height + (2 * child->border);
+
+   /* extend contour to include contours of all children of parent */
+   for (child = child->sibling ; child ; child = child->sibling) {
+      d = Merge(&tree->contour, &child->contour);
+      child->offset.y = d + h;
+      child->offset.x = 0;
+      h = child->height + (2 * child->border);
+      /* keep cumulative heights of subtree contours */
+      sum += d + h;
+   }
+   return sum;
+}
+
+/* ----------------------------------------------------------------------------
+ * 
+ *   RuboutLeaf() accepts a single node (leaf) and removes its contour.
+ *   The memory associated with the contour is deallocated. 
+ * 
+ * ----------------------------------------------------------------------------
+ */
+
+void
+RuboutLeaf(tree)
+   Tree *tree;
+{
+   free(tree->contour.upper.head);
+   free(tree->contour.lower.tail);
+   free(tree->contour.lower.head);
+   tree->contour.upper.head = NULL;   
+   tree->contour.upper.tail = NULL;   
+   tree->contour.lower.head = NULL;   
+   tree->contour.lower.tail = NULL;   
+   NumLines -= 3;
+}
+
+/* ----------------------------------------------------------------------------
+ * 
+ *   LayoutLeaf() accepts a single node (leaf) and forms its contour. This
+ *   function assumes that the width, height, and border fields of the 
+ *   node have been assigned meaningful values.
+ * 
+ * ----------------------------------------------------------------------------
+ */
+
+void
+LayoutLeaf(tree)
+   Tree *tree;
+{
+   tree->node_height = 0;
+   tree->border = TreeBorderSize;
+
+   tree->contour.upper.tail = MakeLine(tree->width + 2 * tree->border, 0,
+				       NULL);
+   tree->contour.upper.head = tree->contour.upper.tail;
+   
+   tree->contour.lower.tail = MakeLine(0, -tree->height - 2 * tree->border,
+				       NULL);
+   tree->contour.lower.head = MakeLine(tree->width + 2 * tree->border, 0,
+				       tree->contour.lower.tail);
+
+}
+
+/* ----------------------------------------------------------------------------
+ * 
+ *   LayoutTree() traverses the given tree (in depth-first order), and forms
+ *   subtree or leaf contours at each node as needed. Each node's contour is
+ *   stored in its "contour" field. Elision is also supported by generating
+ *   the contour for both the expanded and collapsed node. This routine
+ *   also computes the tree height of each node in the tree, so that variable
+ *   density layout can be demonstrated.
+ * 
+ * ----------------------------------------------------------------------------
+ */
+
+void
+LayoutTree(tree)
+   Tree *tree;
+{
+   Tree *child;
+   int   height = 0;
+
+   FOREACH_CHILD(child, tree) {
+      LayoutTree(child);
+
+      if (child->elision) {	/* support elision */
+	 child->old_contour = child->contour;
+	 LayoutLeaf(child);
+      }
+
+   }
+
+   if (tree->child) {
+
+      FOREACH_CHILD(child, tree) 
+	 height = MAX(child->node_height, height);
+      tree->node_height = height + 1;
+
+      if (TreeLayoutDensity == Fixed)
+	 tree->border = TreeBorderSize;
+      else
+	 tree->border =
+	    (int) (TreeBorderSize * (tree->node_height * DENSITY_FACTOR));
+
+      AttachParent(tree, Join(tree));
+   }
+   else
+      LayoutLeaf(tree);
+}
+
+/* ------------------------------------------------------------------------- */
+
+void
+Unzip(tree)
+   Tree *tree;
+{
+   Tree *child;
+
+#ifdef INTF
+   if (TreeShowSteps) {
+      HiliteNode(tree, New);
+      tree->on_path = TRUE;
+      StatusMsg("Unzip: follow parent links up to root");
+      Pause();
+   }
+#endif   
+
+   if (tree->parent)
+      Unzip(tree->parent);
+
+   if (tree->child) {
+
+#ifdef INTF
+      /*   draw entire contour; do it only for root, because the last
+       *   frame drawn in this function will have already drawn the  
+       *   contour for the most recently split subtree.              
+       */
+      if (TreeShowSteps) {
+	 if (tree->parent == NULL) {
+	    BeginFrame();
+	      DrawTreeContour(tree, New, CONTOUR_COLOR, FALSE, FALSE, FALSE);
+	      DrawTree(TheTree, New);
+	    EndFrame();
+	    StatusMsg("Unzip: disassemble entire contour");
+	    Pause();
+	 }
+      }
+#endif
+
+#ifdef INTF
+      /* draw contour as it would appear after DetachParent() */
+      if (TreeShowSteps) {
+	 BeginFrame();
+	   DrawTreeContour(tree, New, CONTOUR_COLOR, TRUE,
+			   FALSE, FALSE, FALSE);
+	   DrawTree(TheTree, New);
+	 EndFrame();
+	 StatusMsg("Unzip: detach parent");
+	 Pause();
+      }
+#endif
+
+      DetachParent(tree);
+      Split(tree);
+
+#ifdef INTF
+      if (TreeShowSteps) {
+	 BeginFrame();
+           /* mark other subtree contours as split, and */
+	   /* draw only the contour on path in full     */
+	   FOREACH_CHILD(child, tree) {
+	      if (!child->on_path) 
+		 child->split = TRUE;
+	      else
+		 DrawTreeContour(child, New, CONTOUR_COLOR,
+				 FALSE, FALSE, FALSE);
+	   }
+	   DrawTree(TheTree, New);
+	 EndFrame();
+	 StatusMsg("Unzip: split tree");
+	 Pause();
+      }
+#endif
+
+   }
+   else
+      RuboutLeaf(tree);		/* leaf node */
+}
+
+/* ------------------------------------------------------------------------- */
+
+void
+Zip(tree)
+   Tree *tree;
+{
+   if (tree->child)
+      AttachParent(tree, Join(tree));
+   else
+      LayoutLeaf(tree);
+
+   if (tree->parent)
+      Zip(tree->parent);
+}
+
+/* ----------------------------------------------------------------------------
+ * 
+ *   Insert() adds the specified child to parent, just after the specified
+ *   sibling. If 'sibling' is Null, the child is added as the first child.
+ * 
+ * ----------------------------------------------------------------------------
+ */
+
+void
+Insert(parent, child, sibling)
+   Tree *parent, *child, *sibling;
+{
+   Unzip(parent);
+   child->parent = parent;
+   if (sibling) {
+      child->sibling = sibling->sibling;
+      sibling->sibling = child;
+   }
+   else {
+      child->sibling = parent->child;
+      parent->child = child;
+   }
+   Zip(parent);
+}
+
+
+
+
+/* ----------------------------------------------------------------------------
+ * 
+ *   Delete() traverses the specified tree and frees all storage
+ *   allocated to the subtree, including contours and bridges.
+ *   If the tree had a preceding sibling, the preceding sibling is
+ *   modified to point to the tree's succeeding sibling, if any.
+ * 
+ * ----------------------------------------------------------------------------
+ */
+
+Delete(tree)
+   Tree *tree;
+{
+   Tree *sibling = NULL;
+   Tree *parent, *child;
+
+   /* find sibling */
+   parent = tree->parent;
+   if (parent) {
+      FOREACH_CHILD(child, parent)
+	 if (child->sibling == tree) {
+	    sibling = child;
+	    break;
+	 }
+   }
+   if (sibling)
+      sibling->sibling = tree->sibling;
+   else if (parent)
+      parent->child = tree->sibling;
+   
+   DeleteTree(tree, FALSE);
+}
+
+
+/* ----------------------------------------------------------------------------
+ * 
+ *   DeleteTree() is the recursive function that supports Delete(). 
+ *   If 'contour' is True, then only the contours are recursively deleted.
+ *   This flag should be True when you are regenerating a tree's layout
+ *   and still want to preserve the nodes. Since contours would be deleted
+ *   only due to a change in sibling or level distance, each node's border
+ *   value is updated with the current value of TreeBorderSize;
+ * 
+ * ----------------------------------------------------------------------------
+ */
+
+DeleteTree(tree, contour)
+   Tree *tree;
+   int   contour;
+{
+   Tree *child;
+
+   if (tree->elision) {
+      RuboutLeaf(tree);
+      tree->contour = tree->old_contour;
+      tree->old_contour.upper.head = NULL;    /* flag to note 'NULL' contour */
+   }
+
+   if (!IS_LEAF(tree)) {
+      DetachParent(tree);
+      Split(tree);
+
+      FOREACH_CHILD(child,tree)
+	 DeleteTree(child, contour);
+   }
+   else
+      RuboutLeaf(tree);
+
+   if (contour) 
+      tree->border = TreeBorderSize;
+   else {
+      free(tree->label.text);
+      free(tree);
+      NumNodes--;
+   }
+}
+
+
+/* ----------------------------------------------------------------------------
+ * 
+ *   ComputeTreeSize() 
+ *   This function should be called after tree layout.
+ * 
+ * ----------------------------------------------------------------------------
+ */
+
+void
+ComputeTreeSize(tree, width, height, x_offset, y_offset)
+   Tree *tree;
+   int *width, *height;
+   int *x_offset, *y_offset;
+{
+   Polyline *contour, *tail;
+   int upper_min_y = 0, lower_max_y = 0;
+   int upper_abs_y = 0, lower_abs_y = 0;
+   int x = 0;
+
+   /* do upper contour */
+   contour = tree->contour.upper.head;
+   tail    = tree->contour.upper.tail;
+   while (contour) {
+      if ((contour->dy + upper_abs_y) < upper_min_y) 
+	 upper_min_y = contour->dy + upper_abs_y;
+      upper_abs_y += contour->dy;
+      if (contour == tail)
+	 contour = NULL;
+      else
+	 contour = contour->link;
+   }
+
+   /* do lower contour */
+   contour = tree->contour.lower.head;
+   tail    = tree->contour.lower.tail;
+   while (contour) {
+      if ((contour->dy + lower_abs_y) > lower_max_y)
+	 lower_max_y = contour->dy + lower_abs_y;
+      lower_abs_y += contour->dy;
+      x += contour->dx;
+      if (contour == tail)
+	 contour = NULL;
+      else
+	 contour = contour->link;
+   }
+
+   *width = x + 1;
+   *height = lower_max_y - upper_min_y +
+             (tree->height + (2 * tree->border)) + 1;
+   if (x_offset)
+      *x_offset = tree->border;
+   if (y_offset)
+      *y_offset = - upper_min_y + tree->border;
+}
+
+/* ----------------------------------------------------------------------------
+ * 
+ *   PetrifyTree()
+ * 
+ * ----------------------------------------------------------------------------
+ */
+
+void
+PetrifyTree(tree, x, y)
+   Tree *tree;
+   int x, y;
+{
+   int width, height;
+   int x_offset, y_offset;
+   
+   tree->old_pos = tree->pos;	/* used by AnimateTree */
+
+   /* fix position of each node */
+   tree->pos.x = x + tree->offset.x;
+   tree->pos.y = y + tree->offset.y;
+   
+   if (tree->child) {
+      PetrifyTree(tree->child, tree->pos.x, tree->pos.y);
+      ComputeSubTreeExtent(tree); /* for benefit of interface picking */
+   }
+   if (tree->sibling)
+      PetrifyTree(tree->sibling, tree->pos.x, tree->pos.y);
+}
diff -r 4de2936b4e77 -r 0132846995bd pkg-src/tree-x/tree.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pkg-src/tree-x/tree.h	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,102 @@
+/* ----------------------------------------------------------------------------
+ * File    : tree.h
+ * Purpose : Header file for dynamic tree program
+ * ----------------------------------------------------------------------------
+ */
+
+#define INTF 1		/* enable interface-specific code */
+
+#define FOREACH_CHILD(child, tree) \
+   for ((child) = (tree)->child ; (child) ; (child) = (child)->sibling)
+
+#define PT_IN_RECT(p1, p2, x1, y1, x2, y2)   \
+	 ((p1) > (x1) &&                      \
+	  (p2) > (y1) &&                       \
+	  (p1) < (x2) &&                        \
+	  (p2) < (y2))
+
+#define PT_IN_EXTENT(p1, p2, extent)                 \
+	 ((p1) > (extent).pos.x &&                    \
+	  (p2) > (extent).pos.y &&                     \
+	  (p1) < ((extent).pos.x + (extent).width) &&   \
+	  (p2) < ((extent).pos.y + (extent).height))
+
+#define IS_LEAF(node) \
+   ((node)->child == NULL)
+
+typedef struct line  Polyline;
+typedef struct tnode Tree;
+
+typedef struct point {
+   int x;
+   int y;
+} Point;
+
+typedef struct extent {
+   Point pos;			/* top left corner of rectangle     */
+   int width;
+   int height;
+} Extent;
+
+struct line {
+   int dx, dy;
+   Polyline *link;
+};
+
+typedef struct polygon {
+   struct {
+      Polyline *head;
+      Polyline *tail;
+   } lower, upper;
+} Polygon;
+
+typedef struct label {
+   char *text;			/* the actual label text */
+   int len;			/* length of label text  */
+   int xoffset;			/* the X offset of label inside rectangle */
+   int yoffset;			/* the Y offset of label inside rectangle */
+} Label;
+
+struct tnode {
+   Tree    *parent;
+   Tree    *child;
+   Tree    *sibling;
+   int      width;
+   int      height;
+   int      border;
+   Polygon  contour;
+   Point    offset;		/* offset is relative to 'predecessor'    */
+   Point    pos;	        /* position is screen coordinates of node */
+   Point    old_pos;	        /* position is screen coordinates of node */
+   int      node_height;	/* height of node in tree */
+   /* all fields below are interface-specific */
+   Label    label;
+   char*    value;
+   Extent   subextent;		/* extent of subtree (excluding this node) */
+   Polygon  old_contour;	/* for caching old contour in elision      */
+   char     elision;		/* TRUE if this node is collapsed          */
+   char     on_path;		/* true if on path to root from node       */
+   char     split;              /* flag for drawing subtree contours       */
+   char     show_contour;	/* flag to show or hide subtree contour    */
+};
+
+typedef enum {
+   Erase,
+   Draw
+} DrawMode;
+
+typedef enum {
+   Old,
+   New
+} PosMode;			/* Position mode */
+
+extern Polyline* MakeLine();
+extern Tree*     MakeNode();
+extern Tree*     ReadTreeFromFile();
+extern void      ComputeTreeSize();
+extern void      Unzip();
+extern void      Zip();
+
+extern Tree     *TheTree;
+extern int       NumLines;
+extern int       NumNodes;
diff -r 4de2936b4e77 -r 0132846995bd pkg-src/tree-x/usleep.c
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pkg-src/tree-x/usleep.c	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,71 @@
+/*
+ *  NAME:
+ *      usleep     -- This is the precision timer for Test Set
+ *                    Automation. It uses the select(2) system
+ *                    call to delay for the desired number of
+ *                    micro-seconds. This call returns ZERO
+ *                    (which is usually ignored) on successful
+ *                    completion, -1 otherwise. 
+ *
+ *  ALGORITHM:
+ *      1) We range check the passed in microseconds and log a
+ *         warning message if appropriate. We then return without
+ *         delay, flagging an error. 
+ *      2) Load the Seconds and micro-seconds portion of the
+ *         interval timer structure.
+ *      3) Call select(2) with no file descriptors set, just the
+ *         timer, this results in either delaying the proper
+ *         ammount of time or being interupted early by a signal.
+ *
+ *  HISTORY:
+ *      Added when the need for a subsecond timer was evident.
+ *
+ *  AUTHOR:
+ *      Michael J. Dyer   <mike@sherlock.med.ge.com>
+ */
+
+#ifndef HAVE_USLEEP
+#include <unistd.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <errno.h>
+#include <time.h>
+#include <sys/time.h>
+#include <sys/param.h>
+#include <sys/types.h>
+
+int     usleep( unsigned long int microSeconds )
+{
+        unsigned int            Seconds, uSec;
+        int                     nfds, readfds, writefds, exceptfds;
+        struct  timeval         Timer;
+
+        nfds = readfds = writefds = exceptfds = 0;
+
+        if( (microSeconds == (unsigned long) 0) 
+                || microSeconds > (unsigned long) 4000000 )
+        {
+                errno = ERANGE;         /* value out of range */
+                perror( "usleep time out of range ( 0 -> 4000000 ) " );
+                return -1;
+        }
+
+        Seconds = microSeconds / (unsigned long) 1000000;
+        uSec    = microSeconds % (unsigned long) 1000000;
+
+        Timer.tv_sec            = Seconds;
+        Timer.tv_usec           = uSec;
+
+        if( select( nfds, &readfds, &writefds, &exceptfds, &Timer ) < 0 )
+        {
+                perror( "usleep (select) failed" );
+                return -1;
+        }
+
+        return 0;
+}
+#else
+/* this is to avoid a "object file has no symbol" error/warning.
+*/
+static int local_junk;
+#endif
diff -r 4de2936b4e77 -r 0132846995bd src/ChangeLog
--- a/src/ChangeLog	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/ChangeLog	Mon Aug 13 09:43:35 2007 +0200
@@ -1,3 +1,96 @@
+1997-06-20  Steven L Baur  <steve@altair.xemacs.org>
+
+	* events.c: Remove declaration of Qempty.
+
+1997-06-20  Olivier Galibert <Olivier.Galibert@mines.u-nancy.fr>
+
+	* frame-x.c, EmacsFrame.c, menubar-x.c, redisplay-x.c, 	scrollbar-x.c:
+	Make 64 bit clean.
+
+1997-06-19  Martin Buchholz  <mrb@eng.sun.com>
+
+	* config.h.in:
+	- Autodetect X defines using xmkmf.
+	- Compute rpath on *bsd* systems as well.
+	- rewrite PRINT_VAR m4 macro.
+	- detect sizes of void* and long long for future use by unex*.c
+	* regex.c: _GNU_SOURCE may be defined by config.h; don't redefine.
+
+1997-06-18  Martin Buchholz  <mrb@eng.sun.com>
+
+	* Makefile.in: 
+	* s/*.h:
+	* m/*.h:
+	* src/config.h.in:
+	* src/emacs.c:
+	* version.sh:
+	* configure.in: Another rewrite.
+	- support powerpcle (Solaris on ppc)
+	- Now just have one s/sol2.h for all Solaris versions
+	- Specifying colon-separated directories actually works now.
+	- OS_RELEASE is a new define to avoid proliferation of s&m files.
+	- extract more stuff from s&m files.
+	- more debugging info
+	- More changes to avoid the `echo -e' problem
+	- Add more tests: fcntl.h AC_TYPE_*, AC_FUNC_GETPGRP
+	- Back out -lPW test.
+	- More paranoid xpm test
+	- Put version information in version.sh instead of version.el
+	- Make quoted pre-processor string tokens out of all macro values
+	  to be used only by configure.
+	* xmu.c: DON'T use Xos.h
+	* sysdep.c (wait_for_termination): 
+	* search.c: 
+	* editfns.c: 
+	* console-*: 
+
+1997-06-18  Steven L Baur  <steve@altair.xemacs.org>
+
+	* unexelfsgi.c: Some things that Needed To Be Done(tm) into
+	unexelfsgi:
+	- support for .sbss section (no more -G 0 needed, 0.00001% speed
+	increase)
+	- support for Elf64 (64bits executables)
+	From Olivier Galibert <Olivier.Galibert@mines.u-nancy.fr>
+
+	* fns.c (Fmapvector): New function converted from Lisp.
+	From Hrvoje Niksic  <hniksic@srce.hr>
+
+Wed Jun 18 16:42:10 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+	* Makefile.in.in: Convert two missed C style comments.
+	(LIBES): Remove LIBS_DEBUG which is no longer defined.
+	(LIBES): lwlibs_libs was misspelled.
+
+1997-06-17  Hrvoje Niksic  <hniksic@srce.hr>
+
+	* eval.c (vars_of_eval): New variable Vdebug_ignored_errors.
+	(skip_debugger): New function; use Vdebug_ignored_errors.
+	(signal_call_debugger): Use it.
+
+1997-06-17  Steven L Baur  <steve@altair.xemacs.org>
+
+	* emacs.c (vars_of_emacs): Moved symbols emacs-version,
+	emacs-major-version, and emacs-minor-version from version.el to
+	here.
+
+	* general.c (syms_of_general): New symbols and, not, and or.
+
+	* emacsfns.h: New symbols Qand, Qnot, Qor.
+
+	* Makefile.in.in: Call temacs to compute lisp libraries to
+	include in the DOC file.
+
+1997-06-15  Steven L Baur  <steve@altair.xemacs.org>
+
+	* Makefile.in.in (lisp): Remove explicit mention of auto-autoloads.el.
+
+Sat Jun 14 21:55:27 1997  Kyle Jones  <kyle_jones@wonderworks.com>
+
+	* console.c (Fselect_console):
+	  Check DEVICE_SELECTED_FRAME of console's selected
+	  device for non-nil value before using it as a frame.
+
 1997-06-13  Steven L Baur  <steve@altair.xemacs.org>
 
 	* data.c (eq_with_ebola_notice): Remove horrible hack to avoid
@@ -291,11 +384,6 @@
 	* device-tty.c (tty_asynch_device_change): Make
 	`no-redraw-on-reenter' work.  Patch from Hrvoje Niksic.
 
-Wed Apr 23 16:03:20 1997  Hrvoje Niksic  <hniksic@srce.hr>
-
-	* eval.c (skip_debugger): New function.
-	(signal_call_debugger): Use it.
-
 Sat May 17 23:39:03 1997  Hrvoje Niksic  <hniksic@srce.hr>
 
 	* frame-tty.c: Support multiple frames.
diff -r 4de2936b4e77 -r 0132846995bd src/EmacsFrame.c
--- a/src/EmacsFrame.c	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/EmacsFrame.c	Mon Aug 13 09:43:35 2007 +0200
@@ -604,5 +604,5 @@
   XtVaSetValues ((Widget) ew,
 		 XtNwidth, (Dimension) pixel_width,
 		 XtNheight, (Dimension) pixel_height,
-		 0);
+		 NULL);
 }
diff -r 4de2936b4e77 -r 0132846995bd src/Makefile.in.in
--- a/src/Makefile.in.in	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/Makefile.in.in	Mon Aug 13 09:43:35 2007 +0200
@@ -1,47 +1,41 @@
-/* Makefile for src subdirectory in XEmacs.
-   Copyright (C) 1985, 1987, 1988, 1993, 1994 Free Software Foundation, Inc.
-   Copyright (C) 1994, 1995 Board of Trustees, University of Illinois
+##   Makefile for src subdirectory in XEmacs.
+##   Copyright (C) 1985, 1987, 1988, 1993, 1994 Free Software Foundation, Inc.
+##   Copyright (C) 1994, 1995 Board of Trustees, University of Illinois
+##   Copyright (C) 1996, 1997 Sun Microsystems, Inc.
 
-This file is part of XEmacs.
+## 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 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.
+## 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.  */
+## You should have received a copy of the GNU General Public License
+## along with XEmacs; see the file COPYING.  If not, write to
+## the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+## Boston, MA 02111-1307, USA.
 
-/* Synched up with: Not synched with FSF. */
+## Synched up with: Not synched with FSF.
 
 @SET_MAKE@
 
-/* Some people use these in paths they define.  We do not want their paths
-   getting changed on them. */
-#undef sparc
-#undef sun
-#undef unix
-#undef sgi
-#undef NeXT
-#undef i386
+all: xemacs
+.PHONY : all release dump-elc dump-elcs all-elc all-elcs lint
 
-/* For performance and consistency, no built-in rules */
+## For performance and consistency, no built-in rules.
 .SUFFIXES:
 .SUFFIXES: .c .o .i .h
-dot = .
-/* On Xenix and the IBM RS6000, double-dot gets screwed up.  */
-lispdir = ${srcdir}/$(dot)$(dot)/lisp/
-libsrc = $(dot)$(dot)/lib-src/
-etcdir = $(dot)$(dot)/etc/
 
-/* Here are the things that we expect ../configure to edit. */
+lispdir = ${srcdir}/../lisp/
+libsrc = ../lib-src/
+etcdir = ../etc/
+
+## Here are the things that we expect ../configure to edit.
 srcdir=@srcdir@
 CC=@CC@
 CPP=@CPP@
@@ -62,30 +56,38 @@
 extra_objs=@extra_objs@
 LN_S=@LN_S@
 
-/* just to be sure the sh is used */
+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"
 
-/* With the traditional VPATH setting, it is not possible to
-   simultaneously compile in-place and in another directory.  The
-   mistaken definition is that *all* dependencies are searched for in
-   the VPATH directory, rather than just the dependencies that are not
-   themselves targets.  Thus, if there is an up-to-date .o file in the
-   in-place location, it will not get recompiled in the not-in-place
-   location.
+## With the traditional VPATH setting, it is not possible to
+## simultaneously compile in-place and in another directory.  The
+## mistaken definition is that *all* dependencies are searched for in
+## the VPATH directory, rather than just the dependencies that are not
+## themselves targets.  Thus, if there is an up-to-date .o file in the
+## in-place location, it will not get recompiled in the not-in-place
+## location.
 
-   The GNU Make "vpath" directive continues this tradition, but at
-   least lets you restrict the classes of files that it applies to.
-   This allows us to kludge around the problem. */
+## The GNU Make "vpath" directive continues this tradition, but at
+## least lets you restrict the classes of files that it applies to.
+## This allows us to kludge around the problem.
+
 #ifdef USE_GNU_MAKE
 vpath %.c @srcdir@
 vpath %.h @srcdir@
-/* now list files that should NOT be searched in the srcdir.
-   This includes any .c or .h built from something else
-   (e.g. a .in file). */
+## now list files that should NOT be searched in the srcdir.
+## This includes any .c or .h built from something else
+## (e.g. a .in file).
 vpath config.h
 vpath paths.h
 vpath Emacs.ad.h
@@ -94,59 +96,7 @@
 VPATH=@srcdir@
 #endif
 
-/* On some machines #define register is done in config;
-   do not let it interfere with this file.  */
-#undef register
-
-/* Unless inhibited or changed, use -lg to link for debugging.  */
-#ifndef LIBS_DEBUG
-#define LIBS_DEBUG "-lg"
-#endif
-
-#ifndef LD_SWITCH_CALL_SHARED
-#define LD_SWITCH_CALL_SHARED
-#endif /* define a call_shared switch */
-
-#ifndef LD_SWITCH_SHARED
-#define LD_SWITCH_SHARED "-c"
-#endif /* define a shared switch */
-
-#ifndef ORDINARY_LINK
-
-#ifndef CRT0_COMPILE
-#define CRT0_COMPILE $(CC) "-c" $(cflags) C_SWITCH_ASM
-#endif
-
-#ifndef START_FILES
-#ifdef NO_REMAP
-#ifdef COFF_ENCAPSULATE
-#define START_FILES "pre-crt0.o" "/usr/local/lib/gcc-crt0.o"
-#else /* ! defined (COFF_ENCAPSULATE) */
-#define START_FILES "pre-crt0.o" "/lib/crt0.o"
-#endif /* ! defined (COFF_ENCAPSULATE) */
-#else /* ! defined (NO_REMAP) */
-#define START_FILES "ecrt0.o"
-#endif /* ! defined (NO_REMAP) */
-#endif /* START_FILES */
-STARTFILES = START_FILES
-
-#else /* ORDINARY_LINK */
-
-/* config.h might want to force START_FILES anyway */
-#ifdef START_FILES
-STARTFILES = START_FILES
-#else
-STARTFILES =
-#endif /* START_FILES */
-
-#endif /* not ORDINARY_LINK */
-
-/* cc switches needed to make the "asm" keyword work.
-   Nothing special needed on most machines.  */
-#ifndef C_SWITCH_ASM
-#define C_SWITCH_ASM
-#endif
-
+RM = rm -f
 PURIFY_PROG=purify
 PURIFY_FLAGS=-chain-length=16 -ignore-signals=SIGPOLL -log-file=puremacs.log \
              -messages=batch -show-directory=yes -windows=yes \
@@ -167,15 +117,14 @@
 sound_cflags=@sound_cflags@
 #endif
 
-LWLIB_SRCDIR = ${srcdir}/$(dot)$(dot)/lwlib
+LWLIB_SRCDIR = ${srcdir}/../lwlib
 
 #ifdef HAVE_X_WINDOWS
-LWLIB_BUILDDIR = $(dot)$(dot)/lwlib
-
-LWLIB_LDFLAGS  = -L$(LWLIB_BUILDDIR)
-LWLIB_LIBS     =  -llw
-/* LWLIB_CPPFLAGS = -I$(LWLIB_SRCDIR) */
-LWLIB_DEPS = $(LWLIB_BUILDDIR)/liblw.a
+lwlib_libs = ../lwlib/liblw.a
+lwlib_deps = $(lwlib_libs)
+$(lwlib_libs) :
+	cd ../lwlib && ${MAKE} ${MFLAGS}
+## LWLIB_LDFLAGS  = -L../lwlib
 
 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
@@ -187,88 +136,20 @@
 X11_libs= $(LIBX11_LIBS) $(libx11_intl) $(LIBI18N)
 #endif /* HAVE_X_WINDOWS */
 
-/* -Demacs is needed to make some files produce the correct version
-   for use in Emacs. */
+## -Demacs is needed to make some files produce the correct version
+## for use in Emacs.
 
 cppflags = $(CPPFLAGS) -Demacs -I. $(c_switch_all)
-
-cflags= $(CFLAGS) $(cppflags)
-
-ldflags = -L. $(LWLIB_LDFLAGS) $(ld_switch_all)
+cflags   = $(CFLAGS) $(cppflags)
+ldflags  = -L. $(ld_switch_all)
 
 .c.o:
 	$(CC) -c $(cflags) $<
 
-/* Create preprocessor output (debugging purposes only) */
+## Create preprocessor output (debugging purposes only)
 .c.i:
 	$(CC) -P $(cppflags) $<
 
-#ifndef ORDINARY_LINK
-/* Fix linking if compiled with GCC.  */
-#ifdef __GNUC__
-
-/* Versions of GCC >= 2.0 put their library, libgcc.a, in obscure
-   places that are difficult to figure out at make time.  Fortunately,
-   these same versions allow you to pass arbitrary flags on to the
-   linker, so there is no reason not to use it as a linker.
-
-   Well, it is not quite perfect.  The "-nostdlib" option keeps GCC
-   from searching for libraries in its internal directories, so we
-   have to ask GCC explicitly where to find libgcc.a.  */
-
-#ifndef LINKER
-#define LINKER $(CC) "-nostdlib"
-/* GCC passes any argument prefixed with -Xlinker directly to the
-   linker.  See prefix-args.c for an explanation of why we do not do
-   this with the shell "for" construct.
-   Note that some people do not have "."  in their paths, so we must
-   use ./prefix-args.  */
-#define YMF_PASS_LDFLAGS(flags) `./prefix-args -Xlinker flags`
-#endif /* LINKER */
-
-#ifndef LIB_GCC
-/* Ask GCC where to find libgcc.a.  */
-#define LIB_GCC `$(CC) -print-libgcc-file-name`
-#endif /* LIB_GCC */
-
-GNULIB_VAR = LIB_GCC
-
-#else /* ! defined (__GNUC__) */
-GNULIB_VAR =
-
-#endif /* ! defined (__GNUC__) */
-#else
-GNULIB_VAR =
-#endif /* not ORDINARY_LINK */
-
-/* A macro which other sections of the makefile can redefine to munge the
-   flags before they are passed to LD.  This is helpful if you have
-   redefined LD to something odd, like "gcc".  */
-#ifndef YMF_PASS_LDFLAGS
-#define YMF_PASS_LDFLAGS(flags) flags
-#endif
-
-/* Specify address for ld to start loading at, if requested by configuration. */
-#ifdef LD_TEXT_START_ADDR
-STARTFLAGS = "-T" LD_TEXT_START_ADDR "-e" "__start"
-#else
-STARTFLAGS =
-#endif
-
-#ifdef ORDINARY_LINK
-LD = $(CC) $(CFLAGS)
-#else
-#ifdef COFF_ENCAPSULATE
-LD=$(CC) -nostdlib
-#else /* not ORDINARY_LINK */
-#ifdef LINKER
-LD=LINKER
-#else /* ! defined (LINKER) */
-LD=ld
-#endif /* ! defined (LINKER) */
-#endif /* ! defined (COFF_ENCAPSULATE) */
-#endif /* not ORDINARY_LINK */
-
 #ifdef ENERGIZE
 # ifdef EMACS_BTL
 BTL_dir=$(srcdir)/../btl
@@ -280,15 +161,11 @@
 energize_objs = energize.o $(freecheck_objs)
 #endif /* ENERGIZE */
 
-#ifdef HAVE_UNIXOID_EVENT_LOOP
-event_unixoid_objs = event-unixoid.o
-#endif
+## lastfile must follow all files whose initialized data areas should
+## be dumped as pure by dump-emacs.
 
-/* lastfile must follow all files whose initialized data areas should
-   be dumped as pure by dump-emacs. */
-
-/* NOTE: The last line cannot be all macros, because make will barf
-   if they all come out null. */
+## NOTE: The last line cannot be all macros, because make will barf
+## if they all come out null.
 
 objs=\
  abbrev.o alloc.o blocktype.o buffer.o bytecode.o\
@@ -297,7 +174,7 @@
  data.o device.o dired.o doc.o doprnt.o dynarr.o\
  editfns.o elhash.o emacs.o\
  $(energize_objs) eval.o events.o $(extra_objs)\
- event-stream.o $(event_unixoid_objs) extents.o faces.o\
+ event-stream.o extents.o faces.o\
  fileio.o filelock.o 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\
@@ -337,14 +214,14 @@
 # ifdef EXTERNAL_WIDGET
 external_widget_objs = ExternalShell.o extw-Xt-nonshared.o extw-Xlib-nonshared.o
 
-/* Now we try to figure out how to link a shared library.
-   If we cannot figure it out, leave EXTW_LINK undefined and a shared
-   library will not be created. */
+## Now we try to figure out how to link a shared library.
+## If we cannot figure it out, leave EXTW_LINK undefined and a shared
+## library will not be created.
 
 # ifdef USE_GCC
 #  ifdef USG5
 #   define EXTW_LINK(objs, output) $(CC) -shared objs -Xlinker -z -Xlinker text -o output
-   /* I cannot figure out how to do shared a.out libraries, so just punt. */
+## I cannot figure out how to do shared a.out libraries, so just punt.
 #  elif !defined (LINUX) || defined (__ELF__)
 #   define EXTW_LINK(objs, output) $(CC) -shared objs -o output
 #  endif
@@ -356,7 +233,7 @@
 #  endif /* not IRIX */
 # else /* not USG5 */
 #  if defined (DEC_ALPHA) && defined (OSF1)
-#   define EXTW_LINK(objs, output) $(LD) $(ldflags) LD_SWITCH_SHARED -d objs -o output $(LIBES)
+#   define EXTW_LINK(objs, output) $(LD) $(ldflags) $(ld_switch_shared) -d objs -o output $(LIBES)
 #  else /* !(DEC_ALPHA && OSF1) */
 #   define EXTW_LINK(objs, output) $(LD) -dc objs -assert pure-text -o output
 #  endif /* !(DEC_ALPHA && OSF1) */
@@ -382,208 +259,16 @@
 X11_objs = EmacsFrame.o EmacsShell.o TopLevelEmacsShell.o TransientEmacsShell.o EmacsManager.o $(external_widget_objs)
 #endif /* HAVE_X_WINDOWS */
 
-/* define otherobjs as list of object files that make-docfile
-   should not be told about.  */
+## define otherobjs as list of object files that make-docfile
+## should not be told about.
 otherobjs = $(BTL_objs) lastfile.o $(mallocobjs) $(rallocobjs) $(X11_objs)
 
-#ifdef LISP_FLOAT_TYPE
-float_lisp = ${lispdir}prim/float-sup.elc
-#endif
 
-#ifdef HAVE_X_WINDOWS
-/* lisp files preloaded if compiled with support for X Windows */
-# ifdef HAVE_TOOLBARS
-x11_toolbar_lisp = ${lispdir}x11/x-toolbar.elc
-# endif
-# ifdef HAVE_MENUBARS
-x11_menubar_lisp = ${lispdir}x11/x-menubar.elc
-# endif
-# ifdef HAVE_SCROLLBARS
-x11_scrollbar_lisp = ${lispdir}x11/x-scrollbar.elc
-# endif
-x11_lisp=\
- ${x11_menubar_lisp}\
- ${lispdir}x11/x-faces.elc\
- ${lispdir}x11/x-iso8859-1${null}.elc ${lispdir}x11/x-mouse.elc\
- ${lispdir}x11/x-select.elc ${x11_scrollbar_lisp}\
- ${x11_toolbar_lisp} ${lispdir}x11/x-misc.elc\
- ${lispdir}x11/x-init.elc
-#endif
-
-#ifdef HAVE_TTY
-/* lisp files preloaded if compiled with support for tty */
-tty_lisp = ${lispdir}term/tty-init.elc
-#endif
-
-#ifdef MULE
-#ifdef HAVE_X_WINDOWS
-mule_x11_lisp = ${lispdir}mule/mule-x-init.elc
-#endif
-mule_lisp=\
- ${lispdir}mule/mule-load.elc ${lispdir}mule/mule-coding.elc\
- ${lispdir}mule/mule-charset.elc ${lispdir}mule/mule-files.elc\
- ${lispdir}mule/mule-category.elc ${lispdir}mule/mule-misc.elc\
- ${lispdir}mule/mule-ccl.elc\
- ${lispdir}mule/mule-init.elc ${lispdir}mule/mule-cmds.elc\
- ${lispdir}mule/kinsoku.elc\
- ${mule_x11_lisp}\
- ${lispdir}mule/arabic-hooks.elc\
- ${lispdir}language/chinese.elc\
- ${lispdir}language/cyrillic.elc\
- ${lispdir}language/english.elc \
- ${lispdir}mule/ethiopic-hooks.elc\
- ${lispdir}language/european.elc\
- ${lispdir}language/greek.elc\
- ${lispdir}mule/hebrew-hooks.elc\
- ${lispdir}language/japanese.elc\
- ${lispdir}language/korean.elc\
- ${lispdir}language/misc-lang.elc\
- ${lispdir}language/thai.elc\
- ${lispdir}mule/vietnamese-hooks-1${null}.elc\
- ${lispdir}mule/vietnamese-hooks-2${null}.elc
-#else
-nomule_lisp = ${lispdir}prim/files-nomule.elc
-#endif
-
-#ifdef ENERGIZE
-/* Lisp files preloaded if compiled with support for Energize */
-energize_lisp=\
- ${lispdir}comint/gdb.elc\
- ${lispdir}comint/comint.elc ${lispdir}comint/shell.elc\
- ${lispdir}utils/ring.elc ${lispdir}packages/compile.elc\
- ${lispdir}modes/view-less.elc ${lispdir}emulators/evi.elc\
- ${lispdir}packages/font-lock.elc ${lispdir}packages/fast-lock.elc\
- ${lispdir}dired/dired.elc ${lispdir}dired/dired-x.elc\
- ${lispdir}dired/dired-lucid.elc ${lispdir}prim/userlock.elc\
- ${lispdir}energize/energize-init.elc\
- ${lispdir}energize/energize-mode.elc\
- ${lispdir}energize/energize-windows.elc\
- ${lispdir}energize/energize-menus.elc\
- ${lispdir}energize/energize-shell.elc\
- ${lispdir}energize/energize-visit-use.elc\
- ${lispdir}energize/energize-vi.elc\
- ${lispdir}energize/energize-font-lock.elc\
- ${lispdir}energize/energize-advice.elc
-#endif
+LIBES = $(lwlib_libs) $(quantify_libs) $(ld_libs_all) $(GNULIB_VAR)
 
-#ifdef SUNPRO
-/* Lisp files preloaded if compiled with support for SunPro products */
-sunpro_lisp=\
- ${lispdir}sunpro/sunpro-init.elc\
- ${lispdir}sunpro/sunpro-menubar.elc\
- ${lispdir}sunpro/sunpro-keys.elc\
- ${lispdir}eos/sun-eos-init.elc\
- ${lispdir}eos/sun-eos-load.elc\
- ${lispdir}eos/sun-eos-common.elc\
- ${lispdir}eos/sun-eos-editor.elc\
- ${lispdir}eos/sun-eos-browser.elc\
- ${lispdir}eos/sun-eos-debugger.elc\
- ${lispdir}eos/sun-eos-debugger-extra.elc\
- ${lispdir}eos/sun-eos-toolbar.elc\
- ${lispdir}eos/sun-eos-menubar.elc\
- ${lispdir}comint/comint.elc\
- ${lispdir}utils/ring.elc\
- ${lispdir}utils/annotations.elc\
- ${lispdir}modes/cc-mode.elc\
- ${lispdir}modes/imenu.elc\
- ${lispdir}utils/reporter.elc
-#endif
-
-#ifdef TOOLTALK
-/* Lisp files preloaded if compiled with support for Tooltalk */
-tooltalk_lisp=\
- ${lispdir}tooltalk/tooltalk-load.elc\
- ${lispdir}tooltalk/tooltalk-macros.elc\
- ${lispdir}tooltalk/tooltalk-util.elc\
- ${lispdir}tooltalk/tooltalk-init.elc
-#endif
-
-#ifdef LISP_COMMAND_LOOP
-cmdloop_lisp = ${lispdir}prim/cmdloop1.elc
-#endif
-
-#ifdef HAVE_TOOLBARS
-toolbar_lisp = ${lispdir}prim/toolbar.elc
-#endif
-#ifdef HAVE_MENUBARS
-menubar_lisp = ${lispdir}prim/menubar.elc
-#endif
-#ifdef HAVE_SCROLLBARS
-scrollbar_lisp = ${lispdir}prim/scrollbar.elc
-#endif
-#ifdef HAVE_DIALOGS
-dialog_lisp = ${lispdir}prim/dialog.elc
-#endif
-#ifdef HAVE_WINDOW_SYSTEM
-mouse_lisp=\
- ${lispdir}prim/gui.elc\
- ${lispdir}prim/mouse.elc\
- ${lispdir}prim/mode-motion.elc
-#endif
+## Enable recompilation of certain other files depending on system type.
 
-/* List of Lisp files loaded into the dumped Emacs.
-   Every file that is loaded from loadup.el must be enumerated
-   here, or the functions will have no docstrings.
-   This is dumb - this list should be generated automatically.
-   [Note: "version.el" is included in the doc separately, but is not listed
-    here because we do not want things to appear to be out-of-date just
-    because the version number has been incremented. -- D.N.G. 8/28/93]
- */
-lisp=\
- ${lispdir}paths.el ${lispdir}prim/featurep.elc\
- ${lispdir}prim/loaddefs.elc ${lispdir}prim/auto-autoloads.elc\
- ${lispdir}prim/loadup.el ${lispdir}prim/subr.elc\
- ${lispdir}prim/cmdloop.elc ${cmdloop_lisp}\
- ${lispdir}utils/text-props.elc ${mouse_lisp}\
- ${lispdir}prim/keymap.elc ${lispdir}prim/syntax.elc\
- ${lispdir}prim/minibuf.elc ${lispdir}prim/faces.elc\
- ${lispdir}prim/objects.elc ${lispdir}prim/process.elc\
- ${lispdir}prim/keydefs.elc ${lispdir}prim/device.elc\
- ${lispdir}prim/obsolete.elc ${lispdir}prim/glyphs.elc\
- ${lispdir}prim/extents.elc ${lispdir}prim/backquote.elc\
- ${lispdir}prim/events.elc ${lispdir}prim/console.elc\
- ${lispdir}utils/map-ynp.elc ${lispdir}prim/modeline.elc\
- ${lispdir}modes/list-mode.elc\
- ${lispdir}utils/derived.elc ${lispdir}cl/cl.elc\
- ${lispdir}cl/cl-defs.elc ${lispdir}prim/undo-stack.elc\
- ${lispdir}prim/simple.elc ${lispdir}prim/help.elc\
- ${lispdir}prim/files.elc ${lispdir}utils/lib-complete.elc\
- ${lispdir}prim/indent.elc ${lispdir}prim/frame.elc\
- ${toolbar_lisp} ${lispdir}prim/format.elc\
- ${lispdir}prim/window.elc ${lispdir}prim/window-xemacs.elc\
- ${lispdir}prim/startup.elc\
- ${lispdir}prim/lisp.elc ${lispdir}prim/page.elc\
- ${lispdir}prim/register.elc ${lispdir}iso/iso8859-1${null}.elc\
- ${lispdir}prim/paragraphs.elc ${lispdir}modes/lisp-mode.elc\
- ${lispdir}modes/text-mode.elc ${lispdir}prim/fill.elc\
- ${lispdir}prim/isearch-mode.elc ${lispdir}prim/misc.elc\
- ${lispdir}packages/vc-hooks.elc\
- ${lispdir}prim/replace.elc ${lispdir}prim/specifier.elc\
- ${lispdir}modes/auto-show.elc ${sunpro_lisp} ${tty_lisp}\
- ${lispdir}bytecomp/bytecomp-runtime.elc ${float_lisp}\
- ${lispdir}prim/itimer.elc ${lispdir}prim/itimer-autosave.elc\
- ${lispdir}ediff/ediff-hook.elc\
- ${lispdir}custom/widget.elc ${lispdir}custom/custom.elc\
- ${lispdir}prim/cus-start.elc\
- ${lispdir}packages/fontl-hooks.elc ${scrollbar_lisp}\
- ${lispdir}prim/buffer.elc ${menubar_lisp}\
- ${lispdir}packages/buff-menu.elc ${dialog_lisp} ${mule_lisp} ${nomule_lisp}\
- ${lispdir}modes/abbrev.elc ${x11_lisp} ${energize_lisp} ${tooltalk_lisp}
-
-/* Other Lisp files that are not dumped out but where it is convenient
-   (or required?) for them to be byte-compiled early, before xemacs is
-   dumped out.  Avoid listing them in ${lisp} because then the
-   doc-snarfing routines get confused. */
-otherlisp=\
- ${lispdir}bytecomp/bytecomp.elc\
- ${lispdir}bytecomp/byte-optimize.elc\
- ${lispdir}utils/advice.elc
-
-LIBES = $(LWLIB_LIBS) $(quantify_libs) $(ld_libs_all) LIBS_DEBUG $(GNULIB_VAR)
-
-/* Enable recompilation of certain other files depending on system type.  */
-
-/* Enable inclusion of object files in temacs depending on system type.  */
+## Enable inclusion of object files in temacs depending on system type.
 #ifndef OBJECTS_SYSTEM
 #define OBJECTS_SYSTEM
 #endif
@@ -612,20 +297,16 @@
 	else true; fi
 	@touch SATISFIED
 	-$(DUMPENV) ./temacs -nl -batch -l loadup.el dump
-	@if [ ! -f SATISFIED ]; then \
-		$(MAKE) release; \
-	fi
-	@/bin/rm -f SATISFIED
+	@if test ! -f SATISFIED; then $(MAKE) $@; fi
+	@$(RM) SATISFIED
 #else /* ! defined (HAVE_SHM) */
 	-if [ -w ${srcdir}/../lisp ]; then \
 	  w=`pwd`; cd ${srcdir} && $${w}/temacs -batch -l inc-vers; \
 	else true; fi
 	@touch SATISFIED
 	-$(DUMPENV) ./temacs -batch -l loadup.el dump
-	@if [ ! -f SATISFIED ]; then \
-		$(MAKE) release; \
-	fi
-	@/bin/rm -f SATISFIED
+	@if test ! -f SATISFIED; then $(MAKE) $@; fi
+	@$(RM) SATISFIED
 #endif /* ! defined (HAVE_SHM) */
 	touch release
 #endif /* ! defined (CANNOT_DUMP) */
@@ -633,45 +314,38 @@
 xemacs: temacs ${libsrc}DOC ${lisp} $(mo_file) ${other_files}
 	@touch SATISFIED
 	-$(DUMPENV) ./temacs -batch -l loadup.el dump
-	@if [ ! -f SATISFIED ]; then \
-		$(MAKE) xemacs; \
-	fi
-	@/bin/rm -f SATISFIED
+	@if test ! -f SATISFIED; then $(MAKE) $@; fi
+	@$(RM) SATISFIED
 
 xemacs-no-site-file: temacs ${libsrc}DOC ${lisp} $(mo_file) ${other_files}
 	@touch SATISFIED
 	-$(DUMPENV) ./temacs -batch -l loadup.el dump no-site-file
-	@test ! -f SATISFIED && $(MAKE) xemacs-no-site-file
-	@/bin/rm -f SATISFIED
+	@if test ! -f SATISFIED; then $(MAKE) $@; fi
+	@$(RM) SATISFIED
 
 obj_src = $(objs:.o=.c)
 
 #ifdef DYNODUMP
-dynodump_builddir = $(dot)$(dot)/dynodump
-dynodump_deps = $(dynodump_builddir)/dynodump.so
-$(dynodump_builddir)/dynodump.so: force
-	cd ${dynodump_builddir} && ${MAKE} ${MFLAGS}
+dynodump_deps = ../dynodump/dynodump.so
+../dynodump/dynodump.so:
+	cd ../dynodump && ${MAKE} ${MFLAGS}
 #endif /* DYNODUMP */
 
-#ifdef NO_DOC_FILE
-${libsrc}DOC: ${libsrc}make-docfile
-#else
-${libsrc}DOC: ${libsrc}make-docfile ${obj_src} ${lisp}
-#endif
-	rm -f ${libsrc}DOC
-	${libsrc}make-docfile -d ${srcdir} -i ${libsrc}../site-packages \
-		${obj_src} ${mallocdocsrc} ${rallocdocsrc} ${lispdir}version.el \
-		${lisp} > ${libsrc}DOC
+${libsrc}DOC:
+	$(RM) ${libsrc}DOC
+	-${DUMPENV} ./temacs -batch -l ../prim/make-docfile.el -- \
+		-o ${libsrc}DOC -d ${srcdir} -i ${libsrc}../site-packages \
+		${obj_src} ${mallocdocsrc} ${rallocdocsrc}
 
 dump_elcs: dump-elcs
 
 dump-elcs: temacs
 	@touch SATISFIED
-	-$(LOADPATH) ./temacs -batch -l ../prim/update-elc.el $(lisp) $(otherlisp)
+	-${DUMPENV} ./temacs -batch -l ../prim/update-elc.el
 	@if [ ! -f SATISFIED ]; then \
 		$(MAKE) dump-elcs; \
 	fi
-	@/bin/rm -f SATISFIED
+	@$(RM) SATISFIED
 
 all-elc all-elcs:
 	cd .. && $(MAKE) all-elc $(MFLAGS)
@@ -691,7 +365,7 @@
 ${mo_dir}emacs.po: ${libsrc}make-msgfile ${libsrc}make-po ${objs} ${lisp}
 	${libsrc}make-msgfile -o ${libsrc}messages ${objs} ${lisp} ${otherlisp}
 	cd ${libsrc} && ${xgettext} ${xgettext_args}
-	rm -f ${mo_dir}emacs.po
+	$(RM) ${mo_dir}emacs.po
 	cd ${libsrc} && ${libsrc}make-po -a ${mo_dir}emacs.po DOC
 
 ${mo_dir}emacs.mo: ${mo_dir}emacs.po
@@ -708,36 +382,23 @@
 ${libsrc}make-docfile:
 	cd ${libsrc} && ${MAKE} ${MFLAGS} make-docfile
 
-/* Lint Section */
+## Lint Section
 LINT.c=$(LINT) $(LINTFLAGS) $(LINTINCLUDES)
 LINTFILES= $(objs:.o=.ln)
 LINTINCLUDES = $(cppflags)
-/* LINTFLAGS= -fd -m -p -s -u -v -x */
+## LINTFLAGS= -fd -m -p -s -u -v -x
 LINTFLAGS= -fd -m -s -u -v -x
 lint: $(LINTFILES)
 	$(LINT.c) $(LINTFILES)
-/* end of Lint Section */
-
-force:
-$(LWLIB_BUILDDIR)/liblw.a: force
-	cd ${LWLIB_BUILDDIR} && ${MAKE} ${MFLAGS}
-
-/* Some systems define this to cause parallel Make-ing.  */
-#ifndef MAKE_PARALLEL
-#define MAKE_PARALLEL
-#endif
+## end of Lint Section
 
 temacs_deps=\
- MAKE_PARALLEL $(LOCALCPP) $(SHORT) $(STARTFILES)\
- ${objs} ${otherobjs} OBJECTS_SYSTEM OBJECTS_MACHINE\
- $(LWLIB_DEPS) $(dynodump_deps) prefix-args
+ $(LOCALCPP) $(SHORT) $(start_files) ${objs} ${otherobjs}\
+ $(lwlib_deps) $(dynodump_deps) prefix-args
 
 temacs_link_args=\
- ${STARTFLAGS} ${ldflags} LD_SWITCH_CALL_SHARED\
- -o $@ ${STARTFILES} ${objs} ${otherobjs}\
- OBJECTS_SYSTEM OBJECTS_MACHINE ${LIBES}
-
-temacs_deps: $(temacs_deps)
+ ${start_flags} ${ldflags} $(ld_switch_call_shared)\
+ -o $@ ${start_files} ${objs} ${otherobjs} ${LIBES}
 
 temacs: $(temacs_deps)
 	$(LD) $(temacs_link_args)
@@ -746,7 +407,7 @@
 	rtc_patch_area -o $@
 
 rtcmacs: $(temacs_deps) rtc_patch.o
-	rm -f temacs; $(MAKE) $(MAKE_FLAGS) temacs RTC_patch_objs=rtc_patch.o
+	$(RM) temacs; $(MAKE) $(MAKE_FLAGS) temacs RTC_patch_objs=rtc_patch.o
 	mv temacs rtcmacs
 
 rtcrun: rtcmacs
@@ -776,7 +437,7 @@
 	$(CC) -c $(cflags) -DDEFINE_TRANSIENT_EMACS_SHELL ${srcdir}/EmacsShell-sub.c
 	mv EmacsShell-sub.o TransientEmacsShell.o
 
-/* Position-independent code for shared library creation */
+## Position-independent code for shared library creation
 #if USE_GCC
 pic_arg = -fpic
 #elif defined (IRIX)
@@ -794,7 +455,7 @@
 external_client_xt_objs_nonshared    = ExternalClient-Xt-nonshared.o extw-Xt-nonshared.o extw-Xlib-nonshared.o
 external_client_xlib_objs_nonshared  = ExternalClient-Xlib-nonshared.o extw-Xlib-nonshared.o
 
-/* Add dependencies so things work right with a parallel make */
+## Add dependencies so things work right with a parallel make
 ExternalClient-Xm-shared.o: ${srcdir}/ExternalClient.c ExternalClient-Xt-shared.o ExternalClient-Xm-nonshared.o
 	$(CC) -c $(pic_arg) $(cflags) -DEXTW_USES_MOTIF ${srcdir}/ExternalClient.c
 	mv ExternalClient.o ExternalClient-Xm-shared.o
@@ -819,9 +480,10 @@
 	$(CC) -c $(cflags) ${srcdir}/ExternalClient-Xlib.c
 	mv ExternalClient-Xlib.o ExternalClient-Xlib-nonshared.o
 
-/* We compile the common files twice (once with PIC and once without)
-   because on some systems, compiling with PIC but not linking into
-   a shared library messes things up. */
+## We compile the common files twice (once with PIC and once without)
+## because on some systems, compiling with PIC but not linking into
+## a shared library messes things up.
+
 extw-Xt-shared.o: ${srcdir}/extw-Xt.c extw-Xt-nonshared.o
 	$(CC) -c $(pic_arg) $(cflags) ${srcdir}/extw-Xt.c
 	mv extw-Xt.o extw-Xt-shared.o
@@ -871,56 +533,48 @@
 #endif
 
 config.h: ${srcdir}/config.h.in
-	@echo "The file $@ needs to be set up from config.h.in."
-	@echo "Consult the file \`INSTALL' for instructions for building Emacs."
-	exit 1
-
 puresize_adjust.h: ${srcdir}/puresize.h
-	@echo "The file $@ still needs to be generated."
-	@echo "Please run 'make' from the top-level."
-	exit 1
-
 paths.h: ${srcdir}/paths.h.in
-	@echo "The file $@ needs to be set up from paths.h.in."
-	@echo "Consult the file \`INSTALL' for instructions for building Emacs."
-	exit 1
+Emacs.ad.h: ${srcdir}/${etcdir}Emacs.ad
 
-Emacs.ad.h: ${srcdir}/${etcdir}Emacs.ad
-	@echo "The file $@ needs to be set up from ${srcdir}/${etcdir}Emacs.ad"
-	@echo "Consult the file \`INSTALL' for instructions for building Emacs."
-	exit 1
+config.h puresize_adjust.h paths.h Emacs.ad.h :
+	@echo "The file $@ needs to be re-generated."
+	@echo "Please run a make in the top level directory."
+	@echo "Consult the file \`INSTALL' for instructions for building XEmacs."
+	@exit 1
 
-/* Some machines have alloca built-in.
-   They should define HAVE_ALLOCA, or may just let alloca.s
-   be used but generate no code.
-   Some have it written in assembler in alloca.s.
-   Some use the C version in alloca.c (these define C_ALLOCA in config.h).
-   */
+## Some machines have alloca built-in.
+## They should define HAVE_ALLOCA, or may just let alloca.s
+## be used but generate no code.
+## Some have it written in assembler in alloca.s.
+## Some use the C version in alloca.c (these define C_ALLOCA in config.h).
+
 
 #ifdef C_ALLOCA
-/* We could put something in alloca.c to #define free and malloc
-   whenever emacs was #defined, but that's not appropriate for all
-   users of alloca in Emacs.  Check out ../lib-src/getopt.c.  */
+## We could put something in alloca.c to #define free and malloc
+## whenever emacs was #defined, but that's not appropriate for all
+## users of alloca in Emacs.  Check out ../lib-src/getopt.c.  */
+
 alloca.o : ${srcdir}/alloca.c
 	$(CC) -c -Dfree=xfree -Dmalloc=xmalloc $(cflags) $<
 #else
 #ifndef HAVE_ALLOCA
 alloca.o : ${srcdir}/alloca.s config.h
-/* $(CPP) is cc -E, which may get confused by filenames
-   that do not end in .c.  So copy file to a safe name.  */
-	cp ${srcdir}/alloca.s allocatem.c
-/* Remove any ^L, blank lines, and preprocessor comments,
-   since some assemblers barf on them.  Use a different basename for the
-   output file, since some stupid compilers (Green Hill) use that
-   name for the intermediate assembler file. */
+## $(CPP) is cc -E, which may get confused by filenames
+## that do not end in .c.  So copy file to a safe name.  */
+##	cp ${srcdir}/alloca.s allocatem.c
+## Remove any ^L, blank lines, and preprocessor comments,
+## since some assemblers barf on them.  Use a different basename for the
+## output file, since some stupid compilers (Green Hill) use that
+## name for the intermediate assembler file.
 	$(CPP) $(cppflags) allocatem.c | \
 	sed -e 's///' -e 's/^#.*//' | \
 	sed -n -e '/^..*$$/p' > allocax.s
-	-rm -f alloca.o
-/* Xenix, in particular, needs to run assembler via cc.  */
+	@$(RM) alloca.o
+## Xenix, in particular, needs to run assembler via cc.
 	$(CC) -c allocax.s
 	mv allocax.o alloca.o
-	rm -f allocax.s allocatem.c
+	$(RM) allocax.s allocatem.c
 #endif /* HAVE_ALLOCA */
 #endif /* ! defined (C_ALLOCA) */
 
@@ -946,29 +600,31 @@
 	$(CC) -c -Demacs $(sound_cflags) $(cflags) $<
 #endif /* HAVE_NATIVE_SOUND */
 
-/* System-specific programs to be made.
-   ${other_files}, OBJECTS_SYSTEM and OBJECTS_MACHINE
-   select which of these should be compiled.  */
+## System-specific programs to be made.
+## ${other_files}, $(objects_system) and $(objects_machine)
+## select which of these should be compiled.  */
+
+.PHONY : mostlyclean clean distclean realclean versionclean extraclean
 
 mostlyclean:
-	rm -f temacs puremacs quantmacs prefix-args xmakefile* core depend.* \#* *.o
-	rm -f ${libsrc}DOC
+	$(RM) temacs puremacs quantmacs prefix-args core depend.* \#* *.o *.i
 clean: mostlyclean
-	rm -f xemacs libextcli*
-/**/# This is used in making a distribution.
-/**/# Do not use it on development directories!
+	$(RM) xemacs libextcli* ${libsrc}DOC
+## This is used in making a distribution.
+## Do not use it on development directories!
 distclean: clean versionclean
-	rm -f config.h paths.h puresize_adjust.h Emacs.ad.h \
-	rm -f Makefile Makefile.in .pure xemacs-version.h
+	$(RM) config.h paths.h puresize_adjust.h Emacs.ad.h \
+	  Makefile Makefile.in .pure xemacs-version.h
 realclean: distclean
-	rm -f TAGS
+	$(RM) TAGS
 versionclean:
-	-rm -f xemacs ${libsrc}DOC
+	$(RM) xemacs ${libsrc}DOC
 extraclean: realclean
-	-rm -f *~ \#* m/?*~ s/?*~
+	$(RM) *~ \#* m/?*~ s/?*~
 
-/* The rule for the [sm] files has to be written a little funny to
-   avoid looking like a C comment to CPP. */
+## The rule for the [sm] files has to be written a little funny to
+## avoid looking like a C comment to CPP.
+.PHONY : lock unlock
 SOURCES = *.[chm] *.pswm [sm]/?* COPYING paths.h.in Makefile.in.in \
 	config.h.in README COPYING ChangeLog
 unlock:
@@ -979,7 +635,7 @@
 
 #ifdef __GNUC__
 
-/*** Dependency processing using GCC ***/
+## Dependency processing using GCC
 
 .c.dep:
 	$(CC) -MM $(cflags) $< > $*.dep
@@ -988,14 +644,15 @@
 
 obj_dep = $(objs:.o=.dep)
 
+.PHONY : depend gnu-depend
+## #### Needs a bit of work: it doesn't see the object files that
+## we are not compiling
 gnu-depend: $(obj_dep)
-	/* #### Needs a bit of work: it doesn't see the object files that
-	   we are not compiling */
 	cat $(obj_dep) | sh ${libsrc}process-gnu-depends.sh > depend.out
 
 #endif /* GCC */
 
-/*** Dependency processing using makedepend ***/
+## Dependency processing using makedepend
 
 depend:
 	: > depend.tmp
@@ -1011,12 +668,11 @@
 	echo '#endif /''* MULE *''/' >> depend.out
 	echo '' >> depend.out
 	cat /tmp/depend2.$$ >> depend.out
-	rm -f /tmp/depend1.$$ /tmp/depend2.$$
+	$(RM) /tmp/depend1.$$ /tmp/depend2.$$
 
-/* Manually-generated dependencies (makedepend misbehaves on these) */
+## Manually-generated dependencies (makedepend misbehaves on these)
 
-/* (actually makedepend does OK on these but we want to conditionalize
-   them) */
+## (actually makedepend does OK on these but we want to conditionalize them)
 #ifdef EXTERNAL_WIDGET
 ExternalClient-Xlib.o: extw-Xlib.h
 ExternalClient-Xm.o: config.h
@@ -1063,7 +719,7 @@
 cadillac-btl-process.o: $(BTL_dir)/cadillac-btl-extern.h
 #endif /* EMACS_BTL */
 
-/* (makedepend definitely misbehaves on these) */
+## (makedepend definitely misbehaves on these)
 sgiplay.o: config.h
 sgiplay.o: libst.h
 unexconvex.o: getpagesize.h
@@ -1081,7 +737,7 @@
 unexmips.o: config.h
 unexsunos4.o: config.h
 
-/* Dependencies generated by 'make depend' */
+## Dependencies generated by 'make depend'
 
 #ifdef MULE
 EmacsFrame.o: mule-charset.h
@@ -1307,6 +963,12 @@
 alloc.o: toolbar.h
 alloc.o: window.h
 alloca.o: config.h
+balloon_help.o: config.h
+balloon_help.o: balloon_help.h
+balloon-x.o: config.h
+balloon-x.o: device.h
+balloon-x.o: console-x.h
+balloon-x.o: balloon_help.h
 blocktype.o: blocktype.h
 blocktype.o: config.h
 blocktype.o: dynarr.h
diff -r 4de2936b4e77 -r 0132846995bd src/alloc.c
--- a/src/alloc.c	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/alloc.c	Mon Aug 13 09:43:35 2007 +0200
@@ -3956,12 +3956,12 @@
   char stack_top_variable;
   extern char *stack_bottom;
   int i;
+  struct frame *f = selected_frame ();
   int speccount = specpdl_depth ();
   Lisp_Object pre_gc_cursor = Qnil;
-  Lisp_Object changed_frames = Qnil;
   struct gcpro gcpro1;
 
-  int cursor_changed_selected_frame = 0;
+  int cursor_changed = 0;
 
   if (gc_in_progress != 0)
     return;
@@ -3972,7 +3972,7 @@
   if (preparing_for_armageddon)
     return;
 
-  GCPRO1 (changed_frames);
+  GCPRO1 (pre_gc_cursor);
 
   /* Very important to prevent GC during any of the following
      stuff that might run Lisp code; otherwise, we'll likely
@@ -3987,55 +3987,36 @@
   /* Now show the GC cursor/message. */
   if (!noninteractive)
     {
-      /* No need to gcpro this; gc won't catch us now. */
-      Lisp_Object frmcons, devcons, concons;
-      Lisp_Object selframe = make_frame (selected_frame ());
-
-      FRAME_LOOP_NO_BREAK (frmcons, devcons, concons)
+      if (FRAME_WIN_P (f))
 	{
-	  struct frame *f = XFRAME (XCAR (frmcons));
-	  int cursor_changed;
-
-	  if (FRAME_WIN_P (f))
+	  Lisp_Object frame = make_frame (f);
+	  Lisp_Object cursor = glyph_image_instance (Vgc_pointer_glyph,
+						     FRAME_SELECTED_WINDOW (f),
+						     ERROR_ME_NOT, 1);
+	  pre_gc_cursor = f->pointer;
+	  if (POINTER_IMAGE_INSTANCEP (cursor)
+	      /* don't change if we don't know how to change back. */
+	      && POINTER_IMAGE_INSTANCEP (pre_gc_cursor))
 	    {
-	      Lisp_Object frame = XCAR (frmcons);
-	      Lisp_Object cursor =
-		glyph_image_instance (Vgc_pointer_glyph,
-				      FRAME_SELECTED_WINDOW (f),
-				      ERROR_ME_NOT, 1);
-	      pre_gc_cursor = f->pointer;
-	      if (POINTER_IMAGE_INSTANCEP (cursor)
-		  /* don't change if we don't know how to change back. */
-		  && POINTER_IMAGE_INSTANCEP (pre_gc_cursor))
-		{
-		  Fset_frame_pointer (frame, cursor);
-		  /* Add the frame to the list. */
-		  changed_frames = Fcons (pre_gc_cursor, changed_frames);
-		  changed_frames = Fcons (XCAR (frmcons), changed_frames);
-		  if (EQ (XCAR (frmcons), selframe))
-		    cursor_changed_selected_frame = 1;
-		}
+	      cursor_changed = 1;
+	      Fset_frame_pointer (frame, cursor);
 	    }
 	}
-      /* Now handle the plain old message. */
-      {
-	struct frame *f = XFRAME (selframe);
-	/* Don't print messages to the stream device. */
-	if (!cursor_changed_selected_frame && !FRAME_STREAM_P (f))
-	  {
-	    char *msg = (STRINGP (Vgc_message)
-			 ? GETTEXT ((char *) XSTRING_DATA (Vgc_message))
-			 : 0);
-	    Lisp_Object args[2], whole_msg;
-	    args[0] =
-	      build_string (msg ? msg :
-			    GETTEXT ((CONST char *) gc_default_message));
-	    args[1] = build_string ("...");
-	    whole_msg = Fconcat (2, args);
-	    echo_area_message (f, (Bufbyte *) 0, whole_msg, 0, -1,
-			       Qgarbage_collecting);
-	  }
-      }
+
+      /* Don't print messages to the stream device. */
+      if (!cursor_changed && !FRAME_STREAM_P (f))
+	{
+	  char *msg = (STRINGP (Vgc_message)
+		       ? GETTEXT ((char *) XSTRING_DATA (Vgc_message))
+		       : 0);
+	  Lisp_Object args[2], whole_msg;
+	  args[0] = build_string (msg ? msg :
+				  GETTEXT ((CONST char *) gc_default_message));
+	  args[1] = build_string ("...");
+	  whole_msg = Fconcat (2, args);
+	  echo_area_message (f, (Bufbyte *) 0, whole_msg, 0, -1,
+			     Qgarbage_collecting);
+	}
     }
 
   /***** Now we actually start the garbage collection. */
@@ -4171,13 +4152,9 @@
   /* Now remove the GC cursor/message */
   if (!noninteractive)
     {
-      Lisp_Object tail = changed_frames;
-      while (CONSP (tail) && CONSP (XCDR (tail)))
-	{
-	  Fset_frame_pointer (XCAR (tail), XCAR (XCDR (tail)));
-	  tail = XCDR (XCDR (tail));
-	}
-      if (!cursor_changed_selected_frame && !FRAME_STREAM_P (selected_frame ()))
+      if (cursor_changed)
+	Fset_frame_pointer (make_frame (f), pre_gc_cursor);
+      else if (!FRAME_STREAM_P (f))
 	{
 	  char *msg = (STRINGP (Vgc_message)
 		       ? GETTEXT ((char *) XSTRING_DATA (Vgc_message))
diff -r 4de2936b4e77 -r 0132846995bd src/buffer.c
--- a/src/buffer.c	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/buffer.c	Mon Aug 13 09:43:35 2007 +0200
@@ -2827,7 +2827,7 @@
 
   Fset_buffer (Fget_buffer_create (QSscratch));
 
-  /* If PWD is accurate, use it instead of calling getwd.  This is faster
+  /* If PWD is accurate, use it instead of calling getcwd.  This is faster
      when PWD is right, and may avoid a fatal error.  */
   if ((pwd = getenv ("PWD")) != 0 && IS_DIRECTORY_SEP (*pwd)
       && stat (pwd, &pwdstat) == 0
@@ -2836,8 +2836,8 @@
       && dotstat.st_dev == pwdstat.st_dev
       && (int) strlen (pwd) < MAXPATHLEN)
     strcpy (buf, pwd);
-  else if (getwd (buf) == 0)
-    fatal ("`getwd' failed: errno %d\n", errno);
+  else if (getcwd (buf, MAXPATHLEN) == NULL)
+    fatal ("`getcwd' failed: %s\n", strerror (errno));
 
 #ifndef VMS
   /* Maybe this should really use some standard subroutine
diff -r 4de2936b4e77 -r 0132846995bd src/config.h.in
--- a/src/config.h.in	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/config.h.in	Mon Aug 13 09:43:35 2007 +0200
@@ -23,8 +23,8 @@
 /* No code in XEmacs #includes config.h twice, but some of the code
    intended to work with other packages as well (like gmalloc.c)
    think they can include it as many times as they like.  */
-#ifndef _CONFIG_H_
-#define _CONFIG_H_
+#ifndef _SRC_CONFIG_H_
+#define _SRC_CONFIG_H_
 
 /* alloca twiddling belongs in one place, not the s&m headers
    AIX requires this to be the first thing in the file.  */
@@ -41,13 +41,33 @@
 #endif
 #endif /* NOT C */
 
-/* #### This will be removed in 19.15. */
-#define LOSING_BYTECODE
 
 /* Use this to add code in a structured way to FSF-maintained source
    files so as to make it obvious where XEmacs changes are. */
 #define XEMACS
 
+/* Allow s&m files to differentiate OS versions without having
+   multiple files to maintain. */
+#undef OS_RELEASE
+
+/* The configuration name.  This is used as the install directory name
+   for the lib-src programs. */
+#undef EMACS_CONFIGURATION
+
+/* The version info from version.sh. Used in #pragma ident in emacs.c */
+#undef EMACS_MAJOR_VERSION
+#undef EMACS_MINOR_VERSION
+#undef EMACS_BETA_VERSION
+#undef EMACS_VERSION
+#undef XEMACS_CODENAME
+
+
+/* Used to identify the XEmacs version in stack traces. */
+#undef CANONICAL_VERSION
+
+/* #### This will be removed in 19.15. */
+#define LOSING_BYTECODE
+
 /* Does XEmacs support floating-point numbers? */
 #undef LISP_FLOAT_TYPE
 
@@ -63,16 +83,23 @@
 /* Compile in support for the X window system? */
 #undef HAVE_X_WINDOWS
 
-/* Slightly better type checking in X header files */
+/* Defines for building X applications */
 #ifdef HAVE_X_WINDOWS
+/* The following will be defined if xmkmf thinks they are necessary */
+#undef SVR4
+#undef SYSV
+#undef _POSIX_SOURCE
+#undef _BSD_SOURCE
+#undef _GNU_SOURCE
+#undef X_LOCALE
+#undef NARROWPROTO
+/* The following should always be defined, no matter what xmkmf thinks. */
 #ifndef NeedFunctionPrototypes
 #define NeedFunctionPrototypes 1
 #endif
 #ifndef FUNCPROTO
 #define FUNCPROTO 15
 #endif
-/* Required for most XFree86 systems */
-#undef NARROWPROTO
 #endif /* HAVE_X_WINDOWS */
 
 /* Define HAVE_WINDOW_SYSTEM if any windowing system is available. */
@@ -118,6 +145,7 @@
 #undef HAVE_LIBINTL_H
 #undef HAVE_LIBGEN_H
 #undef HAVE_LOCALE_H
+#undef HAVE_FCNTL_H
 #undef HAVE_X11_XLOCALE_H
 #undef HAVE_LINUX_VERSION_H
 #undef HAVE_INTTYPES_H
@@ -166,10 +194,14 @@
 
 #undef HAVE_MMAP
 #undef HAVE_STRCOLL
+#undef HAVE_GETPGRP
+#undef GETPGRP_VOID
 
 #undef SIZEOF_SHORT
 #undef SIZEOF_INT
 #undef SIZEOF_LONG
+#undef SIZEOF_LONG_LONG
+#undef SIZEOF_VOID_P
 
 #undef HAVE_ACOSH
 #undef HAVE_ASINH
@@ -440,15 +472,6 @@
 #endif
 #endif /* 0 */
 
-/* The configuration name.  This is used as the install directory name
-   for the lib-src programs. */
-#undef EMACS_CONFIGURATION
-
-/* The version string from version.el. Used in #pragma ident in emacs.c */
-#undef EMACS_VERSION
-/* Used to identify the XEmacs version in stack traces. */
-#undef main_1
-
 /* 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
@@ -473,6 +496,14 @@
 #define SIGRETURN return
 #endif
 
+/* Allow the source to use standard types */
+#undef size_t
+#undef pid_t
+#undef mode_t
+#undef off_t
+#undef uid_t
+#undef gid_t
+
 /* Define DYNODUMP if it is necessary to properly dump on this system.
    Currently this is only Solaris 2.x, for x < 6. */
 #undef DYNODUMP
diff -r 4de2936b4e77 -r 0132846995bd src/console-stream.h
--- a/src/console-stream.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/console-stream.h	Mon Aug 13 09:43:35 2007 +0200
@@ -38,4 +38,12 @@
 
 #define CONSOLE_STREAM_DATA(d) CONSOLE_TYPE_DATA (d, stream)
 
+extern Lisp_Object stream_semi_canonicalize_console_connection(Lisp_Object,
+							       Error_behavior);
+extern Lisp_Object stream_canonicalize_console_connection(Lisp_Object,
+							  Error_behavior);
+extern Lisp_Object stream_semi_canonicalize_device_connection(Lisp_Object,
+							       Error_behavior);
+extern Lisp_Object stream_canonicalize_device_connection(Lisp_Object,
+							  Error_behavior);
 #endif /* _XEMACS_CONSOLE_STREAM_H_ */
diff -r 4de2936b4e77 -r 0132846995bd src/console-tty.c
--- a/src/console-tty.c	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/console-tty.c	Mon Aug 13 09:43:35 2007 +0200
@@ -227,8 +227,6 @@
   return CONSOLE_TTY_DATA (decode_tty_console (console))->controlling_process;
 }
 
-extern Lisp_Object stream_semi_canonicalize_console_connection(Lisp_Object,
-							       Error_behavior);
 Lisp_Object
 tty_semi_canonicalize_console_connection (Lisp_Object connection,
 					  Error_behavior errb)
@@ -236,8 +234,6 @@
   return stream_semi_canonicalize_console_connection (connection, errb);
 }
 
-extern Lisp_Object stream_canonicalize_console_connection(Lisp_Object,
-							  Error_behavior);
 Lisp_Object
 tty_canonicalize_console_connection (Lisp_Object connection,
 				     Error_behavior errb)
diff -r 4de2936b4e77 -r 0132846995bd src/console-x.h
--- a/src/console-x.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/console-x.h	Mon Aug 13 09:43:35 2007 +0200
@@ -41,6 +41,7 @@
 #include <X11/keysym.h>
 #include <X11/Xatom.h>
 
+#if 0 /* mrb - Xos sux. */
 #ifdef USG
 #undef USG	/* ####KLUDGE for Solaris 2.2 and up */
 #include <X11/Xos.h>
@@ -48,6 +49,7 @@
 #else
 #include <X11/Xos.h>
 #endif
+#endif /* 0 */
 
 #include <X11/StringDefs.h>
 
diff -r 4de2936b4e77 -r 0132846995bd src/console.c
--- a/src/console.c	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/console.c	Mon Aug 13 09:43:35 2007 +0200
@@ -268,12 +268,23 @@
 */
        (console))
 {
+  Lisp_Object device;
+
   CHECK_LIVE_CONSOLE (console);
 
-  /* select the console's selected frame's selected window.  This will call
-     selected_frame_1(). */
-  if (!NILP (CONSOLE_SELECTED_DEVICE (XCONSOLE (console))))
-    Fselect_window (FRAME_SELECTED_WINDOW (XFRAME (DEVICE_SELECTED_FRAME (XDEVICE (CONSOLE_SELECTED_DEVICE (XCONSOLE (console)))))));
+  device = CONSOLE_SELECTED_DEVICE (XCONSOLE (console));
+  if (!NILP (device))
+    {
+      struct device *d = XDEVICE (device);
+      Lisp_Object frame = DEVICE_SELECTED_FRAME (d);
+      if (!NILP (frame))
+	{
+	  struct frame *f = XFRAME(frame);
+	  Fselect_window (FRAME_SELECTED_WINDOW (f));
+	}
+      else
+	error ("Can't select console with no frames.");
+    }
   else
     error ("Can't select a console with no devices");
   return Qnil;
diff -r 4de2936b4e77 -r 0132846995bd src/editfns.c
--- a/src/editfns.c	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/editfns.c	Mon Aug 13 09:43:35 2007 +0200
@@ -775,20 +775,20 @@
 */
        (user))
 {
-  Lisp_Object uname = (STRINGP (user) ? user : Fuser_login_name (user));
+  Lisp_Object user_name = (STRINGP (user) ? user : Fuser_login_name (user));
   struct passwd *pw = NULL;
   Lisp_Object tem;
   char *p, *q;
   
-  if (!NILP (uname))		/* nil when nonexistent UID passed as arg */
+  if (!NILP (user_name))	/* nil when nonexistent UID passed as arg */
     {
-      CONST char *uname_ext;
+      CONST char *user_name_ext;
       
       /* Fuck me.  getpwnam() can call select() and (under IRIX at least)
 	 things get wedged if a SIGIO arrives during this time. */
-      GET_C_STRING_OS_DATA_ALLOCA (uname, uname_ext);
+      GET_C_STRING_OS_DATA_ALLOCA (user_name, user_name_ext);
       slow_down_interrupts ();
-      pw = (struct passwd *) getpwnam (uname_ext);
+      pw = (struct passwd *) getpwnam (user_name_ext);
       speed_up_interrupts ();
     }
 
@@ -814,10 +814,10 @@
       /* Substitute the login name for the &, upcasing the first character.  */
       if (q)
 	{
-	  char *r = (char *) alloca (strlen (p) + XSTRING_LENGTH (uname) + 1);
+	  char *r = (char *) alloca (strlen (p) + XSTRING_LENGTH (user_name) + 1);
 	  memcpy (r, p, q - p);
 	  r[q - p] = 0;
-	  strcat (r, (char *) XSTRING_DATA (uname));
+	  strcat (r, (char *) XSTRING_DATA (user_name));
 	  /* #### current_buffer dependency! */
 	  r[q - p] = UPCASE (current_buffer, r[q - p]);
 	  strcat (r, q + 1);
diff -r 4de2936b4e77 -r 0132846995bd src/emacs.c
--- a/src/emacs.c	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/emacs.c	Mon Aug 13 09:43:35 2007 +0200
@@ -83,7 +83,7 @@
 
 /* Variable whose value is string giving configuration built for.  */
 Lisp_Object Vsystem_configuration;
-  
+
 /* The name under which XEmacs was invoked, with any leading directory
    names discarded.  */
 Lisp_Object Vinvocation_name;
@@ -142,6 +142,13 @@
 
 int noninteractive1;
 
+/* Major & Minor version numbers are needed in temacs as of 20.3 */
+/* Version numbers and strings */
+int emacs_beta_version;
+int emacs_major_version;
+int emacs_minor_version;
+Lisp_Object Vxemacs_codename;
+
 /* Save argv and argc.  */
 char **initial_argv;
 int initial_argc;
@@ -313,7 +320,7 @@
     {
       CONST char *temp;
       CHECK_STRING (XCAR (next));
-      
+
       GET_C_STRING_EXT_DATA_ALLOCA (XCAR (next), FORMAT_OS, temp);
       (*argv) [i] = xstrdup (temp);
     }
@@ -440,6 +447,12 @@
     }
 }
 
+/* Make stack traces always identify version + configuration */
+/* C makes this bizarre circumlocution necessary. */
+#define PASTE_1(x,y) PASTE_2(x,y)
+#define PASTE_2(x,y) x##y
+#define main_1 PASTE_1(main_, CANONICAL_VERSION)
+
 static DOESNT_RETURN
 main_1 (int argc, char **argv, char **envp)
 {
@@ -452,7 +465,7 @@
 #endif
 
 #ifndef SYSTEM_MALLOC
-  /* Make sure that any libraries we link against haven't installed a 
+  /* Make sure that any libraries we link against haven't installed a
      hook for a gmalloc of a potentially incompatible version. */
   __malloc_hook = NULL;
   __realloc_hook = NULL;
@@ -599,7 +612,7 @@
 	dup (0);
 	if (! isatty (0))
 	  fatal ("%s: not a tty", term);
- 
+
 #if 0
 	stderr_out ("Using %s", ttyname (0));
 #endif
@@ -626,7 +639,7 @@
   if (argmatch (argv, argc, "-version", "--version", 3, NULL, &skip_args) ||
       argmatch (argv, argc, "-V",    0,              2, NULL, &skip_args))
       noninteractive = 1, skip_args--;
-  
+
   /* Now, figure out which type of console is our first console. */
 
   display_arg = 0;
@@ -651,7 +664,7 @@
 #ifdef HAVE_X_WINDOWS
       char *dpy = 0;
       int count_before = skip_args;
-      
+
       if (argmatch (argv, argc, "-d", "--display", 3, &dpy, &skip_args) ||
 	  argmatch (argv, argc, "-display", 0,     3, &dpy, &skip_args))
 	{
@@ -688,7 +701,7 @@
          if the display was specified on the command line. */
       if ((dpy = getenv ("DISPLAY")) && dpy[0])
 	display_use = "x";
-      
+
 #endif /* HAVE_X_WINDOWS */
     }
 #endif /* HAVE_WINDOW_SYSTEM */
@@ -888,7 +901,7 @@
 #endif
 
 #ifdef EMACS_BTL
-      syms_of_btl (); 
+      syms_of_btl ();
 #endif
 
 #ifdef ENERGIZE
@@ -1246,7 +1259,7 @@
       complex_vars_of_event_stream ();
       /* Calls make_lisp_hashtable(). */
       complex_vars_of_extents ();
-      
+
       /* Depends on hashtables and specifiers. */
       complex_vars_of_faces ();
 
@@ -1523,7 +1536,7 @@
   { "-reverse", 0, 5, 0 },
   { "-hb", "--horizontal-scroll-bars", 5, 0 },
   { "-vb", "--vertical-scroll-bars", 5, 0 },
-  
+
   /* These have the same priority as ordinary file name args,
      so they are not reordered with respect to those.  */
   { "-L", "--directory", 0, 1 },
@@ -1646,7 +1659,7 @@
 	  if (options[from] > 0)
 	    from += options[from];
 	}
-	    
+
       if (best < 0)
 	abort ();
 
@@ -1713,7 +1726,7 @@
 
   /* Need to convert the orig_invoc_name and all of the arguments
      to external format. */
-  
+
   GET_STRING_EXT_DATA_ALLOCA (orig_invoc_name, FORMAT_OS, wampum,
 			      namesize);
   namesize++;
@@ -1751,7 +1764,7 @@
 }
 
 /* ARGSUSED */
-DOESNT_RETURN
+int
 main (int argc, char **argv, char **envp)
 {
   int     volatile vol_argc = argc;
@@ -1783,12 +1796,12 @@
 	 However, on both my systems environ is a plain old global
 	 variable initialized to zero.  _environ is the one that
 	 contains pointers to the actual environment.
-	
+
 	 Since we can't figure out the difference (and we're hours
 	 away from a release), this takes a very cowardly approach and
 	 is bracketed with both a system specific preprocessor test
 	 and a runtime "do you have this problem" test
-	
+
 	 06/20/96 robertl@dgii.com */
       {
 	extern char *_environ;
@@ -1801,6 +1814,7 @@
   run_temacs_argc = -1;
 
   main_1 (vol_argc, vol_argv, vol_envp);
+  return 0; /* unreached */
 }
 
 
@@ -2285,6 +2299,25 @@
 */ );
   Vsystem_configuration = Fpurecopy (build_string (EMACS_CONFIGURATION));
 
+  DEFVAR_INT ("emacs-beta-version", &emacs_beta_version /*
+Beta number of this version of Emacs, as an integer.
+The value is nil if this is an officially released version of XEmacs.
+Warning: this variable does not exist in FSF Emacs or in XEmacs versions
+earlier than 20.3.
+*/ );
+#ifndef EMACS_BETA_VERSION
+#define EMACS_BETA_VERSION Qnil
+#endif
+  emacs_beta_version = EMACS_BETA_VERSION;
+
+  DEFVAR_LISP ("xemacs-codename", &Vxemacs_codename /*
+Codename of this version of Emacs (a string).
+*/ );
+#ifndef XEMACS_CODENAME
+#define XEMACS_CODENAME Qnil
+#endif
+  Vxemacs_codename = Fpurecopy (build_string (XEMACS_CODENAME));
+
   DEFVAR_BOOL ("noninteractive", &noninteractive1 /*
 Non-nil means XEmacs is running without interactive terminal.
 */ );
@@ -2298,4 +2331,24 @@
 before you compile XEmacs, to enable the code for this feature.
 */ );
   emacs_priority = 0;
+
+  DEFVAR_INT ("emacs-major-version", &emacs_major_version /*
+Major version number of this version of Emacs, as an integer.
+Warning, this variable did not exist in Emacs versions earlier than:
+  FSF Emacs:   19.23
+  XEmacs:      19.10
+This variable was not available to temacs prior to:
+  XEmacs:      20.3
+*/ );
+  emacs_major_version = EMACS_MAJOR_VERSION;
+
+  DEFVAR_INT ("emacs-minor-version", &emacs_minor_version /*
+Minor version number of this version of Emacs, as an integer.
+Warning, this variable did not exist in Emacs versions earlier than:
+  FSF Emacs:   19.23
+  XEmacs:      19.10
+This variable was not available to temacs prior to:
+  XEMacs:      20.3
+*/ );
+  emacs_minor_version = EMACS_MINOR_VERSION;
 }
diff -r 4de2936b4e77 -r 0132846995bd src/emacsfns.h
--- a/src/emacsfns.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/emacsfns.h	Mon Aug 13 09:43:35 2007 +0200
@@ -1092,6 +1092,7 @@
 				 Lisp_Object x, Lisp_Object y);
 Lisp_Object Fset_mouse_pixel_position (Lisp_Object window,
 				       Lisp_Object x, Lisp_Object y);
+Lisp_Object Fraise_frame (Lisp_Object frame);
 Lisp_Object Fmake_frame_visible (Lisp_Object frame);
 Lisp_Object Fmake_frame_invisible (Lisp_Object frame,
 				   Lisp_Object ignored);
@@ -1171,6 +1172,7 @@
 extern Lisp_Object Qactually_requested;
 extern Lisp_Object Qafter;
 extern Lisp_Object Qall;
+extern Lisp_Object Qand;
 extern Lisp_Object Qassoc;
 extern Lisp_Object Qat;
 extern Lisp_Object Qautodetect;
@@ -1244,10 +1246,12 @@
 extern Lisp_Object Qmotion;
 extern Lisp_Object Qname;
 extern Lisp_Object Qnone;
+extern Lisp_Object Qnot;
 extern Lisp_Object Qnothing;
 extern Lisp_Object Qnotice;
 extern Lisp_Object Qobject;
 extern Lisp_Object Qonly;
+extern Lisp_Object Qor;
 extern Lisp_Object Qother;
 extern Lisp_Object Qpath;
 extern Lisp_Object Qpointer;
diff -r 4de2936b4e77 -r 0132846995bd src/eval.c
--- a/src/eval.c	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/eval.c	Mon Aug 13 09:43:35 2007 +0200
@@ -148,6 +148,10 @@
    if an error is handled by the command loop's error handler.  */
 Lisp_Object Vdebug_on_error;
 
+/* List of conditions and regexps specifying error messages which
+   do not enter the debugger even if Vdebug_on_error says they should.  */
+Lisp_Object Vdebug_ignored_errors;
+
 /* List of conditions (non-nil atom means all) which cause a backtrace
    if any error is signalled.  */
 Lisp_Object Vstack_trace_on_signal;
@@ -468,6 +472,51 @@
   return 0;
 }
 
+
+/* Return 1 if an error with condition-symbols CONDITIONS,
+   and described by SIGNAL-DATA, should skip the debugger
+   according to debugger-ignore-errors.  */
+
+extern Lisp_Object Frunning_temacs_p();
+
+static int
+skip_debugger (Lisp_Object conditions, Lisp_Object data)
+{
+  Lisp_Object tail;
+  int first_string = 1;
+  Lisp_Object error_message;
+
+  if (!NILP(Frunning_temacs_p()) || NILP(Vdebug_ignored_errors))
+    {
+      return 1;
+    }
+
+  for (tail = Vdebug_ignored_errors; CONSP (tail); tail = XCDR (tail))
+    {
+      if (STRINGP (XCAR (tail)))
+	{
+	  if (first_string)
+	    {
+/*	      error_message = Ferror_message_string (data);*/
+	      error_message = build_string("Tell_Hrvoje");
+	      first_string = 0;
+	    }
+	  if (fast_lisp_string_match (XCAR (tail), error_message) >= 0)
+	    return 1;
+	}
+      else
+	{
+	  Lisp_Object contail;
+
+          for (contail = conditions; CONSP (contail); contail = XCDR (contail))
+            if (EQ (XCAR (tail), XCAR (contail)))
+	      return 1;
+	}
+    }
+
+  return 0;
+}
+
 /* Actually generate a backtrace on STREAM. */
 
 static Lisp_Object
@@ -515,12 +564,16 @@
   Lisp_Object val = Qunbound;
   Lisp_Object all_handlers = Vcondition_handlers;
   int speccount = specpdl_depth_counter;
+  int skip_debugger_for_error = 0;
   struct gcpro gcpro1;
   GCPRO1 (all_handlers);
 
   Vcondition_handlers = active_handlers;
 
-  if (!entering_debugger && !*stack_trace_displayed && !signal_vars_only 
+  skip_debugger_for_error = skip_debugger (conditions, Fcons (sig, data));
+
+  if (!entering_debugger && !*stack_trace_displayed && !signal_vars_only
+      && !skip_debugger_for_error
       && wants_debugger (Vstack_trace_on_error, conditions))
     {
       specbind (Qdebug_on_error, Qnil);
@@ -537,6 +590,7 @@
     }
       
   if (!entering_debugger && !*debugger_entered && !signal_vars_only
+      && !skip_debugger_for_error
       && (EQ (sig, Qquit)
 	  ? debug_on_quit
 	  : wants_debugger (Vdebug_on_error, conditions)))
@@ -5159,6 +5213,16 @@
 */ );
   Vstack_trace_on_signal = Qnil;
 
+  DEFVAR_LISP ("debug-ignored-errors", &Vdebug_ignored_errors /*
+*List of errors for which the debugger should not be called.
+Each element may be a condition-name or a regexp that matches error messages.
+If any element applies to a given error, that error skips the debugger
+and just returns to top level.
+This overrides the variable `debug-on-error'.
+It does not apply to errors handled by `condition-case'.
+*/ );
+  Vdebug_ignored_errors = Qnil;
+
   DEFVAR_LISP ("debug-on-error", &Vdebug_on_error /*
 *Non-nil means enter debugger if an unhandled error is signalled.
 The debugger will not be entered if the error is handled by
diff -r 4de2936b4e77 -r 0132846995bd src/events.c
--- a/src/events.c	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/events.c	Mon Aug 13 09:43:35 2007 +0200
@@ -63,7 +63,7 @@
 Lisp_Object Qmouse_event_p;
 Lisp_Object Qprocess_event_p;
 
-Lisp_Object Qkey_press, Qbutton_press, Qbutton_release, Qmisc_user, Qempty;
+Lisp_Object Qkey_press, Qbutton_press, Qbutton_release, Qmisc_user;
 Lisp_Object Qascii_character;
 
 /* #### Ad-hoc hack.  Should be part of define_lrecord_implementation */
@@ -1839,7 +1839,6 @@
   defsymbol (&Qbutton_press, "button-press");
   defsymbol (&Qbutton_release, "button-release");
   defsymbol (&Qmisc_user, "misc-user");
-  defsymbol (&Qempty, "empty");
   defsymbol (&Qascii_character, "ascii-character");
 }
 
diff -r 4de2936b4e77 -r 0132846995bd src/fns.c
--- a/src/fns.c	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/fns.c	Mon Aug 13 09:43:35 2007 +0200
@@ -3271,6 +3271,21 @@
   return Flist (len, args);
 }
 
+DEFUN ("mapvector", Fmapvector, 2, 2, 0, /*
+Apply FUNCTION to each element of SEQUENCE, making a vector of the results.
+The result is a vector of the same length as SEQUENCE.
+SEQUENCE may be a list, a vector or a string.
+*/
+       (fn, seq))
+{
+  int len = XINT (Flength (seq));
+  Lisp_Object *args = (Lisp_Object *) alloca (len * sizeof (Lisp_Object));
+
+  mapcar1 (len, args, fn, seq);
+
+  return Fvector (len, args);
+}
+
 DEFUN ("mapc-internal", Fmapc_internal, 2, 2, 0, /*
 Apply FUNCTION to each element of SEQUENCE.
 SEQUENCE may be a list, a vector, a bit vector, or a string.
@@ -3332,6 +3347,79 @@
   CHECK_SYMBOL (feature);
   return NILP (Fmemq (feature, Vfeatures)) ? Qnil : Qt;
 }
+#else
+extern int emacs_major_version, emacs_minor_version;
+
+DEFUN ("featurep", Ffeaturep, 1, 1, 0, /*
+Return non-nil if feature expression FEXP is true.
+*/
+       (fexp))
+{
+  static double featurep_emacs_version;
+
+  /* Brute force translation from Erik Naggum's lisp function. */
+  if (SYMBOLP(fexp))
+    {
+      /* Original definition */
+      return NILP (Fmemq (fexp, Vfeatures)) ? Qnil : Qt;
+    }
+  else if (INTP(fexp) || FLOATP(fexp))
+    {
+      double d = extract_float(fexp);
+
+      if (featurep_emacs_version == 0.0)
+	{
+	  featurep_emacs_version = emacs_major_version +
+	    (emacs_minor_version / 100.0);
+	}
+      return (featurep_emacs_version >= d) ? Qt : Qnil;
+    }
+  else if (CONSP(fexp))
+    {
+      Lisp_Object tem;
+
+      tem = XCAR(fexp);
+      if (EQ(tem, Qnot))
+	{
+	  Lisp_Object negate = XCDR(fexp);
+
+	  if (!NILP(XCDR(fexp)))
+	    {
+	      return Fsignal(Qinvalid_read_syntax, list1(XCDR(fexp)));
+	    }
+	  else
+	    {
+	      return NILP(Ffeaturep(negate)) ? Qt : Qnil;
+	    }
+	}
+      else if (EQ(tem, Qand))
+	{
+	  tem = XCDR(fexp);
+	  while (!NILP(tem) && !NILP(Ffeaturep(XCAR(tem))))
+	    {
+	      tem = XCDR(tem);
+	    }
+	  return NILP(tem) ? Qt : Qnil;
+	}
+      else if (EQ(tem, Qor))
+	{
+	  tem = XCDR(fexp);
+	  while (!NILP(tem) && NILP(Ffeaturep(XCAR(tem))))
+	    {
+	      tem = XCDR(tem);
+	    }
+	  return NILP(tem) ? Qnil : Qt;
+	}
+      else
+	{
+	  return Fsignal(Qinvalid_read_syntax, list1(XCDR(fexp)));
+	}
+    }
+  else
+    {
+      return Fsignal(Qinvalid_read_syntax, list1 (fexp));
+    }
+}
 #endif
 
 DEFUN ("provide", Fprovide, 1, 1, 0, /*
@@ -3465,12 +3553,13 @@
   DEFSUBR (Ffillarray);
   DEFSUBR (Fnconc);
   DEFSUBR (Fmapcar);
+  DEFSUBR (Fmapvector);
   DEFSUBR (Fmapc_internal);
   DEFSUBR (Fmapconcat);
   DEFSUBR (Fload_average);
-#ifndef FEATUREP_SYNTAX
+/*#ifndef FEATUREP_SYNTAX*/
   DEFSUBR (Ffeaturep);
-#endif
+/*#endif*/
   DEFSUBR (Frequire);
   DEFSUBR (Fprovide);
 }
diff -r 4de2936b4e77 -r 0132846995bd src/frame-x.c
--- a/src/frame-x.c	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/frame-x.c	Mon Aug 13 09:43:35 2007 +0200
@@ -201,7 +201,7 @@
   /* Because of questionable logic in Shell.c, this sequence can't work:
 
        w = XtCreatePopupShell (...);
-       XtVaSetValues (w, XtNiconic, True, 0);
+       XtVaSetValues (w, XtNiconic, True, NULL);
        XtRealizeWidget (w);
 
      The iconic resource is only consulted at initialization time (when
@@ -216,7 +216,7 @@
      realization.  This is true of MIT X11R5 patch level 25, at least.
      (Apparently some other versions of Xt don't have this bug?)
    */
-  XtVaSetValues (shell, XtNiconic, iconic_p, 0);
+  XtVaSetValues (shell, XtNiconic, iconic_p, NULL);
   EmacsShellSmashIconicHint (shell, iconic_p);
 }
 
@@ -231,7 +231,7 @@
   XtVaSetValues (wmshell,
 		 XtNwidthInc, cw, 
 		 XtNheightInc, ch,
-		 0);
+		 NULL);
 }
 
 void
@@ -247,7 +247,7 @@
   XtVaSetValues (wmshell,
 		 XtNwidthCells, width,
 		 XtNheightCells, height,
-		 0);
+		 NULL);
 }
 
 /* If the WM_PROTOCOLS property does not already contain WM_TAKE_FOCUS
@@ -718,7 +718,7 @@
     }
   else
     temp = NULL;
-  XtVaSetValues (FRAME_X_SHELL_WIDGET (f), XtNgeometry, temp, 0);
+  XtVaSetValues (FRAME_X_SHELL_WIDGET (f), XtNgeometry, temp, NULL);
 }
 
 /* Report to X that a frame property of frame S is being set or changed.
@@ -758,13 +758,13 @@
 
 	      GET_STRING_CTEXT_DATA_ALLOCA (val, extval, extvallen);
 	      XtVaSetValues (w, XtVaTypedArg, extprop,
-			     XtRString, extval, extvallen + 1, 0);
+			     XtRString, extval, extvallen + 1, NULL);
 	    }
 	  else
 	    XtVaSetValues (w, XtVaTypedArg,
 			   extprop, XtRInt, XINT (val),
 			   sizeof (int),
-			   0);
+			   NULL);
 	}
       else if (SYMBOLP (prop))
 	{
@@ -838,20 +838,20 @@
 	    {
 	      CHECK_INT (val);
 	      XtVaSetValues (w, (char *) XSTRING_DATA (str),
-			     XINT (val), 0);
+			     XINT (val), NULL);
 	    }
 	  else if (EQ (val, Qt))
 	    XtVaSetValues (w,
 			   /* XtN... */
 			   (char *) XSTRING_DATA (str),
 			   True,
-			   0);
+			   NULL);
 	  else if (EQ (val, Qnil))
 	    XtVaSetValues (w,
 			   /* XtN... */
 			   (char *) XSTRING_DATA (str),
 			   False,
-			   0);
+			   NULL);
 	  else
 	    {
 	      CHECK_STRING (val);
@@ -861,7 +861,7 @@
 			     XtRString,
 			     XSTRING_DATA (val),
 			     XSTRING_LENGTH (val) + 1,
-			     0);
+			     NULL);
 	    }
 
 #ifdef HAVE_SCROLLBARS
@@ -1354,14 +1354,14 @@
 
   if (!FRAME_X_TOP_LEVEL_FRAME_P (f))
     {
-      XtVaGetValues (ew, XtNgeometry, &ew_geom, 0);
+      XtVaGetValues (ew, XtNgeometry, &ew_geom, NULL);
       if (ew_geom)
 	frame_flags = XParseGeometry (ew_geom, &frame_x, &frame_y,
 				       &frame_w, &frame_h);
       if (! (frame_flags & (WidthValue | HeightValue)))
 	{
 	  XtVaGetValues (ew, XtNwidth, &frame_w,
-			 XtNheight, &frame_h, 0);
+			 XtNheight, &frame_h, NULL);
 	  if (!frame_w && !frame_h)
 	    {
 	      frame_w = 64;
@@ -1374,12 +1374,12 @@
       if (frame_flags & (XValue | YValue))
 	{
 	  XtVaGetValues (ew, XtNwidth, &frame_w,
-			 XtNheight, &frame_h, 0);
+			 XtNheight, &frame_h, NULL);
 	  if (frame_flags & XNegative)
 	    frame_x += frame_w;
 	  if (frame_flags & YNegative)
 	    frame_y += frame_h;
-	  XtVaSetValues (ew, XtNx, frame_x, XtNy, frame_y, 0);
+	  XtVaSetValues (ew, XtNx, frame_x, XtNy, frame_y, NULL);
 	}
       return;
     }
@@ -1394,31 +1394,31 @@
      treat that as the geometry of the frame.  (Is this bogus?
      I'm not sure.) */
 
-  XtVaGetValues (ew, XtNgeometry, &ew_geom, 0);
+  XtVaGetValues (ew, XtNgeometry, &ew_geom, NULL);
   if (!ew_geom)
     {
-      XtVaGetValues (wmshell, XtNgeometry, &geom, 0);
+      XtVaGetValues (wmshell, XtNgeometry, &geom, NULL);
       if (geom)
 	{
 	  ew_geom = geom;
-	  XtVaSetValues (ew, XtNgeometry, ew_geom, 0);
+	  XtVaSetValues (ew, XtNgeometry, ew_geom, NULL);
 	}
     }
 
   /* If the Shell is iconic, then the EmacsFrame is iconic.  (Is
      this bogus? I'm not sure.) */
-  XtVaGetValues (ew, XtNiconic, &ew_iconic_p, 0);
+  XtVaGetValues (ew, XtNiconic, &ew_iconic_p, NULL);
   if (!ew_iconic_p)
     {
-      XtVaGetValues (wmshell, XtNiconic, &iconic_p, 0);
+      XtVaGetValues (wmshell, XtNiconic, &iconic_p, NULL);
       if (iconic_p)
 	{
 	  ew_iconic_p = iconic_p;
-	  XtVaSetValues (ew, XtNiconic, iconic_p, 0);
+	  XtVaSetValues (ew, XtNiconic, iconic_p, NULL);
 	}
     }
   
-  XtVaGetValues (app_shell, XtNgeometry, &geom, 0);
+  XtVaGetValues (app_shell, XtNgeometry, &geom, NULL);
   if (geom)
     app_flags = XParseGeometry (geom, &app_x, &app_y, &app_w, &app_h);
 
@@ -1467,11 +1467,11 @@
       /* If the AppShell is iconic, then the EmacsFrame is iconic. */
       if (!ew_iconic_p)
 	{
-	  XtVaGetValues (app_shell, XtNiconic, &iconic_p, 0);
+	  XtVaGetValues (app_shell, XtNiconic, &iconic_p, NULL);
 	  if (iconic_p)
 	    {
 	      ew_iconic_p = iconic_p;
-	      XtVaSetValues (ew, XtNiconic, iconic_p, 0);
+	      XtVaSetValues (ew, XtNiconic, iconic_p, NULL);
 	    }
 	}
     }
@@ -1561,7 +1561,7 @@
     /* The scrollbar positioning is completely handled by redisplay.  We
        just need to know which sides they are supposed to go on. */
     unsigned char scrollbar_placement;
-    XtVaGetValues (text, XtNscrollBarPlacement, &scrollbar_placement, 0);
+    XtVaGetValues (text, XtNscrollBarPlacement, &scrollbar_placement, NULL);
     f->scrollbar_on_left = (scrollbar_placement == XtTOP_LEFT ||
                             scrollbar_placement == XtBOTTOM_LEFT);
     f->scrollbar_on_top  = (scrollbar_placement == XtTOP_LEFT ||
@@ -1725,7 +1725,7 @@
   /* Create the manager widget */
   container = XtVaCreateWidget ("container",
 				emacsManagerWidgetClass,
-				shell, 0);
+				shell, NULL);
   FRAME_X_CONTAINER_WIDGET (f) = container;
   XtAddCallback (container, XtNresizeCallback, x_layout_widgets,
 		 (XtPointer) f);
@@ -2068,7 +2068,7 @@
 		 XtNwidth,       &shell_w,
 		 XtNheight,      &shell_h,
 		 XtNborderWidth, &shell_bord,
-		 0);
+		 NULL);
 
   win_gravity =
     xoff >= 0 && yoff >= 0 ? NorthWestGravity :
@@ -2088,7 +2088,7 @@
 		 XtNwinGravity, win_gravity,
 		 XtNx, xoff,
 		 XtNy, yoff,
-		 0);
+		 NULL);
   
   /* Sometimes you will find that
 
diff -r 4de2936b4e77 -r 0132846995bd src/general.c
--- a/src/general.c	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/general.c	Mon Aug 13 09:43:35 2007 +0200
@@ -34,6 +34,7 @@
 Lisp_Object Qactually_requested;
 Lisp_Object Qafter;
 Lisp_Object Qall;
+Lisp_Object Qand;
 Lisp_Object Qassoc;
 Lisp_Object Qat;
 Lisp_Object Qautodetect;
@@ -107,10 +108,12 @@
 Lisp_Object Qmotion;
 Lisp_Object Qname;
 Lisp_Object Qnone;
+Lisp_Object Qnot;
 Lisp_Object Qnothing;
 Lisp_Object Qnotice;
 Lisp_Object Qobject;
 Lisp_Object Qonly;
+Lisp_Object Qor;
 Lisp_Object Qother;
 Lisp_Object Qpath;
 Lisp_Object Qpointer;
@@ -163,6 +166,7 @@
   defsymbol (&Qactually_requested, "actually-requested");
   defsymbol (&Qafter, "after");
   defsymbol (&Qall, "all");
+  defsymbol (&Qand, "and");
   defsymbol (&Qassoc, "assoc");
   defsymbol (&Qat, "at");
   defsymbol (&Qautodetect, "autodetect");
@@ -236,10 +240,12 @@
   defsymbol (&Qminus, "-");
   defsymbol (&Qname, "name");
   defsymbol (&Qnone, "none");
+  defsymbol (&Qnot, "not");
   defsymbol (&Qnothing, "nothing");
   defsymbol (&Qnotice, "notice");
   defsymbol (&Qobject, "object");
   defsymbol (&Qonly, "only");
+  defsymbol (&Qor, "or");
   defsymbol (&Qother, "other");
   defsymbol (&Qpath, "path");
   defsymbol (&Qpointer, "pointer");
diff -r 4de2936b4e77 -r 0132846995bd src/glyphs-x.c
--- a/src/glyphs-x.c	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/glyphs-x.c	Mon Aug 13 09:43:35 2007 +0200
@@ -1060,8 +1060,8 @@
  *                             JPEG                                   *
  **********************************************************************/
 
-#include "jpeglib.h"
-#include "jerror.h"
+#include <jpeglib.h>
+#include <jerror.h>
 
 /* The in-core jpeg code doesn't work, so I'm avoiding it for now.  -sb  */
 /* Late-breaking update, we're going to give it a try, I think it's */
diff -r 4de2936b4e77 -r 0132846995bd src/lstream.c
--- a/src/lstream.c	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/lstream.c	Mon Aug 13 09:43:35 2007 +0200
@@ -987,7 +987,7 @@
       /* To make life easy, only send out one line at the most. */
       CONST unsigned char *ptr;
 
-      ptr = memchr (data, '\n', size);
+      ptr = (CONST unsigned char *) memchr (data, '\n', size);
       if (ptr)
 	need_newline = 1;
       else
diff -r 4de2936b4e77 -r 0132846995bd src/m/7300.h
--- a/src/m/7300.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/m/7300.h	Mon Aug 13 09:43:35 2007 +0200
@@ -82,8 +82,8 @@
    both of which have been fixed now. */
 #define SECTION_ALIGNMENT 0x03ff
 #define SEGMENT_MASK 0xffff
-#define LD_SWITCH_MACHINE -z
+#define LD_SWITCH_MACHINE "-z"
 
 /* Insist on using cc when compiling this.  GCC may have been
    configured to use GAS syntax, which causes problems.  */
-#define CRT0_COMPILE cc -c -O -Demacs
+#define CRT0_COMPILE "cc -c -O -Demacs"
diff -r 4de2936b4e77 -r 0132846995bd src/m/acorn.h
--- a/src/m/acorn.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/m/acorn.h	Mon Aug 13 09:43:35 2007 +0200
@@ -140,10 +140,10 @@
 #define LIBS_DEBUG
 
 /* Avoid sharing libc */
-#define LIB_STANDARD -lc_n
+#define LIB_STANDARD "-lc_n"
 
 /* Avoid sharing libX11 */
-#define LIB_X11_LIB -lX11_n
+#define LIB_X11_LIB "-lX11_n"
 
 /* All kinds of symbol definitions, so as to avoid multiply defined symbol
    errors from the RISCiX linker. */
@@ -151,10 +151,10 @@
 #ifdef __GNUC__
 #define C_DEBUG_SWITCH
 
-#define C_OPTIMIZE_SWITCH -O1 -fomit-frame-pointer -w -g -Dgetopt=gnu_getopt -Dopterr=gnu_opterr -Doptind=gnu_optind -Doptarg=gnu_optarg -Dcfree=gnu_cfree -D___type=
+#define C_OPTIMIZE_SWITCH "-O1 -fomit-frame-pointer -w -g -Dgetopt=gnu_getopt -Dopterr=gnu_opterr -Doptind=gnu_optind -Doptarg=gnu_optarg -Dcfree=gnu_cfree -D___type="
 
 #else
-#define C_DEBUG_SWITCH -O -w -g -Dgetopt=gnu_getopt -Dopterr=gnu_opterr -Doptind=gnu_optind -Doptarg=gnu_optarg -Dcfree=gnu_cfree
+#define C_DEBUG_SWITCH "-O -w -g -Dgetopt=gnu_getopt -Dopterr=gnu_opterr -Doptind=gnu_optind -Doptarg=gnu_optarg -Dcfree=gnu_cfree"
 #endif
 
 /* Turn this on to avoid the emacs malloc and use standard one */
@@ -166,7 +166,7 @@
 
 #ifdef NO_REMAP
 /* CRT0_O is defined in s/riscix1-1.h or s/riscix1-2.h, as appropriate. */
-#define START_FILES pre-crt0.o CRT0_O
+#define START_FILES "pre-crt0.o CRT0_O"
 #else
 Cannot
 do
diff -r 4de2936b4e77 -r 0132846995bd src/m/alliant-2800.h
--- a/src/m/alliant-2800.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/m/alliant-2800.h	Mon Aug 13 09:43:35 2007 +0200
@@ -37,7 +37,7 @@
 #define ALLIANT
 #define ALLIANT_2800
 #define sun			/* Use X support for Sun keyboard stuff. */
-#define C_OPTIMIZE_SWITCH -Og	/* No concurrent code allowed here. */
+#define C_OPTIMIZE_SWITCH "-Og"	/* No concurrent code allowed here. */
 
 /* Define EXPLICIT_SIGN_EXTEND if XINT must explicitly sign-extend
    the bit field into an int.  In other words, if bit fields
@@ -69,8 +69,8 @@
    and temacs will do (load "loadup") automatically unless told otherwise.  */
 
 /* #define CANNOT_DUMP */
-#define UNEXEC unexfx2800.o
-#define LIBS_MACHINE -lalliant
+#define UNEXEC "unexfx2800.o"
+#define LIBS_MACHINE "-lalliant"
 
 /* Define VIRT_ADDR_VARIES if the virtual addresses of
    pure and impure space as loaded can vary, and even their
@@ -103,7 +103,7 @@
 
 /* Alliant needs special crt0.o because system version is not reentrant */
 
-#define START_FILES crt0.o
+#define START_FILES "crt0.o"
 
 /* Alliant dependent code for dumping executing image.
    See crt0.c code for alliant.  */
diff -r 4de2936b4e77 -r 0132846995bd src/m/alliant.h
--- a/src/m/alliant.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/m/alliant.h	Mon Aug 13 09:43:35 2007 +0200
@@ -95,7 +95,7 @@
 
 /* Alliant needs special crt0.o because system version is not reentrant */
 
-#define START_FILES crt0.o
+#define START_FILES "crt0.o"
 
 /* Alliant dependent code for dumping executing image.
    See crt0.c code for alliant.  */
diff -r 4de2936b4e77 -r 0132846995bd src/m/alpha.h
--- a/src/m/alpha.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/m/alpha.h	Mon Aug 13 09:43:35 2007 +0200
@@ -167,14 +167,14 @@
 #ifndef __GNUC__
 /* This apparently is for the system ld as opposed to Gnu ld.  */
 #ifdef OSF1
-#define LD_SWITCH_MACHINE      -non_shared
+#define LD_SWITCH_MACHINE "-non_shared"
 #endif /* OSF1 */
 #endif /* not __GNUC__ */
 #endif /* 0 */
 
 #ifdef OSF1
 #define LIBS_DEBUG
-#define START_FILES pre-crt0.o 
+#define START_FILES "pre-crt0.o "
 #endif /* OSF1 */
 
 #ifdef LINUX
@@ -184,7 +184,7 @@
 
 /* The program to be used for unexec. */
 
-#define UNEXEC unexalpha.o
+#define UNEXEC "unexalpha.o"
 
 #define PNTR_COMPARISON_TYPE unsigned long
 
diff -r 4de2936b4e77 -r 0132846995bd src/m/altos.h
--- a/src/m/altos.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/m/altos.h	Mon Aug 13 09:43:35 2007 +0200
@@ -26,7 +26,7 @@
 
 #define EXPLICIT_SIGN_EXTEND
 
-#define LIB_STANDARD -lc
+#define LIB_STANDARD "-lc"
 
 #ifdef __GNUC__
 #define alloca __builtin_alloca
@@ -47,7 +47,7 @@
 #undef SHORTNAMES
 #define TERMCAP
 
-#define LIBS_TERMCAP -ltermlib
+#define LIBS_TERMCAP "-ltermlib"
 #define SYSTEM_PURESIZE_EXTRA 100000
 #define ALTOS
 
diff -r 4de2936b4e77 -r 0132846995bd src/m/amdahl.h
--- a/src/m/amdahl.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/m/amdahl.h	Mon Aug 13 09:43:35 2007 +0200
@@ -88,7 +88,7 @@
 /*#define HAVE_ALLOCA */
 
 #ifdef HAVE_ALLOCA
-#define LIB_STANDARD -lPW -lc
+#define LIB_STANDARD "-lPW -lc"
 #endif
 
 /* Define NO_REMAP if memory segmentation makes it not work well
@@ -115,7 +115,7 @@
    proper declaration of data_start in the #undef NO_REMAP case */
 
 #ifndef NO_REMAP
-#define START_FILES pre-crt0.o /lib/crt0.o
+#define START_FILES "pre-crt0.o /lib/crt0.o"
 #endif
 
 /* Perhaps this means that the optimizer isn't safe to use.  */
@@ -124,7 +124,7 @@
 
 /* Put text and data on non-segment boundary; makes image smaller */
 
-#define LD_SWITCH_MACHINE	-N 
+#define LD_SWITCH_MACHINE "-N"
 
 /* When writing the 'xemacs' file, make text segment ro */
 #define EXEC_MAGIC	0410
diff -r 4de2936b4e77 -r 0132846995bd src/m/apollo.h
--- a/src/m/apollo.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/m/apollo.h	Mon Aug 13 09:43:35 2007 +0200
@@ -64,7 +64,7 @@
 
 /* Define the file we use for UNEXEC. */
 
-#define UNEXEC unexapollo.o
+#define UNEXEC "unexapollo.o"
 
 /* The Apollo linker does not recognize the -X switch, so we remove it here. */
 
@@ -75,14 +75,14 @@
    and use X11 libraries. */
 
 #if _ISP__A88K
-#define C_SWITCH_MACHINE -W0,-ncompress -W0,-opt,2 -A cpu,a88k -A sys,any -A run,bsd4.3
-#define LD_SWITCH_MACHINE -A cpu,a88k -A sys,any -A run,bsd4.3
+#define C_SWITCH_MACHINE "-W0,-ncompress -W0,-opt,2 -A cpu,a88k -A sys,any -A run,bsd4.3"
+#define LD_SWITCH_MACHINE "-A cpu,a88k -A sys,any -A run,bsd4.3"
 #else
-#define C_SWITCH_MACHINE -W0,-ncompress -W0,-opt,2 -A cpu,3000 -A sys,any -A run,bsd4.3
-#define LD_SWITCH_MACHINE -A cpu,m68k -A sys,any -A run,bsd4.3
+#define C_SWITCH_MACHINE "-W0,-ncompress -W0,-opt,2 -A cpu,3000 -A sys,any -A run,bsd4.3"
+#define LD_SWITCH_MACHINE "-A cpu,m68k -A sys,any -A run,bsd4.3"
 #endif
 
-#define OLDXMENU_OPTIONS ${C_SWITCH_MACHINE}
+#define OLDXMENU_OPTIONS "${C_SWITCH_MACHINE}"
 
 #if 0 /* from FSF Emacs */
 
diff -r 4de2936b4e77 -r 0132846995bd src/m/att3b.h
--- a/src/m/att3b.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/m/att3b.h	Mon Aug 13 09:43:35 2007 +0200
@@ -73,7 +73,7 @@
 
 /* SysV has alloca in the PW library */
 
-#define LIB_STANDARD -lPW -lc
+#define LIB_STANDARD "-lPW -lc"
 #define HAVE_ALLOCA
 
 /* Define NO_REMAP if memory segmentation makes it not work well
diff -r 4de2936b4e77 -r 0132846995bd src/m/celerity.h
--- a/src/m/celerity.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/m/celerity.h	Mon Aug 13 09:43:35 2007 +0200
@@ -41,7 +41,7 @@
 
 /* A machine-specific loader switch is needed.  */
 
-#define LD_SWITCH_MACHINE -k100000
+#define LD_SWITCH_MACHINE "-k100000"
 
 /* alloca is provided by the system.  */
 
diff -r 4de2936b4e77 -r 0132846995bd src/m/convex.h
--- a/src/m/convex.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/m/convex.h	Mon Aug 13 09:43:35 2007 +0200
@@ -82,7 +82,7 @@
 
 /* Must use the system's termcap.  It does special things.  */
   
-#define LIBS_TERMCAP -ltermcap
+#define LIBS_TERMCAP "-ltermcap"
   
 /* Define NO_REMAP if memory segmentation makes it not work well
    to change the boundary between the text section and data section
@@ -103,7 +103,7 @@
 
 /* Convex uses a special version of unexec.  */
 
-#define UNEXEC unexconvex.o
+#define UNEXEC "unexconvex.o"
 
 /* you gotta define 'COFF' for post 6.1 unexec. */
 
@@ -112,9 +112,7 @@
 
 /* Posix stuff for Convex OS 8.1 and up. */
 
-#define LD_SWITCH_MACHINE \
-    -e__start -L /usr/lib \
-    '-A__iob=___ap$$iob' '-A_use_libc_sema=___ap$$use_libc_sema'
+#define LD_SWITCH_MACHINE "-e__start -L /usr/lib '-A__iob=___ap$$iob' '-A_use_libc_sema=___ap$$use_libc_sema'"
 
 #ifdef _POSIX_SOURCE
 
@@ -138,11 +136,10 @@
 /*
  * Force a K&R compilation and libraries with the Convex V 4.0 C compiler
  */
-#define C_SWITCH_MACHINE -pcc
-#define LIB_STANDARD -lc_old
-#define LIBS_MACHINE -lC2_old
-#define LD_SWITCH_MACHINE -X -NL -fn -Enoposix -A__iob=___ap\$$iob \
- -A_use_libc_sema=___ap\$$use_libc_sema -L /usr/lib
+#define C_SWITCH_MACHINE "-pcc"
+#define LIB_STANDARD "-lc_old"
+#define LIBS_MACHINE "-lC2_old"
+#define LD_SWITCH_MACHINE "-X -NL -fn -Enoposix -A__iob=___ap\$$iob  -A_use_libc_sema=___ap\$$use_libc_sema -L /usr/lib"
 #endif
 
 /* Avoid error in xrdb.c - d.m.cooke@larc.nasa.gov.  */
@@ -152,7 +149,7 @@
 #define GETPGRP_NO_ARG
 
 /* Tested for both Convex C and GNUC by d.m.cooke@larc.nasa.gov.  */
-#define LIBS_MACHINE -lC2
+#define LIBS_MACHINE "-lC2"
 
 /* Avoid error in getloadavg.c.  */
 #define NLIST_NAME_UNION  1
@@ -162,12 +159,10 @@
 	  and report the results.  */
 /* gcc -nostdlib prevents some math symbols from being included.
    So we have to use -nostartfiles instead. */
-#define LINKER $(CC) -nostartfiles
+#define LINKER "$(CC) -nostartfiles"
 
 #define ORDINARY_LINK
 
 #undef LD_SWITCH_MACHINE
-#define LD_SWITCH_MACHINE \
-    -L /usr/lib \
-    '-A__iob=___ap$$iob' '-A_use_libc_sema=___ap$$use_libc_sema'
+#define LD_SWITCH_MACHINE "-L /usr/lib '-A__iob=___ap$$iob' '-A_use_libc_sema=___ap$$use_libc_sema'"
 #endif
diff -r 4de2936b4e77 -r 0132846995bd src/m/cydra5.h
--- a/src/m/cydra5.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/m/cydra5.h	Mon Aug 13 09:43:35 2007 +0200
@@ -88,7 +88,7 @@
    code will not be sharable; but that's better than failing completely.  */
 
 #define NO_REMAP
-#define	LIBS_MACHINE	-lsocket -lnsl
+#define	LIBS_MACHINE "-lsocket -lnsl"
 
 /* Stack grows downward in memory.  */
 #define	STACK_DIRECTION -1
diff -r 4de2936b4e77 -r 0132846995bd src/m/delta.h
--- a/src/m/delta.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/m/delta.h	Mon Aug 13 09:43:35 2007 +0200
@@ -116,19 +116,19 @@
    DO NOT USE -lPW. That version of alloca is broken in versions R3V5,
    R3V6, R3V7. -riku@field.fi -pot@cnuce.cnr.it. */
 
-#define LIB_STANDARD -lc881
-#define LIB_MATH -lm881
-#define LIBS_TERMCAP -lcurses
-#define LIBS_SYSTEM -lbsd
+#define LIB_STANDARD "-lc881"
+#define LIB_MATH "-lm881"
+#define LIBS_TERMCAP "-lcurses"
+#define LIBS_SYSTEM "-lbsd"
 
 #ifdef HAVE_X_WINDOWS
 # define HAVE_RANDOM
 # define HAVE_XSCREENNUMBEROFSCREEN
 # undef LIB_X11_LIB		/* no shared libraries */
-# define LIB_X11_LIB -lX11
+# define LIB_X11_LIB "-lX11"
 # undef USG_SHARED_LIBRARIES    /* once again, no shared libs */
 # undef LIBX11_SYSTEM		/* no -lpt as usg5-3.h expects */
-# define LIBX11_SYSTEM -lnls -lnsl_s
+# define LIBX11_SYSTEM "-lnls -lnsl_s"
 #endif /* HAVE_X_WINDOWS */
 
 #ifdef __GNUC__
@@ -146,8 +146,8 @@
     option for real compilation are.
     Let us set -traditional, because gmalloc.c includes <stddef.h>, and
     we don't have that (as of SYSV68 R3V7). */
-#  define C_SWITCH_MACHINE -mfp0ret -traditional -Dconst= -fdelayed-branch -fstrength-reduce -fno-inline -fcaller-saves
-#  define LIB_GCC /lib/gnulib881
+#  define C_SWITCH_MACHINE "-mfp0ret -traditional -Dconst= -fdelayed-branch -fstrength-reduce -fno-inline -fcaller-saves"
+#  define LIB_GCC "/lib/gnulib881"
 
 #else
  /* Not __GNUC__, use the alloca in alloca.s. */
@@ -158,7 +158,7 @@
 	-ga	 Because alloca relies on stack frames. This option forces
 		 the Green Hills compiler to create stack frames even for
 		 functions with few local variables. */
-#  define C_SWITCH_MACHINE -ga -O
+#  define C_SWITCH_MACHINE "-ga -O"
 #  define GAP_USE_BCOPY		/* *++to = *++from  is inefficient */
 #  define BCOPY_UPWARD_SAFE 0
 #  define BCOPY_DOWNWARD_SAFE 1	/* bcopy does: mov.b (%a1)+,(%a0)+ */
diff -r 4de2936b4e77 -r 0132846995bd src/m/delta88k.h
--- a/src/m/delta88k.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/m/delta88k.h	Mon Aug 13 09:43:35 2007 +0200
@@ -113,7 +113,7 @@
 #else
 #undef LIB_X11_LIB /* We don't have the shared libs as assumed in usg5-3.h. */
 #undef LIBX11_SYSTEM
-#define LIBX11_SYSTEM -lnsl -lbsd
+#define LIBX11_SYSTEM "-lnsl -lbsd"
 #endif /* USG5_4 */
 
 
@@ -122,9 +122,9 @@
    we always need -lgen and usg5-4.h doesn't use it. */
 #undef LIBS_SYSTEM
 #ifdef USG5_4
-#define LIBS_SYSTEM -lsocket -lnsl -lelf -lgen
+#define LIBS_SYSTEM "-lsocket -lnsl -lelf -lgen"
 #else
-#define LIBS_SYSTEM -lbsd -lg
+#define LIBS_SYSTEM "-lbsd -lg"
 #endif /* USG5_4 */
 
 #define NO_TERMIO
diff -r 4de2936b4e77 -r 0132846995bd src/m/dpx2.h
--- a/src/m/dpx2.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/m/dpx2.h	Mon Aug 13 09:43:35 2007 +0200
@@ -113,14 +113,14 @@
  * if we use X11, libX11.a has these...
  */
 # undef LIB_X11_LIB
-# define LIB_X11_LIB -lX11
+# define LIB_X11_LIB "-lX11"
 # undef LIBX11_SYSTEM
-# define LIBX11_SYSTEM -lmalloc -lnsl
+# define LIBX11_SYSTEM "-lmalloc -lnsl"
 
 /*
  * useful if you have INET loaded
  */
-# define LIBS_MACHINE -linet
+# define LIBS_MACHINE "-linet"
 
 
 #if (defined(ncl_mr) || defined(ncl_el)) && !defined (NBPC)
@@ -190,7 +190,7 @@
 #define SIGNALS_VIA_CHARACTERS
 
 /* This is to prevent memory clobbering on the DPX/2 200.  */
-#define LD_SWITCH_MACHINE -N -T32
+#define LD_SWITCH_MACHINE "-N -T32"
 
  /* end of dpx2.h */
 
diff -r 4de2936b4e77 -r 0132846995bd src/m/elxsi.h
--- a/src/m/elxsi.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/m/elxsi.h	Mon Aug 13 09:43:35 2007 +0200
@@ -114,7 +114,7 @@
 /* The elxsi has no debugger, so might as well optimize instead
    of trying to make a symbol table.  */
 
-#define C_DEBUG_SWITCH -O
+#define C_DEBUG_SWITCH "-O"
 
 /* Elxsi uses COFF under both Sys V and BSD environments */
 
diff -r 4de2936b4e77 -r 0132846995bd src/m/ews4800r.h
--- a/src/m/ews4800r.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/m/ews4800r.h	Mon Aug 13 09:43:35 2007 +0200
@@ -96,6 +96,6 @@
 
 /* Alter some of the options used when linking.  */
 
-#define LIBS_TERMCAP -lcurses
+#define LIBS_TERMCAP "-lcurses"
 
 
diff -r 4de2936b4e77 -r 0132846995bd src/m/gec63.h
--- a/src/m/gec63.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/m/gec63.h	Mon Aug 13 09:43:35 2007 +0200
@@ -29,7 +29,7 @@
 #define gec63
 
 /* GEC63 has alloca in the PW/ux63 library.  */
-#define LIB_STANDARD -lPW -lc
+#define LIB_STANDARD "-lPW -lc"
 #define HAVE_ALLOCA
 
 /* Do not define LOAD_AVE_TYPE or LOAD_AVE_CVT
diff -r 4de2936b4e77 -r 0132846995bd src/m/gould-np1.h
--- a/src/m/gould-np1.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/m/gould-np1.h	Mon Aug 13 09:43:35 2007 +0200
@@ -55,14 +55,14 @@
 			      1800, 2000, 2400, 3600, 4800, 7200, 9600, \
 				  19200, 38400 }
 
-#define LD_SWITCH_SYSTEM -BS -e start
+#define LD_SWITCH_SYSTEM "-BS -e start"
 
 /* Undef C_DEBUG_SWITCH because it may have been set in gould.h */
 /* It will compile and load and works with dbx. Runs under an incomplete
    port of gdb, but gdb doesn't always find things correctly. */
 #undef C_DEBUG_SWITCH
-#define C_DEBUG_SWITCH -g
-#define LIBS_DEBUG -lg
+#define C_DEBUG_SWITCH "-g"
+#define LIBS_DEBUG "-lg"
 
 
 /* The data segment in this machine always starts at address 0x1000000 = 16M.
diff -r 4de2936b4e77 -r 0132846995bd src/m/gould.h
--- a/src/m/gould.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/m/gould.h	Mon Aug 13 09:43:35 2007 +0200
@@ -178,4 +178,4 @@
 /* We use the system's crt0.o.  Somehow it avoids losing
    with `environ' the way most standard crt0.o's do.  */
 
-#define START_FILES pre-crt0.o /lib/crt0.o
+#define START_FILES "pre-crt0.o /lib/crt0.o"
diff -r 4de2936b4e77 -r 0132846995bd src/m/hp800.h
--- a/src/m/hp800.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/m/hp800.h	Mon Aug 13 09:43:35 2007 +0200
@@ -118,7 +118,7 @@
 /* This machine requires completely different unexec code
    which lives in a separate file.  Specify the file name.  */
 
-#define UNEXEC unexhp9k800.o
+#define UNEXEC "unexhp9k800.o"
 
 #define LIBS_MACHINE
 #define LIBS_DEBUG
diff -r 4de2936b4e77 -r 0132846995bd src/m/hp9000s300.h
--- a/src/m/hp9000s300.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/m/hp9000s300.h	Mon Aug 13 09:43:35 2007 +0200
@@ -77,7 +77,7 @@
 /* XEmacs: Richard Cognot <cognot@ensg.u-nancy.fr> says we need this for
    HPUX; but eeide@asylum.cs.utah.edu (Eric Eide) says it loses on BSD. */
 #ifndef BSD
-# define UNEXEC unexhp9k3.o
+# define UNEXEC "unexhp9k3.o"
 #endif
 
 
@@ -130,7 +130,7 @@
 /* This library is needed with -g, on the 200/300 only.  */
 
 #if !defined(__GNUC__) || defined(__HPUX_ASM__)
-#define LIBS_DEBUG /usr/lib/end.o
+#define LIBS_DEBUG "/usr/lib/end.o"
 #endif
 
 /* Need a TEXT_START.  On the HP9000/s300 that is 0.  */
@@ -166,7 +166,7 @@
 
 #ifndef HPUX_5
 #ifndef __GNUC__
-#define C_SWITCH_MACHINE -Wc,-Nd4000,-Ns3000
+#define C_SWITCH_MACHINE "-Wc,-Nd4000,-Ns3000"
 #endif
 #endif
 
diff -r 4de2936b4e77 -r 0132846995bd src/m/ibm370aix.h
--- a/src/m/ibm370aix.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/m/ibm370aix.h	Mon Aug 13 09:43:35 2007 +0200
@@ -25,7 +25,7 @@
 #define LOAD_AVE_TYPE double
 
 #undef LIBS_MACHINE
-#define LIBS_MACHINE 
+#define LIBS_MACHINE
 
 #undef LD_SWITCH_MACHINE
-#define LD_SWITCH_MACHINE -xa
+#define LD_SWITCH_MACHINE "-xa"
diff -r 4de2936b4e77 -r 0132846995bd src/m/ibmps2-aix.h
--- a/src/m/ibmps2-aix.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/m/ibmps2-aix.h	Mon Aug 13 09:43:35 2007 +0200
@@ -95,7 +95,7 @@
 #if 0 /* I refuse to promulgate a recommendation that would make
          users unable to debug - RMS.  */
 /* delete the following line to foil optimization, enable debugging */
-#define C_DEBUG_SWITCH -O
+#define C_DEBUG_SWITCH "-O"
 #endif
 
 /* Send signals to subprocesses by "typing" special chars at them.  */
@@ -145,7 +145,7 @@
 #define HAVE_ALLOCA
 #define alloca(n) __builtin_alloca(n)
 #if __GNUC__ < 2
-#define LIB_STANDARD /usr/local/lib/gcc-gnulib -lbsd -lrts -lc 
+#define LIB_STANDARD "/usr/local/lib/gcc-gnulib -lbsd -lrts -lc "
 #endif
 /* -g fails to work, so it is omitted.  */
 /* tranle says that -fstrength-reduce does not help.  */
@@ -153,17 +153,17 @@
 #else
 #define C_ALLOCA
 #define STACK_DIRECTION -1 /* tell alloca.c which way it grows */
-#define LIBS_MACHINE -lbsd -lrts
+#define LIBS_MACHINE "-lbsd -lrts"
 #endif
 
-#define OBJECTS_MACHINE hftctl.o
-#define LD_SWITCH_MACHINE -T0x00400000 -K -e start
+#define OBJECTS_MACHINE "hftctl.o"
+#define LD_SWITCH_MACHINE "-T0x00400000 -K -e start"
 #define LIBS_DEBUG		/* no -lg on aix ps/2 */
 
 #ifdef USG5_3
 #define XICCC
 #undef LD_SWITCH_MACHINE
-#define LD_SWITCH_MACHINE -T0x0 -K -e start
+#define LD_SWITCH_MACHINE "-T0x0 -K -e start"
 
 /* Things defined in s-usg5-3.h that need to be overridden.  */
 #undef BROKEN_TIOCGETC
@@ -183,6 +183,6 @@
 #undef LIB_STANDARD
 #undef LD_SWITCH_MACHINE
 #if __GNUC__ > 1
-#define LD_SWITCH_MACHINE -shlib
+#define LD_SWITCH_MACHINE "-shlib"
 #endif
 #endif
diff -r 4de2936b4e77 -r 0132846995bd src/m/ibmrs6000.h
--- a/src/m/ibmrs6000.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/m/ibmrs6000.h	Mon Aug 13 09:43:35 2007 +0200
@@ -37,7 +37,7 @@
 #endif
 
 #ifndef UNEXEC
-#define UNEXEC unexaix.o
+#define UNEXEC "unexaix.o"
 #endif
 
 /* Define addresses, macros, change some setup for dump */
@@ -104,7 +104,7 @@
 /* Here override various assumptions in ymakefile */
 
 #ifdef AIXHFT
-#define OBJECTS_MACHINE hftctl.o
+#define OBJECTS_MACHINE "hftctl.o"
 #endif
 
 #ifndef USG5_4
@@ -116,16 +116,16 @@
 /* -lpthreads seems to be necessary for Xlib in X11R6, and should be harmless
    on older versions of X where it happens to exist.  */
 #ifdef HAVE_LIBPTHREADS
-#define LIBS_MACHINE -lrts -lIM -liconv -lpthreads
+#define LIBS_MACHINE "-lrts -lIM -liconv -lpthreads"
 #else
 /* IBM's X11R5 use -lIM and -liconv in AIX 3.2.2.  */
-#define LIBS_MACHINE -lrts -lIM -liconv
+#define LIBS_MACHINE "-lrts -lIM -liconv"
 #endif
 #else
 #ifdef USG5_4
 #define LIBS_MACHINE
 #else
-#define LIBS_MACHINE -lIM
+#define LIBS_MACHINE "-lIM"
 #endif
 #endif
 
@@ -149,15 +149,15 @@
 /* Avoid gcc 2.7.x collect2 bug by using /bin/ld instead.  */
 #if __GNUC__ == 2 && __GNUC_MINOR__ == 7
 #ifdef AIX_SMT_EXP
-#define LD_SWITCH_MACHINE -B/bin/ -Wl,-bnso,-bnodelcsect,-bI:/lib/syscalls.exp,-bI:$(srcdir)/m/ibmrs6000.inp,AIX_SMT_EXP
+#define LD_SWITCH_MACHINE "-B/bin/ -Wl,-bnso,-bnodelcsect,-bI:/lib/syscalls.exp,-bI:$(srcdir)/m/ibmrs6000.inp,AIX_SMT_EXP"
 #else
-#define LD_SWITCH_MACHINE -B/bin/ -Wl,-bnso,-bnodelcsect,-bI:/lib/syscalls.exp,-bI:$(srcdir)/m/ibmrs6000.inp
+#define LD_SWITCH_MACHINE "-B/bin/ -Wl,-bnso,-bnodelcsect,-bI:/lib/syscalls.exp,-bI:$(srcdir)/m/ibmrs6000.inp"
 #endif
 #else /* not gcc 2.7.x */
 #ifdef AIX_SMT_EXP
-#define LD_SWITCH_MACHINE -Wl,-bnso,-bnodelcsect,-bI:/lib/syscalls.exp,-bI:$(srcdir)/m/ibmrs6000.inp,AIX_SMT_EXP
+#define LD_SWITCH_MACHINE "-Wl,-bnso,-bnodelcsect,-bI:/lib/syscalls.exp,-bI:$(srcdir)/m/ibmrs6000.inp,AIX_SMT_EXP"
 #else
-#define LD_SWITCH_MACHINE -Wl,-bnso,-bnodelcsect,-bI:/lib/syscalls.exp,-bI:$(srcdir)/m/ibmrs6000.inp
+#define LD_SWITCH_MACHINE "-Wl,-bnso,-bnodelcsect,-bI:/lib/syscalls.exp,-bI:$(srcdir)/m/ibmrs6000.inp"
 #endif
 #endif /* __GNUC__ == 2 && __GNUC_MINOR__ == 7 */
 
diff -r 4de2936b4e77 -r 0132846995bd src/m/ibmrt-aix.h
--- a/src/m/ibmrt-aix.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/m/ibmrt-aix.h	Mon Aug 13 09:43:35 2007 +0200
@@ -112,22 +112,22 @@
 /* Here override various assumptions in ymakefile */
 
 /* On AIX 2.2.1, use these definitions instead
-#define C_SWITCH_MACHINE -I/usr/include -Nn2000
-#define LIBS_MACHINE -lX -lrts
+#define C_SWITCH_MACHINE "-I/usr/include -Nn2000"
+#define LIBS_MACHINE "-lX -lrts"
 */
 
-#define C_SWITCH_MACHINE -I/usr/include -I/usr/include/bsd -Nn2000
-#define LIBS_MACHINE -lXMenu -lX -lsock -lbsd -lrts
+#define C_SWITCH_MACHINE "-I/usr/include -I/usr/include/bsd -Nn2000"
+#define LIBS_MACHINE "-lXMenu -lX -lsock -lbsd -lrts"
 
-#define OBJECTS_MACHINE hftctl.o
-#define START_FILES /lib/crt0.o
+#define OBJECTS_MACHINE "hftctl.o"
+#define START_FILES "/lib/crt0.o"
 /* -lXMenu, -lX must precede -lsock, -lbsd */
-#define LD_SWITCH_MACHINE -n -T0x10000000 -K -e start
+#define LD_SWITCH_MACHINE "-n -T0x10000000 -K -e start"
 
 #if 0 /* I refuse to promulgate a recommendation that would make
          users unable to debug - RMS.  */
 /* delete the following line to foil optimization, enable debugging */
-#define C_DEBUG_SWITCH -O
+#define C_DEBUG_SWITCH "-O"
 #endif
 
 
diff -r 4de2936b4e77 -r 0132846995bd src/m/ibmrt.h
--- a/src/m/ibmrt.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/m/ibmrt.h	Mon Aug 13 09:43:35 2007 +0200
@@ -102,15 +102,15 @@
 /* Special switches to give the C compiler.  */
 
 #ifndef __GNUC__
-#define C_SWITCH_MACHINE -Dalloca=_Alloca
+#define C_SWITCH_MACHINE "-Dalloca=_Alloca"
 #endif
 
 /* XEmacs addition: */
 /* Under Mach at least, gcc doesn't seem to work as the linker. */
 #ifdef MACH
-#define START_FILES pre-crt0.o
+#define START_FILES "pre-crt0.o"
 #ifdef __GNUC__
-#define LINKER pcc
+#define LINKER "pcc"
 #endif
 #endif
 
diff -r 4de2936b4e77 -r 0132846995bd src/m/intel386.h
--- a/src/m/intel386.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/m/intel386.h	Mon Aug 13 09:43:35 2007 +0200
@@ -139,16 +139,15 @@
 
 /* Since cannot purify, use standard Xenix 386 startup code. */
 
-#define START_FILES	/lib/386/Sseg.o pre-crt0.o /lib/386/Scrt0.o
+#define START_FILES "/lib/386/Sseg.o pre-crt0.o /lib/386/Scrt0.o"
 
 /* These really use terminfo.  */
 
-#define LIBS_TERMCAP /lib/386/Slibcurses.a  \
-   /lib/386/Slibtinfo.a /lib/386/Slibx.a
+#define LIBS_TERMCAP "/lib/386/Slibcurses.a /lib/386/Slibtinfo.a /lib/386/Slibx.a"
 
 /* Standard libraries for this machine.  Since `-l' doesn't work in `ld'.  */
 /* '__fltused' is unresolved w/o Slibcfp.a */
-#define LIB_STANDARD /lib/386/Slibcfp.a /lib/386/Slibc.a
+#define LIB_STANDARD "/lib/386/Slibcfp.a /lib/386/Slibc.a"
 #else /* not XENIX */
 
 /* this brings in alloca() if we're using cc */
@@ -156,9 +155,9 @@
 #if 0 /* mrb: -lPW is now autodetected, anyways */
 #ifndef LIB_STANDARD
 #ifdef USG5_4
-#define LIB_STANDARD -lc
+#define LIB_STANDARD "-lc"
 #else /* not USG5_4 */
-#define LIB_STANDARD -lPW -lc
+#define LIB_STANDARD "-lPW -lc"
 #endif /* not USG5_4 */
 #endif /* LIB_STANDARD */
 #endif /* 0 */
diff -r 4de2936b4e77 -r 0132846995bd src/m/iris4d.h
--- a/src/m/iris4d.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/m/iris4d.h	Mon Aug 13 09:43:35 2007 +0200
@@ -100,9 +100,9 @@
 #ifdef USG5_4
 #undef UNEXEC
 /* FSF renames this file to unexsgi.o */
-#define UNEXEC unexelfsgi.o
+#define UNEXEC "unexelfsgi.o"
 #else
-#define UNEXEC unexmips.o
+#define UNEXEC "unexmips.o"
 #endif
 
 #define TEXT_START 0x400000
@@ -118,7 +118,7 @@
 
 #undef LIBS_MACHINE
 /* -lsun in case using Yellow Pages for passwords.  */
-#define LIBS_MACHINE -lmld
+#define LIBS_MACHINE "-lmld"
 #define LIBS_DEBUG
 
 /* Define this if you have a fairly recent system,
@@ -128,13 +128,13 @@
 #ifndef USG5_4
 #ifdef HAVE_CRTN
 /* Must define START-FILES so that the linker can find /usr/lib/crt0.o.  */
-#define START_FILES pre-crt0.o /usr/lib/crt1.o
-#define LIB_STANDARD -lc /usr/lib/crtn.o
+#define START_FILES "pre-crt0.o /usr/lib/crt1.o"
+#define LIB_STANDARD "-lc /usr/lib/crtn.o"
 #else
-#define START_FILES pre-crt0.o /usr/lib/crt0.o
+#define START_FILES "pre-crt0.o /usr/lib/crt0.o"
 /* The entry-point label (start of text segment) is `start', not `__start'.  */
 #define DEFAULT_ENTRY_ADDRESS start
-#define LIB_STANDARD -lc
+#define LIB_STANDARD "-lc"
 #endif
 #endif
 
@@ -152,13 +152,3 @@
 
 #undef STACK_DIRECTION
 #define STACK_DIRECTION -1
-
-#ifndef __GNUC__
-/* Turn off some "helpful" error checks for type mismatches
-   that we can't fix without breaking other machines.  */
-#ifdef IRIX_FORCE_32_BITS
-#ifdef THIS_IS_MAKEFILE
-#define C_SWITCH_MACHINE -32
-#endif
-#endif /* IRIX_FORCE_32_BITS */
-#endif /* not __GNUC__ */
diff -r 4de2936b4e77 -r 0132846995bd src/m/iris5d.h
--- a/src/m/iris5d.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/m/iris5d.h	Mon Aug 13 09:43:35 2007 +0200
@@ -102,7 +102,7 @@
 #undef UNEXEC
 #endif
 /* FSF renames this file to unexsgi.o */
-#define UNEXEC unexelfsgi.o
+#define UNEXEC "unexelfsgi.o"
 
 #define TEXT_START 0x400000
 
@@ -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"
 #define LIBS_DEBUG
 
 /* Define this if you have a fairly recent system,
@@ -126,13 +126,13 @@
 
 #ifdef HAVE_CRTN
 /* Must define START-FILES so that the linker can find /usr/lib/crt0.o.  */
-#define START_FILES pre-crt0.o /usr/lib/crt1.o
-#define LIB_STANDARD -lbsd -lc /usr/lib/crtn.o
+#define START_FILES "pre-crt0.o /usr/lib/crt1.o"
+#define LIB_STANDARD "-lbsd -lc /usr/lib/crtn.o"
 #else
-#define START_FILES pre-crt0.o /usr/lib/crt0.o
+#define START_FILES "pre-crt0.o /usr/lib/crt0.o"
 /* The entry-point label (start of text segment) is `start', not `__start'.  */
 #define DEFAULT_ENTRY_ADDRESS start
-#define LIB_STANDARD -lbsd -lc
+#define LIB_STANDARD "-lbsd -lc"
 #endif
 
 /* Use terminfo instead of termcap.  */
@@ -156,5 +156,5 @@
 #ifndef __GNUC__
 /* Turn off some "helpful" error checks for type mismatches
    that we can't fix without breaking other machines.  */
-#define C_SWITCH_MACHINE -cckr
+#define C_SWITCH_MACHINE "-cckr"
 #endif
diff -r 4de2936b4e77 -r 0132846995bd src/m/is386.h
--- a/src/m/is386.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/m/is386.h	Mon Aug 13 09:43:35 2007 +0200
@@ -23,7 +23,7 @@
   It may also be correct for Microport systems.
 NOTE-END  */
 
-#define LIBX10_MACHINE -lnsl_s
-#define LIBX11_MACHINE -lnsl_s
+#define LIBX10_MACHINE "-lnsl_s"
+#define LIBX11_MACHINE "-lnsl_s"
 
-#define LIBS_DEBUG -lg
+#define LIBS_DEBUG "-lg"
diff -r 4de2936b4e77 -r 0132846995bd src/m/isi-ov.h
--- a/src/m/isi-ov.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/m/isi-ov.h	Mon Aug 13 09:43:35 2007 +0200
@@ -65,7 +65,7 @@
    because the standard library requires some special hacks in crt0
    which the GNU crt0 does not have.  */
 
-#define LIB_STANDARD -lmc
+#define LIB_STANDARD "-lmc"
 
 /* macros to make unexec work right */
 
@@ -80,6 +80,6 @@
 #undef m68k
 
 #undef LIB_STANDARD
-#define LIB_STANDARD -lmc -lc
-#define C_DEBUG_SWITCH -20 -O -X23
+#define LIB_STANDARD "-lmc -lc"
+#define C_DEBUG_SWITCH "-20 -O -X23"
 #endif
diff -r 4de2936b4e77 -r 0132846995bd src/m/luna88k.h
--- a/src/m/luna88k.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/m/luna88k.h	Mon Aug 13 09:43:35 2007 +0200
@@ -88,8 +88,8 @@
 
 #define LOAD_AVE_MACH
 
-#define LIBS_MACHINE -lmach
+#define LIBS_MACHINE "-lmach"
 
-#define LIB_X11_LIB -L/usr/lib/X11 -lX11 -lXwchar
+#define LIB_X11_LIB "-L/usr/lib/X11 -lX11 -lXwchar"
 
-#define CRT0_COMPILE cc -c -O -Demacs $(ALL_CFLAGS)
+#define CRT0_COMPILE "cc -c -O -Demacs $(ALL_CFLAGS)"
diff -r 4de2936b4e77 -r 0132846995bd src/m/mips-siemens.h
--- a/src/m/mips-siemens.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/m/mips-siemens.h	Mon Aug 13 09:43:35 2007 +0200
@@ -121,7 +121,7 @@
 #ifdef UNEXEC
 #undef UNEXEC
 #endif
-#define UNEXEC unexsni.o
+#define UNEXEC "unexsni.o"
 
 #undef ORDINARY_LINK
 
@@ -129,20 +129,20 @@
 
 /* Alter some of the options used when linking.  */
 
-#define LIBS_MACHINE -lmld
-#define START_FILES pre-crt0.o /usr/ccs/lib/crt1.o /usr/ccs/lib/crti.o /usr/ccs/lib/values-Xt.o
+#define LIBS_MACHINE "-lmld"
+#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
 #undef LIB_STANDARD
 #endif
-#define LIB_STANDARD -lc /usr/ccs/lib/crtn.o
+#define LIB_STANDARD "-lc /usr/ccs/lib/crtn.o"
 
 #ifdef __GNUC__
 #define C_DEBUG_SWITCH
-#define C_OPTIMIZE_SWITCH -O
+#define C_OPTIMIZE_SWITCH "-O"
 #define LD_SWITCH_MACHINE 
 #else
-#define C_DEBUG_SWITCH -DSYSV
-#define C_OPTIMIZE_SWITCH -DSYSV 
+#define C_DEBUG_SWITCH "-DSYSV"
+#define C_OPTIMIZE_SWITCH "-DSYSV "
 #define LD_SWITCH_MACHINE
 #endif
diff -r 4de2936b4e77 -r 0132846995bd src/m/mips.h
--- a/src/m/mips.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/m/mips.h	Mon Aug 13 09:43:35 2007 +0200
@@ -106,7 +106,7 @@
 /* This machine requires completely different unexec code
    which lives in a separate file.  Specify the file name.  */
 
-#define UNEXEC unexmips.o
+#define UNEXEC "unexmips.o"
 
 /* Describe layout of the address space in an executing process.  */
 
@@ -118,24 +118,24 @@
 #ifndef NEWSOS5
 #ifdef BSD
 
-/* DECstations don't have this library.
-   #define LIBS_MACHINE -lmld  */
+/* DECstations don't have this library. */
+/* #define LIBS_MACHINE "-lmld"  */
 
-#define LD_SWITCH_MACHINE -D 800000
+#define LD_SWITCH_MACHINE "-D 800000"
 #define LIBS_DEBUG
 
-#define LINKER /bsd43/bin/ld
+#define LINKER "/bsd43/bin/ld"
   
 #else /* not BSD */
 
-#define LIBS_MACHINE -lmld
-#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
-#define LIBS_TERMCAP -lcurses
+#define LIBS_MACHINE "-lmld"
+#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"
+#define LIBS_TERMCAP "-lcurses"
 
-#define C_SWITCH_MACHINE -I/usr/include/bsd
-#define C_DEBUG_SWITCH -O -g3
+#define C_SWITCH_MACHINE "-I/usr/include/bsd"
+#define C_DEBUG_SWITCH "-O -g3"
 
 #endif /* not BSD */
 #endif /* not NEWSOS5 */
diff -r 4de2936b4e77 -r 0132846995bd src/m/mips4.h
--- a/src/m/mips4.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/m/mips4.h	Mon Aug 13 09:43:35 2007 +0200
@@ -19,14 +19,14 @@
 #endif
 
 #ifdef __GNUC__
-#define C_DEBUG_SWITCH -g -O
+#define C_DEBUG_SWITCH "-g -O"
 #else
 /* We used to have  -systype bsd43, but a configure change
    now takes care of that option.  */
 #ifdef MIPS2
-#define C_DEBUG_SWITCH -DMips -g3 -Wf,-XNd4000 -O -Olimit 2000 -mips2
+#define C_DEBUG_SWITCH "-DMips -g3 -Wf,-XNd4000 -O -Olimit 2000 -mips2"
 #else
-#define C_DEBUG_SWITCH -DMips -g3 -Wf,-XNd4000 -O -Olimit 2000
+#define C_DEBUG_SWITCH "-DMips -g3 -Wf,-XNd4000 -O -Olimit 2000"
 #endif
 #endif
 
@@ -34,7 +34,7 @@
 #undef TERMINFO
 #endif
 
-#define START_FILES pre-crt0.o /lib/crt1.o
+#define START_FILES "pre-crt0.o /lib/crt1.o"
 /* Used to have -lisode, but jlp@math.byu.edu says remove it
    (for RISCOS 4.52).  */
 /* ethanb@ptolemy.astro.washington.edu says crtn.o uses _ctype
@@ -42,12 +42,12 @@
    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 "-lmld -lc /lib/crtn.o -L/usr/lib -lc"
 
 
 #define COFF
 #undef LD_SWITCH_MACHINE
-#define LD_SWITCH_MACHINE -systype bsd43 -g3 -D 800000
+#define LD_SWITCH_MACHINE "-systype bsd43 -g3 -D 800000"
 
 #define NO_MODE_T
 
diff -r 4de2936b4e77 -r 0132846995bd src/m/ncr386.h
--- a/src/m/ncr386.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/m/ncr386.h	Mon Aug 13 09:43:35 2007 +0200
@@ -2,16 +2,9 @@
 
 #include "intel386.h"
 
-#ifndef __GNUC__
 /* Allow emacs to link with "bcopy()" unresolved.  Works around a
    problem where /usr/lib/libX11.so provides bcopy, but
    /usr/ccs/lib/libX11.so does not.  */
-#define LD_SWITCH_X_DEFAULT -Wl,-z,nodefs
-#else /* __GNUC__ */
-
-/* Assuming we are using GNU ld, pass a -R option to it
-   so that shared libraries will be found at execution time
-   just as they are found at link time.  */
-#define LD_SWITCH_X_DEFAULT -Xlinker LD_SWITCH_X_SITE_AUX
+#define LD_SWITCH_X_DEFAULT "-Wl,-z,nodefs"
 
 #endif /* __GNUC__ */
diff -r 4de2936b4e77 -r 0132846995bd src/m/news-risc.h
--- a/src/m/news-risc.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/m/news-risc.h	Mon Aug 13 09:43:35 2007 +0200
@@ -8,16 +8,16 @@
 
 /* NEWS-OS 5.0.2 */
 
-#define LIBS_MACHINE -lmld
+#define LIBS_MACHINE "-lmld"
 
 #ifdef __GNUC__
-#define C_DEBUG_SWITCH -g
-#define C_OPTIMIZE_SWITCH -g -O
-#define LD_SWITCH_MACHINE -g -Xlinker -D -Xlinker 800000
+#define C_DEBUG_SWITCH "-g"
+#define C_OPTIMIZE_SWITCH "-g -O"
+#define LD_SWITCH_MACHINE "-g -Xlinker -D -Xlinker 800000"
 #else
-#define C_DEBUG_SWITCH -g3
-#define C_OPTIMIZE_SWITCH -g3
-#define LD_SWITCH_MACHINE -g3 -D 800000 -non_shared
+#define C_DEBUG_SWITCH "-g3"
+#define C_OPTIMIZE_SWITCH "-g3"
+#define LD_SWITCH_MACHINE "-g3 -D 800000 -non_shared"
 #endif
 
 #else /* not NEWSOS5 */
@@ -28,13 +28,13 @@
 
 #define COFF
 #undef LD_SWITCH_MACHINE
-#define LD_SWITCH_MACHINE -x -D 800000
+#define LD_SWITCH_MACHINE "-x -D 800000"
 
 /* #define C_OPTIMIZE_SWITCH -O2 */
-#define C_OPTIMIZE_SWITCH -O
+#define C_OPTIMIZE_SWITCH "-O"
 
 #ifndef __GNUC__
-#define C_DEBUG_SWITCH -g3
+#define C_DEBUG_SWITCH "-g3"
 #endif
 
 #undef TERMINFO
@@ -45,7 +45,7 @@
 /* Don't use the definitions in m/mips.h.  */
 #undef LINKER
 #undef LIBS_MACHINE
-#define LIBS_MACHINE -lmld
+#define LIBS_MACHINE "-lmld"
 
 #undef KERNEL_FILE
 #define KERNEL_FILE "/vmunix"
diff -r 4de2936b4e77 -r 0132846995bd src/m/news.h
--- a/src/m/news.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/m/news.h	Mon Aug 13 09:43:35 2007 +0200
@@ -54,5 +54,5 @@
 
 /* Must use the system's termcap.  It does special things.  */
 
-#define LIBS_TERMCAP -ltermcap
+#define LIBS_TERMCAP "-ltermcap"
 
diff -r 4de2936b4e77 -r 0132846995bd src/m/next.h
--- a/src/m/next.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/m/next.h	Mon Aug 13 09:43:35 2007 +0200
@@ -48,7 +48,7 @@
 
 #define HAVE_UNIX_DOMAIN
 
-#define LIB_X11_LIB -L/usr/lib/X11 -lX11
+#define LIB_X11_LIB "-L/usr/lib/X11 -lX11"
 
 /* This avoids a problem in Xos.h when using co-Xist 3.01.  */
 #define X_NOT_POSIX
@@ -59,7 +59,7 @@
 
 /* Use our own unexec routines */
 
-#define UNEXEC unexnext.o
+#define UNEXEC "unexnext.o"
 
 /* We don't have a g library either, so override the -lg LIBS_DEBUG switch */
 
diff -r 4de2936b4e77 -r 0132846995bd src/m/ns32000.h
--- a/src/m/ns32000.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/m/ns32000.h	Mon Aug 13 09:43:35 2007 +0200
@@ -93,5 +93,5 @@
 
 #define SYSTEM_PURESIZE_EXTRA 20000
 
-#define START_FILES pre-crt0.o /lib/crt0.o
+#define START_FILES "pre-crt0.o /lib/crt0.o"
 #endif
diff -r 4de2936b4e77 -r 0132846995bd src/m/paragon.h
--- a/src/m/paragon.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/m/paragon.h	Mon Aug 13 09:43:35 2007 +0200
@@ -6,7 +6,7 @@
 #define COFF
 #define SYSTEM_MALLOC
 #define TEXT_START 0x10000
-#define LIB_STANDARD -lc -lic -lmach
+#define LIB_STANDARD "-lc -lic -lmach"
 #define KEEP_OLD_TEXT_SCNPTR
 #define KEEP_OLD_PADDR
 #define drem fmod
diff -r 4de2936b4e77 -r 0132846995bd src/m/pfa50.h
--- a/src/m/pfa50.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/m/pfa50.h	Mon Aug 13 09:43:35 2007 +0200
@@ -44,12 +44,12 @@
 /* Define START_FILES if your machine used _start.
  */
 
-#define START_FILES crt0.o
+#define START_FILES "crt0.o"
 
 /* Define LD_SWITCH_MACHINE if your linker needs it.
  */
 
-#define LD_SWITCH_MACHINE -e __start
+#define LD_SWITCH_MACHINE "-e __start"
 
 #if	pfa50 || pfa70
 
@@ -62,7 +62,7 @@
 
 /* SX/A has alloca in the PW library.  */
 
-#define LIB_STANDARD -lPW -lc
+#define LIB_STANDARD "-lPW -lc"
 #define HAVE_ALLOCA
 
 /* SX/A uses terminfo and lib/curses   */
diff -r 4de2936b4e77 -r 0132846995bd src/m/plexus.h
--- a/src/m/plexus.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/m/plexus.h	Mon Aug 13 09:43:35 2007 +0200
@@ -86,11 +86,11 @@
 
 /* Use the following on ld so we can use the gnu crt0 
    The plexus ld looks for start                      */
-#define LD_SWITCH_MACHINE -e __start
+#define LD_SWITCH_MACHINE "-e __start"
 
 /* Use the PW library, which contains alloca.  */
 
-#define LIB_STANDARD -lPW -lc
+#define LIB_STANDARD "-lPW -lc"
 
 /* crt0.c should use the vax-bsd style of entry, with no dummy args.  */
 
diff -r 4de2936b4e77 -r 0132846995bd src/m/pmax.h
--- a/src/m/pmax.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/m/pmax.h	Mon Aug 13 09:43:35 2007 +0200
@@ -19,11 +19,11 @@
 #define MAIL_USE_FLOCK
 
 #ifdef MACH
-#define START_FILES pre-crt0.o /usr/lib/crt0.o
+#define START_FILES "pre-crt0.o /usr/lib/crt0.o"
 #else
 /* This line starts being needed with ultrix 4.0.  */
 /* You must delete it for version 3.1.  */
-#define START_FILES pre-crt0.o /usr/lib/cmplrs/cc/crt0.o
+#define START_FILES "pre-crt0.o /usr/lib/cmplrs/cc/crt0.o"
 #endif
 
 /* Supposedly the following will overcome a kernel bug.  */
@@ -56,7 +56,7 @@
 
 /* mcc@timessqr.gc.cuny.edu says this makes Emacs work with DECnet.  */
 #ifdef HAVE_LIBDNET
-#define LIBS_MACHINE -ldnet
+#define LIBS_MACHINE "-ldnet"
 #endif
 
 /* mcc@timessqr.gc.cuny.edu says it is /vmunix on Ultrix 4.2a.  */
@@ -89,7 +89,7 @@
    NeedVarargsPrototypes is 1 (which is its default value).  So if we're
    going to disable non-variadic prototypes, we also need to disable
    variadic prototypes.  --kwzh@gnu.ai.mit.edu */
-#define C_SWITCH_X_MACHINE -DNeedFunctionPrototypes=0 -DNeedVarargsPrototypes=0
+#define C_SWITCH_X_MACHINE "-DNeedFunctionPrototypes=0 -DNeedVarargsPrototypes=0"
 #endif
 
 /* XEmacs: the following does nothing at all any more due to cleanup
diff -r 4de2936b4e77 -r 0132846995bd src/m/powerpc.h
--- a/src/m/powerpc.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/m/powerpc.h	Mon Aug 13 09:43:35 2007 +0200
@@ -32,14 +32,14 @@
 #endif
 
 #ifdef __GNUC__
-# define C_OPTIMIZE_SWITCH -O
+# define C_OPTIMIZE_SWITCH "-O"
 #else
 /* XEmacs change */
 # ifdef USE_LCC
-#  define C_OPTIMIZE_SWITCH -O4 -Oi
+#  define C_OPTIMIZE_SWITCH "-O4 -Oi"
 # else
      /* This level of optimization is reported to work.  */
-#  define C_OPTIMIZE_SWITCH -O2
+#  define C_OPTIMIZE_SWITCH "-O2"
 # endif
 #endif
 
diff -r 4de2936b4e77 -r 0132846995bd src/m/pyramid.h
--- a/src/m/pyramid.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/m/pyramid.h	Mon Aug 13 09:43:35 2007 +0200
@@ -41,7 +41,7 @@
 
 /* Don't use the ordinary -g for debugging in cc */
 
-#define C_DEBUG_SWITCH -gx
+#define C_DEBUG_SWITCH "-gx"
 
 /* Reenable this #define for old versions of the Pyramid system.  */
 
diff -r 4de2936b4e77 -r 0132846995bd src/m/sequent-ptx.h
--- a/src/m/sequent-ptx.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/m/sequent-ptx.h	Mon Aug 13 09:43:35 2007 +0200
@@ -130,5 +130,5 @@
 #define MAKE_PARALLEL $&
 
 /* Use terminfo library.  */
-#define LIBS_TERMCAP -ltermlib
+#define LIBS_TERMCAP "-ltermlib"
 
diff -r 4de2936b4e77 -r 0132846995bd src/m/sgi-challenge.h
--- a/src/m/sgi-challenge.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/m/sgi-challenge.h	Mon Aug 13 09:43:35 2007 +0200
@@ -113,7 +113,7 @@
 #ifdef UNEXEC
 #undef UNEXEC
 #endif
-#define UNEXEC unexelfsgi.o
+#define UNEXEC "unexelfsgi.o"
 
 #define TEXT_START 0x400000
 
@@ -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"
 #define LIBS_DEBUG
 
 /* Define this if you have a fairly recent system,
@@ -137,13 +137,13 @@
 
 #ifdef HAVE_CRTN
 /* Must define START-FILES so that the linker can find /usr/lib/crt0.o.  */
-#define START_FILES pre-crt0.o /usr/lib/crt1.o
-#define LIB_STANDARD -lbsd -nocount -lc_s -lc /usr/lib/crtn.o
+#define START_FILES "pre-crt0.o /usr/lib/crt1.o"
+#define LIB_STANDARD "-lbsd -nocount -lc_s -lc /usr/lib/crtn.o"
 #else
-#define START_FILES pre-crt0.o /usr/lib/crt0.o
+#define START_FILES "pre-crt0.o /usr/lib/crt0.o"
 /* The entry-point label (start of text segment) is `start', not `__start'.  */
 #define DEFAULT_ENTRY_ADDRESS start
-#define LIB_STANDARD -lbsd -lc
+#define LIB_STANDARD "-lbsd -lc"
 #endif
 
 /* Use terminfo instead of termcap.  */
@@ -166,9 +166,9 @@
 
 /* By Tor Arntsen <tor@spacetec.no> for XEmacs. */
 #ifdef USE_GCC
-# define C_SWITCH_MACHINE -D_BSD_TYPES -mcpu=r4000 -mips2
+#define C_SWITCH_MACHINE "-D_BSD_TYPES -mcpu=r4000 -mips2"
 #else
 /* Turn off some "helpful" error checks for type mismatches
    that we can't fix without breaking other machines.  */
-# define C_SWITCH_MACHINE -D_BSD_TYPES -cckr -acpp -mips2
+#define C_SWITCH_MACHINE "-D_BSD_TYPES -cckr -acpp -mips2"
 #endif
diff -r 4de2936b4e77 -r 0132846995bd src/m/sps7.h
--- a/src/m/sps7.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/m/sps7.h	Mon Aug 13 09:43:35 2007 +0200
@@ -64,19 +64,19 @@
  * SMX--If you are using 32 bit (COFF) use "-N", else don't use anything.
  */
 
-#define LD_SWITCH_MACHINE -N -T32 -e __start
+#define LD_SWITCH_MACHINE "-N -T32 -e __start"
 
 /* If you are compiling for a 68020, then use -lc32 else use -lc */
 
-#define LIB_STANDARD -lc32
+#define LIB_STANDARD "-lc32"
 
 /* Fore 16 bit, -linet, for 32 bit -linet32 (be sure you have it!). */
 
-#define LIBS_MACHINE -linet32
+#define LIBS_MACHINE "-linet32"
 
 /* Use -T32 for 68020, -T16 otherwise */
 
-#define C_SWITCH_MACHINE -T32
+#define C_SWITCH_MACHINE "-T32"
 
 #define BROKEN_SIGIO
 
diff -r 4de2936b4e77 -r 0132846995bd src/m/sun1.h
--- a/src/m/sun1.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/m/sun1.h	Mon Aug 13 09:43:35 2007 +0200
@@ -61,7 +61,7 @@
 
 /* Must use the system's termcap.  It does special things.  */
 
-#define LIBS_TERMCAP -ltermcap
+#define LIBS_TERMCAP "-ltermcap"
 
 /* Mask for address bits within a memory segment */
 
diff -r 4de2936b4e77 -r 0132846995bd src/m/sun2.h
--- a/src/m/sun2.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/m/sun2.h	Mon Aug 13 09:43:35 2007 +0200
@@ -70,7 +70,7 @@
 
 /* Must use the system's termcap.  It does special things.  */
 
-#define LIBS_TERMCAP -ltermcap
+#define LIBS_TERMCAP "-ltermcap"
 
 /* Mask for address bits within a memory segment */
 
@@ -81,9 +81,9 @@
 /* These programs require Sun UNIX 4.2 Release 3.2 or greater */
 
 #ifdef HAVE_SUN_WINDOWS
-#define OTHER_FILES  ${libsrc}emacstool
-#define LIBS_MACHINE -lsuntool -lsunwindow -lpixrect
-#define OBJECTS_MACHINE sunfns.o
+#define OTHER_FILES " ${libsrc}emacstool"
+#define LIBS_MACHINE "-lsuntool -lsunwindow -lpixrect"
+#define OBJECTS_MACHINE "sunfns.o"
 #define SYMS_MACHINE syms_of_sunfns ()
 #define SYSTEM_PURESIZE_EXTRA 12000
 #endif
diff -r 4de2936b4e77 -r 0132846995bd src/m/sun3-68881.h
--- a/src/m/sun3-68881.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/m/sun3-68881.h	Mon Aug 13 09:43:35 2007 +0200
@@ -23,8 +23,8 @@
 /* In case we are using floating point, work together with crt0.c.  */
 
 #ifndef __GNUC__
-#define C_SWITCH_MACHINE -f68881
+#define C_SWITCH_MACHINE "-f68881"
 #endif
 
 #define sun_68881
-#define START_FILES crt0.o /usr/lib/Mcrt1.o
+#define START_FILES "crt0.o /usr/lib/Mcrt1.o"
diff -r 4de2936b4e77 -r 0132846995bd src/m/sun3-fpa.h
--- a/src/m/sun3-fpa.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/m/sun3-fpa.h	Mon Aug 13 09:43:35 2007 +0200
@@ -23,8 +23,8 @@
 /* In case we are using floating point, work together with crt0.c.  */
 
 #ifndef __GNUC__
-#define C_SWITCH_MACHINE -ffpa
+#define C_SWITCH_MACHINE "-ffpa"
 #endif
 
 #define sun_fpa
-#define START_FILES crt0.o /usr/lib/Wcrt1.o
+#define START_FILES "crt0.o /usr/lib/Wcrt1.o"
diff -r 4de2936b4e77 -r 0132846995bd src/m/sun3-soft.h
--- a/src/m/sun3-soft.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/m/sun3-soft.h	Mon Aug 13 09:43:35 2007 +0200
@@ -24,8 +24,8 @@
 /* In case we are using floating point, work together with crt0.c.  */
 
 #ifndef __GNUC__
-#define C_SWITCH_MACHINE -fsoft
+#define C_SWITCH_MACHINE "-fsoft"
 #endif
 
 #define sun_soft
-#define START_FILES crt0.o /usr/lib/Fcrt1.o
+#define START_FILES "crt0.o /usr/lib/Fcrt1.o"
diff -r 4de2936b4e77 -r 0132846995bd src/m/sun3.h
--- a/src/m/sun3.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/m/sun3.h	Mon Aug 13 09:43:35 2007 +0200
@@ -42,7 +42,7 @@
 /* In case we are using floating point, work together with crt0.c.  */
 
 #ifndef __GNUC__
-#define C_SWITCH_MACHINE -fsoft
+#define C_SWITCH_MACHINE "-fsoft"
 #endif
 
 /* This line is needed if you are linking with X windows
diff -r 4de2936b4e77 -r 0132846995bd src/m/sun386.h
--- a/src/m/sun386.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/m/sun386.h	Mon Aug 13 09:43:35 2007 +0200
@@ -55,16 +55,16 @@
 
 /* Must use the system's termcap.  It does special things.  */
 
-#define LIBS_TERMCAP -ltermcap
+#define LIBS_TERMCAP "-ltermcap"
 
 /* Arrange to link with sun windows, if requested.  */
 /* For details on emacstool and sunfns, see etc/SUN-SUPPORT */
 /* These programs require Sun UNIX 4.2 Release 3.2 or greater */
 
 #ifdef HAVE_SUN_WINDOWS
-#define OTHER_FILES  ${etcdir}emacstool
-#define LIBS_MACHINE -lsuntool -lsunwindow -lpixrect
-#define OBJECTS_MACHINE sunfns.o
+#define OTHER_FILES " ${etcdir}emacstool"
+#define LIBS_MACHINE "-lsuntool -lsunwindow -lpixrect"
+#define OBJECTS_MACHINE "sunfns.o"
 #define SYMS_MACHINE syms_of_sunfns ()
 #define SYSTEM_PURESIZE_EXTRA 12000
 #endif
@@ -74,11 +74,11 @@
 
 /* XEmacs change:  from Thomas.Tornblom@nexus.comm.se */
 #ifdef USE_GCC
-#define C_SWITCH_MACHINE -static -Dmode_t="u_short" /* avoid dynamic linking */
-#define LD_SWITCH_MACHINE -Wl,-N -static
+#define C_SWITCH_MACHINE "-static -Dmode_t=\"u_short\"" /* avoid dynamic linking */
+#define LD_SWITCH_MACHINE "-Wl,-N -static"
 #else
-#define C_SWITCH_MACHINE -Bstatic -Dmode_t="u_short"/* avoid dynamic linking */
-#define LD_SWITCH_MACHINE -N -Bstatic
+#define C_SWITCH_MACHINE "-Bstatic -Dmode_t=\"u_short\""/* avoid dynamic linking */
+#define LD_SWITCH_MACHINE "-N -Bstatic"
 #endif
 
 /* Get rid of the -e __start that s-sunos4.h does.  */
@@ -87,4 +87,4 @@
 /* XEmacs addition? */
 #undef RUN_TIME_REMAP
 #undef UNEXEC
-#define UNEXEC unexec.o
+#define UNEXEC "unexec.o"
diff -r 4de2936b4e77 -r 0132846995bd src/m/tad68k.h
--- a/src/m/tad68k.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/m/tad68k.h	Mon Aug 13 09:43:35 2007 +0200
@@ -70,7 +70,7 @@
 
 /* SysV has alloca in the PW library */
 
-#define LIB_STANDARD -lPW -lc
+#define LIB_STANDARD "-lPW -lc"
 #define HAVE_ALLOCA
 
 /* Define NO_REMAP if memory segmentation makes it not work well
@@ -91,7 +91,7 @@
 #define fchmod				/* we don't have fchmod() */
 #define SECTION_ALIGNMENT (2048-1)	/* 2k boundaries required in unexec */
 #define SEGMENT_MASK (128*1024-1)	/* 128k offsets required in unexec */
-#define C_DEBUG_SWITCH -O		/* build with -O (TPIX has GCC 1.34) */
+#define C_DEBUG_SWITCH "-O"		/* build with -O (TPIX has GCC 1.34) */
 
 #define BROKEN_TIOCGWINSZ		/* Don't try to use TIOCGWINSZ.  */
 
@@ -99,4 +99,4 @@
 
 #define select gnu_select		/* avoid select() name clash */
 #define HAVE_PTYS			/* we do have PTYs if we have TCP */
-#define LIBS_SYSTEM -lsocket		/* get TCP networking functions */
+#define LIBS_SYSTEM "-lsocket"		/* get TCP networking functions */
diff -r 4de2936b4e77 -r 0132846995bd src/m/tandem-s2.h
--- a/src/m/tandem-s2.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/m/tandem-s2.h	Mon Aug 13 09:43:35 2007 +0200
@@ -19,5 +19,5 @@
 #define NO_SUBPROCESSES
 
 /* Correct some library file names.  */
-#define START_FILES pre-crt0.o /usr/lib/crt1.o1.31
-#define LIB_STANDARD -lbsd -lc /usr/lib/crtn.o1.31
+#define START_FILES "pre-crt0.o /usr/lib/crt1.o1.31"
+#define LIB_STANDARD "-lbsd -lc /usr/lib/crtn.o1.31"
diff -r 4de2936b4e77 -r 0132846995bd src/m/tekxd88.h
--- a/src/m/tekxd88.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/m/tekxd88.h	Mon Aug 13 09:43:35 2007 +0200
@@ -79,12 +79,12 @@
 #  define alloca __builtin_alloca	/* Use the gcc builtin alloca() ... */
 #  define HAVE_ALLOCA	/* ... and be sure that no other ones are tried out. */
 #  undef C_ALLOCA
-#  define C_OPTIMIZE_SWITCH -O2
+#  define C_OPTIMIZE_SWITCH "-O2"
 #else /* not __GNUC__ */
 #  undef HAVE_ALLOCA
 #  define C_ALLOCA	/* Use the alloca() supplied in alloca.c. */
 #  define STACK_DIRECTION -1  /* The stack grows towards lower addresses. */
-#  define C_OPTIMIZE_SWITCH -O
+#  define C_OPTIMIZE_SWITCH "-O"
 #endif /* __GNUC__ */
 
 #undef LIB_X11_LIB	/* Don't use shared libraries defined in usg5-3.h */
@@ -98,9 +98,9 @@
 /* -X18 means do not allocate programmer-defined local variables to a
    register unless they are declared register.  (Copied from perl-4.036
    Green Hills C hints file.  Might be needed for setjmp, I don't know.) */
-#  define C_SWITCH_MACHINE -X18
+#  define C_SWITCH_MACHINE "-X18"
 /* We need /lib/default.ld so that /bin/ld can read its link directives. */
-#  define LD_SWITCH_SYSTEM /lib/default.ld
+#  define LD_SWITCH_SYSTEM "/lib/default.ld"
 #endif /* ghs */
 
 /* We need this to get dumping to work */
diff -r 4de2936b4e77 -r 0132846995bd src/m/tower32.h
--- a/src/m/tower32.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/m/tower32.h	Mon Aug 13 09:43:35 2007 +0200
@@ -83,7 +83,7 @@
 /* The standard C library is -lcieee, not -lc.
    Also use the PW library, which contains alloca.  */
 
-#define LIB_STANDARD -lPW -lcieee
+#define LIB_STANDARD "-lPW -lcieee"
 
 /* crt0.c should use the vax-bsd style of entry.  Beware that if you have
    OS release 2.00.00 or later, *and* change src/ymakefile so that CFLAGS
diff -r 4de2936b4e77 -r 0132846995bd src/m/tower32v3.h
--- a/src/m/tower32v3.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/m/tower32v3.h	Mon Aug 13 09:43:35 2007 +0200
@@ -76,14 +76,14 @@
 #ifdef __GNUC__
 #define HAVE_ALLOCA
 #define alloca __builtin_alloca
-#define C_OPTIMIZE_SWITCH -O -fstrength-reduce -fomit-frame-pointer
-#define LIB_STANDARD -lc /lib/crtn.o
+#define C_OPTIMIZE_SWITCH "-O -fstrength-reduce -fomit-frame-pointer"
+#define LIB_STANDARD "-lc /lib/crtn.o"
 #else
 /* This section is correct if you do *not* change src/ymakefile so that
    CFLAGS includes C_OPTIMIZE_SWITCH rather than C_DEBUG_SWITCH.  */
 #define HAVE_ALLOCA
-#define C_DEBUG_SWITCH -g -O0
-#define LIB_STANDARD -lc -lPW /lib/crtn.o
+#define "C_DEBUG_SWITCH -g -O0"
+#define LIB_STANDARD "-lc -lPW /lib/crtn.o"
 /* This section is correct if you do enable C_OPTIMIZE_SWITCH.  */
 /* #define C_ALLOCA */
 /* #define STACK_DIRECTION -1 */
@@ -94,7 +94,7 @@
 /* The OS maps the data section far away from the text section.  */
 #define NO_REMAP
 #define TEXT_START 0
-#define START_FILES pre-crt0.o /lib/crt1.o
+#define START_FILES "pre-crt0.o /lib/crt1.o"
 
 /* The OS has an implementation of symlinks that is semantically different
    from BSD, but for some silly reason it partly has the same syntax.  */
diff -r 4de2936b4e77 -r 0132846995bd src/m/ustation.h
--- a/src/m/ustation.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/m/ustation.h	Mon Aug 13 09:43:35 2007 +0200
@@ -113,7 +113,7 @@
 
 /* Termcap is available */
 
-#define LIBS_TERMCAP -ltermcap
+#define LIBS_TERMCAP "-ltermcap"
 
 #define EXEC_PAGESIZE 1024
 #define SYSTEM_PURESIZE_EXTRA 10000
diff -r 4de2936b4e77 -r 0132846995bd src/m/vax.h
--- a/src/m/vax.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/m/vax.h	Mon Aug 13 09:43:35 2007 +0200
@@ -91,7 +91,7 @@
 /* Vax sysV has alloca in the PW library.  */
 
 #ifdef USG
-#define LIB_STANDARD -lPW -lc
+#define LIB_STANDARD "-lPW -lc"
 #define HAVE_ALLOCA
 
 /* There is some bug in unexec in for usg 5.2 on a vax
diff -r 4de2936b4e77 -r 0132846995bd src/m/wicat.h
--- a/src/m/wicat.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/m/wicat.h	Mon Aug 13 09:43:35 2007 +0200
@@ -96,7 +96,7 @@
 
 /* Delete this for WICAT sys V releases before 2.0.  */
 
-#define	LIB_STANDARD -lc-nofp
+#define	LIB_STANDARD "-lc-nofp"
 
 /* Special magic number */
 
@@ -104,7 +104,7 @@
 
 /* Special switches to give to ld.  */
 
-#define LD_SWITCH_MACHINE -e __start -N
+#define LD_SWITCH_MACHINE "-e __start -N"
 
 /* Sigh...cannot define this for WICAT cuz 0 length memcpy blows chunks */
 
@@ -128,5 +128,5 @@
 /* there is a select() in libcurses.a that causes a conflict so use termlib */
 #ifdef HAVE_SELECT
 #undef TERMINFO
-#define LIBS_TERMCAP select.o -ltermlib
+#define LIBS_TERMCAP "select.o -ltermlib"
 #endif
diff -r 4de2936b4e77 -r 0132846995bd src/m/xps100.h
--- a/src/m/xps100.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/m/xps100.h	Mon Aug 13 09:43:35 2007 +0200
@@ -86,6 +86,6 @@
 #define STACK_DIRECTION -1
 #define TERMINFO
 #define SWITCH_ENUM_BUG
-#define LIB_STANDARD  -lc
-#define LD_SWITCH_MACHINE -X
+#define LIB_STANDARD " -lc"
+#define LD_SWITCH_MACHINE "-X"
 #define SECTION_ALIGNMENT (0x3ff)
diff -r 4de2936b4e77 -r 0132846995bd src/menubar-x.c
--- a/src/menubar-x.c	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/menubar-x.c	Mon Aug 13 09:43:35 2007 +0200
@@ -796,7 +796,7 @@
     XtVaGetValues (container,
 		   XtNwidth, &req.width,
 		   XtNheight, &req.height,
-		   0);
+		   NULL);
     XtQueryGeometry (container, &req, &repl);
     EmacsManagerChangeSize (container, repl.width,
 			    repl.height);
diff -r 4de2936b4e77 -r 0132846995bd src/ralloc.c
--- a/src/ralloc.c	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/ralloc.c	Mon Aug 13 09:43:35 2007 +0200
@@ -674,7 +674,7 @@
 static MMAP_HANDLE
 new_mmap_handle (size_t nsiz)
 {
-  MMAP_HANDLE h = UNDERLYING_MALLOC( sizeof( struct alloc_dll ) );
+  MMAP_HANDLE h = (MMAP_HANDLE) UNDERLYING_MALLOC( sizeof (struct alloc_dll));
   if ( h == 0) return 0;
   h->size = nsiz;
   if (mmap_start == 0)
@@ -1081,7 +1081,7 @@
     case 0:
       abort();
     case 1:
-      *ptr = UNDERLYING_MALLOC(size);
+      *ptr = (POINTER) UNDERLYING_MALLOC(size);
       break;
     default:
       mh = new_mmap_handle( size );
@@ -1167,7 +1167,7 @@
     }
   else if (r_alloc_initialized == 1)
     {
-      POINTER tmp = realloc(*ptr, sz);
+      POINTER tmp = (POINTER) realloc(*ptr, sz);
       if (tmp)
 	*ptr = tmp;
       return tmp;
@@ -1181,7 +1181,7 @@
 
       if ( h == 0 )		/* Was allocated using malloc. */
 	{
-	  POINTER tmp = UNDERLYING_REALLOC(*ptr, sz);
+	  POINTER tmp = (POINTER) UNDERLYING_REALLOC(*ptr, sz);
 	  if (tmp)
 	    *ptr = tmp;
 	  return tmp;
diff -r 4de2936b4e77 -r 0132846995bd src/redisplay-x.c
--- a/src/redisplay-x.c	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/redisplay-x.c	Mon Aug 13 09:43:35 2007 +0200
@@ -2215,7 +2215,7 @@
   Widget shell = FRAME_X_SHELL_WIDGET (f);
   Dimension width, height;
 
-  XtVaGetValues (shell, XtNwidth, &width, XtNheight, &height, 0);
+  XtVaGetValues (shell, XtNwidth, &width, XtNheight, &height, NULL);
   XSETFRAME (frame, f);
 
   tmp_pixel = FACE_FOREGROUND (Vdefault_face, frame);
diff -r 4de2936b4e77 -r 0132846995bd src/regex.c
--- a/src/regex.c	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/regex.c	Mon Aug 13 09:43:35 2007 +0200
@@ -35,17 +35,14 @@
        `#ifdef MULE' or with comments that have `XEmacs' in them.
  */
 
-/* AIX requires this to be the first thing in the file. */
-#if defined (_AIX) && !defined (REGEX_MALLOC)
-  #pragma alloca
-#endif
-
-#define _GNU_SOURCE
-
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
 
+#ifndef _GNU_SOURCE
+#define _GNU_SOURCE 1
+#endif
+
 /* We assume non-Mule if emacs isn't defined. */
 #ifndef emacs
 #undef MULE
diff -r 4de2936b4e77 -r 0132846995bd src/s/386-ix.h
--- a/src/s/386-ix.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/s/386-ix.h	Mon Aug 13 09:43:35 2007 +0200
@@ -9,7 +9,7 @@
 /* There are some reports that the following is needed
    with some version of this system.
 #undef LIBX11_SYSTEM
-#define LIBX11_SYSTEM -linet
+#define LIBX11_SYSTEM "-linet"
 */
 
 /* This is said to be needed as a result of having _insque rather
diff -r 4de2936b4e77 -r 0132846995bd src/s/386bsd.h
--- a/src/s/386bsd.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/s/386bsd.h	Mon Aug 13 09:43:35 2007 +0200
@@ -6,7 +6,7 @@
 #include "bsd4-3.h"
 
 #undef LIB_STANDARD
-#define LIB_STANDARD -lc $(GNULIB_VAR)
+#define LIB_STANDARD "-lc $(GNULIB_VAR)"
 
 /* The following should be set to /netbsd if you are running netbsd > 0.8 
    Or just link /netbsd -> /386bsd  */
diff -r 4de2936b4e77 -r 0132846995bd src/s/aix3-1.h
--- a/src/s/aix3-1.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/s/aix3-1.h	Mon Aug 13 09:43:35 2007 +0200
@@ -119,7 +119,7 @@
 /* #define ADDR_CORRECT(x) (x) */
 
 #ifndef __GNUC__
-#define LINKER cc
+#define LINKER "cc"
 #endif
 
 /* Prevent -lg from being used for debugging.  Not needed.  */
diff -r 4de2936b4e77 -r 0132846995bd src/s/aix3-2-5.h
--- a/src/s/aix3-2-5.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/s/aix3-2-5.h	Mon Aug 13 09:43:35 2007 +0200
@@ -11,7 +11,7 @@
 #undef C_DEBUG_SWITCH
 #undef C_OPTIMIZE_SWITCH
 #define C_DEBUG_SWITCH
-#define C_OPTIMIZE_SWITCH -O
+#define C_OPTIMIZE_SWITCH "-O"
 #endif
 
 /* Perry Smith <pedz@ddivt1.austin.ibm.com> says these are correct.  */
@@ -24,4 +24,4 @@
 
 /* Bill Woodward <wpwood@austin.ibm.com> says:
    libIM *must* precede libXm, to avoid getting aixLoadIM error messages.  */
-#define LIB_MOTIF -lIM -lXm
+#define LIB_MOTIF "-lIM -lXm"
diff -r 4de2936b4e77 -r 0132846995bd src/s/aix3-2.h
--- a/src/s/aix3-2.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/s/aix3-2.h	Mon Aug 13 09:43:35 2007 +0200
@@ -16,10 +16,10 @@
    additional optimization.  --nils@exp-math.uni-essen.de */
 /* XEmacs change: maxmem=-1 means unlimited.  Suggested by
    dkeller@VNET.IBM.COM */
-#define C_SWITCH_SYSTEM -ma -qmaxmem=-1
+#define C_SWITCH_SYSTEM "-ma -qmaxmem=-1"
 #else
 /* Otherwise, XEmacs is just too big ... */
-#define C_SWITCH_SYSTEM -mminimal-toc
+#define C_SWITCH_SYSTEM "-mminimal-toc"
 #endif
 
 #define HAVE_ALLOCA
@@ -43,7 +43,7 @@
 /* XEmacs change:  no evidence of this in XEmacs */
 #if 0
 #ifndef __GNUC__
-#define C_SWITCH_DEBUG -g
+#define C_SWITCH_DEBUG "-g"
 #define C_SWITCH_OPTIMIZE
 #endif
 #endif
diff -r 4de2936b4e77 -r 0132846995bd src/s/aix4-1.h
--- a/src/s/aix4-1.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/s/aix4-1.h	Mon Aug 13 09:43:35 2007 +0200
@@ -6,7 +6,7 @@
 
 /* olson@mcs.anl.gov says -li18n is needed by -lXm.  */
 #undef LIB_MOTIF
-#define LIB_MOTIF -lXm -li18n
+#define LIB_MOTIF "-lXm -li18n"
 
 #ifdef __GNUC__
 #undef _NO_PROTO
@@ -22,7 +22,7 @@
 #ifndef __GNUC__
 #undef C_DEBUG_SWITCH
 #undef C_OPTIMIZE_SWITCH
-#define C_DEBUG_SWITCH -g
+#define C_DEBUG_SWITCH "-g"
 #endif
 
 /* The X internationalization stuff is still broken in AIX 4.1, so
diff -r 4de2936b4e77 -r 0132846995bd src/s/aix4-2.h
--- a/src/s/aix4-2.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/s/aix4-2.h	Mon Aug 13 09:43:35 2007 +0200
@@ -1,5 +1,5 @@
 /* valdis.kletnieks@vt.edu - tell configure how to auto-detect CDE */
-#define C_SWITCH_X_SYSTEM -I/usr/dt/include/Tt -I/usr/dt/include
+#define C_SWITCH_X_SYSTEM "-I/usr/dt/include/Tt -I/usr/dt/include"
 
 /* Other than that, treat the same as AIX 4.1 */
 #include "aix4-1.h"
diff -r 4de2936b4e77 -r 0132846995bd src/s/bsd386.h
--- a/src/s/bsd386.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/s/bsd386.h	Mon Aug 13 09:43:35 2007 +0200
@@ -17,8 +17,8 @@
 #define A_TEXT_SEEK(hdr) (N_TXTOFF(hdr) + A_TEXT_OFFSET(hdr))
 
 #define LIBS_DEBUG
-#define LIB_X11_LIB -L/usr/X11/lib -lX11
-#define LIBS_SYSTEM -lutil -lcompat
+#define LIB_X11_LIB "-L/usr/X11/lib -lX11"
+#define LIBS_SYSTEM "-lutil -lcompat"
 
 #define HAVE_GETLOADAVG
 
diff -r 4de2936b4e77 -r 0132846995bd src/s/bsd4-1.h
--- a/src/s/bsd4-1.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/s/bsd4-1.h	Mon Aug 13 09:43:35 2007 +0200
@@ -81,4 +81,4 @@
 #define O_CREAT 1000
 
 /* Special library needed for linking for 4.1.  */
-#define LIBS_SYSTEM -ljobs
+#define LIBS_SYSTEM "-ljobs"
diff -r 4de2936b4e77 -r 0132846995bd src/s/bsdos2-1.h
--- a/src/s/bsdos2-1.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/s/bsdos2-1.h	Mon Aug 13 09:43:35 2007 +0200
@@ -5,4 +5,4 @@
 #include "bsdos2.h"
 
 /* -lX11 needs shmat and shmdt from -lipc. */
-#define LIBX11_SYSTEM -lipc
+#define LIBX11_SYSTEM "-lipc"
diff -r 4de2936b4e77 -r 0132846995bd src/s/bsdos2.h
--- a/src/s/bsdos2.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/s/bsdos2.h	Mon Aug 13 09:43:35 2007 +0200
@@ -9,7 +9,7 @@
 #define ORDINARY_LINK
 
 #if 0
-#define	START_FILES	pre-crt0.o /usr/lib/crt0.o
+#define	START_FILES	"pre-crt0.o /usr/lib/crt0.o"
 #endif
 
 #define	TEXT_START	0x1020	/* for QMAGIC */
diff -r 4de2936b4e77 -r 0132846995bd src/s/cxux.h
--- a/src/s/cxux.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/s/cxux.h	Mon Aug 13 09:43:35 2007 +0200
@@ -47,14 +47,14 @@
 /* #define USING_CX_UX_7 */
 
 #ifdef USING_CX_UX_7
-#define LINKER /usr/sde/coff/usr/bin/ld
-#define LD_SWITCH_SYSTEM -L/usr/sde/coff/usr/lib -zzero_word
-#define START_FILES pre-crt0.o /usr/sde/coff/usr/lib/crt0.o /usr/sde/coff/usr/lib/m88100.o
+#define LINKER "/usr/sde/coff/usr/bin/ld"
+#define LD_SWITCH_SYSTEM "-L/usr/sde/coff/usr/lib -zzero_word"
+#define START_FILES "pre-crt0.o /usr/sde/coff/usr/lib/crt0.o /usr/sde/coff/usr/lib/m88100.o"
 #else	/* !USING_CX_UX_7 */
 #ifdef	_M88K
-#define	START_FILES pre-crt0.o /lib/crt0.o
+#define	START_FILES "pre-crt0.o /lib/crt0.o"
 #else
-#define	START_FILES cxux-crt0.o /lib/crt0.o
+#define	START_FILES "cxux-crt0.o /lib/crt0.o"
 #endif
 #endif	/* USING_CX_UX_7 */
 
@@ -63,7 +63,7 @@
 
 #define SYSTEM_TYPE "usg-unix-v"
 
-#define C_SWITCH_SYSTEM -Xa
+#define C_SWITCH_SYSTEM "-Xa"
 
 /* Letter to use in finding device name of first pty,
   if system supports pty's.  'a' means it is /dev/ptya0  */
diff -r 4de2936b4e77 -r 0132846995bd src/s/decosf1-2.h
--- a/src/s/decosf1-2.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/s/decosf1-2.h	Mon Aug 13 09:43:35 2007 +0200
@@ -16,11 +16,11 @@
    the BSD universe and not the SYSV universe.  */
 
 #ifdef __GNUC__
-# define C_SWITCH_SYSTEM -D_BSD
+#define C_SWITCH_SYSTEM "-D_BSD"
 #else
-# define C_SWITCH_SYSTEM -std -D_BSD
+#define C_SWITCH_SYSTEM "-std -D_BSD"
 #endif 
-#define LIBS_SYSTEM	-lbsd
+#define LIBS_SYSTEM	"-lbsd"
 #define SYSTEM_MALLOC
 #define GETPGRP_NO_ARG
 
diff -r 4de2936b4e77 -r 0132846995bd src/s/decosf1-3-static.h
--- a/src/s/decosf1-3-static.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/s/decosf1-3-static.h	Mon Aug 13 09:43:35 2007 +0200
@@ -5,5 +5,5 @@
 #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
+#define LD_SWITCH_SYSTEM "-non_shared"
 #endif
diff -r 4de2936b4e77 -r 0132846995bd src/s/dgux.h
--- a/src/s/dgux.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/s/dgux.h	Mon Aug 13 09:43:35 2007 +0200
@@ -88,7 +88,7 @@
    panic.  ELF executables have the advantage of using shared libraries,
    while COFF executables will still work on 4.2x systems. */
 
-#define UNEXEC unexelf.o
+#define UNEXEC "unexelf.o"
 
 /* This makes sure that all segments in the executable are undumped,
    not just text, data, and bss.  In the case of Mxdb and shared
@@ -176,8 +176,8 @@
 #endif
 
 #define ORDINARY_LINK
-#define START_FILES pre-crt0.o
-#define LIB_GCC /usr/lib/gcc/libgcc.a
+#define START_FILES "pre-crt0.o"
+#define LIB_GCC "/usr/lib/gcc/libgcc.a"
 
 #ifdef _M88KBCS_TARGET
 /* Karl Berry says: the environment
@@ -207,7 +207,7 @@
       else							\
         sprintf (pty_name, "/dev/tty%c%x", c, i);
 
-#define C_DEBUG_SWITCH -g
+#define C_DEBUG_SWITCH "-g"
 
 #else /* not COFF */
 
@@ -256,7 +256,7 @@
     fatal ("ioctl I_PUSH ttcompat", errno);
 
 #ifdef __GNUC__
-#define C_DEBUG_SWITCH -g -V2 -mversion-03.00 -mstandard
+#define C_DEBUG_SWITCH "-g -V2 -mversion-03.00 -mstandard"
 #endif
 
 #endif /* ELF */
@@ -264,8 +264,8 @@
 /* Extra stuff which probably should be someplace else but is here out
    of expediency. */
 
-#define LIB_X11_LIB -lX11
-#define LIB_MOTIF -lXm -lgen
+#define LIB_X11_LIB "-lX11"
+#define LIB_MOTIF "-lXm -lgen"
 
 /* Formerly "BSD_PGRPS" */
 
diff -r 4de2936b4e77 -r 0132846995bd src/s/dgux5-4r2.h
--- a/src/s/dgux5-4r2.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/s/dgux5-4r2.h	Mon Aug 13 09:43:35 2007 +0200
@@ -31,5 +31,5 @@
 
 #if 0  /* Shawn M. Carey <smcarey@mailbox.syr.edu> found this
 	  caused trouble on DGUX 5.4.2.  */
-#define LIBS_SYSTEM -ldgc
+#define LIBS_SYSTEM "-ldgc"
 #endif
diff -r 4de2936b4e77 -r 0132846995bd src/s/dgux5-4r3.h
--- a/src/s/dgux5-4r3.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/s/dgux5-4r3.h	Mon Aug 13 09:43:35 2007 +0200
@@ -43,7 +43,7 @@
 
 #ifdef C_DEBUG_SWITCH
 #undef C_DEBUG_SWITCH
-#define C_DEBUG_SWITCH -g
+#define C_DEBUG_SWITCH "-g"
 #endif
  
 /* Define the following to avoid conflicts resulting from the fact 
diff -r 4de2936b4e77 -r 0132846995bd src/s/dgux5-4r4.h
--- a/src/s/dgux5-4r4.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/s/dgux5-4r4.h	Mon Aug 13 09:43:35 2007 +0200
@@ -31,7 +31,7 @@
 /*#undef getpgrp*/
 
 /* Symbols missing - I suspect this is the culprit... */
-#define LIBS_SYSTEM -lsocket -lnsl -lelf -lgen
+#define LIBS_SYSTEM "-lsocket -lnsl -lelf -lgen"
 
 /* Prevent use of a (non-existent) debugging library. */
 #define LIBS_DEBUG
diff -r 4de2936b4e77 -r 0132846995bd src/s/esix.h
--- a/src/s/esix.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/s/esix.h	Mon Aug 13 09:43:35 2007 +0200
@@ -11,13 +11,13 @@
 
 /* Have -lg be used for debugging. */
 #undef LIBS_DEBUG
-#define LIBS_DEBUG -lg
+#define LIBS_DEBUG "-lg"
 
 /* If using Roell's X server, define X11R4 */
 #ifdef X11R4			/* Roell's X server */
 #define select sys_select /* Emacs select() not good enough? */
 #undef LIBX11_SYSTEM
-#define LIBX11_SYSTEM -lpt
+#define LIBX11_SYSTEM "-lpt"
 #endif /* X11R4 */
 
 /* ESIX does not need <sys/sioctl.h>, but needs <sys/ptem.h> */
diff -r 4de2936b4e77 -r 0132846995bd src/s/esix5r4.h
--- a/src/s/esix5r4.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/s/esix5r4.h	Mon Aug 13 09:43:35 2007 +0200
@@ -8,12 +8,12 @@
 #define SYSTEM_MALLOC 1
 #if defined (HAVE_XFREE386)
 # undef LIB_STANDARD
-# define LIB_STANDARD -lc
+# define LIB_STANDARD "-lc"
 #else
-# define LIB_X11_LIB -lsocket -lc -lX11
+# define LIB_X11_LIB "-lsocket -lc -lX11"
 # undef LIB_STANDARD
 # ifdef ORDINARY_LINK
-#   define LIB_STANDARD -lnsl -lns -lelf /usr/ucblib/libucb.a
+#   define LIB_STANDARD "-lnsl -lns -lelf /usr/ucblib/libucb.a"
 # else
-#   define LIB_STANDARD -lnsl -lns -lelf /usr/ucblib/libucb.a /usr/ccs/lib/crtn.o
+#   define LIB_STANDARD "-lnsl -lns -lelf /usr/ucblib/libucb.a /usr/ccs/lib/crtn.o"
 # endif
diff -r 4de2936b4e77 -r 0132846995bd src/s/ewsux5r4.h
--- a/src/s/ewsux5r4.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/s/ewsux5r4.h	Mon Aug 13 09:43:35 2007 +0200
@@ -20,5 +20,5 @@
 #endif
 
 #ifndef __GNUC__
-#define C_DEBUG_SWITCH -O  -KOlimit=2000 -ZXNd=5000
+#define C_DEBUG_SWITCH "-O  -KOlimit=2000 -ZXNd=5000"
 #endif
diff -r 4de2936b4e77 -r 0132846995bd src/s/freebsd.h
--- a/src/s/freebsd.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/s/freebsd.h	Mon Aug 13 09:43:35 2007 +0200
@@ -28,22 +28,22 @@
 #include <osreldate.h>
 #endif
 #if __FreeBSD_version >= 199701
-#define LIBS_SYSTEM -lutil -lxpg4
+#define LIBS_SYSTEM "-lutil -lxpg4"
 #else
-#define LIBS_SYSTEM -lutil
+#define LIBS_SYSTEM "-lutil"
 #endif
 
-#define LIBS_TERMCAP -ltermcap
-#define LIB_GCC -lgcc
+#define LIBS_TERMCAP "-ltermcap"
+#define LIB_GCC "-lgcc"
 
 /* freebsd has POSIX-style pgrp behavior. */
 #define GETPGRP_NO_ARG
 
 #ifndef NO_SHARED_LIBS
-#define LD_SWITCH_SYSTEM -dc -dp -e start
+#define LD_SWITCH_SYSTEM "-dc -dp -e start"
 #define HAVE_TEXT_START		/* No need to define `start_of_text'. */
-#define START_FILES pre-crt0.o /usr/lib/crt0.o
-#define UNEXEC unexfreebsd.o
+#define START_FILES "pre-crt0.o /usr/lib/crt0.o"
+#define UNEXEC "unexfreebsd.o"
 #define RUN_TIME_REMAP
 
 #ifndef N_TRELOFF
@@ -54,7 +54,7 @@
 #else /* NO_SHARED_LIBS */
 #ifdef __FreeBSD__  /* shared libs are available, but the user prefers
                      not to use them.  */
-#define LD_SWITCH_SYSTEM -Bstatic
+#define LD_SWITCH_SYSTEM "-Bstatic"
 #define A_TEXT_OFFSET(x) (sizeof (struct exec))
 #define A_TEXT_SEEK(hdr) (N_TXTOFF(hdr) + A_TEXT_OFFSET(hdr))
 #endif /* __FreeBSD__ */
diff -r 4de2936b4e77 -r 0132846995bd src/s/gnu.h
--- a/src/s/gnu.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/s/gnu.h	Mon Aug 13 09:43:35 2007 +0200
@@ -49,7 +49,7 @@
 #define DATA_START ({ extern int data_start; (char *) &data_start; })
 
 /* GNU now always uses the ELF format.  */
-#define UNEXEC unexelf.o
+#define UNEXEC "unexelf.o"
 
 /* Some losing code fails to include this and then assumes
    that because it is braindead that O_RDONLY==0.  */
diff -r 4de2936b4e77 -r 0132846995bd src/s/hpux.h
--- a/src/s/hpux.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/s/hpux.h	Mon Aug 13 09:43:35 2007 +0200
@@ -135,7 +135,7 @@
    `signal' fail to work.  */
 
 #ifdef HPUX_NET
-#define LIBS_SYSTEM -ln
+#define LIBS_SYSTEM "-ln"
 #else
 #define LIBS_SYSTEM
 #endif
diff -r 4de2936b4e77 -r 0132846995bd src/s/hpux10-shr.h
--- a/src/s/hpux10-shr.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/s/hpux10-shr.h	Mon Aug 13 09:43:35 2007 +0200
@@ -14,7 +14,7 @@
 /* Don't tell the linker to link statically */
 #ifdef NOT_C_CODE
 #define START_FILES
-#define LINKER $(CC)
+#define LINKER "$(CC)"
 #endif /* THIS IS YMAKEFILE */
 
 /* get call to brk() when rerunning XEmacs */
diff -r 4de2936b4e77 -r 0132846995bd src/s/hpux10.h
--- a/src/s/hpux10.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/s/hpux10.h	Mon Aug 13 09:43:35 2007 +0200
@@ -20,4 +20,4 @@
 
 /* XEmacs: -lcurses includes a broken select() call on some 10.X systems. */
 #undef LIBS_TERMCAP
-#define LIBS_TERMCAP -ltermcap
+#define LIBS_TERMCAP "-ltermcap"
diff -r 4de2936b4e77 -r 0132846995bd src/s/hpux8.h
--- a/src/s/hpux8.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/s/hpux8.h	Mon Aug 13 09:43:35 2007 +0200
@@ -26,16 +26,16 @@
    fix this up. */
 
 /* dob@inel.gov says HPUX 8.07 needs this.  He was using X11R5, I think.  */
-#define LIBX11_SYSTEM -lXext
+#define LIBX11_SYSTEM "-lXext"
 
-#define LIB_X11_LIB -L/usr/lib/X11R5 -L/usr/lib/X11R4 -lX11
-#define C_SWITCH_X_SYSTEM -I/usr/include/X11R5 -I/usr/include/X11R4
-#define LD_SWITCH_X_DEFAULT -L/usr/lib/X11R5 -L/usr/lib/X11R4
+#define LIB_X11_LIB "-L/usr/lib/X11R5 -L/usr/lib/X11R4 -lX11"
+#define C_SWITCH_X_SYSTEM "-I/usr/include/X11R5 -I/usr/include/X11R4"
+#define LD_SWITCH_X_DEFAULT "-L/usr/lib/X11R5 -L/usr/lib/X11R4"
 #endif
 
 /* XEmacs change -- changed LIBX11_SYSTEM and C_SWITCH_X_SYSTEM */
-#define C_SWITCH_X_SYSTEM -I/usr/include/X11R4 -I/usr/include/Motif1.1
-#define LD_SWITCH_X_SYSTEM -L/usr/lib/X11R4 -L/usr/lib/Motif1.1
+#define C_SWITCH_X_SYSTEM "-I/usr/include/X11R4 -I/usr/include/Motif1.1"
+#define LD_SWITCH_X_SYSTEM "-L/usr/lib/X11R4 -L/usr/lib/Motif1.1"
 
 /* Don't use shared libraries.  unexec doesn't handle them.
    Note GCC automatically passes -a archive to ld, and it has its own
@@ -47,22 +47,22 @@
 #ifdef HPUX_USE_SHLIBS
 #define LD_SWITCH_SYSTEM
 #else
-#define LD_SWITCH_SYSTEM -Xlinker -a -Xlinker archive
+#define LD_SWITCH_SYSTEM "-Xlinker -a -Xlinker archive"
 #endif
 
 #else /* not __GNUC__ */
 
 #if (defined(hp9000s700) || defined(__hp9000s700))
 #ifdef HPUX_USE_SHLIBS
-#define LD_SWITCH_SYSTEM -L/lib/pa1.1
+#define LD_SWITCH_SYSTEM "-L/lib/pa1.1"
 #else
-#define LD_SWITCH_SYSTEM -a archive -L/lib/pa1.1
+#define LD_SWITCH_SYSTEM "-a archive -L/lib/pa1.1"
 #endif
 #else /* not (defined(hp9000s700) || defined(__hp9000s700)) */
 #ifdef HPUX_USE_SHLIBS
 #define LD_SWITCH_SYSTEM
 #else
-#define LD_SWITCH_SYSTEM -a archive
+#define LD_SWITCH_SYSTEM "-a archive"
 #endif
 #endif /* not (defined(hp9000s700) || defined(__hp9000s700)) */
 
@@ -70,7 +70,7 @@
 
 /* XEmacs change */
 #ifndef __GNUC__
-#define C_SWITCH_SYSTEM -Aa -D_HPUX_SOURCE
+#define C_SWITCH_SYSTEM "-Aa -D_HPUX_SOURCE"
 #endif
 
 /* Some hpux 8 machines seem to have TIOCGWINSZ,
diff -r 4de2936b4e77 -r 0132846995bd src/s/hpux9-shr.h
--- a/src/s/hpux9-shr.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/s/hpux9-shr.h	Mon Aug 13 09:43:35 2007 +0200
@@ -16,7 +16,7 @@
 /* Don't tell the linker to link statically */
 #ifdef NOT_C_CODE
 #define START_FILES
-#define LINKER $(CC)
+#define LINKER "$(CC)"
 /* now done in hpux8.h */
 /* #define LD_SWITCH_SYSTEM -L/usr/lib/X11R5 -L/usr/lib/Motif1.2 */
 #endif /* THIS IS YMAKEFILE */
diff -r 4de2936b4e77 -r 0132846995bd src/s/hpux9-x11r4.h
--- a/src/s/hpux9-x11r4.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/s/hpux9-x11r4.h	Mon Aug 13 09:43:35 2007 +0200
@@ -5,8 +5,8 @@
 #include "hpux9.h"
 
 #undef  C_SWITCH_X_SYSTEM
-#define C_SWITCH_X_SYSTEM -I/usr/include/Motif1.1
+#define C_SWITCH_X_SYSTEM "-I/usr/include/Motif1.1"
 
 #undef  LD_SWITCH_X_DEFAULT
-#define LD_SWITCH_X_DEFAULT -L/usr/lib/Motif1.1
+#define LD_SWITCH_X_DEFAULT "-L/usr/lib/Motif1.1"
 
diff -r 4de2936b4e77 -r 0132846995bd src/s/hpux9.h
--- a/src/s/hpux9.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/s/hpux9.h	Mon Aug 13 09:43:35 2007 +0200
@@ -28,17 +28,17 @@
 /* Make room for enough symbols, so dispnew.c does not fail.  */
 /* XEmacs: cognot@ensg.u-nancy.fr: C_SWITCH_SYSTEM already defined in hpux8.h,
                            -D_BSD makes hp CC choke on process.c
-#define C_SWITCH_SYSTEM -Wp,-H200000 -D_BSD
+#define C_SWITCH_SYSTEM "-Wp,-H200000 -D_BSD"
 */
 #undef C_SWITCH_SYSTEM
-# ifdef __hp9000s300
-#  define C_SWITCH_SYSTEM -Aa -D_HPUX_SOURCE
-# else
-#  define C_SWITCH_SYSTEM -Ae -Wp,-H100000
-# endif
+#ifdef __hp9000s300
+#define C_SWITCH_SYSTEM "-Aa -D_HPUX_SOURCE"
+#else
+#define C_SWITCH_SYSTEM "-Ae -Wp,-H100000"
+#endif
 /* XEmacs: commented out
 #else
-#define C_SWITCH_SYSTEM -D_BSD
+#define C_SWITCH_SYSTEM "-D_BSD"
 */
 #endif
 
@@ -59,8 +59,8 @@
    used -- if X11R4 is used, "s/hpux9-x11r4.h" gets loaded instead.  */
 /* XEmacs change: Change LD_SWITCH_X_DEFAULT to LD_SWITCH_X_SYSTEM.
    #### Why do we need to make this change? */
-#define C_SWITCH_X_SYSTEM -I/usr/include/X11R5 -I/usr/include/Motif1.2
-#define LD_SWITCH_X_SYSTEM -L/usr/lib/X11R5 -L/usr/lib/Motif1.2
+#define C_SWITCH_X_SYSTEM "-I/usr/include/X11R5 -I/usr/include/Motif1.2"
+#define LD_SWITCH_X_SYSTEM "-L/usr/lib/X11R5 -L/usr/lib/Motif1.2"
 
 #ifndef HAVE_LIBXMU
 /* HP-UX doesn't supply Xmu.  */
@@ -78,5 +78,7 @@
 
 /* XEmacs: avoid using -lcurses, to make the binary portable from 9.X to 10.X */
 #undef LIBS_TERMCAP
-#define LIBS_TERMCAP -ltermcap
+#define LIBS_TERMCAP "-ltermcap"
 
+/* mrb */
+#undef LD_SWITCH_SYSTEM
diff -r 4de2936b4e77 -r 0132846995bd src/s/hpux9shxr4.h
--- a/src/s/hpux9shxr4.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/s/hpux9shxr4.h	Mon Aug 13 09:43:35 2007 +0200
@@ -3,8 +3,8 @@
 #include "hpux9-shr.h"
 
 #undef  C_SWITCH_X_SYSTEM
-#define C_SWITCH_X_SYSTEM -I/usr/include/Motif1.1
+#define C_SWITCH_X_SYSTEM "-I/usr/include/Motif1.1"
 
 #undef  LD_SWITCH_X_DEFAULT
-#define LD_SWITCH_X_DEFAULT -L/usr/lib/Motif1.1
+#define LD_SWITCH_X_DEFAULT "-L/usr/lib/Motif1.1"
 
diff -r 4de2936b4e77 -r 0132846995bd src/s/iris3-5.h
--- a/src/s/iris3-5.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/s/iris3-5.h	Mon Aug 13 09:43:35 2007 +0200
@@ -72,8 +72,8 @@
 /* The IRIS defines SIGIO in signal.h, but doesn't implement it. */
 #define BROKEN_SIGIO
 
-#define LIBS_MACHINE -lbsd -ldbm -lPW
-#define C_SWITCH_MACHINE -I/usr/include/bsd
+#define LIBS_MACHINE "-lbsd -ldbm -lPW"
+#define C_SWITCH_MACHINE "-I/usr/include/bsd"
 
 /* On USG systems the system calls are interruptible by signals
  that the user program has elected to catch.  Thus the system call
diff -r 4de2936b4e77 -r 0132846995bd src/s/iris3-6.h
--- a/src/s/iris3-6.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/s/iris3-6.h	Mon Aug 13 09:43:35 2007 +0200
@@ -72,8 +72,8 @@
 /* The IRIS defines SIGIO in signal.h, but doesn't implement it. */
 #define BROKEN_SIGIO
 
-#define LIBS_MACHINE -lbsd -ldbm -lPW
-#define C_SWITCH_MACHINE -I/usr/include/bsd
+#define LIBS_MACHINE "-lbsd -ldbm -lPW"
+#define C_SWITCH_MACHINE "-I/usr/include/bsd"
 
 /* On USG systems the system calls are interruptible by signals
  that the user program has elected to catch.  Thus the system call
diff -r 4de2936b4e77 -r 0132846995bd src/s/irix3-3.h
--- a/src/s/irix3-3.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/s/irix3-3.h	Mon Aug 13 09:43:35 2007 +0200
@@ -100,4 +100,4 @@
 
 /* This was formerly in LIBS_MACHINE in iris4d.h,
    but it is not needed for newer system versions.  */
-#define LIBS_SYSTEM -lsun
+#define LIBS_SYSTEM "-lsun"
diff -r 4de2936b4e77 -r 0132846995bd src/s/irix4-0.h
--- a/src/s/irix4-0.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/s/irix4-0.h	Mon Aug 13 09:43:35 2007 +0200
@@ -13,7 +13,7 @@
 /* use K&R C */
 /* XEmacs change -- use ANSI, not K&R */
 #ifndef __GNUC__
-#define C_SWITCH_SYSTEM -xansi
+#define C_SWITCH_SYSTEM "-xansi"
 #endif
 
 /* SGI has all the fancy wait stuff, but we can't include sys/wait.h
diff -r 4de2936b4e77 -r 0132846995bd src/s/irix5-0.h
--- a/src/s/irix5-0.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/s/irix5-0.h	Mon Aug 13 09:43:35 2007 +0200
@@ -84,7 +84,7 @@
    tell the linker to avoid making one.  SGI's cc does this by
    default, but GCC (at least 2.5.8 and 2.6.0) doesn't. */
 #ifdef __GNUC__
-#define LD_SWITCH_SYSTEM -G 0
+#define LD_SWITCH_SYSTEM "-G 0"
 #endif
 
 /* define MAIL_USE_FLOCK if the mailer uses flock
@@ -97,7 +97,7 @@
 /* use K&R C */
 /* XEmacs change -- use ANSI, not K&R */
 #ifndef __GNUC__
-#define C_SWITCH_SYSTEM -xansi
+#define C_SWITCH_SYSTEM "-xansi"
 #endif
 
 /* jackr@engr.sgi.com says that you can't mix different kinds of
diff -r 4de2936b4e77 -r 0132846995bd src/s/irix5-1.h
--- a/src/s/irix5-1.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/s/irix5-1.h	Mon Aug 13 09:43:35 2007 +0200
@@ -13,7 +13,7 @@
 
 /* XEmacs change */
 #if 0
-#define LD_SWITCH_SYSTEM -elf "-_SYSTYPE_SVR4" -require_dynamic_link _rld_new_interface -no_unresolved -Wx,-G 0 -L. -L./lwlib -g0 -call_shared -transitive_link
+#define LD_SWITCH_SYSTEM "-elf -_SYSTYPE_SVR4 -require_dynamic_link _rld_new_interface -no_unresolved -Wx,-G 0 -L. -L./lwlib -g0 -call_shared -transitive_link"
 #endif
 
 /* By Tor Arntsen <tor@spacetec.no> for XEmacs.
@@ -24,8 +24,8 @@
 # ifdef USE_GCC
 #  undef LINKER
 #  undef LIB_GCC
-#  define LINKER ld
-#  define LIB_GCC `gcc --print`
+#  define LINKER "ld"
+#  define LIB_GCC "`gcc --print`"
 #  endif
 #endif
 
diff -r 4de2936b4e77 -r 0132846995bd src/s/irix6-0.h
--- a/src/s/irix6-0.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/s/irix6-0.h	Mon Aug 13 09:43:35 2007 +0200
@@ -2,20 +2,5 @@
 
 #include "irix5-3.h"
 
-/* Irix 6 tries to do 64 bits, but doesn't do it fully,
-   so inhibit that.  */
-#define IRIX_FORCE_32_BITS
-
-#ifndef __GNUC__
-#define LD_SWITCH_SYSTEM -32
-#endif
-
-/* This macro definition, which we inherited from irix5-0.h,
-   is needed in configure on Irix 5, but gets in the way there
-   on Irix 6.  So get rid of it except in Makefile.in where we need it.  */
-#ifndef THIS_IS_MAKEFILE
-#undef C_SWITCH_SYSTEM
-#endif
-
 /* Irix 6.2 doesn't need -lw */
 #undef NEED_LIBW
diff -r 4de2936b4e77 -r 0132846995bd src/s/isc2-2.h
--- a/src/s/isc2-2.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/s/isc2-2.h	Mon Aug 13 09:43:35 2007 +0200
@@ -49,7 +49,7 @@
 
 /* LIB_STANDARD_1 is used both here and in LIBS_SYSTEM
    (the latter for the sake of configure).  */
-#define LIB_STANDARD LIB_STANDARD_1 -lc
+#define LIB_STANDARD LIB_STANDARD_1  -lc
 
 #define NO_X_DESTROY_DATABASE
 
@@ -66,7 +66,7 @@
    define getc and putc in the absence of _POSIX_SOURCE.  GCC's from 2.4.4
    on do this. */
 #if !defined (__GNUC__) || __GNUC__ < 2
-#  define C_SWITCH_SYSTEM -traditional
+#  define C_SWITCH_SYSTEM "-traditional"
 #endif
 
 /* Some versions of ISC are said to define S_IFLNK even tho
diff -r 4de2936b4e77 -r 0132846995bd src/s/isc3-0.h
--- a/src/s/isc3-0.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/s/isc3-0.h	Mon Aug 13 09:43:35 2007 +0200
@@ -16,7 +16,7 @@
    has no libX11_s, and that linking with libc_s causes sbrk not to work.  */
 #undef LIB_X11_LIB
 #undef LIBX11_SYSTEM
-#define LIBX11_SYSTEM -lpt -lnls -lnsl_s
+#define LIBX11_SYSTEM "-lpt -lnls -lnsl_s"
 
 /* TIOCGWINSZ isn't broken; you just have to know where to find it.  */
 #undef BROKEN_TIOCGWINSZ
@@ -26,7 +26,7 @@
    signal symbols; might as well use _XOPEN_SOURCE.  Defining _SYSV3
    ensures that we don't lose the traditional symbols as a side effect
    from this or __STDC__ being defined.  */
-#define C_SWITCH_SYSTEM -D_XOPEN_SOURCE -D_SYSV3
+#define C_SWITCH_SYSTEM "-D_XOPEN_SOURCE -D_SYSV3"
 
 #ifdef __GNUC__  /* Currently we use -lcposix only with gcc */
 /* This works around a bug in ISC 4.0 and 3.0; it fails
diff -r 4de2936b4e77 -r 0132846995bd src/s/isc4-0.h
--- a/src/s/isc4-0.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/s/isc4-0.h	Mon Aug 13 09:43:35 2007 +0200
@@ -3,7 +3,7 @@
 #include "isc3-0.h"
 
 #undef LIBS_SYSTEM
-#define LIBS_SYSTEM -linet -lcposix
+#define LIBS_SYSTEM "-linet -lcposix"
 
 #define ISC4_0
 
@@ -11,5 +11,5 @@
    He used GCC.  I don't know what is needed with other compilers.  */
 #ifdef __GNUC__
 #undef LIBX11_SYSTEM
-#define LIBX11_SYSTEM -lpt -lnls -lnsl_s -lcposix -lc
+#define LIBX11_SYSTEM "-lpt -lnls -lnsl_s -lcposix -lc"
 #endif
diff -r 4de2936b4e77 -r 0132846995bd src/s/isc4-1.h
--- a/src/s/isc4-1.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/s/isc4-1.h	Mon Aug 13 09:43:35 2007 +0200
@@ -9,19 +9,19 @@
 #define ISC4_1
 
 #undef LIBS_SYSTEM
-#define LIBS_SYSTEM -linet
+#define LIBS_SYSTEM "-linet"
 
 /* uddeborg@carmen.se recommends the rest of this file.  */
 
 /* A special startup file is used when compiling with Posix. */
-#define START_FILES pre-crt0.o /lib/crtp1.o
+#define START_FILES "pre-crt0.o /lib/crtp1.o"
 
 /* -lPW is only needed if not using Gcc. */
 #undef LIB_STANDARD
 #if defined (__GNUC__)
-#  define LIB_STANDARD -lcposix -lc /lib/crtn.o
+#  define LIB_STANDARD "-lcposix -lc /lib/crtn.o"
 #else /* !__GNUC__ */
-#  define LIB_STANDARD -lPW -lcposix -lc /lib/crtn.o
+#  define LIB_STANDARD "-lPW -lcposix -lc /lib/crtn.o"
 #endif /* !__GNUC__ */
 
 /* We have Posix termios. */
diff -r 4de2936b4e77 -r 0132846995bd src/s/linux-static.h
--- a/src/s/linux-static.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/s/linux-static.h	Mon Aug 13 09:43:35 2007 +0200
@@ -1,3 +1,3 @@
 #include "linux.h"
 
-#define LD_SWITCH_SYSTEM -Bstatic
+#define LD_SWITCH_SYSTEM "-Bstatic"
diff -r 4de2936b4e77 -r 0132846995bd src/s/linux.h
--- a/src/s/linux.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/s/linux.h	Mon Aug 13 09:43:35 2007 +0200
@@ -23,12 +23,6 @@
 
 /* This file was put together by Michael K. Johnson and Rik Faith.  */
 
-
-/*
- *	Define symbols to identify the version of Unix this is.
- *	Define all the symbols that apply correctly.
- */
-
 /* #define UNIPLUS */
 /* #define USG5 */
 #define USG
@@ -40,15 +34,7 @@
 
 #define SYSTEM_TYPE "linux"		/* All the best software is free. */
 
-/* Letter to use in finding device name of first pty,
-  if system supports pty's.  'p' means it is /dev/ptyp0  */
-
 #define FIRST_PTY_LETTER 'p'
-
-/*
- *	Define HAVE_PTYS if the system supports pty devices.
- */
-
 #define HAVE_PTYS
 
 /* define MAIL_USE_FLOCK if the mailer uses flock
@@ -88,7 +74,7 @@
 
 /* This is needed for dispnew.c:update_frame */
 
-#ifdef emacs
+#ifndef NOT_C_CODE
 #include <stdio.h>  /* Get the definition of _IO_STDIO_H.  */
 #if defined(_IO_STDIO_H) || defined(_STDIO_USES_IOSTREAM)
 /* new C libio names */
@@ -99,35 +85,18 @@
 #define GNU_LIBRARY_PENDING_OUTPUT_COUNT(FILE) \
   ((FILE)->_pptr - (FILE)->_pbase)
 #endif /* !_IO_STDIO_H */
-#endif /* emacs */
+#endif /* C_CODE */
 
 /* Ask GCC where to find libgcc.a.  */
-#define LIB_GCC `$(CC) $(C_SWITCH_X_SITE) -print-libgcc-file-name`
+#define LIB_GCC "`$(CC) $(C_SWITCH_X_SITE) -print-libgcc-file-name`"
 
 #ifndef __ELF__
 /* Linux has crt0.o in a non-standard place */
-#define START_FILES pre-crt0.o /usr/lib/crt0.o
+#define START_FILES "pre-crt0.o /usr/lib/crt0.o"
 #else
-#define START_FILES pre-crt0.o /usr/lib/crt1.o /usr/lib/crti.o
+#define START_FILES "pre-crt0.o /usr/lib/crt1.o /usr/lib/crti.o"
 #endif
 
-/* Check the version number of Linux--if it is at least 1.1.56,
-   it is safe to use SIGIO.  If we can't find version.h (could happen
-   if the user did a `make distclean' or something similar on the
-   kernel distribution) just assume that SIGIO works, because nearly
-   everybody should be running Linux 1.2 or later by now. */
-#ifndef NOT_C_CODE
-#ifdef emacs
-#ifdef HAVE_LINUX_VERSION_H
-#include <linux/version.h>
-
-#if LINUX_VERSION_CODE < 0x10138
-#define BROKEN_SIGIO
-#endif /* LINUX_VERSION_CODE < 0x10138 */
-#endif /* HAVE_LINUX_VERSION_H */
-#endif /* emacs */
-#endif /* NOT_C_CODE */
-
 /* This is needed for sysdep.c */
 
 #define NO_SIOCTL_H           /* don't have sioctl.h */
@@ -139,13 +108,13 @@
 
 /* Best not to include -lg, unless it is last on the command line */
 #define LIBS_DEBUG
-#define LIBS_TERMCAP -ltermcap -lcurses /* save some space with shared libs*/
+#define LIBS_TERMCAP "-ltermcap -lcurses" /* save some space with shared libs*/
 #ifndef __ELF__
-#define LIB_STANDARD -lc /* avoid -lPW */
+#define LIB_STANDARD "-lc" /* avoid -lPW */
 #else
 #undef LIB_GCC
 #define LIB_GCC
-#define LIB_STANDARD -lgcc -lc -lgcc /usr/lib/crtn.o
+#define LIB_STANDARD "-lgcc -lc -lgcc /usr/lib/crtn.o"
 #endif
 
 /* Don't use -g in test compiles in configure.
@@ -160,21 +129,14 @@
 /* #define SIGNALS_VIA_CHARACTERS */
 
 #ifdef TERM
-#define LIBS_SYSTEM -lclient
-#define C_SWITCH_SYSTEM -D_BSD_SOURCE -I/usr/src/term
+#define LIBS_SYSTEM "-lclient"
+     /* #define C_SWITCH_SYSTEM "-D_BSD_SOURCE -I/usr/src/term" - mrb */
+#define C_SWITCH_SYSTEM "-I/usr/src/term"
 #else
 /* alane@wozzle.linet.org says that -lipc is not a separate library,
    since libc-4.4.1.  So -lipc was deleted.  */
 #define LIBS_SYSTEM
-
-#if 0 /* these options should either be cross-platform or removed - mrb */
-/* XFree86 is built with -DFUNCPROTO=11 -DNARROWPROTO so we better build
-   XEmacs with these switches too so that X functions get called correctly.
-   At least XawScrollbarSetThumb needs this. */ 
-#define C_SWITCH_SYSTEM -DFUNCPROTO=11 -DNARROWPROTO -D_BSD_SOURCE
-#endif
-     /* #define C_SWITCH_SYSTEM -DNARROWPROTO -D_BSD_SOURCE */
-#define _BSD_SOURCE 1
+     /* #define _BSD_SOURCE 1 - mrb */
 #endif
 
 
@@ -185,7 +147,12 @@
 #ifdef __ELF__
 #define UNEXEC "unexelf.o"
 #define UNEXEC_USE_MAP_PRIVATE
-#endif
+/* mrb - Ordinary link is simple and effective */
+#define ORDINARY_LINK
+#undef LIB_STANDARD
+#undef START_FILES
+#undef LIB_GCC
+#endif /* __ELF__ */
 
 #ifdef LINUX_QMAGIC
 
@@ -202,24 +169,6 @@
 
 #endif /* not LINUX_QMAGIC */
 
-#if 0
-/* In 19.23 and 19.24, configure sometimes fails to define these.
-   It has to do with the fact that configure uses CFLAGS when linking
-   while Makefile.in.in (erroneously) fails to do so when linking temacs.  */
-#ifndef HAVE_GETTIMEOFDAY
-#define HAVE_GETTIMEOFDAY
-#endif
-#ifndef HAVE_MKDIR
-#define HAVE_MKDIR
-#endif
-#ifndef HAVE_RMDIR
-#define HAVE_RMDIR
-#endif
-#ifndef HAVE_XSCREENNUMBEROFSCREEN
-#define HAVE_XSCREENNUMBEROFSCREEN
-#endif
-#endif /* 0 */
-
 /* This is to work around mysterious gcc failures in some system versions.
    It is unlikely that Emacs changes will work around this problem;
    therefore, this should remain permanently.  */
@@ -227,22 +176,6 @@
 #define HAVE_XRMSETDATABASE
 #endif
 
-/* XEmacs addition: */
-/* Linux defines these in <values.h>, but they can't be used in #if's
-   Include values.h now so that we don't get complaints if it's included
-   later.  This loses with glibc-2 (libc-6) */
-
-/* # include <features.h> */
-#if 0
-#if !(defined (__GLIBC__) && (__GLIBC__ >= 2))
-
-#include <values.h>
-#undef  SHORTBITS
-#undef  INTBITS
-#undef  LONGBITS
-
-#endif
-#endif
 /* The regex.o routines are a part of the GNU C-library used with Linux.  */
 /* However, sometimes they disagree with the src/regex.h that comes with Emacs,
    and that can make trouble in etags.c because it gets the regex.h from Emacs
@@ -267,19 +200,15 @@
 #define regerror sys_regerror
 #define regfree sys_regfree
 
+#if 0 /* mrb - if autoconf 2 is wrong, we should fix the test */
 /* XEmacs: Damon Lipparelli says that he incorrectly gets this
    defined on his system */
 #undef GETTIMEOFDAY_ONE_ARGUMENT
+#endif /* 0 */
 
 /* Use BSD process groups, but use setpgid() instead of setpgrp() to
    actually set a process group. */
 
-/* Formerly "BSD_PGRPS" */
-
-#if 0 /* XEmacs (ben): I'm not convinced this is necessary and it has
-	 lots of possibility of fuckup. */
-#define SIGIO_REQUIRES_SEPARATE_PROCESS_GROUP
-#endif
 /* XEmacs: removed setpgrp() definition because we use setpgid() when
    it's available, and autodetect it. */
 
@@ -287,11 +216,3 @@
 #if defined __GLIBC__ && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || __GLIBC__ > 2)
 # define GETPGRP_NEEDS_ARG
 #endif
-
-#ifdef __ELF__
-/* mrb - Ordinary link is simple and effective */
-#define ORDINARY_LINK
-#undef LIB_STANDARD
-#undef START_FILES
-#undef LIB_GCC
-#endif /* __ELF__ */
diff -r 4de2936b4e77 -r 0132846995bd src/s/msdos.h
--- a/src/s/msdos.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/s/msdos.h	Mon Aug 13 09:43:35 2007 +0200
@@ -125,7 +125,7 @@
 #endif
 #define chdir sys_chdir
 
-#define LIBS_SYSTEM -lpc  /* isn't required in DJGPP v2.0, either */
+#define LIBS_SYSTEM "-lpc"  /* isn't required in DJGPP v2.0, either */
 
 #endif /* __DJGPP__ < 2 */
 
@@ -147,7 +147,7 @@
 #define ORDINARY_LINK
 
 /* command.com does not understand `...` so we define this.  */
-#define LIB_GCC -Lgcc
+#define LIB_GCC "-Lgcc"
 #define DONT_NEED_ENVIRON
 #define SEPCHAR ';'
 
@@ -218,7 +218,7 @@
 /* We need a little extra space, see ../../lisp/loadup.el */
 #define SYSTEM_PURESIZE_EXTRA 15000
 #define HAVE_X11R5
-#define LIBX11_SYSTEM -lxext -lsys
+#define LIBX11_SYSTEM "-lxext -lsys"
 #else
 /* We need a little extra space, see ../../lisp/loadup.el */
 #define SYSTEM_PURESIZE_EXTRA 85000
diff -r 4de2936b4e77 -r 0132846995bd src/s/netbsd.h
--- a/src/s/netbsd.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/s/netbsd.h	Mon Aug 13 09:43:35 2007 +0200
@@ -36,7 +36,7 @@
 /* -lutil is not needed for NetBSD >0.9.  */
 /* #define LIBS_SYSTEM -lutil */
 /* XEmacs change */
-#define LIBS_TERMCAP -ltermcap
+#define LIBS_TERMCAP "-ltermcap"
 
 #define NEED_ERRNO
 
@@ -49,18 +49,18 @@
 /* but they probably don't, and life's too short - jrg@doc.ic.ac.uk 
    ask for no shared libs if you have 0.9 */
 /* mrb -- ORDINARY_LINK works just fine... */
-#define LD_SWITCH_SYSTEM -e start
-#define START_FILES pre-crt0.o /usr/lib/crt0.o
+#define LD_SWITCH_SYSTEM "-e start"
+#define START_FILES "pre-crt0.o /usr/lib/crt0.o"
 #define RUN_TIME_REMAP
 #else
-#define START_FILES crt0.o
+#define START_FILES "crt0.o"
 
 #endif /* not NO_SHARED_LIBS */
 #endif /* 0 */
 
 #define HAVE_TEXT_START		/* No need to define `start_of_text'.  */
 #define ORDINARY_LINK
-#define UNEXEC unexfreebsd.o    /* ironic, considering history of unexfreebsd */
+#define UNEXEC "unexfreebsd.o"  /* ironic, considering history of unexfreebsd */
 
 #if 0
 /* Try to make this work for both 0.9 and >0.9.  */
diff -r 4de2936b4e77 -r 0132846995bd src/s/newsos5.h
--- a/src/s/newsos5.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/s/newsos5.h	Mon Aug 13 09:43:35 2007 +0200
@@ -31,7 +31,7 @@
 #undef LIB_STANDARD
 
 #undef LIBS_SYSTEM
-#define LIBS_SYSTEM -lsocket -lnsl -lgen
+#define LIBS_SYSTEM "-lsocket -lnsl -lgen"
 
 /* Disable use of "unexelf.c" and shared libraries, because
    "unexelf.c" doesn't work correctly on NEWS-OS.  "unexmips.c" does
@@ -42,6 +42,6 @@
 /* Use `ld' directly rather than ordinary link, because ordinary link
    can't produce a non-ELF executable.  */
 #undef ORDINARY_LINK
-#define LINKER /usr/lib/cmplrs/cc/ld
-#define START_FILES pre-crt0.o /usr/ccs/lib/crt1.o
-#define LIB_STANDARD -lc /usr/ccs/lib/crtn.o /usr/ccs/lib/values-Xt.o
+#define LINKER "/usr/lib/cmplrs/cc/ld"
+#define START_FILES "pre-crt0.o /usr/ccs/lib/crt1.o"
+#define LIB_STANDARD "-lc /usr/ccs/lib/crtn.o /usr/ccs/lib/values-Xt.o"
diff -r 4de2936b4e77 -r 0132846995bd src/s/nextstep.h
--- a/src/s/nextstep.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/s/nextstep.h	Mon Aug 13 09:43:35 2007 +0200
@@ -72,15 +72,15 @@
 /* Link this program just by running cc.  */
 #define ORDINARY_LINK
 
-#define LD_SWITCH_SYSTEM -X -noseglinkedit
+#define LD_SWITCH_SYSTEM "-X -noseglinkedit"
 
 /* Don't use -lc on the NeXT.  */
-#define LIB_STANDARD -lsys_s
-#define LIB_MATH -lm
+#define LIB_STANDARD "-lsys_s"
+#define LIB_MATH "-lm"
 
-#define START_FILES pre-crt0.o
+#define START_FILES "pre-crt0.o"
 
-#define LIB_X11_LIB -L/usr/lib/X11 -lX11
+#define LIB_X11_LIB "-L/usr/lib/X11 -lX11"
 
 /* We don't have a g library either, so override the -lg LIBS_DEBUG switch */
 
@@ -92,7 +92,7 @@
 
 /* Definitions for how to dump.  */
 
-#define UNEXEC unexnext.o
+#define UNEXEC "unexnext.o"
 
 /* start_of_text isn't actually used, so make it compile without error.  */
 #define TEXT_START 0
@@ -123,7 +123,7 @@
 #undef HAVE_TERMIO
 #define NO_TERMIO
 #define TAB3 XTABS
-#define C_OPTIMIZE_SWITCH -pipe
+#define C_OPTIMIZE_SWITCH "-pipe"
 #undef HAVE_SETITIMER
 
 /* XEmacs addition from Axel Seibert */
diff -r 4de2936b4e77 -r 0132846995bd src/s/osf1.h
--- a/src/s/osf1.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/s/osf1.h	Mon Aug 13 09:43:35 2007 +0200
@@ -9,8 +9,8 @@
 /* Define _BSD to tell the include files we're running under
    the BSD universe and not the SYSV universe.  */
 
-#define C_SWITCH_SYSTEM	-D_BSD
-#define LIBS_SYSTEM	-lbsd
+#define C_SWITCH_SYSTEM	"-D_BSD"
+#define LIBS_SYSTEM	"-lbsd"
 
 #define GETPGRP_NO_ARG
 
diff -r 4de2936b4e77 -r 0132846995bd src/s/ptx.h
--- a/src/s/ptx.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/s/ptx.h	Mon Aug 13 09:43:35 2007 +0200
@@ -40,7 +40,7 @@
  
 /* Leave out -lPW since it conflicts with term.o and because we're not sure 
    if the alloca found there by autoconf should be trusted on PTX.  */
-#define LIB_STANDARD -lc
+#define LIB_STANDARD "-lc"
 
 #ifndef HAVE_SOCKETS /* determined by configure */
 #define NO_SUBPROCESSES
@@ -48,16 +48,16 @@
 
 #ifdef HAVE_X_WINDOWS
 
-#define LIBX11_SYSTEM -lsocket -linet -lnsl
+#define LIBX11_SYSTEM "-lsocket -linet -lnsl"
 /* This is also defined so that lib-src/profile can link.  */
-#define LIBS_SYSTEM -lseq
+#define LIBS_SYSTEM "-lseq"
 
 #else /* ! HAVE_X_WINDOWS */
 
 #ifdef HAVE_SOCKETS
-#define LIBS_SYSTEM -lsocket -linet -lnsl -lseq
+#define LIBS_SYSTEM "-lsocket -linet -lnsl -lseq"
 #else
-#define LIBS_SYSTEM -lseq
+#define LIBS_SYSTEM "-lseq"
 #endif
 
 #endif /* ! HAVE_X_WINDOWS */
diff -r 4de2936b4e77 -r 0132846995bd src/s/riscos5.h
--- a/src/s/riscos5.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/s/riscos5.h	Mon Aug 13 09:43:35 2007 +0200
@@ -8,6 +8,6 @@
 /* No declaration in system header files.  */
 extern double atof ();
 
-#define LD_SWITCH_SYSTEM -non_shared
+#define LD_SWITCH_SYSTEM "-non_shared"
 
 #define GETPGRP_NO_ARG
diff -r 4de2936b4e77 -r 0132846995bd src/s/sco4.h
--- a/src/s/sco4.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/s/sco4.h	Mon Aug 13 09:43:35 2007 +0200
@@ -54,16 +54,16 @@
 
 /* Must use 'cc' to link when build with motif toolkit. */
 #ifndef __GNUC__
-#define LINKER cc
+#define LINKER "cc"
 #endif
 
 /* This is safe since we already assumed HAVE_SOCKETS
    if using X windows.  */
 #undef LIBX11_SYSTEM
-#define LIBX11_SYSTEM -lpt -lnls -lnsl_s -lc_s -lsocket
+#define LIBX11_SYSTEM "-lpt -lnls -lnsl_s -lc_s -lsocket"
 
 #ifdef HAVE_SOCKETS
-#define LIBS_SYSTEM -lsocket -lPW
+#define LIBS_SYSTEM "-lsocket -lPW"
 
 /* SCO has gettimeofday in socket library */
 /* Autoconf should determine this, but for now, 
@@ -76,7 +76,7 @@
 
 /* This enables configure to tell that we have alloca.  */
 #ifndef LIBS_SYSTEM
-#define LIBS_SYSTEM -lPW
+#define LIBS_SYSTEM "-lPW"
 #endif
 
 #ifdef HAVE_X11R5
@@ -93,8 +93,8 @@
 #define NEED_PTEM_H
 
 /* We need to link with crt1.o and crtn.o.  */
-#define START_FILES pre-crt0.o /lib/crt1.o
-#define LIB_STANDARD -lc /lib/crtn.o
+#define START_FILES "pre-crt0.o /lib/crt1.o"
+#define LIB_STANDARD "-lc /lib/crtn.o"
 
 /* Send signals to subprocesses by "typing" signal chars at them.  */
 #define SIGNALS_VIA_CHARACTERS
diff -r 4de2936b4e77 -r 0132846995bd src/s/sco5-shr.h
--- a/src/s/sco5-shr.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/s/sco5-shr.h	Mon Aug 13 09:43:35 2007 +0200
@@ -7,15 +7,15 @@
 #undef C_OPTIMIZE_SWITCH
 #undef C_DEBUG_SWITCH
 #undef C_SWITCH_SYSTEM
-#define C_SWITCH_SYSTEM -D_NO_STATIC -D_SCO_ELF
+#define C_SWITCH_SYSTEM "-D_NO_STATIC -D_SCO_ELF"
 
 #ifndef __GNUC__
-#define LINKER cc -dy -Xc
-#define C_OPTIMIZE_SWITCH -O3 -Xc -dy
-#define C_DEBUG_SWITCH -g -Xc -dy
+#define LINKER "cc -dy -Xc"
+#define C_OPTIMIZE_SWITCH "-O3 -Xc -dy"
+#define C_DEBUG_SWITCH "-g -Xc -dy"
 #else
-#define LINKER gcc -melf -Xc
-#define C_OPTIMIZE_SWITCH -O99 -m486 -fomit-frame-pointer -Xc -melf
-#define C_DEBUG_SWITCH -g -Xc -melf
+#define LINKER "gcc -melf -Xc"
+#define C_OPTIMIZE_SWITCH "-O99 -m486 -fomit-frame-pointer -Xc -melf"
+#define C_DEBUG_SWITCH "-g -Xc -melf"
 #endif
 
diff -r 4de2936b4e77 -r 0132846995bd src/s/sco5.h
--- a/src/s/sco5.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/s/sco5.h	Mon Aug 13 09:43:35 2007 +0200
@@ -50,18 +50,18 @@
 #endif
 
 #ifndef __GNUC__
-#define LINKER cc -Xc
+#define LINKER "cc -Xc"
 #else
-#define LINKER gcc
+#define LINKER "gcc"
 #endif
 
 #undef LIBX11_SYSTEM
-#define LIBX11_SYSTEM -lsocket
+#define LIBX11_SYSTEM "-lsocket"
 
 #undef LIB_X11_LIB
-#define LIB_X11_LIB -lX11 -lgen
+#define LIB_X11_LIB "-lX11 -lgen"
 
-#define LIBS_SYSTEM -lsocket -lPW -lgen -lcrypt -lmalloc
+#define LIBS_SYSTEM "-lsocket -lPW -lgen -lcrypt -lmalloc"
 
 #ifndef MAXPATHLEN
 # define MAXPATHLEN PATHSIZE
@@ -79,14 +79,14 @@
 #undef ADDR_CORRECT
 #define ADDR_CORRECT(x) (int)((char *)(x) - (char*)0)
 
-#define C_SWITCH_SYSTEM -D_NO_STATIC
+#define C_SWITCH_SYSTEM "-D_NO_STATIC"
 
 #ifndef __GNUC__
-#define C_OPTIMIZE_SWITCH -O3 -Xc
-#define C_DEBUG_SWITCH -g -Xc
+#define C_OPTIMIZE_SWITCH "-O3 -Xc"
+#define C_DEBUG_SWITCH "-g -Xc"
 #else
-#define C_OPTIMIZE_SWITCH -O99 -m486 -fomit-frame-pointer
-#define C_DEBUG_SWITCH -g
+#define C_OPTIMIZE_SWITCH "-O99 -m486 -fomit-frame-pointer"
+#define C_DEBUG_SWITCH "-g"
 #endif
 
 /* configure can't get this right linking fails unless -lsocket is used.  */
@@ -101,11 +101,11 @@
 #define NEED_PTEM_H
 
 #ifndef __GNUC__
-#define START_FILES pre-crt0.o /usr/ccs/lib/crt1.o /usr/ccs/lib/values-Xc.o
+#define START_FILES "pre-crt0.o /usr/ccs/lib/crt1.o /usr/ccs/lib/values-Xc.o"
 #else
-#define START_FILES pre-crt0.o /usr/ccs/lib/crt1.o
+#define START_FILES "pre-crt0.o /usr/ccs/lib/crt1.o"
 #endif
-#define LIB_STANDARD -lc
+#define LIB_STANDARD "-lc"
 
 /* Send signals to subprocesses by "typing" signal chars at them.  */
 #define SIGNALS_VIA_CHARACTERS
@@ -132,8 +132,8 @@
 #endif
 
 #ifdef _SCO_ELF
-# undef COFF /* coz we're NOT */
-# define UNEXEC  unexelf.o
-# define LIB_GCC -lgcc-elf
+#undef COFF /* coz we're NOT */
+#define UNEXEC "unexelf.o"
+#define LIB_GCC "-lgcc-elf"
 #endif
 
diff -r 4de2936b4e77 -r 0132846995bd src/s/sol2-3-static.h
--- a/src/s/sol2-3-static.h	Mon Aug 13 09:42:28 2007 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,7 +0,0 @@
-/* Synched up with: Not in FSF. */
-
-#include "sol2-3.h"
-
-#define DONT_INCLUDE_SOL2_H
-#include "sol2-static.h"
-
diff -r 4de2936b4e77 -r 0132846995bd src/s/sol2-3.h
--- a/src/s/sol2-3.h	Mon Aug 13 09:42:28 2007 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,6 +0,0 @@
-/* Synched up with: FSF 19.31. */
-
-#include "sol2.h"
-
-/* Solaris 2.3 has a bug in XListFontsWithInfo.  */
-#define BROKEN_XLISTFONTSWITHINFO
diff -r 4de2936b4e77 -r 0132846995bd src/s/sol2-4-static.h
--- a/src/s/sol2-4-static.h	Mon Aug 13 09:42:28 2007 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,7 +0,0 @@
-/* Synched up with: Not in FSF. */
-
-#include "sol2-4.h"
-
-#define DONT_INCLUDE_SOL2_H
-#include "sol2-static.h"
-
diff -r 4de2936b4e77 -r 0132846995bd src/s/sol2-4.h
--- a/src/s/sol2-4.h	Mon Aug 13 09:42:28 2007 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,17 +0,0 @@
-/* Synched up with: FSF 19.31. */
-
-/* Handle Solaris 2.4.  */
-
-#include "sol2-3.h"
-
-/* 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.
-
-   Someone else submitted a simple test program that duplicates this
-   behavior, and says it has something to do with the fact that X11R6
-   links with the threads library. */
-
-#ifdef THIS_IS_X11R6
-#define BROKEN_SIGCHLD
-#endif
diff -r 4de2936b4e77 -r 0132846995bd src/s/sol2-5.h
--- a/src/s/sol2-5.h	Mon Aug 13 09:42:28 2007 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,21 +0,0 @@
-/* Synched up with: FSF 19.31. */
-
-/* Handle Solaris 2.5.  */
-
-#include "sol2-4.h"
-
-#ifndef NOT_C_CODE
-/* Solaris 2.5 is the first Solaris that has getpagesize(), srandom()
-   and random(), but they forgot to add prototypes to the header
-   files. */
-int getpagesize (void);
-long random (void);
-void srandom (unsigned int seed);
-#endif /* C_CODE */
-
-/* 2.5 now has random back in libc but we don't want to use it. */
-#undef HAVE_RANDOM
-
-/* Apparently this is not necessary here, and it causes 10% CPU
-   chewage. */
-#undef BROKEN_SIGCHLD
diff -r 4de2936b4e77 -r 0132846995bd src/s/sol2-6.h
--- a/src/s/sol2-6.h	Mon Aug 13 09:42:28 2007 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,11 +0,0 @@
-/* Synched up with: Not in FSF. */
-
-/* Handle Solaris 2.6.  */
-
-#include "sol2-5.h"
-
-/* 2.6 has dldump, dynodump is not necessary */
-#ifdef UNEXEC
-#undef UNEXEC
-#endif
-#define UNEXEC "unexsol2-6.o"
diff -r 4de2936b4e77 -r 0132846995bd src/s/sol2-static.h
--- a/src/s/sol2-static.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/s/sol2-static.h	Mon Aug 13 09:43:35 2007 +0200
@@ -5,36 +5,20 @@
 #endif
 
 /* Force static linking */
-/* Here is how to find X Windows.  The -R option says where
-   to find X windows at run time.  */
-#undef LD_SWITCH_SYSTEM
-#ifndef __GNUC__
-# ifdef USE_LCC
-#  define LD_SWITCH_SYSTEM "-R /usr/openwin/lib -Bstatic"
-# else 
-#  define LD_SWITCH_SYSTEM "-R/usr/openwin/lib -Bstatic"
-#endif
-#else /* GCC */
-/* jwz: note that we need "-Xlinker -Bstatic" and not just "-static" */
-#define LD_SWITCH_SYSTEM "-Xlinker -R/usr/openwin/lib -Xlinker -Bstatic"
-#endif /* GCC */
+#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
-#ifndef __GNUC__
-# ifdef I18N4
-#  define LIB_STANDARD "-lw -Bdynamic -lc -ldl -Bstatic"
-# else /* !I18N4 */
-#  define LIB_STANDARD "-lw -lc -Bdynamic -ldl -Bstatic"
-# endif /* !I18N4 */
-#else
-# define LIB_STANDARD "-lw -lc -Xlinker -Bdynamic -ldl"
-#endif
+#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
-#ifdef NOT_C_CODE
-# undef LIBS_SYSTEM
-# define LIBS_SYSTEM "-lsocket -lnsl -lintl -lelf -lgen"
-#else
-# define LIBS_SYSTEM "-lsocket -lnsl -lelf -lgen"
-#endif
+#define LIBS_SYSTEM "-lsocket -lnsl -lelf -lgen"
+
+#endif /* NOT_C_CODE */
diff -r 4de2936b4e77 -r 0132846995bd src/s/sol2.h
--- a/src/s/sol2.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/s/sol2.h	Mon Aug 13 09:43:35 2007 +0200
@@ -1,9 +1,32 @@
 /* Synched up with: FSF 19.31. */
 
-#define __EXTENSIONS__
-#include "usg5-4-2.h"		/* XEmacs change from 5-4 to 5-4-2 */
+#define __EXTENSIONS__ 1
+#define SOLARIS2 1
+#define POSIX 1
+#if 1
+#ifndef USG
+#define USG
+#endif
+#ifndef USG5_4
+#define USG5_4
+#endif
+#if 0
+#undef  SYSTEM_TYPE
+#define SYSTEM_TYPE "solaris"
+#endif
+#undef  _POSIX_C_SOURCE
+#if 0
+#define _POSIX_C_SOURCE 199506L
+#endif
+#undef  _XOPEN_SOURCE
+#define _XOPEN_SOURCE 1
+#undef  _XOPEN_SOURCE_EXTENDED
+#define _XOPEN_SOURCE_EXTENDED 1
+#endif
 
-#define SOLARIS2
+#if 1 /* mrb */
+#include "usg5-4-2.h"	/* XEmacs change from 5-4 to 5-4-2 */
+#endif
 
 /* SIGIO seems to be working under Solaris and it makes ^G work better... */
 #undef BROKEN_SIGIO
@@ -13,13 +36,8 @@
 #undef BROKEN_TIOCGETC
 #undef BROKEN_TIOCGWINSZ
 
-/* This triggers a conditional in xfaces.c.  */
-#define XOS_NEEDS_TIME_H
-
-#define POSIX
-
 #ifdef NOT_C_CODE
-
+#define ORDINARY_LINK
 /* XEmacs change -- some Motif packages need -lgen to get regex and regcmp */
 
 #undef LIBS_SYSTEM
@@ -38,19 +56,60 @@
  */
 
 #undef UNEXEC
+#if OS_RELEASE < 56
 #define UNEXEC "unexsol2.o"
+#else
+#define UNEXEC "unexsol2-6.o"
+#endif
 
 #else /* C_CODE */
-/* The standard Solaris library nsl has this function in it which is
-   supposed to only be in the BSD compat stuff.  Yuck.  Of course,
-   there isn't a prototype for it other than in /usr/ucbinclude. */
-int gethostname (char *, size_t);
+
+#if OS_RELEASE <= 53
+/* Solaris 2.3 has a bug in XListFontsWithInfo.  */
+#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.
+
+   Someone else submitted a simple test program that duplicates this
+   behavior, and says it has something to do with the fact that X11R6
+   links with the threads library. */
+
+#ifdef THIS_IS_X11R6
+#define BROKEN_SIGCHLD
+#endif
+
+#if OS_RELEASE == 55
+/* Solaris 2.5 is the first Solaris that has getpagesize(), srandom()
+   and random(), but they forgot to add prototypes to the header
+   files. */
+int getpagesize (void);
+long random (void);
+void srandom (unsigned int seed);
+#endif /* SunOS 5.5 */
+
+#if OS_RELEASE < 55
 /* Another missing prototype, added in Solaris 2.5 */
 extern void *__builtin_alloca(size_t);
+#endif /* before SunOS 5.5 */
 
+#if OS_RELEASE < 56
 /* XEmacs: Solaris include files miss this. */
 struct timeval;
 int utimes (char *file, struct timeval *tvp);
+extern int gethostname(char *, unsigned);
+#endif /* before 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 */
@@ -64,4 +123,5 @@
    least under 2.4 */
 #undef _setjmp
 #define _setjmp setjmp
+
 #endif /* C_CODE */
diff -r 4de2936b4e77 -r 0132846995bd src/s/sunos4-0-shr.h
--- a/src/s/sunos4-0-shr.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/s/sunos4-0-shr.h	Mon Aug 13 09:43:35 2007 +0200
@@ -54,10 +54,6 @@
 /* With X11R5 it was reported that linking -lXmu dynamically
    did not work.  With X11R6, it does work; and since normally
    only the dynamic libraries are available, we should use them.  */
-#ifdef __GNUC__
-#define LIBXMU "-Xlinker -Bstatic -lXmu -Xlinker -Bdynamic"
-#else
 #define LIBXMU "-Bstatic -lXmu -Bdynamic"
-#endif
 
 #endif  /* not HAVE_X11R6 */
diff -r 4de2936b4e77 -r 0132846995bd src/s/sunos4-0.h
--- a/src/s/sunos4-0.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/s/sunos4-0.h	Mon Aug 13 09:43:35 2007 +0200
@@ -29,15 +29,10 @@
 # define START_FILES
 # define LD_CMD $(CC)
 # ifndef LD_SWITCH_SYSTEM
-#  ifdef USE_GCC
-/* of course gcc has to take different args than the rest of the universe */
-#   define LD_SWITCH_SYSTEM "-static"
-#  else
-#   define LD_SWITCH_SYSTEM "-Bstatic"
-#  endif
+# define LD_SWITCH_SYSTEM "-Bstatic"
 # endif
 # define UNEXEC "unexsunos4.o"
-#endif
+#endif /* NOT_C_CODE */
 
 #define RUN_TIME_REMAP
 
diff -r 4de2936b4e77 -r 0132846995bd src/s/sunos4-1-2-shr.h
--- a/src/s/sunos4-1-2-shr.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/s/sunos4-1-2-shr.h	Mon Aug 13 09:43:35 2007 +0200
@@ -3,12 +3,9 @@
 /* For building XEmacs under SunOS 4.1.* with dynamic libraries. */
 
 #ifdef NOT_C_CODE
-# ifdef USE_GCC
-  /* of course gcc has to take different args than the rest of the universe */
-#  define LD_SWITCH_SYSTEM "-dynamic"
-# else
-#  define LD_SWITCH_SYSTEM "-Bdynamic"
-# endif
-#endif
+
+#define LD_SWITCH_SYSTEM "-Bdynamic"
+
+#endif /* NOT_C_CODE */
 
 #include "sunos4-1-2.h"
diff -r 4de2936b4e77 -r 0132846995bd src/s/sunos4-1-3-shr.h
--- a/src/s/sunos4-1-3-shr.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/s/sunos4-1-3-shr.h	Mon Aug 13 09:43:35 2007 +0200
@@ -3,12 +3,9 @@
 /* For building XEmacs under SunOS 4.1.* with dynamic libraries. */
 
 #ifdef NOT_C_CODE
-# ifdef USE_GCC
-  /* of course gcc has to take different args than the rest of the universe */
-#  define LD_SWITCH_SYSTEM "-dynamic"
-# else
-#  define LD_SWITCH_SYSTEM "-Bdynamic"
-# endif
-#endif
+
+#define LD_SWITCH_SYSTEM "-Bdynamic"
+
+#endif /* NOT_C_CODE */
 
 #include "sunos4-1-3.h"
diff -r 4de2936b4e77 -r 0132846995bd src/s/sunos4-1-3.h
--- a/src/s/sunos4-1-3.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/s/sunos4-1-3.h	Mon Aug 13 09:43:35 2007 +0200
@@ -12,7 +12,7 @@
 /* murray@chemical-eng.edinburgh.ac.uk says this works, and avoids
    the problem of spurious ^M in subprocess output.  */
 #undef HAVE_TERMIOS
-#endif
+#endif /* 0 */
 
 #if 0
 /* XEmacs: FSF 19.31 mistakenly reenables this. */
diff -r 4de2936b4e77 -r 0132846995bd src/s/sunos4-1-4-shr.h
--- a/src/s/sunos4-1-4-shr.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/s/sunos4-1-4-shr.h	Mon Aug 13 09:43:35 2007 +0200
@@ -3,12 +3,9 @@
 /* For building XEmacs under SunOS 4.1.* with dynamic libraries. */
 
 #ifdef NOT_C_CODE
-# ifdef USE_GCC
-  /* of course gcc has to take different args than the rest of the universe */
-#  define LD_SWITCH_SYSTEM "-dynamic"
-# else
-#  define LD_SWITCH_SYSTEM "-Bdynamic"
-# endif
-#endif
+
+#define LD_SWITCH_SYSTEM "-Bdynamic"
+
+#endif /* NOT_C_CODE */
 
 #include "sunos4-1-4.h"
diff -r 4de2936b4e77 -r 0132846995bd src/s/sunos4-1-shr.h
--- a/src/s/sunos4-1-shr.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/s/sunos4-1-shr.h	Mon Aug 13 09:43:35 2007 +0200
@@ -3,12 +3,9 @@
 /* For building XEmacs under SunOS 4.1.* with dynamic libraries. */
 
 #ifdef NOT_C_CODE
-# ifdef USE_GCC
-  /* of course gcc has to take different args than the rest of the universe */
-#  define LD_SWITCH_SYSTEM "-dynamic"
-# else
-#  define LD_SWITCH_SYSTEM "-Bdynamic"
-# endif
-#endif
+
+#define LD_SWITCH_SYSTEM "-Bdynamic"
+
+#endif /* NOT_C_CODE */
 
 #include "sunos4-1.h"
diff -r 4de2936b4e77 -r 0132846995bd src/s/sunos4-1.h
--- a/src/s/sunos4-1.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/s/sunos4-1.h	Mon Aug 13 09:43:35 2007 +0200
@@ -46,10 +46,28 @@
 /* Define dlopen, dlclose, dlsym.  */
 #define USE_DL_STUBS
 
-/* SunOS does not define strerror since it is ANSI C, but SunPro C does. */
+#if 0 /* mrb */
 #if !defined(HAVE_STRERROR) && defined(__SUNPRO_C)
 #define HAVE_STRERROR
 #endif
+#endif
 
 /* This appears to be broken on SunOS4.1.[123] */
 #define BROKEN_SIGIO
+
+/* Suppress zillions of warnings from outdated SunOS4 prototypes */
+#ifndef NOT_C_CODE
+#ifdef __SUNPRO_C
+#include <memory.h>
+#include <string.h>
+#define memset(a,b,c) memset((char*) (a), b, c)
+#define memcpy(a,b,c) memcpy((char*) (a), (char*) (b), c)
+#define memcmp(a,b,c) memcmp((char*) (a), (char*) (b), c)
+#define memchr(a,b,c) memchr((char*) (a), b, c)
+void * __builtin_alloca(int);
+#ifdef HAVE_X_WINDOWS
+#include <X11/Xlib.h>
+#define XFree(p) XFree((char*)(p))
+#endif /* X Windows */
+#endif /* __SUNPRO_C */
+#endif /* C code */
diff -r 4de2936b4e77 -r 0132846995bd src/s/umips.h
--- a/src/s/umips.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/s/umips.h	Mon Aug 13 09:43:35 2007 +0200
@@ -7,12 +7,12 @@
 #ifdef BSD
 #include "bsd4-3.h"
 
-#define C_SWITCH_SYSTEM -systype bsd43
-#define LD_SWITCH_SYSTEM -systype bsd43
-#define LIBS_SYSTEM -lmld
+#define C_SWITCH_SYSTEM "-systype bsd43"
+#define LD_SWITCH_SYSTEM "-systype bsd43"
+#define LIBS_SYSTEM "-lmld"
 #define LIBS_DEBUG
-#define START_FILES pre-crt0.o /lib/crt1.o
-#define LIB_STANDARD -lc /usr/lib/crtn.o
+#define START_FILES "pre-crt0.o /lib/crt1.o"
+#define LIB_STANDARD "-lc /usr/lib/crtn.o"
 
 #define COFF
 #define TERMINFO
@@ -23,13 +23,13 @@
 #define DONT_DEFINE_NO_REMAP /* `static' hack not needed */
 #include "usg5-2-2.h"
 
-#define LIBS_SYSTEM -lmld
+#define LIBS_SYSTEM "-lmld"
 #define LIBS_DEBUG
-#define START_FILES pre-crt0.o /usr/lib/crt1.o
-#define LIB_STANDARD -lbsd -lc /usr/lib/crtn.o
+#define START_FILES "pre-crt0.o /usr/lib/crt1.o"
+#define LIB_STANDARD "-lbsd -lc /usr/lib/crtn.o"
 /* #define LIBS_TERMCAP -lcurses */
 
-#define C_SWITCH_SYSTEM -I/usr/include/bsd
+#define C_SWITCH_SYSTEM "-I/usr/include/bsd"
 
 /* Don't try to use SIGIO even though it is defined.  */
 #define BROKEN_SIGIO
diff -r 4de2936b4e77 -r 0132846995bd src/s/unipl5-0.h
--- a/src/s/unipl5-0.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/s/unipl5-0.h	Mon Aug 13 09:43:35 2007 +0200
@@ -99,8 +99,8 @@
 
 /* Special library needed for linking for Uniplus */
 
-#define LIBS_SYSTEM -lnet
+#define LIBS_SYSTEM "-lnet"
 
 /* A system-specific loader switch is needed.  */
 
-#define LD_SWITCH_SYSTEM -N -L/lib/libg /usr/lib/unshared.ld
+#define LD_SWITCH_SYSTEM "-N -L/lib/libg /usr/lib/unshared.ld"
diff -r 4de2936b4e77 -r 0132846995bd src/s/unipl5-2.h
--- a/src/s/unipl5-2.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/s/unipl5-2.h	Mon Aug 13 09:43:35 2007 +0200
@@ -92,8 +92,8 @@
 
 /* Special library needed for linking for Uniplus */
 
-#define LIBS_SYSTEM -lnet
+#define LIBS_SYSTEM "-lnet"
 
 /* A system-specific loader switch is needed.  */
 
-#define LD_SWITCH_SYSTEM -N -L/lib/libg /usr/lib/unshared.ld
+#define LD_SWITCH_SYSTEM "-N -L/lib/libg /usr/lib/unshared.ld"
diff -r 4de2936b4e77 -r 0132846995bd src/s/usg5-3.h
--- a/src/s/usg5-3.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/s/usg5-3.h	Mon Aug 13 09:43:35 2007 +0200
@@ -43,12 +43,12 @@
 
 /* AT&T SVr3 X wants to be linked with shared libraries */
 
-#define LIB_X11_LIB -lX11_s
+#define LIB_X11_LIB "-lX11_s"
 
 /* X needs to talk on the network, so search the network library.  */
 
-#define LIBX10_SYSTEM -lnsl_s
-#define LIBX11_SYSTEM -lpt -lnls -lnsl_s -lc_s
+#define LIBX10_SYSTEM "-lnsl_s"
+#define LIBX11_SYSTEM "-lpt -lnls -lnsl_s -lc_s"
 
 /* Some variants have TIOCGWINSZ, but the structures to go with it
    are not declared.  */
diff -r 4de2936b4e77 -r 0132846995bd src/s/usg5-4-2.h
--- a/src/s/usg5-4-2.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/s/usg5-4-2.h	Mon Aug 13 09:43:35 2007 +0200
@@ -6,14 +6,14 @@
 
 /* Motif needs -lgen.  */
 #undef LIBS_SYSTEM
-#define LIBS_SYSTEM -lsocket -lnsl -lelf -lgen
+#define LIBS_SYSTEM "-lsocket -lnsl -lelf -lgen"
 
 /* Use libw.a along with X11R6 Xt.  */
 #define NEED_LIBW
 
 /* ryanr@ellingtn.ftc.nrcs.usda.gov (Richard Anthony Ryan) says -lXimp
    is needed in UNIX_SV ... 4.2 1.1.2.  */
-#define LIB_MOTIF -lXm -lXimp
+#define LIB_MOTIF "-lXm -lXimp"
 
 #define VFORK_RETURN_TYPE pid_t
 
diff -r 4de2936b4e77 -r 0132846995bd src/s/usg5-4.h
--- a/src/s/usg5-4.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/s/usg5-4.h	Mon Aug 13 09:43:35 2007 +0200
@@ -32,23 +32,23 @@
 
 #define USG5_4
 
-#define LIBS_SYSTEM -lsocket -lnsl -lelf
+#define LIBS_SYSTEM "-lsocket -lnsl -lelf"
 #define ORDINARY_LINK
 
 #if 0
 #ifdef ORDINARY_LINK
-#define LIB_STANDARD -lc /usr/ucblib/libucb.a
+#define LIB_STANDARD "-lc /usr/ucblib/libucb.a"
 #else
-#define START_FILES pre-crt0.o /usr/ccs/lib/crt1.o /usr/ccs/lib/crti.o /usr/ccs/lib/values-Xt.o
-#define LIB_STANDARD -lc /usr/ucblib/libucb.a /usr/ccs/lib/crtn.o
+#define START_FILES "pre-crt0.o /usr/ccs/lib/crt1.o /usr/ccs/lib/crti.o /usr/ccs/lib/values-Xt.o"
+#define LIB_STANDARD "-lc /usr/ucblib/libucb.a /usr/ccs/lib/crtn.o"
 #endif
 #else
 
 #ifdef ORDINARY_LINK
 #define LIB_STANDARD
 #else
-#define START_FILES pre-crt0.o /usr/ccs/lib/crt1.o /usr/ccs/lib/crti.o /usr/ccs/lib/values-Xt.o
-#define LIB_STANDARD -lc /usr/ccs/lib/crtn.o
+#define START_FILES "pre-crt0.o /usr/ccs/lib/crt1.o /usr/ccs/lib/crti.o /usr/ccs/lib/values-Xt.o"
+#define LIB_STANDARD "-lc /usr/ccs/lib/crtn.o"
 #endif
 #endif
 
@@ -64,7 +64,7 @@
 
 #undef COFF
 
-#define UNEXEC unexelf.o
+#define UNEXEC "unexelf.o"
 
 /* Get <sys/ttold.h> to get struct
  * tchars. But get <termio.h> first to make sure ttold.h doesn't
diff -r 4de2936b4e77 -r 0132846995bd src/s/xenix.h
--- a/src/s/xenix.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/s/xenix.h	Mon Aug 13 09:43:35 2007 +0200
@@ -61,7 +61,7 @@
 /* Xenix requires completely different unexec code
    which lives in a separate file.  Specify the file name.  */
 
-#define UNEXEC unexenix.o
+#define UNEXEC "unexenix.o"
 
 /* define MAIL_USE_FLOCK if the mailer uses flock
    to interlock access to /usr/spool/mail/$USER.
@@ -110,7 +110,7 @@
 
 /* Switches for linking temacs.  */
 
-#define LD_SWITCH_SYSTEM -i
+#define LD_SWITCH_SYSTEM "-i"
 
 /* Use terminfo instead of termcap.  */
 
diff -r 4de2936b4e77 -r 0132846995bd src/scrollbar-x.c
--- a/src/scrollbar-x.c	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/scrollbar-x.c	Mon Aug 13 09:43:35 2007 +0200
@@ -189,7 +189,7 @@
   Boolean use_backing_store;
 
   XtVaGetValues (FRAME_X_TEXT_WIDGET (f),
-		 XtNuseBackingStore, &use_backing_store, 0);
+		 XtNuseBackingStore, &use_backing_store, NULL);
 
   if (use_backing_store && sb_widget)
     {
@@ -309,7 +309,7 @@
      done. */
   if (!in_resource_setting)
     XtVaSetValues (FRAME_X_TEXT_WIDGET (f), XtNscrollBarWidth,
-		   XINT (newval), 0);
+		   XINT (newval), NULL);
 
   if (XtIsRealized (FRAME_X_CONTAINER_WIDGET (f)))
     {
@@ -351,7 +351,7 @@
        (which might specify a user preference). */
   if (!in_resource_setting)
     XtVaSetValues (FRAME_X_TEXT_WIDGET (f), XtNscrollBarHeight,
-		   XINT (newval), 0);
+		   XINT (newval), NULL);
 
   if (XtIsRealized (FRAME_X_CONTAINER_WIDGET (f)))
     {
diff -r 4de2936b4e77 -r 0132846995bd src/search.c
--- a/src/search.c	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/search.c	Mon Aug 13 09:43:35 2007 +0200
@@ -584,8 +584,8 @@
 	      
 	      ceil = BI_BUF_CEILING_OF (buf, st);
 	      ceil = min (lim, ceil);
-	      bufptr = memchr (BI_BUF_BYTE_ADDRESS (buf, st), (int) target,
-			       ceil - st);
+	      bufptr = (Bufbyte *) memchr (BI_BUF_BYTE_ADDRESS (buf, st),
+					   (int) target, ceil - st);
 	      if (bufptr)
 		{
 		  count--;
diff -r 4de2936b4e77 -r 0132846995bd src/sysdep.c
--- a/src/sysdep.c	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/sysdep.c	Mon Aug 13 09:43:35 2007 +0200
@@ -226,11 +226,6 @@
 
 #endif /* NO_SUBPROCESSES */
 
-int wait_debugging;   /* Set nonzero to make following function work under dbx
-		         (at least for bsd).  */
-
-/* Wait for subprocess with process id `pid' to terminate and
-   make sure it will get eliminated (not remain forever as a zombie). */
 
 void
 wait_for_termination (int pid)
@@ -238,169 +233,157 @@
   /* #### With the new improved SIGCHLD handling stuff, there is much
      less danger of race conditions and some of the comments below
      don't apply.  This should be updated. */
+
+#if defined (NO_SUBPROCESSES)
   while (1)
     {
-#if !defined (NO_SUBPROCESSES)
-# ifdef VMS
-      int status;
-
-      status = SYS$FORCEX (&pid, 0, 0);
-      return;
-# else /* not VMS */
-      /* Note that, whenever any subprocess terminates (asynch. or synch.),
-	 the SIGCHLD handler will be called and it will call wait().
-	 Thus we cannot just call wait() ourselves, and we can't block
-	 SIGCHLD and then call wait(), because then if an asynch.
-	 process dies while we're waiting for our synch. process,
-	 Emacs will never notice that the asynch. process died.
-
-	 So, the general approach we take is to repeatedly block until
-	 a signal arrives, and then check if our process died
-	 using kill (pid, 0).  (We could also check the value of
-	 `synch_process_alive', since the SIGCHLD handler will reset
-	 that and we know that we're only being called on synchronous
-	 processes, but this approach is safer.  I don't trust
-	 the proper delivery of SIGCHLD.
-
-	 Note also that we cannot use any form of waitpid().
-	 A loop with WNOHANG will chew up CPU time; better to
-	 use sleep().  A loop without WNOWAIT will screw up
-	 the SIGCHLD handler (actually this is not true, if you
-	 duplicate the exit-status-reaping code; see below).
-	 A loop with WNOWAIT will result in a race condition
-	 if the process terminates between the process-status
-	 check and the call to waitpid(). */
-
-      /* Formerly, immediate_quit was set around this function call,
-	 but that could lead to problems if the QUIT happened when
-	 SIGCHLD was blocked -- it would remain blocked.  Yet another
-	 reason why immediate_quit is a bad idea.  In any case, there
-	 is no reason to resort to this because either the SIGIO or
-	 the SIGALRM will stop the block in EMACS_WAIT_FOR_SIGNAL(). */
+      /* No need to be tricky like below; we can just call wait(). */
+      /* #### should figure out how to write a wait_allowing_quit().
+	 Since hardly any systems don't have subprocess support,
+	 however, there doesn't seem to be much point. */
+      if (wait (0) == pid)
+	return;
+    }
+#elif defined (VMS)
+  int status = SYS$FORCEX (&pid, 0, 0);
+  return;
+
+#elif defined (HAVE_WAITPID)
+  /* Note that, whenever any subprocess terminates (asynch. or synch.),
+     the SIGCHLD handler will be called and it will call wait().  Thus
+     we cannot just call wait() ourselves, and we can't block SIGCHLD
+     and then call wait(), because then if an asynch.  process dies
+     while we're waiting for our synch. process, Emacs will never
+     notice that the asynch. process died.
+
+     So, the general approach we take is to repeatedly block until a
+     signal arrives, and then check if our process died using kill
+     (pid, 0).  (We could also check the value of `synch_process_alive',
+     since the SIGCHLD handler will reset that and we know that we're
+     only being called on synchronous processes, but this approach is
+     safer.  I don't trust the proper delivery of SIGCHLD.
+
+     Note also that we cannot use any form of waitpid().  A loop with
+     WNOHANG will chew up CPU time; better to use sleep().  A loop
+     without WNOWAIT will screw up the SIGCHLD handler (actually this
+     is not true, if you duplicate the exit-status-reaping code; see
+     below).  A loop with WNOWAIT will result in a race condition if
+     the process terminates between the process-status check and the
+     call to waitpid(). */
+
+  /* Formerly, immediate_quit was set around this function call, but
+     that could lead to problems if the QUIT happened when SIGCHLD was
+     blocked -- it would remain blocked.  Yet another reason why
+     immediate_quit is a bad idea.  In any case, there is no reason to
+     resort to this because either the SIGIO or the SIGALRM will stop
+     the block in EMACS_WAIT_FOR_SIGNAL(). */
+
+  /* Apparently there are bugs on some systems with the second method
+     used below (the EMACS_BLOCK_SIGNAL method), whereby zombie
+     processes get left around.  It appears in those cases that the
+     SIGCHLD handler is never getting invoked.  It's not clear whether
+     this is an Emacs bug or a kernel bug or both: on HPUX this
+     problem is observed only with XEmacs, but under Solaris 2.4 all
+     sorts of different programs have problems with zombies.  The
+     method we use here does not require a working SIGCHLD (but will
+     not break if it is working), and should be safe. */
+  /*
+     We use waitpid(), contrary to the remarks above.  There is no
+     race condition, because the three situations when sigchld_handler
+     is invoked should be handled OK:
+
+     - handler invoked before waitpid(): In this case, subprocess
+       status will be set by sigchld_handler.  waitpid() here will
+       return -1 with errno set to ECHILD, which is a valid exit
+       condition.
+
+     - handler invoked during waitpid(): as above, except that errno
+       here will be set to EINTR.  This will cause waitpid() to be
+       called again, and this time it will exit with ECHILD.
+
+     - handler invoked after waitpid(): The following code will reap
+       the subprocess. In the handler, wait() will return -1 because
+       there is no child to reap, and the handler will exit without
+       modifying child subprocess status.  */
+  int ret, status;
+
+  /* Because the SIGCHLD handler can potentially reap the synchronous
+     subprocess, we should take care of that.  */
+
+  /* Will stay in the do loop as long as:
+     1. Process is alive
+     2. Ctrl-G is not pressed */
+  do
+    {
       QUIT;
-#  ifdef HAVE_WAITPID
-      /* Apparently there are bugs on some systems with the second
-	 method used below (the EMACS_BLOCK_SIGNAL method), whereby
-	 zombie processes get left around.  It appears in those cases
-	 that the SIGCHLD handler is never getting invoked.  It's
-	 not clear whether this is an Emacs bug or a kernel bug or
-	 both: on HPUX this problem is observed only with XEmacs,
-	 but under Solaris 2.4 all sorts of different programs have
-	 problems with zombies.  The method we use here does not
-	 require a working SIGCHLD (but will not break if it is
-	 working), and should be safe. */
-      /* 
-	 We use waitpid() contrary to the remarks above.  There is 
-	 no race condition, because the three situations when 
-	 sigchld_handler is invoked should be handled OK:
-	 - handler invoked before waitpid(): In this case, subprocess 
-	   status will be set by sigchld_handler.  waitpid() here will 
-	   return -1 with errno set to ECHILD, which is a valid 
-	   exit condition.
-
-	 - handler invoked during waitpid(): as above, except that 
-	   errno here will be set to EINTR.  This will cause waitpid() to 
-	   be called again, and this time it will exit with ECHILD.
-
-	 - handler invoked after waitpid(): The following code will reap 
-	   the subprocess. In the handler, wait()  will return -1 
-	   because there is no child to reap, and the handler will exit
-	   without modifying child subprocess status.
-      */
-      {
-	/* Because the SIGCHLD handler can potentially reap the
-	synchronous subprocess, we should take care of that.  */
-	
-	int ret;
-	int w;
-	/* Will stay in the do loop as long as:
-	   1. Process is alive
-	   2. Ctrl-G is not pressed */
-	do
-	  {
-	    QUIT;
-	    ret = waitpid (pid, &w, 0);
-	    /* waitpid returns 0 if the process is still alive. */
-	  }
-	while (ret == 0 || (ret == -1 && errno == EINTR));
-	
-	/* On exiting the loop, ret will be -1, with errno set to 
-	   ECHILD if the child has already been reaped, eg in the 
-	   signal handler.  */
-
-	if (! (ret == pid || (ret == -1 && errno == ECHILD)))
-	  {
-	    /* We've had some error condition here.  Per POSIX, the
-	       only other possibilities are:
-	       EFAULT (bus error accessing arg 2) or EINVAL (incorrect
-	       arguments), which are both program bugs.
-	     
-	       Since implementations may add their own error
-	       indicators on top, we ignore it by default.
-	       */
-	    
-	    break;
-	  }
-
-	/* Set synch process globals.  This is can also happen 
-	   in sigchld_handler, and that code is duplicated. */
-	if (ret == pid)
-	  { /* Update the global sigchld stats. */
-	    synch_process_alive = 0;
-	    if (WIFEXITED (w))
-	      synch_process_retcode = WEXITSTATUS (w);
-	    else if (WIFSIGNALED (w))
-	      synch_process_death = signal_name (WTERMSIG (w));
-	  }
-	break;
-      }
-#  elif defined (EMACS_BLOCK_SIGNAL) && !defined (BROKEN_WAIT_FOR_SIGNAL) && defined (SIGCHLD)
-      if (!wait_debugging)
+      ret = waitpid (pid, &status, 0);
+      /* waitpid returns 0 if the process is still alive. */
+    }
+  while (ret == 0 || (ret == -1 && errno == EINTR));
+
+  if (ret == pid) /* Success */
+    /* Set synch process globals.  This is can also happen
+       in sigchld_handler, and that code is duplicated. */
+    {
+      synch_process_alive = 0;
+      if (WIFEXITED (status))
+	synch_process_retcode = WEXITSTATUS (status);
+      else if (WIFSIGNALED (status))
+	synch_process_death = signal_name (WTERMSIG (status));
+    }
+  /* On exiting the loop, ret will be -1, with errno set to ECHILD if
+     the child has already been reaped, e.g. in the signal handler.  */
+
+  /* Otherwise, we've had some error condition here.
+     Per POSIX, the only other possibilities are:
+     - EFAULT (bus error accessing arg 2) or
+     - EINVAL (incorrect arguments),
+     which are both program bugs.
+
+     Since implementations may add their own error indicators on top,
+     we ignore it by default.  */
+#elif defined (EMACS_BLOCK_SIGNAL) && !defined (BROKEN_WAIT_FOR_SIGNAL) && defined (SIGCHLD)
+  while (1)
+    {
+      static int wait_debugging = 0; /* Set nonzero to make following
+                           function work under dbx (at least for bsd).  */
+      QUIT;
+      if (wait_debugging)
+	return;
+
+      EMACS_BLOCK_SIGNAL (SIGCHLD);
+      /* Block SIGCHLD from happening during this check,
+	 to avoid race conditions. */
+      if (kill (pid, 0) < 0)
 	{
-	  EMACS_BLOCK_SIGNAL (SIGCHLD);
-	  /* Block SIGCHLD from happening during this check,
-	     to avoid race conditions. */
-	  if (kill (pid, 0) < 0)
-	    {
-	      EMACS_UNBLOCK_SIGNAL (SIGCHLD);
-	      return;
-	    }
-	  else
-	    /* WARNING: Whatever this macro does *must* not allow SIGCHLD
-	       to happen between the time that it's reenabled and when we
-	       begin to block.  Otherwise we may end up blocking for a
-	       signal that has already arrived and isn't coming again.
-	       Can you say "race condition"?
-	       
-	       I assume that the system calls sigpause() or sigsuspend()
-	       to provide this atomicness.  If you're getting hangs in
-	       sigpause()/sigsuspend(), then your OS doesn't
-	       implement this properly (this applies under hpux9,
-	       for example).  Try defining BROKEN_WAIT_FOR_SIGNAL. */
-	    EMACS_WAIT_FOR_SIGNAL (SIGCHLD);
-	  continue;
+	  EMACS_UNBLOCK_SIGNAL (SIGCHLD);
+	  return;
 	}
-#  else /* not HAVE_WAITPID and (not EMACS_BLOCK_SIGNAL or
-	   BROKEN_WAIT_FOR_SIGNAL) */
-      /* This approach is kind of cheesy but is guaranteed(?!) to work
-	 for all systems. */
+      else
+	/* WARNING: Whatever this macro does *must* not allow SIGCHLD
+	   to happen between the time that it's reenabled and when we
+	   begin to block.  Otherwise we may end up blocking for a
+	   signal that has already arrived and isn't coming again.
+	   Can you say "race condition"?
+
+	   I assume that the system calls sigpause() or sigsuspend()
+	   to provide this atomicness.  If you're getting hangs in
+	   sigpause()/sigsuspend(), then your OS doesn't implement
+	   this properly (this applies under hpux9, for example).
+	   Try defining BROKEN_WAIT_FOR_SIGNAL. */
+	EMACS_WAIT_FOR_SIGNAL (SIGCHLD);
+    }
+#else /* not HAVE_WAITPID and (not EMACS_BLOCK_SIGNAL or BROKEN_WAIT_FOR_SIGNAL) */
+  /* This approach is kind of cheesy but is guaranteed(?!) to work
+     for all systems. */
+  while (1)
+    {
+      QUIT;
       if (kill (pid, 0) < 0)
 	return;
       emacs_sleep (1);
-#  endif /* not HAVE_WAITPID and (not EMACS_BLOCK_SIGNAL or
-	   BROKEN_WAIT_FOR_SIGNAL) */
-# endif /* not VMS */
-#else /* NO_SUBPROCESSES */
-      /* No need to be tricky like above; we can just call wait(). */
-      int status;
-      /* #### should figure out how to write a wait_allowing_quit().
-	 Since hardly any systems don't have subprocess support,
-	 however, there doesn't seem to be much point. */
-      status = wait (0);
-      if (status == pid)
-	return;
-#endif /* NO_SUBPROCESSES */
     }
+#endif /* OS features */
 }
 
 
@@ -3299,6 +3282,16 @@
 
 /***** (these are primarily required for USG, it seems) *****/
 
+#ifndef HAVE_GETCWD
+char *
+getcwd (char *pathname, int size)
+{
+  return getwd (pathname);
+}
+#endif /* emulate getcwd */
+
+
+#if 0 /* mrb */
 /*
  *	Warning, this function may not duplicate BSD 4.2 action properly
  *	under error conditions.
@@ -3325,6 +3318,7 @@
   return pathname;
 }
 #endif /* HAVE_GETWD */
+#endif /* 0 - mrb */
 
 /*
  *	Emulate rename using unlink/link.  Note that this is
diff -r 4de2936b4e77 -r 0132846995bd src/sysdep.h
--- a/src/sysdep.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/sysdep.h	Mon Aug 13 09:43:35 2007 +0200
@@ -142,8 +142,8 @@
 /* Get_system_name returns as its value a string for system-name to return. */
 void init_system_name (void);
 
-#ifndef HAVE_GETWD
-char *getwd (char *pathname);
+#ifndef HAVE_GETCWD
+char *getcwd (char *pathname, int size);
 #endif
 
 #ifndef HAVE_RENAME
diff -r 4de2936b4e77 -r 0132846995bd src/systty.h
--- a/src/systty.h	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/systty.h	Mon Aug 13 09:43:35 2007 +0200
@@ -350,6 +350,10 @@
    It would be nice to autodetect this, but there's unfortunately
    no general way. */
 
+/* The above comment is crap, because AC_FUNC_GETPGRP provides just
+   such a way - mrb. */
+
+#if 0 /* mrb */
 /* XEmacs backwards-compatibility */
 #ifdef GETPGRP_NEEDS_ARG
 # undef GETPGRP_NO_ARG
@@ -364,12 +368,13 @@
 #    define GETPGRP_NO_ARG
 #  endif
 #endif
+#endif /* 0 */
 
-#if defined (GETPGRP_NO_ARG)
-#  define EMACS_GETPGRP(x) getpgrp()
+#ifdef GETPGRP_VOID
+#define EMACS_GETPGRP(x) getpgrp()
 #else
-#  define EMACS_GETPGRP(x) getpgrp(x)
-#endif /* !GETPGRP_NO_ARG */
+#define EMACS_GETPGRP(x) getpgrp(x)
+#endif /* GETPGRP_VOID */
 
 /* XEmacs backward-compatibility.  Is 0 always a reasonable argument? */
 #define EMACS_GET_PROCESS_GROUP() EMACS_GETPGRP (0)
diff -r 4de2936b4e77 -r 0132846995bd src/unexelfsgi.c
--- a/src/unexelfsgi.c	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/unexelfsgi.c	Mon Aug 13 09:43:35 2007 +0200
@@ -479,7 +479,12 @@
 	     new_bss_addr - roundup(old_bss_addr,0x1000)
 
      */
-
+  /* Still more mods... Olivier Galibert 19971705
+     - support for .sbss section (automagically changed to data without
+       name change)
+     - support for 64bits ABI (will need a bunch of fixes in the rest
+       of the code before it works
+     */
 
 #include <sys/types.h>
 #include <stdio.h>
@@ -493,6 +498,26 @@
 #include <sym.h> /* for HDRR declaration */
 #include <sys/mman.h>
 
+/* in 64bits mode, use 64bits elf */
+#ifdef _ABI64
+typedef Elf64_Shdr l_Elf_Shdr;
+typedef Elf64_Phdr l_Elf_Phdr;
+typedef Elf64_Ehdr l_Elf_Ehdr;
+typedef Elf64_Addr l_Elf_Addr;
+typedef Elf64_Word l_Elf_Word;
+typedef Elf64_Off  l_Elf_Off;
+typedef Elf64_Sym  l_Elf_Sym;
+#else
+typedef Elf32_Shdr l_Elf_Shdr;
+typedef Elf32_Phdr l_Elf_Phdr;
+typedef Elf32_Ehdr l_Elf_Ehdr;
+typedef Elf32_Addr l_Elf_Addr;
+typedef Elf32_Word l_Elf_Word;
+typedef Elf32_Off  l_Elf_Off;
+typedef Elf32_Sym  l_Elf_Sym;
+#endif
+
+
 #ifndef emacs
 #define fatal(a, b, c) fprintf(stderr, a, b, c), exit(1)
 #else
@@ -504,13 +529,13 @@
  */
 
 #define OLD_SECTION_H(n) \
-     (*(Elf32_Shdr *) ((byte *) old_section_h + old_file_h->e_shentsize * (n)))
+     (*(l_Elf_Shdr *) ((byte *) old_section_h + old_file_h->e_shentsize * (n)))
 #define NEW_SECTION_H(n) \
-     (*(Elf32_Shdr *) ((byte *) new_section_h + new_file_h->e_shentsize * (n)))
+     (*(l_Elf_Shdr *) ((byte *) new_section_h + new_file_h->e_shentsize * (n)))
 #define OLD_PROGRAM_H(n) \
-     (*(Elf32_Phdr *) ((byte *) old_program_h + old_file_h->e_phentsize * (n)))
+     (*(l_Elf_Phdr *) ((byte *) old_program_h + old_file_h->e_phentsize * (n)))
 #define NEW_PROGRAM_H(n) \
-     (*(Elf32_Phdr *) ((byte *) new_program_h + new_file_h->e_phentsize * (n)))
+     (*(l_Elf_Phdr *) ((byte *) new_program_h + new_file_h->e_phentsize * (n)))
 
 #define PATCH_INDEX(n) \
   do { \
@@ -542,8 +567,8 @@
      char *name;
      char *section_names;
      char *file_name;
-     Elf32_Ehdr *old_file_h;
-     Elf32_Shdr *old_section_h;
+     l_Elf_Ehdr *old_file_h;
+     l_Elf_Shdr *old_section_h;
      int noerror;
 {
   int idx;
@@ -591,18 +616,18 @@
 
   /* Pointers to the file, program and section headers for the old and new
      files.  */
-  Elf32_Ehdr *old_file_h, *new_file_h;
-  Elf32_Phdr *old_program_h, *new_program_h;
-  Elf32_Shdr *old_section_h, *new_section_h;
+  l_Elf_Ehdr *old_file_h, *new_file_h;
+  l_Elf_Phdr *old_program_h, *new_program_h;
+  l_Elf_Shdr *old_section_h, *new_section_h;
 
   /* Point to the section name table in the old file.  */
   char *old_section_names;
 
-  Elf32_Addr old_bss_addr, new_bss_addr;
-  Elf32_Word old_bss_size, new_data2_size;
-  Elf32_Off  new_data2_offset;
-  Elf32_Addr new_data2_addr;
-  Elf32_Addr new_offsets_shift;
+  l_Elf_Addr old_bss_addr, new_bss_addr;
+  l_Elf_Word old_bss_size, new_data2_size;
+  l_Elf_Off  new_data2_offset;
+  l_Elf_Addr new_data2_addr;
+  l_Elf_Addr new_offsets_shift;
 
   int n, nn, old_bss_index, old_data_index, new_data2_index;
   int old_mdebug_index;
@@ -630,9 +655,9 @@
 
   /* Get pointers to headers & section names.  */
 
-  old_file_h = (Elf32_Ehdr *) old_base;
-  old_program_h = (Elf32_Phdr *) ((byte *) old_base + old_file_h->e_phoff);
-  old_section_h = (Elf32_Shdr *) ((byte *) old_base + old_file_h->e_shoff);
+  old_file_h = (l_Elf_Ehdr *) old_base;
+  old_program_h = (l_Elf_Phdr *) ((byte *) old_base + old_file_h->e_phoff);
+  old_section_h = (l_Elf_Shdr *) ((byte *) old_base + old_file_h->e_shoff);
   old_section_names
     = (char *) old_base + OLD_SECTION_H (old_file_h->e_shstrndx).sh_offset;
 
@@ -656,7 +681,7 @@
   old_bss_size	    = OLD_SECTION_H (old_bss_index).sh_size;
 #if defined(emacs) || !defined(DEBUG)
   bss_end	    = (unsigned int) sbrk (0);
-  new_bss_addr	    = (Elf32_Addr) bss_end;
+  new_bss_addr	    = (l_Elf_Addr) bss_end;
 #else
   new_bss_addr	    = old_bss_addr + old_bss_size + 0x1234;
 #endif
@@ -702,10 +727,10 @@
   if (new_base == (caddr_t) -1)
     fatal ("Can't mmap (%s): errno %d\n", new_name, errno);
 
-  new_file_h = (Elf32_Ehdr *) new_base;
-  new_program_h = (Elf32_Phdr *) ((byte *) new_base + old_file_h->e_phoff);
+  new_file_h = (l_Elf_Ehdr *) new_base;
+  new_program_h = (l_Elf_Phdr *) ((byte *) new_base + old_file_h->e_phoff);
   new_section_h
-    = (Elf32_Shdr *) ((byte *) new_base + old_file_h->e_shoff
+    = (l_Elf_Shdr *) ((byte *) new_base + old_file_h->e_shoff
 		      + new_offsets_shift);
 
   /* Make our new file, program and section headers as copies of the
@@ -857,17 +882,26 @@
 	  && NEW_SECTION_H (nn).sh_type != SHT_DYNSYM)
 	PATCH_INDEX (NEW_SECTION_H (nn).sh_info);
       
+      /* Fix the type and alignment for the .sbss section */
+      if (!strcmp (old_section_names + NEW_SECTION_H (n).sh_name, ".sbss"))
+	{
+	  NEW_SECTION_H (nn).sh_type = SHT_PROGBITS;
+	  NEW_SECTION_H (nn).sh_offset = round_up (NEW_SECTION_H (nn).sh_offset,
+						   NEW_SECTION_H (nn).sh_addralign);
+	}
+
       /* Now, start to copy the content of sections. */
       if (NEW_SECTION_H (nn).sh_type == SHT_NULL
 	  || NEW_SECTION_H (nn).sh_type == SHT_NOBITS)
 	continue;
       
-      /* Write out the sections. .data and .data1 (and data2, called
+      /* Write out the sections. .data, .data1 nad .sbss (and data2, called
 	 ".data" in the strings table) get copied from the current process
 	 instead of the old file.  */
       if (!strcmp (old_section_names + NEW_SECTION_H (n).sh_name, ".data")
 	  || !strcmp (old_section_names + NEW_SECTION_H (n).sh_name, ".data1")
-	  || !strcmp (old_section_names + NEW_SECTION_H (n).sh_name, ".got"))
+	  || !strcmp (old_section_names + NEW_SECTION_H (n).sh_name, ".got")
+	  || !strcmp (old_section_names + NEW_SECTION_H (n).sh_name, ".sbss"))
 	src = (caddr_t) OLD_SECTION_H (n).sh_addr;
       else
 	src = old_base + OLD_SECTION_H (n).sh_offset;
@@ -932,9 +966,9 @@
       if (NEW_SECTION_H (nn).sh_type == SHT_SYMTAB
 	  || NEW_SECTION_H (nn).sh_type == SHT_DYNSYM)
 	{
-	  Elf32_Shdr *spt = &NEW_SECTION_H (nn);
+	  l_Elf_Shdr *spt = &NEW_SECTION_H (nn);
 	  unsigned int num = spt->sh_size / spt->sh_entsize;
-	  Elf32_Sym * sym = (Elf32_Sym *) (NEW_SECTION_H (nn).sh_offset
+	  l_Elf_Sym * sym = (l_Elf_Sym *) (NEW_SECTION_H (nn).sh_offset
 					   + new_base);
 	  for (; num--; sym++)
 	    {
diff -r 4de2936b4e77 -r 0132846995bd src/xmu.c
--- a/src/xmu.c	Mon Aug 13 09:42:28 2007 +0200
+++ b/src/xmu.c	Mon Aug 13 09:43:35 2007 +0200
@@ -31,7 +31,9 @@
  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 #include <X11/cursorfont.h>
+#if 0 /* mrb */
 #include <X11/Xos.h>
+#endif
 #include <X11/Xlib.h>
 #include <X11/Xutil.h>
 #include <X11/Intrinsic.h>
diff -r 4de2936b4e77 -r 0132846995bd version.sh
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/version.sh	Mon Aug 13 09:43:35 2007 +0200
@@ -0,0 +1,5 @@
+#!/bin/sh
+emacs_major_version=20
+emacs_minor_version=3
+emacs_beta_version=8
+xemacs_codename="Copenhagen"