summaryrefslogtreecommitdiff
path: root/lisp/gnus/gnus.el
diff options
context:
space:
mode:
authorKatsumi Yamaoka <yamaoka@jpl.org>2013-07-23 05:22:20 +0000
committerKatsumi Yamaoka <yamaoka@jpl.org>2013-07-23 05:22:20 +0000
commit02efb5eee680f8d1f4fa932106ed492c2fd7ff4b (patch)
tree4b32e4be636d07aaaabf230ae7a81ecf828f7d04 /lisp/gnus/gnus.el
parentafacaa1b181c04800688face1880fbfd410a9cee (diff)
downloademacs-02efb5eee680f8d1f4fa932106ed492c2fd7ff4b.tar.gz
Calculate gnus-version correctly on Cygwin
* gnus.el (gnus-continuum-version): Do main calculations in integers. (gnus-continuum-version-1): New function, return a string. * gnus-msg.el (gnus-extended-version, gnus-bug): Use gnus-continuum-version-1 instead of gnus-continuum-version.
Diffstat (limited to 'lisp/gnus/gnus.el')
-rw-r--r--lisp/gnus/gnus.el23
1 files changed, 15 insertions, 8 deletions
diff --git a/lisp/gnus/gnus.el b/lisp/gnus/gnus.el
index 8741a03b54d..ca8ea8f52fa 100644
--- a/lisp/gnus/gnus.el
+++ b/lisp/gnus/gnus.el
@@ -3229,6 +3229,10 @@ If ARG, insert string at point."
(defun gnus-continuum-version (&optional version)
"Return VERSION as a floating point number."
+ (string-to-number (gnus-continuum-version-1 (or version gnus-version))))
+
+(defun gnus-continuum-version-1 (&optional version)
+ "Return VERSION as a string."
(unless version
(setq version gnus-version))
(when (or (string-match "^\\([^ ]+\\)? ?Gnus v?\\([0-9.]+\\)$" version)
@@ -3244,18 +3248,21 @@ If ARG, insert string at point."
least (if (match-beginning 3)
(string-to-number (match-string 3 number))
0))
- (string-to-number
+ (gnus-replace-in-string
(if (zerop major)
- (format "%s00%02d%02d"
- (if (member alpha '("(ding)" "d"))
- "4.99"
- (+ 5 (* 0.02
+ (progn
+ (setq major
+ (if (member alpha '("(ding)" "d"))
+ 499
+ (+ 500 (* 2
(abs
(- (mm-char-int (aref (downcase alpha) 0))
(mm-char-int ?t))))
- -0.01))
- minor least)
- (format "%d.%02d%02d" major minor least))))))
+ -1)))
+ (format "%s.%s00%02d%02d"
+ (/ major 100) (% major 100) minor least))
+ (format "%d.%02d%02d" major minor least))
+ "0+\\'" ""))))
(defun gnus-info-find-node (&optional nodename)
"Find Info documentation of Gnus."