From 000345eadd81debeb1527fb65e46109c96fc35e0 Mon Sep 17 00:00:00 2001 From: yoichi Date: Sun, 12 Jan 2003 14:00:03 +0000 Subject: [PATCH] Merge from trunk: * wl-summary.el (wl-summary-goto-folder-subr): Fix logic: set entity-id when folder is given. * wl-folder.el (wl-folder-set-current-entity-id): Don't use save-excursion, use save-selected-window instead. Select folder buffer window if exists. Enclose by save-current-buffer. --- NEWS | 2 ++ NEWS.ja | 2 ++ wl/ChangeLog | 10 ++++++++++ wl/wl-folder.el | 28 ++++++++++++++-------------- wl/wl-summary.el | 18 +++++++++--------- 5 files changed, 37 insertions(+), 23 deletions(-) diff --git a/NEWS b/NEWS index 8a26a3c..96d9926 100644 --- a/NEWS +++ b/NEWS @@ -3,6 +3,8 @@ Wanderlust NEWS -- User-visible changes in Wanderlust. * Changes in 2.10.1 from 2.10.0 Version 2.10.1 is a bug fix version of 2.10.0. +** Fixed a problem that wl-folder-move-cur-folder doesn't work. + ** Fixed a problem that wl-draft-reedit doesn't work properly on Meadow. ** Fixed a problem that wl-summary-pack-number doesn't work on Maildir and diff --git a/NEWS.ja b/NEWS.ja index 21435ca..486eb0d 100644 --- a/NEWS.ja +++ b/NEWS.ja @@ -3,6 +3,8 @@ Wanderlust NEWS (日本語版) -- User-visible changes in Wanderlust. * 2.10.0 から 2.10.1 への変更点 2.10.1 は 2.10.0 のバグ修正版です。 +** wl-folder-move-cur-folder が効いていなかった問題が修正されました。 + ** Meadow 上で wl-draft-reedit がうまく動かない問題が修正されました。 ** wl-summary-pack-number が Maildir や shimbun フォルダで動かない diff --git a/wl/ChangeLog b/wl/ChangeLog index a306ff8..4a6a980 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,3 +1,13 @@ +2003-01-12 Yoichi NAKAYAMA + + Merge from trunk: + * wl-summary.el (wl-summary-goto-folder-subr): Fix logic: set + entity-id when folder is given. + * wl-folder.el (wl-folder-set-current-entity-id): Don't use + save-excursion, use save-selected-window instead. + Select folder buffer window if exists. + Enclose by save-current-buffer. + 2003-01-10 TAKAHASHI Kaoru * wl-draft.el (wl-draft-self-reply-p): New function. diff --git a/wl/wl-folder.el b/wl/wl-folder.el index 780cae0..93e2958 100644 --- a/wl/wl-folder.el +++ b/wl/wl-folder.el @@ -954,21 +954,21 @@ Optional argument ARG is repeart count." (goto-char wl-folder-buffer-cur-point)))) (defun wl-folder-set-current-entity-id (entity-id) - (let ((buf (get-buffer wl-folder-buffer-name))) + (let* ((buf (get-buffer wl-folder-buffer-name)) + (buf-win (get-buffer-window buf))) (if buf - (save-excursion - (set-buffer buf) - (setq wl-folder-buffer-cur-entity-id entity-id) - (setq wl-folder-buffer-cur-path (wl-folder-get-path wl-folder-entity - entity-id)) - (wl-highlight-folder-path wl-folder-buffer-cur-path) - (and wl-folder-move-cur-folder - wl-folder-buffer-cur-point - (goto-char wl-folder-buffer-cur-point)))) - (if (eq (current-buffer) buf) - (and wl-folder-move-cur-folder - wl-folder-buffer-cur-point - (goto-char wl-folder-buffer-cur-point))))) + (save-current-buffer + (save-selected-window + (if buf-win + (select-window buf-win) + (set-buffer buf)) + (setq wl-folder-buffer-cur-entity-id entity-id) + (setq wl-folder-buffer-cur-path + (wl-folder-get-path wl-folder-entity entity-id)) + (wl-highlight-folder-path wl-folder-buffer-cur-path) + (and wl-folder-move-cur-folder + wl-folder-buffer-cur-point + (goto-char wl-folder-buffer-cur-point))))))) (defun wl-folder-check-current-entity () "Check folder at position. diff --git a/wl/wl-summary.el b/wl/wl-summary.el index 94cdc25..77fc39f 100644 --- a/wl/wl-summary.el +++ b/wl/wl-summary.el @@ -2573,15 +2573,15 @@ If ARG, without confirm." (if (and interactive wl-summary-recenter) (recenter (/ (- (window-height) 2) 2)))))) ;; set current entity-id - (if (and (not folder) - (setq entity - (wl-folder-search-entity-by-name (elmo-folder-name-internal - folder) - wl-folder-entity - 'folder))) - ;; entity-id is unknown. - (wl-folder-set-current-entity-id - (wl-folder-get-entity-id entity))) + (when (and folder + (setq entity + (wl-folder-search-entity-by-name + (elmo-folder-name-internal folder) + wl-folder-entity + 'folder))) + ;; entity-id is unknown. + (wl-folder-set-current-entity-id + (wl-folder-get-entity-id entity))) (when (and wl-summary-lazy-highlight wl-on-xemacs) (sit-for 0)) -- 1.7.10.4