diff options
| author | Kenichi Handa | 2004-04-09 00:25:07 +0000 |
|---|---|---|
| committer | Kenichi Handa | 2004-04-09 00:25:07 +0000 |
| commit | 9d2cd7ef37e672d2232ed731eb44cce5121f6f87 (patch) | |
| tree | 4ac95913698a33da362927d72c11146ac8655c46 | |
| parent | 745465b07a9562ff8680b5cea626f8fa73e91f48 (diff) | |
| download | emacs-9d2cd7ef37e672d2232ed731eb44cce5121f6f87.tar.gz emacs-9d2cd7ef37e672d2232ed731eb44cce5121f6f87.zip | |
(rmail-decode-babyl-format): Use
with-coding-priority instead of detect-coding-with-priority.
| -rw-r--r-- | lisp/mail/rmail.el | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el index 4090749d83e..d84c7ebf026 100644 --- a/lisp/mail/rmail.el +++ b/lisp/mail/rmail.el | |||
| @@ -784,17 +784,17 @@ Note: it means the file has no messages in it.\n\^_"))) | |||
| 784 | (unless (and coding-system | 784 | (unless (and coding-system |
| 785 | (coding-system-p coding-system)) | 785 | (coding-system-p coding-system)) |
| 786 | (setq coding-system | 786 | (setq coding-system |
| 787 | ;; Emacs 21.1 and later writes RMAIL files in emacs-mule, but | 787 | ;; If rmail-file-coding-system is nil, Emacs 21 writes |
| 788 | ;; earlier versions did that with the current buffer's encoding. | 788 | ;; RMAIL files in emacs-mule, Emacs 22 in utf-8, but |
| 789 | ;; So we want to favor detection of emacs-mule (whose normal | 789 | ;; earlier versions did that with the current buffer's |
| 790 | ;; priority is quite low), but still allow detection of other | 790 | ;; encoding. So we want to favor detection of emacs-mule |
| 791 | ;; encodings if emacs-mule won't fit. The call to | 791 | ;; (whose normal priority is quite low) and utf-8, but |
| 792 | ;; detect-coding-with-priority below achieves that. | 792 | ;; still allow detection of other encodings if they won't |
| 793 | (car (detect-coding-with-priority | 793 | ;; fit. The call to with-coding-priority below achieves |
| 794 | from to | 794 | ;; that. |
| 795 | '((coding-category-emacs-mule . emacs-mule)))))) | 795 | (with-coding-priority '(emacs-mule utf-8) |
| 796 | (unless (memq coding-system | 796 | (detect-coding-region from to 'highest)))) |
| 797 | '(undecided undecided-unix)) | 797 | (unless (eq (coding-system-type coding-system) 'undecided) |
| 798 | (set-buffer-modified-p t) ; avoid locking when decoding | 798 | (set-buffer-modified-p t) ; avoid locking when decoding |
| 799 | (let ((buffer-undo-list t)) | 799 | (let ((buffer-undo-list t)) |
| 800 | (decode-coding-region from to coding-system)) | 800 | (decode-coding-region from to coding-system)) |