* wl-score.el (wl-score-insert-help, wl-score-edit-get-header)
authorkaoru <kaoru>
Fri, 1 Jan 2010 11:35:58 +0000 (11:35 +0000)
committerkaoru <kaoru>
Fri, 1 Jan 2010 11:35:58 +0000 (11:35 +0000)
(wl-score-edit-insert-number): Suppress compile warnings; Use `with-current-buffer' instead of `save-excursion' & `set-buffer'.

wl/ChangeLog
wl/wl-score.el

index 08b4eab..0024bf6 100644 (file)
@@ -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-score.el (wl-score-insert-help, wl-score-edit-get-header)
+       (wl-score-edit-insert-number): Ditto.
 
        * wl-draft.el (wl-draft-do-fcc): Use `with-temp-buffer'.
 
index 2010fec..4b6f329 100644 (file)
@@ -937,8 +937,7 @@ Set `wl-score-cache' nil."
   (setq wl-score-help-winconf (current-window-configuration))
   (let ((cur-win (selected-window))
        mes-win)
-    (save-excursion
-      (set-buffer (get-buffer-create "*Score Help*"))
+    (with-current-buffer (get-buffer-create "*Score Help*")
       (buffer-disable-undo (current-buffer))
       (delete-windows-on (current-buffer))
       (erase-buffer)
@@ -1374,8 +1373,7 @@ Entering Score mode calls the value of `wl-score-mode-hook'."
   (let ((sum-buf (wl-score-edit-get-summary-buf))
        (index (nth 2 (assoc header wl-score-header-index))))
     (when (and sum-buf index)
-      (save-excursion
-       (set-buffer sum-buf)
+      (with-current-buffer sum-buf
        (wl-score-get-header header extra)))))
 
 (defun wl-score-edit-insert-number ()
@@ -1383,8 +1381,7 @@ Entering Score mode calls the value of `wl-score-mode-hook'."
   (let ((sum-buf (wl-score-edit-get-summary-buf))
        num)
     (when sum-buf
-      (if (setq num (save-excursion
-                     (set-buffer sum-buf)
+      (if (setq num (with-current-buffer sum-buf
                      (wl-summary-message-number)))
          (prin1 num (current-buffer))))))