From 222ed6f3293eb94760d791eee910f5b8b1556d1e Mon Sep 17 00:00:00 2001 From: kaoru Date: Fri, 23 Feb 2001 12:09:12 +0000 Subject: [PATCH] 2001-02-23 Yoichi NAKAYAMA * wl-vars.el (wl-biff-notify-hook): New hook. * wl-util.el (wl-biff-notify): Run `wl-biff-notify-hook' at the arrival of new mail. (Based on the patch from Hironori Fukuchi and advice by Yuuichi Teranishi ) --- wl/ChangeLog | 8 ++++++++ wl/wl-util.el | 4 +++- wl/wl-vars.el | 2 ++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/wl/ChangeLog b/wl/ChangeLog index ee25c2c..b369378 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,3 +1,11 @@ +2001-02-23 Yoichi NAKAYAMA + + * wl-vars.el (wl-biff-notify-hook): New hook. + * wl-util.el (wl-biff-notify): Run `wl-biff-notify-hook' at + the arrival of new mail. + (Based on the patch from Hironori Fukuchi + and advice by Yuuichi Teranishi ) + 2001-02-23 Yuuichi Teranishi * wl-summary.el (wl-summary-default-get-next-msg): Fix (num => msg). diff --git a/wl/wl-util.el b/wl/wl-util.el index 6ad81f5..0cdb6e3 100644 --- a/wl/wl-util.el +++ b/wl/wl-util.el @@ -803,11 +803,13 @@ This function is imported from Emacs 20.7." (fset 'wl-biff-start 'ignore))) (defsubst wl-biff-notify (new-mails notify-minibuf) + (when (and (not wl-modeline-biff-status) (> new-mails 0)) + (run-hooks 'wl-biff-notify-hook)) (setq wl-modeline-biff-status (> new-mails 0)) (force-mode-line-update t) (when notify-minibuf (cond ((zerop new-mails) (message "No mail.")) - ((eq 1 new-mails) (message "You have a new mail.")) + ((= 1 new-mails) (message "You have a new mail.")) (t (message "You have %d new mails." new-mails))))) ;; Internal variable. diff --git a/wl/wl-vars.el b/wl/wl-vars.el index b6921f9..c541e1c 100644 --- a/wl/wl-vars.el +++ b/wl/wl-vars.el @@ -468,6 +468,8 @@ reasons of system internal to accord facilities for the Emacs variants.") "A hook called when exit wanderlust.") (defvar wl-folder-suspend-hook nil "A hook called when suspend wanderlust.") +(defvar wl-biff-notify-hook nil + "A hook called when a biff-notification is invoked.") (defvar wl-auto-check-folder-pre-hook nil "A hook called before auto check folders.") (defvar wl-auto-check-folder-hook nil -- 1.7.10.4