From: Bruno Haible Date: Sun, 17 Jun 2007 21:25:37 +0000 (+0000) Subject: Make po-validate work again in two situations. X-Git-Tag: v0.17~334 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b2a4fa7e6579982aaff6bc816c831fbd6ed953fa;p=thirdparty%2Fgettext.git Make po-validate work again in two situations. --- diff --git a/gettext-tools/misc/ChangeLog b/gettext-tools/misc/ChangeLog index b43222193..eb4a4a7fc 100644 --- a/gettext-tools/misc/ChangeLog +++ b/gettext-tools/misc/ChangeLog @@ -1,3 +1,13 @@ +2007-06-17 Bruno Haible + + * po-mode.el (po-validate): Protect the buffer-file-name against + shell interpretation. + Reported by Laurynas Biveinis . + +2007-06-17 Bruno Haible + + * po-mode.el (po-msgfmt-version-check): Recognize also 0.16.2-pre1. + 2007-06-08 Bruno Haible * autopoint.in: Update year in --version output. diff --git a/gettext-tools/misc/po-mode.el b/gettext-tools/misc/po-mode.el index ebfbd7443..4db989142 100644 --- a/gettext-tools/misc/po-mode.el +++ b/gettext-tools/misc/po-mode.el @@ -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 ;; Greg McGary @@ -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