Commits

daiki  committed 9d2c160

Sync riece with upstream version 0.2.2

  • Participants
  • Parent commits 5897e29

Comments (0)

Files changed (38)

+2004-05-04  Daiki Ueno  <ueno@unixuser.org>
+
+	* Riece: Version 0.2.2 released.
+	* configure.ac: Bump up version to 0.2.2.
+
+2004-03-09  Daiki Ueno  <ueno@unixuser.org>
+
+	* Riece: Version 0.2.1 released.
+	* configure.ac: Bump up version to 0.2.1.
+
+2004-03-07  Daiki Ueno  <ueno@unixuser.org>
+
+	* Riece: Version 0.2.0 released.
+	* configure.ac: Bump up version to 0.2.0.
+
+2004-01-28  Daiki Ueno  <ueno@unixuser.org>
+
+	* Riece: Version 0.1.8 released.
+	* configure.ac: Bump up version to 0.1.8.
+
 2003-12-28  Norbert Koch  <viteno@xemacs.org>
 
 	* Makefile (VERSION): XEmacs package 1.14 released.

File configure.ac

 AC_INIT(configure.ac)
 AC_PREREQ(2.50)
-AM_INIT_AUTOMAKE(riece, 0.1.7)
+AM_INIT_AUTOMAKE(riece, 0.2.2)
 
 AC_ISC_POSIX
 AC_PROG_INSTALL

File doc/riece-ja.texi

 @setfilename riece-ja.info
 @settitle Riece -- An IRC client for Emacsen --
 @c %**end of header
-@set VERSION 0.1.7
+@set VERSION 0.2.2
 @c @documentlanguage ja
 
 @dircategory GNU Emacs Lisp
 @ifinfo
 This file describes Riece.
 
-Copyright (C) 2003 Daiki Ueno.
+Copyright (C) 2003,2004 Daiki Ueno.
 
 Permission is granted to copy, distribute and/or modify this document
 under the terms of the GNU Free Documentation License, Version 1.1 or
 @chapter Overview
 
 Riece $B$O!"D9$$4V%a%s%F%J%s%9IT2DG=$J>uBV$K$"$C$?(B Liece $B$N%3!<%I$r40A4$K(B
-$B=q$-D>$7$?$b$N$G$9!#%$%s%?!<%U%'!<%9$O!"(BLiece $B$+$i$[$H$s$I$=$N$^$^F'=1$7(B
-$B$F$$$^$9!#(B
+$B=q$-D>$7$?$b$N$G$9!#%f!<%6%$%s%?!<%U%'!<%9$NBgItJ,$O(B Liece $B$N$b$N$rF'=1(B
+$B$7$F$$$^$9!#(B
 
 $B8=:_$N$H$3$m(B IRC $B%/%i%$%"%s%H$H$7$F$N5!G=$O==J,$G$O$"$j$^$;$s$,!"(BLiece 
 $B$K$O$J$$FCD9$,$$$/$D$+$"$j$^$9!#0J2<$K$=$l$i$N0lIt$r5s$2$^$9!#(B
 
 @itemize @bullet
-@item $BJ#?t$N%5!<%P$KF1;~$K$D$J$2$k(B
-@item $B0l1~(B API $B$i$7$$(B API $B$,MQ0U$5$l$F$$$k(B
-@item $B%3!<%I%5%$%:$,>.$5$$(B (Liece $B$NH>J,DxEY(B)
-@item $B%"%I%*%s$K$h$k3HD%$,2DG=(B
-@item APEL $B$,$$$i$J$$(B
+@item $BJ#?t$N(B IRC $B%5!<%P$KF1;~$K@\B32DG=(B
+@item $B%"%I%*%s$K$h$j5!G=$NDI2C$d<h$j30$7$,2DG=(B
+@item $BB>$N(B elisp $B%Q%C%1!<%8$K0MB8$7$J$$$?$a!"%$%s%9%H!<%k$,4JC1(B
+@item $B@_Dj$,4JC1$G!"A02s5/F0;~$N@_Dj$r5-O?!&I|85$9$k;EAH$_$rDs6!(B
+@item $BCJ3,E*$JA`:n@bL@=q(B($B8=:_$OF|K\8l$N$_(B)$B$,ImB0(B
+@item $B:G?7$N(B IRC $B$N%/%i%$%"%s%H%W%m%H%3%k(B (RFC2812) $B$K=`5r(B
 @end itemize
 
 $B$h$j>\$7$$>pJs$O!"0J2<$N%Z!<%8$r8fMw$/$@$5$$!#(B
 
 @itemize @bullet
+@item http://www.nongnu.org/riece/
 @item http://wiliki.designflaw.org/index.cgi?Riece&l=jp
 @item http://www.unixuser.org/~ueno/liece/
 @end itemize
 XEmacs $B$N%Q%C%1!<%8$H$7$F%$%s%9%H!<%k$9$k>l9g$K$O0J2<$N$h$&$K$7$^$9!#(B
 
 @example
-./configure --with-xemacs[=xemacs-21.4.13]
+./configure --with-xemacs[=xemacs-21.4.15]
 make package
 make install-package
 @end example
 @node Startup File,  , Installation, Getting started
 @section Startup file
 
-$B$O$8$a$F$D$+$&>l9g$K$O!"$H$/$K2?$b@_Dj$9$kI,MW$O$"$j$^$;$s!#(B
+$B=i$a$F;H$&>l9g$K$O!"FC$K2?$b@_Dj$9$kI,MW$O$"$j$^$;$s!#(B
 $B$3$N>O$OFI$_Ht$P$7$F$/$@$5$$!#(B
 
 Riece $B$O@_Dj%U%!%$%k$rJQ?t(B @code{riece-directory} $B$G;X<($5$l$k%G%#%l%/%H(B
 $B%j(B ($B%G%U%)%k%H$O(B @file{~/.riece/}) $B$+$iFI$_9~$_$^$9!#$3$N%G%#%l%/%H%j$K(B
-$B$O0J2<$NFs<oN`$N@_Dj%U%!%$%k$,3JG<$5$l$^$9!#(B
+$B$O0J2<$N(B 2 $B$D$N@_Dj%U%!%$%k$,3JG<$5$l$^$9!#(B
 
 @table @code
 @item riece-saved-variables-file
 * Connecting to multiple servers::  $BJ#?t$N%5!<%P$K$D$J$0$K$O(B
 @end menu
 
-@node Windows, Commands, Basic usage, Basic usage
+@node Windows, Indicators, Basic usage, Basic usage
 @section Windows
 
-$B%G%U%)%k%H$N@_Dj$G$O!"%A%c%s%M%k$KF~$k$H!"2<$N?^$K<($9$h$&$J8^$D$N%&%#%s(B
+$B%G%U%)%k%H$N@_Dj$G$O!"%A%c%s%M%k$KF~$k$H!"2<$N?^$K<($9$h$&$J(B 5 $B$D$N%&%#%s(B
 $B%I%&$+$i$J$k2hLL$K@Z$jBX$o$j$^$9!#(B
 
 @example
 $B%"%6!<%:%P%C%U%!(B (@samp{*Others*})$B!#8=:_$N%A%c%s%M%k0J30$N2qOC$,N.$l$^$9!#(B
 @end enumerate
 
-@node Indicators
+@node Indicators, Commands, Windows, Basic usage
 @section Indicators
 
 $B%3%^%s%I%P%C%U%!$d%A%c%s%M%k%P%C%U%!$N%b!<%I%i%$%s$N:8C<$K$O!"(B
 $B$P(B @samp{f})
 @end enumerate
 
-@node Commands, Connecting to multiple servers, Windows, Basic usage
+@node Commands, Connecting to multiple servers, Indicators, Basic usage
 @section Commands
 
 $BJ8>O$rF~NO$7$?%P%C%U%!$O!"%3%^%s%I%P%C%U%!$H8F$P$l!"%3%^%s%I%P%C%U%!$+$i(B
 $B%f!<%6$KH/8@8"$rM?$($^$9!#A0CV0z?t(B (@kbd{C-u}) $B$rM?$($k$H!"%f!<%6$+$iH/8@8"$rC%$$$^$9(B(@code{riece-command-set-speakers})
 @item C-c V
 @findex riece-version
-Riece $B$N%P!<%8%g%s$rI=<($7$^$9!#(B
+Riece $B$N%P!<%8%g%s$rI=<($7$^$9!#A0CV0z?t(B (@kbd{C-u}) $B$rM?$($k$H!"$h$j>\:Y$J>pJs$rI=<($7$^$9!#(B
 @item C-c /
 @findex riece-command-raw
 $B@8$N(B IRC $B%3%^%s%I$rAw$j$^$9(B(@code{riece-command-raw})
 $B%f!<%6%j%9%H%P%C%U%!$NI=<(!&HsI=<($r@Z$jBX$($^$9(B(@code{riece-command-toggle-user-list-buffer-mode})
 @item C-c C-t f
 @findex riece-command-toggle-freeze
-$B%A%c%s%M%k%P%C%U%!!"$^$?$O%@%$%"%m%0%P%C%U%!$N%9%/%m!<%k$r6X;_$7$^$9(B(@code{riece-command-toggle-freeze})
+$B%A%c%s%M%k%P%C%U%!!"$^$?$O%@%$%"%m%0%P%C%U%!$rE`7k(B($B%9%/%m!<%k$r6X;_(B)$B$7$^(B
+$B$9(B(@code{riece-command-toggle-freeze})
 @item C-c C-t o
 @findex riece-command-toggle-own-freeze
-$B%A%c%s%M%k%P%C%U%!!"$^$?$O%@%$%"%m%0%P%C%U%!$N%9%/%m!<%k$r!"<+J,$,H/8@$9$k$^$G6X;_$7$^$9(B(@code{riece-command-toggle-own-freeze})
+$B%A%c%s%M%k%P%C%U%!!"$^$?$O%@%$%"%m%0%P%C%U%!$r!"<+J,$,H/8@$9$k$^$GE`7k$7(B
+$B$^$9(B(@code{riece-command-toggle-own-freeze})
 @item C-c C-t a
 @findex riece-command-toggle-away
 $B<+J,$NN%@J>uBV$r@Z$jBX$($^$9(B(@code{riece-command-toggle-away})
 @node Server settings, Add-ons, Advanced usage, Advanced usage
 @section Server settings
 
-IRC $B%5!<%P$O(B @code{riece-server} $BJ8;zNs$H$7$F;XDj$7$^$9!#(B
-$B$3$3$G(B @code{riece-server} $B$N%U%)!<%^%C%H$O(B "<$B%5!<%P$N%[%9%HL>(B>:<$B%]!<%HHV9f(B>[:<$B%Q%9%o!<%I(B>]" $B$H$J$j$^$9!#(B
+$B5/F0;~$K%G%U%)%k%H$G@\B3$9$k(B IRC $B%5!<%P$O(B @code{riece-server} $B$G;XDj$7$^$9!#(B
 @vindex riece-server
 
+$B$3$3$G(B @code{riece-server} $B$OJ8;zNs$G$"$j!"$=$N%U%)!<%^%C%H$O<!$N$h$&$K(B
+$B$J$j$^$9!#(B
+@example
+ "<$B%5!<%P$N%[%9%HL>(B>:<$B%]!<%HHV9f(B>[:<$B%Q%9%o!<%I(B>]"
+@end example
+
 @code{riece-server-alist} $B$rE,@Z$K@_Dj$9$k$H!"%-!<%o!<%I$r;H$C$F!"$h$j>\(B
 $B:Y$J;XDj$,2DG=$K$J$j$^$9!#0J2<$OI.<T$N@_Dj$+$iH4$-=P$7$?Nc$G$9!#(B
 @vindex riece-server-alist
 @item riece-async
 Emacs $B$,(B busy or suspend $B>uBV$K$J$k$3$H$KHw$(!"(B
 PING $B$K1~Ez$9$k(B local proxy $B7PM3$G(B IRC $B%5!<%P$K@\B3(B
+@item riece-lsdb
+$B%"%I%l%9D"(B LSDB (Lovely Sister Database)
+@uref{http://lsdb.sourceforge.jp} $B$HO"7H(B
+@item riece-xface
+$B%f!<%6%j%9%H%P%C%U%!$K%f!<%6$N(B X-Face $B$rI=<((B
+@item riece-ctlseq
+$B%3%s%H%m!<%k%7!<%1%s%9(B (^B $B$J$I(B) $B$K$h$k6/D4I=<((B
 @end table
 
 $B$3$l$i$N$&$A!"(B@samp{riece-highlight} $B$H(B @samp{riece-ctcp}$B!"(B
 * Debugging::                   
 * Modules::                     
 * Namespace management::        
+* Signals::                     
 @end menu
 
 @node CVS, Debugging, Development, Development
 @item riece-user
 user object $B4XO"$NDj5A(B 
 
+@item riece-signal
+$B%7%0%J%k(B(@xref{Signals})$B4IM}(B
 @item riece-misc
 $B;(B?$J4X?t$NDj5A(B($B%$%s%i%$%s4X?t$r=|$/(B) 
 @item riece-display
 @code{make-network-connection} $B$K$h$k<BAu(B)
 @end table
 
-@node Namespace management,  , Modules, Development
+@node Namespace management, Signals, Modules, Development
 @section Namespace management
 
 Riece $B$OJ#?t$N%5!<%P$KF1;~$K@\B3$9$k$?$a!"%5!<%PKh$KJL!9$NL>A06u4V$r4IM}(B
 $B%f!<%6$NL>A0$,JQ99$5$l$?$3$H$rI=L@$7$^$9(B 
 @end defun
 
+@node Signals,  , Namespace management, Development
+@section Signals
+
+$B2hLL$N:FIA2h$r8zN(NI$/9T$&$?$a$K!"%$%Y%s%H$HIA2hBP>]$N%*%V%8%'%/%H(B($B%P%C(B
+$B%U%!$d!"%b!<%I%i%$%s$N0u(B @pxref{Indicators})$B$r7k$SIU$1$k%a%+%K%:%`$rMQ0U(B
+$B$7$F$$$^$9!#(B
+
+$B2?$i$+$N%$%Y%s%H$,H/@8$9$k$H!"%7%0%J%k$,Aw=P$5$l$^$9!#%7%0%J%k$N35G0$O!"(B
+Qt $B$d(B GTK+ $B$H$$$C$?(B GUI $B%D!<%k%-%C%H$KMQ0U$5$l$F$$$k$b$N$HF1MM$G$9!#(B
+
+$B%7%0%J%k$rAw=P$9$k$K$O!"(B@samp{riece-emit-signal} $B$r;H$$$^$9!#(B
+
+@defun riece-emit-signal signal-name &rest args
+@var{signal-name} $B$G;X<($5$l$k%7%0%J%k$r!"0z?t(B @var{args} $B$H$H$b$KAw=P$7$^$9(B
+@end defun
+
+$B%7%0%J%k$K1~Ez$9$k$K$O!"(B@samp{riece-connect-signal} $B$r;H$$$^$9!#(B
+
+@defun riece-connect-signal signal-name slot-function &optional filter-function handback
+@var{signal-name} $B$G;X<($5$l$k%7%0%J%k$K1~Ez$9$k4X?t(B @var{slot-function} 
+$B$r7k$SIU$1$^$9!#(B@var{slot-function} $B$K;XDj$5$l$?4X?t$O(B 2 $B$D$N0z?t$r<h$j$^(B
+$B$9!#Bh(B1$B$N0z?t$O$O%7%0%J%k$rI=$7$^$9!#$^$?!"Bh(B2$B$N0z?t$H$7$F!"(B
+@var{handback} $B0z?t$KM?$($i$l$?%*%V%8%'%/%H$,$=$N$^$^EO$5$l$^$9!#(B
+
+@var{filter-function} $B$O!"<u?.$7$?%7%0%J%k$K1~Ez$9$Y$-$+$I$&$+$rH=Dj$9$k(B
+$B4X?t$G$9!#$3$N4X?t$O0z?t$H$7$F%7%0%J%k%*%V%8%'%/%H$r<u$1<h$j!"(B@samp{nil}
+$B$^$?$O(B @samp{t} $B$rJV$9$3$H$,4|BT$5$l$^$9!#JV$jCM$,(B @samp{nil} $B$N>l9g$K$O!"(B
+@var{slot-function} $B$,8F$P$l$k$3$H$O$"$j$^$;$s!#(B
+@end defun
+
+$B%7%0%J%k%*%V%8%'%/%H$K%"%/%;%9$9$k$K$O!"0J2<$N4X?t$r;H$$$^$9!#(B
+
+@defun riece-signal-name
+$B%7%0%J%k$NL>A0(B($B%7%s%\%k(B)$B$rJV$7$^$9!#(B
+@end defun
+
+@defun riece-signal-args
+$B%7%0%J%kAw=P;~$KM?$($i$l$?0z?t$rJV$7$^$9!#(B
+@end defun
+
+$B8=:_!"0J2<$N%7%0%J%k$,I8=`$GEPO?$5$l$F$$$^$9!'(B
+
+@table @samp
+@item channel-list-changed
+$B;22C$7$F$$$k%A%c%s%M%k$N0lMw$NJQ2=(B
+@item user-list-changed
+$B%A%c%s%M%k$N;22C<T0lMw$NJQ2=(B
+($B0z?t$O%A%c%s%M%k$KAjEv$9$k(B @samp{riece-identity} $B%*%V%8%'%/%H(B)
+@item channel-switched
+$B8=:_$N%A%c%s%M%k$r0\F0(B
+@item user-joined-channel
+$B%f!<%6$,%A%c%s%M%k$K;22C(B
+($B0z?t$O!"%f!<%6$*$h$S%A%c%s%M%k$KAjEv$9$k(B @samp{riece-identity} $B%*%V%8%'%/%H(B)
+@item user-left-channel
+$B%f!<%6$,%A%c%s%M%k$+$iN%C&(B
+($B0z?t$O!"%f!<%6$*$h$S%A%c%s%M%k$KAjEv$9$k(B @samp{riece-identity} $B%*%V%8%'%/%H(B)
+@item user-renamed
+$B%f!<%6$,L>A0$rJQ99(B
+($B0z?t$O!"0JA0$H8=:_$NL>A0$KAjEv$9$k(B @samp{riece-identity} $B%*%V%8%'%/%H(B)
+@item user-away-changed
+$B%f!<%6$NN%@J>uBV$NJQ2=(B
+($B0z?t$O!"%f!<%6$KAjEv$9$k(B @samp{riece-identity} $B%*%V%8%'%/%H(B)
+@item user-operator-changed
+$B%f!<%6$N%*%Z%l!<%?>uBV$NJQ2=(B
+($B0z?t$O!"%f!<%6$KAjEv$9$k(B @samp{riece-identity} $B%*%V%8%'%/%H(B)
+@item channel-topic-changed
+$B%A%c%s%M%k$N%H%T%C%/$NJQ2=(B
+($B0z?t$O!"%A%c%s%M%k$KAjEv$9$k(B @samp{riece-identity} $B%*%V%8%'%/%H(B)
+@item channel-modes-changed
+$B%A%c%s%M%k$N%b!<%I$NJQ2=(B
+($B0z?t$O!"%A%c%s%M%k$KAjEv$9$k(B @samp{riece-identity} $B%*%V%8%'%/%H(B)
+@item channel-operators-changed
+$B%A%c%s%M%k$G%*%Z%l!<%?8"8B$r;}$D%f!<%6$N0lMw$NJQ2=(B
+($B0z?t$O!"%A%c%s%M%k$KAjEv$9$k(B @samp{riece-identity} $B%*%V%8%'%/%H(B)
+@item channel-speakers-changed
+$B%A%c%s%M%k$GH/8@8"$r;}$D%f!<%6$N0lMw$NJQ2=(B
+($B0z?t$O!"%A%c%s%M%k$KAjEv$9$k(B @samp{riece-identity} $B%*%V%8%'%/%H(B)
+@item buffer-freeze-changed
+$B%P%C%U%!$NE`7k>uBV$NJQ2=(B
+($B0z?t$O%P%C%U%!(B)
+@end table
+
 @node Index, Function Index, Development, Top
 @chapter Index
 @printindex cp

File lisp/COMPILE

 		riece-coding
 		riece-complete
 
+		riece-mode
 		;; riece-identity -+-> riece-channel
 		;;                 +-> riece-user
 		riece-identity
 		riece-user
 
 		riece-misc
+		riece-signal
+
 		;; riece-layout ---> riece-display
 		riece-layout
 		riece-display
 		riece-keyword
 		riece-menu
 		riece-icon
-		riece-async))))
+		riece-async
+		riece-lsdb
+		riece-xface
+		riece-ctlseq))))
 
 (defun riece-compile-modules (modules)
   (let ((load-path (cons nil load-path)))

File lisp/ChangeLog

+2004-05-04  Daiki Ueno  <ueno@unixuser.org>
+
+	* Riece: Version 0.2.2 released.
+	* riece-version.el (riece-version-number): Bump up to 0.2.2.
+
+	* riece-ctlseq.el (riece-ctlseq-hide-controls): New user option.
+
+	* riece-keyword.el (riece-keyword): Fixed the parent custom group.
+	* riece-url.el (riece-url): Fixed the parent custom group.
+
+2004-05-04  Daiki Ueno  <ueno@unixuser.org>
+
+	* riece-ctlseq.el: New add-on.
+	* COMPILE (riece-modules): Add riece-ctlseq.
+	* Makefile.am (EXTRA_DIST): Add riece-ctlseq.el.
+
+2004-04-29  OHASHI Akira  <bg66@koka-in.org>
+
+	* riece-log.el (riece-log-get-directory): Use a canonicalized
+	channel name.
+	(riece-log-open-directory-function): New user option.
+	(riece-log-open-directory): Use it.
+	(riece-log-insinuate): Add new key bind.
+
+2004-04-05  Daiki Ueno  <ueno@unixuser.org>
+
+	* riece-button.el (riece-button-requires): Abolish.
+
+2004-03-29  Daiki Ueno  <ueno@unixuser.org>
+
+	* riece.el (riece-buffer-alist): Rename *Commands* -> *Command*.
+	(riece-command-mode): Rename Commands -> Command.
+
+2004-03-28  Daiki Ueno  <ueno@unixuser.org>
+
+	* riece-signal.el: Require 'riece-options for riece-debug.
+	* riece-async.el: Require 'riece-options for riece-debug.
+
+2004-03-28  Daiki Ueno  <ueno@unixuser.org>
+
+	* riece.el (riece-command-mode): Don't display
+	riece-freeze-indicator on the modeline of the command buffer.
+	(riece-dialogue-mode): Make riece-freeze-indicator local to the
+	buffer whose major-mode is derived from riece-dialogue-mode.
+
+	* riece-display.el: Add autoload setting for derived-mode-class.
+	(riece-update-status-indicators): Check riece-freeze flag for each
+	buffer visible in the selected frame.
+
+	* riece-commands.el: Add autoload setting for derived-mode-class.
+	(riece-command-toggle-freeze): Don't switch to the channel buffer
+	if major-mode of the current buffer is derived from
+	riece-dialogue-mode.  Which allows to lock "*Others*" buffer.
+	(riece-command-toggle-own-freeze): Ditto.
+
+	* riece-globals.el (riece-freeze): Fix doc.
+	(riece-freeze-indicator): Add doc.
+	(riece-channel-indicator): Fix doc.
+	(riece-long-channel-indicator): Fix doc.
+	(riece-channel-list-indicator): Fix doc.
+	(riece-user-indicator): Fix doc.
+	(riece-away-indicator): Add doc.
+	(riece-operator-indicator): Add doc.
+
+2004-03-24  Daiki Ueno  <ueno@unixuser.org>
+
+	* riece-unread.el (riece-unread-after-display-message-function):
+	Treat private messages as unread.
+
+2004-03-21  Daiki Ueno  <ueno@unixuser.org>
+
+	* riece.el (riece-exit): Don't clear riece-user-list-buffer and
+	riece-channel-list-buffer.
+
+2004-03-21  Daiki Ueno  <ueno@unixuser.org>
+
+	* riece.el (riece-exit): Clear riece-channel-buffer,
+	riece-user-list-buffer, and riece-channel-list-buffer.
+
+2004-03-20  Daiki Ueno  <ueno@unixuser.org>
+
+	* riece-server.el (riece-open-server): Append the server-name to
+	the prompt string.
+
+2004-03-14  Daiki Ueno  <ueno@unixuser.org>
+
+	* riece-display.el (riece-display-connect-signals): Update
+	riece-long-channel-indicator on 'channel-modes-changed signal.
+
+	* riece-naming.el (riece-naming-assert-channel-modes): New
+	function renamed from riece-handle-channel-modes.
+
+	* riece-misc.el: Require 'riece-mode.
+	(riece-concat-channel-modes): Display mode parameter.
+
+	* riece-channel.el: Require 'riece-mode.
+	(riece-channel-toggle-mode): Store mode "objects" instead of mode
+	"flags".
+	* riece-user.el: Require 'riece-mode.
+	(riece-user-toggle-mode): Store mode "objects" instead of mode
+	"flags".
+
+	* riece-handle.el: Require 'riece-mode.
+	(riece-handle-mode-message): Use riece-parse-mode.
+	(riece-parse-mode): Moved to riece-mode.el.
+	(riece-handle-channel-modes): Moved to riece-naming.el.
+
+	* riece-300.el: Require 'riece-mode.
+	(riece-handle-324-message): Use riece-parse-mode.
+
+	* riece-mode.el: New file.
+	* Makefile.am (EXTRA_DIST): Add riece-mode.el.
+	* COMPILE (riece-modules): Add riece-mode.
+
+2004-03-13  Daiki Ueno  <ueno@unixuser.org>
+
+	* riece-ctcp.el: "Error occurred in XXX" -> "Error in XXX".
+	* riece-filter.el: "Error occurred in XXX" -> "Error in XXX".
+	* riece-signal.el: "Error occurred in XXX" -> "Error in XXX".
+
+2004-03-09  Daiki Ueno  <ueno@unixuser.org>
+
+	* Riece: Version 0.2.1 released.
+	* riece-version.el (riece-version-number): Bump up to 0.2.1.
+
+2004-03-09  Daiki Ueno  <ueno@unixuser.org>
+
+	* riece-emacs.el (riece-propertize-modeline-string): Fix arguments
+	for add-text-properties.
+
+2004-03-08  Daiki Ueno  <ueno@unixuser.org>
+
+	* riece-xface.el (riece-xface-insinuate): Use
+	riece-user-list-mode-hook to setup riece-update-buffer-functions
+	in user-list buffer.
+
+2004-03-07  Daiki Ueno  <ueno@unixuser.org>
+
+	* Riece: Version 0.2.0 released.
+	* riece-version.el (riece-version-number): Bump up to 0.2.0.
+
+	* riece-ctcp.el (riece-handle-ctcp-version-request): Fixed bug in
+	formatting target identity.
+	(riece-handle-ctcp-ping-request): Ditto.
+	(riece-handle-ctcp-clientinfo-request): Ditto.
+
+2004-03-07  Daiki Ueno  <ueno@unixuser.org>
+
+	* riece-display.el: Rename some signals.
+
+	* riece-commands.el (riece-command-set-operators): Reverse user-list.
+	(riece-command-set-speakers): Ditto.
+
+2004-03-07  Daiki Ueno  <ueno@unixuser.org>
+
+	* riece-unread.el
+	(riece-unread-format-identity-for-channel-list-indicator): Escape
+	% -> %%; use riece-propertize-modeline-string.
+
+	* riece-history.el
+	(riece-history-format-identity-for-channel-list-indicator): Escape
+	% -> %%; use riece-propertize-modeline-string.
+
+	* riece-highlight.el
+	(riece-highlight-format-identity-for-channel-list-indicator):
+	Escape % -> %%; use riece-propertize-modeline-string.
+
+	* riece-display.el
+	(riece-format-identity-for-channel-list-indicator): Escape % ->
+	%%.
+	(riece-update-channel-list-indicator): Rewrite.
+
+	* riece-emacs.el (riece-propertize-modeline-string): New function.
+	* riece-xemacs.el (riece-propertize-modeline-string): New function.
+
+2004-03-07  Daiki Ueno  <ueno@unixuser.org>
+
+	* riece-unread.el
+	(riece-unread-format-identity-for-channel-list-indicator): New
+	function.
+	(riece-unread-insinuate): Setup
+	riece-format-identity-for-channel-list-indicator-functions.
+
+	* riece-history.el
+	(riece-history-format-identity-for-channel-list-buffer): New
+	function.
+	(riece-history-insinuate): Setup
+	riece-format-identity-for-channel-list-indicator-functions.
+
+	* riece-highlight.el
+	(riece-highlight-format-identity-for-channel-list-indicator): New
+	function.
+	(riece-highlight-insinuate): Setup
+	riece-format-identity-for-channel-list-indicator-functions.
+
+	* riece-display.el
+	(riece-format-identity-for-channel-list-buffer): Rename from
+	riece-format-channel-list-line.
+	(riece-format-identity-for-channel-list-indicator): New function.
+	(riece-update-channel-list-indicator): Use it.
+
+2004-03-07  Daiki Ueno  <ueno@unixuser.org>
+
+	* riece-handle.el (riece-parse-modes): Make sure that mode params
+	are started at the beginning of the mode string.
+	(riece-handle-channel-modes): Fixed arguments passed to
+	riece-channel-toggle-*.
+
+2004-03-06  Daiki Ueno  <ueno@unixuser.org>
+
+	* riece-xface.el (riece-xface-insinuate): Set
+	'riece-update-buffer-functions local to the user-list buffer.
+
+	* riece-unread.el: Require 'riece-signal instead of
+	'riece-display.
+	(riece-unread-after-display-message-function): Emit
+	'riece-update-buffer signal instead of
+	'riece-unread-channel-list-update signal.
+
+	* riece-ndcc.el: Don't require 'riece-display.
+
+	* riece-naming.el: Require 'riece-signal instead of
+	'riece-display.
+	(riece-naming-assert-rename): Don't rename buffer.
+
+	* riece-history.el (riece-history-format-channel-list-line): Don't
+	append "\n".
+
+	* riece-handle.el: Require 'riece-signal instead of
+	'riece-display.
+	(riece-parse-modes): Rename from riece-parse-channel-modes; don't
+	update channel modes.
+	(riece-handle-channel-modes): New function which processes the
+	result of riece-parse-modes.
+	(riece-handle-mode-message): Use it.
+
+	* riece-filter.el: Don't require 'riece-display.
+	* riece-display.el: Require 'riece-signal; connect
+	'riece-update-buffer signal.
+
+	* riece-ctcp.el: Don't require 'riece-display.
+
+	* riece-signal.el: New module splitted from riece-display.el.
+	* Makefile.am (EXTRA_DIST): Add riece-signal.
+	* COMPILE (riece-modules): Add riece-signal.
+
+2004-03-05  Daiki Ueno  <ueno@unixuser.org>
+
+	* riece-unread.el (riece-unread-after-display-message-function):
+	Emit 'riece-unread-channel-list-update signal.
+	(riece-unread-insinuate): Connect the signal to the function which
+	updates channel-list buffer.
+
+	* riece-display.el (riece-display-connect-signals): Fix parenthesis.
+
+2004-03-04  Daiki Ueno  <ueno@unixuser.org>
+
+	* riece-display.el (riece-emit-signal): Fixed bug that errors
+	during signal filter execution were not caught.
+	(riece-display-connect-signals): Check riece-current-channel is set.
+
+2004-03-01  Daiki Ueno  <ueno@unixuser.org>
+
+	* riece-display.el (riece-display-connect-signals): Fixed bug in
+	signal filters.
+
+	* riece-handle.el (riece-handle-mode-message): Don't call
+	riece-parse-channel-modes if channel doesn't match with
+	riece-channel-regexp.
+
+2004-02-28  Daiki Ueno  <ueno@unixuser.org>
+
+	* riece-display.el (riece-display-connect-signals): Connect some
+	signals.
+
+	* riece-naming.el (riece-naming-assert-join): Don't change the
+	current channel manually.
+	(riece-naming-assert-part): Ditto.
+	(riece-naming-assert-rename): Ditto.
+	(riece-naming-assert-channel-users): Ditto.
+
+2004-02-27  Daiki Ueno  <ueno@unixuser.org>
+
+	* riece-display.el (riece-emit-signal): Create signal object
+	internally.
+
+	* riece-message.el (riece-display-message-1): Emit
+	'riece-buffer-toggle-freeze signal.
+
+	* riece-commands.el (riece-command-toggle-freeze): Emit
+	'riece-buffer-toggle-freeze signal; don't update status indicators
+	manually.
+	(riece-command-toggle-own-freeze): Ditto.
+	
+	* riece-naming.el (riece-naming-assert-join): Rename signal 'join
+	-> 'riece-naming-assert-join.
+	(riece-naming-assert-part): Rename signal 'part ->
+	'riece-naming-assert-part.
+	(riece-naming-assert-rename): Rename signal 'rename ->
+	'riece-naming-assert-rename.
+	(riece-naming-assert-channel-users): Rename from
+	riece-naming-assert-users; rename signal 'users ->
+	'riece-naming-assert-channel-users.
+
+	* riece-handle.el (riece-handle-topic-message): Emit
+	'riece-channel-set-topic signal.
+	(riece-parse-channel-modes): Emit 'riece-channel-toggle-operator,
+	'riece-channel-toggle-speaker, and 'riece-channel-toggle-modes signals.
+
+	* riece-display.el (riece-display-connect-signals): Rename some
+	signals; connect more signals.
+
+	* riece-300.el (riece-handle-302-message): Emit
+	'riece-user-toggle-away, and 'riece-user-toggle-operator signals;
+	don't update status indicators manually.
+	(riece-handle-301-message): Emit 'riece-user-toggle-away signal;
+	don't update status indicators manually.
+	(riece-handle-305-message): Ditto.
+	(riece-handle-306-message): Ditto.
+	(riece-handle-353-message): Follow the name change of
+	riece-naming-assert-users.
+	(riece-handle-324-message): Emit 'riece-channel-toggle-modes
+	signal; don't update status indicators manually.
+	(riece-handle-set-topic): Emit 'riece-channel-set-topic signal;
+	don't update channel indicator manually.
+	(riece-handle-352-message): Emit 'riece-user-toggle-away, and
+	'riece-user-toggle-operator signals; don't update status
+	indicators manually.
+
+2004-02-27  Daiki Ueno  <ueno@unixuser.org>
+
+	* riece-display.el (riece-connect-signal): Create slot object
+	internally.
+
+2004-02-27  Daiki Ueno  <ueno@unixuser.org>
+
+	* riece.el (riece): Setup signal slots.
+
+	* riece-unread.el (riece-unread-after-display-message-function):
+	Don't call riece-redisplay-buffers.
+
+	* riece-naming.el (riece-naming-assert-names): New function.
+	(riece-naming-assert-join): Emit 'join signal.
+	(riece-naming-assert-part): Emit 'part signal.
+	(riece-naming-assert-rename): Emit 'rename signal.
+
+	* riece-message.el (riece-message-buffer): Don't call
+	riece-redisplay-buffers.
+
+	* riece-handle.el (riece-handle-nick-message): Don't call
+	riece-redisplay-buffers.
+	(riece-handle-join-message): Ditto.
+	(riece-handle-part-message): Ditto.
+	(riece-handle-kick-message): Ditto.
+	(riece-handle-kill-message): Ditto.
+	(riece-handle-topic-message): Ditto.
+	(riece-parse-channel-modes): Ditto.
+
+	* riece-display.el (riece-update-user-list-buffer): Use
+	riece-with-server-buffer.
+	(riece-emit-signal): Notify if signal filter fails.
+	(riece-display-connect-signals): New function.
+	(riece-update-user-list-buffer): Don't switch to user-list buffer.
+	(riece-update-channel-list-buffer): Don't switch to channel-list
+	buffer.
+	(riece-switch-to-channel): Emit 'switch-to-channel signal.
+	(riece-switch-to-nearest-channel): Ditto.
+
+	* riece-commands.el (riece-command-switch-to-channel): Don't call
+	riece-redisplay-buffers.
+	(riece-command-join-partner): Ditto.
+	(riece-command-part): Ditto.
+
+	* riece-300.el (riece-handle-353-message): Save match data before
+	calling riece-naming-assert-names; don't call riece-redisplay-buffers.
+	(riece-handle-322-message): Don't call riece-redisplay-buffers.
+
+2004-02-26  Daiki Ueno  <ueno@unixuser.org>
+
+	* riece-display.el: Introduce Qt like "signal-slot" abstraction
+	for routing display events.
+	(riece-signal-slot-obarray): New variable.
+	(riece-make-slot): New function.
+	(riece-slot-function): New function.
+	(riece-slot-filter): New function.
+	(riece-slot-handback): New function.
+	(riece-make-signal): New function.
+	(riece-signal-name): New function.
+	(riece-signal-args): New function.
+	(riece-connect-signal): New function.
+	(riece-emit-signal): New function.
+
+2004-02-19  Daiki Ueno  <ueno@unixuser.org>
+
+	* riece-300.el (riece-handle-353-message): Add 'riece-identity
+	property on user list string.
+
+2004-02-17  Daiki Ueno  <ueno@unixuser.org>
+
+	* riece-lsdb.el: Add autoload setting for
+	lsdb-rebuild-secondary-hash-tables to suppress warning.
+
+2004-02-16  Daiki Ueno  <ueno@unixuser.org>
+
+	* riece-300.el (riece-handle-353-message): Print user list in
+	channel buffer.
+
+2004-02-14  Yoichi NAKAYAMA  <yoichi@geiin.org>
+
+	* riece-lsdb.el (riece-lsdb-lookup-records): Build
+	riece-lsdb-cache if necessary.
+
+2004-01-29  Daiki Ueno  <ueno@unixuser.org>
+
+	* riece-ctcp.el (riece-handle-ctcp-version-request): Format target
+	identity before display.
+	(riece-handle-ctcp-ping-request): Ditto.
+	(riece-handle-ctcp-clientinfo-request): Ditto.
+
+2004-01-28  Daiki Ueno  <ueno@unixuser.org>
+
+	* Riece: Version 0.1.8 released.
+	* riece-version.el (riece-version-number): Bump up to 0.1.8.
+
+2004-01-27  Daiki Ueno  <ueno@unixuser.org>
+
+	* riece-lsdb.el: Require 'riece-identity; add autoload setting for
+	lsdb-update-record; bind lsdb-hash-table, riece-command-mode-map.
+
+2004-01-23  TAKAHASHI Kaoru  <kaoru@kaisei.org>
+
+	* riece-handle.el (riece-handle-privmsg-message): Check own
+	message from server. For deal with another client that connected
+	same irc proxy (e.g. plum, pirc).
+	(riece-handle-notice-message): Ditto.
+
+2004-01-21  Daiki Ueno  <ueno@unixuser.org>
+
+	* riece-identity.el (riece-identity-canonicalize-prefix): Convert
+	characters in prefix to lower case.
+
+2004-01-18  Daiki Ueno  <ueno@unixuser.org>
+
+	* riece-misc.el (riece-concat-user-status): New function.
+
+	* riece-300.el (riece-handle-302-message): Simplify user status
+	display.  (i.e. don't display "not operator", "not away", ...)
+	(riece-handle-352-message): Ditto.
+
+2004-01-04  Daiki Ueno  <ueno@unixuser.org>
+
+	* riece-lsdb.el (riece-lsdb-add-user): Always pass canonical
+	address for 'net entry.
+
+2004-01-04  TAKAHASHI Kaoru  <kaoru@kaisei.org>
+
+	* riece-300.el (riece-handle-317-message): Fix regexp for signon
+	time extenstion.
+
+2004-01-03  Daiki Ueno  <ueno@unixuser.org>
+
+	* riece-lsdb.el: Add autoload setting for lsdb-maphash.
+	(riece-lsdb-update-cache): Don't alter existing entry.
+	(riece-lsdb-delete-cache): Ditto.
+	(riece-lsdb-add-user): New command.
+	(riece-lsdb-insinuate): Bind riece-lsdb-add-user.
+
+2004-01-03  Daiki Ueno  <ueno@unixuser.org>
+
+	* riece-lsdb.el (riece-lsdb-insinuate): Don't require 'lsdb.
+
+2004-01-02  Daiki Ueno  <ueno@unixuser.org>
+
+	* riece-lsdb.el: New add-on.
+	* COMPILE (riece-modules): Add riece-lsdb.
+	* Makefile.am (EXTRA_DIST): Add riece-lsdb.el
+
+	* riece-xface.el: New add-on.
+	* COMPILE (riece-modules): Add riece-xface.
+	* Makefile.am (EXTRA_DIST): Add riece-xface.el
+
+2003-12-25  Daiki Ueno  <ueno@unixuser.org>
+
+	* Riece: Version 0.1.7 released.
+	* riece-version.el (riece-version-number): Bump up to 0.1.7.
+
+2003-12-22  Daiki Ueno  <ueno@unixuser.org>
+
+	* riece-keyword.el (riece-notify-keyword-functions): Mark as
+	obsolete.
+	(riece-keyword-notify-functions): New user option.
+	(riece-keyword-message-filter): Don't restore the match data when
+	calling riece-notify-keyword-functions; call
+	riece-keyword-notify-functions with the matched message object.
+	Thanks to OHASHI Akira <bg66@koka-in.org>
+	[cf. <Liece:00134>]
+
+2003-12-17  Daiki Ueno  <ueno@unixuser.org>
+
+	* riece-log.el (riece-log-flashback): Use
+	riece-match-string-no-properties instead of match-string-no-properties.
+
+	* riece-xemacs.el (riece-match-string-no-properties): New function.
+	* riece-emacs.el (riece-match-string-no-properties): New alias.
+
+	* riece-identity.el: Don't require 'riece-compat.
+	(riece-identity-prefix-case-table): Abolish.
+	(riece-identity-prefix-case-pair-alist): New constant.
+	(riece-identity-canonicalize-prefix): Don't use case-table.
+
+	* riece-emacs.el (riece-set-case-syntax-pair): Abolish.
+	(riece-copy-case-table): Abolish.
+	* riece-xmacs.el (riece-set-case-syntax-pair): Abolish.
+	(riece-copy-case-table): Abolish.
+
+2003-12-15  Daiki Ueno  <ueno@unixuser.org>
+
+	* riece-options.el: Require 'riece-version.
+	(riece-quit-message): Set default to (riece-extended-version).
+	(riece-away-message): Set default to "Gone".
+
+	* riece-commands.el: Don't require 'riece-version.
+	(riece-command-quit): Don't check riece-quit-message.
+	(riece-command-close-server): Ditto.
+	(riece-command-toggle-away): Always supply a parameter to the AWAY
+	command when the user is not away.  Thanks to Yuki Fujimura
+	<fujimura@wakhok.ac.jp>
+	[cf. <Liece:00139>]
+
+2003-12-14  Daiki Ueno  <ueno@unixuser.org>
+
+	* riece.el (riece): Connect to servers in riece-startup-server-list.
+
+	* riece-000.el (riece-handle-001-message): Ignore entries in
+	riece-startup-channel-list which doesn't match riece-server-name. 
+
+	* riece-options.el (riece-startup-server-list): New user option.
+
+	* riece-async.el (riece-async-max-buffer-size): New user option.
+	(riece-async-server-program): Use io/nonblock & IO#syswrite to
+	check whether the write end of pipe (i.e. input to emacs process)
+	would block.
+
+2003-12-13  Daiki Ueno  <ueno@unixuser.org>
+
+	* riece-options.el (riece-default-open-connection-function): New
+	user option.
+
+	* riece-server.el (riece-server-keyword-map): Use
+	riece-default-open-connection-function.
+
+	* riece-async.el: New add-on.
+	* COMPILE (riece-modules): Add riece-async.
+	* Makefile.am (EXTRA_DIST): Add riece-async.el
+
+2003-12-09  OHASHI Akira  <bg66@koka-in.org>
+
+	* riece-mini.el (riece-mini-display-message-function): Don't set
+	riece-mini-last-channel when message is not a privmsg.
+
+2003-12-04  OHASHI Akira  <bg66@koka-in.org>
+
+	* riece-server.el (riece-with-server-buffer): Store 'edebug-form-spec
+	property.
+
+2003-12-03  OHASHI Akira  <bg66@koka-in.org>
+
+	* riece-log.el (riece-log-requires): New function.
+	(riece-log-flashback): Revert 'riece-identity property and button.
+
+2003-11-28  OHASHI Akira  <bg66@koka-in.org>
+
+	* riece-unread.el (riece-unread-after-display-message-function):
+	Do nothing when message is not a privmsg.
+
+2003-11-22  Daiki Ueno  <ueno@unixuser.org>
+
+	* riece-log.el (riece-log-coding-system): New user option.
+	(riece-log-display-message-function): Bind
+	coding-system-for-write; don't create temp buffer.
+
+	* riece-rdcc.el (riece-rdcc-filter): Use write-region instead of
+	append-to-file to suppress "Wrote file" messages.
+
+2003-11-10  Daiki Ueno  <ueno@unixuser.org>
+
+	* Riece: Version 0.1.6 released.
+	* riece-version.el (riece-version-number): Bump up to 0.1.6.
+
+2003-11-08  Daiki Ueno  <ueno@unixuser.org>
+
+	* riece-ctcp.el (riece-command-ctcp-action): Display channel names
+	in "*Others*" buffer.
+
+2003-11-05  OHASHI Akira  <bg66@koka-in.org>
+
+	* riece-unread.el (riece-unread-switch-to-channel): Protect
+	switching to the channel not existing.
+
+2003-10-29  OHASHI Akira  <bg66@koka-in.org>
+
+	* riece-log.el (riece-log-get-directory): Support riece-identity
+	for mapping.
+
+2003-10-28  Daiki Ueno  <ueno@unixuser.org>
+
+	* riece-layout.el (riece-set-window-points): Move point in
+	the channel-buffer's window.
+
+	* riece-ctcp.el (riece-command-ctcp-version): Prompt to select
+	an identity on the current server.
+	(riece-command-ctcp-ping): Ditto.
+	(riece-command-ctcp-clientinfo): Ditto.
+	(riece-command-ctcp-action): Ditto.
+
+	* riece-commands.el (riece-command-change-mode): Prompt to select
+	an identity on the current server.
+	(riece-command-join): Ditto.
+
 2003-10-27  Daiki Ueno  <ueno@unixuser.org>
 
-	* riece-identity.el:
-	* riece-xemacs.el: Fix build for 21.1.
+	* riece-keyword.el (riece-keywords): Change custom spec.
+	(riece-keyword-message-filter): Normalize riece-keywords.
+
+	* riece-identity.el (riece-identity-prefix-case-table): Use
+	riece-copy-case-table to define.
+
+	* riece-xemacs.el (riece-set-case-syntax-pair): Workaround for
+	XEmacs 21.1.
+	(riece-copy-case-table): Ditto.
+
+	* riece-emacs.el (riece-copy-case-table): New alias.
+
+	* riece-globals.el (riece-channel-regexp): Use
+	riece-make-interval-regexp to define.
+	(riece-user-regexp): Ditto.
+
+	* riece-compat.el (riece-make-interval-regexp): New function.
+
+	* riece-icon.el (riece-icon-available-p): Check
+	the existence of image-type-available-p.
+
+2003-10-27  OHASHI Akira  <bg66@koka-in.org>
+
+	* riece-log.el (riece-log-get-directory): Fix for server name and
+	private messages handling.
+
+2003-10-26  Daiki Ueno  <ueno@unixuser.org>
+
+	* riece-xemacs.el (riece-run-with-idle-timer): Pass an integer to
+	the RESTART argument of start-itimer.
+
+	* riece-commands.el (riece-command-user-list-scroll-down): Rename
+	from riece-command-nick-scroll-down.
+	(riece-command-user-list-scroll-up): Rename from
+	riece-command-nick-scroll-up.
+	(riece-command-scroll-down): Check if riece-current-channel is bound.
+	(riece-command-scroll-up): Ditto.
+	(riece-command-quit): Clean up if no server process is available.
+
+2003-10-25  Daiki Ueno  <ueno@unixuser.org>
+
+	* riece-rdcc.el: Bind temporary-file-directory.
+	(riece-rdcc-send-program): Allow block-size to be controlled from
+	elisp.
+	(riece-rdcc-block-size): New user option.
+	(riece-rdcc-temp-file): New variable.
+	(riece-rdcc-received-size): New variable.
+	(riece-rdcc-filter): Don't keep received bytes in the process
+	buffer; use riece-rdcc-format-size to display progress.
+	(riece-command-dcc-receive): Create a temporary directory which
+	holds a received file.
 
 2003-10-24  Daiki Ueno  <ueno@unixuser.org>
 
+	* riece-options.el (riece-gather-channel-modes): Default to nil.
+	* riece-handle.el (riece-handle-join-message): Send MODE if
+	riece-gather-channel-modes is non-nil.
+
 	* riece-url.el: Add autoload setting for 'browse-url.
 
 	* riece-menu.el: Require 'riece-options, 'riece-globals,

File lisp/Makefile.am

 	riece-channel.el riece-coding.el riece-commands.el riece-compat.el \
 	riece-complete.el riece-display.el riece-emacs.el riece-filter.el \
 	riece-globals.el riece-handle.el riece-highlight.el riece-identity.el \
-	riece-message.el riece-misc.el riece-naming.el \
-	riece-options.el riece-server.el riece-user.el riece-version.el \
-	riece-xemacs.el riece.el \
+	riece-message.el riece-misc.el riece-mode.el riece-naming.el \
+	riece-options.el riece-server.el riece-signal.el riece-user.el \
+	riece-version.el riece-xemacs.el riece.el \
 	riece-ctcp.el riece-url.el riece-unread.el \
 	riece-ndcc.el riece-rdcc.el riece-log.el riece-mini.el \
 	riece-doctor.el riece-alias.el riece-layout.el riece-skk-kakutei.el \
 	riece-guess.el riece-history.el riece-button.el riece-keyword.el \
-	riece-menu.el riece-icon.el riece-async.el
+	riece-menu.el riece-icon.el riece-async.el riece-lsdb.el \
+	riece-xface.el riece-ctlseq.el
 
 CLEANFILES = auto-autoloads.el custom-load.el *.elc
 FLAGS ?= -batch -q -no-site-file

File lisp/riece-300.el

 		   "\\)\\(\\*\\)?=\\([-+]\\)\\([^ ]+\\)")
 	   (car replies))
 	  (let ((user (match-string 1 (car replies)))
+		(operator (not (null (match-beginning 2))))
 		(away (eq (match-string 3 (car replies)) ?-))
 		(user-at-host (match-string 4 (car replies)))
-		(operator (not (null (match-beginning 2)))))
+		status)
+	    (if away
+		(setq status (cons "away" status)))
+	    (if operator
+		(setq status (cons "operator" status)))
 	    (riece-user-toggle-away user away)
+	    (riece-emit-signal 'user-away-changed
+			       (riece-make-identity user riece-server-name)
+			       away)
 	    (riece-user-toggle-operator user operator)
+	    (riece-emit-signal 'user-operator-changed
+			       (riece-make-identity user riece-server-name)
+			       operator)
 	    (riece-insert-info
 	     (list riece-dialogue-buffer riece-others-buffer)
 	     (concat
 	      (riece-concat-server-name
-	       (format "%s is (%s) [%s, %s]"
-		       (riece-format-identity
-			(riece-make-identity user riece-server-name)
-			t)
-		       (riece-strip-user-at-host user-at-host)
-		       (if operator
-			   "operator"
-			 "not operator")
-		       (if away
-			   "away"
-			 "not away")))
+	       (riece-concat-user-status
+		status
+		(format "%s is (%s)"
+			(riece-format-identity
+			 (riece-make-identity user riece-server-name)
+			 t)
+			(riece-strip-user-at-host user-at-host))))
 	      "\n"))))
-      (setq replies (cdr replies)))
-  (riece-update-status-indicators)
-  (force-mode-line-update t)))
+      (setq replies (cdr replies)))))
 
 (defun riece-handle-303-message (prefix number name string)
   (riece-insert-info
       (let ((user (match-string 1 string))
 	    (message (substring string (match-end 0))))
 	(riece-user-toggle-away user t)
+	(riece-emit-signal 'user-away-changed
+			   (riece-make-identity user riece-server-name)
+			   t)
 	(riece-insert-info
 	 (list riece-dialogue-buffer riece-others-buffer)
 	 (concat
 		    (riece-make-identity user riece-server-name)
 		    t)
 		   message))
-	  "\n"))))
-  (riece-update-status-indicators)
-  (force-mode-line-update t))
+	  "\n")))))
 
 (defun riece-handle-305-message (prefix number name string)
   (riece-user-toggle-away riece-real-nickname nil)
-  (riece-update-status-indicators)
-  (force-mode-line-update t))
+  (riece-emit-signal 'user-away-changed
+		      (riece-make-identity riece-real-nickname
+					   riece-server-name)
+		      nil))
 
 (defun riece-handle-306-message (prefix number name string)
   (riece-user-toggle-away riece-real-nickname t)
-  (riece-update-status-indicators)
-  (force-mode-line-update t))
+  (riece-emit-signal 'user-away-changed
+		     (riece-make-identity riece-real-nickname
+					  riece-server-name)
+		     t))
 
 (defun riece-handle-311-message (prefix number name string)
   (if (string-match
 
 (defun riece-handle-317-message (prefix number name string)
   (if (string-match
-       (concat "^\\(" riece-user-regexp "\\) \\([0-9]+\\) :")
+       (concat "^\\(" riece-user-regexp "\\) \\([0-9]+\\) [^:]*:seconds")
        string)
       (let ((user (match-string 1 string))
 	    (idle (match-string 2 string)))
   "RPL_NAMREPLY	\"<channel> :[[@|+]<nick> [[@|+]<nick> [...]]]\"."
   (if (string-match "^[=\*@] *\\([^ ]+\\) +:" string)
       (let ((channel (match-string 1 string))
-	    users)
+	    (start 0)
+	    user users)
 	(setq string (substring string (match-end 0)))
-	(if (string-match " *$" string)
-	    (setq string (substring string 0 (match-beginning 0))))
-	(setq users (split-string string))
-	(while users
-	  (if (eq (aref (car users) 0) ?@)
-	      (progn
-		(riece-naming-assert-join (substring (car users) 1) channel)
-		(riece-channel-toggle-operator
-		 channel (substring (car users) 1) t))
-	    (if (eq (aref (car users) 0) ?+)
-		(progn
-		  (riece-naming-assert-join (substring (car users) 1) channel)
-		  (riece-channel-toggle-speaker
-		   channel (substring (car users) 1) t))
-	      (riece-naming-assert-join (car users) channel)))
-	  (setq users (cdr users)))
-	(riece-redisplay-buffers))))
+	(while (string-match
+		(concat "\\([@+]\\)?\\(" riece-user-regexp "\\) *")
+		string start)
+	  (put-text-property (match-beginning 2) (match-end 2)
+			     'riece-identity
+			     (riece-make-identity (match-string 2 string)
+						  riece-server-name)
+			     string)
+	  (setq start (match-end 0)
+		user (if (match-beginning 1)
+			 (if (eq (aref string (match-beginning 1)) ?@)
+			     (list (match-string 2 string) ?o)
+			   (if (eq (aref string (match-beginning 1)) ?+)
+			       (list (match-string 2 string) ?v)))
+		       (list (match-string 2 string)))
+		users (cons user users)))
+	(riece-naming-assert-channel-users (nreverse users) channel)
+	(let* ((channel-identity (riece-make-identity channel
+						      riece-server-name))
+	       (buffer (riece-channel-buffer channel-identity)))
+	  (riece-insert-info buffer (concat "Users: " string "\n"))
+	  (riece-insert-info
+	   (if (and riece-channel-buffer-mode
+		    (not (eq buffer riece-channel-buffer)))
+	       (list riece-dialogue-buffer riece-others-buffer)
+	     riece-dialogue-buffer)
+	   (concat
+	    (riece-concat-server-name
+	     (format "Users on %s: %s"
+		     (riece-format-identity channel-identity t) string))
+	    "\n"))))))
 
 (defun riece-handle-322-message (prefix number name string)
   (if (string-match "^\\([^ ]+\\) \\([0-9]+\\) :" string)
 (defun riece-handle-324-message (prefix number name string)
   (if (string-match "^\\([^ ]+\\) \\([^ ]+\\) " string)
       (let* ((channel (match-string 1 string))
-	     (mode-string (substring string (match-beginning 2)))
-	     (modes (string-to-list (match-string 2 string)))
-	     (toggle (car modes)))
-	(setq modes (cdr modes))
-	(while modes
-	  (riece-channel-toggle-mode channel (car modes) (eq toggle ?+))
-	  (setq modes (cdr modes)))
+	     (mode-string (match-string 2 string)))
+	(riece-naming-assert-channel-modes channel
+					   (riece-parse-modes mode-string))
 	(let* ((channel-identity (riece-make-identity channel
 						      riece-server-name))
 	       (buffer (riece-channel-buffer channel-identity)))
 	     (format "Mode for %s: %s"
 		     (riece-format-identity channel-identity t)
 		     mode-string))
-	    "\n")))
-	(riece-update-channel-indicator)
-	(force-mode-line-update t))))
+	    "\n"))))))
 
 (defun riece-handle-set-topic (prefix number name string remove)
   (if (string-match "^\\([^ ]+\\) :" string)
 	(if remove
 	    (riece-channel-set-topic (riece-get-channel channel) nil)
 	  (riece-channel-set-topic (riece-get-channel channel) message)
-	(riece-insert-info buffer (concat "Topic: " message "\n"))
-	(riece-insert-info
-	 (if (and riece-channel-buffer-mode
-		  (not (eq buffer riece-channel-buffer)))
-	     (list riece-dialogue-buffer riece-others-buffer)
-	   riece-dialogue-buffer)
-	 (concat
-	  (riece-concat-server-name
-	   (format "Topic for %s: %s"
-		   (riece-format-identity channel-identity t)
-		   message))
-	  "\n"))
-	(riece-update-channel-indicator)))))
+	  (riece-insert-info buffer (concat "Topic: " message "\n"))
+	  (riece-insert-info
+	   (if (and riece-channel-buffer-mode
+		    (not (eq buffer riece-channel-buffer)))
+	       (list riece-dialogue-buffer riece-others-buffer)
+	     riece-dialogue-buffer)
+	   (concat
+	    (riece-concat-server-name
+	     (format "Topic for %s: %s"
+		     (riece-format-identity channel-identity t)
+		     message))
+	    "\n")))
+	(riece-emit-signal 'channel-topic-changed
+			    channel-identity
+			    (unless remove
+			      message)))))
 
 (defun riece-handle-331-message (prefix number name string)
   (riece-handle-set-topic prefix number name string t))
 	     (name (substring string (match-end 0)))
 	     (buffer (riece-channel-buffer (riece-make-identity
 					    channel riece-server-name)))
-	     (info (format "%10s = %s (%s) [%s, %s, %s hops, on %s]"
+	     (info (format "%10s = %s (%s)"
 			   (concat
 			    (if (memq flag '(?@ ?+))
 				(char-to-string flag)
 			     t))
 			   name
 			   (riece-strip-user-at-host
-			    (concat user "@" host))
-			   (if operator
-			       "operator"
-			     "not operator")
-			   (if away
-			       "away"
-			     "not away")
-			   hops
-			   server)))
+			    (concat user "@" host))))
+	     status)
+	(if operator
+	    (setq status (cons "operator" status)))
+	(if away
+	    (setq status (cons "away" status)))
+	(unless (equal hops "0")
+	  (setq status (cons (concat "on " server)
+			     (cons (concat hops " hops")
+				   status))))
+	(if status
+	    (setq status (nreverse status)))
 	(riece-naming-assert-join nick channel)
 	(riece-user-toggle-away user away)
+	(riece-emit-signal 'user-away-changed
+			   (riece-make-identity user riece-server-name)
+			   away)
 	(riece-user-toggle-operator user operator)
-	(riece-insert-info buffer (concat info "\n"))
+	(riece-emit-signal 'user-operator-changed
+			   (riece-make-identity user riece-server-name)
+			   operator)
+	(riece-insert-info buffer (concat (riece-concat-user-status
+					   status info)
+					  "\n"))
 	(riece-insert-info
 	 (if (and riece-channel-buffer-mode
 		  (not (eq buffer riece-channel-buffer)))
 	   riece-dialogue-buffer)
 	 (concat
 	  (riece-concat-server-name
-	   (concat
-	    (riece-format-identity
-	     (riece-make-identity channel riece-server-name)
-	     t)
-	    " "
-	    info))
-	  "\n"))
-	(riece-redisplay-buffers))))
+	   (riece-concat-user-status
+	    status
+	    (concat
+	     (riece-format-identity
+	      (riece-make-identity channel riece-server-name)
+	      t)
+	     " "
+	     info)))
+	  "\n")))))
 
 (defun riece-handle-315-message (prefix number name string))
 (defun riece-handle-318-message (prefix number name string))

File lisp/riece-async.el

 
 ;;; Code:
 
+(require 'riece-options)
+
 (defgroup riece-async nil
   "Connect to IRC server via asynchronous proxy"
   :prefix "riece-"

File lisp/riece-button.el

 (defun riece-button-update-buffer ()
   (riece-button-add-identity-button (point-min) (point-max)))
 
-(defun riece-button-requires ()
-  '(riece-highlight))
-
 (defvar riece-channel-list-mode-map)
 (defvar riece-user-list-mode-map)
 (defvar riece-dialogue-mode-map)

File lisp/riece-channel.el

 (require 'riece-options)
 (require 'riece-globals)
 (require 'riece-identity)
+(require 'riece-mode)
 
 ;;; Channel object:
 (defun riece-find-channel (name)
 (defun riece-channel-toggle-mode (name mode flag)
   "Add or remove channel MODE of channel."
   (let* ((channel (riece-get-channel name))
-	 (modes (riece-channel-modes channel)))
+	 (modes (riece-channel-modes channel))
+	 (old (riece-mode-assoc (riece-mode-flag mode) modes)))
     (if flag
-	(unless (memq mode modes)
+	(unless old
 	  (riece-channel-set-modes channel (cons mode modes)))
-      (if (memq mode modes)
-	  (riece-channel-set-modes channel (delq mode modes))))))
+      (if old
+	  (riece-channel-set-modes channel (delq old modes))))))
 
 (defun riece-channel-toggle-banned (name pattern flag)
   "Add or remove banned PATTERN of channel."

File lisp/riece-commands.el

 (require 'riece-identity)
 (require 'riece-message)
 
+(autoload 'derived-mode-class "derived")
+
 ;;; Channel movement:
 (defun riece-command-switch-to-channel (channel)
   (interactive (list (riece-completing-read-identity
 		      "Channel/User: " riece-current-channels nil t)))
   (unless (equal channel riece-current-channel)
-    (riece-switch-to-channel channel)
-    (riece-redisplay-buffers)))
+    (riece-switch-to-channel channel)))
 
 (defun riece-command-switch-to-channel-by-number (number)
   (interactive
 		     ?-
 		   ?+)
 		 (make-string (length group) ?o)
-		 (mapconcat #'identity group " ")))
+		 (mapconcat #'identity (nreverse group) " ")))
 	(setq group nil)))))
 
 (defun riece-command-set-speakers (users &optional arg)
 		     ?-
 		   ?+)
 		 (make-string (length group) ?v)
-		 (mapconcat #'identity group " ")))
+		 (mapconcat #'identity (nreverse group) " ")))
 	(setq group nil)))))
 
 (defun riece-command-send-message (message notice)
     (if pointer
 	(riece-command-switch-to-channel (car pointer))
       (riece-join-channel target)
-      (riece-switch-to-channel target)
-      (riece-redisplay-buffers))))
+      (riece-switch-to-channel target))))
 
 (defun riece-command-join (target &optional key)
   (interactive
   (if (riece-identity-member target riece-current-channels)
       (if (riece-channel-p (riece-identity-prefix target))
 	  (riece-command-part-channel target message)
-	(riece-part-channel target)
-	(riece-redisplay-buffers))
+	(riece-part-channel target))
     (error "You are not talking with %s" target)))
 
 (defun riece-command-change-nickname (nickname)
   "Prevent automatic scrolling of the dialogue window.
 If prefix argument ARG is non-nil, toggle frozen status."
   (interactive "P")
-  (with-current-buffer (if (and riece-channel-buffer-mode
-				riece-channel-buffer)
-			   riece-channel-buffer
-			 riece-dialogue-buffer)
+  (with-current-buffer (if (eq (derived-mode-class major-mode)
+			       'riece-dialogue-mode)
+			   (current-buffer)
+			 (if (and riece-channel-buffer-mode
+				  riece-channel-buffer)
+			     riece-channel-buffer
+			   riece-dialogue-buffer))
     (setq riece-freeze (if arg
 			   (< 0 (prefix-numeric-value arg))
-			 (not riece-freeze))))
-  (riece-update-status-indicators)
-  (force-mode-line-update t))
+			 (not riece-freeze)))
+    (riece-emit-signal 'buffer-freeze-changed
+		       (current-buffer) riece-freeze)))
 
 (defun riece-command-toggle-own-freeze (&optional arg)
   "Prevent automatic scrolling of the dialogue window.
 The difference from `riece-command-freeze' is that your messages are hidden.
 If prefix argument ARG is non-nil, toggle frozen status."
   (interactive "P")
-  (with-current-buffer (if (and riece-channel-buffer-mode
-				riece-channel-buffer)
-			   riece-channel-buffer
-			 riece-dialogue-buffer)
+  (with-current-buffer (if (eq (derived-mode-class major-mode)
+			       'riece-dialogue-mode)
+			   (current-buffer)
+			 (if (and riece-channel-buffer-mode
+				  riece-channel-buffer)
+			     riece-channel-buffer
+			   riece-dialogue-buffer))
     (if (if arg
 	    (< 0 (prefix-numeric-value arg))
 	  (not (eq riece-freeze 'own)))
 	(setq riece-freeze 'own)
-      (setq riece-freeze nil)))
-  (riece-update-status-indicators)
-  (force-mode-line-update t))
+      (setq riece-freeze nil))
+    (riece-emit-signal 'buffer-freeze-changed
+		       (current-buffer) riece-freeze)))
 
 (eval-when-compile
   (autoload 'riece-exit "riece"))

File lisp/riece-ctcp.el

 
 (require 'riece-version)
 (require 'riece-misc)
-(require 'riece-display)
 (require 'riece-highlight)
 
 (defface riece-ctcp-action-face
 			   hook prefix (car targets) message)
 			(error
 			 (if riece-debug
-			     (message "Error occurred in `%S': %S" hook error))
+			     (message "Error in `%S': %S" hook error))
 			 nil))
 		(if function
 		    (condition-case error
 			(funcall function prefix (car targets) message)
 		      (error
 		       (if riece-debug
-			   (message "Error occurred in `%S': %S"
+			   (message "Error in `%S': %S"
 				    function error))))))
 	      (condition-case error
 		  (run-hook-with-args-until-success
 		   after-hook prefix (car targets) message)
 		(error
 		 (if riece-debug
-		     (message "Error occurred in `%S': %S"
+		     (message "Error in `%S': %S"
 			      after-hook error)))))
 	    t)))))
 
 (defun riece-handle-ctcp-version-request (prefix target string)
-  (let ((buffer (if (riece-channel-p target)
-		    (riece-channel-buffer (riece-make-identity
-					   target riece-server-name))))
-	(user (riece-prefix-nickname prefix)))
+  (let* ((target-identity (riece-make-identity target riece-server-name))
+	 (buffer (if (riece-channel-p target)
+		     (riece-channel-buffer target-identity)))
+	 (user (riece-prefix-nickname prefix)))
     (riece-send-string
      (format "NOTICE %s :\1VERSION %s\1\r\n" user (riece-extended-version)))
     (riece-insert-change buffer (format "CTCP VERSION from %s\n" user))
        (format "CTCP VERSION from %s (%s) to %s"
 	       user
 	       (riece-strip-user-at-host (riece-prefix-user-at-host prefix))
-	       target))
+	       (riece-format-identity target-identity t)))
       "\n"))))
 
 (defun riece-handle-ctcp-ping-request (prefix target string)
-  (let ((buffer (if (riece-channel-p target)
-		    (riece-channel-buffer (riece-make-identity
-					   target riece-server-name))))
-	(user (riece-prefix-nickname prefix)))
+  (let* ((target-identity (riece-make-identity target riece-server-name))
+	 (buffer (if (riece-channel-p target)
+		     (riece-channel-buffer target-identity)))
+	 (user (riece-prefix-nickname prefix)))
     (riece-send-string
      (if string
 	 (format "NOTICE %s :\1PING %s\1\r\n" user string)
        (format "CTCP PING from %s (%s) to %s"
 	       user
 	       (riece-strip-user-at-host (riece-prefix-user-at-host prefix))
-	       target))
+	       (riece-format-identity target-identity t)))
       "\n"))))
 
 (defun riece-handle-ctcp-clientinfo-request (prefix target string)
-  (let ((buffer (if (riece-channel-p target)
-		    (riece-channel-buffer (riece-make-identity
-					   target riece-server-name))))
-	(user (riece-prefix-nickname prefix)))
+  (let* ((target-identity (riece-make-identity target riece-server-name))
+	 (buffer (if (riece-channel-p target)
+		     (riece-channel-buffer target-identity)))
+	 (user (riece-prefix-nickname prefix)))
     (riece-send-string
      (format "NOTICE %s :\1CLIENTINFO %s\1\r\n"
 	     user
        (format "CTCP CLIENTINFO from %s (%s) to %s"
 	       user
 	       (riece-strip-user-at-host (riece-prefix-user-at-host prefix))
-	       target))
+	       (riece-format-identity target-identity t)))
       "\n"))))
 
 (defun riece-handle-ctcp-action-request (prefix target string)
 			   hook prefix (car targets) message)
 			(error
 			 (if riece-debug
-			     (message "Error occurred in `%S': %S" hook error))
+			     (message "Error in `%S': %S" hook error))
 			 nil))
 		(if function
 		    (condition-case error
 			(funcall function prefix (car targets) message)
 		      (error
 		       (if riece-debug
-			   (message "Error occurred in `%S': %S"
+			   (message "Error in `%S': %S"
 				    function error))))))
 	      (condition-case error
 		  (run-hook-with-args-until-success
 		   after-hook prefix (car targets) message)
 		(error
 		 (if riece-debug
-		     (message "Error occurred in `%S': %S"
+		     (message "Error in `%S': %S"
 			      after-hook error)))))
 	    t)))))
 

File lisp/riece-ctlseq.el

+;;; riece-ctlseq.el --- highlight control sequences in channel buffers
+;; Copyright (C) 1998-2004 Daiki Ueno
+
+;; Author: Daiki Ueno <ueno@unixuser.org>
+;; Created: 1998-09-28
+;; Keywords: IRC, riece
+
+;; This file is part of Riece.
+
+;; This program is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 2, or (at your option)
+;; any later version.
+
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs; see the file COPYING.  If not, write to the
+;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+;;; Commentary:
+
+;; To use, add the following line to your ~/.riece/init.el:
+;; (add-to-list 'riece-addons 'riece-ctlseq)
+
+;;; Code:
+
+(require 'riece-options)
+
+(defgroup riece-ctlseq nil
+  "Highlight control sequences in IRC buffer."
+  :group 'riece)
+
+(defcustom riece-ctlseq-colors
+  '("white" "black" "red" "orange" "yellow" "LightGreen" "DarkOliveGreen"
+    "cyan4" "turquoise" "blue" "black" "black" "black" "black" "black"
+    "DarkBlue" "purple1" "purple2" "purple3" "magenta")
+  "List of colors can be used with ^C<fg>,<bg>."
+  :group 'riece-ctlseq
+  :type '(repeat (string :tag "Color")))
+
+(defcustom riece-ctlseq-hide-controls t
+  "If non-nil, control characters are hidden."
+  :group 'riece-ctlseq
+  :type 'boolean)
+
+(defcustom riece-ctlseq-face-cache-size 128
+  "Maximum length of the internal face cache."
+  :group 'riece-ctlseq
+  :type 'integer)
+
+(defvar riece-ctlseq-face-cache nil)
+(defvar riece-ctlseq-face-counter 0)
+
+(defun riece-ctlseq-compatible-attributes-p (this other)
+  (let ((pointer this))
+    (catch 'mismatched
+      (while pointer
+	(unless (equal (plist-get other (car pointer)) (nth 1 pointer))
+	  (throw 'mismatched nil))
+	(setq pointer (nthcdr 2 pointer)))
+      t)))
+
+(defun riece-ctlseq-face-foreground-name (face)
+  "Return the name of FACE's foreground color."
+  (if (fboundp 'face-foreground-name)	;XEmacs
+      (face-foreground-name face)
+    (face-foreground face)))
+
+(defun riece-ctlseq-face-background-name (face)
+  "Return the name of FACE's background color."
+  (if (fboundp 'face-background-name)	;XEmacs
+      (face-background-name face)
+    (face-background face)))
+
+(defun riece-ctlseq-make-face (attrs)
+  (let* ((face-name (intern (format "riece-ctlseq-face-%d"
+				    (prog1 riece-ctlseq-face-counter
+				      (setq riece-ctlseq-face-counter
+					    (1+ riece-ctlseq-face-counter))))))
+	 (face (make-face face-name))
+	 foreground
+	 background)
+    (if (plist-get attrs 'bold)
+	(make-face-bold face))
+    (if (plist-get attrs 'underline)
+	(set-face-underline-p face t))
+    (if (setq foreground (plist-get attrs 'foreground))
+	(set-face-foreground face foreground))
+    (if (setq background (plist-get attrs 'background))
+	(set-face-background face background))
+    (when (plist-get attrs 'inverse-video)
+      (setq foreground (or (riece-ctlseq-face-background-name face)
+			   (riece-ctlseq-face-background-name 'default))
+	    background (or (riece-ctlseq-face-foreground-name face)
+			   (riece-ctlseq-face-foreground-name 'default)))
+      (set-face-foreground face foreground)
+      (set-face-background face background))
+    (put face-name 'riece-ctlseq-attributes attrs)
+    face-name))
+
+(defun riece-ctlseq-face-from-cache (attrs)
+  (if (null attrs)
+      'default
+    (let ((pointer riece-ctlseq-face-cache)
+	  last-pointer
+	  other)
+      (catch 'found
+	(while pointer
+	  (setq other (get (car pointer) 'riece-ctlseq-attributes))
+	  (when (and (riece-ctlseq-compatible-attributes-p attrs other)
+		     (riece-ctlseq-compatible-attributes-p other attrs))
+	    (if last-pointer
+		(setcdr last-pointer (cdr pointer)))
+	    (throw 'found (setcar riece-ctlseq-face-cache (car pointer))))
+	  (setq last-pointer pointer
+		pointer (cdr pointer)))
+	(if (>= (length riece-ctlseq-face-cache)
+		riece-ctlseq-face-cache-size)
+	    (setq riece-ctlseq-face-cache
+		  (butlast riece-ctlseq-face-cache)))
+	(setq riece-ctlseq-face-cache
+	      (cons (riece-ctlseq-make-face attrs)
+		    riece-ctlseq-face-cache))
+	(car riece-ctlseq-face-cache)))))
+
+(defun riece-ctlseq-update-attributes (tag attrs)
+  (cond
+   ((eq (aref tag 0) ?\x2)		;^B
+    (plist-put attrs 'bold (not (plist-get attrs 'bold))))
+   ((eq (aref tag 0) ?\xF))		;^O
+   ((eq (aref tag 0) ?\x16)		;^V
+    (plist-put attrs 'inverse-video (not (plist-get attrs 'inverse-video))))
+   ((eq (aref tag 0) ?\x1F)		;^_
+    (plist-put attrs 'underline (not (plist-get attrs 'underline))))
+   ((string-match "\x3\\([0-9]+\\)?\\(,[0-9]+\\)?" tag)	;^C<fg>,<bg>
+    (if (match-beginning 1)
+	(setq attrs (plist-put attrs 'foreground
+			       (nth (string-to-number (match-string 1 tag))
+				    riece-ctlseq-colors))))
+    (if (match-beginning 2)
+	(setq attrs (plist-put attrs 'background
+			       (nth (string-to-number
+				     (substring (match-string 2 tag) 1))
+				    riece-ctlseq-colors))))
+    attrs)))
+
+(defun riece-ctlseq-message-filter (message)
+  (let ((start 0)
+	(end (length (riece-message-text message)))
+	attrs)
+    (while (string-match
+	    "[\x2\xF\x16\x1F]\\|\x3\\([0-9]+\\)?\\(,[0-9]+\\)?"
+	    (riece-message-text message) start)
+      (if riece-ctlseq-hide-controls
+	  (put-text-property (match-beginning 0) (match-end 0)
+			     'invisible 'riece-ctlseq
+			     (riece-message-text message)))
+      (if attrs
+	  (put-text-property start (match-beginning 0)
+			     'riece-ctlseq-attributes (copy-sequence attrs)
+			     (riece-message-text message)))
+      (setq start (match-end 0)
+	    attrs (riece-ctlseq-update-attributes
+		   (match-string 0 (riece-message-text message)) attrs)))
+    (if (and (< start end) attrs)
+	(put-text-property start end
+			   'riece-ctlseq-attributes (copy-sequence attrs)
+			   (riece-message-text message))))
+  message)
+
+(defun riece-ctlseq-scan-region (start end)
+  (riece-scan-property-region
+   'riece-ctlseq-attributes
+   start end
+   (lambda (start end)
+     (riece-overlay-put (riece-make-overlay start end)
+			'face
+			(riece-ctlseq-face-from-cache
+			 (get-text-property start
+					    'riece-ctlseq-attributes))))))
+
+(defun riece-ctlseq-insinuate ()
+  (add-hook 'riece-message-filter-functions 'riece-ctlseq-message-filter)
+  (add-hook 'riece-after-insert-functions 'riece-ctlseq-scan-region))
+
+(provide 'riece-ctlseq)
+
+;;; riece-ctlseq.el ends here

File lisp/riece-display.el

 (require 'riece-channel)
 (require 'riece-misc)
 (require 'riece-layout)
+(require 'riece-signal)
+
+(autoload 'derived-mode-class "derived")
 
 (defvar riece-channel-buffer-format "*Channel:%s*"
   "Format of channel message buffer.")
     riece-update-channel-list-indicator)
   "Functions to update modeline indicators.")
 
+(defun riece-display-connect-signals ()
+  (riece-connect-signal
+   'channel-list-changed
+   (lambda (signal handback)
+     (save-excursion
+       (set-buffer riece-channel-list-buffer)
+       (run-hooks 'riece-update-buffer-functions))
+     (riece-update-channel-list-indicator)))
+  (riece-connect-signal
+   'user-list-changed
+   (lambda (signal handback)
+     (save-excursion
+       (set-buffer riece-user-list-buffer)
+       (run-hooks 'riece-update-buffer-functions)))
+   (lambda (signal)
+     (and riece-current-channel
+	  (riece-identity-equal (car (riece-signal-args signal))
+				riece-current-channel))))
+  (riece-connect-signal
+   'channel-switched
+   (lambda (signal handback)
+     (riece-update-status-indicators)
+     (riece-update-channel-indicator)
+     (riece-update-long-channel-indicator)
+     (force-mode-line-update t)
+     (riece-emit-signal 'channel-list-changed)
+     (riece-emit-signal 'user-list-changed riece-current-channel)
+     (save-excursion
+       (riece-redraw-layout))))
+  (riece-connect-signal
+   'user-joined-channel
+   (lambda (signal handback)
+     (riece-emit-signal 'user-list-changed riece-current-channel))
+   (lambda (signal)
+     (and riece-current-channel
+	  (riece-identity-equal (nth 1 (riece-signal-args signal))
+				riece-current-channel)
+	  (not (riece-identity-equal (car (riece-signal-args signal))
+				     (riece-current-nickname))))))
+  (riece-connect-signal
+   'user-joined-channel
+   (lambda (signal handback)
+     (riece-join-channel (nth 1 (riece-signal-args signal)))
+     (riece-switch-to-channel (nth 1 (riece-signal-args signal)))
+     (setq riece-join-channel-candidate nil))
+   (lambda (signal)
+     (riece-identity-equal (car (riece-signal-args signal))
+			   (riece-current-nickname))))
+  (riece-connect-signal
+   'user-left-channel
+   (lambda (signal handback)
+     (riece-emit-signal 'user-list-changed riece-current-channel))
+   (lambda (signal)
+     (and riece-current-channel
+	  (riece-identity-equal (nth 1 (riece-signal-args signal))
+				riece-current-channel)
+	  (not (riece-identity-equal (car (riece-signal-args signal))
+				     (riece-current-nickname))))))
+  (riece-connect-signal
+   'user-left-channel
+   (lambda (signal handback)
+     (riece-part-channel (nth 1 (riece-signal-args signal))))
+   (lambda (signal)
+     (riece-identity-equal (car (riece-signal-args signal))
+			   (riece-current-nickname))))
+  (riece-connect-signal
+   'user-renamed
+   (lambda (signal handback)
+     (riece-emit-signal 'user-list-changed riece-current-channel))
+   (lambda (signal)
+     (and riece-current-channel
+	  (equal (riece-identity-server (nth 1 (riece-signal-args signal)))
+		 (riece-identity-server riece-current-channel))
+	  (riece-with-server-buffer (riece-identity-server
+				     riece-current-channel)
+	    (riece-identity-assoc
+	     (riece-identity-prefix (nth 1 (riece-signal-args signal)))
+	     (riece-channel-get-users (riece-identity-prefix
+				       riece-current-channel))
+	     t)))))
+  (riece-connect-signal
+   'user-renamed
+   (lambda (signal handback)
+     (riece-update-status-indicators)
+     (riece-update-channel-indicator)
+     (force-mode-line-update t))
+   (lambda (signal)
+     (riece-identity-equal (nth 1 (riece-signal-args signal))
+			   (riece-current-nickname))))
+  (riece-connect-signal
+   'user-renamed
+   (lambda (signal handback)
+     (riece-switch-to-channel (nth 1 (riece-signal-args signal))))
+   (lambda (signal)
+     (and riece-current-channel
+	  (riece-identity-equal (car (riece-signal-args signal))
+				riece-current-channel))))
+  (riece-connect-signal
+   'user-renamed
+   (lambda (signal handback)
+     (let* ((old-identity (car (riece-signal-args signal)))
+	    (new-identity (nth 1 (riece-signal-args signal)))
+	    (pointer (riece-identity-member old-identity
+					    riece-current-channels)))
+       ;; Rename the channel buffer.
+       (when pointer
+	 (setcar pointer new-identity)
+	 (with-current-buffer (riece-channel-buffer old-identity)
+	   (rename-buffer (riece-channel-buffer-name new-identity) t)
+	   (setq riece-channel-buffer-alist
+		 (cons (cons new-identity (current-buffer))
+		       (delq (riece-identity-assoc old-identity
+						   riece-channel-buffer-alist)
+			     riece-channel-buffer-alist))))))))
+  (riece-connect-signal
+   'user-away-changed
+   (lambda (signal handback)
+     (riece-update-status-indicators)
+     (force-mode-line-update t))
+   (lambda (signal)
+     (riece-identity-equal (car (riece-signal-args signal))
+			   (riece-current-nickname))))
+  (riece-connect-signal
+   'user-operator-changed
+   (lambda (signal handback)
+     (riece-update-status-indicators)
+     (force-mode-line-update t))
+   (lambda (signal)
+     (riece-identity-equal (car (riece-signal-args signal))
+			   (riece-current-nickname))))
+  (riece-connect-signal
+   'channel-topic-changed
+   (lambda (signal handback)
+     (riece-update-long-channel-indicator)
+     (force-mode-line-update t))
+   (lambda (signal)
+     (and riece-current-channel
+	  (riece-identity-equal (car (riece-signal-args signal))
+				riece-current-channel))))
+  (riece-connect-signal
+   'channel-modes-changed
+   (lambda (signal handback)
+     (riece-update-long-channel-indicator)
+     (force-mode-line-update t))
+   (lambda (signal)
+     (and riece-current-channel
+	  (riece-identity-equal (car (riece-signal-args signal))
+				riece-current-channel))))
+  (riece-connect-signal
+   'channel-operators-changed
+   (lambda (signal handback)
+     (riece-emit-signal 'user-list-changed riece-current-channel))
+   (lambda (signal)
+     (and riece-current-channel
+	  (riece-identity-equal (car (riece-signal-args signal))
+				riece-current-channel))))
+  (riece-connect-signal
+   'channel-speakers-changed
+   (lambda (signal handback)
+     (riece-emit-signal 'user-list-changed riece-current-channel))
+   (lambda (signal)
+     (and riece-current-channel
+	  (riece-identity-equal (car (riece-signal-args signal))
+				riece-current-channel))))
+  (riece-connect-signal
+   'buffer-freeze-changed
+   (lambda (signal handback)
+     (riece-update-status-indicators)
+     (force-mode-line-update t))))
+
 (defun riece-update-user-list-buffer ()
   (save-excursion
-    (set-buffer riece-user-list-buffer)
     (if (and riece-current-channel
 	     (riece-channel-p (riece-identity-prefix riece-current-channel)))
 	(let* ((users
-		(with-current-buffer (process-buffer (riece-server-process
-						      (riece-identity-server
-						       riece-current-channel)))
+		(riece-with-server-buffer (riece-identity-server
+					   riece-current-channel)
 		  (riece-channel-get-users (riece-identity-prefix
 					    riece-current-channel))))
 	       (inhibit-read-only t)
 		    "\n")
 	    (setq users (cdr users)))))))
 
+(defun riece-format-identity-for-channel-list-buffer (index identity)
+  (or (run-hook-with-args-until-success
+       'riece-format-identity-for-channel-list-buffer-functions index identity)
+      (concat (format "%2d:%c" index
+		      (if (riece-identity-equal identity riece-current-channel)
+			  ?*
+			? ))
+	      (riece-format-identity identity))))
+
 (defun riece-update-channel-list-buffer ()
   (save-excursion
-    (set-buffer riece-channel-list-buffer)
     (let ((inhibit-read-only t)
 	  buffer-read-only
 	  (index 1)
       (riece-kill-all-overlays)
       (while channels
 	(if (car channels)
-	    (insert (riece-format-channel-list-line
-		     index (car channels))))
+	    (insert (riece-format-identity-for-channel-list-buffer
+		     index (car channels))
+		    "\n"))
 	(setq index (1+ index)
 	      channels (cdr channels))))))
 
-(defun riece-format-channel-list-line (index channel)
-  (or (run-hook-with-args-until-success
-       'riece-format-channel-list-line-functions index channel)
-      (concat (format "%2d:%c" index
-		      (if (riece-identity-equal channel riece-current-channel)
-			  ?*
-			? ))
-	      (riece-format-identity channel)
-	      "\n")))
-
 (defun riece-update-channel-indicator ()
   (setq riece-channel-indicator
 	(if riece-current-channel
 	      (riece-format-identity riece-current-channel))
 	  "None")))
 
+(defun riece-format-identity-for-channel-list-indicator (index identity)
+  (or (run-hook-with-args-until-success
+       'riece-format-identity-for-channel-list-indicator-functions
+       index identity)
+      (let ((string (riece-format-identity identity))
+	    (start 0))
+	;; Escape % -> %%.
+	(while (string-match "%" string start)
+	  (setq start (1+ (match-end 0))
+		string (replace-match "%%" nil nil string)))
+	(format "%d:%s" index string))))
+
 (defun riece-update-channel-list-indicator ()
   (if (and riece-current-channels
 	   ;; There is at least one channel.
 	   (delq nil (copy-sequence riece-current-channels)))
-      (let ((index 1))
+      (let ((index 1)
+	    pointer)
 	(setq riece-channel-list-indicator
-	      (mapconcat
-	       #'identity
-	       (delq nil
-		     (mapcar
-		      (lambda (channel)
-			(prog1
-			    (if channel
-				(format "%d:%s" index
-					(riece-format-identity channel)))
-			  (setq index (1+ index))))
-		      riece-current-channels))
-	       ",")))
+	      (delq
+	       nil
+	       (mapcar
+		(lambda (channel)
+		  (prog1
+		      (if channel
+			  (riece-format-identity-for-channel-list-indicator
+			   index channel))