aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorKenichi Handa2013-07-08 20:51:55 +0900
committerKenichi Handa2013-07-08 20:51:55 +0900
commit0f01f02fe70b3ca67a5119acfc5357fe79b290e2 (patch)
treeedaf2429aa009b254b7fcf90b5e538bc6235e78d /test
parent6602769357bba5616c4d36a12d2dce254f4b5fee (diff)
downloademacs-0f01f02fe70b3ca67a5119acfc5357fe79b290e2.tar.gz
emacs-0f01f02fe70b3ca67a5119acfc5357fe79b290e2.zip
decoder-tests.el (decoder-tests-prefer-utf-8-read):
Use with-ccoding-priority to avoid side-effect (Bug#14781).
Diffstat (limited to 'test')
-rw-r--r--test/ChangeLog5
-rw-r--r--test/automated/decoder-tests.el5
2 files changed, 7 insertions, 3 deletions
diff --git a/test/ChangeLog b/test/ChangeLog
index aded5473304..458d4df1f39 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,3 +1,8 @@
12013-07-08 Kenichi Handa <handa@gnu.org>
2
3 * automated/decoder-tests.el (decoder-tests-prefer-utf-8-read):
4 Use with-ccoding-priority to avoid side-effect (Bug#14781).
5
12013-07-05 Michael Albinus <michael.albinus@gmx.de> 62013-07-05 Michael Albinus <michael.albinus@gmx.de>
2 7
3 * automated/file-notify-tests.el 8 * 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 @@
213;; PREFER is non-nil, prefer that coding system before reading. 213;; PREFER is non-nil, prefer that coding system before reading.
214 214
215(defun decoder-tests-prefer-utf-8-read (file detect prefer) 215(defun decoder-tests-prefer-utf-8-read (file detect prefer)
216 (if prefer
217 (prefer-coding-system prefer))
218 (with-temp-buffer 216 (with-temp-buffer
219 (insert-file-contents file) 217 (with-coding-priority (if prefer (list prefer))
218 (insert-file-contents file))
220 (if (eq buffer-file-coding-system detect) 219 (if (eq buffer-file-coding-system detect)
221 nil 220 nil
222 (format "Invalid detection: %s" buffer-file-coding-system)))) 221 (format "Invalid detection: %s" buffer-file-coding-system))))