emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] Changes to emacs/lisp/gnus/message.el


From: Chong Yidong
Subject: [Emacs-diffs] Changes to emacs/lisp/gnus/message.el
Date: Thu, 17 Nov 2005 11:31:28 -0500

Index: emacs/lisp/gnus/message.el
diff -c emacs/lisp/gnus/message.el:1.96 emacs/lisp/gnus/message.el:1.97
*** emacs/lisp/gnus/message.el:1.96     Fri Nov 11 05:14:19 2005
--- emacs/lisp/gnus/message.el  Thu Nov 17 16:31:22 2005
***************
*** 141,147 ****
    :group 'message-sending)
  
  (defcustom message-courtesy-message
!   "The following message is a courtesy copy of an article\nthat has been 
posted to %s as well.\n\n"
    "*This is inserted at the start of a mailed copy of a posted message.
  If the string contains the format spec \"%s\", the Newsgroups
  the article has been posted to will be inserted there.
--- 141,151 ----
    :group 'message-sending)
  
  (defcustom message-courtesy-message
!   (concat
!    "The following message is a courtesy copy of an article"
!    hard-newline
!    "that has been posted to %s as well."
!    hard-newline hard-newline)
    "*This is inserted at the start of a mailed copy of a posted message.
  If the string contains the format spec \"%s\", the Newsgroups
  the article has been posted to will be inserted there.
***************
*** 339,345 ****
  ;;; marking inserted text
  
  (defcustom message-mark-insert-begin
!   "--8<---------------cut here---------------start------------->8---\n"
    "How to mark the beginning of some inserted text."
    :version "22.1"
    :type 'string
--- 343,351 ----
  ;;; marking inserted text
  
  (defcustom message-mark-insert-begin
!   (concat
!    "--8<---------------cut here---------------start------------->8---"
!    hard-newline)
    "How to mark the beginning of some inserted text."
    :version "22.1"
    :type 'string
***************
*** 347,360 ****
    :group 'message-various)
  
  (defcustom message-mark-insert-end
!   "--8<---------------cut here---------------end--------------->8---\n"
    "How to mark the end of some inserted text."
    :version "22.1"
    :type 'string
    :link '(custom-manual "(message)Insertion Variables")
    :group 'message-various)
  
! (defcustom message-archive-header "X-No-Archive: Yes\n"
    "Header to insert when you don't want your article to be archived.
  Archives \(such as groups.google.com\) respect this header."
    :version "22.1"
--- 353,368 ----
    :group 'message-various)
  
  (defcustom message-mark-insert-end
!   (concat
!    "--8<---------------cut here---------------end--------------->8---"
!    hard-newline)
    "How to mark the end of some inserted text."
    :version "22.1"
    :type 'string
    :link '(custom-manual "(message)Insertion Variables")
    :group 'message-various)
  
! (defcustom message-archive-header "X-No-Archive: Yes"
    "Header to insert when you don't want your article to be archived.
  Archives \(such as groups.google.com\) respect this header."
    :version "22.1"
***************
*** 418,424 ****
    :link '(custom-manual "(message)Various Message Variables")
    :group 'message-various)
  
! (defcustom message-elide-ellipsis "\n[...]\n\n"
    "*The string which is inserted for elided text."
    :type 'string
    :link '(custom-manual "(message)Various Commands")
--- 426,433 ----
    :link '(custom-manual "(message)Various Message Variables")
    :group 'message-various)
  
! (defcustom message-elide-ellipsis
!   (concat hard-newline "[...]" hard-newline hard-newline)
    "*The string which is inserted for elided text."
    :type 'string
    :link '(custom-manual "(message)Various Commands")
***************
*** 578,584 ****
    :link '(custom-manual "(message)Insertion Variables")
    :type 'regexp)
  
! (defcustom message-cancel-message "I am canceling my own article.\n"
    "Message to be inserted in the cancel message."
    :group 'message-interface
    :link '(custom-manual "(message)Canceling News")
--- 587,594 ----
    :link '(custom-manual "(message)Insertion Variables")
    :type 'regexp)
  
! (defcustom message-cancel-message 
!   (concat "I am canceling my own article." hard-newline)
    "Message to be inserted in the cancel message."
    :group 'message-interface
    :link '(custom-manual "(message)Canceling News")
***************
*** 1734,1740 ****
          (goto-char (point-max))
          (if (string-match "\n$" (car headers))
              (insert (car headers))
!           (insert (car headers) ?\n)))))
      (setq headers (cdr headers))))
  
  (defmacro message-with-reply-buffer (&rest forms)
--- 1744,1750 ----
          (goto-char (point-max))
          (if (string-match "\n$" (car headers))
              (insert (car headers))
!           (insert (car headers) hard-newline)))))
      (setq headers (cdr headers))))
  
  (defmacro message-with-reply-buffer (&rest forms)
***************
*** 1841,1847 ****
                    (insert (concat "Subject: "
                                    new-subject
                                    " (was: "
!                                   old-subject ")\n")))))))))
  
  (defun message-mark-inserted-region (beg end)
    "Mark some region in the current article with enclosing tags.
--- 1851,1857 ----
                    (insert (concat "Subject: "
                                    new-subject
                                    " (was: "
!                                   old-subject ")" hard-newline)))))))))
  
  (defun message-mark-inserted-region (beg end)
    "Mark some region in the current article with enclosing tags.
***************
*** 1925,1931 ****
                                 target-group
                                 "[ \t]*$")
                         (message-fetch-field "Newsgroups")))
!       (insert (concat "\nFollowup-To: " target-group)))
    (setq message-cross-post-old-target target-group))
  
  (defun message-cross-post-insert-note (target-group cross-post in-old
--- 1935,1941 ----
                                 target-group
                                 "[ \t]*$")
                         (message-fetch-field "Newsgroups")))
!       (insert (concat hard-newline "Followup-To: " target-group)))
    (setq message-cross-post-old-target target-group))
  
  (defun message-cross-post-insert-note (target-group cross-post in-old
***************
*** 1957,1964 ****
      (if (or in-old
            (not cross-post)
            (string-match "^[ \t]*poster[ \t]*$" target-group))
!       (insert (concat message-followup-to-note target-group "\n"))
!       (insert (concat message-cross-post-note target-group "\n")))))
  
  (defun message-cross-post-followup-to (target-group)
    "Crossposts message and set Followup-To to TARGET-GROUP.
--- 1967,1974 ----
      (if (or in-old
            (not cross-post)
            (string-match "^[ \t]*poster[ \t]*$" target-group))
!       (insert message-followup-to-note target-group hard-newline)
!       (insert message-cross-post-note target-group hard-newline))))
  
  (defun message-cross-post-followup-to (target-group)
    "Crossposts message and set Followup-To to TARGET-GROUP.
***************
*** 2018,2024 ****
          (save-excursion
            (message-goto-to)
            (message-delete-line)
!           (insert (concat "To: " cc-content "\n"))
            (save-restriction
              (message-narrow-to-headers)
              (message-remove-header (if bcc
--- 2028,2034 ----
          (save-excursion
            (message-goto-to)
            (message-delete-line)
!           (insert (concat "To: " cc-content hard-newline))
            (save-restriction
              (message-narrow-to-headers)
              (message-remove-header (if bcc
***************
*** 2783,2789 ****
          (message-remove-header (symbol-name (car elem)))
          (goto-char (point-min))
          (insert (symbol-name (car elem)) ": "
!                 (cdr elem) "\n"))))))
  
  (defun message-insert-newsgroups ()
    "Insert the Newsgroups header from the article being replied to."
--- 2793,2799 ----
          (message-remove-header (symbol-name (car elem)))
          (goto-char (point-min))
          (insert (symbol-name (car elem)) ": "
!                 (cdr elem) hard-newline))))))
  
  (defun message-insert-newsgroups ()
    "Insert the Newsgroups header from the article being replied to."
***************
*** 2813,2819 ****
                                 (point)
                               (forward-line -2)
                               (point)))
!       (insert "\n")
        (goto-char beg)
        (delete-region beg (progn (message-goto-body)
                                (forward-line 2)
--- 2823,2829 ----
                                 (point)
                               (forward-line -2)
                               (point)))
!       (insert hard-newline)
        (goto-char beg)
        (delete-region beg (progn (message-goto-body)
                                (forward-line 2)
***************
*** 2832,2838 ****
        (end-of-line -1))
      (kill-region point (point))
      (unless (bolp)
!       (insert "\n"))))
  
  (defun message-newline-and-reformat (&optional arg not-break)
    "Insert four newlines, and then reformat if inside quoted text.
--- 2842,2848 ----
        (end-of-line -1))
      (kill-region point (point))
      (unless (bolp)
!       (insert hard-newline))))
  
  (defun message-newline-and-reformat (&optional arg not-break)
    "Insert four newlines, and then reformat if inside quoted text.
***************
*** 2974,2988 ****
        (goto-char (point-max))
        ;; Insert the signature.
        (unless (bolp)
!       (insert "\n"))
        (when message-signature-insert-empty-line
!       (insert "\n"))
!       (insert "-- \n")
        (if (eq signature t)
          (insert-file-contents message-signature-file)
        (insert signature))
        (goto-char (point-max))
!       (or (bolp) (insert "\n")))))
  
  (defun message-insert-importance-high ()
    "Insert header to mark message as important."
--- 2984,2998 ----
        (goto-char (point-max))
        ;; Insert the signature.
        (unless (bolp)
!       (insert hard-newline))
        (when message-signature-insert-empty-line
!       (insert hard-newline))
!       (insert "-- " hard-newline)
        (if (eq signature t)
          (insert-file-contents message-signature-file)
        (insert signature))
        (goto-char (point-max))
!       (or (bolp) (insert hard-newline)))))
  
  (defun message-insert-importance-high ()
    "Insert header to mark message as important."
***************
*** 2992,2998 ****
        (message-narrow-to-headers)
        (message-remove-header "Importance"))
      (message-goto-eoh)
!     (insert "Importance: high\n")))
  
  (defun message-insert-importance-low ()
    "Insert header to mark message as unimportant."
--- 3002,3008 ----
        (message-narrow-to-headers)
        (message-remove-header "Importance"))
      (message-goto-eoh)
!     (insert "Importance: high" hard-newline)))
  
  (defun message-insert-importance-low ()
    "Insert header to mark message as unimportant."
***************
*** 3002,3008 ****
        (message-narrow-to-headers)
        (message-remove-header "Importance"))
      (message-goto-eoh)
!     (insert "Importance: low\n")))
  
  (defun message-insert-or-toggle-importance ()
    "Insert a \"Importance: high\" header, or cycle through the header values.
--- 3012,3018 ----
        (message-narrow-to-headers)
        (message-remove-header "Importance"))
      (message-goto-eoh)
!     (insert "Importance: low" hard-newline)))
  
  (defun message-insert-or-toggle-importance ()
    "Insert a \"Importance: high\" header, or cycle through the header values.
***************
*** 3024,3030 ****
                          (t
                           "high")))))
        (message-goto-eoh)
!       (insert (format "Importance: %s\n" new)))))
  
  (defun message-insert-disposition-notification-to ()
    "Request a disposition notification (return receipt) to this message.
--- 3034,3040 ----
                          (t
                           "high")))))
        (message-goto-eoh)
!       (insert (format "Importance: %s" new) hard-newline))))
  
  (defun message-insert-disposition-notification-to ()
    "Request a disposition notification (return receipt) to this message.
***************
*** 3035,3044 ****
        (message-narrow-to-headers)
        (message-remove-header "Disposition-Notification-To"))
      (message-goto-eoh)
!     (insert (format "Disposition-Notification-To: %s\n"
                    (or (message-field-value "Reply-to")
                        (message-field-value "From")
!                       (message-make-from))))))
  
  (defun message-elide-region (b e)
    "Elide the text in the region.
--- 3045,3055 ----
        (message-narrow-to-headers)
        (message-remove-header "Disposition-Notification-To"))
      (message-goto-eoh)
!     (insert (format "Disposition-Notification-To: %s"
                    (or (message-field-value "Reply-to")
                        (message-field-value "From")
!                       (message-make-from)))
!           hard-newline)))
  
  (defun message-elide-region (b e)
    "Elide the text in the region.
***************
*** 3173,3179 ****
      ;; Delete blank lines at the end of the buffer.
      (goto-char (point-max))
      (unless (eolp)
!       (insert "\n"))
      (while (and (zerop (forward-line -1))
                (looking-at "$"))
        (message-delete-line))
--- 3184,3190 ----
      ;; Delete blank lines at the end of the buffer.
      (goto-char (point-max))
      (unless (eolp)
!       (insert hard-newline))
      (while (and (zerop (forward-line -1))
                (looking-at "$"))
        (message-delete-line))
***************
*** 3211,3217 ****
        (funcall message-cite-function))
        (message-exchange-point-and-mark)
        (unless (bolp)
!       (insert ?\n))
        (unless modified
        (setq message-checksum (message-checksum))))))
  
--- 3222,3228 ----
        (funcall message-cite-function))
        (message-exchange-point-and-mark)
        (unless (bolp)
!       (insert hard-newline))
        (unless modified
        (setq message-checksum (message-checksum))))))
  
***************
*** 3269,3281 ****
        (delete-region (point) end)
        (unless (search-backward "\n\n" start t)
        ;; Insert a blank line if it is peeled off.
!       (insert "\n")))
      (goto-char start)
      (while functions
        (funcall (pop functions)))
      (when message-citation-line-function
        (unless (bolp)
!       (insert "\n"))
        (funcall message-citation-line-function))))
  
  (eval-when-compile (defvar mail-citation-hook))       ;Compiler directive
--- 3280,3292 ----
        (delete-region (point) end)
        (unless (search-backward "\n\n" start t)
        ;; Insert a blank line if it is peeled off.
!       (insert hard-newline)))
      (goto-char start)
      (while functions
        (funcall (pop functions)))
      (when message-citation-line-function
        (unless (bolp)
!       (insert hard-newline))
        (funcall message-citation-line-function))))
  
  (eval-when-compile (defvar mail-citation-hook))       ;Compiler directive
***************
*** 3311,3323 ****
        (funcall (pop functions)))
        (when message-citation-line-function
        (unless (bolp)
!         (insert "\n"))
        (funcall message-citation-line-function)))))
  
  (defun message-insert-citation-line ()
    "Insert a simple citation line."
    (when message-reply-headers
!     (insert (mail-header-from message-reply-headers) " writes:\n\n")))
  
  (defun message-position-on-field (header &rest afters)
    (let ((case-fold-search t))
--- 3322,3335 ----
        (funcall (pop functions)))
        (when message-citation-line-function
        (unless (bolp)
!         (insert hard-newline))
        (funcall message-citation-line-function)))))
  
  (defun message-insert-citation-line ()
    "Insert a simple citation line."
    (when message-reply-headers
!     (insert (mail-header-from message-reply-headers)
!           " writes:" hard-newline hard-newline)))
  
  (defun message-position-on-field (header &rest afters)
    (let ((case-fold-search t))
***************
*** 3343,3349 ****
        (when afters
          (re-search-forward "^[^ \t]" nil 'move)
          (beginning-of-line))
!       (insert header ": \n")
        (forward-char -1)
        nil))))
  
--- 3355,3361 ----
        (when afters
          (re-search-forward "^[^ \t]" nil 'move)
          (beginning-of-line))
!       (insert header ": " hard-newline)
        (forward-char -1)
        nil))))
  
***************
*** 3539,3545 ****
    ;; Make sure there's a newline at the end of the message.
    (goto-char (point-max))
    (unless (bolp)
!     (insert "\n"))
    ;; Make the hidden headers visible.
    (let ((points (message-text-with-property 'message-hidden)))
      (when points
--- 3551,3557 ----
    ;; Make sure there's a newline at the end of the message.
    (goto-char (point-max))
    (unless (bolp)
!     (insert hard-newline))
    ;; Make the hidden headers visible.
    (let ((points (message-text-with-property 'message-hidden)))
      (when points
***************
*** 3644,3650 ****
    (goto-char (point-min))
    (re-search-forward
     (concat "^" (regexp-quote mail-header-separator) "\n"))
!   (replace-match "\n")
    (run-hooks 'message-send-mail-hook)
    (let ((p (goto-char (point-min)))
        (tembuf (message-generate-new-buffer-clone-locals " message temp"))
--- 3656,3662 ----
    (goto-char (point-min))
    (re-search-forward
     (concat "^" (regexp-quote mail-header-separator) "\n"))
!   (replace-match hard-newline)
    (run-hooks 'message-send-mail-hook)
    (let ((p (goto-char (point-min)))
        (tembuf (message-generate-new-buffer-clone-locals " message temp"))
***************
*** 3686,3702 ****
              (message-remove-header "Message-ID")
              (message-remove-header "Lines")
              (goto-char (point-max))
!             (insert "Mime-Version: 1.0\n")
              (setq header (buffer-string)))
            (goto-char (point-max))
!           (insert (format "Content-Type: message/partial; id=\"%s\"; 
number=%d; total=%d\n\n"
!                           id n total))
            (forward-char -1)
            (let ((mail-header-separator ""))
              (when (memq 'Message-ID message-required-mail-headers)
!               (insert "Message-ID: " (message-make-message-id) "\n"))
              (when (memq 'Lines message-required-mail-headers)
!               (insert "Lines: " (message-make-lines) "\n"))
              (message-goto-subject)
              (end-of-line)
              (insert (format " (%d/%d)" n total))
--- 3698,3715 ----
              (message-remove-header "Message-ID")
              (message-remove-header "Lines")
              (goto-char (point-max))
!             (insert "Mime-Version: 1.0" hard-newline)
              (setq header (buffer-string)))
            (goto-char (point-max))
!           (insert (format "Content-Type: message/partial; id=\"%s\"; 
number=%d; total=%d"
!                           id n total)
!                   hard-newline hard-newline)
            (forward-char -1)
            (let ((mail-header-separator ""))
              (when (memq 'Message-ID message-required-mail-headers)
!               (insert "Message-ID: " (message-make-message-id) hard-newline))
              (when (memq 'Lines message-required-mail-headers)
!               (insert "Lines: " (message-make-lines) hard-newline))
              (message-goto-subject)
              (end-of-line)
              (insert (format " (%d/%d)" n total))
***************
*** 3761,3767 ****
          (goto-char (point-max))
          ;; require one newline at the end.
          (or (= (preceding-char) ?\n)
!             (insert ?\n))
          (message-cleanup-headers)
          ;; FIXME: we're inserting the courtesy copy after encoding.
          ;; This is wrong if the courtesy copy string contains
--- 3774,3780 ----
          (goto-char (point-max))
          ;; require one newline at the end.
          (or (= (preceding-char) ?\n)
!             (insert hard-newline))
          (message-cleanup-headers)
          ;; FIXME: we're inserting the courtesy copy after encoding.
          ;; This is wrong if the courtesy copy string contains
***************
*** 3837,3843 ****
            (goto-char (point-min))
            (re-search-forward
             (concat "^" (regexp-quote mail-header-separator) "\n"))
!           (replace-match "\n")
            (backward-char 1)
            (setq delimline (point-marker))
            (run-hooks 'message-send-mail-hook)
--- 3850,3856 ----
            (goto-char (point-min))
            (re-search-forward
             (concat "^" (regexp-quote mail-header-separator) "\n"))
!           (replace-match hard-newline)
            (backward-char 1)
            (setq delimline (point-marker))
            (run-hooks 'message-send-mail-hook)
***************
*** 3899,3905 ****
    (goto-char (point-min))
    (re-search-forward
     (concat "^" (regexp-quote mail-header-separator) "\n"))
!   (replace-match "\n")
    (run-hooks 'message-send-mail-hook)
    ;; send the message
    (case
--- 3912,3918 ----
    (goto-char (point-min))
    (re-search-forward
     (concat "^" (regexp-quote mail-header-separator) "\n"))
!   (replace-match hard-newline)
    (run-hooks 'message-send-mail-hook)
    ;; send the message
    (case
***************
*** 4067,4079 ****
              (goto-char (point-max))
              ;; require one newline at the end.
              (or (= (preceding-char) ?\n)
!                 (insert ?\n))
              (let ((case-fold-search t))
                ;; Remove the delimiter.
                (goto-char (point-min))
                (re-search-forward
                 (concat "^" (regexp-quote mail-header-separator) "\n"))
!               (replace-match "\n")
                (backward-char 1))
              (run-hooks 'message-send-news-hook)
              (gnus-open-server method)
--- 4080,4092 ----
              (goto-char (point-max))
              ;; require one newline at the end.
              (or (= (preceding-char) ?\n)
!                 (insert hard-newline))
              (let ((case-fold-search t))
                ;; Remove the delimiter.
                (goto-char (point-min))
                (re-search-forward
                 (concat "^" (regexp-quote mail-header-separator) "\n"))
!               (replace-match hard-newline)
                (backward-char 1))
              (run-hooks 'message-send-news-hook)
              (gnus-open-server method)
***************
*** 4200,4206 ****
                                             (message-tokenize-header
                                              newsgroups)))))))))
         (goto-char (point-min))
!        (insert "Followup-To: " to "\n"))
         t))
     ;; Check "Shoot me".
     (message-check 'shoot
--- 4213,4219 ----
                                             (message-tokenize-header
                                              newsgroups)))))))))
         (goto-char (point-min))
!        (insert "Followup-To: " to hard-newline))
         t))
     ;; Check "Shoot me".
     (message-check 'shoot
***************
*** 5099,5105 ****
                      ;; We check whether the value was ended by a
                      ;; newline.  If now, we insert one.
                      (unless (bolp)
!                       (insert "\n"))
                      (forward-line -1)))
                ;; The value of this header was empty, so we clear
                ;; totally and insert the new value.
--- 5112,5118 ----
                      ;; We check whether the value was ended by a
                      ;; newline.  If now, we insert one.
                      (unless (bolp)
!                       (insert hard-newline))
                      (forward-line -1)))
                ;; The value of this header was empty, so we clear
                ;; totally and insert the new value.
***************
*** 5139,5145 ****
            (beginning-of-line))
          (when (or (message-news-p)
                    (string-match "@.+\\.." secure-sender))
!           (insert "Sender: " secure-sender "\n"))))
        ;; Check for IDNA
        (message-idna-to-ascii-rhs))))
  
--- 5152,5158 ----
            (beginning-of-line))
          (when (or (message-news-p)
                    (string-match "@.+\\.." secure-sender))
!           (insert "Sender: " secure-sender hard-newline))))
        ;; Check for IDNA
        (message-idna-to-ascii-rhs))))
  
***************
*** 5151,5157 ****
        (message-narrow-to-headers)
        (when (setq newsgroups (message-fetch-field "newsgroups"))
          (goto-char (point-max))
!         (insert "Posted-To: " newsgroups "\n")))
        (forward-line 1)
        (when message-courtesy-message
        (cond
--- 5164,5170 ----
        (message-narrow-to-headers)
        (when (setq newsgroups (message-fetch-field "newsgroups"))
          (goto-char (point-max))
!         (insert "Posted-To: " newsgroups hard-newline)))
        (forward-line 1)
        (when message-courtesy-message
        (cond
***************
*** 5170,5176 ****
      (insert (capitalize (symbol-name header))
            ": "
            (if (consp value) (car value) value)
!           "\n")
      (narrow-to-region (point-min) (1- (point-max)))
      (let (quoted last)
        (goto-char (point-min))
--- 5183,5189 ----
      (insert (capitalize (symbol-name header))
            ": "
            (if (consp value) (car value) value)
!           hard-newline)
      (narrow-to-region (point-min) (1- (point-max)))
      (let (quoted last)
        (goto-char (point-min))
***************
*** 5184,5190 ****
                  (progn
                    (save-excursion
                      (goto-char last)
!                     (insert "\n\t"))
                    (setq last (1+ (point))))
                (setq last (1+ (point)))))
          (setq quoted (not quoted)))
--- 5197,5203 ----
                  (progn
                    (save-excursion
                      (goto-char last)
!                     (insert hard-newline "\t"))
                    (setq last (1+ (point))))
                (setq last (1+ (point)))))
          (setq quoted (not quoted)))
***************
*** 5210,5216 ****
      (insert (capitalize (symbol-name header))
            ": "
            (if (consp value) (car value) value)
!           "\n")
      (save-restriction
        (narrow-to-region begin (point))
        (fill-region-as-paragraph begin (point))
--- 5223,5229 ----
      (insert (capitalize (symbol-name header))
            ": "
            (if (consp value) (car value) value)
!           hard-newline)
      (save-restriction
        (narrow-to-region begin (point))
        (fill-region-as-paragraph begin (point))
***************
*** 5279,5285 ****
      (let ((refstring (mapconcat #'identity refs " ")))
        (if (and message-this-is-news message-cater-to-broken-inn)
          (insert (capitalize (symbol-name header)) ": "
!                 refstring "\n")
        (message-fill-header header refstring)))))
  
  (defun message-position-point ()
--- 5292,5298 ----
      (let ((refstring (mapconcat #'identity refs " ")))
        (if (and message-this-is-news message-cater-to-broken-inn)
          (insert (capitalize (symbol-name header)) ": "
!                 refstring hard-newline)
        (message-fill-header header refstring)))))
  
  (defun message-position-point ()
***************
*** 5508,5525 ****
    (delete-region (point) (progn (forward-line -1) (point)))
    (when message-default-headers
      (insert message-default-headers)
!     (or (bolp) (insert ?\n)))
    (put-text-property
     (point)
     (progn
!      (insert mail-header-separator "\n")
       (1- (point)))
     'read-only nil)
    (forward-line -1)
    (when (message-news-p)
      (when message-default-news-headers
        (insert message-default-news-headers)
!       (or (bolp) (insert ?\n)))
      (when message-generate-headers-first
        (message-generate-headers
         (message-headers-to-generate
--- 5521,5538 ----
    (delete-region (point) (progn (forward-line -1) (point)))
    (when message-default-headers
      (insert message-default-headers)
!     (or (bolp) (insert hard-newline)))
    (put-text-property
     (point)
     (progn
!      (insert mail-header-separator hard-newline)
       (1- (point)))
     'read-only nil)
    (forward-line -1)
    (when (message-news-p)
      (when message-default-news-headers
        (insert message-default-news-headers)
!       (or (bolp) (insert hard-newline)))
      (when message-generate-headers-first
        (message-generate-headers
         (message-headers-to-generate
***************
*** 5530,5536 ****
    (when (message-mail-p)
      (when message-default-mail-headers
        (insert message-default-mail-headers)
!       (or (bolp) (insert ?\n)))
      (save-restriction
        (message-narrow-to-headers)
        (if message-alternative-emails
--- 5543,5549 ----
    (when (message-mail-p)
      (when message-default-mail-headers
        (insert message-default-mail-headers)
!       (or (bolp) (insert hard-newline)))
      (save-restriction
        (message-narrow-to-headers)
        (if message-alternative-emails
***************
*** 6012,6025 ****
            (message-news)
          (setq buf (set-buffer (get-buffer-create " *message cancel*"))))
        (erase-buffer)
!       (insert "Newsgroups: " newsgroups "\n"
!               "From: " from "\n"
!               "Subject: cmsg cancel " message-id "\n"
!               "Control: cancel " message-id "\n"
                (if distribution
!                   (concat "Distribution: " distribution "\n")
                  "")
!               mail-header-separator "\n"
                message-cancel-message)
        (run-hooks 'message-cancel-hook)
        (unless arg
--- 6025,6038 ----
            (message-news)
          (setq buf (set-buffer (get-buffer-create " *message cancel*"))))
        (erase-buffer)
!       (insert "Newsgroups: " newsgroups hard-newline
!               "From: " from hard-newline
!               "Subject: cmsg cancel " message-id hard-newline
!               "Control: cancel " message-id hard-newline
                (if distribution
!                   (concat "Distribution: " distribution hard-newline)
                  "")
!               mail-header-separator hard-newline
                message-cancel-message)
        (run-hooks 'message-cancel-hook)
        (unless arg
***************
*** 6208,6214 ****
  
  (defun message-forward-make-body-plain (forward-buffer)
    (insert
!    "\n-------------------- Start of forwarded message --------------------\n")
    (let ((b (point)) e)
      (insert
       (with-temp-buffer
--- 6221,6229 ----
  
  (defun message-forward-make-body-plain (forward-buffer)
    (insert
!    hard-newline
!    "-------------------- Start of forwarded message --------------------"
!    hard-newline)
    (let ((b (point)) e)
      (insert
       (with-temp-buffer
***************
*** 6224,6230 ****
         (buffer-string)))
      (setq e (point))
      (insert
!      "\n-------------------- End of forwarded message --------------------\n")
      (when message-forward-ignored-headers
        (save-restriction
        (narrow-to-region b e)
--- 6239,6247 ----
         (buffer-string)))
      (setq e (point))
      (insert
!      hard-newline
!      "-------------------- End of forwarded message --------------------"
!      hard-newline)
      (when message-forward-ignored-headers
        (save-restriction
        (narrow-to-region b e)
***************
*** 6234,6240 ****
        (message-remove-header message-forward-ignored-headers t)))))
  
  (defun message-forward-make-body-mime (forward-buffer)
!   (insert "\n\n<#part type=message/rfc822 disposition=inline raw=t>\n")
    (let ((b (point)) e)
      (save-restriction
        (narrow-to-region (point) (point))
--- 6251,6260 ----
        (message-remove-header message-forward-ignored-headers t)))))
  
  (defun message-forward-make-body-mime (forward-buffer)
!   (insert 
!    hard-newline hard-newline
!    "<#part type=message/rfc822 disposition=inline raw=t>"
!    hard-newline)
    (let ((b (point)) e)
      (save-restriction
        (narrow-to-region (point) (point))
***************
*** 6244,6253 ****
        (replace-match "X-From-Line: "))
        (goto-char (point-max)))
      (setq e (point))
!     (insert "<#/part>\n")))
  
  (defun message-forward-make-body-mml (forward-buffer)
!   (insert "\n\n<#mml type=message/rfc822 disposition=inline>\n")
    (let ((b (point)) e)
      (if (not message-forward-decoded-p)
        (insert
--- 6264,6276 ----
        (replace-match "X-From-Line: "))
        (goto-char (point-max)))
      (setq e (point))
!     (insert "<#/part>" hard-newline)))
  
  (defun message-forward-make-body-mml (forward-buffer)
!   (insert 
!    hard-newline hard-newline
!    "<#mml type=message/rfc822 disposition=inline>"
!    hard-newline)
    (let ((b (point)) e)
      (if (not message-forward-decoded-p)
        (insert
***************
*** 6270,6276 ****
          (replace-match "X-From-Line: "))
        (goto-char (point-max))))
      (setq e (point))
!     (insert "<#/mml>\n")
      (when (and (not message-forward-decoded-p)
               message-forward-ignored-headers)
        (save-restriction
--- 6293,6299 ----
          (replace-match "X-From-Line: "))
        (goto-char (point-max))))
      (setq e (point))
!     (insert "<#/mml>" hard-newline)
      (when (and (not message-forward-decoded-p)
               message-forward-ignored-headers)
        (save-restriction
***************
*** 6282,6300 ****
  
  (defun message-forward-make-body-digest-plain (forward-buffer)
    (insert
!    "\n-------------------- Start of forwarded message --------------------\n")
    (let ((b (point)) e)
      (mml-insert-buffer forward-buffer)
      (setq e (point))
      (insert
!      "\n-------------------- End of forwarded message 
--------------------\n")))
  
  (defun message-forward-make-body-digest-mime (forward-buffer)
!   (insert "\n<#multipart type=digest>\n")
    (let ((b (point)) e)
      (insert-buffer-substring forward-buffer)
      (setq e (point))
!     (insert "<#/multipart>\n")
      (save-restriction
        (narrow-to-region b e)
        (goto-char b)
--- 6305,6327 ----
  
  (defun message-forward-make-body-digest-plain (forward-buffer)
    (insert
!    hard-newline
!    "-------------------- Start of forwarded message --------------------"
!    hard-newline)
    (let ((b (point)) e)
      (mml-insert-buffer forward-buffer)
      (setq e (point))
      (insert
!      hard-newline
!      "-------------------- End of forwarded message --------------------"
!      hard-newline)))
  
  (defun message-forward-make-body-digest-mime (forward-buffer)
!   (insert hard-newline "<#multipart type=digest>" hard-newline)
    (let ((b (point)) e)
      (insert-buffer-substring forward-buffer)
      (setq e (point))
!     (insert "<#/multipart>" hard-newline)
      (save-restriction
        (narrow-to-region b e)
        (goto-char b)
***************
*** 6799,6805 ****
        (message-narrow-to-headers-or-head)
        (message-remove-header "Mime-Version")
        (goto-char (point-max))
!       (insert "MIME-Version: 1.0\n")
        (when lines
          (insert lines))
        (setq content-type-p
--- 6826,6832 ----
        (message-narrow-to-headers-or-head)
        (message-remove-header "Mime-Version")
        (goto-char (point-max))
!       (insert "MIME-Version: 1.0" hard-newline)
        (when lines
          (insert lines))
        (setq content-type-p
***************
*** 6819,6825 ****
        ;; For unknown reason, MIME-Version doesn't exist.
        (when (re-search-forward "^MIME-Version:" nil t)
          (forward-line 1)
!         (insert "Content-Type: text/plain; charset=us-ascii\n"))))))
  
  (defun message-read-from-minibuffer (prompt &optional initial-contents)
    "Read from the minibuffer while providing abbrev expansion."
--- 6846,6852 ----
        ;; For unknown reason, MIME-Version doesn't exist.
        (when (re-search-forward "^MIME-Version:" nil t)
          (forward-line 1)
!         (insert "Content-Type: text/plain; charset=us-ascii" 
hard-newline))))))
  
  (defun message-read-from-minibuffer (prompt &optional initial-contents)
    "Read from the minibuffer while providing abbrev expansion."
***************
*** 6848,6854 ****
        (pop emails))
      (unless (or (not email) (equal email user-mail-address))
        (goto-char (point-max))
!       (insert "From: " email "\n"))))
  
  (defun message-options-get (symbol)
    (cdr (assq symbol message-options)))
--- 6875,6881 ----
        (pop emails))
      (unless (or (not email) (equal email user-mail-address))
        (goto-char (point-max))
!       (insert "From: " email hard-newline))))
  
  (defun message-options-get (symbol)
    (cdr (assq symbol message-options)))




reply via email to

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