diff options
author | Katsumi Yamaoka <yamaoka@jpl.org> | 2008-12-10 10:02:50 +0000 |
---|---|---|
committer | Katsumi Yamaoka <yamaoka@jpl.org> | 2008-12-10 10:02:50 +0000 |
commit | b6b8f5fda993e752657e4a09bfa6022e42df673c (patch) | |
tree | b6be40c38ba5efcdf286c1862bbef8c6a26a26b8 /lisp/gnus/mm-util.el | |
parent | c3f995a2cbc9715b56d732b28b078c102dccccd3 (diff) | |
download | emacs-b6b8f5fda993e752657e4a09bfa6022e42df673c.tar.gz |
* rfc2047.el (rfc2047-charset-to-coding-system): Add new argument
`allow-override' which says whether to use `mm-charset-override-alist'.
(rfc2047-decode-encoded-words): Use it.
* mm-util.el (mm-charset-override-alist): Fix custom type;
add `(gb2312 . gbk)' to choices.
Diffstat (limited to 'lisp/gnus/mm-util.el')
-rw-r--r-- | lisp/gnus/mm-util.el | 45 |
1 files changed, 36 insertions, 9 deletions
diff --git a/lisp/gnus/mm-util.el b/lisp/gnus/mm-util.el index 383b1b87916..4630cefc25e 100644 --- a/lisp/gnus/mm-util.el +++ b/lisp/gnus/mm-util.el @@ -397,15 +397,42 @@ Unless LIST is given, `mm-codepage-ibm-list' is used." You may add pairs 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 (iso-8859-8 . windows-1255)) - (const (iso-8859-9 . windows-1254)) - (const (undecided . windows-1252))) - (repeat :inline t - :tag "Other options" - (cons (symbol :tag "From charset") - (symbol :tag "To charset")))) + :type + '(list + :convert-widget + (lambda (widget) + (let ((defaults + (delq nil + (mapcar (lambda (pair) + (if (mm-charset-to-coding-system (cdr pair)) + pair)) + '((gb2312 . gbk) + (iso-8859-1 . windows-1252) + (iso-8859-8 . windows-1255) + (iso-8859-9 . windows-1254) + (undecided . windows-1252))))) + (val (copy-sequence (default-value 'mm-charset-override-alist))) + pair rest) + (while val + (push (if (and (prog1 + (setq pair (assq (caar val) defaults)) + (setq defaults (delq pair defaults))) + (equal (car val) pair)) + `(const ,pair) + `(cons :format "%v" + (const :format "(%v" ,(caar val)) + (symbol :size 3 :format " . %v)\n" ,(cdar val)))) + rest) + (setq val (cdr val))) + (while defaults + (push `(const ,(pop defaults)) rest)) + (widget-convert + 'list + `(set :inline t :format "%v" ,@(nreverse rest)) + `(repeat :inline t :tag "Other options" + (cons :format "%v" + (symbol :size 3 :format "(%v") + (symbol :size 3 :format " . %v)\n"))))))) :version "22.1" ;; Gnus 5.10.9 :group 'mime) |