From: Kenichi Handa Date: Mon, 8 Jul 2013 11:51:55 +0000 (+0900) Subject: decoder-tests.el (decoder-tests-prefer-utf-8-read): X-Git-Tag: emacs-24.3.90~173^2^2~42^2~45^2~387^2~1889 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=0f01f02fe70b3ca67a5119acfc5357fe79b290e2;p=emacs.git decoder-tests.el (decoder-tests-prefer-utf-8-read): Use with-ccoding-priority to avoid side-effect (Bug#14781). --- diff --git a/test/ChangeLog b/test/ChangeLog index aded5473304..458d4df1f39 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -1,3 +1,8 @@ +2013-07-08 Kenichi Handa + + * 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 * automated/file-notify-tests.el diff --git a/test/automated/decoder-tests.el b/test/automated/decoder-tests.el index e1b05faf3c0..2e99fd7f115 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))))