From: ueno Date: Thu, 1 Jul 2004 04:29:35 +0000 (+0000) Subject: * riece.el (riece-exit): Clear signal-slots. X-Git-Tag: riece-1_0_1~8 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=808346a610bfd4b9d207d763888a3158532c3ef4;p=elisp%2Friece.git * riece.el (riece-exit): Clear signal-slots. * riece-signal.el (riece-clear-signal-slots): New function. --- diff --git a/lisp/riece-signal.el b/lisp/riece-signal.el index c239a02..2191825 100644 --- a/lisp/riece-signal.el +++ b/lisp/riece-signal.el @@ -89,6 +89,10 @@ This function is for internal use only." (set symbol (delq (car slots) (symbol-value symbol)))) (setq slots (cdr slots))))) +(defun riece-clear-signal-slots () + "Remove all functions from listeners list." + (fillarray riece-signal-slot-obarray 0)) + (defun riece-emit-signal (signal-name &rest args) "Emit SIGNAL." (let ((symbol (intern-soft (symbol-name signal-name) diff --git a/lisp/riece.el b/lisp/riece.el index 373afff..e264b5e 100644 --- a/lisp/riece.el +++ b/lisp/riece.el @@ -30,6 +30,7 @@ (require 'riece-compat) (require 'riece-commands) (require 'riece-addon) +(require 'riece-signal) (autoload 'derived-mode-class "derived") @@ -341,6 +342,7 @@ If optional argument CONFIRM is non-nil, ask which IRC server to connect." (setq riece-buffer-list (cdr riece-buffer-list))) (if riece-shrink-buffer-idle-timer (riece-cancel-timer riece-shrink-buffer-idle-timer)) + (riece-clear-signal-slots) (setq riece-server nil riece-current-channels nil riece-current-channel nil