[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
detect-coding-with-priority
Emacs CVS Head にて detect-coding-with-priority に coding-category-* に
設定されているのと異なる category / coding-system を指定すると、
期待通りに detect されません。
例えば、以下のように coding-category-ccl が nil であっても
'((coding-category-ccl . windows-1252)) を PRIORITY-LIST に
指定すると、windows-1252 と detect してくれることを期待しますが、
結果は '(raw-text no-conversion) が返ってきます。
(with-temp-buffer
(set-buffer-multibyte nil)
(dolist (range (coding-system-get 'windows-1252 'valid-codes))
(let ((i (car range)))
(while (<= i (cdr range))
(insert i)
(setq i (1+ i)))))
(let ((coding-category-ccl nil))
(detect-coding-with-priority (point-min) (point-max)
'((coding-category-ccl . windows-1252)))))
detect-coding-with-priority の中の detect-coding-region の前に
update-coding-systems-internal の呼出しが必要だったりはしないでしょうか。
--
有沢 明宏