emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/mail/sendmail.el


From: Chong Yidong
Subject: [Emacs-diffs] Changes to emacs/lisp/mail/sendmail.el
Date: Tue, 29 Nov 2005 18:54:48 -0500

Index: emacs/lisp/mail/sendmail.el
diff -c emacs/lisp/mail/sendmail.el:1.295 emacs/lisp/mail/sendmail.el:1.296
*** emacs/lisp/mail/sendmail.el:1.295   Thu Nov 17 16:30:52 2005
--- emacs/lisp/mail/sendmail.el Tue Nov 29 23:54:47 2005
***************
*** 446,452 ****
        ;; has been called and has done so.
        (let ((fill-prefix "\t")
              (address-start (point)))
!         (insert to hard-newline)
          (fill-region-as-paragraph address-start (point-max))
          (goto-char (point-max))
          (unless (bolp)
--- 446,452 ----
        ;; has been called and has done so.
        (let ((fill-prefix "\t")
              (address-start (point)))
!         (insert to "\n")
          (fill-region-as-paragraph address-start (point-max))
          (goto-char (point-max))
          (unless (bolp)
***************
*** 455,461 ****
      (if cc
        (let ((fill-prefix "\t")
              (address-start (progn (insert "CC: ") (point))))
!         (insert cc hard-newline)
          (fill-region-as-paragraph address-start (point-max))
          (goto-char (point-max))
          (unless (bolp)
--- 455,461 ----
      (if cc
        (let ((fill-prefix "\t")
              (address-start (progn (insert "CC: ") (point))))
!         (insert cc "\n")
          (fill-region-as-paragraph address-start (point-max))
          (goto-char (point-max))
          (unless (bolp)
***************
*** 464,486 ****
        (let ((fill-prefix "\t")
              (fill-column 78)
              (address-start (point)))
!         (insert "In-reply-to: " in-reply-to hard-newline)
          (fill-region-as-paragraph address-start (point-max))
          (goto-char (point-max))
          (unless (bolp)
            (newline))))
!     (insert "Subject: " (or subject "") hard-newline)
      (if mail-default-headers
        (insert mail-default-headers))
      (if mail-default-reply-to
!       (insert "Reply-to: " mail-default-reply-to hard-newline))
      (if mail-self-blind
!       (insert "BCC: " user-mail-address hard-newline))
      (if mail-archive-file-name
!       (insert "FCC: " mail-archive-file-name hard-newline))
      (put-text-property (point)
                       (progn
!                        (insert mail-header-separator hard-newline)
                         (1- (point)))
                       'category 'mail-header-separator)
      ;; Insert the signature.  But remember the beginning of the message.
--- 464,486 ----
        (let ((fill-prefix "\t")
              (fill-column 78)
              (address-start (point)))
!         (insert "In-reply-to: " in-reply-to "\n")
          (fill-region-as-paragraph address-start (point-max))
          (goto-char (point-max))
          (unless (bolp)
            (newline))))
!     (insert "Subject: " (or subject "") "\n")
      (if mail-default-headers
        (insert mail-default-headers))
      (if mail-default-reply-to
!       (insert "Reply-to: " mail-default-reply-to "\n"))
      (if mail-self-blind
!       (insert "BCC: " user-mail-address "\n"))
      (if mail-archive-file-name
!       (insert "FCC: " mail-archive-file-name "\n"))
      (put-text-property (point)
                       (progn
!                        (insert mail-header-separator "\n")
                         (1- (point)))
                       'category 'mail-header-separator)
      ;; Insert the signature.  But remember the beginning of the message.
***************
*** 488,494 ****
      (cond ((eq mail-signature t)
           (if (file-exists-p mail-signature-file)
               (progn
!                (insert hard-newline hard-newline "-- " hard-newline)
                 (insert-file-contents mail-signature-file))))
          ((stringp mail-signature)
           (insert mail-signature))
--- 488,494 ----
      (cond ((eq mail-signature t)
           (if (file-exists-p mail-signature-file)
               (progn
!                (insert "\n\n-- \n")
                 (insert-file-contents mail-signature-file))))
          ((stringp mail-signature)
           (insert mail-signature))
***************
*** 835,848 ****
                             (split-string new-header-values
                                           ",[[:space:]]+" t))
                            (mapconcat 'identity l ", "))
!                         hard-newline))
                ;; Add Mail-Reply-To if none yet
                (unless (mail-fetch-field "mail-reply-to")
                  (goto-char (mail-header-end))
                  (insert "Mail-Reply-To: "
                          (or (mail-fetch-field "reply-to")
                              user-mail-address)
!                         hard-newline))))))
        (unless (memq mail-send-nonascii '(t mime))
          (goto-char (point-min))
          (skip-chars-forward "\0-\177")
--- 835,848 ----
                             (split-string new-header-values
                                           ",[[:space:]]+" t))
                            (mapconcat 'identity l ", "))
!                         "\n"))
                ;; Add Mail-Reply-To if none yet
                (unless (mail-fetch-field "mail-reply-to")
                  (goto-char (mail-header-end))
                  (insert "Mail-Reply-To: "
                          (or (mail-fetch-field "reply-to")
                              user-mail-address)
!                         "\n"))))))
        (unless (memq mail-send-nonascii '(t mime))
          (goto-char (point-min))
          (skip-chars-forward "\0-\177")
***************
*** 931,937 ****
                                             fullname-end 1)
                     (replace-match "\\\\\\&" t))
                   (insert "\""))))
!          (insert " <" login ">" hard-newline))
          ((eq mail-from-style 'parens)
           (insert "From: " login " (")
           (let ((fullname-start (point)))
--- 931,937 ----
                                             fullname-end 1)
                     (replace-match "\\\\\\&" t))
                   (insert "\""))))
!          (insert " <" login ">\n"))
          ((eq mail-from-style 'parens)
           (insert "From: " login " (")
           (let ((fullname-start (point)))
***************
*** 955,963 ****
                       fullname-end 1)
                 (replace-match "\\1(\\3)" t)
                 (goto-char fullname-start))))
!          (insert ")" hard-newline))
          ((null mail-from-style)
!          (insert "From: " login hard-newline))
          ((eq mail-from-style 'system-default)
           nil)
          (t (error "Invalid value for `mail-from-style'")))))
--- 955,963 ----
                       fullname-end 1)
                 (replace-match "\\1(\\3)" t)
                 (goto-char fullname-start))))
!          (insert ")\n"))
          ((null mail-from-style)
!          (insert "From: " login "\n"))
          ((eq mail-from-style 'system-default)
           nil)
          (t (error "Invalid value for `mail-from-style'")))))
***************
*** 996,1002 ****
          (goto-char (point-max))
          ;; require one newline at the end.
          (or (= (preceding-char) ?\n)
!             (insert hard-newline))
          ;; Change header-delimiter to be what sendmail expects.
          (goto-char (mail-header-end))
          (delete-region (point) (progn (end-of-line) (point)))
--- 996,1002 ----
          (goto-char (point-max))
          ;; require one newline at the end.
          (or (= (preceding-char) ?\n)
!             (insert ?\n))
          ;; Change header-delimiter to be what sendmail expects.
          (goto-char (mail-header-end))
          (delete-region (point) (progn (end-of-line) (point)))
***************
*** 1008,1014 ****
          ;; Ignore any blank lines in the header
          (while (and (re-search-forward "\n\n\n*" delimline t)
                      (< (point) delimline))
!           (replace-match hard-newline))
          (goto-char (point-min))
          ;; Look for Resent- headers.  They require sending
          ;; the message specially.
--- 1008,1014 ----
          ;; Ignore any blank lines in the header
          (while (and (re-search-forward "\n\n\n*" delimline t)
                      (< (point) delimline))
!           (replace-match "\n"))
          (goto-char (point-min))
          ;; Look for Resent- headers.  They require sending
          ;; the message specially.
***************
*** 1070,1079 ****
                   (setq charset
                         (coding-system-get selected-coding 'mime-charset))
                   (goto-char delimline)
!                  (insert "MIME-version: 1.0" hard-newline
                           "Content-type: text/plain; charset="
!                          (symbol-name charset) hard-newline
!                          "Content-Transfer-Encoding: 8bit" hard-newline)))
            ;; Insert an extra newline if we need it to work around
            ;; Sun's bug that swallows newlines.
            (goto-char (1+ delimline))
--- 1070,1079 ----
                   (setq charset
                         (coding-system-get selected-coding 'mime-charset))
                   (goto-char delimline)
!                  (insert "MIME-version: 1.0\n"
                           "Content-type: text/plain; charset="
!                          (symbol-name charset)
!                          "\nContent-Transfer-Encoding: 8bit\n")))
            ;; Insert an extra newline if we need it to work around
            ;; Sun's bug that swallows newlines.
            (goto-char (1+ delimline))
***************
*** 1167,1174 ****
        (set-buffer tembuf)
        (erase-buffer)
        ;; This initial newline is written out if the fcc file already exists.
!       (insert hard-newline "From " (user-login-name) " "
!             (current-time-string time) hard-newline)
        ;; Insert the time zone before the year.
        (forward-char -1)
        (forward-word -1)
--- 1167,1174 ----
        (set-buffer tembuf)
        (erase-buffer)
        ;; This initial newline is written out if the fcc file already exists.
!       (insert "\nFrom " (user-login-name) " "
!             (current-time-string time) "\n")
        ;; Insert the time zone before the year.
        (forward-char -1)
        (forward-word -1)
***************
*** 1178,1184 ****
        (insert-buffer-substring rmailbuf)
        ;; Make sure messages are separated.
        (goto-char (point-max))
!       (insert hard-newline)
        (goto-char 2)
        ;; ``Quote'' "^From " as ">From "
        ;;  (note that this isn't really quoting, as there is no requirement
--- 1178,1184 ----
        (insert-buffer-substring rmailbuf)
        ;; Make sure messages are separated.
        (goto-char (point-max))
!       (insert ?\n)
        (goto-char 2)
        ;; ``Quote'' "^From " as ">From "
        ;;  (note that this isn't really quoting, as there is no requirement
***************
*** 1220,1230 ****
                              (rmail-maybe-set-message-counters)
                              (widen)
                              (narrow-to-region (point-max) (point-max))
!                             (insert "\C-l" hard-newline "0, unseen,,"
!                                     hard-newline "*** EOOH ***" hard-newline
!                                     "Date: " (mail-rfc822-date) hard-newline)
                              (insert-buffer-substring curbuf beg2 end)
!                             (insert hard-newline "\C-_")
                              (goto-char (point-min))
                              (widen)
                              (search-backward "\n\^_")
--- 1220,1229 ----
                              (rmail-maybe-set-message-counters)
                              (widen)
                              (narrow-to-region (point-max) (point-max))
!                             (insert "\C-l\n0, unseen,,\n*** EOOH ***\n"
!                                     "Date: " (mail-rfc822-date) "\n")
                              (insert-buffer-substring curbuf beg2 end)
!                             (insert "\n\C-_")
                              (goto-char (point-min))
                              (widen)
                              (search-backward "\n\^_")
***************
*** 1262,1272 ****
                    (set-buffer (get-buffer-create " mail-temp"))
                    (setq buffer-read-only nil)
                    (erase-buffer)
!                   (insert "\C-l" hard-newline "0, unseen,," hard-newline
!                           "*** EOOH ***" hard-newline "Date: "
!                           (mail-rfc822-date) hard-newline)
                    (insert-buffer-substring curbuf beg2 end)
!                   (insert hard-newline "\C-_")
                    (write-region (point-min) (point-max) (car fcc-list) t)
                    (erase-buffer)))
              (write-region
--- 1261,1270 ----
                    (set-buffer (get-buffer-create " mail-temp"))
                    (setq buffer-read-only nil)
                    (erase-buffer)
!                   (insert "\C-l\n0, unseen,,\n*** EOOH ***\nDate: "
!                           (mail-rfc822-date) "\n")
                    (insert-buffer-substring curbuf beg2 end)
!                   (insert "\n\C-_")
                    (write-region (point-min) (point-max) (car fcc-list) t)
                    (erase-buffer)))
              (write-region
***************
*** 1318,1324 ****
    (expand-abbrev)
    (or (mail-position-on-field "cc" t)
        (progn (mail-position-on-field "to")
!            (insert hard-newline "CC: "))))
  
  (defun mail-bcc ()
    "Move point to end of BCC-field.  Create a BCC field if none."
--- 1316,1322 ----
    (expand-abbrev)
    (or (mail-position-on-field "cc" t)
        (progn (mail-position-on-field "to")
!            (insert "\nCC: "))))
  
  (defun mail-bcc ()
    "Move point to end of BCC-field.  Create a BCC field if none."
***************
*** 1326,1332 ****
    (expand-abbrev)
    (or (mail-position-on-field "bcc" t)
        (progn (mail-position-on-field "to")
!            (insert hard-newline "BCC: "))))
  
  (defun mail-fcc (folder)
    "Add a new FCC field, with file name completion."
--- 1324,1330 ----
    (expand-abbrev)
    (or (mail-position-on-field "bcc" t)
        (progn (mail-position-on-field "to")
!            (insert "\nBCC: "))))
  
  (defun mail-fcc (folder)
    "Add a new FCC field, with file name completion."
***************
*** 1334,1340 ****
    (expand-abbrev)
    (or (mail-position-on-field "fcc" t)        ;Put new field after exiting 
FCC.
        (mail-position-on-field "to"))
!   (insert hard-newline "FCC: " folder))
  
  (defun mail-reply-to ()
    "Move point to end of Reply-To-field.  Create a Reply-To field if none."
--- 1332,1338 ----
    (expand-abbrev)
    (or (mail-position-on-field "fcc" t)        ;Put new field after exiting 
FCC.
        (mail-position-on-field "to"))
!   (insert "\nFCC: " folder))
  
  (defun mail-reply-to ()
    "Move point to end of Reply-To-field.  Create a Reply-To field if none."
***************
*** 1349,1355 ****
    (expand-abbrev)
    (or (mail-position-on-field "mail-reply-to" t)
        (progn (mail-position-on-field "to")
!            (insert hard-newline "Mail-Reply-To: "))))
  
  (defun mail-mail-followup-to ()
    "Move point to end of Mail-Followup-To field.
--- 1347,1353 ----
    (expand-abbrev)
    (or (mail-position-on-field "mail-reply-to" t)
        (progn (mail-position-on-field "to")
!            (insert "\nMail-Reply-To: "))))
  
  (defun mail-mail-followup-to ()
    "Move point to end of Mail-Followup-To field.
***************
*** 1358,1364 ****
    (expand-abbrev)
    (or (mail-position-on-field "mail-followup-to" t)
        (progn (mail-position-on-field "to")
!            (insert hard-newline "Mail-Followup-To: "))))
  
  (defun mail-position-on-field (field &optional soft)
    (let (end
--- 1356,1362 ----
    (expand-abbrev)
    (or (mail-position-on-field "mail-followup-to" t)
        (progn (mail-position-on-field "to")
!            (insert "\nMail-Followup-To: "))))
  
  (defun mail-position-on-field (field &optional soft)
    (let (end
***************
*** 1373,1379 ****
          t)
        (or soft
          (progn (goto-char end)
!                (insert field ": " hard-newline)
                 (skip-chars-backward "\n")))
        nil)))
  
--- 1371,1377 ----
          t)
        (or soft
          (progn (goto-char end)
!                (insert field ": \n")
                 (skip-chars-backward "\n")))
        nil)))
  
***************
*** 1396,1402 ****
        (delete-region (point) (point-max)))
      (if (stringp mail-signature)
        (insert mail-signature)
!       (insert hard-newline hard-newline "-- " hard-newline)
        (insert-file-contents (expand-file-name mail-signature-file)))))
  
  (defun mail-fill-yanked-message (&optional justifyp)
--- 1394,1400 ----
        (delete-region (point) (point-max)))
      (if (stringp mail-signature)
        (insert mail-signature)
!       (insert "\n\n-- \n")
        (insert-file-contents (expand-file-name mail-signature-file)))))
  
  (defun mail-fill-yanked-message (&optional justifyp)
***************
*** 1482,1488 ****
        ;; loop would deactivate the mark because we inserted text.
        (goto-char (prog1 (mark t)
                     (set-marker (mark-marker) (point) (current-buffer))))
!       (if (not (eolp)) (insert hard-newline)))))
  
  (defun mail-yank-clear-headers (start end)
    (if (< end start)
--- 1480,1486 ----
        ;; loop would deactivate the mark because we inserted text.
        (goto-char (prog1 (mark t)
                     (set-marker (mark-marker) (point) (current-buffer))))
!       (if (not (eolp)) (insert ?\n)))))
  
  (defun mail-yank-clear-headers (start end)
    (if (< end start)
***************
*** 1566,1573 ****
        (insert-char ?= (max 0 (- 60 (current-column))))
        (newline)
        (setq middle (point))
!       (insert "============================================================"
!             hard-newline)
        (push-mark)
        (goto-char middle)
        (insert-file-contents file)
--- 1564,1570 ----
        (insert-char ?= (max 0 (- 60 (current-column))))
        (newline)
        (setq middle (point))
!       (insert 
"============================================================\n")
        (push-mark)
        (goto-char middle)
        (insert-file-contents file)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]