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-11 Yoichi NAKAYAMA <yoichi@eken.phys.nagoya-u.ac.jp>
+
+ * 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 <muse@ba2.so-net.ne.jp>
* wl-draft.el (wl-draft-reedit): Avoid error on Meadow [wl:11209].
(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))
(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))