141 |
:group 'message-sending) |
:group 'message-sending) |
142 |
|
|
143 |
(defcustom message-courtesy-message |
(defcustom message-courtesy-message |
144 |
(concat |
"The following message is a courtesy copy of an article\nthat has been posted to %s as well.\n\n" |
|
"The following message is a courtesy copy of an article" |
|
|
hard-newline |
|
|
"that has been posted to %s as well." |
|
|
hard-newline hard-newline) |
|
145 |
"*This is inserted at the start of a mailed copy of a posted message. |
"*This is inserted at the start of a mailed copy of a posted message. |
146 |
If the string contains the format spec \"%s\", the Newsgroups |
If the string contains the format spec \"%s\", the Newsgroups |
147 |
the article has been posted to will be inserted there. |
the article has been posted to will be inserted there. |
339 |
;;; marking inserted text |
;;; marking inserted text |
340 |
|
|
341 |
(defcustom message-mark-insert-begin |
(defcustom message-mark-insert-begin |
342 |
(concat |
"--8<---------------cut here---------------start------------->8---\n" |
|
"--8<---------------cut here---------------start------------->8---" |
|
|
hard-newline) |
|
343 |
"How to mark the beginning of some inserted text." |
"How to mark the beginning of some inserted text." |
344 |
:version "22.1" |
:version "22.1" |
345 |
:type 'string |
:type 'string |
347 |
:group 'message-various) |
:group 'message-various) |
348 |
|
|
349 |
(defcustom message-mark-insert-end |
(defcustom message-mark-insert-end |
350 |
(concat |
"--8<---------------cut here---------------end--------------->8---\n" |
|
"--8<---------------cut here---------------end--------------->8---" |
|
|
hard-newline) |
|
351 |
"How to mark the end of some inserted text." |
"How to mark the end of some inserted text." |
352 |
:version "22.1" |
:version "22.1" |
353 |
:type 'string |
:type 'string |
354 |
:link '(custom-manual "(message)Insertion Variables") |
:link '(custom-manual "(message)Insertion Variables") |
355 |
:group 'message-various) |
:group 'message-various) |
356 |
|
|
357 |
(defcustom message-archive-header "X-No-Archive: Yes" |
(defcustom message-archive-header "X-No-Archive: Yes\n" |
358 |
"Header to insert when you don't want your article to be archived. |
"Header to insert when you don't want your article to be archived. |
359 |
Archives \(such as groups.google.com\) respect this header." |
Archives \(such as groups.google.com\) respect this header." |
360 |
:version "22.1" |
:version "22.1" |
418 |
:link '(custom-manual "(message)Various Message Variables") |
:link '(custom-manual "(message)Various Message Variables") |
419 |
:group 'message-various) |
:group 'message-various) |
420 |
|
|
421 |
(defcustom message-elide-ellipsis |
(defcustom message-elide-ellipsis "\n[...]\n\n" |
|
(concat hard-newline "[...]" hard-newline hard-newline) |
|
422 |
"*The string which is inserted for elided text." |
"*The string which is inserted for elided text." |
423 |
:type 'string |
:type 'string |
424 |
:link '(custom-manual "(message)Various Commands") |
:link '(custom-manual "(message)Various Commands") |
578 |
:link '(custom-manual "(message)Insertion Variables") |
:link '(custom-manual "(message)Insertion Variables") |
579 |
:type 'regexp) |
:type 'regexp) |
580 |
|
|
581 |
(defcustom message-cancel-message |
(defcustom message-cancel-message "I am canceling my own article.\n" |
|
(concat "I am canceling my own article." hard-newline) |
|
582 |
"Message to be inserted in the cancel message." |
"Message to be inserted in the cancel message." |
583 |
:group 'message-interface |
:group 'message-interface |
584 |
:link '(custom-manual "(message)Canceling News") |
:link '(custom-manual "(message)Canceling News") |
1734 |
(goto-char (point-max)) |
(goto-char (point-max)) |
1735 |
(if (string-match "\n$" (car headers)) |
(if (string-match "\n$" (car headers)) |
1736 |
(insert (car headers)) |
(insert (car headers)) |
1737 |
(insert (car headers) hard-newline))))) |
(insert (car headers) ?\n))))) |
1738 |
(setq headers (cdr headers)))) |
(setq headers (cdr headers)))) |
1739 |
|
|
1740 |
(defmacro message-with-reply-buffer (&rest forms) |
(defmacro message-with-reply-buffer (&rest forms) |
1841 |
(insert (concat "Subject: " |
(insert (concat "Subject: " |
1842 |
new-subject |
new-subject |
1843 |
" (was: " |
" (was: " |
1844 |
old-subject ")" hard-newline))))))))) |
old-subject ")\n"))))))))) |
1845 |
|
|
1846 |
(defun message-mark-inserted-region (beg end) |
(defun message-mark-inserted-region (beg end) |
1847 |
"Mark some region in the current article with enclosing tags. |
"Mark some region in the current article with enclosing tags. |
1925 |
target-group |
target-group |
1926 |
"[ \t]*$") |
"[ \t]*$") |
1927 |
(message-fetch-field "Newsgroups"))) |
(message-fetch-field "Newsgroups"))) |
1928 |
(insert (concat hard-newline "Followup-To: " target-group))) |
(insert (concat "\nFollowup-To: " target-group))) |
1929 |
(setq message-cross-post-old-target target-group)) |
(setq message-cross-post-old-target target-group)) |
1930 |
|
|
1931 |
(defun message-cross-post-insert-note (target-group cross-post in-old |
(defun message-cross-post-insert-note (target-group cross-post in-old |
1957 |
(if (or in-old |
(if (or in-old |
1958 |
(not cross-post) |
(not cross-post) |
1959 |
(string-match "^[ \t]*poster[ \t]*$" target-group)) |
(string-match "^[ \t]*poster[ \t]*$" target-group)) |
1960 |
(insert message-followup-to-note target-group hard-newline) |
(insert (concat message-followup-to-note target-group "\n")) |
1961 |
(insert message-cross-post-note target-group hard-newline)))) |
(insert (concat message-cross-post-note target-group "\n"))))) |
1962 |
|
|
1963 |
(defun message-cross-post-followup-to (target-group) |
(defun message-cross-post-followup-to (target-group) |
1964 |
"Crossposts message and set Followup-To to TARGET-GROUP. |
"Crossposts message and set Followup-To to TARGET-GROUP. |
2018 |
(save-excursion |
(save-excursion |
2019 |
(message-goto-to) |
(message-goto-to) |
2020 |
(message-delete-line) |
(message-delete-line) |
2021 |
(insert (concat "To: " cc-content hard-newline)) |
(insert (concat "To: " cc-content "\n")) |
2022 |
(save-restriction |
(save-restriction |
2023 |
(message-narrow-to-headers) |
(message-narrow-to-headers) |
2024 |
(message-remove-header (if bcc |
(message-remove-header (if bcc |
2783 |
(message-remove-header (symbol-name (car elem))) |
(message-remove-header (symbol-name (car elem))) |
2784 |
(goto-char (point-min)) |
(goto-char (point-min)) |
2785 |
(insert (symbol-name (car elem)) ": " |
(insert (symbol-name (car elem)) ": " |
2786 |
(cdr elem) hard-newline)))))) |
(cdr elem) "\n")))))) |
2787 |
|
|
2788 |
(defun message-insert-newsgroups () |
(defun message-insert-newsgroups () |
2789 |
"Insert the Newsgroups header from the article being replied to." |
"Insert the Newsgroups header from the article being replied to." |
2813 |
(point) |
(point) |
2814 |
(forward-line -2) |
(forward-line -2) |
2815 |
(point))) |
(point))) |
2816 |
(insert hard-newline) |
(insert "\n") |
2817 |
(goto-char beg) |
(goto-char beg) |
2818 |
(delete-region beg (progn (message-goto-body) |
(delete-region beg (progn (message-goto-body) |
2819 |
(forward-line 2) |
(forward-line 2) |
2832 |
(end-of-line -1)) |
(end-of-line -1)) |
2833 |
(kill-region point (point)) |
(kill-region point (point)) |
2834 |
(unless (bolp) |
(unless (bolp) |
2835 |
(insert hard-newline)))) |
(insert "\n")))) |
2836 |
|
|
2837 |
(defun message-newline-and-reformat (&optional arg not-break) |
(defun message-newline-and-reformat (&optional arg not-break) |
2838 |
"Insert four newlines, and then reformat if inside quoted text. |
"Insert four newlines, and then reformat if inside quoted text. |
2974 |
(goto-char (point-max)) |
(goto-char (point-max)) |
2975 |
;; Insert the signature. |
;; Insert the signature. |
2976 |
(unless (bolp) |
(unless (bolp) |
2977 |
(insert hard-newline)) |
(insert "\n")) |
2978 |
(when message-signature-insert-empty-line |
(when message-signature-insert-empty-line |
2979 |
(insert hard-newline)) |
(insert "\n")) |
2980 |
(insert "-- " hard-newline) |
(insert "-- \n") |
2981 |
(if (eq signature t) |
(if (eq signature t) |
2982 |
(insert-file-contents message-signature-file) |
(insert-file-contents message-signature-file) |
2983 |
(insert signature)) |
(insert signature)) |
2984 |
(goto-char (point-max)) |
(goto-char (point-max)) |
2985 |
(or (bolp) (insert hard-newline))))) |
(or (bolp) (insert "\n"))))) |
2986 |
|
|
2987 |
(defun message-insert-importance-high () |
(defun message-insert-importance-high () |
2988 |
"Insert header to mark message as important." |
"Insert header to mark message as important." |
2992 |
(message-narrow-to-headers) |
(message-narrow-to-headers) |
2993 |
(message-remove-header "Importance")) |
(message-remove-header "Importance")) |
2994 |
(message-goto-eoh) |
(message-goto-eoh) |
2995 |
(insert "Importance: high" hard-newline))) |
(insert "Importance: high\n"))) |
2996 |
|
|
2997 |
(defun message-insert-importance-low () |
(defun message-insert-importance-low () |
2998 |
"Insert header to mark message as unimportant." |
"Insert header to mark message as unimportant." |
3002 |
(message-narrow-to-headers) |
(message-narrow-to-headers) |
3003 |
(message-remove-header "Importance")) |
(message-remove-header "Importance")) |
3004 |
(message-goto-eoh) |
(message-goto-eoh) |
3005 |
(insert "Importance: low" hard-newline))) |
(insert "Importance: low\n"))) |
3006 |
|
|
3007 |
(defun message-insert-or-toggle-importance () |
(defun message-insert-or-toggle-importance () |
3008 |
"Insert a \"Importance: high\" header, or cycle through the header values. |
"Insert a \"Importance: high\" header, or cycle through the header values. |
3024 |
(t |
(t |
3025 |
"high"))))) |
"high"))))) |
3026 |
(message-goto-eoh) |
(message-goto-eoh) |
3027 |
(insert (format "Importance: %s" new) hard-newline)))) |
(insert (format "Importance: %s\n" new))))) |
3028 |
|
|
3029 |
(defun message-insert-disposition-notification-to () |
(defun message-insert-disposition-notification-to () |
3030 |
"Request a disposition notification (return receipt) to this message. |
"Request a disposition notification (return receipt) to this message. |
3035 |
(message-narrow-to-headers) |
(message-narrow-to-headers) |
3036 |
(message-remove-header "Disposition-Notification-To")) |
(message-remove-header "Disposition-Notification-To")) |
3037 |
(message-goto-eoh) |
(message-goto-eoh) |
3038 |
(insert (format "Disposition-Notification-To: %s" |
(insert (format "Disposition-Notification-To: %s\n" |
3039 |
(or (message-field-value "Reply-to") |
(or (message-field-value "Reply-to") |
3040 |
(message-field-value "From") |
(message-field-value "From") |
3041 |
(message-make-from))) |
(message-make-from)))))) |
|
hard-newline))) |
|
3042 |
|
|
3043 |
(defun message-elide-region (b e) |
(defun message-elide-region (b e) |
3044 |
"Elide the text in the region. |
"Elide the text in the region. |
3173 |
;; Delete blank lines at the end of the buffer. |
;; Delete blank lines at the end of the buffer. |
3174 |
(goto-char (point-max)) |
(goto-char (point-max)) |
3175 |
(unless (eolp) |
(unless (eolp) |
3176 |
(insert hard-newline)) |
(insert "\n")) |
3177 |
(while (and (zerop (forward-line -1)) |
(while (and (zerop (forward-line -1)) |
3178 |
(looking-at "$")) |
(looking-at "$")) |
3179 |
(message-delete-line)) |
(message-delete-line)) |
3211 |
(funcall message-cite-function)) |
(funcall message-cite-function)) |
3212 |
(message-exchange-point-and-mark) |
(message-exchange-point-and-mark) |
3213 |
(unless (bolp) |
(unless (bolp) |
3214 |
(insert hard-newline)) |
(insert ?\n)) |
3215 |
(unless modified |
(unless modified |
3216 |
(setq message-checksum (message-checksum)))))) |
(setq message-checksum (message-checksum)))))) |
3217 |
|
|
3269 |
(delete-region (point) end) |
(delete-region (point) end) |
3270 |
(unless (search-backward "\n\n" start t) |
(unless (search-backward "\n\n" start t) |
3271 |
;; Insert a blank line if it is peeled off. |
;; Insert a blank line if it is peeled off. |
3272 |
(insert hard-newline))) |
(insert "\n"))) |
3273 |
(goto-char start) |
(goto-char start) |
3274 |
(while functions |
(while functions |
3275 |
(funcall (pop functions))) |
(funcall (pop functions))) |
3276 |
(when message-citation-line-function |
(when message-citation-line-function |
3277 |
(unless (bolp) |
(unless (bolp) |
3278 |
(insert hard-newline)) |
(insert "\n")) |
3279 |
(funcall message-citation-line-function)))) |
(funcall message-citation-line-function)))) |
3280 |
|
|
3281 |
(eval-when-compile (defvar mail-citation-hook)) ;Compiler directive |
(eval-when-compile (defvar mail-citation-hook)) ;Compiler directive |
3311 |
(funcall (pop functions))) |
(funcall (pop functions))) |
3312 |
(when message-citation-line-function |
(when message-citation-line-function |
3313 |
(unless (bolp) |
(unless (bolp) |
3314 |
(insert hard-newline)) |
(insert "\n")) |
3315 |
(funcall message-citation-line-function))))) |
(funcall message-citation-line-function))))) |
3316 |
|
|
3317 |
(defun message-insert-citation-line () |
(defun message-insert-citation-line () |
3318 |
"Insert a simple citation line." |
"Insert a simple citation line." |
3319 |
(when message-reply-headers |
(when message-reply-headers |
3320 |
(insert (mail-header-from message-reply-headers) |
(insert (mail-header-from message-reply-headers) " writes:\n\n"))) |
|
" writes:" hard-newline hard-newline))) |
|
3321 |
|
|
3322 |
(defun message-position-on-field (header &rest afters) |
(defun message-position-on-field (header &rest afters) |
3323 |
(let ((case-fold-search t)) |
(let ((case-fold-search t)) |
3343 |
(when afters |
(when afters |
3344 |
(re-search-forward "^[^ \t]" nil 'move) |
(re-search-forward "^[^ \t]" nil 'move) |
3345 |
(beginning-of-line)) |
(beginning-of-line)) |
3346 |
(insert header ": " hard-newline) |
(insert header ": \n") |
3347 |
(forward-char -1) |
(forward-char -1) |
3348 |
nil)))) |
nil)))) |
3349 |
|
|
3539 |
;; Make sure there's a newline at the end of the message. |
;; Make sure there's a newline at the end of the message. |
3540 |
(goto-char (point-max)) |
(goto-char (point-max)) |
3541 |
(unless (bolp) |
(unless (bolp) |
3542 |
(insert hard-newline)) |
(insert "\n")) |
3543 |
;; Make the hidden headers visible. |
;; Make the hidden headers visible. |
3544 |
(let ((points (message-text-with-property 'message-hidden))) |
(let ((points (message-text-with-property 'message-hidden))) |
3545 |
(when points |
(when points |
3644 |
(goto-char (point-min)) |
(goto-char (point-min)) |
3645 |
(re-search-forward |
(re-search-forward |
3646 |
(concat "^" (regexp-quote mail-header-separator) "\n")) |
(concat "^" (regexp-quote mail-header-separator) "\n")) |
3647 |
(replace-match hard-newline) |
(replace-match "\n") |
3648 |
(run-hooks 'message-send-mail-hook) |
(run-hooks 'message-send-mail-hook) |
3649 |
(let ((p (goto-char (point-min))) |
(let ((p (goto-char (point-min))) |
3650 |
(tembuf (message-generate-new-buffer-clone-locals " message temp")) |
(tembuf (message-generate-new-buffer-clone-locals " message temp")) |
3686 |
(message-remove-header "Message-ID") |
(message-remove-header "Message-ID") |
3687 |
(message-remove-header "Lines") |
(message-remove-header "Lines") |
3688 |
(goto-char (point-max)) |
(goto-char (point-max)) |
3689 |
(insert "Mime-Version: 1.0" hard-newline) |
(insert "Mime-Version: 1.0\n") |
3690 |
(setq header (buffer-string))) |
(setq header (buffer-string))) |
3691 |
(goto-char (point-max)) |
(goto-char (point-max)) |
3692 |
(insert (format "Content-Type: message/partial; id=\"%s\"; number=%d; total=%d" |
(insert (format "Content-Type: message/partial; id=\"%s\"; number=%d; total=%d\n\n" |
3693 |
id n total) |
id n total)) |
|
hard-newline hard-newline) |
|
3694 |
(forward-char -1) |
(forward-char -1) |
3695 |
(let ((mail-header-separator "")) |
(let ((mail-header-separator "")) |
3696 |
(when (memq 'Message-ID message-required-mail-headers) |
(when (memq 'Message-ID message-required-mail-headers) |
3697 |
(insert "Message-ID: " (message-make-message-id) hard-newline)) |
(insert "Message-ID: " (message-make-message-id) "\n")) |
3698 |
(when (memq 'Lines message-required-mail-headers) |
(when (memq 'Lines message-required-mail-headers) |
3699 |
(insert "Lines: " (message-make-lines) hard-newline)) |
(insert "Lines: " (message-make-lines) "\n")) |
3700 |
(message-goto-subject) |
(message-goto-subject) |
3701 |
(end-of-line) |
(end-of-line) |
3702 |
(insert (format " (%d/%d)" n total)) |
(insert (format " (%d/%d)" n total)) |
3761 |
(goto-char (point-max)) |
(goto-char (point-max)) |
3762 |
;; require one newline at the end. |
;; require one newline at the end. |
3763 |
(or (= (preceding-char) ?\n) |
(or (= (preceding-char) ?\n) |
3764 |
(insert hard-newline)) |
(insert ?\n)) |
3765 |
(message-cleanup-headers) |
(message-cleanup-headers) |
3766 |
;; FIXME: we're inserting the courtesy copy after encoding. |
;; FIXME: we're inserting the courtesy copy after encoding. |
3767 |
;; This is wrong if the courtesy copy string contains |
;; This is wrong if the courtesy copy string contains |
3837 |
(goto-char (point-min)) |
(goto-char (point-min)) |
3838 |
(re-search-forward |
(re-search-forward |
3839 |
(concat "^" (regexp-quote mail-header-separator) "\n")) |
(concat "^" (regexp-quote mail-header-separator) "\n")) |
3840 |
(replace-match hard-newline) |
(replace-match "\n") |
3841 |
(backward-char 1) |
(backward-char 1) |
3842 |
(setq delimline (point-marker)) |
(setq delimline (point-marker)) |
3843 |
(run-hooks 'message-send-mail-hook) |
(run-hooks 'message-send-mail-hook) |
3899 |
(goto-char (point-min)) |
(goto-char (point-min)) |
3900 |
(re-search-forward |
(re-search-forward |
3901 |
(concat "^" (regexp-quote mail-header-separator) "\n")) |
(concat "^" (regexp-quote mail-header-separator) "\n")) |
3902 |
(replace-match hard-newline) |
(replace-match "\n") |
3903 |
(run-hooks 'message-send-mail-hook) |
(run-hooks 'message-send-mail-hook) |
3904 |
;; send the message |
;; send the message |
3905 |
(case |
(case |
4067 |
(goto-char (point-max)) |
(goto-char (point-max)) |
4068 |
;; require one newline at the end. |
;; require one newline at the end. |
4069 |
(or (= (preceding-char) ?\n) |
(or (= (preceding-char) ?\n) |
4070 |
(insert hard-newline)) |
(insert ?\n)) |
4071 |
(let ((case-fold-search t)) |
(let ((case-fold-search t)) |
4072 |
;; Remove the delimiter. |
;; Remove the delimiter. |
4073 |
(goto-char (point-min)) |
(goto-char (point-min)) |
4074 |
(re-search-forward |
(re-search-forward |
4075 |
(concat "^" (regexp-quote mail-header-separator) "\n")) |
(concat "^" (regexp-quote mail-header-separator) "\n")) |
4076 |
(replace-match hard-newline) |
(replace-match "\n") |
4077 |
(backward-char 1)) |
(backward-char 1)) |
4078 |
(run-hooks 'message-send-news-hook) |
(run-hooks 'message-send-news-hook) |
4079 |
(gnus-open-server method) |
(gnus-open-server method) |
4200 |
(message-tokenize-header |
(message-tokenize-header |
4201 |
newsgroups))))))))) |
newsgroups))))))))) |
4202 |
(goto-char (point-min)) |
(goto-char (point-min)) |
4203 |
(insert "Followup-To: " to hard-newline)) |
(insert "Followup-To: " to "\n")) |
4204 |
t)) |
t)) |
4205 |
;; Check "Shoot me". |
;; Check "Shoot me". |
4206 |
(message-check 'shoot |
(message-check 'shoot |
5099 |
;; We check whether the value was ended by a |
;; We check whether the value was ended by a |
5100 |
;; newline. If now, we insert one. |
;; newline. If now, we insert one. |
5101 |
(unless (bolp) |
(unless (bolp) |
5102 |
(insert hard-newline)) |
(insert "\n")) |
5103 |
(forward-line -1))) |
(forward-line -1))) |
5104 |
;; The value of this header was empty, so we clear |
;; The value of this header was empty, so we clear |
5105 |
;; totally and insert the new value. |
;; totally and insert the new value. |
5139 |
(beginning-of-line)) |
(beginning-of-line)) |
5140 |
(when (or (message-news-p) |
(when (or (message-news-p) |
5141 |
(string-match "@.+\\.." secure-sender)) |
(string-match "@.+\\.." secure-sender)) |
5142 |
(insert "Sender: " secure-sender hard-newline)))) |
(insert "Sender: " secure-sender "\n")))) |
5143 |
;; Check for IDNA |
;; Check for IDNA |
5144 |
(message-idna-to-ascii-rhs)))) |
(message-idna-to-ascii-rhs)))) |
5145 |
|
|
5151 |
(message-narrow-to-headers) |
(message-narrow-to-headers) |
5152 |
(when (setq newsgroups (message-fetch-field "newsgroups")) |
(when (setq newsgroups (message-fetch-field "newsgroups")) |
5153 |
(goto-char (point-max)) |
(goto-char (point-max)) |
5154 |
(insert "Posted-To: " newsgroups hard-newline))) |
(insert "Posted-To: " newsgroups "\n"))) |
5155 |
(forward-line 1) |
(forward-line 1) |
5156 |
(when message-courtesy-message |
(when message-courtesy-message |
5157 |
(cond |
(cond |
5170 |
(insert (capitalize (symbol-name header)) |
(insert (capitalize (symbol-name header)) |
5171 |
": " |
": " |
5172 |
(if (consp value) (car value) value) |
(if (consp value) (car value) value) |
5173 |
hard-newline) |
"\n") |
5174 |
(narrow-to-region (point-min) (1- (point-max))) |
(narrow-to-region (point-min) (1- (point-max))) |
5175 |
(let (quoted last) |
(let (quoted last) |
5176 |
(goto-char (point-min)) |
(goto-char (point-min)) |
5184 |
(progn |
(progn |
5185 |
(save-excursion |
(save-excursion |
5186 |
(goto-char last) |
(goto-char last) |
5187 |
(insert hard-newline "\t")) |
(insert "\n\t")) |
5188 |
(setq last (1+ (point)))) |
(setq last (1+ (point)))) |
5189 |
(setq last (1+ (point))))) |
(setq last (1+ (point))))) |
5190 |
(setq quoted (not quoted))) |
(setq quoted (not quoted))) |
5210 |
(insert (capitalize (symbol-name header)) |
(insert (capitalize (symbol-name header)) |
5211 |
": " |
": " |
5212 |
(if (consp value) (car value) value) |
(if (consp value) (car value) value) |
5213 |
hard-newline) |
"\n") |
5214 |
(save-restriction |
(save-restriction |
5215 |
(narrow-to-region begin (point)) |
(narrow-to-region begin (point)) |
5216 |
(fill-region-as-paragraph begin (point)) |
(fill-region-as-paragraph begin (point)) |
5279 |
(let ((refstring (mapconcat #'identity refs " "))) |
(let ((refstring (mapconcat #'identity refs " "))) |
5280 |
(if (and message-this-is-news message-cater-to-broken-inn) |
(if (and message-this-is-news message-cater-to-broken-inn) |
5281 |
(insert (capitalize (symbol-name header)) ": " |
(insert (capitalize (symbol-name header)) ": " |
5282 |
refstring hard-newline) |
refstring "\n") |
5283 |
(message-fill-header header refstring))))) |
(message-fill-header header refstring))))) |
5284 |
|
|
5285 |
(defun message-position-point () |
(defun message-position-point () |
5508 |
(delete-region (point) (progn (forward-line -1) (point))) |
(delete-region (point) (progn (forward-line -1) (point))) |
5509 |
(when message-default-headers |
(when message-default-headers |
5510 |
(insert message-default-headers) |
(insert message-default-headers) |
5511 |
(or (bolp) (insert hard-newline))) |
(or (bolp) (insert ?\n))) |
5512 |
(put-text-property |
(put-text-property |
5513 |
(point) |
(point) |
5514 |
(progn |
(progn |
5515 |
(insert mail-header-separator hard-newline) |
(insert mail-header-separator "\n") |
5516 |
(1- (point))) |
(1- (point))) |
5517 |
'read-only nil) |
'read-only nil) |
5518 |
(forward-line -1) |
(forward-line -1) |
5519 |
(when (message-news-p) |
(when (message-news-p) |
5520 |
(when message-default-news-headers |
(when message-default-news-headers |
5521 |
(insert message-default-news-headers) |
(insert message-default-news-headers) |
5522 |
(or (bolp) (insert hard-newline))) |
(or (bolp) (insert ?\n))) |
5523 |
(when message-generate-headers-first |
(when message-generate-headers-first |
5524 |
(message-generate-headers |
(message-generate-headers |
5525 |
(message-headers-to-generate |
(message-headers-to-generate |
5530 |
(when (message-mail-p) |
(when (message-mail-p) |
5531 |
(when message-default-mail-headers |
(when message-default-mail-headers |
5532 |
(insert message-default-mail-headers) |
(insert message-default-mail-headers) |
5533 |
(or (bolp) (insert hard-newline))) |
(or (bolp) (insert ?\n))) |
5534 |
(save-restriction |
(save-restriction |
5535 |
(message-narrow-to-headers) |
(message-narrow-to-headers) |
5536 |
(if message-alternative-emails |
(if message-alternative-emails |
6012 |
(message-news) |
(message-news) |
6013 |
(setq buf (set-buffer (get-buffer-create " *message cancel*")))) |
(setq buf (set-buffer (get-buffer-create " *message cancel*")))) |
6014 |
(erase-buffer) |
(erase-buffer) |
6015 |
(insert "Newsgroups: " newsgroups hard-newline |
(insert "Newsgroups: " newsgroups "\n" |
6016 |
"From: " from hard-newline |
"From: " from "\n" |
6017 |
"Subject: cmsg cancel " message-id hard-newline |
"Subject: cmsg cancel " message-id "\n" |
6018 |
"Control: cancel " message-id hard-newline |
"Control: cancel " message-id "\n" |
6019 |
(if distribution |
(if distribution |
6020 |
(concat "Distribution: " distribution hard-newline) |
(concat "Distribution: " distribution "\n") |
6021 |
"") |
"") |
6022 |
mail-header-separator hard-newline |
mail-header-separator "\n" |
6023 |
message-cancel-message) |
message-cancel-message) |
6024 |
(run-hooks 'message-cancel-hook) |
(run-hooks 'message-cancel-hook) |
6025 |
(unless arg |
(unless arg |
6208 |
|
|
6209 |
(defun message-forward-make-body-plain (forward-buffer) |
(defun message-forward-make-body-plain (forward-buffer) |
6210 |
(insert |
(insert |
6211 |
hard-newline |
"\n-------------------- Start of forwarded message --------------------\n") |
|
"-------------------- Start of forwarded message --------------------" |
|
|
hard-newline) |
|
6212 |
(let ((b (point)) e) |
(let ((b (point)) e) |
6213 |
(insert |
(insert |
6214 |
(with-temp-buffer |
(with-temp-buffer |
6224 |
(buffer-string))) |
(buffer-string))) |
6225 |
(setq e (point)) |
(setq e (point)) |
6226 |
(insert |
(insert |
6227 |
hard-newline |
"\n-------------------- End of forwarded message --------------------\n") |
|
"-------------------- End of forwarded message --------------------" |
|
|
hard-newline) |
|
6228 |
(when message-forward-ignored-headers |
(when message-forward-ignored-headers |
6229 |
(save-restriction |
(save-restriction |
6230 |
(narrow-to-region b e) |
(narrow-to-region b e) |
6234 |
(message-remove-header message-forward-ignored-headers t))))) |
(message-remove-header message-forward-ignored-headers t))))) |
6235 |
|
|
6236 |
(defun message-forward-make-body-mime (forward-buffer) |
(defun message-forward-make-body-mime (forward-buffer) |
6237 |
(insert |
(insert "\n\n<#part type=message/rfc822 disposition=inline raw=t>\n") |
|
hard-newline hard-newline |
|
|
"<#part type=message/rfc822 disposition=inline raw=t>" |
|
|
hard-newline) |
|
6238 |
(let ((b (point)) e) |
(let ((b (point)) e) |
6239 |
(save-restriction |
(save-restriction |
6240 |
(narrow-to-region (point) (point)) |
(narrow-to-region (point) (point)) |
6244 |
(replace-match "X-From-Line: ")) |
(replace-match "X-From-Line: ")) |
6245 |
(goto-char (point-max))) |
(goto-char (point-max))) |
6246 |
(setq e (point)) |
(setq e (point)) |
6247 |
(insert "<#/part>" hard-newline))) |
(insert "<#/part>\n"))) |
6248 |
|
|
6249 |
(defun message-forward-make-body-mml (forward-buffer) |
(defun message-forward-make-body-mml (forward-buffer) |
6250 |
(insert |
(insert "\n\n<#mml type=message/rfc822 disposition=inline>\n") |
|
hard-newline hard-newline |
|
|
"<#mml type=message/rfc822 disposition=inline>" |
|
|
hard-newline) |
|
6251 |
(let ((b (point)) e) |
(let ((b (point)) e) |
6252 |
(if (not message-forward-decoded-p) |
(if (not message-forward-decoded-p) |
6253 |
(insert |
(insert |
6270 |
(replace-match "X-From-Line: ")) |
(replace-match "X-From-Line: ")) |
6271 |
(goto-char (point-max)))) |
(goto-char (point-max)))) |
6272 |
(setq e (point)) |
(setq e (point)) |
6273 |
(insert "<#/mml>" hard-newline) |
(insert "<#/mml>\n") |
6274 |
(when (and (not message-forward-decoded-p) |
(when (and (not message-forward-decoded-p) |
6275 |
message-forward-ignored-headers) |
message-forward-ignored-headers) |
6276 |
(save-restriction |
(save-restriction |
6282 |
|
|
6283 |
(defun message-forward-make-body-digest-plain (forward-buffer) |
(defun message-forward-make-body-digest-plain (forward-buffer) |
6284 |
(insert |
(insert |
6285 |
hard-newline |
"\n-------------------- Start of forwarded message --------------------\n") |
|
"-------------------- Start of forwarded message --------------------" |
|
|
hard-newline) |
|
6286 |
(let ((b (point)) e) |
(let ((b (point)) e) |
6287 |
(mml-insert-buffer forward-buffer) |
(mml-insert-buffer forward-buffer) |
6288 |
(setq e (point)) |
(setq e (point)) |
6289 |
(insert |
(insert |
6290 |
hard-newline |
"\n-------------------- End of forwarded message --------------------\n"))) |
|
"-------------------- End of forwarded message --------------------" |
|
|
hard-newline))) |
|
6291 |
|
|
6292 |
(defun message-forward-make-body-digest-mime (forward-buffer) |
(defun message-forward-make-body-digest-mime (forward-buffer) |
6293 |
(insert hard-newline "<#multipart type=digest>" hard-newline) |
(insert "\n<#multipart type=digest>\n") |
6294 |
(let ((b (point)) e) |
(let ((b (point)) e) |
6295 |
(insert-buffer-substring forward-buffer) |
(insert-buffer-substring forward-buffer) |
6296 |
(setq e (point)) |
(setq e (point)) |
6297 |
(insert "<#/multipart>" hard-newline) |
(insert "<#/multipart>\n") |
6298 |
(save-restriction |
(save-restriction |
6299 |
(narrow-to-region b e) |
(narrow-to-region b e) |
6300 |
(goto-char b) |
(goto-char b) |
6799 |
(message-narrow-to-headers-or-head) |
(message-narrow-to-headers-or-head) |
6800 |
(message-remove-header "Mime-Version") |
(message-remove-header "Mime-Version") |
6801 |
(goto-char (point-max)) |
(goto-char (point-max)) |
6802 |
(insert "MIME-Version: 1.0" hard-newline) |
(insert "MIME-Version: 1.0\n") |
6803 |
(when lines |
(when lines |
6804 |
(insert lines)) |
(insert lines)) |
6805 |
(setq content-type-p |
(setq content-type-p |
6819 |
;; For unknown reason, MIME-Version doesn't exist. |
;; For unknown reason, MIME-Version doesn't exist. |
6820 |
(when (re-search-forward "^MIME-Version:" nil t) |
(when (re-search-forward "^MIME-Version:" nil t) |
6821 |
(forward-line 1) |
(forward-line 1) |
6822 |
(insert "Content-Type: text/plain; charset=us-ascii" hard-newline)))))) |
(insert "Content-Type: text/plain; charset=us-ascii\n")))))) |
6823 |
|
|
6824 |
(defun message-read-from-minibuffer (prompt &optional initial-contents) |
(defun message-read-from-minibuffer (prompt &optional initial-contents) |
6825 |
"Read from the minibuffer while providing abbrev expansion." |
"Read from the minibuffer while providing abbrev expansion." |
6848 |
(pop emails)) |
(pop emails)) |
6849 |
(unless (or (not email) (equal email user-mail-address)) |
(unless (or (not email) (equal email user-mail-address)) |
6850 |
(goto-char (point-max)) |
(goto-char (point-max)) |
6851 |
(insert "From: " email hard-newline)))) |
(insert "From: " email "\n")))) |
6852 |
|
|
6853 |
(defun message-options-get (symbol) |
(defun message-options-get (symbol) |
6854 |
(cdr (assq symbol message-options))) |
(cdr (assq symbol message-options))) |