From 69a02a2faa8a72ef2f86fdab1c66a67c4c3ad0d6 Mon Sep 17 00:00:00 2001 From: ueno Date: Tue, 25 Sep 2001 03:07:43 +0000 Subject: [PATCH] * mime-view.el (mime-view-default-charset): Use `mime-entity-parameters'. --- mime-view.el | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/mime-view.el b/mime-view.el index 8fd6bea..36287f4 100644 --- a/mime-view.el +++ b/mime-view.el @@ -1734,18 +1734,15 @@ If LINES is negative, scroll up LINES lines." encoding))) (defun mime-view-default-charset (entity situation) - (or (cdr (assq '*charset situation)) - (cdr (assq 'charset situation)) - (static-if (fboundp 'coding-system-to-mime-charset) - ;; might be specified by `universal-coding-system-argument'. + (or (static-if (fboundp 'coding-system-to-mime-charset) + ;; might be overridden by `universal-coding-system-argument'. (and coding-system-for-read (coding-system-to-mime-charset coding-system-for-read))) - (let ((charset-param - (mime-content-type-parameter - (mime-entity-content-type entity) - "charset"))) - (if charset-param - (intern (downcase charset-param)))) + (cdr (assq '*charset situation)) + (cdr (assq 'charset situation)) + (let ((charset (cdr (assoc "charset" (mime-entity-parameters entity))))) + (if charset + (intern (downcase charset)))) default-mime-charset)) (defun mime-view-read-charset (entity situation) @@ -1758,7 +1755,7 @@ If LINES is negative, scroll up LINES lines." (lambda (sym) (list (symbol-name sym))) (mime-charset-list)) - nil t + #'mime-charset-p t (symbol-name default-charset))))) (unless (eq charset default-charset) charset)) -- 1.7.10.4