From: Bruno Haible Date: Wed, 25 Jul 2001 16:26:01 +0000 (+0000) Subject: Big merge part 10. X-Git-Tag: v0.11~596 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a1e0b00138d07c04334e151cd6317183bcad0f71;p=thirdparty%2Fgettext.git Big merge part 10. --- diff --git a/misc/ChangeLog b/misc/ChangeLog index b753c96ff..dbfecc9e7 100644 --- a/misc/ChangeLog +++ b/misc/ChangeLog @@ -1,3 +1,8 @@ +2000-01-18 François Pinard + + * po-mode.el (po-ensure-source-references): Correctly imply the file + name from the last which has been explicitly given. + 2000-01-17 François Pinard * po-mode.el (po-subedit-abort): Change variable names. diff --git a/misc/po-mode.el b/misc/po-mode.el index ff2e14683..68fff6635 100644 --- a/misc/po-mode.el +++ b/misc/po-mode.el @@ -2173,20 +2173,23 @@ the file without moving its cursor." (save-excursion (goto-char po-start-of-entry) (if (re-search-forward "^#:" po-start-of-msgid t) - (while (looking-at "\\(\n#:\\)? *\\([^: ]+\\):\\([0-9]+\\)") - (goto-char (match-end 0)) - (let* ((name (po-match-string 2)) - (line (po-match-string 3)) - (path po-search-path) - file) - (while (and (progn (setq file (concat (car (car path)) name)) - (not (file-exists-p file))) - path) - (setq path (cdr path))) - (if path + (let (current name line path file) + (while (looking-at "\\(\n#:\\)? *\\([^: ]*\\):\\([0-9]+\\)") + (goto-char (match-end 0)) + (setq name (po-match-string 2) + line (po-match-string 3) + path po-search-path) + (if (string-equal name "") + nil + (while (and (not (file-exists-p + (setq file (concat (car (car path)) name)))) + path) + (setq path (cdr path))) + (setq current (and path file))) + (if current (setq po-reference-alist - (cons (list (concat file ":" line) - file + (cons (list (concat current ":" line) + current (string-to-int line)) po-reference-alist))))))) (setq po-reference-alist (nreverse po-reference-alist)