/[emacs]/emacs/lisp/gnus/message.el
ViewVC logotype

Diff of /emacs/lisp/gnus/message.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.97 by cyd, Thu Nov 17 16:31:22 2005 UTC revision 1.98 by cyd, Sun Nov 20 03:31:11 2005 UTC
# Line 141  mailbox format." Line 141  mailbox format."
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.
# Line 343  few false positives here." Line 339  few false positives here."
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
# Line 353  few false positives here." Line 347  few false positives here."
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"
# Line 426  for `message-cross-post-insert-note'." Line 418  for `message-cross-post-insert-note'."
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")
# Line 587  Done before generating the new subject o Line 578  Done before generating the new subject o
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")
# Line 1744  see `message-narrow-to-headers-or-head'. Line 1734  see `message-narrow-to-headers-or-head'.
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)
# Line 1851  Leading \"Re: \" is not stripped by this Line 1841  Leading \"Re: \" is not stripped by this
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.
# Line 1935  With prefix-argument just set Follow-Up, Line 1925  With prefix-argument just set Follow-Up,
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
# Line 1967  been made to before the user asked for a Line 1957  been made to before the user asked for a
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.
# Line 2028  With prefix-argument just set Follow-Up, Line 2018  With prefix-argument just set Follow-Up,
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
# Line 2793  or in the synonym headers, defined by `m Line 2783  or in the synonym headers, defined by `m
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."
# Line 2823  or in the synonym headers, defined by `m Line 2813  or in the synonym headers, defined by `m
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)
# Line 2842  or in the synonym headers, defined by `m Line 2832  or in the synonym headers, defined by `m
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.
# Line 2984  Prefix arg means justify as well." Line 2974  Prefix arg means justify as well."
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."
# Line 3002  Prefix arg means justify as well." Line 2992  Prefix arg means justify as well."
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."
# Line 3012  Prefix arg means justify as well." Line 3002  Prefix arg means justify as well."
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.
# Line 3034  and `low'." Line 3024  and `low'."
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.
# Line 3045  Note that this should not be used in new Line 3035  Note that this should not be used in new
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.
# Line 3184  However, if `message-yank-prefix' is non Line 3173  However, if `message-yank-prefix' is non
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))
# Line 3222  prefix, and don't delete any headers." Line 3211  prefix, and don't delete any headers."
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    
# Line 3280  prefix, and don't delete any headers." Line 3269  prefix, and don't delete any headers."
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
# Line 3322  prefix, and don't delete any headers." Line 3311  prefix, and don't delete any headers."
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))
# Line 3355  prefix, and don't delete any headers." Line 3343  prefix, and don't delete any headers."
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    
# Line 3551  It should typically alter the sending me Line 3539  It should typically alter the sending me
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
# Line 3656  It should typically alter the sending me Line 3644  It should typically alter the sending me
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"))
# Line 3698  It should typically alter the sending me Line 3686  It should typically alter the sending me
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))
# Line 3774  It should typically alter the sending me Line 3761  It should typically alter the sending me
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
# Line 3850  If you always want Gnus to send messages Line 3837  If you always want Gnus to send messages
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)
# Line 3912  to find out how to use this." Line 3899  to find out how to use this."
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
# Line 4080  Otherwise, generate and save a value for Line 4067  Otherwise, generate and save a value for
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)
# Line 4213  Otherwise, generate and save a value for Line 4200  Otherwise, generate and save a value for
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
# Line 5112  Headers already prepared in the buffer a Line 5099  Headers already prepared in the buffer a
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.
# Line 5152  Headers already prepared in the buffer a Line 5139  Headers already prepared in the buffer a
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    
# Line 5164  Headers already prepared in the buffer a Line 5151  Headers already prepared in the buffer a
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
# Line 5183  Headers already prepared in the buffer a Line 5170  Headers already prepared in the buffer a
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))
# Line 5197  Headers already prepared in the buffer a Line 5184  Headers already prepared in the buffer a
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)))
# Line 5223  If the current line has `message-yank-pr Line 5210  If the current line has `message-yank-pr
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))
# Line 5292  than 988 characters long, and if they ar Line 5279  than 988 characters long, and if they ar
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 ()
# Line 5521  are not included." Line 5508  are not included."
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
# Line 5543  are not included." Line 5530  are not included."
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
# Line 6025  If ARG, allow editing of the cancellatio Line 6012  If ARG, allow editing of the cancellatio
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
# Line 6221  Optional DIGEST will use digest to forwa Line 6208  Optional DIGEST will use digest to forwa
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
# Line 6239  Optional DIGEST will use digest to forwa Line 6224  Optional DIGEST will use digest to forwa
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)
# Line 6251  Optional DIGEST will use digest to forwa Line 6234  Optional DIGEST will use digest to forwa
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))
# Line 6264  Optional DIGEST will use digest to forwa Line 6244  Optional DIGEST will use digest to forwa
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
# Line 6293  Optional DIGEST will use digest to forwa Line 6270  Optional DIGEST will use digest to forwa
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
# Line 6305  Optional DIGEST will use digest to forwa Line 6282  Optional DIGEST will use digest to forwa
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)
# Line 6826  regexp VARSTR." Line 6799  regexp VARSTR."
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
# Line 6846  regexp VARSTR." Line 6819  regexp VARSTR."
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."
# Line 6875  regexp VARSTR." Line 6848  regexp VARSTR."
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)))

Legend:
Removed from v.1.97  
changed lines
  Added in v.1.98

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26