(require 'mail-abbrevs)
(require 'mailabbrev))
(require 'mime-edit)
+(eval-when-compile (require 'static))
;; Avoid byte-compile warnings.
(eval-when-compile
:group 'message-various
:type 'hook)
-(defcustom message-header-hook '(eword-encode-header)
+(defcustom message-header-hook '((lambda () (eword-encode-header t)))
"Hook run in a message mode buffer narrowed to the headers."
:group 'message-various
:type 'hook)
(defvar message-draft-coding-system
(cond
+ ((boundp 'MULE) '*junet*)
((not (fboundp 'find-coding-system)) nil)
((find-coding-system 'emacs-mule) 'emacs-mule)
((find-coding-system 'escape-quoted) 'escape-quoted)
["Newline and Reformat" message-newline-and-reformat t]
["Rename buffer" message-rename-buffer t]
["Spellcheck" ispell-message t]
+ ["Attach file as MIME" mime-edit-insert-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
"Process Fcc headers in the current buffer."
(let ((case-fold-search t)
(coding-system-for-write 'raw-text)
+ (output-coding-system 'raw-text)
list file)
(save-excursion
(set-buffer (get-buffer-create " *message temp*"))
;; 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
message-auto-save-directory))
(setq buffer-auto-save-file-name (make-auto-save-file-name)))
(clear-visited-file-modtime)
- (setq buffer-file-coding-system message-draft-coding-system)))
+ (static-if (boundp 'MULE)
+ (set-file-coding-system message-draft-coding-system)
+ (setq buffer-file-coding-system message-draft-coding-system))))
(defun message-disassociate-draft ()
"Disassociate the message buffer from the drafts directory."
;;; MIME functions
;;;
-(defvar messgage-inhibit-body-encoding t)
+(defvar message-inhibit-body-encoding t)
(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))