(rmail-revert): Modify to work in
authorGerd Moellmann <gerd@gnu.org>
Thu, 31 May 2001 08:09:47 +0000 (08:09 +0000)
committerGerd Moellmann <gerd@gnu.org>
Thu, 31 May 2001 08:09:47 +0000 (08:09 +0000)
rmail-view-buffer.

(rmail-insert-mime-resent-message-function): New
variable.
(rmail-resend): Modify to work in `rmail-view-buffer'; call
`rmail-insert-mime-resent-message-function' if `rmail-enable-mime'
is non-nil.

lisp/ChangeLog
lisp/mail/rmail.el

index 426eb6b..ee24a94 100644 (file)
@@ -3,6 +3,21 @@
        * international/mule-cmds.el (inactivate-input-method): Set
        input-method-function to nil.
 
+2001-05-31  MORIOKA Tomohiko  <tomo@kanji.zinbun.kyoto-u.ac.jp>
+
+       * mail/rmailsum.el (rmail-message-subject-p): Don't call
+       `rmail-summary-line-decoder' if the message does not have Subject:
+       field.
+
+       * mail/rmail.el (rmail-revert): Modify to work in
+       rmail-view-buffer.
+
+       * mail/rmail.el (rmail-insert-mime-resent-message-function): New
+       variable.
+       (rmail-resend): Modify to work in `rmail-view-buffer'; call
+       `rmail-insert-mime-resent-message-function' if `rmail-enable-mime'
+       is non-nil.
+
 2001-05-29  Sam Steingold  <sds@gnu.org>
 
        * faces.el (face-valid-attribute-values): Bind `valid' directly
index 35c7cbe..4a13031 100644 (file)
@@ -431,6 +431,14 @@ It is called with one argument FORWARD-BUFFER, which is a
 buffer containing the message to forward.  The current buffer
 is the outgoing mail buffer.")
 
+;;;###autoload
+(defvar rmail-insert-mime-resent-message-function nil
+  "Function to insert a message in MIME format so it can be resent.
+This function is called if `rmail-enable-mime' is non-nil.
+It is called with one argument FORWARD-BUFFER, which is a
+buffer containing the message to forward.  The current buffer
+is the outgoing mail buffer.")
+
 ;;;###autoload
 (defvar rmail-search-mime-message-function nil
   "Function to check if a regexp matches a MIME message.
@@ -1110,6 +1118,7 @@ Instead, these commands are available:
 
 ;; Handle M-x revert-buffer done in an rmail-mode buffer.
 (defun rmail-revert (arg noconfirm)
+  (set-buffer rmail-buffer)
   (let* ((revert-buffer-function (default-value 'revert-buffer-function))
         (rmail-enable-multibyte enable-multibyte-characters)
         ;; See similar code in `rmail'.
@@ -1119,7 +1128,8 @@ Instead, these commands are available:
        ;; If the user said "yes", and we changed something,
        ;; reparse the messages.
        (progn
-         (rmail-mode-2)
+         (set-buffer rmail-buffer)
+         (rmail-mode-2)
          ;; Convert all or part to Babyl file if possible.
          (rmail-convert-file)
          ;; We have read the file as raw-text, so the buffer is set to
@@ -3215,7 +3225,8 @@ typically for purposes of moderating a list."
   (interactive "sResend to: ")
   (require 'sendmail)
   (require 'mailalias)
-  (unless (eq rmail-buffer (current-buffer))
+  (unless (or (eq rmail-view-buffer (current-buffer))
+             (eq rmail-buffer (current-buffer)))
     (error "Not an Rmail buffer"))
   (if (not from) (setq from user-mail-address))
   (let ((tembuf (generate-new-buffer " sendmail temp"))
@@ -3224,7 +3235,9 @@ typically for purposes of moderating a list."
     (unwind-protect
        (with-current-buffer tembuf
          ;;>> Copy message into temp buffer
-         (insert-buffer-substring mailbuf)
+         (if rmail-enable-mime
+             (funcall rmail-insert-mime-resent-message-function mailbuf)
+           (insert-buffer-substring mailbuf))
          (goto-char (point-min))
          ;; Delete any Sender field, since that's not specifiable.
          ; Only delete Sender fields in the actual header.