+2001-03-17 ShengHuo ZHU <zsh@cs.rochester.edu>
+
+ * message.el (rmail-output): It is in rmailout.el not rmail.el.
+
+ * message.el (message-forward): local-variable-p takes an extra
+ argument in XEmacs.
+
+ * message.el (message-forward-decoded-p): New variable.
+ (message-forward-subject-author-subject): Use it.
+ (message-make-forward-subject): Use it.
+ (message-forward): Use it.
+
+ * gnus-uu.el (gnus-uu-digest-mail-forward): Use it.
+
2001-03-05 Dave Love <fx@gnu.org>
* mm-util.el (mm-mime-mule-charset-alist): Fix utf-8 case.
(autoload 'gnus-request-post "gnus-int")
(autoload 'gnus-alive-p "gnus-util")
(autoload 'gnus-group-name-charset "gnus-group")
- (autoload 'rmail-output "rmail"))
+ (autoload 'rmail-output "rmailout"))
\f
;;; Forwarding messages.
+(defvar message-forward-decoded-p nil
+ "Non-nil means the original message is decoded.")
+
(defun message-forward-subject-author-subject (subject)
"Generate a SUBJECT for a forwarded message.
The form is: [Source] Subject, where if the original message was mail,
Source is the sender, and if the original message was news, Source is
the list of newsgroups is was posted to."
(concat "["
- (or (message-fetch-field
- (if (message-news-p) "newsgroups" "from"))
- "(nowhere)")
+ (let ((prefix
+ (or (message-fetch-field
+ (if (message-news-p) "newsgroups" "from"))
+ "(nowhere)")))
+ (if message-forward-decoded-p
+ prefix
+ (mail-decode-encoded-word-string prefix)))
"] " subject))
(defun message-forward-subject-fwd (subject)
the message."
(concat "Fwd: " subject))
-(defun message-make-forward-subject (&optional decoded)
+(defun message-make-forward-subject ()
"Return a Subject header suitable for the message in the current buffer."
(save-excursion
(save-restriction
(subject (message-fetch-field "Subject")))
(setq subject
(if subject
- (if decoded
+ (if message-forward-decoded-p
subject
(mail-decode-encoded-word-string subject))
""))
(setq funcs (cdr funcs)))
subject))))
+(eval-when-compile
+ (defvar gnus-article-decoded-p))
+
;;;###autoload
(defun message-forward (&optional news digest)
"Forward the current message via mail.
Optional NEWS will use news to forward instead of mail.
Optional DIGEST will use digest to forward."
(interactive "P")
- (let ((cur (current-buffer))
- (subject (message-make-forward-subject digest))
- art-beg)
+ (let* ((cur (current-buffer))
+ (message-forward-decoded-p
+ (if (local-variable-p 'gnus-article-decoded-p (current-buffer))
+ gnus-article-decoded-p ;; In an article buffer.
+ message-forward-decoded-p))
+ (subject (message-make-forward-subject))
+ art-beg)
(if news
(message-news nil subject)
(message-mail nil subject))
(if message-forward-as-mime
(insert-buffer-substring cur)
(mml-insert-buffer cur))
- (if message-forward-show-mml
+ (if (and message-forward-show-mml
+ (not message-forward-decoded-p))
(insert
(with-temp-buffer
(mm-disable-multibyte-mule4) ;; Must copy buffer in unibyte mode