]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Fix probable error in po-find-charset.
authorBruno Haible <bruno@clisp.org>
Wed, 15 Aug 2001 14:35:11 +0000 (14:35 +0000)
committerBruno Haible <bruno@clisp.org>
Wed, 15 Aug 2001 14:35:11 +0000 (14:35 +0000)
misc/ChangeLog
misc/po-mode.el

index b34c8ce9e8ba609ed5ec5c3f4bbf865d836177ab..2ce4775693fc09c9a5a565f289cd80b330281486 100644 (file)
@@ -1,3 +1,9 @@
+2001-08-02  Karl Eichwalder  <ke@suse.de>
+
+       * po-mode.el (po-find-charset): Drop 'interactive'. Use
+       'insert-file-contents-literally' to avoid side effects. Correct off
+       by 1 error.
+
 2001-08-07  Karl Eichwalder  <ke@suse.de>
 
        * po-mode.el (po-subedit-mode-menu-layout): New definition.
index b692dad2b50f616374629e4ec5b17d69069bba34..3cb076a4dc6f38fa14e6f84d448d795c3d5d5e0e 100644 (file)
@@ -751,8 +751,9 @@ Content-Type into a Mule coding system.")
     (while (not (or short-read (re-search-forward "^msgid" nil t)))
       (save-excursion
         (goto-char (point-max))
-       (let ((pair (insert-file-contents filename nil
-                                         (1- (point)) (1- (+ (point) 4096)))))
+       (let ((pair (insert-file-contents-literally filename nil
+                                                   (1- (point))
+                                                   (1- (+ (point) 4096)))))
          (setq short-read (< (nth 1 pair) 4096)))))
     (cond (short-read nil)
          ((re-search-forward charset-regexp nil t) (match-string 1))
@@ -761,7 +762,9 @@ Content-Type into a Mule coding system.")
          ;; isn't available, give up.
          (t (save-excursion
               (goto-char (point-max))
-              (insert-file-contents filename nil (point) (+ (point) 1024)))
+              (insert-file-contents-literally filename nil
+                                              (1- (point))
+                                              (1- (+ (point) 1024))))
             (if (re-search-forward charset-regexp nil t)
                 (match-string 1))))))