summaryrefslogtreecommitdiff
path: root/lisp/international/mule-util.el
diff options
context:
space:
mode:
authorDave Love <fx@gnu.org>2002-06-29 10:46:39 +0000
committerDave Love <fx@gnu.org>2002-06-29 10:46:39 +0000
commit2f97406eb313e642db1863c5361b3d4260498036 (patch)
treee9f3007e053cf3e13d8dc28f01cfc4e35043db43 /lisp/international/mule-util.el
parent54e12af749a90073d6d9a96fe6cc399f3251dfd3 (diff)
downloademacs-2f97406eb313e642db1863c5361b3d4260498036.tar.gz
(detect-coding-with-priority):
Rewritten.
Diffstat (limited to 'lisp/international/mule-util.el')
-rw-r--r--lisp/international/mule-util.el18
1 files changed, 5 insertions, 13 deletions
diff --git a/lisp/international/mule-util.el b/lisp/international/mule-util.el
index 9bdb4843e80..8c362373185 100644
--- a/lisp/international/mule-util.el
+++ b/lisp/international/mule-util.el
@@ -2,6 +2,7 @@
;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN.
;; Licensed to the Free Software Foundation.
+;; Copyright (C) 2002 Free Software Foundation, Inc.
;; Keywords: mule, multilingual
@@ -265,24 +266,15 @@ or one is an alias of the other."
(or (eq eol-type-1 eol-type-2)
(and (vectorp eol-type-1) (vectorp eol-type-2)))))))
-;; Fixme: delete this?
;;;###autoload
(defmacro detect-coding-with-priority (from to priority-list)
"Detect a coding system of the text between FROM and TO with PRIORITY-LIST.
PRIORITY-LIST is an alist of coding categories vs the corresponding
coding systems ordered by priority."
- `(unwind-protect
- (let* ((prio-list ,priority-list)
- (coding-category-list coding-category-list)
- ,@(mapcar (function (lambda (x) (list x x)))
- 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)))
+ `(with-coding-priority ,(mapcar #'cdr priority-list)
+ (detect-coding-region ,from ,to)))
+(make-obsolete 'detect-coding-with-priority
+ "Use with-coding-priority and detect-coding-region" "22.1")
;;;###autoload
(defun detect-coding-with-language-environment (from to lang-env)