(wl-draft-create-buffer): Bind
authorhmurata <hmurata>
Fri, 12 Nov 2004 15:58:09 +0000 (15:58 +0000)
committerhmurata <hmurata>
Fri, 12 Nov 2004 15:58:09 +0000 (15:58 +0000)
`change-major-mode-hook' after current buffer is changed.

wl/ChangeLog
wl/wl-draft.el

index 4139bc6..5ae69ac 100644 (file)
@@ -1,5 +1,8 @@
 2004-11-12  Hiroya Murata  <lapis-lazuli@pop06.odn.ne.jp>
 
+       * 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
index 4c26bc3..543fb62 100644 (file)
@@ -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)