]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Fix failure of po-msgid-to-msgstr just after opening a buffer.
authorNoritada Kobayashi <nori1@dolphin.c.u-tokyo.ac.jp>
Sat, 8 May 2010 17:49:26 +0000 (19:49 +0200)
committerBruno Haible <bruno@clisp.org>
Sat, 8 May 2010 17:49:26 +0000 (19:49 +0200)
gettext-tools/misc/ChangeLog
gettext-tools/misc/po-mode.el

index acef43d8d4931a8f1449749afbfbfbfbd038b482..e0d6cdfcc73ffb44a08225aa813daf4481236abf 100644 (file)
@@ -1,3 +1,12 @@
+2010-05-08  Noritada Kobayashi  <nori1@dolphin.c.u-tokyo.ac.jp>
+
+       Fix failure of po-msgid-to-msgstr just after opening a buffer.
+       * po-mode.elĀ (po-msgstr-form-flavor): Remove variable.
+       (po-get-msgstr-form): Do not call po-get-msgstr-flavor.
+       (po-set-msgstr-form): Call po-get-msgstr-flavor function here.
+       Reported in
+       <http://lists.gnu.org/archive/html/bug-gnu-utils/2008-05/msg00028.html>.
+
 2010-05-08  Bruno Haible  <bruno@clisp.org>
 
        * po-mode.el (po-edit-string): Assign major mode text-mode to the
index afae18454db54d202799e1f01efaad78bf2aed81..9111d681b3bdec1d8e5c48fbda41867853713a46 100644 (file)
@@ -692,7 +692,6 @@ No doubt that highlighting, when Emacs does not allow it, is a kludge."
 (defvar po-end-of-msgstr-form)
 (defvar po-end-of-entry)
 (defvar po-entry-type)
-(defvar po-msgstr-form-flavor)
 
 ;; A few counters are usefully shown in the Emacs mode line.
 (defvar po-translated-counter)
@@ -1900,11 +1899,9 @@ If FORM is itself a string, then this string is used for insertion."
 
 (defun po-get-msgstr-form ()
   "Extract and return the unquoted msgstr string."
-  (let ((flavor (po-get-msgstr-flavor))
-        (string (po-extract-unquoted (current-buffer)
+  (let ((string (po-extract-unquoted (current-buffer)
                                      po-start-of-msgstr-form
                                      po-end-of-msgstr-form)))
-    (setq po-msgstr-form-flavor flavor)
     string))
 
 (defun po-set-msgid (form)
@@ -1935,7 +1932,7 @@ is properly requoted before the replacement occurs.
 Returns 'nil' if the buffer has not been modified, for if the new msgstr
 described by FORM is merely identical to the msgstr already in place."
   (let ((string (po-eval-requoted form
-                                  po-msgstr-form-flavor
+                                  (po-get-msgstr-flavor)
                                   (eq po-entry-type 'obsolete))))
     (save-excursion
       (goto-char po-start-of-msgstr-form)