- (gnus-setup-message 'forward
- (gnus-summary-select-article)
- (let (text)
- (save-excursion
- (set-buffer gnus-original-article-buffer)
- (setq text (buffer-string)))
- (set-buffer (gnus-get-buffer-create
- (generate-new-buffer-name " *Gnus forward*")))
- (erase-buffer)
- (insert text)
- (goto-char (point-min))
- (when (looking-at "From ")
- (replace-match "X-From-Line: ") )
- (run-hooks 'gnus-article-decode-hook)
- (message-forward post))))
+ (let ((message-forward-as-mime message-forward-as-mime)
+ (message-forward-show-mml message-forward-show-mml))
+ (cond
+ ((null arg))
+ ((eq arg 1) (setq message-forward-as-mime nil
+ message-forward-show-mml t))
+ ((eq arg 2) (setq message-forward-as-mime t
+ message-forward-show-mml nil))
+ ((eq arg 3) (setq message-forward-as-mime t
+ message-forward-show-mml t))
+ ((eq arg 4) (setq message-forward-as-mime nil
+ message-forward-show-mml nil))
+ (t (setq message-forward-as-mime (not message-forward-as-mime))))
+ (gnus-setup-message 'forward
+ (gnus-summary-select-article)
+ (let ((mail-parse-charset gnus-newsgroup-charset)
+ (mail-parse-ignored-charsets gnus-newsgroup-ignored-charsets)
+ text)
+ (save-excursion
+ (set-buffer gnus-original-article-buffer)
+ (setq text (buffer-string)))
+ (set-buffer
+ (gnus-get-buffer-create
+ (generate-new-buffer-name " *Gnus forward*")))
+ (erase-buffer)
+ (unless message-forward-show-mml
+ (mm-disable-multibyte))
+ (insert text)
+ (goto-char (point-min))
+ (when (looking-at "From ")
+ (replace-match "X-From-Line: ") )
+ (when message-forward-show-mml
+ (mime-to-mml))
+ (message-forward post)))))