* riece-display.el (riece-part-channel): Emit
authorueno <ueno>
Sat, 14 Jan 2006 12:58:25 +0000 (12:58 +0000)
committerueno <ueno>
Sat, 14 Jan 2006 12:58:25 +0000 (12:58 +0000)
'channel-list-changed signal.

lisp/ChangeLog
lisp/riece-display.el

index a680706..01bb04c 100644 (file)
@@ -1,3 +1,8 @@
+2006-01-14  Daiki Ueno  <ueno@unixuser.org>
+
+       * riece-display.el (riece-part-channel): Emit
+       'channel-list-changed signal.
+
 2005-12-29  Daiki Ueno  <ueno@unixuser.org>
 
        * riece-alias.el (riece-alias-alternate-separator): Reverted the
index be7952f..fbead8b 100644 (file)
@@ -483,10 +483,12 @@ Local to the buffer in `riece-buffer-list'.")
 
 (defun riece-part-channel (identity)
   (let ((pointer (riece-identity-member identity riece-current-channels)))
-    (if pointer
-       (setcar pointer nil))
+    (unless pointer
+      (error "No such channel!"))
+    (setcar pointer nil)
     (if (riece-identity-equal identity riece-current-channel)
-       (riece-switch-to-nearest-channel pointer))
+       (riece-switch-to-nearest-channel pointer)
+      (riece-emit-signal 'channel-list-changed))
     (funcall riece-buffer-dispose-function (riece-channel-buffer identity))))
 
 (defun riece-redisplay-buffers (&optional force)