+2003-10-01 Hiroya Murata <lapis-lazuli@pop06.odn.ne.jp>
+
+ * wl-summary.el (wl-summary-buffer-window-scroll-functions):
+ Renamed from wl-summary-window-scroll-functions.
+ (wl-summary-window-scroll-functions): Don't set to variable.
+ (wl-summary-display-top): Use run-hooks.
+ (wl-summary-display-bottom): Ditto.
+ (wl-summary-toggle-disp-msg): Ditto.
+ (wl-summary-mode): Set wl-summary-buffer-window-scroll-functions;
+ Use it instead of wl-summary-window-scroll-functions.
+ (wl-summary-goto-folder-subr): Don't call
+ wl-summary-window-scroll-functions, use
+ wl-summary-buffer-window-scroll-functions instead.
+
2003-09-30 Hiroya Murata <lapis-lazuli@pop06.odn.ne.jp>
* wl-summary.el (wl-summary-mode): Use make-local-hook instead of
(defvar wl-summary-buffer-next-folder-function nil)
(defvar wl-summary-buffer-exit-function nil)
(defvar wl-summary-buffer-next-message-function nil)
+(defvar wl-summary-buffer-window-scroll-functions nil)
(defvar wl-summary-buffer-number-list nil)
(defvar wl-summary-buffer-folder-name nil)
(defvar wl-summary-buffer-line-formatter nil)
(make-variable-buffer-local 'wl-summary-buffer-next-folder-function)
(make-variable-buffer-local 'wl-summary-buffer-exit-function)
(make-variable-buffer-local 'wl-summary-buffer-next-message-function)
+(make-variable-buffer-local 'wl-summary-buffer-window-scroll-functions)
(make-variable-buffer-local 'wl-summary-buffer-number-list)
(make-variable-buffer-local 'wl-summary-buffer-folder-name)
(make-variable-buffer-local 'wl-summary-buffer-line-formatter)
(not (wl-thread-entity-parent-invisible-p
(wl-thread-get-entity number)))))
-(defvar wl-summary-window-scroll-functions nil)
-
(defun wl-summary-update-mark-and-highlight-window (&optional win beg)
"A function to be called as window-scroll-functions."
(with-current-buffer (window-buffer win)
(set-buffer-modified-p nil)))
(defun wl-summary-window-scroll-functions ()
- (or wl-summary-window-scroll-functions
- (setq wl-summary-window-scroll-functions
- (cond
- ((and wl-summary-lazy-highlight
- wl-summary-lazy-update-mark)
- (list 'wl-summary-update-mark-and-highlight-window))
- (wl-summary-lazy-highlight
- (list 'wl-highlight-summary-window))
- (wl-summary-lazy-update-mark
- (list 'wl-summary-update-mark-window))))))
+ (cond ((and wl-summary-lazy-highlight
+ wl-summary-lazy-update-mark)
+ (list 'wl-summary-update-mark-and-highlight-window))
+ (wl-summary-lazy-highlight
+ (list 'wl-highlight-summary-window))
+ (wl-summary-lazy-update-mark
+ (list 'wl-summary-update-mark-window))))
(defun wl-status-update ()
(interactive)
(defun wl-summary-display-top ()
(interactive)
(goto-char (point-min))
- (when wl-summary-window-scroll-functions
- (dolist (function wl-summary-window-scroll-functions)
- (funcall function)))
+ (run-hooks 'wl-summary-buffer-window-scroll-functions)
(if wl-summary-buffer-disp-msg
(wl-summary-redisplay)))
(interactive)
(goto-char (point-max))
(forward-line -1)
- (when wl-summary-window-scroll-functions
- (dolist (function wl-summary-window-scroll-functions)
- (funcall function)))
+ (run-hooks 'wl-summary-buffer-window-scroll-functions)
(if wl-summary-buffer-disp-msg
(wl-summary-redisplay)))
selective-display-ellipses nil)
(wl-mode-line-buffer-identification '(wl-summary-buffer-mode-line))
(easy-menu-add wl-summary-mode-menu)
- (when (wl-summary-window-scroll-functions)
+ (setq wl-summary-buffer-window-scroll-functions
+ (wl-summary-window-scroll-functions))
+ (when wl-summary-buffer-window-scroll-functions
(let ((hook (make-local-hook (if wl-on-xemacs
'pre-idle-hook
'window-scroll-functions))))
- (dolist (function (wl-summary-window-scroll-functions))
+ (dolist (function wl-summary-buffer-window-scroll-functions)
(add-hook hook function nil t))))
;; This hook may contain the function `wl-setup-summary' for reasons
;; of system internal to accord facilities for the Emacs variants.
;; entity-id is unknown.
(wl-folder-set-current-entity-id
(wl-folder-get-entity-id entity)))
- (when (and (wl-summary-window-scroll-functions)
+ (when (and wl-summary-buffer-window-scroll-functions
wl-on-xemacs)
(sit-for 0))
(unwind-protect
(run-hooks 'wl-summary-toggle-disp-off-hook))
;;; (switch-to-buffer cur-buf)
)))
- (when wl-summary-window-scroll-functions
- (dolist (function wl-summary-window-scroll-functions)
- (funcall function)))))
+ (run-hooks 'wl-summary-buffer-window-scroll-functions)))
(defun wl-summary-next-line-content ()
"Show next line of the message."