From: ueno Date: Wed, 22 Oct 2003 02:16:06 +0000 (+0000) Subject: * riece-server.el (riece-quit-server-process): Use riece-run-at-time. X-Git-Tag: riece-0_1_5~22 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=dd147f4af03b27873847a35d45996c2bbcef8e9b;p=elisp%2Friece.git * 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. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b897296..c98eab0 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,9 @@ 2003-10-22 Daiki Ueno + * 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. diff --git a/lisp/riece-emacs.el b/lisp/riece-emacs.el index 6f5eca6..a22ecac 100644 --- a/lisp/riece-emacs.el +++ b/lisp/riece-emacs.el @@ -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 diff --git a/lisp/riece-server.el b/lisp/riece-server.el index e5cceb3..62e26bb 100644 --- a/lisp/riece-server.el +++ b/lisp/riece-server.el @@ -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) diff --git a/lisp/riece-xemacs.el b/lisp/riece-xemacs.el index e180cfc..dd896dd 100644 --- a/lisp/riece-xemacs.el +++ b/lisp/riece-xemacs.el @@ -77,6 +77,14 @@ (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