]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Inline po-find-this-msgstr.
authorBruno Haible <bruno@clisp.org>
Sun, 14 Oct 2007 22:26:46 +0000 (22:26 +0000)
committerBruno Haible <bruno@clisp.org>
Tue, 23 Jun 2009 10:15:18 +0000 (12:15 +0200)
gettext-tools/misc/ChangeLog
gettext-tools/misc/po-mode.el

index d9209862f9aae9ea0aa2f5aee18a93118338a4dd..64f747bfb95b9545cf67f8a001de4fb3febc3892 100644 (file)
@@ -1,5 +1,8 @@
 2007-10-14  Bruno Haible  <bruno@clisp.org>
 
+       * po-mode.el (po-find-span-of-entry): Inline po-find-this-msgstr.
+       (po-find-this-msgstr): Remove function.
+
        * po-mode.el (po-start-of-msgstr-form, po-end-of-msgstr-form): New
        defvars.
 
index 3a5ad0a5429812fb776eddc36016005c1ed6dbd2..7b2fa0a84895181e77ad2d0c76407f165c803c7d 100644 (file)
@@ -61,7 +61,6 @@
 ;;    contents of msgstr[0] would be copied. (Not sure if this should happen
 ;;    at the end of the editing msgstr[0] or at the beginning of the editing
 ;;    of msgstr[1].) Reason: These two strings are usually very similar.
-;; Make po-find-this-msgstr call po-find-span-of-entry, not vice versa.
 ;; Remove old po-get-msgstr, rename po-get-msgstr-new to po-get-msgstr-form.
 ;; Remove old po-set-msgstr, rename po-set-msgstr-new to po-set-msgstr-form.
 ;; Remove old po-subedit-exit-old.
@@ -1464,7 +1463,15 @@ untranslated or translated."
     (re-search-forward po-any-msgid-regexp)
     (setq po-start-of-msgid (match-beginning 0))
     (save-excursion
-      (po-find-this-msgstr here))
+      (when (>= here po-start-of-msgstr-block)
+        ;; point was somewhere inside of msgstr*
+        (goto-char here)
+        (end-of-line)
+        (re-search-backward "^\\(#~[ \t]*\\)?msgstr"))
+      ;; Detect the bounderies of the msgstr we are interested in.
+      (re-search-forward po-any-msgstr-form-regexp)
+      (setq po-start-of-msgstr-form (match-beginning 0)
+            po-end-of-msgstr-form (match-end 0)))
     ;; Classify the entry.
     (setq po-entry-type
           (if (eq (following-char) ?#)
@@ -1479,18 +1486,6 @@ untranslated or translated."
     ;; Put the cursor back where it was.
     (goto-char here)))
 
-(defun po-find-this-msgstr (here)
-  "Locate msgstr following point or at point."
-  (when (>= here po-start-of-msgstr-block)
-    ;; point was somewhere inside of msgstr*
-    (goto-char here)
-    (end-of-line)
-    (re-search-backward "^\\(#~[ \t]*\\)?msgstr"))
-  ;; detect the bounderies of the msgstr we are interested in
-  (re-search-forward po-any-msgstr-form-regexp)
-  (setq po-start-of-msgstr-form (match-beginning 0)
-        po-end-of-msgstr-form (match-end 0)))
-
 (defun po-add-attribute (name)
   "Add attribute NAME to the current entry, unless it is already there."
   (save-excursion