2 |
|
|
3 |
;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN. |
;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN. |
4 |
;; Licensed to the Free Software Foundation. |
;; Licensed to the Free Software Foundation. |
5 |
|
;; Copyright (C) 2002 Free Software Foundation, Inc. |
6 |
|
|
7 |
;; Keywords: mule, multilingual |
;; Keywords: mule, multilingual |
8 |
|
|
266 |
(or (eq eol-type-1 eol-type-2) |
(or (eq eol-type-1 eol-type-2) |
267 |
(and (vectorp eol-type-1) (vectorp eol-type-2))))))) |
(and (vectorp eol-type-1) (vectorp eol-type-2))))))) |
268 |
|
|
|
;; Fixme: delete this? |
|
269 |
;;;###autoload |
;;;###autoload |
270 |
(defmacro detect-coding-with-priority (from to priority-list) |
(defmacro detect-coding-with-priority (from to priority-list) |
271 |
"Detect a coding system of the text between FROM and TO with PRIORITY-LIST. |
"Detect a coding system of the text between FROM and TO with PRIORITY-LIST. |
272 |
PRIORITY-LIST is an alist of coding categories vs the corresponding |
PRIORITY-LIST is an alist of coding categories vs the corresponding |
273 |
coding systems ordered by priority." |
coding systems ordered by priority." |
274 |
`(unwind-protect |
`(with-coding-priority ,(mapcar #'cdr priority-list) |
275 |
(let* ((prio-list ,priority-list) |
(detect-coding-region ,from ,to))) |
276 |
(coding-category-list coding-category-list) |
(make-obsolete 'detect-coding-with-priority |
277 |
,@(mapcar (function (lambda (x) (list x x))) |
"Use with-coding-priority and detect-coding-region" "22.1") |
|
coding-category-list)) |
|
|
(mapc (function (lambda (x) (set (car x) (cdr x)))) |
|
|
prio-list) |
|
|
(set-coding-priority (mapcar #'car prio-list)) |
|
|
(detect-coding-region ,from ,to)) |
|
|
;; We must restore the internal database. |
|
|
(set-coding-priority coding-category-list) |
|
|
(update-coding-systems-internal))) |
|
278 |
|
|
279 |
;;;###autoload |
;;;###autoload |
280 |
(defun detect-coding-with-language-environment (from to lang-env) |
(defun detect-coding-with-language-environment (from to lang-env) |