2002-11-09 Yuuichi Teranishi <teranisi@gohome.org>
+ * wl-vars.el (wl-draft-write-file-function): New user option.
+
+ * wl-draft.el (wl-draft-prepare-edit): Use it for
+ local-write-file-hooks.
+ (wl-draft-reedit): Ditto; use exact match for text/plain tag.
+
* wl-draft.el (wl-draft-create-buffer): Cosmetic fix.
(wl-draft-insert-mail-header-separator): Return the body beginning
point.
You can refer its value in `wl-draft-config-alist'.
e.g.
-(setq wl-draft-config-alist
+\(setq wl-draft-config-alist
'(((string-match \".*@domain1$\" wl-draft-parent-folder)
(\"From\" . \"user@domain1\"))
((string-match \".*@domain2$\" wl-draft-parent-folder)
(error "wl-draft-create-header must be use in wl-draft-mode."))
(let (change-major-mode-hook)
(wl-draft-editor-mode)
- (add-hook 'local-write-file-hooks 'wl-draft-save)
+ (when wl-draft-write-file-function
+ (add-hook 'local-write-file-hooks wl-draft-write-file-function))
(wl-draft-overload-functions)
(wl-highlight-headers 'for-draft)
(wl-draft-save)
(wl-draft-decode-message-in-buffer))
(goto-char (wl-draft-insert-mail-header-separator))
;; If the first part is text/plain, the mime-edit tag is useless.
- (if (looking-at "^--\\[\\[text/plain\\]\\]")
+ (if (looking-at "^--\\[\\[text/plain\\]\\]$")
(delete-region (point-at-bol)(1+ (point-at-eol))))
(if (not (string-match (regexp-quote wl-draft-folder)
(buffer-name)))
(goto-char (point-min))
(wl-draft-overload-functions)
(wl-draft-editor-mode)
- (add-hook 'local-write-file-hooks 'wl-draft-save)
+ (when wl-draft-write-file-function
+ (add-hook 'local-write-file-hooks wl-draft-write-file-function))
(wl-highlight-headers 'for-draft)
(run-hooks 'wl-draft-reedit-hook)
(goto-char (point-max))
:type 'file
:group 'wl-draft)
+(defvar wl-draft-write-file-function 'wl-draft-save
+ "Save function for draft message."
+ :type 'function
+ :group 'wl-draft)
+
(defcustom wl-subscribed-mailing-list nil
"*Subscribed mailing list.
You had better set this variable if you set 'wl-insert-mail-followup-to' as t."