From 86cd06bbd3307dd7ed5e3a34acd654b22f820796 Mon Sep 17 00:00:00 2001 From: okada Date: Thu, 24 Jan 2002 01:03:28 +0000 Subject: [PATCH] * wl-draft.el (wl-draft-prepare-edit): Use `wl-draft-save'. --- wl/ChangeLog | 4 ++++ wl/wl-draft.el | 12 +++++------- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/wl/ChangeLog b/wl/ChangeLog index 2f2263d..9e2c858 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,5 +1,9 @@ 2002-01-24 Kenichi OKADA + * wl-draft.el (wl-draft-prepare-edit): Use `wl-draft-save'. + +2002-01-24 Kenichi OKADA + * wl-draft.el (wl-draft-insert-mail-header-separator): Use `delete-backward-char' (wl-draft-prepare-edit): Check major-mode. diff --git a/wl/wl-draft.el b/wl/wl-draft.el index bd24cb3..53960bc 100644 --- a/wl/wl-draft.el +++ b/wl/wl-draft.el @@ -1414,7 +1414,9 @@ If KILL-WHEN-DONE is non-nil, current draft buffer is killed" (wl-draft-decode-body content-type content-transfer-encoding)) (wl-draft-insert-mail-header-separator) - (wl-draft-prepare-edit (interactive-p)) + (wl-draft-prepare-edit) + (if (interactive-p) + (run-hooks 'wl-mail-setup-hook)) (goto-char (point-min)) (wl-user-agent-compose-internal) ;; user-agent @@ -1507,18 +1509,14 @@ If KILL-WHEN-DONE is non-nil, current draft buffer is killed" ))) (setq halist (cdr halist))))) -(defun wl-draft-prepare-edit (&optional hook) +(defun wl-draft-prepare-edit () (unless (eq major-mode 'wl-draft-mode) (error "wl-draft-create-header must be use in wl-draft-mode.")) (let (change-major-mode-hook) (wl-draft-editor-mode) (wl-draft-overload-functions) (wl-highlight-headers 'for-draft) - (if hook (run-hooks 'wl-mail-setup-hook)) - (as-binary-output-file - (write-region (point-min)(point-max) wl-draft-buffer-file-name - nil t)))) - + (wl-draft-save))) (defun wl-draft-decode-header () (save-excursion -- 1.7.10.4