From: yoichi Date: Fri, 10 Jan 2003 16:57:43 +0000 (+0000) Subject: * wl-summary.el (wl-summary-goto-folder-subr): Fix logic: set X-Git-Tag: merged-trunk-to-elmo-mark-14~37 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fe1947d810745e5b2e022e29c0c5fdeb37d51246;p=elisp%2Fwanderlust.git * 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. (To correct behavior with wl-folder-move-cur-folder.) --- diff --git a/wl/ChangeLog b/wl/ChangeLog index 654d178..d4886fc 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,3 +1,12 @@ +2003-01-11 Yoichi NAKAYAMA + + * 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. + (To correct behavior with wl-folder-move-cur-folder.) + 2003-01-10 Masahiro Murata * wl-draft.el (wl-draft-reedit): Avoid error on Meadow [wl:11209]. diff --git a/wl/wl-folder.el b/wl/wl-folder.el index fbf43fb..a037104 100644 --- a/wl/wl-folder.el +++ b/wl/wl-folder.el @@ -954,10 +954,13 @@ 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) + (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)) diff --git a/wl/wl-summary.el b/wl/wl-summary.el index ba42408..54f1285 100644 --- a/wl/wl-summary.el +++ b/wl/wl-summary.el @@ -2574,15 +2574,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))