* wl-draft.el (wl-draft-save, wl-draft-buffer-change-number):
authoryoichi <yoichi>
Thu, 26 Jan 2006 03:59:17 +0000 (03:59 +0000)
committeryoichi <yoichi>
Thu, 26 Jan 2006 03:59:17 +0000 (03:59 +0000)
Avoid error when the buffer name is already used.

wl/ChangeLog
wl/wl-draft.el

index 7023bd4..fa38cf9 100644 (file)
@@ -1,3 +1,8 @@
+2006-01-26  Yoichi NAKAYAMA  <yoichi@alcoholic.local-net>
+
+       * wl-draft.el (wl-draft-save, wl-draft-buffer-change-number):
+       Avoid error when the buffer name is already used.
+
 2006-01-23  Yoichi NAKAYAMA  <yoichi@geiin.org>
 
        * wl-vars.el (wl-message-buffer-prefetch-folder-type-list): Follow
index dbdfa3d..855346a 100644 (file)
@@ -1452,7 +1452,7 @@ If KILL-WHEN-DONE is non-nil, current draft buffer is killed"
          (elmo-folder-check (wl-draft-get-folder))
          (elmo-folder-commit (wl-draft-get-folder))
          (setq wl-draft-buffer-message-number next-number)
-         (rename-buffer (format "%s/%d" wl-draft-folder next-number))
+         (rename-buffer (format "%s/%d" wl-draft-folder next-number) t)
          (setq buffer-file-name (buffer-name))
          (set-buffer-modified-p nil)
          (wl-draft-config-info-operation wl-draft-buffer-message-number 'save)
@@ -2632,7 +2632,7 @@ been implemented yet.  Partial support for SWITCH-FUNCTION now supported."
 (defun wl-draft-buffer-change-number (old-number new-number)
   (when (eq wl-draft-buffer-message-number old-number)
     (setq wl-draft-buffer-message-number new-number)
-    (rename-buffer (format "%s/%d" wl-draft-folder new-number))
+    (rename-buffer (format "%s/%d" wl-draft-folder new-number) t)
     (setq buffer-file-name (buffer-name))
     (set-buffer-modified-p nil)))