X-Git-Url: http://cgit.sxemacs.org/?a=blobdiff_plain;f=lisp%2Friece-server.el;h=5c6b420ebc3af47924d88a86314f0aef9343cedb;hb=f88a663c1b379044573897f6f2ae44e5f5172ed6;hp=e5cceb3d37c2a132efadf85603e840b126faf9e2;hpb=fd2f4576f383044390c4523947aaead409d34c1a;p=riece diff --git a/lisp/riece-server.el b/lisp/riece-server.el index e5cceb3..5c6b420 100644 --- a/lisp/riece-server.el +++ b/lisp/riece-server.el @@ -37,7 +37,7 @@ (:nickname riece-nickname) (:username riece-username) (:password) - (:function #'open-network-stream) + (:function riece-default-open-connection-function) (:coding riece-default-coding-system)) "Mapping from keywords to default values. All keywords that can be used must be listed here.")) @@ -103,6 +103,7 @@ the `riece-server-keyword-map' variable." (error "Server closed")))) (put 'riece-with-server-buffer 'lisp-indent-function 1) +(put 'riece-with-server-buffer 'edebug-form-spec '(form body)) (defun riece-process-send-string (process string) (with-current-buffer (process-buffer process) @@ -225,14 +226,15 @@ 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) + (if riece-quit-timeout + (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)