From bf46b4d4282fd8411876052b759eab7891d0fba9 Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Wed, 17 Dec 2008 00:34:16 +0000 Subject: [PATCH] Merge from gnus--devo--0 Revision: emacs@sv.gnu.org/emacs--devo--0--patch-1500 --- lisp/gnus/ChangeLog | 13 +++++++++++++ lisp/gnus/gnus-start.el | 2 +- lisp/gnus/mm-util.el | 8 ++++++++ lisp/gnus/mml.el | 7 ++++++- 4 files changed, 28 insertions(+), 2 deletions(-) diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 788957acd20..14ac0aa89dc 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -2,6 +2,19 @@ * mm-util.el (mm-charset-override-alist): Declare for compiler. +2008-12-15 Katsumi Yamaoka + + * mml.el (mml-generate-mime-1): Prefer the MIME charset that Emacs + knows since the charset specified might be a bogus alias that + mm-charset-synonym-alist provides. + +2008-12-15 Reiner Steib + + * mm-util.el (mm-charset-synonym-alist): Add bogus names "UTF8" and + "ISO_8859-1". + + * gnus-start.el (gnus-backup-startup-file): Improve doc string. + 2008-12-15 Katsumi Yamaoka * mm-util.el (mm-charset-eval-alist): diff --git a/lisp/gnus/gnus-start.el b/lisp/gnus/gnus-start.el index f28bc17eccc..773f8203e4b 100644 --- a/lisp/gnus/gnus-start.el +++ b/lisp/gnus/gnus-start.el @@ -50,7 +50,7 @@ :type 'file) (defcustom gnus-backup-startup-file 'never - "Whether to create backup files. + "Control use of version numbers for backups of `gnus-startup-file'. This variable takes the same values as the `version-control' variable." :version "22.1" diff --git a/lisp/gnus/mm-util.el b/lisp/gnus/mm-util.el index 1d23050b364..1c28f375db0 100644 --- a/lisp/gnus/mm-util.el +++ b/lisp/gnus/mm-util.el @@ -269,10 +269,18 @@ the alias. Else windows-NUMBER is used." ,@(when (and (not (mm-coding-system-p 'gbk)) (mm-coding-system-p 'cp936)) '((gbk . cp936))) + ;; UTF8 is a bogus name for UTF-8 + ,@(when (and (not (mm-coding-system-p 'utf8)) + (mm-coding-system-p 'utf-8)) + '((utf8 . utf-8))) ;; ISO8859-1 is a bogus name for ISO-8859-1 ,@(when (and (not (mm-coding-system-p 'iso8859-1)) (mm-coding-system-p 'iso-8859-1)) '((iso8859-1 . iso-8859-1))) + ;; ISO_8859-1 is a bogus name for ISO-8859-1 + ,@(when (and (not (mm-coding-system-p 'iso_8859-1)) + (mm-coding-system-p 'iso-8859-1)) + '((iso_8859-1 . iso-8859-1))) ) "A mapping from unknown or invalid charset names to the real charset names. diff --git a/lisp/gnus/mml.el b/lisp/gnus/mml.el index f8968fbcb7c..3e3cb2ccda4 100644 --- a/lisp/gnus/mml.el +++ b/lisp/gnus/mml.el @@ -482,7 +482,12 @@ If MML is non-nil, return the buffer up till the correspondent mml tag." (setq charset nil coding nil)) (charset - (setq charset (intern (downcase charset))))) + ;; The value of `charset' might be a bogus alias that + ;; `mm-charset-synonym-alist' provides, like `utf8', + ;; so we prefer the MIME charset that Emacs knows for + ;; the coding system `coding'. + (setq charset (or (mm-coding-system-to-mime-charset coding) + (intern (downcase charset)))))) (if (and (not raw) (member (car (split-string type "/")) '("text" "message"))) (progn -- 2.39.2