From: ueno Date: Mon, 8 Aug 2005 07:52:38 +0000 (+0000) Subject: * riece.el (riece-dialogue-mode-map): Bind X-Git-Tag: channel-coding-branchpoint~189 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=8c559007fc96a9fa9945fa5bd532e6a15cee9c54;p=elisp%2Friece.git * riece.el (riece-dialogue-mode-map): Bind riece-command-toggle-others-buffer-mode. * riece-commands.el (riece-command-toggle-others-buffer-mode): New command. * riece-layout.el (riece-configure-windows): Hide riece-others-buffer if riece-others-buffer-mode is nil. * riece-options.el (riece-saved-forms): Add riece-others-buffer-mode and riece-channel-list-buffer-mode. (riece-others-buffer-mode): New user option. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 4b1900a..8e7737c 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,18 @@ +2005-08-08 Daiki Ueno + + * riece.el (riece-dialogue-mode-map): Bind + riece-command-toggle-others-buffer-mode. + + * riece-commands.el (riece-command-toggle-others-buffer-mode): New + command. + + * riece-layout.el (riece-configure-windows): Hide + riece-others-buffer if riece-others-buffer-mode is nil. + + * riece-options.el (riece-saved-forms): Add + riece-others-buffer-mode and riece-channel-list-buffer-mode. + (riece-others-buffer-mode): New user option. + 2005-08-06 Daiki Ueno * riece-alias.el (riece-alias-alternate-separator): Set to "@". diff --git a/lisp/riece-commands.el b/lisp/riece-commands.el index 90b88fd..7bcbfa5 100644 --- a/lisp/riece-commands.el +++ b/lisp/riece-commands.el @@ -144,6 +144,13 @@ the layout to the selected layout-name." riece-save-variables-are-dirty t) (riece-command-configure-windows)) +(defun riece-command-toggle-others-buffer-mode () + (interactive) + (setq riece-others-buffer-mode + (not riece-others-buffer-mode) + riece-save-variables-are-dirty t) + (riece-command-configure-windows)) + (defun riece-command-toggle-user-list-buffer-mode () (interactive) (setq riece-user-list-buffer-mode diff --git a/lisp/riece-layout.el b/lisp/riece-layout.el index 05bdabd..f83319e 100644 --- a/lisp/riece-layout.el +++ b/lisp/riece-layout.el @@ -154,11 +154,13 @@ This function is used by \"default\" layout." (set-window-buffer (selected-window) riece-command-buffer) (select-window rest-window) - (set-window-buffer (split-window rest-window) - riece-others-buffer) + (if riece-others-buffer-mode + (set-window-buffer (split-window rest-window) + riece-others-buffer)) (set-window-buffer (selected-window) riece-channel-buffer)) - (if (eq vpos 'middle) + (if (and (eq vpos 'middle) + riece-others-buffer-mode) (let ((rest-window (split-window))) (set-window-buffer (selected-window) riece-channel-buffer) @@ -167,10 +169,14 @@ This function is used by \"default\" layout." (set-window-buffer rest-window riece-command-buffer)) (let ((rest-window (split-window nil (- (window-height) 4)))) - (set-window-buffer (selected-window) - riece-others-buffer) - (set-window-buffer (split-window) - riece-channel-buffer) + (if riece-others-buffer-mode + (progn + (set-window-buffer (selected-window) + riece-others-buffer) + (set-window-buffer (split-window) + riece-channel-buffer)) + (set-window-buffer (selected-window) + riece-channel-buffer)) (set-window-buffer rest-window riece-command-buffer))))) (if (eq vpos 'bottom) diff --git a/lisp/riece-options.el b/lisp/riece-options.el index 51735ff..d694dba 100644 --- a/lisp/riece-options.el +++ b/lisp/riece-options.el @@ -39,7 +39,9 @@ (defcustom riece-saved-forms '(riece-server-alist riece-channel-buffer-mode + riece-others-buffer-mode riece-user-list-buffer-mode + riece-channel-list-buffer-mode riece-layout) "Variables saved after each session is completed." :type 'string @@ -242,6 +244,11 @@ way is to put Riece variables on .emacs or file loaded from there." :type 'boolean :group 'riece-looks) +(defcustom riece-others-buffer-mode t + "When non-nil, Riece will display an \"*Others*\" buffer." + :type 'boolean + :group 'riece-looks) + (defcustom riece-user-list-buffer-mode t "When non-nil, Riece will display a nick list buffer." :type 'boolean diff --git a/lisp/riece.el b/lisp/riece.el index 5b0105f..95c08ba 100644 --- a/lisp/riece.el +++ b/lisp/riece.el @@ -166,6 +166,7 @@ If optional argument SAFE is nil, overwrite previous definitions." "f" riece-command-finger "\C-tf" riece-command-toggle-freeze "\C-to" riece-command-toggle-own-freeze + "\C-tO" riece-command-toggle-others-buffer-mode "\C-tu" riece-command-toggle-user-list-buffer-mode "\C-tc" riece-command-toggle-channel-buffer-mode "\C-tC" riece-command-toggle-channel-list-buffer-mode