+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
(message "%s" product-info)
product-info)))
+
;;; @ End.
;;;
(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)
(product-version (product-version product))
(product-code-name (product-code-name product))
(product-version-string (product-version-string product)))
- (` (progn
- (, product-def)
- (put (, feature) 'product
- (let ((product (product-find-by-name (, product-name))))
- (product-run-checkers product '(, product-version))
- (and (, product-family)
- (product-add-to-family (, product-family)
- (, product-name)))
- (product-add-feature product (, feature))
- (if (equal '(, product-version) (product-version product))
- product
- (vector (, product-name) (, product-family)
- '(, product-version) (, product-code-name)
- nil nil nil (, product-version-string)))))
- (, feature-def)))))
+ (` (progn
+ (, product-def)
+ (put (, feature) 'product
+ (let ((product (product-find-by-name (, product-name))))
+ (product-run-checkers product '(, product-version))
+ (and (, product-family)
+ (product-add-to-family (, product-family)
+ (, product-name)))
+ (product-add-feature product (, feature))
+ (if (equal '(, product-version) (product-version product))
+ product
+ (vector (, product-name) (, product-family)
+ '(, product-version) (, product-code-name)
+ nil nil nil (, product-version-string)))))
+ (, feature-def)))))
(defun product-string-1 (product &optional verbose)
"Return information of PRODUCT as a string of \"NAME/VERSION\".
temp (substring temp (match-end 0))))))
(list (nreverse version) code-name version-string)))
+
;;; @ End.
;;;
(provide 'product) ; beware of circular dependency.
(require 'apel-ver) ; these two files depend on each other.
(product-provide 'product 'apel-ver)
+\f
;;; @ Define emacs versions.
+;;;
+
+(require 'pym)
+
+(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.")
;;(or (product-find "emacs")
;; (progn