From: Bruno Haible Date: Thu, 23 Aug 2001 13:05:07 +0000 (+0000) Subject: po-compute-counters fix X-Git-Tag: v0.11~536 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1f934efb9fe52be0bdca7c4e0bae5a0dbf6f6d80;p=thirdparty%2Fgettext.git po-compute-counters fix --- diff --git a/misc/ChangeLog b/misc/ChangeLog index 2252a3c5b..2e1661c5d 100644 --- a/misc/ChangeLog +++ b/misc/ChangeLog @@ -1,3 +1,9 @@ +2001-08-23 Karl Eichwalder + + * po-mode.el (po-compute-counters): First save `current' + po-start-of-msgstr; use it to set `position' while looping over all + entries. + 2001-08-20 Karl Eichwalder * po-mode.el (po-mode): Add newlines to fix layout problem calling diff --git a/misc/po-mode.el b/misc/po-mode.el index c5be414ca..c5c4cf08c 100644 --- a/misc/po-mode.el +++ b/misc/po-mode.el @@ -987,8 +987,11 @@ Then, update the mode line counters." po-fuzzy-counter 0 po-untranslated-counter 0 po-obsolete-counter 0) - (let ((position 0) (total 0) here) + (let ((position 0) (total 0) current here) + ;; FIXME `here' looks obsolete / 2001-08-23 03:54:26 CEST -ke- (save-excursion + (po-find-span-of-entry) + (setq current po-start-of-msgstr) (goto-char (point-min)) ;; While counting, skip the header entry, for consistency with msgfmt. (po-find-span-of-entry) @@ -1004,7 +1007,7 @@ Then, update the mode line counters." (setq here (point)) (goto-char (match-beginning 0)) (setq total (1+ total)) - (and flag (eq (point) po-start-of-msgstr) (setq position total)) + (and flag (eq (point) current) (setq position total)) (cond ((eq (following-char) ?#) (setq po-obsolete-counter (1+ po-obsolete-counter))) ((looking-at po-untranslated-regexp)