]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Big merge part 10.
authorBruno Haible <bruno@clisp.org>
Wed, 25 Jul 2001 16:26:01 +0000 (16:26 +0000)
committerBruno Haible <bruno@clisp.org>
Wed, 25 Jul 2001 16:26:01 +0000 (16:26 +0000)
misc/ChangeLog
misc/po-mode.el

index b753c96ffb7acf14392abab847f9d3659a0096b5..dbfecc9e7082afbfbbbbbdf8d5005c557839ff6e 100644 (file)
@@ -1,3 +1,8 @@
+2000-01-18  François Pinard  <pinard@iro.umontreal.ca>
+
+       * 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  <pinard@iro.umontreal.ca>
 
        * po-mode.el (po-subedit-abort): Change variable names.
index ff2e146839c79f0f090d716452048f0746201e80..68fff6635ef71668c42dabcd869ccc2c26355cd8 100644 (file)
@@ -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)