aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/mail
diff options
context:
space:
mode:
authorRichard M. Stallman <[email protected]>1993-12-23 03:24:31 +0000
committerRichard M. Stallman <[email protected]>1993-12-23 03:24:31 +0000
commitd2fc297c3286c2eed26a3141417762f720b4e2e1 (patch)
treef73a88f7a85d0ddaf304469b571f9d3e43c9da92 /lisp/mail
parente3683fc7671f2ef3a6e910467f6e0ebae7674e51 (diff)
(rmail-quit): Expunge without updating summary.
(rmail-resend): Delete more than one Sender, but only in the headers, not in the body. (rmail-resend): Doc fix. (rmail): Doc fix.
Diffstat (limited to 'lisp/mail')
-rw-r--r--lisp/mail/rmail.el32
1 files changed, 20 insertions, 12 deletions
diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el
index e6fc530369..bbbe818ca7 100644
--- a/lisp/mail/rmail.el
+++ b/lisp/mail/rmail.el
@@ -198,8 +198,10 @@ Moves messages into file named by `rmail-file-name' (a babyl format file)
and edits that file in RMAIL Mode.
Type \\[describe-mode] once editing that file, for a list of RMAIL commands.
-May be called with filename as argument; then performs rmail editing on
-that file, but does not copy any new mail into the file."
+May be called with file name as argument; then performs rmail editing on
+that file, but does not copy any new mail into the file.
+Interactively, if you supply a prefix argument, then you
+have a chance to specify a file name with the minibuffer."
(interactive (if current-prefix-arg
(list (read-file-name "Run rmail on RMAIL file: "
nil nil t))))
@@ -1856,7 +1858,7 @@ see the documentation of `rmail-resend'."
(defun rmail-resend (address &optional from comment mail-alias-file)
"Resend current message to ADDRESSES.
-ADDRESSES should be a single address, a a string consisting of several
+ADDRESSES should be a single address, a string consisting of several
addresses separated by commas, or a list of addresses.
Optional FROM is the address to resend the message from, and
@@ -1880,14 +1882,20 @@ typically for purposes of moderating a list."
(insert-buffer-substring mailbuf)
(goto-char (point-min))
;; Delete any Sender field, since that's not specifyable.
- (if (re-search-forward "^Sender:" nil t)
- (let (beg)
- (beginning-of-line)
- (setq beg (point))
- (forward-line 1)
- (while (looking-at "[ \t]")
- (forward-line 1))
- (delete-region beg (point))))
+ ; Only delete Sender fields in the actual header.
+ (re-search-forward "^$" nil 'move)
+ ; Using "while" here rather than "if" because some buggy mail
+ ; software may have inserted multiple Sender fields.
+ (while (re-search-backward "^Sender:" nil t)
+ (let (beg)
+ (setq beg (point))
+ (forward-line 1)
+ (while (looking-at "[ \t]")
+ (forward-line 1))
+ (delete-region beg (point))))
+ ; Go back to the beginning of the buffer so the Resent- fields
+ ; are inserted there.
+ (goto-char (point-min))
;;>> Insert resent-from:
(insert "Resent-From: " from "\n")
(insert "Resent-Date: " (mail-rfc822-date) "\n")
@@ -1929,7 +1937,7 @@ typically for purposes of moderating a list."
(defun rmail-retry-failure ()
"Edit a mail message which is based on the contents of the current message.
For a message rejected by the mail system, extract the interesting headers and
-the body of the original message; otherwise copy the current message."
+the body of the original message."
(interactive)
(require 'mail-utils)
(let (to subj irp2 cc orig-message)