+1999-12-24 Yuuichi Teranishi <teranisi@gohome.org>
+
+ * APEL: Version 10.0 released.
+
+1999-12-24 Keiichi Suzuki <keiichi@nanap.org>
+
+ * apel-ver.el: Fix file header.
+
+1999-12-23 Yuuichi Teranishi <teranisi@gohome.org>
+
+ * 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 <keiichi@nanap.org>
+
+ * product.el: Fix file header. `checkdoc' fix.
+
+ * apel-ver.el: Fix file header.
+
+1999-12-22 Shuhei KOBAYASHI <shuhei@aqua.ocn.ne.jp>
+
+ * 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 <teranisi@gohome.org>
* poe.el (string-to-int): Commented out an alias for
Modified some comments.
\f
+1999-12-22 Yuuichi Teranishi <teranisi@gohome.org>
+
+ * timezone.el: Modified comments.
+ (toplevel): Require 'product.
+
+1999-12-21 Shuhei KOBAYASHI <shuhei@aqua.ocn.ne.jp>
+
+ * apel-ver.el: Footer fix.
+
+1999-12-21 Yuuichi Teranishi <teranisi@gohome.org>
+
+ * 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 <shuhei@aqua.ocn.ne.jp>
+
+ * apel-ver.el, product.el: Header fix.
+
+1999-12-20 Keiichi Suzuki <keiichi@nanap.org>
+
+ * 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 <keiichi@nanap.org>
+
+ * 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 <shuhei@aqua.ocn.ne.jp>
+
+ * product.el: Some `checkdoc' fixes.
+ (product-version>=): Eliminate local variable.
+
+* 1999-11-12 Keiichi Suzuki <keiichi@nanap.org>
+
+ * product.el: New file.
+
+ * apel-ver.el: New file.
+
+ * APEL-ELS (apel-modules): Add `apel-ver' and `product'.
+
1999-11-25 Yuuichi Teranishi <teranisi@gohome.org>
* poe-18.el (current-time-string, current-time): New functions.
1999-11-08 Yuuichi Teranishi <teranisi@gohome.org>
- * 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 <yamaoka@jpl.org>
* APEL: Version 8.4 was released.
- * EMU-ELS: Don't use HIRAGANA LETTER A (\e$B$"\e(B) to detect character
+ * EMU-ELS: Don't use HIRAGANA LETTER A (\e$(B$"\e(B) to detect character
indexing (Emacs 20.3 or later).
1998-04-20 MORIOKA Tomohiko <morioka@jaist.ac.jp>
(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)
(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
# Makefile for APEL.
#
-VERSION = 9.23
+VERSION = 10.0
TAR = tar
RM = /bin/rm -f
;;; @ end
;;;
-(provide 'alist)
+(require 'product)
+(product-provide (provide 'alist) (require 'apel-ver))
;;; alist.el ends here
;;; @ end
;;;
-(provide 'atype)
+(require 'product)
+(product-provide (provide 'atype) (require 'apel-ver))
;;; atype.el ends here
;;; @ end
;;;
-(provide 'broken)
+(require 'product)
+(product-provide (provide 'broken) (require 'apel-ver))
;;; broken.el ends here
;;; @ end
;;;
-(provide 'calist)
+(require 'product)
+(product-provide (provide 'calist) (require 'apel-ver))
;;; calist.el ends here
;;; @ end
;;;
-(provide 'emu-mule)
+(require 'product)
+(product-provide (provide 'emu-mule) (require 'apel-ver))
;;; emu-mule.el ends here
;;; @ end
;;;
-(provide 'emu)
+(require 'product)
+(product-provide (provide 'emu) (require 'apel-ver))
;;; emu.el ends here
(cons (concat variable "=" value)
process-environment)))))))
-(provide 'env)
+(require 'product)
+(product-provide (provide 'env) (require 'apel-ver))
;;; env.el ends here
(require 'path-util)
-(provide 'file-detect)
+(require 'product)
+(product-provide (provide 'file-detect) (require 'apel-ver))
;;; file-detect.el ends here
;;; @ end
;;;
-(provide 'filename)
+(require 'product)
+(product-provide (provide 'filename) (require 'apel-ver))
;;; filename.el ends here
;;; @ end
;;;
-(provide 'install)
+(require 'product)
+(product-provide (provide 'install) (require 'apel-ver))
;;; install.el ends here
;;; @ end
;;;
-(provide 'inv-18)
+(require 'product)
+(product-provide (provide 'inv-18) (require 'apel-ver))
;;; inv-18.el ends here
;;; @ end
;;;
-(provide 'inv-19)
+(require 'product)
+(product-provide (provide 'inv-19) (require 'apel-ver))
;;; inv-19.el ends here
;;; @ end
;;;
-(provide 'inv-xemacs)
+(require 'product)
+(product-provide (provide 'inv-xemacs) (require 'apel-ver))
;;; inv-xemacs.el ends here
;;; @ end
;;;
-(provide 'invisible)
+(require 'product)
+(product-provide (provide 'invisible) (require 'apel-ver))
;;; invisible.el ends here
;;; 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.
;;; @ end
;;;
-(provide 'mcharset)
+(require 'product)
+(product-provide (provide 'mcharset) (require 'apel-ver))
;;; mcharset.el ends here
;;; @ end
;;;
-(provide 'mcs-20)
+(require 'product)
+(product-provide (provide 'mcs-20) (require 'apel-ver))
;;; mcs-20.el ends here
(require 'mcs-20)
-(provide 'mcs-e20)
+(require 'product)
+(product-provide (provide 'mcs-e20) (require 'apel-ver))
;;; mcs-e20.el ends here
;;; @ end
;;;
-(provide 'mcs-ltn1)
+(require 'product)
+(product-provide (provide 'mcs-ltn1) (require 'apel-ver))
;;; mcs-ltn1.el ends here
;;; @ end
;;;
-(provide 'mcs-nemacs)
+(require 'product)
+(product-provide (provide 'mcs-nemacs) (require 'apel-ver))
;;; mcs-nemacs.el ends here
;;; @ end
;;;
-(provide 'mcs-om)
+(require 'product)
+(product-provide (provide 'mcs-om) (require 'apel-ver))
;;; mcs-om.el ends here
;;; @ end
;;;
-(provide 'mcs-xm)
+(require 'product)
+(product-provide (provide 'mcs-xm) (require 'apel-ver))
;;; mcs-xm.el ends here
;;; @ end
;;;
-(provide 'mcs-xmu)
+(require 'product)
+(product-provide (provide 'mcs-xmu) (require 'apel-ver))
;;; mcs-xmu.el ends here
)))))
-(provide 'mule-caesar)
+(require 'product)
+(product-provide (provide 'mule-caesar) (require 'apel-ver))
;;; mule-caesar.el ends here
;;; @ end
;;;
-(provide 'path-util)
+(require 'product)
+(product-provide (provide 'path-util) (require 'apel-ver))
;;; path-util.el ends here
;;; @ end
;;;
-(provide 'pccl-20)
+(require 'product)
+(product-provide (provide 'pccl-20) (require 'apel-ver))
;;; pccl-20.el ends here
;;; @ end
;;;
-(provide 'pccl-om)
+(require 'product)
+(product-provide (provide 'pccl-om) (require 'apel-ver))
;;; pccl-om.el ends here
;;; @ end
;;;
-(provide 'pccl)
+(require 'product)
+(product-provide (provide 'pccl) (require 'apel-ver))
;;; pccl.el ends here
;;; @ end
;;;
-(provide 'pces-20)
+(require 'product)
+(product-provide (provide 'pces-20) (require 'apel-ver))
;;; pces-20.el ends here
;;; @ end
;;;
-
-(provide 'pces-e20)
+(require 'product)
+(product-provide (provide 'pces-e20) (require 'apel-ver))
;;; pces-e20.el ends here
;;; @ end
;;;
-(provide 'pces-e20_2)
+(require 'product)
+(product-provide (provide 'pces-e20_2) (require 'apel-ver))
;;; pces-e20_2.el ends here
;;; @ end
;;;
-(provide 'pces-nemacs)
+(require 'product)
+(product-provide (provide 'pces-nemacs) (require 'apel-ver))
;;; pces-nemacs.el ends here
;;; @ end
;;;
-(provide 'pces-om)
+(require 'product)
+(product-provide (provide 'pces-om) (require 'apel-ver))
;;; pces-om.el ends here
;;; @ end
;;;
-(provide 'pces-raw)
+(require 'product)
+(product-provide (provide 'pces-raw) (require 'apel-ver))
;;; pces-raw.el ends here
;;; @ end
;;;
-(provide 'pces-xfc)
+(require 'product)
+(product-provide (provide 'pces-xfc) (require 'apel-ver))
;;; pces-xfc.el ends here
;;; @ end
;;;
-(provide 'pces-xm)
+(require 'product)
+(product-provide (provide 'pces-xm) (require 'apel-ver))
;;; pces-xm.el ends here
;;; @ end
;;;
-(provide 'pces)
+(require 'product)
+(product-provide (provide 'pces) (require 'apel-ver))
;;; pces.el ends here
;; load emulation version of "new custom".
(require 'tinycustom)))
-(provide 'pcustom)
+(require 'product)
+(product-provide (provide 'pcustom) (require 'apel-ver))
;;; pcustom.el ends here
;;; @@ 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)
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:
(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"))
(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)))
(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)
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)))
;;; @ End.
;;;
-(provide 'poe-18)
+(require 'product)
+(product-provide (provide 'poe-18) (require 'apel-ver))
;;; poe-18.el ends here
;;; @ end
;;;
-(provide 'poe-xemacs)
+(require 'product)
+(product-provide (provide 'poe-xemacs) (require 'apel-ver))
;;; poe-xemacs.el ends here
;;; 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))
(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)
;; 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)
(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)
(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)
(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
;;; @ end
;;;
-(provide 'poem-e20_2)
+(require 'product)
+(product-provide (provide 'poem-e20_2) (require 'apel-ver))
;;; poem-e20_2.el ends here
;;; @ end
;;;
-(provide 'poem-e20_3)
+(require 'product)
+(product-provide (provide 'poem-e20_3) (require 'apel-ver))
;;; poem-e20_3.el ends here
;;; @ end
;;;
-(provide 'poem-ltn1)
+(require 'product)
+(product-provide (provide 'poem-ltn1) (require 'apel-ver))
;;; poem-ltn1.el ends here
;;; @ end
;;;
-(provide 'poem-nemacs)
+(require 'product)
+(product-provide (provide 'poem-nemacs) (require 'apel-ver))
;;; poem-nemacs.el ends here
;;; @ end
;;;
-(provide 'poem-om)
+(require 'product)
+(product-provide (provide 'poem-om) (require 'apel-ver))
;;; poem-om.el ends here
;;; @ end
;;;
-(provide 'poem-xm)
+(require 'product)
+(product-provide (provide 'poem-xm) (require 'apel-ver))
;;; poem-xm.el ends here
;;; @ end
;;;
-(provide 'poem)
+(require 'product)
+(product-provide (provide 'poem) (require 'apel-ver))
;;; poem.el ends here
;;; End.
-(provide 'pym)
+(require 'product)
+(product-provide (provide 'pym) (require 'apel-ver))
;;; pym.el ends here
;;; @ end
;;;
-(provide 'richtext)
+(require 'product)
+(product-provide (provide 'richtext) (require 'apel-ver))
;;; richtext.el ends here
;;; @ end
;;;
-(provide 'static)
+(require 'product)
+(product-provide (provide 'static) (require 'apel-ver))
;;; static.el ends here
(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
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
;;; @ end
;;;
-(provide 'tinyrich)
+(require 'product)
+(product-provide (provide 'tinyrich) (require 'apel-ver))
+
+;; tinyrich.el ends here.