]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Make po-validate work again in two situations.
authorBruno Haible <bruno@clisp.org>
Sun, 17 Jun 2007 21:25:37 +0000 (21:25 +0000)
committerBruno Haible <bruno@clisp.org>
Tue, 23 Jun 2009 10:14:55 +0000 (12:14 +0200)
gettext-tools/misc/ChangeLog
gettext-tools/misc/po-mode.el

index b432221934d0d06599324810a04418d017c27ddd..eb4a4a7fcc6f74d9e1411f0051286dbafef1e839 100644 (file)
@@ -1,3 +1,13 @@
+2007-06-17  Bruno Haible  <bruno@clisp.org>
+
+       * po-mode.el (po-validate): Protect the buffer-file-name against
+       shell interpretation.
+       Reported by Laurynas Biveinis <laurynas.biveinis@gmail.com>.
+
+2007-06-17  Bruno Haible  <bruno@clisp.org>
+
+       * po-mode.el (po-msgfmt-version-check): Recognize also 0.16.2-pre1.
+
 2007-06-08  Bruno Haible  <bruno@clisp.org>
 
        * autopoint.in: Update year in --version output.
index ebfbd7443957ea08886265a8bb056875424232a4..4db9891429cfe10e4df914d4a8266bda8f64211b 100644 (file)
@@ -1,6 +1,6 @@
 ;;; po-mode.el -- major mode for GNU gettext PO files
 
-;; Copyright (C) 1995-1999, 2000-2002, 2005-2006 Free Software Foundation, Inc.
+;; Copyright (C) 1995-1999, 2000-2002, 2005-2007 Free Software Foundation, Inc.
 
 ;; Authors: François Pinard <pinard@iro.umontreal.ca>
 ;;          Greg McGary <gkm@magilla.cichlid.com>
@@ -3123,8 +3123,8 @@ Leave point after marked string."
          (function (lambda (mode-name)
                      (concat "*" mode-name " validation*"))))
         (compile-command (concat po-msgfmt-program
-                                 " --statistics -c -v -o " dev-null " "
-                                 buffer-file-name)))
+                                  " --statistics -c -v -o " dev-null " "
+                                  (shell-quote-argument buffer-file-name))))
     (po-msgfmt-version-check)
     (compile compile-command)))
 
@@ -3144,11 +3144,12 @@ Leave point after marked string."
        (file-error nil))
 
       ;; Make sure there's a version number in the output:
-      ;; 0.11 or 0.10.36 or 0.11-pre1
+      ;; 0.11 or 0.10.36 or 0.11-pre1 or 0.16.2-pre1
       (progn (goto-char (point-min))
              (or (looking-at ".* \\([0-9]+\\)\\.\\([0-9]+\\)$")
                  (looking-at ".* \\([0-9]+\\)\\.\\([0-9]+\\)\\.\\([0-9]+\\)$")
-                (looking-at ".* \\([0-9]+\\)\\.\\([0-9]+\\)[-_A-Za-z0-9]+$")))
+                (looking-at ".* \\([0-9]+\\)\\.\\([0-9]+\\)[-_A-Za-z0-9]+$")
+                (looking-at ".* \\([0-9]+\\)\\.\\([0-9]+\\)\\.\\([0-9]+\\)[-_A-Za-z0-9]+$")))
 
       ;; Make sure the version is recent enough.
       (>= (string-to-number