Use with-ccoding-priority to avoid side-effect (Bug#14781).
+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
;; 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))))