[gnus git] branch master updated: m0-7-177-g169184a =1= Calculate gnus-version correctly on Cygwin

Katsumi Yamaoka <[email protected]>
Newsgroups gmane.emacs.gnus.cvs
Message-ID <[email protected]>
       via  169184a38c9a2b29a1630bc6ad2226c78ba08d2b (commit)
      from  9e86c9ef18af408e53c582bd487fdbd0fb819645 (commit)


- Log -----------------------------------------------------------------
commit 169184a38c9a2b29a1630bc6ad2226c78ba08d2b
Author: Katsumi Yamaoka <[email protected]>
Date:   Tue Jul 23 05:21:35 2013 +0000

    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.

diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 413f9bd..7bdcf06 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,13 @@
+2013-07-23  Katsumi Yamaoka  <[email protected]>
+
+	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  <[email protected]>  (tiny change)
 
 	* gnus-art.el (gnus-treat-predicate): Allow functions as predicates
diff --git a/lisp/gnus-msg.el b/lisp/gnus-msg.el
index e3f1866..761156b 100644
--- a/lisp/gnus-msg.el
+++ b/lisp/gnus-msg.el
@@ -1132,7 +1132,7 @@ See the variable `gnus-user-agent'."
 	   (gnus-v
 	    (when (memq 'gnus gnus-user-agent)
 	      (concat "Gnus/"
-		      (prin1-to-string (gnus-continuum-version gnus-version) t)
+		      (gnus-continuum-version-1 gnus-version)
 		      " (" gnus-version ")")))
 	   (emacs-v (gnus-emacs-version)))
       (concat gnus-v (when (and gnus-v emacs-v) " ")
@@ -1534,7 +1534,7 @@ If YANK is non-nil, include the original article."
                        (X-Debbugs-Package
                         . ,(format "%s" gnus-bug-package))
                        (X-Debbugs-Version
-                        . ,(format "%s" (gnus-continuum-version))))))
+                        . ,(gnus-continuum-version-1)))))
     (when gnus-bug-create-help-buffer
       (push `(gnus-bug-kill-buffer) message-send-actions))
     (goto-char (point-min))
diff --git a/lisp/gnus.el b/lisp/gnus.el
index ebc6fe9..358cbf9 100644
--- a/lisp/gnus.el
+++ b/lisp/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"
+	   (progn
+	     (setq major
 		     (if (member alpha '("(ding)" "d"))
-			 "4.99"
-		       (+ 5 (* 0.02
+		       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."

-----------------------------------------------------------------------
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we listed those
revisions in full, above.

Summary of changes:
 lisp/ChangeLog   |   10 ++++++++++
 lisp/gnus-msg.el |    4 ++--
 lisp/gnus.el     |   23 +++++++++++++++--------
 3 files changed, 27 insertions(+), 10 deletions(-)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Gnus Project".

The branch, master has been updated


hooks/post-receive
-- 
Gnus Project
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.