From: Reiner Steib Date: Tue, 11 Oct 2005 20:20:46 +0000 (+0000) Subject: (mm-charset-synonym-alist): Improve doc string. X-Git-Url: http://cgit.sxemacs.org/?a=commitdiff_plain;h=c95d3fca146d00c5bb936b88ec740ddd95c7583b;p=gnus (mm-charset-synonym-alist): Improve doc string. (mm-charset-override-alist): New variable. (mm-charset-to-coding-system): Use it. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 58da8a83e..629ca969b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,9 @@ 2005-10-11 Reiner Steib + * mm-util.el (mm-charset-synonym-alist): Improve doc string. + (mm-charset-override-alist): New variable. + (mm-charset-to-coding-system): Use it. + * dgnushack.el (with-syntax-table): Add some URLs WRT the XEmacs bug. 2005-10-04 David Hansen diff --git a/lisp/mm-util.el b/lisp/mm-util.el index fc1edc7e8..f94e40341 100644 --- a/lisp/mm-util.el +++ b/lisp/mm-util.el @@ -195,7 +195,24 @@ system object in XEmacs." '((ks_c_5601-1987 . cp949)) '((ks_c_5601-1987 . euc-kr)))) ) - "A mapping from invalid charset names to the real charset names.") + "A mapping from unknown or invalid charset names to the real charset names.") + +(defcustom mm-charset-override-alist + `((iso-8859-1 . windows-1252)) + "A mapping from undesired charset names to their replacement. + +You may add pair like (iso-8859-1 . windows-1252) here, +i.e. treat iso-8859-1 as windows-1252. windows-1252 is a +superset of iso-8859-1." + :type '(list (set :inline t + (const (iso-8859-1 . windows-1252)) + (const (undecided . windows-1252))) + (repeat :inline t + :tag "Other options" + (cons (symbol :tag "From charset") + (symbol :tag "To charset")))) + :version "23.0" ;; No Gnus + :group 'mime) (defvar mm-binary-coding-system (cond @@ -436,6 +453,9 @@ used as the line break code type of the coding system." ((or (null (mm-get-coding-system-list)) (not (fboundp 'coding-system-get))) charset) + ;; Check override list quite early: + ((let ((cs (cdr (assq charset mm-charset-override-alist)))) + (and cs (mm-coding-system-p cs) cs))) ;; ascii ((eq charset 'us-ascii) 'ascii)