(riece-make-identity-button-map)))
(defun riece-button-insinuate ()
- (add-hook 'riece-channel-list-mode-hook
- 'riece-button-channel-list-mode-hook)
- (add-hook 'riece-user-list-mode-hook
- 'riece-button-user-list-mode-hook)
- (add-hook 'riece-dialogue-mode-hook
- 'riece-button-dialogue-mode-hook)
(save-excursion
(when riece-channel-list-buffer
(set-buffer riece-channel-list-buffer)
- (riece-button-channel-list-mode-hook))
+ (riece-channel-list-mode-hook)
(when riece-user-list-buffer
(set-buffer riece-user-list-buffer)
- (riece-button-user-list-mode-hook))
+ (riece-user-list-mode-hook)
(let ((buffers riece-buffer-list))
(while buffers
(set-buffer (car buffers))
(if (eq (derived-mode-class major-mode)
'riece-dialogue-mode)
- (riece-button-dialogue-mode-hook))
+ (riece-dialogue-mode-hook))
(setq buffers (cdr buffers)))))
+ (add-hook 'riece-channel-list-mode-hook
+ 'riece-button-channel-list-mode-hook)
+ (add-hook 'riece-user-list-mode-hook
+ 'riece-button-user-list-mode-hook)
+ (add-hook 'riece-dialogue-mode-hook
+ 'riece-button-dialogue-mode-hook)
(add-hook 'riece-after-insert-functions 'riece-button-add-identity-button))
(defun riece-button-uninstall ()
'riece-icon-update-channel-list-buffer t t)))
(defun riece-icon-insinuate ()
+ (save-excursion
+ (when riece-user-list-buffer
+ (set-buffer riece-user-list-buffer)
+ (riece-icon-user-list-mode-hook))
+ (when riece-channel-list-buffer
+ (set-buffer riece-channel-list-buffer)
+ (riece-icon-channel-list-mode-hook)))
(add-hook 'riece-user-list-mode-hook
'riece-icon-user-list-mode-hook)
(add-hook 'riece-channel-list-mode-hook
'riece-icon-channel-list-mode-hook))
(defun riece-icon-uninstall ()
+ (save-excursion
+ (when riece-user-list-buffer
+ (set-buffer riece-user-list-buffer)
+ (remove-hook 'riece-update-buffer-functions
+ 'riece-icon-update-user-list-buffer))
+ (when riece-channel-list-buffer
+ (set-buffer riece-channel-list-buffer)
+ (remove-hook 'riece-update-buffer-functions
+ 'riece-icon-update-user-list-buffer)))
(remove-hook 'riece-user-list-mode-hook
'riece-icon-user-list-mode-hook)
(remove-hook 'riece-channel-list-mode-hook
- 'riece-icon-channel-list-mode-hook)
- (save-excursion
- (set-buffer riece-user-list-buffer)
- (remove-hook 'riece-update-buffer-functions
- 'riece-icon-update-user-list-buffer)
- (set-buffer riece-channel-list-buffer)
- (remove-hook 'riece-update-buffer-functions
- 'riece-icon-update-user-list-buffer)))
+ 'riece-icon-channel-list-mode-hook))
(defvar riece-icon-original-mode-line-buffer-identification nil)
(easy-menu-add riece-menu))
(defun riece-menu-insinuate ()
+ (if riece-command-buffer
+ (with-current-buffer riece-command-buffer
+ (riece-menu-command-mode-hook)))
(add-hook 'riece-command-mode-hook
'riece-menu-command-mode-hook))
(defun riece-menu-uninstall ()
+ (if riece-command-buffer
+ (with-current-buffer riece-command-buffer
+ (easy-menu-remove riece-menu)))
(remove-hook 'riece-command-mode-hook
- 'riece-menu-command-mode-hook)
- (with-current-buffer riece-command-buffer
- (easy-menu-remove riece-menu)))
+ 'riece-menu-command-mode-hook))
(provide 'riece-menu)
'(riece-menu))
(defun riece-toolbar-insinuate ()
+ (if riece-command-buffer
+ (with-current-buffer riece-command-buffer
+ (riece-toolbar-command-mode-hook)))
(add-hook 'riece-command-mode-hook
- 'riece-toolbar-command-mode-hook
- t))
+ 'riece-toolbar-command-mode-hook))
(defun riece-toolbar-uninstall ()
+ (if riece-command-buffer
+ (with-current-buffer riece-command-buffer
+ (riece-unset-toolbar))
(remove-hook 'riece-command-mode-hook
- 'riece-toolbar-command-mode-hook)
- (with-current-buffer riece-command-buffer
- (riece-unset-toolbar)))
+ 'riece-toolbar-command-mode-hook))
(provide 'riece-toolbar)