From: teranisi Date: Fri, 17 Nov 2000 08:15:41 +0000 (+0000) Subject: * wl-util.el (toplevel): Don't define wl-biff if `timer-activate' does not X-Git-Tag: wl-2_4_0pre3~8 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=d59208a53b4879134025d464b3c8448546f60327;p=elisp%2Fwanderlust.git * wl-util.el (toplevel): Don't define wl-biff if `timer-activate' does not exist. (wl-biff-stop): Call `cancel-timer' if timer already exists. (wl-biff-start): Call `timer-activate' if timer already exists. * wl-mule.el (wl-message-overload-functions): Call `set-keymap-parent' only when it is bound as function. --- diff --git a/wl/ChangeLog b/wl/ChangeLog index 241c116..d49d198 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,3 +1,13 @@ +2000-11-17 Yuuichi Teranishi + + * wl-util.el (toplevel): Don't define wl-biff if `timer-activate' + does not exist. + (wl-biff-stop): Call `cancel-timer' if timer already exists. + (wl-biff-start): Call `timer-activate' if timer already exists. + + * wl-mule.el (wl-message-overload-functions): Call `set-keymap-parent' + only when it is bound as function. + 2000-11-15 Yuuichi Teranishi * wl-version.el (wl-version): Changed codename to "Rio-pre2". diff --git a/wl/wl-mule.el b/wl/wl-mule.el index 7ae32fa..76538e6 100644 --- a/wl/wl-mule.el +++ b/wl/wl-mule.el @@ -106,7 +106,8 @@ Special commands: (local-set-key [mouse-5] 'wl-message-wheel-up) (local-set-key [S-mouse-4] 'wl-message-wheel-down) (local-set-key [S-mouse-5] 'wl-message-wheel-up) - (set-keymap-parent wl-message-button-map (current-local-map)) + (if (fboundp 'set-keymap-parent) + (set-keymap-parent wl-message-button-map (current-local-map))) (define-key wl-message-button-map [mouse-2] 'wl-message-button-dispatcher)) diff --git a/wl/wl-util.el b/wl/wl-util.el index eeec0e5..5f57d24 100644 --- a/wl/wl-util.el +++ b/wl/wl-util.el @@ -747,20 +747,24 @@ that `read' can handle, whenever this is possible." (start-itimer wl-biff-timer-name 'wl-biff-check-folders wl-biff-check-interval wl-biff-check-interval)))) - ((condition-case nil (require 'timer) (error nil));; FSFmacs 19+ + ((and (condition-case nil (require 'timer) (error nil));; FSFmacs 19+ + (fboundp 'timer-activate)) (defun wl-biff-stop () - (put 'wl-biff 'timer nil)) + (when (get 'wl-biff 'timer) + (cancel-timer (get 'wl-biff 'timer)))) (defun wl-biff-start () (require 'timer) (when wl-biff-check-folder-list (wl-biff-check-folders) - (put 'wl-biff 'timer (run-at-time - (timer-next-integral-multiple-of-time - (current-time) wl-biff-check-interval) - wl-biff-check-interval - 'wl-biff-event-handler)))) + (if (get 'wl-biff 'timer) + (timer-activate (get 'wl-biff 'timer)) + (put 'wl-biff 'timer (run-at-time + (timer-next-integral-multiple-of-time + (current-time) wl-biff-check-interval) + wl-biff-check-interval + 'wl-biff-event-handler))))) (defun-maybe timer-next-integral-multiple-of-time (time secs) "Yield the next value after TIME that is an integral multiple of SECS.