diff options
| author | Dave Love | 2002-06-29 10:46:39 +0000 |
|---|---|---|
| committer | Dave Love | 2002-06-29 10:46:39 +0000 |
| commit | 2f97406eb313e642db1863c5361b3d4260498036 (patch) | |
| tree | e9f3007e053cf3e13d8dc28f01cfc4e35043db43 | |
| parent | 54e12af749a90073d6d9a96fe6cc399f3251dfd3 (diff) | |
| download | emacs-2f97406eb313e642db1863c5361b3d4260498036.tar.gz emacs-2f97406eb313e642db1863c5361b3d4260498036.zip | |
(detect-coding-with-priority):
Rewritten.
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/international/mule-util.el | 18 |
2 files changed, 10 insertions, 13 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 0d9f18f12f2..6c31914853c 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2002-06-28 Dave Love <fx@gnu.org> | ||
| 2 | |||
| 3 | * international/mule-util.el (detect-coding-with-priority): | ||
| 4 | Rewritten. | ||
| 5 | |||
| 1 | 2002-06-27 Dave Love <fx@gnu.org> | 6 | 2002-06-27 Dave Love <fx@gnu.org> |
| 2 | 7 | ||
| 3 | * composite.el (compose-string): Doc fix. | 8 | * 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 @@ | |||
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN. | 3 | ;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN. |
| 4 | ;; Licensed to the Free Software Foundation. | 4 | ;; Licensed to the Free Software Foundation. |
| 5 | ;; Copyright (C) 2002 Free Software Foundation, Inc. | ||
| 5 | 6 | ||
| 6 | ;; Keywords: mule, multilingual | 7 | ;; Keywords: mule, multilingual |
| 7 | 8 | ||
| @@ -265,24 +266,15 @@ or one is an alias of the other." | |||
| 265 | (or (eq eol-type-1 eol-type-2) | 266 | (or (eq eol-type-1 eol-type-2) |
| 266 | (and (vectorp eol-type-1) (vectorp eol-type-2))))))) | 267 | (and (vectorp eol-type-1) (vectorp eol-type-2))))))) |
| 267 | 268 | ||
| 268 | ;; Fixme: delete this? | ||
| 269 | ;;;###autoload | 269 | ;;;###autoload |
| 270 | (defmacro detect-coding-with-priority (from to priority-list) | 270 | (defmacro detect-coding-with-priority (from to priority-list) |
| 271 | "Detect a coding system of the text between FROM and TO with PRIORITY-LIST. | 271 | "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 | 272 | PRIORITY-LIST is an alist of coding categories vs the corresponding |
| 273 | coding systems ordered by priority." | 273 | coding systems ordered by priority." |
| 274 | `(unwind-protect | 274 | `(with-coding-priority ,(mapcar #'cdr priority-list) |
| 275 | (let* ((prio-list ,priority-list) | 275 | (detect-coding-region ,from ,to))) |
| 276 | (coding-category-list coding-category-list) | 276 | (make-obsolete 'detect-coding-with-priority |
| 277 | ,@(mapcar (function (lambda (x) (list x x))) | 277 | "Use with-coding-priority and detect-coding-region" "22.1") |
| 278 | coding-category-list)) | ||
| 279 | (mapc (function (lambda (x) (set (car x) (cdr x)))) | ||
| 280 | prio-list) | ||
| 281 | (set-coding-priority (mapcar #'car prio-list)) | ||
| 282 | (detect-coding-region ,from ,to)) | ||
| 283 | ;; We must restore the internal database. | ||
| 284 | (set-coding-priority coding-category-list) | ||
| 285 | (update-coding-systems-internal))) | ||
| 286 | 278 | ||
| 287 | ;;;###autoload | 279 | ;;;###autoload |
| 288 | (defun detect-coding-with-language-environment (from to lang-env) | 280 | (defun detect-coding-with-language-environment (from to lang-env) |