From: ueno Date: Wed, 27 Aug 2003 00:53:44 +0000 (+0000) Subject: * riece.el (riece): Initialize riece-channel-history before X-Git-Tag: riece-0_1_1~8 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=e4e1addcf0e42f060a71e2d6f618defad17ba36a;p=elisp%2Friece.git * 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. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index c526057..ea1d6d5 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,13 @@ 2003-08-27 Daiki Ueno + * 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 + * riece-options.el (riece-channel-history-length): New user option. (riece-connection-timeout): Abolish. diff --git a/lisp/riece-layout.el b/lisp/riece-layout.el index 0d6ffbd..8613d5f 100644 --- a/lisp/riece-layout.el +++ b/lisp/riece-layout.el @@ -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 diff --git a/lisp/riece.el b/lisp/riece.el index 2c95c7c..d328f9b 100644 --- a/lisp/riece.el +++ b/lisp/riece.el @@ -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 ()