* wl-util.el (toplevel): Don't define wl-biff if `timer-activate' does not
authorteranisi <teranisi>
Fri, 17 Nov 2000 08:15:41 +0000 (08:15 +0000)
committerteranisi <teranisi>
Fri, 17 Nov 2000 08:15:41 +0000 (08:15 +0000)
 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.

wl/ChangeLog
wl/wl-mule.el
wl/wl-util.el

index 241c116..d49d198 100644 (file)
@@ -1,3 +1,13 @@
+2000-11-17  Yuuichi Teranishi  <teranisi@gohome.org>
+
+       * 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  <teranisi@gohome.org>
 
        * wl-version.el (wl-version): Changed codename to "Rio-pre2".
index 7ae32fa..76538e6 100644 (file)
@@ -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))
 
index eeec0e5..5f57d24 100644 (file)
@@ -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.