Undo.
[riece] / lisp / riece-layout.el
index 8613d5f..469235b 100644 (file)
@@ -27,9 +27,6 @@
 (require 'riece-globals)
 (require 'riece-misc)
 
-(autoload 'ring-empty-p "ring")
-(autoload 'ring-ref "ring")
-
 (defgroup riece-layout nil
   "Manage window layouts"
   :prefix "riece-"
@@ -131,17 +128,14 @@ This function is used by \"default\" layout."
 (defun riece-reconfigure-windows-predicate ()
   "Return t, if window reconfiguration is needed.
 This function is used by \"default\" layout."
-  ;; The current channel is changed, and some buffers are visible.
-  (unless (or (ring-empty-p riece-channel-history)
-             (equal (ring-ref riece-channel-history 0)
-                    riece-current-channel))
-    (let ((buffers riece-buffer-list))
-      (catch 'found
-       (while buffers
-         (if (and (buffer-live-p (car buffers))
-                  (get-buffer-window (car buffers)))
-             (throw 'found t)
-           (setq buffers (cdr buffers))))))))
+  ;; Check whether there is a buffer which belongs to Riece is visible.
+  (let ((buffers riece-buffer-list))
+    (catch 'found
+      (while buffers
+       (if (and (buffer-live-p (car buffers))
+                (get-buffer-window (car buffers)))
+           (throw 'found t)
+         (setq buffers (cdr buffers)))))))
 
 (defun riece-configure-windows-top (&optional plist)
   "Candidate of `riece-configure-windows-function'.