]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Fix recognition of version number.
authorBruno Haible <bruno@clisp.org>
Mon, 9 Jul 2001 21:37:19 +0000 (21:37 +0000)
committerBruno Haible <bruno@clisp.org>
Mon, 9 Jul 2001 21:37:19 +0000 (21:37 +0000)
misc/ChangeLog
misc/po-mode.el

index b501f884c0af9c603d533f8256b235175fe88df1..b84770c4c8504cdaa77f614bfac5f3383641d16b 100644 (file)
@@ -1,3 +1,8 @@
+2001-07-06  Karl Eichwalder  <ke@suse.de>
+
+       * po-mode.el (po-msgfmt-version-check): Check for version strings with
+       a single dot (e.g. 0.11) correctly.
+
 2001-07-08  Karl Eichwalder  <ke@suse.de>
 
        * po-mode.el: Don't recommend to use po-mode for POT files.
index 060674a320e23dd1416136a1ed1896b0a78333a1..59b596715636a23f7b6f385bbb2f48b025c8d8ea 100644 (file)
@@ -2585,16 +2585,17 @@ keyword for subsequent commands, also added to possible completions."
                        nil t nil "--verbose" "--version")
        (file-error nil))
 
-      ;; Make sure there's a version number in the output.
+      ;; Make sure there's a version number in the output: 0.11 or 0.10.36
       (progn (goto-char (point-min))
-            (looking-at ".* \\([0-9]+\\)\\.\\([0-9]+\\)\\.\\([0-9]+\\)$"))
+             (or (looking-at ".* \\([0-9]+\\)\\.\\([0-9]+\\)$")
+                 (looking-at ".* \\([0-9]+\\)\\.\\([0-9]+\\)\\.\\([0-9]+\\)$")))
 
       ;; Make sure the version is recent enough.
       (>= (string-to-int
           (format "%d%03d%03d"
                   (string-to-int (match-string 1))
                   (string-to-int (match-string 2))
-                  (string-to-int (match-string 3))))
+                   (string-to-int (or (match-string 3) "0"))))
          010036)
 
       ;; Remember the outcome.