From: okazaki Date: Mon, 16 Mar 2009 02:39:53 +0000 (+0000) Subject: (wl-summary-get-prev-unread-folder): Use `with-current-buffer' instead of `save-excur... X-Git-Tag: wl-2_15_6-fixes~3 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=3ada2a6c2be99f5363835d778a8a3c6b2cbf1082;p=elisp%2Fwanderlust.git (wl-summary-get-prev-unread-folder): Use `with-current-buffer' instead of `save-excursion'. Inline temporary variable `cur-id'. (wl-summary-get-next-unread-folder): Ditto. (wl-summary-get-next-folder): Ditto. (wl-summary-get-prev-folder): Ditto. Remove local variable `last-entity'. --- diff --git a/wl/wl-summary.el b/wl/wl-summary.el index 8ea2d49..61b2965 100644 --- a/wl/wl-summary.el +++ b/wl/wl-summary.el @@ -4410,36 +4410,34 @@ Use function list is `wl-summary-write-current-folder-functions'." (wl-summary-entity-info-msg next-entity finfo))))))))) (defun wl-summary-get-prev-folder () - (let ((folder-buf (get-buffer wl-folder-buffer-name)) - last-entity cur-id) + (let ((folder-buf (get-buffer wl-folder-buffer-name))) (when folder-buf - (setq cur-id (save-excursion (set-buffer folder-buf) - wl-folder-buffer-cur-entity-id)) - (wl-folder-get-prev-folder cur-id)))) + (wl-folder-get-prev-folder + (with-current-buffer folder-buf + wl-folder-buffer-cur-entity-id))))) (defun wl-summary-get-next-folder () - (let ((folder-buf (get-buffer wl-folder-buffer-name)) - cur-id) + (let ((folder-buf (get-buffer wl-folder-buffer-name))) (when folder-buf - (setq cur-id (save-excursion (set-buffer folder-buf) - wl-folder-buffer-cur-entity-id)) - (wl-folder-get-next-folder cur-id)))) + (wl-folder-get-next-folder + (with-current-buffer folder-buf + wl-folder-buffer-cur-entity-id))))) (defun wl-summary-get-next-unread-folder () - (let ((folder-buf (get-buffer wl-folder-buffer-name)) - cur-id) + (let ((folder-buf (get-buffer wl-folder-buffer-name))) (when folder-buf - (setq cur-id (save-excursion (set-buffer folder-buf) - wl-folder-buffer-cur-entity-id)) - (wl-folder-get-next-folder cur-id 'unread)))) + (wl-folder-get-next-folder + (with-current-buffer folder-buf + wl-folder-buffer-cur-entity-id) + 'unread)))) (defun wl-summary-get-prev-unread-folder () - (let ((folder-buf (get-buffer wl-folder-buffer-name)) - cur-id) + (let ((folder-buf (get-buffer wl-folder-buffer-name))) (when folder-buf - (setq cur-id (save-excursion (set-buffer folder-buf) - wl-folder-buffer-cur-entity-id)) - (wl-folder-get-prev-folder cur-id 'unread)))) + (wl-folder-get-prev-folder + (with-current-buffer folder-buf + wl-folder-buffer-cur-entity-id) + 'unread)))) (defun wl-summary-down (&optional interactive skip-no-unread) (interactive)