mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-30 04:10:54 -08:00
decoder-tests.el (decoder-tests-prefer-utf-8-read):
Use with-ccoding-priority to avoid side-effect (Bug#14781).
This commit is contained in:
parent
6602769357
commit
0f01f02fe7
2 changed files with 7 additions and 3 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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))))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue