From: Daiki Ueno Date: Thu, 27 Oct 2011 07:02:10 +0000 (+0900) Subject: Add riece-command-reorder-channels. X-Git-Url: http://cgit.sxemacs.org/?p=riece;a=commitdiff_plain;h=94dfe0d5f1c24594f7ce53e468a70170250ddb37 Add riece-command-reorder-channels. * riece-commands.el (riece-command-reorder-channels): New command. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 716768c..0bd5511 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2011-10-27 Daiki Ueno + + * riece-commands.el (riece-command-reorder-channels): New command. + 2011-04-20 Daiki Ueno * riece-commands.el (riece-command-set-operators) diff --git a/lisp/riece-commands.el b/lisp/riece-commands.el index afaf950..e17b909 100644 --- a/lisp/riece-commands.el +++ b/lisp/riece-commands.el @@ -102,6 +102,23 @@ (riece-command-switch-to-channel channel) (error "No such channel!"))))) +(defun riece-command-reorder-channels () + "Reorder channel list." + (interactive) + (let ((binding (mapcar + (lambda (channel) + (if channel + (riece-parse-identity channel))) + riece-default-channel-binding)) + (pointer riece-current-channels) + channels) + (while pointer + (setq channels (riece-identity-assign-binding (car pointer) channels + binding) + pointer (cdr pointer))) + (setq riece-current-channels channels) + (riece-emit-signal 'channel-list-changed))) + (defun riece-command-select-command-buffer () "Select the command buffer." (interactive)