summaryrefslogtreecommitdiff
path: root/test/automated/decoder-tests.el
diff options
context:
space:
mode:
authorKenichi Handa <handa@gnu.org>2013-07-08 20:51:55 +0900
committerKenichi Handa <handa@gnu.org>2013-07-08 20:51:55 +0900
commit0f01f02fe70b3ca67a5119acfc5357fe79b290e2 (patch)
treeedaf2429aa009b254b7fcf90b5e538bc6235e78d /test/automated/decoder-tests.el
parent6602769357bba5616c4d36a12d2dce254f4b5fee (diff)
decoder-tests.el (decoder-tests-prefer-utf-8-read):
Use with-ccoding-priority to avoid side-effect (Bug#14781).
Diffstat (limited to 'test/automated/decoder-tests.el')
-rw-r--r--test/automated/decoder-tests.el5
1 files changed, 2 insertions, 3 deletions
diff --git a/test/automated/decoder-tests.el b/test/automated/decoder-tests.el
index e1b05faf3c..2e99fd7f11 100644
--- a/test/automated/decoder-tests.el
+++ b/test/automated/decoder-tests.el
@@ -213,10 +213,9 @@
;; 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))))