Support re-insinuate.
authorDaiki Ueno <ueno@unixuser.org>
Sat, 27 Aug 2005 05:25:55 +0000 (05:25 +0000)
committerDaiki Ueno <ueno@unixuser.org>
Sat, 27 Aug 2005 05:25:55 +0000 (05:25 +0000)
lisp/riece-xface.el

index b94b006..7e4bb78 100644 (file)
            'riece-xface-update-user-list-buffer t t))
 
 (defun riece-xface-insinuate ()
            'riece-xface-update-user-list-buffer t t))
 
 (defun riece-xface-insinuate ()
+  (if riece-user-list-buffer
+      (with-current-buffer riece-user-list-buffer
+       (riece-xface-user-list-mode-hook)))
   (add-hook 'riece-user-list-mode-hook
            'riece-xface-user-list-mode-hook))
 
 (defun riece-xface-uninstall ()
   (add-hook 'riece-user-list-mode-hook
            'riece-xface-user-list-mode-hook))
 
 (defun riece-xface-uninstall ()
+  (if riece-user-list-buffer
+      (with-current-buffer riece-user-list-buffer
+       (remove-hook 'riece-update-buffer-functions
+                    'riece-xface-update-user-list-buffer t)))
   (remove-hook 'riece-user-list-mode-hook
   (remove-hook 'riece-user-list-mode-hook
-              'riece-xface-user-list-mode-hook)
-  (with-current-buffer riece-user-list-buffer
-    (remove-hook 'riece-update-buffer-functions
-                'riece-xface-update-user-list-buffer t)))
+              'riece-xface-user-list-mode-hook))
 
 (defun riece-xface-enable ()
   (setq riece-xface-enabled t)
 
 (defun riece-xface-enable ()
   (setq riece-xface-enabled t)