From ae873de7b71c63cd1841b65b496a3f7e576e6651 Mon Sep 17 00:00:00 2001 From: kaoru Date: Fri, 1 Jan 2010 11:38:02 +0000 Subject: [PATCH] * wl-draft.el (wl-draft-generate-clone-buffer, wl-draft-config-exec): Suppress compile warnings; Use `with-current-buffer' instead of `save-excursion' & `set-buffer'. --- wl/ChangeLog | 2 ++ wl/wl-draft.el | 9 +++------ 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/wl/ChangeLog b/wl/ChangeLog index 0024bf6..4ca3e9e 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -18,6 +18,8 @@ * wl-draft.el (wl-draft-add-in-reply-to, wl-draft-delete): Ditto. * wl-draft.el (wl-draft-send-mail-with-smtp, wl-draft-send) (wl-draft-do-fcc): Ditto. + * wl-draft.el (wl-draft-generate-clone-buffer) + (wl-draft-config-exec): Ditto. * wl-score.el (wl-score-insert-help, wl-score-edit-get-header) (wl-score-edit-insert-number): Ditto. diff --git a/wl/wl-draft.el b/wl/wl-draft.el index c8469ff..37d8f63 100644 --- a/wl/wl-draft.el +++ b/wl/wl-draft.el @@ -1927,8 +1927,7 @@ If KILL-WHEN-DONE is non-nil, current draft buffer is killed" (defun wl-draft-generate-clone-buffer (name &optional local-variables) "Generate clone of current buffer named NAME." (let ((editing-buffer (current-buffer))) - (save-excursion - (set-buffer (generate-new-buffer name)) + (with-current-buffer (generate-new-buffer name) (erase-buffer) (wl-draft-mode) (wl-draft-editor-mode) @@ -1937,8 +1936,7 @@ If KILL-WHEN-DONE is non-nil, current draft buffer is killed" (while local-variables (make-local-variable (car local-variables)) (set (car local-variables) - (save-excursion - (set-buffer editing-buffer) + (with-current-buffer editing-buffer (symbol-value (car local-variables)))) (setq local-variables (cdr local-variables))) (current-buffer)))) @@ -2157,8 +2155,7 @@ Automatically applied in draft sending time." ((eq key 'reply) (when (and reply-buf - (save-excursion - (set-buffer reply-buf) + (with-current-buffer reply-buf (save-restriction (std11-narrow-to-header) (goto-char (point-min)) -- 1.7.10.4