(wl-summary-after-resize-function): New function.
authorhmurata <hmurata>
Sun, 14 Nov 2004 10:59:09 +0000 (10:59 +0000)
committerhmurata <hmurata>
Sun, 14 Nov 2004 10:59:09 +0000 (10:59 +0000)
(wl-summary-mode): Add `wl-summary-after-resize-function' to
window-size-change-functions.

wl/ChangeLog
wl/wl-summary.el

index 5ae69ac..77e39f4 100644 (file)
@@ -1,3 +1,9 @@
+2004-11-14  Hiroya Murata  <lapis-lazuli@pop06.odn.ne.jp>
+
+       * wl-summary.el (wl-summary-after-resize-function): New function.
+       (wl-summary-mode): Add `wl-summary-after-resize-function' to
+       window-size-change-functions.
+
 2004-11-12  Hiroya Murata  <lapis-lazuli@pop06.odn.ne.jp>
 
        * wl-draft.el (wl-draft-create-buffer): Bind
index 352af13..f22d6dc 100644 (file)
@@ -634,6 +634,19 @@ See also variable `wl-use-petname'."
        (wl-summary-lazy-update-mark
         (list 'wl-summary-update-mark-window))))
 
+(defun wl-summary-after-resize-function (frame)
+  "Called from `window-size-change-functions'."
+  (save-excursion
+    (save-selected-window
+      (select-frame frame)
+      (walk-windows
+       (lambda (window)
+        (set-buffer (window-buffer window))
+        (when (eq major-mode 'wl-summary-mode)
+          (run-hook-with-args 'wl-summary-buffer-window-scroll-functions
+                              window)))
+       'nomini frame))))
+
 ;; Handler of event from elmo-folder
 (eval-and-compile
   (luna-define-class wl-summary-event-handler (elmo-event-handler)
@@ -903,7 +916,9 @@ Entering Folder mode calls the value of `wl-summary-mode-hook'."
     (let ((hook (if wl-on-xemacs 'pre-idle-hook 'window-scroll-functions)))
       (make-local-hook hook)
       (dolist (function wl-summary-buffer-window-scroll-functions)
-       (add-hook hook function nil t))))
+       (add-hook hook function nil t)))
+    (add-hook 'window-size-change-functions
+             #'wl-summary-after-resize-function))
   (make-local-hook 'change-major-mode-hook)
   (add-hook 'change-major-mode-hook #'wl-summary-buffer-detach nil t)
   (add-hook 'kill-buffer-hook #'wl-summary-buffer-detach)