* riece.el (riece): Initialize riece-channel-history before
authorueno <ueno>
Wed, 27 Aug 2003 00:53:44 +0000 (00:53 +0000)
committerueno <ueno>
Wed, 27 Aug 2003 00:53:44 +0000 (00:53 +0000)
calling riece-redisplay-buffers.

* riece-layout.el: Autoload ring-empty-p and ring-ref.
(riece-reconfigure-windows-predicate): Check riece-channel-history.

lisp/ChangeLog
lisp/riece-layout.el
lisp/riece.el

index c526057..ea1d6d5 100644 (file)
@@ -1,5 +1,13 @@
 2003-08-27  Daiki Ueno  <ueno@unixuser.org>
 
+       * riece.el (riece): Initialize riece-channel-history before
+       calling riece-redisplay-buffers.
+
+       * riece-layout.el: Autoload ring-empty-p and ring-ref.
+       (riece-reconfigure-windows-predicate): Check riece-channel-history.
+
+2003-08-27  Daiki Ueno  <ueno@unixuser.org>
+
        * riece-options.el (riece-channel-history-length): New user option.
        (riece-connection-timeout): Abolish.
 
index 0d6ffbd..8613d5f 100644 (file)
@@ -27,6 +27,9 @@
 (require 'riece-globals)
 (require 'riece-misc)
 
+(autoload 'ring-empty-p "ring")
+(autoload 'ring-ref "ring")
+
 (defgroup riece-layout nil
   "Manage window layouts"
   :prefix "riece-"
@@ -129,7 +132,9 @@ This function is used by \"default\" layout."
   "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 (equal riece-last-channel riece-current-channel)
+  (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
index 2c95c7c..d328f9b 100644 (file)
@@ -254,10 +254,10 @@ If optional argument CONFIRM is non-nil, ask which IRC server to connect."
       (setq riece-server (riece-server-name-to-server riece-server)))
   (riece-create-buffers)
   (switch-to-buffer riece-command-buffer)
+  (setq riece-channel-history (make-ring riece-channel-history-length))
   (riece-redisplay-buffers)
   (riece-open-server riece-server "")
   (run-hooks 'riece-startup-hook)
-  (setq riece-channel-history (make-ring riece-channel-history-length))
   (message "%s" (substitute-command-keys "Type \\[describe-mode] for help")))
 
 (defun riece-exit ()