summaryrefslogtreecommitdiffstats
path: root/gettext-tools
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2008-05-07 22:56:13 +0000
committerBruno Haible <bruno@clisp.org>2009-06-23 12:15:40 +0200
commit10b5c0b73567c285a48282a22c36e142a95bbb67 (patch)
treeae9ae17b8aa427302fe5049448b1688a47bfaf84 /gettext-tools
parent8708845f75bbba3013423e5f3ebf872115295c3e (diff)
downloadexternal_gettext-10b5c0b73567c285a48282a22c36e142a95bbb67.zip
external_gettext-10b5c0b73567c285a48282a22c36e142a95bbb67.tar.gz
external_gettext-10b5c0b73567c285a48282a22c36e142a95bbb67.tar.bz2
Fix editing of plural forms.
Diffstat (limited to 'gettext-tools')
-rw-r--r--gettext-tools/misc/ChangeLog9
-rw-r--r--gettext-tools/misc/po-mode.el8
2 files changed, 13 insertions, 4 deletions
diff --git a/gettext-tools/misc/ChangeLog b/gettext-tools/misc/ChangeLog
index 4442c04..6d245f3 100644
--- a/gettext-tools/misc/ChangeLog
+++ b/gettext-tools/misc/ChangeLog
@@ -1,3 +1,12 @@
+2008-05-07 Bruno Haible <bruno@clisp.org>
+
+ Fix editing of plural forms.
+ * po-mode.el (po-mode-version-string): Bump to 2.11.
+ (po-any-msgstr-block-regexp): Must start with msgstr or msgstr[0];
+ needed for re-search-backward.
+ (po-get-msgstr-flavor): Set the point to po-start-of-msgstr-form, not
+ to the beginning of the line.
+
2008-04-20 Bruno Haible <bruno@clisp.org>
* autopoint.in: Check that really all CVS directories are removed.
diff --git a/gettext-tools/misc/po-mode.el b/gettext-tools/misc/po-mode.el
index 8042848..bd4853f 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-2007 Free Software Foundation, Inc.
+;; Copyright (C) 1995-1999, 2000-2002, 2005-2008 Free Software Foundation, Inc.
;; Authors: François Pinard <pinard@iro.umontreal.ca>
;; Greg McGary <gkm@magilla.cichlid.com>
@@ -64,7 +64,7 @@
;;; Code:
-(defconst po-mode-version-string "2.1" "\
+(defconst po-mode-version-string "2.11" "\
Version number of this version of po-mode.el.")
;;; Emacs portability matters - part I.
@@ -1011,7 +1011,7 @@ Initialize or replace current translation with the original message"))])
"Regexp matching a whole msgid field, whether obsolete or not.")
(defvar po-any-msgstr-block-regexp
- "^\\(#~[ \t]*\\)?msgstr.*\n\\(\\(#~[ \t]*\\)?\".*\n\\)*\\(\\(#~[ \t]*\\)?msgstr\\[[0-9]\\].*\n\\(\\(#~[ \t]*\\)?\".*\n\\)*\\)*"
+ "^\\(#~[ \t]*\\)?msgstr\\([ \t]\\|\\[0\\]\\).*\n\\(\\(#~[ \t]*\\)?\".*\n\\)*\\(\\(#~[ \t]*\\)?msgstr\\[[0-9]\\].*\n\\(\\(#~[ \t]*\\)?\".*\n\\)*\\)*"
"Regexp matching a whole msgstr or msgstr[] field, whether obsolete or not.")
(defvar po-any-msgstr-form-regexp
@@ -1893,7 +1893,7 @@ If FORM is itself a string, then this string is used for insertion."
(defun po-get-msgstr-flavor ()
"Helper function to detect msgstr and msgstr[] variants."
- (beginning-of-line)
+ (goto-char po-start-of-msgstr-form)
(re-search-forward "^\\(#~[ \t]*\\)?\\(msgstr\\(\\[[0-9]\\]\\)?\\)")
(match-string 2))