# HG changeset patch # User Kenichi Handa # Date 1233031689 0 # Node ID 28b036b7fc1cabb954d196480ae7b29234204129 # Parent 52265841dbb28c6364786bc1585e7dfb09107d1c (rmail-get-coding-system): Re-search rmail-mime-charset-pattern directly instead of using mail-fetch-field. Use coding-system-from-name. diff -r 52265841dbb2 -r 28b036b7fc1c lisp/mail/rmail.el --- a/lisp/mail/rmail.el Tue Jan 27 04:39:53 2009 +0000 +++ b/lisp/mail/rmail.el Tue Jan 27 04:48:09 2009 +0000 @@ -940,13 +940,10 @@ (defun rmail-get-coding-system () "Return a suitable coding system to use for the current mail message. The buffer is expected to be narrowed to just the header of the message." - (let ((content-type-header (mail-fetch-field "content-type")) - separator) - (save-excursion - (setq separator (search-forward "\n\n"))) - (if (and content-type-header - (string-match rmail-mime-charset-pattern content-type-header)) - (substring content-type-header (match-beginning 1) (match-end 1)) + (save-excursion + (goto-char (point-min)) + (if (re-search-forward rmail-mime-charset-pattern) + (coding-system-from-name (match-string 1)) 'undecided))) ;;; Set up Rmail mode keymaps