aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1993-07-07 17:55:28 +0000
committerRichard M. Stallman1993-07-07 17:55:28 +0000
commitf3098917470a2d15e9c243bf58ea2b22666e45b4 (patch)
treefec0fd993ce827dc6de5340a105a8a1ef9faa86c
parentbcf120251a54088b06fa2e61c4f400ddb0b89dde (diff)
downloademacs-f3098917470a2d15e9c243bf58ea2b22666e45b4.tar.gz
emacs-f3098917470a2d15e9c243bf58ea2b22666e45b4.zip
(mail-do-fcc): Use RFC 822 style date in Resent-Date: line.
Use new `mail-rfc822-time-zone' function to simplify pinhead generation.
-rw-r--r--lisp/mail/sendmail.el13
1 files changed, 3 insertions, 10 deletions
diff --git a/lisp/mail/sendmail.el b/lisp/mail/sendmail.el
index fbe5064ee41..daf3d329135 100644
--- a/lisp/mail/sendmail.el
+++ b/lisp/mail/sendmail.el
@@ -422,7 +422,6 @@ the user from the mailer."
422 (let (fcc-list 422 (let (fcc-list
423 (rmailbuf (current-buffer)) 423 (rmailbuf (current-buffer))
424 (time (current-time)) 424 (time (current-time))
425 timezone
426 (tembuf (generate-new-buffer " rmail output")) 425 (tembuf (generate-new-buffer " rmail output"))
427 (case-fold-search t)) 426 (case-fold-search t))
428 (save-excursion 427 (save-excursion
@@ -436,13 +435,6 @@ the user from the mailer."
436 fcc-list)) 435 fcc-list))
437 (delete-region (match-beginning 0) 436 (delete-region (match-beginning 0)
438 (progn (forward-line 1) (point)))) 437 (progn (forward-line 1) (point))))
439 (let* ((foo (current-time-zone time))
440 (offset (if (car foo) (/ (car foo) 60) 0))
441 (abs (abs offset)))
442 (setq timezone (format "%s%02d%02d"
443 (if (< offset 0) "-" "+")
444 (/ abs 60)
445 (% abs 60))))
446 (set-buffer tembuf) 438 (set-buffer tembuf)
447 (erase-buffer) 439 (erase-buffer)
448 ;; This initial newline is written out if the fcc file already exists. 440 ;; This initial newline is written out if the fcc file already exists.
@@ -451,7 +443,8 @@ the user from the mailer."
451 ;; Insert the time zone before the year. 443 ;; Insert the time zone before the year.
452 (forward-char -1) 444 (forward-char -1)
453 (forward-word -1) 445 (forward-word -1)
454 (insert timezone " ") 446 (require 'mail-utils)
447 (insert (mail-rfc822-time-zone time) " ")
455 (goto-char (point-max)) 448 (goto-char (point-max))
456 (insert-buffer-substring rmailbuf) 449 (insert-buffer-substring rmailbuf)
457 ;; Make sure messages are separated. 450 ;; Make sure messages are separated.
@@ -493,7 +486,7 @@ the user from the mailer."
493 (narrow-to-region (point-max) (point-max)) 486 (narrow-to-region (point-max) (point-max))
494 (insert "\C-l\n0, unseen,,\n*** EOOH ***\n" 487 (insert "\C-l\n0, unseen,,\n*** EOOH ***\n"
495 "From: " (user-login-name) "\n" 488 "From: " (user-login-name) "\n"
496 "Date: " (current-time-string) "\n") 489 "Date: " (mail-rfc822-date) "\n")
497 (insert-buffer-substring curbuf beg2 end) 490 (insert-buffer-substring curbuf beg2 end)
498 (insert "\n\C-_") 491 (insert "\n\C-_")
499 (goto-char (point-min)) 492 (goto-char (point-min))