* riece-server.el (riece-quit-server-process): Use riece-run-at-time.
authorueno <ueno>
Wed, 22 Oct 2003 02:16:06 +0000 (02:16 +0000)
committerueno <ueno>
Wed, 22 Oct 2003 02:16:06 +0000 (02:16 +0000)
* riece-xemacs.el (riece-run-at-time): New function.
* riece-emacs.el (riece-run-at-time): New alias.

lisp/ChangeLog
lisp/riece-emacs.el
lisp/riece-server.el
lisp/riece-xemacs.el

index b897296..c98eab0 100644 (file)
@@ -1,5 +1,9 @@
 2003-10-22  Daiki Ueno  <ueno@unixuser.org>
 
+       * riece-server.el (riece-quit-server-process): Use riece-run-at-time.
+       * riece-xemacs.el (riece-run-at-time): New function.
+       * riece-emacs.el (riece-run-at-time): New alias.
+
        * riece-misc.el (riece-get-identities-on-server): New function.
        (riece-get-users-on-server): Use it.
 
index 6f5eca6..a22ecac 100644 (file)
@@ -77,6 +77,8 @@
 (defalias 'riece-overlay-start 'overlay-start)
 (defalias 'riece-overlay-buffer 'overlay-buffer)
 
+(defalias 'riece-run-at-time 'run-at-time)
+
 (provide 'riece-emacs)
 
 ;;; riece-emacs.el ends here
index e5cceb3..62e26bb 100644 (file)
@@ -225,14 +225,14 @@ the `riece-server-keyword-map' variable."
 (eval-when-compile
   (autoload 'riece-exit "riece"))
 (defun riece-quit-server-process (process &optional message)
-  (run-at-time riece-quit-timeout nil
-              (lambda (process)
-                (when (rassq process riece-server-process-alist)
-                  (riece-close-server-process process)
-                  ;; If no server process is available, exit.
-                  (unless riece-server-process-alist
-                    (riece-exit))))
-              process)
+  (riece-run-at-time riece-quit-timeout nil
+                    (lambda (process)
+                      (when (rassq process riece-server-process-alist)
+                        (riece-close-server-process process)
+                        ;; If no server process is available, exit.
+                        (unless riece-server-process-alist
+                          (riece-exit))))
+                    process)
   (riece-process-send-string process
                             (if message
                                 (format "QUIT :%s\r\n" message)
index e180cfc..dd896dd 100644 (file)
 (defalias 'riece-overlay-start 'extent-start-position)
 (defalias 'riece-overlay-buffer 'extent-buffer)
 
+;;; stolen (and renamed) from nnheaderxm.el.
+(defun riece-run-at-time (time repeat function &rest args)
+  (start-itimer
+   "riece-run-at-time"
+   `(lambda ()
+      (,function ,@args))
+   time repeat))
+
 (provide 'riece-xemacs)
 
 ;;; riece-xemacs.el ends here