(put-text-property point (point) 'riece-identity
(car channels))))
(setq index (1+ index)
- channels (cdr channels))))
- (setq riece-channel-list-changed nil))))
+ channels (cdr channels)))))))
(defun riece-update-channel-indicator ()
(setq riece-channel-indicator
(setq riece-channel-buffer (get-buffer (riece-channel-buffer-name
riece-current-channel))))
(run-hooks 'riece-update-buffer-functions)
+ (setq riece-channel-list-changed nil)
(force-mode-line-update t))
(defun riece-channel-buffer-name (identity)
- (format riece-channel-buffer-format (riece-format-identity identity)))
+ (let ((channels (riece-identity-member identity riece-current-channels)))
+ (if channels
+ (setq identity (car channels))
+ (if riece-debug
+ (message "%S is not a member of riece-current-channels" identity)))
+ (format riece-channel-buffer-format (riece-format-identity identity))))
(eval-when-compile
(autoload 'riece-channel-mode "riece"))
(current-buffer)))
(defun riece-switch-to-channel (identity)
- (setq riece-last-channel riece-current-channel
- riece-current-channel identity)
- (run-hooks 'riece-channel-switch-hook))
+ (let ((last riece-current-channel))
+ (setq riece-current-channel identity)
+ (run-hook-with-args 'riece-after-switch-to-channel-functions last)))
(defun riece-join-channel (identity)
(unless (riece-identity-member identity riece-current-channels)
(setq identity (car pointer)))
(if identity
(riece-switch-to-channel identity)
- (setq riece-last-channel riece-current-channel
- riece-current-channel nil))))
+ (let ((last riece-current-channel))
+ (run-hook-with-args 'riece-after-switch-to-channel-functions last)
+ (setq riece-current-channel nil)))))
(defun riece-part-channel (identity)
(let ((pointer (riece-identity-member identity riece-current-channels)))