From 3daf4028af08e7054dff6d7d920b2aa4a76a0963 Mon Sep 17 00:00:00 2001 From: hmurata Date: Fri, 12 Nov 2004 15:58:09 +0000 Subject: [PATCH] (wl-draft-create-buffer): Bind `change-major-mode-hook' after current buffer is changed. --- wl/ChangeLog | 3 +++ wl/wl-draft.el | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/wl/ChangeLog b/wl/ChangeLog index 4139bc6..5ae69ac 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,5 +1,8 @@ 2004-11-12 Hiroya Murata + * wl-draft.el (wl-draft-create-buffer): Bind + `change-major-mode-hook' after current buffer is changed. + * wl-summary.el (wl-summary-buffer-detach): New function. (wl-summary-buffer-set-folder): Call it. (wl-summary-mode): Add `wl-summary-buffer-detach' to diff --git a/wl/wl-draft.el b/wl/wl-draft.el index 4c26bc3..543fb62 100644 --- a/wl/wl-draft.el +++ b/wl/wl-draft.el @@ -1705,8 +1705,7 @@ If KILL-WHEN-DONE is non-nil, current draft buffer is killed" (eq this-command 'wl-summary-forward) (eq this-command 'wl-summary-target-mark-forward) (eq this-command 'wl-summary-target-mark-reply-with-citation))) - (buffer (generate-new-buffer "*draft*")) ; Just for initial name. - change-major-mode-hook) + (buffer (generate-new-buffer "*draft*"))) ; Just for initial name. (set-buffer buffer) ;; switch-buffer according to draft buffer style. (if wl-draft-use-frame @@ -1742,7 +1741,8 @@ If KILL-WHEN-DONE is non-nil, current draft buffer is killed" (funcall wl-draft-buffer-style buffer) (error "Invalid value for wl-draft-buffer-style")))))) (auto-save-mode -1) - (wl-draft-mode) + (let (change-major-mode-hook) + (wl-draft-mode)) (set-buffer-multibyte t) ; draft buffer is always multibyte. (make-local-variable 'truncate-partial-width-windows) (setq truncate-partial-width-windows nil) -- 1.7.10.4