From ee8a86111e3e5e5df6b3beda603463446c700c96 Mon Sep 17 00:00:00 2001 From: shuhei Date: Fri, 24 Dec 1999 13:19:23 +0000 Subject: [PATCH] Synch up to APEL 10.0. --- ChangeLog | 109 ++++++++++++++++++++++++++++++++++++++++++++++++++++++-- EMU-ELS | 27 +++++++++++--- Makefile | 2 +- alist.el | 3 +- atype.el | 3 +- broken.el | 3 +- calist.el | 3 +- emu-mule.el | 3 +- emu.el | 3 +- env.el | 3 +- file-detect.el | 3 +- filename.el | 3 +- install.el | 3 +- inv-18.el | 3 +- inv-19.el | 3 +- inv-xemacs.el | 3 +- invisible.el | 3 +- localhook.el | 5 ++- mcharset.el | 3 +- mcs-20.el | 3 +- mcs-e20.el | 3 +- mcs-ltn1.el | 3 +- mcs-nemacs.el | 3 +- mcs-om.el | 3 +- mcs-xm.el | 3 +- mcs-xmu.el | 3 +- mule-caesar.el | 3 +- path-util.el | 3 +- pccl-20.el | 3 +- pccl-om.el | 3 +- pccl.el | 3 +- pces-20.el | 3 +- pces-e20.el | 4 +-- pces-e20_2.el | 3 +- pces-nemacs.el | 3 +- pces-om.el | 3 +- pces-raw.el | 3 +- pces-xfc.el | 3 +- pces-xm.el | 3 +- pces.el | 3 +- pcustom.el | 3 +- poe-18.el | 71 +++++++++++++++++++++++++++++++++--- poe-xemacs.el | 3 +- poe.el | 34 +++++------------- poem-e20.el | 3 +- poem-e20_2.el | 3 +- poem-e20_3.el | 3 +- poem-ltn1.el | 3 +- poem-nemacs.el | 3 +- poem-om.el | 3 +- poem-xm.el | 3 +- poem.el | 3 +- pym.el | 3 +- richtext.el | 3 +- static.el | 3 +- time-stamp.el | 3 +- tinycustom.el | 4 ++- tinyrich.el | 5 ++- 58 files changed, 317 insertions(+), 91 deletions(-) diff --git a/ChangeLog b/ChangeLog index 304deaf..ba73cf8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,36 @@ +1999-12-24 Yuuichi Teranishi + + * APEL: Version 10.0 released. + +1999-12-24 Keiichi Suzuki + + * apel-ver.el: Fix file header. + +1999-12-23 Yuuichi Teranishi + + * timezone.el (timezone-abs): Eliminated. + (timezone-zone-to-minute): Use `abs' instead of `timezone-abs'. + + * poe-18.el (current-time-zone): Use `abs'. + +1999-12-23 Keiichi Suzuki + + * product.el: Fix file header. `checkdoc' fix. + + * apel-ver.el: Fix file header. + +1999-12-22 Shuhei KOBAYASHI + + * APEL-ELS, EMU-ELS: product.el, apel-ver.el, time-stamp.el, + and timezone.el are version-dependent. + + * product.el (emacs-major-version, emacs-minor-version): Moved + from poe.el. + + * poe.el (emacs-major-version, emacs-minor-version): Removed. + + * pym.el: Add product information. + 1999-12-22 Yuuichi Teranishi * poe.el (string-to-int): Commented out an alias for @@ -143,6 +176,78 @@ Modified some comments. +1999-12-22 Yuuichi Teranishi + + * timezone.el: Modified comments. + (toplevel): Require 'product. + +1999-12-21 Shuhei KOBAYASHI + + * apel-ver.el: Footer fix. + +1999-12-21 Yuuichi Teranishi + + * poe-18.el (current-time-zone): New function. + (current-time-world-timezones, current-time-local-timezone): + New variables. + (current-time-string): Use `current-time-zone' to get local timezone. + (current-time): Ditto. + + * timezone.el: New file. + + * APEL-ELS (apel-modules): Add `timezone' if existing timezone.el + has y2k problem. + + * product.el (product-string-1): Use `int-to-string' instead of + `number-to-string'. + +1999-12-20 Shuhei KOBAYASHI + + * apel-ver.el, product.el: Header fix. + +1999-12-20 Keiichi Suzuki + + * alist.el, atype.el, broken.el, calist.el, emu-mule.el, emu.el, + env.el, file-detect.el, filename.el, install.el, inv-18.el, + inv-19.el, inv-xemacs.el, invisible.el, localhook.el, + mcharset.el, mcs-20.el, mcs-e20.el, mcs-ltn1.el, mcs-nemacs.el, + mcs-om.el, mcs-xm.el, mcs-xmu.el, mule-caesar.el, path-util.el, + pccl-20.el, pccl-om.el, pccl.el, pces-20.el, pces-e20.el, + pces-e20_2.el, pces-nemacs.el, pces-om.el, pces-raw.el, + pces-xfc.el, pces-xm.el, pces.el, pcustom.el, poe-18.el, + poe-xemacs.el, poe.el, poem-e20.el, poem-e20_2.el, + poem-e20_3.el, poem-ltn1.el, poem-nemacs.el, poem-om.el, + poem-xm.el, poem.el, richtext.el, static.el, time-stamp.el, + tinycustom.el, tinyrich.el (TopLevel): Add product information. + + * Sync up with apel-product. + +* 1999-11-12 Keiichi Suzuki + + * product.el (product-define): Add new slot `version-string'. + (product-provide): Likewise. + (product-version-string): New function. + (product-set-version-string): New function. + (product-string-1): Use `version-string'. + (product-for-each): New function. + (product-string): Separate `product-string' and + `product-string-verbose'. + (product-string-verbose): Likewise. + (product-parse-version-string): New function. + +* 1999-11-12 Shuhei KOBAYASHI + + * product.el: Some `checkdoc' fixes. + (product-version>=): Eliminate local variable. + +* 1999-11-12 Keiichi Suzuki + + * product.el: New file. + + * apel-ver.el: New file. + + * APEL-ELS (apel-modules): Add `apel-ver' and `product'. + 1999-11-25 Yuuichi Teranishi * poe-18.el (current-time-string, current-time): New functions. @@ -163,7 +268,7 @@ 1999-11-08 Yuuichi Teranishi - * poe-18.el (put-text-property, next-property-change, + * poe-18.el (put-text-property, next-property-change, text-properties-at): Define as null function. 1999-11-02 Katsumi Yamaoka @@ -2341,7 +2446,7 @@ * APEL: Version 8.4 was released. - * EMU-ELS: Don't use HIRAGANA LETTER A (あ) to detect character + * EMU-ELS: Don't use HIRAGANA LETTER A (あ) to detect character indexing (Emacs 20.3 or later). 1998-04-20 MORIOKA Tomohiko diff --git a/EMU-ELS b/EMU-ELS index 6865884..542d2ce 100644 --- a/EMU-ELS +++ b/EMU-ELS @@ -16,8 +16,9 @@ (nconc ;; modules are sorted by compilation order. '(static broken) - ;; coming soon. - ;; '(product) + + ;; product information. + '(product apel-ver) ;; poe modules; poe modules depend on static. '(pym) @@ -148,10 +149,28 @@ (or (< emacs-major-version 19) (and (= emacs-major-version 19) (< emacs-minor-version 16)))) - '(time-stamp)) + '(time-stamp) + ;; no problem. + '()) ;; timezone.el; Some versions have Y2K problem. - ;; coming soon. + (condition-case nil + (let ((load-path (delete (expand-file-name ".") + (copy-sequence load-path)))) + ;; v18 does not have timezone.el. + (require 'timezone) + ;; Is timezone.el APEL version? + (if (product-find 'timezone) + (error "timezone.el is APEL version. Install newer version.")) + ;; Y2K test. + (or (string= (aref (timezone-parse-date "Sat, 1 Jan 00 00:00:00 GMT") + 0) + "2000") + (error "timezone.el has Y2K problem. Install fixed version.")) + ;; no problem. + '()) + (error + '(timezone))) ;; invisible modules; provided for backward compatibility with old "tm". (cond diff --git a/Makefile b/Makefile index 350c845..26c68de 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ # Makefile for APEL. # -VERSION = 9.23 +VERSION = 10.0 TAR = tar RM = /bin/rm -f diff --git a/alist.el b/alist.el index fbd409a..c016c92 100644 --- a/alist.el +++ b/alist.el @@ -100,6 +100,7 @@ its value regard as nil." ;;; @ end ;;; -(provide 'alist) +(require 'product) +(product-provide (provide 'alist) (require 'apel-ver)) ;;; alist.el ends here diff --git a/atype.el b/atype.el index 81c2866..b595296 100644 --- a/atype.el +++ b/atype.el @@ -185,6 +185,7 @@ ;;; @ end ;;; -(provide 'atype) +(require 'product) +(product-provide (provide 'atype) (require 'apel-ver)) ;;; atype.el ends here diff --git a/broken.el b/broken.el index c5d5e40..c74eb63 100644 --- a/broken.el +++ b/broken.el @@ -108,6 +108,7 @@ compile(macro expansion) time and run time, warn it." ;;; @ end ;;; -(provide 'broken) +(require 'product) +(product-provide (provide 'broken) (require 'apel-ver)) ;;; broken.el ends here diff --git a/calist.el b/calist.el index 88c6ec4..fbef680 100644 --- a/calist.el +++ b/calist.el @@ -325,6 +325,7 @@ even if other rules are matched for ALIST." ;;; @ end ;;; -(provide 'calist) +(require 'product) +(product-provide (provide 'calist) (require 'apel-ver)) ;;; calist.el ends here diff --git a/emu-mule.el b/emu-mule.el index 62cb5ce..b837e0f 100644 --- a/emu-mule.el +++ b/emu-mule.el @@ -55,6 +55,7 @@ ;;; @ end ;;; -(provide 'emu-mule) +(require 'product) +(product-provide (provide 'emu-mule) (require 'apel-ver)) ;;; emu-mule.el ends here diff --git a/emu.el b/emu.el index 038b7fb..d610c53 100644 --- a/emu.el +++ b/emu.el @@ -227,6 +227,7 @@ find-file-hooks, etc. ;;; @ end ;;; -(provide 'emu) +(require 'product) +(product-provide (provide 'emu) (require 'apel-ver)) ;;; emu.el ends here diff --git a/env.el b/env.el index c0e68f6..bc28492 100644 --- a/env.el +++ b/env.el @@ -109,6 +109,7 @@ This function works by modifying `process-environment'." (cons (concat variable "=" value) process-environment))))))) -(provide 'env) +(require 'product) +(product-provide (provide 'env) (require 'apel-ver)) ;;; env.el ends here diff --git a/file-detect.el b/file-detect.el index ce6f9bf..6dc86be 100644 --- a/file-detect.el +++ b/file-detect.el @@ -33,6 +33,7 @@ (require 'path-util) -(provide 'file-detect) +(require 'product) +(product-provide (provide 'file-detect) (require 'apel-ver)) ;;; file-detect.el ends here diff --git a/filename.el b/filename.el index c2cc48c..bbe1f9a 100644 --- a/filename.el +++ b/filename.el @@ -147,6 +147,7 @@ It refers variable `filename-filters' and default filters refers ;;; @ end ;;; -(provide 'filename) +(require 'product) +(product-provide (provide 'filename) (require 'apel-ver)) ;;; filename.el ends here diff --git a/install.el b/install.el index 3d8fdac..2d9dd41 100644 --- a/install.el +++ b/install.el @@ -194,6 +194,7 @@ ;;; @ end ;;; -(provide 'install) +(require 'product) +(product-provide (provide 'install) (require 'apel-ver)) ;;; install.el ends here diff --git a/inv-18.el b/inv-18.el index 2cd7737..f55e9ef 100644 --- a/inv-18.el +++ b/inv-18.el @@ -73,6 +73,7 @@ ;;; @ end ;;; -(provide 'inv-18) +(require 'product) +(product-provide (provide 'inv-18) (require 'apel-ver)) ;;; inv-18.el ends here diff --git a/inv-19.el b/inv-19.el index 7a8dd36..11074bf 100644 --- a/inv-19.el +++ b/inv-19.el @@ -55,6 +55,7 @@ ;;; @ end ;;; -(provide 'inv-19) +(require 'product) +(product-provide (provide 'inv-19) (require 'apel-ver)) ;;; inv-19.el ends here diff --git a/inv-xemacs.el b/inv-xemacs.el index b17b3fd..a1383d1 100644 --- a/inv-xemacs.el +++ b/inv-xemacs.el @@ -62,6 +62,7 @@ ;;; @ end ;;; -(provide 'inv-xemacs) +(require 'product) +(product-provide (provide 'inv-xemacs) (require 'apel-ver)) ;;; inv-xemacs.el ends here diff --git a/invisible.el b/invisible.el index 44eaec1..d472e15 100644 --- a/invisible.el +++ b/invisible.el @@ -36,6 +36,7 @@ ;;; @ end ;;; -(provide 'invisible) +(require 'product) +(product-provide (provide 'invisible) (require 'apel-ver)) ;;; invisible.el ends here diff --git a/localhook.el b/localhook.el index d584fdc..79bc2cc 100644 --- a/localhook.el +++ b/localhook.el @@ -58,7 +58,10 @@ ;;; Code: -(provide 'localhook) ; beware of circular dependency. +;; beware of circular dependency. +(require 'product) +(product-provide (provide 'localhook) (require 'apel-ver)) + (require 'poe) ; this file is loaded from poe.el. ;; These two functions are not complete, but work enough for our purpose. diff --git a/mcharset.el b/mcharset.el index 44a65cb..156c34e 100644 --- a/mcharset.el +++ b/mcharset.el @@ -113,6 +113,7 @@ variable `default-mime-charset-for-write' is returned." ;;; @ end ;;; -(provide 'mcharset) +(require 'product) +(product-provide (provide 'mcharset) (require 'apel-ver)) ;;; mcharset.el ends here diff --git a/mcs-20.el b/mcs-20.el index b4472d5..77911a4 100644 --- a/mcs-20.el +++ b/mcs-20.el @@ -155,6 +155,7 @@ It must be symbol." ;;; @ end ;;; -(provide 'mcs-20) +(require 'product) +(product-provide (provide 'mcs-20) (require 'apel-ver)) ;;; mcs-20.el ends here diff --git a/mcs-e20.el b/mcs-e20.el index 6d54a01..00b621e 100644 --- a/mcs-e20.el +++ b/mcs-e20.el @@ -179,6 +179,7 @@ Return nil if corresponding MIME-charset is not found." (require 'mcs-20) -(provide 'mcs-e20) +(require 'product) +(product-provide (provide 'mcs-e20) (require 'apel-ver)) ;;; mcs-e20.el ends here diff --git a/mcs-ltn1.el b/mcs-ltn1.el index 643bb2a..17a93bb 100644 --- a/mcs-ltn1.el +++ b/mcs-ltn1.el @@ -104,6 +104,7 @@ ;;; @ end ;;; -(provide 'mcs-ltn1) +(require 'product) +(product-provide (provide 'mcs-ltn1) (require 'apel-ver)) ;;; mcs-ltn1.el ends here diff --git a/mcs-nemacs.el b/mcs-nemacs.el index 388db8a..0251369 100644 --- a/mcs-nemacs.el +++ b/mcs-nemacs.el @@ -122,6 +122,7 @@ ;;; @ end ;;; -(provide 'mcs-nemacs) +(require 'product) +(product-provide (provide 'mcs-nemacs) (require 'apel-ver)) ;;; mcs-nemacs.el ends here diff --git a/mcs-om.el b/mcs-om.el index 6f469d8..17f6ec1 100644 --- a/mcs-om.el +++ b/mcs-om.el @@ -237,6 +237,7 @@ It must be symbol.") ;;; @ end ;;; -(provide 'mcs-om) +(require 'product) +(product-provide (provide 'mcs-om) (require 'apel-ver)) ;;; mcs-om.el ends here diff --git a/mcs-xm.el b/mcs-xm.el index d3de9cf..0fd6d8d 100644 --- a/mcs-xm.el +++ b/mcs-xm.el @@ -159,6 +159,7 @@ Return nil if corresponding MIME-charset is not found." ;;; @ end ;;; -(provide 'mcs-xm) +(require 'product) +(product-provide (provide 'mcs-xm) (require 'apel-ver)) ;;; mcs-xm.el ends here diff --git a/mcs-xmu.el b/mcs-xmu.el index dadc2cf..e80c925 100644 --- a/mcs-xmu.el +++ b/mcs-xmu.el @@ -95,6 +95,7 @@ works for only decoding MIME-CHARSET. If it is nil, size is unlimited." ;;; @ end ;;; -(provide 'mcs-xmu) +(require 'product) +(product-provide (provide 'mcs-xmu) (require 'apel-ver)) ;;; mcs-xmu.el ends here diff --git a/mule-caesar.el b/mule-caesar.el index 4bc32ea..e03fa20 100644 --- a/mule-caesar.el +++ b/mule-caesar.el @@ -80,6 +80,7 @@ for 96 or 96x96 graphic character set)." ))))) -(provide 'mule-caesar) +(require 'product) +(product-provide (provide 'mule-caesar) (require 'apel-ver)) ;;; mule-caesar.el ends here diff --git a/path-util.el b/path-util.el index bfdf7bb..d774642 100644 --- a/path-util.el +++ b/path-util.el @@ -197,6 +197,7 @@ If PATHS is omitted, `load-path' is used." ;;; @ end ;;; -(provide 'path-util) +(require 'product) +(product-provide (provide 'path-util) (require 'apel-ver)) ;;; path-util.el ends here diff --git a/pccl-20.el b/pccl-20.el index c670ae8..b95244a 100644 --- a/pccl-20.el +++ b/pccl-20.el @@ -149,6 +149,7 @@ If CCL-PROG is symbol, it is dereferenced." ;;; @ end ;;; -(provide 'pccl-20) +(require 'product) +(product-provide (provide 'pccl-20) (require 'apel-ver)) ;;; pccl-20.el ends here diff --git a/pccl-om.el b/pccl-om.el index b289b27..6d59923 100644 --- a/pccl-om.el +++ b/pccl-om.el @@ -123,6 +123,7 @@ If CCL-PROG is symbol, it is dereferenced." ;;; @ end ;;; -(provide 'pccl-om) +(require 'product) +(product-provide (provide 'pccl-om) (require 'apel-ver)) ;;; pccl-om.el ends here diff --git a/pccl.el b/pccl.el index 9397b9a..c696f75 100644 --- a/pccl.el +++ b/pccl.el @@ -71,6 +71,7 @@ ;;; @ end ;;; -(provide 'pccl) +(require 'product) +(product-provide (provide 'pccl) (require 'apel-ver)) ;;; pccl.el ends here diff --git a/pces-20.el b/pces-20.el index 51335a7..6531710 100644 --- a/pces-20.el +++ b/pces-20.el @@ -233,6 +233,7 @@ applied to `coding-system-for-write'." ;;; @ end ;;; -(provide 'pces-20) +(require 'product) +(product-provide (provide 'pces-20) (require 'apel-ver)) ;;; pces-20.el ends here diff --git a/pces-e20.el b/pces-e20.el index 6516157..724f8af 100644 --- a/pces-e20.el +++ b/pces-e20.el @@ -42,7 +42,7 @@ ;;; @ end ;;; - -(provide 'pces-e20) +(require 'product) +(product-provide (provide 'pces-e20) (require 'apel-ver)) ;;; pces-e20.el ends here diff --git a/pces-e20_2.el b/pces-e20_2.el index 8fa59f7..5f97e04 100644 --- a/pces-e20_2.el +++ b/pces-e20_2.el @@ -144,6 +144,7 @@ be applied to `coding-system-for-read'." ;;; @ end ;;; -(provide 'pces-e20_2) +(require 'product) +(product-provide (provide 'pces-e20_2) (require 'apel-ver)) ;;; pces-e20_2.el ends here diff --git a/pces-nemacs.el b/pces-nemacs.el index 6cfebfe..6f29ea1 100644 --- a/pces-nemacs.el +++ b/pces-nemacs.el @@ -270,6 +270,7 @@ applied to `kanji-fileio-code'. [emu-nemacs.el]" ;;; @ end ;;; -(provide 'pces-nemacs) +(require 'product) +(product-provide (provide 'pces-nemacs) (require 'apel-ver)) ;;; pces-nemacs.el ends here diff --git a/pces-om.el b/pces-om.el index fdbb648..788498e 100644 --- a/pces-om.el +++ b/pces-om.el @@ -307,6 +307,7 @@ conversion except for line-break code." ;;; @ end ;;; -(provide 'pces-om) +(require 'product) +(product-provide (provide 'pces-om) (require 'apel-ver)) ;;; pces-om.el ends here diff --git a/pces-raw.el b/pces-raw.el index a7bed6e..54c751d 100644 --- a/pces-raw.el +++ b/pces-raw.el @@ -166,6 +166,7 @@ code conversion will not take place." ;;; @ end ;;; -(provide 'pces-raw) +(require 'product) +(product-provide (provide 'pces-raw) (require 'apel-ver)) ;;; pces-raw.el ends here diff --git a/pces-xfc.el b/pces-xfc.el index 8944509..1200993 100644 --- a/pces-xfc.el +++ b/pces-xfc.el @@ -42,6 +42,7 @@ ;;; @ end ;;; -(provide 'pces-xfc) +(require 'product) +(product-provide (provide 'pces-xfc) (require 'apel-ver)) ;;; pces-xfc.el ends here diff --git a/pces-xm.el b/pces-xm.el index 956c5c5..083fc56 100644 --- a/pces-xm.el +++ b/pces-xm.el @@ -72,6 +72,7 @@ ;;; @ end ;;; -(provide 'pces-xm) +(require 'product) +(product-provide (provide 'pces-xm) (require 'apel-ver)) ;;; pces-xm.el ends here diff --git a/pces.el b/pces.el index 283951c..85bce8c 100644 --- a/pces.el +++ b/pces.el @@ -53,6 +53,7 @@ ;;; @ end ;;; -(provide 'pces) +(require 'product) +(product-provide (provide 'pces) (require 'apel-ver)) ;;; pces.el ends here diff --git a/pcustom.el b/pcustom.el index 87a278a..4d023f1 100644 --- a/pcustom.el +++ b/pcustom.el @@ -59,6 +59,7 @@ ;; load emulation version of "new custom". (require 'tinycustom))) -(provide 'pcustom) +(require 'product) +(product-provide (provide 'pcustom) (require 'apel-ver)) ;;; pcustom.el ends here diff --git a/poe-18.el b/poe-18.el index b3e0f74..edba3e0 100644 --- a/poe-18.el +++ b/poe-18.el @@ -212,6 +212,64 @@ for this variable." ;;; @@ current-time. ;;; +(defvar current-time-world-timezones + '(("PST" . -800)("PDT" . -700)("MST" . -700) + ("MDT" . -600)("CST" . -600)("CDT" . -500) + ("EST" . -500)("EDT" . -400)("AST" . -400) + ("NST" . -330)("UT" . +000)("GMT" . +000) + ("BST" . +100)("MET" . +100)("EET" . +200) + ("JST" . +900)("GMT+1" . +100)("GMT+2" . +200) + ("GMT+3" . +300)("GMT+4" . +400)("GMT+5" . +500) + ("GMT+6" . +600)("GMT+7" . +700)("GMT+8" . +800) + ("GMT+9" . +900)("GMT+10" . +1000)("GMT+11" . +1100) + ("GMT+12" . +1200)("GMT+13" . +1300)("GMT-1" . -100) + ("GMT-2" . -200)("GMT-3" . -300)("GMT-4" . -400) + ("GMT-5" . -500)("GMT-6" . -600)("GMT-7" . -700) + ("GMT-8" . -800)("GMT-9" . -900)("GMT-10" . -1000) + ("GMT-11" . -1100) ("GMT-12" . -1200)) + "Time differentials of timezone from GMT in +-HHMM form. +Used in `current-time-zone' (Emacs 19 emulating function in poe-18.el).") + +(defvar current-time-local-timezone nil + "*Local timezone name. +Used in `current-time-zone' (Emacs 19 emulating function in poe-18.el).") + +(defun current-time-zone (&optional specified-time) + "Return the offset and name for the local time zone. +This returns a list of the form (OFFSET NAME). +OFFSET is an integer number of seconds ahead of UTC (east of Greenwich). + A negative value means west of Greenwich. +NAME is a string giving the name of the time zone. +Optional argument SPECIFIED-TIME is ignored in this implementation. +Some operating systems cannot provide all this information to Emacs; +in this case, `current-time-zone' returns a list containing nil for +the data it can't find." + (let ((local-timezone + (or current-time-local-timezone + (setq current-time-local-timezone + (with-temp-buffer + (call-process "date" nil (current-buffer) t) + (goto-char (point-min)) + (if (looking-at + "^.*\\([A-Z][A-Z][A-Z]\\([^ \n\t]*\\)\\).*$") + (buffer-substring (match-beginning 1) + (match-end 1))))))) + timezone abszone seconds) + (setq timezone + (or (cdr (assoc (upcase local-timezone) + current-time-world-timezones)) + ;; "+900" style or nil. + local-timezone)) + (when timezone + (if (stringp timezone) + (setq timezone (string-to-int timezone))) + ;; Taking account of minute in timezone. + ;; HHMM -> MM + (setq abszone (abs timezone)) + (setq seconds (* 60 (+ (* 60 (/ abszone 100)) (% abszone 100)))) + (list (if (< timezone 0) (- seconds) seconds) + local-timezone)))) + (or (fboundp 'si:current-time-string) (fset 'si:current-time-string (symbol-function 'current-time-string))) (defun current-time-string (&optional specified-time) @@ -219,7 +277,7 @@ for this variable." Programs can use this function to decode a time, since the number of columns in each field is fixed. The format is `Sun Sep 16 01:03:52 1973'. -If an argument is given, it specifies a time to format +If an argument SPECIFIED-TIME is given, it specifies a time to format instead of the current time. The argument should have the form: (HIGH . LOW) or the form: @@ -232,6 +290,7 @@ and from `file-attributes'." (error "Wrong type argument %s" specified-time)) (let ((high (car specified-time)) (low (cdr specified-time)) + (offset (or (car (current-time-zone)) 0)) (mdays '(31 28 31 30 31 30 31 31 30 31 30 31)) (mnames '("Jan" "Feb" "Mar" "Apr" "May" "Jun" "Jul" "Aug" "Sep" "Oct" "Nov" "Dec")) @@ -243,7 +302,7 @@ and from `file-attributes'." (error "Wrong type argument %s" high)) (or (integerp low) (error "Wrong type argument %s" low)) - (setq low (+ low 32400)) + (setq low (+ low offset)) (while (> low 65535) (setq high (1+ high) low (- low 65536))) @@ -321,6 +380,7 @@ resolution finer than a second." (HH (string-to-int (substring str 11 13))) (MM (string-to-int (substring str 14 16))) (SS (string-to-int (substring str 17 19))) + (offset (or (car (current-time-zone)) 0)) dn ct1 ct2 i1 i2 year uru) (setq ct1 0 ct2 0 i1 0 i2 0) @@ -369,10 +429,10 @@ resolution finer than a second." ct2 (+ (+ i2 (% ct2 65536)) (% (+ (* HH 3600) (* MM 60) SS) 65536))) - (while (< (- ct2 32400) 0) + (while (< (- ct2 offset) 0) (setq ct1 (1- ct1) ct2 (+ ct2 65536))) - (setq ct2 (- ct2 32400)) + (setq ct2 (- ct2 offset)) (while (> ct2 65535) (setq ct1 (1+ ct1) ct2 (- ct2 65536))) @@ -635,6 +695,7 @@ If NOSORT is dummy for compatibility." ;;; @ End. ;;; -(provide 'poe-18) +(require 'product) +(product-provide (provide 'poe-18) (require 'apel-ver)) ;;; poe-18.el ends here diff --git a/poe-xemacs.el b/poe-xemacs.el index 327d787..0ab7128 100644 --- a/poe-xemacs.el +++ b/poe-xemacs.el @@ -109,6 +109,7 @@ When called interactively, prompt for the name of the color to use." ;;; @ end ;;; -(provide 'poe-xemacs) +(require 'product) +(product-provide (provide 'poe-xemacs) (require 'apel-ver)) ;;; poe-xemacs.el ends here diff --git a/poe.el b/poe.el index 9562751..b577da1 100644 --- a/poe.el +++ b/poe.el @@ -27,34 +27,18 @@ ;;; Code: -(provide 'poe) ; beware of circular dependency. - ; localhook.el depends on poe.el. +(require 'product) +(product-provide (provide 'poe) (require 'apel-ver)) + (require 'pym) ;;; @ Version information. ;;; -;; v18 does not have many features we expect, -;; notably `eval-when-compile' and `eval-and-compile'. -(static-when (string= (substring emacs-version 0 2) "18") +(static-when (= emacs-major-version 18) (require 'poe-18)) -;; Now we can use them! -(eval-and-compile - ;; We must define these two constants at compile-time as well as - ;; load-time since they are used for compile-time version checking. - (defconst-maybe emacs-major-version - (progn (string-match "^[0-9]+" emacs-version) - (string-to-int (substring emacs-version - (match-beginning 0)(match-end 0)))) - "Major version number of this version of Emacs.") - (defconst-maybe emacs-minor-version - (progn (string-match "^[0-9]+\\.\\([0-9]+\\)" emacs-version) - (string-to-int (substring emacs-version - (match-beginning 1)(match-end 1)))) - "Minor version number of this version of Emacs.")) - ;; Some ancient version of XEmacs did not provide 'xemacs. (static-when (string-match "XEmacs" emacs-version) (provide 'xemacs)) @@ -85,7 +69,7 @@ (progn (require 'nofeature "nofile" 'noerror) (if (get 'require 'defun-maybe) - (error ""))) ; already redefined. + (error "`require' is already redefined"))) (error ;; load-time check. (or (fboundp 'si:require) @@ -204,8 +188,8 @@ See `read-from-minibuffer' for details of HISTORY argument." ;; compile-time check. (if (= (string-to-number "1e1" 16) 481) (if (get 'string-to-number 'defun-maybe) - (error "")) ; already redefined. - (error "")) ; Emacs 20.3 and ealier. + (error "`string-to-number' is already redefined")) + (error "`string-to-number' is broken")) (error ;; load-time check. (or (fboundp 'si:string-to-number) @@ -286,7 +270,7 @@ If the base used is not 10, floating point is not recognized." (progn (char-before) (if (get 'char-before 'defun-maybe) - (error ""))) ; already defined. + (error "`char-before' is already defined"))) (wrong-number-of-arguments ; Mule. ;; load-time check. (or (fboundp 'si:char-before) @@ -351,7 +335,7 @@ If POS is out of range, the value is nil." (progn (char-after) (if (get 'char-after 'defun-maybe) - (error ""))) ; already defined. + (error "`char-after' is already redefined"))) (wrong-number-of-arguments ; v18, v19 ;; load-time check. (or (fboundp 'si:char-after) diff --git a/poem-e20.el b/poem-e20.el index 57a6378..ac2a17e 100644 --- a/poem-e20.el +++ b/poem-e20.el @@ -59,6 +59,7 @@ in the region between START and END." (require 'poem-e20_2) ; for Emacs 20.1 and 20.2 ) -(provide 'poem-e20) +(require 'product) +(product-provide (provide 'poem-e20) (require 'apel-ver)) ;;; poem-e20.el ends here diff --git a/poem-e20_2.el b/poem-e20_2.el index 2f9fc77..62518e6 100644 --- a/poem-e20_2.el +++ b/poem-e20_2.el @@ -87,6 +87,7 @@ but the contents viewed as characters do change. ;;; @ end ;;; -(provide 'poem-e20_2) +(require 'product) +(product-provide (provide 'poem-e20_2) (require 'apel-ver)) ;;; poem-e20_2.el ends here diff --git a/poem-e20_3.el b/poem-e20_3.el index df9af37..9beb320 100644 --- a/poem-e20_3.el +++ b/poem-e20_3.el @@ -60,6 +60,7 @@ ;;; @ end ;;; -(provide 'poem-e20_3) +(require 'product) +(product-provide (provide 'poem-e20_3) (require 'apel-ver)) ;;; poem-e20_3.el ends here diff --git a/poem-ltn1.el b/poem-ltn1.el index 19bb3e0..3735173 100644 --- a/poem-ltn1.el +++ b/poem-ltn1.el @@ -146,6 +146,7 @@ Optional non-nil arg START-COLUMN specifies the starting column. ;;; @ end ;;; -(provide 'poem-ltn1) +(require 'product) +(product-provide (provide 'poem-ltn1) (require 'apel-ver)) ;;; poem-ltn1.el ends here diff --git a/poem-nemacs.el b/poem-nemacs.el index 5bd8915..7016426 100644 --- a/poem-nemacs.el +++ b/poem-nemacs.el @@ -213,6 +213,7 @@ Optional non-nil arg START-COLUMN specifies the starting column. ;;; @ end ;;; -(provide 'poem-nemacs) +(require 'product) +(product-provide (provide 'poem-nemacs) (require 'apel-ver)) ;;; poem-nemacs.el ends here diff --git a/poem-om.el b/poem-om.el index 39460ad..54dc3c5 100644 --- a/poem-om.el +++ b/poem-om.el @@ -158,6 +158,7 @@ Optional non-nil arg START-COLUMN specifies the starting column. ;;; @ end ;;; -(provide 'poem-om) +(require 'product) +(product-provide (provide 'poem-om) (require 'apel-ver)) ;;; poem-om.el ends here diff --git a/poem-xm.el b/poem-xm.el index 7f85b96..7dd4244 100644 --- a/poem-xm.el +++ b/poem-xm.el @@ -81,6 +81,7 @@ but the contents viewed as characters do change. ;;; @ end ;;; -(provide 'poem-xm) +(require 'product) +(product-provide (provide 'poem-xm) (require 'apel-ver)) ;;; poem-xm.el ends here diff --git a/poem.el b/poem.el index f65556d..ec752a3 100644 --- a/poem.el +++ b/poem.el @@ -94,6 +94,7 @@ N defaults to 0 if omitted. [XEmacs-mule emulating function]" ;;; @ end ;;; -(provide 'poem) +(require 'product) +(product-provide (provide 'poem) (require 'apel-ver)) ;;; poem.el ends here diff --git a/pym.el b/pym.el index ca6676d..b8d45ad 100644 --- a/pym.el +++ b/pym.el @@ -288,6 +288,7 @@ Both SYMBOL and SPEC are unevaluated. The SPEC can be 0, t, a symbol ;;; End. -(provide 'pym) +(require 'product) +(product-provide (provide 'pym) (require 'apel-ver)) ;;; pym.el ends here diff --git a/richtext.el b/richtext.el index 07e2f64..def5c28 100644 --- a/richtext.el +++ b/richtext.el @@ -179,6 +179,7 @@ Return value is \(begin end name positive-p), or nil if none was found." ;;; @ end ;;; -(provide 'richtext) +(require 'product) +(product-provide (provide 'richtext) (require 'apel-ver)) ;;; richtext.el ends here diff --git a/static.el b/static.el index 039fc06..b64440d 100644 --- a/static.el +++ b/static.el @@ -83,6 +83,7 @@ The variable SYMBOL can be referenced at either compile-time or run-time." ;;; @ end ;;; -(provide 'static) +(require 'product) +(product-provide (provide 'static) (require 'apel-ver)) ;;; static.el ends here diff --git a/time-stamp.el b/time-stamp.el index d986eaf..81d0d0b 100644 --- a/time-stamp.el +++ b/time-stamp.el @@ -274,7 +274,8 @@ The first character of DD is space if the value is less than 10." (concat (substring date 11 13) (substring date 14 16)))) -(provide 'time-stamp) +(require 'product) +(product-provide (provide 'time-stamp) (require 'apel-ver)) ;;; time-stamp.el ends here diff --git a/tinycustom.el b/tinycustom.el index 5bea63c..6b04170 100644 --- a/tinycustom.el +++ b/tinycustom.el @@ -155,7 +155,9 @@ The third argument DOC is a documentation string for the widget. This is a nop define-widget only for emulating purpose." nil) -(provide 'tinycustom) (provide 'custom) +(require 'product) +(product-provide (provide 'tinycustom) (require 'apel-ver)) + ;;; tinycustom.el ends here diff --git a/tinyrich.el b/tinyrich.el index 3929205..2cfee07 100644 --- a/tinyrich.el +++ b/tinyrich.el @@ -163,4 +163,7 @@ ;;; @ end ;;; -(provide 'tinyrich) +(require 'product) +(product-provide (provide 'tinyrich) (require 'apel-ver)) + +;; tinyrich.el ends here. -- 1.7.10.4