From: Bruno Haible Date: Mon, 9 Jul 2001 21:37:19 +0000 (+0000) Subject: Fix recognition of version number. X-Git-Tag: v0.11~617 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2e08541e066d6b0c11745c8ca3238fe4454cf048;p=thirdparty%2Fgettext.git Fix recognition of version number. --- diff --git a/misc/ChangeLog b/misc/ChangeLog index b501f884c..b84770c4c 100644 --- a/misc/ChangeLog +++ b/misc/ChangeLog @@ -1,3 +1,8 @@ +2001-07-06 Karl Eichwalder + + * 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 * po-mode.el: Don't recommend to use po-mode for POT files. diff --git a/misc/po-mode.el b/misc/po-mode.el index 060674a32..59b596715 100644 --- a/misc/po-mode.el +++ b/misc/po-mode.el @@ -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.