X-Git-Url: https://cgit.sxemacs.org/?p=riece;a=blobdiff_plain;f=lisp%2Friece-filter.el;h=5c1b42b684c6101583b8ea3d17b283064f97c9fe;hp=a19221ae447ac532dd4f3f372fbc16dca1346bbf;hb=6ba2b9c5a8125b926cae3d92663523f207da508e;hpb=9f9d9d361effbeb34ec1d3c1152e1949f609e00d diff --git a/lisp/riece-filter.el b/lisp/riece-filter.el index a19221a..5c1b42b 100644 --- a/lisp/riece-filter.el +++ b/lisp/riece-filter.el @@ -28,7 +28,6 @@ (require 'riece-misc) (require 'riece-server) ;riece-close-server (require 'riece-identity) -(require 'riece-display) (defun riece-handle-numeric-reply (prefix number name string) (let ((base-number (* (/ number 100) 100)) @@ -49,7 +48,7 @@ (riece-decode-coding-string string)) (error (if riece-debug - (message "Error occurred in `%S': %S" function error))))))) + (message "Error in `%S': %S" function error))))))) (defun riece-default-handle-numeric-reply (client-prefix prefix number name string) @@ -75,19 +74,19 @@ (run-hook-with-args-until-success hook prefix string) (error (if riece-debug - (message "Error occurred in `%S': %S" hook error)) + (message "Error in `%S': %S" hook error)) nil)) (if function (condition-case error (funcall function prefix string) (error (if riece-debug - (message "Error occurred in `%S': %S" function error))))) + (message "Error in `%S': %S" function error))))) (condition-case error (run-hook-with-args-until-success after-hook prefix string) (error (if riece-debug - (message "Error occurred in `%S': %S" after-hook error))))))) + (message "Error in `%S': %S" after-hook error))))))) (defun riece-filter (process input) (save-excursion @@ -124,6 +123,8 @@ (throw 'contiguous nil))))) (forward-line))))) +(eval-when-compile + (autoload 'riece-exit "riece")) (defun riece-sentinel (process status) (if riece-reconnect-with-password (let ((server-name @@ -154,7 +155,10 @@ (riece-part-channel (car channels))) (setq channels (cdr channels)))) (riece-redisplay-buffers) - (riece-close-server-process process)))) + (riece-close-server-process process) + ;; If no server process is available, exit. + (unless riece-server-process-alist + (riece-exit))))) (provide 'riece-filter)