From: Katsumi Yamaoka Date: Tue, 23 Jul 2013 07:04:24 +0000 (+0000) Subject: [Gnus] Fix previous commit X-Git-Tag: emacs-24.3.90~173^2^2~42^2~45^2~387^2~1726 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=a048c2955c000241dceba39112c3cb7c3d27b647;p=emacs.git [Gnus] Fix previous commit * gnus.el (gnus-continuum-version): * gnus-msg.el (gnus-extended-version): Simplify. * gnus.el (gnus-continuum-version-1): Remove. * gnus-msg.el (gnus-bug): Revert. --- diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 5ff3aa1015b..5d3de61aa91 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,5 +1,11 @@ 2013-07-23 Katsumi Yamaoka + * gnus.el (gnus-continuum-version): + * gnus-msg.el (gnus-extended-version): Simplify. + + * gnus.el (gnus-continuum-version-1): Remove. + * gnus-msg.el (gnus-bug): Revert. + Calculate gnus-version correctly on Cygwin. * gnus.el (gnus-continuum-version): Do main calculations in integers. diff --git a/lisp/gnus/gnus-msg.el b/lisp/gnus/gnus-msg.el index 761156b89c6..0f78f2edc5f 100644 --- a/lisp/gnus/gnus-msg.el +++ b/lisp/gnus/gnus-msg.el @@ -1132,7 +1132,9 @@ See the variable `gnus-user-agent'." (gnus-v (when (memq 'gnus gnus-user-agent) (concat "Gnus/" - (gnus-continuum-version-1 gnus-version) + (gnus-replace-in-string + (format "%1.8f" (gnus-continuum-version gnus-version)) + "0+\\'" "") " (" gnus-version ")"))) (emacs-v (gnus-emacs-version))) (concat gnus-v (when (and gnus-v emacs-v) " ") @@ -1534,7 +1536,7 @@ If YANK is non-nil, include the original article." (X-Debbugs-Package . ,(format "%s" gnus-bug-package)) (X-Debbugs-Version - . ,(gnus-continuum-version-1))))) + . ,(format "%s" (gnus-continuum-version)))))) (when gnus-bug-create-help-buffer (push `(gnus-bug-kill-buffer) message-send-actions)) (goto-char (point-min)) diff --git a/lisp/gnus/gnus.el b/lisp/gnus/gnus.el index ca8ea8f52fa..409b1cc6255 100644 --- a/lisp/gnus/gnus.el +++ b/lisp/gnus/gnus.el @@ -3229,10 +3229,6 @@ 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) @@ -3248,21 +3244,18 @@ If ARG, insert string at point." least (if (match-beginning 3) (string-to-number (match-string 3 number)) 0)) - (gnus-replace-in-string + (string-to-number (if (zerop major) - (progn - (setq major - (if (member alpha '("(ding)" "d")) - 499 - (+ 500 (* 2 + (format "%1.2f00%02d%02d" + (if (member alpha '("(ding)" "d")) + 4.99 + (+ 5 (* 0.02 (abs (- (mm-char-int (aref (downcase alpha) 0)) (mm-char-int ?t)))) - -1))) - (format "%s.%s00%02d%02d" - (/ major 100) (% major 100) minor least)) - (format "%d.%02d%02d" major minor least)) - "0+\\'" "")))) + -0.01)) + minor least) + (format "%d.%02d%02d" major minor least)))))) (defun gnus-info-find-node (&optional nodename) "Find Info documentation of Gnus."