(defvar message-draft-coding-system
(cond
((not (fboundp 'coding-system-p)) nil)
- ((coding-system-p 'emacs-mule) 'emacs-mule)
+ ((coding-system-p 'emacs-mule)
+ (if (string-match "nt" system-configuration)
+ 'emacs-mule-dos 'emacs-mule))
((memq 'escape-quoted (mm-get-coding-system-list)) 'escape-quoted)
((coding-system-p 'no-conversion) 'no-conversion)
(t nil))
["Newline and Reformat" message-newline-and-reformat t]
["Rename buffer" message-rename-buffer t]
["Spellcheck" ispell-message t]
- ["Attach file as MIME" message-mime-attach-file t]
+ ["Attach file as MIME" mml-attach-file t]
"----"
["Send Message" message-send-and-exit t]
["Abort Message" message-dont-send t]
"Major mode for editing mail and news to be sent.
Like Text Mode but with these additional commands:
C-c C-s message-send (send the message) C-c C-c message-send-and-exit
+C-c C-d Pospone sending the message C-c C-k Kill the message
C-c C-f move to a header field (and create it if there isn't):
C-c C-f C-t move to To C-c C-f C-s move to Subject
C-c C-f C-c move to Cc C-c C-f C-b move to Bcc
(case-fold-search nil)
(news (message-news-p))
(mailbuf (current-buffer)))
- (message-encode-message-body)
(save-restriction
(message-narrow-to-headers)
;; Insert some headers.
(let ((message-deletable-headers
(if news nil message-deletable-headers)))
(message-generate-headers message-required-mail-headers))
- (mail-encode-encoded-word-buffer)
;; Let the user do all of the above.
(run-hooks 'message-header-hook))
(unwind-protect
(set-buffer mailbuf)
(buffer-string))))
;; Remove some headers.
+ (message-encode-message-body)
(save-restriction
(message-narrow-to-headers)
+ ;; We (re)generate the Lines header.
+ (when (memq 'Lines message-required-mail-headers)
+ (message-generate-headers '(Lines)))
;; Remove some headers.
- (message-remove-header message-ignored-mail-headers t))
+ (message-remove-header message-ignored-mail-headers t)
+ (mail-encode-encoded-word-buffer))
(goto-char (point-max))
;; require one newline at the end.
(or (= (preceding-char) ?\n)
result)
(if (not (message-check-news-body-syntax))
nil
- (message-encode-message-body)
(save-restriction
(message-narrow-to-headers)
;; Insert some headers.
(message-generate-headers message-required-news-headers)
- (let ((mail-parse-charset message-posting-charset))
- (mail-encode-encoded-word-buffer))
;; Let the user do all of the above.
(run-hooks 'message-header-hook))
(message-cleanup-headers)
"%s" (save-excursion
(set-buffer messbuf)
(buffer-string))))
+ (message-encode-message-body)
;; Remove some headers.
(save-restriction
(message-narrow-to-headers)
+ ;; We (re)generate the Lines header.
+ (when (memq 'Lines message-required-mail-headers)
+ (message-generate-headers '(Lines)))
;; Remove some headers.
- (message-remove-header message-ignored-news-headers t))
+ (message-remove-header message-ignored-news-headers t)
+ (let ((mail-parse-charset message-posting-charset))
+ (mail-encode-encoded-word-buffer)))
(goto-char (point-max))
;; require one newline at the end.
(or (= (preceding-char) ?\n)
;; colon, if there is none.
(if (/= (char-after) ? ) (insert " ") (forward-char 1))
;; Find out whether the header is empty...
- (looking-at "[ \t]*$")))
+ (looking-at "[ \t]*\n[^ \t]")))
;; So we find out what value we should insert.
(setq value
(cond
(when (looking-at "From ")
(replace-match "X-From-Line: "))
;; Send it.
- (let (message-required-mail-headers)
+ (let ((message-inhibit-body-encoding t)
+ message-required-mail-headers)
(message-send-mail))
(kill-buffer (current-buffer)))
(message "Resending message to %s...done" address)))
;;; MIME functions
;;;
-(defvar messgage-inhibit-body-encoding nil)
+(defvar message-inhibit-body-encoding nil)
(defun message-encode-message-body ()
- (unless messgage-inhibit-body-encoding
+ (unless message-inhibit-body-encoding
(let ((mail-parse-charset (or mail-parse-charset
message-default-charset
message-posting-charset))