From: Dave Love Date: Sat, 29 Jun 2002 10:46:39 +0000 (+0000) Subject: (detect-coding-with-priority): X-Git-Tag: emacs-pretest-23.0.90~8295^2~1864^2~606 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=2f97406eb313e642db1863c5361b3d4260498036;p=emacs.git (detect-coding-with-priority): Rewritten. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 0d9f18f12f2..6c31914853c 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2002-06-28 Dave Love + + * international/mule-util.el (detect-coding-with-priority): + Rewritten. + 2002-06-27 Dave Love * composite.el (compose-string): Doc fix. 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)