+1999-12-01 13:04:09 Shenghuo ZHU <zsh@cs.rochester.edu>
+
+ * gnus-sum.el (gnus-summary-show-article): Support numbered ARG
+ for charset.
+ (gnus-summary-show-article-charset-alist): New variable.
+
+ * mm-bodies.el (mm-decode-string): Support gnus-all and
+ gnus-unknown.
+ (mm-decode-body): Ditto.
+ * rfc2047.el (rfc2047-decode): Ditto.
+
1999-12-01 17:37:18 Lars Magne Ingebrigtsen <larsi@gnus.org>
* mail-source.el (mail-source-delete-incoming): Change default to
* gnus-art.el (gnus-treat-predicate): Work for (not 5).
-1999-08-27 Peter von der Ah\e-A\ ei\ f <pahe@daimi.au.dk>
+1999-08-27 Peter von der Ah\ ei\ f <pahe@daimi.au.dk>
* message.el (message-send): More helpful error message if sending
fails
* gnus-agent.el (gnus-agent-get-undownloaded-list): Don't
mark cached articles as `undownloaded'.
-Tue Jul 20 02:39:56 1999 Peter von der Ah\e-A\ ei\ f <peter@ahe.dk>
+Tue Jul 20 02:39:56 1999 Peter von der Ah\ ei\ f <peter@ahe.dk>
* gnus-sum.el (gnus-summary-exit): Allow gnus-use-adaptive-scoring
to have buffer local values.
* mm-uu.el (mm-uu-dissect): Use mm-make-handle.
-1998-12-01 01:53:49 Fran\e-A\ eg\ fois Pinard <pinard@iro.umontreal.ca>
+1998-12-01 01:53:49 Fran\ eg\ fois Pinard <pinard@iro.umontreal.ca>
* nndoc.el (nndoc-mime-parts-type-p): Do related.
* rfc2047.el (rfc2047-q-encode-region): Would bug out.
-1998-09-13 Fran\e-A\ eg\ fois Pinard <pinard@iro.umontreal.ca>
+1998-09-13 Fran\ eg\ fois Pinard <pinard@iro.umontreal.ca>
* nndoc.el: Make nndoc-dissection-alist simpler for MIME, adjust all
related functions. Handle message/rfc822 parts. Display subject on
gnus-emphasis-highlight-words)))))
:group 'gnus-summary-visual)
+(defcustom gnus-summary-show-article-charset-alist
+ nil
+ "Alist of number and charset.
+The article will be shown with the charset corresponding to the
+numbered argument.
+For example: ((1 . cn-gb-2312) (2 . big5))."
+ :type '(repeat (cons (number :tag "Argument" 1)
+ (symbol :tag "Charset")))
+ :group 'gnus-charset)
+
+
;;; Internal variables
(defvar gnus-article-mime-handles nil)
(defun gnus-summary-show-article (&optional arg)
"Force re-fetching of the current article.
-If ARG (the prefix) is non-nil, show the raw article without any
-article massaging functions being run."
+If ARG (the prefix) is a number, show the article with the charset
+defined in `gnus-summary-show-article-charset-alist', or the charset
+inputed.
+If ARG (the prefix) is non-nil and not a number, show the raw article
+without any article massaging functions being run."
(interactive "P")
- (if (not arg)
- ;; Select the article the normal way.
- (gnus-summary-select-article nil 'force)
+ (cond
+ ((numberp arg)
+ (let ((gnus-newsgroup-charset
+ (or (cdr (assq arg gnus-summary-show-article-charset-alist))
+ (read-coding-system "Charset: ")))
+ (gnus-newsgroup-ignored-charsets 'gnus-all))
+ (gnus-summary-select-article nil 'force)))
+ ((not arg)
+ ;; Select the article the normal way.
+ (gnus-summary-select-article nil 'force))
+ (t
;; We have to require this here to make sure that the following
;; dynamic binding isn't shadowed by autoloading.
(require 'gnus-async)
(save-excursion
(set-buffer gnus-article-buffer)
(mm-destroy-parts gnus-article-mime-handles)))
- (gnus-summary-select-article nil 'force)))
+ (gnus-summary-select-article nil 'force))))
(gnus-summary-goto-subject gnus-current-article)
(gnus-summary-position-point))
The characters in CHARSET should then be decoded."
(if (stringp charset)
(setq charset (intern (downcase charset))))
- (if (or (not charset) (memq charset mail-parse-ignored-charsets))
+ (if (or (not charset)
+ (eq 'gnus-all mail-parse-ignored-charsets)
+ (memq 'gnus-all mail-parse-ignored-charsets)
+ (memq charset mail-parse-ignored-charsets))
(setq charset mail-parse-charset))
(save-excursion
(when encoding
(mm-decode-content-transfer-encoding encoding type))
(when (featurep 'mule)
- (let (mule-charset)
- (when (and charset
- (setq mule-charset (mm-charset-to-coding-system charset))
+ (let ((mule-charset (mm-charset-to-coding-system charset)))
+ (if (and (not mule-charset)
+ (listp mail-parse-ignored-charsets)
+ (memq 'gnus-unknown mail-parse-ignored-charsets))
+ (setq mule-charset
+ (mm-charset-to-coding-system mail-parse-charset)))
+ (when (and charset mule-charset
;; buffer-file-coding-system
;;Article buffer is nil coding system
;;in XEmacs
"Decode STRING with CHARSET."
(if (stringp charset)
(setq charset (intern (downcase charset))))
- (if (or (not charset) (memq charset mail-parse-ignored-charsets))
+ (if (or (not charset)
+ (eq 'gnus-all mail-parse-ignored-charsets)
+ (memq 'gnus-all mail-parse-ignored-charsets)
+ (memq charset mail-parse-ignored-charsets))
(setq charset mail-parse-charset))
(or
(when (featurep 'mule)
- (let (mule-charset)
- (when (and charset
- (setq mule-charset (mm-charset-to-coding-system charset))
+ (let ((mule-charset (mm-charset-to-coding-system charset)))
+ (if (and (not mule-charset)
+ (listp mail-parse-ignored-charsets)
+ (memq 'gnus-unknown mail-parse-ignored-charsets))
+ (setq mule-charset
+ (mm-charset-to-coding-system mail-parse-charset)))
+ (when (and charset mule-charset
(mm-multibyte-p)
(or (not (eq mule-charset 'ascii))
(setq mule-charset mail-parse-charset)))
If your Emacs implementation can't decode CHARSET, it returns nil."
(if (stringp charset)
(setq charset (intern (downcase charset))))
- (if (or (not charset) (memq charset mail-parse-ignored-charsets))
+ (if (or (not charset)
+ (eq 'gnus-all mail-parse-ignored-charsets)
+ (memq 'gnus-all mail-parse-ignored-charsets)
+ (memq charset mail-parse-ignored-charsets))
(setq charset mail-parse-charset))
(let ((cs (mm-charset-to-coding-system charset)))
+ (if (and (not cs) charset
+ (listp mail-parse-ignored-charsets)
+ (memq 'gnus-unknown mail-parse-ignored-charsets))
+ (setq cs (mm-charset-to-coding-system mail-parse-charset)))
(when cs
(when (and (eq cs 'ascii)
mail-parse-charset)