]> git.eshelyaron.com Git - emacs.git/commitdiff
decoder-tests.el (decoder-tests-prefer-utf-8-read):
authorKenichi Handa <handa@gnu.org>
Mon, 8 Jul 2013 11:51:55 +0000 (20:51 +0900)
committerKenichi Handa <handa@gnu.org>
Mon, 8 Jul 2013 11:51:55 +0000 (20:51 +0900)
Use with-ccoding-priority to avoid side-effect (Bug#14781).

test/ChangeLog
test/automated/decoder-tests.el

index aded547330414e0f90d1f2686884d66ec91ae010..458d4df1f395df0cd0d3c70768d017e9bf182bdd 100644 (file)
@@ -1,3 +1,8 @@
+2013-07-08  Kenichi Handa  <handa@gnu.org>
+
+       * automated/decoder-tests.el (decoder-tests-prefer-utf-8-read):
+       Use with-ccoding-priority to avoid side-effect (Bug#14781).
+
 2013-07-05  Michael Albinus  <michael.albinus@gmx.de>
 
        * automated/file-notify-tests.el
index e1b05faf3c01d44bf28e81e4c445b1a15a78b9b5..2e99fd7f115033f2e542e9c9838221941474abaa 100644 (file)
 ;; PREFER is non-nil, prefer that coding system before reading.
 
 (defun decoder-tests-prefer-utf-8-read (file detect prefer)
-  (if prefer
-      (prefer-coding-system prefer))
   (with-temp-buffer
-    (insert-file-contents file)
+    (with-coding-priority (if prefer (list prefer))
+      (insert-file-contents file))
     (if (eq buffer-file-coding-system detect)
        nil
       (format "Invalid detection: %s" buffer-file-coding-system))))