From: teranisi Date: Wed, 5 Dec 2001 09:00:08 +0000 (+0000) Subject: * wl-draft.el (wl-draft-write-sendlog): Use `write-region-as-binary'; X-Git-Tag: wl-2_8-root~92 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=7c4c242d5cf095fb9894d23b726b41a0afa4ee1b;p=elisp%2Fwanderlust.git * wl-draft.el (wl-draft-write-sendlog): Use `write-region-as-binary'; Use `with-temp-buffer'. --- diff --git a/wl/ChangeLog b/wl/ChangeLog index a1b0a75..5d4fdeb 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,3 +1,8 @@ +2001-12-05 Yuuichi Teranishi + + * wl-draft.el (wl-draft-write-sendlog): Use `write-region-as-binary'; + Use `with-temp-buffer'. + 2001-12-02 Yuuichi Teranishi * wl-folder.el (wl-folder-get-entity-id): Ignore nemacs (rewrite diff --git a/wl/wl-draft.el b/wl/wl-draft.el index 72b62b9..c30d60f 100644 --- a/wl/wl-draft.el +++ b/wl/wl-draft.el @@ -759,9 +759,8 @@ Reply to author if WITH-ARG is non-nil." (defun wl-draft-write-sendlog (status proto server to id) "Write send log file, if `wl-draft-sendlog' is non-nil." (when wl-draft-sendlog - (save-excursion - (let* ((tmp-buf (get-buffer-create " *wl-draft-sendlog*")) - (filename (expand-file-name wl-draft-sendlog-filename + (with-temp-buffer + (let* ((filename (expand-file-name wl-draft-sendlog-filename elmo-msgdb-dir)) (filesize (nth 7 (file-attributes filename))) (server (if server (concat " server=" server) "")) @@ -779,18 +778,15 @@ Reply to author if WITH-ARG is non-nil." "")) (id (if id (concat " id=" id) "")) (time (wl-sendlog-time))) - (set-buffer tmp-buf) - (erase-buffer) (insert (format "%s proto=%s stat=%s%s%s%s\n" time proto status server to id)) (if (and wl-draft-sendlog-max-size filesize (> filesize wl-draft-sendlog-max-size)) (rename-file filename (concat filename ".old") t)) (if (file-writable-p filename) - (write-region (point-min) (point-max) - filename t 'no-msg) - (message (format "%s is not writable." filename))) - (kill-buffer tmp-buf))))) + (write-region-as-binary (point-min) (point-max) + filename t 'no-msg) + (message (format "%s is not writable." filename))))))) (defun wl-draft-get-header-delimiter (&optional delete) ;; If DELETE is non-nil, replace the header delimiter with a blank line