Index: xemacs-packages/apel/ChangeLog
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/apel/ChangeLog,v
retrieving revision 1.42
diff -d -u -r1.42 ChangeLog
--- xemacs-packages/apel/ChangeLog	15 Aug 2007 07:38:42 -0000	1.42
+++ xemacs-packages/apel/ChangeLog	1 Jul 2009 19:18:31 -0000
@@ -1,3 +1,7 @@
+2009-07-01  Jerry James  <james@xemacs.org>
+
+	* *.el, README.*, ChangeLog.upstream: Sync with 10.7.
+
 2007-08-15  Norbert Koch  <viteno@xemacs.org>
 
 	* Makefile (VERSION): XEmacs package 1.33 released.
Index: xemacs-packages/apel/ChangeLog.upstream
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/apel/ChangeLog.upstream,v
retrieving revision 1.1
diff -d -u -r1.1 ChangeLog.upstream
--- xemacs-packages/apel/ChangeLog.upstream	6 Dec 2005 10:47:17 -0000	1.1
+++ xemacs-packages/apel/ChangeLog.upstream	1 Jul 2009 19:18:32 -0000
@@ -1,3 +1,130 @@
+2007-02-14  MORIOKA Tomohiko  <tomo@kanji.zinbun.kyoto-u.ac.jp>
+
+	* APEL: Version 10.7 released.
+
+	* Makefile (VERSION): Update to 10.7.
+
+2006-12-20  MORIOKA Tomohiko  <tomo@kanji.zinbun.kyoto-u.ac.jp>
+
+	* APEL-MK (config-apel-package): Use
+	`install-get-default-package-directory'.
+
+	* install.el (install-get-default-package-directory): New
+	function.
+
+2006-12-20  MORIOKA Tomohiko  <tomo@kanji.zinbun.kyoto-u.ac.jp>
+
+	* apel-ver.el (apel-ver): Change APEL version to 10.7.
+
+2005-05-08  MORIOKA Tomohiko  <tomo@kanji.zinbun.kyoto-u.ac.jp>
+
+	* poem-xm.el (char-valid-p): New alias.
+
+2006-12-13  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+	* APEL-MK (config-apel-package): Avoid an error concerning
+	PACKAGEDIR with old XEmacs that doesn't use the package system.
+
+2006-12-12  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+	* install.el (install-update-package-files): Use
+	batch-update-directory-autoloads if it is available instead of
+	batch-update-directory.
+
+2006-12-11  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+	* APEL-MK (config-apel-package): Check for
+	(early|late|last)-package-hierarchies and configure-package-path
+	as well as (early|late|last)-packages.
+
+2006-11-13  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+	* time-stamp.el: Remove.  Suggested by Stephen Gildea, the
+	maintainer of time-stamp.el.
+
+	* EMU-ELS (emu-modules): Exclude it.
+
+	* README.en, README.ja: Remove time-stamp.el entry.
+
+2006-04-24  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+	* install.el (install-detect-elisp-directory): Fix 2002-11-29
+	change; assume default-load-path contains nil; use regexp-quote to
+	compare directories even in Emacs.
+
+2005-12-06  Ville Skyttä  <scop@xemacs.org>
+
+	* poe.el (minor-mode-overriding-map-alist): Doc fix.
+
+	* product.el (product-version-as-string): Doc fix.
+
+2002-11-29  Ben Wing  <ben@xemacs.org>
+
+	* install.el (install-detect-elisp-directory): Fix problems
+	handling backslashes in filenames (Windows).
+
+2005-06-06  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+	* filename.el (filename-special-filter-1): New macro defined for
+	filename-special-filter to use aref instead of sref for the recent
+	Emacsen.
+	(filename-special-filter): Use it.
+
+2005-06-05  Tatsuya Kinoshita  <tats@vega.ocn.ne.jp>
+
+	* poe-xemacs.el: Load `timer' even if `timer-funcs' exists.
+
+2005-05-10  TAKAHASHI Kaoru  <kaoru@kaisei.org>
+
+	* poe.el (split-string): Import from Emacs 22. Add omit-nulls
+	argument.
+
+2005-05-03  Tatsuya Kinoshita  <tats@vega.ocn.ne.jp>
+
+	* poem.el (characterp): Use `char-valid-p' if it exists.
+	* poem.el (char-or-char-int-p): Ditto.
+
+2005-02-23  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+	* poe-xemacs.el (run-at-time): Attempt to load `timer-funcs'
+	before `timer'.
+
+2004-09-27  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+	* README.en, README.ja (CVS): Remove the description about
+	developers' pserver access.
+
+2004-02-06  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+	* calist.el (use-calist-package): Add missing arg to `format'.
+
+2004-01-26  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+	* Makefile: Make `elc' into the default entry.
+
+2004-01-07  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+	* poe-xemacs.el (run-at-time): Don't use `defadvice' in order to
+	avoid a conflict with the Gnus version.
+
+2003-12-12  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+	* poe-xemacs.el (run-at-time): Fully implement it for the recent
+	XEmacsen when the fsf-compat package is not available.
+	(run-at-time-tick-tock): Check closely whether a bug is in
+	`start-itimer'.
+
+2003-12-11  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+	* poe-xemacs.el (run-at-time): Redefine it to make it punctual.
+
+2003-09-05  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+	* poem-xm.el (char-length): Don't use `defun-maybe' to define it
+	since this module may be installed as the XEmacs package which
+	should be usable by all the XEmacs 21.x series.
+
+
 2003-07-05  Yuuichi Teranishi  <teranisi@gohome.org>
 
 	* APEL: Version 10.6 released.
@@ -278,7 +405,7 @@
 	(minor-mode-map-alist): Ditto.
 
 	* README.en ((d) make.bat (for MS-DOS family)): New section.
-	* README.ja ((d) make.bat $B$rMxMQ$9$k(B (MS-DOS $B7O(B OS $B$N>l9g(B)):
+	* README.ja ((d) make.bat $(B$rMxMQ$9$k(B (MS-DOS $(B7O(B OS $(B$N>l9g(B)):
 	Ditto.
 
 2000-12-22  MORIOKA Tomohiko  <tomo@kanji.zinbun.kyoto-u.ac.jp>
@@ -3064,7 +3191,7 @@
 
 	* APEL: Version 8.4 was released.
 
-	* EMU-ELS: Don't use HIRAGANA LETTER A ($B$"(B) to detect character
+	* EMU-ELS: Don't use HIRAGANA LETTER A ($(B$"(B) to detect character
  	indexing (Emacs 20.3 or later).
 
 1998-04-20  MORIOKA Tomohiko  <morioka@jaist.ac.jp>
Index: xemacs-packages/apel/Makefile
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/apel/Makefile,v
retrieving revision 1.43
diff -d -u -r1.43 Makefile
--- xemacs-packages/apel/Makefile	15 Aug 2007 07:38:42 -0000	1.43
+++ xemacs-packages/apel/Makefile	1 Jul 2009 19:18:32 -0000
@@ -18,7 +18,7 @@
 # Boston, MA  02110-1301  USA
 
 VERSION = 1.33
-AUTHOR_VERSION = 10.6
+AUTHOR_VERSION = 10.7
 MAINTAINER = XEmacs Development Team <xemacs-beta@xemacs.org>
 PACKAGE = apel
 PKG_TYPE = regular
@@ -27,23 +27,26 @@
 
 include ../../Local.rules.inc
 
-ELCS = apel-ver.elc broken.elc calist.elc emu.elc filename.elc \
+ELCS = alist.elc apel-ver.elc broken.elc calist.elc emu.elc filename.elc \
 	install.elc inv-xemacs.elc invisible.elc mcharset.elc \
-	mcs-20.elc mcs-ltn1.elc mule-caesar.elc path-util.elc \
-	pccl.elc poe-xemacs.elc poe.elc poem-ltn1.elc poem-xm.elc \
-	poem.elc product.elc pym.elc richtext.elc static.elc \
-	pcustom.elc pces.elc pces-raw.elc pces-20.elc pces-xfc.elc \
-	atype.elc file-detect.elc
+	mule-caesar.elc path-util.elc pccl.elc pces-20.elc pces-xfc.elc \
+	pces.elc pcustom.elc poe-xemacs.elc poe.elc poem.elc product.elc \
+	pym.elc richtext.elc static.elc
 
 ## The following files are no longer in upstream apel, but tm needs them.
 ELCS += std11.elc std11-parse.elc
 
+## The following files are considered obsolete, but bbdb-rmail needs them.
+ELCS += atype.elc file-detect.elc
+
 EXTRA_SOURCES = README.en ChangeLog.upstream
 
 ifeq ($(BUILD_WITHOUT_MULE),)
-# ELCS += emu-x20.elc
-ELCS += mcs-xm.elc pccl-20.elc pces-xm.elc mcs-xmu.elc
+ELCS += mcs-20.elc mcs-xm.elc mcs-xmu.elc pccl-20.elc \
+	pces-raw.elc pces-xm.elc poem-xm.elc
 EXTRA_SOURCES += README.ja
+else
+ELCS += mcs-ltn1.elc poem-ltn1.elc
 endif
 
 PRELOADS = -l poe.el
Index: xemacs-packages/apel/README.en
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/apel/README.en,v
retrieving revision 1.4
diff -d -u -r1.4 README.en
--- xemacs-packages/apel/README.en	6 Dec 2005 10:47:17 -0000	1.4
+++ xemacs-packages/apel/README.en	1 Jul 2009 19:18:33 -0000
@@ -99,11 +99,6 @@
 
   tinycustom.el --- emulation module of custom.el
 
-** time-stamp.el
-
-This is a utility to maintain last change time stamps in files edited
-by Emacs.
-
 ** timezone.el
 
 This is a utility of time zone.  This is a Y2K fixed version.   This
@@ -242,7 +237,7 @@
 to really regularize eol codes to CRLF.  If you need further
 information, see the following URL (n.b. Japanese only)
 
-  http://openlab.ring.gr.jp/skk/cvswin-ja.html 
+  http://openlab.ring.gr.jp/skk/cvswin-ja.html
 
 * load-path (for Emacs or MULE)
 
@@ -493,9 +488,5 @@
 
 with your account name and your public key for ssh.  cvsroot is
 :ext:cvs@cvs.m17n.org:/cvs/root.
-
-If you cannot use ssh, please send UNIX /etc/passwd style crypted
-password.  you can commit with the cvsroot
-:pserver:<accountname>@cvs.m17n.org:/cvs/root.
 
 We hope you will join the open development.
Index: xemacs-packages/apel/README.ja
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/apel/README.ja,v
retrieving revision 1.4
diff -d -u -r1.4 README.ja
--- xemacs-packages/apel/README.ja	6 Dec 2005 10:47:17 -0000	1.4
+++ xemacs-packages/apel/README.ja	1 Jul 2009 19:18:33 -0000
@@ -95,10 +95,6 @@
 
   tinycustom.el --- custom.el $B$N%(%_%e%l!<%7%g%s$r9T$J$&(B
 
-** time-stamp.el
-
-Emacs $B$K$h$kJT=8$N:]!":G=*=$@5;~9o$rJ]B8$9$k$?$a$N%f!<%F%#%j%F%#!#(B
-
 ** timezone.el
 
 $B%?%$%`%>!<%s%f!<%F%#%j%F%#!#(B2000 $BG/LdBjBP1~HG!#(BEmacs 18 $B$H(B GNUS 3.14.4
@@ -229,7 +225,7 @@
 
 $B>e5-$NNc$G$O!"(Bmeadow $B$N%P%$%J%j$,(B c:\usr\Meadow\1.10\bin\meadow95.exe
 $B$K%$%s%9%H!<%k$5$l$F$$$k$3$H$rA0Ds$K$7$F$$$^$9!#$=$NA0Ds$K4p$E$-!"(BAPEL
-$B$N%b%8%e!<%k$N$&$A!"(Bmeadow $B$N%P!<%8%g%s$K0MB8$7$J$$%b%8%e!<%k$r(B 
+$B$N%b%8%e!<%k$N$&$A!"(Bmeadow $B$N%P!<%8%g%s$K0MB8$7$J$$%b%8%e!<%k$r(B
 
   c:\usr\Meadow\site-lisp
 
@@ -311,7 +307,7 @@
 $B$-$^$;$s$N$G9TKv%3!<%I$r(B CRLF $B$K=$@5$7$F$*;H$$2<$5$$!#$3$NLdBj$K$D$$$F(B
 $B>\$7$/$O!"(B
 
-  http://openlab.ring.gr.jp/skk/cvswin-ja.html 
+  http://openlab.ring.gr.jp/skk/cvswin-ja.html
 
 $B$r$4;2>H2<$5$$!#(B
 
@@ -585,10 +581,5 @@
 
 $B$K%"%+%&%s%HL>$H!"(Bssh $B$N8x3+80$rAw$C$F$/$@$5$$!#(Bssh $B7PM3$G$O!"(Bcvsroot
 $B$O(B :ext:cvs@cvs.m17n.org:/cvs/root $B$H$J$j$^$9!#(B
-
-$B$I$&$7$F$b(B ssh $B$,;H$($J$$>l9g!"(Bpserver $B7PM3$G$b3+H/$K;22C$G$-$^$9!#$3(B
-$B$N>l9g!"(BUNIX $B$N(B /etc/passwd $BMM<0$G0E9f2=$5$l$?%Q%9%o!<%I$rAw$C$F2<$5$$!#(B
-$B$3$N>l9g(B cvsroot $B$O(B :pserver:<$B%"%+%&%s%HL>(B>@cvs.m17n.org:/cvs/root $B$H(B
-$B$J$j$^$9!#(B
 
 $B3+$+$l$?3+H/$K;22C$7$F$/$@$5$k$3$H$r4|BT$7$^$9!#(B
Index: xemacs-packages/apel/alist.el
===================================================================
RCS file: xemacs-packages/apel/alist.el
diff -N xemacs-packages/apel/alist.el
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ xemacs-packages/apel/alist.el	1 Jul 2009 19:18:33 -0000
@@ -0,0 +1,101 @@
+;;; alist.el --- utility functions for association list
+
+;; Copyright (C) 1993,1994,1995,1996,1998,2000 Free Software Foundation, Inc.
+
+;; Author: MORIOKA Tomohiko <tomo@m17n.org>
+;; Keywords: alist
+
+;; This file is part of GNU Emacs.
+
+;; 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, 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 GNU Emacs; see the file COPYING.  If not, write to the
+;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
+
+;;; Code:
+
+;;;###autoload
+(defun put-alist (key value alist)
+  "Set cdr of an element (KEY . ...) in ALIST to VALUE and return ALIST.
+If there is no such element, create a new pair (KEY . VALUE) and
+return a new alist whose car is the new pair and cdr is ALIST."
+  (let ((elm (assoc key alist)))
+    (if elm
+	(progn
+	  (setcdr elm value)
+	  alist)
+      (cons (cons key value) alist))))
+
+;;;###autoload
+(defun del-alist (key alist)
+  "Delete an element whose car equals KEY from ALIST.
+Return the modified ALIST."
+  (let ((pair (assoc key alist)))
+    (if pair
+	(delq pair alist)
+      alist)))
+
+;;;###autoload
+(defun set-alist (symbol key value)
+  "Set cdr of an element (KEY . ...) in the alist bound to SYMBOL to VALUE."
+  (or (boundp symbol)
+      (set symbol nil))
+  (set symbol (put-alist key value (symbol-value symbol))))
+
+;;;###autoload
+(defun remove-alist (symbol key)
+  "Delete an element whose car equals KEY from the alist bound to SYMBOL."
+  (and (boundp symbol)
+       (set symbol (del-alist key (symbol-value symbol)))))
+
+;;;###autoload
+(defun modify-alist (modifier default)
+  "Store elements in the alist MODIFIER in the alist DEFAULT.
+Return the modified alist."
+  (mapcar (function
+	   (lambda (as)
+	     (setq default (put-alist (car as)(cdr as) default))))
+	  modifier)
+  default)
+
+;;;###autoload
+(defun set-modified-alist (symbol modifier)
+  "Store elements in the alist MODIFIER in an alist bound to SYMBOL.
+If SYMBOL is not bound, set it to nil at first."
+  (if (not (boundp symbol))
+      (set symbol nil))
+  (set symbol (modify-alist modifier (eval symbol))))
+
+
+;;; @ association-vector-list
+;;;
+
+;;;###autoload
+(defun vassoc (key avlist)
+  "Search AVLIST for an element whose first element equals KEY.
+AVLIST is a list of vectors.
+See also `assoc'."
+  (while (and avlist
+	      (not (equal key (aref (car avlist) 0))))
+    (setq avlist (cdr avlist)))
+  (and avlist
+       (car avlist)))
+
+
+;;; @ end
+;;;
+
+(require 'product)
+(product-provide (provide 'alist) (require 'apel-ver))
+
+;;; alist.el ends here
Index: xemacs-packages/apel/apel-ver.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/apel/apel-ver.el,v
retrieving revision 1.2
diff -d -u -r1.2 apel-ver.el
--- xemacs-packages/apel/apel-ver.el	6 Dec 2005 10:47:17 -0000	1.2
+++ xemacs-packages/apel/apel-ver.el	1 Jul 2009 19:18:33 -0000
@@ -1,6 +1,6 @@
 ;;; apel-ver.el --- Declare APEL version.
 
-;; Copyright (C) 1999 Free Software Foundation, Inc.
+;; Copyright (C) 1999, 2000, 2003, 2006 Free Software Foundation, Inc.
 
 ;; Author: Shuhei KOBAYASHI <shuhei@aqua.ocn.ne.jp>
 ;;	Keiichi Suzuki <keiichi@nanap.org>
@@ -20,8 +20,8 @@
 
 ;; You should have received a copy of the GNU General Public License
 ;; along with this program; see the file COPYING.  If not, write to
-;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
 
 ;;; Commentary:
 
@@ -43,7 +43,8 @@
   ;; (product-define "APEL" nil '(10 3))	; Released 30 December 2000
   ;; (product-define "APEL" nil '(10 4))	; Released 04 October 2002
   ;; (product-define "APEL" nil '(10 5))	; Released 06 June 2003
-  (product-define "APEL" nil '(10 6))		; Released 05 July 2003
+  ;; (product-define "APEL" nil '(10 6))	; Released 05 July 2003
+  (product-define "APEL" nil '(10 7))
   )
 
 (defun apel-version ()
Index: xemacs-packages/apel/atype.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/apel/atype.el,v
retrieving revision 1.5
diff -d -u -r1.5 atype.el
--- xemacs-packages/apel/atype.el	6 Dec 2005 10:47:17 -0000	1.5
+++ xemacs-packages/apel/atype.el	1 Jul 2009 19:18:33 -0000
@@ -20,8 +20,8 @@
 
 ;; You should have received a copy of the GNU General Public License
 ;; along with GNU Emacs; see the file COPYING.  If not, write to the
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
 
 ;;; Code:
 
Index: xemacs-packages/apel/broken.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/apel/broken.el,v
retrieving revision 1.5
diff -d -u -r1.5 broken.el
--- xemacs-packages/apel/broken.el	6 Dec 2005 10:47:18 -0000	1.5
+++ xemacs-packages/apel/broken.el	1 Jul 2009 19:18:33 -0000
@@ -19,8 +19,8 @@
 
 ;; You should have received a copy of the GNU General Public License
 ;; along with GNU Emacs; see the file COPYING.  If not, write to the
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
 
 ;;; Code:
 
Index: xemacs-packages/apel/calist.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/apel/calist.el,v
retrieving revision 1.3
diff -d -u -r1.3 calist.el
--- xemacs-packages/apel/calist.el	10 Jul 2000 04:41:04 -0000	1.3
+++ xemacs-packages/apel/calist.el	1 Jul 2009 19:18:33 -0000
@@ -21,8 +21,8 @@
 
 ;; You should have received a copy of the GNU General Public License
 ;; along with GNU Emacs; see the file COPYING.  If not, write to the
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
 
 ;;; Code:
 
@@ -48,7 +48,7 @@
 	      (if (intern-soft (symbol-name sym)
 			       calist-field-match-method-obarray)
 		  (signal 'conflict-of-calist-symbol
-			  (list (format "Conflict of symbol %s")))
+			  (list (format "Conflict of symbol %s" sym)))
 		(if (fboundp sym)
 		    (define-calist-field-match-method
 		      sym (symbol-function sym))
Index: xemacs-packages/apel/emu.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/apel/emu.el,v
retrieving revision 1.9
diff -d -u -r1.9 emu.el
--- xemacs-packages/apel/emu.el	6 Dec 2005 10:47:18 -0000	1.9
+++ xemacs-packages/apel/emu.el	1 Jul 2009 19:18:33 -0000
@@ -19,8 +19,8 @@
 
 ;; You should have received a copy of the GNU General Public License
 ;; along with GNU Emacs; see the file COPYING.  If not, write to the
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
 
 ;;; Code:
 
Index: xemacs-packages/apel/file-detect.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/apel/file-detect.el,v
retrieving revision 1.5
diff -d -u -r1.5 file-detect.el
--- xemacs-packages/apel/file-detect.el	6 Dec 2005 10:47:18 -0000	1.5
+++ xemacs-packages/apel/file-detect.el	1 Jul 2009 19:18:33 -0000
@@ -21,8 +21,8 @@
 
 ;; You should have received a copy of the GNU General Public License
 ;; along with GNU Emacs; see the file COPYING.  If not, write to the
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
 
 ;;; Commentary:
 
Index: xemacs-packages/apel/filename.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/apel/filename.el,v
retrieving revision 1.4
diff -d -u -r1.4 filename.el
--- xemacs-packages/apel/filename.el	6 Dec 2005 10:47:18 -0000	1.4
+++ xemacs-packages/apel/filename.el	1 Jul 2009 19:18:33 -0000
@@ -20,8 +20,8 @@
 
 ;; You should have received a copy of the GNU General Public License
 ;; along with GNU Emacs; see the file COPYING.  If not, write to the
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
 
 ;;; Code:
 
@@ -34,8 +34,8 @@
   "Apply initial ARGUMENT to sequence of FUNCTIONS.
 FUNCTIONS is list of functions.
 
-(poly-funcall '(f1 f2 .. fn) arg) is as same as
-(fn .. (f2 (f1 arg)) ..).
+\(poly-funcall '(f1 f2 .. fn) arg) is as same as
+\(fn .. (f2 (f1 arg)) ..).
 
 For example, (poly-funcall '(car number-to-string) '(100)) returns
 \"100\"."
@@ -71,7 +71,7 @@
 Moreover, if you want to convert Japanese filename to roman string by kakasi,
 
 \(if \(exec-installed-p \"kakasi\"\)
-    \(setq file-name-filters
+    \(setq filename-filters
 	  \(append '\(filename-japanese-to-roman-string\) filename-filters\)\)\)")
 
 ;;; @ filters
@@ -91,26 +91,40 @@
   (let ((code (char-int character)))
     (or (< code 32)(= code 127))))
 
+(eval-when-compile
+  (defmacro filename-special-filter-1 (string)
+    (let (sref inc-i)
+      (if (or (not (fboundp 'sref))
+	      (>= emacs-major-version 21)
+	      (and (= emacs-major-version 20)
+		   (>= emacs-minor-version 3)))
+	  (setq sref 'aref
+		inc-i '(1+ i))
+	(setq sref 'aref
+	      inc-i '(+ i (char-length chr))))
+      (` (let ((len (length (, string)))
+	       (b 0)(i 0)
+	       (dest ""))
+	   (while (< i len)
+	     (let ((chr ((, sref) (, string) i))
+		   (lst filename-replacement-alist)
+		   ret)
+	       (while (and lst (not ret))
+		 (if (if (functionp (car (car lst)))
+			 (setq ret (funcall (car (car lst)) chr))
+		       (setq ret (memq chr (car (car lst)))))
+		     t			; quit this loop.
+		   (setq lst (cdr lst))))
+	       (if ret
+		   (setq dest (concat dest (substring (, string) b i)
+				      (cdr (car lst)))
+			 i (, inc-i)
+			 b i)
+		 (setq i (, inc-i)))))
+	   (concat dest (substring (, string) b)))))))
+
 (defun filename-special-filter (string)
-  (let ((len (length string))
-	(b 0)(i 0)
-	(dest ""))
-    (while (< i len)
-      (let ((chr (sref string i))
-            (lst filename-replacement-alist)
-            ret)
-        (while (and lst (not ret))
-          (if (if (functionp (car (car lst)))
-                  (setq ret (funcall (car (car lst)) chr))
-                (setq ret (memq chr (car (car lst)))))
-              t                         ; quit this loop.
-            (setq lst (cdr lst))))
-	(if ret
-	    (setq dest (concat dest (substring string b i)(cdr (car lst)))
-		  i (+ i (char-length chr))
-		  b i)
-	  (setq i (+ i (char-length chr))))))
-    (concat dest (substring string b))))
+  (filename-special-filter-1 string))
 
 (defun filename-eliminate-top-low-lines (string)
   (if (string-match "^_+" string)
Index: xemacs-packages/apel/install.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/apel/install.el,v
retrieving revision 1.6
diff -d -u -r1.6 install.el
--- xemacs-packages/apel/install.el	6 Dec 2005 10:47:18 -0000	1.6
+++ xemacs-packages/apel/install.el	1 Jul 2009 19:18:33 -0000
@@ -1,8 +1,9 @@
 ;;; install.el --- Emacs Lisp package install utility
 
-;; Copyright (C) 1996,1997,1998,1999,2001 Free Software Foundation, Inc.
+;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2006
+;; 	Free Software Foundation, Inc.
 
-;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
+;; Author: MORIOKA Tomohiko <tomo@m17n.org>
 ;; Created: 1996/08/18
 ;; Keywords: install, byte-compile, directory detection
 
@@ -20,8 +21,8 @@
 
 ;; You should have received a copy of the GNU General Public License
 ;; along with GNU Emacs; see the file COPYING.  If not, write to
-;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
 
 ;;; Code:
 
@@ -158,6 +159,9 @@
     ;; v18 does not have standard site directory.
     "local.lisp"))
 
+;; Avoid compile warning.
+(eval-when-compile (autoload 'replace-in-string "subr"))
+
 (defun install-detect-elisp-directory (&optional prefix elisp-prefix
 						 allow-version-specific)
   (or prefix
@@ -165,28 +169,36 @@
   (or elisp-prefix
       (setq elisp-prefix install-elisp-prefix))
   (or (catch 'tag
-	(let ((rest default-load-path)
-	      (regexp (concat "^"
-			      ;; XEmacs change: handle backslashes (Windows)
-			      (regexp-quote (replace-in-string
-					     (file-name-as-directory
-					      (expand-file-name elisp-prefix))
-					     "\\\\" "/"))
-			      ".*/"
-			      (regexp-quote
-			       (replace-in-string prefix "\\\\" "/"))
-			      "/?$")))
+	(let ((rest (delq nil (copy-sequence default-load-path)))
+	      (regexp
+	       (concat "^"
+		       (regexp-quote (if (featurep 'xemacs)
+					 ;; Handle backslashes (Windows)
+					 (replace-in-string
+					  (file-name-as-directory
+					   (expand-file-name prefix))
+					  "\\\\" "/")
+				       (file-name-as-directory
+					(expand-file-name prefix))))
+		       ".*/"
+		       (regexp-quote
+			(if (featurep 'xemacs)
+			    ;; Handle backslashes (Windows)
+			    (replace-in-string elisp-prefix "\\\\" "/")
+			  elisp-prefix))
+		       "/?$"))
+	      dir)
 	  (while rest
-	    ;; XEmacs change: handle backslashes (Windows)
-	    (if (string-match regexp
-			      (replace-in-string (car rest) "\\\\" "/"))
+	    (setq dir (if (featurep 'xemacs)
+			  ;; Handle backslashes (Windows)
+			  (replace-in-string (car rest) "\\\\" "/")
+			(car rest)))
+	    (if (string-match regexp dir)
 		(if (or allow-version-specific
 			(not (string-match (format "/%d\\.%d"
 						   emacs-major-version
 						   emacs-minor-version)
-					   ;; XEmacs change: handle backslashes
-					   (replace-in-string (car rest)
-							      "\\\\" "/"))))
+					   dir)))
 		    (throw 'tag (car rest))))
 	    (setq rest (cdr rest)))))
       (expand-file-name (concat (if (and (not (featurep 'xemacs))
@@ -215,6 +227,32 @@
 ;;; @ for XEmacs package system
 ;;;
 
+(defun install-get-default-package-directory ()
+  (let ((dirs (append
+	       (cond
+		((boundp 'early-package-hierarchies)
+		 (append (if early-package-load-path
+			     early-package-hierarchies)
+			 (if late-package-load-path
+			     late-package-hierarchies)
+			 (if last-package-load-path
+			     last-package-hierarchies)) )
+		((boundp 'early-packages)
+		 (append (if early-package-load-path
+			     early-packages)
+			 (if late-package-load-path
+			     late-packages)
+			 (if last-package-load-path
+			     last-packages)) ))
+	       (if (and (boundp 'configure-package-path)
+			(listp configure-package-path))
+		   (delete "" configure-package-path))))
+	dir)
+    (while (and (setq dir (car dirs))
+		(not (file-exists-p dir)))
+      (setq dirs (cdr dirs)))
+    dir))
+
 (defun install-update-package-files (package dir &optional just-print)
   (cond
    (just-print
@@ -233,10 +271,13 @@
     (princ (format "Wrote %s\n"
 		   (expand-file-name "custom-load.elc" dir))))
    (t
-    (setq autoload-package-name package)
-
-    (let ((command-line-args-left (list dir)))
-      (batch-update-directory))
+    (if (fboundp 'batch-update-directory-autoloads)
+	;; XEmacs 21.5.19 and newer.
+	(let ((command-line-args-left (list package dir)))
+	  (batch-update-directory-autoloads))
+      (setq autoload-package-name package)
+      (let ((command-line-args-left (list dir)))
+	(batch-update-directory)))
 
     (let ((command-line-args-left (list dir)))
       (Custom-make-dependencies))
Index: xemacs-packages/apel/inv-xemacs.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/apel/inv-xemacs.el,v
retrieving revision 1.2
diff -d -u -r1.2 inv-xemacs.el
--- xemacs-packages/apel/inv-xemacs.el	10 Jul 2000 04:41:04 -0000	1.2
+++ xemacs-packages/apel/inv-xemacs.el	1 Jul 2009 19:18:33 -0000
@@ -20,8 +20,8 @@
 
 ;; 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.
+;; Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+;; MA 02110-1301, USA.
 
 ;;; Code:
 
Index: xemacs-packages/apel/invisible.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/apel/invisible.el,v
retrieving revision 1.2
diff -d -u -r1.2 invisible.el
--- xemacs-packages/apel/invisible.el	10 Jul 2000 04:41:05 -0000	1.2
+++ xemacs-packages/apel/invisible.el	1 Jul 2009 19:18:33 -0000
@@ -19,8 +19,8 @@
 
 ;; You should have received a copy of the GNU General Public License
 ;; along with GNU Emacs; see the file COPYING.  If not, write to the
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
 
 ;;; Code:
 
Index: xemacs-packages/apel/mcharset.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/apel/mcharset.el,v
retrieving revision 1.4
diff -d -u -r1.4 mcharset.el
--- xemacs-packages/apel/mcharset.el	6 Dec 2005 10:47:18 -0000	1.4
+++ xemacs-packages/apel/mcharset.el	1 Jul 2009 19:18:33 -0000
@@ -19,8 +19,8 @@
 
 ;; You should have received a copy of the GNU General Public License
 ;; along with GNU Emacs; see the file COPYING.  If not, write to the
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
 
 ;;; Code:
 
Index: xemacs-packages/apel/mcs-20.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/apel/mcs-20.el,v
retrieving revision 1.6
diff -d -u -r1.6 mcs-20.el
--- xemacs-packages/apel/mcs-20.el	6 Dec 2005 10:47:18 -0000	1.6
+++ xemacs-packages/apel/mcs-20.el	1 Jul 2009 19:18:33 -0000
@@ -19,8 +19,8 @@
 
 ;; You should have received a copy of the GNU General Public License
 ;; along with GNU Emacs; see the file COPYING.  If not, write to the
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
 
 ;;; Commentary:
 
Index: xemacs-packages/apel/mcs-ltn1.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/apel/mcs-ltn1.el,v
retrieving revision 1.3
diff -d -u -r1.3 mcs-ltn1.el
--- xemacs-packages/apel/mcs-ltn1.el	6 Dec 2005 10:47:18 -0000	1.3
+++ xemacs-packages/apel/mcs-ltn1.el	1 Jul 2009 19:18:33 -0000
@@ -20,8 +20,8 @@
 
 ;; You should have received a copy of the GNU General Public License
 ;; along with GNU Emacs; see the file COPYING.  If not, write to the
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
 
 ;;; Code:
 
Index: xemacs-packages/apel/mcs-xmu.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/apel/mcs-xmu.el,v
retrieving revision 1.1
diff -d -u -r1.1 mcs-xmu.el
--- xemacs-packages/apel/mcs-xmu.el	10 Jul 2000 04:41:05 -0000	1.1
+++ xemacs-packages/apel/mcs-xmu.el	1 Jul 2009 19:18:33 -0000
@@ -19,8 +19,8 @@
 
 ;; You should have received a copy of the GNU General Public License
 ;; along with GNU Emacs; see the file COPYING.  If not, write to the
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
 
 ;;; Commentary:
 
Index: xemacs-packages/apel/mule-caesar.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/apel/mule-caesar.el,v
retrieving revision 1.4
diff -d -u -r1.4 mule-caesar.el
--- xemacs-packages/apel/mule-caesar.el	10 Jul 2000 04:41:05 -0000	1.4
+++ xemacs-packages/apel/mule-caesar.el	1 Jul 2009 19:18:33 -0000
@@ -19,8 +19,8 @@
 
 ;; You should have received a copy of the GNU General Public License
 ;; along with GNU Emacs; see the file COPYING.  If not, write to the
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
 
 ;;; Code:
 
Index: xemacs-packages/apel/path-util.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/apel/path-util.el,v
retrieving revision 1.5
diff -d -u -r1.5 path-util.el
--- xemacs-packages/apel/path-util.el	6 Dec 2005 10:47:18 -0000	1.5
+++ xemacs-packages/apel/path-util.el	1 Jul 2009 19:18:33 -0000
@@ -19,8 +19,8 @@
 
 ;; You should have received a copy of the GNU General Public License
 ;; along with GNU Emacs; see the file COPYING.  If not, write to the
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
 
 ;;; Code:
 
Index: xemacs-packages/apel/pccl-20.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/apel/pccl-20.el,v
retrieving revision 1.4
diff -d -u -r1.4 pccl-20.el
--- xemacs-packages/apel/pccl-20.el	14 Aug 2007 21:23:02 -0000	1.4
+++ xemacs-packages/apel/pccl-20.el	1 Jul 2009 19:18:33 -0000
@@ -20,8 +20,8 @@
 
 ;; You should have received a copy of the GNU General Public License
 ;; along with GNU Emacs; see the file COPYING.  If not, write to the
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
 
 ;;; Code:
 
Index: xemacs-packages/apel/pccl.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/apel/pccl.el,v
retrieving revision 1.6
diff -d -u -r1.6 pccl.el
--- xemacs-packages/apel/pccl.el	14 Aug 2007 21:23:02 -0000	1.6
+++ xemacs-packages/apel/pccl.el	1 Jul 2009 19:18:34 -0000
@@ -19,8 +19,8 @@
 
 ;; You should have received a copy of the GNU General Public License
 ;; along with GNU Emacs; see the file COPYING.  If not, write to the
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
 
 ;;; ##### Much of the logic here is flawed in the context of XEmacs
 ;;; packages.  All the static-if and broken-facility stuff is evaluated at
Index: xemacs-packages/apel/pces-20.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/apel/pces-20.el,v
retrieving revision 1.2
diff -d -u -r1.2 pces-20.el
--- xemacs-packages/apel/pces-20.el	10 Jul 2000 04:41:05 -0000	1.2
+++ xemacs-packages/apel/pces-20.el	1 Jul 2009 19:18:34 -0000
@@ -20,8 +20,8 @@
 
 ;; You should have received a copy of the GNU General Public License
 ;; along with GNU Emacs; see the file COPYING.  If not, write to the
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
 
 ;;; Commentary:
 
Index: xemacs-packages/apel/pces-raw.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/apel/pces-raw.el,v
retrieving revision 1.3
diff -d -u -r1.3 pces-raw.el
--- xemacs-packages/apel/pces-raw.el	10 Jul 2000 04:41:05 -0000	1.3
+++ xemacs-packages/apel/pces-raw.el	1 Jul 2009 19:18:34 -0000
@@ -19,8 +19,8 @@
 
 ;; You should have received a copy of the GNU General Public License
 ;; along with GNU Emacs; see the file COPYING.  If not, write to the
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
 
 ;;; Code:
 
Index: xemacs-packages/apel/pces-xfc.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/apel/pces-xfc.el,v
retrieving revision 1.2
diff -d -u -r1.2 pces-xfc.el
--- xemacs-packages/apel/pces-xfc.el	10 Jul 2000 04:41:05 -0000	1.2
+++ xemacs-packages/apel/pces-xfc.el	1 Jul 2009 19:18:34 -0000
@@ -19,8 +19,8 @@
 
 ;; You should have received a copy of the GNU General Public License
 ;; along with GNU Emacs; see the file COPYING.  If not, write to the
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
 
 ;;; Code:
 
Index: xemacs-packages/apel/pces-xm.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/apel/pces-xm.el,v
retrieving revision 1.2
diff -d -u -r1.2 pces-xm.el
--- xemacs-packages/apel/pces-xm.el	10 Jul 2000 04:41:05 -0000	1.2
+++ xemacs-packages/apel/pces-xm.el	1 Jul 2009 19:18:34 -0000
@@ -19,8 +19,8 @@
 
 ;; You should have received a copy of the GNU General Public License
 ;; along with GNU Emacs; see the file COPYING.  If not, write to the
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
 
 ;;; Code:
 
Index: xemacs-packages/apel/pces.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/apel/pces.el,v
retrieving revision 1.2
diff -d -u -r1.2 pces.el
--- xemacs-packages/apel/pces.el	10 Jul 2000 04:41:05 -0000	1.2
+++ xemacs-packages/apel/pces.el	1 Jul 2009 19:18:34 -0000
@@ -19,8 +19,8 @@
 
 ;; You should have received a copy of the GNU General Public License
 ;; along with GNU Emacs; see the file COPYING.  If not, write to the
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
 
 ;;; Code:
 
Index: xemacs-packages/apel/pcustom.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/apel/pcustom.el,v
retrieving revision 1.2
diff -d -u -r1.2 pcustom.el
--- xemacs-packages/apel/pcustom.el	10 Jul 2000 04:41:06 -0000	1.2
+++ xemacs-packages/apel/pcustom.el	1 Jul 2009 19:18:34 -0000
@@ -21,8 +21,8 @@
 
 ;; You should have received a copy of the GNU General Public License
 ;; along with this program; see the file COPYING.  If not, write to the
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
 
 ;;; Commentary:
 
Index: xemacs-packages/apel/poe-xemacs.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/apel/poe-xemacs.el,v
retrieving revision 1.2
diff -d -u -r1.2 poe-xemacs.el
--- xemacs-packages/apel/poe-xemacs.el	10 Jul 2000 04:41:06 -0000	1.2
+++ xemacs-packages/apel/poe-xemacs.el	1 Jul 2009 19:18:34 -0000
@@ -20,8 +20,8 @@
 
 ;; 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.
+;; Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+;; MA 02110-1301, USA.
 
 ;;; Code:
 
@@ -82,33 +82,113 @@
 ;;;
 
 (condition-case nil
+    (require 'timer-funcs)
+  (error nil))
+(condition-case nil
     (require 'timer)
-  (error
+  (error nil))
+(or
+ (or (featurep 'timer-funcs) (featurep 'timer))
+ (progn
    (require 'itimer)
-   (defun-maybe run-at-time (time repeat function &rest args)
-     (start-itimer (make-temp-name "rat")
-		   `(lambda ()
-		      (,function ,@args))
-		   time repeat))
+   (if (and (= emacs-major-version 19) (<= emacs-minor-version 14))
+       (defun-maybe run-at-time (time repeat function &rest args)
+	 (start-itimer (make-temp-name "rat")
+		       `(lambda ()
+			  (,function ,@args))
+		       time repeat))
+     (defun-maybe run-at-time (time repeat function &rest args)
+       "Function emulating the function of the same name of Emacs.
+TIME should be nil meaning now, or a number of seconds from now.
+Return an itimer object which can be used in either `delete-itimer'
+or `cancel-timer'."
+       (apply #'start-itimer "run-at-time"
+	      function (if time (max time 1e-9) 1e-9)
+	      repeat nil t args)))
    (defalias 'cancel-timer 'delete-itimer)
    (defun with-timeout-handler (tag)
      (throw tag 'timeout))
    (defmacro-maybe with-timeout (list &rest body)
      (let ((seconds (car list))
 	   (timeout-forms (cdr list)))
-     `(let ((with-timeout-tag (cons nil nil))
-	    with-timeout-value with-timeout-timer)
-	(if (catch with-timeout-tag
-	      (progn
-		(setq with-timeout-timer
-		      (run-at-time ,seconds nil
-				   'with-timeout-handler
-				   with-timeout-tag))
-		(setq with-timeout-value (progn . ,body))
-		nil))
-	    (progn . ,timeout-forms)
-	  (cancel-timer with-timeout-timer)
-	  with-timeout-value))))))
+       `(let ((with-timeout-tag (cons nil nil))
+	      with-timeout-value with-timeout-timer)
+	  (if (catch with-timeout-tag
+		(progn
+		  (setq with-timeout-timer
+			(run-at-time ,seconds nil
+				     'with-timeout-handler
+				     with-timeout-tag))
+		  (setq with-timeout-value (progn . ,body))
+		  nil))
+	      (progn . ,timeout-forms)
+	    (cancel-timer with-timeout-timer)
+	    with-timeout-value))))))
+
+(require 'broken)
+
+(broken-facility run-at-time-tick-tock
+  "`run-at-time' is not punctual."
+  ;; Note that it doesn't support XEmacsen prior to the version 19.15
+  ;; since `start-itimer' doesn't pass arguments to a timer function.
+  (or (and (= emacs-major-version 19) (<= emacs-minor-version 14))
+      (condition-case nil
+	  (progn
+	    (unless (or itimer-process itimer-timer)
+	      (itimer-driver-start))
+	    ;; Check whether there is a bug to which the difference of
+	    ;; the present time and the time when the itimer driver was
+	    ;; woken up is subtracted from the initial itimer value.
+	    (let* ((inhibit-quit t)
+		   (ctime (current-time))
+		   (itimer-timer-last-wakeup
+		    (prog1
+			ctime
+		      (setcar ctime (1- (car ctime)))))
+		   (itimer-list nil)
+		   (itimer (start-itimer "run-at-time" 'ignore 5)))
+	      (sleep-for 0.1) ;; Accept the timeout interrupt.
+	      (prog1
+		  (> (itimer-value itimer) 0)
+		(delete-itimer itimer))))
+	(error nil))))
+
+(when-broken run-at-time-tick-tock
+  (defalias 'run-at-time
+    (lambda (time repeat function &rest args)
+      "Function emulating the function of the same name of Emacs.
+It works correctly for TIME even if there is a bug in the XEmacs core.
+TIME should be nil meaning now, or a number of seconds from now.
+Return an itimer object which can be used in either `delete-itimer'
+or `cancel-timer'."
+      (let ((itimers (list nil)))
+	(setcar
+	 itimers
+	 (apply #'start-itimer "fixed-run-at-time"
+		(lambda (itimers repeat function &rest args)
+		  (let ((itimer (car itimers)))
+		    (if repeat
+			(progn
+			  (set-itimer-function
+			   itimer
+			   (lambda (itimer repeat function &rest args)
+			     (set-itimer-restart itimer repeat)
+			     (set-itimer-function itimer function)
+			     (set-itimer-function-arguments itimer args)
+			     (apply function args)))
+			  (set-itimer-function-arguments
+			   itimer
+			   (append (list itimer repeat function) args)))
+		      (set-itimer-function
+		       itimer
+		       (lambda (itimer function &rest args)
+			 (delete-itimer itimer)
+			 (apply function args)))
+		      (set-itimer-function-arguments
+		       itimer
+		       (append (list itimer function) args)))))
+		1e-9 (if time (max time 1e-9) 1e-9)
+		nil t itimers repeat function args))))))
 
 
 ;;; @ to avoid bug of XEmacs 19.14
Index: xemacs-packages/apel/poe.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/apel/poe.el,v
retrieving revision 1.7
diff -d -u -r1.7 poe.el
--- xemacs-packages/apel/poe.el	6 Dec 2005 10:47:18 -0000	1.7
+++ xemacs-packages/apel/poe.el	1 Jul 2009 19:18:34 -0000
@@ -20,8 +20,8 @@
 
 ;; You should have received a copy of the GNU General Public License
 ;; along with GNU Emacs; see the file COPYING.  If not, write to the
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
 
 ;;; Commentary:
 
@@ -1523,20 +1523,62 @@
 			 ls (- ls 65536))))
 	    (setq time (append (list ms ls) (nth 2 time))))))))
 
-;; Emacs 20.1/XEmacs 20.3(?) and later: (split-string STRING &optional PATTERN)
-;; Here is a XEmacs version.
-(defun-maybe split-string (string &optional pattern)
-  "Return a list of substrings of STRING which are separated by PATTERN.
-If PATTERN is omitted, it defaults to \"[ \\f\\t\\n\\r\\v]+\"."
-  (or pattern
-      (setq pattern "[ \f\t\n\r\v]+"))
-  ;; The FSF version of this function takes care not to cons in case
-  ;; of infloop.  Maybe we should synch?
-  (let (parts (start 0))
-    (while (string-match pattern string start)
-      (setq parts (cons (substring string start (match-beginning 0)) parts)
-	    start (match-end 0)))
-    (nreverse (cons (substring string start) parts))))
+(defconst-maybe split-string-default-separators "[ \f\t\n\r\v]+"
+  "The default value of separators for `split-string'.
+
+A regexp matching strings of whitespace.  May be locale-dependent
+\(as yet unimplemented).  Should not match non-breaking spaces.
+
+Warning: binding this to a different value and using it as default is
+likely to have undesired semantics.")
+
+;; Here is a Emacs 22 version. OMIT-NULLS
+(defun-maybe split-string (string &optional separators omit-nulls)
+  "Split STRING into substrings bounded by matches for SEPARATORS.
+
+The beginning and end of STRING, and each match for SEPARATORS, are
+splitting points.  The substrings matching SEPARATORS are removed, and
+the substrings between the splitting points are collected as a list,
+which is returned.
+
+If SEPARATORS is non-nil, it should be a regular expression matching text
+which separates, but is not part of, the substrings.  If nil it defaults to
+`split-string-default-separators', normally \"[ \\f\\t\\n\\r\\v]+\", and
+OMIT-NULLS is forced to t.
+
+If OMIT-NULLS is t, zero-length substrings are omitted from the list \(so
+that for the default value of SEPARATORS leading and trailing whitespace
+are effectively trimmed).  If nil, all zero-length substrings are retained,
+which correctly parses CSV format, for example.
+
+Note that the effect of `(split-string STRING)' is the same as
+`(split-string STRING split-string-default-separators t)').  In the rare
+case that you wish to retain zero-length substrings when splitting on
+whitespace, use `(split-string STRING split-string-default-separators)'.
+
+Modifies the match data; use `save-match-data' if necessary."
+  (let ((keep-nulls (not (if separators omit-nulls t)))
+	(rexp (or separators split-string-default-separators))
+	(start 0)
+	notfirst
+	(list nil))
+    (while (and (string-match rexp string
+			      (if (and notfirst
+				       (= start (match-beginning 0))
+				       (< start (length string)))
+				  (1+ start) start))
+		(< start (length string)))
+      (setq notfirst t)
+      (if (or keep-nulls (< start (match-beginning 0)))
+	  (setq list
+		(cons (substring string start (match-beginning 0))
+		      list)))
+      (setq start (match-end 0)))
+    (if (or keep-nulls (< start (length string)))
+	(setq list
+	      (cons (substring string start)
+		    list)))
+    (nreverse list)))
 
 
 ;;; @ Window commands emulation. (lisp/window.el)
Index: xemacs-packages/apel/poem-ltn1.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/apel/poem-ltn1.el,v
retrieving revision 1.4
diff -d -u -r1.4 poem-ltn1.el
--- xemacs-packages/apel/poem-ltn1.el	24 Mar 2002 20:52:46 -0000	1.4
+++ xemacs-packages/apel/poem-ltn1.el	1 Jul 2009 19:18:34 -0000
@@ -19,8 +19,8 @@
 
 ;; You should have received a copy of the GNU General Public License
 ;; along with GNU Emacs; see the file COPYING.  If not, write to the
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
 
 ;;; Code:
 
Index: xemacs-packages/apel/poem-xm.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/apel/poem-xm.el,v
retrieving revision 1.4
diff -d -u -r1.4 poem-xm.el
--- xemacs-packages/apel/poem-xm.el	6 Dec 2005 10:47:18 -0000	1.4
+++ xemacs-packages/apel/poem-xm.el	1 Jul 2009 19:18:34 -0000
@@ -1,6 +1,6 @@
 ;;; poem-xm.el --- poem module for XEmacs-mule; -*-byte-compile-dynamic: t;-*-
 
-;; Copyright (C) 1998,1999 Free Software Foundation, Inc.
+;; Copyright (C) 1998,1999,2002,2003,2005 Free Software Foundation, Inc.
 
 ;; Author: MORIOKA Tomohiko <tomo@m17n.org>
 ;; Keywords: emulation, compatibility, Mule
@@ -19,8 +19,8 @@
 
 ;; You should have received a copy of the GNU General Public License
 ;; along with GNU Emacs; see the file COPYING.  If not, write to the
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
 
 ;;; Code:
 
@@ -68,9 +68,14 @@
   "Return index of character succeeding CHAR whose index is INDEX."
   `(1+ ,index))
 
-(defun-maybe char-length (char)
-  "Return indexing length of multi-byte form of CHAR."
-  1)
+(if (not (fboundp 'char-length))
+    (defalias 'char-length
+      (lambda (char)
+	"Return number of bytes a CHARACTER occupies in a string or buffer.
+It always returns 1 in XEmacs.  It is for compatibility with MULE 2.3."
+	1)))
+
+(defalias-maybe 'char-valid-p 'characterp)
 
 
 ;;; @ string
Index: xemacs-packages/apel/poem.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/apel/poem.el,v
retrieving revision 1.5
diff -d -u -r1.5 poem.el
--- xemacs-packages/apel/poem.el	6 Oct 2000 08:33:45 -0000	1.5
+++ xemacs-packages/apel/poem.el	1 Jul 2009 19:18:34 -0000
@@ -19,8 +19,8 @@
 
 ;; You should have received a copy of the GNU General Public License
 ;; along with GNU Emacs; see the file COPYING.  If not, write to the
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
 
 ;;; Code:
 
@@ -77,9 +77,15 @@
 
 (defalias-maybe 'int-char 'identity)
 
-(defalias-maybe 'characterp 'integerp)
+(defalias-maybe 'characterp
+  (cond
+   ((fboundp 'char-valid-p) 'char-valid-p)
+   (t 'integerp)))
 
-(defalias-maybe 'char-or-char-int-p 'integerp)
+(defalias-maybe 'char-or-char-int-p
+  (cond
+   ((fboundp 'char-valid-p) 'char-valid-p)
+   (t 'integerp)))
 
 (defun-maybe char-octet (ch &optional n)
   "Return the octet numbered N (should be 0 or 1) of char CH.
Index: xemacs-packages/apel/product.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/apel/product.el,v
retrieving revision 1.3
diff -d -u -r1.3 product.el
--- xemacs-packages/apel/product.el	6 Dec 2005 10:47:19 -0000	1.3
+++ xemacs-packages/apel/product.el	1 Jul 2009 19:18:34 -0000
@@ -20,8 +20,8 @@
 
 ;; You should have received a copy of the GNU General Public License
 ;; along with this program; see the file COPYING.  If not, write to
-;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
 
 ;;; Commentary:
 
Index: xemacs-packages/apel/pym.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/apel/pym.el,v
retrieving revision 1.2
diff -d -u -r1.2 pym.el
--- xemacs-packages/apel/pym.el	6 Dec 2005 10:47:19 -0000	1.2
+++ xemacs-packages/apel/pym.el	1 Jul 2009 19:18:34 -0000
@@ -20,8 +20,8 @@
 
 ;; You should have received a copy of the GNU General Public License
 ;; along with GNU Emacs; see the file COPYING.  If not, write to the
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
 
 ;;; Commentary:
 
Index: xemacs-packages/apel/richtext.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/apel/richtext.el,v
retrieving revision 1.3
diff -d -u -r1.3 richtext.el
--- xemacs-packages/apel/richtext.el	6 Dec 2005 10:47:19 -0000	1.3
+++ xemacs-packages/apel/richtext.el	1 Jul 2009 19:18:34 -0000
@@ -21,8 +21,8 @@
 
 ;; You should have received a copy of the GNU General Public License
 ;; along with GNU Emacs; see the file COPYING.  If not, write to the
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
 
 ;;; Code:
 
Index: xemacs-packages/apel/static.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/apel/static.el,v
retrieving revision 1.4
diff -d -u -r1.4 static.el
--- xemacs-packages/apel/static.el	6 Dec 2005 10:47:19 -0000	1.4
+++ xemacs-packages/apel/static.el	1 Jul 2009 19:18:34 -0000
@@ -19,8 +19,8 @@
 
 ;; You should have received a copy of the GNU General Public License
 ;; along with GNU Emacs; see the file COPYING.  If not, write to the
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
 
 ;;; Code:
 
