Commit 02efb5ee authored by Katsumi Yamaoka's avatar Katsumi Yamaoka
Browse files

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.
parent afacaa1b
2013-07-23 Katsumi Yamaoka <yamaoka@jpl.org>
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.
2013-07-19 Geoff Kuenning <geoff@cs.hmc.edu> (tiny change) 2013-07-19 Geoff Kuenning <geoff@cs.hmc.edu> (tiny change)
   
* gnus-art.el (gnus-treat-predicate): Allow functions as predicates * gnus-art.el (gnus-treat-predicate): Allow functions as predicates
......
...@@ -1132,7 +1132,7 @@ See the variable `gnus-user-agent'." ...@@ -1132,7 +1132,7 @@ See the variable `gnus-user-agent'."
(gnus-v (gnus-v
(when (memq 'gnus gnus-user-agent) (when (memq 'gnus gnus-user-agent)
(concat "Gnus/" (concat "Gnus/"
(prin1-to-string (gnus-continuum-version gnus-version) t) (gnus-continuum-version-1 gnus-version)
" (" gnus-version ")"))) " (" gnus-version ")")))
(emacs-v (gnus-emacs-version))) (emacs-v (gnus-emacs-version)))
(concat gnus-v (when (and gnus-v emacs-v) " ") (concat gnus-v (when (and gnus-v emacs-v) " ")
...@@ -1534,7 +1534,7 @@ If YANK is non-nil, include the original article." ...@@ -1534,7 +1534,7 @@ If YANK is non-nil, include the original article."
(X-Debbugs-Package (X-Debbugs-Package
. ,(format "%s" gnus-bug-package)) . ,(format "%s" gnus-bug-package))
(X-Debbugs-Version (X-Debbugs-Version
. ,(format "%s" (gnus-continuum-version)))))) . ,(gnus-continuum-version-1)))))
(when gnus-bug-create-help-buffer (when gnus-bug-create-help-buffer
(push `(gnus-bug-kill-buffer) message-send-actions)) (push `(gnus-bug-kill-buffer) message-send-actions))
(goto-char (point-min)) (goto-char (point-min))
......
...@@ -3229,6 +3229,10 @@ If ARG, insert string at point." ...@@ -3229,6 +3229,10 @@ If ARG, insert string at point."
(defun gnus-continuum-version (&optional version) (defun gnus-continuum-version (&optional version)
"Return VERSION as a floating point number." "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 (unless version
(setq version gnus-version)) (setq version gnus-version))
(when (or (string-match "^\\([^ ]+\\)? ?Gnus v?\\([0-9.]+\\)$" version) (when (or (string-match "^\\([^ ]+\\)? ?Gnus v?\\([0-9.]+\\)$" version)
...@@ -3244,18 +3248,21 @@ If ARG, insert string at point." ...@@ -3244,18 +3248,21 @@ If ARG, insert string at point."
least (if (match-beginning 3) least (if (match-beginning 3)
(string-to-number (match-string 3 number)) (string-to-number (match-string 3 number))
0)) 0))
(string-to-number (gnus-replace-in-string
(if (zerop major) (if (zerop major)
(format "%s00%02d%02d" (progn
(if (member alpha '("(ding)" "d")) (setq major
"4.99" (if (member alpha '("(ding)" "d"))
(+ 5 (* 0.02 499
(+ 500 (* 2
(abs (abs
(- (mm-char-int (aref (downcase alpha) 0)) (- (mm-char-int (aref (downcase alpha) 0))
(mm-char-int ?t)))) (mm-char-int ?t))))
-0.01)) -1)))
minor least) (format "%s.%s00%02d%02d"
(format "%d.%02d%02d" major minor least)))))) (/ major 100) (% major 100) minor least))
(format "%d.%02d%02d" major minor least))
"0+\\'" ""))))
(defun gnus-info-find-node (&optional nodename) (defun gnus-info-find-node (&optional nodename)
"Find Info documentation of Gnus." "Find Info documentation of Gnus."
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment