changeset 203:850242ba4a81 r20-3b28

Import from CVS: tag r20-3b28
author cvs
date Mon, 13 Aug 2007 10:02:21 +0200
parents 61eefc8fc970
children a15e4b3d59c6
files CHANGES-beta ChangeLog Makefile.in PROBLEMS configure configure.in etc/BETA etc/MH-E-NEWS etc/NEWS etc/ajc.xpm.Z etc/ajcm.xpm.Z etc/pez.xpm.Z etc/pezm.xpm.Z etc/rickc.xpm.Z etc/rickcm.xpm.Z info/dir lib-src/ChangeLog lib-src/Makefile.in.in lib-src/add-big-package.sh lib-src/add-little-package.sh lib-src/config.values.in lisp/ChangeLog lisp/cc-mode/cc-align.el lisp/cc-mode/cc-cmds.el lisp/cc-mode/cc-compat.el lisp/cc-mode/cc-defs.el lisp/cc-mode/cc-engine.el lisp/cc-mode/cc-langs.el lisp/cc-mode/cc-menus.el lisp/cc-mode/cc-mode.el lisp/cc-mode/cc-styles.el lisp/cc-mode/cc-vars.el lisp/cc-mode/custom-load.el lisp/custom/cus-dep.el lisp/custom/custom-load.el lisp/custom/wid-edit.el lisp/efs/auto-autoloads.el lisp/efs/custom-load.el lisp/efs/dired.el lisp/mh-e/auto-autoloads.el lisp/mh-e/custom-load.el lisp/mh-e/mh-comp.el lisp/mh-e/mh-e.el lisp/mh-e/mh-funcs.el lisp/mh-e/mh-mime.el lisp/mh-e/mh-pick.el lisp/mh-e/mh-seq.el lisp/mh-e/mh-utils.el lisp/modes/auto-autoloads.el lisp/modes/cperl-mode.el lisp/modes/custom-load.el lisp/modes/lazy-shot.el lisp/modes/lisp-mode.el lisp/modes/perl-mode.el lisp/mule/custom-load.el lisp/mule/mule-cmds.el lisp/packages/bookmark.el lisp/packages/custom-load.el lisp/packages/etags.el lisp/packages/info.el lisp/packages/iswitchb.el lisp/pcl-cvs/ChangeLog lisp/pcl-cvs/pcl-cvs.el lisp/prim/about.el lisp/prim/auto-autoloads.el lisp/prim/custom-load.el lisp/prim/find-func.el lisp/prim/format.el lisp/prim/help.el lisp/prim/keymap.el lisp/prim/lisp-file-db.el lisp/prim/package-admin.el lisp/prim/packages.el lisp/prim/profile.el lisp/prim/startup.el lisp/psgml/ChangeLog lisp/psgml/custom-load.el lisp/psgml/psgml-html.el lisp/psgml/psgml.el lisp/rmail/auto-autoloads.el lisp/rmail/rmail-kill.el lisp/rmail/rmail-xemacs.el lisp/rmail/rmail.el lisp/rmail/rmailedit.el lisp/rmail/rmailkwd.el lisp/rmail/rmailmsc.el lisp/rmail/rmailout.el lisp/rmail/rmailsort.el lisp/rmail/rmailsum.el lisp/rmail/undigest.el lisp/rmail/unrmail.el lisp/site-load.el lisp/utils/auto-autoloads.el lisp/utils/custom-load.el lisp/utils/delbs.el lisp/utils/docref.el lisp/utils/font.el lisp/utils/highlight-headers.el lisp/utils/mail-utils.el lisp/utils/speedbar.el lisp/utils/thing.el lisp/utils/xemacs-build-report.el lisp/x11/custom-load.el lisp/x11/x-menubar.el man/ChangeLog man/Makefile man/cc-mode.texi man/lispref/databases.texi man/lispref/objects.texi man/mh-e.texi man/rmail.texi man/xemacs-faq.texi packages/README packages/etc/.precious packages/info/localdir packages/lisp/.precious site-lisp/.precious src/ChangeLog src/Makefile.in.in src/alloca.c src/balloon_help.c src/balloon_help.h src/buffer.c src/callproc.c src/chartab.c src/cmds.c src/database.c src/dgif_lib.c src/doprnt.c src/editfns.c src/eval.c src/events.c src/extents.c src/getloadavg.c src/gif_lib.h src/gifalloc.c src/input-method-xlib.c src/insdel.c src/keymap.c src/linuxplay.c src/m/att3b.h src/m/pfa50.h src/msdos.c src/nt.c src/paths.h.in src/realpath.c src/regex.c src/search.c src/strcat.c src/strcmp.c src/strcpy.c src/sunOS-fix.c src/sysdep.c src/systty.h src/unexalpha.c src/unexfreebsd.c src/unexhp9k3.c src/unexsol2.c src/window.c src/xmu.c src/xmu.h tests/reproduce-bugs.el version.sh
diffstat 161 files changed, 3294 insertions(+), 16917 deletions(-) [+]
line wrap: on
line diff
--- a/CHANGES-beta	Mon Aug 13 10:01:24 2007 +0200
+++ b/CHANGES-beta	Mon Aug 13 10:02:21 2007 +0200
@@ -1,4 +1,25 @@
 							-*- indented-text -*-
+to 20.3 beta28 "Reykjavik"
+-- about.el additions and updates
+-- See etc/BETA for initial package documentation
+-- Miscellaneous patches from Martin Buchholz, Kyle Jones and Hrvoje Niksic
+-- info changes from Karl Hegbloom (see etc/NEWS for details)
+-- delbs.el is now a single file package
+-- New package adding utility scripts added to lib-src
+-- docref.el is now a single file package
+-- cc-mode-5.19 Courtesy of Barry Warsaw
+-- standardize on const as CONST, register as REGISTER
+-- mh-e is now an XEmacs package
+-- Rmail is now an XEmacs package
+-- Miscellaneous bug fixes
+
+to 20.3 beta27 "Skopje"
+-- register declarations nuked by default
+-- Miscellaneous patches from Martin Buchholz, Karl Hegbloom and Hrvoje Niksic
+-- VC is now an XEmacs package
+-- W3 is now an XEmacs package
+-- Miscellaneous bug fixes
+
 to 20.3 beta26 "Riga"
 -- register declarations nuked by default
 -- Miscellaneous patches from Martin Buchholz, Karl Hegbloom and Hrvoje Niksic
--- a/ChangeLog	Mon Aug 13 10:01:24 2007 +0200
+++ b/ChangeLog	Mon Aug 13 10:02:21 2007 +0200
@@ -1,3 +1,71 @@
+1997-10-11  SL Baur  <steve@altair.xemacs.org>
+
+	* Makefile.in (src/paths.h): Update PATH_INFOPATH
+	(infopath): New shell variable.
+	(infopath_user_defined): Ditto.
+
+	* configure.in (infodir_user_defined): Spelling fixes.
+
+1997-10-10  Karl M. Hegbloom  <karlheg@inetarena.com>
+
+	* configure.in: added options and option help docs for infopath
+ 	and lockdir
+	* '' added a line to the report for infopath and lockdir
+
+	* NEWS: Draft entry for the info changes.
+
+1997-10-10  Karl M. Hegbloom  <karlheg@inetarena.com>
+
+	* Makefile.in.in (INFOPATH): Added variable and put it into
+ 	DUMPENV.
+
+1997-10-11  SL Baur  <steve@altair.xemacs.org>
+
+	* packages/info/localdir: New directory and file.
+
+	* packages/README: New directory & file.
+
+1997-10-10  Martin Buchholz  <mrb@eng.sun.com>
+
+	* Makefile.in: Add `make configure' target
+
+	* etc/BETA: 
+	  - remove Chuck as contact name
+	  - random small improvements
+	  - remove I/me references - the message should be that XEmacs
+	    maintenance is an inclusive community effort.
+
+1997-10-10  SL Baur  <steve@altair.xemacs.org>
+
+	* etc/BETA (Prerequisite): Add further documentation for
+	package installation.
+
+1997-10-07  SL Baur  <steve@altair.xemacs.org>
+
+	* XEmacs 19.16-pre7 is released.
+
+1997-10-05  Damon Lipparelli  <lipp@aa.net>
+
+	* Makefile.in (install-arch-dep, install-arch-indep): Move the
+	commands for symlink'ing the system-independent bits into the
+	system-dependent directory structure from "install-arch-indep" to
+	"install-arch-dep".
+
+1997-10-06  Jens-Ulrik Holger Petersen  <petersen@kurims.kyoto-u.ac.jp>
+
+	* Makefile.in (blddir): variable from "configure".
+	(finder): use it.
+
+1997-10-05  SL Baur  <steve@altair.xemacs.org>
+
+	* Makefile.in (GENERATED_LISP): New variable.
+	(all): Force dependency on finder-inf.el.
+	(lisp/utils/finder-inf.el): new rule.
+
+1997-10-04  SL Baur  <steve@altair.xemacs.org>
+
+	* XEmacs 19.16-pre6 is released.
+
 1997-10-04  SL Baur  <steve@altair.xemacs.org>
 
 	* XEmacs 20.3-beta27 is released.
--- a/Makefile.in	Mon Aug 13 10:01:24 2007 +0200
+++ b/Makefile.in	Mon Aug 13 10:02:21 2007 +0200
@@ -92,6 +92,7 @@
 ## ${lispdir} and ${etcdir} are subdirectories of this.
 datadir=@datadir@
 
+## Where to find XEmacs packages.
 pkgdir=@pkgdir@
 
 ## Where to install and expect the files that XEmacs modifies as it runs.
@@ -109,7 +110,7 @@
 mandir=@mandir@
 manext=.1
 
-## Where to install and expect the info files describing XEmacs.	In the
+## 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.
@@ -119,12 +120,20 @@
 ## configuration time.
 infodir_user_defined=@infodir_user_defined@
 
+## Document me.
+## See callproc.c for code which references this.
+infopath=@infopath@
+infopath_user_defined=@infopath_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.
 srcdir=@srcdir@
 
+## Where the build is done.
+blddir=@blddir@
+
 ## ==================== XEmacs-specific directories ====================
 
 ## These variables hold the values XEmacs will actually use.  They are
@@ -219,8 +228,9 @@
 COPYDIR = ${srcdir}/etc ${srcdir}/lisp
 COPYDESTS = ${etcdir} ${lispdir}
 GENERATED_HEADERS = src/paths.h src/Emacs.ad.h src/puresize-adjust.h src/config.h lwlib/config.h
+GENERATED_LISP = lisp/utils/finder-inf.el
 
-all:	${GENERATED_HEADERS} ${MAKE_SUBDIR}
+all:	${GENERATED_HEADERS} ${MAKE_SUBDIR} ${GENERATED_LISP}
 
 ## For performance and consistency, no built-in rules
 .SUFFIXES:
@@ -236,6 +246,12 @@
 ## was turnkey.
 dist: all-elc info
 
+## Convenience target for XEmacs maintainers
+## Updates configure from configure.in and updates config.values.in
+configure: configure.in
+	autoconf
+	/bin/sh lib-src/config.values.sh
+
 ## Build XEmacs and recompile out-of-date and missing .elc files along
 ## the way.
 all-elc all-elcs: lib-src lwlib dump-elcs src
@@ -253,7 +269,12 @@
 
 finder: src
 	@(cd lisp/utils; \
-		../../src/xemacs -batch -q -no-site-file \
+		${blddir}/src/xemacs -batch -q -no-site-file \
+		-l finder -f finder-compile-keywords )
+
+lisp/utils/finder-inf.el: FRC.lisp.utils.finder-inf.el
+	@(cd lisp/utils; \
+		${blddir}/src/xemacs -batch -q -no-site-file \
 		-l finder -f finder-compile-keywords )
 
 ## We force the rebuilding of src/paths.h because the user might give
@@ -287,6 +308,10 @@
 	 if test "${infodir_user_defined}" = "yes"; \
 	   then echo    '#define PATH_INFO "${infodir}"'; \
 	   else echo '/* #define PATH_INFO "${infodir}" */'; \
+	fi; \
+	 if test "${infopath_user_defined}" = "yes"; \
+	   then echo    '#define PATH_INFOPATH "${infopath}"'; \
+	   else echo '/* #define PATH_INFOPATH "${infopath}" */'; \
 	fi; ) >> src/paths.h.tmp; \
 	sh ${srcdir}/move-if-change src/paths.h.tmp src/paths.h
 
@@ -314,6 +339,7 @@
 lwlib:	FRC.lwlib
 dynodump: FRC.dynodump
 FRC.src FRC.lib-src FRC.lwlib FRC.dynodump pkg-src/FRC.tree-x:
+FRC.lisp.utils.finder-inf.el:
 
 .RECURSIVE: ${SUBDIR}
 
@@ -388,6 +414,19 @@
 	${INSTALL_PROGRAM} src/xemacs ${bindir}/xemacs-${version}
 	-chmod 0755 ${bindir}/xemacs-${version}
 	cd ${bindir} && $(RM) ./xemacs && ${LN_S} xemacs-${version} ./xemacs
+	if test "${prefix}" != "${exec_prefix}"; then \
+           test ! -d ${exec_prefix}/lib/xemacs && \
+                $(LN_S) ${prefix}/lib/xemacs ${exec_prefix}/lib/xemacs; \
+           test ! -d ${exec_prefix}/lib/xemacs-${version}/etc && \
+                $(LN_S) ${prefix}/lib/xemacs-${version}/etc \
+                        ${exec_prefix}/lib/xemacs-${version}/etc; \
+           test ! -d ${exec_prefix}/lib/xemacs-${version}/info && \
+                $(LN_S) ${prefix}/lib/xemacs-${version}/info \
+                        ${exec_prefix}/lib/xemacs-${version}/info; \
+           test ! -d ${exec_prefix}/lib/xemacs-${version}/lisp && \
+                $(LN_S) ${prefix}/lib/xemacs-${version}/lisp \
+                        ${exec_prefix}/lib/xemacs-${version}/lisp; \
+	fi
 
 install-arch-indep: mkdir
 	-@set ${COPYDESTS} ; \
@@ -427,19 +466,6 @@
 	    ${INSTALL_DATA} ${srcdir}/etc/$${page}.1 ${mandir}/$${page}${manext} ; \
 	    chmod 0644 ${mandir}/$${page}${manext} ; \
 	  done
-	if test "${prefix}" != "${exec_prefix}"; then \
-           test ! -d ${exec_prefix}/lib/xemacs && \
-                $(LN_S) ${prefix}/lib/xemacs ${exec_prefix}/lib/xemacs; \
-           test ! -d ${exec_prefix}/lib/xemacs-${version}/etc && \
-                $(LN_S) ${prefix}/lib/xemacs-${version}/etc \
-                        ${exec_prefix}/lib/xemacs-${version}/etc; \
-           test ! -d ${exec_prefix}/lib/xemacs-${version}/info && \
-                $(LN_S) ${prefix}/lib/xemacs-${version}/info \
-                        ${exec_prefix}/lib/xemacs-${version}/info; \
-           test ! -d ${exec_prefix}/lib/xemacs-${version}/lisp && \
-                $(LN_S) ${prefix}/lib/xemacs-${version}/lisp \
-                        ${exec_prefix}/lib/xemacs-${version}/lisp; \
-	fi
 	@echo "If you would like to save approximately 15M of disk space, do"
 	@echo "make gzip-el"
 	@echo "or you may run "
--- a/PROBLEMS	Mon Aug 13 10:01:24 2007 +0200
+++ b/PROBLEMS	Mon Aug 13 10:02:21 2007 +0200
@@ -448,6 +448,14 @@
 mode of the installed copy; changing the group and mode of the build
 directory copy is ineffective.
 
+** XEmacs crashes on Digital Unix when dealing with large compilation
+buffers.
+
+This is a known problem with the regexp code, that uses alloca
+extensively, and overflows the stack in case of complex regexp
+matches.  As a workaround, you can recompile with REGEX_MALLOC
+defined.
+
 ** On Solaris, C-x doesn't get through to Emacs when you use the console.
 
 This is a Solaris feature (at least on Intel x86 cpus).  Type C-r
--- a/configure	Mon Aug 13 10:01:24 2007 +0200
+++ b/configure	Mon Aug 13 10:02:21 2007 +0200
@@ -220,6 +220,8 @@
 mandir='${prefix}/man/man1'
 infodir='${prefix}/lib/xemacs-${version}/info'
 infodir_user_defined='no'
+infopath='/usr/info:/usr/local/info:/usr/lib/texmf/doc/info:/usr/local/lib/texmf/doc/info'
+infopath_user_defined='no'
 lispdir='${datadir}/xemacs-${version}/lisp'
 lispdir_user_defined='no'
 sitelispdir='${datadir}/xemacs/site-lisp'
@@ -377,6 +379,20 @@
 			are \`lockf', \`flock', and \`file'.
 --package-path=PATH     Directories to search for packages to dump with xemacs.
                         Defaults to \`$prefix/lib/xemacs/packages:~/.xemacs'.
+--infodir=dir		Directory to install the XEmacs Info manuals and dir in.
+    Defaults to: \`$info_dir'.
+--infopath=PATH		Directories to search for Info documents, info dir
+			and localdir files.  This is used to initialize
+			\`Info-default-directory-list' at dump time.
+			Directories on this path that do not exist in the
+			filesystem will be dropped by the startup code at
+			runtime, so it is safe to specify directories that do
+			not exist in the compilation environment, or that won't
+			exist in the runtime environment. The \"dir\"
+			file in the first existing directory in this list will
+			become the (dir)Top node of the Info tree.
+    Defaults to the value of \`INFOPATH', or:
+    \`$infopath'.
 
 Internationalization options:
 
@@ -434,6 +450,9 @@
   			is system-dependent).
 --with-clash-detection	Use lock files to detect multiple edits of the same file.
 			The default is to not do clash detection.
+--lockdir=dir		The directory to put clash detection files in, such as
+			\`/var/lock/emacs'.
+    Defaults to \`$lockdir'.
 --with-system-malloc	Force use of the system malloc, rather than GNU malloc.
 --with-debug-malloc	Use the debugging malloc package.
 
@@ -454,6 +473,8 @@
 LDFLAGS   Additional linker flags (such as -L/foo)
 LIBS      Additional libraries (such as -lfoo)
 
+INFOPATH  Path to search for Info documentation.
+
 For more details on the install process, consult the INSTALL file.
 "
 
@@ -725,8 +746,8 @@
 
 				
 		prefix | exec_prefix | bindir | datadir | statedir | libdir | \
-	mandir | infodir | lispdir | etcdir | lockdir | pkgdir | archlibdir | \
-	sitelispdir | docdir )
+	mandir | infodir | infopath | lispdir | etcdir | lockdir | pkgdir | \
+	 archlibdir | sitelispdir | docdir )
 	   	   if test "$valomitted" = "yes"; then
 	     if test "$#" = 0; then
 		 (echo "$progname: Usage error:"
@@ -741,6 +762,7 @@
              lispdir ) lispdir_user_defined=yes ;;
              etcdir  )  etcdir_user_defined=yes ;;
              infodir ) infodir_user_defined=yes ;;
+             infopath ) infopath_user_defined=yes ;;
              datadir ) lispdir_user_defined=yes etcdir_user_defined=yes ;;
              statedir | lockdir ) lockdir_user_defined=yes ;;
              exec_prefix | libdir | archlibdir ) archlibdir_user_defined=yes ;;
@@ -779,6 +801,10 @@
 done
 
 
+if test "$infopath_user_defined" = "no" -a -n "$INFOPATH" ; then
+  infopath="$INFOPATH"
+fi
+
 eval set x "$quoted_arguments"; shift
 
 if test "$with_energize" = "yes" ; then
@@ -848,7 +874,7 @@
 esac
 
 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
-echo "configure:852: checking whether ln -s works" >&5
+echo "configure:878: checking whether ln -s works" >&5
 
 rm -f conftestdata
 if ln -s X conftestdata 2>/dev/null
@@ -1025,7 +1051,7 @@
 
 
 echo "checking "the configuration name"" 1>&6
-echo "configure:1029: checking "the configuration name"" >&5
+echo "configure:1055: checking "the configuration name"" >&5
 internal_configuration=`echo $configuration | sed 's/-\(energize\|workshop\)//'`
 if canonical=`$srcdir/config.sub "$internal_configuration"` ; then : ; else
   exit $?
@@ -1479,7 +1505,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:1483: checking for $ac_word" >&5
+echo "configure:1509: checking for $ac_word" >&5
 
 if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -1505,7 +1531,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:1509: checking for $ac_word" >&5
+echo "configure:1535: checking for $ac_word" >&5
 
 if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -1550,7 +1576,7 @@
 fi
 
 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:1554: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:1580: 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'
@@ -1562,11 +1588,11 @@
 cross_compiling=no
 
 cat > conftest.$ac_ext <<EOF
-#line 1566 "configure"
+#line 1592 "configure"
 #include "confdefs.h"
 main(){return(0);}
 EOF
-if { (eval echo configure:1570: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:1596: \"$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
@@ -1586,19 +1612,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:1590: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:1616: 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:1595: checking whether we are using GNU C" >&5
+echo "configure:1621: 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:1602: \"$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:1628: \"$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
@@ -1612,7 +1638,7 @@
   ac_save_CFLAGS="$CFLAGS"
   CFLAGS=
   echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:1616: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:1642: checking whether ${CC-cc} accepts -g" >&5
 
 echo 'void f(){}' > conftest.c
 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
@@ -1641,7 +1667,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:1645: checking for $ac_word" >&5
+echo "configure:1671: checking for $ac_word" >&5
 
 if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -1667,7 +1693,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:1671: checking for $ac_word" >&5
+echo "configure:1697: checking for $ac_word" >&5
 
 if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -1712,7 +1738,7 @@
 fi
 
 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:1716: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:1742: 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'
@@ -1724,11 +1750,11 @@
 cross_compiling=no
 
 cat > conftest.$ac_ext <<EOF
-#line 1728 "configure"
+#line 1754 "configure"
 #include "confdefs.h"
 main(){return(0);}
 EOF
-if { (eval echo configure:1732: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:1758: \"$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
@@ -1748,19 +1774,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:1752: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:1778: 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:1757: checking whether we are using GNU C" >&5
+echo "configure:1783: 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:1764: \"$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:1790: \"$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
@@ -1774,7 +1800,7 @@
   ac_save_CFLAGS="$CFLAGS"
   CFLAGS=
   echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:1778: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:1804: checking whether ${CC-cc} accepts -g" >&5
 
 echo 'void f(){}' > conftest.c
 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
@@ -1803,7 +1829,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:1807: checking for $ac_word" >&5
+echo "configure:1833: checking for $ac_word" >&5
 
 if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -1829,7 +1855,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:1833: checking for $ac_word" >&5
+echo "configure:1859: checking for $ac_word" >&5
 
 if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -1874,7 +1900,7 @@
 fi
 
 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:1878: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:1904: 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'
@@ -1886,11 +1912,11 @@
 cross_compiling=no
 
 cat > conftest.$ac_ext <<EOF
-#line 1890 "configure"
+#line 1916 "configure"
 #include "confdefs.h"
 main(){return(0);}
 EOF
-if { (eval echo configure:1894: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:1920: \"$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
@@ -1910,19 +1936,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:1914: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:1940: 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:1919: checking whether we are using GNU C" >&5
+echo "configure:1945: 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:1926: \"$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:1952: \"$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
@@ -1936,7 +1962,7 @@
   ac_save_CFLAGS="$CFLAGS"
   CFLAGS=
   echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:1940: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:1966: checking whether ${CC-cc} accepts -g" >&5
 
 echo 'void f(){}' > conftest.c
 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
@@ -1969,7 +1995,7 @@
 test -n "$NON_GNU_CPP" -a "$GCC" != "yes" -a -z "$CPP" && CPP="$NON_GNU_CPP"
 
 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:1973: checking how to run the C preprocessor" >&5
+echo "configure:1999: checking how to run the C preprocessor" >&5
 # On Suns, sometimes $CPP names a directory.
 if test -n "$CPP" && test -d "$CPP"; then
   CPP=
@@ -1982,13 +2008,13 @@
   # On the NeXT, cc -E runs the code through the compiler's parser,
   # not just through cpp.
   cat > conftest.$ac_ext <<EOF
-#line 1986 "configure"
+#line 2012 "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:1992: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2018: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   :
@@ -1999,13 +2025,13 @@
   rm -rf conftest*
   CPP="${CC-cc} -E -traditional-cpp"
   cat > conftest.$ac_ext <<EOF
-#line 2003 "configure"
+#line 2029 "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:2009: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2035: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   :
@@ -2028,9 +2054,9 @@
 
 
 echo $ac_n "checking for AIX""... $ac_c" 1>&6
-echo "configure:2032: checking for AIX" >&5
-cat > conftest.$ac_ext <<EOF
-#line 2034 "configure"
+echo "configure:2058: checking for AIX" >&5
+cat > conftest.$ac_ext <<EOF
+#line 2060 "configure"
 #include "confdefs.h"
 #ifdef _AIX
   yes
@@ -2057,9 +2083,9 @@
 
 
 echo $ac_n "checking whether we are using SunPro C""... $ac_c" 1>&6
-echo "configure:2061: checking whether we are using SunPro C" >&5
-cat > conftest.$ac_ext <<EOF
-#line 2063 "configure"
+echo "configure:2087: checking whether we are using SunPro C" >&5
+cat > conftest.$ac_ext <<EOF
+#line 2089 "configure"
 #include "confdefs.h"
 
 int main() {
@@ -2070,7 +2096,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:2074: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2100: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   __sunpro_c=yes
 else
@@ -2289,7 +2315,7 @@
 if test -z "$CFLAGS"; then
       if   test "$GCC" = "yes"; then
     CFLAGS="-g -O2 -Wall -Wno-switch"
-    test "$opsys" = "linux" -a "$machine" = "intel386" && \
+    test "$opsys $machine" = "linux intel386" && \
       CFLAGS="$CFLAGS -fno-strength-reduce -malign-loops=2 -malign-jumps=2 -malign-functions=2"
   elif test "$__sunpro_c" = "yes"; then
     case "$opsys" in
@@ -2347,7 +2373,7 @@
  fi
 
 echo $ac_n "checking for dynodump""... $ac_c" 1>&6
-echo "configure:2351: checking for dynodump" >&5
+echo "configure:2377: checking for dynodump" >&5
 if test "$unexec" != "unexsol2.o"; then
   echo "$ac_t""no" 1>&6
 else
@@ -2418,19 +2444,19 @@
 
 if test "$add_runtime_path" = "yes"; then
       echo $ac_n "checking "for runtime libraries flag"""... $ac_c" 1>&6
-echo "configure:2422: checking "for runtime libraries flag"" >&5
+echo "configure:2448: 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 2427 "configure"
+#line 2453 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:2434: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2460: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   dash_r="$try_dash_r"
 else
@@ -2528,7 +2554,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:2532: checking for $ac_word" >&5
+echo "configure:2558: checking for $ac_word" >&5
 
 if test -n "$RANLIB"; then
   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
@@ -2581,7 +2607,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:2585: checking for a BSD compatible install" >&5
+echo "configure:2611: checking for a BSD compatible install" >&5
 if test -z "$INSTALL"; then
 
   IFS="${IFS= 	}"; ac_save_IFS="$IFS"; IFS="${IFS}:"
@@ -2632,7 +2658,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:2636: checking for $ac_word" >&5
+echo "configure:2662: checking for $ac_word" >&5
 
 if test -n "$YACC"; then
   ac_cv_prog_YACC="$YACC" # Let the user override the test.
@@ -2663,15 +2689,15 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2667: checking for $ac_hdr" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 2670 "configure"
+echo "configure:2693: checking for $ac_hdr" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 2696 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2675: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2701: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -2704,15 +2730,15 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2708: checking for $ac_hdr" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 2711 "configure"
+echo "configure:2734: checking for $ac_hdr" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 2737 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2716: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2742: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -2745,15 +2771,15 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2749: checking for $ac_hdr" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 2752 "configure"
+echo "configure:2775: checking for $ac_hdr" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 2778 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2757: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2783: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -2783,10 +2809,10 @@
 done
 
 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
-echo "configure:2787: checking for sys/wait.h that is POSIX.1 compatible" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 2790 "configure"
+echo "configure:2813: checking for sys/wait.h that is POSIX.1 compatible" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 2816 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/wait.h>
@@ -2802,7 +2828,7 @@
 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
 ; return 0; }
 EOF
-if { (eval echo configure:2806: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2832: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_header_sys_wait_h=yes
 else
@@ -2826,10 +2852,10 @@
 fi
 
 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:2830: checking for ANSI C header files" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 2833 "configure"
+echo "configure:2856: checking for ANSI C header files" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 2859 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 #include <stdarg.h>
@@ -2837,7 +2863,7 @@
 #include <float.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2841: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2867: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -2854,7 +2880,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 2858 "configure"
+#line 2884 "configure"
 #include "confdefs.h"
 #include <string.h>
 EOF
@@ -2872,7 +2898,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 2876 "configure"
+#line 2902 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 EOF
@@ -2890,7 +2916,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 2894 "configure"
+#line 2920 "configure"
 #include "confdefs.h"
 #include <ctype.h>
 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -2901,7 +2927,7 @@
 exit (0); }
 
 EOF
-if { (eval echo configure:2905: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
+if { (eval echo configure:2931: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
 then
   :
 else
@@ -2926,10 +2952,10 @@
 fi
 
 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
-echo "configure:2930: checking whether time.h and sys/time.h may both be included" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 2933 "configure"
+echo "configure:2956: checking whether time.h and sys/time.h may both be included" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 2959 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/time.h>
@@ -2938,7 +2964,7 @@
 struct tm *tp;
 ; return 0; }
 EOF
-if { (eval echo configure:2942: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2968: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_header_time=yes
 else
@@ -2962,10 +2988,10 @@
 fi
 
 echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6
-echo "configure:2966: checking for sys_siglist declaration in signal.h or unistd.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 2969 "configure"
+echo "configure:2992: checking for sys_siglist declaration in signal.h or unistd.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 2995 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <signal.h>
@@ -2977,7 +3003,7 @@
 char *msg = *(sys_siglist + 1);
 ; return 0; }
 EOF
-if { (eval echo configure:2981: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3007: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_decl_sys_siglist=yes
 else
@@ -3002,9 +3028,9 @@
 
 
 echo $ac_n "checking for struct utimbuf""... $ac_c" 1>&6
-echo "configure:3006: checking for struct utimbuf" >&5
-cat > conftest.$ac_ext <<EOF
-#line 3008 "configure"
+echo "configure:3032: checking for struct utimbuf" >&5
+cat > conftest.$ac_ext <<EOF
+#line 3034 "configure"
 #include "confdefs.h"
 #ifdef TIME_WITH_SYS_TIME
 #include <sys/time.h>
@@ -3023,7 +3049,7 @@
 static struct utimbuf x; x.actime = x.modtime;
 ; return 0; }
 EOF
-if { (eval echo configure:3027: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3053: \"$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
@@ -3043,10 +3069,10 @@
 rm -f conftest*
 
 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
-echo "configure:3047: checking return type of signal handlers" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 3050 "configure"
+echo "configure:3073: checking return type of signal handlers" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 3076 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <signal.h>
@@ -3063,7 +3089,7 @@
 int i;
 ; return 0; }
 EOF
-if { (eval echo configure:3067: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3093: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_type_signal=void
 else
@@ -3085,10 +3111,10 @@
 
 
 echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:3089: checking for size_t" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 3092 "configure"
+echo "configure:3115: checking for size_t" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 3118 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -3119,10 +3145,10 @@
 fi
 
 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
-echo "configure:3123: checking for pid_t" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 3126 "configure"
+echo "configure:3149: checking for pid_t" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 3152 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -3153,10 +3179,10 @@
 fi
 
 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
-echo "configure:3157: checking for uid_t in sys/types.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 3160 "configure"
+echo "configure:3183: checking for uid_t in sys/types.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 3186 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 EOF
@@ -3192,10 +3218,10 @@
 fi
 
 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
-echo "configure:3196: checking for mode_t" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 3199 "configure"
+echo "configure:3222: checking for mode_t" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 3225 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -3226,10 +3252,10 @@
 fi
 
 echo $ac_n "checking for off_t""... $ac_c" 1>&6
-echo "configure:3230: checking for off_t" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 3233 "configure"
+echo "configure:3256: checking for off_t" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 3259 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -3261,9 +3287,9 @@
 
 
 echo $ac_n "checking for struct timeval""... $ac_c" 1>&6
-echo "configure:3265: checking for struct timeval" >&5
-cat > conftest.$ac_ext <<EOF
-#line 3267 "configure"
+echo "configure:3291: checking for struct timeval" >&5
+cat > conftest.$ac_ext <<EOF
+#line 3293 "configure"
 #include "confdefs.h"
 #ifdef TIME_WITH_SYS_TIME
 #include <sys/time.h>
@@ -3279,7 +3305,7 @@
 static struct timeval x; x.tv_sec = x.tv_usec;
 ; return 0; }
 EOF
-if { (eval echo configure:3283: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3309: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   echo "$ac_t""yes" 1>&6
   HAVE_TIMEVAL=yes
@@ -3301,10 +3327,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:3305: checking whether struct tm is in sys/time.h or time.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 3308 "configure"
+echo "configure:3331: checking whether struct tm is in sys/time.h or time.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 3334 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <time.h>
@@ -3312,7 +3338,7 @@
 struct tm *tp; tp->tm_sec;
 ; return 0; }
 EOF
-if { (eval echo configure:3316: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3342: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_struct_tm=time.h
 else
@@ -3336,10 +3362,10 @@
 fi
 
 echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
-echo "configure:3340: checking for tm_zone in struct tm" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 3343 "configure"
+echo "configure:3366: checking for tm_zone in struct tm" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 3369 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <$ac_cv_struct_tm>
@@ -3347,7 +3373,7 @@
 struct tm tm; tm.tm_zone;
 ; return 0; }
 EOF
-if { (eval echo configure:3351: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3377: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_struct_tm_zone=yes
 else
@@ -3370,10 +3396,10 @@
 
 else
   echo $ac_n "checking for tzname""... $ac_c" 1>&6
-echo "configure:3374: checking for tzname" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 3377 "configure"
+echo "configure:3400: checking for tzname" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 3403 "configure"
 #include "confdefs.h"
 #include <time.h>
 #ifndef tzname /* For SGI.  */
@@ -3383,7 +3409,7 @@
 atoi(*tzname);
 ; return 0; }
 EOF
-if { (eval echo configure:3387: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3413: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   ac_cv_var_tzname=yes
 else
@@ -3409,10 +3435,10 @@
 
 
 echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:3413: checking for working const" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 3416 "configure"
+echo "configure:3439: checking for working const" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 3442 "configure"
 #include "confdefs.h"
 
 int main() {
@@ -3461,7 +3487,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:3465: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3491: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_const=yes
 else
@@ -3486,7 +3512,7 @@
 
 
 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:3490: checking whether ${MAKE-make} sets \${MAKE}" >&5
+echo "configure:3516: checking whether ${MAKE-make} sets \${MAKE}" >&5
 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
 
 cat > conftestmake <<\EOF
@@ -3511,12 +3537,12 @@
 
 
 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
-echo "configure:3515: checking whether byte ordering is bigendian" >&5
+echo "configure:3541: 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 3520 "configure"
+#line 3546 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/param.h>
@@ -3527,11 +3553,11 @@
 #endif
 ; return 0; }
 EOF
-if { (eval echo configure:3531: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3557: \"$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 3535 "configure"
+#line 3561 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/param.h>
@@ -3542,7 +3568,7 @@
 #endif
 ; return 0; }
 EOF
-if { (eval echo configure:3546: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3572: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_bigendian=yes
 else
@@ -3559,7 +3585,7 @@
 rm -f conftest*
 if test $ac_cv_c_bigendian = unknown; then
 cat > conftest.$ac_ext <<EOF
-#line 3563 "configure"
+#line 3589 "configure"
 #include "confdefs.h"
 main () {
   /* Are we little or big endian?  From Harbison&Steele.  */
@@ -3572,7 +3598,7 @@
   exit (u.c[sizeof (long) - 1] == 1);
 }
 EOF
-if { (eval echo configure:3576: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
+if { (eval echo configure:3602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
 then
   ac_cv_c_bigendian=no
 else
@@ -3598,10 +3624,10 @@
 
 
 echo $ac_n "checking size of short""... $ac_c" 1>&6
-echo "configure:3602: checking size of short" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 3605 "configure"
+echo "configure:3628: checking size of short" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 3631 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 main()
@@ -3612,7 +3638,7 @@
   exit(0);
 }
 EOF
-if { (eval echo configure:3616: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
+if { (eval echo configure:3642: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
 then
   ac_cv_sizeof_short=`cat conftestval`
 else
@@ -3639,10 +3665,10 @@
   exit 1
 fi
 echo $ac_n "checking size of int""... $ac_c" 1>&6
-echo "configure:3643: checking size of int" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 3646 "configure"
+echo "configure:3669: checking size of int" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 3672 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 main()
@@ -3653,7 +3679,7 @@
   exit(0);
 }
 EOF
-if { (eval echo configure:3657: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
+if { (eval echo configure:3683: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
 then
   ac_cv_sizeof_int=`cat conftestval`
 else
@@ -3674,10 +3700,10 @@
 
 
 echo $ac_n "checking size of long""... $ac_c" 1>&6
-echo "configure:3678: checking size of long" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 3681 "configure"
+echo "configure:3704: checking size of long" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 3707 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 main()
@@ -3688,7 +3714,7 @@
   exit(0);
 }
 EOF
-if { (eval echo configure:3692: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
+if { (eval echo configure:3718: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
 then
   ac_cv_sizeof_long=`cat conftestval`
 else
@@ -3709,10 +3735,10 @@
 
 
 echo $ac_n "checking size of long long""... $ac_c" 1>&6
-echo "configure:3713: checking size of long long" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 3716 "configure"
+echo "configure:3739: checking size of long long" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 3742 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 main()
@@ -3723,7 +3749,7 @@
   exit(0);
 }
 EOF
-if { (eval echo configure:3727: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
+if { (eval echo configure:3753: \"$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
@@ -3744,10 +3770,10 @@
 
 
 echo $ac_n "checking size of void *""... $ac_c" 1>&6
-echo "configure:3748: checking size of void *" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 3751 "configure"
+echo "configure:3774: checking size of void *" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 3777 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 main()
@@ -3758,7 +3784,7 @@
   exit(0);
 }
 EOF
-if { (eval echo configure:3762: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
+if { (eval echo configure:3788: \"$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
@@ -3780,7 +3806,7 @@
 
 
 echo $ac_n "checking for long file names""... $ac_c" 1>&6
-echo "configure:3784: checking for long file names" >&5
+echo "configure:3810: 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:
@@ -3827,12 +3853,12 @@
 
 
 echo $ac_n "checking for sqrt in -lm""... $ac_c" 1>&6
-echo "configure:3831: checking for sqrt in -lm" >&5
+echo "configure:3857: 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 3836 "configure"
+#line 3862 "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
@@ -3843,7 +3869,7 @@
 sqrt()
 ; return 0; }
 EOF
-if { (eval echo configure:3847: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3873: \"$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
@@ -3885,7 +3911,7 @@
 
 
 echo "checking type of mail spool file locking" 1>&6
-echo "configure:3889: checking type of mail spool file locking" >&5
+echo "configure:3915: 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
@@ -3909,12 +3935,12 @@
 
 
 echo $ac_n "checking for kstat_open in -lkstat""... $ac_c" 1>&6
-echo "configure:3913: checking for kstat_open in -lkstat" >&5
+echo "configure:3939: 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 3918 "configure"
+#line 3944 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -3925,7 +3951,7 @@
 kstat_open()
 ; return 0; }
 EOF
-if { (eval echo configure:3929: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3955: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -3959,12 +3985,12 @@
 
 
 echo $ac_n "checking for kvm_read in -lkvm""... $ac_c" 1>&6
-echo "configure:3963: checking for kvm_read in -lkvm" >&5
+echo "configure:3989: 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 3968 "configure"
+#line 3994 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -3975,7 +4001,7 @@
 kvm_read()
 ; return 0; }
 EOF
-if { (eval echo configure:3979: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4005: \"$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
@@ -4009,12 +4035,12 @@
 
 
 echo $ac_n "checking for cma_open in -lpthreads""... $ac_c" 1>&6
-echo "configure:4013: checking for cma_open in -lpthreads" >&5
+echo "configure:4039: 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 4018 "configure"
+#line 4044 "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
@@ -4025,7 +4051,7 @@
 cma_open()
 ; return 0; }
 EOF
-if { (eval echo configure:4029: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4055: \"$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
@@ -4061,7 +4087,7 @@
 fi
 
 echo $ac_n "checking whether the -xildoff compiler flag is required""... $ac_c" 1>&6
-echo "configure:4065: checking whether the -xildoff compiler flag is required" >&5
+echo "configure:4091: 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;
@@ -4072,7 +4098,7 @@
 
 if test "$opsys" = "sol2" && test "$OS_RELEASE" -ge 56; then
   echo $ac_n "checking for \"-z ignore\" linker flag""... $ac_c" 1>&6
-echo "configure:4076: checking for \"-z ignore\" linker flag" >&5
+echo "configure:4102: 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 ;;
@@ -4082,7 +4108,7 @@
 
 
 echo "checking "for specified window system"" 1>&6
-echo "configure:4086: checking "for specified window system"" >&5
+echo "configure:4112: checking "for specified window system"" >&5
 
 if test "$with_x11" != "no"; then
     test "$x_includes $x_libraries" != "NONE NONE" && \
@@ -4112,7 +4138,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:4116: checking for X" >&5
+echo "configure:4142: checking for X" >&5
 
 # Check whether --with-x or --without-x was given.
 if test "${with_x+set}" = set; then
@@ -4172,12 +4198,12 @@
 
   # First, try using that file with no special directory specified.
 cat > conftest.$ac_ext <<EOF
-#line 4176 "configure"
+#line 4202 "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:4181: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4207: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -4246,14 +4272,14 @@
   ac_save_LIBS="$LIBS"
   LIBS="-l$x_direct_test_library $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4250 "configure"
+#line 4276 "configure"
 #include "confdefs.h"
 
 int main() {
 ${x_direct_test_function}()
 ; return 0; }
 EOF
-if { (eval echo configure:4257: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4283: \"$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.
@@ -4362,17 +4388,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:4366: checking whether -R must be followed by a space" >&5
+echo "configure:4392: 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 4369 "configure"
+#line 4395 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:4376: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4402: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   ac_R_nospace=yes
 else
@@ -4388,14 +4414,14 @@
       else
 	LIBS="$ac_xsave_LIBS -R $x_libraries"
 	cat > conftest.$ac_ext <<EOF
-#line 4392 "configure"
+#line 4418 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:4399: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4425: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   ac_R_space=yes
 else
@@ -4431,12 +4457,12 @@
 else
 
 echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
-echo "configure:4435: checking for dnet_ntoa in -ldnet" >&5
+echo "configure:4461: 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 4440 "configure"
+#line 4466 "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
@@ -4447,7 +4473,7 @@
 dnet_ntoa()
 ; return 0; }
 EOF
-if { (eval echo configure:4451: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4477: \"$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
@@ -4471,12 +4497,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:4475: checking for dnet_ntoa in -ldnet_stub" >&5
+echo "configure:4501: 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 4480 "configure"
+#line 4506 "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
@@ -4487,7 +4513,7 @@
 dnet_ntoa()
 ; return 0; }
 EOF
-if { (eval echo configure:4491: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4517: \"$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
@@ -4516,10 +4542,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:4520: checking for gethostbyname" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 4523 "configure"
+echo "configure:4546: checking for gethostbyname" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 4549 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char gethostbyname(); below.  */
@@ -4542,7 +4568,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:4546: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4572: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_gethostbyname=yes"
 else
@@ -4563,12 +4589,12 @@
     if test $ac_cv_func_gethostbyname = no; then
       
 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
-echo "configure:4567: checking for gethostbyname in -lnsl" >&5
+echo "configure:4593: 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 4572 "configure"
+#line 4598 "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
@@ -4579,7 +4605,7 @@
 gethostbyname()
 ; return 0; }
 EOF
-if { (eval echo configure:4583: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4609: \"$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
@@ -4609,10 +4635,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:4613: checking for connect" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 4616 "configure"
+echo "configure:4639: checking for connect" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 4642 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char connect(); below.  */
@@ -4635,7 +4661,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:4639: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4665: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_connect=yes"
 else
@@ -4658,12 +4684,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:4662: checking "$xe_msg_checking"" >&5
+echo "configure:4688: 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 4667 "configure"
+#line 4693 "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
@@ -4674,7 +4700,7 @@
 connect()
 ; return 0; }
 EOF
-if { (eval echo configure:4678: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4704: \"$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
@@ -4698,10 +4724,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:4702: checking for remove" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 4705 "configure"
+echo "configure:4728: checking for remove" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 4731 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char remove(); below.  */
@@ -4724,7 +4750,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:4728: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4754: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_remove=yes"
 else
@@ -4745,12 +4771,12 @@
     if test $ac_cv_func_remove = no; then
       
 echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
-echo "configure:4749: checking for remove in -lposix" >&5
+echo "configure:4775: 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 4754 "configure"
+#line 4780 "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
@@ -4761,7 +4787,7 @@
 remove()
 ; return 0; }
 EOF
-if { (eval echo configure:4765: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4791: \"$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
@@ -4785,10 +4811,10 @@
 
     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
     echo $ac_n "checking for shmat""... $ac_c" 1>&6
-echo "configure:4789: checking for shmat" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 4792 "configure"
+echo "configure:4815: checking for shmat" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 4818 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char shmat(); below.  */
@@ -4811,7 +4837,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:4815: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4841: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_shmat=yes"
 else
@@ -4832,12 +4858,12 @@
     if test $ac_cv_func_shmat = no; then
       
 echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
-echo "configure:4836: checking for shmat in -lipc" >&5
+echo "configure:4862: 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 4841 "configure"
+#line 4867 "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
@@ -4848,7 +4874,7 @@
 shmat()
 ; return 0; }
 EOF
-if { (eval echo configure:4852: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4878: \"$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
@@ -4882,12 +4908,12 @@
   #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
   
 echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
-echo "configure:4886: checking for IceConnectionNumber in -lICE" >&5
+echo "configure:4912: 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 4891 "configure"
+#line 4917 "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
@@ -4898,7 +4924,7 @@
 IceConnectionNumber()
 ; return 0; }
 EOF
-if { (eval echo configure:4902: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4928: \"$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
@@ -5031,7 +5057,7 @@
   fi
 
     echo "checking for X defines extracted by xmkmf" 1>&6
-echo "configure:5035: checking for X defines extracted by xmkmf" >&5
+echo "configure:5061: checking for X defines extracted by xmkmf" >&5
   rm -fr conftestdir
   if mkdir conftestdir; then
     cd conftestdir
@@ -5063,15 +5089,15 @@
 
     ac_safe=`echo "X11/Intrinsic.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for X11/Intrinsic.h""... $ac_c" 1>&6
-echo "configure:5067: checking for X11/Intrinsic.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 5070 "configure"
+echo "configure:5093: checking for X11/Intrinsic.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 5096 "configure"
 #include "confdefs.h"
 #include <X11/Intrinsic.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5075: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5101: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -5095,12 +5121,12 @@
 
       
 echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6
-echo "configure:5099: checking for XOpenDisplay in -lX11" >&5
+echo "configure:5125: 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 5104 "configure"
+#line 5130 "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
@@ -5111,7 +5137,7 @@
 XOpenDisplay()
 ; return 0; }
 EOF
-if { (eval echo configure:5115: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5141: \"$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
@@ -5136,12 +5162,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:5140: checking "$xe_msg_checking"" >&5
+echo "configure:5166: 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 5145 "configure"
+#line 5171 "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
@@ -5152,7 +5178,7 @@
 XGetFontProperty()
 ; return 0; }
 EOF
-if { (eval echo configure:5156: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5182: \"$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
@@ -5179,12 +5205,12 @@
 
     
 echo $ac_n "checking for XShapeSelectInput in -lXext""... $ac_c" 1>&6
-echo "configure:5183: checking for XShapeSelectInput in -lXext" >&5
+echo "configure:5209: 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 5188 "configure"
+#line 5214 "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
@@ -5195,7 +5221,7 @@
 XShapeSelectInput()
 ; return 0; }
 EOF
-if { (eval echo configure:5199: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5225: \"$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
@@ -5218,12 +5244,12 @@
 
     
 echo $ac_n "checking for XtOpenDisplay in -lXt""... $ac_c" 1>&6
-echo "configure:5222: checking for XtOpenDisplay in -lXt" >&5
+echo "configure:5248: 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 5227 "configure"
+#line 5253 "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
@@ -5234,7 +5260,7 @@
 XtOpenDisplay()
 ; return 0; }
 EOF
-if { (eval echo configure:5238: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5264: \"$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
@@ -5257,14 +5283,14 @@
 
 
   echo $ac_n "checking the version of X11 being used""... $ac_c" 1>&6
-echo "configure:5261: checking the version of X11 being used" >&5
+echo "configure:5287: checking the version of X11 being used" >&5
   cat > conftest.$ac_ext <<EOF
-#line 5263 "configure"
+#line 5289 "configure"
 #include "confdefs.h"
 #include <X11/Intrinsic.h>
     main(int c, char* v[]) { return c>1 ? XlibSpecificationRelease : 0; }
 EOF
-if { (eval echo configure:5268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
+if { (eval echo configure:5294: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
 then
   ./conftest foobar; x11_release=$?
 else
@@ -5288,15 +5314,15 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:5292: checking for $ac_hdr" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 5295 "configure"
+echo "configure:5318: checking for $ac_hdr" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 5321 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5300: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5326: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -5327,7 +5353,7 @@
 
 
     echo $ac_n "checking for XFree86""... $ac_c" 1>&6
-echo "configure:5331: checking for XFree86" >&5
+echo "configure:5357: checking for XFree86" >&5
   if test -d "/usr/X386/include" -o \
           -f "/etc/XF86Config"    -o \
 	  -f "/etc/X11/XF86Config" -o \
@@ -5347,12 +5373,12 @@
 
     test -z "$with_xmu" && { 
 echo $ac_n "checking for XmuReadBitmapDataFromFile in -lXmu""... $ac_c" 1>&6
-echo "configure:5351: checking for XmuReadBitmapDataFromFile in -lXmu" >&5
+echo "configure:5377: checking for XmuReadBitmapDataFromFile in -lXmu" >&5
 ac_lib_var=`echo Xmu'_'XmuReadBitmapDataFromFile | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lXmu "
 cat > conftest.$ac_ext <<EOF
-#line 5356 "configure"
+#line 5382 "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
@@ -5363,7 +5389,7 @@
 XmuReadBitmapDataFromFile()
 ; return 0; }
 EOF
-if { (eval echo configure:5367: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5393: \"$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
@@ -5402,19 +5428,19 @@
 
       
 echo $ac_n "checking for main in -lXbsd""... $ac_c" 1>&6
-echo "configure:5406: checking for main in -lXbsd" >&5
+echo "configure:5432: 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 5411 "configure"
+#line 5437 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:5418: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5444: \"$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
@@ -5468,7 +5494,7 @@
 esac
 
 echo "checking for session-management option" 1>&6
-echo "configure:5472: checking for session-management option" >&5;
+echo "configure:5498: checking for session-management option" >&5;
 if test "$with_session" != "no"; then
   { test "$extra_verbose" = "yes" && cat << \EOF
     Defining HAVE_SESSION
@@ -5483,15 +5509,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:5487: checking for X11/Xauth.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 5490 "configure"
+echo "configure:5513: checking for X11/Xauth.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 5516 "configure"
 #include "confdefs.h"
 #include <X11/Xauth.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5495: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5521: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -5514,12 +5540,12 @@
  }
 test -z "$with_xauth" && { 
 echo $ac_n "checking for XauGetAuthByAddr in -lXau""... $ac_c" 1>&6
-echo "configure:5518: checking for XauGetAuthByAddr in -lXau" >&5
+echo "configure:5544: 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 5523 "configure"
+#line 5549 "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
@@ -5530,7 +5556,7 @@
 XauGetAuthByAddr()
 ; return 0; }
 EOF
-if { (eval echo configure:5534: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5560: \"$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
@@ -5572,15 +5598,15 @@
 OFFIX_O=""
 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:5576: checking for OffiX/DragAndDrop.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 5579 "configure"
+echo "configure:5602: checking for OffiX/DragAndDrop.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 5605 "configure"
 #include "confdefs.h"
 #include <OffiX/DragAndDrop.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5584: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5610: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -5603,12 +5629,12 @@
  }
 test -z "$with_offix" && { 
 echo $ac_n "checking for DndInitialize in -lDnd""... $ac_c" 1>&6
-echo "configure:5607: checking for DndInitialize in -lDnd" >&5
+echo "configure:5633: 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 5612 "configure"
+#line 5638 "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
@@ -5619,7 +5645,7 @@
 DndInitialize()
 ; return 0; }
 EOF
-if { (eval echo configure:5623: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5649: \"$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
@@ -5659,15 +5685,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:5663: checking for ${dir}tt_c.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 5666 "configure"
+echo "configure:5689: checking for ${dir}tt_c.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 5692 "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:5671: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5697: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -5696,12 +5722,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:5700: checking "$xe_msg_checking"" >&5
+echo "configure:5726: 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 5705 "configure"
+#line 5731 "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
@@ -5712,7 +5738,7 @@
 tt_message_create()
 ; return 0; }
 EOF
-if { (eval echo configure:5716: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5742: \"$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
@@ -5761,15 +5787,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:5765: checking for Dt/Dt.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 5768 "configure"
+echo "configure:5791: checking for Dt/Dt.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 5794 "configure"
 #include "confdefs.h"
 #include <Dt/Dt.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5773: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5799: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -5792,12 +5818,12 @@
  }
 test -z "$with_cde" && { 
 echo $ac_n "checking for DtDndDragStart in -lDtSvc""... $ac_c" 1>&6
-echo "configure:5796: checking for DtDndDragStart in -lDtSvc" >&5
+echo "configure:5822: 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 5801 "configure"
+#line 5827 "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
@@ -5808,7 +5834,7 @@
 DtDndDragStart()
 ; return 0; }
 EOF
-if { (eval echo configure:5812: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5838: \"$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
@@ -5855,19 +5881,19 @@
 
   
 echo $ac_n "checking for main in -lenergize""... $ac_c" 1>&6
-echo "configure:5859: checking for main in -lenergize" >&5
+echo "configure:5885: 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 5864 "configure"
+#line 5890 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:5871: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5897: \"$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
@@ -5899,19 +5925,19 @@
   if test -z "$energize_version"; then
     
 echo $ac_n "checking for main in -lconn""... $ac_c" 1>&6
-echo "configure:5903: checking for main in -lconn" >&5
+echo "configure:5929: 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 5908 "configure"
+#line 5934 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:5915: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5941: \"$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
@@ -5944,15 +5970,15 @@
   fi
   ac_safe=`echo "editorconn.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for editorconn.h""... $ac_c" 1>&6
-echo "configure:5948: checking for editorconn.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 5951 "configure"
+echo "configure:5974: checking for editorconn.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 5977 "configure"
 #include "confdefs.h"
 #include <editorconn.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5956: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5982: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -5996,7 +6022,7 @@
 if test "$with_x11" = "yes"; then
 
   echo "checking for X11 graphics libraries" 1>&6
-echo "configure:6000: checking for X11 graphics libraries" >&5
+echo "configure:6026: checking for X11 graphics libraries" >&5
     test -z "$with_gif" && with_gif=yes;
   if test "$with_gif" = "yes"; then
     { test "$extra_verbose" = "yes" && cat << \EOF
@@ -6013,10 +6039,10 @@
   fi
 
     echo $ac_n "checking for Xpm - no older than 3.4f""... $ac_c" 1>&6
-echo "configure:6017: checking for Xpm - no older than 3.4f" >&5
+echo "configure:6043: checking for Xpm - no older than 3.4f" >&5
   xe_check_libs=-lXpm
   test -z "$with_xpm" && { cat > conftest.$ac_ext <<EOF
-#line 6020 "configure"
+#line 6046 "configure"
 #include "confdefs.h"
 #include <X11/xpm.h>
   int main(int c, char **v) {
@@ -6026,7 +6052,7 @@
 		  0 ;
   }
 EOF
-if { (eval echo configure:6030: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
+if { (eval echo configure:6056: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
 then
   ./conftest foobar; xpm_status=$?;
     if test "$xpm_status" = "0"; then with_xpm=yes; else with_xpm=no; fi;
@@ -6064,15 +6090,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:6068: checking for compface.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 6071 "configure"
+echo "configure:6094: checking for compface.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 6097 "configure"
 #include "confdefs.h"
 #include <compface.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6076: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6102: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -6095,12 +6121,12 @@
  }
   test -z "$with_xface" && { 
 echo $ac_n "checking for UnGenFace in -lcompface""... $ac_c" 1>&6
-echo "configure:6099: checking for UnGenFace in -lcompface" >&5
+echo "configure:6125: 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 6104 "configure"
+#line 6130 "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
@@ -6111,7 +6137,7 @@
 UnGenFace()
 ; return 0; }
 EOF
-if { (eval echo configure:6115: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:6141: \"$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
@@ -6147,15 +6173,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:6151: checking for jpeglib.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 6154 "configure"
+echo "configure:6177: checking for jpeglib.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 6180 "configure"
 #include "confdefs.h"
 #include <jpeglib.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6159: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6185: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -6178,12 +6204,12 @@
  }
   test -z "$with_jpeg" && { 
 echo $ac_n "checking for jpeg_destroy_decompress in -ljpeg""... $ac_c" 1>&6
-echo "configure:6182: checking for jpeg_destroy_decompress in -ljpeg" >&5
+echo "configure:6208: 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 6187 "configure"
+#line 6213 "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
@@ -6194,7 +6220,7 @@
 jpeg_destroy_decompress()
 ; return 0; }
 EOF
-if { (eval echo configure:6198: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:6224: \"$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
@@ -6230,15 +6256,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:6234: checking for png.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 6237 "configure"
+echo "configure:6260: checking for png.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 6263 "configure"
 #include "confdefs.h"
 #include <png.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6242: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6268: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -6260,10 +6286,10 @@
 fi
  }
   test -z "$with_png" && { echo $ac_n "checking for pow""... $ac_c" 1>&6
-echo "configure:6264: checking for pow" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 6267 "configure"
+echo "configure:6290: checking for pow" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 6293 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char pow(); below.  */
@@ -6286,7 +6312,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:6290: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:6316: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_pow=yes"
 else
@@ -6311,12 +6337,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:6315: checking "$xe_msg_checking"" >&5
+echo "configure:6341: 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 6320 "configure"
+#line 6346 "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
@@ -6327,7 +6353,7 @@
 png_read_image()
 ; return 0; }
 EOF
-if { (eval echo configure:6331: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:6357: \"$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
@@ -6369,12 +6395,12 @@
 xe_msg_checking="for TIFFReadScanline in -ltiff"
 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:6373: checking "$xe_msg_checking"" >&5
+echo "configure:6399: checking "$xe_msg_checking"" >&5
 ac_lib_var=`echo tiff'_'TIFFReadScanline | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -ltiff $extra_libs"
 cat > conftest.$ac_ext <<EOF
-#line 6378 "configure"
+#line 6404 "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
@@ -6385,7 +6411,7 @@
 TIFFReadScanline()
 ; return 0; }
 EOF
-if { (eval echo configure:6389: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:6415: \"$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
@@ -6423,12 +6449,12 @@
 
     
 echo $ac_n "checking for XawScrollbarSetThumb in -lXaw""... $ac_c" 1>&6
-echo "configure:6427: checking for XawScrollbarSetThumb in -lXaw" >&5
+echo "configure:6453: 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 6432 "configure"
+#line 6458 "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
@@ -6439,7 +6465,7 @@
 XawScrollbarSetThumb()
 ; return 0; }
 EOF
-if { (eval echo configure:6443: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:6469: \"$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
@@ -6463,15 +6489,15 @@
   if test "$have_xaw" = "yes"; then
     ac_safe=`echo "X11/Xaw/Reports.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for X11/Xaw/Reports.h""... $ac_c" 1>&6
-echo "configure:6467: checking for X11/Xaw/Reports.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 6470 "configure"
+echo "configure:6493: checking for X11/Xaw/Reports.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 6496 "configure"
 #include "confdefs.h"
 #include <X11/Xaw/Reports.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6475: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6501: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -6497,15 +6523,15 @@
 
     ac_safe=`echo "Xm/Xm.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for Xm/Xm.h""... $ac_c" 1>&6
-echo "configure:6501: checking for Xm/Xm.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 6504 "configure"
+echo "configure:6527: checking for Xm/Xm.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 6530 "configure"
 #include "confdefs.h"
 #include <Xm/Xm.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6509: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6535: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -6522,12 +6548,12 @@
   echo "$ac_t""yes" 1>&6
   
 echo $ac_n "checking for XmStringFree in -lXm""... $ac_c" 1>&6
-echo "configure:6526: checking for XmStringFree in -lXm" >&5
+echo "configure:6552: 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 6531 "configure"
+#line 6557 "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
@@ -6538,7 +6564,7 @@
 XmStringFree()
 ; return 0; }
 EOF
-if { (eval echo configure:6542: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:6568: \"$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
@@ -6787,7 +6813,7 @@
 
 if test "$with_mule" = "yes" ; then
   echo "checking for Mule-related features" 1>&6
-echo "configure:6791: checking for Mule-related features" >&5
+echo "configure:6817: checking for Mule-related features" >&5
   { test "$extra_verbose" = "yes" && cat << \EOF
     Defining MULE
 EOF
@@ -6804,15 +6830,15 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:6808: checking for $ac_hdr" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 6811 "configure"
+echo "configure:6834: checking for $ac_hdr" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 6837 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6816: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6842: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -6843,12 +6869,12 @@
 
   
 echo $ac_n "checking for strerror in -lintl""... $ac_c" 1>&6
-echo "configure:6847: checking for strerror in -lintl" >&5
+echo "configure:6873: 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 6852 "configure"
+#line 6878 "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
@@ -6859,7 +6885,7 @@
 strerror()
 ; return 0; }
 EOF
-if { (eval echo configure:6863: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:6889: \"$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
@@ -6892,19 +6918,19 @@
 
 
   echo "checking for Mule input methods" 1>&6
-echo "configure:6896: checking for Mule input methods" >&5
+echo "configure:6922: 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:6900: checking for XIM" >&5
+echo "configure:6926: checking for XIM" >&5
     
 echo $ac_n "checking for XmImMbLookupString in -lXm""... $ac_c" 1>&6
-echo "configure:6903: checking for XmImMbLookupString in -lXm" >&5
+echo "configure:6929: 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 6908 "configure"
+#line 6934 "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
@@ -6915,7 +6941,7 @@
 XmImMbLookupString()
 ; return 0; }
 EOF
-if { (eval echo configure:6919: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:6945: \"$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
@@ -6978,15 +7004,15 @@
     fi
   else     case "$with_xfs" in  "yes" )
       echo "checking for XFontSet" 1>&6
-echo "configure:6982: checking for XFontSet" >&5
+echo "configure:7008: checking for XFontSet" >&5
       
 echo $ac_n "checking for XmbDrawString in -lX11""... $ac_c" 1>&6
-echo "configure:6985: checking for XmbDrawString in -lX11" >&5
+echo "configure:7011: checking for XmbDrawString in -lX11" >&5
 ac_lib_var=`echo X11'_'XmbDrawString | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lX11 "
 cat > conftest.$ac_ext <<EOF
-#line 6990 "configure"
+#line 7016 "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
@@ -6997,7 +7023,7 @@
 XmbDrawString()
 ; return 0; }
 EOF
-if { (eval echo configure:7001: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:7027: \"$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
@@ -7036,15 +7062,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:7040: checking for wnn/jllib.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 7043 "configure"
+echo "configure:7066: checking for wnn/jllib.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 7069 "configure"
 #include "confdefs.h"
 #include <wnn/jllib.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7048: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7074: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -7069,10 +7095,10 @@
     for ac_func in crypt
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:7073: checking for $ac_func" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 7076 "configure"
+echo "configure:7099: checking for $ac_func" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 7102 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -7095,7 +7121,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:7099: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:7125: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -7124,12 +7150,12 @@
 
     test "$ac_cv_func_crypt" != "yes" && { 
 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
-echo "configure:7128: checking for crypt in -lcrypt" >&5
+echo "configure:7154: checking for crypt in -lcrypt" >&5
 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
 
 xe_check_libs=" -lcrypt "
 cat > conftest.$ac_ext <<EOF
-#line 7133 "configure"
+#line 7159 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -7140,7 +7166,7 @@
 crypt()
 ; return 0; }
 EOF
-if { (eval echo configure:7144: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:7170: \"$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
@@ -7174,12 +7200,12 @@
   fi
     test -z "$with_wnn" && { 
 echo $ac_n "checking for jl_dic_list_e in -lwnn""... $ac_c" 1>&6
-echo "configure:7178: checking for jl_dic_list_e in -lwnn" >&5
+echo "configure:7204: 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 7183 "configure"
+#line 7209 "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
@@ -7190,7 +7216,7 @@
 jl_dic_list_e()
 ; return 0; }
 EOF
-if { (eval echo configure:7194: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:7220: \"$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
@@ -7227,12 +7253,12 @@
  fi
     
 echo $ac_n "checking for jl_fi_dic_list in -lwnn""... $ac_c" 1>&6
-echo "configure:7231: checking for jl_fi_dic_list in -lwnn" >&5
+echo "configure:7257: 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 7236 "configure"
+#line 7262 "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
@@ -7243,7 +7269,7 @@
 jl_fi_dic_list()
 ; return 0; }
 EOF
-if { (eval echo configure:7247: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:7273: \"$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
@@ -7275,15 +7301,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:7279: checking for canna/RK.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 7282 "configure"
+echo "configure:7305: checking for canna/RK.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 7308 "configure"
 #include "confdefs.h"
 #include <canna/RK.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7287: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7313: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -7306,12 +7332,12 @@
  }
   test -z "$with_canna" && { 
 echo $ac_n "checking for RkBgnBun in -lRKC""... $ac_c" 1>&6
-echo "configure:7310: checking for RkBgnBun in -lRKC" >&5
+echo "configure:7336: 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 7315 "configure"
+#line 7341 "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
@@ -7322,7 +7348,7 @@
 RkBgnBun()
 ; return 0; }
 EOF
-if { (eval echo configure:7326: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:7352: \"$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
@@ -7345,12 +7371,12 @@
  }
   test -z "$with_canna" && { 
 echo $ac_n "checking for jrKanjiControl in -lcanna""... $ac_c" 1>&6
-echo "configure:7349: checking for jrKanjiControl in -lcanna" >&5
+echo "configure:7375: 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 7354 "configure"
+#line 7380 "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
@@ -7361,7 +7387,7 @@
 jrKanjiControl()
 ; return 0; }
 EOF
-if { (eval echo configure:7365: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:7391: \"$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
@@ -7461,10 +7487,10 @@
 for ac_func in acosh asinh atanh cbrt closedir dup2 eaccess fmod fpathconf frexp ftime gethostname getpagesize gettimeofday getcwd getwd logb lrand48 matherr mkdir mktime perror poll random rename res_init rint rmdir select setitimer setpgid setlocale setsid sigblock sighold sigprocmask strcasecmp strerror tzset ulimit usleep utimes waitpid
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:7465: checking for $ac_func" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 7468 "configure"
+echo "configure:7491: checking for $ac_func" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 7494 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -7487,7 +7513,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:7491: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:7517: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -7524,10 +7550,10 @@
     for ac_func in realpath
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:7528: checking for $ac_func" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 7531 "configure"
+echo "configure:7554: checking for $ac_func" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 7557 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -7550,7 +7576,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:7554: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:7580: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -7583,16 +7609,16 @@
 esac
 
 echo $ac_n "checking whether netdb declares h_errno""... $ac_c" 1>&6
-echo "configure:7587: checking whether netdb declares h_errno" >&5
-cat > conftest.$ac_ext <<EOF
-#line 7589 "configure"
+echo "configure:7613: checking whether netdb declares h_errno" >&5
+cat > conftest.$ac_ext <<EOF
+#line 7615 "configure"
 #include "confdefs.h"
 #include <netdb.h>
 int main() {
 return h_errno;
 ; return 0; }
 EOF
-if { (eval echo configure:7596: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:7622: \"$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
@@ -7612,16 +7638,16 @@
 rm -f conftest*
 
 echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6
-echo "configure:7616: checking for sigsetjmp" >&5
-cat > conftest.$ac_ext <<EOF
-#line 7618 "configure"
+echo "configure:7642: checking for sigsetjmp" >&5
+cat > conftest.$ac_ext <<EOF
+#line 7644 "configure"
 #include "confdefs.h"
 #include <setjmp.h>
 int main() {
 sigjmp_buf bar; sigsetjmp (bar, 0);
 ; return 0; }
 EOF
-if { (eval echo configure:7625: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7651: \"$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
@@ -7641,11 +7667,11 @@
 rm -f conftest*
 
 echo $ac_n "checking whether localtime caches TZ""... $ac_c" 1>&6
-echo "configure:7645: checking whether localtime caches TZ" >&5
+echo "configure:7671: checking whether localtime caches TZ" >&5
 
 if test "$ac_cv_func_tzset" = "yes"; then
 cat > conftest.$ac_ext <<EOF
-#line 7649 "configure"
+#line 7675 "configure"
 #include "confdefs.h"
 #include <time.h>
 #if STDC_HEADERS
@@ -7680,7 +7706,7 @@
   exit (0);
 }
 EOF
-if { (eval echo configure:7684: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
+if { (eval echo configure:7710: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
 then
   emacs_cv_localtime_cache=no
 else
@@ -7709,9 +7735,9 @@
 
 if test "$HAVE_TIMEVAL" = "yes"; then
 echo $ac_n "checking whether gettimeofday cannot accept two arguments""... $ac_c" 1>&6
-echo "configure:7713: checking whether gettimeofday cannot accept two arguments" >&5
-cat > conftest.$ac_ext <<EOF
-#line 7715 "configure"
+echo "configure:7739: checking whether gettimeofday cannot accept two arguments" >&5
+cat > conftest.$ac_ext <<EOF
+#line 7741 "configure"
 #include "confdefs.h"
 
 #ifdef TIME_WITH_SYS_TIME
@@ -7733,7 +7759,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:7737: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:7763: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   echo "$ac_t""no" 1>&6
 else
@@ -7755,19 +7781,19 @@
 
 
 echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:7759: checking for inline" >&5
+echo "configure:7785: checking for inline" >&5
 
 ac_cv_c_inline=no
 for ac_kw in inline __inline__ __inline; do
   cat > conftest.$ac_ext <<EOF
-#line 7764 "configure"
+#line 7790 "configure"
 #include "confdefs.h"
 
 int main() {
 } $ac_kw foo() {
 ; return 0; }
 EOF
-if { (eval echo configure:7771: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7797: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_inline=$ac_kw; break
 else
@@ -7817,17 +7843,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:7821: checking for working alloca.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 7824 "configure"
+echo "configure:7847: checking for working alloca.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 7850 "configure"
 #include "confdefs.h"
 #include <alloca.h>
 int main() {
 char *p = alloca(2 * sizeof(int));
 ; return 0; }
 EOF
-if { (eval echo configure:7831: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:7857: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   ac_cv_header_alloca_h=yes
 else
@@ -7851,10 +7877,10 @@
 fi
 
 echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:7855: checking for alloca" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 7858 "configure"
+echo "configure:7881: checking for alloca" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 7884 "configure"
 #include "confdefs.h"
 
 #ifdef __GNUC__
@@ -7877,7 +7903,7 @@
 char *p = (char *) alloca(1);
 ; return 0; }
 EOF
-if { (eval echo configure:7881: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:7907: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   ac_cv_func_alloca_works=yes
 else
@@ -7916,10 +7942,10 @@
 
 
 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:7920: checking whether alloca needs Cray hooks" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 7923 "configure"
+echo "configure:7946: checking whether alloca needs Cray hooks" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 7949 "configure"
 #include "confdefs.h"
 #if defined(CRAY) && ! defined(CRAY2)
 webecray
@@ -7943,10 +7969,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:7947: checking for $ac_func" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 7950 "configure"
+echo "configure:7973: checking for $ac_func" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 7976 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -7969,7 +7995,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:7973: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:7999: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -7999,10 +8025,10 @@
 fi
 
 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:8003: checking stack direction for C alloca" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 8006 "configure"
+echo "configure:8029: checking stack direction for C alloca" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 8032 "configure"
 #include "confdefs.h"
 find_stack_direction ()
 {
@@ -8021,7 +8047,7 @@
   exit (find_stack_direction() < 0);
 }
 EOF
-if { (eval echo configure:8025: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
+if { (eval echo configure:8051: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
 then
   ac_cv_c_stack_direction=1
 else
@@ -8049,15 +8075,15 @@
 
 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
-echo "configure:8053: checking for vfork.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 8056 "configure"
+echo "configure:8079: checking for vfork.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 8082 "configure"
 #include "confdefs.h"
 #include <vfork.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8061: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8087: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -8085,10 +8111,10 @@
 fi
 
 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
-echo "configure:8089: checking for working vfork" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 8092 "configure"
+echo "configure:8115: checking for working vfork" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 8118 "configure"
 #include "confdefs.h"
 /* Thanks to Paul Eggert for this test.  */
 #include <stdio.h>
@@ -8183,7 +8209,7 @@
   }
 }
 EOF
-if { (eval echo configure:8187: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
+if { (eval echo configure:8213: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
 then
   ac_cv_func_vfork_works=yes
 else
@@ -8208,10 +8234,10 @@
 
 
 echo $ac_n "checking for working strcoll""... $ac_c" 1>&6
-echo "configure:8212: checking for working strcoll" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 8215 "configure"
+echo "configure:8238: checking for working strcoll" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 8241 "configure"
 #include "confdefs.h"
 #include <string.h>
 main ()
@@ -8221,7 +8247,7 @@
 	strcoll ("123", "456") >= 0);
 }
 EOF
-if { (eval echo configure:8225: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
+if { (eval echo configure:8251: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
 then
   ac_cv_func_strcoll_works=yes
 else
@@ -8248,10 +8274,10 @@
 for ac_func in getpgrp
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:8252: checking for $ac_func" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 8255 "configure"
+echo "configure:8278: checking for $ac_func" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 8281 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -8274,7 +8300,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:8278: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:8304: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -8302,10 +8328,10 @@
 done
 
 echo $ac_n "checking whether getpgrp takes no argument""... $ac_c" 1>&6
-echo "configure:8306: checking whether getpgrp takes no argument" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 8309 "configure"
+echo "configure:8332: checking whether getpgrp takes no argument" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 8335 "configure"
 #include "confdefs.h"
 
 /*
@@ -8360,7 +8386,7 @@
 }
 
 EOF
-if { (eval echo configure:8364: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
+if { (eval echo configure:8390: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
 then
   ac_cv_func_getpgrp_void=yes
 else
@@ -8386,10 +8412,10 @@
 
 
 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:8390: checking for working mmap" >&5
+echo "configure:8416: checking for working mmap" >&5
 case "$opsys" in ultrix* ) have_mmap=no ;; *)
 cat > conftest.$ac_ext <<EOF
-#line 8393 "configure"
+#line 8419 "configure"
 #include "confdefs.h"
 #include <stdio.h>
 #include <unistd.h>
@@ -8422,7 +8448,7 @@
   return 1;
 }
 EOF
-if { (eval echo configure:8426: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
+if { (eval echo configure:8452: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
 then
   have_mmap=yes
 else
@@ -8456,15 +8482,15 @@
 
 ac_safe=`echo "termios.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for termios.h""... $ac_c" 1>&6
-echo "configure:8460: checking for termios.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 8463 "configure"
+echo "configure:8486: checking for termios.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 8489 "configure"
 #include "confdefs.h"
 #include <termios.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8468: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8494: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -8507,15 +8533,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:8511: checking for termio.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 8514 "configure"
+echo "configure:8537: checking for termio.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 8540 "configure"
 #include "confdefs.h"
 #include <termio.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8519: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8545: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -8547,10 +8573,10 @@
 
 
 echo $ac_n "checking for socket""... $ac_c" 1>&6
-echo "configure:8551: checking for socket" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 8554 "configure"
+echo "configure:8577: checking for socket" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 8580 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char socket(); below.  */
@@ -8573,7 +8599,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:8577: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:8603: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_socket=yes"
 else
@@ -8588,15 +8614,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:8592: checking for netinet/in.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 8595 "configure"
+echo "configure:8618: checking for netinet/in.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 8621 "configure"
 #include "confdefs.h"
 #include <netinet/in.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8600: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8626: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -8613,15 +8639,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:8617: checking for arpa/inet.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 8620 "configure"
+echo "configure:8643: checking for arpa/inet.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 8646 "configure"
 #include "confdefs.h"
 #include <arpa/inet.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8625: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8651: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -8646,9 +8672,9 @@
 }
 
       echo $ac_n "checking "for sun_len member in struct sockaddr_un"""... $ac_c" 1>&6
-echo "configure:8650: checking "for sun_len member in struct sockaddr_un"" >&5
+echo "configure:8676: checking "for sun_len member in struct sockaddr_un"" >&5
       cat > conftest.$ac_ext <<EOF
-#line 8652 "configure"
+#line 8678 "configure"
 #include "confdefs.h"
 
 #include <sys/types.h>
@@ -8659,7 +8685,7 @@
 static struct sockaddr_un x; x.sun_len = 1;
 ; return 0; }
 EOF
-if { (eval echo configure:8663: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:8689: \"$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
@@ -8690,10 +8716,10 @@
 
 
 echo $ac_n "checking for msgget""... $ac_c" 1>&6
-echo "configure:8694: checking for msgget" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 8697 "configure"
+echo "configure:8720: checking for msgget" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 8723 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char msgget(); below.  */
@@ -8716,7 +8742,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:8720: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:8746: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_msgget=yes"
 else
@@ -8731,15 +8757,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:8735: checking for sys/ipc.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 8738 "configure"
+echo "configure:8761: checking for sys/ipc.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 8764 "configure"
 #include "confdefs.h"
 #include <sys/ipc.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8743: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8769: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -8756,15 +8782,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:8760: checking for sys/msg.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 8763 "configure"
+echo "configure:8786: checking for sys/msg.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 8789 "configure"
 #include "confdefs.h"
 #include <sys/msg.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8768: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8794: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -8802,15 +8828,15 @@
 
 ac_safe=`echo "dirent.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for dirent.h""... $ac_c" 1>&6
-echo "configure:8806: checking for dirent.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 8809 "configure"
+echo "configure:8832: checking for dirent.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 8835 "configure"
 #include "confdefs.h"
 #include <dirent.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8814: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8840: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -8837,15 +8863,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:8841: checking for sys/dir.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 8844 "configure"
+echo "configure:8867: checking for sys/dir.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 8870 "configure"
 #include "confdefs.h"
 #include <sys/dir.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8849: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8875: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -8878,15 +8904,15 @@
 
 ac_safe=`echo "nlist.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for nlist.h""... $ac_c" 1>&6
-echo "configure:8882: checking for nlist.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 8885 "configure"
+echo "configure:8908: checking for nlist.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 8911 "configure"
 #include "confdefs.h"
 #include <nlist.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8890: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8916: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -8927,7 +8953,7 @@
 
 
 echo "checking "for sound support"" 1>&6
-echo "configure:8931: checking "for sound support"" >&5
+echo "configure:8957: checking "for sound support"" >&5
 case "$with_sound" in
   native | both ) with_native_sound=yes;;
   nas    | no   ) with_native_sound=no;;
@@ -8938,15 +8964,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:8942: checking for multimedia/audio_device.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 8945 "configure"
+echo "configure:8968: checking for multimedia/audio_device.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 8971 "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:8950: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8976: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -8994,12 +9020,12 @@
       if test -z "$native_sound_lib"; then
         
 echo $ac_n "checking for ALopenport in -laudio""... $ac_c" 1>&6
-echo "configure:8998: checking for ALopenport in -laudio" >&5
+echo "configure:9024: 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 9003 "configure"
+#line 9029 "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
@@ -9010,7 +9036,7 @@
 ALopenport()
 ; return 0; }
 EOF
-if { (eval echo configure:9014: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:9040: \"$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
@@ -9041,12 +9067,12 @@
       if test -z "$native_sound_lib"; then
 	
 echo $ac_n "checking for AOpenAudio in -lAlib""... $ac_c" 1>&6
-echo "configure:9045: checking for AOpenAudio in -lAlib" >&5
+echo "configure:9071: 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 9050 "configure"
+#line 9076 "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
@@ -9057,7 +9083,7 @@
 AOpenAudio()
 ; return 0; }
 EOF
-if { (eval echo configure:9061: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:9087: \"$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
@@ -9095,15 +9121,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:9099: checking for ${dir}/soundcard.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 9102 "configure"
+echo "configure:9125: checking for ${dir}/soundcard.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 9128 "configure"
 #include "confdefs.h"
 #include <${dir}/soundcard.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:9107: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:9133: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -9173,7 +9199,7 @@
  fi
   libs_x="-laudio $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-laudio\" to \$libs_x"; fi
       cat > conftest.$ac_ext <<EOF
-#line 9177 "configure"
+#line 9203 "configure"
 #include "confdefs.h"
 #include <audio/Xtutil.h>
 EOF
@@ -9200,7 +9226,7 @@
 
 if test "$with_tty" = "yes"  ; then
   echo "checking for TTY-related features" 1>&6
-echo "configure:9204: checking for TTY-related features" >&5
+echo "configure:9230: checking for TTY-related features" >&5
   { test "$extra_verbose" = "yes" && cat << \EOF
     Defining HAVE_TTY
 EOF
@@ -9216,12 +9242,12 @@
     if test -z "$with_ncurses"; then
     
 echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
-echo "configure:9220: checking for tgetent in -lncurses" >&5
+echo "configure:9246: 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 9225 "configure"
+#line 9251 "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
@@ -9232,7 +9258,7 @@
 tgetent()
 ; return 0; }
 EOF
-if { (eval echo configure:9236: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:9262: \"$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
@@ -9265,15 +9291,15 @@
 
     ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
-echo "configure:9269: checking for ncurses/curses.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 9272 "configure"
+echo "configure:9295: checking for ncurses/curses.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 9298 "configure"
 #include "confdefs.h"
 #include <ncurses/curses.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:9277: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:9303: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -9295,15 +9321,15 @@
 
     ac_safe=`echo "ncurses/term.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for ncurses/term.h""... $ac_c" 1>&6
-echo "configure:9299: checking for ncurses/term.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 9302 "configure"
+echo "configure:9325: checking for ncurses/term.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 9328 "configure"
 #include "confdefs.h"
 #include <ncurses/term.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:9307: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:9333: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -9333,15 +9359,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:9337: checking for ncurses/curses.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 9340 "configure"
+echo "configure:9363: checking for ncurses/curses.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 9366 "configure"
 #include "confdefs.h"
 #include <ncurses/curses.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:9345: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:9371: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -9376,12 +9402,12 @@
 	for lib in curses termlib termcap; do
 	  
 echo $ac_n "checking for tgetent in -l$lib""... $ac_c" 1>&6
-echo "configure:9380: checking for tgetent in -l$lib" >&5
+echo "configure:9406: 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 9385 "configure"
+#line 9411 "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
@@ -9392,7 +9418,7 @@
 tgetent()
 ; return 0; }
 EOF
-if { (eval echo configure:9396: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:9422: \"$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
@@ -9423,12 +9449,12 @@
       else
 	
 echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6
-echo "configure:9427: checking for tgetent in -lcurses" >&5
+echo "configure:9453: 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 9432 "configure"
+#line 9458 "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
@@ -9439,7 +9465,7 @@
 tgetent()
 ; return 0; }
 EOF
-if { (eval echo configure:9443: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:9469: \"$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
@@ -9457,12 +9483,12 @@
 else
   echo "$ac_t""no" 1>&6
 echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
-echo "configure:9461: checking for tgetent in -ltermcap" >&5
+echo "configure:9487: 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 9466 "configure"
+#line 9492 "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
@@ -9473,7 +9499,7 @@
 tgetent()
 ; return 0; }
 EOF
-if { (eval echo configure:9477: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:9503: \"$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
@@ -9521,15 +9547,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:9525: checking for gpm.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 9528 "configure"
+echo "configure:9551: checking for gpm.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 9554 "configure"
 #include "confdefs.h"
 #include <gpm.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:9533: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:9559: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -9552,12 +9578,12 @@
  }
   test -z "$with_gpm" && { 
 echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
-echo "configure:9556: checking for Gpm_Open in -lgpm" >&5
+echo "configure:9582: 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 9561 "configure"
+#line 9587 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -9568,7 +9594,7 @@
 Gpm_Open()
 ; return 0; }
 EOF
-if { (eval echo configure:9572: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:9598: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -9617,17 +9643,17 @@
 
 
 echo "checking for database support" 1>&6
-echo "configure:9621: checking for database support" >&5
+echo "configure:9647: 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:9626: checking for dbm_open in -lgdbm" >&5
+echo "configure:9652: 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 9631 "configure"
+#line 9657 "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
@@ -9638,7 +9664,7 @@
 dbm_open()
 ; return 0; }
 EOF
-if { (eval echo configure:9642: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:9668: \"$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
@@ -9660,10 +9686,10 @@
 
   if test "$with_database_gnudbm" != "yes"; then
     echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
-echo "configure:9664: checking for dbm_open" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 9667 "configure"
+echo "configure:9690: checking for dbm_open" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 9693 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char dbm_open(); below.  */
@@ -9686,7 +9712,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:9690: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:9716: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_dbm_open=yes"
 else
@@ -9722,10 +9748,10 @@
 
 if test "$with_database_dbm" != "no"; then
   echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
-echo "configure:9726: checking for dbm_open" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 9729 "configure"
+echo "configure:9752: checking for dbm_open" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 9755 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char dbm_open(); below.  */
@@ -9748,7 +9774,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:9752: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:9778: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_dbm_open=yes"
 else
@@ -9769,12 +9795,12 @@
   if test "$need_libdbm" != "no"; then
     
 echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
-echo "configure:9773: checking for dbm_open in -ldbm" >&5
+echo "configure:9799: 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 9778 "configure"
+#line 9804 "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
@@ -9785,7 +9811,7 @@
 dbm_open()
 ; return 0; }
 EOF
-if { (eval echo configure:9789: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:9815: \"$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
@@ -9822,10 +9848,10 @@
 
 if test "$with_database_berkdb" != "no"; then
   echo $ac_n "checking for dbopen""... $ac_c" 1>&6
-echo "configure:9826: checking for dbopen" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 9829 "configure"
+echo "configure:9852: checking for dbopen" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 9855 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char dbopen(); below.  */
@@ -9848,7 +9874,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:9852: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:9878: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
   rm -rf conftest*
   eval "ac_cv_func_dbopen=yes"
 else
@@ -9869,12 +9895,12 @@
   if test "$need_libdb" != "no"; then
     
 echo $ac_n "checking for dbopen in -ldb""... $ac_c" 1>&6
-echo "configure:9873: checking for dbopen in -ldb" >&5
+echo "configure:9899: 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 9878 "configure"
+#line 9904 "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
@@ -9885,7 +9911,7 @@
 dbopen()
 ; return 0; }
 EOF
-if { (eval echo configure:9889: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:9915: \"$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
@@ -9909,7 +9935,7 @@
   if test "$with_database_berkdb" = "yes"; then
     for path in "db/db.h" "db.h"; do
 cat > conftest.$ac_ext <<EOF
-#line 9913 "configure"
+#line 9939 "configure"
 #include "confdefs.h"
 #ifdef HAVE_INTTYPES_H
 #define __BIT_TYPES_DEFINED__
@@ -9932,7 +9958,7 @@
 
 ; return 0; }
 EOF
-if { (eval echo configure:9936: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:9962: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   db_h_path="$path"; break
 else
@@ -9984,12 +10010,12 @@
 if test "$with_socks" = "yes"; then
   
 echo $ac_n "checking for SOCKSinit in -lsocks""... $ac_c" 1>&6
-echo "configure:9988: checking for SOCKSinit in -lsocks" >&5
+echo "configure:10014: 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 9993 "configure"
+#line 10019 "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
@@ -10000,7 +10026,7 @@
 SOCKSinit()
 ; return 0; }
 EOF
-if { (eval echo configure:10004: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:10030: \"$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
@@ -10207,6 +10233,7 @@
 
 
 
+
 RECURSIVE_MAKE="\$(MAKE) \$(MFLAGS) CC='\$(CC)' CFLAGS='\$(CFLAGS)' LDFLAGS='\$(LDFLAGS)' CPPFLAGS='\$(CPPFLAGS)'"
 
 
@@ -10537,7 +10564,7 @@
 test "$with_workshop" = yes && echo "  Compiling in support for Sun WorkShop."
 test "$with_energize" = yes && echo "  Compiling in support for Lucid Energize (doesn't currently work)."
 test "$with_session"  != no && echo "  Compiling in support for proper session-management."
-case  "$with_menubars" in
+case "$with_menubars" in
   lucid ) echo "  Using Lucid menubars." ;;
   motif ) echo "  Using Motif menubars."
           echo "  *WARNING*  The Motif menubar implementation is currently buggy."
@@ -10555,11 +10582,14 @@
   athena   ) echo "  Using Athena dialog boxes."    ;;
   athena3d ) echo "  Using Athena-3d dialog boxes." ;;
 esac
+test "$with_clash_detection" = yes && \
+  echo "  Clash detection will use \"$lockdir\" for locking files."
 echo "  movemail will use \"$mail_locking\" for locking mail spool files."
 test "$with_pop"	= yes && echo "  Using POP for mail access"
 test "$with_kerberos"	= yes && echo "  Using Kerberos for POP authentication"
 test "$with_hesiod"	= yes && echo "  Using Hesiod to get POP server host"
-
+echo "  The \`Info-default-directory-list' will be initialized from:"
+echo "  INFOPATH=\"`echo $infopath`\""
 test "$use_union_type"     = yes && echo "  Using the union type for Lisp_Objects."
 test "$debug"              = yes && echo "  Compiling in extra code for debugging."
 test "$memory_usage_stats" = yes && echo "  Compiling in code for checking XEmacs memory usage."
@@ -10704,6 +10734,7 @@
 s%@pkgdir@%$pkgdir%g
 s%@statedir@%$statedir%g
 s%@infodir_user_defined@%$infodir_user_defined%g
+s%@infopath@%$infopath%g
 s%@lispdir@%$lispdir%g
 s%@lispdir_user_defined@%$lispdir_user_defined%g
 s%@sitelispdir@%$sitelispdir%g
--- a/configure.in	Mon Aug 13 10:01:24 2007 +0200
+++ b/configure.in	Mon Aug 13 10:02:21 2007 +0200
@@ -255,7 +255,7 @@
 x_includes=NONE
 x_libraries=NONE
 CDPATH=.; export CDPATH
-dnl this will serve for testing if a default value sould be given
+dnl this will serve for testing if a default value should be given
 package_path=NONE
 
 dnl Allow this script to work with zsh, by setting sh emulation options
@@ -327,6 +327,11 @@
 mandir='${prefix}/man/man1'
 infodir='${prefix}/lib/xemacs-${version}/info'
 infodir_user_defined='no'
+dnl BETA NOTE: ! Will you please add to this list?  Nonexistent dirs
+dnl are dropped from the list at runtime, so it is safe to add
+dnl directories to this list that you don't have at home.
+infopath='/usr/info:/usr/local/info:/usr/lib/texmf/doc/info:/usr/local/lib/texmf/doc/info'
+infopath_user_defined='no'
 lispdir='${datadir}/xemacs-${version}/lisp'
 lispdir_user_defined='no'
 sitelispdir='${datadir}/xemacs/site-lisp'
@@ -490,6 +495,20 @@
 			are \`lockf', \`flock', and \`file'.
 --package-path=PATH     Directories to search for packages to dump with xemacs.
                         Defaults to \`$prefix/lib/xemacs/packages:~/.xemacs'.
+--infodir=dir		Directory to install the XEmacs Info manuals and dir in.
+    Defaults to: \`$info_dir'.
+--infopath=PATH		Directories to search for Info documents, info dir
+			and localdir files.  This is used to initialize
+			\`Info-default-directory-list' at dump time.
+			Directories on this path that do not exist in the
+			filesystem will be dropped by the startup code at
+			runtime, so it is safe to specify directories that do
+			not exist in the compilation environment, or that won't
+			exist in the runtime environment. The \"dir\"
+			file in the first existing directory in this list will
+			become the (dir)Top node of the Info tree.
+    Defaults to the value of \`INFOPATH', or:
+    \`$infopath'.
 
 Internationalization options:
 
@@ -547,6 +566,9 @@
   			is system-dependent).
 --with-clash-detection	Use lock files to detect multiple edits of the same file.
 			The default is to not do clash detection.
+--lockdir=dir		The directory to put clash detection files in, such as
+			\`/var/lock/emacs'.
+    Defaults to \`$lockdir'.
 --with-system-malloc	Force use of the system malloc, rather than GNU malloc.
 --with-debug-malloc	Use the debugging malloc package.
 
@@ -567,6 +589,8 @@
 LDFLAGS   Additional linker flags (such as -L/foo)
 LIBS      Additional libraries (such as -lfoo)
 
+INFOPATH  Path to search for Info documentation.
+
 For more details on the install process, consult the INSTALL file.
 "
 
@@ -872,8 +896,8 @@
 
 	dnl Has the user specified one of the path options?
 	prefix | exec_prefix | bindir | datadir | statedir | libdir | \
-	mandir | infodir | lispdir | etcdir | lockdir | pkgdir | archlibdir | \
-	sitelispdir | docdir )
+	mandir | infodir | infopath | lispdir | etcdir | lockdir | pkgdir | \
+	 archlibdir | sitelispdir | docdir )
 	   dnl If the value was omitted, get it from the next argument.
 	   if test "$valomitted" = "yes"; then
 	     if test "$#" = 0; then
@@ -891,6 +915,7 @@
              lispdir ) lispdir_user_defined=yes ;;
              etcdir  )  etcdir_user_defined=yes ;;
              infodir ) infodir_user_defined=yes ;;
+             infopath ) infopath_user_defined=yes ;;
              datadir ) lispdir_user_defined=yes etcdir_user_defined=yes ;;
              statedir | lockdir ) lockdir_user_defined=yes ;;
              exec_prefix | libdir | archlibdir ) archlibdir_user_defined=yes ;;
@@ -935,6 +960,10 @@
 dnl Finish options processing
 dnl -------------------------
 
+if test "$infopath_user_defined" = "no" -a -n "$INFOPATH" ; then
+  infopath="$INFOPATH"
+fi
+
 dnl Get the arguments back.  See the diatribe on Shell Magic above.
 eval set x "$quoted_arguments"; shift
 
@@ -1848,7 +1877,7 @@
   dnl Should we take debugging options into consideration?
   if   test "$GCC" = "yes"; then
     CFLAGS="-g -O2 -Wall -Wno-switch"
-    test "$opsys" = "linux" -a "$machine" = "intel386" && \
+    test "$opsys $machine" = "linux intel386" && \
       CFLAGS="$CFLAGS -fno-strength-reduce -malign-loops=2 -malign-jumps=2 -malign-functions=2"
   elif test "$__sunpro_c" = "yes"; then
     case "$opsys" in
@@ -3352,6 +3381,7 @@
 AC_SUBST(mandir)
 AC_SUBST(infodir)
 AC_SUBST(infodir_user_defined)
+AC_SUBST(infopath)
 AC_SUBST(lispdir)
 AC_SUBST(lispdir_user_defined)
 AC_SUBST(sitelispdir)
@@ -3539,7 +3569,7 @@
 test "$with_workshop" = yes && echo "  Compiling in support for Sun WorkShop."
 test "$with_energize" = yes && echo "  Compiling in support for Lucid Energize (doesn't currently work)."
 test "$with_session"  != no && echo "  Compiling in support for proper session-management."
-case  "$with_menubars" in
+case "$with_menubars" in
   lucid ) echo "  Using Lucid menubars." ;;
   motif ) echo "  Using Motif menubars."
           echo "  *WARNING*  The Motif menubar implementation is currently buggy."
@@ -3557,11 +3587,14 @@
   athena   ) echo "  Using Athena dialog boxes."    ;;
   athena3d ) echo "  Using Athena-3d dialog boxes." ;;
 esac
+test "$with_clash_detection" = yes && \
+  echo "  Clash detection will use \"$lockdir\" for locking files."
 echo "  movemail will use \"$mail_locking\" for locking mail spool files."
 test "$with_pop"	= yes && echo "  Using POP for mail access"
 test "$with_kerberos"	= yes && echo "  Using Kerberos for POP authentication"
 test "$with_hesiod"	= yes && echo "  Using Hesiod to get POP server host"
-
+echo "  The \`Info-default-directory-list' will be initialized from:"
+echo "  INFOPATH=\"`echo $infopath`\""
 test "$use_union_type"     = yes && echo "  Using the union type for Lisp_Objects."
 test "$debug"              = yes && echo "  Compiling in extra code for debugging."
 test "$memory_usage_stats" = yes && echo "  Compiling in code for checking XEmacs memory usage."
--- a/etc/BETA	Mon Aug 13 10:01:24 2007 +0200
+++ b/etc/BETA	Mon Aug 13 10:02:21 2007 +0200
@@ -31,8 +31,8 @@
 and the usual SmartList commands work.  Do not send mailing list
 requests to the main address (xemacs-beta@xemacs.org), always send
 them to xemacs-beta-request@xemacs.org.  If you have problems with the
-list itself, they should be brought to the attention of the Mailing
-List manager Chuck Thompson <cthomp@xemacs.org>.
+list itself, they should be brought to the attention of the XEmacs
+Mailing List manager Steve Baur <steve@xemacs.org>.
 
 
 ** Beta Release Schedule
@@ -45,10 +45,6 @@
 release time is generally in the vicinity of 8PM to Midnight US
 Pacific Time on the listed day.
 
-While 19.15 and 20.x are in parallel development, a simultaneous
-release day implies a release of 20.x first, followed a few hours
-later by 19.15.
-
 Betas are nominally a week apart, scheduled on every Saturday.
 Midweek releases are made when a serious enough problem warrants it.
 
@@ -57,7 +53,7 @@
 =====================
 
 The best way to get problems fixed in XEmacs is to submit good problem
-reports.  Since this is beta software problems are certain to exist.
+reports.  Since this is beta software, problems are certain to exist.
 Please read through all of part II of the XEmacs FAQ for an overview
 of problem reporting.  Other items which are most important are:
 
@@ -70,7 +66,7 @@
     problem is actually occurring.
  
 2.  Attempt to recreate the problem starting with an invocation of
-    XEmacs with `xemacs -q -no-site-file'.  Quite often problems are
+    XEmacs with `xemacs -q -no-site-file'.  Quite often, problems are
     due to package interdependencies, and the like.  An actual bug in
     XEmacs should be reproducible in a default configuration without
     loading any special packages (or the one or two specific packages
@@ -100,21 +96,21 @@
 
 $ gunzip -c /tmp/xemacs-20.4-b10-20.4-b11.patch.gz | patch -p1
 
-After patching check to see that no patches were missed by doing
+After patching, check to see that no patches were missed by doing
 $ find . -name \*.rej -print
 
 Any rejections should be treated as serious problems to be resolved
-before starting compilation.
+before building XEmacs.
 
 After seeing that there were no rejections, issue the commands
 
 $ ./config.status --recheck
 $ make beta
 
-and go play minesweep for awhile on an older XEmacs while the binary
+and go play minesweep for a while on an older XEmacs while the binary
 is rebuilt.
 
-** Building an XEmacs from a full distribution
+** Building XEmacs from a full distribution
 ==============================================
 
 Locate a convenient place where you have at least 100MB of free space
@@ -122,25 +118,27 @@
 
 $ gunzip -c /tmp/xemacs-20.4-b11.tar.gz | tar xvf -
 
-(or the simpler `tar zxvf /tmp/xemacs-20.4-b11.tar.gz' if you use GNU
-tar).
+(or simply `tar zxvf /tmp/xemacs-20.4-b11.tar.gz' if you use GNU tar).
 
 cd to the top level directory and issue an appropriate configure
-command.  The maintainer uses the following at the time of this
+command.  One maintainer uses the following at the time of this
 writing:
 
-./configure --with-offix --with-mule=yes --with-dialogs=athena3d \
+./configure \
 	--cflags="-m486 -g -O4 -fno-strength-reduce -malign-loops=2 \
-	-malign-jumps=2 -malign-functions=2" --with-sound=no \
-	--with-xface=yes --error-checking=all --debug=yes \
-	--with-scrollbars=athena3d \
-	--with-canna=yes --with-wnn=yes --wnn-includes=/usr/X11R6/include/wnn
+		  -malign-jumps=2 -malign-functions=2" \
+        --with-sound=no --with=offix \
+	--error-checking=all --debug=yes \
+	--with-scrollbars=athena3d --with-dialogs=athena3d \
+	--with-mule --with-canna --with-wnn
 
-Save the output from configure that looks something like:
+Part of the configure output is a summary that looks something like:
+
 Configured for `i586-unknown-linux2.0.28'.
 
-  Where should the build process find the source code?    /usr/src/xemacs-20.0
+  Where should the build process find the source code?    /usr/src/xemacs-20.4
   What installation prefix should install use?            /usr/local
+  Where should XEmacs look for packages?		  ~/.xemacs:/usr/local/lib/xemacs/packages
   What operating system and machine description files should XEmacs use?
         `s/linux.h' and `m/intel386.h'
   What compiler should XEmacs be built with?              gcc -m486 -g -O4 -fno-strength-reduce -malign-loops=2 -malign-jumps=2 -malign-functions=2
@@ -150,14 +148,17 @@
   Where do we find X Windows header files?                /usr/X11R6/include
   Where do we find X Windows libraries?                   /usr/X11R6/lib
   Compiling in support for XAUTH.
-  Compiling in support for XPM.
-  Compiling in support for X-Face headers.
   Compiling in support for GIF image conversion.
+  Compiling in support for XPM images.
+  Compiling in support for X-Face message headers.
   Compiling in support for JPEG image conversion.
   Compiling in support for PNG image conversion.
+  Compiling in support for TIFF image conversion (not implemented).
   Compiling in support for Berkeley DB.
   Compiling in support for GNU DBM.
   Compiling in Mule (multi-lingual) support.
+  Compiling in support for the WNN input method on Mule.
+    Using WNN version 6.
   Compiling in support for OffiX.
   Using the Lucid menubar.
   Using the Athena-3d scrollbar.
@@ -181,7 +182,7 @@
 4. The configuration report illustrated above
 
    For convenience all of the above items are placed in a file called
-   `Installation' in the top level source directory.
+   `Installation' in the top level build directory.
 
 5. Any other unusual items you feel should be brought to the attention
    of the developers.
@@ -189,11 +190,10 @@
 ** Creating patches for submission
 ==================================
 
-When making patches you should use the `-c', or preferably if your
-diff supports it, `-u'.  Using ordinary diffs like this are
-notoriously prone to error (and this one won't in fact work, since
-I've already applied a patch to this file so the line numbers probably
-don't match up any more).
+When making patches you should use the `-c' option, or preferably, if
+your diff supports it, `-u'.  Using ordinary (context-free) diffs are
+notoriously prone to error, since line numbers tend to change when
+others make changes to the same source file.
 
 $ diff -u old-file.c new-file.c
 
@@ -201,16 +201,19 @@
 
 $ diff -c old-file.c new-file.c
 
-Also, it is helpful for me if you create the patch in the top level of
-the XEmacs source directory:
+Also, it is helpful if you create the patch in the top level of the
+XEmacs source directory:
 
-$ diff -u lwlib/xlwmenu.c~ lwlib/xlwmenu.c
+$ cp -p lwlib/xlwmenu.c lwlib/xlwmenu.c.orig
+  hack, hack, hack....
+$ diff -u lwlib/xlwmenu.c.orig lwlib/xlwmenu.c
 
-I prefer patches to be accompanied by an update (either a raw entry or
-a patch) to the appropriate ChangeLog file, but it is not required.
+It is preferrable for patches to be accompanied by an update (raw
+entry preferred) to the appropriate ChangeLog file.
 
 Also note that if you cut & paste from an xterm to an XEmacs mail buffer
-you will probably lose due to tab expansion.  The best thing to do is to
+you will probably lose due to tab expansion.  The best thing to do is
+to use an XEmacs shell buffer to run the diff commands, or ...
 M-x cd to the appropriate directory, and issue the command `C-u M-!' from
 within XEmacs.
 
@@ -222,9 +225,9 @@
 Packages are searched by default under /usr/local/lib/xemacs/packages/.
 The summary message in configure will tell you where XEmacs is looking 
 for them.  The packages hierarchy differs from site-lisp in that you
-do not have install XEmacs to use it, indeed, the package path is
+do not have to install XEmacs to use it.  Indeed, the package path is
 searched prior to dump time so that installed packages have the same
-status as lisp distributed in the xemacs base tarball.
+status as lisp distributed in the xemacs core tarball.
 
 The structure of each directory in the package search path should look
 like the base installed directory (ie. have etc/, info/, and lisp/,).
@@ -255,7 +258,55 @@
 that you can simply untar in a package directory to install.
 
 Karl Hegbloom has a set of packages in
-	[I lost the reference]
+	[sorry - reference has been lost]
 that work the same way.
 
-This is not how package installation will work in released 20.3.
+** Packages directory on the FTP Site
+=====================================
+
+The packages directory
+	ftp://ftp.xemacs.org/pub/xemacs/beta/packages-20.3/
+
+is divided into subdirectory by the major type of package.
+
+drwxr-xr-x   2 beta-f   beta-f      1024 Oct 10 00:43 binary-packages
+drwxr-xr-x   2 beta-f   beta-f       512 Oct 10 00:44 package-sources
+drwxr-xr-x   2 beta-f   beta-f       512 Oct  9 23:08 single-file-packages
+drwxr-xr-x   2 beta-f   beta-f       512 Oct 10 00:44 utils
+
+** Support Utilities (utils)
+============================
+
+The utils directory contains tools to deal with current Lisp sources that
+have not had yet gotten XEmacs package integration.  The script `xpackage.sh'
+is used with Quassia Gnus.  Edit the appropriate variables at the top of
+the script to reflect the local configuration and run it in the top level
+directory of a Quassia Gnus source tree to install an update to Quassia Gnus.
+
+** Source Installable Packages (package-sources)
+================================================
+
+This directory contains tarballs of Lisp packages that contain full support
+for installing as an XEmacs package.  To install them, one should untar
+them to someplace convenient (like /var/tmp), and issue the appropriate make
+command to install.
+
+** Binary package installation (binary-packages)
+================================================
+
+Prerequisite:  XEmacs 20.3-beta28.
+
+Binary packages are complete entities that can be untarred at the top
+level of an XEmacs package hierarchy and work at runtime.  To install files
+in this directory, run the command `M-x package-admin-add-binary-package'
+and fill in appropriate values to the prompts.
+
+** Single file package installation
+===================================
+
+Prerequisite:  XEmacs 20.3-beta28.
+
+These are single file, self-contained lisp packages that don't need a
+separate directory.  To install something from this directory, run
+the command `M-x package-admin-add-single-file-package' and fill in the
+prompts.
--- a/etc/MH-E-NEWS	Mon Aug 13 10:01:24 2007 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,144 +0,0 @@
-User-visible changes to mh-e in version 5.0 from 4.1.
-
-   Note: This being a major release, there are many internal changes.
-This document lists only changes to the external interfaces of mh-e.
-
-   When upgrading, you must either explicitly reload the new versions of
-all mh-e files that are already loaded or restart your Emacs.
-
-   mh-e 5.0.1 contains minor changes from mh-e 5.0 to integrate it with
-Emacs 19.29.
-
-   mh-e 5.0.2 contains additional minor changes to integrate it with
-reporter.el (requires reporter.el version 3.1c or later) and Emacs
-19.30.  The mh-goto-msg function is much faster, which also speeds up
-several other operations.
-
-Major Changes and New Features in mh-e
-======================================
-
-   The emphasis for this release has been on consistency and
-documentation.  Many documentation strings were enhanced.
-Documentation strings were changed to comments for internal functions
-and variables.
-
-   There is now proper documentation in the form of a 75-page users
-manual.  The Texinfo source is mh-e.texi; the formatted Info document
-is mh-e.info.
-
-   There is a new command `mh-update-sequences', which updates MH's
-idea of what messages are in the Unseen sequence and what is the current
-folder and message.  `mh-quit' calls it.  While `mh-execute-commands'
-has always done this updating as a side effect, the new function is
-faster.
-
-   The MH profile entry "Inbox:" is supported.
-
-   If the show-buffer is modified, the user is queried before mh-e
-reuses the buffer to show a different message.  This buffer is also
-auto-saved and backed up correctly.
-
-   `mh-store-buffer' is significantly more robust.  It now handles
-messages created by a wide variety of packaging software.  The status
-message for `uudecode' includes the name of the file created.  An error
-is signaled if the subprocess exits with a non-zero status.
-
-   `mh-search-folder' behaves predictably, adding messages found to the
-`search' sequence.  It correctly handles the case of no messages found.
-
-   `mh-burst-digest' (`M-b') now only rescans the part of the folder
-affected by the burst.  It is now much faster in a large folder.
-
-New mh-e Hooks and Customization Variables
-==========================================
-
-   `mh-default-folder-for-message-function': new name for the old
-`mh-msg-folder-hook', which wasn't a hook.  The old name was confusing,
-leading people to think they could use `add-hook' with it, when
-actually `setq' is the correct way.
-
-   `mh-sortm-args': When this variable is used has changed.  Now
-`mh-sortm-args' is passed if there IS a prefix argument to
-`mh-sort-folder'.  The assumption is that for arguments you normally
-want, you would specify them in an MH profile entry.
-
-   `mh-mhn-args': new hook, a list of additional arguments to pass to
-the `mhn' program if `mh-edit-mhn' is given a prefix argument.
-
-   `mh-edit-mhn-hook': new hook called by `mh-edit-mhn', the function
-that formats MIME messages.
-
-   `mh-folder-list-change-hook': new hook, called whenever the cached
-list of folders, `mh-folder-list', is changed.
-
-   `mh-find-path-hook': new hook, called when entering mh-e.
-
-   `mh-repl-formfile': new variable, used to change the format file
-used by `mh-reply' from the default of "replcomps".
-
-   New variables to customize the scan format and notating:
-`mh-note-deleted', `mh-note-refiled', `mh-note-seq', `mh-note-cur',
-`mh-note-copied', `mh-note-printed'.
-
-Key Binding Changes in mh-e
-===========================
-
-   `RET' runs `mh-show' for consistency with the Finder and Info.  The
-old binding `.' still works, but `RET' is now the standard binding.
-
-   `M-<' now runs `mh-first-msg' for consistency with `M->', which runs
-`mh-last-msg'.
-
-   `C-c C-f C-d' in MH-Letter mode moves to a Dcc: header field.
-
-   `C-c C-f C-r' in MH-Letter mode moves to a From: header field.
-
-   `g' is now the standard binding for `mh-goto-msg'.  The old binding
-`j' still works.
-
-Other Improvements and Changes to mh-e
-======================================
-
-   `mh-lpr-command-format' no longer passes the "-p" argument to `lpr'
-by default.  The mail header typically has the date anyway.
-
-   When prompting for a sequence name, if no sequences have been used
-yet, mh-e will offer the first sequence the current message is in.
-
-   The patterns of more mailers are recognized by
-`mh-extract-rejected-mail'.
-
-   `mh-insert-prefix-string' no longer wraps the call to the
-`mail-citation-hook' function in a `save-excursion' so the hook writer
-can choose whether to leave point at the beginning or the end of the
-yanked text.
-
-   `mh-write-msg-to-file': The prompt now refers to "message" or
-"message body" depending on which will be written.  (This is controlled
-by a prefix argument.)  The file defaults to the last-used file instead
-of supplying only the directory name.
-
-   mh-e uses message ranges when running MH commands.  Thus "rmm 1 2 3
-4 6" is now "rmm 1-4 6".  This change makes it less likely to overflow
-system argument list limits, and it might be faster, too.
-
-Bug Fixes to mh-e
-=================
-
-   mh-e's idea of the unseen sequence now stays in sync with MH's
-better.
-
-   Functions that are supposed to find fields in the message header no
-longer look in the message body.
-
-   mh-e would sometimes fail to remove the "%" from a scan line when the
-message was removed from a sequence if the message was also in the
-Previous sequence.
-
-   The variable `mh-inc-prog' is now correctly used in all places.
-
-   `mh-pipe-msg' runs the process in the correct directory.
-
-   A partially scanned folder will no longer lose the "/select"
-annotation when you execute marked deletes and refiles with `x'.
-
--- a/etc/NEWS	Mon Aug 13 10:01:24 2007 +0200
+++ b/etc/NEWS	Mon Aug 13 10:02:21 2007 +0200
@@ -148,16 +148,72 @@
 
 ** Info "dir" functionality merged from Emacs-19.34
 
+  ------------------  DRAFT ------------------
+
+At the time it is dumped, XEmacs will initialize the value of
+`Info-default-directory-list' from the value of the environment
+variable INFOPATH, which it inherits from the Makefile.  The Makefile
+gets the value from `configure'.
+
+ #### BETA Note: if the package startup stuff moves or changes, this
+                 next paragraph may need fixing.
+
+At runtime, the XEmacs startup code will loop through that list and
+collect all of the directories in it that satisfy `file-directory-p',
+and then appends any site package info directories found... ?? How do
+you want this worded? XXXXX !!!! (bright red bold DRAFT)
+
+When you start the info reader, `Info-directory-list' is initialized
+from either the environment variable "INFOPATH", if it exists, or
+`Info-default-directory-list'.  The first directory in this list must
+contain a "dir" file like the one supplied with XEmacs.  Note that if
+an INFOPATH variable is used, that only the directories in that path
+will be searched; no package info paths will be appended, as `Info-
+default-directory-list' will be ignored in that case.
+
 All of the directories on `Info-directory-list' will be searched for
 "dir" files, which may be full fledged Info files containing subnodes
-as well as menus.  They are merged to become one directory, with menus
-in like-named subnodes being coalesced from the several "dir" files.
-
-"localdir" files are looked for too, secondary to "dir"'s.  If there's
-no "dir" in a directory, a "localdir" will be looked for.  There can
-be one of either "dir" or "localdir" in each of the directories in
-`Info-directory-list', which is initialized from `Info-default-
-directory-list', which you may customize through the Options menu.
+as well as menus.  They are merged to become one Info directory, with
+menus in like-named subnodes being coalesced from the several "dir"
+files.
+
+ BETA Note: I have not tested this very thouroughly.  Does anyone out
+ there actually have a dir file with real `info' subnodes in it?  I
+ will create one and try it as I learn how. - karlheg
+
+"localdir" files are looked for also, secondary to "dir"'s. A localdir
+file should look like a section of the Info directory menu:
+
+ |
+ |* Gnus::                The all seeing all knowing News and Mail
+ |                         interface for XEmacs.
+ |* Calc::                HP-48 alike Calculator that can do algebra
+ |
+
+The info reader will insert its contents into the main Info directory
+either at the end of the (dir)Top node, beginning at and replacing a
+line that looks like:
+
+ |
+ |* Locals:
+ |
+
+ BETA-Note:  Coming soon...
+
+ ... or, below a line that contains the exact text:
+
+ |
+ |Locally installed XEmacs Packages
+ |
+
+ ... by default.  (This text is configurable--- see:
+ `M-x customize-variable Info-localdir-heading-regexp'
+
+The `Info-localdir-heading-regexp' may be underlined with *'s, ='s, or
+-'s, like any Info topic header.  When `Info-fontify' is non-nil, the
+underlineing characters will be elided and the topic heading itself
+will be given a face, according to `Info-title-face-alist'.
+
 
 ** Abbreviations can now contain non-word characters.
 
Binary file etc/ajc.xpm.Z has changed
Binary file etc/ajcm.xpm.Z has changed
Binary file etc/pez.xpm.Z has changed
Binary file etc/pezm.xpm.Z has changed
Binary file etc/rickc.xpm.Z has changed
Binary file etc/rickcm.xpm.Z has changed
--- a/info/dir	Mon Aug 13 10:01:24 2007 +0200
+++ b/info/dir	Mon Aug 13 10:02:21 2007 +0200
@@ -61,13 +61,11 @@
 * ILISP::	Multi-dialect inferior LISP interface.
 * Ispell::	Interactive spelling corrector.
 * Mailcrypt::	Emacs interface to cryptographic functions for mail and news.
-* MH-E::	Emacs interface to MH, a mail-handling package.
 * OO-Browser::	The Multi-Language Object-Oriented Browser.
 * PCL-CVS::	An XEmacs-based front end to CVS.
 * PH::		Client interface to the CCSO white pages directory system
 * PSGML::	A powerful mode for HTML and other SGML documents.
 * PSGML-API::	PSGML, the API documentation.
-* Rmail::	An older mail reader for Emacs.
 * Standards::	The GNU coding standards.
 * Supercite::	Lets you cite parts of messages you're replying to.
 * Term::	ANSI-compatible terminal emulator.
--- a/lib-src/ChangeLog	Mon Aug 13 10:01:24 2007 +0200
+++ b/lib-src/ChangeLog	Mon Aug 13 10:02:21 2007 +0200
@@ -1,3 +1,24 @@
+1997-10-10  Martin Buchholz  <mrb@eng.sun.com>
+
+	* config.values.in:  Run config.values.sh
+
+1997-10-09  SL Baur  <steve@altair.xemacs.org>
+
+	* Makefile.in.in (PKG_SCRIPTS): Add new package manipulation
+	scripts.
+
+	* add-little-package.sh: New file.  Support script to install
+	single file packages.
+
+	* Makefile.in.in (distclean): Reverse change -- do not remove
+	config.values.in.
+	Suggested by: Martin Buchholz <mrb@Eng.Sun.COM>
+
+1997-10-06  SL Baur  <steve@altair.xemacs.org>
+
+	* Makefile.in.in (distclean): Remove config.values.in.
+	From Martin Buchholz <mrb@Eng.Sun.COM>
+
 1997-10-04  SL Baur  <steve@altair.xemacs.org>
 
 	* update-autoloads.sh (mule_p): W3 is a package now.
--- a/lib-src/Makefile.in.in	Mon Aug 13 10:01:24 2007 +0200
+++ b/lib-src/Makefile.in.in	Mon Aug 13 10:02:21 2007 +0200
@@ -73,8 +73,10 @@
 
 ## 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)
+GEN_SCRIPTS = rcs2log vcdiff gzip-el.sh install-sid send-pr
+TM_SCRIPTS = tm-au tm-file tm-html tm-image tm-mpeg tm-plain tm-ps tmdecode
+PKG_SCRIPTS = add-little-package.sh add-big-package.sh
+SCRIPTS = $(GEN_SCRIPTS) $(TM_SCRIPTS) $(PKG_SCRIPTS)
 
 EXECUTABLES= ${UTILITIES} ${INSTALLABLES} ${SCRIPTS} ${INSTALLABLE_SCRIPTS}
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lib-src/add-big-package.sh	Mon Aug 13 10:02:21 2007 +0200
@@ -0,0 +1,65 @@
+#! /bin/sh
+# add-big-package.sh --- Add multiple file package to Package Lisp Hierarchy
+# Copyright (C) 1997 Free Software Foundation, Inc.
+
+# Author:	SL Baur <steve@altair.xemacs.org>
+# Maintainer:	SL Baur <steve@altair.xemacs.org>
+# Keywords:	packages 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.
+
+### Commentary:
+
+## This file copies a single lisp file into an XEmacs package hierarchy and
+## performs the necessary magic so that it will be autoloaded at the next
+## dump.
+
+## Parameters:
+##	$1 -- Full path to an XEmacsen later than 20.3
+##	$2 -- Full path to a lisp package tarball to install
+##	$3 -- Full path to a lisp directory in an XEmacs package hierarchy
+##	      This directory will be created if it does not exist.
+##	      NOTE: the directory name should *not* end in a trailing slash
+
+
+### Code:
+
+XEMACS=$1			# Not used at present
+LISP_FILE=$2			# Should be a binary package tarball
+DEST_DIR=$3			# Should be a top level package directory
+
+# Test for valid XEmacs executable and valid input file
+if [ \( ! -f ${LISP_FILE} \) -o \( ! -x ${XEMACS} \) ]; then
+	exit 1
+fi
+
+# Test for destination directory, creating if necessary
+if [ ! -d ${DEST_DIR} ]; then
+	mkdir ${DEST_DIR}
+fi
+
+# Very simple minded extraction for the first cut
+# We'll get more sophisticated later
+cd ${DEST_DIR}
+gunzip -c ${LISP_FILE} | tar xvf -
+
+# Need to refresh the info/dir file, I don't know how to do that.
+
+exit 0
+
+### add-big-package.sh ends here
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lib-src/add-little-package.sh	Mon Aug 13 10:02:21 2007 +0200
@@ -0,0 +1,80 @@
+#! /bin/sh
+# add-little-package.sh --- Add single file package to Package Lisp Hierarchy
+# Copyright (C) 1997 Free Software Foundation, Inc.
+
+# Author:	SL Baur <steve@altair.xemacs.org>
+# Maintainer:	SL Baur <steve@altair.xemacs.org>
+# Keywords:	packages 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.
+
+### Commentary:
+
+## This file copies a single lisp file into an XEmacs package hierarchy and
+## performs the necessary magic so that it will be autoloaded at the next
+## dump.
+
+## Parameters:
+##	$1 -- Full path to an XEmacsen later than 20.3
+##	$2 -- Full path to a lisp file to install
+##	$3 -- Full path to a lisp directory in an XEmacs package hierarchy
+##	      This directory will be created if it does not exist.
+##	      NOTE: the directory name should *not* end in a trailing slash
+
+
+### Code:
+
+XEMACS=$1
+LISP_FILE=$2
+DEST_DIR=$3
+
+# Test for valid XEmacs executable and valid input file
+if [ \( ! -f ${LISP_FILE} \) -o \( ! -x ${XEMACS} \) ]; then
+	exit 1
+fi
+
+# Test for destination directory, creating if necessary
+if [ ! -d ${DEST_DIR} ]; then
+	mkdir ${DEST_DIR}
+fi
+
+cp ${LISP_FILE} ${DEST_DIR}
+${XEMACS} -batch -q -no-site-file -f batch-byte-compile \
+		${DEST_DIR}/`basename ${LISP_FILE}`
+
+# recompute autoloads ...
+${XEMACS} -batch -q -no-site-file -l autoload \
+		-f batch-update-directory ${DEST_DIR}
+# and bytecompile if one was created
+if [ -f ${DEST_DIR}/auto-autoloads.el ]; then
+	${XEMACS} -batch -q -no-site-file -f batch-byte-compile \
+		${DEST_DIR}/auto-autoloads.el
+fi
+
+# recompute custom-loads
+${XEMACS} -batch -q -no-site-file -l cus-dep \
+		-f Custom-make-dependencies ${DEST_DIR}
+# and bytecompile if one was created
+if [ -f ${DEST_DIR}/custom-load.el ]; then
+	${XEMACS} -batch -q -no-site-file -f batch-byte-compile \
+		${DEST_DIR}/custom-load.el
+fi
+
+exit 0
+
+### add-little-package.sh ends here
--- a/lib-src/config.values.in	Mon Aug 13 10:01:24 2007 +0200
+++ b/lib-src/config.values.in	Mon Aug 13 10:02:21 2007 +0200
@@ -30,6 +30,7 @@
 LIBS "@LIBS@"
 LN_S "@LN_S@"
 MAKE_SUBDIR "@MAKE_SUBDIR@"
+OFFIX_O "@OFFIX_O@"
 RANLIB "@RANLIB@"
 RECURSIVE_MAKE "@RECURSIVE_MAKE@"
 SET_MAKE "@SET_MAKE@"
@@ -61,6 +62,7 @@
 includedir "@includedir@"
 infodir "@infodir@"
 infodir_user_defined "@infodir_user_defined@"
+infopath "@infopath@"
 internal_makefile_list "@internal_makefile_list@"
 ld "@ld@"
 ld_libs_all "@ld_libs_all@"
--- a/lisp/ChangeLog	Mon Aug 13 10:01:24 2007 +0200
+++ b/lisp/ChangeLog	Mon Aug 13 10:02:21 2007 +0200
@@ -1,3 +1,242 @@
+1997-10-11  SL Baur  <steve@altair.xemacs.org>
+
+	* prim/startup.el (set-default-load-path): Look for `packages'
+	directory too.
+	(set-default-load-path): Initialize Info-default-directory-list
+	from the environment variable INFOPATH.
+	(set-default-load-path): Initialize Info-default-diretory-list
+	from the configure variable `infopath'.
+
+1997-10-10  Karl M. Hegbloom  <karlheg@inetarena.com>
+
+	* prim/startup.el: (set-default-load-path): loop over the `Info-
+	default-directory-list' and collect those that are `file-
+	directory-p'.
+
+	* '': various doc string corrections.
+
+	* '': changed `auto-saves-file-prefix' to "~/.xemacs/saves-"
+
+	* '' Added toplevel block (when (fboundp 'load-gc) ...to init the
+ 	Info-def..list from the environment variable INFOPATH at dump time.
+	
+	* prim/packages.el (packages-find-packages-1): append the list of
+ 	packages info directories to `Info-default-directory-list' rather
+ 	than prepending them.  Don't add them if they're already in the
+ 	list.
+
+	* packages/info.el (Info-directory-list): various fixes to the
+ 	directory list handling.
+	* (Info-localdir-heading-regexp) added.
+	
+	* '' removed the unrequired defcustom of `Info-default-directory-
+ 	list'
+
+1997-10-11  SL Baur  <steve@altair.xemacs.org>
+
+	* prim/about.el: New faces, new entries.
+
+	* prim/profile.el (profile-results): Rename.
+	(pretty-print-profiling-info): Ditto.
+	From Kyle Jones <kyle_jones@wonderworks.com>
+
+1997-10-10  SL Baur  <steve@altair.xemacs.org>
+
+	* utils/highlight-headers.el (highlight-headers-citation-header-regexp):
+	Correct doc string.
+	From Kazuyoshi Furutaka <furutaka@Flux.tokai.jaeri.go.jp>
+
+1997-10-10  Martin Buchholz  <mrb@eng.sun.com>
+
+	* packages/bookmark.el:
+	* packages/iswitchb.el:
+	* utils/speedbar.el:
+	* utils/xemacs-build-report.el: 
+	  - change Xemacs --> XEmacs
+
+1997-10-09  Colin Rafferty  <craffert@ml.com>
+
+	* modes/lazy-shot.el (lazy-shot-shot-function): Undid a breakage.
+
+1997-10-09  Jens-Ulrik Holger Petersen  <petersen@kurims.kyoto-u.ac.jp>
+
+	* prim/help.el (function-called-at-point): Added docstring.
+	(function-at-point): Ditto.
+	(describe-function-arglist): Commented out -- seems unused.
+	(find-function): ALL find-function stuff moved to "find-func.el"
+
+	* prim/find-func.el: new file created from functions previously in 
+	"help.el".
+
+1997-10-09  SL Baur  <steve@altair.xemacs.org>
+
+	* pcl-cvs/pcl-cvs.el (cvs-changelog-ours-p): Grok new ChangeLog
+	format.
+
+	* prim/startup.el (user-init-directory): New name for
+	`emacs-user-extension-dir'.
+	(load-user-init-file): Use it.
+
+Mon Oct  6 19:12:51 1997  Barry A. Warsaw  <cc-mode-help@python.org>
+
+	* cc-mode/Release 5.19
+
+Mon Oct  6 19:09:17 1997  Barry A. Warsaw  <cc-mode-help@python.org>
+
+	* cc-mode/cc-engine.el (c-guess-basic-syntax):
+	CASE 5F: extern-lang-close relpos should be
+	element 0 of inclass-p, not element 1.
+
+	* cc-mode/cc-cmds.el (c-progress-init, c-progress-fini):
+	Be silent if c-progress-interval
+	is nil.
+
+	* cc-mode/cc-vars.el (c-progress-interval): Document new semantics
+
+Fri Oct  3 23:10:04 1997  Barry A. Warsaw  <cc-mode-help@python.org>
+
+	* cc-mode/cc-engine.el (c-beginning-of-statement-1):
+	Watch out for keywords which have a
+	preceding underscore.
+
+Fri Sep 26 23:30:58 1997  Barry A. Warsaw  <cc-mode-help@python.org>
+
+	* cc-mode/cc-menus.el: Patches to Imenu support given by 
+	"Masatake (jet) YAMATO" <masata-y@is.aist-nara.ac.jp>.
+	(Jan Dubois) jan.dubois@ibm.net
+
+	* cc-mode/cc-cmds.el (c-comment-line-break-function):
+	Fix for when comment starts at
+	comment-column and there is non-whitespace preceding this on the
+	current line.
+
+	* cc-mode/cc-mode.el (c-submit-bug-report): Remove
+	c-recognize-knr-p.  Add c-comment-continuation-stars.
+
+Mon Sep 22 15:47:02 1997  Barry A. Warsaw  <cc-mode-help@python.org>
+
+	* cc-mode/cc-styles.el (c-initialize-builtin-style):
+	Only use copy-tree if it is
+	funcall-able.  This is the right patch, and was given by Erik Naggum
+	<erik@naggum.no>
+
+1997-10-08  SL Baur  <steve@altair.xemacs.org>
+
+	* x11/x-menubar.el (file-menu-filter): Reverse sense of bounds
+	test.
+	From: Didier Verna <verna@inf.enst.fr>
+
+	* prim/format.el (format-annotate-function): Reverse sync to Emacs 
+	19.
+
+1997-10-08  Hrvoje Niksic  <hniksic@srce.hr>
+
+	* prim/profile.el (profile-align): New function.
+
+	* prim/help.el (describe-function): Use `buffer-string' with a
+	BUFFER argument, instead of `save-excursion'+`buffer-string'.
+	(describe-variable): Ditto.
+	(describe-variable): Use `when'.
+
+	* modes/lisp-mode.el: Indent `display-message' and
+	`display-warning' better.
+
+	* prim/help.el: Customized find-function stuff.
+	(help-with-tutorial): Use point-at-{bol,eol}.
+	(with-displaying-help-buffer): Use `with-current-buffer'.
+
+	* prim/keymap.el (event-apply-modifier): Use `vconcat'.
+	(define-prefix-command): Use the NAME argument to
+	`make-sparse-keymap'.
+	(suppress-keymap): Use `incf'.
+
+	* prim/help.el (key-or-menu-binding): Document it.
+
+	* prim/keymap.el (insert-key-binding): Use `key-or-menu-binding'
+	from help.el.
+
+	* prim/help.el (built-in-variable-doc): Use `case'.
+	(describe-function-1): Assign to `file-name' instead of `home'.
+
+	* prim/profile.el (profiling-results): Handle strings correctly.
+
+	* prim/profile.el (profile): Expand FORMS only once.
+
+1997-10-08  Colin Rafferty  <craffert@ml.com>
+
+	* prim/lisp-file-db.el (lookup-lisp-file-db): Made it stop on
+	failure.
+
+1997-10-08  SL Baur  <steve@altair.xemacs.org>
+
+	* prim/lisp-file-db.el: New file.
+	From Raymond Toy <toy@rtp.ericsson.se>
+
+1997-10-08  Colin Rafferty  <craffert@ml.com>
+
+	* modes/lazy-shot.el: Customified.  Made it handle long lines
+	better.
+
+1997-10-08  SL Baur  <steve@altair.xemacs.org>
+
+	* prim/startup.el (load-user-init-file): Remove reference to
+	.xemacs as a file.
+
+1997-10-07  SL Baur  <steve@altair.xemacs.org>
+
+	* utils/thing.el (thing-filename): Deal with point at end of
+	buffer.
+
+1997-10-07  Karl M. Hegbloom  <karlheg@inetarena.com>
+
+	* psgml/psgml.el (sgml-mode-map): modify defin-key statements to
+ 	use the new and improved key designator syntax. Rebound
+ 	'sgml-split-element to a similar key as the global 'split-line
+ 	binding.
+
+1997-10-07  Jens-Ulrik Holger Petersen  <petersen@kurims.kyoto-u.ac.jp>
+
+	* utils/thing.el (thing-symbol): Return nil if `end' is nil.
+
+1997-10-07  Karl M. Hegbloom  <karlheg@inetarena.com>
+
+	* modes/cperl-mode.el: Fixed the help toggle menuitem, and added
+ 	an autoload cookie.
+	* modes/perl-mode.el: ditch the autoload in favor of cperl-mode.
+
+1997-10-07  Jens-Ulrik Holger Petersen  <petersen@kurims.kyoto-u.ac.jp>
+
+	* packages/etags.el (add-to-tag-completion-table): Better support
+ 	for Scheme code.  Parse scheme definitions and identifiers
+ 	with colons correctly.
+
+1997-10-07  SL Baur  <steve@altair.xemacs.org>
+
+	* mule/mule-cmds.el (read-input-method-name): Use a default if
+	available.
+	From Didier Verna <verna@inf.enst.fr>
+
+	* prim/about.el (about-url-alist): Update jwz's home page.
+
+1997-10-07  Hrvoje Niksic  <hniksic@srce.hr>
+
+	* x11/x-menubar.el (default-menubar): Handle pending-delete
+ 	correctly.
+
+1997-10-06  SL Baur  <steve@altair.xemacs.org>
+
+	* utils/font.el: Don't need devices.el on XEmacs.
+
+1997-10-05  SL Baur  <steve@altair.xemacs.org>
+
+	* utils/mail-utils.el (rmail-dont-reply-to-names): Snarf from
+	rmail.el.
+
+1997-10-04  SL Baur  <steve@altair.xemacs.org>
+
+	* efs/dired.el (dired-mail-reader): Default to VM instead of old,
+	broken rmail.
+
 1997-09-29  Karl M. Hegbloom  <karlheg@inetarena.com>
 
 	* prim/files.el (auto-mode-alist): make `.cl' a lisp-mode
--- a/lisp/cc-mode/cc-align.el	Mon Aug 13 10:01:24 2007 +0200
+++ b/lisp/cc-mode/cc-align.el	Mon Aug 13 10:02:21 2007 +0200
@@ -7,7 +7,7 @@
 ;;             1985 Richard M. Stallman
 ;; Maintainer: cc-mode-help@python.org
 ;; Created:    22-Apr-1997 (split from cc-mode.el)
-;; Version:    5.18
+;; Version:    See cc-mode.el
 ;; Keywords:   c languages oop
 
 ;; This file is part of GNU Emacs.
--- a/lisp/cc-mode/cc-cmds.el	Mon Aug 13 10:01:24 2007 +0200
+++ b/lisp/cc-mode/cc-cmds.el	Mon Aug 13 10:02:21 2007 +0200
@@ -7,7 +7,7 @@
 ;;             1985 Richard M. Stallman
 ;; Maintainer: cc-mode-help@python.org
 ;; Created:    22-Apr-1997 (split from cc-mode.el)
-;; Version:    5.18
+;; Version:    See cc-mode.el
 ;; Keywords:   c languages oop
 
 ;; This file is part of GNU Emacs.
@@ -757,7 +757,8 @@
 ;; for proposed new variable comment-line-break-function
 (defun c-comment-line-break-function (&optional soft)
   ;; we currently don't do anything with soft line breaks
-  (let ((literal (c-in-literal)))
+  (let ((literal (c-in-literal))
+	at-comment-col)
     (cond
      ((eq literal 'string))
      ((or (not c-comment-continuation-stars)
@@ -766,6 +767,12 @@
      (t (let ((here (point))
 	      (leader c-comment-continuation-stars))
 	  (back-to-indentation)
+	  ;; comment could be hanging
+	  (if (not (c-in-literal))
+	      (progn
+		(forward-line 1)
+		(forward-comment -1)
+		(setq at-comment-col (= (current-column) comment-column))))
 	  ;; are we looking at a block or lines style comment?
 	  (if (and (looking-at (concat "\\(" c-comment-start-regexp
 				       "\\)[ \t]+"))
@@ -779,6 +786,8 @@
 	  ;; to avoid having an anchored comment that c-indent-line will
 	  ;; trip up on
 	  (insert " " leader)
+	  (if at-comment-col
+	      (indent-for-comment))
 	  (c-indent-line))))))
 
 ;; advice for indent-new-comment-line for older Emacsen
@@ -1133,22 +1142,25 @@
 (defvar c-progress-info nil)
 
 (defun c-progress-init (start end context)
-  ;; start the progress update messages.  if this emacs doesn't have a
-  ;; built-in timer, just be dumb about it
-  (if (not (fboundp 'current-time))
-      (message "indenting region... (this may take a while)")
-    ;; if progress has already been initialized, do nothing. otherwise
-    ;; initialize the counter with a vector of:
-    ;; [start end lastsec context]
-    (if c-progress-info
-	()
-      (setq c-progress-info (vector start
+  (cond
+   ;; Be silent
+   ((not c-progress-interval))
+   ;; Start the progress update messages.  If this Emacs doesn't have
+   ;; a built-in timer, just be dumb about it.
+   ((not (fboundp 'current-time))
+    (message "indenting region... (this may take a while)"))
+   ;; If progress has already been initialized, do nothing. otherwise
+   ;; initialize the counter with a vector of:
+   ;;     [start end lastsec context]
+   (c-progress-info)
+   (t (setq c-progress-info (vector start
 				    (save-excursion
 				      (goto-char end)
 				      (point-marker))
 				    (nth 1 (current-time))
 				    context))
-      (message "indenting region..."))))
+      (message "indenting region..."))
+   ))
 
 (defun c-progress-update ()
   ;; update progress
@@ -1169,12 +1181,14 @@
 
 (defun c-progress-fini (context)
   ;; finished
-  (if (or (eq context (aref c-progress-info 3))
-	  (eq context t))
-      (progn
-	(set-marker (aref c-progress-info 1) nil)
-	(setq c-progress-info nil)
-	(message "indenting region...done"))))
+  (if (not c-progress-interval)
+      nil
+    (if (or (eq context (aref c-progress-info 3))
+	    (eq context t))
+	(progn
+	  (set-marker (aref c-progress-info 1) nil)
+	  (setq c-progress-info nil)
+	  (message "indenting region...done")))))
 
 
 
--- a/lisp/cc-mode/cc-compat.el	Mon Aug 13 10:01:24 2007 +0200
+++ b/lisp/cc-mode/cc-compat.el	Mon Aug 13 10:02:21 2007 +0200
@@ -5,7 +5,7 @@
 ;; Author:     1994-1997 Barry A. Warsaw
 ;; Maintainer: cc-mode-help@python.org
 ;; Created:    August 1994, split from cc-mode.el
-;; Version:    5.18
+;; Version:    See cc-mode.el
 ;; Keywords:   c languages oop
 
 ;; This file is part of GNU Emacs.
--- a/lisp/cc-mode/cc-defs.el	Mon Aug 13 10:01:24 2007 +0200
+++ b/lisp/cc-mode/cc-defs.el	Mon Aug 13 10:02:21 2007 +0200
@@ -7,7 +7,7 @@
 ;;             1985 Richard M. Stallman
 ;; Maintainer: cc-mode-help@python.org
 ;; Created:    22-Apr-1997 (split from cc-mode.el)
-;; Version:    5.18
+;; Version:    See cc-mode.el
 ;; Keywords:   c languages oop
 
 ;; This file is part of GNU Emacs.
--- a/lisp/cc-mode/cc-engine.el	Mon Aug 13 10:01:24 2007 +0200
+++ b/lisp/cc-mode/cc-engine.el	Mon Aug 13 10:02:21 2007 +0200
@@ -7,7 +7,7 @@
 ;;             1985 Richard M. Stallman
 ;; Maintainer: cc-mode-help@python.org
 ;; Created:    22-Apr-1997 (split from cc-mode.el)
-;; Version:    5.18
+;; Version:    See cc-mode.el
 ;; Keywords:   c languages oop
 
 ;; This file is part of GNU Emacs.
@@ -107,6 +107,7 @@
 				     (and lim
 					  (<= lim (point))
 					  (not (c-in-literal lim))
+					  (not (eq (char-before) ?_))
 					  (looking-at c-conditional-key)
 					  ))))
 		       ;; did we find a conditional?
@@ -1181,7 +1182,7 @@
 	   ;; CASE 5F: extern-lang-close?
 	   ((and inextern-p
 		 (eq char-after-ip ?}))
-	    (c-add-syntax 'extern-lang-close (aref inclass-p 1)))
+	    (c-add-syntax 'extern-lang-close (aref inclass-p 0)))
 	   ;; CASE 5G: we are looking at the brace which closes the
 	   ;; enclosing nested class decl
 	   ((and inclass-p
--- a/lisp/cc-mode/cc-langs.el	Mon Aug 13 10:01:24 2007 +0200
+++ b/lisp/cc-mode/cc-langs.el	Mon Aug 13 10:02:21 2007 +0200
@@ -7,7 +7,7 @@
 ;;             1985 Richard M. Stallman
 ;; Maintainer: cc-mode-help@python.org
 ;; Created:    22-Apr-1997 (split from cc-mode.el)
-;; Version:    5.18
+;; Version:    See cc-mode.el
 ;; Keywords:   c languages oop
 
 ;; This file is part of GNU Emacs.
--- a/lisp/cc-mode/cc-menus.el	Mon Aug 13 10:01:24 2007 +0200
+++ b/lisp/cc-mode/cc-menus.el	Mon Aug 13 10:02:21 2007 +0200
@@ -7,7 +7,7 @@
 ;;             1985 Richard M. Stallman
 ;; Maintainer: cc-mode-help@python.org
 ;; Created:    22-Apr-1997 (split from cc-mode.el)
-;; Version:    5.18
+;; Version:    See cc-mode.el
 ;; Keywords:   c languages oop
 
 ;; This file is part of GNU Emacs.
@@ -80,6 +80,17 @@
        "\\([a-zA-Z_][a-zA-Z0-9_:<>~]*\\)"     ; match function name
        "[ \t]*([^)]*)[ \t]*[^ \t;]"           ; see above
        )) 1)
+    ;; General function name regexp
+    (nil
+     (, 
+      (concat
+       "^\\<.*"                               ; line MUST start with word char
+       "[^a-zA-Z0-9_:<>~]"                    ; match any non-identifier char
+       "\\([a-zA-Z_][a-zA-Z0-9_:<>~]*\\)"     ; match function name
+       "[ \t]*("			      ; see above, BUT
+       "[ \t]*[^ \t(][^)]*)[ \t]*[^ \t;]"     ; the argument list must not start
+					      ; with a parentheses
+       )) 1)
     ;; Special case for definitions using phony prototype macros like:
     ;; `int main _PROTO( (int argc,char *argv[]) )'.
     ;; This case is only included if cc-imenu-c-prototype-macro-regexp is set.
@@ -94,17 +105,8 @@
                    "[ \t]*"                   ; whitespace before macro name
                    cc-imenu-c-prototype-macro-regexp
                    "[ \t]*("                  ; ws followed by first paren.
-                   "[ \t]*([^)]*)[ \t]*[^ \t;]" ; see above
+                   "[ \t]*([^)]*)[ \t]*)[ \t]*[^ \t;]" ; see above
                    )) 1)))))
-    ;; General function name regexp
-    (nil
-     (, 
-      (concat
-       "^\\<.*"                               ; line MUST start with word char
-       "[^a-zA-Z0-9_:<>~]"                    ; match any non-identifier char
-       "\\([a-zA-Z_][a-zA-Z0-9_:<>~]*\\)"     ; match function name
-       "[ \t]*([^)]*)[ \t]*[^ \t;]"           ; see above
-       )) 1)
     ;; Class definitions
     ("Class" 
      (, (concat 
@@ -141,11 +143,31 @@
 
 (defvar cc-imenu-objc-generic-expression 
   (concat 
+   ;;
    ;; For C 
-   ;; Pick a token by (match-string 6)
-   (car (cdr (car cc-imenu-c++-generic-expression))) 
+   ;;                     *Warning for developers* 
+   ;; This expression elements depend on `cc-imenu-c++-generic-expression'.
+   ;;
+   ;; > Special case to match a line like `main() {}'
+   ;; > e.g. no return type, not even on the previous line.
+   ;; Pick a token by (match-string 1)
+   (car (cdr (nth 1 cc-imenu-c++-generic-expression))) ; 
+   "\\|"
+   ;; > General function name regexp
+   ;; Pick a token by  (match-string 2)
+   (car (cdr (nth 2 cc-imenu-c++-generic-expression)))
+   ;; > Special case for definitions using phony prototype macros like:
+   ;; > `int main _PROTO( (int argc,char *argv[]) )'.
+   ;; Pick a token by  (match-string 3)
+   (if cc-imenu-c-prototype-macro-regexp
+       (concat    
+	"\\|"
+	(car (cdr (nth 3 cc-imenu-c++-generic-expression))))
+     "")
+   ;;
    ;; For Objective-C
-   ;; Pick a token by (match-string 8)
+   ;; Pick a token by (match-string 3 or 4)
+   ;;
    "\\|\\("					     
    "^[-+][:a-zA-Z0-9()*_<>\n\t ]*[;{]"        ; Methods
    "\\|" 
@@ -227,9 +249,22 @@
   "imenu supports for objc-mode."
   (let (methodlist
 	clist
-	(C 6)
-	(OBJC 8)
+	;;
+	;; OBJC, C1, C2, C3 are constants.
+	;;
+	;;                  *Warning for developers* 
+	;; These constants depend on `cc-imenu-c++-generic-expression'.
+	;;
+	(OBJC 
+	 (if cc-imenu-c-prototype-macro-regexp 4 3))
+	(C1 ; > Special case to match a line like `main() {}'
+	 1) 
+	(C2 ; > General function name regexp
+	 2) 
+	(C3 ; > Special case for definitions using phony prototype macros like:
+	 3)
 	langnum
+	;;
 	(classcount 0)
 	toplist
 	stupid
@@ -250,14 +285,19 @@
     ;;
     (while (re-search-backward cc-imenu-objc-generic-expression nil t)
       (imenu-progress-message stupid)
-      (setq langnum (if (match-beginning C) C OBJC))
+      (setq langnum (if (match-beginning OBJC) 
+			OBJC
+		      (cond
+		       ((match-beginning C3) C3)
+		       ((match-beginning C2) C2)
+		       ((match-beginning C1) C1))))
       (setq str (bufsubst-fun (match-beginning langnum) (match-end langnum)))
       ;;
       (cond 
        ;;
        ;; C
        ;;
-       ((eq langnum C)
+       ((not (eq langnum OBJC))
 	(setq clist (cons (cons str (match-beginning langnum)) clist)))
        ;;
        ;; ObjC
--- a/lisp/cc-mode/cc-mode.el	Mon Aug 13 10:01:24 2007 +0200
+++ b/lisp/cc-mode/cc-mode.el	Mon Aug 13 10:02:21 2007 +0200
@@ -7,9 +7,11 @@
 ;;             1985 Richard M. Stallman
 ;; Maintainer: cc-mode-help@python.org
 ;; Created:    a long, long, time ago. adapted from the original c-mode.el
-;; Version:    5.18
 ;; Keywords:   c languages oop
 
+(defconst c-version "5.19"
+  "CC Mode version number.")
+
 ;; NOTE: Read the commentary below for the right way to submit bug reports!
 ;; NOTE: See the accompanying texinfo manual for details on using this mode!
 
@@ -326,9 +328,7 @@
   (c-update-modeline))
 
 
-;; defuns for submitting bug reports
-(defconst c-version "5.18"
-  "CC Mode version number.")
+;; bug reporting
 
 (defconst c-mode-help-address
   "bug-gnu-emacs@prep.ai.mit.edu, cc-mode-help@python.org"
@@ -382,7 +382,7 @@
 		   'c-hanging-comment-ender-p
 		   'c-indent-comments-syntactically-p
 		   'c-tab-always-indent
-		   'c-recognize-knr-p
+		   'c-comment-continuation-stars
 		   'c-label-minimum-indentation
 		   'defun-prompt-regexp
 		   'tab-width
--- a/lisp/cc-mode/cc-styles.el	Mon Aug 13 10:01:24 2007 +0200
+++ b/lisp/cc-mode/cc-styles.el	Mon Aug 13 10:02:21 2007 +0200
@@ -7,7 +7,7 @@
 ;;             1985 Richard M. Stallman
 ;; Maintainer: cc-mode-help@python.org
 ;; Created:    22-Apr-1997 (split from cc-mode.el)
-;; Version:    5.18
+;; Version:    See cc-mode.el
 ;; Keywords:   c languages oop
 
 ;; This file is part of GNU Emacs.
@@ -572,7 +572,8 @@
   (or (assoc "cc-mode" c-style-alist)
       (let (copyfunc)
 	;; use built-in copy-tree if its there.
-	(if (fboundp 'copy-tree)
+	(if (and (fboundp 'copy-tree)
+		 (functionp (symbol-function 'copy-tree)))
 	    (setq copyfunc (symbol-function 'copy-tree))
 	  (setq copyfunc (lambda (tree)
 			    (if (consp tree)
--- a/lisp/cc-mode/cc-vars.el	Mon Aug 13 10:01:24 2007 +0200
+++ b/lisp/cc-mode/cc-vars.el	Mon Aug 13 10:02:21 2007 +0200
@@ -7,7 +7,7 @@
 ;;             1985 Richard M. Stallman
 ;; Maintainer: cc-mode-help@python.org
 ;; Created:    22-Apr-1997 (split from cc-mode.el)
-;; Version:    5.18
+;; Version:    See cc-mode.el
 ;; Keywords:   c languages oop
 
 ;; This file is part of GNU Emacs.
@@ -304,8 +304,8 @@
 (defcustom c-progress-interval 5
   "*Interval used to update progress status during long re-indentation.
 If a number, percentage complete gets updated after each interval of
-that many seconds.  Set to nil to inhibit updating.  This is only
-useful for Emacs 19."
+that many seconds.  To inhibit all messages during indentation, set
+this variable to nil."
   :type 'integer
   :group 'c)
 
--- a/lisp/cc-mode/custom-load.el	Mon Aug 13 10:01:24 2007 +0200
+++ b/lisp/cc-mode/custom-load.el	Mon Aug 13 10:02:21 2007 +0200
@@ -1,6 +1,6 @@
 ;;; custom-load.el --- automatically extracted custom dependencies
 
-;; Created by SL Baur on Sat Oct  4 18:11:21 1997
+;; Created by SL Baur on Thu Oct  9 20:52:06 1997
 
 ;;; Code:
 
--- a/lisp/custom/cus-dep.el	Mon Aug 13 10:01:24 2007 +0200
+++ b/lisp/custom/cus-dep.el	Mon Aug 13 10:02:21 2007 +0200
@@ -103,7 +103,7 @@
     (let ((enable-local-eval nil)
 	  (hash (make-hash-table :test 'eq)))
       (dolist (dir subdirs)
-	(message "Processing %s" dir)
+	(princ (format "Processing %s\n" dir))
 	(let ((cusload-file (expand-file-name cusload-base-file dir))
 	      (files (directory-files dir t "\\`[^=].*\\.el\\'")))
 	  ;; A trivial optimization: if no files in the directory is
@@ -112,7 +112,7 @@
 		   (dolist (file files t)
 		     (when (file-newer-than-file-p file cusload-file)
 		       (return nil))))
-	      (message "No changes need to be written.")
+	      (princ "(No changes need to be written)\n")
 	    ;; Process directory
 	    (dolist (file files)
 	      (when (file-exists-p file)
@@ -130,33 +130,41 @@
 			  (eval expr)
 			  (setf (gethash (nth 1 expr) hash) name)))
 		    (error nil)))))
-	    (message "Generating %s..." cusload-base-file)
-	    (with-temp-file cusload-file
-	      (insert ";;; " cusload-base-file
-		      " --- automatically extracted custom dependencies\n"
-		      "\n;; Created by " (user-full-name) " on "
-		      (current-time-string) "\n\n;;; Code:\n\n")
-	      (mapatoms
-	       (lambda (sym)
-		 (let ((members (get sym 'custom-group))
-		       item where found)
-		   (when members
-		     (while members
-		       (setq item (car (car members))
-			     members (cdr members)
-			     where (gethash item hash))
-		       (unless (or (null where)
-				   (member where found))
-			 (if found
-			     (insert " ")
-			   (insert "(custom-put '" (symbol-name sym)
-				   " 'custom-loads '("))
-			 (prin1 where (current-buffer))
-			 (push where found)))
-		     (when found
-		       (insert "))\n"))))))
-	      (insert "\n;;; custom-load.el ends here\n"))
-	    (clrhash hash)))))))
+	    (cond
+	     ((zerop (hash-table-count hash))
+	      (princ "(No customization dependencies")
+	      (when (file-exists-p cusload-file)
+		(princ (format ", deleting %s" cusload-file))
+		(delete-file cusload-file))
+	      (princ ")\n"))
+	     (t
+	      (princ (format "Generating %s...\n" cusload-base-file))
+	      (with-temp-file cusload-file
+		(insert ";;; " cusload-base-file
+			" --- automatically extracted custom dependencies\n"
+			"\n;; Created by " (user-full-name) " on "
+			(current-time-string) "\n\n;;; Code:\n\n")
+		(mapatoms
+		 (lambda (sym)
+		   (let ((members (get sym 'custom-group))
+			 item where found)
+		     (when members
+		       (while members
+			 (setq item (car (car members))
+			       members (cdr members)
+			       where (gethash item hash))
+			 (unless (or (null where)
+				     (member where found))
+			   (if found
+			       (insert " ")
+			     (insert "(custom-put '" (symbol-name sym)
+				     " 'custom-loads '("))
+			   (prin1 where (current-buffer))
+			   (push where found)))
+		       (when found
+			 (insert "))\n"))))))
+		(insert "\n;;; custom-load.el ends here\n"))
+	      (clrhash hash)))))))))
 
 (provide 'cus-dep)
 
--- a/lisp/custom/custom-load.el	Mon Aug 13 10:01:24 2007 +0200
+++ b/lisp/custom/custom-load.el	Mon Aug 13 10:02:21 2007 +0200
@@ -1,6 +1,6 @@
 ;;; custom-load.el --- automatically extracted custom dependencies
 
-;; Created by SL Baur on Sat Oct  4 18:11:24 1997
+;; Created by SL Baur on Thu Oct  9 20:52:08 1997
 
 ;;; Code:
 
--- a/lisp/custom/wid-edit.el	Mon Aug 13 10:01:24 2007 +0200
+++ b/lisp/custom/wid-edit.el	Mon Aug 13 10:02:21 2007 +0200
@@ -1776,6 +1776,26 @@
   (require 'browse-url)
   (funcall browse-url-browser-function (widget-value widget)))
 
+;;; The `function-link' Widget.
+
+(define-widget 'function-link 'link
+  "A link to an Emacs function."
+  :action 'widget-function-link-action)
+
+(defun widget-function-link-action (widget &optional event)
+  "Show the function specified by WIDGET."
+  (describe-function (widget-value widget)))
+
+;;; The `variable-link' Widget.
+
+(define-widget 'variable-link 'link
+  "A link to an Emacs variable."
+  :action 'widget-variable-link-action)
+
+(defun widget-variable-link-action (widget &optional event)
+  "Show the variable specified by WIDGET."
+  (describe-variable (widget-value widget)))
+
 ;;; The `file-link' Widget.
 
 (define-widget 'file-link 'link
--- a/lisp/efs/auto-autoloads.el	Mon Aug 13 10:01:24 2007 +0200
+++ b/lisp/efs/auto-autoloads.el	Mon Aug 13 10:02:21 2007 +0200
@@ -146,7 +146,7 @@
 *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 "\
+(defvar dired-mail-reader 'vm "\
 *Mail reader used by dired for dired-read-mail (\\[dired-read-mail]).
 The symbols 'rmail and 'vm are the only two allowed values.")
 
--- a/lisp/efs/custom-load.el	Mon Aug 13 10:01:24 2007 +0200
+++ b/lisp/efs/custom-load.el	Mon Aug 13 10:02:21 2007 +0200
@@ -1,6 +1,6 @@
 ;;; custom-load.el --- automatically extracted custom dependencies
 
-;; Created by SL Baur on Sat Oct  4 18:11:28 1997
+;; Created by SL Baur on Thu Oct  9 20:52:10 1997
 
 ;;; Code:
 
--- a/lisp/efs/dired.el	Mon Aug 13 10:01:24 2007 +0200
+++ b/lisp/efs/dired.el	Mon Aug 13 10:02:21 2007 +0200
@@ -372,7 +372,7 @@
 (make-variable-buffer-local 'dired-omit-files)
 
 ;;;###autoload
-(defvar dired-mail-reader 'rmail
+(defvar dired-mail-reader 'vm
   "*Mail reader used by dired for dired-read-mail \(\\[dired-read-mail]\).
 The symbols 'rmail and 'vm are the only two allowed values.")
 
--- a/lisp/mh-e/auto-autoloads.el	Mon Aug 13 10:01:24 2007 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,88 +0,0 @@
-;;; DO NOT MODIFY THIS FILE
-(if (featurep 'mh-e-autoloads) (error "Already loaded"))
-
-;;;### (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)
--- a/lisp/mh-e/custom-load.el	Mon Aug 13 10:01:24 2007 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,5 +0,0 @@
-(custom-put 'mail 'custom-loads '("mh-e"))
-(custom-put 'mh-hook 'custom-loads '("mh-e"))
-(custom-put 'mh-buffer 'custom-loads '("mh-utils"))
-(custom-put 'mh-compose 'custom-loads '("mh-comp"))
-(custom-put 'mh 'custom-loads '("mh-comp" "mh-e" "mh-utils"))
--- a/lisp/mh-e/mh-comp.el	Mon Aug 13 10:01:24 2007 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1077 +0,0 @@
-;;; mh-comp --- mh-e functions for composing messages
-;; Time-stamp: <95/08/19 17:48:59 gildea>
-
-;; Copyright (C) 1993, 1995 Free Software Foundation, Inc.
-
-;; This file is part of mh-e, 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, 675 Mass Ave, Cambridge, MA 02139, USA.
-
-;;; Commentary:
-
-;; Internal support for mh-e package.
-
-;;; Change Log:
-
-;; $Id: mh-comp.el,v 1.2 1997/04/19 23:21:00 steve Exp $
-
-;;; Code:
-
-(provide 'mh-comp)
-(require 'mh-utils)
-
-;;; Site customization (see also mh-utils.el):
-
-(defgroup mh-compose nil
-  "Mh-e functions for composing messages"
-  :prefix "mh-"
-  :group 'mh)
-
-
-(defvar mh-send-prog "send"
-  "Name of the MH send program.
-Some sites need to change this because of a name conflict.")
-
-(defvar mh-redist-full-contents nil
-  "Non-nil if the `dist' command needs whole letter for redistribution.
-This is the case only when `send' is compiled with the BERK option.
-If MH will not allow you to redist a previously redist'd msg, set to nil.")
-
-
-(defvar mh-note-repl "-"
-  "String whose first character is used to notate replied to messages.")
-
-(defvar mh-note-forw "F"
-  "String whose first character is used to notate forwarded messages.")
-
-(defvar mh-note-dist "R"
-  "String whose first character is used to notate redistributed messages.")
-
-(defvar mh-yank-hooks nil
-  "Obsolete hook for modifying a citation just inserted in the mail buffer.
-Each hook function can find the citation between point and mark.
-And each hook function should leave point and mark around the citation
-text as modified.
-
-This is a normal hook, misnamed for historical reasons.
-It is semi-obsolete and is only used if mail-citation-hook is nil.")
-
-(defvar mail-citation-hook nil
-  "*Hook for modifying a citation just inserted in the mail buffer.
-Each hook function can find the citation between point and mark.
-And each hook function should leave point and mark around the citation
-text as modified.
-
-If this hook is entirely empty (nil), the text of the message is inserted
-with mh-ins-buf-prefix prefixed to each line.
-
-See also the variable mh-yank-from-start-of-msg, which controls how
-much of the message passed to the hook.")
-
-;;; Copied from sendmail.el for Hyperbole
-(defvar mail-header-separator "--------"
-  "*Line used by MH to separate headers from text in messages being composed.")
-
-;;; Personal preferences:
-
-(defcustom mh-delete-yanked-msg-window nil
-  "*Controls window display when a message is yanked by \\<mh-letter-mode-map>\\[mh-yank-cur-msg].
-If non-nil, yanking the current message into a draft letter deletes any
-windows displaying the message."
-  :type 'boolean
-  :group 'mh-compose)
-
-(defcustom mh-yank-from-start-of-msg t
-  "*Controls which part of a message is yanked by \\<mh-letter-mode-map>\\[mh-yank-cur-msg].
-If non-nil, include the entire message.  If the symbol `body', then yank the
-message minus the header.  If nil, yank only the portion of the message
-following the point.  If the show buffer has a region, this variable is
-ignored."
-  :type '(choice (const t) (const nil) (const body))
-  :group 'mh-compose)
-
-(defcustom mh-ins-buf-prefix "> "
-  "*String to put before each non-blank line of a yanked or inserted message.
-\\<mh-letter-mode-map>Used when the message is inserted into an outgoing letter
-by \\[mh-insert-letter] or \\[mh-yank-cur-msg]."
-  :type 'string
-  :group 'mh-compose)
-
-(defcustom mh-reply-default-reply-to nil
-  "*Sets the person or persons to whom a reply will be sent.
-If nil, prompt for recipient.  If non-nil, then \\<mh-folder-mode-map>`\\[mh-reply]' will use this
-value and it should be one of \"from\", \"to\", \"cc\", or \"all\".
-The values \"cc\" and \"all\" do the same thing."
-  :type '(choice (const :tag "Prompt" nil)
-		 (const "from") (const "to")
-		 (const "cc") (const "all"))
-  :group 'mh-compose)
-
-(defcustom mh-signature-file-name "~/.signature"
-  "*Name of file containing the user's signature.
-Inserted into message by \\<mh-letter-mode-map>\\[mh-insert-signature]."
-  :type 'file
-  :group 'mh-compose)
-
-(defcustom mh-forward-subject-format "%s: %s"
-  "*Format to generate the Subject: line contents for a forwarded message.
-The two string arguments to the format are the sender of the original
-message and the original subject line."
-  :type 'string
-  :group 'mh-compose)
-
-(defvar mh-comp-formfile "components"
-  "Name of file to be used as a skeleton for composing messages.
-Default is \"components\".  If not a complete path name, the file
-is searched for first in the user's MH directory, then in the
-system MH lib directory.")
-
-(defvar mh-repl-formfile "replcomps"
-  "Name of file to be used as a skeleton for replying to messages.
-Default is \"replcomps\".  If not a complete path name, the file
-is searched for first in the user's MH directory, then in the
-system MH lib directory.")
-
-;;; Hooks:
-
-(defcustom mh-letter-mode-hook nil
-  "Invoked in `mh-letter-mode' on a new letter."
-  :type 'hook
-  :group 'mh-compose)
-
-(defcustom mh-compose-letter-function nil
-  "Invoked when setting up a letter draft.
-It is passed three arguments: TO recipients, SUBJECT, and CC recipients."
-  :type 'function
-  :group 'mh-compose)
-
-(defcustom mh-before-send-letter-hook nil
-  "Invoked at the beginning of the \\<mh-letter-mode-map>\\[mh-send-letter] command."
-  :type 'hook
-  :group 'mh-compose)
-
-
-(defvar mh-rejected-letter-start
-  (concat "^   ----- Unsent message follows -----$"	;from sendmail V5
-	  "\\|^   ----- Original message follows -----$" ;from sendmail V8
-	  "\\|^------- Unsent Draft$"			;from MH itself
-	  "\\|^----------  Original Message  ----------$" ;from zmailer
-	  "\\|^  --- The unsent message follows ---$"	;from AIX mail system
-	  "\\|^    Your message follows:$"		;from MMDF-II
-	  "\\|^Content-Description: Returned Content$"	;1993 KJ sendmail
-	  )
-  "Regexp specifying the beginning of the wrapper around a returned letter.
-This wrapper is generated by the mail system when rejecting a letter.")
-
-(defvar mh-new-draft-cleaned-headers
-  "^Date:\\|^Received:\\|^Message-Id:\\|^From:\\|^Sender:\\|^Errors-To:\\|^Delivery-Date:\\|^Return-Path:"
-  "Regexp of header lines to remove before offering a message as a new draft.
-Used by the \\<mh-folder-mode-map>`\\[mh-edit-again]' and `\\[mh-extract-rejected-mail]' commands.")
-
-(defvar mh-to-field-choices '(("t" . "To:") ("s" . "Subject:") ("c" . "Cc:")
-			      ("b" . "Bcc:") ("f" . "Fcc:") ("r" . "From:")
-			      ("d" . "Dcc:"))
-  "Alist of (final-character . field-name) choices for mh-to-field.")
-
-(defvar mh-letter-mode-map (copy-keymap text-mode-map)
-  "Keymap for composing mail.")
-
-(defvar mh-letter-mode-syntax-table nil
-  "Syntax table used by mh-e while in MH-Letter mode.")
-
-(if mh-letter-mode-syntax-table
-    ()
-    (setq mh-letter-mode-syntax-table
-	  (make-syntax-table text-mode-syntax-table))
-    (modify-syntax-entry ?% "." mh-letter-mode-syntax-table))
-
-
-;;;###autoload
-(defun mh-smail ()
-  "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."
-  (interactive)
-  (mh-find-path)
-  (call-interactively 'mh-send))
-
-
-(defvar mh-error-if-no-draft nil)	;raise error over using old draft
-
-
-;;;###autoload
-(defun mh-smail-batch ()
-  "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."
-  (mh-find-path)
-  (let ((mh-error-if-no-draft t))
-    (mh-send "" "" "")))
-
-
-(defun mh-edit-again (msg)
-  "Clean-up a draft or a message previously sent and make it resendable.
-Default is the current message.
-The variable mh-new-draft-cleaned-headers specifies the headers to remove.
-See also documentation for `\\[mh-send]' function."
-  (interactive (list (mh-get-msg-num t)))
-  (let* ((from-folder mh-current-folder)
-	 (config (current-window-configuration))
-	 (draft
-	  (cond ((and mh-draft-folder (equal from-folder mh-draft-folder))
-		 (pop-to-buffer (find-file-noselect (mh-msg-filename msg)) t)
-		 (rename-buffer (format "draft-%d" msg))
-		 (buffer-name))
-		(t
-		 (mh-read-draft "clean-up" (mh-msg-filename msg) nil)))))
-    (mh-clean-msg-header (point-min) mh-new-draft-cleaned-headers nil)
-    (goto-char (point-min))
-    (save-buffer)
-    (mh-compose-and-send-mail draft "" from-folder nil nil nil nil nil nil
-			      config)))
-
-
-(defun mh-extract-rejected-mail (msg)
-  "Extract a letter returned by the mail system and make it resendable.
-Default is the current message.  The variable mh-new-draft-cleaned-headers
-gives the headers to clean out of the original message.
-See also documentation for `\\[mh-send]' function."
-  (interactive (list (mh-get-msg-num t)))
-  (let ((from-folder mh-current-folder)
-	(config (current-window-configuration))
-	(draft (mh-read-draft "extraction" (mh-msg-filename msg) nil)))
-    (goto-char (point-min))
-    (cond ((re-search-forward mh-rejected-letter-start nil t)
-	   (skip-chars-forward " \t\n")
-	   (delete-region (point-min) (point))
-	   (mh-clean-msg-header (point-min) mh-new-draft-cleaned-headers nil))
-	  (t
-	   (message "Does not appear to be a rejected letter.")))
-    (goto-char (point-min))
-    (save-buffer)
-    (mh-compose-and-send-mail draft "" from-folder msg
-			      (mh-get-header-field "To:")
-			      (mh-get-header-field "From:")
-			      (mh-get-header-field "Cc:")
-			      nil nil config)))
-
-
-(defun mh-forward (to cc &optional msg-or-seq)
-  "Forward a message or message sequence.  Defaults to displayed message.
-If optional prefix argument provided, then prompt for the message sequence.
-See also documentation for `\\[mh-send]' function."
-  (interactive (list (mh-read-address "To: ")
-		     (mh-read-address "Cc: ")
-		     (if current-prefix-arg
-			 (mh-read-seq-default "Forward" t)
-		       (mh-get-msg-num t))))
-  (or msg-or-seq
-      (setq msg-or-seq (mh-get-msg-num t)))
-  (let* ((folder mh-current-folder)
-	 (config (current-window-configuration))
-	 ;; forw always leaves file in "draft" since it doesn't have -draft
-	 (draft-name (expand-file-name "draft" mh-user-path))
-	 (draft (cond ((or (not (file-exists-p draft-name))
-			   (y-or-n-p "The file 'draft' exists.  Discard it? "))
-		       (mh-exec-cmd "forw" "-build"
-				    mh-current-folder msg-or-seq)
-		       (prog1
-			   (mh-read-draft "" draft-name t)
-			 (mh-insert-fields "To:" to "Cc:" cc)
-			 (save-buffer)))
-		      (t
-		       (mh-read-draft "" draft-name nil)))))
-    (let (orig-from
-	  orig-subject)
-      (goto-char (point-min))
-      (re-search-forward "^------- Forwarded Message")
-      (forward-line 1)
-      (skip-chars-forward " \t\n")
-      (save-restriction
-	(narrow-to-region (point) (point-max))
-	(setq orig-from (mh-get-header-field "From:"))
-	(setq orig-subject (mh-get-header-field "Subject:")))
-      (let ((forw-subject
-	     (mh-forwarded-letter-subject orig-from orig-subject)))
-	(mh-insert-fields "Subject:" forw-subject)
-	(goto-char (point-min))
-	(re-search-forward "^------- Forwarded Message")
-	(forward-line -1)
-	(delete-other-windows)
-	(if (numberp msg-or-seq)
-	    (mh-add-msgs-to-seq msg-or-seq 'forwarded t)
-	  (mh-add-msgs-to-seq (mh-seq-to-msgs msg-or-seq) 'forwarded t))
-	(mh-compose-and-send-mail draft "" folder msg-or-seq
-				  to forw-subject cc
-				  mh-note-forw "Forwarded:"
-				  config)))))
-
-(defun mh-forwarded-letter-subject (from subject)
-  ;; Return a Subject suitable for a forwarded message.
-  ;; Original message has headers FROM and SUBJECT.
-  (let ((addr-start (string-match "<" from))
-	(comment (string-match "(" from)))
-    (cond ((and addr-start (> addr-start 0))
-	   ;; Full Name <luser@host>
-	   (setq from (substring from 0 (1- addr-start))))
-	  (comment
-	   ;; luser@host (Full Name)
-	   (setq from (substring from (1+ comment) (1- (length from)))))))
-  (format mh-forward-subject-format from subject))
-
-
-;;;###autoload
-(defun mh-smail-other-window ()
-  "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."
-  (interactive)
-  (mh-find-path)
-  (call-interactively 'mh-send-other-window))
-
-
-(defun mh-redistribute (to cc &optional msg)
-  "Redistribute a letter.
-Depending on how your copy of MH was compiled, you may need to change the
-setting of the variable mh-redist-full-contents.  See its documentation."
-  (interactive (list (mh-read-address "Redist-To: ")
-		     (mh-read-address "Redist-Cc: ")
-		     (mh-get-msg-num t)))
-  (or msg
-      (setq msg (mh-get-msg-num t)))
-  (save-window-excursion
-    (let ((folder mh-current-folder)
-	  (draft (mh-read-draft "redistribution"
-				(if mh-redist-full-contents
-				    (mh-msg-filename msg)
-				  nil)
-				nil)))
-      (mh-goto-header-end 0)
-      (insert "Resent-To: " to "\n")
-      (if (not (equal cc "")) (insert "Resent-cc: " cc "\n"))
-      (mh-clean-msg-header (point-min)
-			   "^Message-Id:\\|^Received:\\|^Return-Path:\\|^Sender:\\|^Date:\\|^From:"
-			   nil)
-      (save-buffer)
-      (message "Redistributing...")
-      (if mh-redist-full-contents
-	  (call-process "/bin/sh" nil 0 nil "-c"
-			(format "mhdist=1 mhaltmsg=%s %s -push %s"
-				buffer-file-name
-				(expand-file-name mh-send-prog mh-progs)
-				buffer-file-name))
-	(call-process "/bin/sh" nil 0 nil "-c"
-		      (format "mhdist=1 mhaltmsg=%s mhannotate=1 %s -push %s"
-			      (mh-msg-filename msg folder)
-			      (expand-file-name mh-send-prog mh-progs)
-			      buffer-file-name)))
-      (mh-annotate-msg msg folder mh-note-dist
-		       "-component" "Resent:"
-		       "-text" (format "\"%s %s\"" to cc))
-      (kill-buffer draft)
-      (message "Redistributing...done"))))
-
-
-(defun mh-reply (message &optional includep)
-  "Reply to MESSAGE (default: current message).
-If optional prefix argument INCLUDEP provided, then include the message
-in the reply using filter mhl.reply in your MH directory.
-Prompts for type of addresses to reply to:
-   from    sender only,
-   to      sender and primary recipients,
-   cc/all  sender and all recipients.
-If the file named by `mh-repl-formfile' exists, it is used as a skeleton
-for the reply.  See also documentation for `\\[mh-send]' function."
-  (interactive (list (mh-get-msg-num t) current-prefix-arg))
-  (let ((minibuffer-help-form
-	 "from => Sender only\nto => Sender and primary recipients\ncc or all => Sender and all recipients"))
-    (let ((reply-to (or mh-reply-default-reply-to
-			(completing-read "Reply to whom: "
-					 '(("from") ("to") ("cc") ("all"))
-					 nil
-					 t)))
-	  (folder mh-current-folder)
-	  (show-buffer mh-show-buffer)
-	  (config (current-window-configuration)))
-      (message "Composing a reply...")
-      (mh-exec-cmd "repl" "-build" "-noquery" "-nodraftfolder"
-	     (if (stringp mh-repl-formfile) ;must be string, but we're paranoid
-		 (list "-form" mh-repl-formfile))
-	     mh-current-folder message
-	     (cond ((or (equal reply-to "from") (equal reply-to ""))
-		    '("-nocc" "all"))
-		   ((equal reply-to "to")
-		    '("-cc" "to"))
-		   ((or (equal reply-to "cc") (equal reply-to "all"))
-		    '("-cc" "all" "-nocc" "me")))
-	     (if includep
-		 '("-filter" "mhl.reply")))
-      (let ((draft (mh-read-draft "reply"
-				  (expand-file-name "reply" mh-user-path)
-				  t)))
-	(delete-other-windows)
-	(save-buffer)
-	
-	(let ((to (mh-get-header-field "To:"))
-	      (subject (mh-get-header-field "Subject:"))
-	      (cc (mh-get-header-field "Cc:")))
-	  (goto-char (point-min))
-	  (mh-goto-header-end 1)
-	  (or includep
-	      (mh-in-show-buffer (show-buffer)
-		(mh-display-msg message folder)))
-	  (mh-add-msgs-to-seq message 'answered t)
-	  (message "Composing a reply...done")
-	  (mh-compose-and-send-mail draft "" folder message to subject cc
-				    mh-note-repl "Replied:" config))))))
-
-
-(defun mh-send (to cc subject)
-  "Compose and send a letter.
-The file named by `mh-comp-formfile' will be used as the form.
-Do not call this function from outside mh-e; use \\[mh-smail] instead.
-
-The letter is composed in mh-letter-mode; see its documentation for more
-details.  If `mh-compose-letter-function' is defined, it is called on the
-draft and passed three arguments: to, subject, and cc."
-  (interactive (list
-		(mh-read-address "To: ")
-		(mh-read-address "Cc: ")
-		(read-string "Subject: ")))
-  (let ((config (current-window-configuration)))
-    (delete-other-windows)
-    (mh-send-sub to cc subject config)))
-
-
-(defun mh-send-other-window (to cc subject)
-  "Compose and send a letter in another window.
-Do not call this function from outside mh-e;
-use \\[mh-smail-other-window] instead.
-See also documentation for `\\[mh-send]' function."
-  (interactive (list
-		(mh-read-address "To: ")
-		(mh-read-address "Cc: ")
-		(read-string "Subject: ")))
-  (let ((pop-up-windows t))
-    (mh-send-sub to cc subject (current-window-configuration))))
-
-
-(defun mh-send-sub (to cc subject config)
-  ;; Do the real work of composing and sending a letter.
-  ;; Expects the TO, CC, and SUBJECT fields as arguments.
-  ;; CONFIG is the window configuration before sending mail.
-  (let ((folder mh-current-folder)
-	(msg-num (mh-get-msg-num nil)))
-    (message "Composing a message...")
-    (let ((draft (mh-read-draft
-		  "message"
-		  (let (components)
-		    (cond
-		     ((file-exists-p
-		       (setq components
-			     (expand-file-name mh-comp-formfile mh-user-path)))
-		      components)
-		     ((file-exists-p
-		       (setq components
-			     (expand-file-name mh-comp-formfile mh-lib)))
-		      components)
-		     (t
-		      (error (format "Can't find components file \"%s\""
-				     components)))))
-		  nil)))
-      (mh-insert-fields "To:" to "Subject:" subject "Cc:" cc)
-      (goto-char (point-max))
-      (message "Composing a message...done")
-      (mh-compose-and-send-mail draft "" folder msg-num
-				to subject cc
-				nil nil config))))
-
-
-(defun mh-read-draft (use initial-contents delete-contents-file)
-  ;; Read draft file into a draft buffer and make that buffer the current one.
-  ;; USE is a message used for prompting about the intended use of the message.
-  ;; INITIAL-CONTENTS is filename that is read into an empty buffer, or NIL
-  ;; if buffer should not be modified.  Delete the initial-contents file if
-  ;; DELETE-CONTENTS-FILE flag is set.
-  ;; Returns the draft folder's name.
-  ;; If the draft folder facility is enabled in ~/.mh_profile, a new buffer is
-  ;; used each time and saved in the draft folder.  The draft file can then be
-  ;; reused.
-  (cond (mh-draft-folder
-	 (let ((orig-default-dir default-directory)
-	       (draft-file-name (mh-new-draft-name)))
-	   (pop-to-buffer (generate-new-buffer
-			   (format "draft-%s"
-				   (file-name-nondirectory draft-file-name))))
-	   (condition-case ()
-	       (insert-file-contents draft-file-name t)
-	     (file-error))
-	   (setq default-directory orig-default-dir)))
-	(t
-	 (let ((draft-name (expand-file-name "draft" mh-user-path)))
-	   (pop-to-buffer "draft")	; Create if necessary
-	   (if (buffer-modified-p)
-	       (if (y-or-n-p "Draft has been modified; kill anyway? ")
-		   (set-buffer-modified-p nil)
-		   (error "Draft preserved")))
-	   (setq buffer-file-name draft-name)
-	   (clear-visited-file-modtime)
-	   (unlock-buffer)
-	   (cond ((and (file-exists-p draft-name)
-		       (not (equal draft-name initial-contents)))
-		  (insert-file-contents draft-name)
-		  (delete-file draft-name))))))
-  (cond ((and initial-contents
-	      (or (zerop (buffer-size))
-		  (if (y-or-n-p
-			(format "A draft exists.  Use for %s? " use))
-		      (if mh-error-if-no-draft
-			  (error "A prior draft exists."))
-		    t)))
-	 (erase-buffer)
-	 (insert-file-contents initial-contents)
-	 (if delete-contents-file (delete-file initial-contents))))
-  (auto-save-mode 1)
-  (if mh-draft-folder
-      (save-buffer))			; Do not reuse draft name
-  (buffer-name))
-
-
-(defun mh-new-draft-name ()
-  ;; Returns the pathname of folder for draft messages.
-  (save-excursion
-    (mh-exec-cmd-quiet t "mhpath" mh-draft-folder "new")
-    (buffer-substring (point-min) (1- (point-max)))))
-
-
-(defun mh-annotate-msg (msg buffer note &rest args)
-  ;; Mark the MESSAGE in BUFFER listing with the character NOTE and annotate
-  ;; the saved message with ARGS.
-  (apply 'mh-exec-cmd "anno" buffer msg args)
-  (save-excursion
-    (cond ((get-buffer buffer)		; Buffer may be deleted
-	   (set-buffer buffer)
-	   (if (symbolp msg)
-	       (mh-notate-seq msg note (1+ mh-cmd-note))
-	       (mh-notate msg note (1+ mh-cmd-note)))))))
-
-
-(defun mh-insert-fields (&rest name-values)
-  ;; Insert the NAME-VALUE pairs in the current buffer.
-  ;; If field NAME exists, append VALUE to it.
-  ;; Do not insert any pairs whose value is the empty string.
-  (let ((case-fold-search t))
-    (while name-values
-      (let ((field-name (car name-values))
-	    (value (car (cdr name-values))))
-	(cond ((equal value "")
-	       nil)
-	      ((mh-position-on-field field-name)
-	       (insert " " value))
-	      (t
-	       (insert field-name " " value "\n")))
-	(setq name-values (cdr (cdr name-values)))))))
-
-
-(defun mh-position-on-field (field &optional ignore)
-  ;; Move to the end of the FIELD in the header.
-  ;; Move to end of entire header if FIELD not found.
-  ;; Returns non-nil iff FIELD was found.
-  ;; The optional second arg is for pre-version 4 compatibility.
-  (if (mh-goto-header-field field)
-      (progn
-	(mh-header-field-end)
-	t)))
-
-
-(defun mh-get-header-field (field)
-  ;; Find and return the body of FIELD in the mail header.
-  ;; Returns the empty string if the field is not in the header of the
-  ;; current buffer.
-  (if (mh-goto-header-field field)
-      (progn
-	(skip-chars-forward " \t")	;strip leading white space in body
-	(let ((start (point)))
-	  (mh-header-field-end)
-	  (buffer-substring start (point))))
-    ""))
-
-(fset 'mh-get-field 'mh-get-header-field) ;mh-e 4 compatibility
-
-(defun mh-goto-header-field (field)
-  ;; Move to FIELD in the message header.
-  ;; Move to the end of the FIELD name, which should end in a colon.
-  ;; Returns T if found, NIL if not.
-  (goto-char (point-min))
-  (let ((case-fold-search t)
-	(headers-end (save-excursion
-		      (mh-goto-header-end 0)
-		      (point))))
-    (re-search-forward (format "^%s" field) headers-end t)))
-
-(defun mh-header-field-end ()
-  ;; Move to the end of the current header field.
-  ;; Handles RFC 822 continuation lines.
-  (forward-line 1)
-  (while (looking-at "^[ \t]")
-    (forward-line 1))
-  (backward-char 1))		;to end of previous line
-  
-
-(defun mh-goto-header-end (arg)
-  ;; Find the end of the message header in the current buffer and position
-  ;; the cursor at the ARG'th newline after the header.
-  (if (re-search-forward "^-*$" nil nil)
-      (forward-line arg)))
-
-
-(defun mh-read-address (prompt)
-  ;; Read a To: or Cc: address, prompting in the minibuffer with PROMPT.
-  ;; May someday do completion on aliases.
-  (read-string prompt))
-
-
-
-;;; Mode for composing and sending a draft message.
-
-(defvar mh-sent-from-folder nil)	;Folder of msg assoc with this letter.
-
-(defvar mh-sent-from-msg nil)		;Number of msg assoc with this letter.
-
-(defvar mh-send-args nil)		;Extra args to pass to "send" command.
-
-(defvar mh-annotate-char nil)		;Character to use to annotate mh-sent-from-msg.
-
-(defvar mh-annotate-field nil)		;Field name for message annotation.
-
-(put 'mh-letter-mode 'mode-class 'special)
-
-;;;###autoload
-(defun mh-letter-mode ()
-  "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."
-
-  (interactive)
-  (or mh-user-path (mh-find-path))
-  (make-local-variable 'paragraph-start)
-  (setq paragraph-start (concat "^[ \t]*[-_][-_][-_]+$\\|" paragraph-start))
-  (make-local-variable 'paragraph-separate)
-  (setq paragraph-separate
-	(concat "^[ \t]*[-_][-_][-_]+$\\|" paragraph-separate))
-  (make-local-variable 'mh-send-args)
-  (make-local-variable 'mh-annotate-char)
-  (make-local-variable 'mh-annotate-field)
-  (make-local-variable 'mh-previous-window-config)
-  (make-local-variable 'mh-sent-from-folder)
-  (make-local-variable 'mh-sent-from-msg)
-  (make-local-variable 'mail-header-separator)
-  (setq mail-header-separator "--------") ;for Hyperbole
-  (use-local-map mh-letter-mode-map)
-  (setq major-mode 'mh-letter-mode)
-  (mh-set-mode-name "MH-Letter")
-  (set-syntax-table mh-letter-mode-syntax-table)
-  (run-hooks 'text-mode-hook)
-  ;; if text-mode-hook turned on auto-fill, tune it for messages
-  (cond ((and (boundp 'auto-fill-hook) auto-fill-hook) ;emacs 18
-	 (make-local-variable 'auto-fill-hook)
-	 (setq auto-fill-hook 'mh-auto-fill-for-letter)))
-  (cond ((and (boundp 'auto-fill-function) auto-fill-function) ;emacs 19
-	 (make-local-variable 'auto-fill-function)
-	 (setq auto-fill-function 'mh-auto-fill-for-letter)))
-  (run-hooks 'mh-letter-mode-hook))
-
-
-(defun mh-auto-fill-for-letter ()
-  ;; Auto-fill in letters treats the header specially by inserting a tab
-  ;; before continuation line.
-  (if (mh-in-header-p)
-      (let ((fill-prefix "\t"))
-	(do-auto-fill))
-    (do-auto-fill)))
-
-
-(defun mh-in-header-p ()
-  ;; Return non-nil if the point is in the header of a draft message.
-  (save-excursion
-    (let ((cur-point (point)))
-      (goto-char (point-min))
-      (re-search-forward "^-*$" nil t)
-      (< cur-point (point)))))
-
-
-(defun mh-to-field ()
-  "Move point to the end of a specified header field.
-The field is indicated by the previous keystroke (the last keystroke
-of the command) according to the list in the variable mh-to-field-choices.
-Create the field if it does not exist.  Set the mark to point before moving."
-  (interactive)
-  (expand-abbrev)
-  (let ((target (cdr (or (assoc (char-to-string (logior last-input-char ?`))
-				mh-to-field-choices)
-			 ;; also look for a char for version 4 compat
-			 (assoc (logior last-input-char ?`) mh-to-field-choices))))
-	(case-fold-search t))
-    (push-mark)
-    (cond ((mh-position-on-field target)
-	   (let ((eol (point)))
-	     (skip-chars-backward " \t")
-	     (delete-region (point) eol))
-	   (if (and (not (eq (logior last-input-char ?`) ?s))
-		    (save-excursion
-		      (backward-char 1)
-		      (not (looking-at "[:,]"))))
-	       (insert ", ")
-	       (insert " ")))
-	  (t
-	   (if (mh-position-on-field "To:")
-	       (forward-line 1))
-	   (insert (format "%s \n" target))
-	   (backward-char 1)))))
-
-
-(defun mh-to-fcc (&optional folder)
-  "Insert an Fcc: FOLDER field in the current message.
-Prompt for the field name with a completion list of the current folders."
-  (interactive)
-  (or folder
-      (setq folder (mh-prompt-for-folder
-		    "Fcc"
-		    (or (and mh-default-folder-for-message-function
-			     (save-excursion
-			       (goto-char (point-min))
-			       (funcall mh-default-folder-for-message-function)))
-			"")
-		    t)))
-  (let ((last-input-char ?\C-f))
-    (expand-abbrev)
-    (save-excursion
-      (mh-to-field)
-      (insert (if (mh-folder-name-p folder)
-		  (substring folder 1)
-		folder)))))
-
-
-(defun mh-insert-signature ()
-  "Insert the file named by mh-signature-file-name at the current point."
-  (interactive)
-  (insert-file-contents mh-signature-file-name)
-  (set-buffer-modified-p (buffer-modified-p))) ; force mode line update
-
-
-(defun mh-check-whom ()
-  "Verify recipients of the current letter, showing expansion of any aliases."
-  (interactive)
-  (let ((file-name buffer-file-name))
-    (save-buffer)
-    (message "Checking recipients...")
-    (mh-in-show-buffer ("*Recipients*")
-      (bury-buffer (current-buffer))
-      (erase-buffer)
-      (mh-exec-cmd-output "whom" t file-name))
-    (message "Checking recipients...done")))
-
-
-
-;;; Routines to compose and send a letter.
-
-(defun mh-compose-and-send-mail (draft send-args
-				       sent-from-folder sent-from-msg
-				       to subject cc
-				       annotate-char annotate-field
-				       config)
-  ;; Edit and compose a draft message in buffer DRAFT and send or save it.
-  ;; SENT-FROM-FOLDER is buffer containing scan listing of current folder, or
-  ;; nil if none exists.
-  ;; SENT-FROM-MSG is the message number or sequence name or nil.
-  ;; SEND-ARGS is an optional argument passed to the send command.
-  ;; The TO, SUBJECT, and CC fields are passed to the
-  ;; mh-compose-letter-function.
-  ;; If ANNOTATE-CHAR is non-null, it is used to notate the scan listing of the
-  ;; message.  In that case, the ANNOTATE-FIELD is used to build a string
-  ;; for mh-annotate-msg.
-  ;; CONFIG is the window configuration to restore after sending the letter.
-  (pop-to-buffer draft)
-  (mh-letter-mode)
-  (setq mh-sent-from-folder sent-from-folder)
-  (setq mh-sent-from-msg sent-from-msg)
-  (setq mh-send-args send-args)
-  (setq mh-annotate-char annotate-char)
-  (setq mh-annotate-field annotate-field)
-  (setq mh-previous-window-config config)
-  (setq mode-line-buffer-identification (list "{%b}"))
-  (if (and (boundp 'mh-compose-letter-function)
-	   mh-compose-letter-function)
-      ;; run-hooks will not pass arguments.
-      (let ((value mh-compose-letter-function))
-	(if (and (listp value) (not (eq (car value) 'lambda)))
-	    (while value
-	      (funcall (car value) to subject cc)
-	      (setq value (cdr value)))
-	    (funcall mh-compose-letter-function to subject cc)))))
-
-
-(defun mh-send-letter (&optional arg)
-  "Send the draft letter in the current buffer.
-If optional prefix argument is provided, monitor delivery.
-Run mh-before-send-letter-hook before doing anything."
-  (interactive "P")
-  (run-hooks 'mh-before-send-letter-hook)
-  (save-buffer)
-  (message "Sending...")
-  (let ((draft-buffer (current-buffer))
-	(file-name buffer-file-name)
-	(config mh-previous-window-config))
-    (cond (arg
-	   (pop-to-buffer "MH mail delivery")
-	   (erase-buffer)
-	   (mh-exec-cmd-output mh-send-prog t "-watch" "-nopush"
-			       "-nodraftfolder" mh-send-args file-name)
-	   (goto-char (point-max))	; show the interesting part
-	   (recenter -1)
-	   (set-buffer draft-buffer))	; for annotation below
-	  (t
-	   (mh-exec-cmd-daemon mh-send-prog "-nodraftfolder" "-noverbose"
-			       mh-send-args file-name)))
-    (if mh-annotate-char
-	(mh-annotate-msg mh-sent-from-msg
-			 mh-sent-from-folder
-			 mh-annotate-char
-			 "-component" mh-annotate-field
-			 "-text" (format "\"%s %s\""
-					 (mh-get-header-field "To:")
-					 (mh-get-header-field "Cc:"))))
-
-    (cond ((or (not arg)
-	       (y-or-n-p "Kill draft buffer? "))
-	   (kill-buffer draft-buffer)
-	   (if config
-	       (set-window-configuration config))))
-    (if arg
-	(message "Sending...done")
-      (message "Sending...backgrounded"))))
-
-
-(defun mh-insert-letter (folder message verbatim)
-  "Insert a message into the current letter.
-Removes the message's headers using mh-invisible-headers.  Prefixes
-each non-blank line with mh-ins-buf-prefix.  Prompts for FOLDER and
-MESSAGE.  If prefix argument VERBATIM provided, do not indent and do
-not delete headers.  Leaves the mark before the letter and point after it."
-  (interactive
-   (list (mh-prompt-for-folder "Message from" mh-sent-from-folder nil)
-	 (read-input (format "Message number%s: "
-			     (if mh-sent-from-msg
-				 (format " [%d]" mh-sent-from-msg)
-			       "")))
-	 current-prefix-arg))
-  (save-restriction
-    (narrow-to-region (point) (point))
-    (let ((start (point-min)))
-      (if (equal message "") (setq message (int-to-string mh-sent-from-msg)))
-      (mh-exec-lib-cmd-output "mhl" "-nobell" "-noclear"
-			      (expand-file-name message
-						(mh-expand-file-name folder)))
-      (cond ((not verbatim)
-	     (mh-clean-msg-header start mh-invisible-headers mh-visible-headers)
-	     (set-mark start)		; since mh-clean-msg-header moves it
-	     (mh-insert-prefix-string mh-ins-buf-prefix))))))
-
-
-(defun mh-yank-cur-msg ()
-  "Insert the current message into the draft buffer.
-Prefix each non-blank line in the message with the string in
-`mh-ins-buf-prefix'.  If a region is set in the message's buffer, then
-only the region will be inserted.  Otherwise, the entire message will
-be inserted if `mh-yank-from-start-of-msg' is non-nil.  If this variable
-is nil, the portion of the message following the point will be yanked.
-If `mh-delete-yanked-msg-window' is non-nil, any window displaying the
-yanked message will be deleted."
-  (interactive)
-  (if (and mh-sent-from-folder mh-sent-from-msg)
-      (let ((to-point (point))
-	    (to-buffer (current-buffer)))
-	(set-buffer mh-sent-from-folder)
-	(if mh-delete-yanked-msg-window
-	    (delete-windows-on mh-show-buffer))
-	(set-buffer mh-show-buffer)	; Find displayed message
-	(let ((mh-ins-str (cond ((if (boundp 'mark-active)
-				     mark-active ;Emacs 19
-				   (mark)) ;Emacs 18
-				 (buffer-substring (region-beginning)
-						   (region-end)))
-				((eq 'body mh-yank-from-start-of-msg)
-				 (buffer-substring
-				  (save-excursion
-				    (goto-char (point-min))
-				    (mh-goto-header-end 1)
-				    (point))
-				  (point-max)))
-				(mh-yank-from-start-of-msg
-				 (buffer-substring (point-min) (point-max)))
-				(t
-				 (buffer-substring (point) (point-max))))))
-	  (set-buffer to-buffer)
-	  (save-restriction
-	    (narrow-to-region to-point to-point)
-	    (push-mark)
-	    (insert mh-ins-str)
-	    (mh-insert-prefix-string mh-ins-buf-prefix)
-	    (insert "\n"))))
-    (error "There is no current message")))
-
-
-(defun mh-insert-prefix-string (mh-ins-string)
-  ;; Run mail-citation-hook to insert a prefix string before each line
-  ;; in the buffer.  Generality for supercite users.
-  (set-mark (point-max))
-  (goto-char (point-min))
-  (cond (mail-citation-hook
-	 (run-hooks 'mail-citation-hook))
-	(mh-yank-hooks			;old hook name
-	 (run-hooks 'mh-yank-hooks))
-	(t
-	 (or (bolp) (forward-line 1))
-	 (let ((zmacs-regions nil))	;so "(mark)" works in XEmacs
-	   (while (< (point) (mark))
-	     (insert mh-ins-string)
-	     (forward-line 1))))))
-
-
-(defun mh-fully-kill-draft ()
-  "Kill the draft message file and the draft message buffer.
-Use \\[kill-buffer] if you don't want to delete the draft message file."
-  (interactive)
-  (if (y-or-n-p "Kill draft message? ")
-      (let ((config mh-previous-window-config))
-	(if (file-exists-p buffer-file-name)
-	    (delete-file buffer-file-name))
-	(set-buffer-modified-p nil)
-	(kill-buffer (buffer-name))
-	(message "")
-	(if config
-	    (set-window-configuration config)))
-    (error "Message not killed")))
-
-
-;;; Build the letter-mode keymap:
-
-(define-key mh-letter-mode-map "\C-c\C-f\C-b" 'mh-to-field)
-(define-key mh-letter-mode-map "\C-c\C-f\C-c" 'mh-to-field)
-(define-key mh-letter-mode-map "\C-c\C-f\C-d" 'mh-to-field)
-(define-key mh-letter-mode-map "\C-c\C-f\C-f" 'mh-to-fcc)
-(define-key mh-letter-mode-map "\C-c\C-f\C-r" 'mh-to-field)
-(define-key mh-letter-mode-map "\C-c\C-f\C-s" 'mh-to-field)
-(define-key mh-letter-mode-map "\C-c\C-f\C-t" 'mh-to-field)
-(define-key mh-letter-mode-map "\C-c\C-fb" 'mh-to-field)
-(define-key mh-letter-mode-map "\C-c\C-fc" 'mh-to-field)
-(define-key mh-letter-mode-map "\C-c\C-fd" 'mh-to-field)
-(define-key mh-letter-mode-map "\C-c\C-ff" 'mh-to-fcc)
-(define-key mh-letter-mode-map "\C-c\C-fr" 'mh-to-field)
-(define-key mh-letter-mode-map "\C-c\C-fs" 'mh-to-field)
-(define-key mh-letter-mode-map "\C-c\C-ft" 'mh-to-field)
-(define-key mh-letter-mode-map "\C-c\C-i" 'mh-insert-letter)
-(define-key mh-letter-mode-map "\C-c\C-q" 'mh-fully-kill-draft)
-(define-key mh-letter-mode-map "\C-c\C-\\" 'mh-fully-kill-draft) ;if no C-q
-(define-key mh-letter-mode-map "\C-c\C-s" 'mh-insert-signature)
-(define-key mh-letter-mode-map "\C-c\C-^" 'mh-insert-signature) ;if no C-s
-(define-key mh-letter-mode-map "\C-c\C-w" 'mh-check-whom)
-(define-key mh-letter-mode-map "\C-c\C-y" 'mh-yank-cur-msg)
-(define-key mh-letter-mode-map "\C-c\C-c" 'mh-send-letter)
-(define-key mh-letter-mode-map "\C-c\C-m\C-f" 'mh-mhn-compose-forw)
-(define-key mh-letter-mode-map "\C-c\C-m\C-e" 'mh-mhn-compose-anon-ftp)
-(define-key mh-letter-mode-map "\C-c\C-m\C-t" 'mh-mhn-compose-external-compressed-tar)
-(define-key mh-letter-mode-map "\C-c\C-m\C-i" 'mh-mhn-compose-insertion)
-(define-key mh-letter-mode-map "\C-c\C-e" 'mh-edit-mhn)
-(define-key mh-letter-mode-map "\C-c\C-m\C-u" 'mh-revert-mhn-edit)
-
-;; "C-c /" prefix is used in mh-letter-mode by pgp.el
-
-;;; autoloads from mh-mime
-
-(autoload 'mh-mhn-compose-insertion "mh-mime"
-  "Add a directive to insert a MIME message part from a file.
-This is the typical way to insert non-text parts in a message.
-See also \\[mh-edit-mhn]." t)
-
-(autoload 'mh-mhn-compose-anon-ftp "mh-mime"
-  "Add a directive for a MIME anonymous ftp external body part.
-This directive tells MH to include a reference to a
-message/external-body part retrievable by anonymous FTP.
-See also \\[mh-edit-mhn]." t)
-
-(autoload 'mh-mhn-compose-external-compressed-tar "mh-mime"
-  "Add a directive to include a MIME reference to a compressed tar file.
-The file should be available via anonymous ftp.  This directive
-tells MH to include a reference to a message/external-body part.
-See also \\[mh-edit-mhn]." t)
-
-(autoload 'mh-mhn-compose-forw "mh-mime"
-  "Add a forw directive to this message, to forward a message with MIME.
-This directive tells MH to include another message in this one.
-See also \\[mh-edit-mhn]." t)
-
-(autoload 'mh-edit-mhn "mh-mime"
-  "Format the current draft for MIME, expanding any mhn directives.
-Process the current draft with the mhn program, which,
-using directives already inserted in the draft, fills in
-all the MIME components and header fields.
-This step should be done last just before sending the message.
-The mhn program is part of MH version 6.8 or later.
-The `\\[mh-revert-mhn-edit]' command undoes this command.
-For assistance with creating mhn directives to insert
-various types of components in a message, see
-\\[mh-mhn-compose-insertion] (generic insertion from a file),
-\\[mh-mhn-compose-anon-ftp] (external reference to file via anonymous ftp),
-\\[mh-mhn-compose-external-compressed-tar] \
-\(reference to compressed tar file via anonymous ftp), and
-\\[mh-mhn-compose-forw] (forward message)." t)
-
-(autoload 'mh-revert-mhn-edit "mh-mime"
-  "Undoes the effect of \\[mh-edit-mhn] by reverting to the backup file.
-Optional non-nil argument means don't ask for confirmation." t)
--- a/lisp/mh-e/mh-e.el	Mon Aug 13 10:01:24 2007 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1540 +0,0 @@
-;;; mh-e.el --- GNU Emacs interface to the MH mail system
-
-;;; Copyright (C) 1985,86,87,88,90,92,93,94,95 Free Software Foundation, Inc.
-
-(defconst mh-e-time-stamp "Time-stamp: <95/10/30 19:14:06 gildea>")
-(defconst mh-e-version "5.0.2"
-  "Version numbers of this version of mh-e.")
-
-;; Maintainer: Stephen Gildea <gildea@lcs.mit.edu>
-;; Version: 5.0.2
-;; Keywords: mail
-;; Bug-reports: include `M-x mh-version' output in any correspondence
-
-;; This file is part of mh-e, 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, 675 Mass Ave, Cambridge, MA 02139, USA.
-
-;;; Commentary:
-
-;;; HOW TO USE:
-;;; M-x mh-rmail to read mail.  Type C-h m there for a list of commands.
-;;; C-u M-x mh-rmail to visit any folder.
-;;; M-x mh-smail to send mail.  From within the mail reader, "m" works, too.
-
-;;; MH (Message Handler) is a powerful mail reader.  The MH newsgroup
-;;; is comp.mail.mh; the mailing list is mh-users@ics.uci.edu (send to
-;;; mh-users-request to be added).  See the monthly Frequently Asked
-;;; Questions posting there for information on getting MH and mh-e.
-
-;;; mh-e is an Emacs interface to the MH mail system.
-;;; The mailing list mh-e@x.org is for discussion of mh-e and
-;;; announcements of new versions.  Send a "subscribe" message to
-;;; mh-e-request@x.org to be added.  Do not report bugs here; mail
-;;; them directly to the author (see top of mh-e.el source).
-;;; Include the output of M-x mh-version in any bug report.
-
-;;; mh-e works with GNU Emacs 18 or 19, and MH 6.
-
-;;; NB.  MH must have been compiled with the MHE compiler flag or several
-;;; features necessary for mh-e will be missing from MH commands, specifically
-;;; the -build switch to repl and forw.
-
-;;; Your .emacs might benefit from these bindings:
-;;; (global-set-key "\C-cr" 'mh-rmail)
-;;; (global-set-key "\C-xm" 'mh-smail)
-;;; (global-set-key "\C-x4m" 'mh-smail-other-window)
-
-;;; Change Log:
-
-;;; Original version for Gosling emacs by Brian Reid, Stanford, 1982.
-;;; Modified by James Larus, BBN, July 1984 and UCB, 1984 & 1985.
-;;; Rewritten for GNU Emacs, James Larus 1985.  larus@ginger.berkeley.edu
-;;; Modified by Stephen Gildea 1988.  gildea@lcs.mit.edu
-(defconst mh-e-RCS-id "$Id: mh-e.el,v 1.4 1997/06/26 02:31:00 steve Exp $")
-
-;;; Code:
-
-(provide 'mh-e)
-(require 'mh-utils)
-
-
-;;; Hooks:
-
-(defgroup mh nil
-  "Emacs interface to the MH mail system"
-  :group 'mail)
-
-(defgroup mh-hook nil
-  "Hooks to mh-e mode"
-  :prefix "mh-"
-  :group 'mh)
-
-
-(defcustom mh-folder-mode-hook nil
-  "Invoked in MH-Folder mode on a new folder."
-  :type 'hook
-  :group 'mh-hook)
-
-(defcustom mh-inc-folder-hook nil
-  "Invoked by \\<mh-folder-mode-map>`\\[mh-inc-folder]' after incorporating mail into a folder."
-  :type 'hook
-  :group 'mh-hook)
-
-(defcustom mh-show-hook nil
-  "Invoked after \\<mh-folder-mode-map>`\\[mh-show]' shows a message."
-  :type 'hook
-  :group 'mh-hook)
-
-(defcustom mh-show-mode-hook nil
-  "Invoked in MH-Show mode on each message."
-  :type 'hook
-  :group 'mh-hook)
-
-(defcustom mh-delete-msg-hook nil
-  "Invoked after marking each message for deletion."
-  :type 'hook
-  :group 'mh-hook)
-
-(defcustom mh-refile-msg-hook nil
-  "Invoked after marking each message for refiling."
-  :type 'hook
-  :group 'mh-hook)
-
-(defcustom mh-before-quit-hook nil
-  "Invoked by \\<mh-folder-mode-map>`\\[mh-quit]' before quitting mh-e.  See also  mh-quit-hook."
-  :type 'hook
-  :group 'mh-hook)
-
-(defcustom mh-quit-hook nil
-  "Invoked after \\<mh-folder-mode-map>`\\[mh-quit]' quits mh-e.  See also  mh-before-quit-hook."
-  :type 'hook
-  :group 'mh-hook)
-
-
-
-;;; Personal preferences:
-
-(defcustom mh-lpr-command-format "lpr -J '%s'"
-  "*Format for Unix command that prints a message.
-The string should be a Unix command line, with the string '%s' where
-the job's name (folder and message number) should appear.  The formatted
-message text is piped to this command when you type \\<mh-folder-mode-map>`\\[mh-print-msg]'."
-  :type 'string
-  :group 'mh)
-
-(defcustom mh-scan-prog "scan"
-  "*Program to run to generate one-line-per-message listing of a folder.
-Normally \"scan\" or a file name linked to scan.  This file is searched
-for relative to the mh-progs directory unless it is an absolute pathname.
-Automatically becomes buffer-local when set in any fashion."
-  :type 'string
-  :group 'mh)
-(make-variable-buffer-local 'mh-scan-prog)
-
-(defcustom mh-inc-prog "inc"
-  "*Program to run to incorporate new mail into a folder.
-Normally \"inc\".  This file is searched for relative to
-the mh-progs directory unless it is an absolute pathname."
-  :type 'string
-  :group 'mh)
-
-(defcustom mh-folder-coding-system 'ctext
-  "*Coding-system to decode folder."
-  :type 'coding-system
-  :group 'mh)
-(make-variable-buffer-local 'mh-folder-coding-system)
-
-(defcustom mh-print-background nil
-  "*Print messages in the background if non-nil.
-WARNING: do not delete the messages until printing is finished;
-otherwise, your output may be truncated."
-  :type 'boolean
-  :group 'mh)
-
-(defcustom mh-recenter-summary-p nil
-  "*Recenter summary window when the show window is toggled off if non-nil."
-  :type 'boolean
-  :group 'mh)
-
-(defcustom mh-do-not-confirm nil
-  "*Non-nil means do not prompt for confirmation before some mh-e commands.
-Affects non-recoverable commands such as mh-kill-folder and mh-undo-folder."
-  :type 'boolean
-  :group 'mh)
-
-(defcustom mh-store-default-directory nil
-  "*Last directory used by \\[mh-store-msg]; default for next store.
-A directory name string, or nil to use current directory."
-  :type '(choice (const :tag "Current" nil)
-		 directory)
-  :group 'mh)
-
-;;; Parameterize mh-e to work with different scan formats.  The defaults work
-;;; with the standard MH scan listings, in which the first 4 characters on
-;;; the line are the message number, followed by two places for notations.
-
-(defvar mh-good-msg-regexp  "^....[^D^]"
-  "Regexp specifiying the scan lines that are 'good' messages.")
-
-(defvar mh-deleted-msg-regexp "^....D"
-  "Regexp matching scan lines of deleted messages.")
-
-(defvar mh-refiled-msg-regexp  "^....\\^"
-  "Regexp matching scan lines of refiled messages.")
-
-(defvar mh-valid-scan-line "^ *[0-9]"
-  "Regexp matching scan lines for messages (not error messages).")
-
-(defvar mh-cur-scan-msg-regexp "^....\\+"
-  "Regexp matching scan line for the cur message.")
-
-(defvar mh-note-deleted "D"
-  "String whose first character is used to notate deleted messages.")
-
-(defvar mh-note-refiled "^"
-  "String whose first character is used to notate refiled messages.")
-
-(defvar mh-note-cur "+"
-  "String whose first character is used to notate the current message.")
-
-(defvar mh-partial-folder-mode-line-annotation "select"
-  "Annotation when displaying part of a folder.
-The string is displayed after the folder's name.  NIL for no annotation.")
-
-
-;;; Internal variables:
-
-(defvar mh-last-destination nil)	;Destination of last refile or write command.
-
-(defvar mh-folder-mode-map (make-keymap)
-  "Keymap for MH folders.")
-
-(defvar mh-delete-list nil)		;List of msg numbers to delete.
-
-(defvar mh-refile-list nil)		;List of folder names in mh-seq-list.
-
-(defvar mh-next-direction 'forward)	;Direction to move to next message.
-
-(defvar mh-narrowed-to-seq nil)		;Sequence display is narrowed to or nil if not narrowed.
-
-(defvar mh-first-msg-num nil)		;Number of first msg in buffer.
-
-(defvar mh-last-msg-num nil)		;Number of last msg in buffer.
-
-(defvar mh-mode-line-annotation nil)	;Indiction this is not the full folder.
-
-;;; Macros and generic functions:
-
-(defun mh-mapc (func list)
-  (while list
-    (funcall func (car list))
-    (setq list (cdr list))))
-
-
-
-;;; Entry points:
-
-;;;###autoload
-(defun mh-rmail (&optional arg)
-  "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."
-  (interactive "P")
-  (mh-find-path)
-  (if arg
-      (call-interactively 'mh-visit-folder)
-      (mh-inc-folder)))
-
-
-;;; mh-smail and mh-smail-other-window have been moved to the new file
-;;; mh-comp.el, but Emacs 18 still looks for them here, so provide a
-;;; definition here, too, for a while.
-
-(defun mh-smail ()
-  "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."
-  (interactive)
-  (mh-find-path)
-  (require 'mh-comp)
-  (call-interactively 'mh-send))
-
-
-(defun mh-smail-other-window ()
-  "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."
-  (interactive)
-  (mh-find-path)
-  (require 'mh-comp)
-  (call-interactively 'mh-send-other-window))
-
-
-
-;;; User executable mh-e commands:
-
-
-(defun mh-delete-msg (msg-or-seq)
-  "Mark the specified MESSAGE(s) for subsequent deletion and move to the next.
-Default is the displayed message.  If optional prefix argument is
-given then prompt for the message sequence."
-  (interactive (list (if current-prefix-arg
-			 (mh-read-seq-default "Delete" t)
-			 (mh-get-msg-num t))))
-  (mh-delete-msg-no-motion msg-or-seq)
-  (mh-next-msg))
-
-
-(defun mh-delete-msg-no-motion (msg-or-seq)
-  "Mark the specified MESSAGE(s) for subsequent deletion.
-Default is the displayed message.  If optional prefix argument is
-provided, then prompt for the message sequence."
-  (interactive (list (if current-prefix-arg
-			 (mh-read-seq-default "Delete" t)
-			 (mh-get-msg-num t))))
-  (if (numberp msg-or-seq)
-      (mh-delete-a-msg msg-or-seq)
-      (mh-map-to-seq-msgs 'mh-delete-a-msg msg-or-seq)))
-
-
-(defun mh-execute-commands ()
-  "Process outstanding delete and refile requests."
-  (interactive)
-  (if mh-narrowed-to-seq (mh-widen))
-  (mh-process-commands mh-current-folder)
-  (mh-set-scan-mode)
-  (mh-goto-cur-msg)			; after mh-set-scan-mode for efficiency
-  (mh-make-folder-mode-line)
-  t)					; return t for [local-]write-file-hooks
-
-
-(defun mh-first-msg ()
-  "Move to the first message."
-  (interactive)
-  (goto-char (point-min))
-  (while (and (not (eobp)) (not (looking-at mh-valid-scan-line)))
-    (forward-line 1)))
-
-
-(defun mh-header-display ()
-  "Show the current message with all its headers.
-Displays headers that might have been suppressed by setting the
-variables `mh-clean-message-header' or `mhl-formfile', or by the fallback
-behavior of scrolling uninteresting headers off the top of the window.
-Type \"\\[mh-show]\" to show the message normally again."
-  (interactive)
-  (and (not mh-showing-with-headers)
-       (or mhl-formfile mh-clean-message-header)
-       (mh-invalidate-show-buffer))
-  (let ((mhl-formfile nil)
-	(mh-clean-message-header nil))
-    (mh-show-msg nil)
-    (mh-in-show-buffer (mh-show-buffer)
-      (goto-char (point-min))
-      (mh-recenter 0))
-    (setq mh-showing-with-headers t)))
-
-
-(defun mh-inc-folder (&optional maildrop-name)
-  "Inc(orporate)s new mail into the Inbox folder.
-Optional prefix argument specifies an alternate maildrop from the default.
-If the prefix argument is given, incorporates mail into the current
-folder, otherwise uses the folder named by `mh-inbox'.
-Runs `mh-inc-folder-hook' after incorporating new mail.
-Do not call this function from outside mh-e; use \\[mh-rmail] instead."
-  (interactive (list (if current-prefix-arg
-			 (expand-file-name
-			  (read-file-name "inc mail from file: "
-					  mh-user-path)))))
-  (let ((config (current-window-configuration)))
-    (if (not maildrop-name)
-	(cond ((not (get-buffer mh-inbox))
-	       (mh-make-folder mh-inbox)
-	       (setq mh-previous-window-config config))
-	      ((not (eq (current-buffer) (get-buffer mh-inbox)))
-	       (switch-to-buffer mh-inbox)
-	       (setq mh-previous-window-config config)))))
-  (mh-get-new-mail maildrop-name)
-  (run-hooks 'mh-inc-folder-hook))
-
-
-(defun mh-last-msg ()
-  "Move to the last message."
-  (interactive)
-  (goto-char (point-max))
-  (while (and (not (bobp)) (looking-at "^$"))
-    (forward-line -1)))
-
-
-(defun mh-next-undeleted-msg (&optional arg)
-  "Move to the NTH next undeleted message in window."
-  (interactive "p")
-  (setq mh-next-direction 'forward)
-  (forward-line 1)
-  (cond ((re-search-forward mh-good-msg-regexp nil 0 arg)
-	 (beginning-of-line)
-	 (mh-maybe-show))
-	(t
-	 (forward-line -1)
-	 (if (get-buffer mh-show-buffer)
-	     (delete-windows-on mh-show-buffer)))))
-
-
-(defun mh-refile-msg (msg-or-seq folder)
-  "Refile MESSAGE(s) (default: displayed message) into FOLDER.
-If optional prefix argument provided, then prompt for message sequence."
-  (interactive
-   (list (if current-prefix-arg
-	     (mh-read-seq-default "Refile" t)
-	   (mh-get-msg-num t))
-	 (intern
-	  (mh-prompt-for-folder
-	   "Destination"
-	   (or (and mh-default-folder-for-message-function
-		    (let ((refile-file (mh-msg-filename (mh-get-msg-num t))))
-		      (save-excursion
-			(set-buffer (get-buffer-create mh-temp-buffer))
-			(erase-buffer)
-			(insert-file-contents refile-file)
-			(let ((buffer-file-name refile-file))
-			  (funcall mh-default-folder-for-message-function)))))
-	       (and (eq 'refile (car mh-last-destination))
-		    (symbol-name (cdr mh-last-destination)))
-	       "")
-	   t))))
-  (setq mh-last-destination (cons 'refile folder))
-  (if (numberp msg-or-seq)
-      (mh-refile-a-msg msg-or-seq folder)
-      (mh-map-to-seq-msgs 'mh-refile-a-msg msg-or-seq folder))
-  (mh-next-msg))
-
-
-(defun mh-refile-or-write-again (message)
-  "Re-execute the last refile or write command on the given MESSAGE.
-Default is the displayed message.  Use the same folder or file as the
-previous refile or write command."
-  (interactive (list (mh-get-msg-num t)))
-  (if (null mh-last-destination)
-      (error "No previous refile or write"))
-  (cond ((eq (car mh-last-destination) 'refile)
-	 (mh-refile-a-msg message (cdr mh-last-destination))
-	 (message "Destination folder: %s" (cdr mh-last-destination)))
-	(t
-	 (apply 'mh-write-msg-to-file message (cdr mh-last-destination))
-	 (message "Destination: %s" (cdr mh-last-destination))))
-  (mh-next-msg))
-
-
-(defun mh-quit ()
-  "Quit the current mh-e folder.
-Start by running mh-before-quit-hook.  Restore the previous window
-configuration, if one exists.  Finish by running mh-quit-hook."
-  (interactive)
-  (run-hooks 'mh-before-quit-hook) 
-  (mh-update-sequences)
-  (mh-invalidate-show-buffer)
-  (bury-buffer (current-buffer))
-  (if (get-buffer mh-show-buffer)
-      (bury-buffer mh-show-buffer))
-  (if mh-previous-window-config
-      (set-window-configuration mh-previous-window-config))
-  (run-hooks 'mh-quit-hook))
-
-(defun mh-page-msg (&optional arg)
-  "Page the displayed message forwards.
-Scrolls ARG lines or a full screen if no argument is supplied."
-  (interactive "P")
-  (scroll-other-window arg))
-
-
-(defun mh-previous-page (&optional arg)
-  "Page the displayed message backwards.
-Scrolls ARG lines or a full screen if no argument is supplied."
-  (interactive "P")
-  (mh-in-show-buffer (mh-show-buffer)
-    (scroll-down arg)))
-
-
-(defun mh-previous-undeleted-msg (&optional arg)
-  "Move to the NTH previous undeleted message in window."
-  (interactive "p")
-  (setq mh-next-direction 'backward)
-  (beginning-of-line)
-  (cond ((re-search-backward mh-good-msg-regexp nil 0 arg)
-	 (mh-maybe-show))
-	(t
-	 (if (get-buffer mh-show-buffer)
-	     (delete-windows-on mh-show-buffer)))))
-
-
-(defun mh-rescan-folder (&optional range)
-  "Rescan a folder after optionally processing the outstanding commands.
-If optional prefix argument is provided, prompt for the range of
-messages to display.  Otherwise show the entire folder."
-  (interactive (list (if current-prefix-arg
-			 (mh-read-msg-range "Range to scan [all]? ")
-		       nil)))
-  (setq mh-next-direction 'forward)
-  (mh-scan-folder mh-current-folder (or range "all")))
-
-
-(defun mh-write-msg-to-file (msg file no-headers)
-  "Append MESSAGE to the end of a FILE.
-If NO-HEADERS (prefix argument) is provided, write only the message body.
-Otherwise send the entire message including the headers."
-  (interactive
-   (list (mh-get-msg-num t)
-	 (let ((default-dir (if (eq 'write (car mh-last-destination))
-				(file-name-directory (car (cdr mh-last-destination)))
-			      default-directory)))
-	   (read-file-name (format "Save message%s in file: "
-				   (if current-prefix-arg " body" ""))
-			   default-dir
-			   (if (eq 'write (car mh-last-destination))
-			       (car (cdr mh-last-destination))
-			     (expand-file-name "mail.out" default-dir))))
-	 current-prefix-arg))
-  (let ((msg-file-to-output (mh-msg-filename msg))
-	(output-file (mh-expand-file-name file)))
-    (setq mh-last-destination (list 'write file (if no-headers 'no-headers)))
-    (save-excursion
-      (set-buffer (get-buffer-create mh-temp-buffer))
-      (erase-buffer)
-      (insert-file-contents msg-file-to-output)
-      (goto-char (point-min))
-      (if no-headers (search-forward "\n\n"))
-      (append-to-file (point) (point-max) output-file))))
-
-
-(defun mh-toggle-showing ()
-  "Toggle the scanning mode/showing mode of displaying messages."
-  (interactive)
-  (if mh-showing
-      (mh-set-scan-mode)
-      (mh-show)))
-
-
-(defun mh-undo (msg-or-seq)
-  "Undo the pending deletion or refile of the specified MESSAGE(s).
-Default is the displayed message.  If optional prefix argument is
-provided, then prompt for the message sequence."
-  (interactive (list (if current-prefix-arg
-			 (mh-read-seq-default "Undo" t)
-			 (mh-get-msg-num t))))
-  (cond ((numberp msg-or-seq)
-	 (let ((original-position (point)))
-	   (beginning-of-line)
-	   (while (not (or (looking-at mh-deleted-msg-regexp)
-			   (looking-at mh-refiled-msg-regexp)
-			   (and (eq mh-next-direction 'forward) (bobp))
-			   (and (eq mh-next-direction 'backward)
-				(save-excursion (forward-line) (eobp)))))
-	     (forward-line (if (eq mh-next-direction 'forward) -1 1)))
-	   (if (or (looking-at mh-deleted-msg-regexp)
-		   (looking-at mh-refiled-msg-regexp))
-	       (progn
-		 (mh-undo-msg (mh-get-msg-num t))
-		 (mh-maybe-show))
-	       (goto-char original-position)
-	       (error "Nothing to undo"))))
-	(t
-	 (mh-map-to-seq-msgs 'mh-undo-msg msg-or-seq)))
-  ;; update the mh-refile-list so mh-outstanding-commands-p will work
-  (mh-mapc (function
-	    (lambda (elt)
-	      (if (not (mh-seq-to-msgs elt))
-		  (setq mh-refile-list (delq elt mh-refile-list)))))
-	   mh-refile-list)
-  (if (not (mh-outstanding-commands-p))
-      (mh-set-folder-modified-p nil)))
-
-
-;;;###autoload
-(defun mh-version ()
-  "Display version information about mh-e and the MH mail handling system."
-  (interactive)
-  (mh-find-progs)
-  (set-buffer (get-buffer-create mh-temp-buffer))
-  (erase-buffer)
-  (insert "  mh-e info:\n\nversion: " mh-e-version "\n" mh-e-time-stamp
-	  "\nEmacs: " emacs-version " on " (symbol-name system-type) " ")
-  (condition-case ()
-      (call-process "uname" nil t nil "-a")
-    (file-error))
-  (insert "\n\n  MH info:\n\n" (expand-file-name "inc" mh-progs) ":\n")
-  (let ((help-start (point)))
-    (condition-case err-data
-	(mh-exec-cmd-output "inc" nil "-help")
-      (file-error (insert (mapconcat 'concat (cdr err-data) ": "))))
-    (goto-char help-start)
-    (search-forward "version: " nil t)
-    (beginning-of-line)
-    (delete-region help-start (point))
-    (goto-char (point-min)))
-  (display-buffer mh-temp-buffer))
-
-
-(defun mh-visit-folder (folder &optional range)
-  "Visit FOLDER and display RANGE of messages.
-Do not call this function from outside mh-e; see \\[mh-rmail] instead."
-  (interactive (list (mh-prompt-for-folder "Visit" mh-inbox t)
-		     (mh-read-msg-range "Range [all]? ")))
-  (let ((config (current-window-configuration)))
-    (mh-scan-folder folder (or range "all"))
-    (setq mh-previous-window-config config))
-  nil)
-
-
-(defun mh-compat-quit ()
-  "The \"b\" key is obsolescent; will assume you want \"\\[mh-quit]\" ..."
-  ;; Was going to make it run mh-burst-digest, but got complaint that
-  ;; 'b' should mean 'back', as it does in info, less, and rn.
-  ;; This is a temporary compatibility function.
-  (interactive)
-  (message "%s" (documentation this-command))
-  (sit-for 1)
-  (call-interactively 'mh-quit))
-
-
-(defun mh-update-sequences ()
-  "Update MH's Unseen sequence and current folder and message.
-Flush mh-e's state out to MH.  The message at the cursor becomes current."
-  (interactive)
-  ;; mh-update-sequences is the opposite of mh-read-folder-sequences,
-  ;; which updates mh-e's state from MH.
-  (let ((folder-set (mh-update-unseen))
-	(new-cur (mh-get-msg-num nil)))
-    (if new-cur
-	(let ((seq-entry (mh-find-seq 'cur)))
-	  (mh-remove-cur-notation)
-	  (setcdr seq-entry (list new-cur)) ;delete-seq-locally, add-msgs-to-seq
-	  (mh-define-sequence 'cur (list new-cur))
-	  (beginning-of-line)
-	  (if (looking-at mh-good-msg-regexp)
-	      (mh-notate nil mh-note-cur mh-cmd-note)))
-      (or folder-set
-	  (save-excursion
-	    (mh-exec-cmd-quiet t "folder" mh-current-folder "-fast"))))))
-
-
-
-
-;;; Support routines.
-
-(defun mh-delete-a-msg (msg)
-  ;; Delete the MESSAGE.
-  (save-excursion
-    (mh-goto-msg msg nil t)
-    (if (looking-at mh-refiled-msg-regexp)
-	(error "Message %d is refiled.  Undo refile before deleting." msg))
-    (if (looking-at mh-deleted-msg-regexp)
-	nil
-	(mh-set-folder-modified-p t)
-	(setq mh-delete-list (cons msg mh-delete-list))
-	(mh-add-msgs-to-seq msg 'deleted t)
-	(mh-notate msg mh-note-deleted mh-cmd-note)
-	(run-hooks 'mh-delete-msg-hook))))
-
-(defun mh-refile-a-msg (msg destination)
-  ;; Refile MESSAGE in FOLDER.  FOLDER is a symbol, not a string.
-  (save-excursion
-    (mh-goto-msg msg nil t)
-    (cond ((looking-at mh-deleted-msg-regexp)
-	   (error "Message %d is deleted.  Undo delete before moving." msg))
-	  ((looking-at mh-refiled-msg-regexp)
-	   (if (y-or-n-p
-		(format "Message %d already refiled.  Copy to %s as well? "
-			msg destination))
-	       (mh-exec-cmd "refile" (mh-get-msg-num t) "-link"
-			    "-src" mh-current-folder
-			    (symbol-name destination))
-	       (message "Message not copied.")))
-	  (t
-	   (mh-set-folder-modified-p t)
-	   (if (not (memq destination mh-refile-list))
-	       (setq mh-refile-list (cons destination mh-refile-list)))
-	   (if (not (memq msg (mh-seq-to-msgs destination)))
-	       (mh-add-msgs-to-seq msg destination t))
-	   (mh-notate msg mh-note-refiled mh-cmd-note)
-	   (run-hooks 'mh-refile-msg-hook)))))
-
-
-(defun mh-next-msg ()
-  ;; Move backward or forward to the next undeleted message in the buffer.
-  (if (eq mh-next-direction 'forward)
-      (mh-next-undeleted-msg 1)
-      (mh-previous-undeleted-msg 1)))
-
-
-(defun mh-set-scan-mode ()
-  ;; Display the scan listing buffer, but do not show a message.
-  (if (get-buffer mh-show-buffer)
-      (delete-windows-on mh-show-buffer))
-  (setq mh-showing nil)
-  (set-buffer-modified-p (buffer-modified-p)) ;force mode line update
-  (if mh-recenter-summary-p
-      (mh-recenter nil)))
-
-
-(defun mh-undo-msg (msg)
-  ;; Undo the deletion or refile of one MESSAGE.
-  (cond ((memq msg mh-delete-list)
-	 (setq mh-delete-list (delq msg mh-delete-list))
-	 (mh-delete-msg-from-seq msg 'deleted t))
-	(t
-	 (mh-mapc (function (lambda (dest)
-			      (mh-delete-msg-from-seq msg dest t)))
-		  mh-refile-list)))
-  (mh-notate msg ?  mh-cmd-note))
-
-
-
-
-;;; The folder data abstraction.
-
-(defun mh-make-folder (name)
-  ;; Create and initialize a new mail folder called NAME and make it the
-  ;; current folder.
-  (switch-to-buffer name)
-  (setq buffer-read-only nil)
-  (erase-buffer)
-  (setq buffer-read-only t)
-  (mh-folder-mode)
-  (mh-set-folder-modified-p nil)
-  (setq buffer-file-name mh-folder-filename)
-  (mh-make-folder-mode-line))
-
-
-;;; Ensure new buffers won't get this mode if default-major-mode is nil.
-(put 'mh-folder-mode 'mode-class 'special)
-
-(defun mh-folder-mode ()
-  "Major mh-e mode for \"editing\" an MH folder scan listing.\\<mh-folder-mode-map>
-You can show the message the cursor is pointing to, and step through the
-messages.  Messages can be marked for deletion or refiling into another
-folder; these commands are executed all at once with a separate command.
-
-A prefix argument (\\[universal-argument]) to delete, refile, list, or undo
-applies the action to a message sequence.
-
-Here is a list of the standard keys for mh-e commands, grouped by function.
-This list is purposefully not customized; mh-e has a long history, and many
-alternate key bindings as a result.  This list is to encourage users to use
-standard keys so the other keys can perhaps someday be put to new uses.
-
-t	toggle show or scan-only mode
-RET	show message, or back to top if already showing
-
-SPC	page message forward
-DEL	page message back
-
-n	next message
-p	previous message
-g	go to message by number
-
-d	mark for deletion
-o, ^	mark for output (refile) to another folder
-?	show folder of pending refile
-u	undo delete or refile marking
-
-x	execute marked deletes and refiles
-i	incorporate new mail
-
-m	mail a new message
-r	reply to a message
-f	forward a message
-
-q	quit mh-e
-
-M-f	visit new folder
-M-r	rescan this folder
-
-Here are all the commands with their current binding, listed in key order:
-\\{mh-folder-mode-map}
-
-Variables controlling mh-e operation are (defaults in parentheses):
-
- mh-recursive-folders (nil)
-    Non-nil means commands which operate on folders do so recursively.
-
- mh-bury-show-buffer (t)
-    Non-nil means that the buffer used to display message is buried.
-    It will never be offered as the default other buffer.
-
- mh-clean-message-header (nil)
-    Non-nil means remove header lines matching the regular expression
-    specified in mh-invisible-headers from messages.
-
- mh-visible-headers (nil)
-    If non-nil, it contains a regexp specifying the headers that are shown in
-    a message if mh-clean-message-header is non-nil.  Setting this variable
-    overrides mh-invisible-headers.
-
- mh-do-not-confirm (nil)
-    Non-nil means do not prompt for confirmation before executing some
-    non-recoverable commands such as mh-kill-folder and mh-undo-folder.
-
- mhl-formfile (nil)
-    Name of format file to be used by mhl to show messages.
-    A value of T means use the default format file.
-    Nil means don't use mhl to format messages.
-
- mh-lpr-command-format (\"lpr -p -J '%s'\")
-    Format for command used to print a message on a system printer.
-
- mh-scan-prog (\"scan\")
-    Program to run to generate one-line-per-message listing of a folder.
-    Normally \"scan\" or a file name linked to scan.  This file is searched
-    for relative to the mh-progs directory unless it is an absolute pathname.
-    Automatically becomes buffer-local when set in any fashion.
-
- mh-print-background (nil)
-    Print messages in the background if non-nil.
-    WARNING: do not delete the messages until printing is finished;
-    otherwise, your output may be truncated.
-
- mh-recenter-summary-p (nil)
-    If non-nil, then the scan listing is recentered when the window displaying
-    a messages is toggled off.
-
- mh-summary-height (4)
-    Number of lines in the summary window including the mode line.
-
-The value of mh-folder-mode-hook is called when a new folder is set up."
-
-  (kill-all-local-variables)
-  (use-local-map mh-folder-mode-map)
-  (setq major-mode 'mh-folder-mode)
-  (mh-set-mode-name "MH-Folder")
-  (mh-make-local-vars
-   'mh-current-folder (buffer-name)	; Name of folder, a string
-   'mh-show-buffer (format "show-%s" (buffer-name)) ; Buffer that displays msgs
-   'mh-folder-filename			; e.g. "/usr/foobar/Mail/inbox/"
-   (file-name-as-directory (mh-expand-file-name (buffer-name)))
-   'mh-showing nil			; Show message also?
-   'mh-delete-list nil			; List of msgs nums to delete
-   'mh-refile-list nil			; List of folder names in mh-seq-list
-   'mh-seq-list nil			; Alist of (seq . msgs) nums
-   'mh-seen-list nil			; List of displayed messages
-   'mh-next-direction 'forward		; Direction to move to next message
-   'mh-narrowed-to-seq nil		; Sequence display is narrowed to
-   'mh-first-msg-num nil		; Number of first msg in buffer
-   'mh-last-msg-num nil			; Number of last msg in buffer
-   'mh-msg-count nil			; Number of msgs in buffer
-   'mh-mode-line-annotation nil		; Indiction this is not the full folder
-   'mh-previous-window-config nil)	; Previous window configuration
-  (setq truncate-lines t)
-  (auto-save-mode -1)
-  (setq buffer-offer-save t)
-  ;; XEmacs change
-  (if (featurep 'scrollbar)
-      (set-specifier scrollbar-height (cons (current-buffer) 0)))
-  (if (boundp 'local-write-file-hooks)
-      (setq local-write-file-hooks '(mh-execute-commands)) ;Emacs 19
-    (make-local-variable 'write-file-hooks)
-    (setq write-file-hooks '(mh-execute-commands))) ;Emacs 18
-  (make-local-variable 'revert-buffer-function)
-  (setq revert-buffer-function 'mh-undo-folder)
-  (or (assq 'mh-showing minor-mode-alist)
-      (setq minor-mode-alist
-	    (cons '(mh-showing " Show") minor-mode-alist)))
-  (run-hooks 'mh-folder-mode-hook))
-
-
-(defun mh-make-local-vars (&rest pairs)
-  ;; Take VARIABLE-VALUE pairs and make local variables initialized to the
-  ;; value.
-  (while pairs
-    (make-variable-buffer-local (car pairs))
-    (set (car pairs) (car (cdr pairs)))
-    (setq pairs (cdr (cdr pairs)))))
-
-
-(defun mh-scan-folder (folder range)
-  ;; Scan the FOLDER over the RANGE.  Return in the folder's buffer.
-  (cond ((null (get-buffer folder))
-	 (mh-make-folder folder))
-	(t
-	 (mh-process-or-undo-commands folder)
-	 (switch-to-buffer folder)))
-  (mh-regenerate-headers range)
-  (cond ((zerop (buffer-size))
-	 (if (equal range "all")
-	     (message "Folder %s is empty" folder)
-	   (message "No messages in %s, range %s" folder range))
-	 (sit-for 5)))
-  (mh-goto-cur-msg))
-
-
-(defun mh-regenerate-headers (range &optional update)
-  ;; scan folder over range RANGE.
-  ;; If UPDATE, append the scan lines, otherwise replace.
-  (let ((folder mh-current-folder)
-	scan-start)
-    (message "Scanning %s..." folder)
-    (with-mh-folder-updating (nil)
-      (if update
-	  (goto-char (point-max))
-	(erase-buffer))
-      (setq scan-start (point))
-      (let ((coding-system-for-read mh-folder-coding-system))
-	(mh-exec-cmd-output mh-scan-prog nil
-			    "-noclear" "-noheader"
-			    "-width" (window-width)
-			    folder range))
-      (goto-char scan-start)
-      (cond ((looking-at "scan: no messages in")
-	     (keep-lines mh-valid-scan-line)) ; Flush random scan lines
-	    ((looking-at "scan: "))	; Keep error messages
-	    (t
-	     (keep-lines mh-valid-scan-line))) ; Flush random scan lines
-      (setq mh-seq-list (mh-read-folder-sequences folder nil))
-      (mh-notate-user-sequences)
-      (or update
-	  (setq mh-mode-line-annotation
-		(if (equal range "all")
-		    nil
-		  mh-partial-folder-mode-line-annotation)))
-      (mh-make-folder-mode-line))
-    (message "Scanning %s...done" folder)))
-
-
-(defun mh-get-new-mail (maildrop-name)
-  ;; Read new mail from a maildrop into the current buffer.
-  ;; Return in the current buffer.
-  (let ((point-before-inc (point))
-	(folder mh-current-folder)
-	(new-mail-p nil))
-    (with-mh-folder-updating (t)
-      (message (if maildrop-name
-		   (format "inc %s -file %s..." folder maildrop-name)
-		   (format "inc %s..." folder)))
-      (setq mh-next-direction 'forward)
-      (goto-char (point-max))
-      (let ((start-of-inc (point))
-	    (coding-system-for-read mh-folder-coding-system))
-	(if maildrop-name
-	    ;; I think MH 5 used "-ms-file" instead of "-file",
-	    ;; which would make inc'ing from maildrops fail.
-	    (mh-exec-cmd-output mh-inc-prog nil folder
-				"-file" (expand-file-name maildrop-name)
-				"-width" (window-width)
-				"-truncate")
-	    (mh-exec-cmd-output mh-inc-prog nil
-				"-width" (window-width)))
-	(message
-	 (if maildrop-name
-	     (format "inc %s -file %s...done" folder maildrop-name)
-	     (format "inc %s...done" folder)))
-	(goto-char start-of-inc)
-	(cond ((save-excursion
-		 (re-search-forward "^inc: no mail" nil t))
-	       (message "No new mail%s%s" (if maildrop-name " in " "")
-			(if maildrop-name maildrop-name "")))
-	      ((re-search-forward "^inc:" nil t) ; Error messages
-	       (error "inc error"))
-	      (t
-	       (mh-remove-cur-notation)
-	       (setq new-mail-p t)))
-	(keep-lines mh-valid-scan-line) ; Flush random scan lines
-	(setq mh-seq-list (mh-read-folder-sequences folder t))
-	(mh-notate-user-sequences)
-	(if new-mail-p
-	    (progn
-	      (mh-make-folder-mode-line)
-	      (mh-goto-cur-msg))
-	    (goto-char point-before-inc))))))
-
-
-(defun mh-make-folder-mode-line (&optional ignored)
-  ;; Set the fields of the mode line for a folder buffer.
-  ;; The optional argument is now obsolete.  It used to be used to pass
-  ;; in what is now stored in the buffer-local variable
-  ;; mh-mode-line-annotation.
-  (save-excursion
-    (mh-first-msg)
-    (setq mh-first-msg-num (mh-get-msg-num nil))
-    (mh-last-msg)
-    (setq mh-last-msg-num (mh-get-msg-num nil))
-    (setq mh-msg-count (count-lines (point-min) (point-max)))
-    (setq mode-line-buffer-identification
-	  (list (format "{%%b%s} %d msg%s"
-			(if mh-mode-line-annotation
-			    (format "/%s" mh-mode-line-annotation)
-			  "")
-			mh-msg-count
-			(if (zerop mh-msg-count)
-			    "s"
-			  (if (> mh-msg-count 1)
-			      (format "s (%d-%d)" mh-first-msg-num
-				      mh-last-msg-num)
-			    (format " (%d)" mh-first-msg-num))))))))
-
-
-(defun mh-unmark-all-headers (remove-all-flags)
-  ;; Remove all '+' flags from the headers, and if called with a non-nil
-  ;; argument, remove all 'D', '^' and '%' flags too.
-  ;; Optimized for speed (i.e., no regular expressions).
-  (save-excursion
-    (let ((case-fold-search nil)
-	  (last-line (1- (point-max)))
-	  char)
-      (mh-first-msg)
-      (while (<= (point) last-line)
-	(forward-char mh-cmd-note)
-	(setq char (following-char))
-	(if (or (and remove-all-flags
-		     (or (eql char (aref mh-note-deleted 0))
-			 (eql char (aref mh-note-refiled 0))))
-		(eql char (aref mh-note-cur 0)))
-	    (progn
-	      (delete-char 1)
-	      (insert " ")))
-	(if remove-all-flags
-	    (progn
-	      (forward-char 1)
-	      (if (eql (following-char) (aref mh-note-seq 0))
-		  (progn
-		    (delete-char 1)
-		    (insert " ")))))
-	(forward-line)))))
-
-
-(defun mh-remove-cur-notation ()
-  ;; Remove old cur notation (cf mh-goto-cur-msg code).
-  (let ((cur-msg (car (mh-seq-to-msgs 'cur))))
-    (save-excursion
-      (and cur-msg
-	   (mh-goto-msg cur-msg t t)
-	   (looking-at mh-cur-scan-msg-regexp)
-	   (mh-notate nil ?  mh-cmd-note)))))
-
-(defun mh-goto-cur-msg ()
-  ;; Position the cursor at the current message.
-  (let ((cur-msg (car (mh-seq-to-msgs 'cur))))
-    (cond ((and cur-msg
-		(mh-goto-msg cur-msg t t))
-	   (mh-notate nil mh-note-cur mh-cmd-note)
-	   (mh-recenter 0)
-	   (mh-maybe-show cur-msg))
-	  (t
-	   (mh-last-msg)
-	   (message "No current message")))))
-
-
-(defun mh-process-or-undo-commands (folder)
-  ;; If FOLDER has outstanding commands, then either process or discard them.
-  ;; Called by functions like mh-sort-folder, so also invalidate show buffer.
-  (set-buffer folder)
-  (if (mh-outstanding-commands-p)
-      (if (or mh-do-not-confirm
-	      (y-or-n-p
-		"Process outstanding deletes and refiles (or lose them)? "))
-	  (mh-process-commands folder)
-	  (mh-undo-folder)))
-  (mh-update-unseen)
-  (mh-invalidate-show-buffer))
-
-
-(defun mh-process-commands (folder)
-  ;; Process outstanding commands for the folder FOLDER.
-  (message "Processing deletes and refiles for %s..." folder)
-  (set-buffer folder)
-  (with-mh-folder-updating (nil)
-    ;; Update the unseen sequence if it exists
-    (mh-update-unseen)
-
-    ;; Then refile messages
-    (mh-mapc
-     (function
-      (lambda (dest)
-	(let ((msgs (mh-seq-to-msgs dest)))
-	  (cond (msgs
-		 (apply 'mh-exec-cmd "refile"
-			"-src" folder (symbol-name dest)
-			(mh-coalesce-msg-list msgs))
-		 (mh-delete-scan-msgs msgs))))))
-     mh-refile-list)
-    (setq mh-refile-list nil)
-
-    ;; Now delete messages
-    (cond (mh-delete-list
-	   (apply 'mh-exec-cmd "rmm" folder
-		  (mh-coalesce-msg-list mh-delete-list))
-	   (mh-delete-scan-msgs mh-delete-list)
-	   (setq mh-delete-list nil)))
-
-    ;; Don't need to remove sequences since delete and refile do so.
-
-    ;; Mark cur message
-    (if (> (buffer-size) 0)
-	(mh-define-sequence 'cur (list (or (mh-get-msg-num nil) "last"))))
-
-    (and (buffer-file-name (get-buffer mh-show-buffer))
-	 (not (file-exists-p (buffer-file-name (get-buffer mh-show-buffer))))
-	 ;; If "inc" were to put a new msg in this file,
-	 ;; we would not notice, so mark it invalid now.
-	 (mh-invalidate-show-buffer))
-
-    (setq mh-seq-list (mh-read-folder-sequences mh-current-folder nil))
-    (mh-unmark-all-headers t)
-    (mh-notate-user-sequences)
-    (message "Processing deletes and refiles for %s...done" folder)))
-
-
-(defun mh-update-unseen ()
-  ;; Flush updates to the Unseen sequence out to MH.
-  ;; Return non-NIL iff set the MH folder.
-  (if mh-seen-list
-      (let* ((unseen-seq (mh-find-seq mh-unseen-seq))
-	     (unseen-msgs (mh-seq-msgs unseen-seq)))
-	(if unseen-msgs
-	    (progn
-	      (mh-undefine-sequence mh-unseen-seq mh-seen-list)
-	      (while mh-seen-list
-		(setq unseen-msgs (delq (car mh-seen-list) unseen-msgs))
-		(setq mh-seen-list (cdr mh-seen-list)))
-	      (setcdr unseen-seq unseen-msgs)
-	      t)			;since we set the folder
-	  (setq mh-seen-list nil)))))
-
-
-(defun mh-delete-scan-msgs (msgs)
-  ;; Delete the scan listing lines for each of the msgs in the LIST.
-  (save-excursion
-    (while msgs
-      (if (mh-goto-msg (car msgs) t t)
-	  (mh-delete-line 1))
-      (setq msgs (cdr msgs)))))
-
-
-(defun mh-outstanding-commands-p ()
-  ;; Returns non-nil if there are outstanding deletes or refiles.
-  (or mh-delete-list mh-refile-list))
-
-
-(defun mh-coalesce-msg-list (messages)
-  ;; Give a list of MESSAGES, return a list of message number ranges.
-  ;; Sort of the opposite of mh-read-msg-list, which expands ranges.
-  ;; Message lists passed to MH programs go through this so
-  ;; command line arguments won't exceed system limits.
-  (let ((msgs (sort (copy-sequence messages) 'mh-greaterp))
-	(range-high nil)
-	(prev -1)
-	(ranges nil))
-    (while prev
-      (if range-high
-	  (if (or (not (numberp prev))
-		  (not (eql (car msgs) (1- prev))))
-	      (progn			;non-sequential, flush old range
-		(if (eql prev range-high)
-		    (setq ranges (cons range-high ranges))
-		  (setq ranges (cons (format "%s-%s" prev range-high) ranges)))
-		(setq range-high nil))))
-      (or range-high
-	  (setq range-high (car msgs))) ;start new or first range
-      (setq prev (car msgs))
-      (setq msgs (cdr msgs)))
-    ranges))
-
-(defun mh-greaterp (msg1 msg2)
-  ;; Sort two message indicators.  Strings are "smaller" than numbers.
-  ;; Legal values are things like "cur", "last", 1, and 1820.
-  (if (numberp msg1)
-	 (if (numberp msg2)
-	     (> msg1 msg2)
-	   t)
-    (if (numberp msg2)
-	nil
-      (string-lessp msg2 msg1))))
-
-
-
-;;; Basic sequence handling
-
-(defun mh-delete-seq-locally (seq)
-  ;; Remove mh-e's record of SEQUENCE.
-  (let ((entry (mh-find-seq seq)))
-    (setq mh-seq-list (delq entry mh-seq-list))))
-
-(defun mh-read-folder-sequences (folder save-refiles)
-  ;; Read and return the predefined sequences for a FOLDER.
-  ;; If SAVE-REFILES is non-nil, then keep the sequences
-  ;; that note messages to be refiled.
-  (let ((seqs ()))
-    (cond (save-refiles
-	    (mh-mapc (function (lambda (seq) ; Save the refiling sequences
-				 (if (mh-folder-name-p (mh-seq-name seq))
-				     (setq seqs (cons seq seqs)))))
-		     mh-seq-list)))
-    (save-excursion
-      (if (eq 0 (mh-exec-cmd-quiet nil "mark" folder "-list"))
-	  (progn
-	    ;; look for name in line of form "cur: 4" or "myseq (private): 23"
-	    (while (re-search-forward "^[^: ]+" nil t)
-	      (setq seqs (cons (mh-make-seq (intern (buffer-substring
-						     (match-beginning 0)
-						     (match-end 0)))
-					    (mh-read-msg-list))
-			       seqs)))
-	    (delete-region (point-min) (point))))) ; avoid race with mh-process-daemon
-    seqs))
-
-(defun mh-read-msg-list ()
-  ;; Return a list of message numbers from the current point to the end of
-  ;; the line.  Expands ranges into set of individual numbers.
-  (let ((msgs ())
-	(end-of-line (save-excursion (end-of-line) (point)))
-	num)
-    (while (re-search-forward "[0-9]+" end-of-line t)
-      (setq num (string-to-int (buffer-substring (match-beginning 0)
-						 (match-end 0))))
-      (cond ((looking-at "-")		; Message range
-	     (forward-char 1)
-	     (re-search-forward "[0-9]+" end-of-line t)
-	     (let ((num2 (string-to-int (buffer-substring (match-beginning 0)
-							  (match-end 0)))))
-	       (if (< num2 num)
-		   (error "Bad message range: %d-%d" num num2))
-	       (while (<= num num2)
-		 (setq msgs (cons num msgs))
-		 (setq num (1+ num)))))
-	    ((not (zerop num))		;"pick" outputs "0" to mean no match
-	     (setq msgs (cons num msgs)))))
-    msgs))
-
-(defun mh-notate-user-sequences ()
-  ;; Mark the scan listing of all messages in user-defined sequences.
-  (let ((seqs mh-seq-list)
-	name)
-    (while seqs
-      (setq name (mh-seq-name (car seqs)))
-      (if (not (mh-internal-seq name))
-	  (mh-notate-seq name mh-note-seq (1+ mh-cmd-note)))
-      (setq seqs (cdr seqs)))))
-
-
-(defun mh-internal-seq (name)
-  ;; Return non-NIL if NAME is the name of an internal mh-e sequence.
-  (or (memq name '(answered cur deleted forwarded printed))
-      (eq name mh-unseen-seq)
-      (eq name mh-previous-seq)
-      (mh-folder-name-p name)))
-
-
-(defun mh-delete-msg-from-seq (message sequence &optional internal-flag)
-  "Delete MESSAGE from SEQUENCE.  MESSAGE defaults to displayed message.
-From Lisp, optional third arg INTERNAL-FLAG non-nil means do not
-inform MH of the change."
-  (interactive (list (mh-get-msg-num t)
-		     (mh-read-seq-default "Delete from" t)
-		     nil))
-  (let ((entry (mh-find-seq sequence)))
-    (cond (entry
-	   (mh-notate-if-in-one-seq message ?  (1+ mh-cmd-note) sequence)
-	   (if (not internal-flag)
-	       (mh-undefine-sequence sequence (list message)))
-	   (setcdr entry (delq message (mh-seq-msgs entry)))))))
-
-
-(defun mh-undefine-sequence (seq msgs)
-  ;; Remove from the SEQUENCE the list of MSGS.
-  (mh-exec-cmd "mark" mh-current-folder "-delete"
-	       "-sequence" (symbol-name seq)
-	       (mh-coalesce-msg-list msgs)))
-
-
-(defun mh-define-sequence (seq msgs)
-  ;; Define the SEQUENCE to contain the list of MSGS.
-  ;; Do not mark pseudo-sequences or empty sequences.
-  ;; Signals an error if SEQUENCE is an illegal name.
-  (if (and msgs
-	   (not (mh-folder-name-p seq)))
-      (save-excursion
-	(mh-exec-cmd-error nil "mark" mh-current-folder "-add" "-zero"
-			   "-sequence" (symbol-name seq)
-			   (mh-coalesce-msg-list msgs)))))
-
-
-(defun mh-map-over-seqs (func seq-list)
-  ;; Apply the FUNCTION to each element in the list of SEQUENCES,
-  ;; passing the sequence name and the list of messages as arguments.
-  (while seq-list
-    (funcall func (mh-seq-name (car seq-list)) (mh-seq-msgs (car seq-list)))
-    (setq seq-list (cdr seq-list))))
-
-
-(defun mh-notate-if-in-one-seq (msg notation offset seq)
-  ;; If the MESSAGE is in only the SEQUENCE, then mark the scan listing of the
-  ;; message with the CHARACTER at the given OFFSET from the beginning of the
-  ;; listing line.
-  (let ((in-seqs (mh-seq-containing-msg msg nil)))
-    (if (and (eq seq (car in-seqs)) (null (cdr in-seqs)))
-	(mh-notate msg notation offset))))
-
-
-(defun mh-seq-containing-msg (msg &optional include-internal-p)
-  ;; Return a list of the sequences containing MESSAGE.
-  ;; If INCLUDE-INTERNAL-P non-nil, include mh-e internal sequences in list.
-  (let ((l mh-seq-list)
-	(seqs ()))
-    (while l
-      (and (memq msg (mh-seq-msgs (car l)))
-	   (or include-internal-p
-	       (not (mh-internal-seq (mh-seq-name (car l)))))
-	   (setq seqs (cons (mh-seq-name (car l)) seqs)))
-      (setq l (cdr l)))
-    seqs))
-
-
-
-
-;;; User prompting commands.
-
-
-(defun mh-read-msg-range (prompt)
-  ;; Read a list of blank-separated items.
-  (let* ((buf (read-string prompt))
-	 (buf-size (length buf))
-	 (start 0)
-	 (input ()))
-    (while (< start buf-size)
-      (let ((next (read-from-string buf start buf-size)))
-	(setq input (cons (car next) input))
-	(setq start (cdr next))))
-    (nreverse input)))
-
-
-
-;;; Build the folder-mode keymap:
-
-(suppress-keymap mh-folder-mode-map)
-(define-key mh-folder-mode-map "q" 'mh-quit)
-(define-key mh-folder-mode-map "b" 'mh-compat-quit)
-(define-key mh-folder-mode-map "?" 'mh-msg-is-in-seq)
-(define-key mh-folder-mode-map "%" 'mh-put-msg-in-seq)
-(define-key mh-folder-mode-map "|" 'mh-pipe-msg)
-(define-key mh-folder-mode-map "\ea" 'mh-edit-again)
-(define-key mh-folder-mode-map "\e%" 'mh-delete-msg-from-seq)
-(define-key mh-folder-mode-map "\e#" 'mh-delete-seq)
-(define-key mh-folder-mode-map "\C-xn" 'mh-narrow-to-seq)
-(define-key mh-folder-mode-map "\C-xw" 'mh-widen)
-(define-key mh-folder-mode-map "\eb" 'mh-burst-digest)
-(define-key mh-folder-mode-map "\eu" 'mh-undo-folder)
-(define-key mh-folder-mode-map "\e " 'mh-page-digest)
-(define-key mh-folder-mode-map "\e\177" 'mh-page-digest-backwards)
-(define-key mh-folder-mode-map "\ed" 'mh-redistribute)
-(define-key mh-folder-mode-map "\ee" 'mh-extract-rejected-mail)
-(define-key mh-folder-mode-map "\ef" 'mh-visit-folder)
-(define-key mh-folder-mode-map "\ek" 'mh-kill-folder)
-(define-key mh-folder-mode-map "\el" 'mh-list-folders)
-(define-key mh-folder-mode-map "\en" 'mh-store-msg)
-(define-key mh-folder-mode-map "\ep" 'mh-pack-folder)
-(define-key mh-folder-mode-map "\eq" 'mh-list-sequences)
-(define-key mh-folder-mode-map "\es" 'mh-search-folder)
-(define-key mh-folder-mode-map "\er" 'mh-rescan-folder)
-(define-key mh-folder-mode-map "l" 'mh-print-msg)
-(define-key mh-folder-mode-map "t" 'mh-toggle-showing)
-(define-key mh-folder-mode-map "c" 'mh-copy-msg)
-(define-key mh-folder-mode-map "i" 'mh-inc-folder)
-(define-key mh-folder-mode-map "x" 'mh-execute-commands)
-(define-key mh-folder-mode-map "e" 'mh-execute-commands)
-(define-key mh-folder-mode-map "f" 'mh-forward)
-(define-key mh-folder-mode-map "m" 'mh-send)
-(define-key mh-folder-mode-map "s" 'mh-send)
-(define-key mh-folder-mode-map "r" 'mh-reply)
-(define-key mh-folder-mode-map "a" 'mh-reply)
-(define-key mh-folder-mode-map "j" 'mh-goto-msg)
-(define-key mh-folder-mode-map "g" 'mh-goto-msg)
-(define-key mh-folder-mode-map "\e<" 'mh-first-msg)
-(define-key mh-folder-mode-map "\e>" 'mh-last-msg)
-(define-key mh-folder-mode-map "\177" 'mh-previous-page)
-(define-key mh-folder-mode-map " " 'mh-page-msg)
-(define-key mh-folder-mode-map "\r" 'mh-show)
-(define-key mh-folder-mode-map "." 'mh-show)
-(define-key mh-folder-mode-map "," 'mh-header-display)
-(define-key mh-folder-mode-map "u" 'mh-undo)
-(define-key mh-folder-mode-map "d" 'mh-delete-msg)
-(define-key mh-folder-mode-map "\C-d" 'mh-delete-msg-no-motion)
-(define-key mh-folder-mode-map "p" 'mh-previous-undeleted-msg)
-(define-key mh-folder-mode-map "n" 'mh-next-undeleted-msg)
-(define-key mh-folder-mode-map "o" 'mh-refile-msg)
-(define-key mh-folder-mode-map "^" 'mh-refile-msg)
-(define-key mh-folder-mode-map "\C-o" 'mh-write-msg-to-file)
-(define-key mh-folder-mode-map ">" 'mh-write-msg-to-file)
-(define-key mh-folder-mode-map "!" 'mh-refile-or-write-again)
-
-;; "C-c /" prefix is used in mh-folder-mode by pgp.el and mailcrypt
-
-
-
-;;;autoload the other mh-e parts
-
-;;; mh-comp
-
-(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)
-
-(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)
-
-(autoload 'mh-edit-again "mh-comp"
-  "Clean-up a draft or a message previously sent and make it resendable.
-Default is the current message.
-The variable mh-new-draft-cleaned-headers specifies the headers to remove.
-See also documentation for `\\[mh-send]' function." t)
-
-(autoload 'mh-extract-rejected-mail "mh-comp"
-  "Extract a letter returned by the mail system and make it resendable.
-Default is the current message.  The variable mh-new-draft-cleaned-headers
-gives the headers to clean out of the original message.
-See also documentation for `\\[mh-send]' function." t)
-
-(autoload 'mh-forward "mh-comp"
-  "Forward a message or message sequence.  Defaults to displayed message.
-If optional prefix argument provided, then prompt for the message sequence.
-See also documentation for `\\[mh-send]' function." t)
-
-(autoload 'mh-redistribute "mh-comp"
-  "Redistribute a letter.
-Depending on how your copy of MH was compiled, you may need to change the
-setting of the variable mh-redist-full-contents.  See its documentation." t)
-
-(autoload 'mh-reply "mh-comp"
-  "Reply to a MESSAGE (default: displayed message).
-If optional prefix argument INCLUDEP provided, then include the message
-in the reply using filter mhl.reply in your MH directory.
-Prompts for type of addresses to reply to:
-   from    sender only,
-   to      sender and primary recipients,
-   cc/all  sender and all recipients.
-If the file named by `mh-repl-formfile' exists, it is used as a skeleton
-for the reply.  See also documentation for `\\[mh-send]' function." t)
-
-(autoload 'mh-send "mh-comp"
-  "Compose and send a letter.
-The file named by `mh-comp-formfile' will be used as the form.
-Do not call this function from outside mh-e; use \\[mh-smail] instead.
-The letter is composed in mh-letter-mode; see its documentation for more
-details.  If `mh-compose-letter-function' is defined, it is called on the
-draft and passed three arguments: to, subject, and cc." t)
-
-(autoload 'mh-send-other-window "mh-comp"
-  "Compose and send a letter in another window.
-Do not call this function from outside mh-e;
-use \\[mh-smail-other-window] instead.
-See also documentation for `\\[mh-send]' function." t)
-
-(autoload 'mh-letter-mode "mh-comp"
-  "Mode for composing letters in mh-e.
-For more details, type \\[describe-mode] while in MH-Letter mode." t)
-
-
-;;; mh-funcs
-
-(autoload 'mh-burst-digest "mh-funcs"
-  "Burst apart the current message, which should be a digest.
-The message is replaced by its table of contents and the messages from the
-digest are inserted into the folder after that message." t)
-
-(autoload 'mh-copy-msg "mh-funcs"
-  "Copy to another FOLDER the specified MESSAGE(s) without deleting them.
-Default is the displayed message.  If optional prefix argument is
-provided, then prompt for the message sequence." t)
-
-(autoload 'mh-kill-folder "mh-funcs"
-  "Remove the current folder." t)
-
-(autoload 'mh-list-folders "mh-funcs"
-  "List mail folders." t)
-
-(autoload 'mh-pack-folder "mh-funcs"
-  "Renumber the messages of a folder to be 1..n.
-First, offer to execute any outstanding commands for the current folder.
-If optional prefix argument provided, prompt for the range of messages
-to display after packing.  Otherwise, show the entire folder." t)
-
-(autoload 'mh-pipe-msg "mh-funcs"
-  "Pipe the current message through the given shell COMMAND.
-If INCLUDE-HEADERS (prefix argument) is provided, send the entire message.
-Otherwise just send the message's body without the headers." t)
-
-(autoload 'mh-page-digest "mh-funcs"
-  "Advance displayed message to next digested message." t)
-
-(autoload 'mh-page-digest-backwards "mh-funcs"
-  "Back up displayed message to previous digested message." t)
-
-(autoload 'mh-print-msg "mh-funcs"
-  "Print MESSAGE(s) (default: displayed message) on printer.
-If optional prefix argument provided, then prompt for the message sequence.
-The variable mh-lpr-command-format is used to generate the print command.
-The messages are formatted by mhl.  See the variable mhl-formfile." t)
-
-(autoload 'mh-sort-folder "mh-funcs"
-  "Sort the messages in the current folder by date.
-Calls the MH program sortm to do the work.
-The arguments in the list  mh-sortm-args  are passed to sortm
-if this function is passed an argument." t)
-
-(autoload 'mh-undo-folder "mh-funcs"
-  "Undo all commands in current folder." t)
-
-(autoload 'mh-store-msg "mh-funcs"
-  "Store the file(s) contained in the current message into DIRECTORY.
-The message can contain a shar file or uuencoded file.
-Default directory is the last directory used, or initially the value of
-mh-store-default-directory  or the current directory." t)
-
-(autoload 'mh-store-buffer "mh-funcs"
-  "Store the file(s) contained in the current buffer into DIRECTORY.
-The buffer can contain a shar file or uuencoded file.
-Default directory is the last directory used, or initially the value of
-`mh-store-default-directory' or the current directory." t)
-
-
-;;; mh-pick
-
-(autoload 'mh-search-folder "mh-pick"
-  "Search FOLDER for messages matching a pattern.
-Add the messages found to the sequence named `search'." t)
-
-;;; mh-seq
-
-(autoload 'mh-delete-seq "mh-seq"
-  "Delete the SEQUENCE." t)
-(autoload 'mh-list-sequences "mh-seq"
-  "List the sequences defined in FOLDER." t)
-(autoload 'mh-msg-is-in-seq "mh-seq"
-  "Display the sequences that contain MESSAGE (default: displayed message)." t)
-(autoload 'mh-narrow-to-seq "mh-seq"
-  "Restrict display of this folder to just messages in SEQUENCE
-Use \\[mh-widen] to undo this command." t)
-(autoload 'mh-put-msg-in-seq "mh-seq"
-  "Add MESSAGE(s) (default: displayed message) to SEQUENCE.
-If optional prefix argument provided, then prompt for the message sequence." t)
-(autoload 'mh-widen "mh-seq"
-  "Remove restrictions from current folder, thereby showing all messages." t)
-(autoload 'mh-rename-seq "mh-seq"
-  "Rename SEQUENCE to have NEW-NAME." t)
-
-;;; mh-e.el ends here
--- a/lisp/mh-e/mh-funcs.el	Mon Aug 13 10:01:24 2007 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,353 +0,0 @@
-;;; mh-funcs --- mh-e functions not everyone will use right away
-;; Time-stamp: <95/08/19 16:44:06 gildea>
-
-;; Copyright (C) 1993, 1995 Free Software Foundation, Inc.
-
-;; This file is part of mh-e, 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, 675 Mass Ave, Cambridge, MA 02139, USA.
-
-;;; Commentary:
-
-;;; Internal support for mh-e package.
-;;; Putting these functions in a separate file lets mh-e start up faster,
-;;; since less Lisp code needs to be loaded all at once.
-
-;;; Change Log:
-
-;; $Id: mh-funcs.el,v 1.1.1.1 1996/12/18 22:43:21 steve Exp $
-
-;;; Code:
-
-(provide 'mh-funcs)
-(require 'mh-e)
-
-;;; customization
-
-(defvar mh-sortm-args nil
-  "Extra arguments to have \\[mh-sort-folder] pass to the \"sortm\" command.
-The arguments are passed to sortm if \\[mh-sort-folder] is given a
-prefix argument.  Normally default arguments to sortm are specified in the
-MH profile.
-For example, '(\"-nolimit\" \"-textfield\" \"subject\") is a useful setting.")
-
-(defvar mh-note-copied "C"
-  "String whose first character is used to notate copied messages.")
-
-(defvar mh-note-printed "P"
-  "String whose first character is used to notate printed messages.")
-
-;;; functions
-
-(defun mh-burst-digest ()
-  "Burst apart the current message, which should be a digest.
-The message is replaced by its table of contents and the messages from the
-digest are inserted into the folder after that message."
-  (interactive)
-  (let ((digest (mh-get-msg-num t)))
-    (mh-process-or-undo-commands mh-current-folder)
-    (mh-set-folder-modified-p t)		; lock folder while bursting
-    (message "Bursting digest...")
-    (mh-exec-cmd "burst" mh-current-folder digest "-inplace")
-    (with-mh-folder-updating (t)
-      (beginning-of-line)
-      (delete-region (point) (point-max)))
-    (mh-regenerate-headers (format "%d-last" digest) t)
-    (mh-goto-cur-msg)
-    (message "Bursting digest...done")))
-
-
-(defun mh-copy-msg (msg-or-seq folder)
-  "Copy the specified MESSAGE(s) to another FOLDER without deleting them.
-Default is the displayed message.  If optional prefix argument is
-provided, then prompt for the message sequence."
-  (interactive (list (if current-prefix-arg
-			 (mh-read-seq-default "Copy" t)
-			 (mh-get-msg-num t))
-		     (mh-prompt-for-folder "Copy to" "" t)))
-  (mh-exec-cmd "refile" msg-or-seq "-link" "-src" mh-current-folder folder)
-  (if (numberp msg-or-seq)
-      (mh-notate msg-or-seq mh-note-copied mh-cmd-note)
-      (mh-notate-seq msg-or-seq mh-note-copied mh-cmd-note)))
-
-(defun mh-kill-folder ()
-  "Remove the current folder."
-  (interactive)
-  (if (or mh-do-not-confirm
-	  (yes-or-no-p (format "Remove folder %s? " mh-current-folder)))
-      (let ((folder mh-current-folder))
-	(if (null mh-folder-list)
-	    (mh-set-folder-list))
-	(mh-set-folder-modified-p t)	; lock folder to kill it
-	(mh-exec-cmd-daemon "rmf" folder)
-	(setq mh-folder-list
-	      (delq (assoc folder mh-folder-list) mh-folder-list))
-	(run-hooks 'mh-folder-list-change-hook)
-	(message "Folder %s removed" folder)
-	(mh-set-folder-modified-p nil)	; so kill-buffer doesn't complain
-	(if (get-buffer mh-show-buffer)
-	    (kill-buffer mh-show-buffer))
-	(kill-buffer folder))
-      (message "Folder not removed")))
-
-
-(defun mh-list-folders ()
-  "List mail folders."
-  (interactive)
-  (with-output-to-temp-buffer mh-temp-buffer
-    (save-excursion
-      (switch-to-buffer mh-temp-buffer)
-      (erase-buffer)
-      (message "Listing folders...")
-      (mh-exec-cmd-output "folders" t (if mh-recursive-folders
-					  "-recurse"
-					  "-norecurse"))
-      (goto-char (point-min))
-      (message "Listing folders...done"))))
-
-
-(defun mh-pack-folder (range)
-  "Renumber the messages of a folder to be 1..n.
-First, offer to execute any outstanding commands for the current folder.
-If optional prefix argument provided, prompt for the RANGE of messages
-to display after packing.  Otherwise, show the entire folder."
-  (interactive (list (if current-prefix-arg
-			 (mh-read-msg-range
-			  "Range to scan after packing [all]? ")
-		       "all")))
-  (mh-pack-folder-1 range)
-  (mh-goto-cur-msg)
-  (message "Packing folder...done"))
-
-
-(defun mh-pack-folder-1 (range)
-  ;; Close and pack the current folder.
-  (mh-process-or-undo-commands mh-current-folder)
-  (message "Packing folder...")
-  (mh-set-folder-modified-p t)		; lock folder while packing
-  (save-excursion
-    (mh-exec-cmd-quiet t "folder" mh-current-folder "-pack"
-		       "-norecurse" "-fast"))
-  (mh-regenerate-headers range))
-
-
-(defun mh-pipe-msg (command include-headers)
-  "Pipe the current message through the given shell COMMAND.
-If INCLUDE-HEADERS (prefix argument) is provided, send the entire message.
-Otherwise just send the message's body without the headers."
-  (interactive
-   (list (read-string "Shell command on message: ") current-prefix-arg))
-  (let ((msg-file-to-pipe (mh-msg-filename (mh-get-msg-num t)))
-	(message-directory default-directory))
-    (save-excursion
-      (set-buffer (get-buffer-create mh-temp-buffer))
-      (erase-buffer)
-      (insert-file-contents msg-file-to-pipe)
-      (goto-char (point-min))
-      (if (not include-headers) (search-forward "\n\n"))
-      (let ((default-directory message-directory))
-	(shell-command-on-region (point) (point-max) command nil)))))
-
-
-(defun mh-page-digest ()
-  "Advance displayed message to next digested message."
-  (interactive)
-  (mh-in-show-buffer (mh-show-buffer)
-    ;; Go to top of screen (in case user moved point).
-    (move-to-window-line 0)
-    (let ((case-fold-search nil))
-      ;; Search for blank line and then for From:
-      (or (and (search-forward "\n\n" nil t)
-	       (re-search-forward "^From:" nil t))
-	  (error "No more messages in digest")))
-    ;; Go back to previous blank line, then forward to the first non-blank.
-    (search-backward "\n\n" nil t)
-    (forward-line 2)
-    (mh-recenter 0)))
-
-
-(defun mh-page-digest-backwards ()
-  "Back up displayed message to previous digested message."
-  (interactive)
-  (mh-in-show-buffer (mh-show-buffer)
-    ;; Go to top of screen (in case user moved point).
-    (move-to-window-line 0)
-    (let ((case-fold-search nil))
-      (beginning-of-line)
-      (or (and (search-backward "\n\n" nil t)
-	       (re-search-backward "^From:" nil t))
-	  (error "No previous message in digest")))
-    ;; Go back to previous blank line, then forward to the first non-blank.
-    (if (search-backward "\n\n" nil t)
-	(forward-line 2))
-    (mh-recenter 0)))
-
-
-(defun mh-print-msg (msg-or-seq)
-  "Print MESSAGE(s) (default: displayed message) on printer.
-If optional prefix argument provided, then prompt for the message sequence.
-The variable mh-lpr-command-format is used to generate the print command.
-The messages are formatted by mhl.  See the variable mhl-formfile."
-  (interactive (list (if current-prefix-arg
-			 (reverse (mh-seq-to-msgs
-				   (mh-read-seq-default "Print" t)))
-		       (mh-get-msg-num t))))
-  (if (numberp msg-or-seq)
-      (message "Printing message...")
-      (message "Printing sequence..."))
-  (let ((print-command
-	 (if (numberp msg-or-seq)
-	     (format "%s -nobell -clear %s %s | %s"
-		     (expand-file-name "mhl" mh-lib)
-		     (mh-msg-filename msg-or-seq)
-		     (if (stringp mhl-formfile)
-			 (format "-form %s" mhl-formfile)
-		       "")
-		     (format mh-lpr-command-format
-			     (if (numberp msg-or-seq)
-				 (format "%s/%d" mh-current-folder
-				       msg-or-seq)
-			         (format "Sequence from %s" mh-current-folder))))
-	     (format "(scan -clear %s ; %s -nobell -clear %s %s) | %s"
-		     (mapconcat (function (lambda (msg) msg)) msg-or-seq " ")
-		     (expand-file-name "mhl" mh-lib)
-		     (if (stringp mhl-formfile)
-			 (format "-form %s" mhl-formfile)
-		       "")
-		     (mh-msg-filenames msg-or-seq)
-		     (format mh-lpr-command-format
-			     (if (numberp msg-or-seq)
-				 (format "%s/%d" mh-current-folder
-				       msg-or-seq)
-			         (format "Sequence from %s"
-					 mh-current-folder)))))))
-    (if mh-print-background
-	(mh-exec-cmd-daemon shell-file-name "-c" print-command)
-      (call-process shell-file-name nil nil nil "-c" print-command))
-    (if (numberp msg-or-seq)
-	(mh-notate msg-or-seq mh-note-printed mh-cmd-note)
-        (mh-notate-seq msg-or-seq mh-note-printed mh-cmd-note))
-    (mh-add-msgs-to-seq msg-or-seq 'printed t)
-    (if (numberp msg-or-seq)
-	(message "Printing message...done")
-        (message "Printing sequence...done"))))
-
-
-(defun mh-msg-filenames (msgs &optional folder)
-  ;; Return a list of file names for MSGS in FOLDER (default current folder).
-  (mapconcat (function (lambda (msg) (mh-msg-filename msg folder))) msgs " "))
-
-
-(defun mh-sort-folder (&optional extra-args)
-  "Sort the messages in the current folder by date.
-Calls the MH program sortm to do the work.
-The arguments in the list  mh-sortm-args  are passed to sortm
-if this function is passed an argument."
-  (interactive "P")
-  (mh-process-or-undo-commands mh-current-folder)
-  (setq mh-next-direction 'forward)
-  (mh-set-folder-modified-p t)		; lock folder while sorting
-  (message "Sorting folder...")
-  (mh-exec-cmd "sortm" mh-current-folder (if extra-args mh-sortm-args))
-  (message "Sorting folder...done")
-  (mh-scan-folder mh-current-folder "all"))
-
-
-(defun mh-undo-folder (&rest ignore)
-  "Undo all pending deletes and refiles in current folder."
-  (interactive)
-  (cond ((or mh-do-not-confirm
-	     (yes-or-no-p "Undo all commands in folder? "))
-	 (setq mh-delete-list nil
-	       mh-refile-list nil
-	       mh-seq-list nil
-	       mh-next-direction 'forward)
-	 (with-mh-folder-updating (nil)
-	   (mh-unmark-all-headers t)))
-	(t
-	 (message "Commands not undone.")
-	 (sit-for 2))))
-
-
-(defun mh-store-msg (directory)
-  "Store the file(s) contained in the current message into DIRECTORY.
-The message can contain a shar file or uuencoded file.
-Default directory is the last directory used, or initially the value of
-mh-store-default-directory  or the current directory."
-  (interactive (list (let ((udir (or mh-store-default-directory default-directory)))
-				 (read-file-name "Store message in directory: "
-						 udir udir nil))))
-  (let ((msg-file-to-store (mh-msg-filename (mh-get-msg-num t))))
-    (save-excursion
-      (set-buffer (get-buffer-create mh-temp-buffer))
-      (erase-buffer)
-      (insert-file-contents msg-file-to-store)
-      (mh-store-buffer directory))))
-
-(defun mh-store-buffer (directory)
-  "Store the file(s) contained in the current buffer into DIRECTORY.
-The buffer can contain a shar file or uuencoded file.
-Default directory is the last directory used, or initially the value of
-`mh-store-default-directory' or the current directory."
-  (interactive (list (let ((udir (or mh-store-default-directory default-directory)))
-		       (read-file-name "Store buffer in directory: "
-				       udir udir nil))))
-  (let ((store-directory (expand-file-name directory))
-	(sh-start (save-excursion
-		    (goto-char (point-min))
-		    (if (re-search-forward
-			 "^#![ \t]*/bin/sh\\|^#\\|^: " nil t)
-			(progn
-			  ;; The "cut here" pattern was removed from above
-			  ;; because it seemed to hurt more than help.
-			  ;; But keep this to make it easier to put it back.
-			  (if (looking-at "^[^a-z0-9\"]*cut here\\b")
-			      (forward-line 1))
-			  (beginning-of-line)
-			  (if (looking-at "^[#:]....+\n\\( ?\n\\)?end$")
-			      nil	;most likely end of a uuencode
-			    (point))))))
-	(log-buffer (get-buffer-create "*Store Output*"))
-	(command "sh")
-	(uudecode-filename "(unknown filename)"))
-    (if (not sh-start)
-	(save-excursion
-	  (goto-char (point-min))
-	  (if (re-search-forward "^begin [0-7]+ " nil t)
-	      (setq uudecode-filename
-		    (buffer-substring (point)
-				      (progn (end-of-line) (point)))))))
-    (save-excursion
-      (set-buffer log-buffer)
-      (erase-buffer)
-      (if (not (file-directory-p store-directory))
-	  (progn
-	    (insert "mkdir " directory "\n")
-	    (call-process "mkdir" nil log-buffer t store-directory)))
-      (insert "cd " directory "\n")
-      (setq mh-store-default-directory directory)
-      (if (not sh-start)
-	  (progn
-	    (setq command "uudecode")
-	    (insert uudecode-filename " being uudecoded...\n"))))
-    (set-window-start (display-buffer log-buffer) 0) ;watch progress
-    (let (value)
-      (let ((default-directory (file-name-as-directory store-directory)))
-	(setq value (call-process-region sh-start (point-max) command
-					 nil log-buffer t)))
-      (set-buffer log-buffer)
-      (mh-handle-process-error command value))
-    (insert "\n(mh-store finished)\n")))
-	
--- a/lisp/mh-e/mh-mime.el	Mon Aug 13 10:01:24 2007 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,235 +0,0 @@
-;;; mh-mime --- mh-e support for composing MIME messages
-;; Time-stamp: <95/08/19 16:45:17 gildea>
-
-;; Copyright (C) 1993, 1995 Free Software Foundation, Inc.
-
-;; This file is part of mh-e, 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, 675 Mass Ave, Cambridge, MA 02139, USA.
-
-;;; Commentary:
-
-;;; Internal support for mh-e package.
-;;; Support for generating an mhn composition file.
-;;; MIME is supported only by MH 6.8 or later.
-
-;;; Change Log:
-
-;; $Id: mh-mime.el,v 1.1.1.1 1996/12/18 22:43:21 steve Exp $
-
-;;; Code:
-
-(provide 'mh-mime)
-(require 'mh-comp)
-
-
-;; To do:
-;; paragraph code should not fill # lines if MIME enabled.
-;; implement mh-auto-edit-mhn (if non-nil, \\[mh-send-letter]
-;;	invokes mh-edit-mhn automatically before sending.)
-;;      actually, instead of mh-auto-edit-mhn,
-;;      should read automhnproc from profile
-;; MIME option to mh-forward
-;; command to move to content-description insertion point
-
-(defvar mh-mhn-args nil
-  "Extra arguments to have \\[mh-edit-mhn] pass to the \"mhn\" command.
-The arguments are passed to mhn if \\[mh-edit-mhn] is given a
-prefix argument.  Normally default arguments to mhn are specified in the
-MH profile.")
-
-(defvar mh-edit-mhn-hook nil
-  "Invoked on the formatted letter by \\<mh-letter-mode-map>\\[mh-edit-mhn].")
-
-;;;###autoload
-(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].")
-
-(defun mh-mhn-compose-insertion (pathname type description)
-  "Add a directive to insert a MIME message part from a file.
-This is the typical way to insert non-text parts in a message.
-Arguments are PATHNAME, which tells where to find the file, TYPE, the
-MIME content type, and DESCRIPTION, a line of text for the
-Content-description header.  See also \\[mh-edit-mhn]."
-  (interactive (list
-		(read-file-name "Insert contents of: ")
-		(completing-read "Content-type: "
-				 mh-mime-content-types nil nil nil)
-		(read-string "Content-description: ")))
-  (mh-mhn-compose-type pathname type description))
-
-(defun mh-mhn-compose-type (pathname type
-			    &optional description attributes comment)
-  (beginning-of-line)
-  (insert "#" type)
-  (and attributes
-       (insert "; " attributes))
-  (and comment
-       (insert " (" comment ")"))
-  (insert " [")
-  (and description
-       (insert description))
-  (insert "] " (expand-file-name pathname))
-  (insert "\n"))
-
-
-(defun mh-mhn-compose-anon-ftp (host pathname type description)
-  "Add a directive for a MIME anonymous ftp external body part.
-This directive tells MH to include a reference to a
-message/external-body part retrievable by anonymous FTP.  Arguments
-are HOST and PATHNAME, which tell where to find the file, TYPE, the
-MIME content type, and DESCRIPTION, a line of text for the
-Content-description header.  See also \\[mh-edit-mhn]."
-  (interactive (list
-		(read-string "Remote host: ")
-		(read-string "Remote pathname: ")
-		(completing-read "External Content-type: "
-				 mh-mime-content-types nil nil nil)
-		(read-string "External Content-description: ")))
-  (mh-mhn-compose-external-type "anon-ftp" host pathname
-				type description))
-
-(defun mh-mhn-compose-external-compressed-tar (host pathname description)
-  "Add a directive to include a MIME reference to a compressed tar file.
-The file should be available via anonymous ftp.  This directive
-tells MH to include a reference to a message/external-body part.
-Arguments are HOST and PATHNAME, which tell where to find the file, and
-DESCRIPTION, a line of text for the Content-description header.
-See also \\[mh-edit-mhn]."
-  (interactive (list
-		(read-string "Remote host: ")
-		(read-string "Remote pathname: ")
-		(read-string "Tar file Content-description: ")))
-  (mh-mhn-compose-external-type "anon-ftp" host pathname
-				"application/octet-stream"
-				description
-				"type=tar; conversions=x-compress"
-				"mode=image"))
-
-
-(defun mh-mhn-compose-external-type (access-type host pathname type
-				     &optional description
-				     attributes extra-params comment)
-  (beginning-of-line)
-  (insert "#@" type)
-  (and attributes
-       (insert "; " attributes))
-  (and comment
-       (insert " (" comment ") "))
-  (insert " [")
-  (and description
-       (insert description))
-  (insert "] ")
-  (insert "access-type=" access-type "; ")
-  (insert "site=" host)
-  (insert "; name=" (file-name-nondirectory pathname))
-  (insert "; directory=\"" (file-name-directory pathname) "\"")
-  (and extra-params
-       (insert "; " extra-params))
-  (insert "\n"))
-
-(defun mh-mhn-compose-forw (&optional description folder messages)
-  "Add a forw directive to this message, to forward a message with MIME.
-This directive tells MH to include the named messages in this one.
-Arguments are DESCRIPTION, a line of text for the Content-description header,
-and FOLDER and MESSAGES, which name the message(s) to be forwarded.
-See also \\[mh-edit-mhn]."
-  (interactive (list
-		(read-string "Forw Content-description: ")
-		(mh-prompt-for-folder "Message from" mh-sent-from-folder nil)
-		(read-string (format "Messages%s: "
-				     (if mh-sent-from-msg
-					 (format " [%d]" mh-sent-from-msg)
-				       "")))))
-  (beginning-of-line)
-  (insert "#forw [")
-  (and description
-       (not (string= description ""))
-       (insert description))
-  (insert "]")
-  (and folder
-       (not (string= folder ""))
-       (insert " " folder))
-  (if (and messages
-	   (not (string= messages "")))
-      (let ((start (point)))
-	(insert " " messages)
-	(subst-char-in-region start (point) ?, ? ))
-    (if mh-sent-from-msg
-	(insert " " (int-to-string mh-sent-from-msg))))
-  (insert "\n"))
-
-(defun mh-edit-mhn (&optional extra-args)
-  "Format the current draft for MIME, expanding any mhn directives.
-Process the current draft with the mhn program, which,
-using directives already inserted in the draft, fills in
-all the MIME components and header fields.
-This step should be done last just before sending the message.
-The mhn program is part of MH version 6.8 or later.
-The `\\[mh-revert-mhn-edit]' command undoes this command.
-The arguments in the list `mh-mhn-args' are passed to mhn
-if this function is passed an argument.
-
-For assistance with creating mhn directives to insert
-various types of components in a message, see
-\\[mh-mhn-compose-insertion] (generic insertion from a file),
-\\[mh-mhn-compose-anon-ftp] (external reference to file via anonymous ftp),
-\\[mh-mhn-compose-external-compressed-tar] \
-\(reference to compressed tar file via anonymous ftp), and
-\\[mh-mhn-compose-forw] (forward message)."
-  (interactive "*P")
-  (save-buffer)
-  (message "mhn editing...")
-  (mh-exec-cmd-error (format "mhdraft=%s" buffer-file-name)
-		     "mhn" (if extra-args mh-mhn-args) buffer-file-name)
-  (revert-buffer t t)
-  (message "mhn editing...done")
-  (run-hooks 'mh-edit-mhn-hook))
-
-
-(defun mh-revert-mhn-edit (noconfirm)
-  "Undoes the effect of \\[mh-edit-mhn] by reverting to the backup file.
-Optional non-nil argument means don't ask for confirmation."
-  (interactive "*P")
-  (if (null buffer-file-name)
-      (error "Buffer does not seem to be associated with any file"))
-  (let ((backup-strings '("," "#"))
-	backup-file)
-    (while (and backup-strings
-		(not (file-exists-p
-		      (setq backup-file
-			    (concat (file-name-directory buffer-file-name)
-				    (car backup-strings)
-				    (file-name-nondirectory buffer-file-name)
-				    ".orig")))))
-      (setq backup-strings (cdr backup-strings)))
-    (or backup-strings
-	(error "mhn backup file for %s no longer exists!" buffer-file-name))
-    (or noconfirm
-	(yes-or-no-p (format "Revert buffer from file %s? "
-			     backup-file))
-	(error "mhn edit revert not confirmed."))
-    (let ((buffer-read-only nil))
-      (erase-buffer)
-      (insert-file-contents backup-file))
-    (after-find-file nil)))
--- a/lisp/mh-e/mh-pick.el	Mon Aug 13 10:01:24 2007 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,194 +0,0 @@
-;;; mh-pick --- make a search pattern and search for a message in mh-e
-;; Time-stamp: <95/08/19 16:45:16 gildea>
-
-;; Copyright (C) 1993, 1995 Free Software Foundation, Inc.
-
-;; This file is part of mh-e, 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, 675 Mass Ave, Cambridge, MA 02139, USA.
-
-;;; Commentary:
-
-;; Internal support for mh-e package.
-
-;;; Change Log:
-
-;; $Id: mh-pick.el,v 1.1.1.1 1996/12/18 22:43:21 steve Exp $
-
-;;; Code:
-
-(provide 'mh-pick)
-(require 'mh-e)
-
-(defvar mh-pick-mode-hook nil
-  "Invoked in `mh-pick-mode' on a new pattern.")
-
-;;; Internal variables:
-
-(defvar mh-pick-mode-map (make-sparse-keymap)
-  "Keymap for searching folder.")
-
-(defvar mh-searching-folder nil)	;Folder this pick is searching.
-
-(defun mh-search-folder (folder)
-  "Search FOLDER for messages matching a pattern.
-Add the messages found to the sequence named `search'."
-  (interactive (list (mh-prompt-for-folder "Search"
-					   mh-current-folder
-					   t)))
-  (switch-to-buffer-other-window "pick-pattern")
-  (if (or (zerop (buffer-size))
-	  (not (y-or-n-p "Reuse pattern? ")))
-      (mh-make-pick-template)
-    (message ""))
-  (setq mh-searching-folder folder))
-
-(defun mh-make-pick-template ()
-  ;; Initialize the current buffer with a template for a pick pattern.
-  (erase-buffer)
-  (insert "From: \n"
-	  "To: \n"
-	  "Cc: \n"
-	  "Date: \n"
-	  "Subject: \n"
-	  "---------\n")
-  (mh-pick-mode)
-  (goto-char (point-min))
-  (end-of-line))
-
-(put 'mh-pick-mode 'mode-class 'special)
-
-(defun mh-pick-mode ()
-  "Mode for creating search templates in mh-e.\\<mh-pick-mode-map>
-After each field name, enter the pattern to search for.  If a field's
-value does not matter for the search, leave it empty.  To search the
-entire message, supply the pattern in the \"body\" of the template.
-Each non-empty field must be matched for a message to be selected.
-To effect a logical \"or\", use \\[mh-search-folder] multiple times.
-When you have finished, type  \\[mh-do-pick-search]  to do the search.
-\\{mh-pick-mode-map}
-Turning on mh-pick-mode calls the value of the variable mh-pick-mode-hook
-if that value is non-nil."
-  (interactive)
-  (kill-all-local-variables)
-  (make-local-variable 'mh-searching-folder)
-  (use-local-map mh-pick-mode-map)
-  (setq major-mode 'mh-pick-mode)
-  (mh-set-mode-name "MH-Pick")
-  (run-hooks 'mh-pick-mode-hook))
-
-
-(defun mh-do-pick-search ()
-  "Find messages that match the qualifications in the current pattern buffer.
-Messages are searched for in the folder named in mh-searching-folder.
-Add the messages found to the sequence named `search'."
-  (interactive)
-  (let ((pattern-buffer (buffer-name))
-	(searching-buffer mh-searching-folder)
-	range
-	msgs
-	(finding-messages t)
-	(pattern nil)
-	(new-buffer nil))
-    (save-excursion
-      (cond ((get-buffer searching-buffer)
-	     (set-buffer searching-buffer)
-	     (setq range (list (format "%d-%d"
-				       mh-first-msg-num mh-last-msg-num))))
-	    (t
-	     (mh-make-folder searching-buffer)
-	     (setq range '("all"))
-	     (setq new-buffer t))))
-    (message "Searching...")
-    (goto-char (point-min))
-    (while (and range
-		(setq pattern (mh-next-pick-field pattern-buffer)))
-      (setq msgs (mh-seq-from-command searching-buffer
-				      'search
-				      (mh-list-to-string
-				       (list "pick" pattern searching-buffer
-					     "-list"
-					     (mh-coalesce-msg-list range)))))
-      (setq range msgs))		;restrict the pick range for next pass
-    (message "Searching...done")
-    (if new-buffer
-	(mh-scan-folder searching-buffer msgs)
-	(switch-to-buffer searching-buffer))
-    (mh-add-msgs-to-seq msgs 'search)
-    (delete-other-windows)))
-
-
-(defun mh-seq-from-command (folder seq seq-command)
-  ;; In FOLDER, make a sequence named SEQ by executing COMMAND.
-  ;; COMMAND is a list.  The first element is a program name
-  ;; and the subsequent elements are its arguments, all strings.
-  (let ((msg)
-	(msgs ())
-	(case-fold-search t))
-    (save-excursion
-      (save-window-excursion
-	(if (eq 0 (apply 'mh-exec-cmd-quiet nil seq-command))
-	    ;; "pick" outputs one number per line
-	    (while (setq msg (car (mh-read-msg-list)))
-	      (setq msgs (cons msg msgs))
-	      (forward-line 1))))
-      (set-buffer folder)
-      (setq msgs (nreverse msgs))	;put in ascending order
-      msgs)))
-
-
-(defun mh-next-pick-field (buffer)
-  ;; Return the next piece of a pick argument that can be extracted from the
-  ;; BUFFER.
-  ;; Return a list like ("--fieldname" "pattern") or ("-search" "bodypat")
-  ;; or NIL if no pieces remain.
-  (set-buffer buffer)
-  (let ((case-fold-search t))
-    (cond ((eobp)
-	   nil)
-	  ((re-search-forward "^\\([a-z][^: \t\n]*\\):[ \t]*\\([a-z0-9].*\\)$" nil t)
-	   (let* ((component
-		   (format "--%s"
-			   (downcase (buffer-substring (match-beginning 1)
-						       (match-end 1)))))
-		  (pat (buffer-substring (match-beginning 2) (match-end 2))))
-	       (forward-line 1)
-	       (list component pat)))
-	  ((re-search-forward "^-*$" nil t)
-	   (forward-char 1)
-	   (let ((body (buffer-substring (point) (point-max))))
-	     (if (and (> (length body) 0) (not (equal body "\n")))
-		 (list "-search" body)
-		 nil)))
-	  (t
-	   nil))))
-
-;;; Build the pick-mode keymap:
-
-(define-key mh-pick-mode-map "\C-c\C-c" 'mh-do-pick-search)
-(define-key mh-pick-mode-map "\C-c\C-f\C-b" 'mh-to-field)
-(define-key mh-pick-mode-map "\C-c\C-f\C-c" 'mh-to-field)
-(define-key mh-pick-mode-map "\C-c\C-f\C-d" 'mh-to-field)
-(define-key mh-pick-mode-map "\C-c\C-f\C-f" 'mh-to-field)
-(define-key mh-pick-mode-map "\C-c\C-f\C-r" 'mh-to-field)
-(define-key mh-pick-mode-map "\C-c\C-f\C-s" 'mh-to-field)
-(define-key mh-pick-mode-map "\C-c\C-f\C-t" 'mh-to-field)
-(define-key mh-pick-mode-map "\C-c\C-fb" 'mh-to-field)
-(define-key mh-pick-mode-map "\C-c\C-fc" 'mh-to-field)
-(define-key mh-pick-mode-map "\C-c\C-fd" 'mh-to-field)
-(define-key mh-pick-mode-map "\C-c\C-ff" 'mh-to-field)
-(define-key mh-pick-mode-map "\C-c\C-fr" 'mh-to-field)
-(define-key mh-pick-mode-map "\C-c\C-fs" 'mh-to-field)
-(define-key mh-pick-mode-map "\C-c\C-ft" 'mh-to-field)
--- a/lisp/mh-e/mh-seq.el	Mon Aug 13 10:01:24 2007 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,236 +0,0 @@
-;;; mh-seq --- mh-e sequences support
-;; Time-stamp: <95/08/19 16:45:15 gildea>
-
-;; Copyright (C) 1993, 1995 Free Software Foundation, Inc.
-
-;; This file is part of mh-e, 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, 675 Mass Ave, Cambridge, MA 02139, USA.
-
-;;; Commentary:
-
-;; Internal support for mh-e package.
-
-;;; Change Log:
-
-;; $Id: mh-seq.el,v 1.1.1.1 1996/12/18 22:43:21 steve Exp $
-
-;;; Code:
-
-(provide 'mh-seq)
-(require 'mh-e)
-
-;;; Internal variables:
-
-(defvar mh-last-seq-used nil)		;Name of seq to which a msg was last added.
-
-(defvar mh-non-seq-mode-line-annotation nil) ;Saved value of mh-mode-line-annotation when narrowed to a seq.
-
-
-(defun mh-delete-seq (sequence)
-  "Delete the SEQUENCE."
-  (interactive (list (mh-read-seq-default "Delete" t)))
-  (mh-map-to-seq-msgs 'mh-notate-if-in-one-seq sequence ?  (1+ mh-cmd-note)
-		      sequence)
-  (mh-undefine-sequence sequence '("all"))
-  (mh-delete-seq-locally sequence))
-
-
-(defun mh-list-sequences (folder)
-  "List the sequences defined in FOLDER."
-  (interactive (list (mh-prompt-for-folder "List sequences in"
-					   mh-current-folder t)))
-  (let ((temp-buffer mh-temp-buffer)
-	(seq-list mh-seq-list))
-    (with-output-to-temp-buffer temp-buffer
-      (save-excursion
-	(set-buffer temp-buffer)
-	(erase-buffer)
-	(message "Listing sequences ...")
-	(insert "Sequences in folder " folder ":\n")
-	(while seq-list
-	  (let ((name (mh-seq-name (car seq-list)))
-		(sorted-seq-msgs
-		 (sort (copy-sequence (mh-seq-msgs (car seq-list))) '<))
-		(last-col (- (window-width) 4))
-		name-spec)
-	    (insert (setq name-spec (format "%20s:" name)))
-	    (while sorted-seq-msgs
-	      (if (> (current-column) last-col)
-		  (progn
-		    (insert "\n")
-		    (move-to-column (length name-spec))))
-	      (insert (format " %s" (car sorted-seq-msgs)))
-	      (setq sorted-seq-msgs (cdr sorted-seq-msgs)))
-	    (insert "\n"))
-	  (setq seq-list (cdr seq-list)))
-	(goto-char (point-min))
-	(message "Listing sequences...done")))))
-
-
-(defun mh-msg-is-in-seq (message)
-  "Display the sequences that contain MESSAGE (default: current message)."
-  (interactive (list (mh-get-msg-num t)))
-  (message "Message %d is in sequences: %s"
-	   message
-	   (mapconcat 'concat
-		      (mh-list-to-string (mh-seq-containing-msg message t))
-		      " ")))
-
-
-(defun mh-narrow-to-seq (sequence)
-  "Restrict display of this folder to just messages in SEQUENCE.
-Use \\<mh-folder-mode-map>\\[mh-widen] to undo this command."
-  (interactive (list (mh-read-seq "Narrow to" t)))
-  (with-mh-folder-updating (t)
-    (cond ((mh-seq-to-msgs sequence)
-	   (mh-widen)
-	   (let ((eob (point-max)))
-	     (mh-copy-seq-to-point sequence eob)
-	     (narrow-to-region eob (point-max))
-	     (make-variable-buffer-local 'mh-non-seq-mode-line-annotation)
-	     (setq mh-non-seq-mode-line-annotation mh-mode-line-annotation)
-	     (setq mh-mode-line-annotation (symbol-name sequence))
-	     (mh-make-folder-mode-line)
-	     (mh-recenter nil)
-	     (setq mh-narrowed-to-seq sequence)))
-	  (t
-	   (error "No messages in sequence `%s'" (symbol-name sequence))))))
-
-
-(defun mh-put-msg-in-seq (msg-or-seq sequence)
-  "Add MESSAGE(s) (default: displayed message) to SEQUENCE.
-If optional prefix argument provided, then prompt for the message sequence."
-  (interactive (list (if current-prefix-arg
-			 (mh-read-seq-default "Add messages from" t)
-		         (mh-get-msg-num t))
-		     (mh-read-seq-default "Add to" nil)))
-  (if (not (mh-internal-seq sequence))
-      (setq mh-last-seq-used sequence))
-  (mh-add-msgs-to-seq (if (numberp msg-or-seq)
-			  msg-or-seq
-			  (mh-seq-to-msgs msg-or-seq))
-		      sequence))
-
-
-(defun mh-widen ()
-  "Remove restrictions from current folder, thereby showing all messages."
-  (interactive)
-  (if mh-narrowed-to-seq
-      (with-mh-folder-updating (t)
-	(delete-region (point-min) (point-max))
-	(widen)
-	(setq mh-mode-line-annotation mh-non-seq-mode-line-annotation)
-	(mh-make-folder-mode-line)))
-  (setq mh-narrowed-to-seq nil))
-
-
-
-;;; Commands to manipulate sequences.  Sequences are stored in an alist
-;;; of the form:
-;;;	((seq-name msgs ...) (seq-name msgs ...) ...)
-
-
-(defun mh-read-seq-default (prompt not-empty)
-  ;; Read and return sequence name with default narrowed or previous sequence.
-  (mh-read-seq prompt not-empty
-	       (or mh-narrowed-to-seq
-		   mh-last-seq-used
-		   (car (mh-seq-containing-msg (mh-get-msg-num nil) nil)))))
-
-
-(defun mh-read-seq (prompt not-empty &optional default)
-  ;; Read and return a sequence name.  Prompt with PROMPT, raise an error
-  ;; if the sequence is empty and the NOT-EMPTY flag is non-nil, and supply
-  ;; an optional DEFAULT sequence.
-  ;; A reply of '%' defaults to the first sequence containing the current
-  ;; message.
-  (let* ((input (completing-read (format "%s %s %s" prompt "sequence:"
-					 (if default
-					     (format "[%s] " default)
-					     ""))
-				 (mh-seq-names mh-seq-list)))
-	 (seq (cond ((equal input "%")
-		     (car (mh-seq-containing-msg (mh-get-msg-num t) nil)))
-		    ((equal input "") default)
-		    (t (intern input))))
-	 (msgs (mh-seq-to-msgs seq)))
-    (if (and (null msgs) not-empty)
-	(error (format "No messages in sequence `%s'" seq)))
-    seq))
-
-
-(defun mh-seq-names (seq-list)
-  ;; Return an alist containing the names of the SEQUENCES.
-  (mapcar (function (lambda (entry) (list (symbol-name (mh-seq-name entry)))))
-	  seq-list))
-
-
-(defun mh-rename-seq (sequence new-name)
-  "Rename SEQUENCE to have NEW-NAME."
-  (interactive (list (mh-read-seq "Old" t)
-		     (intern (read-string "New sequence name: "))))
-  (let ((old-seq (mh-find-seq sequence)))
-    (or old-seq
-	(error "Sequence %s does not exist" sequence))
-    ;; create new sequence first, since it might raise an error.
-    (mh-define-sequence new-name (mh-seq-msgs old-seq))
-    (mh-undefine-sequence sequence (mh-seq-msgs old-seq))
-    (rplaca old-seq new-name)))
-
-
-(defun mh-map-to-seq-msgs (func seq &rest args)
-  ;; Invoke the FUNCTION at each message in the SEQUENCE, passing the
-  ;; remaining ARGS as arguments.
-  (save-excursion
-    (let ((msgs (mh-seq-to-msgs seq)))
-      (while msgs
-	(if (mh-goto-msg (car msgs) t t)
-	    (apply func (car msgs) args))
-	(setq msgs (cdr msgs))))))
-
-
-(defun mh-notate-seq (seq notation offset)
-  ;; Mark the scan listing of all messages in the SEQUENCE with the CHARACTER
-  ;; at the given OFFSET from the beginning of the listing line.
-  (mh-map-to-seq-msgs 'mh-notate seq notation offset))
-
-
-(defun mh-add-to-sequence (seq msgs)
-  ;; Add to a SEQUENCE each message the list of MSGS.
-  (if (not (mh-folder-name-p seq))
-      (if msgs
-	  (apply 'mh-exec-cmd "mark" mh-current-folder "-add"
-		 "-sequence" (symbol-name seq)
-		 (mh-coalesce-msg-list msgs)))))
-
-
-(defun mh-copy-seq-to-point (seq location)
-  ;; Copy the scan listing of the messages in SEQUENCE to after the point
-  ;; LOCATION in the current buffer.
-  (mh-map-to-seq-msgs 'mh-copy-line-to-point seq location))
-
-
-(defun mh-copy-line-to-point (msg location)
-  ;; Copy the current line to the LOCATION in the current buffer.
-  (beginning-of-line)
-  (save-excursion
-    (let ((beginning-of-line (point))
-	  end)
-      (forward-line 1)
-      (setq end (point))
-      (goto-char location)
-      (insert-buffer-substring (current-buffer) beginning-of-line end))))
-
--- a/lisp/mh-e/mh-utils.el	Mon Aug 13 10:01:24 2007 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,977 +0,0 @@
-;;; mh-utils.el --- mh-e code needed for both sending and reading
-;; Time-stamp: <95/10/22 17:58:16 gildea>
-
-;; Copyright (C) 1993, 1995 Free Software Foundation, Inc.
-
-;; This file is part of mh-e, 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 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: FSF 19.34.
-
-;;; Commentary:
-
-;; Internal support for mh-e package.
-
-;;; Change Log:
-
-;; $Id: mh-utils.el,v 1.2 1997/04/19 23:21:01 steve Exp $
-
-;;; Code:
-
-;;; Set for local environment:
-;;; mh-progs and mh-lib used to be set in paths.el, which tried to
-;;; figure out at build time which of several possible directories MH
-;;; was installed into.  But if you installed MH after building Emacs,
-;;; this would almost certainly be wrong, so now we do it at run time.
-
-(defvar mh-progs nil
-  "Directory containing MH commands, such as inc, repl, and rmm.")
-
-(defvar mh-lib nil
-  "Directory containing the MH library.
-This directory contains, among other things,
-the mhl program and the components file.")
-
-;;;###autoload
-(put 'mh-progs 'risky-local-variable t)
-;;;###autoload
-(put 'mh-lib 'risky-local-variable t)
-
-;;; User preferences:
-
-(defgroup mh-buffer nil
-  "Layout of MH-E buffers"
-  :prefix "mh-"
-  :group 'mh)
-
-
-(defcustom mh-auto-folder-collect t
-  "*Whether to start collecting MH folder names immediately in the background.
-Non-nil means start a background process collecting the names of all
-folders as soon as mh-e is loaded."
-  :type 'boolean
-  :group 'mh)
-
-(defcustom mh-recursive-folders nil
-  "*If non-nil, then commands which operate on folders do so recursively."
-  :type 'boolean
-  :group 'mh)
-
-(defcustom mh-clean-message-header nil
-  "*Non-nil means clean headers of messages that are displayed or inserted.
-The variables `mh-visible-headers' and `mh-invisible-headers' control what
-is removed."
-  :type 'boolean
-  :group 'mh-buffer)
-
-(defcustom mh-visible-headers nil
-  "*If non-nil, contains a regexp specifying the headers to keep when cleaning.
-Only used if `mh-clean-message-header' is non-nil.  Setting this variable
-overrides `mh-invisible-headers'."
-  :type '(choice (const nil) regexp)
-  :group 'mh-buffer)
-
-(defvar mh-invisible-headers
-  "^Received: \\|^Message-Id: \\|^Remailed-\\|^Via: \\|^Mail-from: \\|^Return-Path: \\|^Delivery-Date: \\|^In-Reply-To: \\|^Resent-"
-  "Regexp matching lines in a message header that are not to be shown.
-If `mh-visible-headers' is non-nil, it is used instead to specify what
-to keep.")
-
-(defcustom mh-bury-show-buffer t
-  "*Non-nil means that the displayed show buffer for a folder is buried."
-  :type 'boolean
-  :group 'mh-buffer)
-
-(defcustom mh-summary-height 4
-  "*Number of lines in MH-Folder window (including the mode line)."
-  :type 'integer
-  :group 'mh-buffer)
-
-(defvar mh-msg-number-regexp "^ *\\([0-9]+\\)"
-  "Regexp to find the number of a message in a scan line.
-The message's number must be surrounded with \\( \\)")
-
-(defvar mh-msg-search-regexp "^[^0-9]*%d[^0-9]"
-  "Format string containing a regexp matching the scan listing for a message.
-The desired message's number will be an argument to format.")
-
-(defcustom mhl-formfile nil
-  "*Name of format file to be used by mhl to show and print messages.
-A value of T means use the default format file.
-Nil means don't use mhl to format messages when showing; mhl is still used,
-with the default format file, to format messages when printing them.
-The format used should specify a non-zero value for overflowoffset so
-the message continues to conform to RFC 822 and mh-e can parse the headers."
-  :type '(choice (const nil) (const t) string)
-  :group 'mh)
-(put 'mhl-formfile 'info-file "mh-e")
-
-(defvar mh-default-folder-for-message-function nil
-  "Function to select a default folder for refiling or Fcc.
-If set to a function, that function is called with no arguments by
-`\\[mh-refile-msg]' and `\\[mh-to-fcc]' to get a default when
-prompting the user for a folder.  The function is called from within a
-save-excursion, with point at the start of the message.  It should
-return the folder to offer as the refile or Fcc folder, as a string
-with a leading `+' sign.  It can also return an empty string to use no
-default, or NIL to calculate the default the usual way.
-NOTE: This variable is not an ordinary hook;
-It may not be a list of functions.")
-
-(defvar mh-find-path-hook nil
-  "Invoked by mh-find-path while reading the user's MH profile.")
-
-(defvar mh-folder-list-change-hook nil
-  "Invoked whenever the cached folder list `mh-folder-list' is changed.")
-
-(defvar mh-show-buffer-mode-line-buffer-id "{show-%s} %d"
-  "Format string to produce `mode-line-buffer-identification' for show buffers.
-First argument is folder name.  Second is message number.")
-
-(defvar mh-cmd-note 4
-  "Offset to insert notation.")
-
-(defvar mh-note-seq "%"
-  "String whose first character is used to notate messages in a sequence.")
-
-;;; Internal bookkeeping variables:
-
-;; The value of `mh-folder-list-change-hook' is called whenever
-;; mh-folder-list variable is set.
-(defvar mh-folder-list nil)		;List of folder names for completion.
-
-;; Cached value of the `Path:' component in the user's MH profile.
-(defvar mh-user-path nil)		;User's mail folder directory.
-
-;; An mh-draft-folder of NIL means do not use a draft folder.
-;; Cached value of the `Draft-Folder:' component in the user's MH profile.
-(defvar mh-draft-folder nil)		;Name of folder containing draft messages.
-
-;; Cached value of the `Unseen-Sequence:' component in the user's MH profile.
-(defvar mh-unseen-seq nil)		;Name of the Unseen sequence.
-
-;; Cached value of the `Previous-Sequence:' component in the user's MH profile.
-(defvar mh-previous-seq nil)		;Name of the Previous sequence.
-
-;; Cached value of the `Inbox:' component in the user's MH profile,
-;; or "+inbox" if no such component.
-(defvar mh-inbox nil)			;Name of the Inbox folder.
-
-(defconst mh-temp-buffer " *mh-temp*")	;Name of mh-e scratch buffer.
-
-(defvar mh-previous-window-config nil)	;Window configuration before mh-e command.
-
-;;; Internal variables local to a folder.
-
-(defvar mh-current-folder nil)		;Name of current folder, a string.
-
-(defvar mh-show-buffer nil)		;Buffer that displays message for this folder.
-
-(defvar mh-folder-filename nil)		;Full path of directory for this folder.
-  
-(defvar mh-msg-count nil)		;Number of msgs in buffer.
-
-(defvar mh-showing nil)			;If non-nil, show the message in a separate window.
-
-;;; This holds a documentation string used by describe-mode.
-(defun mh-showing ()
-  "When moving to a new message in the Folder window,
-also show it in a separate Show window."
-  nil)
-
-(defvar mh-seq-list nil)		;The sequences of this folder.  An alist of (seq . msgs).
-
-(defvar mh-seen-list nil)		;List of displayed messages to be removed from the Unseen sequence.
-
-;; If non-nil, show buffer contains message with all headers.
-;; If nil, show buffer contains message processed normally.
-(defvar mh-showing-with-headers nil)	;Showing message with headers or normally.
-
-
-;;; mh-e macros
-
-(defmacro with-mh-folder-updating (save-modification-flag-p &rest body)
-  ;; Format is (with-mh-folder-updating (SAVE-MODIFICATION-FLAG-P) &body BODY).
-  ;; Execute BODY, which can modify the folder buffer without having to
-  ;; worry about file locking or the read-only flag, and return its result.
-  ;; If SAVE-MODIFICATION-FLAG-P is non-nil, the buffer's modification
-  ;; flag is unchanged, otherwise it is cleared.
-  (setq save-modification-flag-p (car save-modification-flag-p)) ; CL style
-  (` (prog1
-	 (let ((mh-folder-updating-mod-flag (buffer-modified-p))
-	       (buffer-read-only nil)
-	       (buffer-file-name nil))	;don't let the buffer get locked
-	   (prog1
-	       (progn
-		 (,@ body))
-	     (mh-set-folder-modified-p mh-folder-updating-mod-flag)))
-       (,@ (if (not save-modification-flag-p)
-	       '((mh-set-folder-modified-p nil)))))))
-
-(put 'with-mh-folder-updating 'lisp-indent-hook 1)
-
-(defmacro mh-in-show-buffer (show-buffer &rest body)
-  ;; Format is (mh-in-show-buffer (SHOW-BUFFER) &body BODY).
-  ;; Display buffer SHOW-BUFFER in other window and execute BODY in it.
-  ;; Stronger than save-excursion, weaker than save-window-excursion.
-  (setq show-buffer (car show-buffer))	; CL style
-  (` (let ((mh-in-show-buffer-saved-window (selected-window)))
-       (switch-to-buffer-other-window (, show-buffer))
-       (if mh-bury-show-buffer (bury-buffer (current-buffer)))
-       (unwind-protect
-	   (progn
-	     (,@ body))
-	 (select-window mh-in-show-buffer-saved-window)))))
-
-(put 'mh-in-show-buffer 'lisp-indent-hook 1)
-
-(defmacro mh-make-seq (name msgs) (list 'cons name msgs))
-
-(defmacro mh-seq-name (pair) (list 'car pair))
-
-(defmacro mh-seq-msgs (pair) (list 'cdr pair))
-
-
-;;; Ensure new buffers won't get this mode if default-major-mode is nil.
-(put 'mh-show-mode 'mode-class 'special)
-
-(defun mh-show-mode ()
-  "Major mode for showing messages in mh-e.
-The value of mh-show-mode-hook is called when a new message is displayed."
-  (kill-all-local-variables)
-  (setq major-mode 'mh-show-mode)
-  (mh-set-mode-name "MH-Show")
-  (run-hooks 'mh-show-mode-hook))
-
-
-(defun mh-maybe-show (&optional msg)
-  ;; If in showing mode, then display the message pointed to by the cursor.
-  (if mh-showing (mh-show msg)))
-
-(defun mh-show (&optional message)
-  "Show MESSAGE (default: message at cursor).
-Force a two-window display with the folder window on top (size
-mh-summary-height) and the show buffer below it.
-If the message is already visible, display the start of the message.
-
-Display of the message is controlled by setting the variables
-`mh-clean-message-header' and `mhl-formfile'.  The default behavior is
-to scroll uninteresting headers off the top of the window.
-Type \"\\[mh-header-display]\" to see the message with all its headers."
-  (interactive)
-  (and mh-showing-with-headers
-       (or mhl-formfile mh-clean-message-header)
-       (mh-invalidate-show-buffer))
-  (mh-show-msg message))
-
-
-(defun mh-show-msg (msg)
-  (if (not msg)
-      (setq msg (mh-get-msg-num t)))
-  (setq mh-showing t)
-  (let ((folder mh-current-folder)
-	(clean-message-header mh-clean-message-header)
-	(show-window (get-buffer-window mh-show-buffer)))
-    (if (not (eql (next-window (minibuffer-window)) (selected-window)))
-	(delete-other-windows))		; force ourself to the top window
-    (mh-in-show-buffer (mh-show-buffer)
-      (if (and show-window
-	       (equal (mh-msg-filename msg folder) buffer-file-name))
-	  (progn			;just back up to start
-	    (goto-char (point-min))
-	    (if (not clean-message-header)
-		(mh-start-of-uncleaned-message)))
-	(mh-display-msg msg folder))))
-  (if (not (= (1+ (window-height)) (screen-height))) ;not horizontally split
-      (shrink-window (- (window-height) mh-summary-height)))
-  (mh-recenter nil)
-  (if (not (memq msg mh-seen-list)) (setq mh-seen-list (cons msg mh-seen-list)))
-  (run-hooks 'mh-show-hook))
-
-
-(defun mh-display-msg (msg-num folder)
-  ;; Display message NUMBER of FOLDER.
-  ;; Sets the current buffer to the show buffer.
-  (set-buffer folder)
-  ;; Bind variables in folder buffer in case they are local
-  (let ((formfile mhl-formfile)
-	(clean-message-header mh-clean-message-header)
-	(invisible-headers mh-invisible-headers)
-	(visible-headers mh-visible-headers)
-	(msg-filename (mh-msg-filename msg-num))
-	(show-buffer mh-show-buffer))
-    (if (not (file-exists-p msg-filename))
-	(error "Message %d does not exist" msg-num))
-    (set-buffer show-buffer)
-    (cond ((not (equal msg-filename buffer-file-name))
-	   (mh-unvisit-file)
-	   (erase-buffer)
-	   ;; Changing contents, so this hook needs to be reinitialized.
-	   ;; pgp.el uses this.
-	   (if (boundp 'write-contents-hooks) ;Emacs 19
-	       (kill-local-variable 'write-contents-hooks))
-	   (if formfile
-	       (mh-exec-lib-cmd-output "mhl" "-nobell" "-noclear"
-				       (if (stringp formfile)
-					   (list "-form" formfile))
-				       msg-filename)
-	     (insert-file-contents msg-filename))
-	   (goto-char (point-min))
-	   (cond (clean-message-header
-		  (mh-clean-msg-header (point-min)
-				       invisible-headers
-				       visible-headers)
-		  (goto-char (point-min)))
-		 (t
-		  (mh-start-of-uncleaned-message)))
-	   ;; the parts of visiting we want to do (no locking)
-	   (or (eq buffer-undo-list t)	;don't save undo info for prev msgs
-	       (setq buffer-undo-list nil))
-	   (set-buffer-modified-p nil)
-	   (set-buffer-auto-saved)
-	   ;; the parts of set-visited-file-name we want to do (no locking)
-	   (setq buffer-file-name msg-filename)
-	   (setq buffer-backed-up nil)
-	   (auto-save-mode 1)
-	   (set-mark nil)
-	   (mh-show-mode)
-	   (setq mode-line-buffer-identification
-		 (list (format mh-show-buffer-mode-line-buffer-id
-			       folder msg-num)))
-	   (set-buffer folder)
-	   (setq mh-showing-with-headers nil)))))
-
-(defun mh-start-of-uncleaned-message ()
-  ;; position uninteresting headers off the top of the window
-  (let ((case-fold-search t))
-    (re-search-forward
-     "^To:\\|^Cc:\\|^From:\\|^Subject:\\|^Date:" nil t)
-    (beginning-of-line)
-    (mh-recenter 0)))
-
-
-(defun mh-invalidate-show-buffer ()
-  ;; Invalidate the show buffer so we must update it to use it.
-  (if (get-buffer mh-show-buffer)
-      (save-excursion
-	(set-buffer mh-show-buffer)
-	(mh-unvisit-file))))
-
-
-(defun mh-unvisit-file ()
-  ;; Separate current buffer from the message file it was visiting.
-  (or (not (buffer-modified-p))
-      (null buffer-file-name)		;we've been here before
-      (yes-or-no-p (format "Message %s modified; flush changes? "
-			   (file-name-nondirectory buffer-file-name)))
-      (error "Flushing changes not confirmed"))
-  (clear-visited-file-modtime)
-  (unlock-buffer)
-  (setq buffer-file-name nil))
-
-  
-(defun mh-get-msg-num (error-if-no-message)
-  ;; Return the message number of the displayed message.  If the argument
-  ;; ERROR-IF-NO-MESSAGE is non-nil, then complain if the cursor is not
-  ;; pointing to a message.
-  (save-excursion
-    (beginning-of-line)
-    (cond ((looking-at mh-msg-number-regexp)
-	   (string-to-int (buffer-substring (match-beginning 1)
-					    (match-end 1))))
-	  (error-if-no-message
-	   (error "Cursor not pointing to message"))
-	  (t nil))))
-
-
-(defun mh-msg-filename (msg &optional folder)
-  ;; Return the file name of MESSAGE in FOLDER (default current folder).
-  (expand-file-name (int-to-string msg)
-		    (if folder
-			(mh-expand-file-name folder)
-			mh-folder-filename)))
-
-
-(defun mh-clean-msg-header (start invisible-headers visible-headers)
-  ;; Flush extraneous lines in a message header, from the given POINT to the
-  ;; end of the message header.  If VISIBLE-HEADERS is non-nil, it contains a
-  ;; regular expression specifying the lines to display, otherwise
-  ;; INVISIBLE-HEADERS contains a regular expression specifying lines to
-  ;; delete from the header.
-  (let ((case-fold-search t))
-    (save-restriction
-      (goto-char start)
-      (if (search-forward "\n\n" nil 'move)
-	  (backward-char 1))
-      (narrow-to-region start (point))
-      (goto-char (point-min))
-      (if visible-headers
-	  (while (< (point) (point-max))
-	    (cond ((looking-at visible-headers)
-		   (forward-line 1)
-		   (while (looking-at "[ \t]") (forward-line 1)))
-		  (t
-		    (mh-delete-line 1)
-		    (while (looking-at "[ \t]")
-		      (mh-delete-line 1)))))
-	  (while (re-search-forward invisible-headers nil t)
-	    (beginning-of-line)
-	    (mh-delete-line 1)
-	    (while (looking-at "[ \t]")
-	      (mh-delete-line 1))))
-      (unlock-buffer))))
-
-
-(defun mh-recenter (arg)
-  ;; Like recenter but with two improvements: nil arg means recenter,
-  ;; and only does anything if the current buffer is in the selected
-  ;; window.  (Commands like save-some-buffers can make this false.)
-  (if (eql (get-buffer-window (current-buffer))
-	   (selected-window))
-      (recenter (if arg arg '(t)))))
-
-
-(defun mh-delete-line (lines)
-  ;; Delete version of kill-line.
-  (delete-region (point) (progn (forward-line lines) (point))))
-
-
-(defun mh-notate (msg notation offset)
-  ;; Marks MESSAGE with the character NOTATION at position OFFSET.
-  ;; Null MESSAGE means the message that the cursor points to.
-  (save-excursion
-    (if (or (null msg)
-	    (mh-goto-msg msg t t))
-	(with-mh-folder-updating (t)
-	  (beginning-of-line)
-	  (forward-char offset)
-	  (delete-char 1)
-	  (insert notation)))))
-
-
-(defun mh-find-msg-get-num (step)
-  ;; Return the message number of the message on the current scan line
-  ;; or one nearby.  Jumps over non-message lines, such as inc errors.
-  ;; STEP tells whether to search forward or backward if we have to search.
-  (or (mh-get-msg-num nil)
-      (let ((msg-num nil)
-	    (nreverses 0))
-	(while (and (not msg-num)
-		    (< nreverses 2))
-	  (cond ((eobp)
-		 (setq step -1)
-		 (setq nreverses (1+ nreverses)))
-		((bobp)
-		 (setq step 1)
-		 (setq nreverses (1+ nreverses))))
-	  (forward-line step)
-	  (setq msg-num (mh-get-msg-num nil)))
-	msg-num)))
-
-(defun mh-goto-msg (number &optional no-error-if-no-message dont-show)
-  "Position the cursor at message NUMBER.
-Optional non-nil second argument means return nil instead of
-signaling an error if message does not exist; in this case,
-the cursor is positioned near where the message would have been.
-Non-nil third argument means not to show the message."
-  (interactive "NGo to message: ")
-  (setq number (prefix-numeric-value number)) ;Emacs 19
-  ;; This basic routine tries to be as fast as possible,
-  ;; using a binary search and minimal regexps.
-  (let ((cur-msg (mh-find-msg-get-num -1))
-	(jump-size mh-msg-count))
-    (while (and (> jump-size 1)
-		cur-msg
-		(not (eq cur-msg number)))
-      (cond ((< cur-msg number)
-	     (setq jump-size (min (- number cur-msg)
-				  (ash (1+ jump-size) -1)))
-	     (forward-line jump-size)
-	     (setq cur-msg (mh-find-msg-get-num 1)))
-	    (t
-	     (setq jump-size (min (- cur-msg number)
-				  (ash (1+ jump-size) -1)))
-	     (forward-line (- jump-size))
-	     (setq cur-msg (mh-find-msg-get-num -1)))))
-    (if (eq cur-msg number)
-	(progn
-	  (beginning-of-line)
-	  (or dont-show
-	      (mh-maybe-show number)
-	      t))
-      (if (not no-error-if-no-message)
-	  (error "No message %d" number)))))
-
-
-(defun mh-msg-search-pat (n)
-  ;; Return a search pattern for message N in the scan listing.
-  (format mh-msg-search-regexp n))
-
-
-(defun mh-get-profile-field (field)
-  ;; Find and return the value of FIELD in the current buffer.
-  ;; Returns NIL if the field is not in the buffer.
-  (let ((case-fold-search t))
-    (goto-char (point-min))
-    (cond ((not (re-search-forward (format "^%s" field) nil t)) nil)
-	  ((looking-at "[\t ]*$") nil)
-	  (t
-	   (re-search-forward "[\t ]*\\([^\t \n].*\\)$" nil t)
-	   (let ((start (match-beginning 1)))
-	     (end-of-line)
-	     (buffer-substring start (point)))))))
-
-(defvar mail-user-agent 'mh-e-user-agent) ;from reporter.el 3.2
-
-(defun mh-find-path ()
-  ;; Set mh-progs and mh-lib.
-  ;; (This step is necessary if MH was installed after this Emacs was dumped.)
-  ;; From profile file, set mh-user-path, mh-draft-folder,
-  ;; mh-unseen-seq, mh-previous-seq, mh-inbox.
-  (mh-find-progs)
-  (save-excursion
-    ;; Be sure profile is fully expanded before switching buffers
-    (let ((profile (expand-file-name (or (getenv "MH") "~/.mh_profile"))))
-      (set-buffer (get-buffer-create mh-temp-buffer))
-      (setq buffer-offer-save nil)	;for people who set default to t
-      (erase-buffer)
-      (condition-case err
-	  (insert-file-contents profile)
-	(file-error
-	 (mh-install profile err)))
-      (setq mh-user-path (mh-get-profile-field "Path:"))
-      (if (not mh-user-path)
-	  (setq mh-user-path "Mail"))
-      (setq mh-user-path
-	    (file-name-as-directory
-	     (expand-file-name mh-user-path (expand-file-name "~"))))
-      (setq mh-draft-folder (mh-get-profile-field "Draft-Folder:"))
-      (if mh-draft-folder
-	  (progn
-	    (if (not (mh-folder-name-p mh-draft-folder))
-		(setq mh-draft-folder (format "+%s" mh-draft-folder)))
-	    (if (not (file-exists-p (mh-expand-file-name mh-draft-folder)))
-		(error "Draft folder \"%s\" not found.  Create it and try again."
-		       (mh-expand-file-name mh-draft-folder)))))
-      (setq mh-inbox (mh-get-profile-field "Inbox:"))
-      (cond ((not mh-inbox)
-	     (setq mh-inbox "+inbox"))
-	    ((not (mh-folder-name-p mh-inbox))
-	     (setq mh-inbox (format "+%s" mh-inbox))))
-      (setq mh-unseen-seq (mh-get-profile-field "Unseen-Sequence:"))
-      (if mh-unseen-seq
-	  (setq mh-unseen-seq (intern mh-unseen-seq))
-	(setq mh-unseen-seq 'unseen))	;old MH default?
-      (setq mh-previous-seq (mh-get-profile-field "Previous-Sequence:"))
-      (if mh-previous-seq
-	  (setq mh-previous-seq (intern mh-previous-seq)))
-      (setq mail-user-agent 'mh-e-user-agent)
-      (run-hooks 'mh-find-path-hook))))
-
-(defun mh-find-progs ()
-  (or (file-exists-p (expand-file-name "inc" mh-progs))
-      (setq mh-progs
-	    (or (mh-path-search exec-path "inc")
-		(mh-path-search '("/usr/local/bin/mh/"
-				  "/usr/local/mh/"
-				  "/usr/bin/mh/" ;Ultrix 4.2
-				  "/usr/new/mh/" ;Ultrix <4.2
-				  "/usr/contrib/mh/bin/" ;BSDI
-				  "/usr/local/bin/"
-				  )
-				"inc")
-		mh-progs
-		"/usr/local/bin/")))
-  (or (file-exists-p (expand-file-name "mhl" mh-lib))
-      (setq mh-lib
-	    (or (mh-path-search '("/usr/local/lib/mh/"
-				  "/usr/local/mh/lib/"
-				  "/usr/local/bin/mh/"
-				  "/usr/lib/mh/" ;Ultrix 4.2
-				  "/usr/new/lib/mh/" ;Ultrix <4.2
-				  "/usr/contrib/mh/lib/" ;BSDI
-				  )
-				"mhl")
-		(mh-path-search exec-path "mhl") ;unlikely
-		mh-lib
-		"/usr/local/lib/mh/"))))
-
-(defun mh-path-search (path file)
-  ;; Search PATH, a list of directory names, for FILE.
-  ;; Returns the element of PATH that contains FILE, or nil if not found.
-  (while (and path
-	      (not (file-exists-p (expand-file-name file (car path)))))
-    (setq path (cdr path)))
-  (car path))
-
-(defvar mh-no-install nil)		;do not run install-mh
-
-(defun mh-install (profile error-val)
-  ;; Called to do error recovery if we fail to read the profile file.
-  ;; If possible, initialize the MH environment.
-  (if (or (getenv "MH")
-	  (file-exists-p profile)
-	  mh-no-install)
-      (signal (car error-val)
-	      (list (format "Cannot read MH profile \"%s\"" profile)
-		    (car (cdr (cdr error-val))))))
-  ;; The "install-mh" command will output a short note which
-  ;; mh-exec-cmd will display to the user.
-  ;; The MH 5 version of install-mh might try prompt the user
-  ;; for information, which would fail here.
-  (mh-exec-cmd (expand-file-name "install-mh" mh-lib) "-auto")
-  ;; now try again to read the profile file
-  (erase-buffer)
-  (condition-case err
-      (insert-file-contents profile)
-    (file-error
-     (signal (car err)			;re-signal with more specific msg
-	     (list (format "Cannot read MH profile \"%s\"" profile)
-		   (car (cdr (cdr err))))))))
-
-
-(defun mh-set-folder-modified-p (flag)
-  ;; Mark current folder as modified or unmodified according to FLAG.
-  (set-buffer-modified-p flag))
-
-
-(defun mh-find-seq (name) (assoc name mh-seq-list))
-
-(defun mh-seq-to-msgs (seq)
-  ;; Return a list of the messages in SEQUENCE.
-  (mh-seq-msgs (mh-find-seq seq)))
-
-
-(defun mh-add-msgs-to-seq (msgs seq &optional internal-flag)
-  ;; Add MESSAGE(s) to the SEQUENCE.  If optional FLAG is non-nil, do not mark
-  ;; the message in the scan listing or inform MH of the addition.
-  (let ((entry (mh-find-seq seq)))
-    (if (and msgs (atom msgs)) (setq msgs (list msgs)))
-    (if (null entry)
-	(setq mh-seq-list (cons (mh-make-seq seq msgs) mh-seq-list))
-	(if msgs (setcdr entry (append msgs (mh-seq-msgs entry)))))
-    (cond ((not internal-flag)
-	   (mh-add-to-sequence seq msgs)
-	   (mh-notate-seq seq mh-note-seq (1+ mh-cmd-note))))))
-
-(autoload 'mh-add-to-sequence "mh-seq")
-(autoload 'mh-notate-seq "mh-seq")
-(autoload 'mh-read-seq-default "mh-seq")
-(autoload 'mh-map-to-seq-msgs "mh-seq")
-
-
-(defun mh-set-mode-name (mode-name-string)
-  ;; Set the mode-name and ensure that the mode line is updated.
-  (setq mode-name mode-name-string)
-  ;; Force redisplay of all buffers' mode lines to be considered.
-  (save-excursion (set-buffer (other-buffer)))
-  (set-buffer-modified-p (buffer-modified-p)))
-
-
-(defun mh-prompt-for-folder (prompt default can-create)
-  ;; Prompt for a folder name with PROMPT.  Returns the folder's name as a
-  ;; string.  DEFAULT is used if the folder exists and the user types return.
-  ;; If the CAN-CREATE flag is t, then a non-existent folder is made.
-  (if (null default)
-      (setq default ""))
-  (let* ((prompt (format "%s folder%s" prompt
-			 (if (equal "" default)
-			     "? "
-			     (format " [%s]? " default))))
-	 read-name folder-name)
-    (if (null mh-folder-list)
-	(mh-set-folder-list))
-    (while (and (setq read-name (completing-read prompt mh-folder-list
-					    nil nil "+"))
-		(equal read-name "")
-		(equal default "")))
-    (cond ((or (equal read-name "") (equal read-name "+"))
-	   (setq read-name default))
-	  ((not (mh-folder-name-p read-name))
-	   (setq read-name (format "+%s" read-name))))
-    (setq folder-name read-name)
-    (cond ((and (> (length folder-name) 0)
-		(eql (aref folder-name (1- (length folder-name))) ?/))
-	   (setq folder-name (substring folder-name 0 -1))))
-    (let ((new-file-p (not (file-exists-p (mh-expand-file-name folder-name)))))
-      (cond ((and new-file-p
-		  (y-or-n-p
-		   (format "Folder %s does not exist.  Create it? " folder-name)))
-	     (message "Creating %s" folder-name)
-	     (call-process "mkdir" nil nil nil (mh-expand-file-name folder-name))
-	     (message "Creating %s...done" folder-name)
-	     (setq mh-folder-list (cons (list read-name) mh-folder-list))
-	     (run-hooks 'mh-folder-list-change-hook))
-	    (new-file-p
-	     (error "Folder %s is not created" folder-name))
-	    ((not (file-directory-p (mh-expand-file-name folder-name)))
-	     (error "\"%s\" is not a directory"
-		    (mh-expand-file-name folder-name)))
-	    ((and (null (assoc read-name mh-folder-list))
-		  (null (assoc (concat read-name "/") mh-folder-list)))
-	     (setq mh-folder-list (cons (list read-name) mh-folder-list))
-	     (run-hooks 'mh-folder-list-change-hook))))
-    folder-name))
-
-
-(defvar mh-make-folder-list-process nil) ;The background process collecting the folder list.
-
-(defvar mh-folder-list-temp nil)	;mh-folder-list as it is being built.
-
-(defvar mh-folder-list-partial-line "")	;Start of last incomplete line from folder process.
-
-(defun mh-set-folder-list ()
-  ;; Sets mh-folder-list correctly.
-  ;; A useful function for the command line or for when you need to
-  ;; sync by hand.  Format is in a form suitable for completing read.
-  (message "Collecting folder names...")
-  (if (not mh-make-folder-list-process)
-      (mh-make-folder-list-background))
-  (while (eq (process-status mh-make-folder-list-process) 'run)
-    (accept-process-output mh-make-folder-list-process))
-  (setq mh-folder-list mh-folder-list-temp)
-  (run-hooks 'mh-folder-list-change-hook)
-  (setq mh-folder-list-temp nil)
-  (delete-process mh-make-folder-list-process)
-  (setq mh-make-folder-list-process nil)
-  (message "Collecting folder names...done"))
-
-(defun mh-make-folder-list-background ()
-  ;; Start a background process to compute a list of the user's folders.
-  ;; Call mh-set-folder-list to wait for the result.
-  (cond
-   ((not mh-make-folder-list-process)
-    (mh-find-path)
-    (let ((process-connection-type nil))
-      (setq mh-make-folder-list-process
-	    (start-process "folders" nil (expand-file-name "folders" mh-progs)
-			   "-fast"
-			   (if mh-recursive-folders
-			       "-recurse"
-			     "-norecurse")))
-      (set-process-filter mh-make-folder-list-process
-			  'mh-make-folder-list-filter)
-      (process-kill-without-query mh-make-folder-list-process)))))
-
-(defun mh-make-folder-list-filter (process output)
-  ;; parse output from "folders -fast"
-  (let ((position 0)
-	line-end
-	new-folder
-	(prevailing-match-data (match-data)))
-    (unwind-protect
-	;; make sure got complete line
-	(while (setq line-end (string-match "\n" output position))
-	  (setq new-folder (format "+%s%s"
-				   mh-folder-list-partial-line
-				   (substring output position line-end)))
-	  (setq mh-folder-list-partial-line "")
-	  ;; is new folder a subfolder of previous?
-	  (if (and mh-folder-list-temp
-		   (string-match
-		    (regexp-quote
-		     (concat (car (car mh-folder-list-temp)) "/"))
-		    new-folder))
-	      ;; append slash to parent folder for better completion
-	      ;; (undone by mh-prompt-for-folder)
-	      (setq mh-folder-list-temp
-		    (cons
-		     (list new-folder)
-		     (cons
-		      (list (concat (car (car mh-folder-list-temp)) "/"))
-		      (cdr mh-folder-list-temp))))
-	    (setq mh-folder-list-temp
-		  (cons (list new-folder)
-			mh-folder-list-temp)))
-	  (setq position (1+ line-end)))
-      (store-match-data prevailing-match-data))
-    (setq mh-folder-list-partial-line (substring output position))))
-
-
-(defun mh-folder-name-p (name)
-  ;; Return non-NIL if NAME is possibly the name of a folder.
-  ;; A name (a string or symbol) can be a folder name if it begins with "+".
-  (if (symbolp name)
-      (eql (aref (symbol-name name) 0) ?+)
-    (and (> (length name) 0)
-	 (eql (aref name 0) ?+))))
-
-
-;;; Issue commands to MH.
-
-
-(defun mh-exec-cmd (command &rest args)
-  ;; Execute mh-command COMMAND with ARGS.
-  ;; The side effects are what is desired.
-  ;; Any output is assumed to be an error and is shown to the user.
-  ;; The output is not read or parsed by mh-e.
-  (save-excursion
-    (set-buffer (get-buffer-create mh-temp-buffer))
-    (erase-buffer)
-    (apply 'call-process
-	   (expand-file-name command mh-progs) nil t nil
-	   (mh-list-to-string args))
-    (if (> (buffer-size) 0)
-	(save-window-excursion
-	  (switch-to-buffer-other-window mh-temp-buffer)
-	  (sit-for 5)))))
-
-
-(defun mh-exec-cmd-error (env command &rest args)
-  ;; In environment ENV, execute mh-command COMMAND with args ARGS.
-  ;; ENV is nil or a string of space-separated "var=value" elements.
-  ;; Signals an error if process does not complete successfully.
-  (save-excursion
-    (set-buffer (get-buffer-create mh-temp-buffer))
-    (erase-buffer)
-    (let ((status
-	   (if env
-	       ;; the shell hacks necessary here shows just how broken Unix is
-	       (apply 'call-process "/bin/sh" nil t nil "-c"
-		      (format "%s %s ${1+\"$@\"}"
-			      env 
-			      (expand-file-name command mh-progs))
-		      command
-		      (mh-list-to-string args))
-	       (apply 'call-process
-		      (expand-file-name command mh-progs) nil t nil
-		      (mh-list-to-string args)))))
-      (mh-handle-process-error command status))))
-
-
-(defun mh-exec-cmd-daemon (command &rest args)
-  ;; Execute MH command COMMAND with ARGS in the background.
-  ;; Any output from command is displayed in an asynchronous pop-up window.
-  (save-excursion
-    (set-buffer (get-buffer-create mh-temp-buffer))
-    (erase-buffer))
-  (let* ((process-connection-type nil)
-	 (process (apply 'start-process
-			 command nil
-			 (expand-file-name command mh-progs)
-			 (mh-list-to-string args))))
-    (set-process-filter process 'mh-process-daemon)))
-
-(defun mh-process-daemon (process output)
-  ;; Process daemon that puts output into a temporary buffer.
-  (set-buffer (get-buffer-create mh-temp-buffer))
-  (insert-before-markers output)
-  (display-buffer mh-temp-buffer))
-
-
-(defun mh-exec-cmd-quiet (raise-error command &rest args)
-  ;; Args are RAISE-ERROR, COMMANDS, ARGS....
-  ;; Execute MH command COMMAND with ARGS.  ARGS is a list of strings.
-  ;; Return at start of mh-temp buffer, where output can be parsed and used.
-  ;; Returns value of call-process, which is 0 for success,
-  ;; unless RAISE-ERROR is non-nil, in which case an error is signaled
-  ;; if call-process returns non-0.
-  (set-buffer (get-buffer-create mh-temp-buffer))
-  (erase-buffer)
-  (let ((value
-	 (apply 'call-process
-		(expand-file-name command mh-progs) nil t nil
-		args)))
-    (goto-char (point-min))
-    (if raise-error
-	(mh-handle-process-error command value)
-      value)))
-
-
-(defun mh-exec-cmd-output (command display &rest args)
-  ;; Execute MH command COMMAND with DISPLAY flag and ARGS.
-  ;; Put the output into buffer after point.  Set mark after inserted text.
-  ;; Output is expected to be shown to user, not parsed by mh-e.
-  (push-mark (point) t)
-  (apply 'call-process
-	 (expand-file-name command mh-progs) nil t display
-	 (mh-list-to-string args))
-  (exchange-point-and-mark))
-
-
-(defun mh-exec-lib-cmd-output (command &rest args)
-  ;; Execute MH library command COMMAND with ARGS.
-  ;; Put the output into buffer after point.  Set mark after inserted text.
-  (apply 'mh-exec-cmd-output (expand-file-name command mh-lib) nil args))
-
-
-(defun mh-handle-process-error (command status)
-  ;; Raise error if COMMAND returned non-0 STATUS, otherwise return STATUS.
-  ;; STATUS is return value from call-process.
-  ;; Program output is in current buffer.
-  ;; If output is too long to include in error message, display the buffer.
-  (cond ((eql status 0)			;success
-	 status)
-	((stringp status)		;kill string
-	 (error "%s: %s" command status))
-	(t				;exit code
-	 (cond
-	  ((= (buffer-size) 0)		;program produced no error message
-	   (error "%s: exit code %d" command status))
-	  (t
-	   ;; will error message fit on one line?
-	   (goto-line 2)
-	   (if (and (< (buffer-size) (screen-width))
-		    (eobp))
-	       (error "%s"
-		      (buffer-substring 1 (progn (goto-char 1)
-						 (end-of-line)
-						 (point))))
-	     (display-buffer (current-buffer))
-	     (error "%s failed with status %d.  See error message in other window."
-		    command status)))))))
-
-
-(defun mh-expand-file-name (filename &optional default)
-  ;; Just like `expand-file-name', but also handles MH folder names.
-  ;; Assumes that any filename that starts with '+' is a folder name.
-   (if (mh-folder-name-p filename)
-       (expand-file-name (substring filename 1) mh-user-path)
-     (expand-file-name filename default)))
-
-
-(defun mh-list-to-string (l)
-  ;; Flattens the list L and makes every element of the new list into a string.
-  (nreverse (mh-list-to-string-1 l)))
-
-(defun mh-list-to-string-1 (l)
-  (let ((new-list nil))
-    (while l
-      (cond ((null (car l)))
-	    ((symbolp (car l))
-	     (setq new-list (cons (symbol-name (car l)) new-list)))
-	    ((numberp (car l))
-	     (setq new-list (cons (int-to-string (car l)) new-list)))
-	    ((equal (car l) ""))
-	    ((stringp (car l)) (setq new-list (cons (car l) new-list)))
-	    ((listp (car l))
-	     (setq new-list (nconc (mh-list-to-string-1 (car l))
-				   new-list)))
-	    (t (error "Bad element in mh-list-to-string: %s" (car l))))
-      (setq l (cdr l)))
-    new-list))
-
-(provide 'mh-utils)
-
-(and (not noninteractive)
-     mh-auto-folder-collect
-     (let ((mh-no-install t))		;only get folders if MH installed
-       (condition-case err
-	   (mh-make-folder-list-background)
-	 (file-error))))		;so don't complain if not installed
-
-;;; mh-utils.el ends here
--- a/lisp/modes/auto-autoloads.el	Mon Aug 13 10:01:24 2007 +0200
+++ b/lisp/modes/auto-autoloads.el	Mon Aug 13 10:02:21 2007 +0200
@@ -250,7 +250,143 @@
 
 ;;;***
 
-;;;### (autoloads nil "cperl-mode" "modes/cperl-mode.el")
+;;;### (autoloads (cperl-mode) "cperl-mode" "modes/cperl-mode.el")
+
+(defalias 'perl-mode 'cperl-mode)
+
+(autoload 'cperl-mode "cperl-mode" "\
+Major mode for editing Perl code.
+Expression and list commands understand all C brackets.
+Tab indents for Perl code.
+Paragraphs are separated by blank lines only.
+Delete converts tabs to spaces as it moves back.
+
+Various characters in Perl almost always come in pairs: {}, (), [],
+sometimes <>. When the user types the first, she gets the second as
+well, with optional special formatting done on {}.  (Disabled by
+default.)  You can always quote (with \\[quoted-insert]) the left
+\"paren\" to avoid the expansion. The processing of < is special,
+since most the time you mean \"less\". Cperl mode tries to guess
+whether you want to type pair <>, and inserts is if it
+appropriate. You can set `cperl-electric-parens-string' to the string that
+contains the parenths from the above list you want to be electrical.
+Electricity of parenths is controlled by `cperl-electric-parens'.
+You may also set `cperl-electric-parens-mark' to have electric parens
+look for active mark and \"embrace\" a region if possible.'
+
+CPerl mode provides expansion of the Perl control constructs:
+   if, else, elsif, unless, while, until, for, and foreach.
+=========(Disabled by default, see `cperl-electric-keywords'.)
+The user types the keyword immediately followed by a space, which causes
+the construct to be expanded, and the user is positioned where she is most
+likely to want to be.
+eg. when the user types a space following \"if\" the following appears in
+the buffer:
+            if () {     or   if ()
+            }                 {
+                              }
+and the cursor is between the parentheses.  The user can then type some
+boolean expression within the parens.  Having done that, typing
+\\[cperl-linefeed] places you, appropriately indented on a new line
+between the braces. If CPerl decides that you want to insert
+\"English\" style construct like
+            bite if angry;
+it will not do any expansion. See also help on variable 
+`cperl-extra-newline-before-brace'.
+
+\\[cperl-linefeed] is a convenience replacement for typing carriage
+return. It places you in the next line with proper indentation, or if
+you type it inside the inline block of control construct, like
+            foreach (@lines) {print; print}
+and you are on a boundary of a statement inside braces, it will
+transform the construct into a multiline and will place you into an
+appropriately indented blank line. If you need a usual 
+`newline-and-indent' behaviour, it is on \\[newline-and-indent], 
+see documentation on `cperl-electric-linefeed'.
+
+\\{cperl-mode-map}
+
+Setting the variable `cperl-font-lock' to t switches on
+font-lock-mode, `cperl-electric-lbrace-space' to t switches on
+electric space between $ and {, `cperl-electric-parens-string' is the
+string that contains parentheses that should be electric in CPerl (see
+also `cperl-electric-parens-mark' and `cperl-electric-parens'),
+setting `cperl-electric-keywords' enables electric expansion of
+control structures in CPerl. `cperl-electric-linefeed' governs which
+one of two linefeed behavior is preferable. You can enable all these
+options simultaneously (recommended mode of use) by setting
+`cperl-hairy' to t. In this case you can switch separate options off
+by setting them to `null'. Note that one may undo the extra whitespace
+inserted by semis and braces in `auto-newline'-mode by consequent
+\\[cperl-electric-backspace].
+
+If your site has perl5 documentation in info format, you can use commands
+\\[cperl-info-on-current-command] and \\[cperl-info-on-command] to access it.
+These keys run commands `cperl-info-on-current-command' and
+`cperl-info-on-command', which one is which is controlled by variable
+`cperl-info-on-command-no-prompt' (in turn affected by `cperl-hairy').
+
+Even if you have no info-format documentation, short one-liner-style
+help is available on \\[cperl-get-help]. 
+
+It is possible to show this help automatically after some idle
+time. This is regulated by variable `cperl-lazy-help-time'.  Default
+with `cperl-hairy' is 5 secs idle time if the value of this variable
+is nil.  It is also possible to switch this on/off from the
+menu. Requires `run-with-idle-timer'.
+
+Use \\[cperl-lineup] to vertically lineup some construction - put the
+beginning of the region at the start of construction, and make region
+span the needed amount of lines.
+
+Variables `cperl-pod-here-scan', `cperl-pod-here-fontify',
+`cperl-pod-face', `cperl-pod-head-face' control processing of pod and
+here-docs sections. In a future version results of scan may be used
+for indentation too, currently they are used for highlighting only.
+
+Variables controlling indentation style:
+ `cperl-tab-always-indent'
+    Non-nil means TAB in CPerl mode should always reindent the current line,
+    regardless of where in the line point is when the TAB command is used.
+ `cperl-auto-newline'
+    Non-nil means automatically newline before and after braces,
+    and after colons and semicolons, inserted in Perl code. The following
+    \\[cperl-electric-backspace] will remove the inserted whitespace.
+    Insertion after colons requires both this variable and 
+    `cperl-auto-newline-after-colon' set. 
+ `cperl-auto-newline-after-colon'
+    Non-nil means automatically newline even after colons.
+    Subject to `cperl-auto-newline' setting.
+ `cperl-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.
+ `cperl-continued-statement-offset'
+    Extra indentation given to a substatement, such as the
+    then-clause of an if, or body of a while, or just a statement continuation.
+ `cperl-continued-brace-offset'
+    Extra indentation given to a brace that starts a substatement.
+    This is in addition to `cperl-continued-statement-offset'.
+ `cperl-brace-offset'
+    Extra indentation for line if it starts with an open brace.
+ `cperl-brace-imaginary-offset'
+    An open brace following other text is treated as if it the line started
+    this far to the right of the actual line indentation.
+ `cperl-label-offset'
+    Extra indentation for line that is a label.
+ `cperl-min-label-indent'
+    Minimal indentation for line that is a label.
+
+Settings for K&R and BSD indentation styles are
+  `cperl-indent-level'                5    8
+  `cperl-continued-statement-offset'  5    8
+  `cperl-brace-offset'               -5   -8
+  `cperl-label-offset'               -5   -8
+
+If `cperl-indent-level' is 0, the statement after opening brace in column 0 is indented on `cperl-brace-offset'+`cperl-continued-statement-offset'.
+
+Turning on CPerl mode calls the hooks in the variable `cperl-mode-hook'
+with no args." t nil)
 
 ;;;***
 
@@ -571,7 +707,7 @@
 ;;;### (autoloads (ksh-mode) "ksh-mode" "modes/ksh-mode.el")
 
 (autoload 'ksh-mode "ksh-mode" "\
-ksh-mode $Revision: 1.11 $ - Major mode for editing (Bourne, Korn or Bourne again)
+ksh-mode $Revision: 1.12 $ - Major mode for editing (Bourne, Korn or Bourne again)
 shell scripts.
 Special key bindings and commands:
 \\{ksh-mode-map}
@@ -967,53 +1103,7 @@
 
 ;;;***
 
-;;;### (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 nil "perl-mode" "modes/perl-mode.el")
 
 ;;;***
 
@@ -1929,7 +2019,7 @@
 
 (autoload 'vhdl-mode "vhdl-mode" "\
 Major mode for editing VHDL code.
-vhdl-mode $Revision: 1.11 $
+vhdl-mode $Revision: 1.12 $
 To submit a problem report, enter `\\[vhdl-submit-bug-report]' from a
 vhdl-mode buffer.  This automatically sets up a mail buffer with version
 information already added.  You just need to add a description of the
--- a/lisp/modes/cperl-mode.el	Mon Aug 13 10:01:24 2007 +0200
+++ b/lisp/modes/cperl-mode.el	Mon Aug 13 10:02:21 2007 +0200
@@ -34,9 +34,10 @@
 ;;; XEmacs changes by Peter Arius arius@informatik.uni-erlangen.de
 ;;; XEmacs 'delete key behavior handling added for XEmacs 20.x by
 ;;; Gary D. Foster <Gary.Foster@corp.sun.com>
+;;; Karl M. Hegbloom <karlheg@inetarena.com>
 
 ;; Original Vendor Version Number:  (mostly based on...)
-;; $Id: cperl-mode.el,v 1.13 1997/09/20 22:15:08 steve Exp $
+;; $Id: cperl-mode.el,v 1.14 1997/10/12 01:39:40 steve Exp $
 
 ;; Increment the final digit once per XEmacs-only revision, the other
 ;; for merges.  (sound ok?)
@@ -935,7 +936,7 @@
 
 
 ;;; Probably it is too late to set these guys already, but it can help later:
-
+;;; ####
 (setq auto-mode-alist
       (append '(("\\.\\([pP][Llm]\\|al\\)\\'" . perl-mode))  auto-mode-alist ))
 (and (boundp 'interpreter-mode-alist)
@@ -1153,8 +1154,9 @@
 
 ;; provide an alias for working with emacs 19.  the perl-mode that comes
 ;; with it is really bad, and this lets us seamlessly replace it.
-;;;;;###autoload here please.
-(fset 'perl-mode 'cperl-mode)
+;;;###autoload
+(defalias 'perl-mode 'cperl-mode)
+;;;###autoload
 (defun cperl-mode ()
   "Major mode for editing Perl code.
 Expression and list commands understand all C brackets.
@@ -4413,7 +4415,7 @@
     (save-excursion
       (cond (inbuffer nil)		; Already there
 	    ((file-exists-p tags-file-name)
-	     (visit-tags-table-buffer tags-file-name))
+	     (visit-tags-table-buffer))
 	    (t (set-buffer (find-file-noselect tags-file-name))))
       (cond
        (dir
@@ -5518,9 +5520,6 @@
 ;; Part from the original `cperl-lazy-*', and part from `eldoc'
 ;; Karl M. Hegbloom <karlheg@inetarena.com>
 
-(defvar cperl-help nil
-  "Non-nil means that the lazy-help handlers are installed now.")
-
 (defun cperl-help (&optional arg)
   (interactive "p")
   (cond ((and arg (<= arg 0))
--- a/lisp/modes/custom-load.el	Mon Aug 13 10:01:24 2007 +0200
+++ b/lisp/modes/custom-load.el	Mon Aug 13 10:02:21 2007 +0200
@@ -1,6 +1,6 @@
 ;;; custom-load.el --- automatically extracted custom dependencies
 
-;; Created by SL Baur on Sat Oct  4 18:11:37 1997
+;; Created by SL Baur on Thu Oct  9 20:52:16 1997
 
 ;;; Code:
 
@@ -20,7 +20,7 @@
 (custom-put 'fortran-indent 'custom-loads '("fortran"))
 (custom-put 'docs 'custom-loads '("texinfo"))
 (custom-put 'lisp-indent 'custom-loads '("cl-indent"))
-(custom-put 'tools 'custom-loads '("hideshow" "make-mode"))
+(custom-put 'tools 'custom-loads '("hideshow" "lazy-shot" "make-mode"))
 (custom-put 'lisp 'custom-loads '("lisp-mode" "cl-indent" "strokes"))
 (custom-put 'reftex 'custom-loads '("reftex"))
 (custom-put 'outlines 'custom-loads '("hideshow" "outl-mouse" "whitespace-mode"))
@@ -38,6 +38,7 @@
 (custom-put 'abbrev 'custom-loads '("abbrev"))
 (custom-put 'f90-indent 'custom-loads '("f90"))
 (custom-put 'strokes 'custom-loads '("strokes"))
+(custom-put 'lazy-shot 'custom-loads '("lazy-shot"))
 (custom-put 'archive-lzh 'custom-loads '("arc-mode"))
 (custom-put 'scribe 'custom-loads '("scribe"))
 (custom-put 'archive 'custom-loads '("arc-mode"))
--- a/lisp/modes/lazy-shot.el	Mon Aug 13 10:01:24 2007 +0200
+++ b/lisp/modes/lazy-shot.el	Mon Aug 13 10:02:21 2007 +0200
@@ -47,7 +47,15 @@
 (defvar lazy-shot-mode nil)
 
 
-(defvar lazy-shot-step-size (* 1 124)) ;; Please test diffent sizes
+(defgroup lazy-shot nil
+  "Lazy-shot customizations"
+  :group 'tools
+  :prefix "lazy-shot-")
+
+(defcustom lazy-shot-step-size 1024	; Please test diffent sizes
+  "Minimum size of each fontification shot."
+  :type 'integer
+  :group 'lazy-shot)
 
 ;;;###autoload
 (defun lazy-shot-mode (&optional arg)
@@ -104,15 +112,23 @@
                        'lazy-shot-shot-function))
        extent))
 
+(defun lazy-shot-next-line (pos &optional buffer)
+  "Return the next end-of-line from POS in BUFFER."
+  (save-excursion
+    (goto-char pos buffer)
+    (forward-line 1 buffer)
+    (point buffer)))
+
 (defun lazy-shot-install-extents (fontifying)
   ;;
   ;; Add hook if lazy-shot.el is deferring or is fontifying on scrolling.
-     (when fontifying
-     (let ((start  (point-min)))
-      (while (< start (point-max))
-         (lazy-shot-install-extent start
-           (min (point-max) (+ start lazy-shot-step-size)))
-         (setq start (+ start lazy-shot-step-size))))))
+  (when fontifying
+    (let ((max (point-max)))
+      (do* ((start (point-min) end)
+	    (end (min max (lazy-shot-next-line (+ start lazy-shot-step-size)))
+		 (min max (lazy-shot-next-line (+ start lazy-shot-step-size)))))
+	  ((>= start max))
+	(lazy-shot-install-extent start end)))))
 
 (defun lazy-shot-install ()
   (make-local-variable 'font-lock-fontified)
--- a/lisp/modes/lisp-mode.el	Mon Aug 13 10:01:24 2007 +0200
+++ b/lisp/modes/lisp-mode.el	Mon Aug 13 10:02:21 2007 +0200
@@ -749,6 +749,9 @@
 (put 'with-temp-buffer 'lisp-indent-function 0)
 (put 'with-output-to-string 'lisp-indent-function 0)
 (put 'with-output-to-temp-buffer 'lisp-indent-function 1)
+(put 'display-message 'lisp-indent-function 1)
+(put 'display-warning 'lisp-indent-function 1)
+(put 'global-set-key 'lisp-indent-function 1)
 
 (defun indent-sexp (&optional endpos)
   "Indent each line of the list starting just after point.
--- a/lisp/modes/perl-mode.el	Mon Aug 13 10:01:24 2007 +0200
+++ b/lisp/modes/perl-mode.el	Mon Aug 13 10:02:21 2007 +0200
@@ -238,7 +238,7 @@
   "Invoked on entry to perl-mode.")
 
 
-;;;###autoload
+;;; bluck. ;;;###autoload
 (defun perl-mode ()
   "Major mode for editing Perl code.
 Expression and list commands understand all Perl brackets.
--- a/lisp/mule/custom-load.el	Mon Aug 13 10:01:24 2007 +0200
+++ b/lisp/mule/custom-load.el	Mon Aug 13 10:02:21 2007 +0200
@@ -1,6 +1,6 @@
 ;;; custom-load.el --- automatically extracted custom dependencies
 
-;; Created by SL Baur on Sat Oct  4 18:11:38 1997
+;; Created by SL Baur on Thu Oct  9 20:52:17 1997
 
 ;;; Code:
 
--- a/lisp/mule/mule-cmds.el	Mon Aug 13 10:01:24 2007 +0200
+++ b/lisp/mule/mule-cmds.el	Mon Aug 13 10:02:21 2007 +0200
@@ -311,8 +311,11 @@
 		       ))
     (if (> (length input-method) 0)
 	input-method
-      (if inhibit-null
-	  (error "No valid input method is specified")))))
+      ;; If we have a default, use it, otherwise check inhibit-null
+      (if default
+	  default
+	(if inhibit-null
+	    (error "No valid input method is specified"))))))
 
 (defun activate-input-method (input-method)
   "Turn INPUT-METHOD on.
--- a/lisp/packages/bookmark.el	Mon Aug 13 10:01:24 2007 +0200
+++ b/lisp/packages/bookmark.el	Mon Aug 13 10:02:21 2007 +0200
@@ -208,7 +208,7 @@
 
 ;; Is it XEmacs?
 (defconst bookmark-xemacsp
-  (string-match "\\(Lucid\\|Xemacs\\)" emacs-version))
+  (string-match "\\(Lucid\\|XEmacs\\)" emacs-version))
 
 
 ;; Added  for lucid emacs  compatibility, db
--- a/lisp/packages/custom-load.el	Mon Aug 13 10:01:24 2007 +0200
+++ b/lisp/packages/custom-load.el	Mon Aug 13 10:02:21 2007 +0200
@@ -1,6 +1,6 @@
 ;;; custom-load.el --- automatically extracted custom dependencies
 
-;; Created by SL Baur on Sat Oct  4 18:11:45 1997
+;; Created by SL Baur on Thu Oct  9 20:52:22 1997
 
 ;;; Code:
 
--- a/lisp/packages/etags.el	Mon Aug 13 10:01:24 2007 +0200
+++ b/lisp/packages/etags.el	Mon Aug 13 10:02:21 2007 +0200
@@ -489,6 +489,8 @@
 			    ((string-match "\\.\\(el\\|cl\\|lisp\\)\\'"
 					   filename)
 			     'lisp-mode)
+			    ((string-match "\\.scm\\'" filename)
+			     'scheme-mode)
 			    (t nil)))
       (cond ((and (eq file-type 'c-mode)
 		  c-mode-syntax-table)
@@ -521,6 +523,10 @@
 		     (t
 		      (setq name (buffer-substring (match-beginning 1)
 						   (match-end 1))))))
+	      ((and (eq file-type 'scheme-mode)
+		    (looking-at "\\s-*(\\s-*def\\sw*\\s-*(?\\s-*\\(\\(\\sw\\|\\s_\\|:\\)+\\))?\\s-*\C-?"))
+	       (setq name (buffer-substring (match-beginning 1)
+					    (match-end 1))))
 	      ((looking-at tags-def-pattern)
 	       (setq name (buffer-substring (match-beginning 2)
 					    (match-end 2)))))
--- a/lisp/packages/info.el	Mon Aug 13 10:01:24 2007 +0200
+++ b/lisp/packages/info.el	Mon Aug 13 10:02:21 2007 +0200
@@ -370,17 +370,20 @@
   :type 'boolean
   :group 'info)
 
-(defcustom Info-default-directory-list nil
-  "*List of default directories to search for Info documentation
-files.  This value is used as the default for `Info-directory-list'.
-It is set in startup.el.  The first directory in this list must
-contain a `dir' file that will become the basis for the toplevel Info
-directory."
-  :type '(repeat directory)
-  :group 'info)
+(defvar Info-default-directory-list nil
+  "*List of directories to search for Info documents, and `dir' or `localdir' files.
+The value of `Info-default-directory-list' will be initialized to a
+reasonable default by the startup code, and usually doesn't need to be
+changed in your personal configuration, though you may do so if you like.
 
-(defcustom Info-additional-directory-list nil
-  "List of additional directories to search for Info documentation
+The first directory on this list must contain a `dir' file like the one
+supplied with XEmacs, which will be used as the (dir)Top node.
+
+For more information, see the documentation to the variable:
+`Info-directory-list'.")
+
+(defcustom Info-additional-search-directory-list nil
+  "*List of additional directories to search for Info documentation
 files.  These directories are not searched for merging the `dir'
 file. An example might be something like:
 \"/usr/local/lib/xemacs/packages/lisp/calc/\""
@@ -390,18 +393,20 @@
 (defvar Info-directory-list
   (let ((path (getenv "INFOPATH")))
     (if path
-	(let ((list nil)
- 	      idx)
-	  (while (> (length path) 0)
-	    (setq idx (or (string-match path-separator path) (length path))
-		  list (cons (substring path 0 idx) list)
-		  path (substring path (min (1+ idx)
-					    (length path)))))
-	  (nreverse list))
-      (reverse Info-default-directory-list)))
+	(split-string path path-separator)
+      Info-default-directory-list))
   "List of directories to search for Info documentation files.
 Default is to use the environment variable INFOPATH if it exists,
-else to use Info-default-directory-list.")
+else to use `Info-default-directory-list'.
+The first directory in this list, the \"dir\" file there will become
+the (dir)Top node of the Info documentation tree.")
+
+(defcustom Info-localdir-heading-regexp
+    "^Locally installed XEmacs Packages:?"
+  "The menu part of localdir files will be inserted below this topic
+heading."
+  :type 'regexp
+  :group 'info)
 
 ;; Is this right for NT?  .zip, with -c for to stdout, right?
 (defvar Info-suffix-list '( ("" . nil) 
@@ -448,6 +453,7 @@
 (defvar Info-index-first-alternative nil)
 
 (defcustom Info-annotations-path '("~/.xemacs/info.notes"
+                                   "~/.infonotes"
 				   "/usr/lib/info.notes")
   "*Names of files that contain annotations for different Info nodes.
 By convention, the first one should reside in your personal directory.
@@ -534,9 +540,9 @@
 		    (list default-directory)) ; then just try current directory.
 		   ((file-name-absolute-p fname)
 		    '(nil))		; No point in searching for an absolute file name
-		   (Info-additional-directory-list
+		   (Info-additional-search-directory-list
 		    (append Info-directory-list
-			    Info-additional-directory-list))
+			    Info-additional-search-directory-list))
 		   (t Info-directory-list))))
 	;; Search the directory list for file FNAME.
 	(while (and dirs (not found))
@@ -743,8 +749,8 @@
 				    (equal (cdr elt) curr)))
 			       Info-dir-file-attributes))))
       (insert Info-dir-contents)
-    (let ((dirs Info-directory-list)
-	  buffers buffer others nodes dirs-done)
+    (let ((dirs (reverse Info-directory-list))
+	  buffers lbuffers buffer others nodes dirs-done)
 
       (setq Info-dir-file-attributes nil)
 
@@ -777,24 +783,36 @@
 		    (save-excursion
 		      (or buffers
 			  (message "Composing main Info directory..."))
-		      (set-buffer (generate-new-buffer "info dir"))
-		      (when (string-match "localdir" file)
-			(insert "localdir\n"))
+		      (set-buffer (generate-new-buffer
+				   (if (string-match "localdir" file)
+				       "localdir"
+				     "info dir")))
 		      (insert-file-contents file)
-		      (setq buffers (cons (current-buffer) buffers)
-			    Info-dir-file-attributes
+		      (if (string-match "localdir" (buffer-name))
+			  (setq lbuffers (cons (current-buffer) lbuffers))
+			(setq buffers (cons (current-buffer) buffers)))
+		      (setq Info-dir-file-attributes
 			    (cons (cons file attrs)
 				  Info-dir-file-attributes))))))
 	  (or (cdr dirs) (setq Info-dir-contents-directory (car dirs)))
 	  (setq dirs (cdr dirs))))
       
+      ;; ensure that the localdir files are inserted last, and reverse
+      ;; the list of them so that when they get pushed in, they appear
+      ;; in the same order they got specified in the path, from top to
+      ;; bottom.
+      (nconc buffers (nreverse lbuffers))
+      
       (or buffers
 	  (error "Can't find the Info directory node"))
       ;; Distinguish the dir file that comes with Emacs from all the
       ;; others.  Yes, that is really what this is supposed to do.
       ;; If it doesn't work, fix it.
       (setq buffer (car buffers)
-	    others (cdr buffers))
+	    ;; reverse it since they are pushed down from the top. the
+	    ;; `Info-default-directory-list'/INFOPATH can be specified
+	    ;; in natural order this way.
+	    others (nreverse (cdr buffers)))
 
       ;; Insert the entire original dir file as a start; note that we've
       ;; already saved its default directory to use as the default
@@ -805,25 +823,22 @@
       (while others
 	(let ((other (car others))
 	      (info-buffer (current-buffer)))
-	  (if (with-current-buffer other
-		(goto-char (point-min))
-		(when (looking-at "localdir")
-		  (forward-line 1)
-		  (delete-region (point-min) (point))
-		  t))		
+	  (if (string-match "localdir" (buffer-name other))
 	      (save-excursion
 		(set-buffer info-buffer)
 		(goto-char (point-max))
 		(cond
-		 ((re-search-backward "^ *\\* *Locals *: *\n" nil t)
+		 ((re-search-backward "^ *\\* *Locals *: *$" nil t)
 		  (delete-region (match-beginning 0) (match-end 0)))
-		 ((re-search-backward "^[ \t]*Local" nil t)
+		 ;; look for a line like |Local XEmacs packages:
+		 ;; or mismatch on some text ...
+		 ((re-search-backward Info-localdir-heading-regexp nil t)
 		  ;; This is for people who underline topic headings with
 		  ;; equal signs or dashes.
 		  (when (save-excursion
 			  (forward-line 1)
 			  (beginning-of-line)
-			  (looking-at "^[ \t]*[-=]+"))
+			  (looking-at "^[ \t]*[-=*]+"))
 		    (forward-line 1))
 		  (forward-line 1)
 		  (beginning-of-line))
@@ -2285,7 +2300,7 @@
   "Keymap containing Info commands.")
 (if Info-mode-map
     nil
-  (setq Info-mode-map (make-keymap))
+  (setq Info-mode-map (make-sparse-keymap))
   (suppress-keymap Info-mode-map)
   (define-key Info-mode-map "." 'beginning-of-buffer)
   (define-key Info-mode-map " " 'Info-scroll-next)
@@ -2341,6 +2356,7 @@
   (define-key Info-mode-map 'delete 'Info-scroll-prev)
   (define-key Info-mode-map 'button2 'Info-follow-clicked-node)
   (define-key Info-mode-map 'button3 'Info-select-node-menu))
+
 
 ;; Info mode is suitable only for specially formatted data.
 (put 'info-mode 'mode-class 'special)
--- a/lisp/packages/iswitchb.el	Mon Aug 13 10:01:24 2007 +0200
+++ b/lisp/packages/iswitchb.el	Mon Aug 13 10:02:21 2007 +0200
@@ -6,7 +6,7 @@
 ;; Maintainer: Stephen Eglen <stephen@cns.ed.ac.uk>
 ;; Keywords: extensions
 ;; location: http://www.cogs.susx.ac.uk/users/stephene/emacs
-;; RCS: $Id: iswitchb.el,v 1.1 1997/09/27 16:57:40 steve Exp $
+;; RCS: $Id: iswitchb.el,v 1.2 1997/10/12 01:39:45 steve Exp $
 
 ;; This file is part of GNU Emacs.
 
@@ -1049,7 +1049,7 @@
 ;; function.  To solve this, we use another entry hook for emacs to
 ;; show the default the first time we enter the minibuffer.
 
-(defun iswitchb-init-Xemacs-trick ()
+(defun iswitchb-init-XEmacs-trick ()
   "Display default buffer when first entering minibuffer.
 This is a hack for XEmacs, and should really be handled by `iswitchb-exhibit'."
   (if (iswitchb-entryfn-p)
@@ -1061,7 +1061,7 @@
 ;; add this hook for XEmacs only.
 (if iswitchb-xemacs
     (add-hook 'iswitchb-minibuffer-setup-hook 
-	      'iswitchb-init-Xemacs-trick))
+	      'iswitchb-init-XEmacs-trick))
 
 
 ;;; XEmacs / backspace key
--- a/lisp/pcl-cvs/ChangeLog	Mon Aug 13 10:01:24 2007 +0200
+++ b/lisp/pcl-cvs/ChangeLog	Mon Aug 13 10:02:21 2007 +0200
@@ -1,3 +1,7 @@
+1997-10-09  SL Baur  <steve@altair.xemacs.org>
+
+	* pcl-cvs.el (cvs-changelog-ours-p): Grok new ChangeLog format.
+
 1997-08-28  SL Baur  <steve@altair.xemacs.org>
 
 	* pcl-cvs.el (cvs-changelog-ours-p): correct for drift in
--- a/lisp/pcl-cvs/pcl-cvs.el	Mon Aug 13 10:01:24 2007 +0200
+++ b/lisp/pcl-cvs/pcl-cvs.el	Mon Aug 13 10:02:21 2007 +0200
@@ -1,10 +1,10 @@
 ;;;
 ;;;#ident "@(#)OrigId: pcl-cvs.el,v 1.93 1993/05/31 22:44:00 ceder Exp "
 ;;;
-;;;#ident "@(#)cvs/contrib/pcl-cvs:$Name: r20-3b19 $:$Id: pcl-cvs.el,v 1.5 1997/09/03 02:55:39 steve Exp $"
+;;;#ident "@(#)cvs/contrib/pcl-cvs:$Name: r20-3b28 $:$Id: pcl-cvs.el,v 1.6 1997/10/12 01:39:46 steve Exp $"
 ;;;
 ;;; pcl-cvs.el -- A Front-end to CVS 1.3 or later.
-;;; Release 1.05-CVS-$Name: r20-3b19 $.
+;;; Release 1.05-CVS-$Name: r20-3b28 $.
 ;;; Copyright (C) 1991, 1992, 1993  Per Cederqvist
 
 ;;; This program is free software; you can redistribute it and/or modify
@@ -126,7 +126,7 @@
 ;;;	     END OF THINGS TO CHECK WHEN INSTALLING
 ;;; --------------------------------------------------------
 
-(defconst pcl-cvs-version "1.05-CVS-$Name: r20-3b19 $"
+(defconst pcl-cvs-version "1.05-CVS-$Name: r20-3b28 $"
   "A string denoting the current release version of pcl-cvs.")
 
 ;; You are NOT allowed to disable this message by default.  However, you
@@ -139,8 +139,8 @@
 
 (defconst cvs-startup-message
   (if cvs-inhibit-copyright-message
-      "PCL-CVS release 1.05-CVS-$Name: r20-3b19 $"
-    "PCL-CVS release 1.05 from CVS release $Name: r20-3b19 $.
+      "PCL-CVS release 1.05-CVS-$Name: r20-3b28 $"
+    "PCL-CVS release 1.05 from CVS release $Name: r20-3b28 $.
 Copyright (C) 1992, 1993 Per Cederqvist
 Pcl-cvs comes with absolutely no warranty; for details consult the manual.
 This is free software, and you are welcome to redistribute it under certain
@@ -727,7 +727,7 @@
 \\[cvs-mode-undo-local-changes]   Revert the last checked in version - discard your changes to the file.
 
 Entry to this mode runs cvs-mode-hook.
-This description is updated for release 1.05-CVS-$Name: r20-3b19 $ of pcl-cvs.
+This description is updated for release 1.05-CVS-$Name: r20-3b28 $ of pcl-cvs.
 
 All bindings:
 \\{cvs-mode-map}"
@@ -1016,7 +1016,7 @@
     (insert "Pcl-cvs Version: "
 	    "@(#)OrigId: pcl-cvs.el,v 1.93 1993/05/31 22:44:00 ceder Exp\n")
     (insert "CVS Version: "
-	    "@(#)lisp/pcl-cvs:$Name: r20-3b19 $:$Id: pcl-cvs.el,v 1.5 1997/09/03 02:55:39 steve Exp $\n\n")
+	    "@(#)lisp/pcl-cvs:$Name: r20-3b28 $:$Id: pcl-cvs.el,v 1.6 1997/10/12 01:39:46 steve Exp $\n\n")
     (insert (format "--- Contents of stdout buffer (%d chars) ---\n"
 		    (length stdout)))
     (insert stdout)
@@ -3305,22 +3305,40 @@
   "See if ChangeLog entry at point is for the current user, today.
 Return non-nil iff it is."
   ;; Code adapted from add-change-log-entry.
-  (looking-at (concat (regexp-quote (substring (current-time-string)
-                                               0 10))
-                      ".* "
-                      (regexp-quote (substring (current-time-string) -4))
-                      "[ \t]+"
-		      (regexp-quote (if (and (boundp 'add-log-full-name)
-                                             add-log-full-name)
-                                        add-log-full-name
-                                      (or (and (boundp 'user-full-name)
-					       user-full-name)
-					  (user-full-name))))
-                      "  <"
-		      (regexp-quote (if (and (boundp 'add-log-mailing-address)
+  (or (looking-at (concat (regexp-quote (substring (current-time-string)
+						   0 10))
+			  ".* "
+			  (regexp-quote (substring (current-time-string) -4))
+			  "[ \t]+"
+			  (regexp-quote (if (and (boundp 'add-log-full-name)
+						 add-log-full-name)
+					    add-log-full-name
+					  (or (and (boundp 'user-full-name)
+						   user-full-name)
+					      (user-full-name))))
+			  "  <"
+			  (regexp-quote (if (and
+					     (boundp 'add-log-mailing-address)
 					     add-log-mailing-address)
-					add-log-mailing-address
-				      (user-mail-address))))))
+					    add-log-mailing-address
+					  (user-mail-address)))))
+      ;; New ChangeLog format (as of XEmacs 20.3)
+      (looking-at (concat (funcall add-log-time-format)
+			  "[  \t]+"
+			  (regexp-quote (if (and (boundp 'add-log-full-name)
+						 add-log-full-name)
+					    add-log-full-name
+					  (or (and (boundp 'user-full-name)
+						   user-full-name)
+					      (user-full-name))))
+			  " *<"
+			  (regexp-quote (if (and
+					     (boundp 'add-log-mailing-address)
+					     add-log-mailing-address)
+					    add-log-mailing-address
+					  (user-mail-address)))))))
+
+			  
 
 (defun cvs-relative-path (base child)
   "Return a directory path relative to BASE for CHILD.
--- a/lisp/prim/about.el	Mon Aug 13 10:01:24 2007 +0200
+++ b/lisp/prim/about.el	Mon Aug 13 10:02:21 2007 +0200
@@ -72,7 +72,10 @@
     (mly      "Richard Mlynarik"  "mly@adoc.xerox.com")
     (morioka  "MORIOKA Tomohiko"  "morioka@jaist.ac.jp")
     (mrb      "Martin Buchholz"   "mrb@sun.eng.com")
+    (pez      "Peter Pezaris"	  "pez@dwwc.com")
     (piper    "Andy Piper"        "andy@parallax.co.uk")
+    (rickc    "Rick Campbell"     "rickc@lehman.com")
+    (rossini  "Anthony Rossini"	  "rossini@stat.sc.edu")
     (shelton  "Vin Shelton"	  "acs@acm.org")
     (sperber  "Michael Sperber"   "sperber@informatik.uni-tuebingen.de")
     (slb      "SL Baur"           "steve@xemacs.org")
@@ -93,10 +96,11 @@
     (cc-mode   . "http://www.python.org/ftp/emacs/")
     (dkindred  . "http://www.cs.cmu.edu/People/dkindred/me.html")
     (dmoore    . "http://oj.egbt.org/dmoore/")
-    (jwz       . "http://www.netscape.com/people/jwz/")
+    (jwz       . "http://people.netscape.com/jwz/")
     (kazz      . "http://www.imasy.or.jp/~kazz/")
     (kyle      . "http://www.wonderworks.com/kyle/")
     (larsi     . "http://www.ifi.uio.no/~larsi/")
+    (pez       . "http://www.dwwc.com/")
     (shelton   . "http://www.upa.org/")
     (wget      . "ftp://gnjilux.cc.fer.hr/pub/unix/util/wget/")
     (xemacs    . "http://www.xemacs.org/"))
@@ -823,6 +827,13 @@
 hair various colours (see ")
      (about-url-link 'ajc "Visit Andrew's home page")
      (widget-insert ".\n"))
+    (rickc
+     (widget-insert "\
+The hacker formerly known as Rick Busdiecker develops and maintains
+libraries for financial applications at Lehman Brothers during
+daylight hours.  In the evenings he maintains three children, and
+when he ought to be sleeping he co-maintains ILISP, builds XEmacs
+betas, and tinkers with various personal hacking projects..\n"))
     (kazz
      (widget-insert "\
 Kazz is the XEmacs lead on BSD (especially FreeBSD).
@@ -850,6 +861,14 @@
 See ")
      (about-url-link 'dkindred "Visit Darrell's WWW page")
      (widget-insert ".\n"))
+    (pez
+     (widget-insert "\
+Author of SQL Mode, edit-toolbar, mailtool-mode, and various other
+small packages with varying degrees of usefulness.  Peter has
+recently left Wall Street to start Daedalus World Wide Corporation,
+a software development firm.  See ")
+     (about-url-link 'pez "Daedalus on the web")
+     (widget-insert ".\n"))
     (dv
      (widget-insert "\
 I'm currently working (Ph.D.) on the cognitive aspects of
@@ -860,6 +879,17 @@
 Otherwise, I'm, say, 35.82% professional Jazz guitar player,
 which means that's not the way I earn my crust, but things may very
 well reverse in the future ...\n"))
+    (rossini
+     (widget-insert "\
+Author of the first XEmacs FAQ, as well as minor priest in the
+movement to get every statistician in the world to use XEmacs for
+statistical programming and data analysis.  Current development lead
+for ESS (Emacs Speaks Statistics), a mode and inferior mode for
+statistical programming and data analysis for SAS, S, S-PLUS, R,
+XLispStat; configurable for nearly any other statistical
+language/package one might want.  In spare time, acts as a
+Ph.D. (bio)statistician for money and amusement.  Current position:
+Assistant Professor of Statistics at the University of South Carolina.\n"))
 
 ))
 
@@ -1030,6 +1060,21 @@
 Otherwise, I'm, say, 35.82% professional Jazz guitar player,
 which means that's not the way I earn my crust, but things may very
 well reverse in the future ...\n")
+    (about-show-linked-info 'pez "\
+Author of SQL Mode, edit-toolbar, mailtool-mode, and various other
+small packages with varying degrees of usefulness.\n")
+    (about-show-linked-info 'rickc "\
+The hacker formerly known as Rick Busdiecker, author of ILISP.\n")
+    (about-show-linked-info 'rossini "\
+Author of the first XEmacs FAQ, as well as minor priest in the
+movement to get every statistician in the world to use XEmacs for
+statistical programming and data analysis.  Current development lead
+for ESS (Emacs Speaks Statistics), a mode and inferior mode for
+statistical programming and data analysis for SAS, S, S-PLUS, R,
+XLispStat; configurable for nearly any other statistical
+language/package one might want.  In spare time, acts as a
+Ph.D. (bio)statistician for money and amusement.  Current position:
+Assistant Professor of Statistics at the University of South Carolina.")
     (flet ((print-short (name addr &optional shortinfo)
 	     (concat (about-with-face name 'italic)
 		     (about-tabs name)
@@ -1100,8 +1145,6 @@
        (print-short "Rick Braumoeller" "rickb@mti.sgi.com")
        (print-short "Matthew J. Brown" "mjb@doc.ic.ac.uk")
        (print-short "Alastair Burt" "burt@dfki.uni-kl.de")
-       (print-short "Rick Busdiecker" "rfb@lehman.com")
-       (print-short "Rick Campbell" "rickc@lehman.com")
        (print-short "Richard Caley" "rjc@cstr.edinburgh.ac.uk")
        (print-short "Stephen Carney" "carney@gvc.dec.com")
        (print-short "Lorenzo M. Catucci" "lorenzo@argon.roma2.infn.it")
@@ -1206,6 +1249,7 @@
        (print-short "Simon Marshall" "simon@gnu.ai.mit.edu")
        (print-short "Dave Mason" "dmason@plg.uwaterloo.ca")
        (print-short "Jaye Mathisen" "mrcpu@cdsnet.net")
+       (print-short "Jason McLaren" "mclaren@math.mcgill.ca")
        (print-short "Michael McNamara" "mac@silicon-sorcery.com")
        (print-short "Michael Meissner" "meissner@osf.org")
        (print-short "David M. Meyer" "meyer@ns.uoregon.edu")
@@ -1233,7 +1277,6 @@
        (print-short "Jens-U H Petersen" "petersen@kurims.kyoto-u.ac.jp")
        (print-short "Joel Peterson" "tarzan@aosi.com")
        (print-short "Thomas A. Peterson" "tap@src.honeywell.com")
-       (print-short "Peter Pezaris" "pez@dwwc.com")
        (print-short "Tibor Polgar" "tlp00@eng.amdahl.com")
        (print-short "Frederic Poncin" "fp@info.ucl.ac.be")
        (print-short "E. Rehmi Post" "rehmi@asylum.sf.ca.us")
@@ -1246,7 +1289,6 @@
        (print-short "Art Rijos" "art.rijos@SNET.com")
        (print-short "Russell Ritchie" "ritchier@britannia-life.co.uk")
        (print-short "Roland" "rol@darmstadt.gmd.de")
-       (print-short "Anthony Rossini" "rossini@math.sc.edu")
        (print-short "Mike Russell" "mjruss@rchland.vnet.ibm.com")
        (print-short "Jan Sandquist" "etxquist@iqa.ericsson.se")
        (print-short "Marty Sasaki" "sasaki@spdcc.com")
--- a/lisp/prim/auto-autoloads.el	Mon Aug 13 10:01:24 2007 +0200
+++ b/lisp/prim/auto-autoloads.el	Mon Aug 13 10:02:21 2007 +0200
@@ -120,6 +120,56 @@
 
 ;;;***
 
+;;;### (autoloads (find-function-at-point find-function-on-key find-function-other-frame find-function-other-window find-function) "find-func" "prim/find-func.el")
+
+(autoload 'find-function "find-func" "\
+Find the definition of the function near point in the current window.
+
+Finds the Emacs Lisp library containing the definition of the function
+near point (selected by `find-function-function') in a buffer and
+places point before the definition.  Point is saved in the buffer if
+it is one of the current buffers.
+
+The library where FUNCTION is defined is searched for in
+`find-function-source-path', if non `nil', otherwise in `load-path'." t nil)
+
+(autoload 'find-function-other-window "find-func" "\
+Find the definition of the function near point in the other window.
+
+Finds the Emacs Lisp library containing the definition of the function
+near point (selected by `find-function-function') in a buffer and
+places point before the definition.  Point is saved in the buffer if
+it is one of the current buffers.
+
+The library where FUNCTION is defined is searched for in
+`find-function-source-path', if non `nil', otherwise in `load-path'." t nil)
+
+(autoload 'find-function-other-frame "find-func" "\
+Find the definition of the function near point in the another frame.
+
+Finds the Emacs Lisp library containing the definition of the function
+near point (selected by `find-function-function') in a buffer and
+places point before the definition.  Point is saved in the buffer if
+it is one of the current buffers.
+
+The library where FUNCTION is defined is searched for in
+`find-function-source-path', if non `nil', otherwise in `load-path'." t nil)
+
+(autoload 'find-function-on-key "find-func" "\
+Find the function that KEY invokes.  KEY is a string.
+Point is saved if FUNCTION is in the current buffer." t nil)
+
+(autoload 'find-function-at-point "find-func" "\
+Find directly the function at point in the other window." t nil)
+
+(define-key ctl-x-4-map "F" 'find-function-other-window)
+
+(define-key ctl-x-5-map "F" 'find-function-other-frame)
+
+(define-key ctl-x-map "K" 'find-function-on-key)
+
+;;;***
+
 ;;;### (autoloads nil "itimer-autosave" "prim/itimer-autosave.el")
 
 ;;;***
@@ -236,9 +286,23 @@
 
 ;;;***
 
-;;;### (autoloads (profile-key-sequence profile pretty-print-profiling-info) "profile" "prim/profile.el")
+;;;### (autoloads (package-admin-add-binary-package package-admin-add-single-file-package) "package-admin" "prim/package-admin.el")
+
+(autoload 'package-admin-add-single-file-package "package-admin" "\
+Install a single file Lisp package into XEmacs package hierarchy.
+`file' should be the full path to the lisp file to install.
+`destdir' should be a simple directory name.
+The optional `pkg-dir' can be used to override the default package hiearchy
+\(last package-path)." t nil)
 
-(autoload 'pretty-print-profiling-info "profile" "\
+(autoload 'package-admin-add-binary-package "package-admin" "\
+Install a pre-bytecompiled XEmacs package into package hierarchy." t nil)
+
+;;;***
+
+;;;### (autoloads (profile-key-sequence profile profiling-results) "profile" "prim/profile.el")
+
+(autoload 'profiling-results "profile" "\
 Print profiling info INFO to STREAM in a pretty format.
 If INFO is omitted, the current profiling info is retrieved using
  `get-profiling-info'.
@@ -252,7 +316,7 @@
 PROFILE was called, it will be turned off after FORMS are evaluated.
 Otherwise, profiling will be left running.
 
-Returns the profiling info, printable by `pretty-print-profiling-info'." nil 'macro)
+Returns the profiling info, printable by `profiling-results'." nil 'macro)
 
 (autoload 'profile-key-sequence "profile" "\
 Dispatch the key sequence KEYS and profile the execution.
--- a/lisp/prim/custom-load.el	Mon Aug 13 10:01:24 2007 +0200
+++ b/lisp/prim/custom-load.el	Mon Aug 13 10:02:21 2007 +0200
@@ -1,11 +1,11 @@
 ;;; custom-load.el --- automatically extracted custom dependencies
 
-;; Created by SL Baur on Sat Oct  4 18:11:48 1997
+;; Created by SL Baur on Thu Oct  9 20:52:25 1997
 
 ;;; Code:
 
 (custom-put 'mouse 'custom-loads '("mouse"))
-(custom-put 'minibuffer 'custom-loads '("minibuf" "simple"))
+(custom-put 'minibuffer 'custom-loads '("simple" "minibuf"))
 (custom-put 'log-message 'custom-loads '("simple"))
 (custom-put 'environment 'custom-loads '("frame" "minibuf" "modeline" "sound"))
 (custom-put 'sound 'custom-loads '("sound"))
@@ -13,13 +13,14 @@
 (custom-put 'mail 'custom-loads '("simple"))
 (custom-put 'editing-basics 'custom-loads '("cmdloop" "simple" "files" "lisp"))
 (custom-put 'help-appearance 'custom-loads '("help"))
-(custom-put 'lisp 'custom-loads '("lisp"))
+(custom-put 'lisp 'custom-loads '("lisp" "find-func"))
 (custom-put 'help 'custom-loads '("help"))
 (custom-put 'keyboard 'custom-loads '("cmdloop"))
 (custom-put 'warnings 'custom-loads '("simple"))
 (custom-put 'backup 'custom-loads '("files"))
 (custom-put 'frames 'custom-loads '("frame" "window-xemacs" "gui"))
 (custom-put 'abbrev 'custom-loads '("files"))
+(custom-put 'find-function 'custom-loads '("find-func"))
 (custom-put 'dired 'custom-loads '("files"))
 (custom-put 'killing 'custom-loads '("simple"))
 (custom-put 'paren-blinking 'custom-loads '("simple"))
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lisp/prim/find-func.el	Mon Aug 13 10:02:21 2007 +0200
@@ -0,0 +1,254 @@
+;;; find-func.el --- find the definition of the Emacs Lisp function near point
+
+;; Copyright (C) 1997 Free Software Foundation, Inc.
+
+;; Author: Jens Petersen <petersen@kurims.kyoto-u.ac.jp>
+;; Maintainer: petersen@kurims.kyoto-u.ac.jp
+;; Keywords: emacs-lisp, functions
+;; Created: 97/07/25
+;; URL: <http://www.kurims.kyoto-u.ac.jp/~petersen/emacs-lisp/>
+
+;; $Id: find-func.el,v 1.1 1997/10/10 01:39:52 steve Exp $
+
+;; 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, 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+;;; Commentary:
+;;
+;; The funniest thing about this is that I can't imagine why a package
+;; so obviously useful as this hasn't been written before!!
+;;
+;; Put this file in your `load-path', byte-compile it and add the
+;; following code in your init file:
+;;
+;; ;;; find-func
+;; (load "find-func")
+;; (global-set-key [(control ?c) ?f] 'find-function)
+;; (global-set-key [(control ?c) ?4 ?f] 'find-function-other-window)
+;; (global-set-key [(control ?c) ?5 ?f] 'find-function-other-frame)
+;; (global-set-key [(control ?c) ?k] 'find-function-on-key)
+;;
+;; and away you go!  It does pretty much what you would expect,
+;; putting the cursor at the definition of the function at point.
+;;
+;; In XEmacs the source file of dumped functions is recorded (and can
+;; be accessed with the function `compiled-function-annotation', which
+;; doesn't exist in Emacs), so in XEmacs non-primitive dumped
+;; functions can also be found.  Unfortunately this is not possible in
+;; Emacs.  It would be nice if the location of primitive functions in
+;; the C code was also recorded!
+
+;; The code is adapted from `describe-function', `describe-key'
+;; ("help.el") and `fff-find-loaded-emacs-lisp-function' (Noah Friedman's
+;; "fff.el").
+
+;;; To do:
+;;
+;; o improve handling of advice'd functions? (at the moment it goes to
+;; the advice, not the actual definition)
+;;
+;; o `find-function-other-frame' is not quite right when the function
+;; is in the current buffer.
+;;
+;;;; Code:
+
+(defgroup find-function nil
+  "Find the definition of the Emacs Lisp function near point."
+  :group 'lisp)
+
+;;; User variables:
+
+(defcustom find-function-source-path nil
+  "The default list of directories where find-function searches.
+
+If this variable is `nil' then find-function searches `load-path' by
+default."
+  :type '(choice (const :tag "Use `load-path'" nil)
+		 (repeat :tag "Directories"
+			 :menu-tag "List"
+			 :value ("")
+			 directory))
+  :group 'find-function)
+
+
+;;; Functions:
+
+(defun find-function-noselect (function)
+  "Returns a pair `(buffer . point)' pointing to the definition of FUNCTION.
+
+Finds the Emacs Lisp library containing the definition of FUNCTION
+in a buffer and the point of the definition.  The buffer is
+not selected.
+
+The library where FUNCTION is defined is searched for in
+`find-function-source-path', if non `nil', otherwise in `load-path'."
+  (and (subrp (symbol-function function))
+       (error "%s is a primitive function" function))
+  (if (not function)
+      (error "You didn't specify a function"))
+  (let ((def (symbol-function function))
+	library aliases)
+    (while (symbolp def)
+      (or (eq def function)
+	  (if aliases
+	      (setq aliases (concat aliases
+				    (format ", which is an alias for %s"
+					    (symbol-name def))))
+	    (setq aliases (format "an alias for %s" (symbol-name def)))))
+      (setq function (symbol-function function)
+	    def (symbol-function function)))
+    (if aliases
+	(message aliases))
+    (setq library
+	  (cond ((eq (car-safe def) 'autoload)
+		 (nth 1 def))
+		((describe-function-find-file function))
+		((compiled-function-p def)
+		 (substring (compiled-function-annotation def) 0 -4))))
+    (if (null library)
+	(error (format "Don't know where `%s' is defined" function)))
+    (if (string-match "\\.el\\(c\\)\\'" library)
+	(setq library (substring library 0 (match-beginning 1))))
+    (let* ((path find-function-source-path)
+	   (filename (if (file-exists-p library)
+			 library
+		       (if (string-match "\\(\\.el\\)\\'" library)
+			   (setq library (substring library 0
+						    (match-beginning
+						     1))))
+		       (or (locate-library (concat library ".el") t path)
+			   (locate-library library t path)))))
+      (if (not filename)
+	  (error "The library \"%s\" is not in the path." library))
+      (with-current-buffer (find-file-noselect filename)
+	(save-match-data
+	  (let (;; avoid defconst, defgroup, defvar (any others?)
+		(regexp
+		 (format "^\\s-*(def[^cgv\W]\\w+\\*?\\s-+%s\\s-" function))
+		(syntable (syntax-table)))
+	    (set-syntax-table emacs-lisp-mode-syntax-table)
+	    (goto-char (point-min))
+	    (if (prog1
+		    (re-search-forward regexp nil t)
+		  (set-syntax-table syntable))
+		(progn
+		  (beginning-of-line)
+		  (cons (current-buffer) (point)))
+	      (error "Cannot find definition of `%s'" function))))))))
+
+(defun find-function-read-function ()
+  "Read and return a function, defaulting to the one near point.
+
+The function named by `find-function-function' is used to select the
+default function."
+  (let ((fn (funcall find-function-function))
+	(enable-recursive-minibuffers t)
+	val)
+    (setq val (completing-read
+	       (if fn
+		   (format "Find function (default %s): " fn)
+		 "Find function: ")
+	       obarray 'fboundp t nil 'function-history))
+    (list (if (equal val "")
+	      fn (intern val)))))
+
+(defun find-function-do-it (function switch-fn)
+  "Find Emacs Lisp FUNCTION in a buffer and display it with SWITCH-FN.
+Point is saved in the buffer if it is one of the current buffers."
+  (let ((orig-point (point))
+	(orig-buffers (buffer-list))
+	(buffer-point (find-function-noselect function)))
+    (when buffer-point
+      (funcall switch-fn (car buffer-point))
+      (when (memq (car buffer-point) orig-buffers)
+	(push-mark orig-point))
+      (goto-char (cdr buffer-point))
+      (recenter 0))))
+
+;;;###autoload
+(defun find-function (function)
+  "Find the definition of the function near point in the current window.
+
+Finds the Emacs Lisp library containing the definition of the function
+near point (selected by `find-function-function') in a buffer and
+places point before the definition.  Point is saved in the buffer if
+it is one of the current buffers.
+
+The library where FUNCTION is defined is searched for in
+`find-function-source-path', if non `nil', otherwise in `load-path'."
+  (interactive (find-function-read-function))
+  (find-function-do-it function 'switch-to-buffer))
+
+;;;###autoload
+(defun find-function-other-window (function)
+  "Find the definition of the function near point in the other window.
+
+Finds the Emacs Lisp library containing the definition of the function
+near point (selected by `find-function-function') in a buffer and
+places point before the definition.  Point is saved in the buffer if
+it is one of the current buffers.
+
+The library where FUNCTION is defined is searched for in
+`find-function-source-path', if non `nil', otherwise in `load-path'."
+  (interactive (find-function-read-function))
+  (find-function-do-it function 'switch-to-buffer-other-window))
+
+;;;###autoload
+(defun find-function-other-frame (function)
+  "Find the definition of the function near point in the another frame.
+
+Finds the Emacs Lisp library containing the definition of the function
+near point (selected by `find-function-function') in a buffer and
+places point before the definition.  Point is saved in the buffer if
+it is one of the current buffers.
+
+The library where FUNCTION is defined is searched for in
+`find-function-source-path', if non `nil', otherwise in `load-path'."
+  (interactive (find-function-read-function))
+  (find-function-do-it function 'switch-to-buffer-other-frame))
+
+;;;###autoload
+(defun find-function-on-key (key)
+  "Find the function that KEY invokes.  KEY is a string.
+Point is saved if FUNCTION is in the current buffer."
+  (interactive "kFind function on key: ")
+  (let ((defn (key-or-menu-binding key)))
+    (if (or (null defn) (integerp defn))
+        (message "%s is undefined" (key-description key))
+      (if (and (consp defn) (not (eq 'lambda (car-safe defn))))
+	  (message "runs %s" (prin1-to-string defn))
+	(find-function-other-window defn)))))
+
+;;;###autoload
+(defun find-function-at-point ()
+  "Find directly the function at point in the other window."
+  (interactive)
+  (let ((symb (function-at-point)))
+    (when symb
+      (find-function-other-window symb))))
+
+;; (define-key ctl-x-map "F" 'find-function) ; conflicts with `facemenu-keymap'
+
+;;;###autoload
+(define-key ctl-x-4-map "F" 'find-function-other-window)
+;;;###autoload
+(define-key ctl-x-5-map "F" 'find-function-other-frame)
+;;;###autoload
+(define-key ctl-x-map "K" 'find-function-on-key)
+
+(provide 'find-func)
+;;; find-func.el ends here
--- a/lisp/prim/format.el	Mon Aug 13 10:01:24 2007 +0200
+++ b/lisp/prim/format.el	Mon Aug 13 10:02:21 2007 +0200
@@ -110,12 +110,11 @@
 
 ;;; Basic Functions (called from Lisp)
 
-(defun format-annotate-function (format from to orig-buf)
+(defun format-annotate-function (format from to)
   "Returns annotations for writing region as FORMAT.
 FORMAT is a symbol naming one of the formats defined in `format-alist',
 it must be a single symbol, not a list like `buffer-file-format'.
 FROM and TO delimit the region to be operated on in the current buffer.
-ORIG-BUF is the original buffer that the data came from.
 This function works like a function on `write-region-annotate-functions':
 it either returns a list of annotations, or returns with a different buffer
 current, which contains the modified text to write.
@@ -133,10 +132,10 @@
 	      (copy-to-buffer copy-buf from to)
 	      (set-buffer copy-buf)
 	      (format-insert-annotations write-region-annotations-so-far from)
-	      (funcall to-fn (point-min) (point-max) orig-buf)
+	      (funcall to-fn (point-min) (point-max))
 	      nil)
 	  ;; Otherwise just call function, it will return annotations.
-	  (funcall to-fn from to orig-buf)))))
+	  (funcall to-fn from to)))))
 
 (defun format-decode (format length &optional visit-flag)
   ;; This function is called by insert-file-contents whenever a file is read.
--- a/lisp/prim/help.el	Mon Aug 13 10:01:24 2007 +0200
+++ b/lisp/prim/help.el	Mon Aug 13 10:02:21 2007 +0200
@@ -261,8 +261,7 @@
       (insert-file-contents (expand-file-name tutorial data-directory))
       (goto-char (point-min))
       (search-forward "\n<<")
-      (beginning-of-line)
-      (delete-region (point) (progn (end-of-line) (point)))
+      (delete-region (point-at-bol) (point-at-eol))
       (let ((n (- (window-height (selected-window))
 		  (count-lines (point-min) (point))
 		  6)))
@@ -276,12 +275,14 @@
       (goto-char (point-min))
       (set-buffer-modified-p nil))))
 
-;; used by describe-key and describe-key-briefly
+;; used by describe-key, describe-key-briefly, insert-key-binding, etc.
 
 (defun key-or-menu-binding (key &optional menu-flag)
-  ;; KEY          is any value returned by next-command-event
-  ;; MENU-FLAG    is a symbol that should be set to T if KEY is a menu event,
-  ;;		  or NIL otherwise
+  "Return the command invoked by KEY.
+Like `key-binding', but handles menu events and toolbar presses correctly.
+KEY is any value returned by `next-command-event'.
+MENU-FLAG is a symbol that should be set to T if KEY is a menu event,
+ or NIL otherwise"
   (let (defn)
     (and menu-flag (set menu-flag nil))
     ;; If the key typed was really a menu selection, grab the form out
@@ -295,12 +296,12 @@
 			 (list (event-function event) (event-object event))
 		       (cdr event)))
 	  (and menu-flag (set menu-flag t))
-	  (if (eq (car defn) 'eval)
-	      (setq defn (car (cdr defn))))
-	  (if (eq (car-safe defn) 'call-interactively)
-	      (setq defn (car (cdr defn))))
-	  (if (and (consp defn) (null (cdr defn)))
-	      (setq defn (car defn))))
+	  (when (eq (car defn) 'eval)
+	    (setq defn (car (cdr defn))))
+	  (when (eq (car-safe defn) 'call-interactively)
+	    (setq defn (car (cdr defn))))
+	  (when (and (consp defn) (null (cdr defn)))
+	    (setq defn (car defn))))
       ;; else
       (setq defn (key-binding key)))
     ;; kludge: if a toolbar button was pressed on, try to find the
@@ -405,26 +406,24 @@
                  (set-buffer standard-output)
                  (help-mode))))
       (let ((helpwin (get-buffer-window "*Help*")))
-        (if helpwin
-            (progn
-              (save-excursion
-                (set-buffer (window-buffer helpwin))
-		;;If the *Help* buffer is already displayed on this
-		;; frame, don't override the previous configuration
-		(if help-not-visible
-		    (set-frame-property (selected-frame)
-					'help-window-config winconfig)))
-              (if help-selects-help-window
-                  (select-window helpwin))
-              (cond ((eq helpwin (selected-window))
-                     (display-message 'command
-                      (substitute-command-keys "Type \\[help-mode-quit] to remove help window, \\[scroll-up] to scroll the help.")))
-                    (was-one-window
-                     (display-message 'command
-                      (substitute-command-keys "Type \\[delete-other-windows] to remove help window, \\[scroll-other-window] to scroll the help.")))
-                    (t
-                     (display-message 'command
-                      (substitute-command-keys "Type \\[switch-to-buffer-other-window] to restore the other window, \\[scroll-other-window] to scroll the help."))))))))))
+        (when helpwin
+	  (with-current-buffer (window-buffer helpwin)
+	    ;; If the *Help* buffer is already displayed on this
+	    ;; frame, don't override the previous configuration
+	    (when help-not-visible
+	      (set-frame-property (selected-frame)
+				  'help-window-config winconfig)))
+	  (when help-selects-help-window
+	    (select-window helpwin))
+	  (cond ((eq helpwin (selected-window))
+		 (display-message 'command
+		   (substitute-command-keys "Type \\[help-mode-quit] to remove help window, \\[scroll-up] to scroll the help.")))
+		(was-one-window
+		 (display-message 'command
+		   (substitute-command-keys "Type \\[delete-other-windows] to remove help window, \\[scroll-other-window] to scroll the help.")))
+		(t
+		 (display-message 'command
+		   (substitute-command-keys "Type \\[switch-to-buffer-other-window] to restore the other window, \\[scroll-other-window] to scroll the help.")))))))))
 
 (defun describe-key (key)
   "Display documentation of the function invoked by KEY.
@@ -740,12 +739,12 @@
 	  (while (or (equal event help-key)
 		     (eq char ??)
 		     (eq 'help-command (key-binding event))
-		     (eq char ? )
+		     (eq char ?\ )
 		     (eq 'scroll-up (key-binding event))
 		     (eq char ?\177)
 		     (and (not (eq char ?b))
 			  (eq 'scroll-down (key-binding event))))
-	    (if (or (eq char ? )
+	    (if (or (eq char ?\ )
 		    (eq 'scroll-up (key-binding event)))
 		(scroll-up))
 	    (if (or (eq char ?\177)
@@ -767,10 +766,10 @@
  	  (call-interactively defn)
  	(ding)))))
 
-;; Return a function which is called by the list containing point.
-;; If that gives no function, return a function whose name is around point.
-;; If that doesn't give a function, return nil.
 (defun function-called-at-point ()
+  "Return the function which is called by the list containing point.
+If that gives no function, return the function whose name is around point.
+If that doesn't give a function, return nil."
   (or (condition-case ()
 	  (save-excursion
 	    (save-restriction
@@ -796,22 +795,60 @@
 	      (set-syntax-table stab)))
 	(error nil))))
 
-;; default to nil for the non-hackers?
+(defun function-at-point ()
+  "Return the function whose name is around point.
+If that gives no function, return the function which is called by the
+list containing point.  If that doesn't give a function, return nil."
+  (or (condition-case ()
+	  (let ((stab (syntax-table)))
+	    (unwind-protect
+		(save-excursion
+		  (set-syntax-table emacs-lisp-mode-syntax-table)
+		  (or (not (zerop (skip-syntax-backward "_w")))
+		      (eq (char-syntax (char-after (point))) ?w)
+		      (eq (char-syntax (char-after (point))) ?_)
+		      (forward-sexp -1))
+		  (skip-chars-forward "`'")
+		  (let ((obj (read (current-buffer))))
+		    (and (symbolp obj) (fboundp obj) obj)))
+	      (set-syntax-table stab)))
+	(error nil))
+      (condition-case ()
+	  (save-excursion
+	    (save-restriction
+	      (narrow-to-region (max (point-min) (- (point) 1000)) (point-max))
+	      (backward-up-list 1)
+	      (forward-char 1)
+	      (let (obj)
+		(setq obj (read (current-buffer)))
+		(and (symbolp obj) (fboundp obj) obj))))
+	(error nil))))
+
+;; Default to nil for the non-hackers?  Not until we find a way to
+;; distinguish hackers from non-hackers automatically!
 (defcustom describe-function-show-arglist t
   "*If non-nil, describe-function will show its arglist,
 unless the function is autoloaded."
   :type 'boolean
   :group 'help-appearance)
 
+(defcustom find-function-function 'function-at-point
+  "*The function used by `describe-function', `where-is' and
+`find-function' to select the function near point.
+
+For example `function-at-point' or `function-called-at-point'."
+  :type 'function
+  :group 'help)
+
 (defun describe-function-find-file (function)
   (let ((files load-history)
-	     file)
-	 (while files
-	   (if (memq function (cdr (car files)))
-	       (setq file (car (car files))
-		     files nil))
-	   (setq files (cdr files)))
-	 file))
+	file)
+    (while files
+      (if (memq function (cdr (car files)))
+	  (setq file (car (car files))
+		files nil))
+      (setq files (cdr files)))
+    file))
 
 (defun describe-function (function)
   "Display the full documentation of FUNCTION (a symbol).
@@ -830,10 +867,8 @@
   (with-displaying-help-buffer
    (lambda ()
      (describe-function-1 function standard-output)
-     (save-excursion
-       (set-buffer standard-output)
-       ;; Return the text we displayed.
-       (buffer-string)))))
+     ;; Return the text we displayed.
+     (buffer-string nil nil standard-output))))
 
 (defun function-obsolete-p (function)
   "Return non-nil if FUNCTION is obsolete."
@@ -908,8 +943,8 @@
 	(setq file-name (compiled-function-annotation def)))
     (if (eq 'macro (car-safe def))
 	(setq fndef (cdr def)
-	      home (and (compiled-function-p (cdr def))
-			(compiled-function-annotation (cdr def)))
+	      file-name (and (compiled-function-p (cdr def))
+			     (compiled-function-annotation (cdr def)))
 	      macrop t)
       (setq fndef def))
     (if aliases (princ aliases stream))
@@ -1010,23 +1045,24 @@
 		 (terpri stream))))))))
 
 
-(defun describe-function-arglist (function)
-  (interactive (list (or (function-called-at-point)
-			 (error "no function call at point"))))
-  (let ((b nil))
-    (unwind-protect
-	(save-excursion
-	  (set-buffer (setq b (get-buffer-create " *arglist*")))
-	  (buffer-disable-undo b)
-	  (erase-buffer)
-	  (describe-function-1 function b t)
-	  (goto-char (point-min))
-	  (end-of-line)
-	  (or (eobp) (delete-char 1))
-	  (just-one-space)
-	  (end-of-line)
-	  (message (buffer-substring (point-min) (point))))
-      (and b (kill-buffer b)))))
+;;; ## this doesn't seem to be used for anything
+;; (defun describe-function-arglist (function)
+;;   (interactive (list (or (function-called-at-point)
+;; 			 (error "no function call at point"))))
+;;   (let ((b nil))
+;;     (unwind-protect
+;; 	(save-excursion
+;; 	  (set-buffer (setq b (get-buffer-create " *arglist*")))
+;; 	  (buffer-disable-undo b)
+;; 	  (erase-buffer)
+;; 	  (describe-function-1 function b t)
+;; 	  (goto-char (point-min))
+;; 	  (end-of-line)
+;; 	  (or (eobp) (delete-char 1))
+;; 	  (just-one-space)
+;; 	  (end-of-line)
+;; 	  (message (buffer-substring (point-min) (point))))
+;;       (and b (kill-buffer b)))))
 
 
 (defun variable-at-point ()
@@ -1073,25 +1109,23 @@
 (defun built-in-variable-doc (variable)
   "Return a string describing whether VARIABLE is built-in."
   (let ((type (built-in-variable-type variable)))
-    (cond ((eq type 'integer) "a built-in integer variable")
-	  ((eq type 'const-integer) "a built-in constant integer variable")
-	  ((eq type 'boolean) "a built-in boolean variable")
-	  ((eq type 'const-boolean) "a built-in constant boolean variable")
-	  ((eq type 'object) "a simple built-in variable")
-	  ((eq type 'const-object) "a simple built-in constant variable")
-	  ((eq type 'const-specifier) "a built-in constant specifier variable")
-	  ((eq type 'current-buffer) "a built-in buffer-local variable")
-	  ((eq type 'const-current-buffer)
-	   "a built-in constant buffer-local variable")
-	  ((eq type 'default-buffer)
-	   "a built-in default buffer-local variable")
-	  ((eq type 'selected-console) "a built-in console-local variable")
-	  ((eq type 'const-selected-console)
-	   "a built-in constant console-local variable")
-	  ((eq type 'default-console)
-	   "a built-in default console-local variable")
-	  (type "an unknown type of built-in variable?")
-	  (t "a variable declared in Lisp"))))
+    (case type
+      (integer "a built-in integer variable")
+      (const-integer "a built-in constant integer variable")
+      (boolean "a built-in boolean variable")
+      (const-boolean "a built-in constant boolean variable")
+      (object "a simple built-in variable")
+      (const-object "a simple built-in constant variable")
+      (const-specifier "a built-in constant specifier variable")
+      (current-buffer "a built-in buffer-local variable")
+      (const-current-buffer "a built-in constant buffer-local variable")
+      (default-buffer "a built-in default buffer-local variable")
+      (selected-console "a built-in console-local variable")
+      (const-selected-console "a built-in constant console-local variable")
+      (default-console "a built-in default console-local variable")
+      (t
+       (if type "an unknown type of built-in variable?"
+	 "a variable declared in Lisp")))))
 
 (defun describe-variable (variable)
   "Display the full documentation of VARIABLE (a symbol)."
@@ -1159,16 +1193,14 @@
        (let ((doc (documentation-property variable 'variable-documentation))
 	     (obsolete (variable-obsoleteness-doc origvar))
 	     (compatible (variable-compatibility-doc origvar)))
-	 (if obsolete
-	     (progn
-	       (princ obsolete)
-	       (terpri)
-	       (terpri)))
-	 (if compatible
-	     (progn
-	       (princ compatible)
-	       (terpri)
-	       (terpri)))
+	 (when obsolete
+	   (princ obsolete)
+	   (terpri)
+	   (terpri))
+	 (when compatible
+	   (princ compatible)
+	   (terpri)
+	   (terpri))
 	 ;; don't bother to print anything if variable is obsolete and aliased.
 	 (when (or (not obsolete) (not aliases))
 	   (if doc
@@ -1176,15 +1208,13 @@
 	       (princ doc)
 	     (princ "not documented as a variable."))
 	   (terpri)))
-       (save-excursion
-	 (set-buffer standard-output)
-	 ;; Return the text we displayed.
-	 (buffer-string))))))
+       ;; Return the text we displayed.
+       (buffer-string nil nil standard-output)))))
 
 (defun sorted-key-descriptions (keys &optional separator)
   "Sort and separate the key descriptions for KEYS.
 The sorting is done by length (shortest bindings first), and the bindings
-are separated with SEPARATOR (`, ' by default)."
+are separated with SEPARATOR (\", \" by default)."
   (mapconcat 'key-description
 	     (sort keys #'(lambda (x y)
 			    (< (length x) (length y))))
@@ -1210,53 +1240,8 @@
       (message "%s is not on any keys" definition)))
   nil)
 
-;; Synched with Emacs 19.35
-;; Moved to packages.el
-;(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.
+;; `locate-library' moved to "packages.el"
 
-;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))
 
 ;; Functions ported from C into Lisp in XEmacs
 
@@ -1323,207 +1308,13 @@
                   (princ (car pid) stream)
                   (princ "@" stream)
                   (princ (cdr pid) stream))
-                (let ((cmd (process-command p)))
-                  (while cmd
-                    (princ (car cmd) stream)
-                    (setq cmd (cdr cmd))
-                    (if cmd (princ " " stream)))))
+	      (let ((cmd (process-command p)))
+		(while cmd
+		  (princ (car cmd) stream)
+		  (setq cmd (cdr cmd))
+		  (if cmd (princ " " stream)))))
             (terpri stream)))))))
 
-
-;; find-function stuff
-
-(defvar find-function-function 'function-at-point
-  "*The function used by `describe-function', `where-is' and
-`find-function' to select the function near point.
-
-For example `function-at-point' or `function-called-at-point'.")
-
-(defvar find-function-source-path nil
-  "The default list of directories where find-function searches.
-
-If this variable is `nil' then find-function searches `load-path' by
-default.")
-
-
-(defun find-function-noselect (function)
-  "Returns a pair `(buffer . point)' pointing to the definition of FUNCTION.
-
-Finds the Emacs Lisp library containing the definition of FUNCTION
-in a buffer and the point of the definition.  The buffer is
-not selected.
-
-The library where FUNCTION is defined is searched for in
-`find-function-source-path', if non `nil', otherwise in `load-path'."
-  (and (subrp (symbol-function function))
-       (error "%s is a primitive function" function))
-  (if (not function)
-      (error "You didn't specify a function"))
-  (let ((def (symbol-function function))
-	library aliases)
-    (while (symbolp def)
-      (or (eq def function)
-	  (if aliases
-	      (setq aliases (concat aliases
-				    (format ", which is an alias for %s"
-					    (symbol-name def))))
-	    (setq aliases (format "an alias for %s" (symbol-name def)))))
-      (setq function (symbol-function function)
-	    def (symbol-function function)))
-    (if aliases
-	(message aliases))
-    (setq library
-	  (cond ((eq (car-safe def) 'autoload)
-		 (nth 1 def))
-		((describe-function-find-file function))
-		((compiled-function-p def)
-		 (substring (compiled-function-annotation def) 0 -4))))
-    (if (null library)
-	(error (format "Don't know where `%s' is defined" function)))
-    (if (string-match "\\.el\\(c\\)\\'" library)
-	(setq library (substring library 0 (match-beginning 1))))
-    (let* ((path find-function-source-path)
-	   (filename (if (file-exists-p library)
-			 library
-		       (if (string-match "\\(\\.el\\)\\'" library)
-			   (setq library (substring library 0
-						    (match-beginning
-						     1))))
-		       (or (locate-library (concat library ".el") t path)
-			   (locate-library library t path)))))
-      (if (not filename)
-	  (error "The library \"%s\" is not in the path." library))
-      (with-current-buffer (find-file-noselect filename)
-	(save-match-data
-	  (let (;; avoid defconst, defgroup, defvar (any others?)
-		(regexp
-		 (format "^\\s-*(def[^cgv\W]\\w+\\*?\\s-+%s\\s-" function))
-		(syntable (syntax-table)))
-	    (set-syntax-table emacs-lisp-mode-syntax-table)
-	    (goto-char (point-min))
-	    (if (prog1
-		    (re-search-forward regexp nil t)
-		  (set-syntax-table syntable))
-		(progn
-		  (beginning-of-line)
-		  (cons (current-buffer) (point)))
-	      (error "Cannot find definition of `%s'" function))))))))
-
-(defun function-at-point ()
-  (or (condition-case ()
-	  (let ((stab (syntax-table)))
-	    (unwind-protect
-		(save-excursion
-		  (set-syntax-table emacs-lisp-mode-syntax-table)
-		  (or (not (zerop (skip-syntax-backward "_w")))
-		      (eq (char-syntax (char-after (point))) ?w)
-		      (eq (char-syntax (char-after (point))) ?_)
-		      (forward-sexp -1))
-		  (skip-chars-forward "`'")
-		  (let ((obj (read (current-buffer))))
-		    (and (symbolp obj) (fboundp obj) obj)))
-	      (set-syntax-table stab)))
-	(error nil))
-      (condition-case ()
-	  (save-excursion
-	    (save-restriction
-	      (narrow-to-region (max (point-min) (- (point) 1000)) (point-max))
-	      (backward-up-list 1)
-	      (forward-char 1)
-	      (let (obj)
-		(setq obj (read (current-buffer)))
-		(and (symbolp obj) (fboundp obj) obj))))
-	(error nil))))
-
-(defun find-function-read-function ()
-  "Read and return a function, defaulting to the one near point.
-
-The function named by `find-function-function' is used to select the
-default function."
-  (let ((fn (funcall find-function-function))
-	(enable-recursive-minibuffers t)
-	val)
-    (setq val (completing-read
-	       (if fn
-		   (format "Find function (default %s): " fn)
-		 "Find function: ")
-	       obarray 'fboundp t nil 'function-history))
-    (list (if (equal val "")
-	      fn (intern val)))))
-
-(defun find-function-do-it (function switch-fn)
-  "find elisp FUNCTION in a buffer and display it with SWITCH-FN.
-Point is saved in the buffer if it is one of the current buffers."
-  (let ((orig-point (point))
-	(orig-buffers (buffer-list))
-	(buffer-point (find-function-noselect function)))
-    (if buffer-point
-	(progn
-	  (funcall switch-fn (car buffer-point))
-	  (if (memq (car buffer-point) orig-buffers)
-	      (push-mark orig-point))
-	  (goto-char (cdr buffer-point))
-	  (recenter 0)))))
-
-(defun find-function (function)
-  "Find the definition of the function near point in the current window.
-
-Finds the Emacs Lisp library containing the definition of the function
-near point (selected by `find-function-function') in a buffer and
-places point before the definition.  Point is saved in the buffer if
-it is one of the current buffers.
-
-The library where FUNCTION is defined is searched for in
-`find-function-source-path', if non `nil', otherwise in `load-path'."
-  (interactive (find-function-read-function))
-  (find-function-do-it function 'switch-to-buffer))
-
-(defun find-function-other-window (function)
-  "Find the definition of the function near point in the other window.
-
-Finds the Emacs Lisp library containing the definition of the function
-near point (selected by `find-function-function') in a buffer and
-places point before the definition.  Point is saved in the buffer if
-it is one of the current buffers.
-
-The library where FUNCTION is defined is searched for in
-`find-function-source-path', if non `nil', otherwise in `load-path'."
-  (interactive (find-function-read-function))
-  (find-function-do-it function 'switch-to-buffer-other-window))
-
-(defun find-function-other-frame (function)
-  "Find the definition of the function near point in the another frame.
-
-Finds the Emacs Lisp library containing the definition of the function
-near point (selected by `find-function-function') in a buffer and
-places point before the definition.  Point is saved in the buffer if
-it is one of the current buffers.
-
-The library where FUNCTION is defined is searched for in
-`find-function-source-path', if non `nil', otherwise in `load-path'."
-  (interactive (find-function-read-function))
-  (find-function-do-it function 'switch-to-buffer-other-frame))
-
-(defun find-function-on-key (key)
-  "Find the function that KEY invokes.  KEY is a string.
-Point is saved if FUNCTION is in the current buffer."
-  (interactive "kFind function on key: ")
-  (let ((defn (key-or-menu-binding key)))
-    (if (or (null defn) (integerp defn))
-        (message "%s is undefined" (key-description key))
-      (if (and (consp defn) (not (eq 'lambda (car-safe defn))))
-	  (message "runs %s" (prin1-to-string defn))
-	(find-function-other-window defn)))))
-
-(defun find-function-at-point ()
-  "Find directly the function at point in the other window."
-  (interactive)
-  (let ((symb (function-at-point)))
-    (when symb
-      (find-function-other-window symb))))
-
-(define-key ctl-x-map "F" 'find-function)
-(define-key ctl-x-4-map "F" 'find-function-other-window)
-(define-key ctl-x-5-map "F" 'find-function-other-frame)
+;; `find-function' et al moved to "find-func.el"
 
 ;;; help.el ends here
--- a/lisp/prim/keymap.el	Mon Aug 13 10:01:24 2007 +0200
+++ b/lisp/prim/keymap.el	Mon Aug 13 10:02:21 2007 +0200
@@ -42,7 +42,7 @@
 	;; Make plain numbers do numeric args.
 	(while (<= (aref string 0) ?9)
 	  (define-key map string 'digit-argument)
-	  (aset string 0 (1+ (aref string 0)))))))
+	  (incf (aref string 0))))))
 
 (defun substitute-key-definition (olddef newdef keymap &optional oldmap prefix)
   "Replace OLDDEF with NEWDEF for any keys in KEYMAP now defined as OLDDEF.
@@ -81,36 +81,24 @@
 		  map)
       )))
 
-;; from Bill Dubuque <wgd@martigny.ai.mit.edu>
+
+;; From Bill Dubuque <wgd@martigny.ai.mit.edu>
+
+;; This used to wrap forms into an interactive lambda.  It is unclear
+;; to me why this is needed in this function.  Anyway,
+;; `key-or-menu-binding' doesn't do it, so this function no longer
+;; does it, either.
 (defun insert-key-binding (key)         ; modeled after describe-key
+  "Insert the command bound to KEY."
   (interactive "kInsert command bound to key: ")
-  (let (defn)
-    ;; If the key typed was really a menu selection, grab the form out
-    ;; of the event object and intuit the function that would be called,
-    ;; and describe that instead.
-    (if (and (vectorp key) (= 1 (length key))
-             (or (misc-user-event-p (aref key 0))
-                 (eq (car-safe (aref key 0)) 'menu-selection)))
-        (let ((event (aref key 0)))
-          (setq defn (if (eventp event)
-                         (list (event-function event) (event-object event))
-                       (cdr event)))
-          (if (eq (car defn) 'eval)
-              (setq defn (` (lambda ()
-                              (interactive)
-                              (, (car (cdr defn)))))))
-          (if (eq (car-safe defn) 'call-interactively)
-              (setq defn (car (cdr defn))))
-          (if (and (consp defn) (null (cdr defn)))
-              (setq defn (car defn))))
-      (setq defn (key-binding key)))
+  (let ((defn (key-or-menu-binding key)))
     (if (or (null defn) (integerp defn))
-        (error "%s is undefined" (key-description key))
+	(error "%s is undefined" (key-description key))
       (if (or (stringp defn) (vectorp defn))
           (setq defn (key-binding defn))) ;; a keyboard macro
       (insert (format "%s" defn)))))
 
-;; from Bill Dubuque <wgd@martigny.ai.mit.edu>
+;; From Bill Dubuque <wgd@martigny.ai.mit.edu>
 (defun read-command-or-command-sexp (prompt)
   "Read a command symbol or command sexp.
 A command sexp is wrapped in an interactive lambda if needed.
@@ -122,9 +110,9 @@
                       (completing-read prompt obarray 'commandp)))))
     (if (and (consp result)
              (not (eq (car result) 'lambda)))
-        (` (lambda ()
-             (interactive)
-             (, result)))
+        `(lambda ()
+	   (interactive)
+	   ,result)
       result)))
 
 (defun local-key-binding (keys)
@@ -227,7 +215,7 @@
            ;; Terminate loop, with v set to non-nil value
            (setq tail nil)))
     v))
-    
+
 
 (defun current-minor-mode-maps ()
   "Return a list of keymaps for the minor modes of the current buffer."
@@ -256,8 +244,7 @@
 If a second optional argument MAPVAR is given and is not `t',
   the map is stored as its value.
 Regardless of MAPVAR, COMMAND's function-value is always set to the keymap."
-  (let ((map (make-sparse-keymap)))
-    (set-keymap-name map name)
+  (let ((map (make-sparse-keymap name)))
     (fset name map)
     (cond ((not mapvar)
            (set name map))
@@ -272,6 +259,10 @@
 ;;; This is used both by call-interactively (for the command history)
 ;;; and by macros.el (for saving keyboard macros to a file).
 
+;; ### why does (events-to-keys [backspace]) return "\C-h"?
+;; BTW, this function is a mess, and macros.el does *not* use it, in
+;; spite of the above comment.  `format-kbd-macro' is used to save
+;; keyboard macros to a file.
 (defun events-to-keys (events &optional no-mice)
  "Given a vector of event objects, returns a vector of key descriptors,
 or a string (if they all fit in the ASCII range).
@@ -382,10 +373,12 @@
   (let (event)
     (while (not (key-press-event-p (setq event (next-command-event))))
       (dispatch-event event))
-    (vector (append (list symbol)
-		    (delq symbol (event-modifiers event))
-		    (list (event-key event))))))
+    (vconcat (list symbol)
+	     (delq symbol (event-modifiers event))
+	     (list (event-key event)))))
 
+;; This looks dirty.  The following code should maybe go to another
+;; file, and `create-console-hook' should maybe default to nil.
 (add-hook
  'create-console-hook
  (lambda (console)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lisp/prim/lisp-file-db.el	Mon Aug 13 10:02:21 2007 +0200
@@ -0,0 +1,39 @@
+(defvar *default-db-name* (expand-file-name "~/.xemacs/lisp-file-database")
+  "Default location of the database")
+
+(defun build-lisp-file-db (&optional db-name path rebuild)
+  "Create a database of all lisp files in the directories given by PATH.
+DB-NAME is the database name, defaulting to *default-db-name*
+PATH is a list of directories to search, defaulting to load-path.
+REBUILD "
+  (let ((path (or path load-path))
+	(db (open-database (or db-name *default-db-name*) nil nil "rw+")))
+    ;; For each entry in path, find all files in it and put them in
+    ;; the database.
+    (dolist (dir path)
+      (dolist (file (directory-files dir t nil t t))
+	;; Separate the file name and the directory.  The key is the
+	;; filename, and the value is the whole pathname.  However, if
+	;; the key already exists, DON'T put that entry in.  We want
+	;; things that occur first in load-path to override entries
+	;; later in load-path
+	(let ((fname (file-name-nondirectory file)))
+	  (put-database fname file db nil))))))
+
+(defun show-lisp-db (&optional db-name)
+  (let ((db (open-database (or db-name *default-db-name*) nil nil "r"))
+	(entries '()))
+    (map-database #'(lambda (key val)
+		      (push (cons key val) entries))
+		  db)
+    (nreverse entries)))
+
+(defun lookup-lisp-file-db (file &optional db-name)
+  (let ((name (file-name-nondirectory file))
+	(db (open-database (or db-name *default-db-name*) nil nil "r")))
+    (do* ((ext '("" ".elc" ".el") (rest ext))
+	 (entry (get-database (concat name (first ext)) db)
+		(get-database (concat name (first ext)) db)))
+	((or entry (null ext)) entry)
+      ())))
+    
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lisp/prim/package-admin.el	Mon Aug 13 10:02:21 2007 +0200
@@ -0,0 +1,78 @@
+;;; package-admin.el --- Installation and Maintenance of XEmacs packages
+
+;; Copyright (C) 1997 by Free Software Foundation, Inc.
+
+;; Author: SL 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:
+
+;; First pass at lisp front end to package maintenance.
+
+;;; Code:
+
+(require 'config)
+
+(defvar package-admin-xemacs (concat (config-value 'top_srcdir)
+				     "/src/xemacs")
+  "Location of XEmacs binary to use.")
+
+(defvar package-admin-temp-buffer "*Package Output*"
+  "Temporary buffer where output of backend commands is saved.")
+
+;;;###autoload
+(defun package-admin-add-single-file-package (file destdir &optional pkg-dir)
+  "Install a single file Lisp package into XEmacs package hierarchy.
+`file' should be the full path to the lisp file to install.
+`destdir' should be a simple directory name.
+The optional `pkg-dir' can be used to override the default package hiearchy
+\(last package-path)."
+  (interactive "fLisp File: \nsDestination: ")
+  (when (null pkg-dir)
+    (setq pkg-dir (cadr package-path)))
+  (let ((destination (concat pkg-dir "/lisp/" destdir))
+	(buf (get-buffer-create package-admin-temp-buffer)))
+    (call-process "add-little-package.sh"
+		  nil
+		  buf
+		  t
+		  ;; rest of command line follows
+		  package-admin-xemacs file destination)))
+
+;;;###autoload
+(defun package-admin-add-binary-package (file &optional pkg-dir)
+  "Install a pre-bytecompiled XEmacs package into package hierarchy."
+  (interactive "fPackage tarball: ")
+  (when (null pkg-dir)
+    (setq pkg-dir (cadr package-path)))
+
+  (let ((buf (get-buffer-create package-admin-temp-buffer)))
+    (call-process "add-big-package.sh"
+		  nil
+		  buf
+		  t
+		  ;; rest of command line follows
+		  package-admin-xemacs file pkg-dir)))
+
+(provide 'package-admin)
+
+;;; package-admin.el ends here
--- a/lisp/prim/packages.el	Mon Aug 13 10:01:24 2007 +0200
+++ b/lisp/prim/packages.el	Mon Aug 13 10:02:21 2007 +0200
@@ -160,8 +160,9 @@
                 or are self-contained packages of their own."
   ;; Info files
   (if (and (null path-only) (file-directory-p (concat package "/info")))
-      (setq Info-default-directory-list
-	    (cons (concat package "/info/") Info-default-directory-list)))
+      (let ((dir (concat package "/info/")))
+	(when (not (member dir Info-default-directory-list))
+	  (nconc Info-default-directory-list (list dir)))))
   ;; Data files
   (if (and (null path-only) (file-directory-p (concat package "/etc")))
       (setq data-directory-list
--- a/lisp/prim/profile.el	Mon Aug 13 10:01:24 2007 +0200
+++ b/lisp/prim/profile.el	Mon Aug 13 10:02:21 2007 +0200
@@ -60,8 +60,14 @@
 
 ;;; Code:
 
+(defun profile-align (form width)
+  ;; Bletch!  this is what (format "%-*s" width form) should do.
+  (let ((printed-form (format "%s" form)))
+    (concat printed-form
+	    (make-string (max 0 (- width (length printed-form))) ?\ ))))
+
 ;;;###autoload
-(defun profiling-results (&optional info stream)
+(defun profile-results (&optional info stream)
   "Print profiling info INFO to STREAM in a pretty format.
 If INFO is omitted, the current profiling info is retrieved using
  `get-profiling-info'.
@@ -76,32 +82,32 @@
 	     (interactive-p))
     (pop-to-buffer (get-buffer-create "*Profiling Results*"))
     (erase-buffer))
-  (let* ((standard-output (or stream (if (interactive-p)
-					 (current-buffer)
-				       standard-output)))
-	 (maxfunlen (max (length "Function Name")
-			 (apply 'max (mapcar (lambda (sym)
-					       (length (symbol-name
-							(car sym))))
-					     info))))
-	 (formatstr (format "%%-%ds" maxfunlen)))
-    (setq info (nreverse (sort info #'cdr-less-than-cdr)))
-    (princ (format (concat formatstr "    Ticks    %%/Total\n")
-		   "Function Name"))
+  (let ((standard-output (or stream (if (interactive-p)
+					(current-buffer)
+				      standard-output)))
+	;; Calculate the longest function
+	(maxfunlen (apply #'max
+			  (length "Function Name")
+			  (mapcar (lambda (el)
+				    ;; Functions longer than 40
+				    ;; characters don't qualify
+				    (let ((l (length (format "%s" (car el)))))
+				      (if (< l 40)
+					  l 0)))
+				  info))))
+    (princ (format "%s    Ticks    %%/Total\n"
+		   (profile-align "Function Name" maxfunlen)))
     (princ (make-string maxfunlen ?=))
     (princ "    =====    =======\n")
-    (let ((sum 0.0))
-      (dolist (info2 info)
-	(incf sum (cdr info2)))
-      (while info
-	(let ((f (caar info)))
-	  (princ (format (concat formatstr "    %-5d    %-6.3f\n")
-			 f (cdar info) (* 100 (/ (cdar info) sum)))))
-	(pop info))
+    (let ((sum (float (apply #'+ (mapcar #'cdr info)))))
+      (dolist (entry (nreverse (sort info #'cdr-less-than-cdr)))
+	(princ (format "%s    %-5d    %-6.3f\n"
+		       (profile-align (car entry) maxfunlen)
+		       (cdr entry) (* 100 (/ (cdr entry) sum)))))
       (princ (make-string maxfunlen ?-))
       (princ "--------------------\n")
-      (princ (format (concat formatstr "    %-5d    %-6.2f\n")
-		     "Total" sum 100.0))
+      (princ (format "%s    %-5d    %-6.2f\n"
+		     (profile-align "Total" maxfunlen) sum 100.0))
       (princ (format "\n\nOne tick = %g ms\n"
 		     (/ default-profiling-interval 1000.0)))))
   (when (and (not stream)
@@ -120,14 +126,12 @@
 Otherwise, profiling will be left running.
 
 Returns the profiling info, printable by `profiling-results'."
-  `(progn
-     (if (profiling-active-p)
+  `(let ((was-profiling (profiling-active-p)))
+     (unwind-protect
 	 (progn
+	   (start-profiling)
 	   ,@forms)
-       (unwind-protect
-	   (progn
-	     (start-profiling)
-	     ,@forms)
+       (unless was-profiling
 	 (stop-profiling)))
      (get-profiling-info)))
 
--- a/lisp/prim/startup.el	Mon Aug 13 10:01:24 2007 +0200
+++ b/lisp/prim/startup.el	Mon Aug 13 10:02:21 2007 +0200
@@ -73,21 +73,21 @@
 XEmacs loads the user's initialization file.")
 
 (defvar after-init-hook nil
-  "Functions to call after loading the init file (`~/.emacs').
+  "*Functions to call after loading the init file (`~/.xemacs/init.el').
 The call is not protected by a condition-case, so you can set `debug-on-error'
-in `.emacs', and put all the actual code on `after-init-hook'.")
+in `init.el', and put all the actual code on `after-init-hook'.")
 
 (defvar term-setup-hook nil
-  "Functions to be called after loading terminal-specific Lisp code.
-See `run-hooks'.  This variable exists for users to set,
-so as to override the definitions made by the terminal-specific file.
-XEmacs never sets this variable itself.")
+  "*Functions to be called after loading terminal-specific Lisp code.
+See `run-hooks'.  This variable exists for users to set, so as to
+override the definitions made by the terminal-specific file.  XEmacs
+never sets this variable itself.")
 
 (defvar keyboard-type nil
   "The brand of keyboard you are using.
-This variable is used to define
-the proper function and keypad keys for use under X.  It is used in a
-fashion analogous to the environment value TERM.")
+This variable is used to define the proper function and keypad keys
+for use under X.  It is used in a fashion analogous to the environment
+value TERM.")
 
 (defvar window-setup-hook nil
   "Normal hook run to initialize window system display.
@@ -98,13 +98,13 @@
   "Major mode command symbol to use for the initial *scratch* buffer.")
 
 (defvar init-file-user nil
-  "Identity of user whose `.emacs' file is or was read.
+  "Identity of user whose `~/.xemacs/init.el' file is or was read.
 The value is nil if no init file is being used; otherwise, it may be either
 the null string, meaning that the init file was taken from the user that
 originally logged in, or it may be a string containing a user's name.
 
 In either of the latter cases, `(concat \"~\" init-file-user \"/\")'
-evaluates to the name of the directory where the `.emacs' file was
+evaluates to the name of the directory where the `init.el' file was
 looked for.
 
 Setting `init-file-user' does not prevent Emacs from loading
@@ -114,11 +114,14 @@
 
 (defvar site-start-file (purecopy "site-start")
   "File containing site-wide run-time initializations.
-This file is loaded at run-time before `~/.emacs'.  It contains inits
-that need to be in place for the entire site, but which, due to their
-higher incidence of change, don't make sense to load into XEmacs'
-dumped image.  Thus, the run-time load order is: 1. file described in
-this variable, if non-nil; 2. `~/.emacs'; 3. `default.el'.
+This file is loaded at run-time before `~/.xemacs/init.el'.  It
+contains inits that need to be in place for the entire site, but
+which, due to their higher incidence of change, don't make sense to
+load into XEmacs' dumped image.  Thus, the run-time load order is:
+
+  1. file described in this variable, if non-nil;
+  2. `~/.xemacs/init.el';
+  3. `/path/to/xemacs/lisp/default.el'.
 
 Don't use the `site-start.el' file for things some users may not like.
 Put them in `default.el' instead, so that users can more easily
@@ -140,7 +143,7 @@
 This is initialized based on `mail-host-address',
 after your init file is read, in case it sets `mail-host-address'.")
 
-(defvar auto-save-list-file-prefix "~/.saves-"
+(defvar auto-save-list-file-prefix "~/.xemacs/.saves-"
   "Prefix for generating auto-save-list-file-name.
 Emacs's pid and the system name will be appended to
 this prefix to create a unique file name.")
@@ -555,19 +558,22 @@
 	    (setq term (substring term 0 hyphend))
 	  (setq term nil))))))
 
-(defconst emacs-user-extension-dir "/.xemacs/"
+(defconst user-init-directory "/.xemacs/"
   "Directory where user initialization and user-installed packages may go.")
+(define-obsolete-variable-alias
+  'emacs-user-extension-dir
+  'user-init-directory)
 
 (defun load-user-init-file (init-file-user)
   "This function actually reads the init files.
-First try .xemacs, then try .emacs, but only load one of the two."
+First try .xemacs/init, 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-user-extension-dir "init.el"))
+	    (concat "~" init-file-user user-init-directory "init.el"))
 	   (t
-	    (concat "~" init-file-user emacs-user-extension-dir "init.el"))))
+	    (concat "~" init-file-user user-init-directory "init.el"))))
     (unless (file-exists-p (expand-file-name user-init-file))
       (setq user-init-file
 	    (cond
@@ -576,14 +582,12 @@
 	     (t
 	      (concat "~" init-file-user "/.emacs")))))
     (load user-init-file t t t)
-    (when (string= custom-file (concat "~"
+    (let ((default-custom-file (concat "~"
 				       init-file-user
-				       emacs-user-extension-dir
-				       "options.el"))
-      (load (concat "~"
-		    init-file-user
-		    emacs-user-extension-dir
-		    "options.el") t t))
+				       user-init-directory
+				       "options.el")))
+      (when (string= custom-file default-custom-file)
+	(load default-custom-file t t)))
     (unless inhibit-default-init
       (let ((inhibit-startup-message nil))
 	;; Users are supposed to be told their rights.
@@ -1168,6 +1172,10 @@
 	  (and root
 	       (let ((f (expand-file-name "info" root)))
 		 (and (file-directory-p f) (file-name-as-directory f)))))
+	 (packages
+	  (and root
+	       (let ((f (expand-file-name "packages" root)))
+		 (and (file-directory-p f) (file-name-as-directory f)))))
 	 (lock
 	  (and root
 	       (boundp 'lock-directory)
@@ -1193,7 +1201,7 @@
     ;; 1996/12/6 by MORIOKA Tomohiko <morioka@jaist.ac.jp>
     ;;	define `default-load-path' for file-detect.el
     (setq default-load-path load-path)
-    
+
     ;; add site-lisp dir to load-path
     (when site-lisp
       ;; If the site-lisp dir isn't on the load-path, add it to the end.
@@ -1271,19 +1279,32 @@
       (setq data-directory (file-name-as-directory etc)))
 
     ;; If `configure' specified an info dir, use it.
+    ;; #### The above comment is suspect.
     (or (boundp 'Info-default-directory-list)
 	(setq Info-default-directory-list nil))
+
+    ;; Add additional system directories.
+    (setq Info-default-directory-list
+	  (append Info-default-directory-list
+		  (split-string infopath-internal ":")))
+
+    (let ((infopath (getenv "INFOPATH")))
+      (when infopath
+	(setq Info-default-directory-list
+	      (append Info-default-directory-list
+		      (split-string infopath ":")))))
+
     (cond (configure-info-directory
 	   (setq configure-info-directory (file-name-as-directory
 					   configure-info-directory))
 	   (or (member configure-info-directory Info-default-directory-list)
 	       (setq Info-default-directory-list
-		     (append Info-default-directory-list
-			     (list configure-info-directory))))))
+		     (append (list configure-info-directory)
+			     Info-default-directory-list)))))
     ;; If we've guessed the info dir, use that (too).
     (when (and info (not (member info Info-default-directory-list)))
       (setq Info-default-directory-list
-	    (append Info-default-directory-list (list info))))
+	    (append (list info) Info-default-directory-list)))
 
     ;; Default the lock dir to being a sibling of the data-directory.
     ;; If superlock isn't set, or is set to a file in a nonexistent
--- a/lisp/psgml/ChangeLog	Mon Aug 13 10:01:24 2007 +0200
+++ b/lisp/psgml/ChangeLog	Mon Aug 13 10:02:21 2007 +0200
@@ -1,3 +1,21 @@
+1997-10-10  Per Abrahamsen  <abraham@dina.kvl.dk>
+
+	* custom/wid-edit.el (variable-link): New widget.
+	(widget-variable-link-action): New function.
+	(function-link): New widget.
+	(widget-function-link-action): New function.
+
+1997-10-10  Karl M. Hegbloom  <karlheg@inetarena.com>
+
+	* prim/modeline.el (modeline-minor-mode-menu): menus are toggles
+	not strings now.
+
+1997-10-10  SL Baur  <steve@altair.xemacs.org>
+
+	* psgml-html.el (html-quote-region): Grow bounds when performing
+	substitutions.
+	From Adrian Aichner <aichner@ecf.teradyne.com>
+
 1997-09-26  SL Baur  <steve@altair.xemacs.org>
 
 	* iso-sgml.el: Correct email address.
--- a/lisp/psgml/custom-load.el	Mon Aug 13 10:01:24 2007 +0200
+++ b/lisp/psgml/custom-load.el	Mon Aug 13 10:02:21 2007 +0200
@@ -1,6 +1,6 @@
 ;;; custom-load.el --- automatically extracted custom dependencies
 
-;; Created by SL Baur on Sat Oct  4 18:11:50 1997
+;; Created by SL Baur on Thu Oct  9 20:52:27 1997
 
 ;;; Code:
 
--- a/lisp/psgml/psgml-html.el	Mon Aug 13 10:01:24 2007 +0200
+++ b/lisp/psgml/psgml-html.el	Mon Aug 13 10:02:21 2007 +0200
@@ -740,17 +740,20 @@
     (while (search-forward "&" end t)
       (forward-char -1)
       (delete-char 1)
-      (insert "&amp;"))
+      (insert "&amp;")
+      (setq end (+ 4 end)))
     (goto-char begin)
     (while (search-forward "<" end t)
       (forward-char -1)
       (delete-char 1)
-      (insert "&lt;"))
+      (insert "&lt;")
+      (setq end (+ 3 end)))
     (goto-char begin)
     (while (search-forward ">" end t)
       (forward-char -1)
       (delete-char 1)
-      (insert "&gt;"))))
+      (insert "&gt;")
+      (setq end (+ 3 end)))))
 
 ;;{{{ html-helper-insert-new-buffer-strings
 
--- a/lisp/psgml/psgml.el	Mon Aug 13 10:01:24 2007 +0200
+++ b/lisp/psgml/psgml.el	Mon Aug 13 10:02:21 2007 +0200
@@ -1,5 +1,5 @@
 ;;; psgml.el --- SGML-editing mode with parsing support
-;; $Id: psgml.el,v 1.9 1997/10/05 01:15:30 steve Exp $
+;; $Id: psgml.el,v 1.10 1997/10/12 01:39:52 steve Exp $
 
 ;; Copyright (C) 1993, 1994, 1995, 1996 Lennart Staflin
 ;; Copyright (C) 1992 Free Software Foundation, Inc.
@@ -842,56 +842,54 @@
 
 ;;; Key commands
 
-(define-key sgml-mode-map "\t"    'sgml-indent-or-tab)
-;(define-key sgml-mode-map "<" 	  'sgml-insert-tag)
-(define-key sgml-mode-map ">"     'sgml-close-angle)
-(define-key sgml-mode-map "/"     'sgml-slash)
-(define-key sgml-mode-map "\C-c#"    'sgml-make-character-reference)
-(define-key sgml-mode-map "\C-c-"    'sgml-untag-element)
-(define-key sgml-mode-map "\C-c+"    'sgml-insert-attribute)
-(define-key sgml-mode-map "\C-c/"    'sgml-insert-end-tag)
-(define-key sgml-mode-map "\C-c<"    'sgml-insert-tag)
-(define-key sgml-mode-map "\C-c="    'sgml-change-element-name)
-(define-key sgml-mode-map "\C-c\C-a" 'sgml-edit-attributes)
-(define-key sgml-mode-map "\C-c\C-c" 'sgml-show-context)
-(define-key sgml-mode-map "\C-c\C-d" 'sgml-next-data-field)
-(define-key sgml-mode-map "\C-c\C-e" 'sgml-insert-element)
-(define-key sgml-mode-map "\C-c\C-k" 'sgml-kill-markup)
-(define-key sgml-mode-map "\C-c\C-l" 'sgml-show-or-clear-log)
-(define-key sgml-mode-map "\C-c\C-n" 'sgml-up-element)
-(define-key sgml-mode-map "\C-c\C-o" 'sgml-next-trouble-spot)
-(define-key sgml-mode-map "\C-c\C-p" 'sgml-parse-prolog)
-(define-key sgml-mode-map "\C-c\C-q" 'sgml-fill-element)
-(define-key sgml-mode-map "\C-c\C-r" 'sgml-tag-region)
-(define-key sgml-mode-map "\C-c\C-s" 'sgml-unfold-line)
-(define-key sgml-mode-map "\C-c\C-t" 'sgml-list-valid-tags)
-(define-key sgml-mode-map "\C-c\C-v" 'sgml-validate)
-(define-key sgml-mode-map "\C-c\C-w" 'sgml-what-element)
-(define-key sgml-mode-map "\C-c\C-z" 'sgml-trim-and-leave-element)
-(define-key sgml-mode-map "\C-c\C-f\C-e" 'sgml-fold-element)
-(define-key sgml-mode-map "\C-c\C-f\C-r" 'sgml-fold-region)
-(define-key sgml-mode-map "\C-c\C-f\C-s" 'sgml-fold-subelement)
-(define-key sgml-mode-map "\C-c\C-f\C-x" 'sgml-expand-element)
-(define-key sgml-mode-map "\C-c\r"   'sgml-split-element)
-(define-key sgml-mode-map "\C-c\C-u\C-e" 'sgml-unfold-element)
-(define-key sgml-mode-map "\C-c\C-u\C-a" 'sgml-unfold-all)
-(define-key sgml-mode-map "\C-c\C-u\C-l" 'sgml-unfold-line)
-(define-key sgml-mode-map "\C-c\C-u\C-d" 'sgml-custom-dtd)
-(define-key sgml-mode-map "\C-c\C-u\C-m" 'sgml-custom-markup)
+(define-key sgml-mode-map [(tab)]    'sgml-indent-or-tab)
+;;;(define-key sgml-mode-map [(?<)] 'sgml-insert-tag)
+(define-key sgml-mode-map [(?>)]     'sgml-close-angle)
+(define-key sgml-mode-map [(?/)]     'sgml-slash)
+(define-key sgml-mode-map [(control ?c) (?#)]    'sgml-make-character-reference)
+(define-key sgml-mode-map [(control ?c) (?-)]    'sgml-untag-element)
+(define-key sgml-mode-map [(control ?c) (?+)]    'sgml-insert-attribute)
+(define-key sgml-mode-map [(control ?c) (?/)]    'sgml-insert-end-tag)
+(define-key sgml-mode-map [(control ?c) (?<)]    'sgml-insert-tag)
+(define-key sgml-mode-map [(control ?c) (?=)]    'sgml-change-element-name)
+(define-key sgml-mode-map [(control ?c) (control ?a)] 'sgml-edit-attributes)
+(define-key sgml-mode-map [(control ?c) (control ?c)] 'sgml-show-context)
+(define-key sgml-mode-map [(control ?c) (control ?d)] 'sgml-next-data-field)
+(define-key sgml-mode-map [(control ?c) (control ?e)] 'sgml-insert-element)
+(define-key sgml-mode-map [(control ?c) (control ?k)] 'sgml-kill-markup)
+(define-key sgml-mode-map [(control ?c) (control ?l)] 'sgml-show-or-clear-log)
+(define-key sgml-mode-map [(control ?c) (control ?n)] 'sgml-up-element)
+(define-key sgml-mode-map [(control ?c) (control ?o)] 'sgml-next-trouble-spot)
+(define-key sgml-mode-map [(control ?c) (control ?p)] 'sgml-parse-prolog)
+(define-key sgml-mode-map [(control ?c) (control ?q)] 'sgml-fill-element)
+(define-key sgml-mode-map [(control ?c) (control ?r)] 'sgml-tag-region)
+(define-key sgml-mode-map [(control ?c) (control ?s)] 'sgml-unfold-line)
+(define-key sgml-mode-map [(control ?c) (control ?t)] 'sgml-list-valid-tags)
+(define-key sgml-mode-map [(control ?c) (control ?v)] 'sgml-validate)
+(define-key sgml-mode-map [(control ?c) (control ?w)] 'sgml-what-element)
+(define-key sgml-mode-map [(control ?c) (control ?z)] 'sgml-trim-and-leave-element)
+(define-key sgml-mode-map [(control ?c) (control ?f) (control ?e)] 'sgml-fold-element)
+(define-key sgml-mode-map [(control ?c) (control ?f) (control ?r)] 'sgml-fold-region)
+(define-key sgml-mode-map [(control ?c) (control ?f) (control ?s)] 'sgml-fold-subelement)
+(define-key sgml-mode-map [(control ?c) (control ?f) (control ?x)] 'sgml-expand-element)
+(define-key sgml-mode-map [(meta control ?O)] 'sgml-split-element)
+(define-key sgml-mode-map [(control ?c) (control ?u) (control ?e)] 'sgml-unfold-element)
+(define-key sgml-mode-map [(control ?c) (control ?u) (control ?a)] 'sgml-unfold-all)
+(define-key sgml-mode-map [(control ?c) (control ?u) (control ?l)] 'sgml-unfold-line)
+(define-key sgml-mode-map [(control ?c) (control ?u) (control ?d)] 'sgml-custom-dtd)
+(define-key sgml-mode-map [(control ?c) (control ?u) (control ?m)] 'sgml-custom-markup)
 
-(define-key sgml-mode-map "\e\C-a"   'sgml-beginning-of-element)
-(define-key sgml-mode-map "\e\C-e"   'sgml-end-of-element)
-(define-key sgml-mode-map "\e\C-f"   'sgml-forward-element)
-(define-key sgml-mode-map "\e\C-b"   'sgml-backward-element)
-(define-key sgml-mode-map "\e\C-d"   'sgml-down-element)
-(define-key sgml-mode-map "\e\C-u"   'sgml-backward-up-element)
-(define-key sgml-mode-map "\e\C-k"   'sgml-kill-element)
-(define-key sgml-mode-map "\e\C-@"   'sgml-mark-element)
-;;(define-key sgml-mode-map [?\M-\C-\ ] 'sgml-mark-element)
-(define-key sgml-mode-map "\e\C-h"   'sgml-mark-current-element)
-(define-key sgml-mode-map [(meta backspace)] (lookup-key (current-global-map) [(meta backspace)]))
-(define-key sgml-mode-map "\e\C-t"   'sgml-transpose-element)
-(define-key sgml-mode-map "\M-\t"    'sgml-complete)
+(define-key sgml-mode-map [(meta control ?a)]   'sgml-beginning-of-element)
+(define-key sgml-mode-map [(meta control ?e)]   'sgml-end-of-element)
+(define-key sgml-mode-map [(meta control ?f)]   'sgml-forward-element)
+(define-key sgml-mode-map [(meta control ?b)]   'sgml-backward-element)
+(define-key sgml-mode-map [(meta control ?d)]   'sgml-down-element)
+(define-key sgml-mode-map [(meta control ?u)]   'sgml-backward-up-element)
+(define-key sgml-mode-map [(meta control ?k)]   'sgml-kill-element)
+(define-key sgml-mode-map [(meta control ?@)]   'sgml-mark-element)
+(define-key sgml-mode-map [(meta control ?h)]   'sgml-mark-current-element)
+(define-key sgml-mode-map [(meta control ?t)]   'sgml-transpose-element)
+(define-key sgml-mode-map [(meta tab)]		'sgml-complete)
 
 ;;;; Menu bar
 
--- a/lisp/rmail/auto-autoloads.el	Mon Aug 13 10:01:24 2007 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,116 +0,0 @@
-;;; DO NOT MODIFY THIS FILE
-(if (featurep 'rmail-autoloads) (error "Already loaded"))
-
-;;;### (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)
--- a/lisp/rmail/rmail-kill.el	Mon Aug 13 10:01:24 2007 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,158 +0,0 @@
-;;; rmail-kill.el --- Mail filtering for rmail
-
-;; Copyright status unknown
-
-;; Author: Unknown
-;; Keywords: mail
-
-;; 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 the Original Notice on this file:
-;; GNU Emacs and this file "rmail-kill.el", is distributed in the hope
-;; that it will be useful, but WITHOUT ANY WARRANTY.  No author or
-;; distributor accepts responsibility to anyone for the consequences
-;; of using it or for whether it serves any particular purpose or
-;; works at all, unless he says so in writing.  Refer to the GNU Emacs
-;; General Public License for full details.
-
-;; Everyone is granted permission to copy, modify and redistribute GNU
-;; Emacs and rmail-kill.el, but only under the conditions described in
-;; the GNU Emacs General Public License.  A copy of this license is
-;; supposed to have been given to you along with GNU Emacs so you can
-;; know your rights and responsibilities.  It should be in a file
-;; named COPYING.  Among other things, the copyright notice and this
-;; notice must be preserved on all copies.
-
-;;; Code:
-(setq rmail-message-filter 'rmail-maybe-execute-message
-      rmail-mode-hook '((lambda ()
-			  (define-key rmail-mode-map "e" 'rmail-extract-rejected-message)
-			  (define-key rmail-mode-map "b" 'rmail-beginning-of-message)
-			  (define-key rmail-mode-map "K" 'rmail-execute-messages))))
-
-;; a-list with each entry (rmail-field-name . pattern)
-(defvar rmail-usual-suspects
-  '(("subject" . "Smithsonian Astronomical Observatory")
-    ("subject" . "MGR, Bellcore window manager, Part"))
-  "An alist used to kill rmail messages based on regex matches to different fields.
-The car of each entry is the name of a mail header, the cdr is a pattern.
-Case is not significant.)
-
-See also the documentation for rmail-maybe-execute-message and
-rmail-execute-messages.")
-
-(setq kill-emacs-hook 'maybe-book-some-suspects)
-
-(defun maybe-book-some-suspects ()
-  (save-window-excursion
-    (find-file "~/.emacs")
-    (goto-char (point-min))
-    (re-search-forward "^(defvar rmail-usual-suspects$")
-    (down-list 1)
-    (backward-char 1)
-    (if (not (equal rmail-usual-suspects
-		    (save-excursion (read (current-buffer)))))
-	(progn
-	  (switch-to-buffer-other-window "SUSPECTS")
-	  (erase-buffer)
-	  (mapcar '(lambda (x) (print x (current-buffer)))
-		  rmail-usual-suspects)
-	  (set-buffer-modified-p nil)
-	  (if (y-or-n-p "Save the usual suspects? ")
-	      (progn
-		(set-buffer ".emacs")
-		(kill-sexp 1)
-		(prin1 rmail-usual-suspects (get-buffer ".emacs"))
-		(save-buffer)))))))
-
-(defun rmail-maybe-execute-message (&optional suspects dont-move)
-  "Kill the current message if it matches an entry in SUSPECTS.
-SUSPECTS is alist of the form of rmail-usual-suspects (which see).
-If the current message contains a mail header that matches pattern,
-it is deleted.
-
-This function can be used as a rmail-message-filter (which see)."
-  (if (null suspects)
-      (setq suspects rmail-usual-suspects))
-  (while suspects
-    (if (and (string-match (cdr (car suspects))
-			   ;; if not such field, can never match
-			   (or (mail-fetch-field (car (car suspects))) "$^"))
-	     (not (rmail-message-deleted-p rmail-current-message)))
-	(progn
-	  (message "Deleted message %d" rmail-current-message)
-	  (if dont-move
-	      (rmail-delete-message)
-	    (rmail-delete-forward))
-	  (setq suspects nil))
-      (setq suspects (cdr suspects)))))
-
-(defun rmail-execute-messages (round-up-the-usual-suspects)
-  "Kill some rmail messages based on regex matches to a kill-alist.
-With a prefix arg, use rmail-usual-suspects as the kill-alist, otherwise
-prompt for a field name."
-  (interactive "P")
-  (let ((scene-of-the-crime rmail-current-message)
-	(alleged-perpetrator)
-	(cuffed-all-suspects nil))
-    (if round-up-the-usual-suspects
-	(setq alleged-perpetrator rmail-usual-suspects)
-      (let* ((weapon (rmail-get-current-header "Kill what field? (default Subject) " "Subject"))
-	     (default-description (or (regexp-quote (mail-fetch-field weapon))
-				      "some regex"))
-	     (most-wanted-notice (format "Kill messages having a \"%s\" field matching? (default %s) "
-					 weapon default-description))
-	     (suspect-description (read-string-with-default most-wanted-notice default-description)))
-	(setq alleged-perpetrator (list (cons weapon suspect-description)))
-	(if (y-or-n-p "Add it to rmail-usual-suspects? ")
-	    (setq rmail-usual-suspects (append alleged-perpetrator rmail-usual-suspects)))))
-
-    (while (not cuffed-all-suspects)
-      (rmail-maybe-execute-message alleged-perpetrator 'dont-move)
-      ;;
-      ;; rmail-next-undeleted-message returns a string when there are no more, but
-      ;; we also want a chance to delete that last message...
-      ;;
-      (if (stringp alleged-perpetrator)
-	  (setq cuffed-all-suspects t)
-	(setq cuffed-all-suspects (rmail-next-undeleted-message 1))))
-
-    (rmail-show-message scene-of-the-crime)
-    (if (rmail-message-deleted-p rmail-current-message)
-	(rmail-next-undeleted-message 1))
-    (if (rmail-message-deleted-p rmail-current-message)
-	(rmail-previous-undeleted-message 1))))
-
-(defun rmail-get-current-header (prompt default)
-  (save-excursion
-    (let* ((end (progn (end-of-line) (point))))
-      (beginning-of-line)
-      (if (re-search-forward "^\\([^ \t]*\\):" end t)
-	  (buffer-substring (match-beginning 1) (match-end 1))
-	(read-string-with-default prompt default)))))
-
-(defun read-string-with-default (prompt default)
-  (let ((s (read-string prompt)))
-    (if (string= s "") default s)))
-
-(provide 'rmail-kill)
-
-;;; rmail-kill.el ends here
--- a/lisp/rmail/rmail-xemacs.el	Mon Aug 13 10:01:24 2007 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,235 +0,0 @@
-;;; rmail-xemacs.el --- Mouse and font support for RMAIL running on XEmacs
-
-;; Copyright (C) 1992-1993 Free Software Foundation, Inc.
-
-;; Author: Wilson H. Tien <wtien@urbana.mcd.mot.com>
-;; Keywords: mail
-
-;; 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:
-
-;; Mouse and font support for RMAIL running in Lucid GNU Emacs
-;; written by Wilson H. Tien (wtien@urbana.mcd.mot.com); modified by jwz.
-
-;; Right button pops up a menu of commands in Rmail and Rmail summary buffers.
-;; Middle button selects indicated mail message in Rmail summary buffer
-
-;;; Code:
-
-(defvar rmail-summary-mode-menu
-  '("Rmail Summary Commands"
-    ["Select Message" rmail-summary-goto-msg t nil]
-    "----"
-    ["Previous Page" scroll-down t]
-    ["Next Page" scroll-up t]
-    "----"
-    ["Delete Message" rmail-summary-delete-forward t nil]
-    ["Undelete Message" rmail-summary-undelete t nil]
-    "----"
-    ["Exit rmail Summary" rmail-summary-exit t]
-    ["Quit rmail" rmail-summary-quit t]))
-
-(defun rmail-summary-update-menubar ()
-  ;; if min point is in visible in the window, don't make page-up menu item
-  ;; selectable
-  (let ((current-menubar rmail-summary-mode-menu)
-	(select '("Select Message"))
-	(delete '("Delete Message"))
-	(undelete '("Undelete Message"))
-	(prev-page '("Previous Page"))
-	(next-page '("Next Page")))
-    (beginning-of-line)
-    (let ((curmsg (string-to-int
-		 (buffer-substring (point)
-				   (min (point-max) (+ 5 (point))))))
-	  deleted-p)
-      (if (= 0 curmsg)
-	  (progn
-	    (rmail-update-menu-item delete nil)
-	    (rmail-update-menu-item undelete nil)
-	    (rmail-update-menu-item select nil))
-	(pop-to-buffer rmail-buffer)
-	(setq deleted-p (rmail-message-deleted-p curmsg))
-	(pop-to-buffer rmail-summary-buffer)
-	(let ((delete-menu-item 
-	       (car (find-menu-item current-menubar delete)))
-	      (undelete-menu-item 
-	       (car (find-menu-item current-menubar undelete)))
-	      (select-menu-item 
-	       (car (find-menu-item current-menubar select)))
-	      (msg (format "#%d" curmsg)))
-	  (aset delete-menu-item 2 (not deleted-p))
-	  (aset delete-menu-item 3 msg)
-	  (aset undelete-menu-item 2 deleted-p)
-	  (aset undelete-menu-item 3 msg)
-	  (aset select-menu-item 2 t)
-	  (aset select-menu-item 3 msg))))
-    (rmail-update-menu-item prev-page (> (window-start) (point-min)))
-    (rmail-update-menu-item next-page (< (window-end) (point-max)))))
-  
-(defun rmail-summary-mode-menu (event)
-  "Pops up a menu of applicable rmail summary commands."
-  (interactive "e")
-  (mouse-set-point event)
-  (beginning-of-line)
-  (rmail-summary-update-menubar)
-  (popup-menu rmail-summary-mode-menu))
-
-;; The following are for rmail mode 
-(defconst rmail-mode-menu
-  '("Rmail Commands"
-    ["Previous Page" scroll-down t]
-    ["Next Page" scroll-up t]
-    ["Top Of This Message" rmail-beginning-of-message t]
-    "----"
-    "Go To Message:"
-    "----"
-    ["Next Nondeleted Message" rmail-next-undeleted-message t]
-    ["Previous Nondeleted Message" rmail-previous-undeleted-message t]
-    ["Next Message" rmail-next-message t]
-    ["Previous Message" rmail-previous-message t]
-    ["First Message" rmail-show-message t]
-    ["Last Message" rmail-last-message t]
-    "----"
-    ["Delete This Message" rmail-delete-forward t]
-    ["Undelete This Message" rmail-undelete-previous-message t]
-    ["Save This Message" rmail-output-to-rmail-file t]
-    "----"
-    ["Reply This Message" rmail-reply t]
-    ["Forward This Message" rmail-forward t]
-;    ["Continue This Message" rmail-continue t]
-    "----"
-    ["Add Label" rmail-add-label t]
-    ["Kill Label" rmail-kill-label t]
-    ["Next Labeled Message" rmail-next-labeled-message t]
-    ["Previous Labeled Message" rmail-previous-labeled-message t]
-    ["Summary by Label" rmail-summary-by-labels t]
-    "----"
-    ["Summary" rmail-summary t]
-    ["Get New Mail" rmail-get-new-mail t]
-    ["rmail Input From" rmail-input t]
-    ["Expunge rmail" rmail-expunge t]
-    ["Expunge and Save" rmail-expunge-and-save t]
-    ["Quit rmail" rmail-quit t]))
-
-(defun rmail-update-menu-item (item p)
-  "If P is true, enable the menu item. O/w disable it."
-  (aset (car (or (find-menu-item current-menubar item)
-		 (error "couldn't find rmail menu item %S" item)))
-	2 p))
-
-(defun rmail-update-menubar ()
-  (let ((current-menubar rmail-mode-menu)
-	(prev-page '("Previous Page"))
-	(next-page '("Next Page"))
-	(top-page '("Top Of This Message"))
-	(real-next '("Next Message"))
-	(real-prev '("Previous Message"))
-	(undel-next '("Next Nondeleted Message"))
-	(undel-prev '("Previous Nondeleted Message"))
-	(delete '("Delete This Message"))
-	(undelete '("Undelete This Message"))
-	i)
-    ;; Disable/enable page-up/page-down menu items
-    (rmail-update-menu-item prev-page (> (window-start) (point-min)))
-    (rmail-update-menu-item next-page (< (window-end) (point-max)))
-    (rmail-update-menu-item top-page (> (window-start) (point-min)))
-    (rmail-update-menu-item real-next
-		      (/= rmail-current-message rmail-total-messages))
-    (rmail-update-menu-item real-prev (/= rmail-current-message 1))
-    (setq i (1+ rmail-current-message))
-    (while (and (<= i rmail-total-messages) (rmail-message-deleted-p i))
-      (setq i (1+ i)))
-    (rmail-update-menu-item undel-next (<= i rmail-total-messages))
-    (setq i (1- rmail-current-message))
-    (while (and (>= i 1) (rmail-message-deleted-p i))
-      (setq i (1- i)))
-    (rmail-update-menu-item undel-prev (>= i 1))
-    (rmail-update-menu-item delete 
-		      (not (rmail-message-deleted-p rmail-current-message)))
-    (rmail-update-menu-item undelete 
-		      (rmail-message-deleted-p rmail-current-message))
-    t))
-  
-(defun rmail-mode-menu (event)
-  "Pops up a menu of applicable rmail commands."
-  (interactive "e")
-  (select-window (event-window event))
-  (rmail-update-menubar)
-  (popup-menu rmail-mode-menu))
-
-(defun rmail-activate-menubar-hook ()
-  (cond ((eq major-mode 'rmail-mode)
-	 (rmail-update-menubar))
-	((eq major-mode 'rmail-summary-mode)
-	 (rmail-summary-update-menubar))))
-
-(add-hook 'activate-menubar-hook 'rmail-activate-menubar-hook)
-
-;;; Put message headers in boldface, etc...
-
-(require 'highlight-headers)
-
-(defun rmail-fontify-headers ()
-  (highlight-headers (point-min) (point-max) t))
-
-(add-hook 'rmail-show-message-hook 'rmail-fontify-headers)
-
-;; MENU and MENUBAR setup for both Rmail and Rmail summary buffers
-(defun rmail-install-menubar ()
-  (if (and current-menubar (not (assoc (car rmail-mode-menu) current-menubar)))
-      (let ((menu (cond ((eq major-mode 'rmail-mode) rmail-mode-menu)
-			((eq major-mode 'rmail-summary-mode)
-			 rmail-summary-mode-menu)
-			(t (error "not rmail or rmail summary mode")))))
-	(set-buffer-menubar (copy-sequence current-menubar))
-	(add-menu nil (car rmail-mode-menu) (cdr menu)))))
-
-(defun rmail-mode-menu-setup ()
-  (rmail-install-menubar)
-  (define-key rmail-mode-map 'button3 'rmail-mode-menu))
-
-(if (featurep 'menubar)
-    (add-hook 'rmail-mode-hook 'rmail-mode-menu-setup))
-
-(defun rmail-summary-mode-menu-setup ()
-  (rmail-install-menubar)
-  (define-key rmail-summary-mode-map 'button2 'rmail-summary-mouse-goto-msg)
-  (define-key rmail-summary-mode-map 'button3 'rmail-summary-mode-menu))
-
-(defun rmail-summary-mouse-goto-msg (e)
-  (interactive "e")
-  (mouse-set-point e)
-  (beginning-of-line)
-  (rmail-summary-goto-msg))
-
-(defun rmail-install-mouse-tracker ()
-  (require 'mode-motion)
-  (setq mode-motion-hook 'mode-motion-highlight-line))
-
-(add-hook 'rmail-summary-mode-hook 'rmail-install-mouse-tracker)
-(if (featurep 'menubar)
-    (add-hook 'rmail-summary-mode-hook 'rmail-summary-mode-menu-setup))
-
-
-(provide 'rmail-xemacs)
-
-;;; rmail-xemacs ends here
--- a/lisp/rmail/rmail.el	Mon Aug 13 10:01:24 2007 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,2339 +0,0 @@
-;;; rmail.el --- main code of "RMAIL" mail reader for Emacs.
-
-;; Copyright (C) 1985, 1986, 1987, 1988, 1993, 1994
-;;; Free Software Foundation, Inc.
-
-;; Maintainer: FSF
-;; Keywords: mail
-
-;; 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.
-
-;;; Code:
-
-;; Souped up by shane@mit-ajax based on ideas of rlk@athena.mit.edu
-;;   New features include attribute and keyword support, message
-;;   selection by dispatch table, summary by attributes and keywords,
-;;   expunging by dispatch table, sticky options for file commands.
-
-;; Extended by Bob Weiner of Motorola
-;;   New features include: rmail and rmail-summary buffers remain
-;;   synchronized and key bindings basically operate the same way in both
-;;   buffers, summary by topic or by regular expression, rmail-reply-prefix
-;;   variable, and a bury rmail buffer (wipe) command.
-;;
-
-(require 'mail-utils)
-
-;; For Emacs V18 compatibility
-(and (not (fboundp 'user-original-login-name))
-     (fboundp 'user-real-login-name)
-     (defalias 'user-original-login-name 'user-real-login-name))
-(and (not (fboundp 'buffer-disable-undo))
-     (fboundp 'buffer-flush-undo)
-     (defalias 'buffer-disable-undo 'buffer-flush-undo))
-
-; These variables now declared in paths.el.
-;(defvar rmail-spool-directory "/usr/spool/mail/"
-;  "This is the name of the directory used by the system mailer for\n\
-;delivering new mail.  It's name should end with a slash.")
-;(defvar rmail-file-name
-;  (expand-file-name "~/RMAIL")
-;  "")
-
-;;;###autoload
-(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.")
-
-;;;###autoload
-(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.")
-
-;;; XEmacs change: moved rmail-ignored-headers to sendmail.el for the
-;;; benefit of automatically generated autoloads.
-;;;minimalist FSF version
-;(defvar rmail-ignored-headers "^via:\\|^mail-from:\\|^origin:\\|^status:\\|^received:\\|^message-id:\\|^summary-line:" "\
-;*Gubbish headers one would rather not see.")
-
-;;;###autoload
-(defvar rmail-delete-after-output nil "\
-*Non-nil means automatically delete a message that is copied to a file.")
-
-;;;###autoload
-(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).")
-
-;;;###autoload
-(defvar rmail-mail-new-frame nil
-  "*Non-nil means Rmail makes a new frame for composing outgoing mail.")
-
-;;;###autoload
-(defvar rmail-retry-setup-hook nil
-  "Hook that `rmail-retry-failure' uses in place of `mail-setup-hook'.")
-
-;; These may be altered by site-init.el to match the format of mmdf files
-;;  delimiting used on a given host (delim1 and delim2 from the config
-;;  files).
-
-(defvar mmdf-delim1 "^\001\001\001\001\n"
-  "Regexp marking the start of an mmdf message")
-(defvar mmdf-delim2 "^\001\001\001\001\n"
-  "Regexp marking the end of an mmdf message")
-
-(defvar rmail-message-filter nil
-  "If non nil, is a filter function for new headers in RMAIL.
-Called with region narrowed to unformatted header.")
-
-(defvar rmail-reply-prefix "Re: "
-  "String to prepend to Subject line when replying to a message.")
-
-(defvar rmail-mode-map nil)
-
-(defvar rmail-inbox-list nil)
-(defvar rmail-keywords nil)
-
-;; Message counters and markers.  Deleted flags.
-
-(defvar rmail-current-message nil)
-(defvar rmail-total-messages nil)
-(defvar rmail-message-vector nil)
-(defvar rmail-deleted-vector nil)
-
-;; These are used by autoloaded rmail-summary.
-
-(defvar rmail-summary-buffer nil)
-(defvar rmail-summary-vector nil)
-
-;; `Sticky' default variables.
-
-;; Last individual label specified to a or k.
-(defvar rmail-last-label nil)
-;; Last set of values specified to C-M-n, C-M-p, C-M-s or C-M-l.
-(defvar rmail-last-multi-labels nil)
-;;;###autoload
-(defvar rmail-last-file nil)
-(defvar rmail-last-regexp nil)
-(defvar rmail-last-rmail-file (expand-file-name "~/XMAIL"))
-
-;;; Regexp matching the delimiter of messages in UNIX mail format
-;;; (UNIX From lines), minus the initial ^.  Note that if you change
-;;; this expression, you must change the code in rmail-nuke-pinhead-header
-;;; that knows the exact ordering of the \\( \\) subexpressions.
-(defvar rmail-unix-mail-delimiter
-  (let ((time-zone-regexp
-	 (concat "\\([A-Z]?[A-Z][A-Z][A-Z]\\( DST\\)?"
-		 "\\|[-+]?[0-9][0-9][0-9][0-9]"
-		 "\\|"
-		 "\\) *")))
-    (concat
-     "From "
-
-     ;; Username, perhaps with a quoted section that can contain spaces.
-     "\\("
-     "[^ \n]*"
-     "\\(\\|\".*\"[^ \n]*\\)"
-     "\\)  ?"
-
-     ;; The time the message was sent.
-     "\\([^ \n]*\\) *"			; day of the week
-     "\\([^ ]*\\) *"			; month
-     "\\([0-9]*\\) *"			; day of month
-     "\\([0-9:]*\\) *"			; time of day
-
-     ;; Perhaps a time zone, specified by an abbreviation, or by a
-     ;; numeric offset.
-     time-zone-regexp
-
-     ;; The year.
-     " [0-9][0-9]\\([0-9]*\\) *"
-
-     ;; On some systems the time zone can appear after the year, too.
-     time-zone-regexp
-
-     ;; I'm not sure what this is.
-     "\\(remote from [^\n]*\\)?"
-
-     "\n"))
-  )
-
-;; Perform BODY in the summary buffer
-;; in such a way that its cursor is properly updated in its own window.
-(defmacro rmail-select-summary (&rest body)
-  (` (progn (if (rmail-summary-displayed)
-		(let ((window (selected-window)))
-		  (save-excursion
-		    (unwind-protect
-			(progn
-			  (pop-to-buffer rmail-summary-buffer)
-			  (,@ body))
-		      (select-window window))))
-	      (save-excursion
-		(set-buffer rmail-summary-buffer)
-		(progn (,@ body))))
-	    (rmail-maybe-display-summary))))
-
-
-;;; 1996/12/9 by MORIOKA Tomohiko <morioka@jaist.ac.jp>
-
-;;; @ for mule and MIME
-;;;
-
-(require 'tm-view)
-
-(defconst rmail-support-mime t)
-(defvar rmail-show-mime t)
-(defvar rmail-show-mime-method (function rmail-show-mime-message))
-
-(defun rmail-show-all-header ()
-  (rmail-maybe-set-message-counters)
-  (narrow-to-region (rmail-msgbeg rmail-current-message) (point-max))
-  (let ((buffer-read-only nil))
-    (goto-char (point-min))
-    (forward-line 1)
-    (if (= (following-char) ?1)
-	(progn
-	  (delete-char 1)
-	  (insert ?0)
-	  (forward-line 1)
-	  (let ((case-fold-search t))
-	    (while (looking-at "Summary-Line:\\|Mail-From:")
-	      (forward-line 1)))
-	  (insert "*** EOOH ***\n")
-	  (forward-char -1)
-	  (search-forward "\n*** EOOH ***\n")
-	  (forward-line -1)
-	  (let ((temp (point)))
-	    (and (search-forward "\n\n" nil t)
-		 (delete-region temp (point))))
-	  (goto-char (point-min))
-	  (search-forward "\n*** EOOH ***\n")
-	  (narrow-to-region (point) (point-max)))
-      )))
-
-(defun rmail-show-mime-message ()
-  (rmail-show-all-header)
-  (let ((abuf (current-buffer))
-	(buf-name (format "*Preview-%s [%d/%d]*"
-			  (buffer-name)
-			  rmail-current-message rmail-total-messages))
-	buf win)
-    (if (and mime::article/preview-buffer
-	     (setq buf (get-buffer mime::article/preview-buffer))
-	     )
-	(progn
-	  (save-excursion
-	    (set-buffer buf)
-	    (rename-buffer buf-name)
-	    )
-	  (if (setq win (get-buffer-window buf))
-	      (progn
-		(delete-window (get-buffer-window abuf))
-		(set-window-buffer win abuf)
-		(set-buffer abuf)
-		))
-	  ))
-    (setq win (get-buffer-window abuf))
-    (save-window-excursion
-      (mime/viewer-mode nil nil nil nil buf-name rmail-mode-map)
-      (or buf
-	  (setq buf (current-buffer))
-	  )
-      )
-    (set-window-buffer win buf)
-    ))
-
-(set-alist 'mime-viewer/code-converter-alist
-	   'rmail-mode
-	   (function mime-charset/decode-buffer))
-
-(set-alist 'mime-viewer/quitting-method-alist
-	   'rmail-mode
-	   (function rmail-quit)
-	   )
-
-(set-alist 'mime-viewer/over-to-previous-method-alist
-	   'rmail-mode
-	   (function
-	    (lambda ()
-	      (rmail-previous-undeleted-message 1)
-	      )))
-
-(set-alist 'mime-viewer/over-to-next-method-alist
-	   'rmail-mode
-	   (function
-	    (lambda ()
-	      (rmail-next-undeleted-message 1)
-	      )))
-
-(set-alist 'mime-viewer/show-summary-method
-	   'rmail-mode
-	   (function rmail-summary))
-
-
-;;;; *** Rmail Mode ***
-
-;;;###autoload
-(defun rmail (&optional file-name-arg)
-  "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."
-  (interactive (if current-prefix-arg
-		   (list (read-file-name "Run rmail on RMAIL file: "
-					 nil nil t))))
-  (if (string-match "XEmacs" emacs-version)
-      (require 'rmail-xemacs))
-  (or rmail-last-file
-      (setq rmail-last-file (expand-file-name "~/xmail")))
-  (let* ((file-name (expand-file-name (or file-name-arg rmail-file-name)))
-	 (existed (get-file-buffer file-name)))
-    ;; Like find-file, but in the case where a buffer existed
-    ;; and the file was reverted, recompute the message-data.
-    (if (and existed (not (verify-visited-file-modtime existed)))
-	(progn
-	  ;; Don't be confused by apparent local-variables spec
-	  ;; in the last message in the RMAIL file.
-	  (let ((enable-local-variables nil))
-	    (find-file file-name))
-	  (if (and (verify-visited-file-modtime existed)
-		   (eq major-mode 'rmail-mode))
-	      (progn (rmail-forget-messages)
-		     (rmail-set-message-counters))))
-      (let ((enable-local-variables nil))
-	(find-file file-name)))
-    (if (eq major-mode 'rmail-edit-mode)
-	(error "Exit Rmail Edit mode before getting new mail."))
-    (if (and existed (> (buffer-size) 0))
-	;; Buffer not new and not empty; ensure in proper mode, but that's all.
-	(or (eq major-mode 'rmail-mode)
-	    (rmail-mode-2))
-      (rmail-mode-2)
-      ;; Convert all or part to Babyl file if possible.
-      (rmail-convert-file)
-      (goto-char (point-max))
-      (if (null rmail-inbox-list)
-	  (progn
-	    (rmail-set-message-counters)
-	    (rmail-show-message))))
-    (let ((existing-unseen (rmail-first-unseen-message)))
-      (or file-name-arg
-	  (rmail-get-new-mail))
-      ;; Show the first unseen message, which might be from a previous session
-      ;; or might have been just read in by rmail-get-new-mail.  Must
-      ;; determine already unseen messages first, as rmail-get-new-mail
-      ;; positions on the first new message, thus marking it as seen.
-      (rmail-show-message existing-unseen))))
-
-;; Given the value of MAILPATH, return a list of inbox file names.
-;; This is turned off because it is not clear that the user wants
-;; all these inboxes to feed into the primary rmail file.
-; (defun rmail-convert-mailpath (string)
-;   (let (idx list)
-;     (while (setq idx (string-match "[%:]" string))
-;       (let ((this (substring string 0 idx)))
-; 	(setq string (substring string (1+ idx)))
-; 	(setq list (cons (if (string-match "%" this)
-; 			     (substring this 0 (string-match "%" this))
-; 			   this)
-; 			 list))))
-;     list))
-
-;; Someone said:
-; I have checked that adding "-*- rmail -*-" to the BABYL OPTIONS line
-; will not cause emacs 18.55 problems.
-;; To which jwz responds: maybe so but it's damned annoying so don't do it.
-
-(defun rmail-convert-file ()
-  (let (convert)
-    (widen)
-    (goto-char (point-min))
-    ;; If file doesn't start like a Babyl file,
-    ;; convert it to one, by adding a header and converting each message.
-    (cond ((looking-at "BABYL OPTIONS:"))
-	  ((looking-at "Version: 5\n")
-	   ;; Losing babyl file made by old version of Rmail.
-	   ;; Just fix the babyl file header; don't make a new one,
-	   ;; so we don't lose the Labels: file attribute, etc.
-	   (let ((buffer-read-only nil))
-	     ;; NO NO NO
-	     ;;(insert "BABYL OPTIONS: -*- rmail -*-\n")
-	     (insert "BABYL OPTIONS:\n")))
-	  ((equal (point-min) (point-max))
-	   ;; Empty RMAIL file.  Just insert the header.
-	   (rmail-insert-rmail-file-header))
-	  (t
-	   ;; Non-empty file in non-RMAIL format.  Add header and convert.
-	   (setq convert t)
-	   (rmail-insert-rmail-file-header)))
-    ;; If file was not a Babyl file or if there are
-    ;; Unix format messages added at the end,
-    ;; convert file as necessary.
-    (if (or convert
-	    (save-excursion
-	      (goto-char (point-max))
-	      (search-backward "\^_")
-	      (forward-char 1)
-	      (looking-at "\n*From ")))
-	(let ((buffer-read-only nil))
-	  (message "Converting to Babyl format...")
-	  ;; If file needs conversion, convert it all,
-	  ;; except for the BABYL header.
-	  ;; (rmail-convert-to-babyl-format would delete the header.)
-	  (goto-char (point-min))
-	  (search-forward "\n\^_" nil t)
-	  (narrow-to-region (point) (point-max))
-	  (rmail-convert-to-babyl-format)
-	  (message "Converting to Babyl format...done")))))
-
-;;; I have checked that adding "-*- rmail -*-" to the BABYL OPTIONS line
-;;; will not cause emacs 18.55 problems.
-;;; (Whatever, see above. -jwz)
-
-(defun rmail-insert-rmail-file-header ()
-  (let ((buffer-read-only nil))
-    ;; NO NO NO a thousand times NO
-;;    (insert "BABYL OPTIONS: -*- rmail -*-
-    (insert "BABYL OPTIONS:
-Version: 5
-Labels:
-Note:   This is the header of an rmail file.
-Note:   If you are seeing it in rmail,
-Note:    it means the file has no messages in it.\n\^_")))
-
-(if rmail-mode-map
-    nil
-  (setq rmail-mode-map (make-keymap))
-  (suppress-keymap rmail-mode-map)
-  (define-key rmail-mode-map "a"      'rmail-add-label)
-  (define-key rmail-mode-map "b"      'rmail-bury)
-  (define-key rmail-mode-map "c"      'rmail-continue)
-  (define-key rmail-mode-map "d"      'rmail-delete-forward)
-  (define-key rmail-mode-map "\C-d"   'rmail-delete-backward)
-  (define-key rmail-mode-map "e"      'rmail-edit-current-message)
-  (define-key rmail-mode-map "f"      'rmail-forward)
-  (define-key rmail-mode-map "g"      'rmail-get-new-mail)
-  (define-key rmail-mode-map "h"      'rmail-summary)
-  (define-key rmail-mode-map "i"      'rmail-input)
-  (define-key rmail-mode-map "j"      'rmail-show-message)
-  (define-key rmail-mode-map "k"      'rmail-kill-label)
-  (define-key rmail-mode-map "l"      'rmail-summary-by-labels)
-  (define-key rmail-mode-map "\e\C-h" 'rmail-summary)
-  (define-key rmail-mode-map "\e\C-l" 'rmail-summary-by-labels)
-  (define-key rmail-mode-map "\e\C-r" 'rmail-summary-by-recipients)
-  (define-key rmail-mode-map "\e\C-s" 'rmail-summary-by-regexp)
-  (define-key rmail-mode-map "\e\C-t" 'rmail-summary-by-topic)
-  (define-key rmail-mode-map "m"      'rmail-mail)
-  (define-key rmail-mode-map "\em"    'rmail-retry-failure)
-  (define-key rmail-mode-map "n"      'rmail-next-undeleted-message)
-  (define-key rmail-mode-map "\en"    'rmail-next-message)
-  (define-key rmail-mode-map "\e\C-n" 'rmail-next-labeled-message)
-  (define-key rmail-mode-map "o"      'rmail-output-to-rmail-file)
-  (define-key rmail-mode-map "\C-o"   'rmail-output)
-  (define-key rmail-mode-map "p"      'rmail-previous-undeleted-message)
-  (define-key rmail-mode-map "\ep"    'rmail-previous-message)
-  (define-key rmail-mode-map "\e\C-p" 'rmail-previous-labeled-message)
-  (define-key rmail-mode-map "q"      'rmail-quit)
-  (define-key rmail-mode-map "r"      'rmail-reply)
-;; I find I can't live without the default M-r command -- rms.
-;;  (define-key rmail-mode-map "\er"  'rmail-search-backwards)
-  (define-key rmail-mode-map "s"      'rmail-expunge-and-save)
-  (define-key rmail-mode-map "\es"    'rmail-search)
-  (define-key rmail-mode-map "t"      'rmail-toggle-header)
-  (define-key rmail-mode-map "u"      'rmail-undelete-previous-message)
-  (define-key rmail-mode-map "w"      'rmail-edit-current-message)
-  (define-key rmail-mode-map "x"      'rmail-expunge)
-  (define-key rmail-mode-map "."      'rmail-beginning-of-message)
-  (define-key rmail-mode-map "<"      'rmail-first-message)
-  (define-key rmail-mode-map ">"      'rmail-last-message)
-  (define-key rmail-mode-map " "      'scroll-up)
-  (define-key rmail-mode-map "\177"   'scroll-down)
-  (define-key rmail-mode-map "?"      'describe-mode)
-  (define-key rmail-mode-map "\C-c\C-s\C-d" 'rmail-sort-by-date)
-  (define-key rmail-mode-map "\C-c\C-s\C-s" 'rmail-sort-by-subject)
-  (define-key rmail-mode-map "\C-c\C-s\C-a" 'rmail-sort-by-author)
-  (define-key rmail-mode-map "\C-c\C-s\C-r" 'rmail-sort-by-recipient)
-  (define-key rmail-mode-map "\C-c\C-s\C-c" 'rmail-sort-by-correspondent)
-  (define-key rmail-mode-map "\C-c\C-s\C-l" 'rmail-sort-by-lines)
-  )
-
-;(define-key rmail-mode-map [menu-bar] (make-sparse-keymap))
-;
-;(define-key rmail-mode-map [menu-bar classify]
-;  (cons "Classify" (make-sparse-keymap "Classify")))
-;
-;(define-key rmail-mode-map [menu-bar classify output-inbox]
-;  '("Output (inbox)" . rmail-output))
-;
-;(define-key rmail-mode-map [menu-bar classify output]
-;  '("Output (Rmail)" . rmail-output-to-rmail-file))
-;
-;(define-key rmail-mode-map [menu-bar classify kill-label]
-;  '("Kill Label" . rmail-kill-label))
-;
-;(define-key rmail-mode-map [menu-bar classify add-label]
-;  '("Add Label" . rmail-add-label))
-;
-;(define-key rmail-mode-map [menu-bar summary]
-;  (cons "Summary" (make-sparse-keymap "Summary")))
-;
-;(define-key rmail-mode-map [menu-bar summary labels]
-;  '("By Labels" . rmail-summary-by-labels))
-;
-;(define-key rmail-mode-map [menu-bar summary recipients]
-;  '("By Recipients" . rmail-summary-by-recipients))
-;
-;(define-key rmail-mode-map [menu-bar summary topic]
-;  '("By Topic" . rmail-summary-by-topic))
-;
-;(define-key rmail-mode-map [menu-bar summary regexp]
-;  '("By Regexp" . rmail-summary-by-regexp))
-;
-;(define-key rmail-mode-map [menu-bar summary all]
-;  '("All" . rmail-summary))
-;
-;(define-key rmail-mode-map [menu-bar mail]
-;  (cons "Mail" (make-sparse-keymap "Mail")))
-;
-;(define-key rmail-mode-map [menu-bar mail continue]
-;  '("Continue" . rmail-continue))
-;
-;(define-key rmail-mode-map [menu-bar mail forward]
-;  '("Forward" . rmail-forward))
-;
-;(define-key rmail-mode-map [menu-bar mail retry]
-;  '("Retry" . rmail-retry-failure))
-;
-;(define-key rmail-mode-map [menu-bar mail reply]
-;  '("Reply" . rmail-reply))
-;
-;(define-key rmail-mode-map [menu-bar mail mail]
-;  '("Mail" . rmail-mail))
-;
-;(define-key rmail-mode-map [menu-bar delete]
-;  (cons "Delete" (make-sparse-keymap "Delete")))
-;
-;(define-key rmail-mode-map [menu-bar delete expunge/save]
-;  '("Expunge/Save" . rmail-expunge-and-save))
-;
-;(define-key rmail-mode-map [menu-bar delete expunge]
-;  '("Expunge" . rmail-expunge))
-;
-;(define-key rmail-mode-map [menu-bar delete undelete]
-;  '("Undelete" . rmail-undelete-previous-message))
-;
-;(define-key rmail-mode-map [menu-bar delete delete]
-;  '("Delete" . rmail-delete-forward))
-;
-;(define-key rmail-mode-map [menu-bar move]
-;  (cons "Move" (make-sparse-keymap "Move")))
-;
-;(define-key rmail-mode-map [menu-bar move search-back]
-;  '("Search Back" . rmail-search-backward))
-;
-;(define-key rmail-mode-map [menu-bar move search]
-;  '("Search" . rmail-search))
-;
-;(define-key rmail-mode-map [menu-bar move previous]
-;  '("Previous Nondeleted" . rmail-previous-undeleted-message))
-;
-;(define-key rmail-mode-map [menu-bar move next]
-;  '("Next Nondeleted" . rmail-next-undeleted-message))
-;
-;(define-key rmail-mode-map [menu-bar move last]
-;  '("Last" . rmail-last-message))
-;
-;(define-key rmail-mode-map [menu-bar move first]
-;  '("First" . rmail-first-message))
-;
-;(define-key rmail-mode-map [menu-bar move previous]
-;  '("Previous" . rmail-previous-message))
-;
-;(define-key rmail-mode-map [menu-bar move next]
-;  '("Next" . rmail-next-message))
-
-;; Rmail mode is suitable only for specially formatted data.
-(put 'rmail-mode 'mode-class 'special)
-
-;;;###autoload
-(defun rmail-mode ()
-  "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."
-  (interactive)
-  (rmail-mode-2)
-  (rmail-set-message-counters)
-  (rmail-show-message rmail-total-messages))
-
-(defun rmail-mode-2 ()
-  (kill-all-local-variables)
-  (rmail-mode-1)
-  (rmail-variables)
-  (run-hooks 'rmail-mode-hook))
-
-(defun rmail-mode-1 ()
-  (setq major-mode 'rmail-mode)
-  (setq mode-name "RMAIL")
-  (setq buffer-read-only t)
-  ;; No need to auto save RMAIL files.
-  ;; says who??? (asks jwz)
-;;  (setq buffer-auto-save-file-name nil)
-  (if (boundp 'mode-line-modified)
-      (setq mode-line-modified "--- ")
-    (setq mode-line-format
-	  (cons "--- " (cdr (default-value 'mode-line-format)))))
-  (use-local-map rmail-mode-map)
-  (set-syntax-table text-mode-syntax-table)
-  (setq local-abbrev-table text-mode-abbrev-table))
-
-(defun rmail-variables ()
-  (make-local-variable 'revert-buffer-function)
-  (setq revert-buffer-function 'rmail-revert)
-  (make-local-variable 'rmail-last-label)
-  (make-local-variable 'rmail-last-regexp)
-  (make-local-variable 'rmail-deleted-vector)
-  (make-local-variable 'rmail-summary-buffer)
-  (make-local-variable 'rmail-summary-vector)
-  (make-local-variable 'rmail-current-message)
-  (make-local-variable 'rmail-total-messages)
-  (make-local-variable 'require-final-newline)
-  (setq require-final-newline nil)
-  (make-local-variable 'version-control)
-  (setq version-control 'never)
-  (make-local-variable 'file-precious-flag)
-  (setq file-precious-flag t)
-  (make-local-variable 'rmail-message-vector)
-  (make-local-variable 'rmail-last-file)
-  (make-local-variable 'rmail-inbox-list)
-  (setq rmail-inbox-list (rmail-parse-file-inboxes))
-  ;; Provide default set of inboxes for primary mail file ~/RMAIL.
-  (and (null rmail-inbox-list)
-       (or (equal buffer-file-name (expand-file-name rmail-file-name))
-	   (equal buffer-file-truename
-		  (abbreviate-file-name (file-truename rmail-file-name))))
-       (setq rmail-inbox-list
-	     (or rmail-primary-inbox-list
-		 ;; XEmacs change: FSF had removed "~/mbox" from this list, 
-		 ;; but users expect that to work and don't understand why
-		 ;; it changed.
-		 (list "~/mbox"
-		       (or (getenv "MAIL")
-			   (concat rmail-spool-directory
-				   (user-original-login-name)))))))
-  (make-local-variable 'rmail-keywords)
-  ;; this gets generated as needed
-  (setq rmail-keywords nil))
-
-;; Handle M-x revert-buffer done in an rmail-mode buffer.
-(defun rmail-revert (arg noconfirm)
-  (let (revert-buffer-function)
-    ;; Call our caller again, but this time it does the default thing.
-    (if (revert-buffer arg noconfirm)
-	;; If the user said "yes", and we changed something,
-	;; reparse the messages.
-	(progn
-	  (rmail-convert-file)
-	  (goto-char (point-max))
-	  (rmail-set-message-counters)
-	  (rmail-show-message)))))
-
-;; Return a list of files from this buffer's Mail: option.
-;; Does not assume that messages have been parsed.
-;; Just returns nil if buffer does not look like Babyl format.
-(defun rmail-parse-file-inboxes ()
-  (save-excursion
-    (save-restriction
-      (widen)
-      (goto-char 1)
-      (cond ((looking-at "BABYL OPTIONS:")
-	     (search-forward "\n\^_" nil 'move)
-	     (narrow-to-region 1 (point))
-	     (goto-char 1)
-	     (if (search-forward "\nMail:" nil t)
-		 (progn
-		   (narrow-to-region (point) (progn (end-of-line) (point)))
-		   (goto-char (point-min))
-		   (mail-parse-comma-list))))))))
-
-(defun rmail-expunge-and-save ()
-  "Expunge and save RMAIL file."
-  (interactive)
-  (rmail-expunge)
-  (save-buffer))
-
-(defun rmail-quit ()
-  "Quit out of RMAIL."
-  (interactive)
-  (if (eq major-mode 'mime/viewer-mode)
-      (let ((buf mime::preview/article-buffer)
-	    (pbuf (current-buffer))
-	    )
-	(switch-to-buffer buf)
-	(bury-buffer pbuf)
-	))
-  (let (rmail-show-mime)
-    (rmail-expunge-and-save)
-    )
-  ;; Don't switch to the summary buffer even if it was recently visible.
-  (if (rmail-summary-exists)
-      (bury-buffer rmail-summary-buffer))
-  (let ((obuf (current-buffer)))
-    (switch-to-buffer (other-buffer))
-    (bury-buffer obuf)))
-
-;;;###autoload
-(defun rmail-input (filename)
-  "Run Rmail on file FILENAME."
-  (interactive "FRun rmail on RMAIL file: ")
-  (rmail filename))
-
-
-;;;; *** Rmail input ***
-
-;; RLK feature not added in this version:
-;; argument specifies inbox file or files in various ways.
-
-(defun rmail-get-new-mail (&optional file-name)
-  "Move any new mail from this RMAIL file's inbox files.
-The inbox files can be specified with the file's Mail: option.  The
-variable `rmail-primary-inbox-list' specifies the inboxes for your
-primary RMAIL file if it has no Mail: option.  By default, this is
-your /usr/spool/mail/$USER.
-
-You can also specify the file to get new mail from.  In this case, the
-file of new mail is not changed or deleted.  Noninteractively, you can
-pass the inbox file name as an argument.  Interactively, a prefix
-argument causes us to read a file name and use that file as the inbox."
-  (interactive
-   (list (if current-prefix-arg
-	     (read-file-name "Get new mail from file: "))))
-  (or (verify-visited-file-modtime (current-buffer))
-      (progn
-	(find-file (buffer-file-name))
-	(setq buffer-read-only t)
-	(if (verify-visited-file-modtime (current-buffer))
-	    (rmail-forget-messages))))
-  (rmail-maybe-set-message-counters)
-  (widen)
-  ;; Get rid of all undo records for this buffer.
-  (or (eq buffer-undo-list t)
-      (setq buffer-undo-list nil))
-  (unwind-protect
-      (let ((opoint (point))
-	    (new-messages 0)
-	    (delete-files ())
-	    ;; If buffer has not changed yet, and has not been saved yet,
-	    ;; don't replace the old backup file now.
-	    (make-backup-files (and make-backup-files (buffer-modified-p)))
-	    (buffer-read-only nil)
-	    ;; Don't make undo records for what we do in getting mail.
-	    (buffer-undo-list t))
-	(goto-char (point-max))
-	(skip-chars-backward " \t\n")	    ; just in case of brain damage
-	(delete-region (point) (point-max)) ; caused by require-final-newline
-	(save-excursion
-	  (save-restriction
-	    (narrow-to-region (point) (point))
-	    ;; Read in the contents of the inbox files,
-	    ;; renaming them as necessary,
-	    ;; and adding to the list of files to delete eventually.
-	    (if file-name
-		(rmail-insert-inbox-text (list file-name) nil)
-	      (setq delete-files (rmail-insert-inbox-text rmail-inbox-list t)))
-	    ;; Scan the new text and convert each message to babyl format.
-	    (goto-char (point-min))
-	    (save-excursion
-	      (setq new-messages (rmail-convert-to-babyl-format)))
-	    (or (zerop new-messages)
-		(progn ;;let (success)
-		  (widen)
-		  (search-backward "\n\^_")
-		  (narrow-to-region (point) (point-max))
-		  (goto-char (1+ (point-min)))
-		  (rmail-count-new-messages)
-		  (save-buffer)))
-	    ;; Delete the old files, now that babyl file is saved.
-	    (while delete-files
-	      (condition-case ()
-		  ;; First, try deleting.
-		  (condition-case ()
-		      (delete-file (car delete-files))
-		    (file-error
-		     ;; If we can't delete it, truncate it.
-		     (write-region (point) (point) (car delete-files))))
-		(file-error nil))
-	      (setq delete-files (cdr delete-files)))))
-	(if (= new-messages 0)
-	    (progn (goto-char opoint)
-		   (if (or file-name rmail-inbox-list)
-		       (message "(No new mail has arrived)")))
-	  (if (rmail-summary-exists)
-	      (rmail-select-summary
-		(rmail-update-summary)))
-	  (message "%d new message%s read"
-		   new-messages (if (= 1 new-messages) "" "s"))
-	  ;; #### BOGUS!  Run a hook here instead and let time.el do it.
-	  (and (boundp 'display-time-string)
-	       display-time-string
-	       (stringp display-time-string)
-	       (string-match " Mail" display-time-string)
-	       (setq display-time-string
-		     (concat
-		      (substring display-time-string 0 (match-beginning 0))
-		      (substring display-time-string (match-end 0))))
-	       (force-mode-line-update 'all))))
-    ;; Don't leave the buffer screwed up if we get a disk-full error.
-    (rmail-show-message)))
-
-(defun rmail-insert-inbox-text (files renamep)
-  (let (file tofile delete-files movemail popmail)
-    (while files
-      (setq file (expand-file-name (substitute-in-file-name (car files)))
-	    ;;>> un*x specific <<
-	    ;; The "+" used to be "~", which is an extremely poor choice;
-	    ;; it might accidentally be deleted when space is low
-	    ;; (as happened to me!).
-	    tofile (concat file "+"))
-      ;; If getting from mail spool directory,
-      ;; use movemail to move rather than just renaming,
-      ;; so as to interlock with the mailer.
-      (setq movemail (equal (file-name-directory file) rmail-spool-directory)
-	    popmail (string-match "^po:" (file-name-nondirectory file)))
-      (if popmail (setq file (file-name-nondirectory file)
-			renamep t))
-      (if movemail
-	  (progn
-	    (setq tofile (expand-file-name
-			   ;; Generate name to move to from inbox name,
-			   ;; in case of multiple inboxes that need moving.
-			   (concat ".newmail-" (file-name-nondirectory file))
-			   ;; Use the directory of this rmail file
-			   ;; because it's a nuisance to use the homedir
-			   ;; if that is on a full disk and this rmail
-			   ;; file isn't.
-			   (file-name-directory
-			     (expand-file-name buffer-file-name))))
-	    ;; On some systems, /usr/spool/mail/foo is a directory
-	    ;; and the actual inbox is /usr/spool/mail/foo/foo.
-	    (if (file-directory-p file)
-		(setq file (expand-file-name (user-original-login-name)
-					     file)))))
-      (if popmail
-	  (message "Getting mail from post office ...")
-	(if (or (and (file-exists-p tofile)
-		     (/= 0 (nth 7 (file-attributes tofile))))
-		(and (file-exists-p file)
-		     (/= 0 (nth 7 (file-attributes file)))))
-	    (message "Getting mail from %s..." file)))
-      ;; Set TOFILE if have not already done so, and
-      ;; rename or copy the file FILE to TOFILE if and as appropriate.
-      (cond ((not renamep)
-	     (setq tofile file))
-	    ((or (file-exists-p tofile) (and (not popmail)
-					     (not (file-exists-p file))))
-	     nil)
-	    ((and (not movemail) (not popmail))
-	     ;; Try copying.  If that fails (perhaps no space),
-	     ;; rename instead.
-	     (condition-case nil
-		 (copy-file file tofile nil)
-	       (error
-		(rename-file file tofile nil)))
-	     ;; Make the real inbox file empty.
-	     ;; Leaving it deleted could cause lossage
-	     ;; because mailers often won't create the file.
-	     (condition-case ()
-		 (write-region (point) (point) file)
-	       (file-error nil)))
-	    (t
-	     (let ((errors nil))
-	       (unwind-protect
-		   (save-excursion
-		     (setq errors (generate-new-buffer " *rmail loss*"))
-		     (buffer-disable-undo errors)
-		     (call-process
-		       (expand-file-name "movemail" exec-directory)
-		       nil errors nil file tofile)
-		     (if (not (buffer-modified-p errors))
-			 ;; No output => movemail won
-			 nil
-		       (set-buffer errors)
-		       (subst-char-in-region (point-min) (point-max)
-					     ?\n ?\  )
-		       (goto-char (point-max))
-		       (skip-chars-backward " \t")
-		       (delete-region (point) (point-max))
-		       (goto-char (point-min))
-		       (if (looking-at "movemail: ")
-			   (delete-region (point-min) (match-end 0)))
-		       (beep t)
-		       (message (concat "movemail: "
-					(buffer-substring (point-min)
-							  (point-max))))
-		       (sit-for 3)
-		       nil))
-		 (if errors (kill-buffer errors))))))
-      ;; At this point, TOFILE contains the name to read:
-      ;; Either the alternate name (if we renamed)
-      ;; or the actual inbox (if not renaming).
-      (if (file-exists-p tofile)
-	  (let (size)
-	    (goto-char (point-max))
-	    (if (not (featurep 'mule))
-		(setq size (nth 1 (insert-file-contents tofile)))
-	      ;; At first, read the file without converting coding-system.
-	      (setq size (nth 1 (let ((coding-system-for-read 'no-conversion))
-				  (insert-file-contents tofile))))
-	      ;; 1996/12/9 by MORIOKA Tomohiko <morioka@jaist.ac.jp>
-	      ;;	Don't code-convert for RMAIL file
-	      ;; Then, convert the contents if necessary.
-              ;; (if (> size 0)
-              ;;     (cond
-              ;;      ((looking-at "^From ")
-              ;;       ;; New mails.  Since the contents may be a mixture
-              ;;       ;; of various coding-systems, we must decode one
-              ;;       ;; mail by one.
-              ;;       (while (null (eobp))
-              ;;         (let ((from (point)))
-              ;;           (re-search-forward "^From " nil 'mv)
-              ;;           (rmail-decode-coding-system from (point)))))
-              ;;      ((looking-at "BABYL OPTIONS:\\|\^L")
-              ;;       ;; Babyl format, i.e. not a new mail.  We had better
-              ;;       ;; not to convert large region at once.
-              ;;       (while (null (eobp))
-              ;;         (let ((max-size (* 1024 1024))
-              ;;               (from (point)))
-              ;;           (goto-char (+ from max-size))
-              ;;           (re-search-forward "\^_" nil 'mv)
-              ;;           (rmail-decode-coding-system from (point)))))
-              ;;      (t
-              ;;       ;; Perhaps, MMDF format.  Since I don't know how to
-              ;;       ;; deal with it, convert all data at once.
-              ;;       (rmail-decode-coding-system (point) (point-max)))))
-	      )
-	    (goto-char (point-max))
-	    (or (= (preceding-char) ?\n)
-		(zerop size)
-		(insert ?\n))
-	    (setq delete-files (cons tofile delete-files))))
-      (message "")
-      (setq files (cdr files)))
-    delete-files))
-
-;; (if (not (featurep 'mule)) nil
-;; 
-;; (defvar mail-coding-system '*junet*)
-;; 
-;; (defun rmail-decode-coding-system (from to)
-;;   (let (coding-system)
-;;     ;; At first, detect the coding-system of the region and set it to
-;;     ;; `coding-system'.
-;;     (let ((detected-coding-system (code-detect-region from to))
-;;           (coding (get-code mail-coding-system)))
-;;       (if (listp detected-coding-system)
-;;           ;; Something other than ASCII was found.  If a coding-system
-;;           ;; of which information is same as `mail-coding-system' is
-;;           ;; in the list of detected coding-systems, use it, else use
-;;           ;; the coding-system of the highest priority in the list.
-;;           (let ((l detected-coding-system))
-;;             (while (and l
-;;                         (null (eq (get-code (car l)) coding)))
-;;               (setq l (cdr l)))
-;;             (setq coding-system (car (or l detected-coding-system))))))
-;;     ;; Then, decode the region.
-;;     (if coding-system
-;;         (save-restriction
-;;           (narrow-to-region from to)
-;;           (code-convert from to coding-system '*internal*)
-;;           (goto-char (point-max))))))
-;; 
-;; ) ; (featurep 'mule)
-
-;; the  rmail-break-forwarded-messages  feature is not implemented
-(defun rmail-convert-to-babyl-format ()
-  (let ((count 0) start
-	(case-fold-search nil)
-	(invalid-input-resync
-	 (function (lambda ()
-		     (message "Invalid Babyl format in inbox!")
-		     (sit-for 1)
-		     ;; Try to get back in sync with a real message.
-		     (if (re-search-forward
-			  (concat mmdf-delim1 "\\|^From") nil t)
-			 (beginning-of-line)
-		       (goto-char (point-max)))))))
-    (goto-char (point-min))
-    (save-restriction
-      (while (not (eobp))
-	(cond ((looking-at "BABYL OPTIONS:");Babyl header
-	       (if (search-forward "\n\^_" nil t)
-		   ;; If we find the proper terminator, delete through there.
-		   (delete-region (point-min) (point))
-		 (funcall invalid-input-resync)
-		 (delete-region (point-min) (point))))
-	      ;; Babyl format message
-	      ((looking-at "\^L")
-	       (or (search-forward "\n\^_" nil t)
-		   (funcall invalid-input-resync))
-	       (setq count (1+ count))
-	       ;; Make sure there is no extra white space after the ^_
-	       ;; at the end of the message.
-	       ;; Narrowing will make sure that whatever follows the junk
-	       ;; will be treated properly.
-	       (delete-region (point)
-			      (save-excursion
-				(skip-chars-forward " \t\n")
-				(point)))
-	       (narrow-to-region (point) (point-max)))
-	      ;;*** MMDF format
-	      ((let ((case-fold-search t))
-		 (looking-at mmdf-delim1))
-	       (let ((case-fold-search t))
-		 (replace-match "\^L\n0, unseen,,\n*** EOOH ***\n")
-		 (setq start (point))
-		 (re-search-forward mmdf-delim2 nil t)
-		 (replace-match "\^_"))
-	       (save-excursion
-		 (save-restriction
-		   (narrow-to-region start (1- (point)))
-		   (goto-char (point-min))
-		   (while (search-forward "\n\^_" nil t); single char "\^_"
-		     (replace-match "\n^_")))); 2 chars: "^" and "_"
-	       (narrow-to-region (point) (point-max))
-	       (setq count (1+ count)))
-	      ;;*** Mail format
-	      ((looking-at "^From ")
-	       (setq start (point))
-	       (insert "\^L\n0, unseen,,\n*** EOOH ***\n")
-	       (rmail-nuke-pinhead-header)
-	       ;; If this message has a Content-Length field,
-	       ;; skip to the end of the contents.
-	       (let* ((header-end (save-excursion
-				    (and (re-search-forward "\n\n" nil t)
-					 (point))))
-		      (case-fold-search t)
-		      (size
-		       ;; Get the numeric value from the Content-Length field.
-		       (save-excursion
-			 ;; Back up to end of prev line,
-			 ;; in case the Content-Length field comes first.
-			 (forward-char -1)
-			 (and (search-forward "\ncontent-length: "
-					      header-end t)
-			      (let ((beg (point))
-				    (eol (progn (end-of-line) (point))))
-				(read (buffer-substring beg eol)))))))
-		 (and size (numberp size) (>= size 0)
-		      (goto-char (+ header-end size))))
-
-	       (if (re-search-forward
-		    (concat "^[\^_]?\\("
-			    rmail-unix-mail-delimiter
-			    "\\|"
-			    mmdf-delim1 "\\|"
-			    "^BABYL OPTIONS:\\|"
-			    "\^L\n[01],\\)") nil t)
-		   (goto-char (match-beginning 1))
-		 (goto-char (point-max)))
-	       (setq count (1+ count))
-	       (save-excursion
-		 (save-restriction
-		   (narrow-to-region start (point))
-		   (goto-char (point-min))
-		   (while (search-forward "\n\^_" nil t); single char
-		     (replace-match "\n^_")))); 2 chars: "^" and "_"
-	       (insert ?\^_)
-	       (narrow-to-region (point) (point-max)))
-	      ;;
-	      ;; This kludge is because some versions of sendmail.el
-	      ;; insert an extra newline at the beginning that shouldn't
-	      ;; be there.  sendmail.el has been fixed, but old versions
-	      ;; may still be in use.  -- rms, 7 May 1993.
-	      ((eolp) (delete-char 1))
-	      (t (error "Cannot convert to babyl format")))))
-    count))
-
-;; Delete the "From ..." line, creating various other headers with
-;; information from it if they don't already exist.  Now puts the
-;; original line into a mail-from: header line for debugging and for
-;; use by the rmail-output function.
-(defun rmail-nuke-pinhead-header ()
-  (save-excursion
-    (save-restriction
-      (let ((start (point))
-  	    (end (progn
-		   (condition-case ()
-		       (search-forward "\n\n")
-		     (error
-		      (goto-char (point-max))
-		      (insert "\n\n")))
-		   (point)))
-	    has-from has-date)
-	(narrow-to-region start end)
-	(let ((case-fold-search t))
-	  (goto-char start)
-	  (setq has-from (search-forward "\nFrom:" nil t))
-	  (goto-char start)
-	  (setq has-date (and (search-forward "\nDate:" nil t) (point)))
-	  (goto-char start))
-	(let ((case-fold-search nil))
-	  (if (re-search-forward (concat "^" rmail-unix-mail-delimiter) nil t)
-	      (replace-match
-		(concat
-		  "Mail-from: \\&"
-		  ;; Keep and reformat the date if we don't
-		  ;;  have a Date: field.
-		  (if has-date
-		      ""
-		    (concat
-		     "Date: \\3, \\5 \\4 \\9 \\6 "
-		    
-		     ;; The timezone could be matched by group 7 or group 10.
-		     ;; If neither of them matched, assume EST, since only
-		     ;; Easterners would be so sloppy.
-		     ;; It's a shame the substitution can't use "\\10".
-		     (cond
-		      ((/= (match-beginning 7) (match-end 7)) "\\7")
-		      ((/= (match-beginning 10) (match-end 10))
-		       (buffer-substring (match-beginning 10)
-					 (match-end 10)))
-		      (t "EST"))
-		     "\n"))
-		  ;; Keep and reformat the sender if we don't
-		  ;; have a From: field.
-		  (if has-from
-		      ""
-		    "From: \\1\n"))
-		t)))))))
-
-;;;; *** Rmail Message Formatting and Header Manipulation ***
-
-(defun rmail-reformat-message (beg end)
-  (goto-char beg)
-  (forward-line 1)
-  (if (/= (following-char) ?0)
-      (error "Bad format in RMAIL file."))
-  (let ((buffer-read-only nil)
-	(delta (- (buffer-size) end)))
-    (delete-char 1)
-    (insert ?1)
-    (forward-line 1)
-    (let ((case-fold-search t))
-      (while (looking-at "Summary-line:\\|Mail-From:")
- 	(forward-line 1)))
-    (if (looking-at "\\*\\*\\* EOOH \\*\\*\\*\n")
-	(delete-region (point)
-		       (progn (forward-line 1) (point))))
-    (let ((str (buffer-substring (point)
-				 (save-excursion (search-forward "\n\n" end 'move)
-						 (point)))))
-      (insert str "*** EOOH ***\n")
-      (narrow-to-region (point) (- (buffer-size) delta)))
-    (goto-char (point-min))
-    (if rmail-ignored-headers (rmail-clear-headers))
-    (if rmail-message-filter (funcall rmail-message-filter))))
-
-(defun rmail-clear-headers ()
-  (if (search-forward "\n\n" nil t)
-      (save-restriction
-        (narrow-to-region (point-min) (point))
-	(let ((buffer-read-only nil))
-	  (while (let ((case-fold-search t))
-		   (goto-char (point-min))
-		   (re-search-forward rmail-ignored-headers nil t))
-	    (beginning-of-line)
-	    (delete-region (point)
-			   (progn (re-search-forward "\n[^ \t]")
-				  (forward-char -1)
-				  (point))))))))
-
-(defun rmail-toggle-header ()
-  "Show original message header if pruned header currently shown, or vice versa."
-  (interactive)
-  (rmail-maybe-set-message-counters)
-  (narrow-to-region (rmail-msgbeg rmail-current-message) (point-max))
-  (let ((buffer-read-only nil))
-    (goto-char (point-min))
-    (forward-line 1)
-    (if (= (following-char) ?1)
-	(progn (delete-char 1)
-	       (insert ?0)
-	       (forward-line 1)
-	       (let ((case-fold-search t))
- 		 (while (looking-at "Summary-Line:\\|Mail-From:")
- 		   (forward-line 1)))
-	       (insert "*** EOOH ***\n")
-	       (forward-char -1)
-	       (search-forward "\n*** EOOH ***\n")
-	       (forward-line -1)
-	       (let ((temp (point)))
-		 (and (search-forward "\n\n" nil t)
-		      (delete-region temp (point))))
-	       (goto-char (point-min))
-	       (search-forward "\n*** EOOH ***\n")
-	       (narrow-to-region (point) (point-max)))
-      (rmail-reformat-message (point-min) (point-max)))))
-
-;;;; *** Rmail Attributes and Keywords ***
-
-;; Make a string describing current message's attributes and keywords
-;; and set it up as the name of a minor mode
-;; so it will appear in the mode line.
-(defun rmail-display-labels ()
-  (let ((blurb "") (beg (point-min-marker)) (end (point-max-marker)))
-    (save-excursion
-      (unwind-protect
-	  (progn
-	    (widen)
-	    (goto-char (rmail-msgbeg rmail-current-message))
-	    (forward-line 1)
-	    (if (looking-at "[01],")
-		(progn
-		  (narrow-to-region (point) (progn (end-of-line) (point)))
-		  ;; Truly valid BABYL format requires a space before each
-		  ;; attribute or keyword name.  Put them in if missing.
-		  (let (buffer-read-only)
-		    (goto-char (point-min))
-		    (while (search-forward "," nil t)
-		      (or (looking-at "[ ,]") (eobp)
-			  (insert " "))))
-		  (goto-char (point-max))
-		  (if (search-backward ",," nil 'move)
-		      (progn
-			(if (> (point) (1+ (point-min)))
-			    (setq blurb (buffer-substring (+ 1 (point-min)) (point))))
-			(if (> (- (point-max) (point)) 2)
-			    (setq blurb
-				  (concat blurb
-					  ";"
-					  (buffer-substring (+ (point) 3)
-							    (1- (point-max)))))))))))
-	;; Note: we don't use save-restriction because that does not work right
-	;; if changes are made outside the saved restriction
-	;; before that restriction is restored.
-	(narrow-to-region beg end)
-	(set-marker beg nil)
-	(set-marker end nil)))
-    (while (string-match " +," blurb)
-      (setq blurb (concat (substring blurb 0 (match-beginning 0)) ","
-			  (substring blurb (match-end 0)))))
-    (while (string-match ", +" blurb)
-      (setq blurb (concat (substring blurb 0 (match-beginning 0)) ","
-			  (substring blurb (match-end 0)))))
-    (setq mode-line-process
-	  (format " %d/%d%s" rmail-current-message rmail-total-messages
-		  blurb))))
-
-;; Turn an attribute of a message on or off according to STATE.
-;; ATTR is the name of the attribute, as a string.
-;; MSGNUM is message number to change; nil means current message.
-(defun rmail-set-attribute (attr state &optional msgnum)
-  (let ((the-buf (current-buffer)))
-    (if (eq major-mode 'mime/viewer-mode)
-	(switch-to-buffer mime::preview/article-buffer)
-      )
-    (let ((omax (point-max-marker))
-	  (omin (point-min-marker))
-	  (buffer-read-only nil))
-      (or msgnum (setq msgnum rmail-current-message))
-      (if (> msgnum 0)
-	  (unwind-protect
-	      (save-excursion
-		(widen)
-		(goto-char (+ 3 (rmail-msgbeg msgnum)))
-		(let ((curstate
-		       (not
-			(null (search-backward (concat ", " attr ",")
-					       (prog1 (point)
-						 (end-of-line)) t)))))
-		  (or (eq curstate (not (not state)))
-		      (if curstate
-			  (delete-region (point) (1- (match-end 0)))
-			(beginning-of-line)
-			(forward-char 2)
-			(insert " " attr ","))))
-		(if (string= attr "deleted")
-		    (rmail-set-message-deleted-p msgnum state)))
-	    ;; Note: we don't use save-restriction
-	    ;;	because that does not work right
-	    ;; if changes are made outside the saved restriction
-	    ;; before that restriction is restored.
-	    (narrow-to-region omin omax)
-	    (set-marker omin nil)
-	    (set-marker omax nil)
-	    (if (= msgnum rmail-current-message)
-		(rmail-display-labels)))))
-    (switch-to-buffer the-buf)
-    ))
-
-;; Return t if the attributes/keywords line of msg number MSG
-;; contains a match for the regexp LABELS.
-(defun rmail-message-labels-p (msg labels)
-  (save-excursion
-    (save-restriction
-      (widen)
-      (goto-char (rmail-msgbeg msg))
-      (forward-char 3)
-      (re-search-backward labels (prog1 (point) (end-of-line)) t))))
-
-;;;; *** Rmail Message Selection And Support ***
-
-(defun rmail-msgend (n)
-  (marker-position (aref rmail-message-vector (1+ n))))
-
-(defun rmail-msgbeg (n)
-  (marker-position (aref rmail-message-vector n)))
-
-(defun rmail-widen-to-current-msgbeg (function)
-  "Call FUNCTION with point at start of internal data of current message.
-Assumes that bounds were previously narrowed to display the message in Rmail.
-The bounds are widened enough to move point where desired, then narrowed
-again afterward.
-
-FUNCTION may not change the visible text of the message, but it may
-change the invisible header text."
-  (save-excursion
-    (let ((obeg (- (point-max) (point-min))))
-      (unwind-protect
-	  (progn
-	    (narrow-to-region (rmail-msgbeg rmail-current-message)
-			      (point-max))
-	    (goto-char (point-min))
-	    (funcall function))
-	;; Note: we don't use save-restriction because that does not work right
-	;; if changes are made outside the saved restriction
-	;; before that restriction is restored.
-	;; Here we assume that changes made by FUNCTION
-	;; occur before the visible region of the message.
-	(narrow-to-region (- (point-max) obeg) (point-max))))))
-
-(defun rmail-forget-messages ()
-  (unwind-protect
-      (if (vectorp rmail-message-vector)
-	  (let* ((i 0)
-		 (v rmail-message-vector)
-		 (n (length v)))
-	    (while (< i n)
-	      (move-marker (aref v i)  nil)
-	      (setq i (1+ i)))))
-    (setq rmail-message-vector nil)
-    (setq rmail-deleted-vector nil)))
-
-(defun rmail-maybe-set-message-counters ()
-  (if (not (and rmail-deleted-vector
-		rmail-message-vector
-		rmail-current-message
-		rmail-total-messages))
-      (rmail-set-message-counters)))
-
-(defun rmail-count-new-messages (&optional nomsg)
-  (let* ((case-fold-search nil)
-	 (total-messages 0)
-	 (messages-head nil)
-	 (deleted-head nil))
-    (or nomsg (message "Counting new messages..."))
-    (goto-char (point-max))
-    ;; Put at the end of messages-head
-    ;; the entry for message N+1, which marks
-    ;; the end of message N.  (N = number of messages).
-    (search-backward "\n\^_")
-    (forward-char 1)
-    (setq messages-head (list (point-marker)))
-    (rmail-set-message-counters-counter (point-min))
-    (setq rmail-current-message (1+ rmail-total-messages))
-    (setq rmail-total-messages
-	  (+ rmail-total-messages total-messages))
-    (setq rmail-message-vector
-	  (vconcat rmail-message-vector (cdr messages-head)))
-    (aset rmail-message-vector
-	  rmail-current-message (car messages-head))
-    (setq rmail-deleted-vector
-	  (concat rmail-deleted-vector deleted-head))
-    (setq rmail-summary-vector
-	  (vconcat rmail-summary-vector (make-vector total-messages nil)))
-    (goto-char (point-min))
-    (or nomsg (message "Counting new messages...done (%d)" total-messages))))
-
-(defun rmail-set-message-counters ()
-  (rmail-forget-messages)
-  (save-excursion
-    (save-restriction
-      (widen)
-      (let* ((point-save (point))
-	     (total-messages 0)
-	     (messages-after-point)
-	     (case-fold-search nil)
-	     (messages-head nil)
-	     (deleted-head nil))
-	(message "Counting messages...")
-	(goto-char (point-max))
-	;; Put at the end of messages-head
-	;; the entry for message N+1, which marks
-	;; the end of message N.  (N = number of messages).
-	(search-backward "\n\^_")
-	(forward-char 1)
-	(setq messages-head (list (point-marker)))
-	(rmail-set-message-counters-counter (min (point) point-save))
-	(setq messages-after-point total-messages)
-	(rmail-set-message-counters-counter)
-	(setq rmail-total-messages total-messages)
-	(setq rmail-current-message
-	      (min total-messages
-		   (max 1 (- total-messages messages-after-point))))
-	(setq rmail-message-vector
-	      (apply 'vector (cons (point-min-marker) messages-head))
-	      rmail-deleted-vector (concat "D" deleted-head)
-	      rmail-summary-vector (make-vector rmail-total-messages nil))
-	(message "Counting messages...done")))))
-	
-(defun rmail-set-message-counters-counter (&optional stop)
-  (while (search-backward "\n\^_\^L\n" stop t)
-    (forward-char 1)
-    (setq messages-head (cons (point-marker) messages-head))
-    (save-excursion
-      (setq deleted-head
-	    (cons (if (search-backward ", deleted,"
-				       (prog1 (point)
-					 (forward-line 2))
-				       t)
-		      ?D ?\ )
-		  deleted-head)))
-    (if (zerop (% (setq total-messages (1+ total-messages)) 20))
-	(message "Counting messages...%d" total-messages))))
-
-(defun rmail-beginning-of-message ()
-  "Show current message starting from the beginning."
-  (interactive)
-  (rmail-show-message rmail-current-message))
-
-(defun rmail-show-message (&optional n)
-  "Show message number N (prefix argument), counting from start of file.
-If summary buffer is currently displayed, update current message there also."
-  (interactive "p")
-  (if (eq major-mode 'mime/viewer-mode)
-      (switch-to-buffer mime::preview/article-buffer)
-    )
-  (rmail-maybe-set-message-counters)
-  (widen)
-  (if (zerop rmail-total-messages)
-      (progn (narrow-to-region (point-min) (1- (point-max)))
-	     (goto-char (point-min))
-	     (setq mode-line-process nil))
-    (let (blurb)
-      (if (not n)
-	  (setq n rmail-current-message)
-	(cond ((<= n 0)
-	       (setq n 1
-		     rmail-current-message 1
-		     blurb "No previous message"))
-	      ((> n rmail-total-messages)
-	       (setq n rmail-total-messages
-		     rmail-current-message rmail-total-messages
-		     blurb "No following message"))
-	      (t
-	       (setq rmail-current-message n))))
-      (let ((beg (rmail-msgbeg n))
-	    (end (rmail-msgend n)))
-	(goto-char beg)
-	(forward-line 1)
-	(if (= (following-char) ?0)
-	    (progn
-	      (rmail-reformat-message beg end)
-	      (rmail-set-attribute "unseen" nil))
-	  (search-forward "\n*** EOOH ***\n" end t)
-	  (narrow-to-region (point) end))
-	(goto-char (point-min))
-	(rmail-display-labels)
-	(if rmail-show-mime
-	    (funcall rmail-show-mime-method)
-	  )
-	(run-hooks 'rmail-show-message-hook)
-	;; If there is a summary buffer, try to move to this message
-	;; in that buffer.  But don't complain if this message
-	;; is not mentioned in the summary.
-	(if (rmail-summary-exists)
-	    (let ((curr-msg rmail-current-message))
-	      (rmail-select-summary
-	       (rmail-summary-goto-msg curr-msg t t))))
-	(if blurb
-	    (message blurb))))))
-
-(defun rmail-next-message (n)
-  "Show following message whether deleted or not.
-With prefix arg N, moves forward N messages, or backward if N is negative."
-  (interactive "p")
-  (if (eq major-mode 'mime/viewer-mode)
-      (switch-to-buffer mime::preview/article-buffer)
-    )
-  (rmail-maybe-set-message-counters)
-  (rmail-show-message (+ rmail-current-message n)))
-
-(defun rmail-previous-message (n)
-  "Show previous message whether deleted or not.
-With prefix arg N, moves backward N messages, or forward if N is negative."
-  (interactive "p")
-  (rmail-next-message (- n)))
-
-(defun rmail-next-undeleted-message (n)
-  "Show following non-deleted message.
-With prefix arg N, moves forward N non-deleted messages,
-or backward if N is negative.
-
-Returns t if a new message is being shown, nil otherwise."
-  (interactive "p")
-  (let ((the-buf (current-buffer)))
-    (if (eq major-mode 'mime/viewer-mode)
-	(switch-to-buffer mime::preview/article-buffer)
-      )
-    (rmail-maybe-set-message-counters)
-    (let ((lastwin rmail-current-message)
-	  (current rmail-current-message))
-      (while (and (> n 0) (< current rmail-total-messages))
-	(setq current (1+ current))
-	(if (not (rmail-message-deleted-p current))
-	    (setq lastwin current n (1- n))))
-      (while (and (< n 0) (> current 1))
-	(setq current (1- current))
-	(if (not (rmail-message-deleted-p current))
-	    (setq lastwin current n (1+ n))))
-      (if (/= lastwin rmail-current-message)
-	  (progn (rmail-show-message lastwin)
-		 t)
-	(if (< n 0)
-	    (message "No previous nondeleted message"))
-	(if (> n 0)
-	    (message "No following nondeleted message"))
-	(switch-to-buffer the-buf)
-	nil))))
-
-(defun rmail-previous-undeleted-message (n)
-  "Show previous non-deleted message.
-With prefix argument N, moves backward N non-deleted messages,
-or forward if N is negative."
-  (interactive "p")
-  (rmail-next-undeleted-message (- n)))
-
-(defun rmail-first-message ()
-  "Show first message in file."
-  (interactive)
-  (rmail-maybe-set-message-counters)
-  (rmail-show-message 1))
-
-(defun rmail-last-message ()
-  "Show last message in file."
-  (interactive)
-  (rmail-maybe-set-message-counters)
-  (rmail-show-message rmail-total-messages))
-
-(defun rmail-what-message ()
-  (let ((where (point))
-	(low 1)
-	(high rmail-total-messages)
-	(mid (/ rmail-total-messages 2)))
-    (while (> (- high low) 1)
-      (if (>= where (rmail-msgbeg mid))
-	  (setq low mid)
-	(setq high mid))
-      (setq mid (+ low (/ (- high low) 2))))
-    (if (>= where (rmail-msgbeg high)) high low)))
-
-(defun rmail-message-recipients-p (msg recipients &optional primary-only)
-  (save-restriction
-    (goto-char (rmail-msgbeg msg))
-    (search-forward "\n*** EOOH ***\n")
-    (narrow-to-region (point) (progn (search-forward "\n\n") (point)))
-    (or (string-match recipients (or (mail-fetch-field "To") ""))
-	(string-match recipients (or (mail-fetch-field "From") ""))
-	(if (not primary-only)
-	    (string-match recipients (or (mail-fetch-field "Cc") ""))))))
-
-(defun rmail-message-regexp-p (msg regexp)
-  "Return t, if for message number MSG, regexp REGEXP matches in the header."
-  (goto-char (rmail-msgbeg msg))
-  (let ((end 
-         (save-excursion 
-           (search-forward "*** EOOH ***" (point-max)) (point))))
-    (re-search-forward regexp end t)))
-
-(defvar rmail-search-last-regexp nil) ; jwz: moved this up
-(defun rmail-search-backward (regexp &optional n)
-  "Show message containing next match for REGEXP.
-Prefix argument gives repeat count; negative argument means search
-backwards (through earlier messages).
-Interactively, empty argument means use same regexp used last time."
-  (interactive
-    (let* ((reversep (>= (prefix-numeric-value current-prefix-arg) 0))
-	   (prompt
-	    (concat (if reversep "Reverse " "") "Rmail search (regexp): "))
-	   regexp)
-      (if rmail-search-last-regexp
-	  (setq prompt (concat prompt
-			       "(default "
-			       rmail-search-last-regexp
-			       ") ")))
-      (setq regexp (read-string prompt))
-      (cond ((not (equal regexp ""))
-	     (setq rmail-search-last-regexp regexp))
-	    ((not rmail-search-last-regexp)
-	     (error "No previous Rmail search string")))
-      (list rmail-search-last-regexp
-	    (prefix-numeric-value current-prefix-arg))))
-  (rmail-search regexp (- n)))
-
-(defun rmail-search (regexp &optional n)
-  "Show message containing next match for REGEXP.
-Prefix argument gives repeat count; negative argument means search
-backwards (through earlier messages).
-Interactively, empty argument means use same regexp used last time."
-  (interactive
-    (let* ((reversep (< (prefix-numeric-value current-prefix-arg) 0))
-	   (prompt
-	    (concat (if reversep "Reverse " "") "Rmail search (regexp): "))
-	   regexp)
-      (if rmail-search-last-regexp
-	  (setq prompt (concat prompt
-			       "(default "
-			       rmail-search-last-regexp
-			       ") ")))
-      (setq regexp (read-string prompt))
-      (cond ((not (equal regexp ""))
-	     (setq rmail-search-last-regexp regexp))
-	    ((not rmail-search-last-regexp)
-	     (error "No previous Rmail search string")))
-      (list rmail-search-last-regexp
-	    (prefix-numeric-value current-prefix-arg))))
-  (or n (setq n 1))
-  (message "%sRmail search for %s..."
-	   (if (< n 0) "Reverse " "")
-	   regexp)
-  (rmail-maybe-set-message-counters)
-  (let ((omin (point-min))
-	(omax (point-max))
-	(opoint (point))
-	win
-	(reversep (< n 0))
-	(msg rmail-current-message))
-    (unwind-protect
-	(progn
-	  (widen)
-	  (while (/= n 0)
-	    ;; Check messages one by one, advancing message number up or down
-	    ;; but searching forward through each message.
-	    (if reversep
-		(while (and (null win) (> msg 1))
-		  (goto-char (rmail-msgbeg (setq msg (1- msg))))
-		  (setq win (re-search-forward
-			     regexp (rmail-msgend msg) t)))
-	      (while (and (null win) (< msg rmail-total-messages))
-		(goto-char (rmail-msgbeg (setq msg (1+ msg))))
-		(setq win (re-search-forward regexp (rmail-msgend msg) t))))
-	    (setq n (+ n (if reversep 1 -1)))))
-      (if win
-	  (progn
-	    ;; If this is a reverse search and we found a message,
-	    ;; search backward thru this message to position point.
-	    (if reversep
-		(progn
-		  (goto-char (rmail-msgend msg))
-		  (re-search-backward
-		   regexp (rmail-msgbeg msg) t)))
-	    (setq win (point))
-	    (rmail-show-message msg)
-	    (message "%sRmail search for %s...done"
-		     (if reversep "Reverse " "")
-		     regexp)
-	    (goto-char win))
-	(goto-char opoint)
-	(narrow-to-region omin omax)
-	(ding)
-	(message "Search failed: %s" regexp)))))
-
-(defun rmail-search-backwards (regexp &optional n)
-  "Show message containing previous match for REGEXP.
-Prefix argument gives repeat count; negative argument means search
-forward (through later messages).
-Interactively, empty argument means use same regexp used last time."
-  (interactive
-    (let* ((reversep (>= (prefix-numeric-value current-prefix-arg) 0))
-	   (prompt
-	    (concat (if reversep "Reverse " "") "Rmail search (regexp): "))
-	   regexp)
-      (if rmail-search-last-regexp
-	  (setq prompt (concat prompt
-			       "(default "
-			       rmail-search-last-regexp
-			       ") ")))
-      (setq regexp (read-string prompt))
-      (cond ((not (equal regexp ""))
-	     (setq rmail-search-last-regexp regexp))
-	    ((not rmail-search-last-regexp)
-	     (error "No previous Rmail search string")))
-      (list rmail-search-last-regexp
-	    (prefix-numeric-value current-prefix-arg))))
-  (rmail-search regexp (- (or n -1))))
-
-;; Show the first message which has the `unseen' attribute.
-(defun rmail-first-unseen-message ()
-  (rmail-maybe-set-message-counters)
-  (let ((current 1)
-	found)
-    (save-restriction
-      (widen)
-      (while (and (not found) (< current rmail-total-messages))
-	(if (rmail-message-labels-p current ", ?\\(unseen\\),")
-	    (setq found current))
-	(setq current (1+ current))))
-;; Let the caller show the message.
-;;    (if found
-;;	(rmail-show-message found))
-    found))
-
-;;;; *** Rmail Message Deletion Commands ***
-
-(defun rmail-message-deleted-p (n)
-  (= (aref rmail-deleted-vector n) ?D))
-
-(defun rmail-set-message-deleted-p (n state)
-  (aset rmail-deleted-vector n (if state ?D ?\ )))
-
-(defun rmail-delete-message ()
-  "Delete this message and stay on it."
-  (interactive)
-  (rmail-set-attribute "deleted" t))
-
-(defun rmail-undelete-previous-message ()
-  "Back up to deleted message, select it, and undelete it."
-  (interactive)
-  (let ((msg rmail-current-message))
-    (while (and (> msg 0)
-		(not (rmail-message-deleted-p msg)))
-      (setq msg (1- msg)))
-    (if (= msg 0)
-	(error "No previous deleted message")
-      (if (/= msg rmail-current-message)
-	  (rmail-show-message msg))
-      (rmail-set-attribute "deleted" nil)
-      (if (rmail-summary-exists)
-	  (save-excursion
-	    (set-buffer rmail-summary-buffer)
-	    (rmail-summary-mark-undeleted msg)))
-      (rmail-maybe-display-summary))))
-
-(defun rmail-delete-forward (&optional backward)
-  "Delete this message and move to next nondeleted one.
-Deleted messages stay in the file until the \\[rmail-expunge] command is given.
-With prefix argument, delete and move backward.
-
-Returns t if a new message is displayed after the delete, or nil otherwise."
-  (interactive "P")
-  (rmail-set-attribute "deleted" t)
-  (let ((del-msg rmail-current-message))
-    (if (rmail-summary-exists)
-	(save-excursion
-	  (set-buffer rmail-summary-buffer)
-	  (rmail-summary-mark-deleted del-msg)))
-    (prog1 (rmail-next-undeleted-message (if backward -1 1))
-      (rmail-maybe-display-summary))))
-
-(defun rmail-delete-backward ()
-  "Delete this message and move to previous nondeleted one.
-Deleted messages stay in the file until the \\[rmail-expunge] command is given."
-  (interactive)
-  (rmail-delete-forward t))
-
-(defun rmail-only-expunge ()
-  "Actually erase all deleted messages in the file."
-  (interactive)
-  (message "Expunging deleted messages...")
-  ;; Discard all undo records for this buffer.
-  (or (eq buffer-undo-list t)
-      (setq buffer-undo-list nil))
-  (rmail-maybe-set-message-counters)
-  (let* ((omax (- (buffer-size) (point-max)))
-	 (omin (- (buffer-size) (point-min)))
-	 (opoint (if (and (> rmail-current-message 0)
-			  (= ?D (aref rmail-deleted-vector rmail-current-message)))
-		     0 (- (point) (point-min))))
-	 (messages-head (cons (aref rmail-message-vector 0) nil))
-	 (messages-tail messages-head)
-	 ;; Don't make any undo records for the expunging.
-	 (buffer-undo-list t)
-	 (win))
-    (unwind-protect
-	(save-excursion
-	  (widen)
-	  (goto-char (point-min))
-	  (let ((counter 0)
-		(number 1)
-		(total rmail-total-messages)
-		(new-message-number rmail-current-message)
-		(new-summary nil)
-		(buffer-read-only nil)
-		(messages rmail-message-vector)
-		(deleted rmail-deleted-vector)
-		(summary rmail-summary-vector))
-	    (setq rmail-total-messages nil
-		  rmail-current-message nil
-		  rmail-message-vector nil
-		  rmail-deleted-vector nil
-		  rmail-summary-vector nil)
-	    (while (<= number total)
-	      (if (= (aref deleted number) ?D)
-		  (progn
-		    (delete-region
-		      (marker-position (aref messages number))
-		      (marker-position (aref messages (1+ number))))
-		    (move-marker (aref messages number) nil)
-		    (if (> new-message-number counter)
-			(setq new-message-number (1- new-message-number))))
-		(setq counter (1+ counter))
-		(setq messages-tail
-		      (setcdr messages-tail
-			      (cons (aref messages number) nil)))
-		(setq new-summary
-		      (cons (if (= counter number) (aref summary (1- number)))
-			    new-summary)))
-	      (if (zerop (% (setq number (1+ number)) 20))
-		  (message "Expunging deleted messages...%d" number)))
-	    (setq messages-tail
-		  (setcdr messages-tail
-			  (cons (aref messages number) nil)))
-	    (setq rmail-current-message new-message-number
-		  rmail-total-messages counter
-		  rmail-message-vector (apply 'vector messages-head)
-		  rmail-deleted-vector (make-string (1+ counter) ?\ )
-		  rmail-summary-vector (vconcat (nreverse new-summary))
-		  win t)))
-      (message "Expunging deleted messages...done")
-      (if (not win)
-	  (narrow-to-region (- (buffer-size) omin) (- (buffer-size) omax)))
-      (rmail-show-message
-       (if (zerop rmail-current-message) 1 nil))
-      ;; 1996/12/9 by MORIOKA Tomohiko <morioka@jaist.ac.jp>
-      ;;	to avoid error but it is quit bad way
-      (if (> (+ (point) opoint)(point-max))
-	  (goto-char (point-max))
-	(forward-char opoint)
-	))))
-
-(defun rmail-expunge ()
-  "Erase deleted messages from Rmail file and summary buffer."
-  (interactive)
-  (rmail-only-expunge)
-  (if (rmail-summary-exists)
-      (rmail-select-summary
-	(rmail-update-summary))))
-
-;;;; *** Rmail Mailing Commands ***
-
-(defun rmail-start-mail (&rest args)
-  (if (and window-system rmail-mail-new-frame)
-      (prog1
-	(apply 'mail-other-frame args)
-	(modify-frame-parameters (selected-frame)
-				 '((dedicated . t))))
-    (apply 'mail-other-window args)))
-
-(defun rmail-mail ()
-  "Send mail in another window.
-While composing the message, use \\[mail-yank-original] to yank the
-original message into it."
-  (interactive)
-  (rmail-start-mail nil nil nil nil nil (current-buffer)))
-
-(defun rmail-continue ()
-  "Continue composing outgoing message previously being composed."
-  (interactive)
-  (rmail-start-mail t))
-
-(defun rmail-reply (just-sender)
-  "Reply to the current message.
-Normally include CC: to all other recipients of original message;
-prefix argument means ignore them.  While composing the reply,
-use \\[mail-yank-original] to yank the original message into it."
-  (interactive "P")
-  (let (from reply-to cc subject date to message-id resent-reply-to)
-    (save-excursion
-      (save-restriction
-	(widen)
-	(goto-char (rmail-msgbeg rmail-current-message))
-	(forward-line 1)
-	(if (= (following-char) ?0)
-	    (narrow-to-region
-	     (progn (forward-line 2)
-		    (point))
-	     (progn (search-forward "\n\n" (rmail-msgend rmail-current-message)
-				    'move)
-		    (point)))
-	  (narrow-to-region (point)
-			    (progn (search-forward "\n*** EOOH ***\n")
-				   (beginning-of-line) (point))))
-	(setq resent-reply-to (mail-fetch-field "resent-reply-to" t)
-	      from (mail-fetch-field "from")
-	      reply-to (or resent-reply-to
-			   (mail-fetch-field "reply-to" nil t)
-			   from)
-	      cc (cond (just-sender nil)
-		       (resent-reply-to (mail-fetch-field "resent-cc" t))
-		       (t (mail-fetch-field "cc" nil t)))
-	      subject (or (and resent-reply-to
-			       (mail-fetch-field "resent-subject" t))
-			  (mail-fetch-field "subject"))
-	      date (cond (resent-reply-to
-			  (mail-fetch-field "resent-date" t))
-			 ((mail-fetch-field "date")))
-	      to (cond (resent-reply-to
-			(mail-fetch-field "resent-to" t))
-		       ((mail-fetch-field "to" nil t))
-		       ;((mail-fetch-field "apparently-to")) ack gag barf
-		       (t ""))
-	      message-id (cond (resent-reply-to
-				(mail-fetch-field "resent-message-id" t))
-			       ((mail-fetch-field "message-id"))))))
-    (and (stringp subject)
-	 (or (string-match (concat "\\`" (regexp-quote rmail-reply-prefix))
-			   subject)
-	     (setq subject (concat rmail-reply-prefix subject))))
-    (rmail-start-mail nil
-      (mail-strip-quoted-names reply-to)
-      subject
-      (rmail-make-in-reply-to-field from date message-id)
-      (if just-sender
-	  nil
-	(let* ((cc-list (rmail-dont-reply-to
-			  (mail-strip-quoted-names
-			    (if (null cc) to (concat to ", " cc))))))
-	  (if (string= cc-list "") nil cc-list)))
-      (current-buffer)
-      (list (list '(lambda (buf msgnum)
-		     (save-excursion
-		       (set-buffer buf)
-		       (rmail-set-attribute "answered" t msgnum)))
-		  (current-buffer) rmail-current-message)))))
-
-(defun rmail-make-in-reply-to-field (from date message-id)
-  (cond ((not from)
-         (if message-id
-             message-id
-             nil))
-        (mail-use-rfc822
-         (require 'rfc822)
-         (let ((tem (car (rfc822-addresses from))))
-           (if message-id
-               (if (string-match
-                    (regexp-quote (if (string-match "@[^@]*\\'" tem)
-                                      (substring tem 0 (match-beginning 0))
-                                      tem))
-                    message-id)
-                   ;; Message-ID is sufficiently informative
-                   message-id
-                   (concat message-id " (" tem ")"))
-               ;; Use prin1 to fake RFC822 quoting
-               (let ((field (prin1-to-string tem)))
-                 (if date
-                     (concat field "'s message of " date)
-                     field)))))
-        ((let* ((foo "[^][\000-\037\177-\377()<>@,;:\\\" ]+")
-                (bar "[^][\000-\037\177-\377()<>@,;:\\\"]+"))
-           ;; Can't use format because format loses on \000 (unix *^&%*^&%$!!)
-           (or (string-match (concat "\\`[ \t]*\\(" bar
-                                     "\\)\\(<" foo "@" foo ">\\)?[ \t]*\\'")
-                             ;; "Unix Loser <Foo@bar.edu>" => "Unix Loser"
-                             from)
-               (string-match (concat "\\`[ \t]*<" foo "@" foo ">[ \t]*(\\("
-                                     bar "\\))[ \t]*\\'")
-                             ;; "<Bugs@bar.edu>" (Losing Unix) => "Losing Unix"
-                             from)))
-         (let ((start (match-beginning 1))
-               (end (match-end 1)))
-           ;; Trim whitespace which above regexp match allows
-           (while (and (< start end)
-                       (memq (aref from start) '(?\t ?\ )))
-             (setq start (1+ start)))
-           (while (and (< start end)
-                       (memq (aref from (1- end)) '(?\t ?\ )))
-             (setq end (1- end)))
-           (let ((field (substring from start end)))
-             (if date (setq field (concat "message from " field " on " date)))
-             (if message-id
-                 ;; "<AA259@bar.edu> (message from Unix Loser on 1-Apr-89)"
-                 (concat message-id " (" field ")")
-                 field))))
-        (t
-         ;; If we can't kludge it simply, do it correctly
-         (let ((mail-use-rfc822 t))
-           (rmail-make-in-reply-to-field from date message-id)))))
-
-(defun rmail-forward (resend)
-  "Forward the current message to another user.
-With prefix argument, \"resend\" the message instead of forwarding it;
-see the documentation of `rmail-resend'."
-  (interactive "P")
-  (if resend
-      (call-interactively 'rmail-resend)
-    (let ((forward-buffer (current-buffer))
-	  (subject (concat "["
-			   (let ((from (or (mail-fetch-field "From")
-					   (mail-fetch-field ">From"))))
-			     (if from
-				 (concat (mail-strip-quoted-names from) ": ")
-			       ""))
-			   (or (mail-fetch-field "Subject") "")
-			   "]")))
-      ;; If only one window, use it for the mail buffer.
-      ;; Otherwise, use another window for the mail buffer
-      ;; so that the Rmail buffer remains visible
-      ;; and sending the mail will get back to it.
-      (if (funcall (if (and (not rmail-mail-new-frame) (one-window-p t))
-		       (function mail)
-		     (function rmail-start-mail))
-		   nil nil subject nil nil nil
-		   (list (list (function (lambda (buf msgnum)
-					   (save-excursion
-					     (set-buffer buf)
-					     (rmail-set-attribute
-					      "forwarded" t msgnum))))
-			       (current-buffer)
-			       rmail-current-message)))
-	  (save-excursion
-	    ;; Insert after header separator--before signature if any.
-	    (goto-char (point-min))
-	    (search-forward-regexp
-	     (concat "^" (regexp-quote mail-header-separator)))
-	    (forward-line 1)
-	    (insert-buffer forward-buffer))))))
-
-(defun rmail-resend (address &optional from comment mail-alias-file)
-  "Resend current message to ADDRESSES.
-ADDRESSES should be a single address, a a string consisting of several
-addresses separated by commas, or a list of addresses.
-
-Optional FROM is the address to resend the message from, and
-defaults to the username of the person redistributing the message.
-Optional COMMENT is a string that will be inserted as a comment in the
-resent message.
-Optional ALIAS-FILE is alternate aliases file to be used by sendmail,
-typically for purposes of moderating a list."
-  (interactive "sResend to: ")
-  (require 'sendmail)
-  ;;(require 'mailalias)
-  (if (not from) (setq from (user-login-name)))
-  (let ((tembuf (generate-new-buffer " sendmail temp"))
-	(mail-header-separator "")
-	(case-fold-search nil)
-	(mailbuf (current-buffer)))
-    (unwind-protect
-	(save-excursion
-	  ;;>> Copy message into temp buffer
-	  (set-buffer tembuf)
-	  (insert-buffer-substring mailbuf)
-	  (goto-char (point-min))
-	  ;; Delete any Sender field, since that's not specifyable.
-	  (if (re-search-forward "^Sender:" nil t)
-	      (let (beg)
-		(beginning-of-line)
-		(setq beg (point))
-		(forward-line 1)
-		(while (looking-at "[ \t]")
-		  (forward-line 1))
-		(delete-region beg (point))))
-	  ;;>> Insert resent-from:
-	  (insert "Resent-From: " from "\n")
-	  (insert "Resent-Date: " (mail-rfc822-date) "\n")
-	  ;;>> Insert resent-to: and bcc if need be.
-	  (progn ;;let ((before (point)))
-	    (if mail-self-blind
-		(insert "Resent-Bcc: " (user-login-name) "\n"))
-	    (insert "Resent-To: " (if (stringp address)
-			       address
-			     (mapconcat 'identity address ",\n\t"))
-		    "\n")
-	    ;; lose this loser. -jwz
-	    ;;(expand-mail-aliases before (point))
-	    )
-	  ;;>> Set up comment, if any.
-	  (if (and (sequencep comment) (not (zerop (length comment))))
-	      (let ((before (point))
-		    after)
-		(insert comment)
-		(or (eolp) (insert "\n"))
-		(setq after (point))
-		(goto-char before)
-		(while (< (point) after)
-		  (insert "Resent-Comment: ")
-		  (forward-line 1))))
-	  ;; Don't expand aliases in the destination fields
-	  ;; of the original message.
-	  (let (mail-aliases)
-	    (sendmail-send-it)))
-      (kill-buffer tembuf))
-    (rmail-set-attribute "resent" t rmail-current-message)))
-
-(defvar mail-unsent-separator
-  (concat "^ *---+ +Unsent message follows +---+ *$\\|"
-	  "^ *---+ +Returned message +---+ *$\\|"
-	  "^ *---+ +Original message +---+ *$\\|"
-	  "^ *--+ +begin message +--+ *$\\|"
-	  "^ *---+ +Original message follows +---+ *$\\|"
-	  "^|? *---+ +Message text follows: +---+ *|?$"))
-
-(defun rmail-retry-failure ()
-  "Edit a mail message which is based on the contents of the current message.
-For a message rejected by the mail system, extract the interesting headers and
-the body of the original message; otherwise copy the current message."
-  (interactive)
-  (require 'mail-utils)
-  (let (to subj irp2 cc orig-message)
-    (save-excursion
-      ;; Narrow down to just the quoted original message
-      (rmail-beginning-of-message)
-      (let ((case-fold-search t))
-	(or (re-search-forward mail-unsent-separator nil t)
-	    (error "Cannot parse this as a failure message")))
-      (save-restriction
-	(narrow-to-region (point) (point-max))
-	;; Now mail-fetch-field will get from headers of the original message,
-	;; not from the headers of the rejection.
-	(setq to   (mail-fetch-field "To")
-	      subj (mail-fetch-field "Subject")
-	      irp2 (mail-fetch-field "In-reply-to")
-	      cc   (mail-fetch-field "Cc"))
-	;; Get the entire text (not headers) of the original message.
-	(setq orig-message
-	      (buffer-substring
-	       (progn (search-forward "\n\n") (point))
-	       (point-max)))))
-    ;; Start sending a new message; default header fields from the original.
-    ;; Turn off the usual actions for initializing the message body
-    ;; because we want to get only the text from the failure message.
-    (let (mail-signature
-	  (mail-setup-hook rmail-retry-setup-hook))
-      (if (rmail-start-mail nil to subj irp2 cc (current-buffer))
-	  ;; Insert original text as initial text of new draft message.
-	  (progn
-	    (goto-char (point-max))
-	    (insert orig-message)
-	    (goto-char (point-min))
-	    (end-of-line))))))
-
-(defun rmail-bury ()
-  "Bury current Rmail buffer and its summary buffer."
-  (interactive)
-  (let ((rmail-buffer (current-buffer)))
-    (if (rmail-summary-exists)
-	(let (window)
-	  (while (setq window (get-buffer-window rmail-summary-buffer))
-	    (set-window-buffer window (other-buffer rmail-summary-buffer)))
-	  (bury-buffer rmail-summary-buffer)))
-    (switch-to-buffer (other-buffer (current-buffer)))
-    (bury-buffer rmail-buffer)))
-
-(defun rmail-summary-exists ()
-  "Non-nil iff in an RMAIL buffer and an associated summary buffer exists.
-Non-nil value returned is the summary buffer."
-  (and rmail-summary-buffer (buffer-name rmail-summary-buffer)
-       rmail-summary-buffer))
-
-(defun rmail-summary-displayed ()
-  "t iff in RMAIL buffer and an associated summary buffer is displayed."
-  (and (rmail-summary-exists) (get-buffer-window rmail-summary-buffer)))
-
-(defvar rmail-redisplay-summary nil
-  "*Non-nil means Rmail should show the summary when it changes.
-This has an effect only if a summary buffer exists.")
-
-;; Put the summary buffer back on the screen, if user wants that.
-(defun rmail-maybe-display-summary ()
-  (and (rmail-summary-exists)
-       rmail-redisplay-summary
-       (display-buffer rmail-summary-buffer)))
-
-;;;; *** Rmail Specify Inbox Files ***
-
-(autoload 'set-rmail-inbox-list "rmailmsc"
-  "Set the inbox list of the current RMAIL file to FILE-NAME.
-This may be a list of file names separated by commas.
-If FILE-NAME is empty, remove any inbox list."
-  t)
-
-;;;; *** Rmail Commands for Labels ***
-
-(autoload 'rmail-add-label "rmailkwd"
-  "Add LABEL to labels associated with current RMAIL message.
-Completion is performed over known labels when reading."
-  t)
-
-(autoload 'rmail-kill-label "rmailkwd"
-  "Remove LABEL from labels associated with current RMAIL message.
-Completion is performed over known labels when reading."
-  t)
-
-(autoload 'rmail-next-labeled-message "rmailkwd"
-  "Show next message with LABEL.  Defaults to last label used.
-With prefix argument N moves forward N messages with this label."
-  t)
-
-(autoload 'rmail-previous-labeled-message "rmailkwd"
-  "Show previous message with LABEL.  Defaults to last label used.
-With prefix argument N moves backward N messages with this label."
-  t)
-
-(autoload 'rmail-read-label "rmailkwd"
-  "PROMPT and read with completion an Rmail message label."
-  t)
-
-;;;; *** Rmail Edit Mode ***
-
-(autoload 'rmail-edit-current-message "rmailedit"
-  "Edit the contents of the current message"
-  t)
-
-;;;; *** Rmail Sorting ***
-
-(autoload 'rmail-sort-by-date "rmailsort"
-  "Sort messages of current Rmail file by date.
-If prefix argument REVERSE is non-nil, sort them in reverse order." t)
-
-(autoload 'rmail-sort-by-subject "rmailsort"
-  "Sort messages of current Rmail file by subject.
-If prefix argument REVERSE is non-nil, sort them in reverse order." t)
-
-(autoload 'rmail-sort-by-author "rmailsort"
-  "Sort messages of current Rmail file by author.
-If prefix argument REVERSE is non-nil, sort them in reverse order." t)
-
-(autoload 'rmail-sort-by-recipient "rmailsort"
-  "Sort messages of current Rmail file by recipient.
-If prefix argument REVERSE is non-nil, sort them in reverse order." t)
-
-(autoload 'rmail-sort-by-correspondent "rmailsort"
-  "Sort messages of current Rmail file by other correspondent.
-If prefix argument REVERSE is non-nil, sort them in reverse order." t)
-
-(autoload 'rmail-sort-by-lines "rmailsort"
-  "Sort messages of current Rmail file by number of lines.
-If prefix argument REVERSE is non-nil, sort them in reverse order." t)
-
-;;;; *** Rmail Summary Mode ***
-
-(autoload 'rmail-summary "rmailsum"
-  "Display a summary of all messages, one line per message."
-  t)
-
-(autoload 'rmail-summary-by-labels "rmailsum"
-  "Display a summary of all messages with one or more LABELS.
-LABELS should be a string containing the desired labels, separated by commas."
-  t)
-
-(autoload 'rmail-summary-by-recipients "rmailsum"
-  "Display a summary of all messages with the given RECIPIENTS.
-Normally checks the To, From and Cc fields of headers; but if PRIMARY-ONLY
-is non-nil (prefix arg given), only look in the To and From fields.
-RECIPIENTS is a string of regexps separated by commas."
-  t)
-
-(autoload 'rmail-summary-by-regexp "rmailsum"
-  "Display a summary of all messages according to regexp REGEXP.
-If the regular expression is found in the header of the message
-\(including in the date and other lines, as well as the subject line),
-Emacs will list the header line in the RMAIL-summary."
-  t)
-
-(autoload 'rmail-summary-by-topic "rmailsum"
-  "Display a summary of all messages with the given SUBJECT.
-Normally checks the Subject field of headers;
-but if WHOLE-MESSAGE is non-nil (prefix arg given), 
- look in the whole message.
-SUBJECT is a string of regexps separated by commas."
-  t)
-
-;;;; *** Rmail output messages to files ***
-
-(autoload 'rmail-output-to-rmail-file "rmailout"
-  "Append the current message to an Rmail file named FILE-NAME.
-If the file does not exist, ask if it should be created.
-If file is being visited, the message is appended to the Emacs
-buffer visiting that file."
-  t)
-
-(autoload 'rmail-output "rmailout"
-  "Append this message to Unix mail file named FILE-NAME."
-  t)
-
-;;;; *** Rmail undigestification ***
-
-(autoload 'undigestify-rmail-message "undigest"
-  "Break up a digest message into its constituent messages.
-Leaves original message, deleted, before the undigestified messages."
-  t)
-
-(provide 'rmail)
-
-;;; rmail.el ends here
--- a/lisp/rmail/rmailedit.el	Mon Aug 13 10:01:24 2007 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,115 +0,0 @@
-;;; rmailedit.el --- "RMAIL edit mode"  Edit the current message.
-
-;; Copyright (C) 1985 Free Software Foundation, Inc.
-
-;; Maintainer: FSF
-;; Keywords: mail
-
-;; 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.
-
-;;; Code:
-
-(require 'rmail)
-
-(defvar rmail-edit-map nil)
-(if rmail-edit-map
-    nil
-  (setq rmail-edit-map (make-sparse-keymap))
-  (set-keymap-parent rmail-edit-map text-mode-map)
-  (set-keymap-name rmail-edit-map 'rmail-edit-map)
-  (define-key rmail-edit-map "\C-c\C-c" 'rmail-cease-edit)
-  (define-key rmail-edit-map "\C-c\C-]" 'rmail-abort-edit))
-
-;; Rmail Edit mode is suitable only for specially formatted data.
-(put 'rmail-edit-mode 'mode-class 'special)
-
-(defun rmail-edit-mode ()
-  "Major mode for editing the contents of an RMAIL message.
-The editing commands are the same as in Text mode, together with two commands
-to return to regular RMAIL:
-  *  rmail-abort-edit cancels the changes
-     you have made and returns to RMAIL
-  *  rmail-cease-edit makes them permanent.
-\\{rmail-edit-map}"
-  (use-local-map rmail-edit-map)
-  (setq major-mode 'rmail-edit-mode)
-  (setq mode-name "RMAIL Edit")
-  (if (boundp 'mode-line-modified)
-      (setq mode-line-modified (default-value 'mode-line-modified))
-    (setq mode-line-format (default-value 'mode-line-format)))
-  (run-hooks 'text-mode-hook 'rmail-edit-mode-hook))
-
-(defvar rmail-old-text) ;jwz
-(defun rmail-edit-current-message ()
-  "Edit the contents of this message."
-  (interactive)
-  (rmail-edit-mode)
-  (make-local-variable 'rmail-old-text)
-  (setq rmail-old-text (buffer-substring (point-min) (point-max)))
-  (setq buffer-read-only nil)
-  (set-buffer-modified-p (buffer-modified-p))
-  ;; Make mode line update.
-  (if (and (eq (key-binding "\C-c\C-c") 'rmail-cease-edit)
-	   (eq (key-binding "\C-c\C-]") 'rmail-abort-edit))
-      (message "Editing: Type C-c C-c to return to Rmail, C-c C-] to abort")
-    (message (substitute-command-keys
-	       "Editing: Type \\[rmail-cease-edit] to return to Rmail, \\[rmail-abort-edit] to abort"))))
-
-(defun rmail-cease-edit ()
-  "Finish editing message; switch back to Rmail proper."
-  (interactive)
-  ;; Make sure buffer ends with a newline.
-  (save-excursion
-    (goto-char (point-max))
-    (if (/= (preceding-char) ?\n)
-	(insert "\n"))
-    ;; Adjust the marker that points to the end of this message.
-    (set-marker (aref rmail-message-vector (1+ rmail-current-message))
-		(point)))
-  (let ((old rmail-old-text))
-    ;; Update the mode line.
-    (set-buffer-modified-p (buffer-modified-p))
-    (rmail-mode-1)
-    (if (and (= (length old) (- (point-max) (point-min)))
-	     (string= old (buffer-substring (point-min) (point-max))))
-	()
-      (setq old nil)
-      (rmail-set-attribute "edited" t)
-      (if (boundp 'rmail-summary-vector)
-	  (progn
-	    (aset rmail-summary-vector (1- rmail-current-message) nil)
-	    (save-excursion
-	      (rmail-widen-to-current-msgbeg
-	        (function (lambda ()
-			    (forward-line 2)
-			    (if (looking-at "Summary-line: ")
-				(let ((buffer-read-only nil))
-				  (delete-region (point)
-						 (progn (forward-line 1)
-							(point))))))))
-	      (rmail-show-message))))))
-  (setq buffer-read-only t))
-
-(defun rmail-abort-edit ()
-  "Abort edit of current message; restore original contents."
-  (interactive)
-  (delete-region (point-min) (point-max))
-  (insert rmail-old-text)
-  (rmail-cease-edit))
-
-;;; rmailedit.el ends here
--- a/lisp/rmail/rmailkwd.el	Mon Aug 13 10:01:24 2007 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,272 +0,0 @@
-;;; rmailkwd.el --- part of the "RMAIL" mail reader for Emacs.
-
-;; Copyright (C) 1985, 1988 Free Software Foundation, Inc.
-
-;; Maintainer: FSF
-;; Keywords: mail
-
-;; 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.
-
-;;; Code:
-
-;; Global to all RMAIL buffers.  It exists primarily for the sake of
-;; completion.  It is better to use strings with the label functions
-;; and let them worry about making the label.
-
-(defvar rmail-label-obarray (make-vector 47 0))
-
-;; Named list of symbols representing valid message attributes in RMAIL.
-
-(defconst rmail-attributes
-  (cons 'rmail-keywords
-	(mapcar '(lambda (s) (intern s rmail-label-obarray))
-		'("deleted" "answered" "filed" "forwarded" "unseen" "edited"))))
-
-(defconst rmail-deleted-label (intern "deleted" rmail-label-obarray))
-
-;; Named list of symbols representing valid message keywords in RMAIL.
-
-(defvar rmail-keywords nil)
-
-(defun rmail-add-label (string)
-  "Add LABEL to labels associated with current RMAIL message.
-Completion is performed over known labels when reading."
-  (interactive (list (rmail-read-label "Add label")))
-  (rmail-set-label string t))
-
-(defun rmail-kill-label (string)
-  "Remove LABEL from labels associated with current RMAIL message.
-Completion is performed over known labels when reading."
-  (interactive (list (rmail-read-label "Remove label")))
-  (rmail-set-label string nil))
-
-(defun rmail-read-label (prompt)
-  (if (not rmail-keywords) (rmail-parse-file-keywords))
-  (let ((result
-	 (completing-read (concat prompt
-				  (if rmail-last-label
-				      (concat " (default "
-					      (symbol-name rmail-last-label)
-					      "): ")
-				    ": "))
-			  rmail-label-obarray
-			  nil
-			  nil)))
-    (if (string= result "")
-	rmail-last-label
-      (setq rmail-last-label (rmail-make-label result t)))))
-
-(defun rmail-set-label (l state &optional n)
-  (rmail-maybe-set-message-counters)
-  (if (not n) (setq n rmail-current-message))
-  (aset rmail-summary-vector (1- n) nil)
-  (let* ((attribute (rmail-attribute-p l))
-	 (keyword (and (not attribute)
-		       (or (rmail-keyword-p l)
-			   (rmail-install-keyword l))))
-	 (label (or attribute keyword)))
-    (if label
-	(let ((omax (- (buffer-size) (point-max)))
-	      (omin (- (buffer-size) (point-min)))
-	      (buffer-read-only nil)
-	      (case-fold-search t))
-	  (unwind-protect
-	      (save-excursion
-		(widen)
-		(goto-char (rmail-msgbeg n))
-		(forward-line 1)
-		(if (not (looking-at "[01],"))
-		    nil
-		  (let ((start (1+ (point)))
-			(bound))
-		    (narrow-to-region (point) (progn (end-of-line) (point)))
-		    (setq bound (point-max))
-		    (search-backward ",," nil t)
-		    (if attribute
-			(setq bound (1+ (point)))
-		      (setq start (1+ (point))))
-		    (goto-char start)
-;		    (while (re-search-forward "[ \t]*,[ \t]*" nil t)
-;		      (replace-match ","))
-;		    (goto-char start)
-		    (if (re-search-forward
-			   (concat ", " (rmail-quote-label-name label) ",")
-			   bound
-			   'move)
-			(if (not state) (replace-match ","))
-		      (if state (insert " " (symbol-name label) ",")))
-		    (if (eq label rmail-deleted-label)
-			(rmail-set-message-deleted-p n state)))))
-	    (narrow-to-region (- (buffer-size) omin) (- (buffer-size) omax))
-	    (if (= n rmail-current-message) (rmail-display-labels)))))))
-
-;; Commented functions aren't used by RMAIL but might be nice for user
-;; packages that do stuff with RMAIL.  Note that rmail-message-labels-p
-;; is in rmail.el now.
-
-;(defun rmail-message-attribute-p (attribute &optional n)
-;  "Returns t if ATTRIBUTE on NTH or current message."
-;  (rmail-message-labels-p (rmail-make-label attribute t) n))
-
-;(defun rmail-message-keyword-p (keyword &optional n)
-;  "Returns t if KEYWORD on NTH or current message."
-;  (rmail-message-labels-p (rmail-make-label keyword t) n t))
-
-;(defun rmail-message-label-p (label &optional n)
-;  "Returns symbol if LABEL (attribute or keyword) on NTH or current message."
-;  (rmail-message-labels-p (rmail-make-label label t) n 'all))
-
-;; Not used by RMAIL but might be nice for user package.
-
-;(defun rmail-parse-message-labels (&optional n)
-;  "Returns labels associated with NTH or current RMAIL message.
-;Results is a list of two lists.  The first is the message attributes
-;and the second is the message keywords.  Labels are represented as symbols."
-;  (let ((omin (- (buffer-size) (point-min)))
-;	(omax (- (buffer-size) (point-max)))
-;	(result))	
-;    (unwind-protect
-;	(save-excursion
-;	  (let ((beg (rmail-msgbeg (or n rmail-current-message))))
-;	    (widen)
-;	    (goto-char beg)
-;	    (forward-line 1)
-;	    (if (looking-at "[01],")
-;		(save-restriction
-;		  (narrow-to-region (point) (save-excursion (end-of-line) (point)))
-;		  (rmail-nuke-whitespace)
-;		  (goto-char (1+ (point-min)))
-;		  (list (mail-parse-comma-list) (mail-parse-comma-list))))))
-;      (narrow-to-region (- (buffer-size) omin)
-;    			 (- (buffer-size) omax))
-;      nil)))
-
-(defun rmail-attribute-p (s)
-  (let ((symbol (rmail-make-label s)))
-    (if (memq symbol (cdr rmail-attributes)) symbol)))
-
-(defun rmail-keyword-p (s)
-  (let ((symbol (rmail-make-label s)))
-    (if (memq symbol (cdr (rmail-keywords))) symbol)))
-
-(defun rmail-make-label (s &optional forcep)
-  (cond ((symbolp s) s)
-	(forcep (intern (downcase s) rmail-label-obarray))
-	(t  (intern-soft (downcase s) rmail-label-obarray))))
-
-(defun rmail-force-make-label (s)
-  (intern (downcase s) rmail-label-obarray))
-
-(defun rmail-quote-label-name (label)
-  (regexp-quote (symbol-name (rmail-make-label label t))))
-
-;; Motion on messages with keywords.
-
-(defun rmail-previous-labeled-message (n labels)
-  "Show previous message with one of the labels LABELS.
-LABELS should be a comma-separated list of label names.
-If LABELS is empty, the last set of labels specified is used.
-With prefix argument N moves backward N messages with these labels."
-  (interactive "p\nsMove to previous msg with labels: ")
-  (rmail-next-labeled-message (- n) labels))
-
-(defun rmail-next-labeled-message (n labels)
-  "Show next message with one of the labels LABELS.
-LABELS should be a comma-separated list of label names.
-If LABELS is empty, the last set of labels specified is used.
-With prefix argument N moves forward N messages with these labels."
-  (interactive "p\nsMove to next msg with labels: ")
-  (if (string= labels "")
-      (setq labels rmail-last-multi-labels))
-  (or labels
-      (error "No labels to find have been specified previously"))
-  (setq rmail-last-multi-labels labels)
-  (rmail-maybe-set-message-counters)
-  (let ((lastwin rmail-current-message)
-	(current rmail-current-message)
-	(regexp (concat ", ?\\("
-			(mail-comma-list-regexp labels)
-			"\\),")))
-    (save-restriction
-      (widen)
-      (while (and (> n 0) (< current rmail-total-messages))
-	(setq current (1+ current))
-	(if (rmail-message-labels-p current regexp)
-	    (setq lastwin current n (1- n))))
-      (while (and (< n 0) (> current 1))
-	(setq current (1- current))
-	(if (rmail-message-labels-p current regexp)
-	    (setq lastwin current n (1+ n)))))
-    (rmail-show-message lastwin)
-    (if (< n 0)
-	(message "No previous message with labels %s" labels))
-    (if (> n 0)
-	(message "No following message with labels %s" labels))))
-
-;;; Manipulate the file's Labels option.
-
-;; Return a list of symbols for all
-;; the keywords (labels) recorded in this file's Labels option.
-(defun rmail-keywords ()
-  (or rmail-keywords (rmail-parse-file-keywords)))
-
-;; Set rmail-keywords to a list of symbols for all
-;; the keywords (labels) recorded in this file's Labels option.
-(defun rmail-parse-file-keywords ()
-  (save-restriction
-    (save-excursion
-      (widen)
-      (goto-char 1)
-      (setq rmail-keywords
-	    (if (search-forward "\nLabels:" (rmail-msgbeg 1) t)
-		(progn
-		  (narrow-to-region (point) (progn (end-of-line) (point)))
-		  (goto-char (point-min))
-		  (cons 'rmail-keywords
-			(mapcar 'rmail-force-make-label
-				(mail-parse-comma-list)))))))))
-
-;; Add WORD to the list in the file's Labels option.
-;; Any keyword used for the first time needs this done.
-(defun rmail-install-keyword (word)
-  (let ((keyword (rmail-make-label word t))
-	(keywords (rmail-keywords)))
-    (if (not (or (rmail-attribute-p keyword)
-		 (rmail-keyword-p keyword)))
-	(let ((omin (- (buffer-size) (point-min)))
-	      (omax (- (buffer-size) (point-max))))
-	  (unwind-protect
-	      (save-excursion
-		(widen)
-		(goto-char 1)
-		(let ((case-fold-search t)
-		      (buffer-read-only nil))
-		  (or (search-forward "\nLabels:" nil t)
-		      (progn
-			(end-of-line)
-			(insert "\nLabels:")))
-		  (delete-region (point) (progn (end-of-line) (point)))
-		  (setcdr keywords (cons keyword (cdr keywords)))
-		  (while (setq keywords (cdr keywords))
-		    (insert (symbol-name (car keywords)) ","))
-		  (delete-char -1)))
-	    (narrow-to-region (- (buffer-size) omin)
-			      (- (buffer-size) omax)))))
-    keyword))
-
-;;; rmailkwd.el ends here
--- a/lisp/rmail/rmailmsc.el	Mon Aug 13 10:01:24 2007 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,54 +0,0 @@
-;;; rmailmsc.el --- miscellaneous support functions for the RMAIL mail reader
-
-;; Copyright (C) 1985 Free Software Foundation, Inc.
-
-;; Maintainer: FSF
-;; Keywords: mail
-
-;; 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.
-
-;;; Code:
-
-(defun set-rmail-inbox-list (file-name)
-  "Set the inbox list of the current RMAIL file to FILE-NAME.
-This may be a list of file names separated by commas.
-If FILE-NAME is empty, remove any inbox list."
-  (interactive "sSet mailbox list to (comma-separated list of filenames): ")
-  (save-excursion
-    (let ((names (rmail-parse-file-inboxes))
-	  (standard-output nil))
-      (if (or (not names)
-	      (y-or-n-p (concat "Replace "
-				(mapconcat 'identity names ", ")
-				"? ")))
-	  (let ((buffer-read-only nil))
-	    (widen)
-	    (goto-char (point-min))
-	    (search-forward "\n\^_")
-	    (re-search-backward "^Mail" nil t)
-	    (forward-line 0)
-	    (if (looking-at "Mail:")
-		(delete-region (point)
-			       (progn (forward-line 1)
-				      (point))))
-	    (if (not (string= file-name ""))
-		(insert "Mail: " file-name "\n"))))))
-  (setq rmail-inbox-list (rmail-parse-file-inboxes))
-  (rmail-show-message rmail-current-message))
-
-;;; rmailmsc.el ends here
--- a/lisp/rmail/rmailout.el	Mon Aug 13 10:01:24 2007 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,261 +0,0 @@
-;;; rmailout.el --- "RMAIL" mail reader for Emacs: output message to a file.
-
-;; Copyright (C) 1985, 1987, 1993 Free Software Foundation, Inc.
-
-;; Maintainer: FSF
-;; Keywords: mail
-
-;; 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.
-
-;;; Code:
-
-;; Temporary until Emacs always has this variable.
-(defvar rmail-delete-after-output nil
-  "*Non-nil means automatically delete a message that is copied to a file.")
-
-(defvar rmail-output-file-alist nil
-  "*Alist matching regexps to suggested output Rmail files.
-This is a list of elements of the form (REGEXP . NAME-EXP).
-The suggestion is taken if REGEXP matches anywhere in the message buffer.
-NAME-EXP may be a string constant giving the file name to use,
-or more generally it may be any kind of expression that returns
-a file name as a string.")
-
-;;; There are functions elsewhere in Emacs that use this function; check
-;;; them out before you change the calling method.
-(defun rmail-output-to-rmail-file (file-name &optional count)
-  "Append the current message to an Rmail file named FILE-NAME.
-If the file does not exist, ask if it should be created.
-If file is being visited, the message is appended to the Emacs
-buffer visiting that file.
-If the file exists and is not an Rmail file, 
-the message is appended in inbox format.
-
-A prefix argument N says to output N consecutive messages
-starting with the current one.  Deleted messages are skipped and don't count."
-  (interactive
-   (let ((default-file
-	   (let (answer tail)
-	     (setq tail rmail-output-file-alist)
-	     ;; Suggest a file based on a pattern match.
-	     (while (and tail (not answer))
-	       (save-excursion
-		 (goto-char (point-min))
-		 (if (re-search-forward (car (car tail)) nil t)
-		     (setq answer (eval (cdr (car tail)))))
-		 (setq tail (cdr tail))))
-	     ;; If not suggestions, use same file as last time.
-	     (or answer rmail-last-rmail-file))))
-     (list (setq rmail-last-rmail-file
-		 (if default-file
-		     (read-file-name
-		      (concat "Output message to Rmail file: (default "
-			      (file-name-nondirectory default-file)
-			      ") ")
-		      (file-name-directory default-file)
-		      default-file)
-		   (read-file-name "Output message to Rmail file: ")))
-	   (prefix-numeric-value current-prefix-arg))))
-  (or count (setq count 1))
-  (setq file-name
-	(expand-file-name file-name
-			  (file-name-directory rmail-last-rmail-file)))
-  (if (and (file-readable-p file-name) (not (rmail-file-p file-name)))
-      (rmail-output file-name count)
-    (rmail-maybe-set-message-counters)
-    (setq file-name (abbreviate-file-name file-name))
-    (or (get-file-buffer file-name)
-	(file-exists-p file-name)
-	(if (yes-or-no-p
-	     (concat "\"" file-name "\" does not exist, create it? "))
-	    (let ((file-buffer (create-file-buffer file-name)))
-	      (save-excursion
-		(set-buffer file-buffer)
-		(rmail-insert-rmail-file-header)
-		(let ((require-final-newline nil))
-		  (write-region (point-min) (point-max) file-name t 1)))
-	      (kill-buffer file-buffer))
-	  (error "Output file does not exist")))
-    (while (> count 0)
-      (let (redelete)
-	(unwind-protect
-	    (progn
-	      (save-restriction
-		(widen)
-		(if (rmail-message-deleted-p rmail-current-message)
-		    (progn (setq redelete t)
-			   (rmail-set-attribute "deleted" nil)))
-		;; Decide whether to append to a file or to an Emacs buffer.
-		(save-excursion
-		  (let ((buf (get-file-buffer file-name))
-			(cur (current-buffer))
-			(beg (1+ (rmail-msgbeg rmail-current-message)))
-			(end (1+ (rmail-msgend rmail-current-message))))
-		    (if (not buf)
-			(append-to-file beg end file-name)
-		      (if (eq buf (current-buffer))
-			  (error "Can't output message to same file it's already in"))
-		      ;; File has been visited, in buffer BUF.
-		      (set-buffer buf)
-		      (let ((buffer-read-only nil)
-			    (msg (and (boundp 'rmail-current-message)
-				      rmail-current-message)))
-			;; If MSG is non-nil, buffer is in RMAIL mode.
-			(if msg
-			    (progn
-			      (rmail-maybe-set-message-counters)
-			      (widen)
-			      (narrow-to-region (point-max) (point-max))
-			      (insert-buffer-substring cur beg end)
-			      (goto-char (point-min))
-			      (widen)
-			      (search-backward "\n\^_")
-			      (narrow-to-region (point) (point-max))
-			      (rmail-count-new-messages t)
-			      (rmail-show-message msg))
-			  ;; Output file not in rmail mode => just insert at
-			  ;; the end.
-			  (narrow-to-region (point-min) (1+ (buffer-size)))
-			  (goto-char (point-max))
-			  (insert-buffer-substring cur beg end)))))))
-	      (rmail-set-attribute "filed" t))
-	  (if redelete (rmail-set-attribute "deleted" t))))
-      (setq count (1- count))
-      (if rmail-delete-after-output
-	  (rmail-delete-forward)
-	(if (> count 0)
-	    (rmail-next-undeleted-message 1))))))
-
-;; Returns t if file FILE is an Rmail file.
-;;;###autoload
-(defun rmail-file-p (file)
-  (let ((buf (generate-new-buffer " *rmail-file-p*")))
-    (unwind-protect
-	(save-excursion
-	  (set-buffer buf)
-	  (insert-file-contents file nil 0 100)
-	  (looking-at "BABYL OPTIONS:"))
-      (kill-buffer buf))))
-
-;;; There are functions elsewhere in Emacs that use this function; check
-;;; them out before you change the calling method.
-;;; ####Boy, FROM-GNUS, what wonderful abstraction.  You loser.
-(defun rmail-output (file-name &optional count noattribute from-gnus)
-  "Append this message to Unix mail file named FILE-NAME.
-A prefix argument N says to output N consecutive messages
-starting with the current one.  Deleted messages are skipped and don't count.
-When called from lisp code, N may be omitted.
-
-If the pruned message header is shown on the current message, then
-messages will be appended with pruned headers; otherwise, messages
-will be appended with their original headers.
-
-The optional third argument NOATTRIBUTE, if non-nil, says not
-to set the `filed' attribute, and not to display a message.
-
-The optional fourth argument FROM-GNUS is set when called from GNUS."
-  (interactive
-   (list (setq rmail-last-file
-	       (read-file-name
-		(concat "Output message to Unix mail file"
-			(if rmail-last-file
-			    (concat " (default "
-				    (file-name-nondirectory rmail-last-file)
-				    "): " )
-			  ": "))			
-		(and rmail-last-file (file-name-directory rmail-last-file))
-		rmail-last-file))
-	 (prefix-numeric-value current-prefix-arg)))
-  (or count (setq count 1))
-  (setq file-name
-	(expand-file-name file-name
-			  (and rmail-last-file
-			       (file-name-directory rmail-last-file))))
-  (if (and (file-readable-p file-name) (rmail-file-p file-name))
-      (rmail-output-to-rmail-file file-name count)
-    (let ((orig-count count)
-	  (rmailbuf (current-buffer))
-	  (case-fold-search t)
-	  (tembuf (get-buffer-create " rmail-output"))
-	  (original-headers-p
-	   (and (not from-gnus)
-		(save-excursion 
-		  (save-restriction
-		    (narrow-to-region (rmail-msgbeg rmail-current-message) (point-max))
-		    (goto-char (point-min))
-		    (forward-line 1)
-		    (= (following-char) ?0)))))
-	  header-beginning
-	  mail-from)
-      (while (> count 0)
-	(or from-gnus
-	    (setq mail-from
-		  (save-excursion
-		    (save-restriction
-		      (widen)
-		      (goto-char (rmail-msgbeg rmail-current-message))
-		      (setq header-beginning (point))
-		      (search-forward "\n*** EOOH ***\n")
-		      (narrow-to-region header-beginning (point))
-		      (mail-fetch-field "Mail-From")))))
-	(save-excursion
-	  (set-buffer tembuf)
-	  (erase-buffer)
-	  (insert-buffer-substring rmailbuf)
-	  (insert "\n")
-	  (goto-char (point-min))
-	  (if mail-from
-	      (insert mail-from "\n")
-	    (insert "From "
-		    (mail-strip-quoted-names (or (mail-fetch-field "from")
-						 (mail-fetch-field "really-from")
-						 (mail-fetch-field "sender")
-						 "unknown"))
-		    " " (current-time-string) "\n"))
-	  ;; ``Quote'' "\nFrom " as "\n>From "
-	  ;;  (note that this isn't really quoting, as there is no requirement
-	  ;;   that "\n[>]+From " be quoted in the same transparent way.)
-	  (while (search-forward "\nFrom " nil t)
-	    (forward-char -5)
-	    (insert ?>))
-	  (write-region (point-min) (point-max) file-name t
-			(if noattribute 'nomsg)))
-	(or noattribute
-	    (if (equal major-mode 'rmail-mode)
-		(rmail-set-attribute "filed" t)))
-	(setq count (1- count))
-	(or from-gnus
-	    (let ((next-message-p
-		   (if rmail-delete-after-output
-		       (rmail-delete-forward)
-		     (if (> count 0)
-			 (rmail-next-undeleted-message 1))))
-		  (num-appended (- orig-count count)))
-	      (if (and next-message-p original-headers-p)
-		  (rmail-toggle-header))
-	      (if (and (> count 0) (not next-message-p))
-		  (progn 
-		    (error
-		     (save-excursion
-		       (set-buffer rmailbuf)
-		       (format "Only %d message%s appended" num-appended
-			       (if (= num-appended 1) "" "s"))))
-		    (setq count 0))))))
-      (kill-buffer tembuf))))
-
-;;; rmailout.el ends here
--- a/lisp/rmail/rmailsort.el	Mon Aug 13 10:01:24 2007 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,204 +0,0 @@
-;;; rmailsort.el --- Rmail: sort messages.
-
-;; Copyright (C) 1990, 1993 Free Software Foundation, Inc.
-
-;; Author: Masanobu UMEDA <umerin@mse.kyutech.ac.jp>
-;; Version: !Header: /home/fsf/rms/e19/lisp/RCS/rmailsort.el,v 1.16 1993/11/24 08:08:56 rms Exp !
-;; Keywords: mail
-
-;; 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.
-
-;;; Code:
-
-(require 'sort)
-
-(autoload 'timezone-make-date-sortable "timezone")
-
-;; Sorting messages in Rmail buffer
-
-(defun rmail-sort-by-date (reverse)
-  "Sort messages of current Rmail file by date.
-If prefix argument REVERSE is non-nil, sort them in reverse order."
-  (interactive "P")
-  (rmail-sort-messages reverse
-		       (function
-			(lambda (msg)
-			  (rmail-make-date-sortable
-			   (rmail-fetch-field msg "Date"))))))
-
-(defun rmail-sort-by-subject (reverse)
-  "Sort messages of current Rmail file by subject.
-If prefix argument REVERSE is non-nil, sort them in reverse order."
-  (interactive "P")
-  (rmail-sort-messages reverse
-		       (function
-			(lambda (msg)
-			  (let ((key (or (rmail-fetch-field msg "Subject") ""))
-				(case-fold-search t))
-			    ;; Remove `Re:'
-			    (if (string-match "^\\(re:[ \t]+\\)*" key)
-				(substring key (match-end 0)) key))))))
-
-(defun rmail-sort-by-author (reverse)
-  "Sort messages of current Rmail file by author.
-If prefix argument REVERSE is non-nil, sort them in reverse order."
-  (interactive "P")
-  (rmail-sort-messages reverse
-		       (function
-			(lambda (msg)
-			  (downcase	;Canonical name
-			   (mail-strip-quoted-names
-			    (or (rmail-fetch-field msg "From")
-				(rmail-fetch-field msg "Sender") "")))))))
-
-(defun rmail-sort-by-recipient (reverse)
-  "Sort messages of current Rmail file by recipient.
-If prefix argument REVERSE is non-nil, sort them in reverse order."
-  (interactive "P")
-  (rmail-sort-messages reverse
-		       (function
-			(lambda (msg)
-			  (downcase	;Canonical name
-			   (mail-strip-quoted-names
-			    (or (rmail-fetch-field msg "To")
-				(rmail-fetch-field msg "Apparently-To") "")
-			    ))))))
-
-(defun rmail-sort-by-correspondent (reverse)
-  "Sort messages of current Rmail file by other correspondent.
-If prefix argument REVERSE is non-nil, sort them in reverse order."
-  (interactive "P")
-  (rmail-sort-messages reverse
-		       (function
-			(lambda (msg)
-			  (rmail-select-correspondent
-			   msg
-			   '("From" "Sender" "To" "Apparently-To"))))))
-
-(defun rmail-select-correspondent (msg fields)
-  (let ((ans ""))
-    (while (and fields (string= ans ""))
-      (setq ans
-	    (rmail-dont-reply-to
-	     (mail-strip-quoted-names
-	      (or (rmail-fetch-field msg (car fields)) ""))))
-      (setq fields (cdr fields)))
-    ans))
-
-(defun rmail-sort-by-lines (reverse)
-  "Sort messages of current Rmail file by number of lines.
-If prefix argument REVERSE is non-nil, sort them in reverse order."
-  (interactive "P")
-  (rmail-sort-messages reverse
-		       (function
-			(lambda (msg)
-			  (count-lines (rmail-msgbeg msgnum)
-				       (rmail-msgend msgnum))))))
-
-;; Basic functions
-
-(defun rmail-sort-messages (reverse keyfun)
-  "Sort messages of current Rmail file.
-If 1st argument REVERSE is non-nil, sort them in reverse order.
-2nd argument KEYFUN is called with a message number, and should return a key."
-  (save-excursion
-    ;; If we are in a summary buffer, operate on the Rmail buffer.
-    (if (eq major-mode 'rmail-summary-mode)
-	(set-buffer rmail-buffer))
-    (let ((buffer-read-only nil)
-	  (predicate nil)			;< or string-lessp
-	  (sort-lists nil))
-      (message "Finding sort keys...")
-      (widen)
-      (let ((msgnum 1))
-	(while (>= rmail-total-messages msgnum)
-	  (setq sort-lists
-		(cons (list (funcall keyfun msgnum) ;Make sorting key
-			    (eq rmail-current-message msgnum) ;True if current
-			    (aref rmail-message-vector msgnum)
-			    (aref rmail-message-vector (1+ msgnum)))
-		      sort-lists))
-	  (if (zerop (% msgnum 10))
-	      (message "Finding sort keys...%d" msgnum))
-	  (setq msgnum (1+ msgnum))))
-      (or reverse (setq sort-lists (nreverse sort-lists)))
-      ;; Decide predicate: < or string-lessp
-      (if (numberp (car (car sort-lists))) ;Is a key numeric?
-	  (setq predicate (function <))
-	(setq predicate (function string-lessp)))
-      (setq sort-lists
-	    (sort sort-lists
-		  (function
-		   (lambda (a b)
-		     (funcall predicate (car a) (car b))))))
-      (if reverse (setq sort-lists (nreverse sort-lists)))
-      ;; Now we enter critical region.  So, keyboard quit is disabled.
-      (message "Reordering messages...")
-      (let ((inhibit-quit t)		;Inhibit quit
-	    (current-message nil)
-	    (msgnum 1)
-	    (msginfo nil))
-	;; There's little hope that we can easily undo after that.
-	(buffer-disable-undo (current-buffer))
-	(goto-char (rmail-msgbeg 1))
-	;; To force update of all markers.
-	(insert-before-markers ?Z)
-	(backward-char 1)
-	;; Now reorder messages.
-	(while sort-lists
-	  (setq msginfo (car sort-lists))
-	  ;; Swap two messages.
-	  (insert-buffer-substring
-	   (current-buffer) (nth 2 msginfo) (nth 3 msginfo))
-	  (delete-region  (nth 2 msginfo) (nth 3 msginfo))
-	  ;; Is current message?
-	  (if (nth 1 msginfo)
-	      (setq current-message msgnum))
-	  (setq sort-lists (cdr sort-lists))
-	  (if (zerop (% msgnum 10))
-	      (message "Reordering messages...%d" msgnum))
-	  (setq msgnum (1+ msgnum)))
-	;; Delete the garbage inserted before.
-	(delete-char 1)
-	(setq quit-flag nil)
-	(buffer-enable-undo)
-	(rmail-set-message-counters)
-	(rmail-show-message current-message)))))
-
-(defun rmail-fetch-field (msg field)
-  "Return the value of the header FIELD of MSG.
-Arguments are MSG and FIELD."
-  (save-restriction
-    (widen)
-    (let ((next (rmail-msgend msg)))
-      (goto-char (rmail-msgbeg msg))
-      (narrow-to-region (if (search-forward "\n*** EOOH ***\n" next t)
-			    (point)
-			  (forward-line 1)
-			  (point))
-			(progn (search-forward "\n\n" nil t) (point)))
-      (mail-fetch-field field))))
-
-(defun rmail-make-date-sortable (date)
-  "Make DATE sortable using the function string-lessp."
-  ;; Assume the default time zone is GMT.
-  (timezone-make-date-sortable date "GMT" "GMT"))
-
-(provide 'rmailsort)
-
-;;; rmailsort.el ends here
--- a/lisp/rmail/rmailsum.el	Mon Aug 13 10:01:24 2007 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1098 +0,0 @@
-;;; rmailsum.el --- make summary buffers for the mail reader
-
-;; Copyright (C) 1985, 1993 Free Software Foundation, Inc.
-
-;; Maintainer: FSF
-;; Keywords: mail
-
-;; This file is part of XEmacs.
-
-;; XEmacs is free software; you can redistribute it and/or modify it
-;; under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 2, or (at your option)
-;; any later version.
-
-;; XEmacs is distributed in the hope that it will be useful, but
-;; WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-;; General Public License for more details.
-
-;; You should have received a copy of the GNU General Public License
-;; along with XEmacs; see the file COPYING.  If not, write to the 
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
-
-;;; Commentary:
-
-;; Extended by Bob Weiner of Motorola
-;;   Provided all commands from rmail-mode in rmail-summary-mode and made key
-;;   bindings in both modes wholly compatible.
-
-;;; Code:
-
-;; Entry points for making a summary buffer.
-
-(defvar rmail-summary-redo)
-(defvar rmail-buffer)
-(defvar rmail-summary-mode-map nil)
-
-;; Regenerate the contents of the summary
-;; using the same selection criterion as last time.
-;; M-x revert-buffer in a summary buffer calls this function.
-(defun rmail-update-summary (&rest ignore)
-  (apply (car rmail-summary-redo) (cdr rmail-summary-redo)))
-
-(defun rmail-summary ()
-  "Display a summary of all messages, one line per message."
-  (interactive)
-  (rmail-new-summary "All" '(rmail-summary) nil))
-
-(defun rmail-summary-by-labels (labels)
-  "Display a summary of all messages with one or more LABELS.
-LABELS should be a string containing the desired labels, separated by commas."
-  (interactive "sLabels to summarize by: ")
-  (if (string= labels "")
-      (setq labels (or rmail-last-multi-labels
-		       (error "No label specified"))))
-  (setq rmail-last-multi-labels labels)
-  (rmail-new-summary (concat "labels " labels)
-		     (list 'rmail-summary-by-labels labels)
-		     'rmail-message-labels-p
-		     (concat ", \\(" (mail-comma-list-regexp labels) "\\),")))
-
-(defun rmail-summary-by-recipients (recipients &optional primary-only)
-  "Display a summary of all messages with the given RECIPIENTS.
-Normally checks the To, From and Cc fields of headers;
-but if PRIMARY-ONLY is non-nil (prefix arg given),
- only look in the To and From fields.
-RECIPIENTS is a string of regexps separated by commas."
-  (interactive "sRecipients to summarize by: \nP")
-  (rmail-new-summary
-   (concat "recipients " recipients)
-   (list 'rmail-summary-by-recipients recipients primary-only)
-   'rmail-message-recipients-p
-   (mail-comma-list-regexp recipients) primary-only))
-
-(defun rmail-summary-by-regexp (regexp)
-  "Display a summary of all messages according to regexp REGEXP.
-If the regular expression is found in the header of the message
-\(including in the date and other lines, as well as the subject line),
-Emacs will list the header line in the RMAIL-summary."
-  (interactive "sRegexp to summarize by: ")
-  (if (string= regexp "")
-      (setq regexp (or rmail-last-regexp
-			 (error "No regexp specified."))))
-  (setq rmail-last-regexp regexp)
-  (rmail-new-summary (concat "regexp " regexp)
-		     (list 'rmail-summary-by-regexp regexp)
-		     'rmail-message-regexp-p
-                     regexp))
-
-;; rmail-summary-by-topic
-;; 1989 R.A. Schnitzler
-
-(defun rmail-summary-by-topic (subject &optional whole-message)
-  "Display a summary of all messages with the given SUBJECT.
-Normally checks the Subject field of headers;
-but if WHOLE-MESSAGE is non-nil (prefix arg given), 
- look in the whole message.
-SUBJECT is a string of regexps separated by commas."
-  (interactive "sTopics to summarize by: \nP")
-  (rmail-new-summary
-   (concat "about " subject)
-   (list 'rmail-summary-by-topic subject whole-message)
-   'rmail-message-subject-p
-   (mail-comma-list-regexp subject) whole-message))
-
-(defun rmail-message-subject-p (msg subject &optional whole-message)
-  (save-restriction
-    (goto-char (rmail-msgbeg msg))
-    (search-forward "\n*** EOOH ***\n")
-    (narrow-to-region
-     (point)
-     (progn (search-forward (if whole-message "\^_" "\n\n")) (point)))
-    (goto-char (point-min))
-    (if whole-message (re-search-forward subject nil t)
-      (string-match subject (or (mail-fetch-field "Subject") "")) )))
-
-(defun rmail-summary-by-senders (senders)
-  "Display a summary of all messages with the given SENDERS.
-SENDERS is a string of names separated by commas."
-  (interactive "sSenders to summarize by: ")
-  (rmail-new-summary
-   (concat "senders " senders)
-   'rmail-message-senders-p
-   (mail-comma-list-regexp senders)))
-
-(defun rmail-message-senders-p (msg senders)
-  (save-restriction
-    (goto-char (rmail-msgbeg msg))
-    (search-forward "\n*** EOOH ***\n")
-    (narrow-to-region (point) (progn (search-forward "\n\n") (point)))
-    (string-match senders (or (mail-fetch-field "From") ""))))
-
-;; General making of a summary buffer.
-
-(defvar rmail-summary-symbol-number 0)
-
-(defun rmail-new-summary (description redo-form function &rest args)
-  "Create a summary of selected messages.
-DESCRIPTION makes part of the mode line of the summary buffer.
-For each message, FUNCTION is applied to the message number and ARGS...
-and if the result is non-nil, that message is included.
-nil for FUNCTION means all messages."
-  (if (eq major-mode 'mime/viewer-mode)
-      (let ((buf mime::preview/article-buffer)
-	    (pbuf (current-buffer))
-	    )
-	(switch-to-buffer buf)
-	(bury-buffer pbuf)
-	))
-  (message "Computing summary lines...")
-  (let (sumbuf mesg was-in-summary)
-    (save-excursion
-      ;; Go to the Rmail buffer.
-      (if (eq major-mode 'rmail-summary-mode)
-	  (progn
-	    (setq was-in-summary t)
-	    (set-buffer rmail-buffer)))
-      ;; Find its summary buffer, or make one.
-      (setq sumbuf
-	    (if (and rmail-summary-buffer
-		     (buffer-name rmail-summary-buffer))
-		rmail-summary-buffer
-	      (generate-new-buffer (concat (buffer-name) "-summary"))))
-      (setq mesg rmail-current-message)
-      ;; Filter the messages; make or get their summary lines.
-      (let ((summary-msgs ())
-	    (new-summary-line-count 0))
-	(let ((msgnum 1)
-	      (buffer-read-only nil))
-	  (save-restriction
-	    (save-excursion
-	      (widen)
-	      (goto-char (point-min))
-	      (while (>= rmail-total-messages msgnum)
-		(if (or (null function)
-			(apply function (cons msgnum args)))
-		    (setq summary-msgs
-			  (cons (cons msgnum (rmail-make-summary-line msgnum))
-				summary-msgs)))
-		(setq msgnum (1+ msgnum)))
-	      (setq summary-msgs (nreverse summary-msgs)))))
-	;; Temporarily, while summary buffer is unfinished,
-	;; we "don't have" a summary.
-	(setq rmail-summary-buffer nil)
-	(save-excursion
-	  (let ((rbuf (current-buffer))
-		(total rmail-total-messages))
-	    (set-buffer sumbuf)
-	    ;; Set up the summary buffer's contents.
-	    (let ((buffer-read-only nil))
-	      (erase-buffer)
-	      (while summary-msgs
-		(princ (cdr (car summary-msgs)) sumbuf)
-		(setq summary-msgs (cdr summary-msgs)))
-	      (goto-char (point-min)))
-	    ;; Set up the rest of its state and local variables.
-	    (setq buffer-read-only t)
-	    (rmail-summary-mode)
-	    (make-local-variable 'minor-mode-alist)
-	    (setq minor-mode-alist (list '(t (concat ": " description))))
-	    (setq rmail-buffer rbuf
-		  rmail-summary-redo redo-form
-		  rmail-total-messages total))))
-      (setq rmail-summary-buffer sumbuf))
-    ;; Now display the summary buffer and go to the right place in it.
-    (or was-in-summary
-	(pop-to-buffer sumbuf))
-    (rmail-summary-goto-msg mesg t t)
-    (message "Computing summary lines...done")))
-
-;; Low levels of generating a summary.
-
-(defun rmail-make-summary-line (msg)
-  (let ((line (or (aref rmail-summary-vector (1- msg))
-		  (progn
-		    (setq new-summary-line-count
-			  (1+ new-summary-line-count))
-		    (if (zerop (% new-summary-line-count 10))
-			(message "Computing summary lines...%d"
-				 new-summary-line-count))
-		    (rmail-make-summary-line-1 msg)))))
-    ;; Fix up the part of the summary that says "deleted" or "unseen".
-    (aset line 4
-	  (if (rmail-message-deleted-p msg) ?\D
-	    (if (= ?0 (char-after (+ 3 (rmail-msgbeg msg))))
-		?\- ?\ )))
-    line))
-
-(defun rmail-make-summary-line-1 (msg)
-  (goto-char (rmail-msgbeg msg))
-  (let* (;;(lim (save-excursion (forward-line 2) (point)))
-	 pos
-	 (labels
-	  (progn
-	    (forward-char 3)
-	    (concat
-;	     (if (save-excursion (re-search-forward ",answered," lim t))
-;		 "*" "")
-;	     (if (save-excursion (re-search-forward ",filed," lim t))
-;		 "!" "")
-	     (if (progn (search-forward ",,") (eolp))
-		 ""
-	       (concat "{"
-		       (buffer-substring (point)
-					 (progn (end-of-line) (point)))
-		       "} ")))))
-	 (line
-	  (progn
-	    (forward-line 1)
-	    (if (looking-at "Summary-line: ")
-		(progn
-		  (goto-char (match-end 0))
-		  (progn ;;setq line      -jwz
-			(buffer-substring (point)
-					  (progn (forward-line 1) (point)))))))))
-    ;; Obsolete status lines lacking a # should be flushed.
-    (and line
-	 (not (string-match "#" line))
-	 (progn
-	   (delete-region (point)
-			  (progn (forward-line -1) (point)))
-	   (setq line nil)))
-    ;; If we didn't get a valid status line from the message,
-    ;; make a new one and put it in the message.
-    (or line
-	(let* ((case-fold-search t)
-	       (next (rmail-msgend msg))
-	       (beg (if (progn (goto-char (rmail-msgbeg msg))
-			       (search-forward "\n*** EOOH ***\n" next t))
-			(point)
-		      (forward-line 1)
-		      (point)))
-	       (end (progn (search-forward "\n\n" nil t) (point))))
-	  (save-restriction
-	    (narrow-to-region beg end)
-	    (goto-char beg)
-	    (setq line (rmail-make-basic-summary-line)))
-	  (goto-char (rmail-msgbeg msg))
-	  (forward-line 2)
-	  (insert "Summary-line: " line)))
-    (setq pos (string-match "#" line))
-    (aset rmail-summary-vector (1- msg)
-	  (concat (format "%4d  " msg)
-		  (substring line 0 pos)
-		  labels
-		  (substring line (1+ pos))))))
-
-(defun rmail-make-basic-summary-line ()
-  (goto-char (point-min))
-  (concat (save-excursion
-	    (if (not (re-search-forward "^Date:" nil t))
-		"      "
-	      (cond ((re-search-forward "\\([^0-9:]\\)\\([0-3]?[0-9]\\)\\([- \t_]+\\)\\([adfjmnos][aceopu][bcglnprtvy]\\)"
-		      (save-excursion (end-of-line) (point)) t)
-		     (format "%2d-%3s"
-			     (string-to-int (buffer-substring
-					     (match-beginning 2)
-					     (match-end 2)))
-			     (buffer-substring
-			      (match-beginning 4) (match-end 4))))
-		    ((re-search-forward "\\([^a-z]\\)\\([adfjmnos][acepou][bcglnprtvy]\\)\\([-a-z \t_]*\\)\\([0-9][0-9]?\\)"
-		      (save-excursion (end-of-line) (point)) t)
-		     (format "%2d-%3s"
-			     (string-to-int (buffer-substring
-					     (match-beginning 4)
-					     (match-end 4)))
-			     (buffer-substring
-			      (match-beginning 2) (match-end 2))))
-		    (t "??????"))))
-	  "  "
-	  (save-excursion
-	    (if (not (re-search-forward "^From:[ \t]*" nil t))
-		"                         "
-	      (let* ((from (mail-strip-quoted-names
-			    (buffer-substring
-			     (1- (point))
-			     (progn (end-of-line)
-				    (skip-chars-backward " \t")
-				    (point)))))
-		     len mch lo)
-		(if (string-match (concat "^"
-					  (regexp-quote (user-login-name))
-					  "\\($\\|@\\)")
-				  from)
-		    (save-excursion
-		      (goto-char (point-min))
-		      (if (not (re-search-forward "^To:[ \t]*" nil t))
-			  nil
-			(setq from
-			      (concat "to: "
-				      (mail-strip-quoted-names
-				       (buffer-substring
-					(point)
-					(progn (end-of-line)
-					       (skip-chars-backward " \t")
-					       (point)))))))))
-		(setq len (length from))
-		(setq mch (string-match "[@%]" from))
-		(format "%25s"
-			(if (or (not mch) (<= len 25))
-			    (substring from (max 0 (- len 25)))
-			  (substring from
-				     (setq lo (cond ((< (- mch 9) 0) 0)
-						    ((< len (+ mch 16))
-						     (- len 25))
-						    (t (- mch 9))))
-				     (min len (+ lo 25))))))))
-	  "  #"
-	  (if (re-search-forward "^Subject:" nil t)
-	      (progn (skip-chars-forward " \t")
-		     (buffer-substring (point)
-				       (progn (end-of-line)
-					      (point))))
-	    (re-search-forward "[\n][\n]+" nil t)
-	    (buffer-substring (point) (progn (end-of-line) (point))))
-	  "\n"))
-
-;; Simple motion in a summary buffer.
-
-(defun rmail-summary-next-all (&optional number)
-  (interactive "p")
-  (forward-line (if number number 1))
-  (display-buffer rmail-buffer))
-
-(defun rmail-summary-previous-all (&optional number)
-  (interactive "p")
-  (forward-line (- (if number number 1)))
-  (display-buffer rmail-buffer))
-
-(defun rmail-summary-next-msg (&optional number)
-  "Display next non-deleted msg from rmail file.
-With optional prefix argument NUMBER, moves forward this number of non-deleted
-messages, or backward if NUMBER is negative."
-  (interactive "p")
-  (forward-line 0)
-  (and (> number 0) (end-of-line))
-  (let ((count (if (< number 0) (- number) number))
-	(search (if (> number 0) 're-search-forward 're-search-backward))
-	(non-del-msg-found nil))
-    (while (and (> count 0) (setq non-del-msg-found
-				  (or (funcall search "^....[^D]" nil t)
-				      non-del-msg-found)))
-      (setq count (1- count))))
-  (beginning-of-line)
-  (display-buffer rmail-buffer))
-
-(defun rmail-summary-previous-msg (&optional number)
-  (interactive "p")
-  (rmail-summary-next-msg (- (if number number 1))))
-
-(defun rmail-summary-next-labeled-message (n labels)
-  "Show next message with LABEL.  Defaults to last labels used.
-With prefix argument N moves forward N messages with these labels."
-  (interactive "p\nsMove to next msg with labels: ")
-  (save-excursion
-    (set-buffer rmail-buffer)
-    (rmail-next-labeled-message n labels)))
-
-(defun rmail-summary-previous-labeled-message (n labels)
-  "Show previous message with LABEL.  Defaults to last labels used.
-With prefix argument N moves backward N messages with these labels."
-  (interactive "p\nsMove to previous msg with labels: ")
-  (save-excursion
-    (set-buffer rmail-buffer)
-    (rmail-previous-labeled-message n labels)))
-
-;; Delete and undelete summary commands.
-
-(defun rmail-summary-delete-forward (&optional backward)
-  "Delete this message and move to next nondeleted one.
-Deleted messages stay in the file until the \\[rmail-expunge] command is given.
-With prefix argument, delete and move backward."
-  (interactive "P")
-  (progn ;;let (end) ;jwz
-    (rmail-summary-goto-msg)
-    (pop-to-buffer rmail-buffer)
-    (rmail-delete-forward backward)
-    (pop-to-buffer rmail-summary-buffer)))
-
-(defun rmail-summary-delete-backward ()
-  "Delete this message and move to previous nondeleted one.
-Deleted messages stay in the file until the \\[rmail-expunge] command is given."
-  (interactive)
-  (rmail-summary-delete-forward t))
-
-(defun rmail-summary-mark-deleted (&optional n undel)
-  (and n (rmail-summary-goto-msg n t t))
-  (or (eobp)
-      (let ((buffer-read-only nil))
-	(skip-chars-forward " ")
-	(skip-chars-forward "[0-9]")
-	(if undel
-	    (if (looking-at "D")
-		(progn (delete-char 1) (insert " ")))
-	  (delete-char 1)
-	  (insert "D"))))
-  (beginning-of-line))
-
-(defun rmail-summary-mark-undeleted (n)
-  (rmail-summary-mark-deleted n t))
-
-(defun rmail-summary-deleted-p (&optional n)
-  (save-excursion
-    (and n (rmail-summary-goto-msg n nil t))
-    (skip-chars-forward " ")
-    (skip-chars-forward "[0-9]")
-    (looking-at "D")))
-
-(defun rmail-summary-undelete (&optional arg)
-  "Undelete current message.
-Optional prefix ARG means undelete ARG previous messages."
-  (interactive "p")
-  (if (/= arg 1)
-      (rmail-summary-undelete-many arg)
-    (let ((buffer-read-only nil))
-      (end-of-line)
-      (cond ((re-search-backward "\\(^ *[0-9]*\\)\\(D\\)" nil t)
-	     (replace-match "\\1 ")
-	     (rmail-summary-goto-msg)
-	     (pop-to-buffer rmail-buffer)
-	     (and (rmail-message-deleted-p rmail-current-message)
-		  (rmail-undelete-previous-message))
-	     (pop-to-buffer rmail-summary-buffer))))))
-
-(defun rmail-summary-undelete-many (&optional n)
-  "Undelete all deleted msgs, optional prefix arg N means undelete N prev msgs."
-  (interactive "P")
-  (save-excursion
-    (set-buffer rmail-buffer)
-    (let* ((init-msg (if n rmail-current-message rmail-total-messages))
-	   (rmail-current-message init-msg)
-	   (n (or n rmail-total-messages))
-	   (msgs-undeled 0))
-      (while (and (> rmail-current-message 0)
-		  (< msgs-undeled n))
-	(if (rmail-message-deleted-p rmail-current-message)
-	    (progn (rmail-set-attribute "deleted" nil)
-		   (setq msgs-undeled (1+ msgs-undeled))))
-	(setq rmail-current-message (1- rmail-current-message)))
-      (set-buffer rmail-summary-buffer)
-      (setq rmail-current-message init-msg msgs-undeled 0)
-      (while (and (> rmail-current-message 0)
-		  (< msgs-undeled n))
-	(if (rmail-summary-deleted-p rmail-current-message)
-	    (progn (rmail-summary-mark-undeleted rmail-current-message)
-		   (setq msgs-undeled (1+ msgs-undeled))))
-	(setq rmail-current-message (1- rmail-current-message))))
-    (rmail-summary-goto-msg)))
-
-;; Rmail Summary mode is suitable only for specially formatted data.
-(put 'rmail-summary-mode 'mode-class 'special)
-
-(defun rmail-summary-mode ()
-  "Rmail Summary Mode is invoked from Rmail Mode by using \\<rmail-mode-map>\\[rmail-summary].
-As commands are issued in the summary buffer, they are applied to the
-corresponding mail messages in the rmail buffer.
-
-All normal editing commands are turned off.
-Instead, nearly all the Rmail mode commands are available,
-though many of them move only among the messages in the summary.
-
-These additional commands exist:
-
-\\[rmail-summary-undelete-many]	Undelete all or prefix arg deleted messages.
-\\[rmail-summary-wipe] Delete the summary and go to the Rmail buffer.
-
-Commands for sorting the summary:
-
-\\[rmail-summary-sort-by-date] Sort by date.
-\\[rmail-summary-sort-by-subject] Sort by subject.
-\\[rmail-summary-sort-by-author] Sort by author.
-\\[rmail-summary-sort-by-recipient] Sort by recipient.
-\\[rmail-summary-sort-by-correspondent] Sort by correspondent.
-\\[rmail-summary-sort-by-lines] Sort by lines."
-  (interactive)
-  (kill-all-local-variables)
-  (setq major-mode 'rmail-summary-mode)
-  (setq mode-name "RMAIL Summary")
-  (use-local-map rmail-summary-mode-map)
-  (setq truncate-lines t)
-  (setq buffer-read-only t)
-  (set-syntax-table text-mode-syntax-table)
-  (make-local-variable 'rmail-buffer)
-  (make-local-variable 'rmail-total-messages)
-  (make-local-variable 'rmail-current-message)
-  (setq rmail-current-message nil)
-  (make-local-variable 'rmail-summary-redo)
-  (setq rmail-summary-redo nil)
-  (make-local-variable 'revert-buffer-function)
-  (setq revert-buffer-function 'rmail-update-summary)
-  (make-local-hook 'post-command-hook)
-  (add-hook 'post-command-hook 'rmail-summary-rmail-update nil t)
-  (run-hooks 'rmail-summary-mode-hook))
-
-;; Show in Rmail the message described by the summary line that point is on,
-;; but only if the Rmail buffer is already visible.
-;; This is a post-command-hook in summary buffers.
-(defun rmail-summary-rmail-update ()
-  (if (get-buffer-window rmail-buffer)
-      (let (buffer-read-only)
-	(save-excursion
-	  (beginning-of-line)
-	  (skip-chars-forward " ")
-	  (let ((beg (point))
-		msg-num
-		;;(buf rmail-buffer)
-		)
-	    (skip-chars-forward "0-9")
-	    (setq msg-num (string-to-int (buffer-substring beg (point))))
-	    (or (eq rmail-current-message msg-num)
-		(let (;;go-where
-		      window (owin (selected-window)))
-		  (setq rmail-current-message msg-num)
-		  (if (= (following-char) ?-)
-		      (progn
-			(delete-char 1)
-			(insert " ")))
-		  (setq window (display-buffer rmail-buffer))
-		  ;; Using save-window-excursion caused the new value
-		  ;; of point to get lost.
-		  (unwind-protect
-		      (progn
-			(select-window window)
-			(rmail-show-message msg-num))
-		    (select-window owin)))))))))
-
-(if rmail-summary-mode-map
-    nil
-  (setq rmail-summary-mode-map (make-keymap))
-  (suppress-keymap rmail-summary-mode-map)
-  (define-key rmail-summary-mode-map "a"      'rmail-summary-add-label)
-  (define-key rmail-summary-mode-map "c"      'rmail-summary-continue)
-  (define-key rmail-summary-mode-map "d"      'rmail-summary-delete-forward)
-  (define-key rmail-summary-mode-map "\C-d"   'rmail-summary-delete-backward)
-  (define-key rmail-summary-mode-map "e"      'rmail-summary-edit-current-message)
-  (define-key rmail-summary-mode-map "f"      'rmail-summary-forward)
-  (define-key rmail-summary-mode-map "g"      'rmail-summary-get-new-mail)
-  (define-key rmail-summary-mode-map "h"      'rmail-summary)
-  (define-key rmail-summary-mode-map "i"      'rmail-summary-input)
-  (define-key rmail-summary-mode-map "j"      'rmail-summary-goto-msg)
-  (define-key rmail-summary-mode-map "k"      'rmail-summary-kill-label)
-  (define-key rmail-summary-mode-map "l"      'rmail-summary-by-labels)
-  (define-key rmail-summary-mode-map "\e\C-h" 'rmail-summary)
-  (define-key rmail-summary-mode-map "\e\C-l" 'rmail-summary-by-labels)
-  (define-key rmail-summary-mode-map "\e\C-r" 'rmail-summary-by-recipients)
-  (define-key rmail-summary-mode-map "\e\C-s" 'rmail-summary-by-regexp)
-  (define-key rmail-summary-mode-map "\e\C-t" 'rmail-summary-by-topic)
-  (define-key rmail-summary-mode-map "m"      'rmail-summary-mail)
-  (define-key rmail-summary-mode-map "\M-m"   'rmail-summary-retry-failure)
-  (define-key rmail-summary-mode-map "n"      'rmail-summary-next-msg)
-  (define-key rmail-summary-mode-map "\en"    'rmail-summary-next-all)
-  (define-key rmail-summary-mode-map "\e\C-n" 'rmail-summary-next-labeled-message)
-  (define-key rmail-summary-mode-map "o"      'rmail-summary-output-to-rmail-file)
-  (define-key rmail-summary-mode-map "\C-o"   'rmail-summary-output)
-  (define-key rmail-summary-mode-map "p"      'rmail-summary-previous-msg)
-  (define-key rmail-summary-mode-map "\ep"    'rmail-summary-previous-all)
-  (define-key rmail-summary-mode-map "\e\C-p" 'rmail-summary-previous-labeled-message)
-  (define-key rmail-summary-mode-map "q"      'rmail-summary-quit)
-  (define-key rmail-summary-mode-map "r"      'rmail-summary-reply)
-  (define-key rmail-summary-mode-map "s"      'rmail-summary-expunge-and-save)
-  (define-key rmail-summary-mode-map "\es"    'rmail-summary-search)
-  (define-key rmail-summary-mode-map "t"      'rmail-summary-toggle-header)
-  (define-key rmail-summary-mode-map "u"      'rmail-summary-undelete)
-  (define-key rmail-summary-mode-map "\M-u"   'rmail-summary-undelete-many)
-  (define-key rmail-summary-mode-map "w"      'rmail-summary-wipe)
-  (define-key rmail-summary-mode-map "x"      'rmail-summary-expunge)
-  (define-key rmail-summary-mode-map "."      'rmail-summary-beginning-of-message)
-  (define-key rmail-summary-mode-map "<"      'rmail-summary-first-message)
-  (define-key rmail-summary-mode-map ">"      'rmail-summary-last-message)
-  (define-key rmail-summary-mode-map " "      'rmail-summary-scroll-msg-up)
-  (define-key rmail-summary-mode-map "\177"   'rmail-summary-scroll-msg-down)
-  (define-key rmail-summary-mode-map "?"      'describe-mode)
-  (define-key rmail-summary-mode-map "\C-c\C-s\C-d"
-    'rmail-summary-sort-by-date)
-  (define-key rmail-summary-mode-map "\C-c\C-s\C-s"
-    'rmail-summary-sort-by-subject)
-  (define-key rmail-summary-mode-map "\C-c\C-s\C-a"
-    'rmail-summary-sort-by-author)
-  (define-key rmail-summary-mode-map "\C-c\C-s\C-r"
-    'rmail-summary-sort-by-recipient)
-  (define-key rmail-summary-mode-map "\C-c\C-s\C-c"
-    'rmail-summary-sort-by-correspondent)
-  (define-key rmail-summary-mode-map "\C-c\C-s\C-l"
-    'rmail-summary-sort-by-lines)
-  )
-
-;;; Menu bar bindings.
-;
-;(define-key rmail-summary-mode-map [menu-bar] (make-sparse-keymap))
-;
-;(define-key rmail-summary-mode-map [menu-bar classify]
-;  (cons "Classify" (make-sparse-keymap "Classify")))
-;
-;(define-key rmail-summary-mode-map [menu-bar classify output-inbox]
-;  '("Output (inbox)" . rmail-summary-output))
-;
-;(define-key rmail-summary-mode-map [menu-bar classify output]
-;  '("Output (Rmail)" . rmail-summary-output-to-rmail-file))
-;
-;(define-key rmail-summary-mode-map [menu-bar classify kill-label]
-;  '("Kill Label" . rmail-summary-kill-label))
-;
-;(define-key rmail-summary-mode-map [menu-bar classify add-label]
-;  '("Add Label" . rmail-summary-add-label))
-;
-;(define-key rmail-summary-mode-map [menu-bar summary]
-;  (cons "Summary" (make-sparse-keymap "Summary")))
-;
-;(define-key rmail-summary-mode-map [menu-bar summary labels]
-;  '("By Labels" . rmail-summary-by-labels))
-;
-;(define-key rmail-summary-mode-map [menu-bar summary recipients]
-;  '("By Recipients" . rmail-summary-by-recipients))
-;
-;(define-key rmail-summary-mode-map [menu-bar summary topic]
-;  '("By Topic" . rmail-summary-by-topic))
-;
-;(define-key rmail-summary-mode-map [menu-bar summary regexp]
-;  '("By Regexp" . rmail-summary-by-regexp))
-;
-;(define-key rmail-summary-mode-map [menu-bar summary all]
-;  '("All" . rmail-summary))
-;
-;(define-key rmail-summary-mode-map [menu-bar mail]
-;  (cons "Mail" (make-sparse-keymap "Mail")))
-;
-;(define-key rmail-summary-mode-map [menu-bar mail continue]
-;  '("Continue" . rmail-summary-continue))
-;
-;(define-key rmail-summary-mode-map [menu-bar mail forward]
-;  '("Forward" . rmail-summary-forward))
-;
-;(define-key rmail-summary-mode-map [menu-bar mail retry]
-;  '("Retry" . rmail-summary-retry-failure))
-;
-;(define-key rmail-summary-mode-map [menu-bar mail reply]
-;  '("Reply" . rmail-summary-reply))
-;
-;(define-key rmail-summary-mode-map [menu-bar mail mail]
-;  '("Mail" . rmail-summary-mail))
-;
-;(define-key rmail-summary-mode-map [menu-bar delete]
-;  (cons "Delete" (make-sparse-keymap "Delete")))
-;
-;(define-key rmail-summary-mode-map [menu-bar delete expunge/save]
-;  '("Expunge/Save" . rmail-summary-expunge-and-save))
-;
-;(define-key rmail-summary-mode-map [menu-bar delete expunge]
-;  '("Expunge" . rmail-summary-expunge))
-;
-;(define-key rmail-summary-mode-map [menu-bar delete undelete]
-;  '("Undelete" . rmail-summary-undelete))
-;
-;(define-key rmail-summary-mode-map [menu-bar delete delete]
-;  '("Delete" . rmail-summary-delete-forward))
-;
-;(define-key rmail-summary-mode-map [menu-bar move]
-;  (cons "Move" (make-sparse-keymap "Move")))
-;
-;(define-key rmail-summary-mode-map [menu-bar move search-back]
-;  '("Search Back" . rmail-summary-search-backward))
-;
-;(define-key rmail-summary-mode-map [menu-bar move search]
-;  '("Search" . rmail-summary-search))
-;
-;(define-key rmail-summary-mode-map [menu-bar move previous]
-;  '("Previous Nondeleted" . rmail-summary-previous-msg))
-;
-;(define-key rmail-summary-mode-map [menu-bar move next]
-;  '("Next Nondeleted" . rmail-summary-next-msg))
-;
-;(define-key rmail-summary-mode-map [menu-bar move last]
-;  '("Last" . rmail-summary-last-message))
-;
-;(define-key rmail-summary-mode-map [menu-bar move first]
-;  '("First" . rmail-summary-first-message))
-;
-;(define-key rmail-summary-mode-map [menu-bar move previous]
-;  '("Previous" . rmail-summary-previous-all))
-;
-;(define-key rmail-summary-mode-map [menu-bar move next]
-;  '("Next" . rmail-summary-next-all))
-
-(defun rmail-summary-goto-msg (&optional n nowarn skip-rmail)
-  (interactive "P")
-  (if (consp n) (setq n (prefix-numeric-value n)))
-  (if (eobp) (forward-line -1))
-  (beginning-of-line)
-  (let ((buf rmail-buffer)
-	(cur (point))
-	(curmsg (string-to-int
-		 (buffer-substring (point)
-				   (min (point-max) (+ 5 (point)))))))
-    (if (not n)
-	(setq n curmsg)
-      (if (< n 1)
-	  (progn (message "No preceding message")
-		 (setq n 1)))
-      (if (> n rmail-total-messages)
-	  (progn (message "No following message")
-		 (goto-char (point-max))
-		 (rmail-summary-goto-msg)))
-      (goto-char (point-min))
-      (if (not (re-search-forward (concat "^ *" (int-to-string n)) nil t))
-	  (progn (or nowarn (message "Message %d not found" n))
-		 (setq n curmsg)
-		 (goto-char cur))))
-    (beginning-of-line)
-    (skip-chars-forward " ")
-    (skip-chars-forward "0-9")
-    (save-excursion (if (= (following-char) ?-)
-			(let ((buffer-read-only nil))
-			  (delete-char 1)
-			  (insert " "))))
-    (beginning-of-line)
-    (if skip-rmail
-	nil
-      (pop-to-buffer buf)
-      (rmail-show-message n)
-      (pop-to-buffer rmail-summary-buffer))))
-
-(defun rmail-summary-scroll-msg-up (&optional dist)
-  "Scroll other window forward."
-  (interactive "P")
-  (scroll-other-window dist))
-
-(defun rmail-summary-scroll-msg-down (&optional dist)
-  "Scroll other window backward."
-  (interactive "P")
-  (scroll-other-window
-   (cond ((eq dist '-) nil)
-	 ((null dist) '-)
-	 (t (- (prefix-numeric-value dist))))))
-
-(defun rmail-summary-beginning-of-message ()
-  "Show current message from the beginning."
-  (interactive)
-  (pop-to-buffer rmail-buffer)
-  (beginning-of-buffer)
-  (pop-to-buffer rmail-summary-buffer))
-
-(defun rmail-summary-quit ()
-  "Quit out of Rmail and Rmail summary."
-  (interactive)
-  (rmail-summary-wipe)
-  (rmail-quit))
-
-(defun rmail-summary-wipe ()
-  "Kill and wipe away Rmail summary, remaining within Rmail."
-  (interactive)
-  (save-excursion (set-buffer rmail-buffer) (setq rmail-summary-buffer nil))
-  (let ((local-rmail-buffer rmail-buffer))
-    (kill-buffer (current-buffer))
-    ;; Delete window if not only one.
-    (if (not (eq (selected-window) (next-window nil 'no-minibuf)))
-	(delete-window))
-    ;; Switch windows to the rmail buffer, or switch to it in this window.
-    (pop-to-buffer local-rmail-buffer)))
-
-(defun rmail-summary-expunge ()
-  "Actually erase all deleted messages and recompute summary headers."
-  (interactive)
-  (save-excursion
-    (set-buffer rmail-buffer)
-    (rmail-only-expunge))
-  (rmail-update-summary))
-
-(defun rmail-summary-expunge-and-save ()
-  "Expunge and save RMAIL file."
-  (interactive)
-  (save-excursion
-    (set-buffer rmail-buffer)
-    (rmail-only-expunge))
-  (rmail-update-summary)
-  (save-excursion
-    (set-buffer rmail-buffer)
-    (save-buffer)))
-
-(defun rmail-summary-get-new-mail ()
-  "Get new mail and recompute summary headers."
-  (interactive)
-  (let (msg)
-    (save-excursion
-      (set-buffer rmail-buffer)
-      (rmail-get-new-mail)
-      ;; Get the proper new message number.
-      (setq msg rmail-current-message))
-    ;; Make sure that message is displayed.
-    (rmail-summary-goto-msg msg)))
-
-(defun rmail-summary-input (filename)
-  "Run Rmail on file FILENAME."
-  (interactive "FRun rmail on RMAIL file: ")
-  ;; We switch windows here, then display the other Rmail file there.
-  (pop-to-buffer rmail-buffer)
-  (rmail filename))
-
-(defun rmail-summary-first-message ()
-  "Show first message in Rmail file from summary buffer."
-  (interactive)
-  (beginning-of-buffer))
-
-(defun rmail-summary-last-message ()
-  "Show last message in Rmail file from summary buffer."
-  (interactive)
-  (end-of-buffer)
-  (forward-line -1))
-
-(defvar rmail-summary-edit-map nil)
-(if rmail-summary-edit-map
-    nil
-  (setq rmail-summary-edit-map (make-sparse-keymap))
-  (set-keymap-parent rmail-summary-edit-map text-mode-map)
-  (set-keymap-name rmail-summary-edit-map 'rmail-summary-edit-map)
-  (define-key rmail-summary-edit-map "\C-c\C-c" 'rmail-cease-edit)
-  (define-key rmail-summary-edit-map "\C-c\C-]" 'rmail-abort-edit))
-
-(defun rmail-summary-edit-current-message ()
-  "Edit the contents of this message."
-  (interactive)
-  (pop-to-buffer rmail-buffer)
-  (rmail-edit-current-message)
-  (use-local-map rmail-summary-edit-map))
-
-(defun rmail-summary-cease-edit ()
-  "Finish editing message, then go back to Rmail summary buffer."
-  (interactive)
-  (rmail-cease-edit)
-  (pop-to-buffer rmail-summary-buffer))
-
-(defun rmail-summary-abort-edit ()
-  "Abort edit of current message; restore original contents.
-Go back to summary buffer."
-  (interactive)
-  (rmail-abort-edit)
-  (pop-to-buffer rmail-summary-buffer))
-
-(defun rmail-summary-search-backward (regexp &optional n)
-  "Show message containing next match for REGEXP.
-Prefix argument gives repeat count; negative argument means search
-backwards (through earlier messages).
-Interactively, empty argument means use same regexp used last time."
-  (interactive
-    (let* ((reversep (>= (prefix-numeric-value current-prefix-arg) 0))
-	   (prompt
-	    (concat (if reversep "Reverse " "") "Rmail search (regexp): "))
-	   regexp)
-      (if rmail-search-last-regexp
-	  (setq prompt (concat prompt
-			       "(default "
-			       rmail-search-last-regexp
-			       ") ")))
-      (setq regexp (read-string prompt))
-      (cond ((not (equal regexp ""))
-	     (setq rmail-search-last-regexp regexp))
-	    ((not rmail-search-last-regexp)
-	     (error "No previous Rmail search string")))
-      (list rmail-search-last-regexp
-	    (prefix-numeric-value current-prefix-arg))))
-  ;; Don't use save-excursion because that prevents point from moving
-  ;; properly in the summary buffer.
-  (let ((buffer (current-buffer)))
-    (unwind-protect
-	(progn
-	  (set-buffer rmail-buffer)
-	  (rmail-search regexp (- n)))
-      (set-buffer buffer))))
-
-(defun rmail-summary-search (regexp &optional n)
-  "Show message containing next match for REGEXP.
-Prefix argument gives repeat count; negative argument means search
-backwards (through earlier messages).
-Interactively, empty argument means use same regexp used last time."
-  (interactive
-    (let* ((reversep (< (prefix-numeric-value current-prefix-arg) 0))
-	   (prompt
-	    (concat (if reversep "Reverse " "") "Rmail search (regexp): "))
-	   regexp)
-      (if rmail-search-last-regexp
-	  (setq prompt (concat prompt
-			       "(default "
-			       rmail-search-last-regexp
-			       ") ")))
-      (setq regexp (read-string prompt))
-      (cond ((not (equal regexp ""))
-	     (setq rmail-search-last-regexp regexp))
-	    ((not rmail-search-last-regexp)
-	     (error "No previous Rmail search string")))
-      (list rmail-search-last-regexp
-	    (prefix-numeric-value current-prefix-arg))))
-  ;; Don't use save-excursion because that prevents point from moving
-  ;; properly in the summary buffer.
-  (let ((buffer (current-buffer)))
-    (unwind-protect
-	(progn
-	  (set-buffer rmail-buffer)
-	  (rmail-search regexp n))
-      (set-buffer buffer))))
-
-(defun rmail-summary-toggle-header ()
-  "Show original message header if pruned header currently shown, or vice versa."
-  (interactive)
-  (save-excursion
-    (set-buffer rmail-buffer)
-    (rmail-toggle-header)))
-
-(defun rmail-summary-add-label (label)
-  "Add LABEL to labels associated with current Rmail message.
-Completion is performed over known labels when reading."
-  (interactive (list (save-excursion
-		       (set-buffer rmail-buffer)
-		       (rmail-read-label "Add label"))))
-  (save-excursion
-    (set-buffer rmail-buffer)
-    (rmail-add-label label)))
-
-(defun rmail-summary-kill-label (label)
-  "Remove LABEL from labels associated with current Rmail message.
-Completion is performed over known labels when reading."
-  (interactive (list (save-excursion
-		       (set-buffer rmail-buffer)
-		       (rmail-read-label "Kill label"))))
-  (save-excursion
-    (set-buffer rmail-buffer)
-    (rmail-set-label label nil)))
-
-;;;; *** Rmail Summary Mailing Commands ***
-
-(defun rmail-summary-mail ()
-  "Send mail in another window.
-While composing the message, use \\[mail-yank-original] to yank the
-original message into it."
-  (interactive)
-  (mail-other-window nil nil nil nil nil rmail-buffer)
-  (use-local-map (copy-keymap (current-local-map)))
-  (define-key (current-local-map)
-    "\C-c\C-c" 'rmail-summary-send-and-exit))
-
-(defun rmail-summary-continue ()
-  "Continue composing outgoing message previously being composed."
-  (interactive)
-  (mail-other-window t))
-
-(defun rmail-summary-reply (just-sender)
-  "Reply to the current message.
-Normally include CC: to all other recipients of original message;
-prefix argument means ignore them.
-While composing the reply, use \\[mail-yank-original] to yank the
-original message into it."
-  (interactive "P")
-  (let (mailbuf)
-    (save-window-excursion
-      (set-buffer rmail-buffer)
-      (rmail-reply just-sender)
-      (setq mailbuf (current-buffer)))
-    (pop-to-buffer mailbuf)
-    (use-local-map (copy-keymap (current-local-map)))
-    (define-key (current-local-map)
-      "\C-c\C-c" 'rmail-summary-send-and-exit)))
-
-(defun rmail-summary-retry-failure ()
-  "Edit a mail message which is based on the contents of the current message.
-For a message rejected by the mail system, extract the interesting headers and
-the body of the original message; otherwise copy the current message."
-  (interactive)
-  (let (mailbuf)
-    (save-window-excursion
-      (set-buffer rmail-buffer)
-      (rmail-retry-failure)
-      (setq mailbuf (current-buffer)))
-    (pop-to-buffer mailbuf)
-    (use-local-map (copy-keymap (current-local-map)))
-    (define-key (current-local-map)
-      "\C-c\C-c" 'rmail-summary-send-and-exit)))
-
-(defun rmail-summary-send-and-exit ()
-  "Send mail reply and return to summary buffer."
-  (interactive)
-  (mail-send-and-exit t))
-
-(defun rmail-summary-forward (resend)
-  "Forward the current message to another user.
-With prefix argument, \"resend\" the message instead of forwarding it;
-see the documentation of `rmail-resend'."
-  (interactive "P")
-  (save-excursion
-    (set-buffer rmail-buffer)
-    (rmail-forward resend)
-    (use-local-map (copy-keymap (current-local-map)))
-    (define-key (current-local-map)
-      "\C-c\C-c" 'rmail-summary-send-and-exit)))
-
-;; Summary output commands.
-
-(defun rmail-summary-output-to-rmail-file ()
-  "Append the current message to an Rmail file named FILE-NAME.
-If the file does not exist, ask if it should be created.
-If file is being visited, the message is appended to the Emacs
-buffer visiting that file."
-  (interactive)
-  (save-excursion
-    (set-buffer rmail-buffer)
-    (call-interactively 'rmail-output-to-rmail-file)))
-
-(defun rmail-summary-output ()
-  "Append this message to Unix mail file named FILE-NAME."
-  (interactive)
-  (save-excursion
-    (set-buffer rmail-buffer)
-    (call-interactively 'rmail-output)))
-
-;; Sorting messages in Rmail Summary buffer.
-
-(defun rmail-summary-sort-by-date (reverse)
-  "Sort messages of current Rmail summary by date.
-If prefix argument REVERSE is non-nil, sort them in reverse order."
-  (interactive "P")
-  (rmail-sort-from-summary (function rmail-sort-by-date) reverse))
-
-(defun rmail-summary-sort-by-subject (reverse)
-  "Sort messages of current Rmail summary by subject.
-If prefix argument REVERSE is non-nil, sort them in reverse order."
-  (interactive "P")
-  (rmail-sort-from-summary (function rmail-sort-by-subject) reverse))
-
-(defun rmail-summary-sort-by-author (reverse)
-  "Sort messages of current Rmail summary by author.
-If prefix argument REVERSE is non-nil, sort them in reverse order."
-  (interactive "P")
-  (rmail-sort-from-summary (function rmail-sort-by-author) reverse))
-
-(defun rmail-summary-sort-by-recipient (reverse)
-  "Sort messages of current Rmail summary by recipient.
-If prefix argument REVERSE is non-nil, sort them in reverse order."
-  (interactive "P")
-  (rmail-sort-from-summary (function rmail-sort-by-recipient) reverse))
-
-(defun rmail-summary-sort-by-correspondent (reverse)
-  "Sort messages of current Rmail summary by other correspondent.
-If prefix argument REVERSE is non-nil, sort them in reverse order."
-  (interactive "P")
-  (rmail-sort-from-summary (function rmail-sort-by-correspondent) reverse))
-
-(defun rmail-summary-sort-by-lines (reverse)
-  "Sort messages of current Rmail summary by lines of the message.
-If prefix argument REVERSE is non-nil, sort them in reverse order."
-  (interactive "P")
-  (rmail-sort-from-summary (function rmail-sort-by-lines) reverse))
-
-(defun rmail-sort-from-summary (sortfun reverse)
-  "Sort Rmail messages from Summary buffer and update it after sorting."
-  (require 'rmailsort)
-  (pop-to-buffer rmail-buffer)
-  (funcall sortfun reverse)
-  (rmail-summary))
-
-;;; rmailsum.el ends here
--- a/lisp/rmail/undigest.el	Mon Aug 13 10:01:24 2007 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,137 +0,0 @@
-;;; undigest.el --- digest-cracking support for the RMAIL mail reader
-
-;; Copyright (C) 1985, 1986, 1994 Free Software Foundation, Inc.
-
-;; Maintainer: FSF
-;; Keywords: mail
-
-;; 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: FSF 19.30.
-
-;;; Commentary:
-
-;; See Internet RFC 934
-
-;;; Code:
-
-(require 'rmail)
-
-(defun undigestify-rmail-message ()
-  "Break up a digest message into its constituent messages.
-Leaves original message, deleted, before the undigestified messages."
-  (interactive)
-  (widen)
-  (let ((buffer-read-only nil)
-	(msg-string (buffer-substring (rmail-msgbeg rmail-current-message)
-				      (rmail-msgend rmail-current-message))))
-    (goto-char (rmail-msgend rmail-current-message))
-    (narrow-to-region (point) (point))
-    (insert msg-string)
-    (narrow-to-region (point-min) (1- (point-max))))
-  (let ((error t)
-	(buffer-read-only nil))
-    (unwind-protect
-	(progn
-	  (save-restriction
-	    (goto-char (point-min))
-	    (delete-region (point-min)
-			   (progn (search-forward "\n*** EOOH ***\n")
-				  (point)))
-	    (insert "\^_\^L\n0, unseen,,\n*** EOOH ***\n")
-	    (narrow-to-region (point)
-			      (point-max))
-	    (let* ((fill-prefix "")
-		   (case-fold-search t)
-		   start
-		   (digest-name
-		    (mail-strip-quoted-names
-		     (or (save-restriction
-			   (search-forward "\n\n")
-			   (setq start (point))
-			   (narrow-to-region (point-min) (point))
-			   (goto-char (point-max))
-			   (or (mail-fetch-field "Reply-To")
-			       (mail-fetch-field "To")
-			       (mail-fetch-field "Apparently-To")
-			       (mail-fetch-field "From")))
-			 (error "Message is not a digest--bad header")))))
-	      (save-excursion
-		(goto-char (point-max))
-		(skip-chars-backward " \t\n")
-		(let (found)
-		  ;; compensate for broken un*x digestifiers.  Sigh Sigh.
-		  (while (and (> (point) start) (not found))
-		    (forward-line -1)
-		    (if (looking-at (concat "End of.*Digest.*\n"
-					    (regexp-quote "*********") "*"
-					    "\\(\n------*\\)*"))
-			(setq found t)))
-		  (if (not found)
-		      (error "Message is not a digest--no end line"))))
-	      (re-search-forward (concat "^" (make-string 55 ?-) "-*\n*"))
-	      (replace-match "\^_\^L\n0, unseen,,\n*** EOOH ***\n")
-	      (save-restriction
-		(narrow-to-region (point)
-				  (progn (search-forward "\n\n")
-					 (point)))
-		(if (mail-fetch-field "To") nil
-		  (goto-char (point-min))
-		  (insert "To: " digest-name "\n")))
-	      (while (re-search-forward
-		      (concat "\n\n" (make-string 27 ?-) "-*\n*")
-		      nil t)
-		(replace-match "\n\n\^_\^L\n0, unseen,,\n*** EOOH ***\n")
-		(save-restriction
-		  (if (looking-at "End ")
-		      (insert "To: " digest-name "\n\n")
-		    (narrow-to-region (point)
-				      (progn (search-forward "\n\n"
-							     nil 'move)
-					     (point))))
-		  (if (mail-fetch-field "To")
-		      nil
-		    (goto-char (point-min))
-		    (insert "To: " digest-name "\n")))
-		;; Digestifiers may insert `- ' on lines that start with `-'.
-		;; Undo that.
-		(save-excursion
-		  (goto-char (point-min))
-		  (if (re-search-forward
-		       "\n\n----------------------------*\n*"
-		       nil t)
-		      (let ((end (point-marker)))
-			(goto-char (point-min))
-			(while (re-search-forward "^- " end t)
-			  (delete-char -2)))))
-		)))
-	  (setq error nil)
-	  (message "Message successfully undigestified")
-	  (let ((n rmail-current-message))
-	    (rmail-forget-messages)
-	    (rmail-show-message n)
-	    (rmail-delete-forward)
-	    (if (rmail-summary-exists)
-		(rmail-select-summary
-		 (rmail-update-summary)))))
-      (cond (error
-	     (narrow-to-region (point-min) (1+ (point-max)))
-	     (delete-region (point-min) (point-max))
-	     (rmail-show-message rmail-current-message))))))
-
-;;; undigest.el ends here
--- a/lisp/rmail/unrmail.el	Mon Aug 13 10:01:24 2007 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,61 +0,0 @@
-;;; unrmail.el --- convert Rmail files to mailbox files.
-
-;;; Copyright (C) 1992 Free Software Foundation, Inc.
-
-;; Keywords: mail
-
-;; 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.
-
-;;; Code:
-
-(defvar command-line-args-left)	;Avoid 'free variable' warning
-
-;;;###autoload
-(defun batch-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'."
-  ;; command-line-args-left is what is left of the command line (from startup.el)
-  (if (not noninteractive)
-      (error "`batch-unrmail' is to be used only with -batch"))
-  (let ((error nil))
-    (while command-line-args-left
-      (or (unrmail (car command-line-args-left)
-		   (concat (car command-line-args-left) ".mail"))
-	  (setq error t))
-      (setq command-line-args-left (cdr command-line-args-left)))
-    (message "Done")
-    (kill-emacs (if error 1 0))))
-
-;;;###autoload
-(defun unrmail (file to-file)
-  "Convert Rmail file FILE to mailbox-format file TO-FILE."
-  (interactive "fUnrmail (rmail file): \nFUnrmail into (new mailbox file): ")
-  (let ((message-count 0)
-	(rmail-delete-after-output nil))
-    (rmail file)
-    (message "Writing messages to %s..." to-file)
-    (while (< message-count rmail-total-messages)
-      (rmail-show-message
-       (setq message-count (1+ message-count)))
-      (rmail-output to-file 1 t))
-    (message "Writing messages to %s...done" to-file)))
-
-;;; unrmail.el ends here
--- a/lisp/site-load.el	Mon Aug 13 10:01:24 2007 +0200
+++ b/lisp/site-load.el	Mon Aug 13 10:02:21 2007 +0200
@@ -1,4 +1,5 @@
 ;;; site-load.el --- Template file for site-wide XEmacs customization
+;; Copyright (C) 1997 Free Software Foundation, Inc.
 
 ;; Author: Steven L. Baur <steve@altair.xemacs.org>
 ;; Keywords: internal
--- a/lisp/utils/auto-autoloads.el	Mon Aug 13 10:01:24 2007 +0200
+++ b/lisp/utils/auto-autoloads.el	Mon Aug 13 10:02:21 2007 +0200
@@ -233,14 +233,6 @@
 
 ;;;***
 
-;;;### (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 nil "easymenu" "utils/easymenu.el")
 
 ;;;***
@@ -492,6 +484,26 @@
 
 ;;;***
 
+;;;### (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" "utils/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 (forms-find-file-other-window forms-find-file forms-mode) "forms" "utils/forms.el")
 
 (autoload 'forms-mode "forms" "\
@@ -673,6 +685,10 @@
 
 (autoload 'mail-file-babyl-p "mail-utils" nil nil nil)
 
+(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.")
+
 (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.
--- a/lisp/utils/custom-load.el	Mon Aug 13 10:01:24 2007 +0200
+++ b/lisp/utils/custom-load.el	Mon Aug 13 10:02:21 2007 +0200
@@ -1,6 +1,6 @@
 ;;; custom-load.el --- automatically extracted custom dependencies
 
-;; Created by SL Baur on Sat Oct  4 18:11:53 1997
+;; Created by SL Baur on Thu Oct  9 20:52:30 1997
 
 ;;; Code:
 
--- a/lisp/utils/delbs.el	Mon Aug 13 10:01:24 2007 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,58 +0,0 @@
-;;; delbs.el --- a small lisp package to allow you to swap around DEL/BS keys
-
-;; Copyright (C) 1997 Gary Foster
-
-;; Author: Gary Foster <Gary.Foster@corp.sun.com>
-;; Keywords: lisp, terminals
-
-;; 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 package should, *theoretically*, serve to quieten the DEL/BS rwars
-;;     a little.  By using this package, you can have DEL and BS both do the
-;;     same function (normally delete one char to the left) or you can have
-;;     then bound separately (DEL --> delete-char, BS --> delete-backward-char)
-;;     with all appropriate Meta bindings in each mode.
-;;
-;; Author: Gary Foster <Gary.Foster@corp.sun.com>
-;; Credits due to: Per Abrahamsen <abraham@dina.kvl.dk>
-
-;;; Code:
-
-(defun delbs-enable-delete-forward ()
-  "Set up the delete key to delete forward, and backspace to delete backward."
-  (interactive)
-  (define-key key-translation-map [backspace] "\C-?")
-  (define-key key-translation-map [delete] "\C-d")
-  (define-key key-translation-map [(meta backspace)] "\M-\C-?")
-  (define-key key-translation-map [(meta delete)] "\M-d"))
-  
-(defun delbs-disable-delete-forward ()
-  "Return the DEL/BS key mappings to the XEmacs default"
-  (interactive)
-  (define-key key-translation-map [backspace] [backspace])
-  (define-key key-translation-map [delete] [delete])
-  (define-key key-translation-map [(meta backspace)] [(meta backspace)])
-  (define-key key-translation-map [(meta delete)] [(meta delete)]))
-
-(provide 'delbs)
-
-;;; delbs.el ends here
--- a/lisp/utils/docref.el	Mon Aug 13 10:01:24 2007 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,284 +0,0 @@
-;;; docref.el --- Simple cross references for Elisp documentation strings
-;; Copyright (C) 1994 Free Software Foundation, Inc.
-
-;; Author: Vadim Geshel <vadik@unas.cs.kiev.ua>
-;; Created: 12 Jul 1994
-;; Keywords: docs, help, lisp
-;; original name was cross-ref.el.
-
-;; 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: FSF 19.34.
-
-;;; Commentary:
-
-;; This package allows you to use a simple form of cross references in
-;; your Emacs Lisp documentation strings. Cross-references look like
-;; \\(type@[label@]data), where type defines a method for retrieving
-;; reference informatin, data is used by a method routine as an argument,
-;; and label "represents" the reference in text. If label is absent, data
-;; is used instead.
-;; 
-;; Special reference labeled `back', when present, can be used to return
-;; to the previous contents of help buffer.
-;;
-;; Cross-referencing currently is intended for use in doc strings only
-;; and works only in temporary buffers (created by `with-output-to-temp-buffer').
-;; List of temp buffers in which cross-referencing is to be active is specified
-;; by variable DOCREF-BUFFERS-LIST, which contains only "*Help*" by default.
-;;
-;; Documentation strings for this package's functions and variables can serve
-;; as examples of usage.
-;;
-;;; Customization:
-;; 
-;; See source. The main customization variable is `docref-methods-alist'.
-;; It consists of (type . function) pairs, where type is a string which
-;; corresponds to type in cross-references and function is called with
-;; one argument - reference `data' - when a reference is activated.
-;;
-;;; Installation:
-;;
-;; Place this file somewhere in your load-path, byte-compiled it, and add
-;; (require 'cross-ref)
-;; to your .emacs.
-
-;;; Code:
-
-;; User customizable variables
-
-(defvar docref-highlight-p t
-  "*If non-nil, \\(f@docref-subst) highlights cross-references.
-Under window system it highlights them with face defined by
-\\(v@docref-highlight-face), on character terminal highlighted references
-look like cross-references in info mode.")
-
-(defvar docref-highlight-face 'highlight
-  "*Face used to highlight cross-references (used by \\(f@docref-subst))")
-
-(defvar docref-methods-alist
-  '(("f" . docref-describe-function)	; reference to a function documentation
-    ("v" . docref-describe-variable)	; reference to a variable documentation
-    ("F" . docref-read-file)		; reference to a file contents
-    ("s" . docref-use-string)		; reference to a string 
-    ("V" . docref-use-variable-value)	; reference to variable value
-    ("0" . beep))			; just highlighted text
-  "Alist which maps cross-reference ``types'' to retrieval functions.
-
-The car of each element is a string that serves as `type' in cross-references.
-\(See \\(f@docref-subst)).  The cdr is a function of one argument,
-to be called to find this reference.")
-
-(defvar docref-back-label "\nback"
-  "Label to use by \\(f@docref-subst) for the go-back reference.")
-
-(defvar docref-back-reference nil
-  "If non-nil, this is a go-back reference to add to the current buffer.
-The value specifies how to go back.  It should be suitable for use
-as the second argument to \\(f@docref-insert-label).
-\\(f@docref-subst) uses this to set up the go-back reference.")
-
-(defvar docref-last-active-buffer)
-
-;;;###autoload
-(defun docref-setup ()
-  "Process docref cross-references in the current buffer.
-See also \\(f@docref-subst)."
-  (interactive)
-  (docref-subst (current-buffer))
-  (docref-mode))
-
-(defvar docref-mode-map nil)
-(or docref-mode-map
-    (let ((map (make-sparse-keymap)))
-      (define-key map [mouse-2] 'docref-follow-mouse)
-      (define-key map "\C-c\C-b" 'docref-go-back)
-      (define-key map "\C-c\C-c" 'docref-follow)
-      (setq docref-mode-map map)))
-
-(defun docref-mode ()
-  "Major mode for help buffers that contain cross references.
-To follow a reference, move to it and type \\[docref-follow], or use
-\\[docref-follow-mouse].  The command \\[docref-go-back] can used to go
-back to where you came from."
-  (interactive)
-  (kill-all-local-variables)
-  (setq major-mode 'docref-mode)
-  (setq mode-name "Docref")
-  (use-local-map docref-mode-map)
-  (run-hooks 'docref-mode))
-
-(defun docref-subst (buf)
-  "Parse documentation cross-references in buffer BUF.
-
-Find cross-reference information in a buffer and
-highlight them with face defined by \\(v@docref-highlight-face).
-
-Cross-reference has the following format: \\ (TYPE[@LABEL]@DATA), where
-TYPE defines method used to retrieve xref data (like reading from file or
-calling \\(f@describe-function)), DATA is an argument to this method
-\(like file name or function name), and LABEL is displayed in text using
-\\(v@docref-highlight-face).
-
-The special reference `back' can be used to return back.
-The variable \\(v@docref-back-label) specifies the label to use for that.
-
-See \\(v@docref-methods-alist) for currently defined methods."
-  (interactive "b")
-  (save-excursion
-    (set-buffer buf)
-    (goto-char (point-min))
-    ;; The docref-seen property indicates that we have processed this
-    ;; buffer's contents already, so don't do it again.
-    (if (not (get-text-property (point-min) 'docref-seen))
-	(let ((old-modified (buffer-modified-p)))
-	  (while (re-search-forward "[\\](\\([^\)\@]+\\)\\(@[^\)\@]+\\)?@\\([^\)]*\\))"
-				    nil t)
-	    (let* ((start (match-beginning 0))
-		   (type (buffer-substring (match-beginning 1) (match-end 1)))
-		   (data (buffer-substring (match-beginning 3) (match-end 3)))
-		   (label
-		    (if (match-beginning 2)
-			(buffer-substring (+ (match-beginning 2) 1) (match-end 2))
-		      data)))
-	      (replace-match "" t)
-	      (docref-insert-label label (cons type data))))
-
-	  ;; Make a back-reference in this buffer, if desired.
-	  ;; (This is true if called from docref-follow.)
-	  (if docref-back-reference
-	      (progn
-		(goto-char (point-max))
-		(put-text-property (point-min) (1+ (point-min))
-				   'docref-back-position (point))
-		(docref-insert-label docref-back-label docref-back-reference)))
-	  (put-text-property (point-min) (1+ (point-min)) 'docref-seen t)
-	  (set-buffer-modified-p old-modified)))))
-
-(defun docref-insert-label (string ref)
-  (let ((label (concat string))
-	(pos (point)))
-    ;; decorate the label
-    (let ((leading-space-end (save-match-data
-			       (if (string-match "^\\([ \t\n]+\\)" label)
-				   (match-end 1)
-				 0)))
-	  (trailing-space-start (save-match-data
-				  (if (string-match "\\([ \t\n]+\\)$" label)
-				      (match-beginning 1)
-				    (length label)))))
-      (if docref-highlight-p	      
-;;	  XEmacs: we support faces on TTY's.
-;;	  (if (not window-system)
-;;	      (setq label
-;;		    (concat (substring label 0 leading-space-end)
-;;			    "(*note "
-;;			    (substring label leading-space-end trailing-space-start)
-;;			    ")"
-;;			    (substring label trailing-space-start)))
-	    ;; window-system
-	    (put-text-property leading-space-end
-			       trailing-space-start
-			       'face docref-highlight-face label))
-      (put-text-property 0 (length label) 'docref ref label)
-      (insert label))))
-
-(defun docref-follow-mouse (click)
-  "Follow the cross-reference that you click on."
-  (interactive "e")
-  (save-excursion
-    ;; XEmacs changes here.
-    (let* ((window (event-window click))
-	   (pos (event-point click))
-	   (docref-last-active-buffer (current-buffer)))
-      (set-buffer (window-buffer window))
-      (docref-follow pos))))
-
-(defun docref-go-back ()
-  "Go back to the previous contents of help buffer."
-  (interactive)
-  (let ((pos (get-text-property (point-min) 'docref-back-position)))
-    (if	pos
-	(docref-follow pos)
-      (error "No go-back reference"))))
-
-(defun docref-follow (&optional pos)
-  "Follow cross-reference at point.
-For the cross-reference format, see \\(f@docref-subst).
-The special reference named `back' can be used to return back"
-  (interactive)
-  (or pos (setq pos (point)))
-  (let ((docref-data (get-text-property pos 'docref)))
-    (if docref-data
-	;; There is a reference at point.  Follow it.
-	(let* ((type (car docref-data))
-	       (name (cdr docref-data))
-	       (method (assoc type docref-methods-alist))
-	       (cur-contents (buffer-string))
-	       (opoint (point))
-	       (docref-back-reference (cons "s" cur-contents))
-	       success)
-	  (if (null method)
-	      (error "Unknown cross-reference type: %s" type))
-	  (unwind-protect
-	      (save-excursion
-		(funcall (cdr method) name)
-		(setq success t))
-	    (or success
-		(progn
-		  ;; (cdr method) got an error.
-		  ;; Put back the text that we had.
-		  (erase-buffer)
-		  (insert cur-contents)
-		  (goto-char opoint)))
-	    (set-buffer-modified-p nil))))))
-
-;; Builtin methods for accessing a reference.
-
-(defun docref-describe-function (data)
-  (save-excursion
-    (if (boundp 'docref-last-active-buffer)
-	(set-buffer docref-last-active-buffer))
-    (describe-function (intern data))))
-  
-(defun docref-describe-variable (data)
-  (save-excursion
-    (if (boundp 'docref-last-active-buffer)
-	(set-buffer docref-last-active-buffer))
-    (describe-variable (intern data))))
-
-(defun docref-read-file (data)
-  (with-output-to-temp-buffer (buffer-name)
-    (erase-buffer)
-    (insert-file-contents (expand-file-name data))))
-
-(defun docref-use-string (data)
-  (with-output-to-temp-buffer (buffer-name)
-    (erase-buffer)
-    (insert data)))
-
-(defun docref-use-variable-value (data)
-  (let ((sym (intern data)))
-    (with-output-to-temp-buffer (buffer-name)
-      (erase-buffer)
-      (princ (symbol-value sym)))))
-
-(provide 'docref)
-
-;;; docref.el ends here
-
--- a/lisp/utils/font.el	Mon Aug 13 10:01:24 2007 +0200
+++ b/lisp/utils/font.el	Mon Aug 13 10:02:21 2007 +0200
@@ -30,7 +30,6 @@
 ;;; The emacsen compatibility package - load it up before anything else
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 (require 'cl)
-(require 'devices)
 
 (eval-and-compile
   (condition-case ()
--- a/lisp/utils/highlight-headers.el	Mon Aug 13 10:01:24 2007 +0200
+++ b/lisp/utils/highlight-headers.el	Mon Aug 13 10:02:21 2007 +0200
@@ -113,7 +113,7 @@
   :group 'highlight-headers)
 
 (defcustom highlight-headers-highlight-citation-too nil
-  "*Whether the whole citation line should go in the `mesage-cited-text' face.
+  "*Whether the whole citation line should go in the `message-cited-text' face.
 If nil, the text matched by `highlight-headers-citation-regexp' is in the
 default face, and the remainder of the line is in the message-cited-text face."
   :type 'boolean
--- a/lisp/utils/mail-utils.el	Mon Aug 13 10:01:24 2007 +0200
+++ b/lisp/utils/mail-utils.el	Mon Aug 13 10:02:21 2007 +0200
@@ -132,7 +132,11 @@
 	 (not (null rmail-default-dont-reply-to-names)))
     (setq rmail-default-dont-reply-to-names "info-"))
 
-; rmail-dont-reply-to-names is defined in loaddefs
+;;;###autoload
+(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.")
+
 (defun rmail-dont-reply-to (userids)
   "Returns string of mail addresses USERIDS sans any recipients
 that start with matches for `rmail-dont-reply-to-names'.
--- a/lisp/utils/speedbar.el	Mon Aug 13 10:01:24 2007 +0200
+++ b/lisp/utils/speedbar.el	Mon Aug 13 10:02:21 2007 +0200
@@ -5,7 +5,7 @@
 ;; Author: Eric M. Ludlam <zappo@gnu.ai.mit.edu>
 ;; Version: 0.5
 ;; Keywords: file, tags, tools
-;; X-RCS: $Id: speedbar.el,v 1.3 1997/07/26 22:09:58 steve Exp $
+;; X-RCS: $Id: speedbar.el,v 1.4 1997/10/12 01:39:54 steve Exp $
 ;;
 ;; This program is free software; you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by
@@ -298,7 +298,7 @@
   "*Non-nil show files we can't expand with a ? in the expand button.
 nil means don't show the file in the list.")
 
-;; Xemacs timers aren't based on idleness.  Therefore tune it down a little
+;; XEmacs timers aren't based on idleness.  Therefore tune it down a little
 ;; or suffer mightilly!
 (defvar speedbar-update-speed (if speedbar-xemacsp 5 1)
   "*Idle time in seconds needed before speedbar will update itself.
@@ -310,7 +310,7 @@
 between different directories.")
 
 (defvar speedbar-frame-parameters (list
-				   ;; Xemacs fails to delete speedbar
+				   ;; XEmacs fails to delete speedbar
 				   ;; if minibuffer is off.
 				   ;(cons 'minibuffer
 				   ; (if speedbar-xemacsp t nil))
@@ -1141,7 +1141,7 @@
 TIMEOUT is the number of seconds until the speedbar timer is called
 again."
   (cond
-   ;; Xemacs
+   ;; XEmacs
    (speedbar-xemacsp
     (if speedbar-timer
 	(progn (delete-itimer speedbar-timer)
--- a/lisp/utils/thing.el	Mon Aug 13 10:01:24 2007 +0200
+++ b/lisp/utils/thing.el	Mon Aug 13 10:02:21 2007 +0200
@@ -165,11 +165,13 @@
   (cond ((memq (char-syntax (char-after here)) '(?_ ?w))
          (setq *last-thing* 'symbol)
          (let ((end (scan-sexps here 1)))
-           (thing-region (min here (scan-sexps end -1)) end)))))
+           (if end
+	       (thing-region (min here (scan-sexps end -1)) end))))))
 
 (defun thing-filename (here)
   "Return start and end of filename at HERE."
-  (cond ((memq (char-syntax (char-after here)) '(?w ?_ ?.))
+  (cond ((and (memq (char-syntax (char-after here)) '(?w ?_ ?.))
+	      (< here (point-max)))
          (let (start end)
 	   (save-excursion
 	     (goto-char here)
--- a/lisp/utils/xemacs-build-report.el	Mon Aug 13 10:01:24 2007 +0200
+++ b/lisp/utils/xemacs-build-report.el	Mon Aug 13 10:02:21 2007 +0200
@@ -60,7 +60,7 @@
   "Version number of xemacs-build-report.")
 
 (defgroup xemacs-build-report nil
-  "Package automating the process of sending Xemacs Build Reports.")
+  "Package automating the process of sending XEmacs Build Reports.")
 
 (defcustom xemacs-build-report-destination
   "xemacs-beta@xemacs.org"
--- a/lisp/x11/custom-load.el	Mon Aug 13 10:01:24 2007 +0200
+++ b/lisp/x11/custom-load.el	Mon Aug 13 10:02:21 2007 +0200
@@ -1,6 +1,6 @@
 ;;; custom-load.el --- automatically extracted custom dependencies
 
-;; Created by SL Baur on Sat Oct  4 18:11:55 1997
+;; Created by SL Baur on Thu Oct  9 20:52:30 1997
 
 ;;; Code:
 
--- a/lisp/x11/x-menubar.el	Mon Aug 13 10:01:24 2007 +0200
+++ b/lisp/x11/x-menubar.el	Mon Aug 13 10:02:21 2007 +0200
@@ -29,7 +29,8 @@
 
 ;;; Warning-free compile
 (eval-when-compile
-  (defvar language-environment-list))
+  (defvar language-environment-list)
+  (require 'pending-del))
 
 (defconst default-menubar
   (purecopy-menubar
@@ -191,12 +192,10 @@
 	:style toggle :selected (not case-fold-search)]
        ["Case Matching Replace" (setq case-replace (not case-replace))
 	:style toggle :selected case-replace]
-       ["Auto Delete Selection" (if (memq 'pending-delete-pre-hook
-					  pre-command-hook)
-				    (pending-delete-off nil)
-				  (pending-delete-on nil))
+       ["Auto Delete Selection" (pending-delete-mode
+				 (if pending-delete-mode 0 1))
 	:style toggle
-	:selected (memq 'pending-delete-pre-hook pre-command-hook)]
+	:selected (and (boundp 'pending-delete-mode) pending-delete-mode)]
        ["Active Regions" (setq zmacs-regions (not zmacs-regions))
 	:style toggle :selected zmacs-regions]
        ["Mouse Paste At Text Cursor" (setq mouse-yank-at-point
@@ -772,7 +771,7 @@
 	    (and put-buffer-names-in-file-menu
 		 (member name '("Save" "Revert Buffer" "Print Buffer"
 				"Pretty-Print Buffer" "Delete Buffer"))
-		 (>= 4 (length item))
+		 (>= (length item) 4)
 		 (aset item 3 bufname))
 	    (and (string= "Save" name)
 		 (aset item 2 (buffer-modified-p)))
@@ -1157,10 +1156,8 @@
 	 '(overwrite-mode 1))
      `(setq-default case-fold-search ,(default-value 'case-fold-search))
      case-replace
-     (if (memq 'pending-delete-pre-hook pre-command-hook)
-	 '(progn
-	    (require 'pending-del)
-	    (pending-delete-on nil)))
+     (if pending-delete-mode
+	 '(pending-delete-mode 1))
      zmacs-regions
      mouse-yank-at-point
      require-final-newline
--- a/man/ChangeLog	Mon Aug 13 10:01:24 2007 +0200
+++ b/man/ChangeLog	Mon Aug 13 10:02:21 2007 +0200
@@ -1,3 +1,12 @@
+1997-10-07  SL Baur  <steve@altair.xemacs.org>
+
+	* xemacs-faq.texi (Q1.3.7): Update Russion URLs.
+	From Rebecca Ore <rebecca.ore@op.net>
+
+	* lispref/databases.texi (Connecting to a Database): Describe
+	valid types of `type' and `subtype'.
+	From Raymond Toy <toy@rtp.ericsson.se>
+
 1997-10-01  Karl M. Hegbloom  <karlheg@inetarena.com>
 
 	* lispref/commands.texi (Keyboard Macros): fixed typo.  Changed
--- a/man/Makefile	Mon Aug 13 10:01:24 2007 +0200
+++ b/man/Makefile	Mon Aug 13 10:02:21 2007 +0200
@@ -44,8 +44,8 @@
 
 srcs = cc-mode cl custom ediff efs external-widget forms \
 	hm--html-mode \
-	hyperbole ilisp info ispell mailcrypt mh-e oo-browser \
-	pcl-cvs ph psgml psgml-api rmail standards supercite term \
+	hyperbole ilisp info ispell mailcrypt oo-browser \
+	pcl-cvs ph psgml psgml-api standards supercite term \
 	termcap texinfo vhdl-mode viper vm widget xemacs-faq
 
 info = $(srcs:%=../info/%.info)
--- a/man/cc-mode.texi	Mon Aug 13 10:01:24 2007 +0200
+++ b/man/cc-mode.texi	Mon Aug 13 10:02:21 2007 +0200
@@ -46,7 +46,7 @@
 @comment The title is printed in a large font.
 @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 
-@center @titlefont{CC Mode 5.18}
+@center @titlefont{CC Mode 5.19}
 @sp 2
 @center @subtitlefont{A GNU Emacs mode for editing C and C-like languages}
 @sp 2
@@ -1142,7 +1142,8 @@
 Some provision has been made to at least inform you as to the progress
 of the re-indentation.  The variable @code{c-progress-interval} controls
 how often a progress message is displayed.  Set this variable to
-@code{nil} to inhibit progress messages.
+@code{nil} to inhibit progress messages, including messages normally
+printed when indentation is started and completed.
 
 Also, except as noted below, re-indentation is always driven by the
 same mechanisms that control on-the-fly indentation of code.  @xref{New
--- a/man/lispref/databases.texi	Mon Aug 13 10:01:24 2007 +0200
+++ b/man/lispref/databases.texi	Mon Aug 13 10:02:21 2007 +0200
@@ -25,6 +25,18 @@
 @var{type} and @var{subtype}, with access rights @var{access} and
 permissions @var{mode}.  @var{access} can be any combination of @code{r}
 @code{w} and @code{+}, for read, write, and creation flags.
+
+@var{type} can have the value @code{'dbm} or @code{'berkeley_db} to
+select the type of database file to use.  (Note:  XEmacs may not
+support both of these types.)
+
+For a @var{type} of @code{'dbm}, there are no subtypes, so
+@var{subtype} should by @code{nil}.
+
+For a @var{type} of @code{'berkeley_db}, the following subtypes are
+available:  @code{'hash}, @code{'btree}, and @code{'recno}.  See the
+manpages for the Berkeley DB functions to more information about these 
+types.
 @end defun
 
 @defun close-database obj
--- a/man/lispref/objects.texi	Mon Aug 13 10:01:24 2007 +0200
+++ b/man/lispref/objects.texi	Mon Aug 13 10:02:21 2007 +0200
@@ -384,7 +384,7 @@
 modifiers.  XEmacs does not use this (a more general mechanism is
 used that does not distinguish between @sc{ASCII} keys and other
 keys), so you will never find character codes above 255 in a
-non-@sc{MULE} Xemacs.
+non-@sc{MULE} XEmacs.
 
   Individual characters are not often used in programs.  It is far more
 common to work with @emph{strings}, which are sequences composed of
--- a/man/mh-e.texi	Mon Aug 13 10:01:24 2007 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,4092 +0,0 @@
-\input texinfo   @c -*-texinfo-*-
-@c $Id: mh-e.texi,v 1.1.1.1 1996/12/18 22:43:45 steve Exp $
-@c Time-stamp: <95/04/14 19:05:01 gildea>
-@c %**start of header
-@setfilename ../info/mh-e.info
-@settitle mh-e
-@c %**end of header
-
-@setchapternewpage odd
-
-@c Version variables.
-@set EDITION 1.2
-@set VERSION 5.0.2
-@set UPDATED 22 August 1995
-@set UPDATE-MONTH August 1995
-
-@ifinfo
-This is Edition @value{EDITION}, last updated @value{UPDATED}, of
-@cite{mh-e, The Emacs Interface to MH}, for mh-e, Version
-@value{VERSION}.
-
-Copyright 1995 Free Software Foundation, Inc.
-
-Permission is granted to make and distribute verbatim
-copies of this manual provided the copyright notice and
-this permission notice are preserved on all copies.
-
-@ignore
-Permission is granted to process this file through TeX
-and print the results, provided the printed document
-carries a copying permission notice identical to this
-one except for the removal of this paragraph (this
-paragraph not being relevant to the printed manual).
-
-@end ignore
-Permission is granted to copy and distribute modified
-versions of this manual under the conditions for
-verbatim copying, provided also that the section
-entitled ``Copying''
-is included exactly as in the original, and provided
-that the entire resulting derived work is distributed
-under the terms of a permission notice identical to this
-one.
-
-Permission is granted to copy and distribute
-translations of this manual into another language,
-under the above conditions for modified versions,
-except that this permission notice may be stated in a
-translation approved by the Free Software Foundation.
-@end ifinfo
-
-@titlepage
-@sp 10
-@center @titlefont{mh-e}
-@sp 2
-@center The Emacs Interface to MH
-@sp 2
-@center by Bill Wohler
-@sp 2
-@center Edition @value{EDITION} for mh-e Version @value{VERSION}
-@sp 2
-@center @value{UPDATE-MONTH}
-
-@page
-@vskip 0pt plus 1filll
-Copyright @copyright{} 1995 Free Software Foundation, Inc.
-
-Permission is granted to make and distribute verbatim
-copies of this manual provided the copyright notice and
-this permission notice are preserved on all copies.
-
-Permission is granted to copy and distribute modified
-versions of this manual under the conditions for
-verbatim copying, provided also that the section
-entitled ``The GNU General Public License''
-is included exactly as in the original, and provided
-that the entire resulting derived work is distributed
-under the terms of a permission notice identical to this
-one.
-
-Permission is granted to copy and distribute
-translations of this manual into another language,
-under the above conditions for modified versions,
-except that this permission notice may be stated in a
-translation approved by the Free Software Foundation.
-@end titlepage
-
-@ifinfo
-@node Top, Preface, (dir), (dir)
-@top MH and Emacs
-This is Edition @value{EDITION} of @cite{mh-e, The Emacs Interface to
-MH}, last updated @value{UPDATED} for mh-e Version @value{VERSION}.
-
-@menu
-* Preface::                     Introduction to mh-e.
-* Tour Through mh-e::           Use mh-e quickly!
-* Using mh-e::                  Documentation for all commands.
-* Customizing mh-e::            Documentation for all variables.
-* Odds and Ends::               Getting mh-e, reporting bugs, mailing
-                                list and FAQ.
-* History::                     The authors speak up!
-* Changes to mh-e::             Actual changes between Versions 3 and beyond.
-* Copying::                     The GNU General Public License
-* Command Index::              
-* Variable Index::              
-* Concept Index::               
-@end menu
-@end ifinfo
-
-@node Preface, Tour Through mh-e, Top, Top
-@unnumbered Preface
-
-@cindex Emacs
-@cindex Unix commands, Emacs
-
-These chapters introduce another interface to MH that is accessible
-through the GNU Emacs editor, namely, @emph{mh-e}.  mh-e is easy to use.
-I don't assume that you know GNU Emacs or even MH at this point, since I
-didn't know either of them when I discovered mh-e.  However, mh-e was
-the tip of the iceberg, and I discovered more and more niceties about
-GNU Emacs and MH@.  Now I'm fully hooked on both of them.
-
-@cindex history
-
-The mh-e package is distributed with GNU Emacs, @footnote{Note that mh-e
-is supported with MH 6 and either GNU @w{Emacs 18} or GNU @w{Emacs 19}.
-Reportedly, large parts of it work with @w{MH 5} and also with
-Lucid/XEmacs and Epoch, but there are no guarantees.  It is also
-distributed with Lucid/XEmacs, as well as with MH itself.} so you shouldn't
-have to do anything special to use it.  But it's important to note a
-brief history of mh-e.  @w{Version 3} was prevalent through the @w{Emacs
-18} and early @w{Emacs 19} years.  Then @w{Version 4} came out (@w{Emacs
-19.23}), which introduced several new and changed commands.  Finally,
-@w{Version 5.0} was released, which fixed some bugs and
-incompatibilities.  This is the version covered by this manual.
-@ref{Getting Started} will help you decide which version you
-have.
-
-If you don't already use GNU Emacs but want to learn more, you can read
-an online tutorial by starting GNU Emacs and typing @kbd{C-h t}
-(@code{help-with-tutorial}).  (This notation is described in
-@ref{Conventions}.)  If you want to take the plunge, consult the
-@iftex
-@cite{GNU Emacs Manual},
-@end iftex
-@ifinfo
-@ref{top, , GNU Emacs Manual, emacs, The GNU Emacs Manual},
-@end ifinfo
-from the Free Software Foundation.
-
-If more information is needed, you can go to the Unix manual pages of
-the individual MH commands.  When the name is not obvious, I'll guide
-you to a relevant MH manual page that describes the action more fully.
-
-I hope you enjoy these chapters!  If you have any comments, or
-suggestions for this document, please let me know.
-
-@noindent
-Bill Wohler <@i{wohler@@newt.com}>@*
-8 February 1995
-
-@node    Tour Through mh-e, Using mh-e, Preface, Top
-@chapter Tour Through mh-e
-
-This chapter introduces some of the terms you'll need to know and then
-takes you on a tour of mh-e. @footnote{The keys mentioned in these
-chapters refer to the default key bindings.  If you've changed the
-bindings, refer to the command summaries at the beginning of each major
-section in @ref{Using mh-e}, for a mapping between default key bindings
-and function names.}  When you're done, you'll be able to send, read,
-and file mail, which is all that a lot of people ever do.  But if you're
-the curious type, you'll read @ref{Using mh-e} to be able to use all
-the features of mh-e.  If you're the adventurous type, you'll read
-@ref{Customizing mh-e} to make mh-e do what you want.  I suggest you
-read this chapter first to get the big picture, and then you can read
-the other two as you wish.
-
-@menu
-* Conventions::                 GNU Emacs Terms and Conventions
-* Getting Started::             
-* Sending Mail Tour::           
-* Reading Mail Tour::           
-* Processing Mail Tour::        
-* Leaving mh-e::                
-* More About mh-e::             
-@end menu
-
-@node Conventions, Getting Started, Tour Through mh-e, Tour Through mh-e
-@section GNU Emacs Terms and Conventions
-
-@cindex Emacs, terms and conventions
-
-@cindex Emacs
-@cindex Unix commands, Emacs
-
-If you're an experienced Emacs user, you can skip the following
-conventions and definition of terms and go directly to @ref{Getting
-Started} below.  The conventions are as follows:
-
-@table @kbd
-@item C-x
-Hold down the @key{CTRL} (Control) key and press the @kbd{x} key.
-@item M-x
-Hold down the @key{META} or @key{ALT} key and press the @kbd{x} key.
-
-Since some keyboards don't have a @key{META} key, you can generate
-@kbd{M-x}, for example, by pressing @key{ESC} (Escape), @emph{releasing
-it}, @footnote{This is emphasized because pressing ESC twice or holding
-it down a second too long so that it repeats gives you an error message.}
-and then pressing the @kbd{x} key.
-@item RET
-Press the @key{RETURN} or @key{ENTER} key.  This is normally used to
-complete a command.
-@item SPC
-Press the space bar.
-@item TAB
-Press the @key{TAB} key.
-@item DEL
-Press the @key{DELETE} key.  This may also be a Backspace key, depending
-on your keyboard or Emacs configuration.
-@end table
-
-@cindex Emacs, prefix argument
-@cindex prefix argument
-
-A @dfn{prefix argument} allows you to pass an argument to any Emacs
-function.  To pass an argument, type @kbd{C-u} before the Emacs command
-or keystroke.  Numeric arguments can be passed as well.  For example, to
-insert five f's, use @kbd{C-u 5 f}.  There is a default of four when
-using @kbd{C-u}, and you can use multiple prefix arguments to provide
-arguments of powers of four.  To continue our example, you could insert
-four f's with @kbd{C-u f}, 16 f's with @kbd{C-u C-u f}, 64 f's with
-@kbd{C-u C-u C-u f}, and so on.  Numeric and valueless negative
-arguments can also be inserted with the @key{META} key.  Examples
-include @kbd{M-5} to specify an argument of 5, or @kbd{M--} which
-specifies a negative argument with no particular value.
-
-@sp 2
-@need 1000
-@center @strong{NOTE}
-
-@quotation
-The prefix @kbd{C-u} or @kbd{M-} is not necessary in mh-e's MH-Folder
-modes (@pxref{Reading Mail Tour}).  In these modes, simply enter the
-numerical argument before entering the command.
-@end quotation
-
-@cindex point
-@cindex Emacs, point
-@cindex mark
-@cindex Emacs, mark
-@cindex region
-@cindex Emacs, region
-
-There are several other terms that are used in Emacs that you should
-know.  The @dfn{point} is where the cursor currently is.  You can save
-your current place in the file by setting a @dfn{mark}.  This operation
-is useful in several ways.  The mark can be later used when defining a
-@dfn{region}, which is the text between the point and mark.  Many
-commands operate on regions, such as those for deleting text or filling
-paragraphs.  A mark can be set with @kbd{C-@@} (or @kbd{C-SPC}).
-
-@cindex minibuffer
-@cindex Emacs, minibuffer
-@cindex file completion
-@cindex Emacs, file completion
-
-The @dfn{minibuffer} is the bottom line of the Emacs window, where all
-prompting and multiple-character input is directed.  If you are prompted
-for information in the minibuffer, such as a filename, Emacs can help
-you complete your answer if you type @key{SPC} or @key{TAB}.  A second
-@key{SPC} or @key{TAB} will list all possibilities at that point.  The
-minibuffer is also where you enter Emacs function names after typing
-@kbd{M-x}.  For example, in the first paragraph, I mentioned that you
-could obtain help with @kbd{C-h t} (@code{help-with-tutorial}).  What
-this means is that you can get a tutorial by typing either @kbd{C-h t}
-or @kbd{M-x help-with-tutorial}.  In the latter case, you are prompted
-for @samp{help-with-tutorial} in the minibuffer after typing @kbd{M-x}.
-
-@cindex interrupting
-@cindex Emacs, interrupting
-@cindex quitting
-@cindex Emacs, quitting
-
-@i{In case of trouble:} Emacs can be interrupted at any time with
-@kbd{C-g}.  For example, if you've started a command that requests that
-you enter something in the minibuffer, but then you change your mind,
-type @kbd{C-g} and you'll be back where you started.  If you want to
-exit Emacs entirely, use @kbd{C-x C-c}.
-
-@node Getting Started, Sending Mail Tour, Conventions, Tour Through mh-e
-@section Getting Started
-
-Because there are many old versions of mh-e out there, it is important to
-know which version you have.  I'll be talking about @w{Version 5} which
-is similar to @w{Version 4} and vastly different from @w{Version 3}.
-
-First, enter @kbd{M-x load-library @key{RET} mh-e
-@key{RET}}. @footnote{You wouldn't ordinarily do this.}  The message,
-@samp{Loading mh-e...done}, should be displayed in the minibuffer.  If
-you get @samp{Cannot open load file: mh-e}, then your Emacs is very
-badly configured, or mh-e is missing.  You may wish to have your system
-administrator install a new Emacs or at least the latest mh-e files.
-
-Having loaded mh-e successfully, enter @kbd{M-x mh-version @key{RET}}.
-The version of mh-e should be displayed.  Hopefully it says that you're
-running @w{Version @value{VERSION}} which is the latest version as of
-this printing.  If instead Emacs beeps and says @samp{[No match]}, then
-you're running an old version of mh-e.
-
-If these tests reveal a non-existent or old version of mh-e, please
-consider obtaining a new version.  You can have your system
-administrator upgrade the system-wide version, or you can install your
-own personal version.  It's really quite easy; instructions for getting
-and installing mh-e are in @ref{Getting mh-e}.  In the meantime, see
-@ref{Changes to mh-e}, which compares the old and new names of commands,
-functions, variables, and buffers.
-
-@cindex @code{install-mh}
-@cindex MH commands, @code{install-mh}
-
-Also, older versions of mh-e assumed that you had already set up your MH
-environment.  Newer versions set up a new MH environment for you by
-running @code{install-mh} and notifying you of this fact with the
-message in a temporary buffer:
-
-@example
-I'm going to create the standard MH path for you.
-@end example
-
-Therefore, if you've never run MH before and you're using an old version
-of mh-e, you need to run @code{install-mh} from the shell before you
-continue the tour.  If you don't, you'll be greeted with the error
-message: @samp{Can't find MH profile}.
-
-@cindex @file{.emacs}
-@cindex files, @file{.emacs}
-
-If, during the tour described in this chapter, you see a message like:
-@samp{Searching for program: no such file or directory,
-/usr/local/bin/mhpath}, it means that the MH programs and files are kept
-in a nonstandard directory.  In this case, simply add the following to
-@file{~/.emacs} and restart @code{emacs}.
-
-@vindex @code{mh-progs}, example
-@vindex @code{mh-lib}, example
-
-@c XXX Real example for really naive user?
-@example
-@group
-(setq mh-progs "@var{/path/to/MH/binary/directory/}")
-(setq mh-lib "@var{/path/to/MH/library/directory/}")
-@end group
-@end example
-
-@cindex ~
-
-The @samp{~} notation used by @file{~/.emacs} above represents your home
-directory.  This is used by the @code{bash} and @code{csh} shells.  If
-your shell does not support this feature, you could use the environment
-variable @samp{$HOME} (such as @file{$HOME/.emacs}) or the absolute path
-(as in @file{/home/wohler/.emacs}) instead.
-
-At this point, you should see something like the screen in the
-figure in @ref{Reading Mail Tour}.  We're now ready to move on.
-
-@node Sending Mail Tour, Reading Mail Tour, Getting Started, Tour Through mh-e
-@section Sending Mail
-
-@cindex sending mail
-@findex @code{mh-smail}
-
-Let's start our tour by sending ourselves a message which we can later
-read and process.  Enter @kbd{M-x mh-smail} to invoke the mh-e program
-to send messages.  You will be prompted in the minibuffer by @samp{To:}.
-Enter your login name.  The next prompt is @samp{cc:}.  Hit @key{RET} to
-indicate that no carbon copies are to be sent.  At the @samp{Subject:}
-prompt, enter @kbd{Test} or anything else that comes to mind.
-
-@cindex MH-Letter mode
-@cindex modes, MH-Letter
-@cindex mode
-
-Once you've specified the recipients and subject, your message appears
-in an Emacs buffer whose mode @footnote{A @dfn{mode} changes Emacs to
-make it easier to edit a particular type of text.} is MH-Letter.
-Enter some text in the body of the message, using normal Emacs commands.
-You should now have something like this: @footnote{If you're running Emacs
-under the X Window System, then you would also see a menubar.  I've left
-out the menubar in all of the example screens.}
-
-@example
-@group
-@cartouche
-
-
-
-
-
-
------Emacs: *scratch*         (Lisp Interaction)--All---------------------
-To: wohler
-cc:
-Subject: Test
---------
-  This is a test message to get the wheels churning...#
-
-
---**-@{draft@}      (MH-Letter)--All----------------------------------------
-
-@end cartouche
-@i{mh-e message composition window}
-@end group
-@end example
-
-@cindex MH-Letter mode
-@cindex modes, MH-Letter
-
-Note the line of dashes that separates the header and the body of the
-message.  It is essential that these dashes (or a blank line) are
-present or the body of your message will be considered to be part of
-the header.
-
-There are several commands specific to MH-Letter mode, but at
-this time we'll only use @kbd{C-c C-c} to send your message.  Type
-@kbd{C-c C-c} now.  That's all there is to it!
-
-@node Reading Mail Tour, Processing Mail Tour, Sending Mail Tour, Tour Through mh-e
-@section Receiving Mail
-
-@cindex reading mail
-@findex @code{mh-rmail}
-@cindex @code{inc}
-@cindex MH commands, @code{inc}
-@cindex @code{scan}
-@cindex MH commands, @code{scan}
-@cindex MH-Folder mode
-@cindex modes, MH-Folder
-
-To read the mail you've just sent yourself, enter @kbd{M-x mh-rmail}.
-This incorporates the new mail and put the output from @code{inc}
-(called @dfn{scan lines} after the MH program @code{scan} which prints a
-one-line summary of each message) into a buffer called @samp{+inbox}
-whose major mode is MH-Folder.
-
-@sp 2
-@need 1000
-@center @strong{NOTE}
-
-@quotation
-The @kbd{M-x mh-rmail} command will show you only new mail, not old
-mail.  If you were to run this tour again, you would use @kbd{M-r} to
-pull all your messages into mh-e.
-@end quotation
-
-You should see the scan line for your message, and perhaps others.  Use
-@kbd{n} or @kbd{p} to move the cursor to your test message and type
-@key{RET} to read your message.  You should see something like:
-
-@example
-@group
-@cartouche
-   3  24Aug  root       received fax files on Wed Aug 24 11:00:13 PDT 1994
-#  4+ 24Aug  To:wohler  Test<<This is a test message to get the wheels chu
-
---%%-@{+inbox@} 4 msgs (1-4)      (MH-Folder Show)--Bot---------------------
-To: wohler
-Subject: Test
-Date: Wed, 24 Aug 1994 13:01:13 -0700
-From: Bill Wohler <wohler@@newt.com>
-
-  This is a test message to get the wheels churning...
-
-
-
-
-
------@{show-+inbox@} 4      (MH-Show)--Bot----------------------------------
-
-@end cartouche
-@i{After incorporating new messages}
-@end group
-@end example
-
-If you typed a long message, you can view subsequent pages with @key{SPC}
-and previous pages with @key{DEL}.
-
-@node Processing Mail Tour, Leaving mh-e, Reading Mail Tour, Tour Through mh-e
-@section Processing Mail
-
-@cindex processing mail
-
-The first thing we want to do is reply to the message that we sent
-ourselves.  Ensure that the cursor is still on the same line as your
-test message and type @kbd{r}.  You are prompted in the minibuffer with
-@samp{Reply to whom:}.  Here mh-e is asking whether you'd like to reply
-to the original sender only, to the sender and primary recipients, or to
-the sender and all recipients.  If you simply hit @key{RET}, you'll
-reply only to the sender.  Hit @key{RET} now.
-
-You'll find yourself in an Emacs buffer similar to that when you were
-sending the original message, like this:
-
-@example
-@group
-@cartouche
-To: wohler
-Subject: Re: Test
-In-reply-to: Bill Wohler's message of Wed, 24 Aug 1994 13:01:13 -0700
-             <199408242001.NAA00505@@newt.com>
---------
-#
-
---**-@{draft@}      (MH-Letter)--All----------------------------------------
-To: wohler
-Subject: Test
-Date: Wed, 24 Aug 1994 13:01:13 -0700
-From: Bill Wohler <wohler@@newt.com>
-
-  This is a test message to get the wheels churning...
-
------@{show-+inbox@} 4      (MH-Show)--Bot----------------------------------
-Composing a reply...done
-@end cartouche
-@i{Composition window during reply}
-@end group
-@end example
-
-By default, MH will not add you to the address list of your replies, so
-if you find that the @samp{To:} header field is missing, don't worry.
-In this case, type @kbd{C-c C-f C-t} to create and go to the @samp{To:}
-field, where you can type your login name again.  You can move around
-with the arrow keys or with @kbd{C-p} (@code{previous-line}), @kbd{C-n}
-(@code{next-line}), @kbd{C-b} (@code{backward-char}), and @kbd{C-f}
-(@code{forward-char}) and can delete the previous character with
-@key{DEL}.  When you're finished editing your message, send it with
-@kbd{C-c C-c} as before.
-
-@cindex folder
-
-You'll often want to save messages that were sent to you in an organized
-fashion.  This is done with @dfn{folders}.  You can use folders to keep
-messages from your friends, or messages related to a particular topic.
-With your cursor in the MH-Folder buffer and positioned on the message
-you sent to yourself, type @kbd{o} to output (@code{refile} in MH
-parlance) that message to a folder.  Enter @kbd{test} at the
-@samp{Destination:} prompt and type @kbd{y} (or @key{SPC}) when mh-e
-asks to create the folder @samp{+test}.  Note that a @samp{^} (caret)
-appears next to the message number, which means that the message has
-been marked for refiling but has not yet been refiled.  We'll talk about
-how the refile is actually carried out in a moment.
-
-@cindex MH-Folder mode
-@cindex modes, MH-Folder
-
-Your previous reply is now waiting in the system mailbox.  You
-incorporate this mail into your MH-Folder buffer named @samp{+inbox}
-with the @kbd{i} command.  Do this now.  After the mail is incorporated,
-use @kbd{n} or @kbd{p} to move the cursor to the new message, and read
-it with @key{RET}.  Let's delete this message by typing @kbd{d}.  Note
-that a @samp{D} appears next to the message number.  This means that the
-message is marked for deletion but is not yet deleted.  To perform the
-deletion (and the refile we did previously), use the @kbd{x} command.
-
-@findex @code{mh-smail}
-
-If you want to send another message you can use @kbd{m} instead of
-@kbd{M-x mh-smail}.  So go ahead, send some mail to your friends!
-
-@node Leaving mh-e, More About mh-e, Processing Mail Tour, Tour Through mh-e
-@section Leaving mh-e
-
-@cindex Emacs, quitting
-@cindex quitting
-
-You may now wish to exit @code{emacs} entirely.  Use @kbd{C-x C-c} to
-exit @code{emacs}.  If you exited without running @kbd{x} in the
-@samp{+inbox} buffer, Emacs will offer to save it for you.  Type @kbd{y}
-or @key{SPC} to save @samp{+inbox} changes, which means to perform any refiles
-and deletes that you did there.
-
-If you don't want to leave Emacs, you can type @kbd{q} to bury (hide)
-the mh-e folder or delete them entirely with @kbd{C-x k}.  You can then
-later recall them with @kbd{C-x b} or @kbd{M-x mh-rmail}.
-
-@node More About mh-e,  , Leaving mh-e, Tour Through mh-e
-@section More About mh-e
-
-These are the basic commands to get you going, but there are plenty
-more.  If you think that mh-e is for you, read @ref{Using mh-e} and
-@ref{Customizing mh-e} to find out how you can:
-
-@itemize @bullet
-@item
-Print your messages.  (@ref{Printing} and @ref{Customizing Printing}.)
-@item
-Edit messages and include your signature.  (@ref{Draft Editing}
-and @ref{Customizing Draft Editing}.)
-@item
-Forward messages.  (@ref{Forwarding} and @ref{Customizing Forwarding}.)
-@item
-Read digests.  (@ref{Viewing}.)
-@item
-Edit bounced messages.  (@ref{Old Drafts} and @ref{Customizing Old Drafts}.)
-@item
-Send multimedia messages.  (@ref{Editing MIME} and @ref{Customizing Editing MIME}.)
-@item
-Process mail that was sent with @code{shar} or @code{uuencode}.
-(@ref{Files and Pipes}.)
-@item
-Use sequences conveniently.  (@ref{Sequences}.)
-@item
-Show header fields in different fonts.  (@ref{Customizing Viewing}.)
-@item
-Find previously refiled messages.  (@ref{Searching}.)
-@item
-Place messages in a file.  (@ref{Files and Pipes}.)
-@end itemize
-
-Remember that you can also use MH commands when you're not running mh-e
-(and when you are!).
-
-@node    Using mh-e, Customizing mh-e, Tour Through mh-e, Top
-@chapter Using mh-e
-
-This chapter leaves the tutorial style and goes into more detail about
-every mh-e command.  The default, or "out of the box," behavior is
-documented.  If this is not to your liking (for instance, you print with
-something other than @code{lpr)}, see the associated section in
-@ref{Customizing mh-e} which is organized exactly like this chapter.
-
-@cindex Emacs, functions; describe-mode
-@cindex Emacs, online help
-@cindex online help
-
-There are many commands, but don't get intimidated.  There are command
-summaries at the beginning of each section.  In case you have or would
-like to rebind the keys, the command summaries also list the associated
-Emacs Lisp function.  Furthermore, even if you're stranded on a desert
-island with a laptop and are without your manuals, you can get a summary
-of all these commands with GNU Emacs online help: use @kbd{C-h m}
-(@code{describe-mode}) for a brief summary of commands or @kbd{C-h i} to
-read this manual via Info.  The online help is quite good; try running
-@kbd{C-h C-h C-h}.  This brings up a list of available help topics, one
-of which displays the documentation for a given key (like @kbd{C-h k
-C-n}).  In addition, review @ref{Conventions}, if any of the GNU Emacs
-conventions are strange to you.
-
-Let's get started!
-
-@menu
-* Reading Mail::                
-* Sending Mail::                
-* Draft Editing::               
-* Moving Mail::                 
-* Searching::                   
-* Sequences::                   
-* Miscellaneous::               
-@end menu
-
-@node Reading Mail, Sending Mail, Using mh-e, Using mh-e
-@section Reading Your Mail
-
-@cindex reading mail
-@findex @code{mh-rmail}
-@cindex MH-Folder mode
-@cindex modes, MH-Folder
-
-The mh-e entry point for reading mail is @kbd{M-x mh-rmail}.  This
-command incorporates your mail and creates a buffer called @samp{+inbox}
-in MH-Folder mode.  The @kbd{M-x mh-rmail} command shows you only new
-mail, not old mail. @footnote{If you want to see your old mail as well,
-use @kbd{M-r} to pull all your messages into mh-e.  Or, give a prefix
-argument to @code{mh-rmail} so it will prompt you for folder to visit
-like @kbd{M-f} (for example, @kbd{C-u M-x mh-rmail @key{RET} bob
-@key{RET}}).  Both @kbd{M-r} and @kbd{M-f} are described in
-@ref{Organizing}.}  The @samp{+inbox} buffer contains @dfn{scan lines},
-which are one-line summaries of each incorporated message.  You can
-perform most MH commands on these messages via one-letter commands
-discussed in this chapter.  See @code{scan}(1) for a description of the
-contents of the scan lines, and see the Figure in @ref{Reading Mail
-Tour}, for an example.
-
-@table @kbd
-@item RET
-Display a message (@code{mh-show}).
-
-@item SPC
-Go to next page in message (@code{mh-page-msg}).
-
-@item DEL
-Go to previous page in message (@code{mh-previous-page}).
-
-@item , (comma)
-Display a message with all header fields (@code{mh-header-display}).
-
-@item M-SPC
-Go to next message in digest (@code{mh-page-digest}).
-
-@item M-DEL
-Go to previous message in digest (@code{mh-page-digest-backwards}).
-
-@item M-b
-Break up digest into separate messages (@code{mh-burst-digest}).
-
-@item n
-Display next message (@code{mh-next-undeleted-msg}).
-
-@item p
-Display previous message (@code{mh-previous-undeleted-msg}).
-
-@item g
-Go to a message (@code{mh-goto-msg}).
-
-@item M-<
-Go to first message (@code{mh-first-msg}).
-
-@item M->
-Go to last message (@code{mh-last-msg}).
-
-@item t
-Toggle between MH-Folder and MH-Folder Show modes (@code{mh-toggle-showing}).
-@end table
-
-@menu
-* Viewing::                     
-* Moving Around::               
-@end menu
-
-@node Viewing, Moving Around, Reading Mail, Reading Mail
-@subsection Viewing Your Mail
-
-@findex @code{mh-show}
-@findex @code{mh-page-msg}
-@findex @code{mh-previous-page}
-
-The @kbd{RET} (@code{mh-show}) command displays the message that the
-cursor is on.  If the message is already displayed, it scrolls to the
-beginning of the message.  Use @key{SPC} (@code{mh-page-msg}) and
-@key{DEL} (@code{mh-previous-page}) to move forwards and backwards one
-page at a time through the message.  You can give either of these
-commands a prefix argument that specifies the number of lines to scroll
-(such as @kbd{10 SPC}).  mh-e normally hides a lot of the
-superfluous header fields that mailers add to a message, but if you wish
-to see all of them, use the @kbd{,} (comma; @code{mh-header-display})
-command.
-
-@menu
-* Reading Digests::             
-* Reading MIME::                
-@end menu
-
-@node Reading Digests, Reading MIME, Viewing, Viewing
-@subsubsection Reading Digests
-
-@cindex digests
-@findex @code{mh-page-digest}
-@findex @code{mh-page-digest-backwards}
-
-A digest is a message that contains other messages.  Special mh-e
-commands let you read digests conveniently.  You can use @key{SPC} and
-@key{DEL} to page through the digest as if it were a normal message, but
-if you wish to skip to the next message in the digest, use @kbd{M-SPC}
-(@code{mh-page-digest}).  To return to a previous message, use
-@kbd{M-DEL} (@code{mh-page-digest-backwards}).
-
-@cindex @code{burst}
-@cindex MH commands, @code{burst}
-@cindex MH-Folder Show mode
-@cindex modes, MH-Folder Show
-@findex @code{mh-burst-digest}
-
-@c There was a page break at the colon in the following paragraph which
-@c broke the transition to the example.
-@need 2000
-
-Another handy command is @kbd{M-b} (@code{mh-burst-digest}).  This
-command uses the MH command @code{burst} to break out each message in
-the digest into its own message.  Using this command, you can quickly
-delete unwanted messages, like this: Once the digest is split up, toggle
-out of MH-Folder Show mode with @kbd{t} (@pxref{Moving Around}) so that
-the scan lines fill the screen and messages aren't displayed.  Then use
-@kbd{d} (@pxref{Deleting}) to quickly delete messages that you don't
-want to read (based on the @samp{Subject:} header field).  You can also
-burst the digest to reply directly to the people who posted the messages
-in the digest.  One problem you may encounter is that the @samp{From:}
-header fields are preceded with a @samp{>} so that your reply can't
-create the @samp{To:} field correctly.  In this case, you must correct
-the @samp{To:} field yourself.  This is described later in @ref{Editing
-Textual}.
-
-@node Reading MIME,  , Reading Digests, Viewing
-@subsubsection Reading Multimedia Mail
-
-@cindex multimedia mail
-@cindex MIME
-@cindex @code{show}
-@cindex MH commands, @code{show}
-@cindex @code{mhn}
-@cindex MH commands, @code{mhn}
-
-MH has the ability to read @dfn{@sc{mime}} (Multipurpose Internet Mail
-Extensions) messages.  Unfortunately, mh-e does not yet have this
-ability, so you have to use the MH commands @code{show} or @code{mhn}
-from the shell to read @sc{mime} messages.  @footnote{You can call them
-directly from Emacs if you're running the X Window System: type @kbd{M-!
-xterm -e mhn @var{message-number}}.  You can leave out the @code{xterm
--e} if you use @code{mhn -list} or @code{mhn -store}.}
-
-@node Moving Around,  , Viewing, Reading Mail
-@subsection Moving Around
-
-@cindex moving between messages
-@findex @code{mh-next-undeleted-msg}
-@findex @code{mh-previous-undeleted-msg}
-@findex @code{mh-goto-msg}
-@findex @code{mh-last-msg}
-@findex @code{mh-first-msg}
-
-To move on to the next message, use the @kbd{n}
-(@code{mh-next-undeleted-msg}) command; use the @kbd{p}
-(@code{mh-previous-undeleted-msg}) command to read the previous message.
-Both of these commands can be given a prefix argument to specify how
-many messages to skip (for example, @kbd{5 n}).  You can also move to a
-specific message with @kbd{g} (@code{mh-goto-msg}).  You can enter the
-message number either before or after typing @kbd{g}.  In the latter
-case, Emacs prompts you.  Finally, you can go to the first or last
-message with @kbd{M-<} (@code{mh-first-msg}) and @kbd{M->}
-(@code{mh-last-msg}) respectively.
-
-@cindex MH-Folder mode
-@cindex modes, MH-Folder
-
-You can also use the Emacs commands @kbd{C-p} (@code{previous-line}) and
-@kbd{C-n} (@code{next-line}) to move up and down the scan lines in the
-MH-Folder window.  These commands can be used in conjunction with
-@kbd{RET} to look at deleted or refiled messages.
-
-@cindex MH-Folder mode
-@cindex modes, MH-Folder
-@cindex MH-Folder Show mode
-@cindex modes, MH-Folder Show
-@cindex junk mail
-@findex @code{mh-toggle-showing}
-
-The command @kbd{t} (@code{mh-toggle-showing}) switches between
-MH-Folder mode and MH-Folder Show mode.  @footnote{For you Emacs
-wizards, this is implemented as an Emacs minor mode.} MH-Folder mode
-turns off the associated show buffer so that you can perform operations
-on the messages quickly without reading them.  This is an excellent way
-to prune out your junk mail or to refile a group of messages to another
-folder for later examination.
-
-@node Sending Mail, Draft Editing, Reading Mail, Using mh-e
-@section Sending Mail
-
-@cindex sending mail
-@findex @code{mh-smail}
-
-You can send a mail message in several ways.  You can call @kbd{M-x
-mh-smail} directly, or from the command line like this:
-
-@cindex starting from command line
-
-@example
-% @kbd{emacs -f mh-smail}
-@end example
-
-From within mh-e's MH-Folder mode, other methods of sending mail
-are available as well:
-
-@table @kbd
-@item m
-Compose a message (@code{mh-send}).
-
-@item r
-Reply to a message (@code{mh-reply}).
-
-@item f
-Forward message(s) (@code{mh-forward}).
-
-@item M-d
-Redistribute a message (@code{mh-redistribute}).
-
-@item M-e
-Edit a message that was bounced by mailer (@code{mh-extract-rejected-mail}).
-
-@item M-a
-Edit a message to send it again (@code{mh-edit-again}).
-@end table
-
-@cindex MH-Folder mode
-@cindex modes, MH-Folder
-@cindex MH-Letter mode
-@cindex modes, MH-Letter
-@findex @code{mh-send}
-
-From within a MH-Folder buffer, you can simply use the command @kbd{m}
-(@code{mh-send}).  However you invoke @code{mh-send}, you are prompted
-for the @samp{To:}, @samp{cc:}, and @samp{Subject:} header fields.  Once
-you've specified the recipients and subject, your message appears in an
-Emacs buffer whose mode is MH-Letter (see the Figure in @ref{Sending
-Mail} to see what the buffer looks like).  MH-Letter mode allows you to
-edit your message, to check the validity of the recipients, to insert
-other messages into your message, and to send the message.  We'll go
-more into depth about editing a @dfn{draft} @footnote{I highly recommend
-that you use a @dfn{draft folder} so that you can edit several drafts in
-parallel.  To do so, create a folder (e.g., @file{+drafts}), and add a
-profile component called @samp{Draft-Folder:} which contains
-@file{+drafts} (see @code{mh-profile}(5)).} (a message you're composing)
-in just a moment.
-
-@findex @code{mh-smail}
-@findex @code{mh-smail-other-window}
-
-@code{mh-smail} always creates a two-window layout with the current
-buffer on top and the draft on the bottom.  If you would rather preserve
-the window layout, use @kbd{M-x mh-smail-other-window}.
-
-@menu
-* Replying::                    
-* Forwarding::                  
-* Redistributing::              
-* Old Drafts::                  
-@end menu
-
-@node Replying, Forwarding, Sending Mail, Sending Mail
-@subsection Replying to Mail
-
-@cindex replying
-@cindex @code{mhl}
-@cindex MH commands, @code{mhl}
-@cindex @file{mhl.reply}
-@cindex files, @file{mhl.reply}
-@findex @code{mh-reply}
-
-To compose a reply to a message, use the @kbd{r} (@code{mh-reply})
-command.  If you supply a prefix argument (as in @kbd{C-u r}), the
-message you are replying to is inserted in your reply after having first
-been run through @code{mhl} with the format file @file{mhl.reply}.  See
-@code{mhl}(1) to see how you can modify the default @file{mhl.reply}
-file.
-
-When you reply to a message, you are first prompted with @samp{Reply to
-whom?}.  You have several choices here.
-
-@example
-@group
-@b{Response}     @b{Reply Goes To}
-
-@kbd{from}         @r{The person who sent the message.  This is the default,}
-             @r{so @key{RET} is sufficient.}
-
-@kbd{to}           @r{Replies to the sender, plus all recipients in the}
-             @r{@samp{To:} header field.}
-
-@kbd{all}
-@kbd{cc}           @r{Forms a reply to the sender, plus all recipients.}
-@end group
-@end example
-
-@cindex @code{repl}
-@cindex MH commands, @code{repl}
-
-Depending on your answer, @code{repl} is given a different argument to
-form your reply.  Specifically, a choice of @kbd{from} or none at all
-runs @code{repl -nocc all}, and a choice of @kbd{to} runs @code{repl -cc
-to}.  Finally, either @kbd{cc} or @kbd{all} runs @code{repl -cc all
--nocc me}.
-
-@cindex MH-Letter mode
-@cindex modes, MH-Letter
-
-Two windows are then created.  One window contains the message to which
-you are replying.  Your draft, in MH-Letter mode (described in
-@ref{Draft Editing}), is in the other window.
-
-If you wish to customize the header or other parts of the reply draft,
-please see @code{repl}(1) and @code{mh-format}(5).
-
-@node Forwarding, Redistributing, Replying, Sending Mail
-@subsection Forwarding Mail
-
-@cindex forwarding
-@cindex @code{forw}
-@cindex MH commands, @code{forw}
-@findex @code{mh-forward}
-
-To forward a message, use the @kbd{f} (@code{mh-forward}) command.  You
-are given a draft to edit that looks like it would if you had run the MH
-command @code{forw}.  You are given a chance to add some text (see
-@ref{Draft Editing}).
-
-You can forward several messages by using a prefix argument; in this
-case, you are prompted for the name of a @dfn{sequence}, a symbolic name
-that represents a list or range of message numbers (for example,
-@kbd{C-u f forbob @key{RET}}).  All of the messages in the sequence are
-inserted into your draft.  By the way, although sequences are often
-mentioned in this chapter, you don't have to worry about them for now;
-the full description of sequences in mh-e is at the end in
-@ref{Sequences}.  To learn more about sequences in general, please see
-@code{mh-sequence}(5).
-
-@node Redistributing, Old Drafts, Forwarding, Sending Mail
-@subsection Redistributing Your Mail
-
-@cindex redistributing
-@findex @code{mh-redistribute}
-
-The command @kbd{M-d} (@code{mh-redistribute}) is similar in function to
-forwarding mail, but it does not allow you to edit the message, nor does
-it add your name to the @samp{From:} header field.  It appears to the
-recipient as if the message had come from the original sender.  For more
-information on redistributing messages, see @code{dist}(1).  Also
-investigate the @kbd{M-a} (@code{mh-edit-again}) command in @ref{Old
-Drafts}, for another way to redistribute messages.
-
-@node Old Drafts,  , Redistributing, Sending Mail
-@subsection Editing Old Drafts and Bounced Messages
-
-@cindex re-editing drafts
-@cindex @file{draft}
-@cindex files, @file{draft}
-@findex @code{mh-edit-again}
-
-If you don't complete a draft for one reason or another, and if the
-draft buffer is no longer available, you can pick your draft up again
-with @kbd{M-a} (@code{mh-edit-again}).  If you don't use a draft folder,
-your last @file{draft} file will be used.  If you use draft folders,
-you'll need to visit the draft folder with @kbd{M-f drafts @key{RET}},
-use @kbd{n} to move to the appropriate message, and then use @kbd{M-a}
-to prepare the message for editing.
-
-The @kbd{M-a} command can also be used to take messages that were sent
-to you and to send them to more people.
-
-@cindex Mailer-Daemon
-@findex @code{mh-extract-rejected-mail}
-
-Don't use @kbd{M-a} to re-edit a message from a @i{Mailer-Daemon} who
-complained that your mail wasn't posted for some reason or another.  In
-this case, use @kbd{M-e} (@code{mh-extract-rejected-mail}) to prepare
-the message for editing by removing the @i{Mailer-Daemon} envelope and
-unneeded header fields.  Fix whatever addressing problem you had, and
-send the message again with @kbd{C-c C-c}.
-
-@node Draft Editing, Moving Mail, Sending Mail, Using mh-e
-@section Editing a Draft
-
-@cindex editing draft
-@cindex MH-Letter mode
-@cindex modes, MH-Letter
-
-When you edit a message that you want to send (called a @dfn{draft} in
-this case), the mode used is MH-Letter.  This mode provides
-several commands in addition to the normal Emacs editing commands to
-help you edit your draft.
-
-@table @kbd
-@item C-c C-y
-Insert contents of message to which you're replying (@code{mh-yank-cur-msg}).
-
-@item C-c C-i
-Insert a message from a folder (@code{mh-insert-letter}).
-
-@item C-c C-f C-t
-Move to @samp{To:} header field (@code{mh-to-field}).
-
-@item C-c C-f C-c
-Move to @samp{cc:} header field (@code{mh-to-field}).
-
-@item C-c C-f C-s
-Move to @samp{Subject:} header field (@code{mh-to-field}).
-
-@item C-c C-f C-f
-Move to @samp{From:} header field (@code{mh-to-field}).
-
-@item C-c C-f C-b
-Move to @samp{Bcc:} header field (@code{mh-to-field}).
-
-@item C-c C-f C-f
-Move to @samp{Fcc:} header field (@code{mh-to-fcc}).
-
-@item C-c C-f C-d
-Move to @samp{Dcc:} header field (@code{mh-to-field}).
-
-@item C-c C-w
-Display expanded recipient list (@code{mh-check-whom}).
-
-@item C-c C-s
-Insert signature in message (@code{mh-insert-signature}).
-
-@item C-c C-m C-f
-Include forwarded message (@sc{mime}) (@code{mh-mhn-compose-forw}).
-
-@item C-c C-m C-e
-Include anonymous ftp reference (@sc{mime}) (@code{mh-mhn-compose-anon-ftp}).
-
-@item C-c C-m C-t
-Include anonymous ftp reference to compressed tar file (@sc{mime})
-(@code{mh-mhn-compose-external-compressed-tar}).
-
-@item C-c C-m C-i
-Include binary, image, sound, etc. (@sc{mime})
-(@code{mh-mhn-compose-insertion}).
-
-@item C-c C-e
-Run through @code{mhn} before sending (@code{mh-edit-mhn}).
-
-@item C-c C-m C-u
-Undo effects of @code{mhn} (@code{mh-revert-mhn-edit}).
-
-@item C-c C-c
-Save draft and send message (@code{mh-send-letter}).
-
-@item C-c C-q
-Quit editing and delete draft message (@code{mh-fully-kill-draft}).
-@end table
-
-@menu
-* Editing Textual::             
-* Editing MIME::                
-* Sending Message::             
-* Killing Draft::               
-@end menu
-
-@node Editing Textual, Editing MIME, Draft Editing, Draft Editing
-@subsection Editing Textual Messages
-
-The following sections show you how to edit a draft.
-The commands described here are also applicable to messages that have
-multimedia components.
-
-@menu
-* Inserting Letter::            
-* Inserting Messages::          
-* Header::                      
-* Recipients::                  
-* Signature::                   
-@end menu
-
-@node Inserting Letter, Inserting Messages, Editing Textual, Editing Textual
-@subsubsection Inserting letter to which you're replying
-
-@cindex inserting messages
-@findex @code{mh-yank-cur-msg}
-
-It is often useful to insert a snippet of text from a letter that
-someone mailed to provide some context for your reply.  The command
-@kbd{C-c C-y} (@code{mh-yank-cur-msg}) does this by yanking a portion of
-text from the message to which you're replying and inserting @samp{> }
-before each line.
-
-@cindex mark
-@cindex Emacs, mark
-@cindex point
-@cindex Emacs, point
-@cindex region
-@cindex Emacs, region
-
-You can control how much text is included when you run this command.  If
-you run this command right away, without entering the buffer containing
-the message to you, this command will yank the entire message, as is,
-into your reply. @footnote{If you'd rather have the header cleaned up,
-use @kbd{C-u r} instead of @kbd{r} when replying (see @ref{Replying}).}
-If you enter the buffer containing the message sent to you and move the
-cursor to a certain point and return to your reply and run @kbd{C-c
-C-y}, then the text yanked will range from that point to the end of the
-message.  Finally, the most common action you'll perform is to enter the
-message sent to you, move the cursor to the beginning of a paragraph or
-phrase, set the @dfn{mark} with @kbd{C-SPC} or @kbd{C-@@}, and move the
-cursor to the end of the paragraph or phrase.  The cursor position is
-called the @dfn{point}, and the space between the mark and point is
-called the @dfn{region}.  Having done that, @kbd{C-c C-y} will insert
-the region you selected.
-
-@node Inserting Messages, Header, Inserting Letter, Editing Textual
-@subsubsection Inserting messages
-
-@cindex inserting messages
-@findex @code{mh-insert-letter}
-
-Messages can be inserted with @kbd{C-c C-i} (@code{mh-insert-letter}).
-This command prompts you for the folder and message number and inserts
-the message, indented by @samp{> }.  Certain undesirable header fields
-are removed before insertion.  If given a prefix argument (like @kbd{C-u
-C-c C-i}), the header is left intact, the message is not indented, and
-@samp{> } is not inserted before each line.
-
-@node Header, Recipients, Inserting Messages, Editing Textual
-@subsubsection Editing the header
-
-@cindex editing header
-@findex @code{mh-to-field}
-
-Because the header is part of the message, you can edit the header
-fields as you wish.  However, several convenience functions exist to
-help you create and edit them.  For example, the command @kbd{C-c C-f
-C-t} (@code{mh-to-field}; alternatively, @kbd{C-c C-f t}) moves the
-cursor to the @samp{To:} header field, creating it if necessary.  The
-functions to move to the @samp{cc:}, @samp{Subject:}, @samp{From:},
-@samp{Bcc:}, and @samp{Dcc:} header fields are similar.
-
-@findex @code{mh-to-fcc}
-
-One function behaves differently from the others, namely, @kbd{C-c C-f
-C-f} (@code{mh-to-fcc}; alternatively, @kbd{C-c C-f f}).  This function
-will prompt you for the folder name in which to file a copy of the draft.
-
-Be sure to leave a row of dashes or a blank line between the header and
-the body of the message.
-
-@node Recipients, Signature, Header, Editing Textual
-@subsubsection Checking recipients
-
-@cindex checking recipients
-@cindex @code{whom}
-@cindex MH commands, @code{whom}
-@findex @code{mh-check-whom}
-
-The @kbd{C-c C-w} (@code{mh-check-whom}) command expands aliases so you
-can check the actual address(es) in the alias.  A new buffer is created
-with the output of @code{whom}.
-
-@node Signature,  , Recipients, Editing Textual
-@subsubsection Inserting your signature
-
-@cindex inserting signature
-@cindex signature
-@cindex @file{.signature}
-@cindex files, @file{.signature}
-@findex @code{mh-insert-signature}
-
-You can insert your signature at the current cursor location with the
-@kbd{C-c C-s} (@code{mh-insert-signature}) command.  The text of your
-signature is taken from the file @file{~/.signature}.
-
-@node Editing MIME, Sending Message, Editing Textual, Draft Editing
-@subsection Editing Multimedia Messages
-
-@cindex MIME
-@cindex multimedia mail
-@cindex @code{mhn}
-@cindex MH commands, @code{mhn}
-
-mh-e has the capability to create multimedia messages.  It uses the
-@sc{mime} (Multipurpose Internet Mail Extensions) protocol.  The
-@sc{mime} protocol allows you to incorporate images, sound, video,
-binary files, and even commands that fetch a file with @samp{ftp} when
-your recipient reads the message!  If you were to create a multimedia
-message with plain MH commands, you would use @code{mhn}.  Indeed, the
-mh-e @sc{mime} commands merely insert @code{mhn} directives which are
-later expanded by @code{mhn}.
-
-Each of the mh-e commands for editing multimedia messages or for
-incorporating multimedia objects is prefixed with @kbd{C-c C-m} .
-
-@cindex content types
-@cindex MIME, content types
-
-Several @sc{mime} objects are defined.  They are called @dfn{content
-types}.  The table in @ref{Customizing Draft Editing} contains a list of
-the content types that mh-e currently knows about.  Several of the mh-e
-commands fill in the content type for you, whereas others require you to
-enter one.  Most of the time, it should be obvious which one to use
-(e.g., use @kbd{image/jpeg} to include a @sc{jpeg} image).  If not, you
-can refer to @sc{rfc} 1521, 
-@c Footnotes are very fragile.  Hence the duplication.
-@c The line break in the footnote was necessary since TeX wasn't creating one.
-@ifclear html
-@footnote{This @sc{rfc} (Request For Comments) is
-available via the @sc{url} @*
-@file{ftp://ds.internic.net/rfc/rfc1521.txt}.}
-@end ifclear
-@ifset html
-@footnote{This @sc{rfc} (Request For Comments) is
-available via the @sc{url} @*
-@file{<A HREF="ftp://ds.internic.net/rfc/rfc1521.txt">ftp://ds.internic.net/rfc/rfc1521.txt</A>}.}
-@end ifset
-which defines the @sc{mime} protocol, for a list of valid content types.
-
-@cindex content description
-@cindex MIME, content description
-
-You are also sometimes asked for a @dfn{content description}.  This is
-simply an optional brief phrase, in your own words, that describes the
-object.  If you don't care to enter a content description, just press
-return and none will be included; however, a reader may skip over
-multimedia fields unless the content description is compelling.
-
-Remember: you can always add @code{mhn} directives by hand.
-
-@menu
-* Forwarding MIME::             
-* FTP::                         
-* Tar::                         
-* Other MIME Objects::          
-* Sending MIME::                
-@end menu
-
-@node Forwarding MIME, FTP, Editing MIME, Editing MIME
-@subsubsection Forwarding multimedia messages
-
-@findex @code{mh-mhn-compose-forw}
-
-Mail may be forwarded with @sc{mime} using the command @kbd{C-c C-m C-f}
-(@code{mh-mhn-compose-forw}).  You are prompted for a content
-description, the name of the folder in which the messages to forward are
-located, and the messages' numbers.
-
-@node FTP, Tar, Forwarding MIME, Editing MIME
-@subsubsection Including an ftp reference
-
-@cindex @code{ftp}
-@cindex Unix commands, @code{ftp}
-@cindex MIME, @code{ftp}
-@findex @code{mh-mhn-compose-anon-ftp}
-
-You can even have your message initiate an @code{ftp} transfer when the
-recipient reads the message.  To do this, use the @kbd{C-c C-m C-e}
-(@code{mh-mhn-compose-anon-ftp}) command.  You are prompted for the
-remote host and pathname, the content type, and the content description.
-
-@node Tar, Other MIME Objects, FTP, Editing MIME
-@subsubsection Including tar files
-
-@cindex @code{tar}
-@cindex Unix commands, @code{tar}
-@cindex MIME, @code{tar}
-@cindex @code{ftp}
-@cindex Unix commands, @code{ftp}
-@cindex MIME, @code{ftp}
-@findex @code{mh-mhn-compose-external-compressed-tar}
-
-If the remote file (@pxref{FTP}) is a compressed tar file, you can use
-@kbd{C-c C-m C-t} (@code{mh-mhn-compose-external-compressed-tar}).
-Then, in addition to retrieving the file via anonymous @emph{ftp}, the
-file will also be uncompressed and untarred.  You are prompted for the
-remote host and pathname and the content description.  The pathname
-should contain at least one @samp{/} (slash), because the pathname is
-broken up into directory and name components.
-
-@node Other MIME Objects, Sending MIME, Tar, Editing MIME
-@subsubsection Including other multimedia objects
-
-@cindex images
-@cindex MIME, images
-@cindex sound
-@cindex MIME, sound
-@cindex video
-@cindex MIME, video
-@findex @code{mh-mhn-compose-insertion}
-
-Images, sound, and video can be inserted in your message with the
-@kbd{C-c C-m C-i} (@code{mh-mhn-compose-insertion}) command.  You are
-prompted for the filename containing the object, the content type, and a
-content description of the object.
-
-@node Sending MIME,  , Other MIME Objects, Editing MIME
-@subsubsection Readying multimedia messages for sending
-
-When you are finished editing a @sc{mime} message, it might look like this:
-
-@example
-@group
-@cartouche
-   3  24Aug  root               received fax files on Wed Aug 24 11:00:13
-   4+ 24Aug  To:wohler          Test<<This is a test message to get the wh
-
-
-
-
-
---%%-@{+inbox@} 4 msgs (1-4)      (MH-Folder Show)--Bot-------------------
-To: wohler
-cc:
-Subject: Test of MIME
---------
-#@@application/octet-stream [Nonexistent ftp test file] \
-access-type=anon-ftp; site=berzerk.com; name=panacea.tar.gz; \
-directory="/pub/"
-#audio/basic [Test sound bite] /tmp/noise.au
---**-@{draft@}      (MH-Letter)--All--------------------------------------
-
-@end cartouche
-@i{mh-e @sc{mime} draft}
-@end group
-@end example
-
-@cindex @code{mhn}
-@cindex MH commands, @code{mhn}
-@findex @code{mh-edit-mhn}
-
-The lines added by the previous commands are @code{mhn} directives and
-need to be converted to @sc{mime} directives before sending.  This is
-accomplished by the command @kbd{C-c C-e} (@code{mh-edit-mhn}), which
-runs @code{mhn} on the message.  The following screen shows what those
-commands look like in full @sc{mime} format.  You can see why mail user
-agents are usually built to hide these details from the user.
-
-@example
-@group
-@cartouche
-To: wohler
-cc:
-Subject: Test of MIME
-MIME-Version: 1.0
-Content-Type: multipart/mixed; boundary="----- =_aaaaaaaaaa0"
-Content-ID: <1623.777796162.0@@newt.com>
-
-------- =_aaaaaaaaaa0
-Content-Type: message/external-body; access-type="anon-ftp";
-        site="berzerk.com"; name="panacea.tar.gz"; directory="/pub/"
-
-Content-Type: application/octet-stream
-Content-ID: <1623.777796162.1@@newt.com>
-Content-Description: Nonexistent ftp test file
-
-------- =_aaaaaaaaaa0
-Content-Type: audio/basic
-Content-ID: <1623.777796162.2@@newt.com>
-Content-Description: Test sound bite
-Content-Transfer-Encoding: base64
-
-Q3JlYXRpdmUgVm9pY2UgRmlsZRoaAAoBKREBQh8AgwCAgH9/f35+fn59fX5+fn5+f39/f39/f3
-f4B/f39/f39/f39/f39/f39+f39+f39/f39/f4B/f39/fn5/f39/f3+Af39/f39/gH9/f39/fn
------@{draft@}      (MH-Letter)--Top--------------------------------------
-
-@end cartouche
-@i{mh-e @sc{mime} draft ready to send}
-@end group
-@end example
-
-@findex @code{mh-revert-mhn-edit}
-
-This action can be undone by running @kbd{C-c C-m C-u}
-(@code{mh-revert-mhn-edit}).  It does this by reverting to a backup
-file.  You are prompted to confirm this action, but you can avoid the
-confirmation by adding an argument (for example, @kbd{C-u C-c C-m C-u}).
-
-@node Sending Message, Killing Draft, Editing MIME, Draft Editing
-@subsection Sending a Message
-
-@cindex sending mail
-@findex @code{mh-send-letter}
-
-When you are all through editing a message, you send it with the
-@kbd{C-c C-c} (@code{mh-send-letter}) command.  You can give an argument
-(as in @kbd{C-u C-c C-c}) to monitor the first stage of the delivery.
-
-@node Killing Draft,  , Sending Message, Draft Editing
-@subsection Killing the Draft
-
-@cindex killing draft
-@findex @code{mh-fully-kill-draft}
-
-If for some reason you are not happy with the draft, you can kill it
-instead with @kbd{C-c C-q} (@code{mh-fully-kill-draft}).  Emacs then
-kills the draft buffer and deletes the draft message.
-
-@node Moving Mail, Searching, Draft Editing, Using mh-e
-@section Moving Your Mail Around
-
-@cindex processing mail
-
-This section covers how messages and folders can be moved about or
-manipulated.  Messages may be incorporated into your @file{+inbox},
-deleted, and refiled.  Messages containing @code{shar} or
-@code{uuencode} output can be stored.  Folders can be visited, sorted,
-packed, or deleted.  Here's a list of the available commands to do these
-things:
-
-@c Stephen thinks that ? should be documented here, since it also shows
-@c which folders a message will be refiled to.
-
-@table @kbd
-@item i
-Incorporate new mail into folder (@code{mh-inc-folder}).
-
-@item d
-Delete message (@code{mh-delete-msg}).
-
-@item C-d
-Delete message, don't move to next message (@code{mh-delete-msg-no-motion}).
-
-@item M-s
-Find messages that meet search criteria (@code{mh-search-folder}).
-
-@item o
-Output (refile) message to folder (@code{mh-refile-msg}).
-
-@item c
-Copy message to folder (@code{mh-copy-msg}).
-
-@item C-o
-Output (write) message to file (@code{mh-write-msg-to-file}).
-
-@item !
-Repeat last output command (@code{mh-refile-or-write-again}).
-
-@item l
-Print message with @code{lpr} (@code{mh-print-msg}).
-
-@item |
-Pipe message through shell command (@code{mh-pipe-msg}).
-
-@item M-n
-Unpack message created with @code{uudecode} or @code{shar}
-(@code{mh-store-msg}).
-
-@item M-l
-List all folders (@code{mh-list-folders}).
-
-@item M-f
-Visit folder (@code{mh-visit-folder}).
-
-@item M-r
-Regenerate scan lines (@code{mh-rescan-folder}).
-
-@item M-x mh-sort-folder
-Sort folder.
-
-@item M-p
-Pack folder (@code{mh-pack-folder}).
-
-@item M-k
-Remove folder (@code{mh-kill-folder}).
-
-@item x
-Execute pending refiles and deletes (@code{mh-execute-commands}).
-
-@item u
-Undo pending refile or delete (@code{mh-undo}).
-
-@item M-u
-Undo all pending refiles and deletes (@code{mh-undo-folder}).
-
-@item q
-Quit (@code{mh-quit}).
-@end table
-
-@menu
-* Incorporating::               
-* Deleting::                    
-* Organizing::                  
-* Printing::                    
-* Files and Pipes::             
-* Finishing Up::                
-@end menu
-
-@node Incorporating, Deleting, Moving Mail, Moving Mail
-@subsection Incorporating Your Mail
-
-@cindex incorporating
-@findex @code{mh-inc-folder}
-
-If at any time you receive new mail, incorporate the new mail into your
-@samp{+inbox} buffer with @kbd{i} (@code{mh-inc-folder}).  Note that
-@kbd{i} will display the @samp{+inbox} buffer, even if there isn't any
-new mail.  You can incorporate mail from any file into the current
-folder by specifying a prefix argument; you'll be prompted for the name
-of the file to use (for example, @kbd{C-u i ~/mbox @key{RET}}).
-
-@cindex Emacs, notification of new mail
-@cindex notification of new mail
-@cindex new mail
-@cindex @file{.emacs}
-@cindex files, @file{.emacs}
-
-Emacs can notify you when you have new mail by displaying @samp{Mail} in
-the mode line.  To enable this behavior, and to have a clock in the mode
-line besides, add the following to @file{~/.emacs}:
-
-@findex @code{display-time}
-
-@lisp
-(display-time)
-@end lisp
-
-@node Deleting, Organizing, Incorporating, Moving Mail
-@subsection Deleting Your Mail
-
-@cindex deleting
-@findex @code{mh-delete-msg}
-@findex @code{mh-delete-msg-no-motion}
-
-To mark a message for deletion, use the @kbd{d} (@code{mh-delete-msg})
-command.  A @samp{D} is placed by the message in the scan window, and
-the next message is displayed.  If the previous command had been
-@kbd{p}, then the next message displayed is the message previous to the
-message just deleted.  If you specify a prefix argument, you will be
-prompted for a sequence (@pxref{Sequences}) to delete (for example,
-@kbd{C-u d frombob RET}).  The @kbd{x} command actually carries out the
-deletion (@pxref{Finishing Up}).  @kbd{C-d}
-(@code{mh-delete-msg-no-motion}) marks the message for deletion but
-leaves the cursor at the current message in case you wish to perform
-other operations on the message.
-
-@node Organizing, Printing, Deleting, Moving Mail
-@subsection Organizing Your Mail with Folders
-
-@cindex using folders
-@cindex @code{folder}
-@cindex MH commands, @code{folder}
-@cindex @code{refile}
-@cindex MH commands, @code{refile}
-@findex @code{mh-refile-msg}
-
-mh-e has analogies for each of the MH @code{folder} and @code{refile}
-commands.  To refile a message in another folder, use the @kbd{o}
-(@code{mh-refile-msg}) (mnemonic: ``output'') command.  You are prompted
-for the folder name.
-
-@findex @code{mh-refile-or-write-again}
-
-If you are refiling several messages into the same folder, you can use
-the @kbd{!} (@code{mh-refile-or-write-again}) command to repeat the last
-refile or write (see the description of @kbd{C-o} in @ref{Files and
-Pipes}).  Or, place the messages into a sequence (@ref{Sequences}) and
-specify a prefix argument to @kbd{o}, in which case you'll be prompted
-for the name of the sequence (for example, @kbd{C-u o search RET}).
-
-@findex @code{mh-copy-msg}
-
-If you wish to copy a message to another folder, you can use the @kbd{c}
-(@code{mh-copy-msg}) command (see the @code{-link} argument to
-@code{refile}(1)).  You are prompted for a folder, and you can specify a
-prefix argument if you want to copy a sequence into another folder.  In
-this case, you are then prompted for the sequence.  Note that unlike the
-@kbd{o} command, the copy takes place immediately.  The original copy
-remains in the current folder.
-
-@findex @code{mh-visit-folder}
-
-When you want to read the messages that you have refiled into folders,
-use the @kbd{M-f} (@code{mh-visit-folder}) command to visit the folder.
-You are prompted for the folder name.
-
-@findex @code{mh-list-folders}
-@findex @code{mh-visit-folder}
-@findex @code{mh-sort-folder}
-@findex @code{mh-pack-folder}
-@findex @code{mh-rescan-folder}
-
-Other commands you can perform on folders include: @kbd{M-l}
-(@code{mh-list-folders}), to list all the folders in your mail
-directory; @kbd{M-k} (@code{mh-kill-folder}), to remove a folder;
-@kbd{M-x mh-sort-folder}, to sort the messages by date (see
-@code{sortm}(1) to see how to sort by other criteria); @kbd{M-p}
-(@code{mh-pack-folder}), to pack a folder, removing gaps from the
-numbering sequence; and @kbd{M-r} (@code{mh-rescan-folder}), to rescan
-the folder, which is useful to grab all messages in your @file{+inbox}
-after processing your new mail for the first time.  If you don't want to
-rescan the entire folder, give @kbd{M-r} or @kbd{M-p} a prefix argument
-and you'll be prompted for a range of messages to display (for instance,
-@kbd{C-u M-r last:50 RET}).
-
-@node Printing, Files and Pipes, Organizing, Moving Mail
-@subsection Printing Your Mail
-
-@cindex printing
-@cindex @code{mhl}
-@cindex MH commands, @code{mhl}
-@cindex @code{lpr}
-@cindex Unix commands, @code{lpr}
-@findex @code{mh-print-msg}
-
-Printing mail is simple.  Enter @kbd{l} (@code{mh-print-msg}) (for
-@i{l}ine printer or @i{l}pr).  The message is formatted with @code{mhl}
-and printed with the @code{lpr} command.  You can print all the messages
-in a sequence by specifying a prefix argument, in which case you are
-prompted for the name of the sequence (as in @kbd{C-u l frombob RET}).
-
-@node Files and Pipes, Finishing Up, Printing, Moving Mail
-@subsection Files and Pipes
-
-@cindex using files
-@cindex using pipes
-@findex @code{mh-write-msg-to-file}
-
-mh-e does offer a couple of commands that are not a part of MH@.  The
-first one, @kbd{C-o} (@code{mh-write-msg-to-file}), writes a message to
-a file (think of the @kbd{o} as in "output").  You are prompted for the
-filename.  If the file already exists, the message is appended to it.
-You can also write the message to the file without the header by
-specifying a prefix argument (such as @kbd{C-u C-o /tmp/foobar RET}).
-Subsequent writes to the same file can be made with the @kbd{!}
-command.
-
-@findex @code{mh-pipe-msg}
-
-You can also pipe the message through a Unix shell command with the
-@kbd{|} (@code{mh-pipe-msg}) command.  You are prompted for the
-Unix command through which you wish to run your message.  If you
-give an argument to this command, the message header is included in the
-text passed to the command (the contrived example @kbd{C-u | lpr}
-would be done with the @kbd{l} command instead).
-
-@cindex @code{shar}
-@cindex Unix commands, @code{shar}
-@cindex @code{uuencode}
-@cindex Unix commands, @code{uuencode}
-@findex @code{mh-store-msg}
-
-If the message is a shell archive @code{shar} or has been run through
-@code{uuencode} use @kbd{M-n} (@code{mh-store-msg}) to extract the body
-of the message.  The default directory for extraction is the current
-directory, and you have a chance to specify a different extraction
-directory.  The next time you use this command, the default directory is
-the last directory you used.
-
-@node Finishing Up,  , Files and Pipes, Moving Mail
-@subsection Finishing Up
-
-@cindex expunging refiles and deletes
-@findex @code{mh-undo}
-@findex @code{mh-undo-folder}
-
-If you've deleted a message or refiled it, but changed your mind, you
-can cancel the action before you've executed it.  Use @kbd{u}
-(@code{mh-undo}) to undo a refile on or deletion of a single message.
-You can also undo refiles and deletes for messages that belong to a
-given sequence by specifying a prefix argument.  You'll be prompted for
-the name of the sequence (as in @kbd{C-u u frombob RET}).
-Alternatively, you can use @kbd{M-u} (@code{mh-undo-folder}) to undo all
-refiles or deletes in the current folder.
-
-@findex @code{mh-execute-commands}
-
-If you've marked messages to be deleted or refiled and you want to go
-ahead and delete or refile the messages, use @kbd{x}
-(@code{mh-execute-commands}).  Many mh-e commands that may affect the
-numbering of the messages (such as @kbd{M-r} or @kbd{M-p}) will ask if you
-want to process refiles or deletes first and then either run @kbd{x} for
-you or undo the pending refiles and deletes, which are lost.
-
-@findex @code{mh-rmail}
-@findex @code{mh-quit}
-
-When you want to quit using mh-e and go back to editing, you can use the
-@kbd{q} (@code{mh-quit}) command.  This buries the buffers of the
-current mh-e folder and restores the buffers that were present when you
-first ran @kbd{M-x mh-rmail}.  You can later restore your mh-e session
-by selecting the @samp{+inbox} buffer or by running @kbd{M-x mh-rmail}
-again.
-
-@node Searching, Sequences, Moving Mail, Using mh-e
-@section Searching Through Messages
-
-@cindex searching
-@findex @code{mh-search-folder}
-
-You can search a folder for messages to or from a particular person or
-about a particular subject.  In fact, you can also search for messages
-containing selected strings in any arbitrary header field or any string
-found within the messages.  Use the @kbd{M-s} (@code{mh-search-folder})
-command.  You are first prompted for the name of the folder to search
-and then placed in the following buffer in MH-Pick mode:
-
-@example
-@group
-@cartouche
-From: #
-To:
-Cc:
-Date:
-Subject:
---------
-
-
-
-
-
-
-
-
-
---**-Emacs: pick-pattern    (MH-Pick)------All----------------------------
-
-@end cartouche
-@i{Pick window}
-@end group
-@end example
-
-@cindex @code{pick}
-@cindex MH commands, @code{pick}
-
-Edit this template by entering your search criteria in an appropriate
-header field that is already there, or create a new field yourself.  If
-the string you're looking for could be anywhere in a message, then place
-the string underneath the row of dashes.  The @kbd{M-s} command uses the
-MH command @code{pick} to do the real work, so read @code{pick}(1) to
-find out more about how to enter the criteria.
-
-There are no semantics associated with the search criteria---they are
-simply treated as strings.  Case is ignored when all lowercase is used,
-and regular expressions (a la @code{ed}) are available.  It is all right
-to specify several search criteria.  What happens then is that a logical
-@emph{and} of the various fields is performed.  If you prefer a logical
-@emph{or} operation, run @kbd{M-s} multiple times.
-
-As an example, let's say that we want to find messages from Ginnean
-about horseback riding in the Kosciusko National Park (Australia) during
-January, 1994.  Normally we would start with a broad search and narrow
-it down if necessary to produce a manageable amount of data, but we'll
-cut to the chase and create a fairly restrictive set of criteria as
-follows:
-
-@example
-@group
-From: ginnean
-To:
-Cc:
-Date: Jan 1994
-Subject: horse.*kosciusko
---------
-@end group
-@end example
-
-@findex @code{mh-to-field}
-
-As with MH-Letter mode, MH-Pick provides commands like
-@kbd{C-c C-f C-t} to help you fill in the blanks.
-
-@table @kbd
-@item C-c C-f C-t
-Move to @samp{To:} header field (@code{mh-to-field}).
-
-@item C-c C-f C-c
-Move to @samp{cc:} header field (@code{mh-to-field}).
-
-@item C-c C-f C-s
-Move to @samp{Subject:} header field (@code{mh-to-field}).
-
-@item C-c C-f C-f
-Move to @samp{From:} header field (@code{mh-to-field}).
-
-@item C-c C-f C-b
-Move to @samp{Bcc:} header field (@code{mh-to-field}).
-
-@item C-c C-f C-f
-Move to @samp{Fcc:} header field (@code{mh-to-field}).
-
-@item C-c C-f C-d
-Move to @samp{Dcc:} header field (@code{mh-to-field}).
-
-@item C-c C-c
-Execute the search (@code{mh-do-pick-search}).
-@end table
-
-@findex @code{mh-do-pick-search}
-
-To perform the search, type @kbd{C-c C-c} (@code{mh-do-pick-search}).
-The selected messages are placed in the @i{search} sequence, which you
-can use later in forwarding (@pxref{Forwarding}), printing
-(@pxref{Printing}), or narrowing your field of view (@pxref{Sequences}).
-Subsequent searches are appended to the @i{search} sequence.  If,
-however, you wish to start with a clean slate, first delete the
-@i{search} sequence (how to do this is discussed in @ref{Sequences}).
-
-@cindex MH-Folder mode
-@cindex modes, MH-Folder
-
-If you're searching in a folder that is already displayed in a
-MH-Folder buffer, only those messages contained in the buffer are
-used for the search.  Therefore, if you want to search in all messages,
-first kill the folder's buffer with @kbd{C-x k} or scan the entire
-folder with @kbd{M-r}.
-
-@node Sequences, Miscellaneous, Searching, Using mh-e
-@section Using Sequences
-
-@cindex sequences
-
-For the whole scoop on MH sequences, refer to @code{mh-sequence}(5).  As
-you've read, several of the mh-e commands can operate on a sequence,
-which is a shorthand for a range or group of messages.  For example, you
-might want to forward several messages to a friend or colleague.  Here's
-how to manipulate sequences.
-
-@table @kbd
-@item %
-Put message in a sequence (@code{mh-put-msg-in-seq}).
-
-@item ?
-Display sequences that message belongs to (@code{mh-msg-is-in-seq}).
-
-@item M-q
-List all sequences in folder (@code{mh-list-sequences}).
-
-@item M-%
-Remove message from sequence (@code{mh-delete-msg-from-seq}).
-
-@item M-#
-Delete sequence (@code{mh-delete-seq}).
-
-@item C-x n
-Restrict display to messages in sequence (@code{mh-narrow-to-seq}).
-
-@item C-x w
-Remove restriction; display all messages (@code{mh-widen}).
-
-@item M-x mh-update-sequences
-Push mh-e's state out to MH@.
-@end table
-
-@cindex @code{pick}
-@cindex MH commands, @code{pick}
-@findex @code{mh-put-msg-in-seq}
-
-To place a message in a sequence, use @kbd{%} (@code{mh-put-msg-in-seq})
-to do it manually, or use the MH command @code{pick} or the mh-e version
-of @code{pick} (@ref{Searching}) which create a sequence automatically.
-Give @kbd{%} a prefix argument and you can add all the messages in one
-sequence to another sequence (for example, @kbd{C-u % SourceSequence
-RET}).
-
-@cindex MH-Folder mode
-@cindex modes, MH-Folder
-@findex @code{mh-narrow-to-seq}
-@findex @code{mh-widen}
-
-Once you've placed some messages in a sequence, you may wish to narrow
-the field of view to just those messages in the sequence you've created.
-To do this, use @kbd{C-x n} (@code{mh-narrow-to-seq}).  You are prompted
-for the name of the sequence.  What this does is show only those
-messages that are in the selected sequence in the MH-Folder buffer.  In
-addition, it limits further mh-e searches to just those messages.  When
-you want to widen the view to all your messages again, use @kbd{C-x w}
-(@code{mh-widen}).
-
-@findex @code{mh-msg-is-in-seq}
-@findex @code{mh-list-sequences}
-
-You can see which sequences a message is in with the @kbd{?}
-(@code{mh-msg-is-in-seq}) command.
-@c Doesn't work:
-@c use a prefix argument to query a
-@c message other than the current one (as in @kbd{C-u ? 42 RET}).
-Or, you can list all sequences in a selected folder (default is current
-folder) with @kbd{M-q} (@code{mh-list-sequences}).
-
-@findex @code{mh-delete-msg-from-seq}
-@findex @code{mh-delete-seq}
-
-If you want to remove a message from a sequence, use @kbd{M-%}
-(@code{mh-delete-msg-from-seq}), and if you want to delete an entire
-sequence, use @kbd{M-#} (@code{mh-delete-seq}).  In the latter case you
-are prompted for the sequence to delete.  Note that this deletes only
-the sequence, not the messages in the sequence.  If you want to delete
-the messages, use @kbd{C-u d} (see @ref{Deleting} above).
-
-@cindex @code{mark}
-@cindex MH commands, @code{mark}
-
-@findex @code{mh-update-sequences}
-
-Two sequences are maintained internally by mh-e and pushed out to MH
-when you type either the @kbd{x} or @kbd{q} command.  They are the
-sequence specified by your @samp{Unseen-Sequence:} profile entry and
-@i{cur}.  However, you can also just update MH's state with the command
-@kbd{M-x mh-update-sequences}.  See @ref{Customizing Viewing} for an
-example of how this command might be used.
-
-With the exceptions of @kbd{C-x n} and @kbd{C-x w}, the underlying MH
-command dealing with sequences is @code{mark}.
-
-@node Miscellaneous,  , Sequences, Using mh-e
-@section Miscellaneous Commands
-
-@findex @code{mh-version}
-
-One other command worth noting is @kbd{M-x mh-version}.  Since there
-were a few changes in command letters between @w{Versions 3} and 4, use
-this command to see which version you are running.  This command didn't
-exist before @w{Version 4}, so the message @samp{[No match]}
-indicates that it's time to upgrade (@pxref{Getting mh-e}).  In the
-meantime, use the older commands that are listed in @ref{Changes to
-mh-e}.  The output of @kbd{M-x mh-version} should also be included with
-any bug report you send (@pxref{Bug Reports}).
-
-@node    Customizing mh-e, Odds and Ends, Using mh-e, Top
-@chapter Customizing mh-e
-
-Until now, we've talked about the mh-e commands as they work ``out of the
-box.''  Of course, it is also possible to reconfigure mh-e
-@c to fit the needs of even the most demanding user. ???
-beyond recognition.  The following sections describe all of the
-customization variables, show the defaults, and make recommendations for
-customization.  The outline of this chapter is identical to that of
-@ref{Using mh-e}, to make it easier to find the variables you'd need to
-modify to affect a particular command.
-
-However, when customizing your mail environment, first try to change
-what you want in MH, and only change mh-e if changing MH is not
-possible.  That way you will get the same behavior inside and outside
-GNU Emacs.  Note that mh-e does not provide hooks for customizations
-that can be done in MH; this omission is intentional.
-
-@cindex @file{.emacs}
-@cindex files, @file{.emacs}
-
-Many string or integer variables are easy enough to modify using Emacs
-Lisp.  Any such modifications should be placed in a file called
-@file{.emacs} in your home directory (that is, @file{~/.emacs}).  For
-example, to modify the variable that controls printing, you could add:
-
-@vindex @code{mh-lpr-command-format}, example
-
-@lisp
-(setq mh-lpr-command-format "nenscript -G -r -2 -i'%s'")
-@end lisp
-
-@ref{Customizing Printing} talks more about this variable.
-
-@cindex setting variables
-@cindex Emacs, setting variables
-
-Variables can also hold Boolean values.  In Emacs Lisp, the Boolean
-values are @code{nil}, which means false, and @code{t}, which means true.
-Usually, variables are turned off by setting their value to @code{nil}, as
-in
-
-@vindex @code{mh-bury-show-buffer}, example
-
-@lisp
-(setq mh-bury-show-buffer nil)
-@end lisp
-
-which keeps the MH-Show buffer at the top of the buffer stack.
-To turn a variable on, you use
-
-@lisp
-(setq mh-bury-show-buffer t)
-@end lisp
-
-which places the MH-Show buffer at the bottom of the buffer
-stack.  However, the text says to turn on a variable by setting it to a
-@emph{non-@code{nil}} value, because sometimes values other than @code{t} are
-meaningful (for example, see @code{mhl-formfile}, described in
-@ref{Customizing Viewing}).  Other variables, such as hooks, involve a
-little more Emacs Lisp programming expertise.
-
-You can also ``preview'' the effects of changing variables before
-committing the changes to @file{~/.emacs}.  Variables can be changed in
-the current Emacs session by using @kbd{M-x set-variable}.
-
-@c XXX Stephen says: would be easier to just call them functions, which
-@c you mostly do.
-In general, @dfn{commands} in this text refer to Emacs Lisp functions.
-Programs outside of Emacs are specifically called MH commands, shell
-commands, or Unix commands.
-
-@cindex Emacs, Emacs Lisp manual
-@cindex Emacs, online help
-@cindex online help
-@cindex Emacs, info
-@cindex info
-
-I hope I've included enough examples here to get you well on your way.
-If you want to explore Emacs Lisp further, a programming manual does
-exist,
-@c Yes, some of the stuff in the following sections is redundant, but
-@c TeX barfs if the @ifs are inside the @footnote.
-@iftex
-@footnote{The @cite{GNU Emacs Lisp Reference Manual} may be available
-online in the Info system by typing @kbd{C-h i m Emacs Lisp RET}.  If
-not, you can order a printed manual, which has the desirable side-effect
-of helping to support the Free Software Foundation which made all this
-great software available.  You can find an order form by running
-@kbd{C-h C-d}, or you can request an order form from
-@i{gnu@@prep.ai.mit.edu}.}
-@end iftex
-@ifinfo
-@footnote{Perhaps you can find the online version of @ref{Top, The GNU
-Emacs Lisp Reference Manual, , elisp, GNU Emacs Lisp Reference Manual}.
-If not, you can order a printed manual, which has the desirable
-side-effect of helping to support the Free Software Foundation which
-made all this great software available.  You can find an order form by
-running @kbd{C-h C-d}, or you can request an order form from
-@i{gnu@@prep.ai.mit.edu}.}
-@end ifinfo
-and you can look at the code itself for examples.  Look in the Emacs
-Lisp directory on your system (such as @file{/usr/local/lib/emacs/lisp})
-and find all the @file{mh-*.el} files there.  When calling mh-e and
-other Emacs Lisp functions directly from Emacs Lisp code, you'll need to
-know the correct arguments.  Use the online help for this.  For example,
-try @kbd{C-h f mh-execute-commands RET}.  If you write your own
-functions, please do not prefix your symbols (variables and functions)
-with @code{mh-}.  This prefix is reserved for the mh-e package.  To
-avoid conflicts with existing mh-e symbols, use a prefix like @code{my-}
-or your initials.
-
-@menu
-* Customizing Reading::         
-* Customizing Sending::         
-* Customizing Draft Editing::   
-* Customizing Moving Mail::     
-* Customizing Searching::       
-@end menu
-
-@node Customizing Reading, Customizing Sending, Customizing mh-e, Customizing mh-e
-@section Reading Your Mail
-
-@cindex reading mail
-@cindex @file{.emacs}
-@cindex files, @file{.emacs}
-
-I'll start out by including a function that I use as a front end to
-mh-e.  @footnote{Stephen Gildea's favorite binding is
-@kbd{(global-set-key "\C-cr" 'mh-rmail)}.} It toggles between your
-working window configuration, which may be quite involved---windows
-filled with source, compilation output, man pages, and other
-documentation---and your mh-e window configuration.  Like the rest of
-the customization described in this chapter, simply add the following
-code to @file{~/.emacs}.  Don't be intimidated by the size of this
-example; most customizations are only one line.
-
-@iftex
-@filbreak
-@end iftex
-
-@findex @code{mh-rmail}, example
-
-@lisp
-@group
-@i{Starting mh-e}
-
-(defvar my-mh-screen-saved nil
-  "Set to non-@code{nil} when mh-e window configuration shown.")
-(defvar my-normal-screen nil "Normal window configuration.")
-(defvar my-mh-screen nil "mh-e window configuration.")
-
-(defun my-mh-rmail (&optional arg)
-  "Toggle between mh-e and normal screen configurations.
-With non-@code{nil} or prefix argument, @i{inc} mailbox as well
-when going into mail."
-  (interactive "P")                 ; @r{user callable function, P=prefix arg}
-  (setq my-mh-screen-saved          ; @r{save state}
-        (cond
-         ;; @r{Bring up mh-e screen if arg or normal window configuration.}
-         ;; @r{If arg or +inbox buffer doesn't exist, run mh-rmail.}
-         ((or arg (null my-mh-screen-saved))
-          (setq my-normal-screen (current-window-configuration))
-          (if (or arg (null (get-buffer "+inbox")))
-              (mh-rmail)
-            (set-window-configuration my-mh-screen))
-          t)                        ; @r{set my-mh-screen-saved to @code{t}}
-         ;; @r{Otherwise, save mh-e screen and restore normal screen.}
-         (t
-          (setq my-mh-screen (current-window-configuration))
-          (set-window-configuration my-normal-screen)
-          nil))))                   ; @r{set my-mh-screen-saved to nil}
-
-(global-set-key "\C-x\r" 'my-mh-rmail)  ;@r{ call with C-x RET}
-@end group
-@end lisp
-
-If you type an argument (@kbd{C-u}) or if @code{my-mh-screen-saved}
-is @code{nil} (meaning a non-mh-e window configuration), the current window
-configuration is saved, either +inbox is displayed or @code{mh-rmail} is
-run, and the mh-e window configuration is shown.  Otherwise, the mh-e
-window configuration is saved and the original configuration is
-displayed.
-
-Now to configure mh-e.  The following table lists general mh-e variables
-and variables that are used while reading mail.
-@c XXX Seth wishes the descriptions to be more parallel.  That is,
-@c some are actions, and some are objects. Hmmm.
-
-@table @code
-@item mh-progs
-Directory containing MH programs (default: dynamic).
-
-@item mh-lib
-Directory containing MH support files and programs (default: dynamic).
-
-@item mh-do-not-confirm
-Don't confirm on non-reversible commands (default: @code{nil}).
-
-@item mh-summary-height
-Number of scan lines to show (includes mode line) (default: 4).
-
-@item mh-folder-mode-hook
-Functions to run in MH-Folder mode (default: @code{nil}).
-
-@item mh-clean-message-header
-Remove extraneous headers (default: @code{nil}).
-
-@item mh-invisible-headers
-Headers to hide (default: @samp{"^Received: \\| ^Message-Id: \\|
-^Remailed-\\| ^Via: \\| ^Mail-from: \\| ^Return-Path: \\| ^In-Reply-To:
-\\| ^Resent-"}).
-
-@item mh-visible-headers
-Headers to display (default: @code{nil}).
-
-@item mhl-formfile
-Format file for @code{mhl} (default: @code{nil}).
-
-@item mh-show-hook
-Functions to run when showing message (default: @code{nil}).
-
-@item mh-show-mode-hook
-Functions to run when showing message (default: @code{nil}).
-
-@item mh-bury-show-buffer
-Leave show buffer at bottom of stack (default: @code{t}).
-
-@item mh-show-buffer-mode-line-buffer-id
-Name of show buffer in mode line (default: @samp{"@{show-%s@} %d"}).
-@end table
-
-@vindex @code{mh-progs}
-@vindex @code{mh-lib}
-
-The two variables @code{mh-progs} and @code{mh-lib} are used to tell
-mh-e where the MH programs and supporting files are kept, respectively.
-mh-e does try to figure out where they are kept for itself by looking in
-common places and in the user's @samp{PATH} environment variable, but if
-it cannot find the directories, or finds the wrong ones, you should set
-these variables.  The name of the directory should be placed in double
-quotes, and there should be a
-trailing slash (@samp{/}).  See the example in @ref{Getting Started}.
-
-@vindex @code{mh-do-not-confirm}
-
-If you never make mistakes, and you do not like confirmations for your
-actions, you can set @code{mh-do-not-confirm} to a non-@code{nil} value to
-disable confirmation for unrecoverable commands such as @kbd{M-k}
-(@code{mh-kill-folder}) and @kbd{M-u} (@code{mh-undo-folder}).  Here's
-how you set boolean values:
-
-@lisp
-(setq mh-do-not-confirm t)
-@end lisp
-
-@vindex @code{mh-summary-height}
-@cindex MH-Folder mode
-@cindex modes, MH-Folder
-
-@c Prevent page break between paragraph and example.
-@need 2000
-The variable @code{mh-summary-height} controls the number of scan lines
-displayed in the MH-Folder window, including the mode line.  The
-default value of 4 means that 3 scan lines are displayed.  Here's how
-you set numerical values:
-
-@lisp
-(setq mh-summary-height 2)              ; @r{only show the current scan line}
-@end lisp
-
-@vindex @code{mh-bury-show-buffer}
-@cindex MH-Folder mode
-@cindex modes, MH-Folder
-
-Normally the buffer for displaying messages is buried at the bottom at
-the buffer stack.  You may wish to disable this feature by setting
-@code{mh-bury-show-buffer} to @code{nil}.  One advantage of not burying the
-show buffer is that one can delete the show buffer more easily in an
-electric buffer list because of its proximity to its associated
-MH-Folder buffer.  Try running @kbd{M-x electric-buffer-list} to
-see what I mean.
-
-@vindex @code{mh-folder-mode-hook}
-@cindex MH-Folder mode
-@cindex modes, MH-Folder
-
-The hook @code{mh-folder-mode-hook} is called when a new folder is
-created with MH-Folder mode.  This could be used to set your own
-key bindings, for example:
-
-@vindex @code{mh-folder-mode-hook}, example
-
-@lisp
-@group
-@i{Create additional key bindings via mh-folder-mode-hook}
-
-(defvar my-mh-init-done nil "Non-@code{nil} when one-time mh-e settings made.")
-
-(defun my-mh-folder-mode-hook ()
-  "Hook to set key bindings in MH-Folder mode."
-  (if (not my-mh-init-done)             ; @r{only need to bind the keys once }
-      (progn
-        (local-set-key "/" 'search-msg)
-        (local-set-key "b" 'mh-burst-digest)    ; @r{better use of @kbd{b}}
-        (setq my-mh-init-done t))))
-
-;;; @r{Emacs 19}
-(add-hook 'mh-folder-mode-hook 'my-mh-folder-mode-hook)
-;;; @r{Emacs 18}
-;;;   @r{(setq mh-folder-mode-hook (cons 'my-mh-folder-mode-hook}
-;;;                               @r{mh-folder-mode-hook))}
-
-(defun search-msg ()
-  "Search for a regexp in the current message."
-  (interactive)                         ; @r{user function}
-  (save-window-excursion
-    (other-window 1)                    ; @r{go to next window}
-    (isearch-forward-regexp)))          ; @r{string search; hit return (ESC}
-                                        ;   @r{in Emacs 18) when done}
-@end group
-@end lisp
-
-@menu
-* Customizing Viewing::         
-* Customizing Moving Around::   
-@end menu
-
-@node Customizing Viewing, Customizing Moving Around, Customizing Reading, Customizing Reading
-@subsection Viewing Your Mail
-
-@vindex @code{mh-clean-message-header}
-@vindex @code{mh-invisible-headers}
-@vindex @code{mh-visible-headers}
-
-Several variables control what displayed messages look like.  Normally
-messages are delivered with a handful of uninteresting header fields.
-You can make them go away by setting @code{mh-clean-message-header} to a
-non-@code{nil} value.  The header can then be cleaned up in two ways.  By
-default, the header fields in @code{mh-invisible-headers} are removed.
-On the other hand, you could set @code{mh-visible-headers} to the fields
-that you would like to see.  If this variable is set,
-@code{mh-invisible-headers} is ignored.  I suggest that you not set
-@code{mh-visible-headers} since if you use this variable, you might miss
-a lot of header fields that you'd rather not miss.  As an example of how
-to set a string variable, @code{mh-visible-headers} can be set to show a
-minimum set of header fields (see (@ref{Regexps, , Syntax of Regular
-Expressions, emacs, The GNU Emacs Manual}, for a description of the
-special characters in this string):
-
-@lisp
-(setq mh-visible-headers "^From: \\|^Subject: \\|^Date: ")
-@end lisp
-
-@cindex @code{mhl}
-@cindex MH commands, @code{mhl}
-@vindex @code{mhl-formfile}
-
-Normally mh-e takes care of displaying messages itself (rather than
-calling an MH program to do the work).  If you'd rather have @code{mhl}
-display the message (within mh-e), set the variable @code{mhl-formfile}
-to a non-@code{nil} value.  You can set this variable either to @code{t}
-to use the default format file or to a filename if you have your own
-format file (@code{mhl}(1) tells you how to write one).  When writing
-your own format file, use a nonzero value for @code{overflowoffset} to
-ensure the header is RFC 822 compliant and parseable by mh-e.
-@code{mhl} is always used for printing and forwarding; in this case, the
-value of @code{mhl-formfile} is consulted if it is a filename.
-
-@vindex @code{mh-show-mode-hook}
-
-Two hooks can be used to control how messages are displayed.  The first
-hook, @code{mh-show-mode-hook}, is called early on in the process of
-displaying of messages.  It is used to perform some actions on the
-contents of messages, such as highlighting the header fields.  If you're
-running Emacs 19 under the X Window System, the following example will
-highlight the @samp{From:} and @samp{Subject:} header fields.  This is a
-very nice feature indeed.
-
-@vindex @code{mh-show-mode-hook}, example
-
-@lisp
-@group
-@i{Emphasize header fields in different fonts via mh-show-mode-hook}
-
-(defvar my-mh-keywords
-   '(("^From: \\(.*\\)" 1 'bold t)
-     ("^Subject: \\(.*\\)" 1 'highlight t))
-  "mh-e additions for font-lock-keywords.")
-
-(defun my-mh-show-mode-hook ()
-  "Hook to turn on and customize fonts."
-  (require 'font-lock)                 ; @r{for font-lock-keywords below}
-  (make-local-variable 'font-lock-mode-hook) ; @r{don't affect other buffers}
-  (add-hook 'font-lock-mode-hook       ; @r{set a hook with inline function}
-            (function                  ; @r{modifies font-lock-keywords when}
-             (lambda ()                ; @r{font-lock-mode run}
-               (setq font-lock-keywords
-                     (append my-mh-keywords font-lock-keywords)))))
-  (font-lock-mode 1))                  ; @r{change the typefaces}
-
-(if window-system                      ; @r{can't do this on @sc{ASCII} terminal}
-    (add-hook 'mh-show-mode-hook 'my-mh-show-mode-hook))
-@end group
-@end lisp
-
-@vindex @code{mh-show-hook}
-
-The second hook, @code{mh-show-hook}, is the last thing called after
-messages are displayed.  It's used to affect the behavior of mh-e in
-general or when @code{mh-show-mode-hook} is too early.  For example, if
-you wanted to keep mh-e in sync with MH, you could use
-@code{mh-show-hook} as follows:
-
-@vindex @code{mh-show-hook}, example
-
-@lisp
-(add-hook 'mh-show-hook 'mh-update-sequences)
-@end lisp
-
-@vindex @code{mh-show-buffer-mode-line-buffer-id}
-@cindex MH-Show mode
-@cindex modes, MH-Show
-
-The function @code{mh-update-sequences} is documented in @ref{Finishing
-Up}.  For those who like to modify their mode lines, use
-@code{mh-show-buffer-mode-line-buffer-id} to modify the mode line in the
-MH-Show buffers.  Place the two escape strings @samp{%s} and @samp{%d},
-which will display the folder name and the message number, respectively,
-somewhere in the string in that order.  The default value of
-@samp{"@{show-%s@} %d"} yields a mode line of
-
-@example
------@{show-+inbox@} 4      (MH-Show)--Bot----------------------------------
-@end example
-
-@node Customizing Moving Around,  , Customizing Viewing, Customizing Reading
-@subsection Moving Around
-
-@cindex moving between messages
-@cindex MH-Show mode
-@cindex modes, MH-Show
-@cindex MH-Folder mode
-@cindex modes, MH-Folder
-@vindex @code{mh-recenter-summary-p}
-
-When you use @kbd{t} (@code{mh-toggle-showing}) to toggle between show
-mode and scan mode, the MH-Show buffer is hidden and the
-MH-Folder buffer is left alone.  Setting
-@code{mh-recenter-summary-p} to a non-@code{nil} value causes the toggle to
-display as many scan lines as possible, with the cursor at the middle.
-The effect of @code{mh-recenter-summary-p} is rather useful, but it can
-be annoying on a slow network connection.
-
-@node Customizing Sending, Customizing Draft Editing, Customizing Reading, Customizing mh-e
-@section Sending Mail
-
-@cindex sending mail
-
-You may wish to start off by adding the following useful key bindings to
-your @file{.emacs} file:
-
-@lisp
-(global-set-key "\C-xm" 'mh-smail)
-(global-set-key "\C-x4m" 'mh-smail-other-window)
-@end lisp
-
-In addition, several variables are useful when sending mail or replying
-to mail.  They are summarized in the following table.
-
-@table @code
-@item mh-comp-formfile
-Format file for drafts (default: @samp{"components"}).
-
-@item mh-repl-formfile
-Format file for replies (default: @samp{"replcomps"}).
-
-@item mh-letter-mode-hook
-Functions to run in MH-Letter mode (default: @code{nil}).
-
-@item mh-compose-letter-function
-Functions to run when starting a new draft (default: @code{nil}).
-
-@item mh-reply-default-reply-to
-Whom reply goes to (default: @code{nil}).
-
-@item mh-forward-subject-format
-Format string for forwarded message subject (default: @samp{"%s: %s"}).
-
-@item mh-redist-full-contents
-@code{send} requires entire message (default: @code{nil}).
-
-@item mh-new-draft-cleaned-headers
-Remove these header fields from re-edited draft (default:
-@samp{"^Date:\\| ^Received:\\| ^Message-Id:\\| ^From:\\| ^Sender:\\|
-^Delivery-Date:\\| ^Return-Path:"}).
-@end table
-
-@cindex @code{comp}
-@cindex MH commands, @code{comp}
-@vindex @code{mh-comp-formfile}
-@cindex @file{components}
-@cindex files, @file{components}
-@cindex @code{repl}
-@cindex MH commands, @code{repl}
-@cindex @file{replcomps}
-@cindex files, @file{replcomps}
-@vindex @code{mh-repl-formfile}
-
-Since mh-e does not use @code{comp} to create the initial draft, you
-need to set @code{mh-comp-formfile} to the name of your components file
-if it isn't @file{components}.  This is the name of the file that
-contains the form for composing messages.  If it does not contain an
-absolute pathname, mh-e searches for the file first in your MH directory
-and then in the system MH library directory (such as
-@file{/usr/local/lib/mh}).  Replies, on the other hand, are built using
-@code{repl}.  You can change the location of the field file from the
-default of @file{replcomps} by modifying @code{mh-repl-formfile}.
-
-@vindex @code{mh-letter-mode-hook}
-@cindex @code{repl}
-@cindex MH commands, @code{repl}
-@cindex @file{components}
-@cindex files, @file{components}
-
-Two hooks are provided to run commands on your freshly created draft.
-The first hook, @code{mh-letter-mode-hook}, allows you to do some
-processing before editing a letter.  For example, you may wish to modify
-the header after @code{repl} has done its work, or you may have a
-complicated @file{components} file and need to tell mh-e where the
-cursor should go.  Here's an example of how you would use this hook---all
-of the other hooks are set in this fashion as well.
-
-@findex @code{mh-insert-signature}, example
-
-@lisp
-@group
-@i{Prepare draft for editing via mh-letter-mode-hook}
-
-(defvar letter-mode-init-done nil
-  "Non-@code{nil} when one-time mh-e settings have made.")
-
-(defun my-mh-letter-mode-hook ()
-  "Hook to prepare letter for editing."
-  (if (not letter-mode-init-done)    ; @r{only need to bind the keys once}
-      (progn
-        (local-set-key "\C-ctb" 'add-enriched-text)
-        (local-set-key "\C-cti" 'add-enriched-text)
-        (local-set-key "\C-ctf" 'add-enriched-text)
-        (local-set-key "\C-cts" 'add-enriched-text)
-        (local-set-key "\C-ctB" 'add-enriched-text)
-        (local-set-key "\C-ctu" 'add-enriched-text)
-        (local-set-key "\C-ctc" 'add-enriched-text)
-        (setq letter-mode-init-done t)))
-  (setq fill-prefix "  ")            ; @r{I find indented text easier to read}
-  (save-excursion
-    (goto-char (point-max))          ; @r{go to end of message to}
-    (mh-insert-signature)))          ;   @r{insert signature}
-
-(add-hook 'mh-letter-mode-hook 'my-mh-letter-mode-hook)
-@end group
-@end lisp
-
-The function, @code{add-enriched-text} is defined in the example in
-@ref{Customizing Editing MIME}.
-
-@vindex @code{mh-compose-letter-function}
-
-The second hook, a function really, is
-@code{mh-compose-letter-function}.  Like @code{mh-letter-mode-hook}, it
-is called just before editing a new message; however, it is the last
-function called before you edit your message.  The consequence of this
-is that you can write a function to write and send the message for you.
-This function is passed three arguments: the contents of the @samp{To:},
-@samp{Subject:}, and @samp{cc:} header fields.
-
-@menu
-* Customizing Replying::        
-* Customizing Forwarding::      
-* Customizing Redistributing::  
-* Customizing Old Drafts::      
-@end menu
-
-@node Customizing Replying, Customizing Forwarding, Customizing Sending, Customizing Sending
-@subsection Replying to Mail
-
-@cindex replying
-@vindex @code{mh-reply-default-reply-to}
-
-If you find that most of the time that you specify @kbd{cc} when you
-reply to a message, set @code{mh-reply-default-reply-to} to @samp{cc}.
-This variable is normally set to @code{nil} so that you are prompted for
-the recipient of a reply.  It can be set to one of @samp{from},
-@samp{to}, or @samp{cc}; you are then no longer prompted for the
-recipient(s) of your reply.
-
-@node Customizing Forwarding, Customizing Redistributing, Customizing Replying, Customizing Sending
-@subsection Forwarding Mail
-
-@cindex forwarding
-@vindex @code{mh-forward-subject-format}
-
-When forwarding a message, the format of the @samp{Subject:} header
-field can be modified by the variable @code{mh-forward-subject-format}.
-This variable is a string which includes two escapes (@samp{%s}).  The
-first @samp{%s} is replaced with the sender of the original message, and
-the second one is replaced with the original @samp{Subject:}.  The
-default value of @samp{"%s: %s"} takes a message with the header:
-
-@example
-@group
-To: Bill Wohler <wohler@@newt.com>
-Subject: Re: 49er football
-From: Greg DesBrisay <gd@@cellnet.com>
-@end group
-@end example
-
-and creates a subject header field of:
-
-@example
-Subject: Greg DesBrisay: Re: 49er football
-@end example
-
-@node Customizing Redistributing, Customizing Old Drafts, Customizing Forwarding, Customizing Sending
-@subsection Redistributing Your Mail
-
-@cindex redistributing
-@vindex @code{mh-redist-full-contents}
-@cindex @code{dist}
-@cindex MH commands, @code{dist}
-@cindex @code{send}
-@cindex MH commands, @code{send}
-
-The variable @code{mh-redist-full-contents} must be set to non-@code{nil} if
-@code{dist} requires the whole letter for redistribution, which is the
-case if @code{send} is compiled with the @sc{berk} @footnote{To see which
-options your copy of MH was compiled with, use @kbd{M-x mh-version}
-(@ref{Miscellaneous}).}  option (which many people abhor).  If you find
-that MH will not allow you to redistribute a message that has been
-redistributed before, this variable should be set to @code{nil}.
-
-@node Customizing Old Drafts,  , Customizing Redistributing, Customizing Sending
-@subsection Editing Old Drafts and Bounced Messages
-
-@cindex re-editing drafts
-@vindex @code{mh-new-draft-cleaned-headers}
-
-The header fields specified by @code{mh-new-draft-cleaned-headers} are
-removed from an old draft that has been recreated with @kbd{M-e}
-(@code{mh-extract-rejected-mail}) or @kbd{M-a} (@code{mh-edit-again}).
-If when you edit an old draft with these commands you find that there
-are header fields that you don't want included, you can append them to
-this variable.  For example,
-
-@vindex @code{mh-new-draft-cleaned-headers}, example
-
-@lisp
-(setq mh-new-draft-cleaned-headers
-      (concat mh-new-draft-cleaned-headers "\\|^Some-Field:"))
-@end lisp
-
-@cindex regular expressions
-
-This appends the regular expression @samp{\\|^Some-Field:} to the
-variable (@pxref{Regexps, , Syntax of Regular Expressions, emacs, The
-GNU Emacs Manual}).  The @samp{\\|} means @emph{or}, and the @samp{^}
-(caret) matches the beginning of the line.  This is done to be very
-specific about which fields match.  The literal @samp{:} is appended for
-the same reason.
-
-@node Customizing Draft Editing, Customizing Moving Mail, Customizing Sending, Customizing mh-e
-@section Editing a Draft
-
-@cindex editing draft
-
-There are several variables used during the draft editing phase.
-Examples include changing the name of the file that holds your signature
-or telling mh-e about new multimedia types.  They are:
-
-@table @code
-@item mh-yank-from-start-of-msg
-How to yank when region not set (default: @code{t}).
-
-@item mh-ins-buf-prefix
-Indent for yanked messages (default: @samp{"> "}).
-
-@item mail-citation-hook
-Functions to run on yanked messages (default: @code{nil}).
-
-@item mh-delete-yanked-msg-window
-Delete message window on yank (default: @code{nil}).
-
-@c Need the @* because otherwise TeX fills it wrong and complains
-@c about overfull hbox.
-@item mh-mime-content-types
-List of valid content types (default: @samp{'(("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"))}).
-
-@item mh-mhn-args
-Additional arguments for @code{mhn} (default: @code{nil}).
-
-@item mh-signature-file-name
-File containing signature (default: @samp{"~/.signature"}).
-
-@item mh-before-send-letter-hook
-Functions to run before sending draft (default: @code{nil}).
-
-@item mh-send-prog
-MH program used to send messages (default: @samp{"send"}).
-@end table
-
-@menu
-* Customizing Editing Textual::  
-* Customizing Editing MIME::    
-* Customizing Sending Message::  
-@end menu
-
-@node Customizing Editing Textual, Customizing Editing MIME, Customizing Draft Editing, Customizing Draft Editing
-@subsection Editing Textual Messages
-
-The following two sections include variables that customize the way you
-edit a draft.  The discussion here applies to editing multimedia
-messages as well.
-
-@menu
-* Customizing Inserting Letter::  
-* Customizing Signature::       
-@end menu
-
-@node Customizing Inserting Letter, Customizing Signature, Customizing Editing Textual, Customizing Editing Textual
-@subsubsection Inserting letter to which you're replying
-
-@cindex inserting messages
-@vindex @code{mh-yank-from-start-of-msg}
-@vindex @code{mh-ins-buf-prefix}
-@vindex @code{mail-citation-hook}
-@vindex @code{mh-ins-buf-prefix}
-@vindex @code{mh-delete-yanked-msg-window}
-
-To control how much of the message to which you are replying is yanked
-by @kbd{C-c C-y} (@code{mh-yank-cur-msg}) into your reply, modify
-@code{mh-yank-from-start-of-msg}.  The default value of @code{t} means
-that the entire message is copied.  If it is set to @code{'body} (don't
-forget the apostrophe), then only the message body is copied.  If it is
-set to @code{nil}, only the part of the message following point (the
-current cursor position in the message's buffer) is copied.  In any
-case, this variable is ignored if a region is set in the message you are
-replying to.  The string contained in @code{mh-ins-buf-prefix} is
-inserted before each line of a message that is inserted into a draft
-with @kbd{C-c C-y} (@code{mh-yank-cur-msg}).  I suggest that you not
-modify this variable.  The default value of @samp{"> "} is the default
-string for many mailers and news readers: messages are far easier to
-read if several included messages have all been indented by the same
-string.  The variable @code{mail-citation-hook} is @code{nil} by
-default, which means that when a message is inserted into the letter,
-each line is prefixed by @code{mh-ins-buf-prefix}.  Otherwise, it can be
-set to a function that modifies an included
-@cindex Emacs, packages, supercite
-citation. 
-@c Footnotes are fragile; hence the redundancy.
-@c TeX not inserting a line break; hence the @*
-@ifclear html
-@footnote{@emph{Supercite} is an example of a full-bodied, full-featured
-citation package.  It is in Emacs versions 19.15 and later, and can be
-found via anonymous @code{ftp} on @samp{archive.cis.ohio-state.edu} in
-@* @file{/pub/gnu/emacs/elisp-archive/packages/sc3.1.tar.Z}}
-@end ifclear
-@ifset html
-@footnote{@emph{Supercite} is an example of a full-bodied,
-full-featured citation package.  It is in Emacs versions 19.15 and
-later, and its @sc{url} is @*
-@file{<A HREF="ftp://archive.cis.ohio-state.edu/pub/gnu/emacs/elisp-archive/packages/sc3.1.tar.Z">ftp://archive.cis.ohio-state.edu/pub/gnu/emacs/elisp-archive/packages/sc3.1.tar.Z</A>}}
-@end ifset
-If you like to yank all the text from the message you're replying to in
-one go, set @code{mh-delete-yanked-msg-window} to non-@code{nil} to delete
-the window containing the original message after yanking it to make more
-room on your screen for your reply.
-
-@node Customizing Signature,  , Customizing Inserting Letter, Customizing Editing Textual
-@subsubsection Inserting your signature
-
-@cindex inserting signature
-@cindex signature
-@vindex @code{mh-signature-file-name}
-@cindex @file{.signature}
-@cindex files, @file{.signature}
-
-You can change the name of the file inserted with @kbd{C-c C-s}
-(@code{mh-insert-signature}) by changing @code{mh-signature-file-name}
-(default: @file{"~/.signature"}).
-
-@node Customizing Editing MIME, Customizing Sending Message, Customizing Editing Textual, Customizing Draft Editing
-@subsection Editing Multimedia Messages
-
-@cindex MIME
-@cindex multimedia mail
-@vindex @code{mh-mime-content-types}
-
-The variable @code{mh-mime-content-types} contains a list of the
-currently valid content types.  They are listed in the table in
-@ref{Customizing Draft Editing}.  If you encounter a new content type,
-you can add it like this:
-
-@vindex @code{mh-mime-content-types}, example
-
-@lisp
-(setq mh-mime-content-types (append mh-mime-content-types
-                                    '(("@var{new/type}"))))
-@end lisp
-
-Emacs macros can be used to insert enriched text directives like
-@samp{<bold>}.  The following code will make, for example, @kbd{C-c t
-b} insert the @samp{<bold>} directive.
-
-@lisp
-@group
-@i{Emacs macros for entering enriched text}
-
-(defvar enriched-text-types '(("b" . "bold") ("i" . "italic") ("f" . "fixed")
-                              ("s" . "smaller") ("B" . "bigger")
-                              ("u" . "underline") ("c" . "center"))
-  "Alist of (final-character . directive) choices for add-enriched-text.
-Additional types can be found in RFC 1563.")
-
-(defun add-enriched-text (begin end)
-  "Add enriched text directives around region.
-The directive used comes from the list enriched-text-types and is
-specified by the last keystroke of the command.  When called from Lisp,
-arguments are BEGIN and END@."
-  (interactive "r")
-  ;; @r{Set type to the directive indicated by the last keystroke.}
-  (let ((type (cdr (assoc (char-to-string (logior last-input-char ?@w{`}))
-                          enriched-text-types))))
-    (save-restriction              ; @r{restores state from narrow-to-region}
-      (narrow-to-region begin end) ; @r{narrow view to region}
-      (goto-char (point-min))      ; @r{move to beginning of text}
-      (insert "<" type ">")        ; @r{insert beginning directive}
-      (goto-char (point-max))      ; @r{move to end of text}
-      (insert "</" type ">"))))    ; @r{insert terminating directive}
-@end group
-@end lisp
-
-To use the function @code{add-enriched-text}, first create keybindings
-for it (@pxref{Customizing Sending}).  Then, set the mark with
-@kbd{C-@@} or @kbd{C-SPC}, type in the text to be highlighted, and type
-@kbd{C-c t b}.  This adds @samp{<bold>} where you set the mark and
-adds @samp{</bold>} at the location of your cursor, giving you something
-like: @samp{You should be <bold>very</bold>}.  You may also be
-interested in investigating @code{sgml-mode}.
-
-@menu
-* Customizing Sending MIME::    
-@end menu
-
-@node Customizing Sending MIME,  , Customizing Editing MIME, Customizing Editing MIME
-@subsubsection Readying multimedia messages for sending
-
-@vindex @code{mh-mhn-args}
-
-If you wish to pass additional arguments to @code{mhn} to affect how it
-builds your message, use the variable @code{mh-mhn-args}.  For example,
-you can build a consistency check into the message by setting
-@code{mh-mhn-args} to @code{-check}.  The recipient of your message can
-then run @code{mhn -check} on the message---@code{mhn} will complain if
-the message has been corrupted on the way.  The @kbd{C-c C-e}
-(@code{mh-mhn-edit}) command only consults this variable when given a
-prefix argument.
-
-@node Customizing Sending Message,  , Customizing Editing MIME, Customizing Draft Editing
-@subsection Sending a Message
-
-@cindex sending mail
-@cindex spell check
-@vindex @code{mh-before-send-letter-hook}
-
-If you want to check your spelling in your message before sending, use
-@code{mh-before-send-letter-hook} like this:
-
-@i{Spell-check message via mh-before-send-letter-hook}
-
-@vindex @code{mh-before-send-letter-hook}, example
-
-@lisp
-(add-hook 'mh-before-send-letter-hook 'ispell-message)
-@end lisp
-
-@cindex @code{send}
-@cindex MH commands, @code{send}
-@vindex @code{mh-send-prog}
-
-In case the MH @code{send} program is installed under a different name,
-use @code{mh-send-prog} to tell mh-e the name.
-
-@node Customizing Moving Mail, Customizing Searching, Customizing Draft Editing, Customizing mh-e
-@section Moving Your Mail Around
-
-@cindex processing mail
-
-If you change the name of some of the MH programs or have your own
-printing programs, the following variables can help you.
-They are described in detail in the subsequent sections.
-
-@table @code
-@item mh-inc-prog
-Program to incorporate mail (default: @samp{"inc"}).
-
-@item mh-inc-folder-hook
-Functions to run when incorporating mail (default: @code{nil}).
-
-@item mh-delete-msg-hook
-Functions to run when deleting messages (default: @code{nil}).
-
-@item mh-print-background
-Print in foreground or background (default: @code{nil}).
-
-@item mh-lpr-command-format
-Command used to print (default: @samp{"lpr -J '%s'"}).
-
-@item mh-default-folder-for-message-function
-Function to generate a default folder (default: @code{nil}).
-
-@item mh-auto-folder-collect
-Collect folder names in background at startup (default: @code{t}).
-
-@item mh-recursive-folders
-Collect nested folders (default: @code{nil}).
-
-@item mh-refile-msg-hook
-Functions to run when refiling message (default: @code{nil}).
-
-@item mh-store-default-directory
-Default directory for storing files created by @code{uuencode} or @code{shar}
-(default: @code{nil}).
-
-@item mh-sortm-args
-Additional arguments for @code{sortm} (default: @code{nil}).
-
-@item mh-scan-prog
-Program to scan messages (default: @samp{"scan"}).
-
-@item mh-before-quit-hook
-Functions to run before quitting (default: @code{nil}).  See also
-@code{mh-quit-hook}. 
-
-@item mh-quit-hook
-Functions to run after quitting (default: @code{nil}). See also
-@code{mh-before-quit-hook}.
-@end table
-
-@menu
-* Customizing Incorporating::   
-* Customizing Deleting::        
-* Customizing Organizing::      
-* Customizing Printing::        
-* Customizing Files and Pipes::  
-* Customizing Finishing Up::    
-@end menu
-
-@node Customizing Incorporating, Customizing Deleting, Customizing Moving Mail, Customizing Moving Mail
-@subsection Incorporating Your Mail
-
-@cindex incorporating
-@vindex @code{mh-inc-prog}
-@cindex @code{inc}
-@cindex MH commands, @code{inc}
-@vindex @code{mh-progs}
-@vindex @code{mh-scan-prog}
-@vindex @code{mh-inc-folder-hook}
-
-The name of the program that incorporates new mail is stored in
-@code{mh-inc-prog}; it is @samp{"inc"} by default.  This program
-generates a one-line summary for each of the new messages.  Unless it is
-an absolute pathname, the file is assumed to be in the @code{mh-progs}
-directory.  You may also link a file to @code{inc} that uses a different
-format (see @code{mh-profile}(5)).  You'll then need to modify several
-variables appropriately; see @code{mh-scan-prog} below.  You can set the
-hook @code{mh-inc-folder-hook}, which is called after new mail is
-incorporated by the @kbd{i} (@code{mh-inc-folder}) command.  A good use
-of this hook is to rescan the whole folder either after running @kbd{M-x
-mh-rmail} the first time or when you've changed the message numbers from
-outside of mh-e.
-
-@findex @code{mh-execute-commands}
-@findex @code{mh-rescan-folder}, example
-@findex @code{mh-show}, example
-@vindex @code{mh-inc-folder-hook}, example
-
-@lisp
-@group
-@i{Rescan folder after incorporating new mail via mh-inc-folder-hook}
-
-(defun my-mh-inc-folder-hook ()
-  "Hook to rescan folder after incorporating mail."
-  (if (buffer-modified-p)            ; @r{if outstanding refiles and deletes,}
-      (mh-execute-commands))         ;   @r{carry them out}
-  (mh-rescan-folder)                 ; @r{synchronize with +inbox}
-  (mh-show))                         ; @r{show the current message}
-
-(add-hook 'mh-inc-folder-hook 'my-mh-inc-folder-hook)
-@end group
-@end lisp
-
-@node Customizing Deleting, Customizing Organizing, Customizing Incorporating, Customizing Moving Mail
-@subsection Deleting Your Mail
-
-@cindex deleting
-@vindex @code{mh-delete-msg-hook}
-
-The hook @code{mh-delete-msg-hook} is called after you mark a message
-for deletion.  For example, the current maintainer of mh-e used this
-once when he kept statistics on his mail usage.
-
-@node Customizing Organizing, Customizing Printing, Customizing Deleting, Customizing Moving Mail
-@subsection Organizing Your Mail with Folders
-
-@cindex using folders
-@vindex @code{mh-recursive-folders}
-@vindex @code{mh-auto-folder-collect}
-
-By default, operations on folders work only one level at a time.  Set
-@code{mh-recursive-folders} to non-@code{nil} to operate on all folders.
-This mostly means that you'll be able to see all your folders when you
-press @key{TAB} when prompted for a folder name.  The variable
-@code{mh-auto-folder-collect} is normally turned on to generate a list
-of folder names in the background as soon as mh-e is loaded.  Otherwise,
-the list is generated when you need a folder name the first time (as
-with @kbd{o} (@code{mh-refile-msg})).  If you have a lot of folders and
-you have @code{mh-recursive-folders} set, this could take a while, which
-is why it's nice to do the folder collection in the background.
-
-@vindex @code{mh-default-folder-for-message-function}
-@findex @code{mh-refile-msg}
-@findex @code{mh-to-fcc}
-@cindex @file{.emacs}
-@cindex files, @file{.emacs}
-
-The function @code{mh-default-folder-for-message-function} is used by
-@kbd{o} (@code{mh-refile-msg}) and @kbd{C-c C-f C-f} (@code{mh-to-fcc})
-to generate a default folder.  The generated folder name should be a
-string with a @samp{+} before it.  For each of my correspondents, I use the
-same name for both an alias and a folder.  So, I wrote a function that
-takes the address in the @samp{From:} header field, finds it in my alias
-file, and returns the alias, which is used as a default folder name.
-This is the most complicated example given here, and it demonstrates
-several features of Emacs Lisp programming.  You should be able to drop
-this into @file{~/.emacs}, however.  If you use this to store messages
-in a subfolder of your Mail directory, you can modify the line that
-starts @samp{(format +%s...}  and insert your subfolder after the folder
-symbol @samp{+}.
-@c Note for me: if I insert a new version, don't forget to remove the
-@c "a/" from the folder name.
-
-@iftex
-@filbreak
-@end iftex
-
-@vindex @code{mh-default-folder-for-message-function}, example
-@vindex @code{mh-user-path}, example
-
-@lisp
-@group
-@i{Creating useful default folder for refiling via mh-default-folder-for-message-function}
-
-(defun my-mh-folder-from-address ()
-  "Determine folder name from address.
-Takes the address in the From: header field, and returns its corresponding
-alias from the user's personal aliases file. Returns @code{nil} if the address
-was not found."
-  (require 'rfc822)                         ; @r{for the rfc822 functions}
-  (search-forward-regexp "^From: \\(.*\\)") ; @r{grab header field contents}
-  (save-excursion                     ; @r{save state}
-    (let ((addr (car (rfc822-addresses  ; @r{get address}
-                      (buffer-substring (match-beginning 1)
-                                        (match-end 1)))))
-          (buffer (get-buffer-create " *temp*")) ; @r{set local variables}
-          folder)
-      (set-buffer buffer)             ; @r{jump to temporary buffer}
-      (unwind-protect                 ; @r{run kill-buffer when done}
-          (progn                      ; @r{function grouping construct}
-            (insert-file-contents (expand-file-name "aliases"
-                                                    mh-user-path))
-            (goto-char (point-min))   ; @r{grab aliases file and go to start}
-            (setq folder
-                  ;; @r{Search for the given address, even commented-out}
-                  ;; @r{addresses are found!}
-                  ;; @r{The function search-forward-regexp sets values that are}
-                  ;; @r{later used by match-beginning and match-end.}
-                  (if (search-forward-regexp (format "^;*\\(.*\\):.*%s"
-                                                     addr) nil t)
-                      ;; @r{NOTE WELL: this is what the return value looks like.}
-                      ;; @r{You can modify the format string to match your own}
-                      ;; @r{Mail hierarchy.}
-                      (format "+%s" (buffer-substring (match-beginning 1)
-                                                      (match-end 1))))))
-        (kill-buffer buffer))          ; @r{get rid of our temporary buffer}
-      folder)))                        ; @r{function's return value}
-
-(setq mh-default-folder-for-message-function 'my-mh-folder-from-address)
-@end group
-@end lisp
-
-@vindex @code{mh-refile-msg-hook}
-
-The hook @code{mh-refile-msg-hook} is called after a message is marked
-to be refiled.
-
-@vindex @code{mh-sortm-args}
-@cindex @code{sortm}
-@cindex MH commands, @code{sortm}
-@findex @code{mh-sort-folder}
-@cindex MH profile components, @code{sortm}
-@cindex @file{.mh_profile}
-@cindex files, @file{.mh_profile}
-
-The variable @code{mh-sortm-args} holds extra arguments to pass on to
-the @code{sortm} command.  Note: this variable is only consulted when a
-prefix argument is given to @kbd{M-x mh-sort-folder}.  It is used to
-override any arguments given in a @code{sortm:} entry in your MH profile
-(@file{~/.mh_profile}).
-
-@menu
-* Customizing Scan Line Formats::  
-@end menu
-
-@node Customizing Scan Line Formats,  , Customizing Organizing, Customizing Organizing
-@subsubsection Scan line formatting
-
-@vindex @code{mh-scan-prog}
-@cindex @code{scan}
-@cindex MH commands, @code{scan}
-@vindex @code{mh-progs}
-
-The name of the program that generates a listing of one line per message
-is held in @code{mh-scan-prog} (default: @samp{"scan"}).  Unless this
-variable contains an absolute pathname, it is assumed to be in the
-@code{mh-progs} directory.  You may link another program to @code{scan}
-(see @code{mh-profile}(5)) to produce a different type of listing.
-
-If you change the format of the scan lines you'll need to tell mh-e how
-to parse the new format.  As you see, quite a lot of variables are
-involved to do that.  The first variable has to do with pruning out
-garbage.
-
-@table @code
-@item mh-valid-scan-line
-@vindex @code{mh-valid-scan-line}
-@cindex @code{inc}
-@cindex MH commands, @code{inc}
-@cindex @code{scan}
-@cindex MH commands, @code{scan}
-This regular expression describes a valid scan line.  This is used to
-eliminate error messages that are occasionally produced by @code{inc} or
-@code{scan} (default: @samp{"^ *[0-9]"}).
-@end table
-
-Next, two variables control how the message numbers are parsed.
-
-@table @code
-
-@item mh-msg-number-regexp
-@vindex @code{mh-msg-number-regexp}
-This regular expression is used to extract the message number from a
-scan line.  Note that the message number must be placed in quoted
-parentheses, (\\(...\\)), as in the default of @w{@samp{"^
-*\\([0-9]+\\)"}}.
-
-@item mh-msg-search-regexp
-@vindex @code{mh-msg-search-regexp}
-Given a message number (which is inserted in @samp{%d}), this regular
-expression will match the scan line that it represents (default:
-@samp{"^[^0-9]*%d[^0-9]"}).
-@end table
-
-Finally, there are a slew of variables that control how mh-e marks up
-the scan lines.
-
-@table @code
-@item mh-cmd-note
-@vindex @code{mh-cmd-note}
-Number of characters to skip over before inserting notation (default:
-4).  Note how it relates to the following regular expressions.
-
-@item mh-deleted-msg-regexp
-@vindex @code{mh-deleted-msg-regexp}
-This regular expression describes deleted messages (default:
-@samp{"^....D"}).  See also @code{mh-note-deleted}.
-
-@item mh-refiled-msg-regexp
-@vindex @code{mh-refiled-msg-regexp}
-This regular expression describes refiled messages (default:
-@samp{"^....\\^"}).  See also @code{mh-note-refiled}.
-
-@item mh-cur-scan-msg-regexp
-@vindex @code{mh-cur-scan-msg-regexp}
-This regular expression matches the current message (default:
-@samp{"^....\\+"}).  See also @code{mh-note-cur}.
-
-@item mh-good-msg-regexp
-@vindex @code{mh-good-msg-regexp}
-This regular expression describes which messages should be shown when
-mh-e goes to the next or previous message.  Normally, deleted or refiled
-messages are skipped over (default: @samp{"^....[^D^]"}).
-
-@item mh-note-deleted
-@vindex @code{mh-note-deleted}
-Messages that have been deleted to are marked by this string (default:
-@samp{"D"}).  See also @code{mh-deleted-msg-regexp}.
-
-@item mh-note-refiled
-@vindex @code{mh-note-refiled}
-Messages that have been refiled are marked by this string (default:
-@samp{"^"}).  See also @code{mh-refiled-msg-regexp}.
-
-@item mh-note-copied
-@vindex @code{mh-note-copied}
-Messages that have been copied are marked by this string (default:
-@samp{"C"}).
-
-@item mh-note-cur
-@vindex @code{mh-note-cur}
-The current message (in MH, not in mh-e) is marked by this string
-(default: @samp{"+"}).  See also @code{mh-cur-scan-msg-regexp}.
-
-@item mh-note-repl
-@vindex @code{mh-note-repl}
-Messages that have been replied to are marked by this string (default:
-@samp{"-"}).
-
-@item mh-note-forw
-@vindex @code{mh-note-forw}
-Messages that have been forwarded are marked by this string (default:
-@samp{"F"}).
-
-@item mh-note-dist
-@vindex @code{mh-note-dist}
-Messages that have been redistributed are marked by this string
-(default: @samp{"R"}).
-
-@item mh-note-printed
-@vindex @code{mh-note-printed}
-Messages that have been printed are marked by this string (default:
-@samp{"P"}).
-
-@item mh-note-seq
-@vindex @code{mh-note-seq}
-Messages in a sequence are marked by this string (default: @samp{"%"}).
-@end table
-
-@node Customizing Printing, Customizing Files and Pipes, Customizing Organizing, Customizing Moving Mail
-@subsection Printing Your Mail
-
-@cindex printing
-@vindex @code{mh-print-background}
-@vindex @code{mh-lpr-command-format}
-@cindex @code{lpr}
-@cindex Unix commands, @code{lpr}
-
-Normally messages are printed in the foreground.  If this is slow on
-your system, you may elect to set @code{mh-print-background} to
-non-@code{nil} to print in the background.  If you do this, do not delete
-the message until it is printed or else the output may be truncated.
-The variable @code{mh-lpr-command-format} controls how the printing is
-actually done.  The string can contain one escape, @samp{%s}, which is
-filled with the name of the folder and the message number and is useful
-for print job names.  As an example, the default is @samp{"lpr -J
-'%s'"}.
-
-@node Customizing Files and Pipes, Customizing Finishing Up, Customizing Printing, Customizing Moving Mail
-@subsection Files and Pipes
-
-@cindex using files
-@cindex using pipes
-@findex @code{mh-store-msg}
-@vindex @code{mh-store-default-directory}
-
-The initial directory for the @code{mh-store-msg} command is held in
-@code{mh-store-default-directory}.  Since I almost always run
-@code{mh-store-msg} on sources, I set it to my personal source directory
-like this:
-
-@vindex @code{mh-store-default-directory}, example
-
-@lisp
-(setq mh-store-default-directory (expand-file-name "~/src/"))
-@end lisp
-
-@findex @code{mh-store-buffer}
-@cindex @code{uuencode}
-@cindex Unix commands, @code{uuencode}
-@cindex @code{shar}
-@cindex Unix commands, @code{shar}
-
-Subsequent incarnations of @code{mh-store-msg} offer the last directory
-used as the default.  By the way, @code{mh-store-msg} calls the Emacs
-Lisp function @code{mh-store-buffer}.  I mention this because you can use
-it directly if you're editing a buffer that contains a file that has
-been run through @code{uuencode} or @code{shar}.  For example, you can
-extract the contents of the current buffer in your home directory by
-typing @kbd{M-x mh-store-buffer @key{RET} ~ @key{RET}}.
-
-@node Customizing Finishing Up,  , Customizing Files and Pipes, Customizing Moving Mail
-@subsection Finishing Up
-
-@cindex quitting
-@vindex @code{mh-before-quit-hook}
-@vindex @code{mh-quit-hook}
-@findex @code{mh-execute-commands}
-
-The two variables @code{mh-before-quit-hook} and @code{mh-quit-hook} are
-called by @kbd{q} (@code{mh-quit}).  The former one is called before the
-quit occurs, so you might use it to perform any mh-e operations; you
-could perform some query and abort the quit or call
-@code{mh-execute-commands}, for example.  The latter is not run in an
-mh-e context, so you might use it to modify the window setup.
-
-@node Customizing Searching,  , Customizing Moving Mail, Customizing mh-e
-@section Searching Through Messages
-@cindex searching
-
-@vindex @code{mh-pick-mode-hook}
-@vindex @code{mh-partial-folder-mode-line-annotation}
-
-If you find that you do the same thing over and over when editing the
-search template, you may wish to bind some shortcuts to keys.  This can
-be done with the variable @code{mh-pick-mode-hook}, which is called when
-@kbd{M-s} (@code{mh-search-folder}) is run on a new pattern.  
-
-The string
-@code{mh-partial-folder-mode-line-annotation} is used to annotate the
-mode line when only a portion of the folder is shown.  For example, this
-will be displayed after running @kbd{M-s} (@code{mh-search-folder}) to
-list messages based on some search criteria (see @ref{Searching}).  The
-default annotation of @samp{"select"} yields a mode line that looks
-like:
-
-@example
---%%-@{+inbox/select@} 2 msgs (2-3)      (MH-Folder)--All-----------------
-@end example
-
-@node Odds and Ends, History, Customizing mh-e, Top
-@appendix Odds and Ends
-
-This appendix covers a few topics that don't fit elsewhere.  Here I tell
-you how to report bugs and how to get on the mh-e mailing list.  I also
-point out some additional sources of information.
-
-@menu
-* Bug Reports::                 
-* Mailing List::                
-* MH FAQ::                      
-* Getting mh-e::                
-@end menu
-
-@node Bug Reports, Mailing List, Odds and Ends, Odds and Ends
-@appendixsec Bug Reports
-
-@cindex bugs
-@cindex Gildea, Stephen
-
-The current maintainer of mh-e is Stephen Gildea
-<@i{gildea@@lcs.mit.edu}>.  Please mail bug reports directly to him, as
-well as any praise or suggestions.  Please include the output of
-@kbd{M-x mh-version} (@pxref{Miscellaneous}) in any bug report you send.
-
-@node Mailing List, MH FAQ, Bug Reports, Odds and Ends
-@appendixsec mh-e Mailing List
-
-@cindex mailing list
-
-There is a mailing list, @i{mh-e@@x.org}, for discussion of mh-e and
-announcements of new versions.  Send a ``subscribe'' message to
-@i{mh-e-request@@x.org} to be added.  Do not report bugs on this list;
-mail them directly to the maintainer (@pxref{Bug Reports}).
-
-@node MH FAQ, Getting mh-e, Mailing List, Odds and Ends
-@appendixsec MH FAQ
-
-@cindex MH FAQ
-@cindex FAQ
-
-An FAQ appears monthly in the newsgroup @samp{comp.mail.mh}.  While very
-little is there that deals with mh-e specifically, there is an
-incredible wealth of material about MH itself which you will find
-useful.  The subject of the FAQ is @cite{MH Frequently Asked Questions
-(FAQ) with Answers}.
-
-The FAQ can be also obtained by anonymous @code{ftp} or via the
-World Wide Web (WWW)@.  It is located at:
-
-@ifclear html
-@example
-ftp://rtfm.mit.edu/pub/usenet/news.answers/mail/mh-faq/part1
-http://www.cis.ohio-state.edu/hypertext/faq/usenet/mail/mh-faq/part1/faq.html
-@end example
-@end ifclear
-
-@ifset html
-@example
-<A HREF="ftp://rtfm.mit.edu/pub/usenet/news.answers/mail/mh-faq/part1">ftp://rtfm.mit.edu/pub/usenet/news.answers/mail/mh-faq/part1</A>
-<A HREF="http://www.cis.ohio-state.edu/hypertext/faq/usenet/mail/mh-faq/part1/faq.html">http://www.cis.ohio-state.edu/hypertext/faq/usenet/mail/mh-faq/part1/faq.html</A>
-@end example
-@end ifset
-
-Otherwise, you can use mail.  Send mail to @i{mail-server@@rtfm.mit.edu}
-containing the following:
-
-@example
-send usenet/news.answers/mail/mh-faq/part1
-@end example
-
-@node Getting mh-e,  , MH FAQ, Odds and Ends
-@appendixsec Getting mh-e
-
-@cindex obtaining mh-e
-
-If you're running a pre-4.0 version of mh-e, please consider upgrading.
-You can either have your system administrator upgrade your Emacs, or
-just the files for mh-e.
-
-The MH distribution contains a copy of mh-e in @file{miscellany/mh-e}.
-Make sure it is at least @w{Version 4.0}.
-
-The latest version of mh-e can be obtained via anonymous @code{ftp} from
-@samp{ftp.x.org}.  The file containing mh-e is currently
-@ifclear html
-@file{/misc/mh-e/mh-e-@value{VERSION}.tar.Z}.
-@end ifclear
-@ifset html
-@file{<A HREF="ftp://ftp.x.org/misc/mh-e/mh-e-@value{VERSION}.tar.Z">/misc/mh-e/mh-e-@value{VERSION}.tar.Z</A>}
-@end ifset
-I suggest that you
-extract the files from @file{mh-e-@value{VERSION}.tar.Z} in the
-following fashion:
-
-@example
-@group
-% @kbd{cd}                                  # @r{Start in your home directory}
-% @kbd{mkdir lib lib/emacs}                 # @r{Create directory for mh-e}
-% @kbd{cd lib/emacs}
-% @kbd{zcat @var{path/to/}mh-e-@value{VERSION}.tar.Z | tar xvf -}    # @r{Extract files}
-@end group
-@end example
-
-@cindex @file{.emacs}
-@cindex files, @file{.emacs}
-
-To use these new files, add the following to @file{~/.emacs}:
-
-@lisp
-(setq load-path (cons (expand-file-name "~/lib/emacs") load-path))
-@end lisp
-
-@cindex news
-@cindex files, @samp{MH-E-NEWS}
-
-That's it!  If you're already running Emacs, please quit that session
-and start again to load in the new mh-e.  Check that you're running the
-new version with the command @kbd{M-x mh-version} after running any mh-e
-command.  The distribution comes with a file called @file{MH-E-NEWS} so
-you can see what's new.
-
-@node    History, Changes to mh-e, Odds and Ends, Top
-@appendix History of mh-e
-
-@cindex history of mh-e
-
-mh-e was originally written by Brian Reid in 1983 and has changed hands
-twice since then.  Jim Larus wanted to do something similar for GNU
-Emacs, and ended up completely rewriting it that same year.  In 1989,
-Stephen Gildea picked it up and is now currently improving and
-maintaining it.
-
-@menu
-* From Brian Reid::             
-* From Jim Larus::              
-* From Stephen Gildea::         
-@end menu
-
-@node From Brian Reid, From Jim Larus, History, History
-@appendixsec From Brian Reid
-
-@cindex Reid, Brian
-
-One day in 1983 I got the flu and had to stay home from work for three
-days with nothing to do.  I used that time to write MHE@.  The
-fundamental idea behind MHE was that it was a ``puppeteer'' driving the MH
-programs underneath it.  MH had a model that the editor was supposed to
-run as a subprocess of the mailer, which seemed to me at the time to be
-the tail wagging the dog.  So I turned it around and made the editor
-drive the MH programs.  I made sure that the UCI people (who were
-maintaining MH at the time) took in my changes and made them stick.
-
-Today, I still use my own version of MHE because I don't at all like the
-way that GNU mh-e works and I've never gotten to be good enough at
-hacking Emacs Lisp to make GNU mh-e do what I want.  The Gosling-emacs
-version of MHE and the GNU Emacs version of mh-e have almost nothing in
-common except similar names.  They work differently, have different
-conceptual models, and have different key bindings.  @footnote{After
-reading this article, I questioned Brian about his version of MHE, and
-received some great ideas for improving mh-e such as a dired-like method
-of selecting folders; and removing the prompting when sending mail,
-filling in the blanks in the draft buffer instead.  I passed them on to
-Stephen Gildea, the current maintainer, and he was excited about the
-ideas as well.  Perhaps one day, mh-e will again resemble MHE, although
-none of these ideas are manifest in Version 5.0.}
-
-Brian Reid, June 1994
-
-@node From Jim Larus, From Stephen Gildea, From Brian Reid, History
-@appendixsec From Jim Larus
-
-@cindex Larus, Jim
-
-Brian Reid, while at CMU or shortly after going to Stanford wrote a mail
-reading program called MHE for Gosling Emacs.  It had much the same
-structure as mh-e (i.e., invoked MH programs), though it was simpler and
-the commands were slightly different.  Unfortunately, I no longer have a
-copy so the differences are lost in the mists of time.
-
-In '82-83, I was working at BBN and wrote a lot of mlisp code in Gosling
-Emacs to make it look more like Tennex Emacs.  One of the packages that
-I picked up and improved was Reid's mail system.  In '83, I went back to
-Berkeley.  About that time, Stallman's first version of GNU Emacs came
-out and people started to move to it from Gosling Emacs (as I recall,
-the transition took a year or two).  I decided to port Reid's MHE and
-used the mlisp to Emacs Lisp translator that came with GNU Emacs.  It
-did a lousy job and the resulting code didn't work, so I bit the bullet
-and rewrote the code by hand (it was a lot smaller and simpler then, so
-it took only a day or two).
-
-Soon after that, mh-e became part of the standard Emacs distribution and
-suggestions kept dribbling in for improvements.  mh-e soon reached
-sufficient functionality to keep me happy, but I kept on improving it
-because I was a graduate student with plenty of time on my hands and it
-was more fun than my dissertation.  In retrospect, the one thing that I
-regret is not writing any documentation, which seriously limited the use
-and appeal of the package.
-
-@cindex @code{xmh}, in mh-e history
-
-In '89, I came to Wisconsin as a professor and decided not to work on
-mh-e.  It was stable, except for minor bugs, and had enough
-functionality, so I let it be for a few years.  Stephen Gildea of BBN
-began to pester me about the bugs, but I ignored them.  In 1990, he went
-off to the X Consortium, said good bye, and said that he would now be
-using @code{xmh}.  A few months later, he came back and said that he
-couldn't stand @code{xmh} and could I put a few more bug fixes into
-mh-e.  At that point, I had no interest in fixing mh-e, so I gave the
-responsibility of maintenance to him and he has done a fine job since
-then.
-
-Jim Larus, June 1994
-
-@node From Stephen Gildea,  , From Jim Larus, History
-@appendixsec From Stephen Gildea
-
-@cindex Gildea, Stephen
-
-In 1987 I went to work for Bolt Beranek and Newman, as Jim had before
-me.  In my previous job, I had been using RMAIL, but as my folders tend
-to run large, I was frustrated with the speed of RMAIL@.  However, I
-stuck with it because I wanted the GNU Emacs interface.  I am very
-familiar and comfortable with the Emacs interface (with just a few
-modifications of my own) and dislike having to use applications with
-embedded editors; they never live up to Emacs.
-
-MH is the mail reader of choice at BBN, so I converted to it.  Since I
-didn't want to give up using an Emacs interface, I started using mh-e.
-As is my wont, I started hacking on it almost immediately.  I first used
-version 3.4m.  One of the first features I added was to treat the folder
-buffer as a file-visiting buffer: you could lock it, save it, and be
-warned of unsaved changes when killing it.  I also worked to bring its
-functionality a little closer to RMAIL@.  Jim Larus was very cooperative
-about merging in my changes, and my efforts first appeared in version
-3.6, distributed with Emacs 18.52 in 1988.  Next I decided mh-e was too
-slow and optimized it a lot.  Version, 3.7, distributed with Emacs 18.56
-in 1990, was noticeably faster.
-
-When I moved to the X Consortium I became the first person there to not
-use xmh.  (There is now one other engineer there using mh-e.)  About
-this point I took over maintenance of mh-e from Jim and was finally able
-to add some features Jim hadn't accepted, such as the backward searching
-undo.  My first release was 3.8 (Emacs 18.58) in 1992.
-
-Now, in 1994, we see a flurry of releases, with both 4.0 and 5.0.
-Version 4.0 added many new features, including background folder
-collection and support for composing @sc{mime} messages.  (Reading
-@sc{mime} messages remains to be done, alas.)  While writing this book,
-Bill Wohler gave mh-e its closest examination ever, uncovering bugs and
-inconsistencies that required a new major version to fix, and so version
-5 was released.
-
-Stephen Gildea, June 1994
-
-@node Changes to mh-e, Copying, History, Top
-@appendix Changes to mh-e
-
-@cindex @code{mh-e}: comparison between versions
-
-mh-e had a fairly major facelift between @w{Versions 3} and 4.  The
-differences between @w{Versions 4} and 5 from the user's viewpoint are
-relatively minor.  The prompting order for the folder and message number
-in a couple of functions had been switched inadvertently in @w{Version
-4}.  @w{Version 5} switches the order back.  The @file{+inbox} folder is
-no longer hard-coded, but rather uses the @samp{Inbox} MH Profile entry.
-See the file @file{etc/MH-E-NEWS} in the Emacs distribution for more
-details on the changes.
-
-This section documents the changes between @w{Version 3} and newer
-versions so that you'll know which commands to use (or which commands
-you won't have) in case you're stuck with an old version.
-
-The following tables summarize the changes to buffer names, commands
-and variables.
-
-@unnumberedsec Buffer Mode Names
-
-@example
-@group
-@b{Version 3}           @b{Version 4}
-
-mh-e folder        MH-Folder
-mh-e scan          MH-Folder
-mh-e show          MH-Folder Show
-Fundamental        MH-Show
-mh-e letter        MH-Letter
-mh-e letter        MH-Pick
-@end group
-@end example
-
-@page
-
-@unnumberedsec Commands
-
-@example
-@group
-           @b{Version 3}                        @b{Version 4}
-
-@b{Function}               @b{Command}   @b{Command}          @b{Function}
-
-mh-first-msg           <          M-<               mh-first-msg
--                      -          M->               mh-last-msg
-mh-show                .          RET               mh-show
--                      -          ,                 mh-header-display
-mh-reply               a          r                 mh-reply
-mh-redistribute        r          M-d               mh-redistribute
-mh-unshar-msg          -          M-n               mh-store-msg
-mh-write-msg-to-file   M-o        C-o               mh-write-msg-to-file
-mh-delete-msg-from-seq C-u M-%    M-#               mh-delete-seq
--                      -          M-q               mh-list-sequences
-mh-quit                b          q                 mh-quit
--                      -          C-C C-f C-r       mh-to-field (@samp{From:})
--                      -          C-C C-f C-d       mh-to-field (@samp{Dcc:})
-@end group
-@end example
-
-@unnumberedsec Variables
-
-@example
-@group
-          @b{Version 3}                           @b{Version 4}
-
-@b{Variable}              @b{Value}             @b{Value}           @b{Variable}
-
-mh-show-buffer-      "@{%%b@}  %s/%d"    "@{show-%s@} %d"  mh-show-buffer-
-mode-line-buffer-id                                    mode-line-buffer-id
-mh-unshar-default-   ""                nil             mh-store-default-
-directory                                              directory
-@end group
-@end example
-
-
-@unnumberedsec New Variables
-
-@example
-@group
-mail-citation-hook                           mh-new-draft-cleaned-headers
-mail-header-separator                        mh-pick-mode-hook
-mh-auto-folder-collect                       mh-refile-msg-hook
-mh-comp-formfile                             mh-scan-prog
-mh-repl-formfile                             mh-send-prog
-mh-delete-msg-hook                           mh-show-hook
-mh-forward-subject-format                    mh-show-mode-hook
-mh-inc-prog                                  mh-signature-file-name
-mh-mime-content-types                        mh-sortm-args
-mh-default-folder-for-message-function       mh-repl-formfile
-mh-mhn-args
-@end group
-@end example
-
-@node Copying, Command Index, Changes to mh-e, Top
-@appendix GNU GENERAL PUBLIC LICENSE
-@center Version 2, June 1991
-
-@display
-Copyright @copyright{} 1989, 1991 Free Software Foundation, Inc.
-675 Mass Ave, Cambridge, MA 02139, USA
-
-Everyone is permitted to copy and distribute verbatim copies
-of this license document, but changing it is not allowed.
-@end display
-
-@appendixsec Preamble
-
-  The licenses for most software are designed to take away your
-freedom to share and change it.  By contrast, the GNU General Public
-License is intended to guarantee your freedom to share and change free
-software---to make sure the software is free for all its users.  This
-General Public License applies to most of the Free Software
-Foundation's software and to any other program whose authors commit to
-using it.  (Some other Free Software Foundation software is covered by
-the GNU Library General Public License instead.)  You can apply it to
-your programs, too.
-
-  When we speak of free software, we are referring to freedom, not
-price.  Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
-
-  To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if you
-distribute copies of the software, or if you modify it.
-
-  For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must give the recipients all the rights that
-you have.  You must make sure that they, too, receive or can get the
-source code.  And you must show them these terms so they know their
-rights.
-
-  We protect your rights with two steps: (1) copyright the software, and
-(2) offer you this license which gives you legal permission to copy,
-distribute and/or modify the software.
-
-  Also, for each author's protection and ours, we want to make certain
-that everyone understands that there is no warranty for this free
-software.  If the software is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original, so
-that any problems introduced by others will not reflect on the original
-authors' reputations.
-
-  Finally, any free program is threatened constantly by software
-patents.  We wish to avoid the danger that redistributors of a free
-program will individually obtain patent licenses, in effect making the
-program proprietary.  To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
-
-  The precise terms and conditions for copying, distribution and
-modification follow.
-
-@iftex
-@appendixsec TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-@end iftex
-@ifinfo
-@center TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-@end ifinfo
-
-@enumerate 0
-@item
-This License applies to any program or other work which contains
-a notice placed by the copyright holder saying it may be distributed
-under the terms of this General Public License.  The ``Program'', below,
-refers to any such program or work, and a ``work based on the Program''
-means either the Program or any derivative work under copyright law:
-that is to say, a work containing the Program or a portion of it,
-either verbatim or with modifications and/or translated into another
-language.  (Hereinafter, translation is included without limitation in
-the term ``modification''.)  Each licensee is addressed as ``you''.
-
-Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope.  The act of
-running the Program is not restricted, and the output from the Program
-is covered only if its contents constitute a work based on the
-Program (independent of having been made by running the Program).
-Whether that is true depends on what the Program does.
-
-@item
-You may copy and distribute verbatim copies of the Program's
-source code as you receive it, in any medium, provided that you
-conspicuously and appropriately publish on each copy an appropriate
-copyright notice and disclaimer of warranty; keep intact all the
-notices that refer to this License and to the absence of any warranty;
-and give any other recipients of the Program a copy of this License
-along with the Program.
-
-You may charge a fee for the physical act of transferring a copy, and
-you may at your option offer warranty protection in exchange for a fee.
-
-@item
-You may modify your copy or copies of the Program or any portion
-of it, thus forming a work based on the Program, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
-@enumerate a
-@item
-You must cause the modified files to carry prominent notices
-stating that you changed the files and the date of any change.
-
-@item
-You must cause any work that you distribute or publish, that in
-whole or in part contains or is derived from the Program or any
-part thereof, to be licensed as a whole at no charge to all third
-parties under the terms of this License.
-
-@item
-If the modified program normally reads commands interactively
-when run, you must cause it, when started running for such
-interactive use in the most ordinary way, to print or display an
-announcement including an appropriate copyright notice and a
-notice that there is no warranty (or else, saying that you provide
-a warranty) and that users may redistribute the program under
-these conditions, and telling the user how to view a copy of this
-License.  (Exception: if the Program itself is interactive but
-does not normally print such an announcement, your work based on
-the Program is not required to print an announcement.)
-@end enumerate
-
-These requirements apply to the modified work as a whole.  If
-identifiable sections of that work are not derived from the Program,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works.  But when you
-distribute the same sections as part of a whole which is a work based
-on the Program, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Program.
-
-In addition, mere aggregation of another work not based on the Program
-with the Program (or with a work based on the Program) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
-@item
-You may copy and distribute the Program (or a work based on it,
-under Section 2) in object code or executable form under the terms of
-Sections 1 and 2 above provided that you also do one of the following:
-
-@enumerate a
-@item
-Accompany it with the complete corresponding machine-readable
-source code, which must be distributed under the terms of Sections
-1 and 2 above on a medium customarily used for software interchange; or,
-
-@item
-Accompany it with a written offer, valid for at least three
-years, to give any third party, for a charge no more than your
-cost of physically performing source distribution, a complete
-machine-readable copy of the corresponding source code, to be
-distributed under the terms of Sections 1 and 2 above on a medium
-customarily used for software interchange; or,
-
-@item
-Accompany it with the information you received as to the offer
-to distribute corresponding source code.  (This alternative is
-allowed only for noncommercial distribution and only if you
-received the program in object code or executable form with such
-an offer, in accord with Subsection b above.)
-@end enumerate
-
-The source code for a work means the preferred form of the work for
-making modifications to it.  For an executable work, complete source
-code means all the source code for all modules it contains, plus any
-associated interface definition files, plus the scripts used to
-control compilation and installation of the executable.  However, as a
-special exception, the source code distributed need not include
-anything that is normally distributed (in either source or binary
-form) with the major components (compiler, kernel, and so on) of the
-operating system on which the executable runs, unless that component
-itself accompanies the executable.
-
-If distribution of executable or object code is made by offering
-access to copy from a designated place, then offering equivalent
-access to copy the source code from the same place counts as
-distribution of the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
-@item
-You may not copy, modify, sublicense, or distribute the Program
-except as expressly provided under this License.  Any attempt
-otherwise to copy, modify, sublicense or distribute the Program is
-void, and will automatically terminate your rights under this License.
-However, parties who have received copies, or rights, from you under
-this License will not have their licenses terminated so long as such
-parties remain in full compliance.
-
-@item
-You are not required to accept this License, since you have not
-signed it.  However, nothing else grants you permission to modify or
-distribute the Program or its derivative works.  These actions are
-prohibited by law if you do not accept this License.  Therefore, by
-modifying or distributing the Program (or any work based on the
-Program), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Program or works based on it.
-
-@item
-Each time you redistribute the Program (or any work based on the
-Program), the recipient automatically receives a license from the
-original licensor to copy, distribute or modify the Program subject to
-these terms and conditions.  You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
-this License.
-
-@item
-If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License.  If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Program at all.  For example, if a patent
-license would not permit royalty-free redistribution of the Program by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Program.
-
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply and the section as a whole is intended to apply in other
-circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system, which is
-implemented by public license practices.  Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
-@item
-If the distribution and/or use of the Program is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Program under this License
-may add an explicit geographical distribution limitation excluding
-those countries, so that distribution is permitted only in or among
-countries not thus excluded.  In such case, this License incorporates
-the limitation as if written in the body of this License.
-
-@item
-The Free Software Foundation may publish revised and/or new versions
-of the General Public License from time to time.  Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-Each version is given a distinguishing version number.  If the Program
-specifies a version number of this License which applies to it and ``any
-later version'', you have the option of following the terms and conditions
-either of that version or of any later version published by the Free
-Software Foundation.  If the Program does not specify a version number of
-this License, you may choose any version ever published by the Free Software
-Foundation.
-
-@item
-If you wish to incorporate parts of the Program into other free
-programs whose distribution conditions are different, write to the author
-to ask for permission.  For software which is copyrighted by the Free
-Software Foundation, write to the Free Software Foundation; we sometimes
-make exceptions for this.  Our decision will be guided by the two goals
-of preserving the free status of all derivatives of our free software and
-of promoting the sharing and reuse of software generally.
-
-@iftex
-@heading NO WARRANTY
-@end iftex
-@ifinfo
-@center NO WARRANTY
-@end ifinfo
-
-@item
-BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
-FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW@.  EXCEPT WHEN
-OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
-PROVIDE THE PROGRAM ``AS IS'' WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
-OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE@.  THE ENTIRE RISK AS
-TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU@.  SHOULD THE
-PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
-REPAIR OR CORRECTION.
-
-@item
-IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
-TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
-YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
-PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGES.
-@end enumerate
-
-@iftex
-@heading END OF TERMS AND CONDITIONS
-@end iftex
-@ifinfo
-@center END OF TERMS AND CONDITIONS
-@end ifinfo
-
-@page
-@appendixsec How to Apply These Terms to Your New Programs
-
-  If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
-  To do so, attach the following notices to the program.  It is safest
-to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least
-the ``copyright'' line and a pointer to where the full notice is found.
-
-@smallexample
-@var{one line to give the program's name and an idea of what it does.}
-Copyright (C) 19@var{yy}  @var{name of author}
-
-This program 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
-of the License, or (at your option) any later version.
-
-This program 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 this program; if not, write to the Free Software
-Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-@end smallexample
-
-Also add information on how to contact you by electronic and paper mail.
-
-If the program is interactive, make it output a short notice like this
-when it starts in an interactive mode:
-
-@smallexample
-Gnomovision version 69, Copyright (C) 19@var{yy} @var{name of author}
-Gnomovision comes with ABSOLUTELY NO WARRANTY; for details
-type `show w'.  This is free software, and you are welcome
-to redistribute it under certain conditions; type `show c' 
-for details.
-@end smallexample
-
-The hypothetical commands @samp{show w} and @samp{show c} should show
-the appropriate parts of the General Public License.  Of course, the
-commands you use may be called something other than @samp{show w} and
-@samp{show c}; they could even be mouse-clicks or menu items---whatever
-suits your program.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a ``copyright disclaimer'' for the program, if
-necessary.  Here is a sample; alter the names:
-
-@smallexample
-@group
-Yoyodyne, Inc., hereby disclaims all copyright
-interest in the program `Gnomovision'
-(which makes passes at compilers) written 
-by James Hacker.
-
-@var{signature of Ty Coon}, 1 April 1989
-Ty Coon, President of Vice
-@end group
-@end smallexample
-
-This General Public License does not permit incorporating your program into
-proprietary programs.  If your program is a subroutine library, you may
-consider it more useful to permit linking proprietary applications with the
-library.  If this is what you want to do, use the GNU Library General
-Public License instead of this License.
-
-@node    Command Index, Variable Index, Copying, Top
-@unnumbered Command Index
-
-@printindex fn
-
-@node    Variable Index, Concept Index, Command Index, Top
-@unnumbered Variable Index
-
-@printindex vr
-
-@node    Concept Index,  , Variable Index, Top
-@unnumbered Concept Index
-
-@printindex cp
-
-@contents
-@bye
-
-@c XXX In the sections on customizing mh-e, you can add cross-references
-@c to the Emacs manual and the Emacs Lisp manual wherever they are
-@c useful. @pxref{node, , section, emacs, The GNU Emacs Manual}
--- a/man/rmail.texi	Mon Aug 13 10:01:24 2007 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,891 +0,0 @@
-\input texinfo  @comment -*-Texinfo-*-
-@setfilename ../info/rmail.info
-@settitle Rmail User's Manual
-@iftex
-@finalout
-@end iftex
-@c @setchapternewpage odd		% For book style double sided manual.
-@c      @smallbook
-@tex
-\overfullrule=0pt
-%\global\baselineskip 30pt      % For printing in double spaces
-@end tex
-@ifinfo
-This file documents the Rmail mail reader.
-
-Copyright (C) 1991 Free Software Foundation
-
-Permission is granted to make and distribute verbatim copies of
-this manual provided the copyright notice and this permission notice
-are preserved on all copies.
-
-@ignore
-Permission is granted to process this file through Tex and print the
-results, provided the printed document carries copying permission
-notice identical to this one except for the removal of this paragraph
-(this paragraph not being relevant to the printed manual).
-
-@end ignore
-@end ifinfo
-@c
-@titlepage
-@sp 6
-@center @titlefont{Rmail User's Manual}
-@sp 10
-@center Free Software Foundation
-@page
-@vskip 0pt plus 1filll
-Copyright @copyright{} 1991 Free Software Foundation
-
-Permission is granted to make and distribute verbatim copies of
-this manual provided the copyright notice and this permission notice
-are preserved on all copies.
-
-@end titlepage
-@page
-
-@node Top, Rmail Scrolling,, (DIR)
-
-NOTE: The recommended mail reader in XEmacs is VM, which provides more
-flexibility than Rmail and stores mail in standard Unix-mail-format
-folders rather than in a special format.  VM comes with its own
-manual, included standard with XEmacs.
-
-XEmacs also provides a sophisticated and comfortable front-end to the
-MH mail-processing system, called @samp{mh-e}.
-
-  This manual documents the Rmail mail reader under Emacs.
-
-  Rmail is an Emacs subsystem for reading and disposing of mail that you
-receive.  Rmail stores mail messages in files called Rmail files.  You read
-the messages in an Rmail file in a special major mode, Rmail mode,
-which redefines most letters to run commands for managing mail.  To enter
-Rmail, type @kbd{M-x rmail}.  This reads your primary mail file, merges
-new mail in from your inboxes, displays the first new message, and lets
-you begin reading.
-
-@cindex primary mail file
-  Using Rmail in the simplest fashion, you have one Rmail file,
-@file{~/RMAIL}, in which all of your mail is saved.  It is called your
-@dfn{primary mail file}.  You can also copy messages into other Rmail
-files and then edit those files with Rmail.
-
-  Rmail displays only one message at a time.  It is called the
-@dfn{current message}.  Rmail mode's special commands can move to
-another message, delete the message, copy the message into another file,
-or send a reply.
-
-@cindex message number
-  Within the Rmail file, messages are arranged sequentially in order
-of receipt.  They are also assigned consecutive integers as their
-@dfn{message numbers}.  The number of the current message is displayed
-in Rmail's mode line, followed by the total number of messages in the
-file.  You can move to a message by specifying its message number
-using the @kbd{j} key (@pxref{Rmail Motion}).
-
-@kindex s (Rmail)
-@findex rmail-save
-  Following the usual conventions of Emacs, changes in an Rmail file become
-permanent only when the file is saved.  You can do this with @kbd{s}
-(@code{rmail-save}), which also expunges deleted messages from the file
-first (@pxref{Rmail Deletion}).  To save the file without expunging, use
-@kbd{C-x C-s}.  Rmail saves the Rmail file automatically when moving new
-mail from an inbox file (@pxref{Rmail Inbox}).
-
-@kindex q (Rmail)
-@findex rmail-quit
-  You can exit Rmail with @kbd{q} (@code{rmail-quit}); this expunges and
-saves the Rmail file and then switches to another buffer.  However, there is
-no need to `exit' formally.  If you switch from Rmail to editing in
-other buffers, and never happen to switch back, you have exited.  Just
-make sure to save the Rmail file eventually (like any other file you
-have changed).  @kbd{C-x s} is a good enough way to do this.
-
-@menu
-* Scroll: Rmail Scrolling.   Scrolling through a message.
-* Motion: Rmail Motion.      Moving to another message.
-* Deletion: Rmail Deletion.  Deleting and expunging messages.
-* Inbox: Rmail Inbox.        How mail gets into the Rmail file.
-* Files: Rmail Files.        Using multiple Rmail files.
-* Output: Rmail Output.	     Copying message out to files.
-* Labels: Rmail Labels.      Classifying messages by labeling them.
-* Summary: Rmail Summary.    Summaries show brief info on many messages.
-* Reply: Rmail Reply.        Sending replies to messages you are viewing.
-* Editing: Rmail Editing.    Editing message text and headers in Rmail.
-* Digest: Rmail Digest.      Extracting the messages from a digest message.
-@end menu
-
-@node Rmail Scrolling, Rmail Motion, Top, Top
-@chapter Scrolling Within a Message
-
-  When Rmail displays a message that does not fit on the screen, you
-have to scroll through it.  You could use @kbd{C-v}, @kbd{M-v},
-and @kbd{M-<}, but scrolling is so frequent in Rmail that it deserves to be
-easier to type.
-
-@table @kbd
-@item @key{SPC}
-Scroll forward (@code{scroll-up}).
-@item @key{DEL}
-Scroll backward (@code{scroll-down}).
-@item .
-Scroll to start of message (@code{rmail-beginning-of-message}).
-@end table
-
-@kindex SPC (Rmail)
-@kindex DEL (Rmail)
-  Since the most common thing to do while reading a message is to scroll
-through it by screenfuls, Rmail makes @key{SPC} and @key{DEL} synonyms of
-@kbd{C-v} (@code{scroll-up}) and @kbd{M-v} (@code{scroll-down})
-
-@kindex . (Rmail)
-@findex rmail-beginning-of-message
-  The command @kbd{.} (@code{rmail-beginning-of-message}) scrolls back to the
-beginning of a selected message.  This is not quite the same as @kbd{M-<}:
-first, it does not set the mark; secondly, it resets the buffer
-boundaries to the current message if you have changed them.
-
-@node Rmail Motion, Rmail Deletion, Rmail Scrolling, Top
-@chapter Moving Among Messages
-
-  The most basic thing to do with a message is to read it.  The way to
-do this in Rmail is to make the message current.  You can make any
-message current, given its message number, by using the @kbd{j} command, but
-people most often move sequentially through the file, since this is the
-order of receipt of messages.  When you enter Rmail, you are positioned
-at the first new message (new messages are those received after you last
-used Rmail), or at the last message if there are no new messages this
-time.  Move forward to see other new messages if there are any; move
-backward to re-examine old messages.
-
-@table @kbd
-@item n
-Move to the next non-deleted message, skipping any intervening deleted @*
-messages (@code{rmail-next-undeleted-message}).
-@item p
-Move to the previous non-deleted message @*
-(@code{rmail-previous-undeleted-message}).
-@item M-n
-Move to the next message, including deleted messages
-(@code{rmail-next-message}).
-@item M-p
-Move to the previous message, including deleted messages
-(@code{rmail-previous-message}).
-@item j
-Move to the first message.  With argument @var{n}, move to
-message number @var{n} (@code{rmail-show-message}).
-@item >
-Move to the last message (@code{rmail-last-message}).
-
-@item M-s @var{regexp} @key{RET}
-Move to the next message containing a match for @var{regexp}
-(@code{rmail-search}).  If @var{regexp} is empty, the last regexp used is
-used again.
-
-@item - M-s @var{regexp} @key{RET}
-Move to the previous message containing a match for @var{regexp}.
-If @var{regexp} is empty, the last regexp used is used again.
-@end table
-
-@kindex n (Rmail)
-@kindex p (Rmail)
-@kindex M-n (Rmail)
-@kindex M-p (Rmail)
-@findex rmail-next-undeleted-message
-@findex rmail-previous-undeleted-message
-@findex rmail-next-message
-@findex rmail-previous-message
-  To move among messages in Rmail, you can use @kbd{n} and @kbd{p}.
-These keys move through the messages sequentially but skip over deleted
-messages, which is usually what you want to do.  Their command
-definitions are named @code{rmail-next-undeleted-message} and
-@code{rmail-previous-undeleted-message}.  If you do not want to skip
-deleted messages---for example, if you want to move to a message to
-undelete it---use the variants @kbd{M-n} (@code{rmail-next-message}) and
-@kbd{M-p} (@code{rmail-previous-message}).  A numeric argument to any of
-these commands serves as a repeat count.@refill
-
-  In Rmail, you can specify a numeric argument by just typing the digits.
-It is not necessary to type @kbd{C-u} first.
-
-@kindex M-s (Rmail)
-@findex rmail-search
-  The @kbd{M-s} (@code{rmail-search}) command is Rmail's version of
-search.  The usual incremental search command @kbd{C-s} works in Rmail,
-but searches only within the current message.  The purpose of @kbd{M-s}
-is to search for another message.  It reads a regular expression
-non-incrementally, then starts searching at the beginning of the
-following message for a match.  The message containing the match is
-selected.
-
-  To search backward in the file for another message, give @kbd{M-s} a
-negative argument.  In Rmail you can do this with @kbd{- M-s}.
-
-  It is also possible to search for a message based on labels.
-@xref{Rmail Labels}.
-
-@kindex j (Rmail)
-@kindex > (Rmail)
-@findex rmail-show-message
-@findex rmail-last-message
-  To move to a message specified by absolute message number, use @kbd{j}
-(@code{rmail-show-message}) with the message number as argument.  With
-no argument, @kbd{j} selects the first message.  @kbd{>}
-(@code{rmail-last-message}) selects the last message.
-
-@node Rmail Deletion, Rmail Inbox, Rmail Motion, Top
-@chapter Deleting Messages
-
-@cindex deletion (Rmail)
-  When you no longer need to keep a message, you can @dfn{delete} it.  This
-flags it as ignorable, and some Rmail commands will pretend it is no longer
-present, but it still has its place in the Rmail file and still has its
-message number.
-
-@cindex expunging (Rmail)
-  @dfn{Expunging} the Rmail file actually removes the deleted messages.
-The remaining messages are renumbered consecutively.  Expunging is the only
-action that changes the message number of any message, except for
-undigestifying (@pxref{Rmail Digest}).
-
-@table @kbd
-@item d
-Delete the current message and move to the next non-deleted message
-(@code{rmail-delete-forward}).
-@item C-d
-Delete the current message and move to the previous non-deleted
-message (@code{rmail-delete-backward}).
-@item u
-Undelete the current message, or move back to a deleted message and
-undelete it (@code{rmail-undelete-previous-message}).
-@item e
-@itemx x
-Expunge the Rmail file (@code{rmail-expunge}).  These two
-commands are synonyms.
-@end table
-
-@kindex d (Rmail)
-@kindex C-d (Rmail)
-@findex rmail-delete-forward
-@findex rmail-delete-backward
-  There are two Rmail commands for deleting messages.  Both delete the
-current message and select another message.  @kbd{d}
-(@code{rmail-delete-forward}) moves to the following message, skipping
-messages already deleted, while @kbd{C-d} (@code{rmail-delete-backward})
-moves to the previous non-deleted message.  If there is no non-deleted
-message to move to in the specified direction, the message that was just
-deleted remains current.
-
-@cindex undeletion (Rmail)
-@kindex e (Rmail)
-@findex rmail-expunge
-  To make all deleted messages disappear from the Rmail file, type
-@kbd{e} (@code{rmail-expunge}).  Until you do this, you can still
-@dfn{undelete} the deleted messages.
-
-@kindex u (Rmail)
-@findex rmail-undelete-previous-message
-  To undelete, type
-@kbd{u} (@code{rmail-undelete-previous-message}), which cancels the
-effect of a @kbd{d} command (usually).  It undeletes the current message
-if the current message is deleted.  Otherwise it moves backward to previous
-messages until a deleted message is found, and undeletes that message.
-
-  You can usually undo a @kbd{d} with a @kbd{u} because the @kbd{u}
-moves back to and undeletes the message that the @kbd{d} deleted.  This
-does not work when the @kbd{d} skips a few already-deleted messages that
-follow the message being deleted; in that case the @kbd{u} command
-undeletes the last of the messages that were skipped.  There is no clean
-way to avoid this problem.  However, by repeating the @kbd{u} command,
-you can eventually get back to the message you intended to
-undelete.  You can also reach that message with @kbd{M-p} commands and
-then type @kbd{u}.@refill
-
-  A deleted message has the @samp{deleted} attribute, and as a result
-@samp{deleted} appears in the mode line when the current message is
-deleted.  In fact, deleting or undeleting a message is nothing more than
-adding or removing this attribute.  @xref{Rmail Labels}.
-
-@node Rmail Inbox, Rmail Files, Rmail Deletion, Top
-@chapter Rmail Files and Inboxes
-@cindex inbox file
-
-  Unix places your incoming mail in a file called your @dfn{inbox}.
-When you start up Rmail, it copies the new messages from your inbox into
-your primary mail file, an Rmail file which also contains other messages
-saved from previous Rmail sessions.  In this file, you actually
-read the mail with Rmail.  The operation is called @dfn{getting new mail}.
-You can repeat it at any time using the @kbd{g} key in Rmail.  The inbox
-file name is @file{/usr/spool/mail/@var{username}} in Berkeley Unix,
-@file{/usr/mail/@var{username}} in system V.
-
-  There are two reason for having separate Rmail files and inboxes.
-
-@enumerate
-@item
-The format in which Unix delivers the mail in the inbox is not
-adequate for Rmail mail storage.  It has no way to record attributes
-(such as @samp{deleted}) or user-specified labels; it has no way to record
-old headers and reformatted headers; it has no way to record cached
-summary line information.
-
-@item
-It is very cumbersome to access an inbox file without danger of losing
-mail, because it is necessary to interlock with mail delivery.
-Moreover, different Unix systems use different interlocking
-techniques.  The strategy of moving mail out of the inbox once and for
-all into a separate Rmail file avoids the need for interlocking in all
-the rest of Rmail, since only Rmail operates on the Rmail file.
-@end enumerate
-
-  When getting new mail, Rmail first copies the new mail from the inbox
-file to the Rmail file and saves the Rmail file.  It then deletes the
-inbox file.  This way a system crash may cause duplication of mail between
-the inbox and the Rmail file, but it cannot lose mail.
-
-  Copying mail from an inbox in the system's mailer directory actually puts
-it in an intermediate file, @file{~/.newmail}.  This is because the
-interlocking is done by a C program that copies to another file.
-@file{~/.newmail} is deleted after mail merging is successful.  If there is
-a crash at the wrong time, this file will continue to exist and will be
-used as an inbox the next time you get new mail.
-
-@node Rmail Files, Rmail Output, Rmail Inbox, Top
-@chapter Multiple Mail Files
-
-  Rmail operates by default on your @dfn{primary mail file}, which is
-named @file{~/RMAIL} and which receives your incoming mail from your
-system inbox file. You can also have other mail files and edit them with
-Rmail.  These files can receive mail through their own inboxes, or you
-can move messages into them by explicit command in Rmail (@pxref{Rmail
-Output}).
-
-@table @kbd
-@item i @var{file} @key{RET}
-Read @var{file} into Emacs and run Rmail on it (@code{rmail-input}).
-
-@item M-x set-rmail-inbox-list @key{RET} @var{files} @key{RET}
-Specify inbox file names for current Rmail file to get mail from.
-
-@item g
-Merge new mail from current Rmail file's inboxes
-(@code{rmail-get-new-mail}).
-
-@item C-u g @var{file}
-Merge new mail from inbox file @var{file}.
-@end table
-
-@kindex i (Rmail)
-@findex rmail-input
-  To run Rmail on a file other than your primary mail file, you may use
-the @kbd{i} (@code{rmail-input}) command in Rmail.  This visits the
-file, puts it in Rmail mode, and then gets new mail from the file's
-inboxes if any.  You can also use @kbd{M-x rmail-input} even when not in
-Rmail.
-
-  The file you read with @kbd{i} does not have to be in Rmail file format.
-It could also be Unix mail format, mmdf format, or it could be a mixture
-of all three, as long as each message has one of the three formats.
-Rmail recognizes all three and converts all the messages to proper Rmail
-format before showing you the file.
-
-@findex set-rmail-inbox-list
-  Each Rmail file can contain a list of inbox file names; you can specify
-this list with @kbd{M-x set-rmail-inbox-list @key{RET} @var{files}
-@key{RET}}.  The argument can contain any number of file names, separated
-by commas.  It can also be empty, which specifies that this file should
-have no inboxes.  Once a list of inboxes is specified, the Rmail file
-remembers it permanently until it is explicitly changed.@refill
-
-@kindex g (Rmail)
-@findex rmail-get-new-mail
-  If an Rmail file has inboxes, new mail is merged in from the inboxes
-when you bring the Rmail file into Rmail, and when you use the @kbd{g}
-(@code{rmail-get-new-mail}) command.  If the Rmail file
-specifies no inboxes, then no new mail is merged in at these times.  A
-special exception is made for your primary mail file: Rmail uses the
-standard system inbox for it if it does not specify an inbox.
-
-  To merge mail from a file that is not the usual inbox, give the
-@kbd{g} key a numeric argument, as in @kbd{C-u g}.  Rmail prompts you
-for a file name and merges mail from that file.  The inbox file is not
-deleted or changed at all when you use @kbd{g} with an argument, so this
-is a general way of merging one file of messages into another.
-
-@node Rmail Output, Rmail Labels, Rmail Files, Top
-@chapter Copying Messages Out to Files
-
-@table @kbd
-@item o @var{file} @key{RET}
-Append a copy of the current message to the file @var{file},
-writing it in Rmail file format (@code{rmail-output-to-rmail-file}).
-
-@item C-o @var{file} @key{RET}
-Append a copy of the current message to the file @var{file},
-writing it in Unix mail file format (@code{rmail-output}).
-@end table
-
-@kindex o (Rmail)
-@findex rmail-output-to-rmail-file
-@kindex C-o (Rmail)
-@findex rmail-output
-  If an Rmail file has no inboxes, use explicit @kbd{o} commands to
-write Rmail files.
-
-  @kbd{o} (@code{rmail-output-to-rmail-file}) appends the current
-message in Rmail format to the end of a specified file.  This is the
-best command to use to move messages between Rmail files.  If you are
-currently visiting the other Rmail file, copying is done into the other
-file's Emacs buffer instead.  You should eventually save the buffer on
-disk.
-
-  The @kbd{C-o} (@code{rmail-output}) command in Rmail appends a copy of
-the current message to a specified file, in Unix mail file format.  This
-is useful for moving messages into files to be read by other mail
-processors that do not understand Rmail format.
-
-  Copying a message with @kbd{o} or @kbd{C-o} gives the original copy of the
-message the @samp{filed} attribute. @samp{filed} appears in the mode
-line when such a message is current.
-
-  Normally you should use only @kbd{o} to output messages to other Rmail
-files, never @kbd{C-o}.  But it is also safe if you always use
-@kbd{C-o}, never @kbd{o}.  When a file is visited in Rmail, the last
-message is checked, and if it is in Unix format, the entire file is
-scanned and all Unix-format messages are converted to Rmail format.
-(The reason for checking the last message is that scanning the file is
-slow and most Rmail files have only Rmail format messages.)  If you use
-@kbd{C-o} consistently, the last message is guaranteed to be in Unix
-format, so Rmail will convert all messages properly.
-
-When you and other users want to append mail to the same file, you
-probably always want to use @kbd{C-o} instead of @kbd{o}.  Other mail
-processors may not know Rmail format but will know Unix format.
-
-  In any case, always use @kbd{o} to add to an Rmail file that is being
-visited in Rmail.  Adding messages with @kbd{C-o} to the actual disk file
-will trigger a ``simultaneous editing'' warning when you ask to save the
-Emacs buffer, and the messages will be lost if you do save.
-
-@node Rmail Labels, Rmail Summary, Rmail Output, Top
-@chapter Labels
-@cindex label (Rmail)
-@cindex attribute (Rmail)
-
-  Each message can have various @dfn{labels} assigned to it as a means of
-classification.  A label has a name; different names mean different labels.
-Any given label is either present or absent on a particular message.  A few
-label names have standard meanings and are given to messages automatically
-by Rmail when appropriate; these special labels are called @dfn{attributes}.
-All other labels are assigned by the user.
-
-@table @kbd
-@item a @var{label} @key{RET}
-Assign the label @var{label} to the current message (@code{rmail-add-label}).
-@item k @var{label} @key{RET}
-Remove the label @var{label} from the current message (@code{rmail-kill-label}).
-@item C-M-n @var{labels} @key{RET}
-Move to the next message that has one of the labels @var{labels}
-(@code{rmail-next-labeled-message}).
-@item C-M-p @var{labels} @key{RET}
-Move to the previous message that has one of the labels @var{labels}
-(@code{rmail-previous-labeled-message}).
-@item C-M-l @var{labels} @key{RET}
-Make a summary of all messages containing any of the labels @var{labels}
-(@code{rmail-summary-by-labels}).
-@end table
-
-@noindent
-Specifying an empty string for one these commands means to use the last
-label specified for any of these commands.
-
-@kindex a (Rmail)
-@kindex k (rmail)
-@findex rmail-add-label
-@findex rmail-kill-label
-  The @kbd{a} (@code{rmail-add-label}) and @kbd{k}
-(@code{rmail-kill-label}) commands allow you to assign or remove any
-label on the current message.  If the @var{label} argument is empty, it
-means to assign or remove the label most recently assigned or
-removed.
-
-  Once you have given messages labels to classify them as you wish, there
-are two ways to use the labels: in moving and in summaries.
-
-@kindex C-M-n (Rmail)
-@kindex C-M-p (Rmail)
-@findex rmail-next-labeled-message
-@findex rmail-previous-labeled-message
-  The command @kbd{C-M-n @var{labels} @key{RET}}
-(@code{rmail-next-labeled-message}) moves to the next message that has one
-of the labels @var{labels}.  @var{labels} is one or more label names,
-separated by commas.  @kbd{C-M-p} (@code{rmail-previous-labeled-message})
-is similar, but moves backwards to previous messages.  A preceding numeric
-argument to either one serves as a repeat count.@refill
-
-@kindex C-M-l (Rmail)
-@findex rmail-summary-by-labels
-  The command @kbd{C-M-l @var{labels} @key{RET}}
-(@code{rmail-summary-by-labels}) displays a summary containing only the
-messages that have at least one of a specified set of messages.  The
-argument @var{labels} is one or more label names, separated by commas.
-@xref{Rmail Summary}, for information on summaries.@refill
-
-  If the @var{labels} argument to @kbd{C-M-n}, @kbd{C-M-p} or
-@kbd{C-M-l} is empty, it means to use the last set of labels specified
-for any of these commands.
-
-  Some labels such as @samp{deleted} and @samp{filed} have built-in
-meanings and are assigned to or removed from messages automatically at
-appropriate times; these labels are called @dfn{attributes}.  Here is a
-list of Rmail attributes:
-
-@table @samp
-@item unseen
-Means the message has never been current.  Assigned to messages when
-they come from an inbox file, and removed when a message is made
-current.
-@item deleted
-Means the message is deleted.  Assigned by deletion commands and
-removed by undeletion commands (@pxref{Rmail Deletion}).
-@item filed
-Means the message has been copied to some other file.  Assigned by the
-file output commands (@pxref{Rmail Files}).
-@item answered
-Means you have mailed an answer to the message.  Assigned by the @kbd{r}
-command (@code{rmail-reply}).  @xref{Rmail Reply}.
-@item forwarded
-Means you have forwarded the message to other users.  Assigned by the
-@kbd{f} command (@code{rmail-forward}).  @xref{Rmail Reply}.
-@item edited
-Means you have edited the text of the message within Rmail.
-@xref{Rmail Editing}.
-@end table
-
-  All other labels are assigned or removed only by the user, and it is up
-to the user to decide what they mean.
-
-@node Rmail Summary, Rmail Reply, Rmail Labels, Top
-@chapter Summaries
-@cindex summary (Rmail)
-
-  A @dfn{summary} is a buffer Rmail creates and displays to give you an
-overview of the mail in an Rmail file.  It contains one line per message;
-each line shows the message number, the sender, the labels, and the
-subject.  When you select the summary buffer, you can use a number of
-commands to select messages by moving in the summary buffer, or to
-delete or undelete messages.
-
-  A summary buffer applies to a single Rmail file only; if you are
-editing multiple Rmail files, they have separate summary buffers.  The
-summary buffer name is generated by appending @samp{-summary} to the
-Rmail buffer's name.  Only one summary buffer is displayed at a
-time unless you make several windows and select the summary buffers by
-hand.
-
-@menu
-* Rmail Make Summary::  Making various sorts of summaries.
-* Rmail Summary Edit::  Manipulating messages from the summary.
-@end menu
-
-@node Rmail Make Summary, Rmail Summary Edit, Rmail Summary, Rmail Summary
-@section Making Summaries
-
-  Here are the commands to create a summary for the current Rmail file.
-Summaries do not update automatically; to make an updated summary, you
-must use one of the commands again.
-
-@table @kbd
-@item h
-@itemx C-M-h
-Summarize all messages (@code{rmail-summary}).
-@item l @var{labels} @key{RET}
-@itemx C-M-l @var{labels} @key{RET}
-Summarize message that have one or more of the specified labels
-(@code{rmail-summary-by-labels}).
-@item C-M-r @var{rcpts} @key{RET}
-Summarize messages that have one or more of the specified recipients
-(@code{rmail-summary-by-recipients}).
-@end table
-
-@kindex h (Rmail)
-@findex rmail-summary
-  The @kbd{h} or @kbd{C-M-h} (@code{rmail-summary}) command fills the
-summary buffer for the current Rmail file with a summary of all the
-messages in the file.  It then displays and selects the summary buffer
-in another window.
-
-@kindex l (Rmail)
-@kindex C-M-l (Rmail)
-@findex rmail-summary-by-labels
-  The @kbd{l} or @kbd{C-M-l @var{labels} @key{RET}} 
-(@code{rmail-summary-by-labels}) makes
-a partial summary mentioning only the messages that have one or more of the
-labels @var{labels}.  @var{labels} should contain label names separated by
-commas.@refill
-
-@kindex C-M-r (Rmail)
-@findex rmail-summary-by-recipients
-  @kbd{C-M-r @var{rcpts} @key{RET}} (@code{rmail-summary-by-recipients})
-makes a partial summary mentioning only the messages that have one or more
-of the recipients @var{rcpts}.  @var{rcpts} should contain mailing
-addresses separated by commas.@refill
-
-  Note that there is only one summary buffer for any Rmail file; making one
-kind of summary discards any previously made summary.
-
-@node Rmail Summary Edit,, Rmail Make Summary, Rmail Summary
-@section Editing in Summaries
-
-  Summary buffers are given the major mode Rmail Summary mode, which
-provides the following special commands:
-
-@table @kbd
-@item j
-Select the message described by the line that point is on
-(@code{rmail-summary-goto-msg}).
-@item C-n
-Move to next line and select its message in Rmail
-(@code{rmail-summary-next-all}).
-@item C-p
-Move to previous line and select its message
-(@code{rmail-summary-@*previous-all}).
-@item n
-Move to next line, skipping lines saying `deleted', and select its
-message (@code{rmail-summary-next-msg}).
-@item p
-Move to previous line, skipping lines saying `deleted', and select
-its message (@code{rmail-summary-previous-msg}).
-@item d
-Delete the current line's message, then do like @kbd{n}
-(@code{rmail-summary-delete-forward}).
-@item u
-Undelete and select this message or the previous deleted message in
-the summary (@code{rmail-summary-undelete}).
-@item @key{SPC}
-Scroll the other window (presumably Rmail) forward
-(@code{rmail-summary-scroll-msg-up}).
-@item @key{DEL}
-Scroll the other window backward (@code{rmail-summary-scroll-msg-down}).
-@item x
-Kill the summary window (@code{rmail-summary-exit}).
-@item q
-Exit Rmail (@code{rmail-summary-quit}).
-@end table
-
-@kindex C-n (Rmail summary)
-@kindex C-p (Rmail summary)
-@findex rmail-summary-next-all
-@findex rmail-summary-previous-all
-  The keys @kbd{C-n}(@code{rmail-summary-next-all}) and @kbd{C-p}
-(@code{rmail-summary-previous-all}) are modified in Rmail Summary mode.
-In addition to moving point in the summary buffer, they also cause the
-line's message to become current in the associated Rmail buffer.  That
-buffer is also made visible in another window if it is not currently
-visible.
-
-@kindex n (Rmail summary)
-@kindex p (Rmail summary)
-@findex rmail-summary-next-msg
-@findex rmail-summary-previous-msg
-  @kbd{n} and @kbd{p} are similar to @kbd{C-n} and @kbd{C-p}, but skip
-lines that say `message deleted'.  They are like the @kbd{n} and @kbd{p}
-keys of Rmail itself.  Note, however, that in a partial summary these
-commands move only among the message listed in the summary.@refill
-
-@kindex j (Rmail summary)
-@findex rmail-summary-goto-msg
-  The other Emacs cursor motion commands are not changed in Rmail
-Summary mode, so it is easy to get the point on a line whose message is
-not selected in Rmail.  This can also happen if you switch to the Rmail
-window and switch messages there.  To get the Rmail buffer back in sync
-with the summary, use the @kbd{j} (@code{rmail-summary-goto-msg})
-command, which selects the message of the current summary line in Rmail.
-
-@kindex d (Rmail summary)
-@kindex u (Rmail summary)
-@findex rmail-summary-delete-forward
-@findex rmail-summary-undelete
-  Deletion and undeletion can also be done from the summary buffer.
-They always work based on where point is located in the summary buffer,
-ignoring which message is selected in Rmail.  @kbd{d}
-(@code{rmail-summary-delete-forward}) deletes the current line's
-message, then moves to the next line whose message is not deleted and
-selects that message.  The inverse is @kbd{u}
-(@code{rmail-summary-undelete}), which moves back (if necessary) to a
-line whose message is deleted, undeletes that message, and selects it in
-Rmail.
-
-@kindex SPC (Rmail summary)
-@kindex DEL (Rmail summary)
-@findex rmail-summary-scroll-msg-down
-@findex rmail-summary-scroll-msg-up
-  When moving through messages with the summary buffer, it is convenient
-to be able to scroll the message while remaining in the summary window.
-The commands @key{SPC} (@code{rmail-summary-scroll-msg-up}) and
-@key{DEL} (@code{rmail-summary-scroll-msg-down}) do this.  They scroll
-the message just as they do when the Rmail buffer is selected.@refill
-
-@kindex x (Rmail summary)
-@findex rmail-summary-exit
-  When you are finished using the summary, type @kbd{x}
-(@code{rmail-summary-exit}) to kill the summary buffer's window.
-
-@kindex q (Rmail summary)
-@findex rmail-summary-quit
-  You can also exit Rmail while in the summary.  @kbd{q}
-(@code{rmail-summary-quit}) kills the summary window, then saves the
-Rmail file and switches to another buffer.
-
-@node Rmail Reply, Rmail Editing, Rmail Summary, Top
-@chapter Sending Replies
-
-  Rmail has several commands that use Mail mode to send mail.  Only the
-special commands of Rmail for entering Mail mode are documented here.
-Note that the usual keys for sending mail, @kbd{C-x m} and @kbd{C-x 4
-m}, are available in Rmail mode and work just as they usually do.@refill
-
-@table @kbd
-@item m
-Send a message (@code{rmail-mail}).
-@item c
-Continue editing already started outgoing message (@code{rmail-continue}).
-@item r
-Send a reply to the current Rmail message (@code{rmail-reply}).
-@item f
-Forward current message to other users (@code{rmail-forward}).
-@end table
-
-@kindex r (Rmail)
-@findex rmail-reply
-@vindex rmail-dont-reply-to
-@cindex reply to a message
- To reply to a the message you are reading in Rmail, type @kbd{r}
-(@code{rmail-reply}).  This displays the @samp{*mail*} buffer in another
-window, much like @kbd{C-x 4 m}, but pre-initializes the @samp{Subject},
-@samp{To}, @samp{CC}, and @samp{In-reply-to} header fields based on the
-message you reply to.  The @samp{To} field is given the sender of
-that message, and the @samp{CC} gets all the recipients of that message.
-Recipients that match elements of the list
-@code{rmail-dont-reply-to} are omitted; by default, this list contains
-your own mailing address.@refill
-
-  Once you have initialized the @samp{*mail*} buffer this way, sending the
-mail goes as usual.  You can edit the presupplied header fields if they
-are not what you want.
-
-@kindex C-c C-y (Mail mode)
-@findex mail-yank-original
-  One additional Mail mode command is available when you invoke mail
-from Rmail: @kbd{C-c C-y} (@code{mail-yank-original}) inserts into the
-outgoing message a copy of the current Rmail message.  Normally this is
-the message you are replying to, but you can also switch to the Rmail
-buffer, select a different message, switch back, and yank the new current
-message.  Normally the yanked message is indented four spaces and has
-most header fields deleted from it; an argument to @kbd{C-c C-y}
-specifies the amount to indent.  @kbd{C-u C-c C-y} neither indents
-the message nor deletes any header fields.@refill
-
-@kindex f (Rmail)
-@findex rmail-forward
-@cindex forward a message
-  Another frequent reason to send mail in Rmail is to forward the current
-message to other users.  @kbd{f} (@code{rmail-forward}) makes this easy by
-preinitializing the @samp{*mail*} buffer with the current message as the
-text and a subject designating a forwarded message.  All you have to do is
-fill in the recipients and send.@refill
-
-@kindex m (Rmail)
-@findex rmail-mail
-  You can use the @kbd{m} (@code{rmail-mail}) command to start editing an
-outgoing message that is not a reply.  It leaves the header fields empty.
-Its only difference from @kbd{C-x 4 m} is that it makes the Rmail buffer
-accessible for @kbd{C-c y}, just as @kbd{r} does.  Thus @kbd{m} can be
-used to reply to or forward a message; it can do anything @kbd{r} or @kbd{f}
-can do.@refill
-
-@kindex c (Rmail)
-@findex rmail-continue
-  The @kbd{c} (@code{rmail-continue}) command resumes editing the
-@samp{*mail*} buffer, to finish editing an outgoing message you were
-already composing, or to alter a message you have sent.@refill
-
-@node Rmail Editing, Rmail Digest, Rmail Reply, Top
-@chapter Editing Within a Message
-
-  Rmail mode provides a few special commands for moving within and
-editing the current message.  In addition, the usual Emacs commands are
-available (except for a few, such as @kbd{C-M-n} and @kbd{C-M-h}, that
-are redefined by Rmail for other purposes).  However, the Rmail buffer
-is normally read-only, and to alter it you must use the Rmail command
-@kbd{w} described below.
-
-@table @kbd
-@item t
-Toggle display of original headers (@code{rmail-toggle-headers}).
-@item w
-Edit current message (@code{rmail-edit-current-message}).
-@end table
-
-@kindex t (Rmail)
-@findex rmail-toggle-header
-@vindex rmail-ignored-headers
-  Rmail reformats the header of each message before displaying it.
-Normally this involves deleting most header fields, on the grounds that
-they are not interesting.  The variable @code{rmail-ignored-headers}
-should contain a regexp that matches the header fields to discard in
-this way.  The original headers are saved permanently; to see what they
-look like, use the @kbd{t} (@code{rmail-toggle-headers}) command.  This
-discards the reformatted headers of the current message and displays it
-with the original headers.  Repeating @kbd{t} reformats the message
-again.  Selecting the message again also reformats.
-
-@kindex w (Rmail)
-@findex rmail-edit-current-message
-  The Rmail buffer is normally read-only, and most of the characters you
-would type to modify it (including most letters) are redefined as Rmail
-commands.  This is usually not a problem since people rarely want to
-change the text of a message.  When you do want to do this, type @kbd{w}
-(@code{rmail-edit-current-message}), which changes from Rmail mode to
-Rmail Edit mode, another major mode which is nearly the same as Text
-mode.  The mode line indicates this change.
-
-  In Rmail Edit mode, letters insert themselves as usual and the Rmail
-commands are not available.  When you are finished editing the message
-and are ready to go back to Rmail, type @kbd{C-c C-c}, which switches
-back to Rmail mode.  To return to Rmail mode but cancel all the editing
-you have done, type @kbd{C-c C-]}.
-
-@vindex rmail-edit-mode-hook
-  Entering Rmail Edit mode calls the value of the variable
-@code{text-mode-hook} with no arguments, if that value exists and is not
-@code{nil}.  It then does the same with the variable
-@code{rmail-edit-mode-hook} and finally adds the attribute @samp{edited}
-to the message.
-
-@node Rmail Digest,, Rmail Editing, Top
-@chapter Digest Messages
-@cindex digest message
-@cindex undigestify
-
-  A @dfn{digest message} is a message which exists to contain and carry
-several other messages.  Digests are used on moderated mailing lists.  All
-messages that arrive for the list during a period of time, such as one
-day, are put inside a single digest which is then sent to the subscribers.
-Transmitting the single digest uses much less computer time than
-transmitting the individual messages even though the total size is the
-same, because the per-message overhead in network mail transmission is
-considerable.
-
-@findex undigestify-rmail-message
-  When you receive a digest message, the most convenient way to read it is
-to @dfn{undigestify} it: to turn it back into many individual messages.
-You can then read and delete the individual messages as it suits you.
-
-  To undigestify a message, select it and then type @kbd{M-x
-undigestify-rmail-message}.  This copies each submessage as a separate
-Rmail message and inserts them all following the digest.  The digest
-message itself is flagged as deleted.
-
-@contents
-@bye
--- a/man/xemacs-faq.texi	Mon Aug 13 10:01:24 2007 +0200
+++ b/man/xemacs-faq.texi	Mon Aug 13 10:02:21 2007 +0200
@@ -666,6 +666,13 @@
 <URL:http://camelot.mssm.edu/~manin/cyr.el>.
 @end quotation
 
+Rebecca Ore <rebecca.ore@@op.net> writes:
+
+@quotation
+The fullest resource I found on Russian language use (in and out of
+XEmacs) is <URL:http://sunsite.oit.unc.edu/sergei/Software/Software.html>
+@end quotation
+
 @node Q1.4.1, Q1.4.2, Q1.3.7, Introduction
 @section What is a @file{.emacs} and is there a sample one?
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/packages/README	Mon Aug 13 10:02:21 2007 +0200
@@ -0,0 +1,19 @@
+This is a skeletal packages hierarchy that will (eventually) be installed
+if it doesn't already exist.  Installing XEmacs packages into this directory
+in the build area is a mistake.
+
+Subdirectories:
+
+etc/
+This directory is added to the data-directory-list and is used for storing
+data files needed by Lisp packages at run-time.  This includes things like
+image files, sound files, etc.
+
+info/
+This directory is added to the Info-default-directory-list and is used for
+storing info documentation meant to be accessed when the user hits `C-h i'.
+
+lisp/
+This directory and all its subdirectories are added recursively to the
+`load-path' at dump time.  All auto-autoloads.el files found are dumped with
+XEmacs.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/packages/info/localdir	Mon Aug 13 10:02:21 2007 +0200
@@ -0,0 +1,1 @@
+XEmacs packages.
--- a/site-lisp/.precious	Mon Aug 13 10:01:24 2007 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-Dummy file to keep CVS happy.
--- a/src/ChangeLog	Mon Aug 13 10:01:24 2007 +0200
+++ b/src/ChangeLog	Mon Aug 13 10:02:21 2007 +0200
@@ -1,3 +1,128 @@
+1997-10-11  SL Baur  <steve@altair.xemacs.org>
+
+	* callproc.c: New variable infopath-internal.
+	(complex_vars_of_callproc): Declare and initialized it.
+
+	* paths.h.in: New variable PATH_INFOPATH.
+
+1997-10-10  Martin Buchholz  <mrb@eng.sun.com>
+
+	* systty.h:
+	  - change Xemacs --> XEmacs
+
+	* buffer.c:
+	* editfns.c:
+	* msdos.c:
+	  - Remove bogus FSF-origin \n\ sequences.
+
+1997-10-09  Kyle Jones  <kyle_jones@wonderworks.com>
+
+	* doprnt.c (parse_doprnt_spec): parse `*' field width
+	  and precision specs and set up spec forwarding.
+
+	* doprnt.c (emacs_doprnt_1): implement `*' by
+	  forwarding flags, precision and field width data from a
+	  spec to a subsequent spec.
+
+	* editfns.c: document new `*' field width and
+	  precision spec.
+
+1997-10-09  SL Baur  <steve@altair.xemacs.org>
+
+	* database.c (Fclose_database): Rename C function.
+	(Fdatabase_last_error): Ditto.
+	(Fopen_database): Ditto.
+	(Fput_database): Ditto.
+	(Fremove_database): Ditto.
+	(Fget_database): Ditto.
+	(syms_of_dbm): Reflect above changes.
+	From Martin Buchholz <mrb@Eng.Sun.COM>
+
+1997-10-08  Hrvoje Niksic  <hniksic@srce.hr>
+
+	* events.c (Fmake_event): Allow only frames as channel.
+
+1997-10-07  Hrvoje Niksic  <hniksic@srce.hr>
+
+	* extents.c (print_extent_1): Fixed typo.
+
+1997-10-07  Kyle Jones  <kyle_jones@wonderworks.com>
+
+	* insdel.c (buffer_replace_char): if doing delete/insert
+	  because of characters with deiffering byte lengths,move
+	  point forward with the insertion if it was moved backwrad
+	  to equal the insertion point by the earlier deletion.
+
+1997-10-06  SL Baur  <steve@altair.xemacs.org>
+
+	* window.c (Fset_window_dedicated_p): register -> REGISTER.
+
+	* unexalpha.c (update_dynamic_symbols): register-> REGISTER.
+
+	* sysdep.c: Global change: register -> REGISTER.
+
+	* strcat.c (strcat): register -> REGISTER.
+
+	* search.c: Global change: register -> REGISTER.
+
+	* regex.c: Global change: register -> REGISTER.
+	- Ensure REGISTER is always defined.
+	
+	* nt.c: Global change: register -> REGISTER.
+
+	* linuxplay.c: Global change: register -> REGISTER.
+
+	* input-method-xlib.c (best_style): register -> REGISTER.
+
+	* gifalloc.c: Global change: register -> REGISTER.
+	- Ensure REGISTER is always defined.
+	
+	* getloadavg.c (getloadavg): register -> REGISTER.
+
+	* eval.c (unwind_to_catch): [Unused variable] register -> REGISTER.
+
+	* cmds.c (Fpoint_at_bol): register -> REGISTER.
+
+	* chartab.c (check_category_char): register -> REGISTER.
+
+	* buffer.c (assoc_ignore_text_properties): [Unused function]
+	register -> REGISTER.
+
+	* alloca.c: Global change: register -> REGISTER.
+
+	* xmu.h (XmuCopyISOLatin1Lowered): Global change: const -> CONST.
+
+	* gif_lib.h: Global change: const -> CONST.
+
+	* balloon_help.h (balloon_help_move_to_pointer): const -> CONST.
+
+	* xmu.c: Global change: const -> CONST.
+
+	* unexsol2.c (unexec): const -> CONST.
+
+	* unexhp9k3.c (unexec_error): const -> CONST.
+
+	* unexfreebsd.c (unexec_error): const -> CONST.
+
+	* sunOS-fix.c (mbstowcs): const-> CONST.
+	(wcstombs): Ditto.
+
+	* strcpy.c (strcpy): const -> CONST.
+
+	* strcmp.c: Global change: const -> CONST.
+
+	* strcat.c (strcat): const -> CONST.
+
+	* realpath.c (realpath): const -> CONST.
+
+	* keymap.c (where_is_recursive_mapper): const -> CONST.
+
+	* extents.c (extent_priority_sort_function): const -> CONST.
+
+	* dgif_lib.c (DGifOpenFileName): const -> CONST.
+
+	* balloon_help.c: Global change: const -> CONST.
+
 1997-10-03  SL Baur  <steve@altair.xemacs.org>
 
 	* lisp.h: Nuke register declarations.
@@ -598,7 +723,7 @@
 	* Makefile.in: 
 	* s/*.h:
 	* m/*.h:
-	* src/config.h.in:
+	* config.h.in:
 	* src/emacs.c:
 	* version.sh:
 	* configure.in: Another rewrite.
--- a/src/Makefile.in.in	Mon Aug 13 10:01:24 2007 +0200
+++ b/src/Makefile.in.in	Mon Aug 13 10:02:21 2007 +0200
@@ -38,7 +38,11 @@
 etcdir = ../etc/
 
 ## Here are the things that we expect ../configure to edit.
+prefix=@prefix@
 srcdir=@srcdir@
+version=@version@
+infodir=@infodir@
+infopath=@infopath@
 CC=@CC@
 CPP=@CPP@
 CFLAGS=@CFLAGS@
--- a/src/alloca.c	Mon Aug 13 10:01:24 2007 +0200
+++ b/src/alloca.c	Mon Aug 13 10:02:21 2007 +0200
@@ -193,7 +193,7 @@
      unsigned size;
 {
   auto char probe;		/* Probes stack depth: */
-  register char *depth = ADDRESS_FUNCTION (probe);
+  REGISTER char *depth = ADDRESS_FUNCTION (probe);
 
 #if STACK_DIRECTION == 0
   if (STACK_DIR == 0)		/* Unknown growth direction.  */
@@ -204,13 +204,13 @@
      was allocated from deeper in the stack than currently. */
 
   {
-    register header *hp;	/* Traverses linked list.  */
+    REGISTER header *hp;	/* Traverses linked list.  */
 
     for (hp = last_alloca_header; hp != NULL;)
       if ((STACK_DIR > 0 && hp->h.deep > depth)
 	  || (STACK_DIR < 0 && hp->h.deep < depth))
 	{
-	  register header *np = hp->h.next;
+	  REGISTER header *np = hp->h.next;
 
 	  free ((pointer) hp);	/* Collect garbage.  */
 
@@ -228,7 +228,7 @@
   /* Allocate combined header + user data storage.  */
 
   {
-    register pointer new = malloc (sizeof (header) + size);
+    REGISTER pointer new = malloc (sizeof (header) + size);
     /* Address of header.  */
 
     ((header *) new)->h.next = last_alloca_header;
--- a/src/balloon_help.c	Mon Aug 13 10:01:24 2007 +0200
+++ b/src/balloon_help.c	Mon Aug 13 10:02:21 2007 +0200
@@ -83,7 +83,7 @@
 static int    b_maskWidth, b_maskHeight;
 static GC     b_maskGC;
 
-static const char* b_text;
+static CONST char* b_text;
 static int b_width, b_height;
 
 static int b_lastX, b_lastY;
@@ -216,7 +216,7 @@
 ============================================================================*/
 
 static void
-text_extent (XFontStruct* fontStruct, const char* text, int len,
+text_extent (XFontStruct* fontStruct, CONST char* text, int len,
 	     int* width, int* height)
 {
   XCharStruct extent;
@@ -229,13 +229,13 @@
 }
 
 static void
-get_text_size (Display* dpy, XFontStruct* fontStruct, const char* text,
+get_text_size (Display* dpy, XFontStruct* fontStruct, CONST char* text,
 	       int* max_width, int* max_height)
 {
   int width;
   int height;
-  const char* start;
-  const char* end;
+  CONST char* start;
+  CONST char* end;
 
   *max_width = *max_height = 0;
 
@@ -259,10 +259,10 @@
 
 static void
 draw_text (Display* dpy, Window win, GC gc, XFontStruct* fontStruct,
-	   int x, int y, const char* text)
+	   int x, int y, CONST char* text)
 {
-  const char* start;
-  const char* end;
+  CONST char* start;
+  CONST char* end;
   int font_height;
 
   y += fontStruct->ascent;
@@ -543,7 +543,7 @@
 }
 
 void
-balloon_help_show (const char* text)
+balloon_help_show (CONST char* text)
 {
   assert (b_dpy != NULL);
 
--- a/src/balloon_help.h	Mon Aug 13 10:01:24 2007 +0200
+++ b/src/balloon_help.h	Mon Aug 13 10:02:21 2007 +0200
@@ -30,7 +30,7 @@
 			  XFontStruct* font);
 void balloon_help_destroy (void);
 void balloon_help_set_delay (unsigned long milliseconds);
-void balloon_help_show (const char* text);
+void balloon_help_show (CONST char* text);
 void balloon_help_hide (void);
 void balloon_help_move_to_pointer (void);
 
--- a/src/buffer.c	Mon Aug 13 10:01:24 2007 +0200
+++ b/src/buffer.c	Mon Aug 13 10:02:21 2007 +0200
@@ -401,12 +401,12 @@
    and don't ever QUIT.  */
 
 static Lisp_Object
-assoc_ignore_text_properties (register Lisp_Object key, Lisp_Object list)
+assoc_ignore_text_properties (REGISTER Lisp_Object key, Lisp_Object list)
 {
-  register Lisp_Object tail;
+  REGISTER Lisp_Object tail;
   for (tail = list; !NILP (tail); tail = Fcdr (tail))
     {
-      register Lisp_Object elt, tem;
+      REGISTER Lisp_Object elt, tem;
       elt = Fcar (tail);
       tem = Fstring_equal (Fcar (elt), key);
       if (!NILP (tem))
@@ -2005,9 +2005,9 @@
   /* FSF Emacs has the following additional doc at the end of
      before-change-functions and after-change-functions:
 
-That's because these variables are temporarily set to nil.\n\
-As a result, a hook function cannot straightforwardly alter the value of\n\
-these variables.  See the Emacs Lisp manual for a way of\n\
+That's because these variables are temporarily set to nil.
+As a result, a hook function cannot straightforwardly alter the value of
+these variables.  See the Emacs Lisp manual for a way of
 accomplishing an equivalent result by using other variables.
 
      But this doesn't apply under XEmacs because things are
--- a/src/callproc.c	Mon Aug 13 10:01:24 2007 +0200
+++ b/src/callproc.c	Mon Aug 13 10:02:21 2007 +0200
@@ -57,6 +57,7 @@
 Lisp_Object Vexec_path, Vexec_directory, Vdata_directory, Vdoc_directory;
 Lisp_Object Vdata_directory_list;
 Lisp_Object Vconfigure_info_directory, Vsite_directory;
+Lisp_Object Vinfopath_internal;
 
 /* The default base directory XEmacs is installed under. */
 Lisp_Object Vprefix_directory;
@@ -1222,10 +1223,22 @@
 Emacs's info files; the default value for Info-default-directory-list
 includes this.
 */ );
+
 #ifdef PATH_INFO
   Vconfigure_info_directory =
     Ffile_name_as_directory (build_string (PATH_INFO));
 #else
   Vconfigure_info_directory = Qnil;
 #endif
+
+  DEFVAR_LISP ("infopath-internal", &Vinfopath_internal /*
+The configured initial value of Info-default-directory-list.
+*/ );
+
+#ifdef PATH_INFOPATH
+  Vinfopath_internal = build_string (PATH_INFOPATH);
+#else
+  Vinfopath_internal =
+    build_string ("/usr/info:/usr/local/info:/usr/lib/texmf/doc/info:/usr/local/lib/texmf/doc/info");
+#endif
 }
--- a/src/chartab.c	Mon Aug 13 10:01:24 2007 +0200
+++ b/src/chartab.c	Mon Aug 13 10:02:21 2007 +0200
@@ -1592,7 +1592,7 @@
 check_category_char (Emchar ch, Lisp_Object table,
 		     unsigned int designator, unsigned int not)
 {
-  register Lisp_Object temp;
+  REGISTER Lisp_Object temp;
   struct Lisp_Char_Table *ctbl;
 #ifdef ERROR_CHECK_TYPECHECK
   if (NILP (Fcategory_table_p (table)))
--- a/src/cmds.c	Mon Aug 13 10:01:24 2007 +0200
+++ b/src/cmds.c	Mon Aug 13 10:02:21 2007 +0200
@@ -154,7 +154,7 @@
        (arg, buffer))
 {
   struct buffer *b = decode_buffer (buffer, 1);
-  register int orig, end;
+  REGISTER int orig, end;
 
   XSETBUFFER (buffer, b);
   if (NILP (arg))
--- a/src/database.c	Mon Aug 13 10:01:24 2007 +0200
+++ b/src/database.c	Mon Aug 13 10:02:21 2007 +0200
@@ -194,7 +194,7 @@
   db->funcs->close (db);
 }
 
-DEFUN ("close-database", Fdatabase_close, 1, 1, 0, /*
+DEFUN ("close-database", Fclose_database, 1, 1, 0, /*
 Close database OBJ.
 */
        (obj))
@@ -492,7 +492,7 @@
 };
 #endif /* HAVE_BERKELEY_DB */
 
-DEFUN ("database-last-error", Fdatabase_error, 0, 1, 0, /*
+DEFUN ("database-last-error", Fdatabase_last_error, 0, 1, 0, /*
 Return the last error associated with database OBJ.
 */
        (obj))
@@ -505,7 +505,7 @@
   return XDATABASE (obj)->funcs->last_error (XDATABASE (obj));
 }
 
-DEFUN ("open-database", Fmake_database, 1, 5, 0, /*
+DEFUN ("open-database", Fopen_database, 1, 5, 0, /*
 Open database FILE, using database method TYPE and SUBTYPE, with
 access rights ACCESS and permissions MODE.  ACCESS can be any
 combination of 'r' 'w' and '+', for read, write, and creation flags.
@@ -612,7 +612,7 @@
   return retval;
 }
 
-DEFUN ("put-database", Fputdatabase, 3, 4, 0, /*
+DEFUN ("put-database", Fput_database, 3, 4, 0, /*
 Store KEY and VAL in DATABASE.  If optional fourth arg REPLACE is
 non-nil, replace any existing entry in the database.
 */
@@ -629,7 +629,7 @@
   }
 }
 
-DEFUN ("remove-database", Fremdatabase, 2, 2, 0, /*
+DEFUN ("remove-database", Fremove_database, 2, 2, 0, /*
 Remove KEY from DATABASE.
 */
        (key, dbase))
@@ -640,7 +640,7 @@
   return XDATABASE (dbase)->funcs->rem (XDATABASE (dbase), key) ? Qt : Qnil;
 }
 
-DEFUN ("get-database", Fgetdatabase, 2, 3, 0, /*
+DEFUN ("get-database", Fget_database, 2, 3, 0, /*
 Find value for KEY in DATABASE.
 If there is no corresponding value, return DEFAULT (defaults to nil).
 */
@@ -684,18 +684,18 @@
   defsymbol (&Qrecno, "recno");
 #endif
 
-  DEFSUBR (Fmake_database);
+  DEFSUBR (Fopen_database);
   DEFSUBR (Fdatabasep);
   DEFSUBR (Fmapdatabase);
-  DEFSUBR (Fputdatabase);
-  DEFSUBR (Fgetdatabase);
-  DEFSUBR (Fremdatabase);
+  DEFSUBR (Fput_database);
+  DEFSUBR (Fget_database);
+  DEFSUBR (Fremove_database);
   DEFSUBR (Fdatabase_type);
   DEFSUBR (Fdatabase_subtype);
-  DEFSUBR (Fdatabase_error);
+  DEFSUBR (Fdatabase_last_error);
   DEFSUBR (Fdatabase_live_p);
   DEFSUBR (Fdatabase_file_name);
-  DEFSUBR (Fdatabase_close);
+  DEFSUBR (Fclose_database);
 }
 
 void
--- a/src/dgif_lib.c	Mon Aug 13 10:01:24 2007 +0200
+++ b/src/dgif_lib.c	Mon Aug 13 10:02:21 2007 +0200
@@ -119,7 +119,7 @@
 *   Returns GifFileType pointer dynamically allocated which serves as the gif *
 * info record. _GifError is cleared if succesfull.			      *
 ******************************************************************************/
-GifFileType *DGifOpenFileName(const char *FileName)
+GifFileType *DGifOpenFileName(CONST char *FileName)
 {
     int FileHandle;
 
--- a/src/doprnt.c	Mon Aug 13 10:01:24 2007 +0200
+++ b/src/doprnt.c	Mon Aug 13 10:02:21 2007 +0200
@@ -54,6 +54,7 @@
   unsigned int zero_flag:1;
   unsigned int h_flag:1;
   unsigned int l_flag:1;
+  unsigned int forwarding_precision:1;
   char converter; /* converter character or 0 for dummy marker
 		     indicating literal text at the end of the
 		     specification */
@@ -168,6 +169,14 @@
     fmt++;							\
   } while (0)
 
+#define RESOLVE_FLAG_CONFLICTS(spec)				\
+  do {								\
+    if (spec.space_flag && spec.plus_flag)			\
+      spec.space_flag = 0;					\
+    if (spec.zero_flag && spec.space_flag)			\
+      spec.zero_flag = 0;					\
+  } while (0)
+
 static printf_spec_dynarr *
 parse_doprnt_spec (CONST Bufbyte *format, Bytecount format_length)
 {
@@ -240,17 +249,56 @@
 
 	  /* Parse off the minimum field width */
 	  fmt--; /* back up */
-	  fmt = parse_off_posnum (fmt, fmt_end, &spec.minwidth);
-	  if (spec.minwidth == -1)
-	    spec.minwidth = 0;
+
+	  /*
+	   * * means the field width was passed as an argument.
+	   * Mark the current spec as one that forwards its
+	   * field width and flags to the next spec in the array.
+	   * Then create a new spec and continue with the parsing.
+	   */
+	  if (fmt != fmt_end && *fmt == '*')
+	    {
+	      spec.converter = '*';
+	      RESOLVE_FLAG_CONFLICTS(spec);
+	      Dynarr_add (specs, spec);
+	      memset (&spec, 0, sizeof (spec));
+	      spec.argnum = ++prev_argnum;
+	      fmt++;
+	    }
+	  else
+	    {
+	      fmt = parse_off_posnum (fmt, fmt_end, &spec.minwidth);
+	      if (spec.minwidth == -1)
+		spec.minwidth = 0;
+	    }
 
 	  /* Parse off any precision specified */
 	  NEXT_ASCII_BYTE (ch);
 	  if (ch == '.')
 	    {
-	      fmt = parse_off_posnum (fmt, fmt_end, &spec.precision);
-	      if (spec.precision == -1)
-		spec.precision = 0;
+	      /*
+	       * * means the precision was passed as an argument.
+	       * Mark the current spec as one that forwards its
+	       * fieldwidth, flags and precision to the next spec in
+	       * the array.  Then create a new spec and continue
+	       * with the parse.
+	       */
+	      if (fmt != fmt_end && *fmt == '*')
+		{
+		  spec.converter = '*';
+		  spec.forwarding_precision = 1;
+		  RESOLVE_FLAG_CONFLICTS(spec);
+		  Dynarr_add (specs, spec);
+		  memset (&spec, 0, sizeof (spec));
+		  spec.argnum = ++prev_argnum;
+		  fmt++;
+		}
+	      else
+		{
+		  fmt = parse_off_posnum (fmt, fmt_end, &spec.precision);
+		  if (spec.precision == -1)
+		    spec.precision = 0;
+		}
 	      NEXT_ASCII_BYTE (ch);
 	    }
 	  else
@@ -272,11 +320,7 @@
 	  spec.converter = ch;
 	}
 
-      if (spec.space_flag && spec.plus_flag)
-	spec.space_flag = 0;
-      if (spec.zero_flag && spec.space_flag)
-	spec.zero_flag = 0;
-
+      RESOLVE_FLAG_CONFLICTS(spec);
       Dynarr_add (specs, spec);
     }
 
@@ -436,6 +480,36 @@
 	  continue;
 	}
 
+      /*
+       * * as converter means the field width, precision was specified
+       * as an argument.  Extract the data and forward it to the
+       * next spec, to which it will apply.
+       */
+      if (ch == '*')
+	{
+	  struct printf_spec *nextspec = Dynarr_atp (specs, i + 1);
+	  Lisp_Object obj = largs[spec->argnum - 1];
+
+	  if (INTP (obj))
+	    {
+	      if (spec->forwarding_precision)
+		{
+		  nextspec->precision = XINT (obj);
+		  nextspec->minwidth = spec->minwidth;
+		}
+	      else
+		{
+		  nextspec->minwidth = XINT (obj);
+		}
+	      nextspec->minus_flag = spec->minus_flag;
+	      nextspec->plus_flag = spec->plus_flag;
+	      nextspec->space_flag = spec->space_flag;
+	      nextspec->number_flag = spec->number_flag;
+	      nextspec->zero_flag = spec->zero_flag;
+	    }
+	  continue;
+	}
+
       if (largs && (spec->argnum < 1 || spec->argnum > nargs))
 	error ("Invalid repositioning argument %d", spec->argnum);
 
--- a/src/editfns.c	Mon Aug 13 10:01:24 2007 +0200
+++ b/src/editfns.c	Mon Aug 13 10:02:21 2007 +0200
@@ -1409,7 +1409,7 @@
 
 /* Third argument in FSF is INHERIT:
 
-"The optional third arg INHERIT, if non-nil, says to inherit text properties\n\
+"The optional third arg INHERIT, if non-nil, says to inherit text properties
 from adjoining text, if those properties are sticky."
 
 Jamie thinks this is bogus. */
@@ -1926,6 +1926,15 @@
   added on the left (or on the right, if the `-' flag is specified), as
   necessary.  Padding is done with spaces, or with zeroes if the `0' flag
   is specified.
+If the field width is specified as `*', the field width is assumed to have
+  been specified as an argument.  Any repositioning specification that
+  would normally specify the argument to be converted will now specify
+  where to find this field width argument, not where to find the argument
+  to be converted.  If there is no repositioning specification, the normal
+  next argument is used.  The argument to be converted will be the next
+  argument after the field width argument unless the precision is also
+  specified as `*' (see below).
+
 An optional period character and precision may be specified after any
   minimum field width.  It specifies the minimum number of digits to
   appear in %d, %i, %o, %x, and %X conversions (the number is padded
@@ -1935,6 +1944,13 @@
   maximum number of non-padding characters printed in %s and %S
   conversions.  The default precision for floating-point conversions
   is six.
+If the precision is specified as `*', the precision is assumed to have been
+  specified as an argument.  The argument used will be the next argument
+  after the field width argument, if any.  If the field width was not
+  specified as an argument, any repositioning specification that would
+  normally specify the argument to be converted will now specify where to
+  find the precision argument.  If there is no repositioning specification,
+  the normal next argument is used.
 
 The ` ' and `+' flags mean prefix non-negative numbers with a space or
   plus sign, respectively.
--- a/src/eval.c	Mon Aug 13 10:01:24 2007 +0200
+++ b/src/eval.c	Mon Aug 13 10:02:21 2007 +0200
@@ -1396,7 +1396,7 @@
 {
 #if 0 /* FSFmacs */
   /* #### */
-  register int last_time;
+  REGISTER int last_time;
 #endif
 
   /* Unwind the specbind, catch, and handler stacks back to CATCH
--- a/src/events.c	Mon Aug 13 10:01:24 2007 +0200
+++ b/src/events.c	Mon Aug 13 10:02:21 2007 +0200
@@ -435,8 +435,7 @@
       plist = Fcdr (plist);
       if (EQ (prop, Qchannel))
 	{
-	  if (!DEVICEP (val) && !CONSOLEP (val) && !FRAMEP (val)
-	      && !NILP (val))
+	  if (!FRAMEP (val) && !NILP (val))
 	    signal_simple_error ("Invalid event channel", val);
 	  EVENT_CHANNEL (e) = val;
 	}
--- a/src/extents.c	Mon Aug 13 10:01:24 2007 +0200
+++ b/src/extents.c	Mon Aug 13 10:02:21 2007 +0200
@@ -2616,6 +2616,7 @@
   xfree (ef);
 }
 
+/* Note:  CONST is losing, but `const' is part of the interface of qsort() */
 static int
 extent_priority_sort_function (const void *humpty, const void *dumpty)
 {
@@ -3006,7 +3007,7 @@
       write_c_string (" ", printcharfun);
     }
 
-  sprintf (bp, "0x%p", ext);
+  sprintf (buf, "0x%p", ext);
   write_c_string (buf, printcharfun);
 }
 
--- a/src/getloadavg.c	Mon Aug 13 10:01:24 2007 +0200
+++ b/src/getloadavg.c	Mon Aug 13 10:02:21 2007 +0200
@@ -698,11 +698,11 @@
   struct proc_summary proc_sum_data;
   struct stat_descr proc_info;
   double load;
-  register unsigned int i, j;
+  REGISTER unsigned int i, j;
 
   if (cpus == 0)
     {
-      register unsigned int c, i;
+      REGISTER unsigned int c, i;
       struct cpu_config conf;
       struct stat_descr desc;
 
--- a/src/gif_lib.h	Mon Aug 13 10:01:24 2007 +0200
+++ b/src/gif_lib.h	Mon Aug 13 10:02:21 2007 +0200
@@ -133,7 +133,7 @@
 * (GIF_LIB file DGIF_LIB.C).						      *
 ******************************************************************************/
 
-GifFileType *DGifOpenFileName(const char *GifFileName);
+GifFileType *DGifOpenFileName(CONST char *GifFileName);
 GifFileType *DGifOpenFileHandle(int GifFileHandle);
 int DGifSlurp(GifFileType *GifFile);
 int DGifGetScreenDesc(GifFileType *GifFile);
@@ -260,25 +260,25 @@
 extern unsigned char AsciiTable[][GIF_FONT_WIDTH];
 
 extern void DrawText(SavedImage *Image,
-		     const int x, const int y,
-		     const char *legend,
-		     const int color);
+		     CONST int x, CONST int y,
+		     CONST char *legend,
+		     CONST int color);
 
 extern void DrawBox(SavedImage *Image,
-		     const int x, const int y,
-		     const int w, const int d,
-		     const int color);
+		     CONST int x, CONST int y,
+		     CONST int w, CONST int d,
+		     CONST int color);
 
 void DrawRectangle(SavedImage *Image,
-		     const int x, const int y,
-		     const int w, const int d,
-		     const int color);
+		     CONST int x, CONST int y,
+		     CONST int w, CONST int d,
+		     CONST int color);
 
 extern void DrawBoxedText(SavedImage *Image,
-		     const int x, const int y,
-		     const char *legend,
-		     const int border,
-		     const int bg,
-		     const int fg);
+		     CONST int x, CONST int y,
+		     CONST char *legend,
+		     CONST int border,
+		     CONST int bg,
+		     CONST int fg);
 
 #endif /* GIF_LIB_H */
--- a/src/gifalloc.c	Mon Aug 13 10:01:24 2007 +0200
+++ b/src/gifalloc.c	Mon Aug 13 10:02:21 2007 +0200
@@ -47,6 +47,10 @@
 #define MAX(x, y)	(((x) > (y)) ? (x) : (y))
 #endif
 
+#ifndef REGISTER	/* Rigidly enforced in 20.3 */
+#define REGISTER
+#endif
+
 /******************************************************************************
 * Miscellaneous utility functions					      *
 ******************************************************************************/
@@ -54,7 +58,7 @@
 int BitSize(int n)
 /* return smallest bitfield size n will fit in */
 {
-    register	i;
+    REGISTER int i;
 
     for (i = 1; i <= 8; i++)
 	if ((1 << i) >= n)
@@ -196,7 +200,7 @@
 
     if (RoundUpTo != ColorUnion->ColorCount)
     {
-	register GifColorType	*Map = ColorUnion->Colors;
+	REGISTER GifColorType	*Map = ColorUnion->Colors;
 
 	/*
 	 * Zero out slots up to next power of 2.
@@ -223,8 +227,8 @@
  * Apply a given color translation to the raster bits of an image
  */
 {
-    register int i;
-    register int RasterSize = Image->ImageDesc.Height * Image->ImageDesc.Width;
+    REGISTER int i;
+    REGISTER int RasterSize = Image->ImageDesc.Height * Image->ImageDesc.Width;
 
     for (i = 0; i < RasterSize; i++)
 	Image->RasterBits[i] = Translation[Image->RasterBits[i]];
--- a/src/input-method-xlib.c	Mon Aug 13 10:01:24 2007 +0200
+++ b/src/input-method-xlib.c	Mon Aug 13 10:02:21 2007 +0200
@@ -616,7 +616,7 @@
 static XIMStyle
 best_style (XIMStyles *user, XIMStyles *xim)
 {
-  register int i, j;
+  REGISTER int i, j;
   for (i=0 ; i<user->count_styles ; i++)
     {
       for (j=0 ; j<xim->count_styles ; j++)
--- a/src/insdel.c	Mon Aug 13 10:01:24 2007 +0200
+++ b/src/insdel.c	Mon Aug 13 10:02:21 2007 +0200
@@ -2802,7 +2802,16 @@
     }
   else
     {
-      /* must implement as deletion followed by insertion. */
+      /*
+       * Must implement as deletion followed by insertion.
+       *
+       * Make a note to move point forward later in the one situation
+       * where it is needed, a delete/insert one position behind
+       * point.  Point will drift backward by one position and stay
+       * there otherwise.
+       */
+      int movepoint = (pos == BUF_PT (b) - 1);
+
       buffer_delete_range (b, pos, pos + 1, 0);
       /* Defensive steps in case the before-change-functions fuck around */
       if (!BUFFER_LIVE_P (b))
@@ -2818,7 +2827,13 @@
       if (pos < BUF_BEGV (b))
 	/* no more characters in buffer! */
 	return;
-      buffer_insert_string_1 (b, pos, newstr, Qnil, 0, newlen, 0);
+      /*
+       * -1 as the pos argument means to move point forward with the
+       * insertion, which we must do if the deletion moved point
+       * backward so that it now equals the insertion point.
+       */
+      buffer_insert_string_1 (b, (movepoint ? -1 : pos),
+			      newstr, Qnil, 0, newlen, 0);
     }
 }
 
--- a/src/keymap.c	Mon Aug 13 10:01:24 2007 +0200
+++ b/src/keymap.c	Mon Aug 13 10:02:21 2007 +0200
@@ -3656,7 +3656,7 @@
 	  if (! c->keys_so_far_malloced)
 	    {
 	      struct key_data *new = xnew_array (struct key_data, size);
-	      memcpy ((void *)new, (const void *)c->keys_so_far,
+	      memcpy ((void *)new, (CONST void *)c->keys_so_far,
 		      c->keys_so_far_total_size * sizeof (struct key_data));
 	    }
 	  else
--- a/src/linuxplay.c	Mon Aug 13 10:01:24 2007 +0200
+++ b/src/linuxplay.c	Mon Aug 13 10:02:21 2007 +0200
@@ -407,8 +407,8 @@
 /* Convert 8 bit unsigned stereo data to 8 bit unsigned mono data */
 static size_t sndcnv8U_2mono(void **data,size_t *sz,void **outbuf)
 {
-  register unsigned char *src;
-  register unsigned char *dest;
+  REGISTER unsigned char *src;
+  REGISTER unsigned char *dest;
   int rc,count;
 
   count = *sz / 2;
@@ -428,8 +428,8 @@
 /* Convert 8 bit signed stereo data to 8 bit signed mono data */
 static size_t sndcnv8S_2mono(void **data,size_t *sz,void **outbuf)
 {
-  register unsigned char *src;
-  register unsigned char *dest;
+  REGISTER unsigned char *src;
+  REGISTER unsigned char *dest;
   int rc,count;
 
   count = *sz / 2;
@@ -449,8 +449,8 @@
 /* Convert 8 bit signed stereo data to 8 bit unsigned mono data */
 static size_t sndcnv2monounsigned(void **data,size_t *sz,void **outbuf)
 {
-  register unsigned char *src;
-  register unsigned char *dest;
+  REGISTER unsigned char *src;
+  REGISTER unsigned char *dest;
   int rc,count;
 
   count = *sz / 2;
@@ -470,8 +470,8 @@
 /* Convert 8 bit signed mono data to 8 bit unsigned mono data */
 static size_t sndcnv2unsigned(void **data,size_t *sz,void **outbuf)
 {
-  register unsigned char *src;
-  register unsigned char *dest;
+  REGISTER unsigned char *src;
+  REGISTER unsigned char *dest;
   int rc,count;
 
   count = *sz;
@@ -497,7 +497,7 @@
       6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,
       7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
       7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7};
-    register int bits,logi;
+    REGISTER int bits,logi;
 
     /* unrolling this condition (hopefully) improves execution speed */
     if (i < 0) {
@@ -549,8 +549,8 @@
        +60,   +56,   +52,   +48,   +44,   +40,   +36,   +32,
        +28,   +24,   +20,   +16,   +12,    +8,    +4,    +0};
 
-  register unsigned char *src;
-  register unsigned char *dest;
+  REGISTER unsigned char *src;
+  REGISTER unsigned char *dest;
   int rc,count;
 
   count = *sz / 2;
@@ -574,8 +574,8 @@
    signed mono data */
 static size_t sndcnv16_2monoLE(void **data,size_t *sz,void **outbuf)
 {
-  register unsigned char *src;
-  register unsigned char *dest;
+  REGISTER unsigned char *src;
+  REGISTER unsigned char *dest;
   int rc,count;
   signed short i;
 
@@ -602,8 +602,8 @@
    signed mono data */
 static size_t sndcnv16_2monoBE(void **data,size_t *sz,void **outbuf)
 {
-  register unsigned char *src;
-  register unsigned char *dest;
+  REGISTER unsigned char *src;
+  REGISTER unsigned char *dest;
   int rc,count;
   signed short i;
 
@@ -629,8 +629,8 @@
 /* Convert 16 bit little endian signed data to 8 bit unsigned data */
 static size_t sndcnv2byteLE(void **data,size_t *sz,void **outbuf)
 {
-  register unsigned char *src;
-  register unsigned char *dest;
+  REGISTER unsigned char *src;
+  REGISTER unsigned char *dest;
   int rc,count;
 
   count = *sz / 2;
@@ -650,8 +650,8 @@
 /* Convert 16 bit big endian signed data to 8 bit unsigned data */
 static size_t sndcnv2byteBE(void **data,size_t *sz,void **outbuf)
 {
-  register unsigned char *src;
-  register unsigned char *dest;
+  REGISTER unsigned char *src;
+  REGISTER unsigned char *dest;
   int rc,count;
 
   count = *sz / 2;
@@ -672,8 +672,8 @@
    mono data */
 static size_t sndcnv2monobyteLE(void **data,size_t *sz,void **outbuf)
 {
-  register unsigned char *src;
-  register unsigned char *dest;
+  REGISTER unsigned char *src;
+  REGISTER unsigned char *dest;
   int rc,count;
 
   count = *sz / 4;
@@ -695,8 +695,8 @@
    mono data */
 static size_t sndcnv2monobyteBE(void **data,size_t *sz,void **outbuf)
 {
-  register unsigned char *src;
-  register unsigned char *dest;
+  REGISTER unsigned char *src;
+  REGISTER unsigned char *dest;
   int rc,count;
 
   count = *sz / 4;
--- a/src/m/att3b.h	Mon Aug 13 10:01:24 2007 +0200
+++ b/src/m/att3b.h	Mon Aug 13 10:02:21 2007 +0200
@@ -116,7 +116,9 @@
 /* On 3b2/5/15, data space has high order bit on. */
 #define VALBITS 27
 #define VALMASK (((1<<VALBITS) - 1) | (1 << 31))
-#define XTYPE(a) ((enum Lisp_Type) (((a) >> VALBITS) & GCTYPEMASK))
+/* XEmacs: markbit is between type bits and value bits */
+/* #define XTYPE(a) ((enum Lisp_Type) (((a) >> VALBITS) & GCTYPEMASK)) */
+#define XTYPE(a) ((enum Lisp_Type) (((a) >> ((VALBITS) + 1)) & GCTYPEMASK))
   
 #endif /* 3b2, 3b5 or 3b15 */
 
--- a/src/m/pfa50.h	Mon Aug 13 10:01:24 2007 +0200
+++ b/src/m/pfa50.h	Mon Aug 13 10:02:21 2007 +0200
@@ -56,7 +56,9 @@
 /* On A-50/60/70/80, data space has high order byte use. */
 #define VALBITS 26
 #define VALMASK (((1<<VALBITS) - 1) | 0x60000000)
-#define XTYPE(a) ((enum Lisp_Type) (((a) >> VALBITS) & GCTYPEMASK))
+/* XEmacs: markbit is between type bits and value bits */
+/* #define XTYPE(a) ((enum Lisp_Type) (((a) >> VALBITS) & GCTYPEMASK)) */
+#define XTYPE(a) ((enum Lisp_Type) (((a) >> ((VALBITS) + 1)) & GCTYPEMASK))
 
 #endif /* pfa50, pfa70 */
 
--- a/src/msdos.c	Mon Aug 13 10:01:24 2007 +0200
+++ b/src/msdos.c	Mon Aug 13 10:02:21 2007 +0200
@@ -1125,8 +1125,8 @@
 Lisp_Object recent_doskeys; /* A vector, holding the last 100 keystrokes */
 
 DEFUN ("recent-doskeys", Frecent_doskeys, 0, 0, 0, /*
-Return vector of last 100 keyboard input values seen in dos_rawgetc.\n\
-Each input key receives two values in this vector: first the ASCII code,\n\
+Return vector of last 100 keyboard input values seen in dos_rawgetc.
+Each input key receives two values in this vector: first the ASCII code,
 and then the scan code.
 */
        ())
--- a/src/nt.c	Mon Aug 13 10:01:24 2007 +0200
+++ b/src/nt.c	Mon Aug 13 10:02:21 2007 +0200
@@ -203,7 +203,7 @@
     _strlwr (dir_static.d_name);
   else if (!NILP (Vwin32_downcase_file_names))
     {
-      register char *p;
+      REGISTER char *p;
       for (p = dir_static.d_name; *p; p++)
 	if (*p >= 'a' && *p <= 'z')
 	  break;
@@ -397,7 +397,7 @@
 
 static void
 normalize_filename (fp, path_sep)
-     register char *fp;
+     REGISTER char *fp;
      char path_sep;
 {
   char sep;
@@ -455,7 +455,7 @@
 /* Destructively turn backslashes into slashes.  */
 void
 dostounix_filename (p)
-     register char *p;
+     REGISTER char *p;
 {
   normalize_filename (p, '/');
 }
@@ -463,7 +463,7 @@
 /* Destructively turn slashes into backslashes.  */
 void
 unixtodos_filename (p)
-     register char *p;
+     REGISTER char *p;
 {
   normalize_filename (p, '\\');
 }
@@ -473,8 +473,8 @@
    although this code isn't going to ever change.)  */
 int
 crlf_to_lf (n, buf)
-     register int n;
-     register unsigned char *buf;
+     REGISTER int n;
+     REGISTER unsigned char *buf;
 {
   unsigned char *np = buf;
   unsigned char *startp = buf;
@@ -837,9 +837,9 @@
 
   if (is_fat_volume (name, &path)) /* truncate to 8.3 */
     {
-      register int left = 8;	/* maximum number of chars in part */
-      register int extn = 0;	/* extension added? */
-      register int dots = 2;	/* maximum number of dots allowed */
+      REGISTER int left = 8;	/* maximum number of chars in part */
+      REGISTER int extn = 0;	/* extension added? */
+      REGISTER int dots = 2;	/* maximum number of dots allowed */
 
       while (name < path)
 	*str++ = *name++;	/* skip past UNC header */
--- a/src/paths.h.in	Mon Aug 13 10:01:24 2007 +0200
+++ b/src/paths.h.in	Mon Aug 13 10:02:21 2007 +0200
@@ -45,5 +45,8 @@
    PATH_SUPERLOCK	The name of the file !!!SuperLock!!! in the lock 
 			directory.  You probably should let this default...
 
-   PATH_INFO		The default value of `Info-directory-list'.
-			This is where info files are searched for. */
+   PATH_INFO		This is where the info documentation is installed.
+
+   PATH_INFOPATH	The default value of `Info-directory-list'.
+			These are additional places info files are searched
+			for. */
--- a/src/realpath.c	Mon Aug 13 10:01:24 2007 +0200
+++ b/src/realpath.c	Mon Aug 13 10:02:21 2007 +0200
@@ -59,10 +59,10 @@
 #define MAX_READLINKS 32
 
 #ifdef __STDC__
-char *realpath(const char *path, char resolved_path [])
+char *realpath(CONST char *path, char resolved_path [])
 #else
 char *realpath(path, resolved_path)
-const char *path;
+CONST char *path;
 char resolved_path [];
 #endif
 {
--- a/src/regex.c	Mon Aug 13 10:01:24 2007 +0200
+++ b/src/regex.c	Mon Aug 13 10:02:21 2007 +0200
@@ -39,6 +39,10 @@
 #include <config.h>
 #endif
 
+#ifndef REGISTER	/* Rigidly enforced as of 20.3 */
+#define REGISTER
+#endif
+
 #ifndef _GNU_SOURCE
 #define _GNU_SOURCE 1
 #endif
@@ -182,7 +186,7 @@
 static void
 init_syntax_once (void)
 {
-   register int c;
+   REGISTER int c;
    static int done = 0;
 
    if (done)
@@ -743,8 +747,8 @@
 	case charset:
         case charset_not:
           {
-            register int c, last = -100;
-	    register int in_range = 0;
+            REGISTER int c, last = -100;
+	    REGISTER int in_range = 0;
 
 	    printf ("/charset [%s",
 	            (re_opcode_t) *(p - 1) == charset_not ? "^" : "");
@@ -1816,7 +1820,7 @@
 					      unsigned char *end,
 					      register_info_type *reg_info);
 static int bcmp_translate (CONST unsigned char *s1, CONST unsigned char *s2,
-			   register int len, char *translate);
+			   REGISTER int len, char *translate);
 static int re_match_2_internal (struct re_pattern_buffer *bufp,
 				CONST char *string1, int size1,
 				CONST char *string2, int size2, int pos,
@@ -1901,13 +1905,13 @@
      make sure to coerce to unsigned char before assigning, so we won't
      get bitten by negative numbers here. */
   /* XEmacs change: used to be unsigned char. */
-  register EMACS_INT c, c1;
+  REGISTER EMACS_INT c, c1;
 
   /* A random temporary spot in PATTERN.  */
   CONST char *p1;
 
   /* Points to the end of the buffer, where we should append.  */
-  register unsigned char *b;
+  REGISTER unsigned char *b;
 
   /* Keeps track of unclosed groups.  */
   compile_stack_type compile_stack;
@@ -3181,8 +3185,8 @@
 static void
 insert_op1 (re_opcode_t op, unsigned char *loc, int arg, unsigned char *end)
 {
-  register unsigned char *pfrom = end;
-  register unsigned char *pto = end + 3;
+  REGISTER unsigned char *pfrom = end;
+  REGISTER unsigned char *pto = end + 3;
 
   while (pfrom != loc)
     *--pto = *--pfrom;
@@ -3197,8 +3201,8 @@
 insert_op2 (re_opcode_t op, unsigned char *loc, int arg1, int arg2,
 	    unsigned char *end)
 {
-  register unsigned char *pfrom = end;
-  register unsigned char *pto = end + 5;
+  REGISTER unsigned char *pfrom = end;
+  REGISTER unsigned char *pto = end + 5;
 
   while (pfrom != loc)
     *--pto = *--pfrom;
@@ -3402,11 +3406,11 @@
   DECLARE_DESTINATION
   /* We don't push any register information onto the failure stack.  */
 
-  register char *fastmap = bufp->fastmap;
+  REGISTER char *fastmap = bufp->fastmap;
   unsigned char *pattern = bufp->buffer;
   unsigned long size = bufp->used;
   unsigned char *p = pattern;
-  register unsigned char *pend = pattern + size;
+  REGISTER unsigned char *pend = pattern + size;
 
 #ifdef REL_ALLOC
   /* This holds the pointer to the failure stack, when
@@ -3934,8 +3938,8 @@
 	     int range, struct re_registers *regs, int stop)
 {
   int val;
-  register char *fastmap = bufp->fastmap;
-  register char *translate = bufp->translate;
+  REGISTER char *fastmap = bufp->fastmap;
+  REGISTER char *translate = bufp->translate;
   int total_size = size1 + size2;
   int endpos = startpos + range;
 #ifdef REGEX_BEGLINE_CHECK
@@ -4278,7 +4282,7 @@
 
   /* Where we are in the pattern, and the end of the pattern.  */
   unsigned char *p = bufp->buffer;
-  register unsigned char *pend = p + bufp->used;
+  REGISTER unsigned char *pend = p + bufp->used;
 
   /* Mark the opcode just after a start_memory, so we can test for an
      empty subpattern when we get to the stop_memory.  */
@@ -4726,7 +4730,7 @@
 	case charset:
 	case charset_not:
 	  {
-	    register unsigned char c;
+	    REGISTER unsigned char c;
 	    boolean not = (re_opcode_t) *(p - 1) == charset_not;
 
             DEBUG_PRINT2 ("EXECUTING charset%s.\n", not ? "_not" : "");
@@ -4753,7 +4757,7 @@
 	case charset_mule:
 	case charset_mule_not:
 	  {
-	    register Emchar c;
+	    REGISTER Emchar c;
 	    boolean not = (re_opcode_t) *(p - 1) == charset_mule_not;
 
             DEBUG_PRINT2 ("EXECUTING charset_mule%s.\n", not ? "_not" : "");
@@ -4966,7 +4970,7 @@
            followed by the numeric value of <digit> as the register number.  */
         case duplicate:
 	  {
-	    register CONST char *d2, *dend2;
+	    REGISTER CONST char *d2, *dend2;
 	    int regno = *p++;   /* Get which register to match against.  */
 	    DEBUG_PRINT2 ("EXECUTING duplicate %d.\n", regno);
 
@@ -5165,7 +5169,7 @@
           EXTRACT_NUMBER_AND_INCR (mcnt, p);
           DEBUG_PRINT2 ("EXECUTING maybe_pop_jump %d.\n", mcnt);
           {
-	    register unsigned char *p2 = p;
+	    REGISTER unsigned char *p2 = p;
 
             /* Compare the beginning of the repeat with what in the
                pattern follows its end. If we can establish that there
@@ -5216,7 +5220,7 @@
             else if ((re_opcode_t) *p2 == exactn
 		     || (bufp->newline_anchor && (re_opcode_t) *p2 == endline))
 	      {
-		register unsigned char c
+		REGISTER unsigned char c
                   = *p2 == (unsigned char) endline ? '\n' : p2[2];
 
                 if ((re_opcode_t) p1[3] == exactn && p1[5] != c)
@@ -5247,7 +5251,7 @@
             else if ((re_opcode_t) *p2 == charset)
 	      {
 #ifdef DEBUG
-		register unsigned char c
+		REGISTER unsigned char c
                   = *p2 == (unsigned char) endline ? '\n' : p2[2];
 #endif
 
@@ -5934,9 +5938,9 @@
 
 static int
 bcmp_translate (CONST unsigned char *s1, CONST unsigned char *s2,
-		register int len, char *translate)
+		REGISTER int len, char *translate)
 {
-  register CONST unsigned char *p1 = s1, *p2 = s2;
+  REGISTER CONST unsigned char *p1 = s1, *p2 = s2;
   while (len)
     {
       if (translate[*p1++] != translate[*p2++]) return 1;
--- a/src/search.c	Mon Aug 13 10:01:24 2007 +0200
+++ b/src/search.c	Mon Aug 13 10:02:21 2007 +0200
@@ -276,7 +276,7 @@
   Lisp_Object val;
   Bytind p1, p2;
   Bytecount s1, s2;
-  register int i;
+  REGISTER int i;
   struct re_pattern_buffer *bufp;
 
   if (running_asynch_code)
@@ -716,13 +716,13 @@
 	    Lisp_Object string, Lisp_Object lim)
 {
   /* This function has been Mule-ized. */
-  register Bufbyte *p, *pend;
-  register Emchar c;
+  REGISTER Bufbyte *p, *pend;
+  REGISTER Emchar c;
   /* We store the first 256 chars in an array here and the rest in
      a range table. */
   unsigned char fastmap[0400];
   int negate = 0;
-  register int i;
+  REGISTER int i;
   struct Lisp_Char_Table *syntax_table =
     XCHAR_TABLE (buf->mirror_syntax_table);
 
@@ -945,7 +945,7 @@
 		int RE, int posix)
 {
   /* This function has been Mule-ized, except for the trt table handling. */
-  register Bufpos np;
+  REGISTER Bufpos np;
   Bufpos lim;
   EMACS_INT n = direction;
   struct buffer *buf;
@@ -1065,17 +1065,17 @@
   /* This function has been Mule-ized, except for the trt table handling. */
   Bytecount len = XSTRING_LENGTH (string);
   Bufbyte *base_pat = XSTRING_DATA (string);
-  register EMACS_INT *BM_tab;
+  REGISTER EMACS_INT *BM_tab;
   EMACS_INT *BM_tab_base;
-  register int direction = ((n > 0) ? 1 : -1);
-  register Bytecount dirlen;
+  REGISTER int direction = ((n > 0) ? 1 : -1);
+  REGISTER Bytecount dirlen;
   EMACS_INT infinity;
   Bytind limit;
   EMACS_INT k;
   Bytecount stride_for_teases = 0;
-  register Bufbyte *pat = 0;
-  register Bufbyte *cursor, *p_limit, *ptr2;
-  register EMACS_INT i, j;
+  REGISTER Bufbyte *pat = 0;
+  REGISTER Bufbyte *cursor, *p_limit, *ptr2;
+  REGISTER EMACS_INT i, j;
   Bytind p1, p2;
   Bytecount s1, s2;
   Bytind pos, lim;
@@ -2304,8 +2304,8 @@
        (list))
 {
   /* This function has been Mule-ized. */
-  register int i;
-  register Lisp_Object marker;
+  REGISTER int i;
+  REGISTER Lisp_Object marker;
 
   if (running_asynch_code)
     save_search_regs ();
@@ -2423,8 +2423,8 @@
        (str))
 {
   /* This function has been Mule-ized. */
-  register Bufbyte *in, *out, *end;
-  register Bufbyte *temp;
+  REGISTER Bufbyte *in, *out, *end;
+  REGISTER Bufbyte *temp;
 
   CHECK_STRING (str);
 
@@ -2499,7 +2499,7 @@
 void
 vars_of_search (void)
 {
-  register int i;
+  REGISTER int i;
 
   for (i = 0; i < REGEXP_CACHE_SIZE; ++i)
     {
--- a/src/strcat.c	Mon Aug 13 10:01:24 2007 +0200
+++ b/src/strcat.c	Mon Aug 13 10:02:21 2007 +0200
@@ -18,6 +18,11 @@
 
 /* Synched up with: Not in FSF. */
 
+# include <config.h>
+# ifndef REGISTER	/* Strictly enforced in 20.3 */
+# define REGISTER
+# endif
+
 /* In HPUX 10 the strcat function references memory past the last byte of 
    the string!  This will core dump if the memory following the last byte is 
    not mapped.
@@ -28,11 +33,12 @@
 char *strcat (char *dest, const char *src);
 
 /* Append SRC on the end of DEST.  */
+/* CONST IS LOSING, but const is part of the interface of strcat */
 char *
 strcat (char *dest, const char *src)
 {
-  register char *s1 = dest;
-  register const char *s2 = src;
+  REGISTER char *s1 = dest;
+  REGISTER CONST char *s2 = src;
   char c;
 
   /* Find the end of the string.  */
--- a/src/strcmp.c	Mon Aug 13 10:01:24 2007 +0200
+++ b/src/strcmp.c	Mon Aug 13 10:02:21 2007 +0200
@@ -24,6 +24,11 @@
    Here are correct versions by hbs@lucid.com.
 */
 
+# include <config.h>
+# ifndef REGISTER	/* Strictly enforced in 20.3 */
+# define REGISTER
+# endif
+
 #include <string.h>
 #define ALIGNED(x) (!(((unsigned long) (x)) & (sizeof (unsigned long) - 1)))
 
@@ -31,6 +36,7 @@
 #define HIGH_BIT_P(c) ((c) & hi_bit)
 #define HAS_ZERO(c) (((((c) + magic) ^ (c)) & not_magic) != not_magic)
 
+/* CONST IS LOSING, but const is part of the interface of strcmp */
 int
 strcmp (const char *x, const char *y)
 {
@@ -38,8 +44,8 @@
     return 0;
   else if (ALIGNED (x) && ALIGNED (y))
     {
-      const unsigned long *x1 = (const unsigned long *) x;
-      const unsigned long *y1 = (const unsigned long *) y;
+      CONST unsigned long *x1 = (CONST unsigned long *) x;
+      CONST unsigned long *y1 = (CONST unsigned long *) y;
       unsigned long c;
       unsigned long magic = MAGIC;
       unsigned long not_magic = ~magic;
@@ -53,8 +59,8 @@
                 return 0;
               else
                 {
-                  x = (const char *) x1;
-                  y = (const char *) y1;
+                  x = (CONST char *) x1;
+                  y = (CONST char *) y1;
                   goto slow_loop;
                 }
             }
@@ -63,8 +69,8 @@
           y1++;
         }
 
-      x = (const char *) x1;
-      y = (const char *) y1;
+      x = (CONST char *) x1;
+      y = (CONST char *) y1;
       goto slow_loop;
     }
   else
@@ -85,14 +91,14 @@
 
 
 int
-strncmp (const char *x, const char *y, size_t n)
+strncmp (CONST char *x, CONST char *y, size_t n)
 {
   if ((x == y) || (n <= 0))
     return 0;
   else if (ALIGNED (x) && ALIGNED (y))
     {
-      const unsigned long *x1 = (const unsigned long *) x;
-      const unsigned long *y1 = (const unsigned long *) y;
+      CONST unsigned long *x1 = (CONST unsigned long *) x;
+      CONST unsigned long *y1 = (CONST unsigned long *) y;
       unsigned long c;
       unsigned long magic = MAGIC;
       unsigned long not_magic = ~magic;
@@ -110,8 +116,8 @@
                 return 0;
               else
                 {
-                  x = (const char *) x1;
-                  y = (const char *) y1;
+                  x = (CONST char *) x1;
+                  y = (CONST char *) y1;
                   goto slow_loop;
                 }
             }
@@ -120,8 +126,8 @@
           y1++;
         }
 
-      x = (const char *) x1;
-      y = (const char *) y1;
+      x = (CONST char *) x1;
+      y = (CONST char *) y1;
       goto slow_loop;
     }
   else
--- a/src/strcpy.c	Mon Aug 13 10:01:24 2007 +0200
+++ b/src/strcpy.c	Mon Aug 13 10:02:21 2007 +0200
@@ -24,6 +24,10 @@
    Here are correct versions by hbs@lucid.com.
 */
 
+# include <config.h>
+# ifndef REGISTER	/* Strictly enforced in 20.3 */
+# define REGISTER
+# endif
 
 #define ALIGNED(x) (!(((unsigned long) (x)) & (sizeof (unsigned long) - 1)))
 
@@ -31,6 +35,7 @@
 #define HIGH_BIT_P(c) ((c) & hi_bit)
 #define HAS_ZERO(c) (((((c) + magic) ^ (c)) & not_magic) != not_magic)
 
+/* CONST IS LOSING, but const is part of the interface of strcpy */
 char *
 strcpy (char *to, const char *from)
 {
@@ -51,7 +56,7 @@
           if (HAS_ZERO(c)) 
             {
               to = (char *) to1;
-              from = (const char *) from1;
+              from = (CONST char *) from1;
               goto slow_loop;
             }
           else
--- a/src/sunOS-fix.c	Mon Aug 13 10:01:24 2007 +0200
+++ b/src/sunOS-fix.c	Mon Aug 13 10:02:21 2007 +0200
@@ -36,13 +36,13 @@
 
 #include <stdlib.h>
 
-size_t mbstowcs (wchar_t *foo, const char *bar, size_t baz)
+size_t mbstowcs (wchar_t *foo, CONST char *bar, size_t baz)
 {
   abort ();
   return 0;
 }
 
-size_t wcstombs (char *foo, const wchar_t *bar, size_t baz)
+size_t wcstombs (char *foo, CONST wchar_t *bar, size_t baz)
 {
   abort ();
   return 0;
--- a/src/sysdep.c	Mon Aug 13 10:01:24 2007 +0200
+++ b/src/sysdep.c	Mon Aug 13 10:02:21 2007 +0200
@@ -2847,7 +2847,7 @@
 {
 #ifdef INTERRUPTIBLE_CLOSE
   int did_retry = 0;
-  register int rtnval;
+  REGISTER int rtnval;
 
   while ((rtnval = close (fd)) == -1
 	 && (errno == EINTR))
@@ -5407,7 +5407,7 @@
 #endif /* 0 */
 
 void
-bzero (register char *b, register int length)
+bzero (REGISTER char *b, REGISTER int length)
 {
   short zero = 0;
   long max_str = 65535;
@@ -5423,7 +5423,7 @@
 
 /* Saying `void' requires a declaration, above, where bcopy is used
    and that declaration causes pain for systems where bcopy is a macro.  */
-bcopy (register char *b1, register char *b2, register int length)
+bcopy (REGISTER char *b1, REGISTER char *b2, REGISTER int length)
 {
   long max_str = 65535;
 
@@ -5438,7 +5438,7 @@
 }
 
 int
-bcmp (register char *b1, register char *b2, register int length)
+bcmp (REGISTER char *b1, REGISTER char *b2, REGISTER int length)
 /* This could be a macro! */
 {
   struct dsc$descriptor_s src1 = {length, DSC$K_DTYPE_T, DSC$K_CLASS_S, b1};
--- a/src/systty.h	Mon Aug 13 10:01:24 2007 +0200
+++ b/src/systty.h	Mon Aug 13 10:02:21 2007 +0200
@@ -353,7 +353,7 @@
 /* XEmacs backward-compatibility.  Is 0 always a reasonable argument? */
 #define EMACS_GET_PROCESS_GROUP() EMACS_GETPGRP (0)
 
-/* Xemacs addition? */
+/* XEmacs addition? */
 
 /* EMACS_SEPARATE_PROCESS_GROUP () creates a separate process group for the
    running process. */
--- a/src/unexalpha.c	Mon Aug 13 10:01:24 2007 +0200
+++ b/src/unexalpha.c	Mon Aug 13 10:02:21 2007 +0200
@@ -386,7 +386,7 @@
 
   for (i = 0; i < nsyms && found < 2; i += cbEXTR)
     {
-      register pEXTR x = (pEXTR) (old + symoff + i);
+      REGISTER pEXTR x = (pEXTR) (old + symoff + i);
       char *s;
   
       s = old + stroff + x->asym.iss; /* name of the symbol */
--- a/src/unexfreebsd.c	Mon Aug 13 10:01:24 2007 +0200
+++ b/src/unexfreebsd.c	Mon Aug 13 10:02:21 2007 +0200
@@ -70,7 +70,7 @@
 
 /********************** Function Prototypes/Declarations ***********/
 
-static void unexec_error (const char *m, int use_errno, ...);
+static void unexec_error (CONST char *m, int use_errno, ...);
 static int unexec_open (char *filename, int flag, int mode);
 static caddr_t unexec_mmap (int fd, size_t len, int prot, int flags);
 static long unexec_seek (int fd, long position);
@@ -104,9 +104,9 @@
 /*******************************************************************/
 
 static void
-unexec_error (const char *fmt, int use_errno, ...)
+unexec_error (CONST char *fmt, int use_errno, ...)
 {
-  const char *err_msg = SYS_ERR;
+  CONST char *err_msg = SYS_ERR;
   va_list args;
 
   fprintf (stderr, "unexec - ");
--- a/src/unexhp9k3.c	Mon Aug 13 10:01:24 2007 +0200
+++ b/src/unexhp9k3.c	Mon Aug 13 10:02:21 2007 +0200
@@ -71,7 +71,7 @@
 
 /********************** Function Prototypes/Declarations ***********/
 
-static void unexec_error (const char *fmt, int use_errno, ...);
+static void unexec_error (CONST char *fmt, int use_errno, ...);
 static int unexec_open (char *filename, int flag, int mode);
 static long unexec_seek (int fd, long position);
 static void unexec_read (int fd, long position, char *buf, int bytes);
@@ -96,9 +96,9 @@
 /*******************************************************************/
 
 static void
-unexec_error (const char *fmt, int use_errno, ...)
+unexec_error (CONST char *fmt, int use_errno, ...)
 {
-  const char *err_msg = SYS_ERR;
+  CONST char *err_msg = SYS_ERR;
   va_list args;
 
   fprintf (stderr, "unexec - ");
--- a/src/unexsol2.c	Mon Aug 13 10:01:24 2007 +0200
+++ b/src/unexsol2.c	Mon Aug 13 10:02:21 2007 +0200
@@ -20,7 +20,7 @@
 
 /* Synched up with: Not in FSF. */
 
-/* #pragma ident "@(#) $Id: unexsol2.c,v 1.1.1.1 1996/12/18 22:44:08 steve Exp $" */
+/* #pragma ident "@(#) $Id: unexsol2.c,v 1.2 1997/10/12 01:40:18 steve Exp $" */
 
 #include <stdlib.h>
 #include <stdio.h>
@@ -36,7 +36,7 @@
        unsigned int bss_start, unsigned int entry_address)
 {
   void *handle;
-  void (*func)(const char *file);
+  void (*func)(CONST char *file);
 
   if ((handle = dlopen (DYNODUMP_SO, RTLD_LAZY)) == NULL)
     {
@@ -45,7 +45,7 @@
       exit (1);
     }
 
-  if ((func = (void (*)(const char *)) dlsym (handle, DYNODUMP_SYM)) == NULL)
+  if ((func = (void (*)(CONST char *)) dlsym (handle, DYNODUMP_SYM)) == NULL)
     {
       fprintf (stderr, "unexec(): dlsym(%s): %s \n",
 	       (char *) DYNODUMP_SYM, dlerror());
--- a/src/window.c	Mon Aug 13 10:01:24 2007 +0200
+++ b/src/window.c	Mon Aug 13 10:02:21 2007 +0200
@@ -1552,7 +1552,7 @@
 */
        (window, arg))
 {
-  register struct window *w = decode_window (window);
+  REGISTER struct window *w = decode_window (window);
 
   w->dedicated = NILP (arg) ? Qnil : Qt;
 
--- a/src/xmu.c	Mon Aug 13 10:01:24 2007 +0200
+++ b/src/xmu.c	Mon Aug 13 10:02:21 2007 +0200
@@ -56,10 +56,10 @@
 #include <ctype.h>
 
 
-int XmuCursorNameToIndex (const char *name)
+int XmuCursorNameToIndex (CONST char *name)
 {
-    static const struct _CursorName {
-	const char	*name;
+    static CONST struct _CursorName {
+	CONST char	*name;
 	unsigned int	shape;
     } cursor_names[] = {
 			{"x_cursor",		XC_X_cursor},
@@ -140,7 +140,7 @@
 			{"watch",		XC_watch},
 			{"xterm",		XC_xterm},
     };
-    const struct _CursorName *table;
+    CONST struct _CursorName *table;
     int i;
     char tmp[40];
 
@@ -371,7 +371,7 @@
 }
 
 
-int XmuReadBitmapDataFromFile (const char *filename,
+int XmuReadBitmapDataFromFile (CONST char *filename,
 			       /* Remaining args are RETURNED */
 			       unsigned int *width,
 			       unsigned int *height,
--- a/src/xmu.h	Mon Aug 13 10:01:24 2007 +0200
+++ b/src/xmu.h	Mon Aug 13 10:02:21 2007 +0200
@@ -20,8 +20,8 @@
 
 #else
 
-int XmuCursorNameToIndex (const char *name);
-int XmuReadBitmapDataFromFile (const char *filename, unsigned int *width,
+int XmuCursorNameToIndex (CONST char *name);
+int XmuReadBitmapDataFromFile (CONST char *filename, unsigned int *width,
                                unsigned int *height, unsigned char **datap,
                                int *x_hot, int *y_hot);
 int XmuPrintDefaultErrorMessage (Display *dpy, XErrorEvent *event, FILE *fp);
--- a/tests/reproduce-bugs.el	Mon Aug 13 10:01:24 2007 +0200
+++ b/tests/reproduce-bugs.el	Mon Aug 13 10:02:21 2007 +0200
@@ -160,6 +160,14 @@
   (insert (buffer-string))
   (delete-region 8 9))
 
+(defbug 5
+  (interactive)
+  (with-temp-buffer
+    (insert "abc")
+    (forward-char -1)
+    (subst-char-in-region 1 4 ?b ?\344)
+    (if (not (= (point) 3))
+	(message "Bug!  point should equal 3 but is %d" (point)))))
 
 ;;; crash popup frames FIXED
 ;;(global-set-key
--- a/version.sh	Mon Aug 13 10:01:24 2007 +0200
+++ b/version.sh	Mon Aug 13 10:02:21 2007 +0200
@@ -1,5 +1,5 @@
 #!/bin/sh
 emacs_major_version=20
 emacs_minor_version=3
-emacs_beta_version=27
-xemacs_codename="Skopje"
+emacs_beta_version=28
+xemacs_codename="Reykjavik"