--- /dev/null
+install-sh
+mkinstalldirs
+missing
+Makefile.in
+Makefile
+aclocal.m4
+autom4te.cache
+configure
+config.log
+config.status
+config.cache
+COPYING
+INSTALL
--- /dev/null
+/build-aux
+COPYING
+INSTALL
+Makefile
+Makefile.in
+aclocal.m4
+autom4te.cache/
+config.log
+config.status
+configure
+doc/Makefile
+doc/Makefile.in
+doc/mdate-sh
+doc/texinfo.tex
+install-sh
+lisp/Makefile
+lisp/Makefile.in
+lisp/riece-package-info.el
+lisp/test/Makefile
+lisp/test/Makefile.in
+missing
+lisp/*.elc
+doc/version-en.texi
+doc/version-ja.texi
+doc/stamp-1
+doc/stamp-vti
+doc/riece-en.info
+doc/riece-ja.info
+lisp/auto-autoloads.el
+lisp/custom-load.el
+lisp/custom-defines.el
+*~
+\#*#
+*.orig
+*.bak
+++*
+,,*
+=*
+/ChangeLog
+/.version
+# We don't import Gnulib modules which use the following directories.
+/lib
+/m4
--- /dev/null
+[submodule "gnulib"]
+ path = gnulib
+ url = git://git.sv.gnu.org/gnulib
--- /dev/null
+Copyright (C) 1998-2009 Daiki Ueno
+Copyright (C) 1989 Tor Lillqvist
+
+Riece is mainly written by Daiki Ueno <ueno@unixuser.org>.
+
+The development of Riece has started to redesign the Liece IRC client.
+Liece was mainly written by the same author of Riece. Liece is based
+on Irchat (version 3.01) which has been distributed under GNU General
+Public License version 1 or later. Tor Lillqvist <tml@iki.fi> is the
+original author of Irchat. The current Riece source code, however,
+doesn't contain any code from Irchat. For the historical reason, the
+original copyright statement of Irchat is filed under
+doc/irchat-copyright.el.
+
+Riece has many code borrowed from other GPL'ed elisp packages such as
+Gnus, Emacs-w3m, ECB, and SEMI. I would like to thank the developers
+of these packages.
+
+Other authors:
+
+TAKAHASHI Kaoru <kaoru@kaisei.org>
+OHASHI Akira <bg66@koka-in.org>
+Yoichi NAKAYAMA <yoichi@geiin.org>
+Masatake YAMATO <jet@gyve.org> (riece-yank.el)
+Steve Youngs <steve@sxemacs.org> (riece-xfaceb.el)
\ No newline at end of file
--- /dev/null
+2012-05-29 Daiki Ueno <ueno@unixuser.org>
+
+ * Riece: Version 9.0.0 released.
+ * configure.ac: Bump to 9.0.0.
+
+ * NEWS: Add entry for 9.0.0.
+ * NEWS.ja: Ditto.
+
+2011-05-29 Daiki Ueno <ueno@unixuser.org>
+
+ * Riece: Version 8.0.0 released.
+ * configure.ac: Bump to 8.0.0.
+
+ * NEWS: Add entry for 8.0.0.
+ * NEWS.ja: Ditto.
+
+2010-12-24 Daiki Ueno <ueno@unixuser.org>
+
+ * Riece: Version 7.0.3 released.
+ * configure.ac: Bump to 7.0.3.
+
+ * NEWS: Add entry for 7.0.3.
+ * NEWS.ja: Ditto.
+
+2010-12-10 Daiki Ueno <ueno@unixuser.org>
+
+ * Riece: Version 7.0.2 released.
+ * configure.ac: Bump to 7.0.2.
+
+ * NEWS: Add entry for 7.0.2.
+ * NEWS.ja: Ditto.
+
+2010-05-29 Daiki Ueno <ueno@unixuser.org>
+
+ * Riece: Version 7.0.0 released.
+ * configure.ac: Bump to 7.0.0.
+
+ * NEWS: Add entry for 7.0.0.
+ * NEWS.ja: Ditto.
+
+2010-04-07 Daiki Ueno <ueno@unixuser.org>
+
+ * NEWS.ja, README.ja, doc/riece-ja.texi: Change the encoding to
+ UTF-8.
+
+2009-09-10 Daiki Ueno <ueno@unixuser.org>
+
+ * Riece: Version 6.1.0 released.
+ * configure.ac: Bump up version to 6.1.0.
+
+2009-05-30 Daiki Ueno <ueno@unixuser.org>
+
+ * Riece: Version 6.0.0 released.
+ * configure.ac: Bump up version to 6.0.0.
+
+2009-04-22 Daiki Ueno <ueno@unixuser.org>
+
+ * Makefile.am (EXTRA_DIST): Remove INSTALL-CVS.
+ * INSTALL-CVS: Remove; see doc/HACKING instead.
+
+2008-05-30 Daiki Ueno <ueno@unixuser.org>
+
+ * Riece: Version 5.0.0 released.
+ * configure.ac: Bump up version to 5.0.0.
+
+2007-11-26 Daiki Ueno <ueno@unixuser.org>
+
+ * configure.ac: Use modern AC_INIT.
+
+2007-05-29 Daiki Ueno <ueno@unixuser.org>
+
+ * Riece: Version 4.0.0 released.
+ * configure.ac: Bump up version to 4.0.0.
+
+2007-01-29 Daiki Ueno <ueno@unixuser.org>
+
+ * Riece: Version 3.1.2 released.
+ * configure.ac: Bump up version to 3.1.2.
+
+2006-12-18 Daiki Ueno <ueno@unixuser.org>
+
+ * configure.ac: Generate lisp/riece-package-info.el.
+
+2006-09-29 Daiki Ueno <ueno@unixuser.org>
+
+ * Riece: Version 3.1.1 released.
+ * configure.ac: Bump up version to 3.1.1.
+
+2006-07-29 Daiki Ueno <ueno@unixuser.org>
+
+ * Riece: Version 3.1.0 released.
+ * configure.ac: Bump up version to 3.1.0.
+
+2006-05-29 Daiki Ueno <ueno@unixuser.org>
+
+ * Riece: Version 3.0.0 released.
+ * configure.ac: Bump up version to 3.0.0.
+
+2005-11-19 Daiki Ueno <ueno@unixuser.org>
+
+ * Riece: Version 2.0.2 released.
+ * configure.ac: Bump up version to 2.0.2.
+
+2005-09-29 Daiki Ueno <ueno@unixuser.org>
+
+ * Riece: Version 2.0.1 released.
+ * configure.ac: Bump up version to 2.0.1.
+
+2005-08-29 Daiki Ueno <ueno@unixuser.org>
+
+ * Riece: Version 2.0.0 released.
+ * configure.ac: Bump up version to 2.0.0.
+
+2005-08-06 Daiki Ueno <ueno@unixuser.org>
+
+ * Makefile.am (EXTRA_DIST): Add HACKING.ja.
+
+2005-03-06 Daiki Ueno <ueno@unixuser.org>
+
+ * Riece: Version 1.0.8 released.
+ * configure.ac: Bump up version to 1.0.8.
+
+2005-02-05 Daiki Ueno <ueno@unixuser.org>
+
+ * Riece: Version 1.0.7 released.
+ * configure.ac: Bump up version to 1.0.7.
+
+2004-12-07 Daiki Ueno <ueno@unixuser.org>
+
+ * README.ja: New file.
+
+2004-12-05 Daiki Ueno <ueno@unixuser.org>
+
+ * Riece: Version 1.0.6 released.
+ * configure.ac: Bump up version to 1.0.6.
+
+2004-11-07 Daiki Ueno <ueno@unixuser.org>
+
+ * Riece: Version 1.0.5 released.
+ * configure.ac: Bump up version to 1.0.5.
+
+2004-10-11 Daiki Ueno <ueno@unixuser.org>
+
+ * Riece: Version 1.0.4 released.
+ * configure.ac: Bump up version to 1.0.4.
+
+2004-09-05 Daiki Ueno <ueno@unixuser.org>
+
+ * Riece: Version 1.0.3 released.
+ * configure.ac: Bump up version to 1.0.3.
+
+2004-08-16 Daiki Ueno <ueno@unixuser.org>
+
+ * Riece: Version 1.0.2 released.
+ * configure.ac: Bump up version to 1.0.2.
+
+2004-07-10 Daiki Ueno <ueno@unixuser.org>
+
+ * Riece: Version 1.0.1 released.
+ * configure.ac: Bump up version to 1.0.1.
+
+2004-05-29 Daiki Ueno <ueno@unixuser.org>
+
+ * Riece: Version 1.0.0 released.
+ * configure.ac: Bump up version to 1.0.0.
+
+2004-05-07 Daiki Ueno <ueno@unixuser.org>
+
+ * configure.ac: Set AM_CONDITIONAL XEMACS.
+ * Makefile.am: Emit install-package and package target only if
+ EMACS_FLAVOR = xemacs.
+
+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-25 Daiki Ueno <ueno@unixuser.org>
+
+ * Riece: Version 0.1.7 released.
+ * configure.ac: Bump up version to 0.1.7.
+
+2003-11-10 Daiki Ueno <ueno@unixuser.org>
+
+ * Riece: Version 0.1.6 released.
+ * configure.ac: Bump up version to 0.1.6.
+
+2003-10-24 Daiki Ueno <ueno@unixuser.org>
+
+ * Riece: Version 0.1.5 released.
+ * configure.ac: Bump up version to 0.1.5.
+
+2003-10-19 Daiki Ueno <ueno@unixuser.org>
+
+ * Riece: Version 0.1.4 released.
+ * configure.ac: Bump up version to 0.1.4.
+
+2003-10-13 Daiki Ueno <ueno@unixuser.org>
+
+ * Riece: Version 0.1.3 released.
+ * configure.ac: Bump up version to 0.1.3.
+
+2003-10-05 Daiki Ueno <ueno@unixuser.org>
+
+ * Riece: Version 0.1.2 released.
+ * configure.ac: Bump up version to 0.1.2.
+
+2003-08-30 Daiki Ueno <ueno@unixuser.org>
+
+ * Riece: Version 0.1.1 released.
+ * configure.ac: Bump up version to 0.1.1.
+
+2003-08-25 Daiki Ueno <ueno@unixuser.org>
+
+ * Riece: Version 0.1.0 released.
+ * configure.ac: Bump up version to 0.1.0.
+
+2003-08-03 Daiki Ueno <ueno@unixuser.org>
+
+ * Riece: Version 0.0.4 released.
+ * configure.ac: Bump up version to 0.0.4.
+
+2003-06-02 Daiki Ueno <ueno@unixuser.org>
+
+ * Riece: Version 0.0.3 released.
+ * configure.ac: Bump up version to 0.0.3.
+
+ * Makefile.am (SUBDIRS): Add doc.
+
+2003-06-01 Daiki Ueno <ueno@unixuser.org>
+
+ * configure.ac: Simplified.
+ * Makefile.am (SUBDIRS): Remove dcc.
+
+2003-05-30 Daiki Ueno <ueno@unixuser.org>
+
+ * Riece: Version 0.0.2 released.
+ * configure.ac: Bump up version to 0.0.2.
+
+ * INSTALL-CVS: New file.
+ * Makefile.am (EXTRA_DIST): Add INSTALL-CVS.
+
+2003-05-29 Daiki Ueno <ueno@unixuser.org>
+
+ * Makefile.am (AUTOMAKE_OPTIONS): Add "no-dependencies".
+
+2003-05-29 Daiki Ueno <ueno@unixuser.org>
+
+ * Riece: Version 0.0.1 released.
+
--- /dev/null
+SUBDIRS = lisp doc
+AUTOMAKE_OPTIONS = no-dependencies
+
+if XEMACS
+install-package package:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $@) \
+ done
+endif
+
+changelog_etc = \
+ ChangeLog-2014 \
+ lisp/ChangeLog-2014 \
+ lisp/ChangeLog.Liece
+
+ja_docs = \
+ doc/ja/NEWS \
+ doc/ja/README \
+ doc/ja/README-hacking
+
+BUILT_SOURCES = $(top_srcdir)/.version
+
+EXTRA_DIST = \
+ $(ja_docs) \
+ $(changelog_etc) \
+ bootstrap \
+ bootstrap.conf \
+ $(BUILT_SOURCES)
+
+$(top_srcdir)/.version:
+ echo $(VERSION) > $@-t && mv $@-t $@
+
+# Arrange so that .tarball-version appears only in the distribution
+# tarball, and never in a checked-out repository.
+# The perl substitution is to change some key uses of "rm" to "/bin/rm".
+# See the rm_subst comment for details.
+dist-hook: gen-ChangeLog
+ $(AM_V_GEN)echo $(VERSION) > $(distdir)/.tarball-version
+ $(AM_V_at)perl -pi -e '$(rm_subst)' $(distdir)/Makefile.in
+
+gen_start_date = 2014-04-12
+.PHONY: gen-ChangeLog
+gen-ChangeLog:
+ $(AM_V_GEN)if test -d .git; then \
+ $(top_srcdir)/build-aux/gitlog-to-changelog \
+ --amend=$(srcdir)/build-aux/git-log-fix \
+ --since=$(gen_start_date) > $(distdir)/cl-t; \
+ rm -f $(distdir)/ChangeLog; \
+ mv $(distdir)/cl-t $(distdir)/ChangeLog; \
+ fi
--- /dev/null
+* Major changes in 9.0.0
+
+** New command to re-order channels is added (ueno)
+ See the doc string of riece-command-reorder-channels.
+
+** Complete multiple channels when joining (ueno)
+
+* Major changes in 8.0.0
+
+** Extend URL regexp used in riece-url (ueno)
+
+** Use lexical binding everywhere (ueno)
+
+** Update doc/ptexinfmt.el (kaoru)
+
+* Major changes in 7.0.3
+
+** Fix freeze behavior when the cursor is on a channel buffer (ueno)
+ riece-shrink-buffer had a bug which moves the cursor to the top or
+ bottom of buffer even when the buffer is frozen.
+
+** Fix out-of-tree build (kaoru, ueno)
+ There were some code not passing srcdir correctly.
+
+** Remove old-style backquotes for Emacs 24 (ueno)
+
+* Major changes in 7.0.2
+
+** Fix bug of reading IRC logs (ueno)
+ If coding-system was not specified when writing log to file, Riece
+ added extra ".nil" to the filename. That causes erronous behavior
+ on reading the logs back.
+
+** Fix control sequence parsing (ueno)
+
+* Major changes in 7.0.1
+
+** Fix compilation error on Emacs 24. (ueno)
+ Emacs 24 does not have make-local-hook.
+
+** Suppress byte-compile warnings. (kaoru)
+ Suppress "`save-excursion' defeated by `set-buffer'".
+
+** Support "make distcheck". (ueno)
+
+* Major changes in 7.0.0
+
+** Mailing list address changed to riece-discuss@nongnu.org.
+
+** Fix build for XEmacs 21.5. (ueno)
+
+** Fix coloring riece-channel-list-indicator on mode-line. (ueno)
+
+* Major changes in 6.1.0
+
+** Revert to use setq instead of Custom for saved settings. (ueno)
+
+** Add-on management commands can now be usable from the Command buffer. (kaoru)
+
+* Major changes in 6.0.0
+
+** New add-on riece-desktop-notify. (bg66)
+
+** Fix Custom-based setting mechanism.
+
+* Major changes in 5.0.0
+
+** Use Custom for saved settings. (ueno)
+
+** Use stock icons for toolbar. (ueno)
+
+** Follow the procedure recommended in RFC2812 when making a
+ connection to the server. This change is needed for some IRC
+ servers including TwitterIrcGateway. (ueno)
+
+** Allow non-ASCII realname. (KASUGA Toru)
+
+** Fixed a corner case bug of riece-keywords settings. (Takeru Naito)
+
+* Major changes in 4.0.0
+
+** New add-on riece-twitter. (ueno)
+
+** riece-rdcc can now specify sending ports. (ueno)
+
+* Major changes in 3.1.2
+
+** Message catalog. (ueno)
+
+* Major changes in 3.1.1
+
+** riece-async works again. (ueno)
+
+** riece-shrink-buffer is now enabled by default. (ueno)
+
+** New window layout "spiral". (URABE Shyouhei)
+
+* Major changes in 3.1.0
+
+** Prevent reentrace of message handlers. This might fix some long
+ standing bug in message handling. (ueno)
+
+** Removed dependency on the calc package from riece-ndcc.el. (ueno)
+
+** Fixed a bug in the 353 message handler. (ueno)
+
+* Major changes in 3.0.0
+
+** Changed the meaning of riece-username. If you set this option, you
+ will need to set riece-realname instead. (ueno)
+
+** Cause an error if a user requests to close already closed server. (yoichi)
+
+** New add-on riece-epg.el, which enables secure conversation using
+ GnuPG. (ueno)
+
+** Fixed a couple of bugs in inviting users. (Steve Youngs)
+
+** Fixed a redisplay bug when a user leaves a channel. (ueno)
+
+** Reverted the default value of riece-alias-alternate-separator to
+ "@". (ueno)
+
+* Major changes in 2.0.2
+
+** Fixed C-c l (riece-command-list) behavior. It didn't display
+ channel TOPIC correctly. (ueno)
+
+** Don't alter case of user/channel names when completing user
+ input. (ueno)
+
+** Changed default value of alternate separator of a channel name and an
+ IRC server name to "%". (ueno)
+
+* Major changes in 2.0.1
+
+** If there is a message in previously selected channel, Riece 2.0.0
+ doesn't treat it as an unread channel. 2.0.1 fixes it. (ueno)
+
+** New add-on riece-xfaceb.el, which displays X-Face/Colour Face in
+ IRC buffers. (Steve Youngs)
+
+* Major changes in 2.0.0
+
+** Support multiple coding-systems on a server.
+ You can use different coding-systems for different channels. (ueno)
+ For example:
+ (setq riece-channel-coding-system-alist
+ '(("#euc-jp" . euc-jp)
+ ("#utf-8 irc.freenode.net" . utf-8)))
+
+** Support uninstall, unload (dangerous) operations for add-ons.
+ Now you can fully customize riece-addons in the add-on listing
+ mode. (ueno)
+
+** New mechanism for executing Ruby programs. To use it, see the
+ commentary section of riece-ruby.el. (ueno)
+
+** New add-on riece-eval-ruby.el, which regards user input prefixed by
+ ",ruby " as a Ruby program and sends the result to the current
+ channel. (ueno)
+
+** New add-on riece-shrink-buffer.el, which now takes care of periodic
+ buffer shrinking. If you have set riece-max-buffer-size, you will
+ need to enable the riece-shrink-buffer add-on in the add-on listing
+ mode. (ueno)
+
+** Don't signal an error when a user is quitting, and who has joined a
+ channel where you left. (ueno)
+
+** When saving a log file, suffix the name of the coding-system used
+ onto the filename. This will avoid mojibake even
+ riece-log-coding-system is not set. (ueno)
+
+** While traversing channel list with C-c g, offer channels in order
+ of precedence where they have newer unread messages. (ueno)
+
+** Allow "@" instead of " " as a separator of a channel name and an
+ IRC server name. (ueno)
+
+** Rewrite the Japanese manual (riece-ja.texi) for IRC & Emacs
+ newbies. (ueno)
+
+** Allow users to hide *Others* buffer. (ueno)
+
+** Use seperate buffer to store debugging output. (ueno)
+
+** Added new make rule for byte-compiling elisp files individually.
+ To use it, after configure, do "make compile-individually" in
+ lisp/. (ueno)
+
+** Include a document for developers (doc/HACKING{,.ja}) (ueno)
+
+* Major changes in 1.0.8
+
+** Mitigate file locking scheme of riece-log. (ueno)
+
+** Format idle seconds in human readable form. (ueno)
+
+** Separate riece-obarray into riece-channel-obarray and
+ riece-user-obarray. (kaoru)
+
+** Fixed bugs caused by mishandling of channel names (which should be
+ case insensitive.) (ueno)
+
+** Support SXEmacs version names. (Steve Youngs)
+
+** Support CTCP TIME. (Steve Youngs)
+
+** Ignore directories under ~/.riece/addons. (kaoru)
+
+** Fixed wrong-number-of-arguments error on riece-command-part. (yoichi)
+
+** Fixed a bug which assumes existence of ~/.riece/addons when
+ startup. (ueno)
+
+* Major changes in 1.0.7
+
+** New add-on riece-toolbar. (ueno)
+ riece-toolbar displays icons on toolbar. Currently not all the
+ icons are included.
+
+** New add-on riece-keepalive. (ueno)
+ riece-keepalive spontaneously sends a PING message to server to
+ keep an IRC connection.
+
+** New add-on riece-google. (bg66)
+ riece-google searches on Google and sends the result to the channel.
+
+** New add-on riece-eval. (bg66)
+ riece-eval evaluates elisp expression and sends the result to the channel.
+
+** Some add-ons are enabled by default. (ueno)
+ riece-log, riece-alias, riece-ctlseq, and riece-keyword are now
+ enabled by default.
+
+** New command riece-command-suspend-resume. (ueno)
+ riece-command-suspend-resume saves or restores the current window
+ configuration.
+
+** Preserve cursor position when clicking button widget. (ueno)
+
+** Decorate modeline indicator with faces. (ueno)
+
+** Count users in NAMES reply. (ueno)
+
+** New user option riece-part-message. (ueno)
+
+** Add-ons located in riece-addon-directory are automatically enabled. (ueno)
+
+** Default value of riece-buffer-dispose-function is now kill-buffer. (ueno)
+
+** Backtrace when encountered an error in process-filter. (ueno)
+
+** Ask channel key to user when it is required. (ueno)
+
+** Automatic buffer shrinking is now disabled by default. (ueno)
+
+** New directory structure for riece-log. (ueno)
+
+** Fixed a bug in user-renamed signal-filter. (kaoru)
+
+** Fixed a bug in riece-command-enable-addon and
+ riece-command-disable-addon. (yoichi)
+
+* Major changes in 1.0.6
+
+** Bundle url-riece, a backend of url-irc which comes with the recent
+ GNU Emacs. (Yamato-san)
+
+** New user option riece-url-regexp-alist to allow users to define
+ mapping from arbitrary strings (such as "Bug#12345") to URL. (This
+ feature is a backport from Liece) (ueno)
+
+** New modeline indicator which represents user's channel operator
+ status in the current channel. (ueno, thanks to k-to)
+
+** Remove multiple lines at a time when shrinking channel buffers.
+ Number of lines to be removed is controlled by
+ riece-shrink-buffer-remove-lines option. (ueno, thanks to ysjj)
+
+** riece-alias-alist now works again. (ueno)
+
+** Fixed a bug in flow control for sending long messages, introduced
+ in 1.0.4. (ueno)
+
+** New command riece-submit-bug-report to generate a template for good
+ problem report. (ueno)
+
+** Accept radical IRC proxy programs which break with tradition of the
+ original IRC server implementation. (ueno, thanks to k-to san)
+
+** New key bind C-c # <number> to switch channel by number. (ueno,
+ thanks to ysjj)
+
+** If a prefix-argument is given, riece-yank sends message as a NOTICE. (bg66)
+
+* Major changes in 1.0.5
+
+** Added some test cases. (ueno)
+
+** Alternate separator string for channel names. (ueno)
+ In case riece-alias-alternate-separator set to "@", rewriting will
+ be done as follows:
+
+ "#riece" -> "#riece"
+ "#riece localhost" -> "#riece@localhost"
+ "#ch@nnel" -> "#ch@@nnel"
+ "#ch@nnel localhost" -> "#ch@@nnel@localhost"
+
+** Fixed interop bug in DCC. (ueno)
+
+** New add-on riece-yank to send strings from kill-ring. (by Yamato-san)
+
+** English translation of texinfo document is included. (ueno)
+
+* Major changes in 1.0.4
+
+** Do "flow control" to avoid flooding. (ueno)
+
+** Automatically open servers when joining channels at startup. Users
+ can now omit riece-startup-server-list settings. (ueno)
+
+** riece-mini provides a command to browse recent messages. (bg66)
+
+* Major changes in 1.0.3
+
+NOTE: This release includes some fixes to long standing bugs in essential features. I recommend to upgrade from the older versions.
+
+** Remove nonexistent users from user list. (Thanks to Yamashita-san)
+
+** Improved line truncation customizability. Users can now control it
+ by simply setting truncate-lines on each buffer. (Thanks to
+ Yamashita-san)
+
+** Added new user option riece-window-center-line to control buffer
+ scrolling behavior.
+
+** Fixed completion bug in command buffer. (Thanks to Yamashita-san)
+
+** Remove chat partner from channel list when he/she resigned from
+ IRC. (Thanks to Morimoto-san)
+
+** Exit immediately after an error occurred in connecting to the
+ default IRC server. (Thanks to k-to san)
+
+* Major changes in 1.0.2
+
+** Fixed problem hiding menubar menus when riece-url is enabled.
+
+** Split IRC protocol interface from the core modules.
+
+** Fixed minor bugs.
+
+* Major changes in 1.0.1
+
+** Arranged background colors of modeline faces (for XEmacs)
+
+** When changing channel modes, do not prepend ":" to MODE message
+ (Thanks to Yamada-san)
+
+** Added riece-foolproof add-on which prevents miss posting to
+ channels (by Takahashi-san)
+
+** Arranged the order of modeline elements on channel buffers (by
+ Takahashi-san)
+
+** Changed open/close bracket for displaying own notices (by Takahashi-san)
+
+** Don't register signal-slot functions duplicatedly.
+
+** New user command riece-command-beginning-of-buffer bound to C-c Home.
+
+** For frozen channels, preserve cursor position of channel buffers
+ while zapping between other channels.
+
+** Follow the change in emacs-cvs, check the return value of
+ current-word (by Nakayama-san)
+
+** Fixed random number generation logic for riece-hangman (by Takahashi-san)
+
+** Signal "No text to send" error if user types C-c p on an empty line.
+
+** New user option riece-startup-ignored-user-list: which can be used
+ to set up riece-ignored-user-list in ~/.riece/init.el.
+
+** Allow sending/receiving files whose names contain whitespaces.
+
+* Major changes in 1.0.0
+
+** New UI for enabling/disabling add-ons (to enter this mode, C-c ^)
+
+** Fixed bug that a user couldn't quit password input with C-g.
+
+** New add-on "riece-hangman" which allows channel members to play hangman(6).
+
+** Display error message on C-c q when no IRC process are running.
+
+** New add-on "riece-ignore" which allows to ignore messages from
+ particular users.
+
+** Accept nicknames consisting more than 9 letters.
+
+** Avoid duplicate initialization of add-ons.
+
+** New add-on "riece-biff" which displays biff mark ("[R]") on
+ mode-line. (by Ohashi-san)
+
+** New add-on "riece-kakasi" which converts Japanese to roman string.
+
+** Fixed prompt strings to indicate the current action more
+ precisely. (suggested by Yamashita-san)
+
+* Major changes in 0.2.2
+
+** Interpret control sequences used in IRC such as ^B, ^V, ^_, etc.
+ This feature is implemented as an add-on called riece-ctlseq.
+
+** Fixed bug that private messages were not treated as unread.
+
+** Buffer "freeze" status can be toggled in each buffer respectively.
+ (use C-t C-f)
+
+** Use canonicalized channel names to locate directories where log
+ files are stored. (by Ohashi-san)
+
+* Major changes in 0.2.0
+
+** Introduced "signal-slot" (as in Qt, GTK+) mechanism to routing
+ display events.
+
+** When a user requests NAMES, insert nicknames into the channel buffer.
+
+** Fixed bug in riece-lsdb. (by Nakayama-san)
+
+* Major changes in 0.1.8
+
+** Added riece-lsdb add-on which cooperates with LSDB.
+** Added riece-xface add-on which displays X-Faces in user list buffer.
+
+** Fixed bug that channel names were treated case sensitively.
+
+** Handle messages from other clients which use the same IRC proxy.
+ (by Takahashi-san)
+
+* Major changes in 0.1.7
+
+** Added riece-async add-on which provides safe connection to an IRC
+ server via local proxy which responds to PING requests while Emacs
+ is busy or suspended.
+
+** Fixed changing user away status bug when riece-away-message is set.
+ (Thanks to Fujimura-san)
+
+** Remove side effects on standard-syntax-table when loading.
+ (Thanks to Hori-san)
+
+** Can join channels on several servers at startup by setting
+ riece-startup-server-list as well as riece-startup-channel-list.
+
+** New user option `riece-log-coding-system' to specify default coding
+ system used for log files.
+
+** New user option `riece-keyword-notify-functions' called when
+ someone spoke a message including the specified keyword. Please use
+ it instead of `riece-notify-keyword-functions'(very confusing
+ name!).
+
+** riece-log-flashback also restores faces and buttons.
+
+** riece-{unread,mini} ignores NOTICE and CTCP ACTION messages.
+
+* Major changes in 0.1.6
+
+** Fixed running problems on Emacs 20.7.
+
+** Fixed compilation failure on XEmacs 21.1.
+
+** Allow riece-rdcc to receive large files without memory consumption.
+
+** Check channel modes when joinning if riece-gather-channel-modes == t.
+
+** Fixed run-idle-timer usage to shrink channel buffers.
+
+** Fixed buffer scrolling behavior when switching channels.
+
+** Allow to specify qualified channel names in
+ riece-log-directory-map. (by Ohashi-san)
+
+* Major changes in 0.1.5
+
+** Added 6 new window layouts.
+
+** Automatically save/restore the current window layout.
+
+** Added riece-icon add-on which decorates buffers with icons.
+
+** Speedup in redrawing the user list buffer.
+
+** Improve usability of CTCP ACTION (Thanks to knu-san)
+
+** Fixed bug in riece-rdcc which causes freeze on DCC SEND.
+
+** When riece server was opened, Do riece-command-configure-windows
+ instead of signaling. (Thanks to Ohashi-san)
+
+** Fixed bug in C-c o (riece-command-set-operators) and C-c v
+ (riece-command-set-speakers).
+
+** Shrink buffers when they exceeds riece-max-buffer-size.
+
+* Major changes in 0.1.4
+
+** Bind "N" instead of "\C-n" to riece-command-names in channel
+ buffers. (thanks to Takahashi-san)
+
+** Fixed bug causing an error when the user typed C-c C-t a
+ (riece-command-toggle-away). (thanks to Maeda-san)
+
+** Don't redisplay buffers when the current selected window doesn't
+ display Riece buffers.
+
+** Don't reuse buffers created by different programs. Genereate new
+ buffer in such case.
+
+** Fixed bug which doesn't allow to join a channel whose name is
+ beginning with "!!".
+
+** When riece-keyword is effective, don't check if the message from
+ myself contains given keywords.
+
+** Signal an error when the user issues a command which assumes the
+ current channel though the current channel is not available.
+
+** Added riece-menu add-on which adds a menu entry in the menubar.
+
+* Major changes in 0.1.3
+
+** Treat channel names in PRIVMSG/NOTICE messages case-insensitively.
+
+** When riece-history is effective, mark the last visited channel with "+".
+
+** Added riece-button add-on which decorates buffers with buttons and
+ define some popup-menus.
+
+** Added riece-keyword add-on which notifies the user when the arrived
+ message contains given keywords.
+
+ If you are using XEmacs and want to be notified of keywords with
+ sound, add the following lines to your ~/.riece/init.el:
+
+ (load-default-sounds)
+ (setq riece-keywords '("foo" "bar"))
+ (add-hook 'riece-notify-keyword-functions
+ (lambda (keyword) (play-sound 'cuckoo)))
+
+* Major changes in 0.1.2
+
+** Fixed bug when joinning a channel using a key.
+
+** Revive riece-startup-channel-list.
+
+** New user option riece-rdcc-save-directory is added.
+
+** Fixed unable to interrupt password input.
+
+** Fixed bug in the INVITE handler.
+
+** Prompt a channel name when the user joins the invited channel.
+
+** Fixed bug that occasionally kept riece-channel-list-indicator not
+ up to date.
+
+* Major changes in 0.1.1
+
+** Load some add-ons by default.
+
+** Fixed bug with riece-default-channel-binding not working.
+
+** Mark the current channel with "*" in *Channels* buffer.
+
+** If riece-debug is turned off, don't report connection status when exiting.
+
+** New add-on: riece-history manages channel switching history.
+
+** New add-on: riece-guess offers the next channel user may want to check.
+
+ Tips:
+
+ If you have the following lines in ~/.riece/init.el:
+
+ (setq riece-guess-channel-try-functions
+ '(riece-guess-channel-from-unread
+ riece-guess-channel-from-history))
+
+ By hitting `C-c g' repeatedly, you can check channels in the
+ following order:
+
+ 1. Channels where there is unread message.
+ 2. Channels where you have visited recently.
+ 3. The rest.
+
+* Major changes in 0.1.0
+
+** Use vectors to represent channels and users.
+
+** Improve process management:
+ -- Server names are now embedded in process names.
+ -- Integrate scattered connection management code into riece-server.el.
+ -- Force disconnect if the server does not respond after sending QUIT.
+
+** New add-on: riece-doctor.el allows to pretended to be a doctor.
+
+** Window configuration can be easily switched by hitting C-c t l.
+
+** New add-on: riece-skk-kakutei.el avoids ▽ being included in
+ spoken text, when you are using SKK. (by Takahashi-san)
+
+** New predefined layout which emulates "top" window-style as in Liece.
+ (by Takahashi-san)
+
+* Major changes in 0.0.4
+
+** Added riece-mini add-on which allows conversation through a
+ minibuffer (by Ohashi-san).
+
+** Added log collector add-on (riece-log) (by Ohashi-san).
+
+** riece-command-next-channel (C-c >) and
+ riece-command-previous-channel (C-c <) now follow the channel list
+ circularly (by Nakayama-san).
+
+** When riece-unread is enabled, you can quickly check the unread
+ channels by hitting C-c C-u (by Ohashi-san).
+
+** Display of status indicators obeys some IRC messages.
+
+** Replaced ptexinfmt.el with the version which does not depend on
+ APEL (Thanks to Yamaoka-san).
+
+* Major changes in 0.0.3
+
+** Fix bug connecting to two servers which require passwords (Thanks
+ to Nakayama-san)
+
+** Fix inconsistency when changing case of letters in nickname
+
+** Catch all errors occured in handler hooks
+
+** Support DCC file transfer (riece-ndcc.el, riece-rdcc.el)
+
+** Add "mark unread channels" add-on (riece-unread.el)
+
+** Add Japanese texinfo manual (I'll translate it in the future)
+
+* Major changes in 0.0.2
+
+** Don't use APEL functions (pop, push)
+
+** "depcomp" was missing in the previous archive (sorry!)
+
+** Fix bug building on Windows environment (Thanks to Ohashi-san)
+
+** Fix inconsistency when changing nickname
+
+** Fix bug on C-c C-t u (M-x riece-command-toggle-user-list-mode)
+
+** Provide add-on mechanism
+
+** Partial support for CTCP
+
+** Make font-lock related module (riece-highlight) add-on
+
+** Revive URL collector (formerly liece-url) as add-on
+
+* Major changes in 0.0.1
+
+** Initial release.
+
+* For details of changes, see the file ChangeLog.
+\f
+Local variables:
+mode: text
+mode: outline
+paragraph-separate: "[ \f]*$"
+end:
--- /dev/null
+* What's this?
+
+Riece is an IRC client for Emacs.
+
+Riece provides the following features:
+
+- Several IRC servers may be used at the same time.
+- Essential features can be built upon the extension framework (called
+ "add-on") capable of dependency tracking.
+- Installation is easy. Riece doesn't depend on other packages.
+- Setup is easy. Automatically save/restore the configuration.
+- Riece uses separate windows to display users, channels, and
+ dialogues. The user can select the window layout.
+- Step-by-step instructions (in info format) are included.
+- Mostly compliant with RFC 2812.
+
+* Directory tree
+
+This package contains following directories:
+
+lisp/ - Emacs Lisp files.
+doc/ - Documentation files.
+
+* Requirements
+
+- Emacs 20.7 or later / XEmacs 21.4 or later
+- Ruby 1.8 or later (optional)
+
+* Installation
+
+$ ./configure
+$ sudo make install
+
+Add the following line to your Emacs startup file such as ~/.emacs.
+
+ (autoload 'riece "riece" "Start Riece" t)
+
+If you are using XEmacs and want to install as a package, supply
+"--with-xemacs" option to the configure script and use
+"install-package" target instead of "install".
+
+* Manuals
+
+Info manuals are available after installation. To read, start Emacs
+and type M-x info and select "Riece-en".
--- /dev/null
+-*- mode: outline -*-
+
+This document is for Riece developers or those who are interested in
+the development.
+
+* Development process
+
+** Reporting bugs
+
+If you find a bug, please file it at
+https://savannah.nongnu.org/bugs/?group=riece
+
+** Getting the development source code
+
+We currently use Git. Follow the instructions below to build the
+development version.
+
+(1) checkout modules
+
+ git clone git://git.sv.gnu.org/riece.git
+
+(2) generate configure script
+
+ ./bootstrap
+
+(3) run the configure script
+
+ ./configure
+
+(4) build and install
+
+ make
+ make install
+
+* Source structure
+
+** Modules
+
+Riece consists of many elisp modules listed below, ordered by the
+number of dependencies they have.
+
+- riece-globals
+ This module defines global variables.
+
+- riece-options
+ This module defines user options.
+
+- riece-version
+ This module defines the version of Riece.
+
+- riece-coding
+ This module provides functions which support character code conversions.
+
+- riece-complete
+ This module provides functions which support tab completion feature
+ in a mini buffer.
+
+- riece-addon
+ This module manages add-ons.
+
+- riece-mode
+ This module manages modes of riece-channel/riece-user objects.
+
+- riece-identity
+ This module defines the riece-identity object type which represents
+ global names of riece-channel/riece-user objects.
+
+- riece-channel
+ This module defines the riece-channel object type.
+
+- riece-user
+ This module defines the riece-user object type.
+
+- riece-misc
+ This module provides miscellaneous functions.
+
+- riece-signal
+ This module defines the riece-signal object type used to manage
+ display events.
+
+- riece-layout
+ This module manages window layouts.
+
+- riece-display
+ This module manages display events.
+
+- riece-server
+ This module manages connections to IRC servers.
+
+- riece-naming
+ This module is a so called the Mediator design pattern. It knows
+ relationships of riece-channel/riece-user objects.
+
+- riece-message
+ This module defines the riece-message object type.
+
+- riece-filter
+ This module only provides the process filter function.
+
+- riece-handle
+ This module provides handler functions for IRC messages. These
+ functions are called from riece-filter.
+
+- riece-000
+ This module provides handler functions for numeric replies whose
+ response codes are in 000 to 100 range. These handlers are called
+ from riece-filter.
+
+- riece-200
+ This module provides handler functions for numeric replies whose
+ response codes are in 200 to 300 range. These handlers are called
+ from riece-filter.
+
+- riece-300
+ This module provides handler functions for numeric replies whose
+ response codes are in 300 to 400 range. These handlers are called
+ from riece-filter.
+
+- riece-400
+ This module provides handler functions for numeric replies whose
+ response codes are in 400 to 500 range. These handlers are called
+ from riece-filter.
+
+- riece-500
+ This module provides handler functions for numeric replies whose
+ response codes are in 500 to 600 range. These handlers are called
+ from riece-filter.
+
+- riece-commands
+ This module provides user commands.
+
+- riece-irc
+ This module provides the binding for the IRC protocol.
+
+- riece
+ This module is the entry point of M-x riece.
+
+** Namespace management
+
+Riece is capable to connect to several IRC servers.
+
+Riece has separate namespace (obarray) for each connection. These
+namespaces can be accessed as buffer local variables of process
+buffer.
+
+*** Obtaining server buffer
+
+To access to the buffer local variables of process buffer, it is
+needed to distinguish process object of each connection by its name.
+
+It can be known by:
+
+(1) checking the value of riece-overriding-server-name,
+
+(2) checking the value of riece-server-name,
+ (If the variable riece-server-name is local to the current buffer,
+ you are already in the process buffer.)
+
+(3) or parsing riece-identity objects
+
+Once you get the name of the IRC server, you can get the process
+object by passing the name to the function riece-server-process.
+
+*** riece-identity objects
+
+A riece-identity object represents a name of a channel/user. It is
+used to distinguish a channel/user among several servers.
+
+A riece-identity object is actually a vector, which consists of two
+elements listed below.
+
+- prefix
+ A channel/user name local to an IRC server.
+
+- server
+ The name of the IRC server.
+
+Methods to manipulate riece-identity object are listed below.
+
+- riece-make-identity prefix &optional server
+ Create a new riece-identity object. If the server argument is
+ omitted, it sets the server part to the value returned by the
+ riece-find-server-name function.
+
+- riece-identity-prefix identity
+ Return the prefix element from the given riece-identity object.
+
+- riece-identity-server identity
+ Return the server element from the given riece-identity object.
+
+- riece-identity-equal ident1 ident2
+ Return t, if two riece-identity objects are equal.
+
+- riece-identity-equal-no-server ident1 ident2
+ Return t, if two riece-identity objects are equal. This function
+ only consider a prefix part of a riece-identity object.
+
+- riece-identity-member elt list
+ Return non-nil if a riece-identity object is an element of a list.
+
+*** Channels and users
+
+A riece-channel object provides an abstraction of a channel.
+Likewise, a riece-user object provides an abstraction of a user.
+
+**** riece-channel objects
+
+A riece-channel object has many information about a channel. A
+riece-channel object is actually a vector whose seven elements are listed
+below.
+
+- users
+ A list of nicknames which are of users in this channel.
+
+- operators
+ A list of nicknames which are of channel operators in this channel.
+
+- speakers
+ A list of nicknames which are of users who have the right to speak
+ in this channel.
+
+- modes
+ An alist which represents modes of this channel.
+
+- banned
+ A list of patterns set by MODE +b.
+
+- invited
+ A list of patterns set by MODE +I.
+
+- uninvited
+ A list of patterns set by MODE +e.
+
+**** riece-user objects
+
+A riece-user object has many information about a user. A riece-user
+object is actually a vector whose four elements are listed below.
+
+- channels
+ A list of channel names this user is participating.
+
+- user-at-host
+ Connection information of this user, set in "<user>@<host>" format.
+
+- modes
+ An alist which represents modes of this user.
+
+- away
+ A flag represent whether this user is AWAY.
+
+**** The Mediator pattern
+
+The riece-naming module is used to manage relationships between
+channels and users. It utilizes the Mediator design pattern.
+
+Using the riece-naming module allows to safely access to the namespace
+rather than directly connects riece-channel/riece-user objects.
+
+The riece-naming module provides the following functions.
+
+- riece-naming-assert-join user-name channel-name
+ Assert that a user is a member of a channel.
+
+- riece-naming-assert-part user-name channel-name
+ Assert that a user is no longer a member of a channel.
+
+- riece-naming-assert-rename old-name new-name
+ Assert that a user changed his nickname.
+
+** Signals
+
+There is a mechanism to connect events and display objects (windows,
+buffers, and modeline indicators). This is done by signals.
+
+When it is needed to redraw, a signal is emitted. The concept of
+signals is corresponding to signals in generic window system toolkit
+such as Qt or GTK+.
+
+To emit a signal, use riece-emit-signal.
+
+- riece-emit-signal signal-name &rest args
+ Emit a signal named signal-name with args.
+
+To define a function called when a signal is emitted, use
+riece-connect-signal.
+
+- riece-connect-signal signal-name slot-function &optional
+ filter-function handback
+
+ Give a signal a slot-function. The slot-function gets two
+ arguments: the signal object itself and a handback object given as
+ the fourth argument of riece-connect-signal.
+
+ If the third argument filter-function is specified, the
+ slot-function is called conditionally. The filter-function gets the
+ signal object and returns nil or t. If the return value is nil, the
+ slot-function is not called.
+
+To access to a signal object, use the following functions.
+
+- riece-signal-name signal
+ Return the name of a signal.
+
+- riece-signal-args
+ Return the data of a signal.
+
+Below is a list of signal names reserved.
+
+- channel-list-changed
+ Need update the channel list.
+
+- user-list-changed
+ Need update the user list.
+ (This signal gets a riece-identity object as an argument which
+ represents the channel.)
+
+- channel-switched
+ A user selected another channel.
+
+- user-joined-channel
+ A user joined a channel.
+ (This signal gets two riece-identity objects as arguments
+ corresponding to the user and the channel respectively.)
+
+- user-left-channel
+ A user left a channel.
+ (This signal gets two riece-identity objects as arguments
+ corresponding to the user and the channel respectively.)
+
+- user-renamed
+ A user changed his nickname.
+ (This signal gets two riece-identity objects as arguments
+ corresponding to the old and the new nickname respectively.)
+
+- user-away-changed
+ A user changed his AWAY status.
+ (This signal gets a riece-identity object as an argument which
+ represents the user.)
+
+- user-operator-changed
+ A user changed his IRC operator status.
+ (This signal gets a riece-identity object as an argument which
+ represents the user.)
+
+- channel-topic-changed
+ A topic of a channel changed.
+ (This signal gets a riece-identity object as an argument which
+ represents the channel.)
+
+- channel-modes-changed
+ Modes of a channel changed.
+ (This signal gets a riece-identity object as an argument which
+ represents the channel.)
+
+- channel-operators-changed
+ A list of operators in a channel changed.
+ (This signal gets a riece-identity object as an argument which
+ represents the channel.)
+
+- channel-speakers-changed
+ A list of users who have the right to speak in a channel changed.
+ (This signal gets a riece-identity object as an argument which
+ represents the channel.)
+
+- buffer-freeze-changed
+ A buffer is frozen or unfrozen.
+ (This signal gets a buffer as an argument.)
+
+** Writing add-ons
+
+Elisp modules that satisfy add-on spec should provide the following
+functions.
+
+- <module-name>-requires (optional)
+ Return a list of names of other add-ons this add-on depends.
+
+- <module-name>-insinuate
+ Called on initialization of this module.
+
+- <module-name>-uninstall (optional)
+ Called on uninstallation of this module.
+
+- <module-name>-enable (optional)
+ Called when this add-on is enabled.
+
+- <module-name>-disable (optional)
+ Called when this add-on is disabled.
+
+It is recommended to set short explanation of the add-on to
+<module-name>-description variable which is displayed on add-on
+listing shown up by C-c ^ (M-x riece-command-list-addons).
+
+To see the add-on's enabled/disabled status, check riece-addon-enabled
+property set on <module-name> symbol.
+
+Riece does the following procedure on add-ons when startup.
+
+(1) Load add-ons listed in the riece-addons variable.
+
+(2) Call <module-name>-requires on each add-on (if exists) and build a
+ dependency graph.
+
+(3) Sort the dependency graph.
+
+(4) Call <module-name>-insinuate on each add-on in order of the
+ dependencies.
+
+(5) Call <module-name>-enable on each add-on, iff it supports
+ enabling/disabling and is not disabled explicitly.
+
+Add-ons are loaded from directories listed in load-path, or from
+~/.riece/addons/.
+
+** Handler hooks
+
+There are hooks called "handler hooks " which have special meaning in
+Riece. Handler hooks are called before/after processing IRC messages.
+
+- riece-<message>-hook
+ Called before processing an IRC message.
+
+- riece-after-<message>-hook
+ Called after processing an IRC message.
+
+Where <message> is a type of IRC message and consists only lowercase
+characters.
+
+If riece-<message>-hook returns non-nil, <message> is not processed.
+In this case riece-after-<message>-hook is not called.
+
+Handler hooks gets two arguments corresponding to prefix and
+parameters in RFC2812.
--- /dev/null
+AC_DEFUN([AC_DEFINE_GNUS_PRODUCT_NAME],
+ [echo $ac_n "defining gnus product name... $ac_c"
+ AC_CACHE_VAL(EMACS_cv_GNUS_PRODUCT_NAME,[EMACS_cv_GNUS_PRODUCT_NAME=$1])
+ GNUS_PRODUCT_NAME=${EMACS_cv_GNUS_PRODUCT_NAME}
+ AC_MSG_RESULT(${GNUS_PRODUCT_NAME})
+ AC_SUBST(GNUS_PRODUCT_NAME)])
+
+AC_DEFUN([AC_CHECK_EMACS],
+ [dnl Check for Emacsen.
+
+ dnl Apparently, if you run a shell window in Emacs, it sets the EMACS
+ dnl environment variable to 't'. Lets undo the damage.
+ test "$EMACS" = t && EMACS=
+
+ dnl Ignore cache.
+ unset ac_cv_prog_EMACS; unset ac_cv_prog_XEMACS;
+
+ AC_ARG_WITH(emacs,
+ [ --with-emacs=EMACS compile with EMACS [EMACS=emacs, mule...]],
+ [if test "$withval" = yes -o -z "$withval"; then
+ AC_CHECK_PROGS(EMACS, emacs xemacs mule, emacs)
+ else
+ AC_CHECK_PROG(EMACS, $withval, $withval, emacs)
+ fi])
+ AC_ARG_WITH(xemacs,
+ [ --with-xemacs=XEMACS compile with XEMACS [XEMACS=xemacs]],
+ [if test "$withval" = yes -o -z "$withval"; then
+ AC_CHECK_PROG(XEMACS, xemacs, xemacs, xemacs)
+ else
+ AC_CHECK_PROG(XEMACS, $withval, $withval, xemacs)
+ fi
+ EMACS=$XEMACS],
+ [XEMACS=xemacs
+ test -z "$EMACS" && AC_CHECK_PROGS(EMACS, emacs xemacs mule, emacs)])
+ AC_SUBST(EMACS)
+ AC_SUBST(XEMACS)])
+
+AC_DEFUN([AC_EMACS_LISP], [
+elisp="$2"
+if test -z "$3"; then
+ AC_MSG_CHECKING(for $1)
+fi
+AC_CACHE_VAL(EMACS_cv_SYS_$1,[
+ OUTPUT=./conftest-$$
+ echo ${EMACS}' -batch -eval '\''(let ((x '${elisp}')) (write-region (if (stringp x) (princ x) (prin1-to-string x)) nil "'${OUTPUT}'" nil 5))'\' >& AC_FD_CC 2>&1
+ eval ${EMACS}' -batch -eval '\''(let ((x '${elisp}')) (write-region (if (stringp x) (princ x) (prin1-to-string x)) nil "'${OUTPUT}'" nil 5))'\' >& AC_FD_CC 2>&1
+ retval=`cat ${OUTPUT}`
+ echo "=> ${retval}" >& AC_FD_CC 2>&1
+ rm -f ${OUTPUT}
+ EMACS_cv_SYS_$1=$retval
+])
+$1=${EMACS_cv_SYS_$1}
+if test -z "$3"; then
+ AC_MSG_RESULT($$1)
+fi
+])
+
+AC_DEFUN([AC_CHECK_EMACS_FLAVOR],
+ [AC_MSG_CHECKING([what flavor does $EMACS have])
+
+ dnl Ignore cache.
+ unset EMACS_cv_SYS_flavor;
+
+ AC_EMACS_LISP(flavor,
+ (cond ((featurep (quote xemacs)) \"XEmacs\")\
+ ((boundp (quote MULE)) \"MULE\")\
+ (t \"FSF Emacs\")),
+ "noecho")
+ case $EMACS_cv_SYS_flavor in
+ XEmacs)
+ EMACS_FLAVOR=xemacs;;
+ MULE)
+ EMACS_FLAVOR=mule;;
+ *)
+ EMACS_FLAVOR=emacs;;
+ esac
+ AC_MSG_RESULT($EMACS_cv_SYS_flavor)])
+
+AC_DEFUN([AC_PATH_LISPDIR], [
+ AC_CHECK_EMACS_FLAVOR
+ if test "$prefix" = NONE; then
+ AC_MSG_CHECKING([prefix for your Emacs])
+ AC_EMACS_LISP(prefix,(expand-file-name \"..\" invocation-directory),"noecho")
+ prefix=${EMACS_cv_SYS_prefix}
+ AC_MSG_RESULT($prefix)
+ fi
+ AC_ARG_WITH(lispdir,
+ [ --with-lispdir=DIR Where to install lisp files
+ (for XEmacs package, use --with-packagedir instead)],
+ lispdir=${withval})
+ AC_MSG_CHECKING([where lisp files should go])
+ if test -z "$lispdir"; then
+ dnl Set default value
+ theprefix=$prefix
+ if test "$theprefix" = NONE; then
+ theprefix=$ac_default_prefix
+ fi
+ lispdir="\$(datadir)/${EMACS_FLAVOR}/site-lisp/${GNUS_PRODUCT_NAME}"
+ for thedir in share lib; do
+ potential=
+ if test -d ${theprefix}/${thedir}/${EMACS_FLAVOR}/site-lisp; then
+ lispdir="\$(prefix)/${thedir}/${EMACS_FLAVOR}/site-lisp/${GNUS_PRODUCT_NAME}"
+ break
+ fi
+ done
+ fi
+ if test ${EMACS_FLAVOR} = xemacs; then
+ AC_MSG_RESULT([$lispdir
+ (it will be ignored when \"make install-package[[-ja]]\" is done)])
+ else
+ AC_MSG_RESULT([$lispdir])
+ fi
+ AC_SUBST(lispdir)
+])
+
+AC_DEFUN([AC_PATH_ETCDIR], [
+ AC_ARG_WITH(etcdir,[ --with-etcdir=DIR Where to install etc files], etcdir=${withval})
+ AC_MSG_CHECKING([where etc files should go])
+ if test -z "$etcdir"; then
+ dnl Set default value
+ etcdir="\$(lispdir)/../etc"
+ fi
+ AC_MSG_RESULT($etcdir)
+ AC_SUBST(etcdir)
+])
+
+dnl
+dnl Check whether a function exists in a library
+dnl All '_' characters in the first argument are converted to '-'
+dnl
+AC_DEFUN([AC_EMACS_CHECK_LIB], [
+if test -z "$3"; then
+ AC_MSG_CHECKING(for $2 in $1)
+fi
+library=`echo $1 | tr _ -`
+AC_EMACS_LISP($1,(progn (fmakunbound (quote $2)) (condition-case nil (progn (require (quote $library)) (fboundp (quote $2))) (error (prog1 nil (message \"$library not found\"))))),"noecho")
+if test "${EMACS_cv_SYS_$1}" = nil; then
+ EMACS_cv_SYS_$1=no
+fi
+if test "${EMACS_cv_SYS_$1}" = t; then
+ EMACS_cv_SYS_$1=yes
+fi
+HAVE_$1=${EMACS_cv_SYS_$1}
+AC_SUBST(HAVE_$1)
+if test -z "$3"; then
+ AC_MSG_RESULT($HAVE_$1)
+fi
+])
+
+dnl
+dnl Perform sanity checking and try to locate the W3 package
+dnl
+AC_DEFUN([AC_CHECK_W3], [
+AC_MSG_CHECKING(for acceptable W3 version)
+
+dnl Ignore cache.
+unset EMACS_cv_ACCEPTABLE_W3;
+unset EMACS_cv_SYS_w3_dir;
+unset EMACS_cv_SYS_w3_forms;
+
+AC_CACHE_VAL(EMACS_cv_ACCEPTABLE_W3,[
+AC_EMACS_CHECK_LIB(w3_forms, w3-form-encode-xwfu,"noecho")
+if test "${HAVE_w3_forms}" = yes; then
+ EMACS_cv_ACCEPTABLE_W3=yes
+else
+ EMACS_cv_ACCEPTABLE_W3=
+fi
+
+if test "${EMACS_cv_ACCEPTABLE_W3}" = yes; then
+ AC_EMACS_LISP(w3_dir,(file-name-directory (locate-library \"w3-forms\")),"noecho")
+ EMACS_cv_ACCEPTABLE_W3=$EMACS_cv_SYS_w3_dir
+fi
+])
+ AC_ARG_WITH(w3,[ --with-w3=DIR Specify where to find the w3 package], [ EMACS_cv_ACCEPTABLE_W3=`( cd $withval && pwd || echo "$withval" ) 2> /dev/null` ])
+ W3=${EMACS_cv_ACCEPTABLE_W3}
+ AC_SUBST(W3)
+ if test -z "${EMACS_cv_ACCEPTABLE_W3}"; then
+ AC_MSG_RESULT(not found)
+ else
+ AC_MSG_RESULT(${W3})
+ fi
+])
+
+dnl
+dnl Perform sanity checking and try to locate the W3 package
+dnl
+AC_DEFUN([AC_CHECK_URL], [
+AC_MSG_CHECKING(for acceptable URL version)
+
+dnl Ignore cache.
+unset EMACS_cv_ACCEPTABLE_URL;
+unset EMACS_cv_SYS_url_dir;
+unset EMACS_cv_SYS_url;
+
+AC_CACHE_VAL(EMACS_cv_ACCEPTABLE_URL,[
+AC_EMACS_CHECK_LIB(url, url-retrieve, "noecho")
+if test "${HAVE_url}" = yes; then
+ EMACS_cv_ACCEPTABLE_URL=yes
+else
+ EMACS_cv_ACCEPTABLE_URL=
+fi
+
+if test "${EMACS_cv_ACCEPTABLE_URL}" = yes; then
+ AC_EMACS_LISP(url_dir,(file-name-directory (locate-library \"url\")),"noecho")
+ EMACS_cv_ACCEPTABLE_URL=$EMACS_cv_SYS_url_dir
+fi
+])
+ AC_ARG_WITH(url,[ --with-url=DIR Specify where to find the url package], [ EMACS_cv_ACCEPTABLE_URL=`( cd $withval && pwd || echo "$withval" ) 2> /dev/null` ])
+ URL=${EMACS_cv_ACCEPTABLE_URL}
+ AC_SUBST(URL)
+ if test -z "${EMACS_cv_ACCEPTABLE_URL}"; then
+ AC_MSG_RESULT(not found)
+ else
+ AC_MSG_RESULT("${URL}")
+ fi
+])
+
+dnl
+dnl Perform checking available fonts: Adobe Bembo, Adobe Futura and
+dnl Bitstream Courier.
+dnl
+
+AC_DEFUN([GNUS_CHECK_FONTS], [
+test "$LATEX" = t && LATEX=
+test "$LATEX" || AC_PATH_PROGS(LATEX, latex, no)
+AC_MSG_CHECKING(for available fonts)
+AC_ARG_WITH(fonts,[ --with-fonts Assume all fonts required are available],[USE_FONTS="$withval"])
+WITH_FONTS_bembo='%'
+WITHOUT_FONTS_bembo=
+WITH_FONTS_pfu='%'
+WITHOUT_FONTS_pfu=
+WITH_FONTS_bcr='%'
+WITHOUT_FONTS_bcr=
+if test -z "${USE_FONTS}"; then
+ if test "${LATEX}" = no; then
+ :
+ else
+ OUTPUT=./conftest-$$
+ echo '\nonstopmode\documentclass{article}\usepackage{bembo}\begin{document}\end{document}' > ${OUTPUT}
+ if ${LATEX} ${OUTPUT} </dev/null >& AC_FD_CC 2>&1 ; then
+ if test -z "${USE_FONTS}"; then
+ USE_FONTS="Adobe Bembo"
+ else
+ USE_FONTS="${USE_FONTS}, Adobe Bembo"
+ fi
+ WITH_FONTS_bembo=
+ WITHOUT_FONTS_bembo='%'
+ fi
+ echo '\nonstopmode\documentclass{article}\begin{document}{\fontfamily{pfu}\fontsize{10pt}{10}\selectfont test}\end{document}' > ${OUTPUT}
+ if retval=`${LATEX} ${OUTPUT} </dev/null 2>& AC_FD_CC`; then
+ if echo "$retval" | grep 'Some font shapes were not available' >& AC_FD_CC 2>&1 ; then
+ :
+ else
+ if test -z "${USE_FONTS}"; then
+ USE_FONTS="Adobe Futura"
+ else
+ USE_FONTS="${USE_FONTS}, Adobe Futura"
+ fi
+ WITH_FONTS_pfu=
+ WITHOUT_FONTS_pfu='%'
+ fi
+ fi
+ echo '\nonstopmode\documentclass{article}\begin{document}{\fontfamily{bcr}\fontsize{10pt}{10}\selectfont test}\end{document}' > ${OUTPUT}
+ if retval=`${LATEX} ${OUTPUT} </dev/null 2>& AC_FD_CC`; then
+ if echo "$retval" | grep 'Some font shapes were not available' >& AC_FD_CC 2>&1 ; then
+ :
+ else
+ if test -z "${USE_FONTS}"; then
+ USE_FONTS="Bitstream Courier"
+ else
+ USE_FONTS="${USE_FONTS}, Bitstream Courier"
+ fi
+ WITH_FONTS_bcr=
+ WITHOUT_FONTS_bcr='%'
+ fi
+ fi
+ rm -f ${OUTPUT} ${OUTPUT}.aux ${OUTPUT}.log ${OUTPUT}.dvi
+ fi
+elif test "${USE_FONTS}" = yes ; then
+ WITH_FONTS_bembo=
+ WITHOUT_FONTS_bembo='%'
+ WITH_FONTS_pfu=
+ WITHOUT_FONTS_pfu='%'
+ WITH_FONTS_bcr=
+ WITHOUT_FONTS_bcr='%'
+fi
+AC_SUBST(WITH_FONTS_bembo)
+AC_SUBST(WITHOUT_FONTS_bembo)
+AC_SUBST(WITH_FONTS_pfu)
+AC_SUBST(WITHOUT_FONTS_pfu)
+AC_SUBST(WITH_FONTS_bcr)
+AC_SUBST(WITHOUT_FONTS_bcr)
+if test -z "${USE_FONTS}" ; then
+ USE_FONTS=no
+fi
+USE_FONTS=`echo "${USE_FONTS}" | sed 's/,\([[^,]]*\)$/ and\1/'`
+AC_MSG_RESULT("${USE_FONTS}")
+if test "${USE_FONTS}" = yes ; then
+ USE_FONTS='Set in Adobe Bembo, Adobe Futura and Bitstream Courier.'
+elif test "${USE_FONTS}" = no ; then
+ USE_FONTS=''
+else
+ USE_FONTS="Set in ${USE_FONTS}."
+fi
+AC_SUBST(USE_FONTS)
+])
+
+AC_DEFUN([AC_EXAMINE_PACKAGEDIR],
+ [dnl Examine PACKAGEDIR.
+ AC_EMACS_LISP(PACKAGEDIR,
+ (let (package-dir)\
+ (if (boundp (quote early-packages))\
+ (let ((dirs (delq nil (append (if early-package-load-path\
+ early-packages)\
+ (if late-package-load-path\
+ late-packages)\
+ (if last-package-load-path\
+ last-packages)))))\
+ (while (and dirs (not package-dir))\
+ (if (file-directory-p (car dirs))\
+ (setq package-dir (car dirs)\
+ dirs (cdr dirs))))))\
+ (or package-dir \"\")),
+ "noecho")])
+
+AC_DEFUN([AC_PATH_PACKAGEDIR],
+ [dnl Check for PACKAGEDIR.
+ if test ${EMACS_FLAVOR} = xemacs; then
+ AC_MSG_CHECKING([where the XEmacs package is])
+ AC_ARG_WITH(packagedir,
+ [ --with-packagedir=DIR package DIR for XEmacs],
+ [if test "$withval" != yes -a -n "$withval"; then
+ PACKAGEDIR=$withval
+ else
+ AC_EXAMINE_PACKAGEDIR
+ fi],
+ AC_EXAMINE_PACKAGEDIR)
+ if test -z "$PACKAGEDIR"; then
+ AC_MSG_RESULT(not found)
+ else
+ AC_MSG_RESULT($PACKAGEDIR)
+ fi
+ else
+ PACKAGEDIR=
+ fi
+ AC_SUBST(PACKAGEDIR)])
+
+AC_DEFUN([AC_ADD_LOAD_PATH],
+ [dnl Check for additional load path.
+ AC_ARG_WITH(addpath,
+ [ --with-addpath=PATH search Emacs-Lisp libraries with PATH
+ use colons to separate directory names],
+ [if test "$withval" != yes -a -n "$withval"; then
+ AC_MSG_CHECKING([where to find the additional elisp libraries])
+ ADDITIONAL_LOAD_PATH=$withval
+ AC_MSG_RESULT($ADDITIONAL_LOAD_PATH)
+ fi],
+ ADDITIONAL_LOAD_PATH=)
+ AC_SUBST(ADDITIONAL_LOAD_PATH)])
--- /dev/null
+#! /bin/sh
+# Print a version string.
+scriptversion=2013-12-05.23; # UTC
+
+# Bootstrap this package from checked-out sources.
+
+# Copyright (C) 2003-2014 Free Software Foundation, Inc.
+
+# 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 3 of the License, 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 this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Originally written by Paul Eggert. The canonical version of this
+# script is maintained as build-aux/bootstrap in gnulib, however, to
+# be useful to your project, you should place a copy of it under
+# version control in the top-level directory of your project. The
+# intent is that all customization can be done with a bootstrap.conf
+# file also maintained in your version control; gnulib comes with a
+# template build-aux/bootstrap.conf to get you started.
+
+# Please report bugs or propose patches to bug-gnulib@gnu.org.
+
+nl='
+'
+
+# Ensure file names are sorted consistently across platforms.
+LC_ALL=C
+export LC_ALL
+
+# Ensure that CDPATH is not set. Otherwise, the output from cd
+# would cause trouble in at least one use below.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+local_gl_dir=gl
+
+me=$0
+
+usage() {
+ cat <<EOF
+Usage: $me [OPTION]...
+Bootstrap this package from the checked-out sources.
+
+Options:
+ --gnulib-srcdir=DIRNAME specify the local directory where gnulib
+ sources reside. Use this if you already
+ have gnulib sources on your machine, and
+ do not want to waste your bandwidth downloading
+ them again. Defaults to \$GNULIB_SRCDIR
+ --bootstrap-sync if this bootstrap script is not identical to
+ the version in the local gnulib sources,
+ update this script, and then restart it with
+ /bin/sh or the shell \$CONFIG_SHELL
+ --no-bootstrap-sync do not check whether bootstrap is out of sync
+ --copy copy files instead of creating symbolic links
+ --force attempt to bootstrap even if the sources seem
+ not to have been checked out
+ --no-git do not use git to update gnulib. Requires that
+ --gnulib-srcdir point to a correct gnulib snapshot
+ --skip-po do not download po files
+
+If the file $me.conf exists in the same directory as this script, its
+contents are read as shell variables to configure the bootstrap.
+
+For build prerequisites, environment variables like \$AUTOCONF and \$AMTAR
+are honored.
+
+Running without arguments will suffice in most cases.
+EOF
+}
+
+# warnf_ FORMAT-STRING ARG1...
+warnf_ ()
+{
+ warnf_format_=$1
+ shift
+ nl='
+'
+ case $* in
+ *$nl*) me_=$(printf "$me"|tr "$nl|" '??')
+ printf "$warnf_format_" "$@" | sed "s|^|$me_: |" ;;
+ *) printf "$me: $warnf_format_" "$@" ;;
+ esac >&2
+}
+
+# warn_ WORD1...
+warn_ ()
+{
+ # If IFS does not start with ' ', set it and emit the warning in a subshell.
+ case $IFS in
+ ' '*) warnf_ '%s\n' "$*";;
+ *) (IFS=' '; warn_ "$@");;
+ esac
+}
+
+# die WORD1...
+die() { warn_ "$@"; exit 1; }
+
+# Configuration.
+
+# Name of the Makefile.am
+gnulib_mk=gnulib.mk
+
+# List of gnulib modules needed.
+gnulib_modules=
+
+# Any gnulib files needed that are not in modules.
+gnulib_files=
+
+: ${AUTOPOINT=autopoint}
+: ${AUTORECONF=autoreconf}
+
+# A function to be called right after gnulib-tool is run.
+# Override it via your own definition in bootstrap.conf.
+bootstrap_post_import_hook() { :; }
+
+# A function to be called after everything else in this script.
+# Override it via your own definition in bootstrap.conf.
+bootstrap_epilogue() { :; }
+
+# The command to download all .po files for a specified domain into
+# a specified directory. Fill in the first %s is the domain name, and
+# the second with the destination directory. Use rsync's -L and -r
+# options because the latest/%s directory and the .po files within are
+# all symlinks.
+po_download_command_format=\
+"rsync --delete --exclude '*.s1' -Lrtvz \
+ 'translationproject.org::tp/latest/%s/' '%s'"
+
+# Fallback for downloading .po files (if rsync fails).
+po_download_command_format2=\
+"wget --mirror -nd -q -np -A.po -P '%s' \
+ http://translationproject.org/latest/%s/"
+
+# Prefer a non-empty tarname (4th argument of AC_INIT if given), else
+# fall back to the package name (1st argument with munging)
+extract_package_name='
+ /^AC_INIT(\[*/{
+ s///
+ /^[^,]*,[^,]*,[^,]*,[ []*\([^][ ,)]\)/{
+ s//\1/
+ s/[],)].*//
+ p
+ q
+ }
+ s/[],)].*//
+ s/^GNU //
+ y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/
+ s/[^abcdefghijklmnopqrstuvwxyz0123456789_]/-/g
+ p
+ }
+'
+package=$(sed -n "$extract_package_name" configure.ac) \
+ || die 'cannot find package name in configure.ac'
+gnulib_name=lib$package
+
+build_aux=build-aux
+source_base=lib
+m4_base=m4
+doc_base=doc
+tests_base=tests
+gnulib_extra_files=''
+
+# Additional gnulib-tool options to use. Use "\newline" to break lines.
+gnulib_tool_option_extras=
+
+# Other locale categories that need message catalogs.
+EXTRA_LOCALE_CATEGORIES=
+
+# Additional xgettext options to use. Use "\\\newline" to break lines.
+XGETTEXT_OPTIONS='\\\
+ --flag=_:1:pass-c-format\\\
+ --flag=N_:1:pass-c-format\\\
+ --flag=error:3:c-format --flag=error_at_line:5:c-format\\\
+'
+
+# Package bug report address and copyright holder for gettext files
+COPYRIGHT_HOLDER='Free Software Foundation, Inc.'
+MSGID_BUGS_ADDRESS=bug-$package@gnu.org
+
+# Files we don't want to import.
+excluded_files=
+
+# File that should exist in the top directory of a checked out hierarchy,
+# but not in a distribution tarball.
+checkout_only_file=README-hacking
+
+# Whether to use copies instead of symlinks.
+copy=false
+
+# Set this to '.cvsignore .gitignore' in bootstrap.conf if you want
+# those files to be generated in directories like lib/, m4/, and po/.
+# Or set it to 'auto' to make this script select which to use based
+# on which version control system (if any) is used in the source directory.
+vc_ignore=auto
+
+# Set this to true in bootstrap.conf to enable --bootstrap-sync by
+# default.
+bootstrap_sync=false
+
+# Use git to update gnulib sources
+use_git=true
+
+check_exists() {
+ ($1 --version </dev/null) >/dev/null 2>&1
+ test $? -lt 126
+}
+
+# find_tool ENVVAR NAMES...
+# -------------------------
+# Search for a required program. Use the value of ENVVAR, if set,
+# otherwise find the first of the NAMES that can be run.
+# If found, set ENVVAR to the program name, die otherwise.
+#
+# FIXME: code duplication, see also gnu-web-doc-update.
+find_tool ()
+{
+ find_tool_envvar=$1
+ shift
+ find_tool_names=$@
+ eval "find_tool_res=\$$find_tool_envvar"
+ if test x"$find_tool_res" = x; then
+ for i; do
+ if check_exists $i; then
+ find_tool_res=$i
+ break
+ fi
+ done
+ fi
+ if test x"$find_tool_res" = x; then
+ warn_ "one of these is required: $find_tool_names;"
+ die "alternatively set $find_tool_envvar to a compatible tool"
+ fi
+ eval "$find_tool_envvar=\$find_tool_res"
+ eval "export $find_tool_envvar"
+}
+
+# Override the default configuration, if necessary.
+# Make sure that bootstrap.conf is sourced from the current directory
+# if we were invoked as "sh bootstrap".
+case "$0" in
+ */*) test -r "$0.conf" && . "$0.conf" ;;
+ *) test -r "$0.conf" && . ./"$0.conf" ;;
+esac
+
+# Extra files from gnulib, which override files from other sources.
+test -z "${gnulib_extra_files}" && \
+ gnulib_extra_files="
+ build-aux/install-sh
+ build-aux/mdate-sh
+ build-aux/texinfo.tex
+ build-aux/depcomp
+ build-aux/config.guess
+ build-aux/config.sub
+ doc/INSTALL
+"
+
+if test "$vc_ignore" = auto; then
+ vc_ignore=
+ test -d .git && vc_ignore=.gitignore
+ test -d CVS && vc_ignore="$vc_ignore .cvsignore"
+fi
+
+# Translate configuration into internal form.
+
+# Parse options.
+
+for option
+do
+ case $option in
+ --help)
+ usage
+ exit;;
+ --gnulib-srcdir=*)
+ GNULIB_SRCDIR=${option#--gnulib-srcdir=};;
+ --skip-po)
+ SKIP_PO=t;;
+ --force)
+ checkout_only_file=;;
+ --copy)
+ copy=true;;
+ --bootstrap-sync)
+ bootstrap_sync=true;;
+ --no-bootstrap-sync)
+ bootstrap_sync=false;;
+ --no-git)
+ use_git=false;;
+ *)
+ die "$option: unknown option";;
+ esac
+done
+
+$use_git || test -d "$GNULIB_SRCDIR" \
+ || die "Error: --no-git requires --gnulib-srcdir"
+
+if test -n "$checkout_only_file" && test ! -r "$checkout_only_file"; then
+ die "Bootstrapping from a non-checked-out distribution is risky."
+fi
+
+# Strip blank and comment lines to leave significant entries.
+gitignore_entries() {
+ sed '/^#/d; /^$/d' "$@"
+}
+
+# If $STR is not already on a line by itself in $FILE, insert it at the start.
+# Entries are inserted at the start of the ignore list to ensure existing
+# entries starting with ! are not overridden. Such entries support
+# whitelisting exceptions after a more generic blacklist pattern.
+insert_if_absent() {
+ file=$1
+ str=$2
+ test -f $file || touch $file
+ test -r $file || die "Error: failed to read ignore file: $file"
+ duplicate_entries=$(gitignore_entries $file | sort | uniq -d)
+ if [ "$duplicate_entries" ] ; then
+ die "Error: Duplicate entries in $file: " $duplicate_entries
+ fi
+ linesold=$(gitignore_entries $file | wc -l)
+ linesnew=$( { echo "$str"; cat $file; } | gitignore_entries | sort -u | wc -l)
+ if [ $linesold != $linesnew ] ; then
+ { echo "$str" | cat - $file > $file.bak && mv $file.bak $file; } \
+ || die "insert_if_absent $file $str: failed"
+ fi
+}
+
+# Adjust $PATTERN for $VC_IGNORE_FILE and insert it with
+# insert_if_absent.
+insert_vc_ignore() {
+ vc_ignore_file="$1"
+ pattern="$2"
+ case $vc_ignore_file in
+ *.gitignore)
+ # A .gitignore entry that does not start with '/' applies
+ # recursively to subdirectories, so prepend '/' to every
+ # .gitignore entry.
+ pattern=$(echo "$pattern" | sed s,^,/,);;
+ esac
+ insert_if_absent "$vc_ignore_file" "$pattern"
+}
+
+# Die if there is no AC_CONFIG_AUX_DIR($build_aux) line in configure.ac.
+found_aux_dir=no
+grep '^[ ]*AC_CONFIG_AUX_DIR(\['"$build_aux"'\])' configure.ac \
+ >/dev/null && found_aux_dir=yes
+grep '^[ ]*AC_CONFIG_AUX_DIR('"$build_aux"')' configure.ac \
+ >/dev/null && found_aux_dir=yes
+test $found_aux_dir = yes \
+ || die "configure.ac lacks 'AC_CONFIG_AUX_DIR([$build_aux])'; add it"
+
+# If $build_aux doesn't exist, create it now, otherwise some bits
+# below will malfunction. If creating it, also mark it as ignored.
+if test ! -d $build_aux; then
+ mkdir $build_aux
+ for dot_ig in x $vc_ignore; do
+ test $dot_ig = x && continue
+ insert_vc_ignore $dot_ig $build_aux
+ done
+fi
+
+# Note this deviates from the version comparison in automake
+# in that it treats 1.5 < 1.5.0, and treats 1.4.4a < 1.4-p3a
+# but this should suffice as we won't be specifying old
+# version formats or redundant trailing .0 in bootstrap.conf.
+# If we did want full compatibility then we should probably
+# use m4_version_compare from autoconf.
+sort_ver() { # sort -V is not generally available
+ ver1="$1"
+ ver2="$2"
+
+ # split on '.' and compare each component
+ i=1
+ while : ; do
+ p1=$(echo "$ver1" | cut -d. -f$i)
+ p2=$(echo "$ver2" | cut -d. -f$i)
+ if [ ! "$p1" ]; then
+ echo "$1 $2"
+ break
+ elif [ ! "$p2" ]; then
+ echo "$2 $1"
+ break
+ elif [ ! "$p1" = "$p2" ]; then
+ if [ "$p1" -gt "$p2" ] 2>/dev/null; then # numeric comparison
+ echo "$2 $1"
+ elif [ "$p2" -gt "$p1" ] 2>/dev/null; then # numeric comparison
+ echo "$1 $2"
+ else # numeric, then lexicographic comparison
+ lp=$(printf "$p1\n$p2\n" | LANG=C sort -n | tail -n1)
+ if [ "$lp" = "$p2" ]; then
+ echo "$1 $2"
+ else
+ echo "$2 $1"
+ fi
+ fi
+ break
+ fi
+ i=$(($i+1))
+ done
+}
+
+get_version() {
+ app=$1
+
+ $app --version >/dev/null 2>&1 || return 1
+
+ $app --version 2>&1 |
+ sed -n '# Move version to start of line.
+ s/.*[v ]\([0-9]\)/\1/
+
+ # Skip lines that do not start with version.
+ /^[0-9]/!d
+
+ # Remove characters after the version.
+ s/[^.a-z0-9-].*//
+
+ # The first component must be digits only.
+ s/^\([0-9]*\)[a-z-].*/\1/
+
+ #the following essentially does s/5.005/5.5/
+ s/\.0*\([1-9]\)/.\1/g
+ p
+ q'
+}
+
+check_versions() {
+ ret=0
+
+ while read app req_ver; do
+ # We only need libtoolize from the libtool package.
+ if test "$app" = libtool; then
+ app=libtoolize
+ fi
+ # Exempt git if --no-git is in effect.
+ if test "$app" = git; then
+ $use_git || continue
+ fi
+ # Honor $APP variables ($TAR, $AUTOCONF, etc.)
+ appvar=$(echo $app | LC_ALL=C tr '[a-z]-' '[A-Z]_')
+ test "$appvar" = TAR && appvar=AMTAR
+ case $appvar in
+ GZIP) ;; # Do not use $GZIP: it contains gzip options.
+ *) eval "app=\${$appvar-$app}" ;;
+ esac
+
+ # Handle the still-experimental Automake-NG programs specially.
+ # They remain named as the mainstream Automake programs ("automake",
+ # and "aclocal") to avoid gratuitous incompatibilities with
+ # pre-existing usages (by, say, autoreconf, or custom autogen.sh
+ # scripts), but correctly identify themselves (as being part of
+ # "GNU automake-ng") when asked their version.
+ case $app in
+ automake-ng|aclocal-ng)
+ app=${app%-ng}
+ ($app --version | grep '(GNU automake-ng)') >/dev/null 2>&1 || {
+ warn_ "Error: '$app' not found or not from Automake-NG"
+ ret=1
+ continue
+ } ;;
+ esac
+ if [ "$req_ver" = "-" ]; then
+ # Merely require app to exist; not all prereq apps are well-behaved
+ # so we have to rely on $? rather than get_version.
+ if ! check_exists $app; then
+ warn_ "Error: '$app' not found"
+ ret=1
+ fi
+ else
+ # Require app to produce a new enough version string.
+ inst_ver=$(get_version $app)
+ if [ ! "$inst_ver" ]; then
+ warn_ "Error: '$app' not found"
+ ret=1
+ else
+ latest_ver=$(sort_ver $req_ver $inst_ver | cut -d' ' -f2)
+ if [ ! "$latest_ver" = "$inst_ver" ]; then
+ warnf_ '%s\n' \
+ "Error: '$app' version == $inst_ver is too old" \
+ " '$app' version >= $req_ver is required"
+ ret=1
+ fi
+ fi
+ fi
+ done
+
+ return $ret
+}
+
+print_versions() {
+ echo "Program Min_version"
+ echo "----------------------"
+ printf %s "$buildreq"
+ echo "----------------------"
+ # can't depend on column -t
+}
+
+# Find sha1sum, named gsha1sum on MacPorts, shasum on Mac OS X 10.6.
+# Also find the compatible sha1 utility on the BSDs
+if test x"$SKIP_PO" = x; then
+ find_tool SHA1SUM sha1sum gsha1sum shasum sha1
+fi
+
+use_libtool=0
+# We'd like to use grep -E, to see if any of LT_INIT,
+# AC_PROG_LIBTOOL, AM_PROG_LIBTOOL is used in configure.ac,
+# but that's not portable enough (e.g., for Solaris).
+grep '^[ ]*A[CM]_PROG_LIBTOOL' configure.ac >/dev/null \
+ && use_libtool=1
+grep '^[ ]*LT_INIT' configure.ac >/dev/null \
+ && use_libtool=1
+if test $use_libtool = 1; then
+ find_tool LIBTOOLIZE glibtoolize libtoolize
+fi
+
+# gnulib-tool requires at least automake and autoconf.
+# If either is not listed, add it (with minimum version) as a prerequisite.
+case $buildreq in
+ *automake*) ;;
+ *) buildreq="automake 1.9
+$buildreq" ;;
+esac
+case $buildreq in
+ *autoconf*) ;;
+ *) buildreq="autoconf 2.59
+$buildreq" ;;
+esac
+
+# When we can deduce that gnulib-tool will require patch,
+# and when patch is not already listed as a prerequisite, add it, too.
+if test -d "$local_gl_dir" \
+ && ! find "$local_gl_dir" -name '*.diff' -exec false {} +; then
+ case $buildreq in
+ *patch*) ;;
+ *) buildreq="patch -
+$buildreq" ;;
+ esac
+fi
+
+if ! printf "$buildreq" | check_versions; then
+ echo >&2
+ if test -f README-prereq; then
+ die "See README-prereq for how to get the prerequisite programs"
+ else
+ die "Please install the prerequisite programs"
+ fi
+fi
+
+# Warn the user if autom4te appears to be broken; this causes known
+# issues with at least gettext 0.18.3.
+probe=$(echo 'm4_quote([hi])' | autom4te -l M4sugar -t 'm4_quote:$%' -)
+if test "x$probe" != xhi; then
+ warn_ "WARNING: your autom4te wrapper eats stdin;"
+ warn_ "if bootstrap fails, consider upgrading your autotools"
+fi
+
+echo "$0: Bootstrapping from checked-out $package sources..."
+
+# See if we can use gnulib's git-merge-changelog merge driver.
+if $use_git && test -d .git && check_exists git; then
+ if git config merge.merge-changelog.driver >/dev/null ; then
+ :
+ elif check_exists git-merge-changelog; then
+ echo "$0: initializing git-merge-changelog driver"
+ git config merge.merge-changelog.name 'GNU-style ChangeLog merge driver'
+ git config merge.merge-changelog.driver 'git-merge-changelog %O %A %B'
+ else
+ echo "$0: consider installing git-merge-changelog from gnulib"
+ fi
+fi
+
+
+cleanup_gnulib() {
+ status=$?
+ rm -fr "$gnulib_path"
+ exit $status
+}
+
+git_modules_config () {
+ test -f .gitmodules && git config --file .gitmodules "$@"
+}
+
+if $use_git; then
+ gnulib_path=$(git_modules_config submodule.gnulib.path)
+ test -z "$gnulib_path" && gnulib_path=gnulib
+fi
+
+# Get gnulib files. Populate $GNULIB_SRCDIR, possibly updating a
+# submodule, for use in the rest of the script.
+
+case ${GNULIB_SRCDIR--} in
+-)
+ # Note that $use_git is necessarily true in this case.
+ if git_modules_config submodule.gnulib.url >/dev/null; then
+ echo "$0: getting gnulib files..."
+ git submodule init || exit $?
+ git submodule update || exit $?
+
+ elif [ ! -d "$gnulib_path" ]; then
+ echo "$0: getting gnulib files..."
+
+ trap cleanup_gnulib 1 2 13 15
+
+ shallow=
+ git clone -h 2>&1 | grep -- --depth > /dev/null && shallow='--depth 2'
+ git clone $shallow git://git.sv.gnu.org/gnulib "$gnulib_path" ||
+ cleanup_gnulib
+
+ trap - 1 2 13 15
+ fi
+ GNULIB_SRCDIR=$gnulib_path
+ ;;
+*)
+ # Use GNULIB_SRCDIR directly or as a reference.
+ if $use_git && test -d "$GNULIB_SRCDIR"/.git && \
+ git_modules_config submodule.gnulib.url >/dev/null; then
+ echo "$0: getting gnulib files..."
+ if git submodule -h|grep -- --reference > /dev/null; then
+ # Prefer the one-liner available in git 1.6.4 or newer.
+ git submodule update --init --reference "$GNULIB_SRCDIR" \
+ "$gnulib_path" || exit $?
+ else
+ # This fallback allows at least git 1.5.5.
+ if test -f "$gnulib_path"/gnulib-tool; then
+ # Since file already exists, assume submodule init already complete.
+ git submodule update || exit $?
+ else
+ # Older git can't clone into an empty directory.
+ rmdir "$gnulib_path" 2>/dev/null
+ git clone --reference "$GNULIB_SRCDIR" \
+ "$(git_modules_config submodule.gnulib.url)" "$gnulib_path" \
+ && git submodule init && git submodule update \
+ || exit $?
+ fi
+ fi
+ GNULIB_SRCDIR=$gnulib_path
+ fi
+ ;;
+esac
+
+# $GNULIB_SRCDIR now points to the version of gnulib to use, and
+# we no longer need to use git or $gnulib_path below here.
+
+if $bootstrap_sync; then
+ cmp -s "$0" "$GNULIB_SRCDIR/build-aux/bootstrap" || {
+ echo "$0: updating bootstrap and restarting..."
+ case $(sh -c 'echo "$1"' -- a) in
+ a) ignored=--;;
+ *) ignored=ignored;;
+ esac
+ exec sh -c \
+ 'cp "$1" "$2" && shift && exec "${CONFIG_SHELL-/bin/sh}" "$@"' \
+ $ignored "$GNULIB_SRCDIR/build-aux/bootstrap" \
+ "$0" "$@" --no-bootstrap-sync
+ }
+fi
+
+gnulib_tool=$GNULIB_SRCDIR/gnulib-tool
+<$gnulib_tool || exit $?
+
+# Get translations.
+
+download_po_files() {
+ subdir=$1
+ domain=$2
+ echo "$me: getting translations into $subdir for $domain..."
+ cmd=$(printf "$po_download_command_format" "$domain" "$subdir")
+ eval "$cmd" && return
+ # Fallback to HTTP.
+ cmd=$(printf "$po_download_command_format2" "$subdir" "$domain")
+ eval "$cmd"
+}
+
+# Mirror .po files to $po_dir/.reference and copy only the new
+# or modified ones into $po_dir. Also update $po_dir/LINGUAS.
+# Note po files that exist locally only are left in $po_dir but will
+# not be included in LINGUAS and hence will not be distributed.
+update_po_files() {
+ # Directory containing primary .po files.
+ # Overwrite them only when we're sure a .po file is new.
+ po_dir=$1
+ domain=$2
+
+ # Mirror *.po files into this dir.
+ # Usually contains *.s1 checksum files.
+ ref_po_dir="$po_dir/.reference"
+
+ test -d $ref_po_dir || mkdir $ref_po_dir || return
+ download_po_files $ref_po_dir $domain \
+ && ls "$ref_po_dir"/*.po 2>/dev/null |
+ sed 's|.*/||; s|\.po$||' > "$po_dir/LINGUAS" || return
+
+ langs=$(cd $ref_po_dir && echo *.po | sed 's/\.po//g')
+ test "$langs" = '*' && langs=x
+ for po in $langs; do
+ case $po in x) continue;; esac
+ new_po="$ref_po_dir/$po.po"
+ cksum_file="$ref_po_dir/$po.s1"
+ if ! test -f "$cksum_file" ||
+ ! test -f "$po_dir/$po.po" ||
+ ! $SHA1SUM -c "$cksum_file" < "$new_po" > /dev/null 2>&1; then
+ echo "$me: updated $po_dir/$po.po..."
+ cp "$new_po" "$po_dir/$po.po" \
+ && $SHA1SUM < "$new_po" > "$cksum_file" || return
+ fi
+ done
+}
+
+case $SKIP_PO in
+'')
+ if test -d po; then
+ update_po_files po $package || exit
+ fi
+
+ if test -d runtime-po; then
+ update_po_files runtime-po $package-runtime || exit
+ fi;;
+esac
+
+symlink_to_dir()
+{
+ src=$1/$2
+ dst=${3-$2}
+
+ test -f "$src" && {
+
+ # If the destination directory doesn't exist, create it.
+ # This is required at least for "lib/uniwidth/cjk.h".
+ dst_dir=$(dirname "$dst")
+ if ! test -d "$dst_dir"; then
+ mkdir -p "$dst_dir"
+
+ # If we've just created a directory like lib/uniwidth,
+ # tell version control system(s) it's ignorable.
+ # FIXME: for now, this does only one level
+ parent=$(dirname "$dst_dir")
+ for dot_ig in x $vc_ignore; do
+ test $dot_ig = x && continue
+ ig=$parent/$dot_ig
+ insert_vc_ignore $ig "${dst_dir##*/}"
+ done
+ fi
+
+ if $copy; then
+ {
+ test ! -h "$dst" || {
+ echo "$me: rm -f $dst" &&
+ rm -f "$dst"
+ }
+ } &&
+ test -f "$dst" &&
+ cmp -s "$src" "$dst" || {
+ echo "$me: cp -fp $src $dst" &&
+ cp -fp "$src" "$dst"
+ }
+ else
+ # Leave any existing symlink alone, if it already points to the source,
+ # so that broken build tools that care about symlink times
+ # aren't confused into doing unnecessary builds. Conversely, if the
+ # existing symlink's time stamp is older than the source, make it afresh,
+ # so that broken tools aren't confused into skipping needed builds. See
+ # <http://lists.gnu.org/archive/html/bug-gnulib/2011-05/msg00326.html>.
+ test -h "$dst" &&
+ src_ls=$(ls -diL "$src" 2>/dev/null) && set $src_ls && src_i=$1 &&
+ dst_ls=$(ls -diL "$dst" 2>/dev/null) && set $dst_ls && dst_i=$1 &&
+ test "$src_i" = "$dst_i" &&
+ both_ls=$(ls -dt "$src" "$dst") &&
+ test "X$both_ls" = "X$dst$nl$src" || {
+ dot_dots=
+ case $src in
+ /*) ;;
+ *)
+ case /$dst/ in
+ *//* | */../* | */./* | /*/*/*/*/*/)
+ die "invalid symlink calculation: $src -> $dst";;
+ /*/*/*/*/) dot_dots=../../../;;
+ /*/*/*/) dot_dots=../../;;
+ /*/*/) dot_dots=../;;
+ esac;;
+ esac
+
+ echo "$me: ln -fs $dot_dots$src $dst" &&
+ ln -fs "$dot_dots$src" "$dst"
+ }
+ fi
+ }
+}
+
+version_controlled_file() {
+ parent=$1
+ file=$2
+ if test -d .git; then
+ git rm -n "$file" > /dev/null 2>&1
+ elif test -d .svn; then
+ svn log -r HEAD "$file" > /dev/null 2>&1
+ elif test -d CVS; then
+ grep -F "/${file##*/}/" "$parent/CVS/Entries" 2>/dev/null |
+ grep '^/[^/]*/[0-9]' > /dev/null
+ else
+ warn_ "no version control for $file?"
+ false
+ fi
+}
+
+# NOTE: we have to be careful to run both autopoint and libtoolize
+# before gnulib-tool, since gnulib-tool is likely to provide newer
+# versions of files "installed" by these two programs.
+# Then, *after* gnulib-tool (see below), we have to be careful to
+# run autoreconf in such a way that it does not run either of these
+# two just-pre-run programs.
+
+# Import from gettext.
+with_gettext=yes
+grep '^[ ]*AM_GNU_GETTEXT_VERSION(' configure.ac >/dev/null || \
+ with_gettext=no
+
+if test $with_gettext = yes || test $use_libtool = 1; then
+
+ tempbase=.bootstrap$$
+ trap "rm -f $tempbase.0 $tempbase.1" 1 2 13 15
+
+ > $tempbase.0 > $tempbase.1 &&
+ find . ! -type d -print | sort > $tempbase.0 || exit
+
+ if test $with_gettext = yes; then
+ # Released autopoint has the tendency to install macros that have been
+ # obsoleted in current gnulib, so run this before gnulib-tool.
+ echo "$0: $AUTOPOINT --force"
+ $AUTOPOINT --force || exit
+ fi
+
+ # Autoreconf runs aclocal before libtoolize, which causes spurious
+ # warnings if the initial aclocal is confused by the libtoolized
+ # (or worse out-of-date) macro directory.
+ # libtoolize 1.9b added the --install option; but we support back
+ # to libtoolize 1.5.22, where the install action was default.
+ if test $use_libtool = 1; then
+ install=
+ case $($LIBTOOLIZE --help) in
+ *--install*) install=--install ;;
+ esac
+ echo "running: $LIBTOOLIZE $install --copy"
+ $LIBTOOLIZE $install --copy
+ fi
+
+ find . ! -type d -print | sort >$tempbase.1
+ old_IFS=$IFS
+ IFS=$nl
+ for file in $(comm -13 $tempbase.0 $tempbase.1); do
+ IFS=$old_IFS
+ parent=${file%/*}
+ version_controlled_file "$parent" "$file" || {
+ for dot_ig in x $vc_ignore; do
+ test $dot_ig = x && continue
+ ig=$parent/$dot_ig
+ insert_vc_ignore "$ig" "${file##*/}"
+ done
+ }
+ done
+ IFS=$old_IFS
+
+ rm -f $tempbase.0 $tempbase.1
+ trap - 1 2 13 15
+fi
+
+# Import from gnulib.
+
+gnulib_tool_options="\
+ --import\
+ --no-changelog\
+ --aux-dir $build_aux\
+ --doc-base $doc_base\
+ --lib $gnulib_name\
+ --m4-base $m4_base/\
+ --source-base $source_base/\
+ --tests-base $tests_base\
+ --local-dir $local_gl_dir\
+ $gnulib_tool_option_extras\
+"
+if test $use_libtool = 1; then
+ case "$gnulib_tool_options " in
+ *' --libtool '*) ;;
+ *) gnulib_tool_options="$gnulib_tool_options --libtool" ;;
+ esac
+fi
+echo "$0: $gnulib_tool $gnulib_tool_options --import ..."
+$gnulib_tool $gnulib_tool_options --import $gnulib_modules &&
+
+for file in $gnulib_files; do
+ symlink_to_dir "$GNULIB_SRCDIR" $file \
+ || die "failed to symlink $file"
+done
+
+bootstrap_post_import_hook \
+ || die "bootstrap_post_import_hook failed"
+
+# Remove any dangling symlink matching "*.m4" or "*.[ch]" in some
+# gnulib-populated directories. Such .m4 files would cause aclocal to fail.
+# The following requires GNU find 4.2.3 or newer. Considering the usual
+# portability constraints of this script, that may seem a very demanding
+# requirement, but it should be ok. Ignore any failure, which is fine,
+# since this is only a convenience to help developers avoid the relatively
+# unusual case in which a symlinked-to .m4 file is git-removed from gnulib
+# between successive runs of this script.
+find "$m4_base" "$source_base" \
+ -depth \( -name '*.m4' -o -name '*.[ch]' \) \
+ -type l -xtype l -delete > /dev/null 2>&1
+
+# Invoke autoreconf with --force --install to ensure upgrades of tools
+# such as ylwrap.
+AUTORECONFFLAGS="--verbose --install --force -I $m4_base $ACLOCAL_FLAGS"
+
+# Some systems (RHEL 5) are using ancient autotools, for which the
+# --no-recursive option had not been invented. Detect that lack and
+# omit the option when it's not supported. FIXME in 2017: remove this
+# hack when RHEL 5 autotools are updated, or when they become irrelevant.
+case $($AUTORECONF --help) in
+ *--no-recursive*) AUTORECONFFLAGS="$AUTORECONFFLAGS --no-recursive";;
+esac
+
+# Tell autoreconf not to invoke autopoint or libtoolize; they were run above.
+echo "running: AUTOPOINT=true LIBTOOLIZE=true $AUTORECONF $AUTORECONFFLAGS"
+AUTOPOINT=true LIBTOOLIZE=true $AUTORECONF $AUTORECONFFLAGS \
+ || die "autoreconf failed"
+
+# Get some extra files from gnulib, overriding existing files.
+for file in $gnulib_extra_files; do
+ case $file in
+ */INSTALL) dst=INSTALL;;
+ build-aux/*) dst=$build_aux/${file#build-aux/};;
+ *) dst=$file;;
+ esac
+ symlink_to_dir "$GNULIB_SRCDIR" $file $dst \
+ || die "failed to symlink $file"
+done
+
+if test $with_gettext = yes; then
+ # Create gettext configuration.
+ echo "$0: Creating po/Makevars from po/Makevars.template ..."
+ rm -f po/Makevars
+ sed '
+ /^EXTRA_LOCALE_CATEGORIES *=/s/=.*/= '"$EXTRA_LOCALE_CATEGORIES"'/
+ /^COPYRIGHT_HOLDER *=/s/=.*/= '"$COPYRIGHT_HOLDER"'/
+ /^MSGID_BUGS_ADDRESS *=/s|=.*|= '"$MSGID_BUGS_ADDRESS"'|
+ /^XGETTEXT_OPTIONS *=/{
+ s/$/ \\/
+ a\
+ '"$XGETTEXT_OPTIONS"' $${end_of_xgettext_options+}
+ }
+ ' po/Makevars.template >po/Makevars \
+ || die 'cannot generate po/Makevars'
+
+ # If the 'gettext' module is in use, grab the latest Makefile.in.in.
+ # If only the 'gettext-h' module is in use, assume autopoint already
+ # put the correct version of this file into place.
+ case $gnulib_modules in
+ *gettext-h*) ;;
+ *gettext*)
+ cp $GNULIB_SRCDIR/build-aux/po/Makefile.in.in po/Makefile.in.in \
+ || die "cannot create po/Makefile.in.in"
+ ;;
+ esac
+
+ if test -d runtime-po; then
+ # Similarly for runtime-po/Makevars, but not quite the same.
+ rm -f runtime-po/Makevars
+ sed '
+ /^DOMAIN *=.*/s/=.*/= '"$package"'-runtime/
+ /^subdir *=.*/s/=.*/= runtime-po/
+ /^MSGID_BUGS_ADDRESS *=/s/=.*/= bug-'"$package"'@gnu.org/
+ /^XGETTEXT_OPTIONS *=/{
+ s/$/ \\/
+ a\
+ '"$XGETTEXT_OPTIONS_RUNTIME"' $${end_of_xgettext_options+}
+ }
+ ' po/Makevars.template >runtime-po/Makevars \
+ || die 'cannot generate runtime-po/Makevars'
+
+ # Copy identical files from po to runtime-po.
+ (cd po && cp -p Makefile.in.in *-quot *.header *.sed *.sin ../runtime-po)
+ fi
+fi
+
+bootstrap_epilogue
+
+echo "$0: done. Now you can run './configure'."
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
+# End:
--- /dev/null
+# Bootstrap configuration.
+
+# Copyright (C) 2006-2014 Free Software Foundation, Inc.
+
+# 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 3 of the License, 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 this program. If not, see <http://www.gnu.org/licenses/>.
+
+
+# gnulib modules used by this package.
+gnulib_modules="
+git-version-gen
+gitlog-to-changelog
+"
+
+# Additional xgettext options to use. Use "\\\newline" to break lines.
+XGETTEXT_OPTIONS=$XGETTEXT_OPTIONS'\\\
+ --from-code=UTF-8\\\
+ --flag=asprintf:2:c-format --flag=vasprintf:2:c-format\\\
+ --flag=asnprintf:3:c-format --flag=vasnprintf:3:c-format\\\
+ --flag=wrapf:1:c-format\\\
+'
+
+# If "AM_GNU_GETTEXT(external" or "AM_GNU_GETTEXT([external]"
+# appears in configure.ac, exclude some unnecessary files.
+# Without grep's -E option (not portable enough, pre-configure),
+# the following test is ugly. Also, this depends on the existence
+# of configure.ac, not the obsolescent-named configure.in. But if
+# you're using this infrastructure, you should care about such things.
+
+gettext_external=0
+grep '^[ ]*AM_GNU_GETTEXT(external\>' configure.ac > /dev/null &&
+ gettext_external=1
+grep '^[ ]*AM_GNU_GETTEXT(\[external\]' configure.ac > /dev/null &&
+ gettext_external=1
+
+if test $gettext_external = 1; then
+ # Gettext supplies these files, but we don't need them since
+ # we don't have an intl subdirectory.
+ excluded_files='
+ m4/glibc2.m4
+ m4/intdiv0.m4
+ m4/lcmessage.m4
+ m4/lock.m4
+ m4/printf-posix.m4
+ m4/size_max.m4
+ m4/uintmax_t.m4
+ m4/ulonglong.m4
+ m4/visibility.m4
+ m4/xsize.m4
+ '
+fi
+
+# Build prerequisites
+buildreq="\
+autoconf 2.59
+automake 1.9.6
+git 1.5.5
+tar -
+"
+
+bootstrap_post_import_hook ()
+{
+ # Automake requires that ChangeLog exist.
+ touch ChangeLog || return 1
+}
--- /dev/null
+AC_PREREQ(2.63)
+
+AC_INIT([riece],
+ m4_esyscmd([build-aux/git-version-gen .tarball-version]),
+ [riece-discuss@nongnu.org])
+
+AC_CONFIG_SRCDIR([configure.ac])
+AC_CONFIG_AUX_DIR([build-aux])
+
+AM_INIT_AUTOMAKE
+
+AC_CHECK_EMACS
+AC_PATH_LISPDIR
+AC_PATH_PACKAGEDIR
+
+AM_CONDITIONAL(XEMACS, test ${EMACS_FLAVOR} = xemacs)
+
+AC_CONFIG_FILES([Makefile
+lisp/Makefile
+lisp/riece-package-info.el
+lisp/test/Makefile
+doc/Makefile])
+AC_OUTPUT
--- /dev/null
+Makefile.in
+Makefile
+texinfo.tex
+*.info*
+mdate-sh
+stamp*
+vers*.texi
--- /dev/null
+AUTOMAKE_OPTIONS = -Wno-portability
+EXTRA_DIST = infohack.el ptexinfmt.el irchat-copyright.el
+
+info_TEXINFOS = riece-ja.texi riece-en.texi
+
+package: all
+ $(MAKE) EMACS=$(XEMACS)
+
+install-package: package
+ $(MAKE) infodir=$(PACKAGEDIR)/info install
+
+SUFFIXES = .texi .info
+.texi.info:
+ $(EMACS) -batch -q -no-site-file -l $(srcdir)/infohack.el $(srcdir) \
+ -f batch-makeinfo $<
--- /dev/null
+
+@node GNU Free Documentation License
+@appendixsec GNU Free Documentation License
+
+@cindex FDL, GNU Free Documentation License
+@center Version 1.1, March 2000
+
+@display
+Copyright @copyright{} 2000 Free Software Foundation, Inc.
+51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
+
+Everyone is permitted to copy and distribute verbatim copies
+of this license document, but changing it is not allowed.
+@end display
+
+@enumerate 0
+@item
+PREAMBLE
+
+The purpose of this License is to make a manual, textbook, or other
+written document @dfn{free} in the sense of freedom: to assure everyone
+the effective freedom to copy and redistribute it, with or without
+modifying it, either commercially or noncommercially. Secondarily,
+this License preserves for the author and publisher a way to get
+credit for their work, while not being considered responsible for
+modifications made by others.
+
+This License is a kind of ``copyleft'', which means that derivative
+works of the document must themselves be free in the same sense. It
+complements the GNU General Public License, which is a copyleft
+license designed for free software.
+
+We have designed this License in order to use it for manuals for free
+software, because free software needs free documentation: a free
+program should come with manuals providing the same freedoms that the
+software does. But this License is not limited to software manuals;
+it can be used for any textual work, regardless of subject matter or
+whether it is published as a printed book. We recommend this License
+principally for works whose purpose is instruction or reference.
+
+@item
+APPLICABILITY AND DEFINITIONS
+
+This License applies to any manual or other work that contains a
+notice placed by the copyright holder saying it can be distributed
+under the terms of this License. The ``Document'', below, refers to any
+such manual or work. Any member of the public is a licensee, and is
+addressed as ``you''.
+
+A ``Modified Version'' of the Document means any work containing the
+Document or a portion of it, either copied verbatim, or with
+modifications and/or translated into another language.
+
+A ``Secondary Section'' is a named appendix or a front-matter section of
+the Document that deals exclusively with the relationship of the
+publishers or authors of the Document to the Document's overall subject
+(or to related matters) and contains nothing that could fall directly
+within that overall subject. (For example, if the Document is in part a
+textbook of mathematics, a Secondary Section may not explain any
+mathematics.) The relationship could be a matter of historical
+connection with the subject or with related matters, or of legal,
+commercial, philosophical, ethical or political position regarding
+them.
+
+The ``Invariant Sections'' are certain Secondary Sections whose titles
+are designated, as being those of Invariant Sections, in the notice
+that says that the Document is released under this License.
+
+The ``Cover Texts'' are certain short passages of text that are listed,
+as Front-Cover Texts or Back-Cover Texts, in the notice that says that
+the Document is released under this License.
+
+A ``Transparent'' copy of the Document means a machine-readable copy,
+represented in a format whose specification is available to the
+general public, whose contents can be viewed and edited directly and
+straightforwardly with generic text editors or (for images composed of
+pixels) generic paint programs or (for drawings) some widely available
+drawing editor, and that is suitable for input to text formatters or
+for automatic translation to a variety of formats suitable for input
+to text formatters. A copy made in an otherwise Transparent file
+format whose markup has been designed to thwart or discourage
+subsequent modification by readers is not Transparent. A copy that is
+not ``Transparent'' is called ``Opaque''.
+
+Examples of suitable formats for Transparent copies include plain
+@sc{ascii} without markup, Texinfo input format, La@TeX{} input format,
+@acronym{SGML} or @acronym{XML} using a publicly available
+@acronym{DTD}, and standard-conforming simple @acronym{HTML} designed
+for human modification. Opaque formats include PostScript,
+@acronym{PDF}, proprietary formats that can be read and edited only by
+proprietary word processors, @acronym{SGML} or @acronym{XML} for which
+the @acronym{DTD} and/or processing tools are not generally available,
+and the machine-generated @acronym{HTML} produced by some word
+processors for output purposes only.
+
+The ``Title Page'' means, for a printed book, the title page itself,
+plus such following pages as are needed to hold, legibly, the material
+this License requires to appear in the title page. For works in
+formats which do not have any title page as such, ``Title Page'' means
+the text near the most prominent appearance of the work's title,
+preceding the beginning of the body of the text.
+
+@item
+VERBATIM COPYING
+
+You may copy and distribute the Document in any medium, either
+commercially or noncommercially, provided that this License, the
+copyright notices, and the license notice saying this License applies
+to the Document are reproduced in all copies, and that you add no other
+conditions whatsoever to those of this License. You may not use
+technical measures to obstruct or control the reading or further
+copying of the copies you make or distribute. However, you may accept
+compensation in exchange for copies. If you distribute a large enough
+number of copies you must also follow the conditions in section 3.
+
+You may also lend copies, under the same conditions stated above, and
+you may publicly display copies.
+
+@item
+COPYING IN QUANTITY
+
+If you publish printed copies of the Document numbering more than 100,
+and the Document's license notice requires Cover Texts, you must enclose
+the copies in covers that carry, clearly and legibly, all these Cover
+Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
+the back cover. Both covers must also clearly and legibly identify
+you as the publisher of these copies. The front cover must present
+the full title with all words of the title equally prominent and
+visible. You may add other material on the covers in addition.
+Copying with changes limited to the covers, as long as they preserve
+the title of the Document and satisfy these conditions, can be treated
+as verbatim copying in other respects.
+
+If the required texts for either cover are too voluminous to fit
+legibly, you should put the first ones listed (as many as fit
+reasonably) on the actual cover, and continue the rest onto adjacent
+pages.
+
+If you publish or distribute Opaque copies of the Document numbering
+more than 100, you must either include a machine-readable Transparent
+copy along with each Opaque copy, or state in or with each Opaque copy
+a publicly-accessible computer-network location containing a complete
+Transparent copy of the Document, free of added material, which the
+general network-using public has access to download anonymously at no
+charge using public-standard network protocols. If you use the latter
+option, you must take reasonably prudent steps, when you begin
+distribution of Opaque copies in quantity, to ensure that this
+Transparent copy will remain thus accessible at the stated location
+until at least one year after the last time you distribute an Opaque
+copy (directly or through your agents or retailers) of that edition to
+the public.
+
+It is requested, but not required, that you contact the authors of the
+Document well before redistributing any large number of copies, to give
+them a chance to provide you with an updated version of the Document.
+
+@item
+MODIFICATIONS
+
+You may copy and distribute a Modified Version of the Document under
+the conditions of sections 2 and 3 above, provided that you release
+the Modified Version under precisely this License, with the Modified
+Version filling the role of the Document, thus licensing distribution
+and modification of the Modified Version to whoever possesses a copy
+of it. In addition, you must do these things in the Modified Version:
+
+@enumerate A
+@item
+Use in the Title Page (and on the covers, if any) a title distinct
+from that of the Document, and from those of previous versions
+(which should, if there were any, be listed in the History section
+of the Document). You may use the same title as a previous version
+if the original publisher of that version gives permission.
+
+@item
+List on the Title Page, as authors, one or more persons or entities
+responsible for authorship of the modifications in the Modified
+Version, together with at least five of the principal authors of the
+Document (all of its principal authors, if it has less than five).
+
+@item
+State on the Title page the name of the publisher of the
+Modified Version, as the publisher.
+
+@item
+Preserve all the copyright notices of the Document.
+
+@item
+Add an appropriate copyright notice for your modifications
+adjacent to the other copyright notices.
+
+@item
+Include, immediately after the copyright notices, a license notice
+giving the public permission to use the Modified Version under the
+terms of this License, in the form shown in the Addendum below.
+
+@item
+Preserve in that license notice the full lists of Invariant Sections
+and required Cover Texts given in the Document's license notice.
+
+@item
+Include an unaltered copy of this License.
+
+@item
+Preserve the section entitled ``History'', and its title, and add to
+it an item stating at least the title, year, new authors, and
+publisher of the Modified Version as given on the Title Page. If
+there is no section entitled ``History'' in the Document, create one
+stating the title, year, authors, and publisher of the Document as
+given on its Title Page, then add an item describing the Modified
+Version as stated in the previous sentence.
+
+@item
+Preserve the network location, if any, given in the Document for
+public access to a Transparent copy of the Document, and likewise
+the network locations given in the Document for previous versions
+it was based on. These may be placed in the ``History'' section.
+You may omit a network location for a work that was published at
+least four years before the Document itself, or if the original
+publisher of the version it refers to gives permission.
+
+@item
+In any section entitled ``Acknowledgments'' or ``Dedications'',
+preserve the section's title, and preserve in the section all the
+substance and tone of each of the contributor acknowledgments
+and/or dedications given therein.
+
+@item
+Preserve all the Invariant Sections of the Document,
+unaltered in their text and in their titles. Section numbers
+or the equivalent are not considered part of the section titles.
+
+@item
+Delete any section entitled ``Endorsements''. Such a section
+may not be included in the Modified Version.
+
+@item
+Do not retitle any existing section as ``Endorsements''
+or to conflict in title with any Invariant Section.
+@end enumerate
+
+If the Modified Version includes new front-matter sections or
+appendices that qualify as Secondary Sections and contain no material
+copied from the Document, you may at your option designate some or all
+of these sections as invariant. To do this, add their titles to the
+list of Invariant Sections in the Modified Version's license notice.
+These titles must be distinct from any other section titles.
+
+You may add a section entitled ``Endorsements'', provided it contains
+nothing but endorsements of your Modified Version by various
+parties---for example, statements of peer review or that the text has
+been approved by an organization as the authoritative definition of a
+standard.
+
+You may add a passage of up to five words as a Front-Cover Text, and a
+passage of up to 25 words as a Back-Cover Text, to the end of the list
+of Cover Texts in the Modified Version. Only one passage of
+Front-Cover Text and one of Back-Cover Text may be added by (or
+through arrangements made by) any one entity. If the Document already
+includes a cover text for the same cover, previously added by you or
+by arrangement made by the same entity you are acting on behalf of,
+you may not add another; but you may replace the old one, on explicit
+permission from the previous publisher that added the old one.
+
+The author(s) and publisher(s) of the Document do not by this License
+give permission to use their names for publicity for or to assert or
+imply endorsement of any Modified Version.
+
+@item
+COMBINING DOCUMENTS
+
+You may combine the Document with other documents released under this
+License, under the terms defined in section 4 above for modified
+versions, provided that you include in the combination all of the
+Invariant Sections of all of the original documents, unmodified, and
+list them all as Invariant Sections of your combined work in its
+license notice.
+
+The combined work need only contain one copy of this License, and
+multiple identical Invariant Sections may be replaced with a single
+copy. If there are multiple Invariant Sections with the same name but
+different contents, make the title of each such section unique by
+adding at the end of it, in parentheses, the name of the original
+author or publisher of that section if known, or else a unique number.
+Make the same adjustment to the section titles in the list of
+Invariant Sections in the license notice of the combined work.
+
+In the combination, you must combine any sections entitled ``History''
+in the various original documents, forming one section entitled
+``History''; likewise combine any sections entitled ``Acknowledgments'',
+and any sections entitled ``Dedications''. You must delete all sections
+entitled ``Endorsements.''
+
+@item
+COLLECTIONS OF DOCUMENTS
+
+You may make a collection consisting of the Document and other documents
+released under this License, and replace the individual copies of this
+License in the various documents with a single copy that is included in
+the collection, provided that you follow the rules of this License for
+verbatim copying of each of the documents in all other respects.
+
+You may extract a single document from such a collection, and distribute
+it individually under this License, provided you insert a copy of this
+License into the extracted document, and follow this License in all
+other respects regarding verbatim copying of that document.
+
+@item
+AGGREGATION WITH INDEPENDENT WORKS
+
+A compilation of the Document or its derivatives with other separate
+and independent documents or works, in or on a volume of a storage or
+distribution medium, does not as a whole count as a Modified Version
+of the Document, provided no compilation copyright is claimed for the
+compilation. Such a compilation is called an ``aggregate'', and this
+License does not apply to the other self-contained works thus compiled
+with the Document, on account of their being thus compiled, if they
+are not themselves derivative works of the Document.
+
+If the Cover Text requirement of section 3 is applicable to these
+copies of the Document, then if the Document is less than one quarter
+of the entire aggregate, the Document's Cover Texts may be placed on
+covers that surround only the Document within the aggregate.
+Otherwise they must appear on covers around the whole aggregate.
+
+@item
+TRANSLATION
+
+Translation is considered a kind of modification, so you may
+distribute translations of the Document under the terms of section 4.
+Replacing Invariant Sections with translations requires special
+permission from their copyright holders, but you may include
+translations of some or all Invariant Sections in addition to the
+original versions of these Invariant Sections. You may include a
+translation of this License provided that you also include the
+original English version of this License. In case of a disagreement
+between the translation and the original English version of this
+License, the original English version will prevail.
+
+@item
+TERMINATION
+
+You may not copy, modify, sublicense, or distribute the Document except
+as expressly provided for under this License. Any other attempt to
+copy, modify, sublicense or distribute the Document is void, and will
+automatically terminate your rights under this License. However,
+parties who have received copies, or rights, from you under this
+License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+@item
+FUTURE REVISIONS OF THIS LICENSE
+
+The Free Software Foundation may publish new, revised versions
+of the GNU Free Documentation License from time to time. Such new
+versions will be similar in spirit to the present version, but may
+differ in detail to address new problems or concerns. See
+@uref{http://www.gnu.org/copyleft/}.
+
+Each version of the License is given a distinguishing version number.
+If the Document specifies that a particular numbered version of this
+License ``or any later version'' applies to it, you have the option of
+following the terms and conditions either of that specified version or
+of any later version that has been published (not as a draft) by the
+Free Software Foundation. If the Document does not specify a version
+number of this License, you may choose any version ever published (not
+as a draft) by the Free Software Foundation.
+@end enumerate
+
+@page
+@appendixsubsec ADDENDUM: How to use this License for your documents
+
+To use this License in a document you have written, include a copy of
+the License in the document and put the following copyright and
+license notices just after the title page:
+
+@smallexample
+@group
+ Copyright (C) @var{year} @var{your name}.
+ Permission is granted to copy, distribute and/or modify this document
+ under the terms of the GNU Free Documentation License, Version 1.1
+ or any later version published by the Free Software Foundation;
+ with the Invariant Sections being @var{list their titles}, with the
+ Front-Cover Texts being @var{list}, and with the Back-Cover Texts being @var{list}.
+ A copy of the license is included in the section entitled ``GNU
+ Free Documentation License''.
+@end group
+@end smallexample
+
+If you have no Invariant Sections, write ``with no Invariant Sections''
+instead of saying which ones are invariant. If you have no
+Front-Cover Texts, write ``no Front-Cover Texts'' instead of
+``Front-Cover Texts being @var{list}''; likewise for Back-Cover Texts.
+
+If your document contains nontrivial examples of program code, we
+recommend releasing these examples in parallel under your choice of
+free software license, such as the GNU General Public License,
+to permit their use in free software.
+
+@c Local Variables:
+@c ispell-local-pdict: "ispell-dict"
+@c End:
+
--- /dev/null
+;;; infohack.el --- a hack to format info file.
+;; Copyright (C) 2001 Free Software Foundation, Inc.
+
+;; Author: Shenghuo Zhu <zsh@cs.rochester.edu>
+;; Keywords: info
+
+;; This file is part of GNU Emacs.
+
+;; GNU Emacs 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.
+
+;; GNU Emacs 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., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
+
+;;; Commentary:
+
+;;; Code:
+
+;(let ((default-directory (expand-file-name "../lisp/"))
+; (features (cons 'w3-forms (copy-sequence features))))
+; ;; Adjust `load-path' for APEL.
+; (load-file "dgnushack.el"))
+(load-file (expand-file-name "ptexinfmt.el"
+ (car command-line-args-left)))
+(setq command-line-args-left (cdr command-line-args-left))
+
+(defun infohack-remove-unsupported ()
+ (goto-char (point-min))
+ (while (re-search-forward "@\\(end \\)?ifnottex" nil t)
+ (replace-match ""))
+ (goto-char (point-min))
+ (while (search-forward "\n@iflatex\n" nil t)
+ (delete-region (1+ (match-beginning 0))
+ (search-forward "\n@end iflatex\n"))))
+
+(defun infohack (file)
+ (let ((dest-directory default-directory)
+ (max-lisp-eval-depth (max max-lisp-eval-depth 600))
+ coding-system)
+ (find-file file)
+ (setq buffer-read-only nil)
+ (setq coding-system (if (boundp 'buffer-file-coding-system)
+ buffer-file-coding-system
+ file-coding-system))
+ (infohack-remove-unsupported)
+ (texinfo-every-node-update)
+ (texinfo-format-buffer t) ;; Don't save any file.
+ (setq default-directory dest-directory)
+ (setq buffer-file-name
+ (expand-file-name (file-name-nondirectory buffer-file-name)
+ default-directory))
+ (setq buffer-file-coding-system coding-system
+ file-coding-system coding-system)
+ (if (> (buffer-size) 100000)
+ (Info-split))
+ (save-buffer)))
+
+(eval-and-compile
+ (when (string-match "windows-nt\\|os/2\\|emx\\|cygwin"
+ (symbol-name system-type))
+ (defun subst-char-in-region (START END FROMCHAR TOCHAR &optional NOUNDO)
+ "From START to END, replace FROMCHAR with TOCHAR each time it occurs.
+If optional arg NOUNDO is non-nil, don't record this change for undo
+and don't mark the buffer as really changed.
+Both characters must have the same length of multi-byte form."
+ (let ((original-buffer-undo-list buffer-undo-list)
+ (modified (buffer-modified-p)))
+ (if NOUNDO
+ (setq buffer-undo-list t))
+ (goto-char START)
+ (let ((from (char-to-string FROMCHAR))
+ (to (char-to-string TOCHAR)))
+ (while (search-forward from END t)
+ (replace-match to t t)))
+ (if NOUNDO
+ (progn (setq buffer-undo-list original-buffer-undo-list)
+ (set-buffer-modidifed-p modified)))))))
+
+(defun batch-makeinfo ()
+ "Emacs makeinfo in batch mode."
+ (infohack-texi-format (car command-line-args-left)
+ (car (cdr command-line-args-left)))
+ (setq command-line-args-left nil))
+
+\f
+(defun infohack-texi-format (file &optional addsuffix)
+ (let ((auto-save-default nil)
+ (find-file-run-dired nil)
+ coding-system-for-write
+ output-coding-system
+ (error 0))
+ (condition-case err
+ (progn
+ (find-file file)
+ (setq buffer-read-only nil)
+ (buffer-disable-undo (current-buffer))
+ (if (boundp 'MULE)
+ (setq output-coding-system file-coding-system)
+ (setq coding-system-for-write buffer-file-coding-system))
+ ;; Remove ignored areas first.
+ (while (re-search-forward "^@ignore[\t\r ]*$" nil t)
+ (delete-region (match-beginning 0)
+ (if (re-search-forward
+ "^@end[\t ]+ignore[\t\r ]*$" nil t)
+ (1+ (match-end 0))
+ (point-max))))
+ (infohack-remove-unsupported)
+ (goto-char (point-min))
+ ;; Add suffix if it is needed.
+ (when (and addsuffix
+ (re-search-forward "^@setfilename[\t ]+\\([^\t\n ]+\\)"
+ nil t)
+ (not (string-match "\\.info$" (match-string 1))))
+ (insert ".info")
+ (goto-char (point-min)))
+ ;; process @include before updating node
+ ;; This might produce some problem if we use @lowersection or
+ ;; such.
+ (let ((input-directory default-directory)
+ (texinfo-command-end))
+ (while (re-search-forward "^@include" nil t)
+ (setq texinfo-command-end (point))
+ (let ((filename (concat input-directory
+ (texinfo-parse-line-arg))))
+ (re-search-backward "^@include")
+ (delete-region (point) (save-excursion
+ (forward-line 1)
+ (point)))
+ (message "Reading included file: %s" filename)
+ (save-excursion
+ (save-restriction
+ (narrow-to-region
+ (point) (+ (point)
+ (car (cdr (insert-file-contents filename)))))
+ (goto-char (point-min))
+ ;; Remove `@setfilename' line from included file,
+ ;; if any, so @setfilename command not duplicated.
+ (if (re-search-forward "^@setfilename"
+ (save-excursion
+ (forward-line 100)
+ (point))
+ t)
+ (progn
+ (beginning-of-line)
+ (delete-region (point) (save-excursion
+ (forward-line 1)
+ (point))))))))))
+ (texinfo-mode)
+ (texinfo-every-node-update)
+ (set-buffer-modified-p nil)
+ (message "texinfo formatting %s..." file)
+ (texinfo-format-buffer nil)
+ (if (buffer-modified-p)
+ (progn (message "Saving modified %s" (buffer-file-name))
+ (save-buffer))))
+ (error
+ (message ">> Error: %s" (prin1-to-string err))
+ (message ">> point at")
+ (let ((s (buffer-substring (point) (min (+ (point) 100) (point-max))))
+ (tem 0))
+ (while (setq tem (string-match "\n+" s tem))
+ (setq s (concat (substring s 0 (match-beginning 0))
+ "\n>> "
+ (substring s (match-end 0)))
+ tem (1+ tem)))
+ (message ">> %s" s))
+ (setq error 1)))
+ (kill-emacs error)))
+
+;;; infohack.el ends here
--- /dev/null
+;;; -*- emacs-lisp -*-
+;;;
+;;; $Id: irchat-copyright.el,v 1.1 2003/10/22 20:07:07 ueno Exp $
+;;;
+(defvar irchat-copyright "
+ $Id: irchat-copyright.el,v 1.1 2003/10/22 20:07:07 ueno Exp $
+ Internet Relay CHAT interface for GNU Emacs
+ Copyright (C) 1989 Tor Lillqvist
+
+ 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 1, 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; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ Author's email address is <tml@hemuli.atk.vtt.fi>
+
+ Following people have made major improvements to irchat. Also there
+ are numerous people who have given suggestions and improvements. If
+ you think your name should be included here, give us a note...
+ Kai Keinänen <kmk@iki.fi>
+ Markku Järvinen <mta@cc.tut.fi>
+ Jukka Partanen <jtp@iki.fi>
+ Kim Nyberg <kny@iki.fi>
+ Tero T. Mononen <tmo@iki.fi>
+
+ You can ftp the latest version from cs.hut.fi:/pub/irchat
+
+ There is a mailing list, irchat@cc.tut.fi for those interested
+ in developments in irchat. Mail irchat-request@cc.tut.fi if you
+ are interested in joining.
+
+ Current team is:
+ Janne Liimatainen <jsl@iki.fi>
+ Tero T. Mononen <tmo@iki.fi>
+ Kim Nyberg <kny@iki.fi>
+ Tomi Ollila <too@iki.fi>
+ Jukka Partanen <jtp@iki.fi>
+ Timo J. Rinne <tri@iki.fi>
+" "Basically GPL")
+
+;;;
+;;; $Log: irchat-copyright.el,v $
+;;; Revision 1.1 2003/10/22 20:07:07 ueno
+;;; (EXTRA_DIST) Add irchat-copyright.el.
+;;;
+;;; Revision 3.2 1997/02/27 10:19:14 jsl
+;;; changed irchat-nickname to irchat-real-nickname
+;;; users should only change irchat-nickname
+;;;
+;;;Revision 3.1 1997/02/24 16:00:02 tri
+;;;Promoted revision to 3.1.
+;;;
+;;; Revision 1.2 1997/02/13 09:10:47 tri
+;;; Added Domo to "current" team.
+;;;
+;;; Revision 1.1 1996/12/19 14:54:48 tri
+;;; Initial revision
+;;;
+;;; Revision 0.1.1 1995/01/15 11:43:37 tmo
+;;; Initial revision
+;;;
+;;; Revision 0.1.2 1993/07/13 11:56:52 tmo
+;;; made this file to be defvar
+;;;
+;;; Revision 0.1.2 1993/07/13 11:56:52 tmo
+;;; made this file to be defvar
+;;;
+;;; Revision 0.1.1 1993/07/10 13:23:50 tmo
+;;; Initial revision
+;;;
--- /dev/null
+* Riece 9.0.0 の主な変更点
+
+** チャンネルを並べ直すコマンドを追加 (ueno)
+ riece-command-reorder-channels の説明を参照
+
+** チャンネル参加時に複数のチャンネルを補完するようにした (ueno)
+
+* Riece 8.0.0 の主な変更点
+
+** riece-url の URL 正規表現を拡張 (ueno)
+
+** lexical binding の使用 (ueno)
+
+** doc/ptexinfmt.el の更新 (kaoru)
+
+* Riece 7.0.3 の主な変更点
+
+** チャンネルバッファにカーソルがある状態でのフリーズ動作の修正 (ueno)
+ riece-shrink-buffer にバグがあり、フリーズ状態のチャンネルバッファで
+ カーソルが先頭か末尾に移動することがあったのを修正
+
+** ソースツリー外でのビルドの修正 (kaoru, ueno)
+ いくつかの場所で srcdir を適切にわたしていなかったのを修正
+
+** Emacs 24 のために旧スタイルのバッククオートを除去 (ueno)
+
+* Riece 7.0.2 の主な変更点
+
+** ログ読み出し時の不具合の修正 (ueno)
+ 保存時に coding-system が指定されなかった場合に対応
+
+** コントロールシーケンスの扱いを修正 (ueno)
+
+* Riece 7.0.1 の主な変更点
+
+** Emacs 24 でのビルドエラーの修正 (ueno)
+ make-local-hook が定義されない場合に対応
+
+** Emacs 24 でのコンパイル時の警告の抑制 (kaoru)
+ 警告 "`save-excursion' defeated by `set-buffer'" を抑制
+
+* Riece 7.0.0 の主な変更点
+
+** メーリングリストのアドレスを riece-discuss@nongnu.org に変更
+
+** XEmacs 21.5 でのビルドを修正 (ueno)
+
+** モードライン上での riece-channel-list-indicator の色付けの修正 (ueno)
+
+* Riece 6.1.0 の主な変更点
+
+** 設定の保存に Custom を使うのをやめた (ueno)
+
+** アドオン管理用のコマンドを Command バッファでも実行できるようにした (kaoru)
+
+* Riece 6.0.0 の主な変更点
+
+** 新規アドオン riece-desktop-notify (bg66)
+
+** Custom を利用した設定保存機構の修正
+
+* Riece 5.0.0 の主な変更点
+
+** 設定の保存に Custom を使うようにした (ueno)
+
+** ツールバーのアイコンに Gtk+ の標準アイコンを使うようにした (ueno)
+
+** 接続時に RFC2812 推奨の手順にしたがうようにした (ueno)
+
+** リアルネームの設定に非 ASCII 文字が使えるようになった (KASUGA Toru)
+
+** riece-keywords の設定上のバグを修正 (Takeru Naito)
+
+* Riece 4.0.0 の主な変更点
+
+** 新規アドオン riece-twitter (ueno)
+
+** riece-rdcc で送信元のポート番号を指定できるようにした (ueno)
+
+* Riece 3.1.2 の主な変更点
+
+** メッセージカタログ (ueno)
+
+* Riece 3.1.1 の主な変更点
+
+** riece-async を再び動作するようにした (ueno)
+
+** riece-shrink-buffer をデフォルトで有効にした (ueno)
+
+** 新規ウィンドウレイアウト "spiral" を追加 (URABE Shyouhei)
+
+* Riece 3.1.0 の主な変更点
+
+** メッセージハンドラの再入禁止にした (ueno)
+
+** riece-ndcc.el が calc に依存しないようにした (ueno)
+
+** 353 ハンドラのバグの修正 (ueno)
+
+* Riece 3.0.0 の主な変更点
+
+** 変数 riece-username の意味を変更 (ueno)
+ この変数を設定しているユーザは、riece-realname に変数名を変更する必
+ 要がある。
+
+** 切断済みのサーバを再度切断しようとした場合に、エラーになるようにし
+ た (yoichi)
+
+** 新規アドオン riece-epg.el を導入。GnuPG を使った安全な会話が可能 (ueno)
+
+** ユーザを招待 (invite) する際のバグを 2 つ修正 (Steve Youngs)
+
+** ユーザがチャンネルを離脱した場面での、再描画のバグを修正 (ueno)
+
+** riece-alias-alternate-separator のデフォルト値を "@" に戻した (ueno)
+
+* Riece 2.0.2 の主な変更点
+
+** C-c l (riece-command-list) で、チャンネルのトピックの代わりに参加者
+ 数が表示されるバグを修正 (ueno)
+
+** ニックネームやチャンネル名の補完候補の表示で大文字小文字を保存する
+ ようにした (ueno)
+
+** チャンネル名とサーバ名の区切り文字列のデフォルト値を "@" から "%"
+ に変更 (ueno)
+
+* Riece 2.0.1 の主な変更点
+
+** 直前に選択していたチャンネルに未読メッセージがある場合に unread マー
+ クが表示されない不具合の修正 (ueno)
+
+** 新規アドオン riece-xfaceb.el を導入。BBDB から X-Face/Face を検索し、
+ ユーザ一覧に表示する (Steve Youngs)
+
+* Riece 2.0.0 の主な変更点
+
+** チャンネル毎にエンコーディングを指定できるようにした (ueno)
+ 設定例:
+ (setq riece-channel-coding-system-alist
+ '(("#euc-jp" . euc-jp)
+ ("#utf-8 irc.freenode.net" . utf-8)))
+
+** アドオンの uninstall, unload (危険) に対応。
+ アドオン一覧モードで riece-addons のカスタマイズが可能 (ueno)
+
+** Ruby のプログラムを評価する機構の導入。
+ 利用方法は riece-ruby.el 冒頭のコメントを参照 (ueno)
+
+** 新規アドオン riece-eval-ruby.el を導入。",ruby " に続いて任意の
+ Ruby のプログラムを発言すると、評価結果をチャンネルに送信する (ueno)
+
+** 定期的にバッファを切り詰める機能をアドオンに分離
+ これまで riece-max-buffer-size を設定していた人は、
+ riece-shrink-buffer アドオンを有効にする必要があるので注意 (ueno)
+
+** 離脱したチャンネルに参加していたユーザが IRC をやめた場合に、エラー
+ が発生する不具合の修正 (ueno)
+
+** ログの保存時に、使用した coding-system の名前をファイル名に埋め込む
+ ようにした。これにより riece-log-coding-system を設定しなくても文字
+ 化けが発生しにくくなった (ueno)
+
+** C-c g でチャンネルを移動する際に、新しい発言があったチャンネルから
+ 辿るようにした (ueno)
+
+** チャンネル名とサーバ名の区切り文字列として " " 以外に "@" も許すよ
+ うにした (ueno)
+
+** 日本語マニュアル (riece-ja.texi) を初心者を対象に書き直した (ueno)
+
+** *Others* バッファを隠せるようにした (ueno)
+
+** デバッグ出力を専用のバッファに分離 (ueno)
+
+** elisp ファイルを1つずつ byte-compile する make ルールを設けた。
+ configure 後、lisp/ 以下で make compile-individually (ueno)
+
+** 開発者向けの文書 (doc/HACKING{,.ja}) を同梱 (ueno)
+
+* Riece 1.0.8 の主な変更点
+
+** riece-log のロックの緩和 (ueno)
+
+** RPL_WHOISIDLE の秒数を日時分秒形式で表示 (ueno)
+
+** riece-obarray を riece-channel-obarray, riece-user-obarray に分離
+ (kaoru)
+
+** いくつかの個所でチャンネル名の大文字小文字が区別されるバグへの対応 (ueno)
+
+** SXEmacs のバージョン表記に対応 (Steve Youngs)
+
+** CTCP TIME に対応 (Steve Youngs)
+
+** ~/.riece/addons 以下のディレクトリを読み込まないようにした (kaoru)
+
+** riece-command-part がエラーになるバグの修正 (yoichi)
+
+** ~/.riece/addons ディレクトリがないと起動時にエラーになるバグの修正 (ueno)
+
+* Riece 1.0.7 の主な変更点
+
+** 新規アドオン riece-toolbar (ueno)
+ riece-toolbar はツールバーにアイコンを表示します。現時点では全ての
+ アイコンが含まれているわけではありません。
+
+** 新規アドオン riece-keepalive (ueno)
+ riece-keepalive は自発的にサーバに PING メッセージを送ることで IRC
+ のコネクションを持続させます。
+
+** 新規アドオン riece-google (bg66)
+ riece-google は Google での検索結果をチャンネルに送ります。
+
+** 新規アドオン riece-eval (bg66)
+ riece-eval は elisp の式の評価結果をチャンネルに送ります。
+
+** いくつかのアドオンをデフォルトで有効化 (ueno)
+ riece-log, riece-alias, riece-ctlseq, riece-keyword が今回からデフォ
+ ルトで有効になります。
+
+** 新規コマンド riece-command-suspend-resume (ueno)
+ riece-command-suspend-resume は現在のウィンドウ構成を保存・再現します。
+
+** ボタンウィジェットクリック時のカーソル移動の抑止 (ueno)
+
+** モードラインのインジケータを face で装飾 (ueno)
+
+** NAMES リプライに含まれるユーザ数を数えるようになりました (ueno)
+
+** 新規ユーザオプション riece-part-message (ueno)
+
+** riece-addon-directory 以下に置かれたアドオンを自動的に有効化 (ueno)
+
+** riece-buffer-dispose-function のデフォルト値が今回から kill-buffer
+ になりました (ueno)
+
+** process-filter 内でエラーが発生した場合、backtrace を行なうようにな
+ りました (ueno)
+
+** 必要に応じてチャンネルキーを問い合わせるようにしました (ueno)
+
+** バッファの自動的な切り詰めをデフォルトでは無効化 (ueno)
+
+** riece-log のための新しいディレクトリ構成 (ueno)
+
+** user-renamed signal-filter のバグを修正 (kaoru)
+
+** riece-command-enable-addon と riece-command-disable-addon のバグの
+ 修正 (yoichi)
+
+* Riece 1.0.6 の主な変更点
+
+** CVS 版 GNU Emacs に同梱された url パッケージの irc: スキーマ対応の
+ バックエンドとして Riece を使用できるようにするプログラム url-riece を
+ 同梱 (大和さん)
+
+** "Bug#12345" のような文字列を URL にマップするオプション
+ riece-url-regexp-alist を新設 (Liece からバックポート) (ueno)
+
+** モードラインに自身のチャンネルオペレータの印(@, +)を表示するように
+ した (ueno, thanks to k-to さん)
+
+** バッファを切り詰める際に、一行ずつではなく複数行一度に削除するよう
+ にした (riece-shrink-buffer-remove-lines オプションで設定可能) (ueno,
+ thanks to ysjj さん)
+
+** riece-alias-alist が上手く動いていなかった不具合の修正 (ueno)
+
+** 1.0.4 以降、GNU Emacs で、メッセージ送信時のフロー制御が上手く動い
+ ていなかった不具合の修正 (ueno)
+
+** バグ報告用のコマンド riece-submit-bug-report を新設 (ueno)
+
+** nadoka や Tiarra などの IRC proxy が、IRC サーバ実装の伝統に沿わな
+ いメッセージを返すことへの対処 (ueno, thanks to k-to さん)
+
+** C-c # 数字で指定した番号のチャンネルに移動できるようにした (ueno,
+ thanks to ysjj さん)
+
+** riece-yank で、前置引数を指定することにより、メッセージを NOTICE と
+ して送信できるようにした (bg66)
+
+* Riece 1.0.5 の主な変更点
+
+** ユニットテストを追加。(ueno)
+
+** 複数サーバ接続時に、チャンネル名とサーバ名の区切りに空白以外の文字
+ 列を使えるようにした。(ueno)
+
+ riece-alias-alternate-separator == "@" の時の変換規則は以下の通り:
+
+ "#riece" -> "#riece"
+ "#riece localhost" -> "#riece@localhost"
+ "#ch@nnel" -> "#ch@@nnel"
+ "#ch@nnel localhost" -> "#ch@@nnel@localhost"
+
+** DCC が他のクライアントとの間でうまく動かない不具合の修正。(ueno)
+
+** kill-ring から文字列を送信するアドオン riece-yank を追加。(by 大和さん)
+
+** 英語の文書を追加。(ueno)
+
+* Riece 1.0.4 の主な変更点
+
+** 大量のメッセージを送る場合に、フロー制御を行うようにした。(ueno)
+
+** 起動時に複数サーバ上のチャンネルに参加する設定で、
+ riece-startup-server-list の設定を省略可能にした。(ueno)
+
+** riece-mini 使用時に過去のメッセージを閲覧する機能を設けた。(bg66)
+
+* Riece 1.0.3 の主な変更点
+
+** NAMES 発行時に「いないはずのユーザ」をユーザ一覧から除外するように
+ した (Thanks to 山下さん)
+
+** 行の折り返しを各バッファの truncate-lines の値でカスタマイズできる
+ ようにした(Thanks to 山下さん)
+
+** チャンネルバッファのスクロール動作を制御するオプション
+ riece-window-center-line を追加
+
+** コマンドバッファでの補完の不具合を修正 (Thanks to 山下さん)
+
+** 一対一の会話で、相手が quit した場合、チャンネル一覧から除外するよ
+ うにした (Thanks to 森本さん)
+
+** デフォルトの IRC サーバへの接続時にエラーが出た場合には、即座に終了
+ するようにした(Thanks to k-to さん)
+
+* Riece 1.0.2 の主な変更点
+
+** riece-url 使用時にメニューバーのメニューが破壊される不具合の修正
+
+** Jabber 対応に向け、プロトコルインターフェースを分けた
+
+** その他、雑多な修正
+
+* Riece 1.0.1 の主な変更点
+
+** XEmacs で、モードラインに表示されるチャンネルの背景色をモードライン
+ の色にあわせた
+
+** チャンネルのモード変更時に、モード指定の先頭に ":" を付けて送ってい
+ た不具合の修正
+ (Thanks to やまださん)
+
+** チャンネルミスを防ぐアドオン riece-foolproof を追加 (by 高橋さん)
+
+** チャンネルバッファのモードラインに表示される要素の順番を変更 (by 高橋さん)
+
+** NOTICE で発言した時の表示を変更 (by 高橋さん)
+
+** 再起動時にシグナル関数を二重に登録していた不具合の修正
+
+** C-c Home でチャンネルバッファの先頭にカーソルを移動するコマンドを追加
+
+** フリーズ状態のチャンネルでは、チャンネルを移動してもチャンネルバッ
+ ファのカーソル位置を保つようにした
+
+** CVS 版の Emacs で、引数なしの current-word が nil を返すようになったため、
+ riece-command-complete-user がエラーになる不具合の修正 (by 中山さん)
+
+** riece-hangman の乱数発生ロジックの修正 (by 高橋さん)
+
+** 空行の上で、C-c p でメッセージを送ろうとした場合、エラーを通知する
+ ようにした
+
+** riece-ignore 使用時に、設定ファイルで無視するユーザを指定できるよう、
+ オプション riece-startup-ignored-user-list を新設
+
+** riece-rdcc 使用時に、ファイル名に空白が入ったファイルを送受信できる
+ ようにした
+
+* Riece 1.0.0 の主な変更点
+
+** アドオンの一覧表示モードを追加し、実行時にアドオンを有効化・無効化
+ できるようにした (C-c ^)
+
+** GNU Emacs で、パスワード入力中に Quit (C-g) できない不具合の修正
+
+** チャンネル内で hangman(6) で遊ぶアドオン riece-hangman を追加
+
+** プロセスが一つもない場合に C-c q した場合のメッセージを変更
+
+** ユーザを無視するアドオン riece-ignore を追加
+
+** 9 文字以上のニックネームも受け付けるようにした
+
+** 再起動した際に、アドオンを二重に組み込まないようにした
+
+** 他のバッファにいる時に発言があるとモードラインに印 ("[R]") を表示す
+ るアドオン riece-biff を追加 (by 大橋さん)
+
+** 日本語の通らない端末で、日本語をローマ字で表示するアドオン
+ riece-kakasi を追加
+
+** コマンドプロンプトにアクションを示す文字列を追加 (suggested by 山下さん)
+
+* Riece 0.2.2 の主な変更点
+
+** ^B, ^V, ^_ などのコントロールシーケンスによる文字列の強調に対応
+ (riece-ctlseq アドオンを追加)
+
+** プリブが未読扱いされない不具合の修正
+
+** チャンネルバッファ、*Others* バッファを独立に freeze できるようにし
+ た。(各バッファで C-t C-f でトグル)
+
+** riece-log で、ログの保存先ディレクトリを canonicalize したチャンネ
+ ル名から求めるようにした。(by 大橋さん)
+
+* Riece 0.2.0 の主な変更点
+
+** Qt や GTK+ と同様のシグナルを導入し、部分的に再描画するようにした。
+
+** C-c C-n で、チャンネルバッファにも名前の一覧を表示するようにした。
+
+** riece-lsdb 使用時の不具合の修正 (by 中山さん)
+
+* Riece 0.1.8 の主な変更点
+
+** LSDB と連携するアドオン riece-lsdb を追加
+
+** ユーザ一覧に X-Face を表示するアドオン riece-xface を追加 (要 LSDB).
+スクリーンショット:
+http://wiliki.designflaw.org/riece-xface.png
+
+** チャンネル名の大文字小文字が区別されてしまうバグを修正
+
+** IRC proxy に他のクライアントと一緒に接続している場合でも,自分の発
+ 言をきちんと扱うようにした (by 高橋さん)
+
+* Riece 0.1.7 の主な変更点
+
+** Emacs が busy or suspend 状態になることに備え、
+ PING に応答する local proxy 経由で IRC サーバに接続するアドオン
+ riece-async を追加
+
+** riece-away-message が指定された場合に AWAY 状態のトグルに失敗するバ
+ グを修正 (Thanks to 藤村さん)
+
+** GNU Emacs で、ロード時に standard-syntax-table を変更してしまうバグを修正
+ (Thanks to Hori さん)
+
+** riece-startup-channel-list に加え、riece-startup-server-list を指定
+ することで、起動時に複数のサーバ上のチャンネルに参加できるようにした
+
+** riece-log 使用時にログファイルの coding system を指定するオプション
+ riece-log-coding-system を追加
+
+** riece-keyword 使用時に指定したキーワードの発言があった時に呼ばれる
+ riece-keyword-notify-functions を追加。既存の
+ riece-notify-keyword-functions(なんて紛らわしい名前!) の代わりにこちら
+ を使用してください
+
+** riece-log 使用時に riece-log-flashback がハイライトやボタンも復元す
+ るようにした
+
+** riece-{unread,mini} を NOTICE や CTCP ACTION には反応しないようにした
+
+* Riece 0.1.6 の主な変更点
+
+** Emacs 20.7 でうまく動作しない不具合の修正。
+
+** XEmacs 21.1 でコンパイルに失敗する不具合の修正(動作は無保証)。
+
+** riece-rdcc で、巨大なファイルを受信してもメモリを食わないようにした。
+
+** riece-gather-channel-modes == t の場合、チャンネル参加時にチャンネ
+ ルのモードを調べるようにした。
+
+** チャンネルバッファのサイズを切り詰めるタイミングを修正。
+
+** チャンネル移動時に、バッファが自動的にスクロールしない不具合の修正。
+
+** riece-log で、riece-log-directory-map にサーバ名付きのチャンネルを
+ 指定できるようにした。(by 大橋さん)
+
+* Riece 0.1.5 の主な変更点
+
+** デフォルトで利用可能なウィンドウレイアウトに、
+ {top,middle,bottom}-{left,right} を追加。
+
+** 選択中のウィンドウレイアウトを保存するようにした。
+
+** アイコンを表示するアドオン (riece-icon) を追加。
+ ([http://wiliki.designflaw.org/riecess1.png スクリーンショット])
+
+** ユーザリストの再描画の高速化。
+
+** CTCP ACTION の改良。(Thanks to knu さん)
+
+** riece-rdcc を使って DCC のファイル転送を始める際に、たまに固まるバグを修正。
+
+** 既に Riece が起動した状態でもう一度起動した場合、エラーを通知するの
+ ではなく、riece-command-configure-windows を呼ぶようにした (Thanks
+ to 大橋さん)
+
+** C-c o (riece-command-set-operators) と C-c v
+ (riece-command-set-speakers) で、3 人以上のユーザを対象にした場合のバ
+ グを修正。
+
+** バッファのサイズが riece-max-buffer-size を越えた場合、自動的に切り
+ 詰めるようにした。
+
+* Riece 0.1.4 の主な変更点
+
+** チャンネルバッファで riece-command-names のキーバインドを C-n から
+ N に変更。(thanks to 高橋さん)
+
+** C-c C-t a (riece-command-toggle-away) がエラーになるバグを修正。
+ (thanks to 前田さん)
+
+** Riece のバッファを選択していない時には、再描画を行わないようにした。
+
+** 同名のバッファが Riece 以外のプログラムに使われている時、
+ generate-new-buffer で新しいバッファを作成して利用するようにした。
+
+** ! で初まるチャンネルを作成できないバグを修正。
+
+** riece-keyword 使用時に、自分の発言に含まれるキーワードに反応しない
+ ようにした。
+
+** ひとつもチャンネルに入っていない時、チャンネル内でのみ有効なコマン
+ ドを実行するとエラーを出すようにした。
+
+** メニューバーにメニューを追加するアドオン (riece-menu) を新設。
+
+* Riece 0.1.3 の主な変更点
+
+** PRIVMSG や NOTICE の受信時に,チャンネル名の大文字小文字を区別しな
+ いようにした。
+
+** riece-history 使用時に,ヒストリの先頭にあるチャンネルに "+" マーク
+ をつけるようにした。
+
+** ボタンとポップアップメニューを表示するアドオン (riece-button) を追加。
+
+** キーワードを検出するアドオン (riece-keyword) を追加。
+
+ XEmacs をお使いなら,以下の設定を ~/.riece/init.el に加えることで,
+ "ほげ" や "ふが" に反応して音を鳴らすことができます.
+
+ (load-default-sounds)
+ (setq riece-keywords '("ほげ" "ふが"))
+ (add-hook 'riece-notify-keyword-functions
+ (lambda (keyword) (play-sound 'cuckoo)))
+
+* Riece 0.1.2 の主な変更点
+
+** パスワード付きのチャンネルに JOIN できないバグを修正
+
+** riece-startup-channel-list を復活
+
+** riece-rdcc-save-directory を新設
+
+** パスワード入力を中断できないバグを修正
+
+** INVITE ハンドラのバグを修正
+
+** INVITE された後に JOIN する場合、デフォルトのチャンネル名を使うようにした。
+
+** JOIN のタイミングにより riece-channel-list-indicator が更新されない
+ バグを修正
+
+* Riece 0.1.1 の主な変更点
+
+** いくつかのアドオンをデフォルトで読み込むようにした
+
+** riece-default-channel-binding が効かないバグを治した
+
+** *Channels* バッファで、現在いるチャンネル名の頭にマーク "*" を付ける
+ ようにした
+
+** riece-debug == nil の場合、切断時のメッセージを簡略化した
+
+** チャンネル移動の履歴を管理するアドオン riece-history を追加
+
+** 移動先のチャンネルを推測するアドオン riece-guess を追加
+
+Tips:
+
+~/.riece/init.el に以下のように指定すると、
+
+ (setq riece-guess-channel-try-functions
+ '(riece-guess-channel-from-unread
+ riece-guess-channel-from-history))
+
+C-c g で以下の順序で移動できます。
+
+# 未読のメッセージのあるチャンネル
+# 最近訪れたチャンネル
+# それ以外
+
+* Riece 0.1.0 の主な変更点
+
+** チャンネルの内部表現を文字列からベクターによる表現に変更した
+
+** プロセス管理をまともにした
+
+*** プロセス名でサーバを識別するように変更した
+
+*** 接続・切断の処理を riece-server.el にまとめた
+
+*** QUIT を投げても応答がない場合、強制的に切断するようにした
+
+** M-x doctor と連携するアドオンを追加
+
+** 発言に SKK の変換中の印▽が混ざらないようにするアドオンを追加 (by 高橋さん)
+
+** ウィンドウレイアウトを変更できるようにした (C-c t l)
+
+** Liece の "top" スタイルに似たウィンドウレイアウトを追加 (by 高橋さん)
+
+* Riece 0.0.4 の主な変更点
+
+** ミニバッファだけで IRC するアドオン riece-mini を追加 (by 大橋さん)
+
+** ログ収集アドオン riece-log を追加 (by 大橋さん)
+
+** riece-command-next-channel (C-c >), riece-command-previous-channel
+ (C-c <) でチャンネルをぐるぐる移動できるようにした (by 中山さん)
+
+** riece-unread アドオン使用時に発言のあったチャンネルに C-c C-u で移
+ 動できるようにした (by 大橋さん)
+
+** IRC メッセージに従ってインジケータを更新するようにした
+
+** ptexinfmt.el を APEL free なものに置き換えた (Thanks to 山岡さん)
+
+* Riece 0.0.3 の主な変更点
+
+** パスワードが必要なサーバに二つ以上接続できないバグの修正 (Thanks to
+ 中山さん)
+
+** ニックの大文字小文字だけを変更すると一貫性が失われる問題を修正
+
+** ハンドラフックで発生したエラーを捕捉
+
+** DCC によるファイル転送に対応 (riece-ndcc.el, riece-rdcc.el)
+
+** 発言のあったチャンネルに "!" マークをつけるアドオンの追加 (riece-unread.el)
+
+** 日本語のマニュアルの追加
+
+* Riece 0.0.2 の主な変更点
+
+** APEL の関数 (pop, push) の退治
+
+** "depcomp" が同梱されない問題の修正 (autoreconf のバグ?)
+
+** Windows 環境でビルドできない不具合の修正 (Thanks to 大橋さん)
+
+** ニック変更時に一貫性が失われる問題の修正
+
+** C-c C-t u (M-x riece-command-toggle-user-list-mode) の不具合の修正
+
+** アドオンの導入
+
+** CTCP に部分的に対応 (VERSION と PING のみ)
+
+** font-lock モジュール (riece-highlight) のアドオン化
+
+** URL 収集機能のアドオン化
+
+* Riece 0.0.1 の主な変更点
+
+** 最初のリリース
+
+* For details of changes, see the file ChangeLog.
+\f
+Local variables:
+mode: text
+mode: outline
+paragraph-separate: "[ \f]*$"
+coding: utf-8
+end:
--- /dev/null
+* これは何か?
+
+Riece は Emacs 向け IRC クライアントです。
+
+Riece には以下に挙げる特長があります:
+
+- 複数の IRC サーバに同時に接続可能
+- アドオンにより拡張機能の追加や取り外しが可能
+- 他の elisp パッケージに依存しないため、インストールが簡単
+- 設定が簡単で、前回起動時の設定を記録・復元する仕組みを提供
+- 段階的な操作説明書 (info 形式) が附属
+- 最新の IRC のクライアントプロトコル (RFC2812) に準拠
+
+* ディレクトリ構成
+
+このパッケージは以下のディレクトリから成ります:
+
+lisp/ - Emacs Lisp のファイル
+doc/ - 文書ファイル
+
+* 必要なもの
+
+- Emacs 20.7 以降、または XEmacs 21.4 以降
+- Ruby 1.8 以降 (任意)
+
+* インストール
+
+$ ./configure
+$ sudo make install
+
+~/.emacs 等に以下の一行を追加してください。
+
+ (autoload 'riece "riece" "Start Riece" t)
+
+XEmacs で使う場合には "--with-xemacs" オプションを configure スクリプ
+トに与えてください。また、"make install" の代わりに "make
+install-package" とすることでXEmacs のパッケージとしてインストールする
+ことができます。
+
+* マニュアル
+
+使い方は同梱のマニュアルに記載されています。
+マニュアルを読むには "M-x info" で以下のメニューを選択します。
+
+ * Riece-ja: (riece-ja). An IRC client for Emacsen
--- /dev/null
+-*- mode: outline; coding: iso-2022-jp -*-
+
+\e$B$3$NJ8=q$O!"\e(BRiece \e$B$N3+H/<T$H3+H/$K6=L#$N$"$k?M8~$1$G$9!#\e(B
+
+* \e$B3+H/%W%m%;%9\e(B
+
+** \e$B%P%0$NJs9p\e(B
+
+\e$B%P%0$r8+IU$1$?$i0J2<$KEPO?$7$F$/$@$5$$!#\e(B
+https://savannah.nongnu.org/bugs/?group=riece
+
+** \e$B3+H/HG%=!<%9%3!<%I$N<hF@\e(B
+
+\e$B$$$^$N$H$3$m\e(B Git \e$B$r;H$C$F$$$^$9!#3+H/HG$N%=!<%9%3!<%I$r%S%k%I$9$k$K$O\e(B
+\e$B0J2<$N<j=g$K=>$C$F$/$@$5$$!#\e(B
+
+(1) \e$B%b%8%e!<%k$N%A%'%C%/%"%&%H\e(B
+
+ git clone git://git.sv.gnu.org/riece.git
+
+(2) configure \e$B%9%/%j%W%H$N@8@.\e(B
+
+ ./bootstrap
+
+(3) configure \e$B%9%/%j%W%H$N5/F0\e(B
+
+ ./configure
+
+(4) \e$B%S%k%I$H%$%s%9%H!<%k\e(B
+
+ make
+ make install
+
+* \e$B%=!<%9$N9=@.\e(B
+
+** \e$B%b%8%e!<%k\e(B
+
+Riece \e$B$r9=@.$9$k\e(B elisp \e$B%b%8%e!<%k$r0J2<$KNs5s$7$^$9!#0MB84X78$N>e0L$K\e(B
+\e$B$"$k$b$N$r@h$K5s$2$^$9!#\e(B
+
+- riece-globals
+ \e$BBg0hJQ?t$NDj5A\e(B
+
+- riece-options
+ \e$B%f!<%6%*%W%7%g%s$NDj5A\e(B
+
+- riece-version
+ \e$B%P!<%8%g%s$NDj5A\e(B
+
+- riece-coding
+ \e$B%3!<%G%#%s%0%7%9%F%`4XO"$N4X?t$NDj5A\e(B
+
+- riece-complete
+ \e$B%_%K%P%C%U%!$G$NJd40$r=u$1$k4X?t$NDj5A\e(B
+
+- riece-addon
+ \e$B%"%I%*%s4IM}\e(B
+
+- riece-mode
+ riece-channel/riece-user \e$B%*%V%8%'%/%H$N%b!<%I4IM}\e(B
+
+- riece-identity
+ riece-channel/riece-user \e$B%*%V%8%'%/%H\e(B \e$B$NBg0hI=5-$rA`:n$9$k4X?t$NDj5A\e(B
+
+- riece-channel
+ riece-channel \e$B%*%V%8%'%/%H\e(B \e$B4XO"$NDj5A\e(B
+
+- riece-user
+ riece-user \e$B%*%V%8%'%/%H\e(B \e$B4XO"$NDj5A\e(B
+
+- riece-misc
+ \e$B;(B?$J4X?t$NDj5A\e(B
+
+- riece-signal
+ \e$B%7%0%J%k4IM}\e(B
+
+- riece-layout
+ \e$B%&%#%s%I%&%l%$%"%&%H4IM}\e(B
+
+- riece-display
+ \e$BI=<(MQ%P%C%U%!$N4IM}\e(B
+
+- riece-server
+ IRC \e$B%5!<%P$H$N@\B34IM}\e(B
+
+- riece-naming
+ \e$B%A%c%s%M%k$X$N%f!<%6$N;22C!&N%C&$r4IM}$9$k\e(B mediator
+
+- riece-message
+ riece-message \e$B%*%V%8%'%/%H\e(B \e$B4XO"$NDj5A\e(B
+
+- riece-filter
+ \e$B%W%m%;%9%U%#%k%?$N%(%s%H%j%]%$%s%H\e(B
+
+- riece-handle
+ \e$BDL>o$N%a%C%;!<%8$N%O%s%I%i!#\e(Briece-filter \e$B$+$i8F$P$l$k\e(B
+
+- riece-000
+ 000\e$BHVBf$N\e(B numeric reply \e$B$N%O%s%I%i!#\e(Briece-filter \e$B$+$i8F$P$l$k\e(B
+
+- riece-200
+ 200\e$BHVBf$N\e(B numeric reply \e$B$N%O%s%I%i!#\e(Briece-filter \e$B$+$i8F$P$l$k\e(B
+
+- riece-300
+ 300\e$BHVBf$N\e(B numeric reply \e$B$N%O%s%I%i!#\e(Briece-filter \e$B$+$i8F$P$l$k\e(B
+
+- riece-400
+ 400\e$BHVBf$N\e(B numeric reply \e$B$N%O%s%I%i!#\e(Briece-filter \e$B$+$i8F$P$l$k\e(B
+
+- riece-500
+ 500\e$BHVBf$N\e(B numeric reply \e$B$N%O%s%I%i!#\e(Briece-filter \e$B$+$i8F$P$l$k\e(B
+
+- riece-commands
+ \e$B%3%^%s%I$NDj5A\e(B
+
+- riece-irc
+ IRC \e$B%W%m%H%3%k$KBP1~$7$?\e(B process-filter \e$B$J$I$N@_Dj\e(B
+
+- riece
+ \e$B5/F0;~$N%(%s%H%j%]%$%s%H!#3F%P%C%U%!$N%a%8%c!<%b!<%I$N@_Dj$J$I\e(B
+
+** \e$BL>A06u4V$N4IM}\e(B
+
+Riece \e$B$OF1;~$KJ#?t$N\e(B IRC \e$B%5!<%P$K@\B3$G$-$k$N$G!"\e(BIRC \e$B%5!<%PKh$KJL!9$N\e(B
+\e$BL>A06u4V$r4IM}$9$kI,MW$,$"$j$^$9!#$3$N$h$&$JL>A06u4V$K$O!"\e(BIRC \e$B%5!<%P$H\e(B
+\e$B$N@\B3%W%m%;%9$K7k$SIU$1$i$l$?%P%C%U%!$N%m!<%+%kJQ?t$r2p$7$F%"%/%;%9$7\e(B
+\e$B$^$9!#\e(B
+
+*** \e$B%W%m%;%9%P%C%U%!$N<hF@\e(B
+
+IRC \e$B%5!<%P$H$N@\B3%W%m%;%9$r<hF@$9$k$K$O\e(B IRC \e$B%5!<%P$NL>A0$rCN$kI,MW$,\e(B
+\e$B$"$j$^$9!#\e(BIRC \e$B%5!<%P$NL>A0$O0J2<$K5s$2$k$$$/$D$+$NJ}K!$G<hF@$G$-$^$9!#\e(B
+
+(1) \e$BJQ?t\e(B riece-overrinding-server-name \e$B$NCM\e(B
+
+(2) \e$BJQ?t\e(B riece-server-name \e$B$NCM\e(B
+
+ riece-server-name \e$B$,%+%l%s%H%P%C%U%!$N%m!<%+%kJQ?t$G$"$k$J$i$P!"4{$K%W\e(B
+ \e$B%m%;%9$N%P%C%U%!$K$$$k$H$_$J$;$k$N$G!"\e(Briece-server-name \e$B$NCM$=$N$b$N\e(B
+
+(3) \e$BA*BrCf$N%A%c%s%M%k$rI=$9\e(B riece-identity \e$B%*%V%8%'%/%H$+$i@Z$j=P$7$?\e(B
+ IRC \e$B%5!<%P$NL>A0\e(B
+
+\e$B$3$&$7$F<hF@$7$?\e(B IRC \e$B%5!<%P$NL>A0$r0z?t$K4X?t\e(B riece-server-process \e$B$r\e(B
+\e$B8F=P$7!"%5!<%P$N%W%m%;%9$r<hF@$7$^$9!#\e(B
+
+*** riece-identity \e$B%*%V%8%'%/%H\e(B
+
+\e$BJ#?t$N\e(B IRC \e$B%5!<%P$K@\B3$7$F$$$k>l9g!"%A%c%s%M%kL>$d%K%C%/%M!<%`$rBg0h\e(B
+\e$BE*$K6hJL$9$kI,MW$,@8$8$^$9!#$3$N$h$&$JL>A0$rI=8=$9$k$N$,\e(B
+riece-identity \e$B%*%V%8%'%/%H$G$9!#\e(B
+
+riece-identity \e$B%*%V%8%'%/%H$O0J2<$N\e(B 2 \e$B$D$NMWAG$r$b$D%Y%/%?!<$G$9!#\e(B
+
+- prefix
+ \e$B%A%c%s%M%kL>$d%K%C%/%M!<%`$J$I!"\e(BIRC \e$B%5!<%P$K8GM-$NL>A0\e(B
+
+- server
+ IRC \e$B%5!<%P$NL>A0\e(B
+
+riece-identity \e$B%*%V%8%'%/%H$KE,MQ2DG=$JA`:n$K$O0J2<$N$h$&$J$b$N$,$"$j$^$9!#\e(B
+
+- riece-make-identity prefix &optional server
+ riece-identity \e$B%*%V%8%'%/%H$r?75,$K:n@.$7$^$9!#\e(Bserver \e$B0z?t$,>JN,$5$l$?\e(B
+ \e$B>l9g$K$O!"4X?t\e(B riece-find-server-name \e$B$G<hF@$7$?%5!<%PL>$r;H$$$^$9\e(B
+
+- riece-identity-prefix identity
+ riece-identity \e$B%*%V%8%'%/%H$+$i\e(B IRC \e$B%5!<%P$K8GM-$NL>A0$r@Z$j=P$7$^$9!#\e(B
+
+- riece-identity-server identity
+ riece-identity \e$B%*%V%8%'%/%H$+$i%5!<%P$NL>A0$r@Z$j=P$7$^$9!#\e(B
+
+- riece-identity-equal ident1 ident2
+ 2 \e$B$D$N\e(B riece-identity \e$B%*%V%8%'%/%H$,F1Ey$G$"$k$+D4$Y$^$9!#\e(B
+
+- riece-identity-equal-no-server ident1 ident2
+ 2 \e$B$D$N\e(B riece-identity \e$B%*%V%8%'%/%H$N!"\e(BIRC \e$B%5!<%P$K8GM-$NL>A0$,F1Ey$G$"\e(B
+ \e$B$k$+D4$Y$^$9!#\e(B
+
+- riece-identity-member elt list
+ riece-identity \e$B%*%V%8%'%/%H\e(B elt \e$B$,\e(B list \e$B$K4^$^$l$k$+D4$Y$^$9!#\e(B
+
+*** \e$B%A%c%s%M%k$H%f!<%6$N4IM}\e(B
+
+riece-identity \e$B%*%V%8%'%/%H$+$i@Z$j=P$5$l$?\e(B IRC \e$B%5!<%P$K8GM-$NL>A0!"$9\e(B
+\e$B$J$o$A%A%c%s%M%kL>$H$H%K%C%/%M!<%`$K$h$jI=$o$5$l$k%A%c%s%M%k$H%f!<%6$N\e(B
+\e$B<BBN$O$=$l$>$l\e(B riece-channel \e$B%*%V%8%'%/%H$H\e(B riece-user \e$B%*%V%8%'%/%H$G\e(B
+\e$BI=8=$5$l$^$9!#\e(B
+
+**** riece-channel \e$B%*%V%8%'%/%H\e(B
+
+riece-channel \e$B$O%A%c%s%M%k$rI=$9%*%V%8%'%/%H$G!"0J2<$NMWAG$r;}$A$^$9!#\e(B
+
+- users
+ \e$B;22C$7$F$$$k%f!<%6$N%K%C%/%M!<%`$N%j%9%H\e(B
+
+- operators
+ \e$B%*%Z%l!<%?8"8B$r$b$D%f!<%6$N%K%C%/%M!<%`$N%j%9%H\e(B
+
+- speakers
+ \e$BH/8@8"$r$b$D%f!<%6$N%K%C%/%M!<%`$N%j%9%H\e(B
+
+- modes
+ \e$B%A%c%s%M%k$N%b!<%I\e(B
+
+- banned
+ MODE +b \e$B$G;XDj$5$l$?%Q%?!<%s$N0lMw\e(B
+
+- invited
+ MODE +I \e$B$G;XDj$5$l$?%Q%?!<%s$N0lMw\e(B
+
+- uninvited
+ MODE +e \e$B$G;XDj$5$l$?%Q%?!<%s$N0lMw\e(B
+
+**** riece-user \e$B%*%V%8%'%/%H\e(B
+
+riece-user \e$B$O!"\e(BIRC \e$B$K;22C$7$F$$$k%f!<%6$rI=$9%*%V%8%'%/%H$G!"0J2<$NMW\e(B
+\e$BAG$r;}$A$^$9!#\e(B
+
+- channels
+ \e$B;22C$7$F$$$k%A%c%s%M%kL>$N%j%9%H\e(B
+
+- user-at-host
+ "<user>@<host>" \e$B$N7A$GM?$($i$l$k%f!<%6$N@\B3>pJs\e(B
+
+- modes
+ \e$B%f!<%6$N%b!<%I\e(B
+
+- away
+ \e$BN%@JCf$+$I$&$+\e(B
+
+**** Mediator \e$B%Q%?!<%s\e(B
+
+\e$B%A%c%s%M%k$X$N%f!<%6$N;22C!&N%C&$r4IM}$9$k$?$a$K!"\e(B riece-naming \e$B%b%8%e!<\e(B
+\e$B%k$r;H$$$^$9!#\e(Briece-naming \e$B$O!"%G%6%$%s%Q%?!<%s$G$$$&$H$3$m$N\e(B Mediator
+\e$B%Q%?!<%s$KAjEv$9$k$b$N$G$9!#\e(B
+
+riece-naming \e$B$r2p$9$k$3$H$G!"A0=R$N\e(B riece-channel, riece-user \e$B%*%V%8%'\e(B
+\e$B%/%H$rD>@\A`:n$9$k$3$H$J$/!"0BA4$KL>A06u4V$K%"%/%;%9$9$k$3$H$,$G$-$^$9!#\e(B
+
+riece-naming \e$B$,Ds6!$9$k<g$J4X?t$O0J2<$N\e(B 3 \e$B$D$G$9!#\e(B
+
+- riece-naming-assert-join user-name channel-name
+ \e$B%f!<%6$,%A%c%s%M%k$K;22C$7$?$3$H$rI=L@$7$^$9\e(B
+
+- riece-naming-assert-part user-name channel-name
+ \e$B%f!<%6$,%A%c%s%M%k$+$iN%C&$7$?$3$H$rI=L@$7$^$9\e(B
+
+- riece-naming-assert-rename old-name new-name
+ \e$B%f!<%6$NL>A0$,JQ99$5$l$?$3$H$rI=L@$7$^$9\e(B
+
+** \e$B%7%0%J%k\e(B
+
+\e$B%7%0%J%k$H$O!"2hLL$N:FIA2h$r8zN(NI$/9T$&$?$a$K!"%$%Y%s%H$HIA2hBP>]$N%*\e(B
+\e$B%V%8%'%/%H\e(B(\e$B%P%C%U%!$d!"%b!<%I%i%$%s$N0u\e(B)\e$B$r7k$SIU$1$k5!9=$G$9!#\e(B
+
+\e$B%&%#%s%I%&$N:FIA2h$rH<$&%$%Y%s%H$,H/@8$9$k$H!"%7%0%J%k$,Aw=P$5$l$^$9!#\e(B
+\e$B%7%0%J%k$N35G0$O!"\e(BQt \e$B$d\e(B GTK+ \e$B$H$$$C$?0lHLE*$J\e(B GUI \e$B%D!<%k%-%C%H$KMQ0U$5\e(B
+\e$B$l$F$$$k$b$N$HF1MM$G$9!#\e(B
+
+\e$B%7%0%J%k$rAw?.$9$k$K$O!"\e(Briece-emit-signal \e$B$r;H$$$^$9!#\e(B
+
+- riece-emit-signal signal-name &rest args
+ \e$B0z?t\e(B signal-name \e$B$G;X<($5$l$k%7%0%J%k$r!"0z?t\e(B args \e$B$H$H$b$KAw=P$7$^\e(B
+ \e$B$9\e(B
+
+\e$B%7%0%J%k$K1~Ez$9$k=hM}$O!"\e(Briece-connect-signal \e$B$r;H$C$FDj5A$7$^$9!#\e(B
+
+- riece-connect-signal signal-name slot-function &optional
+ filter-function handback
+
+ \e$B0z?t\e(B signal-name \e$B$G;XDj$5$l$?%7%0%J%k$K1~Ez$9$k4X?t\e(B slot-function \e$B$r\e(B
+ \e$B@_Dj$7$^$9!#\e(Bslot-function \e$B$K;XDj$5$l$?4X?t$O\e(B 2 \e$B$D$N0z?t$r<h$j$^$9!#\e(B
+ \e$B$R$H$D$O%7%0%J%k$G!"$b$&0l$D$O!"0z?t\e(B handback \e$B$GM?$($i$l$?%*%V%8%'%/\e(B
+ \e$B%H$,$=$N$^$^EO$5$l$^$9!#\e(B
+
+ \e$B0z?t\e(B filter-function \e$B$O!"<u?.$7$?%7%0%J%k$K1~Ez$9$Y$-$+$I$&$+$rH=Dj\e(B
+ \e$B$9$k4X?t$G$9!#$3$N4X?t$O0z?t$H$7$F%7%0%J%k%*%V%8%'%/%H$r<u$1<h$j!"\e(B
+ nil \e$B$^$?$O\e(B t \e$B$rJV$7$^$9!#JV$jCM$,\e(B nil \e$B$N>l9g$K$O!"\e(Bslot-function \e$B$O<B\e(B
+ \e$B9T$5$l$^$;$s!#\e(B
+
+\e$B%7%0%J%k%*%V%8%'%/%H$K%"%/%;%9$9$k$K$O!"0J2<$N4X?t$r;H$$$^$9!#\e(B
+
+- riece-signal-name signal
+ \e$B%7%0%J%k$NL>A0$rJV$7$^$9!#\e(B
+
+- riece-signal-args
+ \e$B%7%0%J%k$NAw?.;~$KM?$($i$l$?0z?t$rJV$7$^$9!#\e(B
+
+\e$B8=:_!"0J2<$N%7%0%J%k$,;HMQ$5$l$F$$$^$9!#\e(B
+
+- channel-list-changed
+ \e$B;22C$7$F$$$k%A%c%s%M%k$N0lMw$NJQ2=\e(B
+
+- user-list-changed
+ \e$B%A%c%s%M%k$N;22C<T0lMw$NJQ2=\e(B
+ (\e$B0z?t$O%A%c%s%M%k$KAjEv$9$k\e(B riece-identity \e$B%*%V%8%'%/%H\e(B)
+
+- channel-switched
+ \e$B8=:_$N%A%c%s%M%k$r0\F0\e(B
+
+- user-joined-channel
+ \e$B%f!<%6$,%A%c%s%M%k$K;22C\e(B
+ (\e$B0z?t$O!"%f!<%6$*$h$S%A%c%s%M%k$KAjEv$9$k\e(B riece-identity \e$B%*%V%8%'%/%H\e(B)
+
+- user-left-channel
+ \e$B%f!<%6$,%A%c%s%M%k$+$iN%C&\e(B
+ (\e$B0z?t$O!"%f!<%6$*$h$S%A%c%s%M%k$KAjEv$9$k\e(B riece-identity \e$B%*%V%8%'%/%H\e(B)
+
+- user-renamed
+ \e$B%f!<%6$,L>A0$rJQ99\e(B
+ (\e$B0z?t$O!"0JA0$H8=:_$NL>A0$KAjEv$9$k\e(B riece-identity \e$B%*%V%8%'%/%H\e(B)
+
+- user-away-changed
+ \e$B%f!<%6$NN%@J>uBV$NJQ2=\e(B
+ (\e$B0z?t$O!"%f!<%6$KAjEv$9$k\e(B riece-identity \e$B%*%V%8%'%/%H\e(B)
+
+- user-operator-changed
+ \e$B%f!<%6$N%*%Z%l!<%?>uBV$NJQ2=\e(B
+ (\e$B0z?t$O!"%f!<%6$KAjEv$9$k\e(B riece-identity \e$B%*%V%8%'%/%H\e(B)
+
+- channel-topic-changed
+ \e$B%A%c%s%M%k$N%H%T%C%/$NJQ2=\e(B
+ (\e$B0z?t$O!"%A%c%s%M%k$KAjEv$9$k\e(B riece-identity \e$B%*%V%8%'%/%H\e(B)
+
+- channel-modes-changed
+ \e$B%A%c%s%M%k$N%b!<%I$NJQ2=\e(B
+ (\e$B0z?t$O!"%A%c%s%M%k$KAjEv$9$k\e(B riece-identity \e$B%*%V%8%'%/%H\e(B)
+
+- channel-operators-changed
+ \e$B%A%c%s%M%k$G%*%Z%l!<%?8"8B$r;}$D%f!<%6$N0lMw$NJQ2=\e(B
+ (\e$B0z?t$O!"%A%c%s%M%k$KAjEv$9$k\e(B riece-identity \e$B%*%V%8%'%/%H\e(B)
+
+- channel-speakers-changed
+ \e$B%A%c%s%M%k$GH/8@8"$r;}$D%f!<%6$N0lMw$NJQ2=\e(B
+ (\e$B0z?t$O!"%A%c%s%M%k$KAjEv$9$k\e(B riece-identity \e$B%*%V%8%'%/%H\e(B)
+
+- buffer-freeze-changed
+ \e$B%P%C%U%!$NE`7k>uBV$NJQ2=\e(B
+ (\e$B0z?t$O%P%C%U%!\e(B)
+
+** \e$B%"%I%*%s$N=q$-J}\e(B
+
+\e$B%"%I%*%s$N>r7o$rK~$?$9%b%8%e!<%k$O0J2<$N4X?t$rDs6!$7$^$9!#\e(B
+
+- <\e$B%b%8%e!<%kL>\e(B>-requires (\e$B%*%W%7%g%s\e(B)
+ \e$B0MB8$9$kB>$N%"%I%*%s\e(B(\e$B%7%s%\%k$N%j%9%H\e(B)\e$B$rJV$7$^$9\e(B
+
+- <\e$B%b%8%e!<%kL>\e(B>-insinuate
+ \e$B=i4|2==hM}$r9T$$$^$9\e(B
+
+- <\e$B%b%8%e!<%kL>\e(B>-uninstall (\e$B%*%W%7%g%s\e(B)
+ \e$B%"%I%*%s$r%"%s%$%s%9%H!<%k$9$k$H8F$P$l$^$9\e(B
+
+- <\e$B%b%8%e!<%kL>\e(B>-enable (\e$B%*%W%7%g%s\e(B)
+ \e$B%"%I%*%s$NM-8z$K$9$k$H8F$P$l$^$9\e(B
+
+- <\e$B%b%8%e!<%kL>\e(B>-disable (\e$B%*%W%7%g%s\e(B)
+ \e$B%"%I%*%s$NL58z$K$9$k$H8F$P$l$^$9\e(B
+
+\e$B$^$?!"%"%I%*%s$N4JC1$J@bL@$r!"JQ?t\e(B <\e$B%b%8%e!<%kL>\e(B>-description \e$B$K@_Dj$9\e(B
+\e$B$k$HNI$$$G$7$g$&!#$3$NJ8;zNs$O\e(B C-c ^ (M-x riece-command-list-addons)
+\e$B$K$h$k%"%I%*%s$N0lMw$GI=<($5$l$^$9!#\e(B
+
+\e$B%"%I%*%s$NM-8z!&L58z$N>uBV$O!"\e(B<\e$B%b%8%e!<%kL>\e(B> \e$B$N%7%s%\%k$K\e(B
+\e$BIUM?$5$l$k\e(B riece-addon-enabled \e$B%W%m%Q%F%#$GD4$Y$k$3$H$,$G$-$^$9!#\e(B
+
+Riece \e$B$O5/F0;~$K0J2<$N=hM}$r9T$$$^$9!#\e(B
+
+(1) \e$BJQ?t\e(B riece-addons \e$B$KNs5s$5$l$?%b%8%e!<%k$rFI$_9~$`\e(B
+
+(2) \e$B$=$l$>$l$N%b%8%e!<%k$KBP$7!"\e(B<\e$B%b%8%e!<%kL>\e(B>-requires \e$B$,MQ0U\e(B
+ \e$B$5$l$F$$$l$P8F$S=P$7!"0MB8%0%i%U$r:n$k\e(B
+
+(3) \e$B0MB8%0%i%U$KBP$7$F%H%]%m%8%+%k%=!<%H$r9T$&\e(B
+
+(4) \e$BF@$i$l$?0MB8=g=x$K=>$C$F\e(B <\e$B%b%8%e!<%kL>\e(B>-insinuate \e$B8F$S=P$9\e(B
+
+(5) \e$B$b$7!"%"%I%*%s$,M-8z2=!&L58z2=$KBP1~$7$F$*$j!"L@<(E*$KL58z2=$5$l$F\e(B
+ \e$B$$$J$1$l$P!"\e(B<\e$B%b%8%e!<%kL>\e(B>-enable \e$B$r8F$S=P$9!#\e(B
+
+\e$B:n@.$7$?%"%I%*%s$O!"\e(Bload-path \e$B$NDL$C$?%G%#%l%/%H%j$+!"\e(B
+~/.riece/addons/ \e$B0J2<$KG[CV$9$k$HAH$_9~$_2DG=$J>uBV$K$J$j$^$9!#\e(B
+
+** \e$B%O%s%I%i%U%C%/\e(B
+
+Riece \e$B$K$O!"%O%s%I%i%U%C%/$H8F$P$l$kFCJL$J0UL#$r;}$D%U%C%/$,$"$j$^$9!#\e(B
+\e$B%O%s%I%i%U%C%/$O\e(B IRC \e$B$N%a%C%;!<%8$r<u$1<h$C$?A08e$G<B9T$5$l$^$9!#\e(B
+
+<message> \e$B$r\e(B IRC \e$B$N%a%C%;!<%8$r>.J8;z$K$7$?$b$N$H$9$k$H!"%O%s%I%i%U%C\e(B
+\e$B%/$O<!$NFs$D$G$9!#\e(B
+
+- riece-<message>-hook
+ \e$B%a%C%;!<%8$,FO$$$?$H$-$K:G=i$K8F$P$l$k%U%C%/\e(B
+
+- riece-after-<message>-hook
+ \e$B%a%C%;!<%8$N=hM}$,=*$o$C$?8e$K8F$P$l$k%U%C%/\e(B
+
+\e$BNc$($P!"\e(BPRIVMSG \e$B$K4X$7$F$O!"\e(Briece-privmsg-hook,
+riece-after-privmsg-hook \e$B$NFs$D$N%U%C%/$,8F$P$l$^$9!#\e(B
+
+\e$B$3$3$G\e(B riece-<message>-hook \e$B$NJV$jCM$K$O0UL#$,$"$j!"\e(Bt \e$B$rJV$9$b$N$,$"$l\e(B
+\e$B$P!"$=$N8e$N=hM}$r$*$3$J$$$^$;$s!#$^$?!"$=$N>l9g$K$O\e(B
+riece-after-<message>-hook \e$B$b8F$S=P$5$l$^$;$s!#\e(B
+
+\e$B%U%C%/$N0z?t$K$O\e(B RFC2812 \e$B$N\e(B prefix \e$B$H\e(B parameters \e$B$,EO$j$^$9!#\e(B
--- /dev/null
+;;; ptexinfmt.el -- portable Texinfo formatter. -*- lexical-binding: t -*-
+
+;; Copyright (C) 1985, 1986, 1988, 1990, 1991, 1992, 1993,
+;; 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
+;; Copyright (C) 1999 Yoshiki Hayashi <yoshiki@xemacs.org>
+;; Copyright (C) 2000 TAKAHASHI Kaoru <kaoru@kaisei.org>
+
+;; Author: TAKAHASHI Kaoru <kaoru@kaisei.org>
+;; Yoshiki Hayashi <yoshiki@xemacs.org>
+;; Katsumi Yamaoka <yamaoka@jpl.org>
+;; Maintainer: TAKAHASHI Kaoru <kaoru@kaisei.org>
+;; Created: 7 Jul 2000
+;; Keywords: maint, tex, docs, emulation, compatibility
+
+;; 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., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
+
+;;; Commentary:
+
+;; Original code: Yoshiki Hayashi <yoshiki@xemacs.org>
+;; makeinfo.el (gnujdoc project)
+
+;; Support texinfmt.el 2.32 or later.
+
+;; Modified by Yamaoka not to use APEL functions.
+
+;; Unimplemented command:
+;; @abbr{ABBREVIATION}
+;; @float ... @end float, @caption{TEXT}, @shortcaption{TEXT}, @listoffloats
+;; @deftypecv[x]
+;; @headitem
+;; @comma{}
+;; @quotation (optional arguments)
+;; @acronym{ACRONYM[, MEANING]} (optional argument)
+;; @dofirstparagraphindent
+;; @indent
+;; @verbatiminclude FILENAME
+;; @\
+;; @definfoenclose phoo,//,\\
+;; @deftypeivar CLASS DATA-TYPE VARIABLE-NAME
+;; @deftypeop CATEGORY CLASS DATA-TYPE NAME ARGUMENTS...
+;; @allowcodebreaks false
+;; @thischapternum
+;; @quotedblleft @quotedblright
+;; @quoteleft @quoteright @quotedblbase @quotesinglbase
+;; @guillemetleft @guillemetright @guilsinglleft @guilsinglright.
+;; @clicksequence, @click, @clickstyle, @arrow
+
+;;; Code:
+
+(require 'texinfmt)
+
+;;; Broken
+(defvar ptexinfmt-disable-broken-notice-flag t
+ "If non-nil disable notice, when call `ptexinfmt-broken-facility'.
+This is last argument in `ptexinfmt-broken-facility'.")
+
+(put 'ptexinfmt-broken-facility 'lisp-indent-function 'defun)
+(defmacro ptexinfmt-broken-facility (facility docstring assertion
+ &optional _dummy)
+ "Declare a symbol FACILITY is broken if ASSERTION is nil.
+DOCSTRING will be printed if ASSERTION is nil and
+`ptexinfmt-disable-broken-notice-flag' is nil."
+ `(let ((facility ',facility)
+ (docstring ,docstring)
+ (assertion (eval ',assertion)))
+ (put facility 'broken (not assertion))
+ (if assertion
+ nil
+ (put facility 'broken-docstring docstring)
+ (if ptexinfmt-disable-broken-notice-flag
+ nil
+ (message "BROKEN FACILITY DETECTED: %s" docstring)))))
+
+(put 'ptexinfmt-defun-if-broken 'lisp-indent-function 'defun)
+(defmacro ptexinfmt-defun-if-broken (&rest args)
+ "Redefine a function just like `defun' if it is considered broken."
+ (let ((name (list 'quote (car args))))
+ (setq args (cdr args))
+ `(prog1
+ ,name
+ (if (get ,name 'broken)
+ (defalias ,name
+ (function (lambda ,@args)))))))
+
+(put 'ptexinfmt-defun-if-void 'lisp-indent-function 'defun)
+(defmacro ptexinfmt-defun-if-void (&rest args)
+ "Define a function just like `defun' unless it is already defined."
+ (let ((name (list 'quote (car args))))
+ (setq args (cdr args))
+ `(prog1
+ ,name
+ (if (fboundp ,name)
+ nil
+ (defalias ,name
+ (function (lambda ,@args)))))))
+
+(put 'ptexinfmt-defvar-if-void 'lisp-indent-function 'defun)
+(defmacro ptexinfmt-defvar-if-void (&rest args)
+ "Define a variable just like `defvar' unless it is already defined."
+ (let ((name (car args)))
+ (setq args (cdr args))
+ `(prog1
+ (defvar ,name)
+ (if (boundp ',name)
+ nil
+ (defvar ,name ,@args)))))
+
+;; sort -fd
+(ptexinfmt-broken-facility texinfo-format-printindex
+ "Can't sort on Mule for Windows."
+ (if (and (memq system-type '(windows-nt ms-dos))
+;;; I don't know version threshold.
+;;; (string< texinfmt-version "2.37 of 24 May 1997")
+ (boundp 'MULE) (not (featurep 'meadow))) ; Mule for Windows
+ nil
+ t))
+
+;; @var{METASYNTACTIC-VARIABLE}
+(defvar texinfo-enclosure-list)
+(defvar texinfo-alias-list)
+(ptexinfmt-broken-facility texinfo-format-var
+ "Don't perse @var argument."
+ (condition-case nil
+ (with-temp-buffer
+ (let (texinfo-enclosure-list texinfo-alias-list)
+ (texinfo-mode)
+ (insert "@var{@asis{foo}}\n")
+ (texinfo-format-expand-region (point-min) (point-max))
+ t))
+ (error nil)))
+
+;; @xref{NODE-NAME[, CROSS-REFERENCE-NAME, TITLE-OR-TOPIC,
+;; INFO-FILE-NAME, PRINTED-MANUAL-TITLE]}.
+(ptexinfmt-broken-facility texinfo-format-xref
+ "Can't format @xref, 1st argument is empty."
+ (condition-case nil
+ (with-temp-buffer
+ (let (texinfo-enclosure-list texinfo-alias-list)
+ (texinfo-mode)
+ (insert "@xref{, xref, , file}\n")
+ (texinfo-format-expand-region (point-min) (point-max))
+ t))
+ (error nil)))
+
+;; @uref{URL[, TEXT][, REPLACEMENT]}
+(ptexinfmt-broken-facility texinfo-format-uref
+ "Parse twice @uref argument."
+ (condition-case nil
+ (with-temp-buffer
+ (let (texinfo-enclosure-list texinfo-alias-list)
+ (texinfo-mode)
+ (insert "@uref{mailto:foo@@noncommand.example.com}\n")
+ (texinfo-format-expand-region (point-min) (point-max))
+ t))
+ (error nil)))
+
+;; @multitable
+(ptexinfmt-broken-facility texinfo-multitable-widths
+ "`texinfo-multitable-widths' unsupport wide-char."
+ (if (fboundp 'texinfo-multitable-widths)
+ (with-temp-buffer
+ (let ((str (string (make-char 'japanese-jisx0208 73 125)
+ (make-char 'japanese-jisx0208 57 45)
+ (make-char 'japanese-jisx0208 74 56)
+ (make-char 'japanese-jisx0208 59 122))))
+ (texinfo-mode)
+ (insert (format " {%s}\n" str))
+ (goto-char (point-min))
+ (if (= (car (texinfo-multitable-widths)) (length str))
+ t
+ nil)))
+ ;; function definition is void
+ nil))
+
+(ptexinfmt-broken-facility texinfo-multitable-item
+ "`texinfo-multitable-item' unsupport wide-char."
+ (not (get 'texinfo-multitable-widths 'broken)))
+
+
+;;; Hardcopy and HTML (discard)
+;; html
+(put 'documentlanguage 'texinfo-format 'texinfo-discard-line-with-args)
+(put 'documentencoding 'texinfo-format 'texinfo-discard-line-with-args)
+(put 'documentdescription 'texinfo-format 'texinfo-discard-line-with-args)
+
+;; size
+(put 'smallbook 'texinfo-format 'texinfo-discard-line)
+(put 'letterpaper 'texinfo-format 'texinfo-discard-line)
+(put 'afourpaper 'texinfo-format 'texinfo-discard-line)
+(put 'afourlatex 'texinfo-format 'texinfo-discard-line)
+(put 'afourwide 'texinfo-format 'texinfo-discard-line)
+(put 'afivepaper 'texinfo-format 'texinfo-discard-line)
+(put 'pagesizes 'texinfo-format 'texinfo-discard-line-with-args)
+(put 'fonttextsize 'texinfo-format 'texinfo-discard-line-with-args)
+
+;; style
+(put 'setchapternewpage 'texinfo-format 'texinfo-discard-line-with-args)
+(put 'kbdinputstyle 'texinfo-format 'texinfo-discard-line-with-args)
+
+;; flags
+(put 'setcontentsaftertitlepage 'texinfo-format 'texinfo-discard-line)
+(put 'setshortcontentsaftertitlepage 'texinfo-format 'texinfo-discard-line)
+(put 'novalidate 'texinfo-format 'texinfo-discard-line-with-args)
+(put 'frenchspacing 'texinfo-format 'texinfo-discard-line-with-args)
+
+;; head & foot
+(put 'headings 'texinfo-format 'texinfo-discard-line-with-args)
+(put 'evenfooting 'texinfo-format 'texinfo-discard-line-with-args)
+(put 'evenheading 'texinfo-format 'texinfo-discard-line-with-args)
+(put 'oddfooting 'texinfo-format 'texinfo-discard-line-with-args)
+(put 'oddheading 'texinfo-format 'texinfo-discard-line-with-args)
+(put 'everyfooting 'texinfo-format 'texinfo-discard-line-with-args)
+(put 'everyheading 'texinfo-format 'texinfo-discard-line-with-args)
+
+;; misc
+(put 'page 'texinfo-format 'texinfo-discard-line)
+(put 'hyphenation 'texinfo-format 'texinfo-discard-command-and-arg)
+
+;; @slanted{TEXT} (makeinfo 4.8 or later)
+(put 'slanted 'texinfo-format 'texinfo-format-noop)
+
+;; @sansserif{TEXT} (makeinfo 4.8 or later)
+(put 'sansserif 'texinfo-format 'texinfo-format-noop)
+
+;; @tie{} (makeinfo 4.3 or later)
+(put 'tie 'texinfo-format 'texinfo-format-tie)
+(ptexinfmt-defun-if-void texinfo-format-tie ()
+ (texinfo-parse-arg-discard)
+ (insert " "))
+
+\f
+;;; Directory File
+;; @direcategory DIRPART
+(put 'dircategory 'texinfo-format 'texinfo-format-dircategory)
+(ptexinfmt-defun-if-void texinfo-format-dircategory ()
+ (let ((str (texinfo-parse-arg-discard)))
+ (delete-region (point)
+ (progn
+ (skip-chars-forward " ")
+ (point)))
+ (insert "INFO-DIR-SECTION " str "\n")))
+
+;; @direntry ... @end direntry
+(put 'direntry 'texinfo-format 'texinfo-format-direntry)
+(ptexinfmt-defun-if-void texinfo-format-direntry ()
+ (texinfo-push-stack 'direntry nil)
+ (texinfo-discard-line)
+ (insert "START-INFO-DIR-ENTRY\n"))
+
+(put 'direntry 'texinfo-end 'texinfo-end-direntry)
+(ptexinfmt-defun-if-void texinfo-end-direntry ()
+ (texinfo-discard-command)
+ (insert "END-INFO-DIR-ENTRY\n\n")
+ (texinfo-pop-stack 'direntry))
+
+
+;;; Block Enclosing
+;; @detailmenu ... @end detailmenu
+(put 'detailmenu 'texinfo-format 'texinfo-discard-line)
+(put 'detailmenu 'texinfo-end 'texinfo-discard-command)
+
+;; @smalldisplay ... @end smalldisplay
+(put 'smalldisplay 'texinfo-format 'texinfo-format-example)
+(put 'smalldisplay 'texinfo-end 'texinfo-end-example)
+
+;; @smallformat ... @end smallformat
+(put 'smallformat 'texinfo-format 'texinfo-format-flushleft)
+(put 'smallformat 'texinfo-end 'texinfo-end-flushleft)
+
+;; @cartouche ... @end cartouche
+(put 'cartouche 'texinfo-format 'texinfo-discard-line)
+(put 'cartouche 'texinfo-end 'texinfo-discard-command)
+
+
+;;; Conditional
+;; @ifnottex ... @end ifnottex (makeinfo 3.11 or later)
+(put 'ifnottex 'texinfo-format 'texinfo-discard-line)
+(put 'ifnottex 'texinfo-end 'texinfo-discard-command)
+
+;; @ifnothtml ... @end ifnothtml (makeinfo 3.11 or later)
+(put 'ifnothtml 'texinfo-format 'texinfo-discard-line)
+(put 'ifnothtml 'texinfo-end 'texinfo-discard-command)
+
+;; @ifnotplaintext ... @end ifnotplaintext (makeinfo 4.2 or later)
+(put 'ifnotplaintext 'texinfo-format 'texinfo-discard-line)
+(put 'ifnotplaintext 'texinfo-end 'texinfo-discard-command)
+
+;; @ifnotdocbook ... @end ifnotdocbook (makeinfo 4.7 or later)
+(put 'ifnotdocbook 'texinfo-format 'texinfo-discard-line)
+(put 'ifnotdocbook 'texinfo-end 'texinfo-discard-command)
+
+;; @ifnotinfo ... @end ifnotinfo (makeinfo 3.11 or later)
+(put 'ifnotinfo 'texinfo-format 'texinfo-format-ifnotinfo)
+(ptexinfmt-defun-if-void texinfo-format-ifnotinfo ()
+ (delete-region texinfo-command-start
+ (progn (re-search-forward "@end ifnotinfo[ \t]*\n")
+ (point))))
+
+;; @html ... @end html (makeinfo 3.11 or later)
+(put 'html 'texinfo-format 'texinfo-format-html)
+(ptexinfmt-defun-if-void texinfo-format-html ()
+ (delete-region texinfo-command-start
+ (progn (re-search-forward "@end html[ \t]*\n")
+ (point))))
+
+;; @docbook ... @end docbook (makeinfo 4.7 or later)
+(put 'docbook 'texinfo-format 'texinfo-format-docbook)
+(ptexinfmt-defun-if-void texinfo-format-docbook ()
+ (delete-region texinfo-command-start
+ (progn (re-search-forward "@end docbook[ \t]*\n")
+ (point))))
+
+;; @ifhtml ... @end ifhtml (makeinfo 3.8 or later)
+(put 'ifhtml 'texinfo-format 'texinfo-format-ifhtml)
+(defun texinfo-format-ifhtml ()
+ (delete-region texinfo-command-start
+ (progn (re-search-forward "@end ifhtml[ \t]*\n")
+ (point))))
+
+;; @ifplaintext ... @end ifplaintext (makeinfo 4.2 or later)
+(put 'ifplaintext 'texinfo-format 'texinfo-format-ifplaintext)
+(ptexinfmt-defun-if-void texinfo-format-ifplaintext ()
+ (delete-region texinfo-command-start
+ (progn (re-search-forward "@end ifplaintext[ \t]*\n")
+ (point))))
+
+;; @ifdocbook ... @end ifdocbook (makeinfo 4.7 or later)
+(put 'ifdocbook 'texinfo-format 'texinfo-format-ifdocbook)
+(ptexinfmt-defun-if-void texinfo-format-ifdocbook ()
+ (delete-region texinfo-command-start
+ (progn (re-search-forward "@end ifdocbook[ \t]*\n")
+ (point))))
+
+\f
+;;; Marking
+;; @env{ENVIRONMENT-VARIABLE}
+(put 'env 'texinfo-format 'texinfo-format-code)
+
+;; @command{COMMAND-NAME}
+(put 'command 'texinfo-format 'texinfo-format-code)
+
+;; @indicateurl{INDICATEURL}
+(put 'indicateurl 'texinfo-format 'texinfo-format-code)
+
+;; @url{URL[, DISPLAYED-TEXT][, REPLACEMENT}
+(put 'url 'texinfo-format 'texinfo-format-uref) ; Texinfo 4.7
+
+;; @acronym{ACRONYM}
+(put 'acronym 'texinfo-format 'texinfo-format-var)
+
+;; @var{METASYNTACTIC-VARIABLE}
+(ptexinfmt-defun-if-broken texinfo-format-var ()
+ (let ((arg (texinfo-parse-expanded-arg)))
+ (texinfo-discard-command)
+ (insert (upcase arg))))
+
+;; @key{KEY-NAME}
+(put 'key 'texinfo-format 'texinfo-format-key)
+(ptexinfmt-defun-if-void texinfo-format-key ()
+ (insert (texinfo-parse-arg-discard))
+ (goto-char texinfo-command-start))
+
+;; @email{EMAIL-ADDRESS[, DISPLAYED-TEXT]}
+(put 'email 'texinfo-format 'texinfo-format-email)
+(ptexinfmt-defun-if-void texinfo-format-email ()
+ "Format EMAIL-ADDRESS and optional DISPLAYED-TXT.
+Insert < ... > around EMAIL-ADDRESS."
+ (let ((args (texinfo-format-parse-args)))
+ (texinfo-discard-command)
+ ;; if displayed-text
+ (if (nth 1 args)
+ (insert (nth 1 args) " <" (nth 0 args) ">")
+ (insert "<" (nth 0 args) ">"))))
+
+;; @option{OPTION-NAME}
+(put 'option 'texinfo-format 'texinfo-format-option)
+(ptexinfmt-defun-if-void texinfo-format-option ()
+ "Insert ` ... ' around arg unless inside a table; in that case, no quotes."
+ ;; `looking-at-backward' not available in v. 18.57, 20.2
+ ;; searched-for character is a control-H
+ (if (not (search-backward "\010"
+ (save-excursion (beginning-of-line) (point))
+ t))
+ (insert "`" (texinfo-parse-arg-discard) "'")
+ (insert (texinfo-parse-arg-discard)))
+ (goto-char texinfo-command-start))
+
+;; @verb{<char>TEXT<char>} (makeinfo 4.1 or later)
+(put 'verb 'texinfo-format 'texinfo-format-verb)
+(ptexinfmt-defun-if-void texinfo-format-verb ()
+ "Format text between non-quoted unique delimiter characters verbatim.
+Enclose the verbatim text, including the delimiters, in braces. Print
+text exactly as written (but not the delimiters) in a fixed-width.
+
+For example, @verb\{|@|\} results in @ and
+@verb\{+@'e?`!`+} results in @'e?`!`."
+
+ (let ((delimiter (buffer-substring-no-properties
+ (1+ texinfo-command-end) (+ 2 texinfo-command-end))))
+ (unless (looking-at "{")
+ (error "Not found: @verb start brace"))
+ (delete-region texinfo-command-start (+ 2 texinfo-command-end))
+ (search-forward delimiter))
+ (delete-char -1)
+ (unless (looking-at "}")
+ (error "Not found: @verb end brace"))
+ (delete-char 1))
+
+\f
+;; @LaTeX{}
+(put 'LaTeX 'texinfo-format 'texinfo-format-LaTeX)
+(ptexinfmt-defun-if-void texinfo-format-LaTeX ()
+ (texinfo-parse-arg-discard)
+ (insert "LaTeX"))
+
+;; @registeredsymbol{}
+(put 'registeredsymbol 'texinfo-format 'texinfo-format-registeredsymbol)
+(ptexinfmt-defun-if-void texinfo-format-registeredsymbol ()
+ (texinfo-parse-arg-discard)
+ (insert "(R)"))
+
+;;; Accents and Special characters
+;; @euro{} ==> Euro
+(put 'euro 'texinfo-format 'texinfo-format-euro)
+(ptexinfmt-defun-if-void texinfo-format-euro ()
+ (texinfo-parse-arg-discard)
+ (insert "Euro "))
+
+;; @pounds{} ==> # Pounds Sterling
+(put 'pounds 'texinfo-format 'texinfo-format-pounds)
+(ptexinfmt-defun-if-void texinfo-format-pounds ()
+ (texinfo-parse-arg-discard)
+ (insert "#"))
+
+;; @ordf{} ==> a Spanish feminine
+(put 'ordf 'texinfo-format 'texinfo-format-ordf)
+(ptexinfmt-defun-if-void texinfo-format-ordf ()
+ (texinfo-parse-arg-discard)
+ (insert "a"))
+
+;; @ordm{} ==> o Spanish masculine
+(put 'ordm 'texinfo-format 'texinfo-format-ordm)
+(ptexinfmt-defun-if-void texinfo-format-ordm ()
+ (texinfo-parse-arg-discard)
+ (insert "o"))
+
+;; @OE{} ==> OE French-OE-ligature
+(put 'OE 'texinfo-format 'texinfo-format-French-OE-ligature)
+(ptexinfmt-defun-if-void texinfo-format-French-OE-ligature ()
+ (insert "OE" (texinfo-parse-arg-discard))
+ (goto-char texinfo-command-start))
+
+;; @oe{} ==> oe
+(put 'oe 'texinfo-format 'texinfo-format-French-oe-ligature)
+(ptexinfmt-defun-if-void texinfo-format-French-oe-ligature () ; lower case
+ (insert "oe" (texinfo-parse-arg-discard))
+ (goto-char texinfo-command-start))
+
+;; @AA{} ==> AA Scandinavian-A-with-circle
+(put 'AA 'texinfo-format 'texinfo-format-Scandinavian-A-with-circle)
+(ptexinfmt-defun-if-void texinfo-format-Scandinavian-A-with-circle ()
+ (insert "AA" (texinfo-parse-arg-discard))
+ (goto-char texinfo-command-start))
+
+;; @aa{} ==> aa
+(put 'aa 'texinfo-format 'texinfo-format-Scandinavian-a-with-circle)
+(ptexinfmt-defun-if-void texinfo-format-Scandinavian-a-with-circle () ; lower case
+ (insert "aa" (texinfo-parse-arg-discard))
+ (goto-char texinfo-command-start))
+
+;; @AE{} ==> AE Latin-Scandinavian-AE
+(put 'AE 'texinfo-format 'texinfo-format-Latin-Scandinavian-AE)
+(ptexinfmt-defun-if-void texinfo-format-Latin-Scandinavian-AE ()
+ (insert "AE" (texinfo-parse-arg-discard))
+ (goto-char texinfo-command-start))
+
+;; @ae{} ==> ae
+(put 'ae 'texinfo-format 'texinfo-format-Latin-Scandinavian-ae)
+(ptexinfmt-defun-if-void texinfo-format-Latin-Scandinavian-ae () ; lower case
+ (insert "ae" (texinfo-parse-arg-discard))
+ (goto-char texinfo-command-start))
+
+;; @ss{} ==> ss German-sharp-S
+(put 'ss 'texinfo-format 'texinfo-format-German-sharp-S)
+(ptexinfmt-defun-if-void texinfo-format-German-sharp-S ()
+ (insert "ss" (texinfo-parse-arg-discard))
+ (goto-char texinfo-command-start))
+
+;; @questiondown{} ==> ? upside-down-question-mark
+(put 'questiondown 'texinfo-format 'texinfo-format-upside-down-question-mark)
+(ptexinfmt-defun-if-void texinfo-format-upside-down-question-mark ()
+ (insert "?" (texinfo-parse-arg-discard))
+ (goto-char texinfo-command-start))
+
+;; @exclamdown{} ==> ! upside-down-exclamation-mark
+(put 'exclamdown 'texinfo-format 'texinfo-format-upside-down-exclamation-mark)
+(ptexinfmt-defun-if-void texinfo-format-upside-down-exclamation-mark ()
+ (insert "!" (texinfo-parse-arg-discard))
+ (goto-char texinfo-command-start))
+
+;; @L{} ==> L/ Polish suppressed-L (Lslash)
+(put 'L 'texinfo-format 'texinfo-format-Polish-suppressed-L)
+(ptexinfmt-defun-if-void texinfo-format-Polish-suppressed-L ()
+ (insert (texinfo-parse-arg-discard) "/L")
+ (goto-char texinfo-command-start))
+
+;; @l{} ==> l/ Polish suppressed-L (Lslash) (lower case)
+(put 'l 'texinfo-format 'texinfo-format-Polish-suppressed-l-lower-case)
+(ptexinfmt-defun-if-void texinfo-format-Polish-suppressed-l-lower-case ()
+ (insert (texinfo-parse-arg-discard) "/l")
+ (goto-char texinfo-command-start))
+
+;; @O{} ==> O/ Scandinavian O-with-slash
+(put 'O 'texinfo-format 'texinfo-format-Scandinavian-O-with-slash)
+(ptexinfmt-defun-if-void texinfo-format-Scandinavian-O-with-slash ()
+ (insert (texinfo-parse-arg-discard) "O/")
+ (goto-char texinfo-command-start))
+
+;; @o{} ==> o/ Scandinavian O-with-slash (lower case)
+(put 'o 'texinfo-format 'texinfo-format-Scandinavian-o-with-slash-lower-case)
+(ptexinfmt-defun-if-void texinfo-format-Scandinavian-o-with-slash-lower-case ()
+ (insert (texinfo-parse-arg-discard) "o/")
+ (goto-char texinfo-command-start))
+
+;; @,{c} ==> c, cedilla accent
+(put '\, 'texinfo-format 'texinfo-format-cedilla-accent)
+(ptexinfmt-defun-if-void texinfo-format-cedilla-accent ()
+ (insert (texinfo-parse-arg-discard) ",")
+ (goto-char texinfo-command-start))
+
+
+;; @dotaccent{o} ==> .o overdot-accent
+(put 'dotaccent 'texinfo-format 'texinfo-format-overdot-accent)
+(ptexinfmt-defun-if-void texinfo-format-overdot-accent ()
+ (insert "." (texinfo-parse-arg-discard))
+ (goto-char texinfo-command-start))
+
+;; @ubaraccent{o} ==> _o underbar-accent
+(put 'ubaraccent 'texinfo-format 'texinfo-format-underbar-accent)
+(ptexinfmt-defun-if-void texinfo-format-underbar-accent ()
+ (insert "_" (texinfo-parse-arg-discard))
+ (goto-char texinfo-command-start))
+
+;; @udotaccent{o} ==> o-. underdot-accent
+(put 'udotaccent 'texinfo-format 'texinfo-format-underdot-accent)
+(ptexinfmt-defun-if-void texinfo-format-underdot-accent ()
+ (insert (texinfo-parse-arg-discard) "-.")
+ (goto-char texinfo-command-start))
+
+;; @H{o} ==> ""o long Hungarian umlaut
+(put 'H 'texinfo-format 'texinfo-format-long-Hungarian-umlaut)
+(ptexinfmt-defun-if-void texinfo-format-long-Hungarian-umlaut ()
+ (insert "\"\"" (texinfo-parse-arg-discard))
+ (goto-char texinfo-command-start))
+
+;; @ringaccent{o} ==> *o ring accent
+(put 'ringaccent 'texinfo-format 'texinfo-format-ring-accent)
+(ptexinfmt-defun-if-void texinfo-format-ring-accent ()
+ (insert "*" (texinfo-parse-arg-discard))
+ (goto-char texinfo-command-start))
+
+;; @tieaccent{oo} ==> [oo tie after accent
+(put 'tieaccent 'texinfo-format 'texinfo-format-tie-after-accent)
+(ptexinfmt-defun-if-void texinfo-format-tie-after-accent ()
+ (insert "[" (texinfo-parse-arg-discard))
+ (goto-char texinfo-command-start))
+
+;; @u{o} ==> (o breve accent
+(put 'u 'texinfo-format 'texinfo-format-breve-accent)
+(ptexinfmt-defun-if-void texinfo-format-breve-accent ()
+ (insert "(" (texinfo-parse-arg-discard))
+ (goto-char texinfo-command-start))
+
+;; @v{o} ==> <o hacek accent
+(put 'v 'texinfo-format 'texinfo-format-hacek-accent)
+(ptexinfmt-defun-if-void texinfo-format-hacek-accent ()
+ (insert "<" (texinfo-parse-arg-discard))
+ (goto-char texinfo-command-start))
+
+;; @dotless{i} ==> i dotless i and dotless j
+(put 'dotless 'texinfo-format 'texinfo-format-dotless)
+(ptexinfmt-defun-if-void texinfo-format-dotless ()
+ (insert (texinfo-parse-arg-discard))
+ (goto-char texinfo-command-start))
+
+;; @.
+(put '\. 'texinfo-format 'texinfo-format-\.)
+(ptexinfmt-defun-if-void texinfo-format-\. ()
+ (texinfo-discard-command)
+ (insert "."))
+
+;; @:
+(put '\: 'texinfo-format 'texinfo-format-\:)
+(ptexinfmt-defun-if-void texinfo-format-\: ()
+ (texinfo-discard-command))
+
+;; @-
+(put '\- 'texinfo-format 'texinfo-format-soft-hyphen)
+(ptexinfmt-defun-if-void texinfo-format-soft-hyphen ()
+ (texinfo-discard-command))
+
+;; @/
+(put '\/ 'texinfo-format 'texinfo-format-\/)
+(ptexinfmt-defun-if-void texinfo-format-\/ ()
+ (texinfo-discard-command))
+
+;; @textdegree{}
+(put 'textdegree 'texinfo-format 'texinfo-format-textdegree)
+(ptexinfmt-defun-if-void texinfo-format-textdegree ()
+ (insert "o" (texinfo-parse-arg-discard))
+ (goto-char texinfo-command-start))
+
+;; @geq{}
+(put 'geq 'texinfo-format 'texinfo-format-geq)
+(ptexinfmt-defun-if-void texinfo-format-geq ()
+ (insert ">=" (texinfo-parse-arg-discard))
+ (goto-char texinfo-command-start))
+
+;; @leq{}
+(put 'leq 'texinfo-format 'texinfo-format-leq)
+(ptexinfmt-defun-if-void texinfo-format-leq ()
+ (insert "<=" (texinfo-parse-arg-discard))
+ (goto-char texinfo-command-start))
+
+\f
+;;; Cross References
+;; @ref{NODE-NAME, ...}
+;; @xref{NODE-NAME, ...}
+(put 'ref 'texinfo-format 'texinfo-format-xref)
+
+(ptexinfmt-defun-if-broken texinfo-format-xref ()
+ (let ((args (texinfo-format-parse-args)))
+ (texinfo-discard-command)
+ (insert "*Note ")
+ (let ((fname (or (nth 1 args) (nth 2 args))))
+ (if (null (or fname (nth 3 args)))
+ (insert (nth 0 args) "::")
+ (insert (or fname (nth 0 args)) ": ")
+ (if (nth 3 args)
+ (insert "(" (nth 3 args) ")"))
+ (unless (null (nth 0 args))
+ (insert (nth 0 args)))))))
+
+;; @uref{URL [,TEXT] [,REPLACEMENT]}
+(put 'uref 'texinfo-format 'texinfo-format-uref)
+(ptexinfmt-defun-if-broken texinfo-format-uref ()
+ "Format URL and optional URL-TITLE.
+Insert ` ... ' around URL if no URL-TITLE argument;
+otherwise, insert URL-TITLE followed by URL in parentheses."
+ (let ((args (texinfo-format-parse-args)))
+ (texinfo-discard-command)
+ ;; if url-title
+ (if (nth 1 args)
+ (insert (nth 1 args) " (" (nth 0 args) ")")
+ (insert "`" (nth 0 args) "'"))))
+
+;; @inforef{NODE-NAME, CROSS-REFERENCE-NAME, INFO-FILE-NAME}
+(put 'inforef 'texinfo-format 'texinfo-format-inforef)
+(ptexinfmt-defun-if-void texinfo-format-inforef ()
+ (let ((args (texinfo-format-parse-args)))
+ (texinfo-discard-command)
+ (if (nth 1 args)
+ (insert "*Note " (nth 1 args) ": (" (nth 2 args) ")" (car args))
+ (insert "*Note " "(" (nth 2 args) ")" (car args) "::"))))
+
+
+;; @anchor{NAME}
+;; don't emulation
+;; If support @anchor for Mule 2.3, We must fix informat.el and info.el:
+;; - Info-tagify suport @anthor-*-refill.
+;; - info.el support Ref in Tag table.
+(unless (get 'anchor 'texinfo-format)
+ (put 'anchor 'texinfo-format 'texinfo-discard-command-and-arg))
+
+
+\f
+;;; New command definition
+;; @alias NEW=EXISTING
+(put 'alias 'texinfo-format 'texinfo-alias)
+(ptexinfmt-defun-if-void texinfo-alias ()
+ (let ((start (1- (point)))
+ args)
+ (skip-chars-forward " ")
+ (save-excursion (end-of-line) (setq texinfo-command-end (point)))
+ (if (not (looking-at "\\([^=]+\\)=\\(.*\\)"))
+ (error "Invalid alias command")
+ (setq texinfo-alias-list
+ (cons
+ (cons
+ (buffer-substring (match-beginning 1) (match-end 1))
+ (buffer-substring (match-beginning 2) (match-end 2)))
+ texinfo-alias-list))
+ (texinfo-discard-command))))
+
+\f
+;;; Indent
+;; @exampleindent INDENT (makeinfo 4.0 or later)
+
+;; @paragraphindent INDENT (makeinfo 4.0 or later)
+;; INDENT: asis, 0, n
+
+;; @firstparagraphindent WORD (makeinfo 4.6 or later)
+;; WORD: none, insert
+
+
+\f
+;;; Special
+;; @image{FILENAME [, WIDTH] [, HEIGHT]}
+(put 'image 'texinfo-format 'texinfo-format-image)
+(ptexinfmt-defun-if-void texinfo-format-image ()
+ ;; I don't know makeinfo parse FILENAME.
+ (let ((args (texinfo-format-parse-args))
+ filename)
+ (when (null (nth 0 args))
+ (error "Invalid image command"))
+ (texinfo-discard-command)
+ ;; makeinfo uses FILENAME.txt
+ (setq filename (format "%s.txt" (nth 0 args)))
+ (message "Reading included file: %s" filename)
+ ;; verbatim for Info output
+ (goto-char (+ (point) (cadr (insert-file-contents filename))))
+ (message "Reading included file: %s...done" filename)))
+
+
+\f
+;;; @multitable ... @end multitable
+(ptexinfmt-defvar-if-void texinfo-extra-inter-column-width 0
+ "*Number of extra spaces between entries (columns) in @multitable.")
+
+(ptexinfmt-defvar-if-void texinfo-multitable-buffer-name
+ "*multitable-temporary-buffer*")
+(ptexinfmt-defvar-if-void texinfo-multitable-rectangle-name
+ "texinfo-multitable-temp-")
+
+;; These commands are defined in texinfo.tex for printed output.
+(put 'multitableparskip 'texinfo-format 'texinfo-discard-line-with-args)
+(put 'multitableparindent 'texinfo-format 'texinfo-discard-line-with-args)
+(put 'multitablecolmargin 'texinfo-format 'texinfo-discard-line-with-args)
+(put 'multitablelinespace 'texinfo-format 'texinfo-discard-line-with-args)
+
+(put 'multitable 'texinfo-format 'texinfo-multitable)
+
+(ptexinfmt-defun-if-void texinfo-multitable ()
+ "Produce multi-column tables."
+
+;; This function pushes information onto the `texinfo-stack'.
+;; A stack element consists of:
+;; - type-of-command, i.e., multitable
+;; - the information about column widths, and
+;; - the position of texinfo-command-start.
+;; e.g., ('multitable (1 2 3 4) 123)
+;; The command line is then deleted.
+ (texinfo-push-stack
+ 'multitable
+ ;; push width information on stack
+ (texinfo-multitable-widths))
+ (texinfo-discard-line-with-args))
+
+(put 'multitable 'texinfo-end 'texinfo-end-multitable)
+(ptexinfmt-defun-if-void texinfo-end-multitable ()
+ "Discard the @end multitable line and pop the stack of multitable."
+ (texinfo-discard-command)
+ (texinfo-pop-stack 'multitable))
+
+(ptexinfmt-defun-if-broken texinfo-multitable-widths ()
+ "Return list of widths of each column in a multi-column table."
+ (let (texinfo-multitable-width-list)
+ ;; Fractions format:
+ ;; @multitable @columnfractions .25 .3 .45
+ ;;
+ ;; Template format:
+ ;; @multitable {Column 1 template} {Column 2} {Column 3 example}
+ ;; Place point before first argument
+ (skip-chars-forward " \t")
+ (cond
+ ;; Check for common misspelling
+ ((looking-at "@columnfraction ")
+ (error "In @multitable, @columnfractions misspelled"))
+ ;; Case 1: @columnfractions .25 .3 .45
+ ((looking-at "@columnfractions")
+ (forward-word 1)
+ (while (not (eolp))
+ (setq texinfo-multitable-width-list
+ (cons
+ (truncate
+ (1-
+ (* fill-column (read (get-buffer (current-buffer))))))
+ texinfo-multitable-width-list))))
+ ;;
+ ;; Case 2: {Column 1 template} {Column 2} {Column 3 example}
+ ((looking-at "{")
+ (let ((start-of-templates (point)))
+ (while (not (eolp))
+ (skip-chars-forward " \t")
+ (let* ((start-of-template (1+ (point)))
+ (end-of-template
+ ;; forward-sexp works with braces in Texinfo mode
+ (progn (forward-sexp 1) (1- (point)))))
+ (setq texinfo-multitable-width-list
+ (cons (- (progn
+ (goto-char end-of-template)
+ (current-column))
+ (progn
+ (goto-char start-of-template)
+ (current-column)))
+ texinfo-multitable-width-list))
+ ;; Remove carriage return from within a template, if any.
+ ;; This helps those those who want to use more than
+ ;; one line's worth of words in @multitable line.
+ (narrow-to-region start-of-template end-of-template)
+ (goto-char (point-min))
+ (while (search-forward "\n" nil t)
+ (delete-char -1))
+ (goto-char (point-max))
+ (widen)
+ (forward-char 1)))))
+ ;;
+ ;; Case 3: Trouble
+ (t
+ (error "\
+You probably need to specify column widths for @multitable correctly")))
+ ;; Check whether columns fit on page.
+ (let ((desired-columns
+ (+
+ ;; between column spaces
+ (length texinfo-multitable-width-list)
+ ;; additional between column spaces, if any
+ texinfo-extra-inter-column-width
+ ;; sum of spaces for each entry
+ (apply '+ texinfo-multitable-width-list))))
+ (if (> desired-columns fill-column)
+ (error (format "\
+Multi-column table width, %d chars, is greater than page width, %d chars."
+ desired-columns fill-column))))
+ texinfo-multitable-width-list))
+
+;; @item A1 @tab A2 @tab A3
+(ptexinfmt-defun-if-void texinfo-multitable-extract-row ()
+ "Return multitable row, as a string.
+End of row is beginning of next @item or beginning of @end.
+Cells within rows are separated by @tab."
+ (skip-chars-forward " \t")
+ (let* ((start (point))
+ (end (progn
+ (re-search-forward "@item\\|@end")
+ (match-beginning 0)))
+ (row (progn (goto-char end)
+ (skip-chars-backward " ")
+ ;; remove whitespace at end of argument
+ (delete-region (point) end)
+ (buffer-substring start (point)))))
+ (delete-region texinfo-command-start end)
+ row))
+
+(put 'multitable 'texinfo-item 'texinfo-multitable-item)
+(ptexinfmt-defun-if-void texinfo-multitable-item ()
+ "Format a row within a multicolumn table.
+Cells in row are separated by @tab.
+Widths of cells are specified by the arguments in the @multitable line.
+All cells are made to be the same height.
+This command is executed when texinfmt sees @item inside @multitable."
+ (let ((original-buffer (current-buffer))
+ (table-widths (reverse (car (cdr (car texinfo-stack)))))
+ (existing-fill-column fill-column)
+ start
+ end
+ (table-column 0)
+ (table-entry-height 0)
+ ;; unformatted row looks like: A1 @tab A2 @tab A3
+ ;; extract-row command deletes the source line in the table.
+ (unformated-row (texinfo-multitable-extract-row)))
+ ;; Use a temporary buffer
+ (set-buffer (get-buffer-create texinfo-multitable-buffer-name))
+ (delete-region (point-min) (point-max))
+ (insert unformated-row)
+ (goto-char (point-min))
+;; 1. Check for correct number of @tab in line.
+ (let ((tab-number 1)) ;; one @tab between two columns
+ (while (search-forward "@tab" nil t)
+ (setq tab-number (1+ tab-number)))
+ (if (/= tab-number (length table-widths))
+ (error "Wrong number of @tab's in a @multitable row")))
+ (goto-char (point-min))
+;; 2. Format each cell, and copy to a rectangle
+ ;; buffer looks like this: A1 @tab A2 @tab A3
+ ;; Cell #1: format up to @tab
+ ;; Cell #2: format up to @tab
+ ;; Cell #3: format up to eob
+ (while (not (eobp))
+ (setq start (point))
+ (setq end (save-excursion
+ (if (search-forward "@tab" nil 'move)
+ ;; Delete the @tab command, including the @-sign
+ (delete-region
+ (point)
+ (progn (forward-word -1) (1- (point)))))
+ (point)))
+ ;; Set fill-column *wider* than needed to produce inter-column space
+ (setq fill-column (+ 1
+ texinfo-extra-inter-column-width
+ (nth table-column table-widths)))
+ (narrow-to-region start end)
+ ;; Remove whitespace before and after entry.
+ (skip-chars-forward " ")
+ (delete-region (point) (save-excursion (beginning-of-line) (point)))
+ (goto-char (point-max))
+ (skip-chars-backward " ")
+ (delete-region (point) (save-excursion (end-of-line) (point)))
+ ;; Temorarily set texinfo-stack to nil so texinfo-format-scan
+ ;; does not see an unterminated @multitable.
+ (let (texinfo-stack) ;; nil
+ (texinfo-format-scan))
+ (let (fill-prefix) ;; no fill prefix
+ (fill-region (point-min) (point-max)))
+ (setq table-entry-height
+ (max table-entry-height (count-lines (point-min) (point-max))))
+;; 3. Move point to end of bottom line, and pad that line to fill column.
+ (goto-char (point-min))
+ (forward-line (1- table-entry-height))
+ (let* ((beg (point)) ;; beginning of line
+ ;; add one more space for inter-column spacing
+ (needed-whitespace
+ (1+
+ (- fill-column
+ (progn
+ (end-of-line)
+ (current-column)))))) ;; end of existing line
+ (insert (make-string
+ (if (> needed-whitespace 0) needed-whitespace 1)
+ ? )))
+ ;; now, put formatted cell into a rectangle
+ (set (intern (concat texinfo-multitable-rectangle-name
+ (int-to-string table-column)))
+ (extract-rectangle (point-min) (point)))
+ (delete-region (point-min) (point))
+ (goto-char (point-max))
+ (setq table-column (1+ table-column))
+ (widen))
+;; 4. Add extra lines to rectangles so all are of same height
+ (let ((total-number-of-columns table-column)
+ (column-number 0)
+ here)
+ (while (> table-column 0)
+ (let ((this-rectangle (int-to-string table-column)))
+ (while (< (length this-rectangle) table-entry-height)
+ (setq this-rectangle (append this-rectangle '("")))))
+ (setq table-column (1- table-column)))
+;; 5. Insert formatted rectangles in original buffer
+ (switch-to-buffer original-buffer)
+ (open-line table-entry-height)
+ (while (< column-number total-number-of-columns)
+ (setq here (point))
+ (insert-rectangle
+ (eval (intern
+ (concat texinfo-multitable-rectangle-name
+ (int-to-string column-number)))))
+ (goto-char here)
+ (end-of-line)
+ (setq column-number (1+ column-number))))
+ (kill-buffer texinfo-multitable-buffer-name)
+ (setq fill-column existing-fill-column)))
+
+\f
+(ptexinfmt-defun-if-broken texinfo-format-printindex ()
+ (let ((indexelts (symbol-value
+ (cdr (assoc (texinfo-parse-arg-discard)
+ texinfo-indexvar-alist))))
+ opoint)
+ (insert "\n* Menu:\n\n")
+ (setq opoint (point))
+ (texinfo-print-index nil indexelts)
+
+ (if (memq system-type '(vax-vms windows-nt ms-dos))
+ (texinfo-sort-region opoint (point))
+ (shell-command-on-region opoint (point) "sort -fd" 1))))
+
+\f
+;; @copying ... @end copying
+;; that Emacs 21.4 and lesser and XEmacs don't support.
+(if (fboundp 'texinfo-copying)
+ nil
+ (defvar texinfo-copying-text ""
+ "Text of the copyright notice and copying permissions.")
+
+ (defun texinfo-copying ()
+ "Copy the copyright notice and copying permissions from the Texinfo file,
+as indicated by the @copying ... @end copying command;
+insert the text with the @insertcopying command."
+ (let ((beg (progn (beginning-of-line) (point)))
+ (end (progn (re-search-forward "^@end copying[ \t]*\n") (point))))
+ (setq texinfo-copying-text
+ (buffer-substring-no-properties
+ (save-excursion (goto-char beg) (forward-line 1) (point))
+ (save-excursion (goto-char end) (forward-line -1) (point))))
+ (delete-region beg end)))
+
+ (defun texinfo-insertcopying ()
+ "Insert the copyright notice and copying permissions from the Texinfo file,
+which are indicated by the @copying ... @end copying command."
+ (insert (concat "\n" texinfo-copying-text)))
+
+ (defadvice texinfo-format-scan (before expand-@copying-section activate)
+ "Extract @copying and replace @insertcopying with it."
+ (goto-char (point-min))
+ (when (search-forward "@copying" nil t)
+ (texinfo-copying))
+ (while (search-forward "@insertcopying" nil t)
+ (delete-region (match-beginning 0) (match-end 0))
+ (texinfo-insertcopying))))
+
+(provide 'ptexinfmt)
+
+;;; ptexinfmt.el ends here
--- /dev/null
+\input texinfo @c -*- mode: texinfo -*-
+@c %**start of header
+@setfilename riece-en.info
+@settitle Riece -- An IRC client for Emacsen --
+@c %**end of header
+@include version-en.texi
+@c @documentlanguage en
+
+@dircategory GNU Emacs Lisp
+@direntry
+* Riece-en: (riece-en). An IRC client for Emacsen
+@end direntry
+
+@ifinfo
+This file describes Riece.
+
+Copyright (C) 2003,2004,2005,2006,2007,2008,2009 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
+any later version published by the Free Software Foundation; with no
+Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
+Texts. A copy of the license is included in the section entitled "GNU
+Free Documentation License".
+@end ifinfo
+
+@tex
+
+@titlepage
+@title Riece
+
+@author by Daiki Ueno
+@page
+
+@vskip 0pt plus 1filll
+Copyright @copyright{} 2003,2004,2005 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
+any later version published by the Free Software Foundation; with no
+Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
+Texts. A copy of the license is included in the section entitled "GNU
+Free Documentation License".
+@end titlepage
+@page
+
+@end tex
+
+@node Top, Overview, (dir), (dir)
+@top Riece user's manual
+
+This manual documents Riece version @value{VERSION}. In addition to this
+manual, you may find useful information about Riece from Riece's official
+home page @uref{http://www.nongnu.org/riece/}.
+
+@menu
+* Overview:: Read me first.
+* Getting started:: Let's start chatting with other people.
+* Basic usage::
+* Index::
+* Function Index::
+* Variable Index::
+@end menu
+
+@node Overview, Getting started, Top, Top
+@chapter Overview
+
+Riece is a user interface for IRC (Internet Relay Chat). You should
+spell it with the first letter capitalized and pronounce it as /ri:s/.
+
+The features of Riece are as follows:
+
+@itemize @bullet
+@item
+Several IRC servers may be used at the same time.
+
+@item
+Many features built upon the extension mechanism called add-on.
+Currently 30 such add-ons are available.
+
+@item
+Installation is easy. Riece doesn't depend on other packages.
+
+@item
+Setup is easy. Automatically save/restore the configuration.
+
+@item
+Step-by-step instructions are included.
+
+@item
+Mostly compliant with the latest IRC client protocol (RFC 2812).
+@end itemize
+
+@node Getting started, Basic usage, Overview, Top
+@chapter Getting started
+
+To start Riece, follow the instruction below:
+
+@enumerate
+@item
+@kbd{M-x load-library riece}
+
+@item
+@kbd{M-x riece}
+@end enumerate
+
+In case that @samp{Cannot open load file: riece} is signalled in (1),
+you should probably have an installation problem. If you installed
+Riece from source tarball, please read README again. If you are
+trying to use a package distribution, check out the documentation.
+
+Once Riece started successfully, you will be asked the name of the IRC
+server to connect. IRC servers publicly available are taken from the
+Web pages of IRC networks:
+
+@itemize @bullet
+@item http://www.ircnet.jp
+@item http://freenode.net
+@end itemize
+
+You may see the following message:
+
+@example
+Nickname "ueno" already in use. Choose a new one:
+@end example
+
+In IRC, users are identified by @emph{nicknames}. If the nickname you
+selected has already used by another person, you must select the new one.
+
+In IRC, users join the @emph{channels} to start multi user
+conversation. To join a channel, type @kbd{C-c j}. On IRCnet, there
+is a channel named @samp{#Riece} where you can do some tests to get
+experienced with Riece.
+
+After you joined a channel, the layout of windows are changed to the
+following:
+
+@example
++-----+-----------------+
+| | |
+| | |
+| (1) | (2) |
+| | |
+| | |
++-----+-----------------+
+| | (4) |
+| +-----------------+
+| (3) | |
+| | (5) |
+| | |
++-----+-----------------+
+@end example
+
+You can send messages by entering messages in (4). Messages from
+other persons are shown in (2).
+
+@node Basic usage, Index, Getting started, Top
+@chapter Basic usage
+
+To start Riece, you just type @kbd{M-x riece}. Then you will prompted
+for the name of an IRC server. A typical IRC network may consist of
+several IRC servers and you will need to pick up appropriate one. Most
+of IRC networks provide a list of available servers on their Web pages:
+
+@itemize @bullet
+@item http://irc.kyoto-u.ac.jp
+@item http://freenode.net
+@end itemize
+
+If your nickname is taken, you will be asked to use different one. The
+initial nickname can be set via the variable @code{riece-nickname}. By
+default, your nickname is generated from your login name.
+@vindex riece-nickname
+
+After successfully connecting to an IRC server, you can join a channel
+and talk with people there. To join a channel, type @kbd{C-c j}. By
+the way there is a channel called @samp{#Riece} on IRCnet, so feel free
+to use it for testing.
+
+Now you enter a message and it will be seen by everyone else on the
+channel. Messages from other people will appear on the top-left window.
+
+@menu
+* Windows::
+* Indicators::
+* Commands::
+* Connecting to multiple servers::
+@end menu
+
+@node Windows, Indicators, Basic usage, Basic usage
+@section Windows
+
+By default, Riece uses 5 windows to inform user of his status:
+
+@example
++-----+-----------------+
+| | |
+| | |
+| (1) | (2) |
+| | |
+| | |
++-----+-----------------+
+| | (4) |
+| +-----------------+
+| (3) | |
+| | (5) |
+| | |
++-----+-----------------+
+@end example
+
+Each window is used for different purpose:
+
+@enumerate
+@item
+"user list window" (@samp{*Users XXX*}). Users on the current
+channel are listed in this window.
+
+@item
+"channel window" (@samp{*Channel XXX*}). This window keeps
+dialogues on the current channel.
+
+@item
+"channel list window" (@samp{*Channels*}). All channels you are
+joined are listed in this window.
+
+@item
+"command window" (@samp{*Commands*}). This window is used for either
+sending messages or issueing commands.
+
+@item
+"others buffer" (@samp{*Others*}). This window displays dialogues on
+channels except the current channel.
+@end enumerate
+
+@node Indicators, Commands, Windows, Basic usage
+@section Indicators
+
+Indicators are characters which indicate your status. Usually they are
+put on the left side of the modeline like:
+
+@example
+Riece: --- ueno #Riece [n]
+@end example
+
+In this case, @samp{---} are indicators. From left to right their
+meanings are:
+
+@enumerate
+@item
+You are not "away". (If you marked yourself as "away", it would be
+@samp{A})
+
+@item
+You are not an IRC operator. (If you entered operator mode, it would be
+@samp{O})
+
+@item
+The channel window is not locked.
+(If it was locked, it would be @samp{F}. If it was locked until next
+send, it would be @samp{f})
+@end enumerate
+
+@node Commands, Connecting to multiple servers, Indicators, Basic usage
+@section Commands
+
+The buffer used for sending messages is called "command buffer".
+You can issue various commands from the command buffer.
+
+@subsection IRC commands
+@table @kbd
+@item RET
+@findex riece-command-enter-message
+Send the current line. (@code{riece-command-enter-message})
+@item C-RET
+@findex riece-command-enter-message-as-notice
+Send the current line as NOTICE. (@code{riece-command-enter-message-as-notice})
+@item C-c j
+@findex riece-command-join
+Join a channel. (@code{riece-command-join})
+@item C-c C-p
+@findex riece-command-part
+Part from a channel. (@code{riece-command-part})
+@item C-c p
+@findex riece-command-enter-message-to-user
+Send the current line to particular
+user. (@code{riece-command-enter-message-to-user})
+@item C-c q
+@findex riece-command-quit
+Quit from IRC. (@code{riece-command-quit})
+@item C-c n
+@findex riece-command-change-nickname
+Change your nickname. (@code{riece-command-change-nickname})
+@item C-c f
+@findex riece-command-finger
+Get information of a user. (@code{riece-command-finger})
+@item C-c C-k
+@findex riece-command-kick
+Kick a user from the current channel. (@code{riece-command-kick})
+@item C-c i
+@findex riece-command-invite
+Invite a user to the current channel. (@code{riece-command-invite})
+@item C-c l
+@findex riece-command-list
+Issue a LIST command with specified pattern. (@code{riece-command-list})
+@item C-c C-n
+@findex riece-command-names
+Issue a NAMES command with specified pattern. (@code{riece-command-names})
+@item C-c w
+@findex riece-command-who
+Issue a WHO command with specified pattern. (@code{riece-command-who})
+@item C-c t
+@findex riece-command-topic
+Set topic of the current channel. (@code{riece-command-topic})
+@item C-c C-m
+@findex riece-command-change-mode
+Change the mode of the current channel. (@code{riece-command-change-mode})
+@item C-c o
+@findex riece-command-set-operators
+Assign channel operator privilege to a user. If a prefix argument
+(@kbd{C-u}) is given, remove the privilege from a
+user. (@code{riece-command-set-operators})
+@item C-c v
+@findex riece-command-set-speakers
+Allow a user to speak in the current channel. If a prefix argument
+(@kbd{C-u}) is given, disallow a user to
+speak. (@code{riece-command-set-speakers})
+@item C-c V
+@findex riece-version
+Display version number of Riece. If a prefix argument (@kbd{C-u}) is
+given, use User-Agent format.
+@item C-c /
+@findex riece-command-raw
+Send raw IRC command. (@code{riece-command-raw})
+@end table
+
+@subsection Window manipulating commands
+@table @kbd
+@item C-c r
+@findex riece-command-configure-windows
+Redraw windows. (@code{riece-command-configure-windows})
+@item C-c C-j
+@findex riece-command-next-channel
+Switch to the next channel in the channel
+list. (@code{riece-command-next-channel})
+@item C-c <
+@findex riece-command-previous-channel
+Switch to the previous channel in the channel
+list. (@code{riece-command-previous-channel})
+@item C-c >
+@findex riece-command-next-channel
+Switch to the next channel in the channel
+list. (@code{riece-command-next-channel})
+@item C-c ^
+@findex riece-command-list-addons
+Browse add-ons currently insinuated. (@code{riece-command-list-addons})
+@item C-c digit
+@findex riece-command-switch-to-channel-by-number
+Switch to @var{n}th channel in the channel
+list. (@code{riece-command-switch-to-channel-by-number})
+@item C-c C-c digit
+@findex riece-command-switch-to-channel-by-number
+Switch to @var{n} + 10th channel in the channel
+list. (@code{riece-command-switch-to-channel-by-number})
+@item C-c Home
+@findex riece-command-beginning-of-buffer
+Move point to the beginning of the buffer in the channel window.
+(@code{riece-command-beginning-of-buffer})
+@item C-c $
+@findex riece-command-end-of-buffer
+Move point to the end of the buffer in the channel window.
+(@code{riece-command-end-of-buffer})
+@item C-c SPC
+@findex riece-command-scroll-up
+Scroll text of the channel window up. (@code{riece-command-scroll-up})
+@item C-c DEL
+@findex riece-command-scroll-down
+Scroll text of the channel window down. (@code{riece-command-scroll-down})
+@end table
+
+@subsection Status toggle commands
+@table @kbd
+@item C-c C-t c
+@findex riece-command-toggle-channel-buffer-mode
+Toggle visibility of the channel
+window. (@code{riece-command-toggle-channel-buffer-mode})
+@item C-c C-t C
+@findex riece-command-toggle-channel-list-buffer-mode
+Toggle visibility of the channel list
+window. (@code{riece-command-toggle-channel-list-buffer-mode})
+@item C-c C-t u
+@findex riece-command-toggle-user-list-buffer-mode
+Toggle visibility of the user list
+window. (@code{riece-command-toggle-user-list-buffer-mode})
+@item C-c C-t f
+@findex riece-command-toggle-freeze
+Disable scrolling of the channel window. (@code{riece-command-toggle-freeze})
+@item C-c C-t o
+@findex riece-command-toggle-own-freeze
+Disable scrolling of the channel window until next
+send. (@code{riece-command-toggle-own-freeze})
+@item C-c C-t a
+@findex riece-command-toggle-away
+Mark or unmark yourself as "away". (@code{riece-command-toggle-away})
+@end table
+
+@node Connecting to multiple servers, , Commands, Basic usage
+@section Connecting to multiple servers
+
+One of the most important features of Riece is that users can use
+several IRC servers at the same time.
+
+The procedure to use multiple servers consists (1) connecting to the
+foreign server and (2) joinning a channel:
+
+@enumerate
+@item
+Type @kbd{C-c O} (@code{riece-command-open-server}), and then you will
+be asked the server name.
+
+@item
+Type @kbd{C-c j} (@code{riece-command-join}) to join a channel. Here
+the server name follows the channel name. To input a space character,
+use @kbd{C-q}. For example, if you want to join the channel
+@samp{#Riece} on the server @samp{irc6}, type @kbd{C-c j #Riece C-q SPC
+irc6}.
+@end enumerate
+
+If you want to send IRC command without joinning a channel, @kbd{C-c M}
+(@code{riece-command-universal-server-name-argument}) may be useful.
+
+Commands used for connection management are listed below:
+
+@table @kbd
+@item C-c O
+@findex riece-command-open-server
+Connect to the foreign server. (@code{riece-command-open-server})
+@item C-c C
+@findex riece-command-close-server
+Close the connection to the server. (@code{riece-command-close-server})
+@item C-c M
+@findex riece-command-universal-server-name-argument
+Issue a command on the specified
+server. (@code{riece-command-universal-server-name-argument})
+@end table
+
+@node Index, Function Index, Basic usage, Top
+@chapter Index
+@printindex cp
+
+@node Function Index, Variable Index, Index, Top
+@chapter Function Index
+@printindex fn
+
+@node Variable Index, , Function Index, Top
+@chapter Variable Index
+@printindex vr
+
+@summarycontents
+@contents
+@bye
+
+@c End:
--- /dev/null
+\input texinfo @c -*- mode: texinfo; coding: utf-8 -*-
+@c %**start of header
+@setfilename riece-ja.info
+@settitle Riece -- An IRC client for Emacsen --
+@c %**end of header
+@include version-ja.texi
+@c @documentlanguage ja
+@c @documentencoding utf-8
+
+@dircategory GNU Emacs Lisp
+@direntry
+* Riece-ja: (riece-ja). An IRC client for Emacsen
+@end direntry
+
+@ifinfo
+This file describes Riece.
+
+Copyright (C) 2003,2004,2005,2006,2007,2008,2009,2010 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
+any later version published by the Free Software Foundation; with no
+Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
+Texts. A copy of the license is included in the section entitled "GNU
+Free Documentation License".
+@end ifinfo
+
+@tex
+
+@titlepage
+@title Riece
+
+@author by Daiki Ueno
+@page
+
+@vskip 0pt plus 1filll
+Copyright @copyright{} 2003,2004,2005,2006 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
+any later version published by the Free Software Foundation; with no
+Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
+Texts. A copy of the license is included in the section entitled "GNU
+Free Documentation License".
+@end titlepage
+@page
+
+@end tex
+
+@node Top, Overview, (dir), (dir)
+@top Riece user's manual
+
+このマニュアルでは、Riece バージョン @value{VERSION} について解説します。
+このマニュアルで扱う範囲を越えた情報は Riece の公式ホームページ
+@uref{http://www.nongnu.org/riece/} から得られるかもしれません。
+
+@menu
+* Overview:: はじめに読んでね
+* Getting started:: IRC サーバに接続して会話してみよう
+* Basic usage:: 基本的な使い方
+* Advanced usage:: 進んだ使い方
+* Tips:: 便利な設定
+* Index::
+* Function Index::
+* Variable Index::
+@end menu
+
+@node Overview, Getting started, Top, Top
+@chapter Overview
+
+Riece は IRC (Internet Relay Chat) の世界でチャットを楽しむためのユーザ
+インターフェースです。Riece は「りーす」と読みます。
+
+Riece の主な特長は以下の通りです。
+
+@itemize @bullet
+@item 複数の IRC サーバに同時に接続可能
+@item アドオンにより機能の追加や取り外しが容易
+@item 他の elisp パッケージに依存しないため、インストールが簡単
+@item 設定が簡単で、前回起動時の設定を記録・復元する仕組みを提供
+@item 段階的な操作説明書が附属
+@item 最新の IRC のクライアントプロトコル (RFC2812) に準拠
+@end itemize
+
+@node Getting started, Basic usage, Overview, Top
+@chapter Getting started
+
+Riece を起動する手順は次の通りです。
+
+@enumerate
+@item
+@kbd{M-x load-library riece}
+
+@item
+@kbd{M-x riece}
+@end enumerate
+
+もし (1) で @samp{Cannot open load file: riece} のエラーが発生する場合に
+はインストールに失敗しています。自分でソースからインストールした場合には
+README をもう一度読み直してください。OS・ディストリビューションのパッケー
+ジからインストールした場合には、パッケージに含まれる文書をご確認ください。
+
+Riece を起動すると、IRC サーバの名前を聞かれます。公共に利用可能な IRC
+サーバの一覧は Web ページなどから得ることができます。
+
+@itemize @bullet
+@item http://www.ircnet.jp
+@item http://freenode.net
+@end itemize
+
+また、以下のようなメッセージが表示されるかもしれません。
+
+@example
+Nickname "ueno" already in use. Choose a new one:
+@end example
+
+IRC では、参加者を表すのに@emph{ニックネーム}と呼ばれる短い呼称が使われ
+ます。もし希望のニックネームが他の誰かに使用されている場合、別のニックネー
+ムを選ぶ必要があります。
+
+IRC サーバに接続できたら、次は会話をしてみましょう。IRC では@emph{チャンネル}
+と呼ばれる仮想的な会議室に参加して会話を行ないます。チャンネルに入るには
+@kbd{C-c j} とタイプします。参加するチャンネル名を尋ねられたら、適切なチャ
+ンネル名を入力しましょう。IRCnet には @samp{#Riece} というチャンネルがあ
+るので、テストをしたい場合には自由にお使いください。
+
+チャンネルに入ると、下の図に示すような 5 つのウィンドウ
+@footnote{まぎらわしいですが、Emacs の世界ではバッファを表示する領域をウィ
+ンドウと呼びます。}からなる画面に切り替わります。
+
+@example
++-----+-----------------+
+| | |
+| | |
+| (1) | (2) |
+| | |
+| | |
++-----+-----------------+
+| | (4) |
+| +-----------------+
+| (3) | |
+| | (5) |
+| | |
++-----+-----------------+
+@end example
+
+(4) のウィンドウに表示されるバッファに文章を入力してリターンキーを押すと
+発言できます。他の参加者の発言は (2) のウィンドウに表示されます。
+
+@node Basic usage, Advanced usage, Getting started, Top
+@chapter Basic usage
+
+@menu
+* Windows:: 画面構成
+* Indicators:: 自分の状態の表示
+* Commands:: コマンドの一覧
+@end menu
+
+@node Windows, Indicators, Basic usage, Basic usage
+@section Windows
+
+@example
++-----+-----------------+
+| | |
+| | |
+| (1) | (2) |
+| | |
+| | |
++-----+-----------------+
+| | (4) |
+| +-----------------+
+| (3) | |
+| | (5) |
+| | |
++-----+-----------------+
+@end example
+
+各ウィンドウに表示されるバッファの役割は以下の通りです。
+
+@enumerate
+@item
+ユーザリストバッファ (@samp{ *Users*})。チャンネルに参加しているユー
+ザのニックネームの一覧が表示されます。
+
+@item
+チャンネルバッファ (@samp{ *Channel:XXX*})。チャンネル内の会話が表示され
+ます。
+
+@item
+チャンネルリストバッファ (@samp{ *Channels*})。自分が参加しているチャンネ
+ルの一覧が表示されます。
+
+@item
+コマンドバッファ (@samp{*Command*})。文章やコマンドを送信するために使い
+ます。
+
+@item
+アザーズバッファ (@samp{ *Others*})。現在選択中のチャンネル以外の会話が流
+れます。
+@end enumerate
+
+@node Indicators, Commands, Windows, Basic usage
+@section Indicators
+
+モードラインの左端には、現在の自分の状態を示す印が表示されます。
+@footnote{もし画像を表示できる Emacs をお使いなら、左端に "R" のアイコン
+が表示されます。}
+
+@example
+Riece: ---- ueno #Riece [n]
+@end example
+
+ここで、@samp{----} の部分には左から順に以下の意味があります。
+
+@enumerate
+@item
+離席状態 (離席していれば @samp{A})
+
+@item
+IRC オペレータ状態 (IRC ネットワークの管理者権限を持っていれば @samp{O})
+
+@item
+ウィンドウの自動スクロールの禁止 (完全に禁止していれば @samp{F}、自分の
+次回の発言まで禁止しているのであれば @samp{f})
+
+@item
+チャンネルオペレータ状態 (チャンネルの管理者権限を持っていれば @samp{@@})
+@end enumerate
+
+@node Commands, , Indicators, Basic usage
+@section Commands
+
+@ref{Basic usage}で文章を入力したバッファはコマンドバッファと呼ばれます。
+コマンドバッファからは文章を送信する以外に、様々なコマンドを発行すること
+ができます。以下に一部を挙げます。
+
+最初はなかなか覚えにくいですが、@kbd{C-h b}
+ (@kbd{M-x describe-bindings}) で使用可能なキー操作の一覧が表示されるの
+で少しずつ覚えていくと良いでしょう。
+
+@subsection IRC commands
+@table @kbd
+@item RET
+@findex riece-command-enter-message
+文章を送ります(@code{riece-command-enter-message})
+@item C-RET
+@findex riece-command-enter-message-as-notice
+文章を NOTICE として送ります(@code{riece-command-enter-message-as-notice})
+@item C-c j
+@findex riece-command-join
+チャンネルに参加します(@code{riece-command-join})
+@item C-c C-p
+@findex riece-command-part
+チャンネルから離脱します(@code{riece-command-part})
+@item C-c p
+@findex riece-command-enter-message-to-user
+宛先を指定して現在の行を送ります(@code{riece-command-enter-message-to-user})
+@item C-c q
+@findex riece-command-quit
+IRC をやめます(@code{riece-command-quit})
+@item C-c n
+@findex riece-command-change-nickname
+自分のニックネームを変更します(@code{riece-command-change-nickname})
+@item C-c f
+@findex riece-command-finger
+ユーザの情報を調べます(@code{riece-command-finger})
+@item C-c C-k
+@findex riece-command-kick
+ユーザをチャンネルから蹴り出します(@code{riece-command-kick})
+@item C-c i
+@findex riece-command-invite
+ユーザをチャンネルに招待します(@code{riece-command-invite})
+@item C-c l
+@findex riece-command-list
+パターンに対して LIST を発行します(@code{riece-command-list})
+@item C-c C-n
+@findex riece-command-names
+パターンに対して NAMES を発行します(@code{riece-command-names})
+@item C-c w
+@findex riece-command-who
+パターンに対して WHO を発行します(@code{riece-command-who})
+@item C-c t
+@findex riece-command-topic
+チャンネルのトピックを設定します(@code{riece-command-topic})
+@item C-c C-m
+@findex riece-command-change-mode
+チャンネルのモードを設定します(@code{riece-command-change-mode})
+@item C-c o
+@findex riece-command-set-operators
+ユーザにチャンネルの管理者権限を与えます。@kbd{C-u C-c o} では逆に、ユーザからチャンネルの管理者権限を奪います(@code{riece-command-set-operators})
+@item C-c v
+@findex riece-command-set-speakers
+ユーザにチャンネルでの発言権を与えます。@kbd{C-u C-c v} では逆に、ユーザからチャンネルでの発言権を奪います(@code{riece-command-set-speakers})
+@item C-c V
+@findex riece-version
+Riece のバージョンを表示します。(@kbd{C-u C-c V}) で、より詳細な情報を表示します。
+@item C-c /
+@findex riece-command-raw
+IRC コマンドを直接送ります(@code{riece-command-raw})
+@end table
+
+@subsection Window manipulating commands
+@table @kbd
+@item C-c r
+@findex riece-command-configure-windows
+フレーム全体を再描画します(@code{riece-command-configure-windows})
+@item C-c C-j または C-c >
+@findex riece-command-next-channel
+チャンネル一覧で次のチャンネルを選択します(@code{riece-command-next-channel})
+@item C-c <
+@findex riece-command-previous-channel
+チャンネル一覧で前のチャンネルを選択します(@code{riece-command-previous-channel})
+@item C-c ^
+@findex riece-command-list-addons
+アドオンの一覧を表示します(@code{riece-command-list-addons})
+@item C-c 数字
+@findex riece-command-switch-to-channel-by-number
+チャンネル一覧で @var{n}番目のチャンネルを選択します(@code{riece-command-switch-to-channel-by-number})
+@item C-c C-c 数字
+@findex riece-command-switch-to-channel-by-number
+チャンネル一覧で @var{n} + 10番目のチャンネルを選択します(@code{riece-command-switch-to-channel-by-number})
+@item C-c Home
+@findex riece-command-beginning-of-buffer
+チャンネルバッファ、またはダイアログバッファを上端までスクロールします(@code{riece-command-beginning-of-buffer})
+@item C-c $
+@findex riece-command-end-of-buffer
+チャンネルバッファ、またはダイアログバッファを下端までスクロールします(@code{riece-command-end-of-buffer})
+@item C-c SPC
+@findex riece-command-scroll-up
+チャンネルバッファ、またはダイアログバッファを上方向にスクロールします(@code{riece-command-scroll-up})
+@item C-c DEL
+@findex riece-command-scroll-down
+チャンネルバッファ、またはダイアログバッファを下方向にスクロールします(@code{riece-command-scroll-down})
+@end table
+
+@subsection Status toggle commands
+@table @kbd
+@item C-c C-t c
+@findex riece-command-toggle-channel-buffer-mode
+チャンネルバッファの表示・非表示を切り替えます(@code{riece-command-toggle-channel-buffer-mode})
+@item C-c C-t C
+@findex riece-command-toggle-channel-list-buffer-mode
+チャンネルリストバッファの表示・非表示を切り替えます(@code{riece-command-toggle-channel-list-buffer-mode})
+@item C-c C-t u
+@findex riece-command-toggle-user-list-buffer-mode
+ユーザリストバッファの表示・非表示を切り替えます(@code{riece-command-toggle-user-list-buffer-mode})
+@item C-c C-t f
+@findex riece-command-toggle-freeze
+チャンネルバッファ、またはダイアログバッファの自動スクロールを禁止しま
+す(@code{riece-command-toggle-freeze})
+@item C-c C-t o
+@findex riece-command-toggle-own-freeze
+チャンネルバッファ、またはダイアログバッファを、自分が発言するまで、自動
+スクロールを禁止します(@code{riece-command-toggle-own-freeze})
+@item C-c C-t a
+@findex riece-command-toggle-away
+自分の離席状態を切り替えます(@code{riece-command-toggle-away})
+@end table
+
+@node Advanced usage, Tips, Basic usage, Top
+@chapter Advanced usage
+
+この章では、もっと進んだ使い方を解説します。
+
+@menu
+* Startup File:: 設定ファイル
+* Server settings:: サーバの詳細設定
+* Multiple servers:: 複数のサーバに接続するには
+* Add-ons:: アドオンとは
+@end menu
+
+@node Startup File, Server settings, Advanced usage, Advanced usage
+@section Startup file
+
+Riece の設定は Emacs の設定ファイルに書いても良いですが、Riece に固有の
+設定はなるべく @file{~/.riece/init} に書くことを推奨します。
+
+また、Riece を起動して終了すると @file{~/.riece/save} というファイルが
+作成されます。このファイルには前回起動時の設定の一部が自動的に保存され
+ます。
+
+起動時には、最初に @file{~/.riece/save} を、次に @file{~/.riece/init}を
+読み込みます。つまり、前回起動時に @file{~/.riece/save} に保存された内容
+は、@file{~/.riece/init} の内容で上書きされます。
+
+@node Server settings, Multiple servers, Startup File, Advanced usage
+@section Server settings
+
+起動時に接続する IRC サーバは変数 @code{riece-server} で指定します。
+@vindex riece-server
+
+@code{riece-server} は文字列で、その形式は次のいずれかです。
+
+@enumerate
+@item
+@code{IRC サーバのホスト名}
+
+@item
+@code{IRC サーバのホスト名:ポート番号}
+
+@item
+@code{IRC サーバのホスト名:ポート番号:パスワード}
+
+@item
+詳細設定の名前
+@end enumerate
+
+4. の場合には、@code{riece-server} の値をキーに
+@code{riece-server-alist} を検索します。@code{riece-server-alist} は次
+のような形式の連想配列です。
+@vindex riece-server-alist
+
+@example
+(setq riece-server-alist
+ '(("foo" :host "irc.example.com" :coding shift_jis)
+ ("bar" :host "irc.example.net" :nickname "baz")))
+@end example
+
+この設定の意味は以下の通りです。
+
+@itemize
+@item
+@samp{foo} という名前の設定では、IRC サーバのホスト名に @samp{irc.example.com}、使用する文字コードに Shift_JIS を使う
+
+@item
+@samp{bar} という名前の設定では、IRC サーバのホスト名は @samp{irc.example.net}、このサーバではニックネーム @samp{baz} を使う
+@end itemize
+
+指定できるキーワードの一覧は以下の通りです。
+
+@table @code
+@item :host
+サーバのホスト名または IP アドレス
+@item :service
+サーバのサービス名またはポート番号 (既定値は @code{6667})
+@item :nickname
+接続時のニックネーム (既定値は変数 @code{user-real-login-name} の値)
+@item :username
+接続時のユーザネーム (既定値は変数 @code{user-full-name} の値)
+@item :password
+接続時のパスワード
+@item :function
+接続用関数 (既定値は @code{open-network-stream})
+@item :coding
+文字コード (既定値は @code{riece-default-coding-system} の値)
+@end table
+
+@code{riece-server-alist} を対話的に設定するには次のコマンドを使うと便利です。
+
+@example
+M-x load-library riece
+M-x customize-variable riece-server-alist
+@end example
+
+@node Multiple servers, Add-ons, Server settings, Advanced usage
+@section Multiple servers
+
+同時に複数のサーバに接続する手順を以下に示します。
+
+既に特定のサーバに接続している状態で、別のサーバに接続するには @kbd{C-c O} (@code{riece-command-open-server}) を使います。
+
+別のサーバ上のチャンネルに参加するには、@kbd{C-c j}
+(@code{riece-command-join})でチャンネル名に @samp{@@} に続いてサーバ名を
+続けます。
+
+たとえば、サーバ @samp{irc.freenode.net} 上の @samp{#Riece} は次のよう
+に表記します。
+
+@example
+#Riece@@irc.freenode.net
+@end example
+
+チャンネル名とサーバの区切り文字 @samp{@@} は
+変数 @code{riece-alias-alternate-separator} で変更できます。
+
+または、空白文字でも代用できます。この時には、@kbd{C-q SPC} と入力する
+必要があります。
+
+複数の接続を操作するコマンドを以下にまとめます。
+
+@table @kbd
+@item C-c O
+@findex riece-command-open-server
+別のサーバに接続します(@code{riece-command-open-server})
+@item C-c C
+@findex riece-command-close-server
+サーバとの接続を切断します(@code{riece-command-close-server})
+@item C-c M
+@findex riece-command-universal-server-name-argument
+特定のサーバに対して、続くコマンドを発行します(@code{riece-command-universal-server-name-argument})
+@end table
+
+@node Add-ons, , Multiple servers, Advanced usage
+@section Add-ons
+
+Riece では、雑多な機能を選択的に利用できるよう、アドオンと呼ばれる機構
+を用意しています。アドオンは通常の elisp モジュールを拡張したもので、
+安全な取り外しや、アドオン間の初期化処理の依存関係などの面倒をみます。
+
+アドオンには次の四種類の状態があります。
+
+@table @asis
+@item unloaded
+読み込み前。アドオンの elisp モジュールが読み込まれていない状態
+
+@item insinuated
+組み込み済み。アドオンの elisp モジュールが読み込まれ、初期化処理が完了した状態
+
+@item enabled
+有効。アドオンが動作中
+
+@item disabled
+無効。アドオンの動作が停止中
+
+@end table
+
+@menu
+* Add-on browser:: アドオンの一覧表示
+* Available add-ons:: 標準添付のアドオンの紹介
+@end menu
+
+@node Add-on browser, Available add-ons, Add-ons, Add-ons
+@subsection Add-on browser
+
+Riece の動作中にアドオンの一覧を眺めるにはアドオンブラウザを使うと便利です。
+コマンドバッファで @kbd{C-c ^} とすると、次のように表示されます。
+
+@example
++ riece-alias Define aliases for IRC names.
+ riece-async Connect to IRC server via async proxy.
+ riece-biff Be notified if messages arrives.
++ riece-button Display useful buttons in IRC buffers.
++ riece-ctcp CTCP (Client To Client Protocol) support.
++ riece-ctlseq Mark up control sequences in IRC buffers.
+@end example
+
+各行の左端のマークはアドオンの状態を表わしています。@samp{+} は組込ま
+れて有効なアドオン、空白はロードされていないアドオンです。
+
+ここで、riece-button を無効にしたい場合、四行目の先頭で @kbd{-} としま
+す。すると、先頭のマークが @samp{+} から @samp{-} に変化します。
+
+@example
++ riece-alias Define aliases for IRC names.
+ riece-async Connect to IRC server via async proxy.
+ riece-biff Be notified if messages arrives.
+- riece-button Display useful buttons in IRC buffers.
++ riece-ctcp CTCP (Client To Client Protocol) support.
++ riece-ctlseq Mark up control sequences in IRC buffers.
+@end example
+
+さらに、@samp{u} とすると、riece-button をアドオンの設定から除外します。
+さらに、@samp{U} とすると、riece-button を完全にアンロードします。
+
+この状態で、@samp{s} または @samp{M-x riece-command-save-variables} と
+すると、設定を保存します。
+
+@file{~/.riece/init} でアドオンを組み込むには @code{riece-addons} を設
+定します。たとえば @samp{riece-alias} を組み込む場合には、以下のように
+記述します。
+@vindex riece-addons
+
+@example
+(add-to-list 'riece-addons 'riece-mini)
+@end example
+
+@node Available add-ons, , Add-on browser, Add-ons
+@subsection Available add-ons
+
+利用可能なアドオンは次の通りです。これらのうちの多くは標準で組み込まれ
+ています。
+
+@table @samp
+@item riece-alias
+チャンネル名やニックネームの別名を定義
+@item riece-async
+Emacs が busy or suspend 状態になることに備え、
+PING に応答する local proxy 経由で IRC サーバに接続
+@item riece-biff
+他のバッファにいる時に発言があるとモードラインに印 ("[R]") を表示
+@item riece-button
+ボタンやポップアップメニューの表示
+@item riece-ctcp
+CTCP (Client To Client Protocol)
+@item riece-ctlseq
+コントロールシーケンス (^B など) による強調表示
+@item riece-desktop-notify
+メッセージの到着をデスクトップに通知
+@item riece-doctor
+doctor.el と連携して精神科医になりすます
+@item riece-epg
+EasyPG @uref{http://www.easypg.org} による会話の暗号化
+@item riece-eval-ruby
+入力された文字列を Ruby の式として評価
+@item riece-eval
+入力された文字列を Emacs Lisp の式として評価
+@item riece-foolproof
+チャンネルミスを防ぐ
+@item riece-google
+キーワードを Google で検索
+@item riece-guess
+色々な方法で移動先のチャンネルを推測
+@item reice-hangman
+チャンネル内で hangman で遊ぶ
+@item riece-highlight
+バッファの色付け
+@item riece-history
+チャンネル移動の履歴管理
+@item riece-icon
+バッファ中にアイコンを表示
+@item riece-ignore
+指定したユーザの発言を無視
+@item riece-kakasi
+日本語の通らない端末で、日本語をローマ字で表示
+@item riece-keepalive
+IRC サーバとの接続を保持
+@item riece-keyword
+キーワードの強調表示
+@item riece-log
+会話のログをファイルに保存
+@item riece-lsdb
+アドレス帳 LSDB (Lovely Sister Database)
+@uref{http://lsdb.sourceforge.jp} と連携
+@item riece-mcat
+メッセージカタログ
+@item riece-menu
+メニューバーにメニューを登録
+@item riece-mini
+ミニバッファのみで IRC をする
+@item riece-ndcc
+DCC (Direct Client to Client protocol) によるファイル転送
+(Emacs 22 でのみ動作)
+@item riece-rdcc
+DCC (Direct Client to Client protocol) によるファイル転送
+@item riece-shrink-buffer
+メモリ確保のため、バッファを定期的に切り詰める
+@item riece-skk-kakutei
+SKK 使用時に変換モードの印を発言から取り除く
+@item riece-toolbar
+ツールバーを表示
+@item riece-twitter
+CTCP ACTION (@kbd{C-c C-c a}) と同時に Twitter に状態を送信
+@item riece-unread
+発言のあったチャンネルに@samp{!}マークをつける
+@item riece-url
+会話に現れた URL の収集
+@item riece-xface
+ユーザリストバッファにユーザの X-Face を表示
+@item riece-xfaceb
+ユーザリストバッファにユーザの X-Face を表示
+(BBDB @uref{http://bbdb.sourceforge.net} が必要)
+@item riece-yank
+@kbd{C-c y} で kill-ring から文字列を送信
+@end table
+
+@node Tips, Index, Advanced usage, Top
+@comment node-name, next, previous, up
+@chapter Tips
+
+この章では、よく聞かれる質問に対する答えと便利な設定例を紹介します。
+
+@section 直前に選択していたチャンネルに移動したい
+@vindex riece-guess-channel-try-functions
+
+以下の行を @file{~/.riece/init} に追加することで、@kbd{C-c g} で履歴を辿
+りつつ移動できます。@samp{riece-guess} アドオンは、チャンネル選択の履歴
+や未読メッセージの有無などから次に選択するチャンネルを推測してくれるアド
+オンで、標準で組み込まれています。
+
+@example
+(add-hook 'riece-guess-channel-try-functions
+ 'riece-guess-channel-from-history)
+@end example
+
+@section 発言があるとバッファがスクロールするのを止めたい
+
+@kbd{C-c C-t f} です。@emph{t}oggle @emph{f}reeze と覚えると良いでしょう。
+
+@section 装飾を抑制したい
+
+@code{riece-addons} から装飾のためのアドオンを除外します。
+通常有効になっている装飾のためのアドオンは次の通りです。
+
+@itemize
+@item
+色付け (@samp{riece-highlight})
+
+@item
+ボタン表示 (@samp{riece-button})
+
+@item
+アイコン画像の表示 (@samp{riece-icon})
+@end itemize
+
+たとえば色付けをやめたいのであれば、以下の行を @file{~/.riece/init} に追
+加します:
+
+@example
+(setq riece-addons (delq 'riece-highlight riece-addons))
+@end example
+
+@section 特定の文字列を受信したら音を鳴らしたい
+@vindex riece-keyword-notify-functions
+
+以下の設定を @file{~/.riece/init} に加えます。@samp{riece-keywords} アド
+オンを使うと特定の文字列を受信した際の動作を指定できます。
+
+@example
+(setq riece-keywords '("ほげ" "ふが"))
+(add-hook 'riece-keyword-notify-functions
+ (lambda (keyword message) (ding)))
+@end example
+
+@section SKK を使っていて、変換中の印 (▽) を送信してしまうことがある
+
+以下の行を @file{~/.riece/init} に追加します。
+
+@example
+(add-to-list 'riece-addons 'riece-skk-kakutei)
+@end example
+
+@section チャンネル一覧の並び順を固定したい
+@vindex riece-default-channel-binding
+
+以下の行を @file{~/.riece/init} に追加します。
+
+@example
+(setq riece-default-channel-binding
+ '("#Riece" "#emacsen" nil "#debianjp"))
+@end example
+
+この設定例では、チャンネル一覧の並び順は次のようになります。
+
+@enumerate
+@item
+#Riece
+@item
+#emacsen
+@item
+なし
+@item
+#debianjp
+@end enumerate
+
+3 番目のチャンネルが空席となっていることにご注意ください。新たなチャンネ
+ルに参加した場合、そのチャンネルが 3 番目の位置に割当てられます。
+
+@section 起動時に自動的にチャンネルに参加したい
+@vindex riece-startup-channel-list
+
+変数 @samp{riece-startup-channel-list} を設定します。
+
+@example
+(setq riece-startup-channel-list
+ '("#Riece" "#public"))
+@end example
+
+この設定例は、@samp{#Riece} と @samp{#public} に参加することを意味してい
+ます。チャンネルに参加する際にパスワードが必要な場合には次のように設定し
+ます。
+
+@example
+(setq riece-startup-channel-list
+ '("#Riece" "#public" ("#private" "password")))
+@end example
+
+@section 起動時に自動的に複数の IRC サーバに接続したい
+@vindex riece-startup-server-list
+
+変数 @samp{riece-startup-server-list} を設定します。
+
+@example
+(setq riece-server "ircnet"
+ riece-server-alist '(("ircnet" :host "irc.tokyo.wide.ad.jp")
+ ("freenode" :host "irc.ipv6.freenode.net")))
+@end example
+
+この設定例では、起動時に接続するのは "ircnet" だけです。
+@samp{riece-startup-server-list} を以下のように設定すると、
+"freenode" にも接続するようになります。
+
+@example
+(setq riece-startup-server-list '("freenode"))
+@end example
+
+@section HTTP プロキシを介して IRC サーバに接続したい
+@file{relay.el} と @file{connect.c} を使うと、
+HTTP プロキシを介して IRC サーバに接続することができます。
+
+@table @asis
+@item relay.el
+@uref{http://www.taiyo.co.jp/~gotoh/lisp/relay.el}
+
+@item connect.c
+@uref{http://www.taiyo.co.jp/~gotoh/ssh/connect.html}
+@end table
+
+たとえば、@samp{proxy.example.com:8080} 経由で
+@samp{irc.tokyo.wide.ad.jp} に接続する場合には、以下の行を
+@file{~/.riece/init} に追加します。
+
+@example
+(require 'relay)
+(setq relay-command-alist (cons '("^irc\.tokyo\.wide\.ad\.jp$"
+ "connect" "-H" "proxy.example.com:8080"
+ host service)
+ relay-command-alist)
+ riece-server-alist (cons '("proxy-tokyo" :host "irc.tokyo.wide.ad.jp"
+ :function relay-open-network-stream)
+ riece-server-alist))
+@end example
+
+@section 会話のログをファイルに保存したい
+@vindex riece-log-directory-map
+
+@samp{riece-log} アドオンを使うと、会話のログをファイルに保存し、再起動
+時に参照できます。@samp{riece-log} アドオンは標準で組み込まれています。
+
+通常は @file{~/.riece/log} の下に IRC サーバの名前、チャンネル名のディレ
+クリが作成され、その中に日にち毎に分別されて保存されます。
+
+ディレクトリ名が文字化けする場合には、
+@code{file-name-coding-system} の値を適切に設定するか、あるいは
+@code{riece-log-directory-map} を使ってチャンネル名を US-ASCII 文字列に
+変換する必要があります。
+
+@example
+(setq riece-log-directory-map '(("#りーす" . "riece")))
+@end example
+
+@section ウィンドウ間を自由に移動したい
+
+GNU Emacs に附属の @samp{windmove.el} を使うと便利です。詳細は
+@samp{windmove.el} のコメントを参照ください。@samp{windmove.el} は
+作者のページ (@uref{http://hovav.net/elisp/}) からも取得できます。
+
+@node Index, Function Index, Tips, Top
+@chapter Index
+@printindex cp
+
+@node Function Index, Variable Index, Index, Top
+@chapter Function Index
+@printindex fn
+
+@node Variable Index, , Function Index, Top
+@chapter Variable Index
+@printindex vr
+
+@summarycontents
+@contents
+@bye
+
+@c End:
--- /dev/null
+Subproject commit 2f40bc523412742dac387b37d70b5a7f5d8363cc
--- /dev/null
+Makefile.in
+Makefile
+auto-autoloads.el
+custom-load.el
+lunit-report.xml
+riece-package-info.el
--- /dev/null
+;;; -*- Emacs-Lisp -*-
+
+(defvar riece-modules
+ (cons 'riece-compat
+ (cons (if (featurep 'xemacs)
+ 'riece-xemacs
+ 'riece-emacs)
+ '(riece-globals
+ riece-options
+ riece-debug
+ riece-package-info
+ riece-version
+ riece-coding
+ riece-complete
+ riece-addon-modules
+ riece-addon
+ riece-ruby
+ riece-cache
+
+ riece-mode
+ ;; riece-identity -+-> riece-channel
+ ;; +-> riece-user
+ riece-identity
+ riece-channel
+ riece-user
+
+ riece-misc
+ riece-signal
+
+ ;; riece-layout ---> riece-display
+ riece-layout
+ riece-display
+ riece-server
+
+ ;; riece-channel -+-> riece-naming
+ ;; riece-user -+
+ riece-naming
+ riece-message
+
+ ;; riece-filter calls riece-{handle,000,200,300,400,500}
+ riece-filter
+ riece-handle
+ riece-000
+ riece-200
+ riece-300
+ riece-400
+ riece-500
+
+ riece-commands
+ riece-irc
+ riece))))
+
+(defvar riece-mcat-modules
+ '(riece-mcat-japanese))
+
+(defvar riece-generated-modules
+ '(riece-package-info))
+
+(defvar riece-icons
+ '("riece-command-previous-channel.xpm"
+ "riece-command-next-channel.xpm"
+ "riece-command-configure-windows.xpm"
+ "riece-command-list-addons.xpm"
+ "riece-command-join.xpm"
+ "riece-command-part.xpm"
+ "riece-notify-icon.png"))
+
+(defvar riece-scripts
+ '("server.rb"
+ "aproxy.rb"))
+
+(defun riece-byte-compile-dest-file-function (filename)
+ (expand-file-name
+ (concat (file-name-nondirectory filename) "c")))
+
+(defun riece-compile-modules (modules srcdir)
+ (let ((load-path (cons nil (cons srcdir load-path)))
+ error-modules)
+ (while modules
+ (let ((source (expand-file-name
+ (concat (symbol-name (car modules)) ".el")
+ srcdir))
+ (binary (expand-file-name
+ (concat (symbol-name (car modules)) ".elc"))))
+ (if (file-newer-than-file-p source binary)
+ (condition-case error
+ (let ((byte-compile-dest-file-function
+ #'riece-byte-compile-dest-file-function))
+ (byte-compile-file source))
+ (error
+ (setq error-modules (cons (car modules) error-modules))))))
+ (setq modules (cdr modules)))
+ (if error-modules
+ (princ (concat "\n\
+ WARNING: ---------------------------------------------------------
+ WARNING: Couldn't compile following modules:
+ WARNING:
+ WARNING: " (mapconcat #'symbol-name error-modules ", ") "\n\
+ WARNING:
+ WARNING: You should probably stop here, try \"make distclean\" to clear
+ WARNING: the last build, and then reconfigure.
+ WARNING: ---------------------------------------------------------\n\n")))))
+
+(defun riece-compile-module ()
+ (let ((load-path (cons nil load-path)))
+ (let ((source (expand-file-name
+ (concat (car command-line-args-left) ".el"))))
+ (if (file-newer-than-file-p source (concat source "c"))
+ (byte-compile-file source))))
+ ;; Workaround for an XEmacs 21.5 bug ("xemacs -batch -f <func> <arg1>"
+ ;; attempts to open <arg1> as a file after <func>).
+ (setq command-line-args-left (cdr command-line-args-left)))
+
+(defun riece-install-modules (modules srcdir lispdir just-print)
+ (unless (or just-print (file-exists-p lispdir))
+ (make-directory lispdir t))
+ ;; Workaround for "make distcheck"
+ (set-file-modes lispdir 493)
+ (while modules
+ (let ((name (symbol-name (car modules))))
+ (princ (format "%s.el -> %s\n" name lispdir))
+ (unless just-print
+ (copy-file (expand-file-name
+ (concat name ".el")
+ (if (memq (car modules) riece-generated-modules)
+ nil
+ srcdir))
+ (expand-file-name (concat name ".el") lispdir)
+ t t))
+ (princ (format "%s.elc -> %s\n" name lispdir))
+ (unless just-print
+ (if (file-exists-p (expand-file-name (concat name ".elc")))
+ (copy-file (expand-file-name (concat name ".elc"))
+ (expand-file-name (concat name ".elc") lispdir)
+ t t)
+ (princ (format "(%s was not successfully compiled, ignored)\n"
+ name)))))
+ (setq modules (cdr modules))))
+
+(defun riece-install-icons (icons srcdir lispdir just-print)
+ (unless (or just-print (file-exists-p lispdir))
+ (make-directory lispdir t))
+ ;; Workaround for "make distcheck"
+ (set-file-modes lispdir 493)
+ (while icons
+ (when (file-exists-p (expand-file-name (car icons) srcdir))
+ (princ (format "%s -> %s\n" (car icons) lispdir))
+ (unless just-print
+ (copy-file (expand-file-name (car icons) srcdir)
+ (expand-file-name (car icons) lispdir)
+ t t)))
+ (setq icons (cdr icons))))
+
+(defun riece-install-scripts (scripts srcdir lispdir just-print)
+ (unless (or just-print (file-exists-p lispdir))
+ (make-directory lispdir t))
+ ;; Workaround for "make distcheck"
+ (set-file-modes lispdir 493)
+ (while scripts
+ (when (file-exists-p (expand-file-name (car scripts) srcdir))
+ (princ (format "%s -> %s\n" (car scripts) lispdir))
+ (unless just-print
+ (copy-file (expand-file-name (car scripts) srcdir)
+ (expand-file-name (car scripts) lispdir)
+ t t)))
+ (setq scripts (cdr scripts))))
+
+(defun riece-install-just-print-p ()
+ (let ((flag (getenv "MAKEFLAGS"))
+ case-fold-search)
+ (if flag
+ (string-match "^\\(\\(--[^ ]+ \\)+-\\|[^ =-]\\)*n" flag))))
+
+(defun riece-examine-modules (srcdir)
+ (let ((load-path (cons nil (cons srcdir load-path))))
+ (require 'riece-mcat)
+ (require 'riece-addon-modules)
+ (append riece-modules
+ riece-mcat-modules
+ (mapcar #'car riece-addon-modules))))
+
+(defun riece-examine ()
+ (princ (mapconcat #'symbol-name
+ (riece-examine-modules (car command-line-args-left))
+ " ")))
+
+(defun riece-update-mcat ()
+ (let* ((srcdir (car command-line-args-left))
+ (modules (riece-examine-modules srcdir))
+ (pointer riece-mcat-modules)
+ files)
+ (while pointer
+ (setq modules (delq (car pointer) modules)
+ pointer (cdr pointer)))
+ (setq files (mapcar (lambda (module)
+ (concat (symbol-name module) ".el"))
+ modules)
+ pointer riece-mcat-modules)
+ (while pointer
+ (riece-mcat-update files (concat (symbol-name (car pointer)) ".el")
+ (intern (concat (symbol-name (car pointer))
+ "-alist")))
+ (setq pointer (cdr pointer))))
+ ;; Workaround for an XEmacs 21.5 bug ("xemacs -batch -f <func> <arg1>"
+ ;; attempts to open <arg1> as a file after <func>).
+ (setq command-line-args-left (cdr command-line-args-left)))
+
+(defun riece-compile ()
+ (let ((srcdir (car command-line-args-left)))
+ (setq command-line-args-left (cdr command-line-args-left))
+ (riece-compile-modules (riece-examine-modules srcdir) srcdir))
+ ;; Workaround for an XEmacs 21.5 bug ("xemacs -batch -f <func> <arg1>"
+ ;; attempts to open <arg1> as a file after <func>).
+ (setq command-line-args-left (cdr command-line-args-left)))
+
+(defun riece-install ()
+ (let ((srcdir (car command-line-args-left))
+ (lispdir (nth 1 command-line-args-left)))
+ (riece-install-modules
+ (riece-examine-modules srcdir)
+ srcdir
+ (expand-file-name "riece" lispdir)
+ (riece-install-just-print-p))
+ (riece-install-icons
+ riece-icons
+ srcdir
+ (expand-file-name "riece" lispdir)
+ (riece-install-just-print-p))
+ (riece-install-scripts
+ riece-scripts
+ srcdir
+ (expand-file-name "riece" lispdir)
+ (riece-install-just-print-p))
+ ;; Workaround for an XEmacs 21.5 bug ("xemacs -batch -f <func> <arg1>"
+ ;; attempts to open <arg1> as a file after <func>).
+ (setq command-line-args-left (nthcdr 2 command-line-args-left))))
+
+(defun riece-uninstall ()
+ (let ((files (directory-files (expand-file-name "riece"
+ (car command-line-args-left))
+ t "\\.\\(elc?\\|rb\\|xpm\\)$")))
+ (while files
+ (delete-file (car files))
+ (setq files (cdr files)))
+ ;; Workaround for an XEmacs 21.5 bug ("xemacs -batch -f <func> <arg1>"
+ ;; attempts to open <arg1> as a file after <func>).
+ (setq command-line-args-left (cdr command-line-args-left))))
+
+(defun riece-compile-package ()
+ (let ((srcdir (car command-line-args-left)))
+ (setq command-line-args-left (cdr command-line-args-left))
+ (if (fboundp 'batch-update-directory-autoloads)
+ (let ((command-line-args-left (list "riece" srcdir)))
+ (batch-update-directory-autoloads))
+ (let ((command-line-args-left (list srcdir)))
+ (setq autoload-package-name "riece")
+ (batch-update-autoloads)))
+ (let ((command-line-args-left (list srcdir)))
+ (Custom-make-dependencies))
+ (riece-compile-modules
+ (append (riece-examine-modules srcdir)
+ '(auto-autoloads custom-load))
+ srcdir)))
+
+(defun riece-install-package ()
+ (let ((srcdir (car command-line-args-left)))
+ (setq command-line-args-left (cdr command-line-args-left))
+ (riece-install-modules
+ (append (riece-examine-modules srcdir)
+ '(auto-autoloads custom-load))
+ srcdir
+ (expand-file-name "lisp/riece" (car command-line-args-left))
+ (riece-install-just-print-p))
+ (riece-install-icons
+ riece-icons
+ srcdir
+ (expand-file-name "etc/riece" (car command-line-args-left))
+ (riece-install-just-print-p))
+ (riece-install-scripts
+ riece-scripts
+ srcdir
+ (expand-file-name "etc/riece" (car command-line-args-left))
+ (riece-install-just-print-p))))
+
+(defun riece-test ()
+ (let* ((srcdir (car command-line-args-left))
+ (load-path (cons (expand-file-name "test" srcdir)
+ (cons srcdir (cons nil load-path))))
+ (files (directory-files (expand-file-name "test" srcdir) t
+ "^test-.*\\.el$"))
+ suite)
+ (require 'lunit-report)
+ (setq suite (lunit-make-test-suite))
+ (while files
+ (when (file-regular-p (car files))
+ (load-file (car files))
+ (lunit-test-suite-add-test
+ suite
+ (lunit-make-test-suite-from-class
+ (intern (file-name-sans-extension
+ (file-name-nondirectory (car files)))))))
+ (setq files (cdr files)))
+ (lunit-report suite (nth 1 command-line-args-left))))
--- /dev/null
+2014-04-04 Steve Youngs <steve@sxemacs.org>
+
+ * riece-options.el (riece-hide-list): Renamed from
+ `riece-hide-joins-parts-quits' which was an ugly name.
+
+ * riece-handle.el (riece-handle-join-message): Use renamed hide
+ var, don't hide our own joins.
+ (riece-handle-part-message): Use renamed hide var, don't hide our
+ own parts.
+ (riece-handle-quit-message): Use renamed hide var, don't hide our
+ own quits.
+
+2014-04-01 Steve Youngs <steve@sxemacs.org>
+
+ * riece-options.el (riece-hide-joins-parts-quits): New user
+ variable to control suppression of join/part/quit messages.
+
+ * riece-handle.el (riece-handle-join-message): Use it.
+ (riece-handle-part-message): Use it.
+ (riece-handle-quit-message): Use it.
+
+2013-06-26 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-log.el (riece-log-display-message-function): Use the same
+ log file for incoming and outgoing private messages.
+
+2012-07-31 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-commands.el (riece-command-open-server): Open the default
+ server if server-name is "".
+
+2012-04-25 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-commands.el (riece-command-join): Allow multiple choices
+ using riece-completing-read-multiple.
+ * riece-mcat-japanese.el (riece-mcat-japanese-alist): Update
+ translation.
+
+2011-10-27 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-commands.el (riece-command-reorder-channels): New command.
+
+2011-04-20 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-commands.el (riece-command-set-operators)
+ (riece-command-set-speakers): Revert the arglist change in the
+ last commit.
+
+2011-04-04 Daiki Ueno <ueno@unixuser.org>
+
+ * Use lexical binding.
+
+2011-03-25 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-url.el (riece-url-regexp): Update the default value.
+
+2011-03-16 Daiki Ueno <ueno@unixuser.org>
+
+ * COMPILE (riece-compile-module, riece-update-mcat)
+ (riece-compile): Add workaround for XEmacs 21.5.
+
+2011-01-25 TAKAHASHI Kaoru <kaoru@kaisei.org>
+
+ * riece-ignore.el: Add newline at end of file.
+ * riece-keyword.el: Ditto.
+ * riece-mode.el: Ditto.
+
+2010-12-20 Daiki Ueno <ueno@unixuser.org>
+
+ * COMPILE (riece-examine): Supply srcdir to riece-examine-modules.
+ (riece-compile-package): Ditto.
+ (riece-install-package): Ditto.
+
+2010-12-16 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-shrink-buffer.el (riece-shrink-buffer): Make sure not to
+ move cursor.
+ * riece-misc.el (riece-insert): Save the current point, if the
+ buffer is frozen.
+
+2010-12-11 TAKAHASHI Kaoru <kaoru@kaisei.org>
+
+ * COMPILE (riece-update-mcat): Fix "Wrong number of arguments"
+ on `riece-examine-modules'.
+ * Makefile.am: Add $(srcdir) to update-mcat target.
+
+2010-12-10 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-log.el (riece-log-make-file-name): Don't append
+ coding-system name to the filename when coding-system is nil.
+
+2010-10-15 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-ctlseq.el (riece-ctlseq-put-attributes): Fix typo.
+
+2010-10-15 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-ctlseq.el (riece-ctlseq-colors): Add an example setting to
+ the doc.
+ (riece-ctlseq-regexp, riece-ctlseq-update-attribute): Make
+ "^C<fg>[,<bg>]" matching robuster.
+ Thanks to Akira TAGOH.
+
+2010-10-15 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-ctlseq.el (riece-ctlseq-regexp): New constant.
+ (riece-ctlseq-update-attribute): Rename from
+ riece-ctlseq-update-attributes.
+ (riece-ctlseq-put-attributes): New function.
+ (riece-ctlseq-message-filter): Rewrite the parsing logic.
+
+2010-10-14 Daiki Ueno <ueno@unixuser.org>
+
+ * COMPILE: Support "make distcheck".
+ * Makefile.am: Support "make distcheck".
+
+ * test/test-riece-log.el (test-riece-log-delete-directory)
+ (test-riece-log-display-message-function): Don't bind
+ default-file-name-coding-system.
+
+ * riece-log.el (riece-log-display-message-function)
+ (riece-log-insert): Don't bind default-file-name-coding-system.
+
+2010-10-14 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-compat.el (riece-make-local-hook): Check if
+ make-local-hook exists. Thanks to Makoto Fujiwara.
+
+2010-09-12 TAKAHASHI Kaoru <kaoru@kaisei.org>
+
+ * riece-develop.el (riece-insert-struct-template): Use "\n"
+ instead of newline in `interactive'. For
+ `delete-trailing-whitespace' safe.
+
+ * riece-rdcc.el (riece-rdcc-filter, riece-rdcc-sentinel): Suppress
+ byte-compile warnings; `save-excursion' defeated by `set-buffer'.
+
+ * riece-misc.el (riece-insert): Suppress byte-compile warnings;
+ `save-excursion' defeated by `set-buffer'.
+
+ * riece-keepalive.el (riece-keepalive-after-login-hook): Suppress
+ byte-compile warnings; `save-excursion' defeated by `set-buffer'.
+
+ * riece-kakasi.el (riece-kakasi-convert-string): Suppress
+ byte-compile warnings; `save-excursion' defeated by `set-buffer'.
+
+ * riece-ignore.el (riece-ignore-message-filter): Suppress
+ byte-compile warnings; `save-excursion' defeated by `set-buffer'.
+
+ * riece-hangman.el (riece-hangman-word): Suppress byte-compile
+ warnings; `save-excursion' defeated by `set-buffer'.
+
+ * riece-server.el (riece-reset-process-buffer): Suppress
+ byte-compile warnings; `save-excursion' defeated by `set-buffer'.
+
+ * riece-filter.el (riece-filter): Suppress byte-compile warnings;
+ `save-excursion' defeated by `set-buffer'.
+
+ * riece.el (riece-create-buffers): Suppress byte-compile
+ warnings; `save-excursion' defeated by `set-buffer'.
+
+ * riece-display.el (riece-display-connect-signals)
+ (riece-update-buffers): Suppress byte-compile
+ warnings; `save-excursion' defeated by `set-buffer'.
+
+ * riece-button.el (riece-identity-button-popup-menu)
+ (riece-identity-button-click): Suppress byte-compile warnings;
+ `save-excursion' defeated by `set-buffer'.
+
+ * riece-async.el (riece-async-open-network-stream): Suppress
+ byte-compile warnings; `save-excursion' defeated by `set-buffer'.
+
+2010-09-04 TAKAHASHI Kaoru <kaoru@kaisei.org>
+
+ * riece-mcat.el (riece-mcat-update): Suppress byte-compile
+ warnings; `save-excursion' defeated by `set-buffer'.
+
+ * riece-shrink-buffer.el (riece-shrink-buffer): Suppress
+ byte-compile warnings; `save-excursion' defeated by `set-buffer'.
+
+ * riece-ruby.el (riece-ruby-reset-process-buffer)
+ (riece-ruby-execute, riece-ruby-filter)
+ (riece-ruby-inspect): Suppress byte-compile warnings;
+ `save-excursion' defeated by `set-buffer'.
+
+ * riece-doctor.el (riece-doctor-after-privmsg-hook): Suppress
+ byte-compile warnings; `save-excursion' defeated by `set-buffer'.
+
+2010-09-01 TAKAHASHI Kaoru <kaoru@kaisei.org>
+
+ * riece-debug.el (riece-debug-1)
+ (riece-debug-reset-standard-output, riece-ignore-errors): Suppress
+ byte-compile warnings; `save-excursion' defeated by `set-buffer'.
+
+2010-05-28 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-globals.el (riece-mode-line-buffer-identification)
+ (riece-channel-indicator, riece-long-channel-indicator)
+ (riece-channel-list-indicator, riece-user-indicator)
+ (riece-away-indicator, riece-operator-indicator)
+ (riece-channel-status-indicator): Mark as risky-local-variable.
+
+2010-04-07 Daiki Ueno <ueno@unixuser.org>
+
+ * COMPILE (riece-install): Add workaround for XEmacs 21.5.
+
+2009-09-10 Daiki Ueno <ueno@unixuser.org>
+
+ * Riece: Version 6.1.0 released.
+
+ * riece.el (riece-read-variables-files)
+ (riece-save-variables-files): Revert to use setq instead of
+ custom-set-variables. Fixes #27384.
+ <http://savannah.nongnu.org/bugs/?27384>
+
+2009-08-28 TAKAHASHI Kaoru <kaoru@kaisei.org>
+
+ * riece-addon.el (riece-command-insinuate-addon)
+ (riece-command-uninstall-addon, riece-command-unload-addon): Fix
+ "Wrong type argument" error on not riece-addon-list-mode.
+
+2009-07-26 TAKAHASHI Kaoru <kaoru@kaisei.org>
+
+ * riece-skk-kakutei.el: Fix Author header.
+ * riece-foolproof.el: Ditto.
+ * riece-layout.el: Ditto.
+
+2009-05-30 Daiki Ueno <ueno@unixuser.org>
+
+ * Riece: Version 6.0.0 released.
+
+2009-04-23 Daiki Ueno <ueno@unixuser.org>
+
+ * riece.el (riece-submit-bug-report): Just visit the tracker URL.
+
+2009-04-22 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-addon-modules.el (riece-addon-modules): Don't mention
+ riece-notify.
+ * Makefile.am (EXTRA_DIST): Remove riece-notify.el.
+ * riece-notify.el: Remove; use riece-desktop-notify.el.
+
+2009-03-30 OHASHI Akira <bg66@koka-in.org>
+
+ * riece-desktop-notify.el: New add-on.
+ * riece-addon-modules.el (riece-addon-modules): Add
+ riece-desktop-notify.
+ * riece-mcat-japanese.el (riece-mcat-japanese-alist): Translate
+ "Display notification to desktop.".
+ * Makefile.am (EXTRA_DIST): Add riece-desktop-notify.el.
+
+2009-03-30 OHASHI Akira <bg66@koka-in.org>
+
+ * riece-keyword.el (riece-keyword-message-filter): Fix for the infinite
+ loop.
+
+2008-10-13 OHASHI Akira <bg66@koka-in.org>
+
+ * riece-mini.el (riece-mini-show-backlog): Fix for multibyte
+ characters.
+
+2008-09-08 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-notify.el: New add-on.
+ * riece-addon-modules.el (riece-addon-modules): Add
+ riece-notify (commented).
+ * Makefile.am (EXTRA_DIST): Add riece-notify.el.
+
+2008-08-25 TAKAHASHI Kaoru <kaoru@kaisei.org>
+
+ * riece-commands.el (riece-command-enter-message): Fix behavior at
+ last line of buffer.
+ (riece-command-enter-message-to-user): Ditto.
+ (riece-command-enter-message-as-notice): Ditto.
+
+2008-06-11 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-options.el (riece-use-full-window): Abolish unused option.
+ * riece-layout.el (riece-layout-alist): New layout "one-window".
+ (riece-configure-windows-one-window): New function.
+
+2008-06-07 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-options.el (riece-server-alist): Accept an integer for
+ :service.
+
+2008-06-06 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-compat.el (riece-make-local-hook): New alias.
+ (riece-derived-mode-p): New alias.
+ (riece-set-process-query-on-exit-flag): New alias.
+
+2008-06-05 TAKAHASHI Kaoru <kaoru@kaisei.org>
+
+ * riece-options.el (riece-server-alist): Fix :value for username,
+ password, function and coding-system.
+
+2008-06-02 Daiki Ueno <ueno@unixuser.org>
+
+ * riece.el (riece-read-variables-files): Re-evaluate custom settings.
+
+2008-05-30 Daiki Ueno <ueno@unixuser.org>
+
+ * Riece: Version 5.0.0 released.
+
+2008-05-28 Daiki Ueno <ueno@unixuser.org>
+
+ * riece.el (riece-save-variables-files): Generate
+ custom-set-variables instead of a list of setq.
+
+ * riece-options.el (riece-server-alist): Simplify custom-type.
+ * riece-coding.el: Move defcustom to riece-options; require
+ 'riece-options.
+
+2008-05-27 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-menu.el (riece-menu-create-channels-menu): Remove
+ placeholder channels.
+
+2008-05-27 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-addon-modules.el (riece-addon-modules): Translate add-on
+ description.
+
+ * riece-menu.el (riece-menu-items): Define with defcustom; use
+ riece-mcat to translate menu labels; bind
+ riece-command-configure-windows.
+ (riece-menu-requires): Depend on riece-mcat.
+ (riece-menu-insinuate): Re-evaluate riece-menu-items.
+
+ * riece-url.el (riece-url-command-mode-hook): Translate "Open URL...".
+
+2008-05-27 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-display.el (riece-update-status-indicators): Don't update
+ riece-user-indicator if riece-real-nickname is not fixed.
+
+ * COMPILE (riece-icons): Re-order filenames.
+ * Makefile.am (EXTRA_DIST): Add new toolbar icons.
+
+ * riece-command-change-layout.xpm:
+ * riece-command-configure-windows.xpm:
+ * riece-command-join.xpm:
+ * riece-command-part.xpm:
+ * riece-command-quit.xpm: New toolbar icons.
+
+2008-04-15 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-mcat-japanese.el (riece-mcat-japanese-alist): Translate
+ "No information given".
+
+ * riece-server.el (riece-open-server): Record errors for debug.
+
+ * riece-irc.el (riece-irc-open-server): Send NICK before USER,
+ following the recommendation in "3.1 Connection Registration" of
+ RFC2812.
+ (riece-irc-open-server): Fixed typo in the commit on 2008-04-04.
+
+2008-04-04 春日 玄 KASUGA Toru <kasuga.toru@jp.fujitsu.com>
+
+ * riece-irc.el (riece-irc-open-server): Encode realname when
+ issueing a USER command.
+
+2008-03-26 Takeru Naito <takeru.naito@gmail.com>
+
+ * riece-keyword.el (riece-keyword-message-filter): Don't match to
+ empty string if riece-keywords is nil, or it only contains regexp
+ matchers.
+
+2008-02-01 Daiki Ueno <ueno@unixuser.org>
+
+ * riece.el (riece-save-variables-files): Display message
+ before/after saving files.
+ * riece-mcat-japanese.el (riece-mcat-japanese-alist): Translate
+ these mesasges for riece-save-variables-files.
+
+2007-12-21 OHASHI Akira <bg66@koka-in.org>
+
+ * riece-mini.el (riece-mini-send-message): Use riece-format-identity.
+
+2007-10-13 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-twitter.el (riece-twitter-update): Don't send extra
+ headers only if it is called interactively.
+
+2007-10-12 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-twitter.el (riece-twitter-update): Don't send extra headers.
+
+2007-09-04 Didier Verna <didier@xemacs.org>
+
+ * riece-addon.el (riece-addon-list-mark-face-alist): Fix misuse of
+ the list widget type.
+ * riece-google.el (riece-google-program): Ditto.
+ * riece-highlight.el (riece-channel-list-mark-face-alist): Ditto.
+ * riece-keyword.el (riece-notify-keyword-functions)
+ (riece-keyword-notify-functions): Ditto.
+ * riece-layout.el (riece-layout-alist): Ditto.
+ * riece-rdcc.el (riece-rdcc-send-program)
+ (riece-rdcc-decode-address-program): Ditto.
+
+2007-08-19 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-commands.el (riece-command-kick-with-ban): New command.
+
+2007-06-21 Nikita Danilov <nikita@clusterfs.com>
+
+ * riece-000.el (riece-handle-001-message): Run
+ riece-after-login-hook before joining in startup channels.
+
+ * riece-mcat.el (riece-mcat): Don't load localized messages if
+ mule is off.
+
+2007-06-06 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-twitter.el (riece-twitter-set-credential): New command.
+ (riece-twitter-update): New command.
+ (riece-twitter-message-filter): Use it.
+ (riece-twitter-sentinel): New function.
+
+2007-06-05 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-twitter.el (riece-twitter-message-filter): Send a "source"
+ parameter.
+
+2007-05-29 Daiki Ueno <ueno@unixuser.org>
+
+ * Riece: Version 4.0.0 released.
+
+2007-05-29 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-twitter.el (riece-twitter-credential): Define with defcustom.
+ (riece-twitter-cache-credential): New user option.
+ (riece-twitter-message-filter): Ask Twitter username and password.
+
+2007-05-28 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-log.el (riece-log-display-message-function): Just call
+ riece-format-message.
+
+ * riece-message.el (riece-format-message-1): Renamed from
+ riece-format-message.
+ (riece-format-message): Pick a function from
+ riece-message-format-function-alist.
+
+2007-04-24 OHASHI Akira <bg66@koka-in.org>
+
+ * riece-log.el (riece-log-display-message-function): Use
+ riece-message-format-function-alist.
+
+2007-04-18 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-twitter.el: New add-on.
+ * riece-addon-modules.el (riece-addon-modules): Add riece-twitter.
+ * Makefile.am (EXTRA_DIST): Add riece-twitter.el.
+
+ * riece-ctcp.el (riece-ctcp-action-format-message): New function.
+ (riece-handle-ctcp-action-request): Use it.
+ (riece-command-ctcp-action): Use it.
+
+ * riece-message.el (riece-message-format-function-alist): New user
+ option.
+ (riece-display-message-1): Pick a format function from
+ riece-message-format-function-alist.
+
+2007-04-16 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-rdcc.el (riece-rdcc-server-port): New user option.
+ (riece-rdcc-send-program): Bind `port'.
+
+2007-02-12 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-handle.el (riece-handle-notice-message): Don't check the
+ scope of the message if riece-real-nickname is nil.
+
+2007-01-29 Daiki Ueno <ueno@unixuser.org>
+
+ * Riece: Version 3.1.2 released.
+
+2007-01-29 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-ctcp.el (riece-handle-ctcp-ping-request): Removed useless
+ argument for `format'.
+ * riece-mcat.el (riece-mcat-extract): New local variable `pointer'.
+ * riece-epg.el (epg-cancel): Autoload.
+ * riece-options.el (riece): Specify :group.
+
+2007-01-22 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-mcat.el (riece-mcat-extract): Abolished ALIST arg.
+
+2007-01-19 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-options.el (riece-addons): Insinuate riece-mcat by default.
+ * riece-addon-modules.el (riece-addon-modules): Add riece-mcat.
+ * riece-mcat.el: Implement add-on interface.
+ (riece-mcat-alist): Removed.
+ (riece-mcat-description): New constant.
+ (riece-mcat-insinuate): New function.
+ (riece-mcat-uninstall): New function.
+
+2007-01-19 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-mcat.el (riece-mcat-update): New function.
+ * Makefile.am (update-mcat): New target.
+ * COMPILE (riece-modules): Moved riece-mcat-japanese.el to
+ riece-mcat-modules.
+ (riece-mcat-modules): New variable.
+ (riece-examine-modules): Append riece-mcat-modules.
+ (riece-update-mcat): New function.
+
+2007-01-18 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-mcat.el: New file.
+ * riece-mcat-japanese.el: New file.
+ * COMPILE (riece-modules): Added riece-mcat and riece-mcat-japanese.
+ * Makefile.am (EXTRA_DIST): Added riece-mcat.el and
+ riece-mcat-japanese.el.
+
+2006-12-18 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-package-info.el.in: New file.
+ * COMPILE (riece-modules): Added riece-package-info.
+ * Makefile.am (DISTCLEANFILES): Added riece-package-info.el.
+
+2006-09-29 Daiki Ueno <ueno@unixuser.org>
+
+ * Riece: Version 3.1.1 released.
+ * configure.ac: Bump up version to 3.1.1.
+
+2006-09-27 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-addon.el (riece-command-list-addons): Describe "save the
+ current setting".
+ (riece-command-enable-addon): Make sure the addon to be insinuated.
+
+2006-08-30 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-layout.el (riece-layout-alist): Added
+ riece-configure-windows-spiral.
+ (riece-configure-windows-spiral): New window layout. Written by
+ URABE Shyouhei <root@mput.dip.jp>.
+
+ * riece-options.el (riece-addons): Enable riece-shrink-buffer by
+ default.
+
+ * aproxy.rb (AProxy::start): Fixed a typo (@out -> $stdout).
+
+2006-07-29 Daiki Ueno <ueno@unixuser.org>
+
+ * Riece: Version 3.1.0 released.
+ * configure.ac: Bump up version to 3.1.0.
+
+2006-07-17 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-commands.el (riece-command-join-channel): Simplified by
+ using riece-server-opened.
+ (riece-command-part-channel): Ditto.
+
+2006-07-16 Daiki Ueno <ueno@unixuser.org>
+
+ * riece.el (riece-save-variables-files): Place ";;; Do not edit
+ this file!" at the beginning of ~/.riece/save.
+
+ * riece-server.el (riece-reset-process-buffer): Make
+ riece-filter-running local to the server buffer.
+ * riece-filter.el (riece-filter): Allow only a message handler to
+ run at a time.
+ * riece-globals.el (riece-filter-running): New variable.
+
+2006-06-01 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-ndcc.el: Don't use calc.
+
+ * riece-300.el (riece-handle-353-message): Append " " to every 353
+ line before inserting it to riece-353-message-alist.
+
+2006-05-29 Daiki Ueno <ueno@unixuser.org>
+
+ * Riece: Version 3.0.0 released.
+ * configure.ac: Bump up version to 3.0.0.
+
+2006-05-16 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-options.el (riece-realname): New user option.
+
+ * riece-irc.el (riece-irc-open-server): Changed the meaning of
+ riece-username. i.e. now riece-username represents the user's
+ login name and riece-realname is the replacement of the former
+ riece-username.
+ * riece-server.el (riece-server-keyword-map): New keyword :realname.
+
+2006-05-06 Yoichi NAKAYAMA <yoichi@geiin.org>
+
+ * riece-commands.el (riece-command-close-server): Cause error
+ on non-existent server process.
+
+2006-04-26 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-skk-kakutei.el: Declare some variables and autoload
+ 'skk-kakutei to suppress compilation warnings.
+
+ * riece-xfaceb.el: Don't enclose autoloads with ignore-errors;
+ autoloads should not report errors.
+
+ * riece-commands.el (riece-command-save-variables): New command.
+
+ * riece-epg.el
+ (riece-epg-passphrase-callback-function-for-decrypt): New
+ function.
+ (riece-command-set-passphrase): Renamed.
+ (riece-epg-message-filter): Don't query passphrase; if decryption
+ fails add button to try again.
+ (riece-epg-add-encrypted-button): New function.
+ (riece-epg-encrypted-button-notify): New function.
+
+2006-04-25 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-epg.el: New add-on.
+ * riece-addon-modules.el (riece-addon-modules): Added riece-epg.
+ * Makefile.am (EXTRA_DIST): Added riece-epg.el.
+
+2006-04-13 Steve Youngs <steve@sxemacs.org>
+
+ * riece-commands.el (riece-command-invite): Add missing `:' to
+ string sent to server.
+
+ * riece-300.el (riece-handle-341-message): swap values for
+ `channel' and `user'.
+
+2006-04-03 Daiki Ueno <ueno@unixuser.org>
+
+ * riece.el (riece-buffer-alist): " *Debug*" -> "*Debug*".
+ (riece-save-variables-files): Fixed a typo in the docstring.
+
+2006-01-14 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-display.el (riece-part-channel): Emit
+ 'channel-list-changed signal.
+
+2005-12-29 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-alias.el (riece-alias-alternate-separator): Reverted the
+ default value.
+
+2005-11-19 Daiki Ueno <ueno@unixuser.org>
+
+ * Riece: Version 2.0.2 released.
+ * configure.ac: Bump up version to 2.0.2.
+
+2005-11-19 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-alias.el (riece-alias-alternate-separator): Changed from
+ "@" -> "%".
+
+ * test/test-riece-cache.el: New test cases.
+ * test/Makefile.am (EXTRA_DIST): Added test-riece-cache.el.
+
+ * Makefile.am (EXTRA_DIST): Added riece-cache.el.
+
+ * riece-commands.el (riece-command-part-channel): Signal an error
+ if TARGET server has not opened.
+
+ * riece-channel.el: Require 'riece-cache.
+ (riece-find-channel): Increase priority of given channel name in
+ riece-channel-cache.
+ (riece-forget-channel): Remove given channel name from
+ riece-channel-cache.
+ (riece-get-channel): Register given channel name in
+ riece-channel-cache (if it is being added to riece-channel-obarray.)
+ * riece-server.el (riece-reset-process-buffer): Initialize
+ riece-channel-cache.
+ * riece-options.el (riece-channel-cache-max-size): New user
+ option.
+ * riece-misc.el (riece-get-channels-on-server): Get channel names
+ from riece-channel-cache.
+ * riece-globals.el (riece-channel-cache): New variable.
+
+2005-11-18 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-cache.el: Renamed from riece-lru.el.
+
+2005-11-18 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-user.el: Require 'riece-lru.
+ (riece-find-user): Increase priority of given username in
+ riece-user-lru.
+ (riece-forget-user): Remove given username from riece-user-lru.
+ (riece-rename-user): Rename given username in riece-user-lru.
+ (riece-get-user): Register given username in riece-user-lru (if
+ it is being added to riece-user-obarray.)
+ * riece-server.el: Require 'riece-lru.
+ (riece-reset-process-buffer): Initialize riece-user-lru.
+ * riece-options.el (riece-user-lru-max-size): New user option.
+ * riece-misc.el: Require 'riece-lru.
+ (riece-get-users-on-server): Get usernames from riece-user-lru.
+ * riece-globals.el (riece-user-lru): New variable.
+ * COMPILE (riece-modules): Added riece-lru.
+ * riece-lru.el: New file.
+
+ * riece-develop.el: New file.
+
+2005-10-27 Masatake YAMATO <jet@gyve.org>
+
+ * url-riece.el (url-irc-riece): Use `server-name'
+ to create an argument for `riece-parse-identity'.
+ `server' was used.
+
+2005-09-29 Daiki Ueno <ueno@unixuser.org>
+
+ * Riece: Version 2.0.1 released.
+ * configure.ac: Bump up version to 2.0.1.
+
+2005-09-11 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-addon.el (riece-command-list-addons): Adjust width of 2nd
+ column to the length of the longest add-on name.
+
+2005-09-10 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-alias.el (riece-alias-abbrev-identity-string): Compare car
+ of riece-alias-alist with identities case insensitively.
+
+2005-09-05 Daiki Ueno <ueno@unixuser.org>
+
+ * Makefile.am (EXTRA_DIST): Added riece-xfaceb.el.
+ * riece-addon-modules.el (riece-addon-modules): Added riece-xfaceb.
+
+2005-09-03 Steve Youngs <steve@sxemacs.org>
+
+ * riece-xfaceb.el: New file. Display X-Face and colour Face
+ images in IRC buffer, getting the image data from BBDB records.
+
+2005-08-31 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-unread.el (riece-unread-requires): Require 'riece-history.
+
+2005-08-29 Daiki Ueno <ueno@unixuser.org>
+
+ * Riece: Version 2.0.0 released.
+ * riece-version.el (riece-version-number): Bump up to 2.0.0.
+
+2005-08-29 Daiki Ueno <ueno@unixuser.org>
+
+ * test/test-riece-log.el
+ (test-riece-log-display-message-function): Enable riece-log addon.
+
+ * test/test-riece-ruby.el (lunit-test-case-teardown): Reset
+ riece-ruby-output-handler-alist and riece-ruby-output-queue-alist.
+
+ * riece-server.el (riece-server-keyword-map): Abolished
+ :coding-system-alist keyword.
+ (riece-send-string): Take the target identity as the 2nd argument.
+
+ * riece-identity.el (riece-channel-coding-system-alist): Renamed
+ from riece-coding-system-alist.
+
+ * riece-globals.el (riece-coding-system-alist): Abolished.
+
+ * riece-commands.el (riece-command-topic): Pass the target
+ identity to riece-send-string.
+ (riece-command-kick): Ditto.
+ (riece-command-send-message): Ditto.
+ (riece-command-enter-message-to-user): Ditto.
+ (riece-command-join-channel): Ditto.
+ (riece-command-part-channel): Ditto.
+
+2005-08-29 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-identity.el (riece-coding-system-for-identity): Moved from
+ riece-coding.el.
+ (riece-decoded-string-for-identity): Ditto.
+
+ * riece-300.el (riece-handle-322-message): Decode message per
+ channel.
+ (riece-handle-set-topic): Ditto.
+
+ * riece-handle.el (riece-handle-notice-message): Decode message
+ per channel.
+ (riece-handle-part-message): Ditto.
+ (riece-handle-kick-message): Ditto.
+ (riece-handle-topic-message): Ditto.
+
+2005-08-28 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-handle.el (riece-handle-privmsg-message): Use
+ riece-decoded-string & riece-decoded-string-for-identity.
+
+ * riece-coding.el (riece-coding-system-alist): New user option.
+ (riece-coding-system-for-identity): New function.
+ (riece-encoded-string): New function.
+ (riece-decoded-string): New alias.
+ (riece-decoded-string-for-identity): New function.
+
+2005-08-27 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-addon.el (riece-uninstall-addon): Don't check the add-on
+ is enabled.
+ (riece-uninstall-addon): Don't use riece-remprop.
+ (riece-enable-addon): Put 'riece-addon-enabled property on the
+ add-on feature.
+ (riece-disable-addon): Ditto.
+ (riece-command-list-addons): Check 'riece-addon-enabled property
+ instead of riece-*-enabled variables.
+
+2005-08-27 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-options.el (riece-shrink-buffer-idle-time-delay):
+ Abolished; moved to riece-shrink-buffer.el.
+ (riece-max-buffer-size): Ditto.
+ (riece-shrink-buffer-remove-chars): Ditto.
+
+ * riece.el (riece-shrink-buffer-idle-timer): Abolished; moved to
+ riece-shrink-buffer.el.
+ (riece): Don't set riece-shrink-buffer-idle-timer here.
+ (riece-exit): Don't cancel riece-shrink-buffer-idle-timer here.
+
+ * riece-shrink-buffer.el: New add-on.
+ * riece-addon-modules.el (riece-addon-modules): Added
+ riece-shrink-buffer.
+ * Makefile.am (EXTRA_DIST): Added riece-shrink-buffer.el.
+
+2005-08-27 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-highlight.el (riece-highlight-uninstall): Use
+ riece-remprop instead of remprop.
+
+ * riece-addon.el (riece-uninstall-addon): Use riece-remprop
+ instead of remprop.
+
+ * riece-xemacs.el (riece-remprop): New alias.
+ * riece-emacs.el (riece-remprop): New function.
+
+ * COMPILE (riece-compile-modules): Add current directory to load-path.
+
+ * riece-history.el (riece-history-requires): New function.
+ * riece-addon.el (riece-insinuate-addon-1): Require add-on feature.
+
+2005-08-27 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-foolproof.el (riece-foolproof-description): Made it more
+ descriptive.
+
+ * riece-url.el (riece-url-uninstall): Call easy-menu-remove-item.
+
+ * riece-addon.el (riece-addon-list-mode-map): Bind
+ riece-command-unload-addon.
+ (riece-insinuate-addon-1): New function; renamed from
+ riece-insinuate-addon.
+ (riece-insinuate-addon): Use it; re-insinuate add-ons preceding to
+ the add-on.
+ (riece-addon-list-set-point): New function.
+ (riece-command-unload-addon): New command.
+
+2005-08-27 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-menu.el (riece-menu-uninstall): Call easy-menu-remove.
+
+ * riece-toolbar.el (riece-toolbar-original-toolbar) [XEmacs]: New
+ variable.
+ (riece-unset-toolbar): New function.
+ (riece-toolbar-uninstall): Call riece-unset-toolbar.
+ (riece-toolbar-command-mode-hook): Renamed from
+ riece-toolbar-insinuate-in-command-buffer.
+
+ * riece-icon.el (riece-icon-enable): Update
+ mode-line-buffer-identification here.
+ (riece-icon-disable): Ditto.
+
+2005-08-26 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-addon.el (riece-uninstall-addon): Update
+ riece-addon-dependencies.
+
+2005-08-26 Daiki Ueno <ueno@unixuser.org>
+
+ * riece.el (riece-command-mode): Set
+ riece-mode-line-buffer-identification.
+ (riece-dialogue-mode): Ditto.
+ (riece-channel-mode): Ditto.
+ (riece-channel-list-mode): Ditto.
+ (riece-user-list-mode): Ditto.
+ * riece-icon.el
+ (riece-icon-update-mode-line-buffer-identification): New function.
+ (riece-icon-insinuate): Use it.
+ (riece-icon-uninstall): Use it.
+ * riece-globals.el (riece-mode-line-buffer-identification): New
+ variable.
+
+2005-08-26 Daiki Ueno <ueno@unixuser.org>
+
+ * Make add-ons uninstallable.
+
+ * riece-xface.el (riece-xface-user-list-mode-hook): New function.
+ (riece-xface-insinuate): Use it.
+ (riece-xface-uninstall): New function.
+ * riece-url.el (riece-url-command-mode-hook): New function.
+ (riece-url-insinuate): Use it.
+ (riece-url-uninstall): New function.
+ * riece-unread.el (riece-unread-uninstall): New function.
+ * riece-toolbar.el (riece-toolbar-uninstall): New function.
+ * riece-rdcc.el (riece-rdcc-uninstall): New function.
+ * riece-ndcc.el (riece-ndcc-uninstall): New function.
+ * riece-mini.el (riece-mini-uninstall): New function.
+ * riece-menu.el (riece-menu-uninstall): New function.
+ * riece-lsdb.el: New function.
+ * riece-log.el (riece-log-uninstall): New function.
+ * riece-keyword.el (riece-keyword-uninstall): New function.
+ * riece-keepalive.el (riece-keepalive-uninstall): New function.
+ * riece-kakasi.el (riece-kakasi-uninstall): New function.
+ * riece-ignore.el (riece-ignore-uninstall): New function.
+ * riece-icon.el (riece-icon-user-list-mode-hook): New function.
+ (riece-icon-channel-list-mode-hook): New function.
+ (riece-icon-original-mode-line-buffer-identification): New variable.
+ (riece-icon-insinuate): Use them.
+ (riece-icon-uninstall): New function.
+ * riece-history.el
+ (riece-history-after-switch-to-channel-functions): New function.
+ (riece-history-insinuate): Use it.
+ (riece-history-uninstall): New function.
+ * riece-highlight.el (riece-highlight-uninstall): New function.
+ * riece-hangman.el (riece-hangman-uninstall): New function.
+ * riece-google.el (riece-google-uninstall): New function.
+ * riece-foolproof.el (riece-foolproof-uninstall): New function.
+ * riece-eval.el (riece-eval-uninstall): New function.
+ * riece-eval-ruby.el (riece-eval-ruby-uninstall): New function.
+ * riece-doctor.el (riece-doctor-uninstall): New function.
+ * riece-ctlseq.el (riece-ctlseq-uninstall): New function.
+ * riece-ctcp.el (riece-ctcp-dialogue-font-lock-keywords): New variable.
+ (riece-ctcp-uninstall): New function.
+ * riece-button.el (riece-button-channel-list-mode-hook): New function.
+ * riece-biff.el (riece-biff-uninstall): New function.
+
+2005-08-26 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-options.el (riece-saved-forms): Added riece-addons.
+
+ * riece-addon.el: Require 'riece-addon-modules.
+ (riece-command-list-addons): List all available add-ons from
+ riece-addon-modules.
+ (riece-addon-list-mode-map): Bind riece-command-insinuate-addon
+ and riece-command-uninstall-addon.
+ (riece-insinuate-addon): Rebuild riece-addon-dependencies.
+ (riece-command-insinuate-addon): New command.
+ (riece-command-uninstall-addon): New command.
+
+ * COMPILE (riece-examine-modules): New function.
+ (riece-examine): Use it.
+ (riece-compile): Use it.
+ (riece-install): Use it.
+ (riece-compile-package): Use it.
+ (riece-install-package): Use it.
+
+ * Makefile.am (EXTRA_DIST): Added riece-addon-modules.el.
+
+ * riece-addon-modules.el: New file.
+
+2005-08-25 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-addon.el (riece-command-list-addons): Use
+ riece-addon-dependencies instead of riece-addons.
+ (riece-command-enable-addon): Ditto.
+ (riece-command-disable-addon): Ditto.
+ (riece-uninstall-addon): New function.
+
+2005-08-25 Daiki Ueno <ueno@unixuser.org>
+
+ * riece.el (riece): Don't override riece-addons setting.
+
+ * riece-globals.el (riece-addon-dependencies): New variable.
+
+ * riece-addon.el (riece-sort-addon-dependencies): Rename from
+ riece-resolve-addon-dependencies; return addon dependencies as an
+ alist, instead of returning a list of addons.
+
+2005-08-20 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-addon.el (riece-command-enable-addon): Redraw entire
+ add-on list.
+ (riece-command-disable-addon): Ditto.
+
+2005-08-17 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-filter.el (riece-handle-message): Use
+ riece-funcall-ignore-errors instead of riece-ignore-errors.
+
+ * riece-ctcp.el (riece-handle-ctcp-request): Use
+ riece-funcall-ignore-errors instead of riece-ignore-errors.
+ (riece-handle-ctcp-response): Ditto.
+
+2005-08-16 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-options.el (riece-data-directory): Use load-file-name.
+
+2005-08-15 TAKAHASHI Kaoru <kaoru@kaisei.org>
+
+ * riece-options.el (riece-data-directory): Avoid compile time
+ error when locate-data-directory undefined.
+
+2005-08-15 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-options.el (riece-quit-timeout): Set default to 1.
+
+ * riece-irc.el (riece-irc-quit-server-process): Display message
+ before/after sending QUIT.
+
+2005-08-14 Daiki Ueno <ueno@unixuser.org>
+
+ * riece.el (riece-addons-insinuated): Abolished.
+ (riece): Don't check riece-addons-insinuated.
+
+ * riece-addon.el (riece-insinuate-addon): Put
+ 'riece-addon-insinuated property on add-on feature.
+
+2005-08-13 Daiki Ueno <ueno@unixuser.org>
+
+ * COMPILE (riece-install-package): Install *.xpm and *.rb in etc/riece.
+
+ * riece-async.el (riece-async-open-network-stream): Locate Ruby
+ script files in riece-data-directory.
+ * riece-toolbar.el (riece-make-toolbar-from-menu): Locate icon
+ files in riece-data-directory.
+ * riece-ruby.el (riece-ruby-execute): Locate Ruby script files in
+ riece-data-directory.
+ * riece-options.el (riece-data-directory): New user option.
+
+2005-08-12 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-ruby.el (riece-ruby-filter): Pass timestamp of output
+ event to output-handler.
+
+2005-08-12 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-button.el (riece-user-button-popup-menu): Simplified
+ menu item titles.
+
+ * COMPILE (riece-compile-module): New function.
+ (riece-examine): New function.
+
+ * Makefile.am (compile-individually): New rule.
+
+ * riece-log.el (riece-log-file-name-regexp): New constant.
+ (riece-log-get-file): Add 2nd argument coding-system.
+ (riece-log-get-files): Add 2nd argument time.
+ (riece-log-insert): Simplified; determine coding-system from
+ suffix of each log file.
+ (riece-log-dired): Renamed from riece-log-open-directory.
+ (riece-log-open-directory-function): Abolished.
+ (riece-log-make-file-name): Renamed from riece-log-get-file.
+ (riece-log-list-files): Renamed from riece-log-get-files.
+ (riece-log-directory): Renamed from riece-log-get-directory.
+
+ * Makefile.am (EXTRA_DIST): Added aproxy.rb.
+
+ * COMPILE (riece-scripts): Added "aproxy.rb".
+
+ * riece-async.el (riece-async-buffer-size): Renamed from
+ riece-async-max-buffer-size.
+ (riece-async-backup-file): New user option.
+ (riece-async-server-program): New variable.
+ (riece-async-server-program-arguments): New variable.
+ (riece-async-open-network-stream): Use aproxy.rb.
+
+ * aproxy.rb: New file.
+
+ * riece-ruby.el (riece-ruby-out-file): New user option.
+ (riece-ruby-err-file): New user option.
+ (riece-ruby-log-file): New user option..
+ (riece-ruby-server-program-arguments): New variable.
+ (riece-ruby-filter): Call output-handler within
+ riece-debug-with-backtrace; erase process output.
+ (riece-ruby-run-exit-handler): Call exit-handler within
+ riece-debug-with-backtrace.
+
+ * server.rb: Don't bind @err in execution environment;
+ added logging feature.
+
+2005-08-11 Daiki Ueno <ueno@unixuser.org>
+
+ * server.rb: Connect $stdout and $stderr to StringIO objects.
+
+ * riece-async.el: Use riece-ruby (partially).
+
+ * riece-eval-ruby.el (riece-eval-ruby-prefix-regexp): New user option.
+ (riece-eval-ruby-exit-handler): Print "nil".
+
+2005-08-11 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-hangman.el (riece-hangman-hello-regexp): Changed regexp.
+ (riece-hangman-bye-regexp): Ditto.
+
+ * riece-doctor.el (riece-doctor-hello-regexp): Changed regexp.
+ (riece-doctor-bye-regexp): Ditto.
+
+ * riece-ruby.el: Moved add-on stuff to riece-eval-ruby.el.
+
+ * riece-eval-ruby.el: New add-on.
+ * COMPILE (riece-modules): Add riece-eval-ruby.
+ * Makefile.am (EXTRA_DIST): Add riece-eval-ruby.el.
+
+2005-08-11 Daiki Ueno <ueno@unixuser.org>
+
+ * server.rb (Server::unescape): Fixed.
+
+ * riece-ruby.el: Implement add-on API.
+ (riece-ruby-filter): Fixed regexp; fixed argument order of
+ output-handler.
+ (riece-ruby-run-exit-handler): Remove exit-handler entry before
+ running it to avoid recursion; call riece-ruby-clear if
+ exit-handler is specified.
+ (riece-ruby-exit-handler): Don't call riece-ruby-clear.
+
+ * riece-rdcc.el: Use riece-ruby.
+
+2005-08-11 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-ruby.el (riece-ruby-property-alist): New variable
+ (riece-ruby-set-property): New function.
+ (riece-ruby-property): New function.
+ (riece-ruby-execute): Locate server.rb from load-path.
+
+ * Makefile.am (EXTRA_DIST): Added riece-ruby.el and server.rb.
+
+ * COMPILE (riece-modules): Added riece-ruby.
+ (riece-icons): Use filename instead of symbol.
+ (riece-scripts): New variable.
+ (riece-install-icons): Use filename instead of symbol.
+ (riece-install-scripts): New function.
+ (riece-install): Call riece-install-scripts.
+ (riece-install-package): Ditto.
+
+2005-08-11 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-ruby.el: Add docs for variables.
+ (riece-ruby-substitute-variables): Substitute multiple variables.
+ (riece-ruby-filter): Call output-handler/exit-handler with program
+ name.
+
+2005-08-11 Daiki Ueno <ueno@unixuser.org>
+
+ * server.rb: Renamed from rubyserv.rb; s/RubyServ/Server/.
+ * riece-ruby.el (riece-ruby-server-program): Follow the filename
+ change.
+ (riece-ruby-set-output-handler): New function.
+
+2005-08-11 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-ruby.el: Fixed example.
+ (riece-ruby-server-program): New variable.
+ (riece-ruby-status-alist): New variable.
+ (riece-ruby-status): Abolished.
+ (riece-ruby-escaped-data): Renamed from riece-ruby-input.
+ (riece-ruby-reset-process-buffer): New function.
+ (riece-ruby-send-exit): New function.
+ (riece-ruby-filter): Call riece-ruby-run-exit-handler if the
+ program is exited.
+ (riece-ruby-run-exit-handler): New function.
+ (riece-ruby-execute): Don't expect program name.
+ (riece-ruby-clear): New function.
+ (riece-ruby-set-exit-handler): New function.
+
+ * rubyserv.rb (RubyServ::dispatch_eval): Don't expect program
+ name; eval under the binding of RubyServ::C.
+ (RubyServ::dispatch_poll): Don't clear @thr.
+ (RubyServ::dispatch_exit): New method.
+
+2005-08-10 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-ruby.el: New file.
+ * rubyserv.rb: Rewrite.
+
+2005-08-09 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-mini.el (riece-mini-message-no-log): Defined as a
+ function.
+ (riece-mini-requires): Fixed indent.
+
+2005-08-08 Daiki Ueno <ueno@unixuser.org>
+
+ * 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 <ueno@unixuser.org>
+
+ * riece-alias.el (riece-alias-alternate-separator): Set to "@".
+
+2005-07-28 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-debug.el: Don't bind unused variable; prepend time to
+ debug message.
+
+2005-07-19 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-unread.el (riece-guess-channel-from-unread): Return
+ reversed copy of riece-unread-channels.
+
+ * riece-server.el (riece-server-parse-string): Use
+ string-to-number instead of string-to-int.
+
+2005-07-07 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-display.el (riece-channel-buffer): Return nil when
+ channel-buffer is killed.
+
+ * riece-debug.el (riece-debug-1): New function.
+ (riece-debug): Always return nil.
+
+2005-06-04 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-server.el (riece-server-keyword-map): Add :coding-system-alist.
+
+ * riece-irc.el (riece-irc-open-server): Init riece-coding-system-alist.
+
+ * riece-handle.el (riece-handle-privmsg-message): Retry with the
+ channel's coding-system if it differs from the server's
+ coding-system.
+
+ * riece-commands.el (riece-command-send-message): Pass prefix to
+ riece-send-string.
+
+ * riece-globals.el (riece-coding-system-alist): New variable.
+
+ * riece-coding.el (riece-decode-coding-string-1): Split from
+ riece-decode-coding-string; set riece-coding-encoded-string and
+ riece-coding-decoded-coding-system properties on decoded string.
+ (riece-retry-decode-coding-string): New function.
+ (riece-decoded-coding-system): Use it.
+
+2005-06-03 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-ruby.el: New file.
+
+2005-04-04 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-misc.el (riece-get-channels-on-server): New function.
+ (riece-get-users-on-server): Don't use riece-user-p.
+ (riece-get-identities-on-server): Call
+ riece-get-channels-on-server and riece-get-users-on-server.
+
+ * riece-identity.el (riece-completing-read-identity): Don't signal
+ an error when input string does not match riece-channel-regexp nor
+ riece-user-regexp.
+
+ * riece-300.el (riece-handle-366-message): Don't use riece-user-regexp.
+ (riece-handle-302-message): Ditto.
+ (riece-handle-313-message): Ditto.
+
+2005-03-22 Daiki Ueno <ueno@unixuser.org>
+
+ * rubyserv.rb: New file.
+
+2005-03-20 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-toolbar.el [XEmacs] (riece-make-toolbar-from-menu):
+ Pick up toolbar icons from etc/riece/.
+
+2005-03-12 Daiki Ueno <ueno@unixuser.org>
+
+ * riece.el (riece-buffer-alist): Init riece-debug-buffer.
+ (riece-submit-bug-report): Insert content of riece-debug-buffer.
+
+ * riece-globals.el (riece-debug-buffer): New variable.
+ * riece-filter.el (riece-sentinel): Use riece-debug.
+ * riece-display.el (riece-channel-buffer-name): Use riece-debug.
+ * riece-button.el (riece-identity-button-click): Use riece-debug.
+ * riece-debug.el (riece-debug): New function.
+ (riece-ignore-errors): Use it.
+
+ * riece-filter.el (riece-filter): Removed (eobp) check.
+
+2005-03-06 Daiki Ueno <ueno@unixuser.org>
+
+ * Riece: Version 1.0.8 released.
+ * riece-version.el (riece-version-number): Bump up to 1.0.8.
+
+2005-03-06 Daiki Ueno <ueno@unixuser.org>
+
+ * COMPILE (riece-compile-modules): Print summary.
+
+2005-03-05 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-version.el: Bind emacs-program-version.
+ * riece-debug.el: Require 'riece-options for riece-debug.
+
+ * riece-log.el (riece-log-insinuate): Use user-uid instead of
+ user-login-name and escape system-name for riece-log-lock-file.
+
+2005-03-02 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-log.el (riece-log-lock-file): Define with defvar.
+ (riece-log-display-message-function): Use riece-log-lock-file as
+ LOCKNAME of write-region.
+ (riece-log-insinuate): Generate name for riece-log-lock-file.
+
+2005-02-27 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-300.el (riece-handle-317-message): Format idle seconds in
+ human readable form.
+ (riece-handle-301-message): Don't use riece-user-regexp.
+ (riece-handle-311-message): Ditto.
+ (riece-handle-312-message): Ditto.
+ (riece-handle-317-message): Ditto.
+ (riece-handle-319-message): Ditto.
+
+ * riece-ctcp.el (riece-handle-ctcp-action-request): Prepend target.
+ (riece-command-ctcp-action): Ditto.
+
+2005-02-25 TAKAHASHI Kaoru <kaoru@kaisei.org>
+
+ * riece-globals.el (riece-obarray-size, riece-obarray): Abolish.
+ (riece-channel-obarray-size, riece-user-obarray-size)
+ (riece-channel-obaary, riece-user-obarray): New variables.
+ * riece-user.el (riece-find-user, riece-forget-user)
+ (riece-rename-user, riece-get-user): Use `riece-user-obarray'
+ instead of `riece-user-obarray'.
+ * riece-channel.el (riece-find-channel, riece-forget-channel)
+ (riece-get-channel): Use `riece-channel-obarray' instead of
+ `riece-obarray'.
+ * riece-misc.el (riece-get-identities-on-server): Ditto.
+ * riece-server.el (riece-reset-process-buffer): Ditto.
+
+2005-02-24 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-unread.el (riece-unread-after-switch-to-channel-function):
+ Clear riece-unread-channels case insensitively.
+
+ * riece-300.el (riece-handle-353-message): Use
+ riece-identity-assoc to pick an entry from
+ riece-353-message-alist.
+ (riece-handle-366-message): Ditto.
+ Reported by Steve Youngs <steve@sxemacs.org>.
+
+2005-02-19 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-debug.el (riece-funcall-ignore-errors): New function.
+ * riece-signal.el (riece-emit-signal): Use riece-funcall-ignore-errors.
+ * riece-filter.el (riece-handle-numeric-reply): Use
+ riece-funcall-ignore-errors.
+ (riece-handle-message): Ditto.
+ * riece-ctcp.el (riece-handle-ctcp-request): Use
+ riece-funcall-ignore-errors.
+
+2005-02-18 Steve Youngs <steve@sxemacs.org>
+
+ * riece-ctcp.el (riece-handle-ctcp-time-request): New.
+ (riece-handle-ctcp-time-response): New.
+ (riece-command-ctcp-time): New.
+ (riece-ctcp-enable): Add `riece-command-ctcp-time'.
+ (riece-ctcp-disable): Ditto.
+
+ * riece-layout.el (riece-layout-alist): Minor doc string fix --
+ escape a couple of parens.
+
+ * riece-version.el: defvar sxemacs-codename at compile time.
+ (riece-extended-version): Simplify the XEmacs section, add support
+ for SXEmacs.
+
+2005-02-17 TAKAHASHI Kaoru <kaoru@kaisei.org>
+
+ * riece-addon.el (riece-resolve-addons): Fixed
+ avoid add directory to addons condition.
+
+2005-02-10 TAKAHASHI Kaoru <kaoru@kaisei.org>
+
+ * riece-addon.el (riece-resolve-addons): Don't add directory to
+ addons.
+
+2005-02-09 Yoichi NAKAYAMA <yoichi@geiin.org>
+
+ * riece-commands.el (riece-command-part): Fix argument.
+
+2005-02-07 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-filter.el (riece-filter): Simplified.
+
+ * riece-addon.el (riece-resolve-addons): Check the existence of
+ riece-addon-directory.
+
+2005-02-06 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-filter.el (riece-filter): Modified regexp.
+
+2005-02-05 Daiki Ueno <ueno@unixuser.org>
+
+ * riece.el (riece-exit): Clear riece-window-configuration frame
+ parameter.
+ * riece-commands.el (riece-command-suspend-resume): Don't attempt
+ to restore window-configuration if the cdr of
+ riece-window-configuration frame parameter is nil.
+
+ * riece-filter.el (riece-chomp-string): New function.
+ (riece-filter): Use it.
+
+2005-02-05 Daiki Ueno <ueno@unixuser.org>
+
+ * Riece: Version 1.0.7 released.
+ * riece-version.el (riece-version-number): Bump up to 1.0.7.
+
+2005-02-05 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-keyword.el (riece-keyword-face): Change defface spec for tty.
+
+ * riece-toolbar.el (riece-toolbar-description): New constant.
+
+ * riece-keepalive.el: Require 'riece-options.
+ (riece-keepalive-ping-repeat): Define with defcustom.
+ (riece-keepalive-description): New constant.
+
+ * riece.el (riece-dialogue-mode-map): Bind
+ riece-command-suspend-resume.
+ * riece-commands.el (riece-command-suspend-resume): New command.
+
+ * riece-options.el (riece-addons): Enable riece-keyword by default.
+
+ * riece-button.el (riece-identity-button-popup-menu): Changed
+ interactivbe spect "@e" -> "e".
+ (riece-identity-button-click): New function.
+ (riece-make-identity-button-map): Bind riece-identity-button-click.
+
+2005-02-04 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-options.el (riece-part-message): New user option.
+ (riece-addons): Enable riece-alias and riece-ctlseq by default.
+ (riece-max-buffer-size): Change the default value to nil.
+
+ * riece-commands.el (riece-command-part): Use riece-part-message.
+
+2005-02-04 OHASHI Akira <bg66@koka-in.org>
+
+ * riece-eval.el (riece-eval-form): New function.
+ (riece-eval-display-message-function): Use it.
+
+2005-02-04 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-000.el (riece-handle-001-message): Use
+ riece-command-join-channel to join startup channels.
+
+ * riece-filter.el (riece-filter): Accept lines which end with LF.
+
+ * riece-300.el (riece-353-message-alist): Renamed from riece-353-users.
+ (riece-handle-353-message): Don't parse the reply.
+ (riece-handle-366-message): Parse 353 replies here; count users.
+
+ * riece-log.el (riece-log-enable): Add debug message.
+
+ * riece-keepalive.el: New add-on.
+ * COMPILE (riece-modules): Add riece-keepalive.
+ * Makefile.am (EXTRA_DIST): Add riece-keepalive.el.
+
+2005-02-04 OHASHI Akira <bg66@koka-in.org>
+
+ * riece-biff.el (riece-biff-functions): Abolish.
+ (riece-biff-after-display-message-function): Follow the change above.
+
+2005-02-04 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-server.el (riece-close-server-process): Switch to process
+ buffer when running riece-after-close-hook.
+
+ * COMPILE (riece-icons): Add all symbols from riece-toolbar-items.
+
+ * Makefile.am (EXTRA_DIST): Add riece-command-previous-channel.xpm,
+ riece-command-next-channel.xpm, and riece-submit-bug-report.xpm.
+
+ * riece-menu.el (riece-menu-items): Add "Submit Bug Report".
+
+ * riece-toolbar.el (riece-toolbar-items): Add riece-submit-bug-report.
+
+ * riece-compat.el (riece-read-passwd): Changed default value.
+
+ * riece-400.el (riece-handle-475-message): Don't bind inhibit-quit
+ when reading channel key.
+
+ * riece-irc.el (riece-irc-open-server): Don't bind inhibit-quit
+ when reading password.
+
+ * riece-compat.el (riece-read-passwd): Bind inhibit-quit.
+
+ * riece-commands.el (riece-command-join): Abolished prefix-arg
+ (channel key).
+
+ * riece-options.el (riece-buffer-dispose-function): Changed the
+ default value from bury-buffer to kill-buffer.
+ * riece-log.el (riece-log-lock-directory): New user option.
+ (riece-log-enable): Create lock directory.
+ (riece-log-disable): Remove lock directory.
+
+ * riece-addon.el (riece-resolve-addons): Don't use FILES-ONLY
+ argument of directory-files.
+
+2005-02-04 OHASHI Akira <bg66@koka-in.org>
+
+ * riece-google.el (riece-google-default-lang): Change value.
+ (riece-google-display-message-function): Follow the change above.
+
+2005-02-03 OHASHI Akira <bg66@koka-in.org>
+
+ * riece-google.el: New add-on.
+ * COMPILE (riece-modules): Add riece-google.
+ * Makefile.am (EXTRA_DIST): Add riece-google.el.
+
+2005-02-03 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-400.el (riece-handle-475-message): New handler; query
+ channel key.
+
+2005-02-03 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-addon.el (riece-resolve-addon-dependencies): Rename from
+ riece-resolve-addon.
+ (riece-resolve-addon): Append add-ons under riece-addon-directory.
+
+2005-02-02 TAKAHASHI Kaoru <kaoru@kaisei.org>
+
+ * riece-message.el (riece-display-message): When filter-function
+ return nil, escape from while loop.
+
+2005-02-02 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-debug.el (riece-debug-standard-output-buffer): Use
+ riece-temp-buffer.
+ * riece.el: Add riece-temp-buffer.
+ * riece-globals.el (riece-temp-buffer): New variable.
+
+2005-02-02 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-signal.el (riece-emit-signal): Use riece-ignore-errors.
+
+ * riece-filter.el (riece-handle-numeric-reply): Use
+ riece-ignore-errors.
+ (riece-handle-message): Ditto.
+
+ * riece-ctcp.el (riece-handle-ctcp-request): Use
+ riece-ignore-errors.
+ (riece-handle-ctcp-response): Ditto.
+
+ * riece-debug.el: New file.
+ * COMPILE (riece-modules): Add riece-debug.
+ * Makefile.am (EXTRA_DIST): Add riece-debug.el.
+
+2005-02-02 OHASHI Akira <bg66@koka-in.org>
+
+ * riece-eval.el (riece-eval-regexp): Fix regexp.
+ (riece-eval-display-message-function): Follow the change above.
+
+2005-02-02 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-server.el (riece-close-server-process): Run
+ riece-after-close-hook.
+
+ * riece-log.el (riece-log-insert): Bind file-name-coding-system
+ and default-file-name-coding-system to nil.
+
+2005-02-01 OHASHI Akira <bg66@koka-in.org>
+
+ * riece-eval.el: New add-on.
+ * COMPILE (riece-modules): Add riece-eval.
+ * Makefile.am (EXTRA_DIST): Add riece-eval.el.
+
+2005-01-30 TAKAHASHI Kaoru <kaoru@kaisei.org>
+
+ * riece-display.el (riece-display-connect-signals): Check nick or
+ channel, before call `riece-channel-get-users'.
+
+2004-12-15 Yoichi NAKAYAMA <yoichi@geiin.org>
+
+ * riece-addon.el (riece-command-enable-addon): Fixed.
+ (riece-command-disable-addon): Ditto.
+
+2004-12-14 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-alias.el (riece-alias-abbrev-identity-string): Return a
+ copy of a string since text properties will be set on it.
+ (riece-alias-expand-identity-string): Ditto.
+
+ * riece-emacs.el (riece-normalize-modeline-string): Don't
+ concatenate elements in modeline string.
+
+2004-12-13 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-display.el (riece-update-channel-list-indicator):
+ Normalize modeline indicator.
+
+ * riece-xemacs.el (riece-normalize-modeline-string): New alias.
+ * riece-emacs.el (riece-normalize-modeline-string): New function.
+ (riece-normalize-modeline-string-1): New function.
+
+2004-12-13 Daiki Ueno <ueno@unixuser.org>
+
+ * test/Makefile.am (EXTRA_DIST): Add test-riece.el.
+ * test/test-riece.el: New test cases.
+
+ * riece.el (riece-shrink-buffer): Fixed bug.
+
+ * riece-options.el (riece-username): Changed the default value to
+ user-full-name.
+
+2004-12-12 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-command-previous-channel.xpm: New file.
+ * riece-command-next-channel.xpm: New file.
+
+ * COMPILE (riece-icons): New variable.
+ (riece-install-icons): New function.
+ (riece-install): Install icons.
+ (riece-install-package): Ditto.
+
+2004-12-12 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-options.el (riece-addons): Add riece-toolbar.
+
+ * riece-log.el (riece-log-flashback): Fixed regexp.
+
+ * riece-menu.el (riece-menu-items): Add "Next Channel" and
+ "Previous Channel".
+
+ * riece-toolbar.el: Support XEmacs.
+ (riece-toolbar-items): Renamed from
+ riece-toolbar-item-list.
+ (riece-tool-bar-local-item-from-menu): Abolished.
+ (riece-toolbar-find-menu-item): New function.
+ (riece-make-toolbar-from-menu): New function.
+ (riece-set-toolbar): New function.
+ (riece-toolbar-insinuate-in-command-buffer): Use them.
+
+2004-12-11 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-toolbar.el: New add-on.
+ * COMPILE (riece-modules): Add riece-toolbar.
+ * Makefile.am (EXTRA_DIST): Add riece-toolbar.el.
+
+2004-12-10 Daiki Ueno <ueno@unixuser.org>
+
+ * test/test-riece-log.el
+ (test-riece-log-display-message-function): "yes" -> "true".
+
+ * test/Makefile.am (EXTRA_DIST): Add lunit-report.el and
+ test-riece-log.el.
+
+2004-12-10 Daiki Ueno <ueno@unixuser.org>
+
+ * riece.el (riece-shrink-buffer): Shrink buffer based on chars
+ instead of lines.
+
+ * riece-options.el (riece-shrink-buffer-remove-chars): New user option.
+ (riece-shrink-buffer-remove-lines): Abolish.
+
+2004-12-08 Daiki Ueno <ueno@unixuser.org>
+
+ * test/test-riece-log.el (test-riece-log-delete-directory):
+ Suppress file-name encoding.
+
+ * riece-log.el (riece-log-get-directory): Fixed bug in
+ riece-log-directory-map handling.
+
+ * test/test-riece-log.el
+ (test-riece-log-display-message-function): New test case.
+
+2004-12-08 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-log.el (riece-log-flashback): Fixed custom spec.
+ (riece-log-date-face): New face.
+ (riece-log-insert): Don't append date string to the end of log
+ lines if they arrived today.
+ (riece-log-flashback): Insert "Recent messages ...:"; call
+ riece-after-insert-functions.
+
+ * riece-handle.el (riece-handle-part-message): Call riece-naming
+ assert-part after inserting changes in channel buffers.
+ * riece-display.el (riece-part-channel): Call
+ riece-buffer-dispose-function on parted channel buffer.
+
+2004-12-08 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-log.el (riece-log-display-message-function): Suppress
+ further file-name encoding.
+
+2004-12-07 Daiki Ueno <ueno@unixuser.org>
+
+ * test/lunit-report.el: New file split from lunit.el.
+
+ * riece-options.el (riece-addons): Add 'riece-log.
+
+ * test/test-riece-log.el (lunit-test-case-setup): #riece -> =23riece.
+
+ * riece-log.el (riece-log-insert): Renamed from
+ riece-log-flashback-1; simplified.
+ (riece-log-get-files): Check existence of directory.
+ (riece-log-get-directory): New implementation.
+ [cf. <Liece:00396>]
+
+2004-12-07 TAKAHASHI Kaoru <kaoru@kaisei.org>
+
+ * riece-foolproof.el (riece-foolproof-command-send-message-function):
+ Check invisible text.
+
+2004-12-07 Daiki Ueno <ueno@unixuser.org>
+
+ * test/test-riece-log.el (test-riece-log-encode-file-name): New
+ test case.
+ (test-riece-log-encode-file-name-mule): New test case.
+ (test-riece-log-decode-file-name): New test case.
+ (test-riece-log-decode-file-name-mule): New test case.
+
+ * riece-log.el (riece-log-file-name-coding-system): New user option.
+ (riece-log-encode-file-name): New function.
+ (riece-log-decode-file-name): New function.
+
+2004-12-06 Daiki Ueno <ueno@unixuser.org>
+
+ * test/test-riece-log.el: New test cases.
+
+ * riece-log.el: Collect logs across dates.
+ (riece-log-get-files): New function.
+ (riece-log-flashback-1): New function.
+ (riece-log-flashback): Use it.
+
+2004-12-05 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-message.el (riece-display-message-1): Call
+ riece-after-display-message-functions in riece-message-buffer.
+ [cf. <Liece:00391>]
+
+2004-12-05 Daiki Ueno <ueno@unixuser.org>
+
+ * Riece: Version 1.0.6 released.
+ * riece-version.el (riece-version-number): Bump up to 1.0.6.
+
+2004-12-01 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-display.el (riece-update-channel-status-indicator): Fixed typo.
+
+2004-11-28 Daiki Ueno <ueno@unixuser.org>
+
+ * test/lunit.el (lunit-report): Accept output filename as the 2nd arg.
+ * Makefile.am (check-local): Supply riece-test with output filename.
+ * COMPILE (riece-test): Supply lunit-report with output filename.
+
+ * test/lunit.el: Require 'pp.
+ (lunit-escape-quote): Rename from lunit-test-reporter-format-sexp.
+ (lunit-report): Add "emacs-version" property.
+
+2004-11-28 Daiki Ueno <ueno@unixuser.org>
+
+ * COMPILE (riece-test): Use lunit-report instead of lunit.
+
+ * test/lunit.el: Report test result as XML.
+ (lunit-time-since): New function.
+ (lunit-test-reporter): New test-listener.
+ (lunit-test-reporter-format-sexp): New function.
+ (lunit-report): New function.
+
+2004-11-27 Daiki Ueno <ueno@unixuser.org>
+
+ * test/lunit.el: Update copyright year.
+ (lunit-test-result-run): Fixed the argument of
+ lunit-test-listener-error listener.
+
+2004-11-26 Daiki Ueno <ueno@unixuser.org>
+
+ * COMPILE (riece-test): Require 'lunit after when ./test is added
+ to load-path.
+
+ * test/test-riece-yank.el (test-riece-yank-strip-space): Use
+ lunit-assert-2 instead of lunit-assert.
+
+ * test/test-riece-url.el (test-riece-url-replace-match): Use
+ lunit-assert-2 instead of lunit-assert.
+ (test-riece-url-regexp-alist): Ditto.
+
+ * test/test-riece-alias.el (test-riece-alias-percent-hack): Use
+ lunit-assert-2 instead of lunit-assert.
+ (test-riece-alias-alist-1): Ditto.
+ (test-riece-alias-alist-2): Ditto.
+ (test-riece-alias-altsep-1): Ditto.
+ (test-riece-alias-altsep-2): Ditto.
+ (test-riece-alias-altsep-3): Ditto.
+ (test-riece-alias-altsep-4): Ditto.
+
+ * test/test-riece-addon.el (test-riece-resolve-addons-1): Use
+ lunit-assert-2 instead of lunit-assert.
+ (test-riece-resolve-addons-2): Ditto.
+
+ * test/lunit.el: Count assertions in test-case methods.
+ (lunit-test-result): Add assert-count slot.
+ (lunit-make-test-result): Reset assert-count to 0.
+ (lunit-test-result-run): Count assertions.
+ (lunit-test-result-failure): Abolished.
+ (lunit-test-case): Add assert-count slot; define internal
+ accesssors for them.
+ (lunit-make-test-case): Reset assert-count to 0.
+ (lunit-assert-2): New macro.
+ (lunit): Display assertion count.
+
+2004-11-25 Daiki Ueno <ueno@unixuser.org>
+
+ * Makefile.am (EXTRA_DIST): Add url-riece.el.
+ * url-riece.el: url-irc backend provided by Masatake YAMATO
+ <jet@gyve.org>.
+ [cf. <Liece:00373>]
+
+2004-11-25 Daiki Ueno <ueno@unixuser.org>
+
+ * test/Makefile.am (EXTRA_DIST): Add test-riece-url.el.
+ * test/test-riece-url.el: New test cases.
+
+ * riece-url.el (riece-url-regexp-alist): Backport from Liece 2.0.
+ (riece-url-replace-match): New function.
+ (riece-url-scan-region): Handle riece-url-regexp-alist.
+
+2004-11-25 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-server.el (riece-server-properties): New function.
+
+2004-11-22 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-display.el (riece-update-status-indicators): Format
+ riece-user-indicator as an identity.
+
+2004-11-22 Daiki Ueno <ueno@unixuser.org>
+
+ * test/test-riece-alias.el (test-riece-alias-alist-1): New test case.
+ (test-riece-alias-alist-2): New test case.
+
+ * riece-alias.el (riece-alias-abbrev-identity-string): Fixed
+ riece-alias-alist handling.
+ (riece-alias-expand-identity-string): Ditto.
+
+2004-11-21 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-options.el (riece-shrink-buffer-remove-lines): New user option.
+ * riece.el (riece-shrink-buffer): Remove lines specified by
+ riece-shrink-buffer-remove-lines at a time.
+
+2004-11-21 Daiki Ueno <ueno@unixuser.org>
+
+ * riece.el (riece): Remove nonexistent buffer from
+ riece-buffer-list when running riece-shrink-buffer.
+
+2004-11-20 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-display.el (riece-update-buffers): Check existence of each
+ buffer in riece-buffer-list.
+ * riece.el (riece): Ditto.
+
+2004-11-20 Daiki Ueno <ueno@unixuser.org>
+
+ * riece.el: Bind reporter-prompt-for-summary-p.
+
+2004-11-19 Daiki Ueno <ueno@unixuser.org>
+
+ * riece.el (riece-submit-bug-report): Query VERSION.
+
+2004-11-19 Daiki Ueno <ueno@unixuser.org>
+
+ * riece.el (riece-submit-bug-report): Query CTCP VERSION before
+ inspecting *IRC* buffer.
+
+2004-11-19 Daiki Ueno <ueno@unixuser.org>
+
+ * riece.el (riece-submit-bug-report): use
+ riece-server-process-opened instead of process-live-p.
+
+ * riece-server.el (riece-flush-send-queue): Use
+ riece-server-process-opened instead of process-live-p.
+
+ * riece-yank.el (riece-yank-strip-space): Bind space-width.
+
+ * riece-xemacs.el (riece-recent-messages): New function.
+ * riece-emacs.el (riece-recent-messages): New function.
+ * riece.el (riece-submit-bug-report): Use riece-recent-messages
+ instead of (with-output-string (print-recent-messages ...)).
+
+2004-11-18 Daiki Ueno <ueno@unixuser.org>
+
+ * riece.el (riece-submit-bug-report): New command.
+
+2004-11-15 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-misc.el (riece-insert): Don't bind unused variable `buffer'.
+
+2004-11-15 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-300.el (riece-handle-302-message): Don't expect leading
+ ":" before parameter list.
+ (riece-handle-301-message): Ditto.
+ (riece-handle-311-message): Ditto.
+ (riece-handle-312-message): Ditto.
+ (riece-handle-317-message): Ditto.
+ (riece-handle-319-message): Ditto.
+ (riece-handle-351-message): Ditto.
+ (riece-handle-353-message): Ditto.
+ (riece-handle-322-message): Ditto.
+ (riece-handle-set-topic): Ditto.
+ (riece-handle-366-message): Ditto.
+
+2004-11-14 Daiki Ueno <ueno@unixuser.org>
+
+ * riece.el (riece-exit): Reset riece-channel-status-indicator.
+ (riece-command-mode): Display riece-channel-status-indicator.
+ (riece-dialogue-mode): Ditto.
+ (riece-channel-mode): Ditto.
+
+ * riece-display.el (riece-update-channel-status-indicator): New
+ function.
+ (riece-update-indicator-functions): Add it.
+
+ * riece-globals.el (riece-channel-status-indicator): New indicator.
+
+2004-11-13 Daiki Ueno <ueno@unixuser.org>
+
+ * riece.el (riece-select-keys): Bind
+ riece-command-switch-to-channel-by-number to "#".
+
+2004-11-11 Masatake YAMATO <jet@gyve.org>
+
+ * riece-yank.el (riece-command-yank): Fix a typo in comments.
+
+2004-11-09 OHASHI Akira <bg66@koka-in.org>
+
+ * riece-yank.el (riece-command-yank): Take a 1st argument to send
+ messages as notice.
+
+2004-11-07 Daiki Ueno <ueno@unixuser.org>
+
+ * Riece: Version 1.0.5 released.
+ * riece-version.el (riece-version-number): Bump up to 1.0.5.
+
+2004-11-07 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-yank.el (riece-yank-strip-space): New function split from
+ riece-command-yank.
+ * test/test-riece-addon.el: New test cases.
+ * test/test-riece-yank.el: New test cases.
+
+2004-11-05 Daiki Ueno <ueno@unixuser.org>
+
+ * COMPILE (riece-test): New function.
+ * Makefile.am (check-local): New target.
+ * test/luna.el: New file.
+ * test/lunit.el: New file.
+ * test/test-riece-alias.el: New test cases.
+
+2004-11-05 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-alias.el (riece-alias-alternate-separator): New user
+ option.
+ (riece-alias-use-atmark): Abolished.
+ (riece-alias-escape-alternate-separator): Renamed from
+ riece-alias-escape-atmark; use riece-alias-alternate-separator
+ instead of hard-coded "@".
+ (riece-alias-abbrev-alternate-separator): Renamed from
+ riece-alias-abbrev-atmark; use riece-alias-alternate-separator
+ instead of hard-coded "@".
+ (riece-alias-expand-alternate-separator): Renamed from
+ riece-alias-expand-atmark; use riece-alias-alternate-separator
+ instead of hard-coded "@".
+
+2004-11-05 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-alias.el (riece-alias-abbrev-atmark): Don't append "@" to
+ a channel on default server.
+
+2004-11-05 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-alias.el (riece-alias-use-atmark): New user option. If
+ this option enabled, atmark "@" will be used to separate prefix
+ and server. (e.g. "#riece@server")
+ (riece-alias-escape-atmark): New function.
+ (riece-alias-abbrev-atmark): New function.
+ (riece-alias-expand-atmark): New function.
+ (riece-alias-abbrev-identity-string): Call
+ riece-alias-abbrev-atmark.
+ (riece-alias-expand-identity-string): Call
+ riece-alias-expand-atmark.
+
+ * riece-rdcc.el (riece-rdcc-block-size): Changed default value to
+ 1024 due to the DCC specification.
+ (riece-rdcc-send-program): Wait ack from a recipient.
+ (riece-rdcc-filter): Send ack each time data arrives.
+
+2004-10-30 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-yank.el (riece-yank-strip-space): New user option.
+ (riece-command-yank): Strip spaces if riece-yank-strip-space is
+ non-nil.
+
+2004-10-18 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-yank.el: New add-on from Masatake YAMATO <jet@gyve.org>.
+ * COMPILE (riece-modules): Add riece-yank.
+ * Makefile.am (EXTRA_DIST): Add riece-yank.el.
+
+2004-10-11 Daiki Ueno <ueno@unixuser.org>
+
+ * Riece: Version 1.0.4 released.
+ * riece-version.el (riece-version-number): Bump up to 1.0.4.
+
+2004-10-05 Daiki Ueno <ueno@unixuser.org>
+
+ * riece.el (riece): Scan riece-startup-channel-list and open servers.
+
+2004-09-27 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-options.el (riece-send-delay): Set default to 2.
+
+ * riece-server.el (riece-make-queue): New function.
+ (riece-queue-enqueue): New function.
+ (riece-queue-dequeue): New function.
+ (riece-queue-empty): New function.
+ (riece-flush-send-queue): Use a queue object; check the process
+ is active.
+
+2004-09-25 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-server.el: Implement flood protection.
+ (riece-flush-send-queue): New function.
+ (riece-process-send-string): Use it.
+ (riece-reset-process-buffer): Reset riece-send-queue,
+ riece-send-size, and riece-last-send-time.
+ (riece-seconds-to-time): New function.
+ (riece-time-less-p): New function.
+ (riece-time-since): New function.
+ * riece-options.el (riece-max-send-size): New user option.
+ (riece-send-delay): New user option.
+ * riece-globals.el (riece-send-queue): New variable.
+ (riece-send-size): New variable.
+
+2004-09-14 OHASHI Akira <bg66@koka-in.org>
+
+ * riece-log.el (riece-log-flashback): Run riece-button-update-buffer
+ only when riece-button is enabled.
+
+ * riece-mini.el: Require 'riece-biff.
+ (riece-mini-requires): New function.
+ (riece-mini-show-backlog): Run riece-biff-clear when riece-biff is
+ enabled.
+
+2004-09-13 OHASHI Akira <bg66@koka-in.org>
+
+ * riece-mini.el (riece-mini-show-backlog): Fix for long messages.
+ (riece-mini-backlog-size): Change default value.
+
+2004-09-12 OHASHI Akira <bg66@koka-in.org>
+
+ * riece-mini.el (riece-mini-show-backlog): Protect 1st arg of
+ `riece-mini-message-no-log'.
+
+2004-09-11 OHASHI Akira <bg66@koka-in.org>
+
+ * riece-mini.el (riece-mini-display-message-function): Remove
+ properties and "\n" of the end.
+ (riece-mini-show-backlog): Follow the change above.
+ (riece-mini-display-message-function): Save the history always.
+
+2004-09-10 OHASHI Akira <bg66@koka-in.org>
+
+ * riece-mini.el (riece-mini-display-message-function): Don't use
+ cl macro.
+ (riece-mini-show-backlog): Follow the change above.
+
+ * riece-mini.el (riece-mini): New group.
+ (riece-mini-backlog-size): New user option.
+ (riece-mini-backlog-history): New internal variable.
+ (riece-mini-backlog-shown): Ditto.
+ (riece-mini-show-backlog): New function.
+ (riece-mini-pre-command): Ditto.
+ (riece-mini-display-message-function): Use them.
+ (riece-mini-insinuate): Ditto.
+
+ * riece-biff.el (toplevel): Remove eval-when-compile.
+ * riece-log.el (toplevel): Ditto.
+ * riece-mini.el (toplevel): Ditto.
+
+2004-09-05 Daiki Ueno <ueno@unixuser.org>
+
+ * Riece: Version 1.0.3 released.
+ * riece-version.el (riece-version-number): Bump up to 1.0.3.
+
+2004-09-01 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-naming.el (riece-naming-assert-channel-users): Remove
+ nonexistent users.
+ * riece-300.el (riece-353-users): New variable.
+ (riece-handle-353-message): Don't update user-list.
+ (riece-handle-366-message): Update user-list here.
+
+ * riece-channel.el (riece-channel-toggle-operator): Don't add ?o
+ if it already appears in user's mode.
+ (riece-channel-toggle-speaker): Don't add ?v if it already appears
+ in user's mode.
+
+2004-08-31 Daiki Ueno <ueno@unixuser.org>
+
+ * riece.el (riece-command-mode): Set truncate-lines to nil.
+ (riece-dialogue-mode): Ditto.
+ (riece-channel-list-mode): Make
+ truncate-partial-width-windows local to channel buffers and set it
+ to nil.
+ (riece-user-list-mode): Ditto.
+
+2004-08-31 Daiki Ueno <ueno@unixuser.org>
+
+ * riece.el (riece-dialogue-mode): Make
+ truncate-partial-width-windows local to channel buffers and set it
+ to nil.
+ (riece-command-mode): Ditto.
+
+ * riece-layout.el (riece-configure-windows): Don't affect
+ truncate-partial-width-windows.
+ (riece-configure-windows-top): Ditto.
+ * riece-options.el (riece-truncate-partial-width-windows):
+ Abolished unused user option.
+
+2004-08-30 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-options.el (riece-window-center-line): New user option.
+ * riece-misc.el (riece-insert): Check if the current point is not
+ visible in the window.
+
+2004-08-30 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-misc.el (riece-insert): Don't use 2nd argument WINDOW of
+ recenter since it is not supported by GNU Emacs.
+
+2004-08-30 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-misc.el (riece-insert): Use (recenter -1) to set window
+ point instead of doing so manually.
+
+2004-08-28 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-xemacs.el (riece-put-text-property-nonsticky): New function.
+ * riece-emacs.el (riece-put-text-property-nonsticky): New function.
+ * riece-identity.el (riece-format-identity): Use it instead of
+ put-text-property.
+
+2004-08-27 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-commands.el (riece-command-complete-user): Move point to
+ the end of the current word.
+
+2004-08-23 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-irc.el (riece-irc-open-server): Display error message if
+ connection-function fails.
+ * riece-server.el (riece-open-server): Ignore errors from
+ riece-*-open-server function.
+ * riece.el (riece): If no server process is available, exit
+ immediately.
+
+2004-08-19 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-handle.el (riece-handle-quit-message): Pass
+ riece-part-channel the identity object of the quitting user
+ instead of his name.
+
+2004-08-16 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-highlight.el (riece-highlight-server-match): Simplified.
+
+2004-08-16 Daiki Ueno <ueno@unixuser.org>
+
+ * Riece: Version 1.0.2 released.
+ * riece-version.el (riece-version-number): Bump up to 1.0.2.
+
+2004-08-16 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-highlight.el (riece-highlight-server-match): New match
+ function for font-lock-keywords to highlight "(from XXX)" only if
+ 'riece-server-name property is set.
+ (riece-dialogue-font-lock-keywords): Use it.
+
+2004-08-15 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-handle.el (riece-handle-nick-message): Remove nil from
+ channel buffers.
+ (riece-handle-quit-message): Ditto.
+ (riece-handle-kill-message): Ditto.
+
+ * riece-misc.el (riece-concat-server-name): Put 'riece-server-name
+ property on "(from XXX)".
+
+2004-07-29 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-menu.el: Do not support enable/disable addon since
+ easy-menu-remove is not working.
+
+2004-07-19 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-server.el (riece-open-server): Call protocol interface.
+ (riece-quit-server-process): Ditto.
+
+ * riece-options.el (riece-protocol): New user option.
+
+ * riece-server.el: Don't require 'riece-filter.
+
+ * riece-irc.el: New file split from riece-server.el.
+ * COMPILE (riece-modules): Add riece-irc.
+ * Makefile.am (EXTRA_DIST): Add riece-irc.el.
+
+2004-07-18 Daiki Ueno <ueno@unixuser.org>
+
+ * riece.el: Don't require 'riece-filter.
+ * riece-server.el: Require 'riece-filter.
+
+ * riece-500.el: Autoload riece-default-handle-numeric-reply from
+ "riece-handle".
+ * riece-400.el: Autoload riece-default-handle-numeric-reply from
+ "riece-handle".
+ * riece-300.el: Don't require 'riece-filter; autoload
+ riece-default-handle-numeric-reply from "riece-handle".
+ * riece-200.el: Autoload riece-default-handle-numeric-reply from
+ "riece-handle".
+ * riece-000.el: Don't require 'riece-filter; autoload
+ riece-default-handle-numeric-reply from "riece-handle".
+
+ * riece-filter.el (riece-filter): Simplified.
+
+ * riece-server.el (riece-server-keyword-map): Add :protocol.
+
+ * riece-handle.el (riece-300): Require 'riece-000, 'riece-200,
+ 'riece-300, 'riece-400, and 'riece-500.
+ (riece-default-handle-numeric-reply): Moved from riece-filter.el.
+ * riece-filter.el (riece-handle-numeric-reply): Don't load
+ riece-{000,200,300,400,500}.el on demand.
+
+2004-07-10 Daiki Ueno <ueno@unixuser.org>
+
+ * Riece: Version 1.0.1 released.
+ * riece-version.el (riece-version-number): Bump up to 1.0.1.
+
+2004-07-09 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-ignore.el (riece-startup-ignored-user-list): New user
+ option.
+ (riece-ignore-insinuate): Add identity objects from
+ riece-startup-ignored-user-list to riece-ignored-user-list.
+
+2004-07-07 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-commands.el (riece-command-enter-message-to-user): Signal
+ "No text to send" error if user attempt to call this command on
+ an empty line.
+
+2004-07-04 Yoichi NAKAYAMA <yoichi@geiin.org>
+
+ * riece-commands.el (riece-command-complete-user): current-word
+ can return nil (follow the change in emacs-cvs).
+
+2004-07-01 Daiki Ueno <ueno@unixuser.org>
+
+ * riece.el (riece-exit): Clear signal-slots.
+ * riece-signal.el (riece-clear-signal-slots): New function.
+
+2004-06-28 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-misc.el (riece-split-parameters): Fixed parenthesis.
+
+2004-06-26 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-commands.el (riece-command-change-mode): Don't send ":".
+ [cf. <Liece:00191>]
+
+2004-06-18 TAKAHASHI Kaoru <kaoru@kaisei.org>
+
+ * riece-display.el (riece-update-long-channel-indicator): Change
+ order to channel, mode, topic.
+
+ * riece-message.el (riece-message-make-open-bracket): Come in
+ first notice message.
+ (riece-message-make-close-bracket): Ditto.
+
+2004-06-16 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-commands.el (riece-command-beginning-of-buffer): New command.
+ * riece.el (riece-dialogue-mode-map): Bind beginning-of-buffer to Home.
+ (riece-command-map): Bind riece-command-beginning-of-buffer to Home.
+
+2004-06-15 Daiki Ueno <ueno@unixuser.org>
+
+ * riece.el (riece-dialogue-mode-map): Bind end-of-buffer to End.
+ (riece-command-map): Bind riece-command-end-of-buffer to End.
+
+2004-06-12 TAKAHASHI Kaoru <kaoru@kaisei.org>
+
+ * riece-commands.el (riece-command-send-message): Run
+ riece-command-send-message-hook.
+
+ * riece-foolproof.el (riece-foolproof-dmacro-override): Removed.
+ (riece-foolproof-command-send-message-function): New function.
+ (riece-foolproof-insinuate): Use hook instead of advice.
+ (riece-foolproof-enable, riece-foolproof-disable): Simplified.
+
+2004-06-11 TAKAHASHI Kaoru <kaoru@kaisei.org>
+
+ * riece-foolproof.el (riece-foolproof-dmacro-override): New
+ function.
+ (riece-foolproof-insinuate): Check keyboard macro.
+
+2004-06-10 TAKAHASHI Kaoru <kaoru@kaisei.org>
+
+ * riece-foolproof.el: New add-on.
+ * COMPILE (riece-modules): Add riece-foolproof.
+ * Makefile.am (EXTRA_DIST): Add riece-foolproof.el.
+
+2004-06-10 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-commands.el (riece-command-change-mode): Don't send ":" to
+ query a channel mode.
+ * riece-mode.el (riece-parse-modes): Accept mode spec not
+ delimited with " " such as "-n+s".
+
+2004-06-10 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-layout.el (riece-set-window-points): Restore window-point
+ of the channel buffer from riece-channel-buffer-window-point.
+
+ * riece-display.el (riece-switch-to-channel): Set
+ riece-channel-buffer-window-point.
+
+ * riece.el (riece-channel-mode): Make
+ riece-channel-buffer-window-point buffer local.
+
+ * riece-globals.el (riece-channel-buffer-window-point): New variable.
+
+2004-06-06 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-rdcc.el (riece-command-dcc-send): Replace whitespace with
+ "_".
+ (riece-command-dcc-receive): Convert default filename with
+ convert-standard-filename.
+ (riece-handle-dcc-request): Handle filenames enclosed with "...".
+
+2004-06-04 TAKAHASHI Kaoru <kaoru@kaisei.org>
+
+ * riece-hangman.el (riece-hangman-word): Check killed-buffer or
+ not. Fix random number generation logic.
+
+2004-06-03 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-server.el (riece-open-server): When password input is
+ quitted, delete the current server process manually.
+ (riece-close-server-process): Always kill process buffer.
+ (riece-quit-server-process): If the connection is timed out,
+ delete the current server process manually.
+
+2004-06-02 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-unread.el: Use riece-facep to check existence of
+ 'riece-modeline-unread-face.
+ * riece-history.el: Use riece-facep to check existence of
+ 'riece-modeline-history-face.
+ * riece-highlight.el: Use riece-facep to check existence of
+ 'riece-modeline-current-face.
+
+ * riece-xemacs.el (riece-facep): Define as an alias of 'find-face.
+ * riece-emacs.el (riece-facep): Define as an alias of 'facep.
+
+2004-06-01 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-button.el (riece-button-disable): On XEmacs, BUFFER arg of
+ widget-map-buttons is ignored.
+
+2004-06-01 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-unread.el (riece-modeline-unread-face): New face;
+ setup the properties are inherited from 'modeline.
+ * riece-history.el (riece-modeline-history-face): New face;
+ setup the properties are inherited from 'modeline.
+ * riece-highlight.el (riece-modeline-current-face): New face;
+ setup the properties are inherited from 'modeline.
+
+ * riece-server.el (riece-close-server-process): Reset
+ process-filter/process-sentinel.
+
+2004-05-31 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-hangman.el (riece-hangman-after-privmsg-hook): Display answer.
+ (riece-hangman-enable): Initialize random seed.
+
+2004-05-29 Daiki Ueno <ueno@unixuser.org>
+
+ * Riece: Version 1.0.0 released.
+ * riece-version.el (riece-version-number): Bump up to 1.0.0.
+
+2004-05-29 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-commands.el (riece-command-finger): Complete user names
+ without server-name.
+ (riece-command-invite): Ditto.
+ (riece-command-change-mode): Ditto.
+ (riece-command-enter-message-to-user): Ditto.
+
+ * riece-identity.el (riece-completing-read-identity): Add extra
+ 8th arg "no-server".
+
+2004-05-29 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-server.el: Move autoload setting for 'riece-exit before
+ riece-open-server.
+
+ * riece-message.el (riece-format-message): Use speaker's
+ server-name instead of the current server-name.
+
+ * riece-ignore.el: Autoload 'riece-dialogue-mode.
+
+ * riece-identity.el (riece-format-identity): Put
+ 'riece-format-identity-prefix-only property.
+
+ * riece-icon.el: Require 'riece-globals and 'riece-signal.
+
+ * riece-history.el: Require 'riece-signal.
+
+ * riece-highlight.el: Require 'riece-misc.
+
+ * riece-alias.el: Require 'riece-signal.
+
+ * riece-addon.el: Require 'font-lock, 'riece-options,
+ 'riece-compat, and 'riece-misc.
+
+2004-05-29 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-commands.el (riece-command-switch-to-channel): Change prompt.
+ (riece-command-switch-to-channel-by-number): Ditto.
+ (riece-command-change-layout): Ditto.
+ (riece-command-finger): Ditto.
+ (riece-command-topic): Ditto.
+ (riece-command-invite): Ditto.
+ (riece-command-kick): Ditto.
+ (riece-command-names): Ditto.
+ (riece-command-who): Ditto.
+ (riece-command-list): Ditto.
+ (riece-command-change-mode): Ditto.
+ (riece-command-set-operators): Ditto.
+ (riece-command-set-speakers): Ditto.
+ (riece-command-enter-message-to-user): Ditto.
+ (riece-command-join): Ditto.
+ (riece-command-part): Ditto.
+ (riece-command-open-server): Ditto.
+ (riece-command-close-server): Ditto.
+
+2004-05-28 OHASHI Akira <bg66@koka-in.org>
+
+ * riece-biff.el (riece-biff-insinuate): Add riece-biff-disable to
+ riece-exit-hook.
+
+2004-05-28 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-message.el (riece-message-set-speaker): New function.
+ (riece-message-set-target): New function.
+ (riece-message-set-text): New function.
+ (riece-message-set-type): New function.
+ (riece-message-set-own-p): New function.
+
+ * riece-kakasi.el: New add-on.
+ * COMPILE (riece-modules): Add riece-kakasi.
+ * Makefile.am (EXTRA_DIST): Add riece-kakasi.el.
+
+2004-05-27 OHASHI Akira <bg66@koka-in.org>
+
+ * riece-biff.el: New add-on.
+ * COMPILE (riece-modules): Add riece-biff.
+ * Makefile.am (EXTRA_DIST): Add riece-biff.el.
+
+2004-05-26 Daiki Ueno <ueno@unixuser.org>
+
+ * riece.el (riece-exit): Don't disable addons.
+
+ * riece-commands.el (riece-command-quit): Don't query user to
+ input y/n if there is no server process.
+
+2004-05-26 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-highlight.el: Require 'derived.
+ (riece-highlight-setup-dialogue): Turn on font-lock if
+ riece-highlight-enabled.
+ (riece-highlight-setup-channel-list): Ditto.
+
+2004-05-24 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-addon.el (riece-command-list-addons): Sort add-ons.
+
+2004-05-23 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-menu.el: Don't put 'riece-addon-default-disabled property.
+
+ * riece-log.el (riece-log-flashback): Don't check riece-log-enabled.
+
+ * riece.el (riece): Enable add-ons after startup.
+
+2004-05-23 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-unread.el (riece-unread-disable): Reset riece-unread-channels.
+
+2004-05-22 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-message.el (riece-format-message): Don't append
+ server-name if the 2nd arg is not specified.
+
+ * riece-hangman.el (riece-hangman-word): Fixed regexp.
+
+2004-05-22 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-xface.el: Support enable/disable.
+ (riece-xface-enabled): New flag.
+ (riece-xface-description): New variable.
+ (riece-xface-update-user-list-buffer): Check riece-xface-enabled.
+ (riece-xface-enable): New function.
+ (riece-xface-disable): New function.
+
+ * riece-url.el: Support enable/disable.
+ (riece-url-enabled): New flag.
+ (riece-url-description): New variable.
+ (riece-url-enable): New function; bind command keys here.
+ (riece-url-disable): New function.
+
+ * riece-unread.el: Support enable/disable.
+ (riece-unread-enabled): New flag.
+ (riece-unread-description): New variable.
+ (riece-unread-after-display-message-function): Check
+ riece-unread-enabled.
+ (riece-unread-after-switch-to-channel-function): Ditto.
+ (riece-unread-format-identity-for-channel-list-buffer): Ditto.
+ (riece-unread-format-identity-for-channel-list-indicator): Ditto.
+ (riece-unread-enable): New function; bind command keys here.
+ (riece-unread-disable): New function.
+
+ * riece-rdcc.el: Support enable/disable.
+ (riece-rdcc-enabled): New flag.
+ (riece-rdcc-description): New variable.
+ (riece-handle-dcc-request): Check riece-rdcc-enabled.
+ (riece-rdcc-enable): New function; bind command keys here.
+ (riece-rdcc-disable): New function.
+
+ * riece-ndcc.el: Support enable/disable.
+ (riece-ndcc-enabled): New flag.
+ (riece-ndcc-description): New variable.
+ (riece-handle-dcc-request): Check riece-ndcc-enabled.
+ (riece-ndcc-enable): New function; bind command keys here.
+ (riece-ndcc-disable): New function.
+
+ * riece-menu.el: Support enable/disable; put
+ riece-addon-default-disabled property.
+ (riece-menu-enabled): New flag.
+ (riece-menu-description): New variable.
+ (riece-menu-enable): New function.
+ (riece-menu-disable): New function.
+
+ * riece-lsdb.el: Support enable/disable.
+ (riece-lsdb-enabled): New flag.
+ (riece-lsdb-description): New variable.
+ (riece-lsdb-enable): New function; bind command keys here.
+ (riece-lsdb-disable): New function.
+
+ * riece-keyword.el: Support enable/disable.
+ (riece-keyword-enabled): New flag.
+ (riece-keyword-description): New variable.
+ (riece-keyword-message-filter): Check riece-keyword-enabled.
+ (riece-keyword-enable): New function.
+ (riece-keyword-disable): New function.
+
+ * riece-ignore.el: Support enable/disable.
+ (riece-ignore-enabled): New flag.
+ (riece-ignore-description): New variable.
+ (riece-ignore-message-filter): Check riece-ignore-enabled.
+ (riece-ignore-enable): New function; bind command keys here.
+ (riece-ignore-disable): New function.
+
+ * riece-icon.el: Support enable/disable.
+ (riece-icon-enabled): New flag.
+ (riece-icon-description): New variable.
+ (riece-icon-update-user-list-buffer): Check riece-icon-enabled.
+ (riece-icon-update-channel-list-buffer): Check riece-icon-enabled.
+ (riece-icon-enable): New function.
+ (riece-icon-disable): New function.
+
+ * riece-history.el: Support enable/disable.
+ (riece-history-enabled): New flag.
+ (riece-history-description): New variable.
+ (riece-history-format-identity-for-channel-list-buffer): Check
+ riece-history-enabled.
+ (riece-history-format-identity-for-channel-list-indicator): Ditto.
+ (riece-history-enable): New function.
+ (riece-history-disable): New function.
+
+ * riece-hangman.el: Support enable/disable; put
+ riece-addon-default-disabled property.
+ (riece-hangman-enabled): New flag.
+ (riece-hangman-description): New variable.
+ (riece-hangman-after-privmsg-hook): Check riece-hangman-enabled.
+ (riece-hangman-enable): New function.
+ (riece-hangman-disable): New function.
+
+ * riece-guess.el: Support enable/disable.
+ (riece-guess-enabled): New flag.
+ (riece-guess-description): New variable.
+ (riece-guess-insinuate): Nothing to do.
+ (riece-guess-enable): New function; bind command keys here.
+ (riece-guess-disable): New function.
+
+ * riece-doctor.el: Support enable/disable; put
+ 'riece-addon-default-disabled property.
+ (riece-doctor-enabled): New flag.
+ (riece-doctor-description): New variable.
+ (riece-doctor-after-privmsg-hook): Check riece-doctor-enabled.
+ (riece-doctor-enable): New function.
+ (riece-doctor-disable): New function.
+
+ * riece-ctlseq.el: Support enable/disable.
+ (riece-ctlseq-enabled): New flag.
+ (riece-ctlseq-description): New variable.
+ (riece-ctlseq-message-filter): Check riece-ctlseq-enabled.
+ (riece-ctlseq-enable): New function.
+ (riece-ctlseq-disable): New function.
+
+ * riece-button.el: Support enable/disable.
+ (riece-button-enabled): New flag
+ (riece-button-description): New variable.
+ (riece-button-enable): New function.
+ (riece-button-disable): New function.
+
+ * riece-async.el (riece-async-description): New variable.
+
+ * riece-alias.el: Support enable/disable.
+ (riece-alias-enabled): New flag.
+ (riece-alias-description): New variable.
+ (riece-alias-insinuate): Nothing to do.
+ (riece-alias-enable): New function.
+ (riece-alias-disable): New function.
+
+ * riece-addon.el (riece-addon-list-mark-face-alist): Change mark
+ for addons which does not support enable/disable.
+ (riece-addon-list-font-lock-keywords): Follow the above change.
+ (riece-command-list-addons): Ditto.
+
+ * riece.el (riece): Check 'riece-addon-default-disabled property.
+ (riece-exit): Disable addons.
+
+2004-05-22 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-addon.el (riece-addon-list-mode): Call font-lock-set-defaults.
+
+ * riece-highlight.el (riece-highlight-setup-dialogue): Call
+ font-lock-set-defaults.
+ (riece-highlight-setup-channel-list): Ditto.
+
+ * riece.el (riece): Enable add-ons after startup.
+
+2004-05-21 Daiki Ueno <ueno@unixuser.org>
+
+ * riece.el (riece-dialogue-mode-map): Bind
+ riece-command-list-addons as "^".
+
+2004-05-21 TAKAHASHI Kaoru <kaoru@kaisei.org>
+
+ * riece-skk-kakutei.el (riece-skk-kakutei-enabled): New flag.
+ (riece-skk-kakutei-description): New variable.
+ (riece-skk-kakutei-insinuate): Nothing to do.
+ (riece-skk-kakutei-enable): New function.
+ (riece-skk-kakutei-disable): New function.
+
+2004-05-21 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-highlight.el (riece-highlight-setup-dialogue): Simplified.
+ (riece-highlight-setup-channel-list): Simplified.
+
+ * riece.el (riece): Enable add-ons just after insinuate them.
+
+ * riece-addon.el (riece-addon-list-enabled-face): New face.
+ (riece-addon-list-disabled-face): New face.
+ (riece-addon-list-unsupported-face): New face.
+ (riece-addon-list-unknown-face): New face.
+ (riece-addon-list-description-face): New face.
+ (riece-addon-list-mark-face-alist): New user option.
+ (riece-addon-list-font-lock-keywords): New variable.
+ (riece-addon-list-mode-map): Bind some keys.
+
+2004-05-21 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-addon.el (riece-insinuate-addon): Add optional 2nd
+ argument `verbose'
+ (riece-enable-addon): Ditto.
+ (riece-disable-addon): Ditto.
+ (riece-command-enable-addon): Call riece-enable-addon with the 2nd
+ arg.
+ (riece-command-disable-addon): Call riece-disable-addon with the
+ 2nd arg.
+
+2004-05-21 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-addon.el (riece-command-list-addons): Change "no
+ description" -> "(no description)"; show key bindings.
+
+ * riece-ctcp.el (riece-ctcp-description): New variable.
+ * riece-highlight.el (riece-highlight-description): New variable
+ * riece-log.el (riece-log-description): New variable.
+ * riece-mini.el (riece-mini-description): New variable.
+
+2004-05-21 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-ctcp.el (riece-ctcp-enable): Fixed typo.
+
+ * riece-addon.el (riece-addon-list-mode-map): New keymap.
+ (riece-addon-list-mode): New function.
+ (riece-command-list-addons): New command.
+ (riece-command-enable-addon): New command.
+ (riece-command-disable-addon): New command.
+ (riece-disable-addon): Fixed typo.
+
+2004-05-21 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-mini.el (riece-mini-enabled): New flag.
+ (riece-mini-display-message-function): Check riece-mini-enabled.
+ (riece-mini-enable): New function.
+ (riece-mini-disable): New function.
+
+ * riece-log.el (riece-log-enabled): New flag.
+ (riece-log-display-message-function): Check riece-log-enabled.
+ (riece-log-insinuate): Don't bind command key.
+ (riece-log-enable): New function.
+ (riece-log-disable): New function.
+
+ * riece-highlight.el (riece-highlight-enabled): New flag.
+ (riece-highlight-setup-dialogue): Renamed from
+ riece-dialogue-turn-on-font-lock; don't call turn-on-font-lock.
+ (riece-highlight-setup-channel-list): Renamed from
+ riece-channel-list-turn-on-font-lock; don't call
+ turn-on-font-lock.
+ (riece-highlight-hide-prefix): Renamed from
+ riece-dialogue-hide-prefix.
+ (riece-highlight-put-overlay-faces): Renamed from
+ riece-put-overlay-faces; check riece-highlight-enabled.
+ (riece-highlight-format-identity-for-channel-list-indicator):
+ Check riece-highlight-enabled.
+ (riece-highlight-insinuate): Follow the name changes.
+ (riece-highlight-enable): New function.
+ (riece-highlight-disable): New function.
+
+ * riece-ctcp.el (riece-ctcp-enabled): New flag.
+ (riece-ctcp-insinuate): Don't bind command keys.
+ (riece-ctcp-enable): New function.
+ (riece-ctcp-disable): New function.
+ (riece-handle-ctcp-request): Check riece-ctcp-enabled.
+ (riece-handle-ctcp-response): Ditto.
+
+ * riece.el: Moved add-on arrangement code to riece-addon.el.
+ (riece-addons-insinuated): New flag.
+ (riece): Don't (re)insinuate add-ons if at least an IRC server is
+ opened; enable add-ons after calling riece-startup-hook.
+
+ * riece-addon.el: New file.
+ * COMPILE (riece-modules): Add riece-addon.
+ * Makefile.am (EXTRA_DIST): Add riece-addon.el.
+
+2004-05-20 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-doctor.el (riece-doctor-buffer-name): Assume that the 1st
+ argument is nickname rather than identity object.
+ (riece-doctor-after-privmsg-hook): Don't send formatted identity
+ as a patient's nickname.
+
+2004-05-20 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-hangman.el (riece-hangman-player-context-alist): Renamed
+ from riece-hangman-players.
+ (riece-hangman-make-context): Add doc.
+ (riece-hangman-context-word): Add doc.
+ (riece-hangman-context-guessed): Add doc.
+ (riece-hangman-context-missed-count): Add doc.
+ (riece-hangman-context-set-guessed): Add doc.
+ (riece-hangman-context-set-missed-count): Add doc.
+ (riece-hangman-word): Add doc.
+ (riece-hangman-reply-with-context): Prefix user name.
+
+2004-05-20 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-doctor.el (riece-doctor-after-privmsg-hook): Prefix user
+ name to reply.
+
+ * riece-hangman.el: New add-on.
+ * COMPILE (riece-modules): Add riece-hangman.
+ * Makefile.am (EXTRA_DIST): Add riece-hangman.el.
+
+2004-05-19 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-400.el (riece-handle-read-string): Append "Quit" to prompt
+ if user quits input.
+
+2004-05-19 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-commands.el (riece-command-complete-user): New command.
+ * riece.el: Bind riece-command-complete-user.
+
+2004-05-19 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-400.el (riece-handle-read-string): New function.
+ (riece-handle-432-message): Use it.
+ (riece-handle-433-message): Use it.
+
+ * riece-server.el (riece-open-server): Don't inhibit quit and
+ catch it when reading server password.
+
+2004-05-18 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-ignore.el (riece-ignore-message-filter): Set the
+ major-mode of riece-ignore-buffer riece-dialogue-mode.
+
+2004-05-18 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-ignore.el (riece-ignore-buffer-name): New user option.
+ (riece-ignore-discard-message): Fixed custom spec to follow the
+ logging option.
+ (riece-ignore-buffer): New variable.
+
+ * riece-log.el (riece-log-display-message-function): Use
+ riece-format-message.
+
+ * riece-message.el (riece-format-message): New function splitted
+ from riece-display-message-1.
+ (riece-display-message-1): Use it.
+
+2004-05-18 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-ignore.el (riece-ignore-user): Renamed from
+ riece-ignore-by-user.
+
+2004-05-18 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-signal.el (riece-connect-signal): Fixed doc.
+ (riece-disconnect-signal): New function.
+
+ * riece-ignore.el (riece-ignore-discard-message): New user option.
+ (riece-ignored-user-list): Renamed from riece-ignored-user.
+ (riece-ignore-by-user): Support unignore.
+
+2004-05-18 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-url.el (riece-url-regexp): Accept ";".
+
+ * riece-ignore.el: New add-on.
+ * COMPILE (riece-modules): Add riece-ignore.
+ * Makefile.am (EXTRA_DIST): Add riece-ignore.el.
+
+2004-05-13 OHASHI Akira <bg66@koka-in.org>
+
+ * riece-log.el (riece-log-get-directory): Follow the name change
+ of riece-channel-regexp.
+
+2004-05-12 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-globals.el (riece-strict-channel-regexp): Renamed from
+ riece-channel-regexp.
+ (riece-strict-user-regexp): Renamed from riece-user-regexp.
+ (riece-laxed-channel-regexp): New constant.
+ (riece-laxed-user-regexp): New constant.
+ (riece-channel-regexp): Define as variable (its default value is
+ set to riece-laxed-channel-regexp).
+ (riece-user-regexp): Define as variable (its default value is set
+ to riece-laxed-user-regexp).
+
+2004-05-10 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-ctlseq.el (riece-ctlseq-scan-region): Abolish.
+ (riece-ctlseq-requires): New function.
+ (riece-ctlseq-message-filter): Assume the existence of
+ riece-put-overlay-faces, add 'riece-overlay-face property.
+
+ * riece-keyword.el (riece-keyword-scan-region): Abolish.
+ (riece-keyword-message-filter): Assume the existence of
+ riece-put-overlay-faces, add 'riece-overlay-face property.
+
+ * riece-highlight.el (riece-put-overlay-faces): New function.
+ (riece-highlight-insinuate): Add riece-put-overlay-faces to
+ riece-after-insert-functions.
+
+2004-05-05 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-misc.el (riece-split-parameters): Don't remove a trailing
+ string even if it is empty.
+
+2004-05-05 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-ctlseq.el: Require 'riece-message for riece-message-text;
+ require 'riece-misc for riece-scan-property-region.
+
+ * riece-ctcp.el: Require 'riece-display for riece-channel-buffer.
+
+2004-05-04 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-300.el (riece-handle-312-message): Use server name
+ returned by WHOIS instead of riece-real-server-name.
+ [cf. <Liece:00170>]
+
+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-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,
+ 'riece-identity, 'riece-layout, and 'riece-server; bind
+ riece-command-mode-map.
+
+ * riece-history.el: Require 'riece-options, 'riece-globals,
+ 'riece-highlight, and 'riece-identity.
+
+ * riece-naming.el (riece-naming-assert-rename): Fixed.
+
+2003-10-24 Daiki Ueno <ueno@unixuser.org>
+
+ * Riece: Version 0.1.5 released.
+ * riece-version.el (riece-version-number): Bump up to 0.1.5.
+
+2003-10-24 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-ctcp.el (riece-command-ctcp-action): If the current
+ command line is not empty, insert it into the minibuffer before
+ reading input. Thanks to Akinori MUSHA <knu@iDaemons.org>
+ [cf. <Liece:00123>]
+
+ * riece.el: Add autoload setting for derived-mode-class.
+ (riece-shrink-buffer-idle-timer): New variable.
+ (riece): Set idle timer to shrink channel buffers.
+ (riece-shrink-buffer): New function.
+
+ * riece-xemacs.el (riece-overlays-in): New function.
+ (riece-delete-overlay): New alias.
+ (riece-kill-all-overlays): New function.
+
+ * riece-server.el (riece-quit-server-process): Don't set timer if
+ riece-quit-timeout is nil.
+
+ * riece-options.el (riece-quit-timeout): Change custom type.
+ (riece-shrink-buffer-idle-time-delay): New user option.
+ (riece-max-buffer-size): New user option.
+
+ * riece-icon.el (riece-icon-add-image-region) [XEmacs]: Delete
+ extents if already exists.
+
+ * riece-emacs.el (riece-overlays-in): New alias.
+ (riece-delete-overlay): New alias.
+ (riece-kill-all-overlays): New function.
+ (riece-run-with-idle-timer): New alias.
+ (riece-cancel-timer): New alias.
+
+ * riece-display.el (riece-update-user-list-buffer): Kill all
+ overlays in buffer.
+ (riece-update-channel-list-buffer): Ditto.
+
+ * riece-commands.el (riece-command-set-operators): Reset group.
+ (riece-command-set-speakers): Ditto.
+
+2003-10-23 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-naming.el (riece-naming-assert-rename): Follow the
+ change of riece-channel.el.
+
+ * riece-message.el (riece-message-external-p): Follow the
+ change of riece-channel.el.
+
+ * riece-display.el (riece-update-user-list-buffer): Follow the
+ change of riece-channel.el.
+
+ * riece-commands.el (riece-command-kick): Follow the change of
+ riece-channel.el.
+ (riece-command-set-operators): Ditto.
+ (riece-command-set-speakers): Ditto.
+
+ * riece-button.el (riece-user-button-set-operators): Follow the
+ change of riece-channel.el.
+ (riece-user-button-set-speakers): Ditto.
+
+ * riece-channel.el (riece-make-channel): Abolish 2nd and 3rd
+ arguments.
+ (riece-get-channel): Follow the change of riece-make-channel.
+ (riece-channel-operators): Abolish.
+ (riece-channel-speakers): Abolish.
+ (riece-channel-set-operators): Abolish.
+ (riece-channel-set-speakers): Abolish.
+ (riece-channel-get-operators): Abolish.
+ (riece-channel-get-speakers): Abolish.
+ (riece-channel-toggle-user): Follow the change of the return type
+ of riece-channel-users.
+ (riece-channel-toggle-operator): Ditto.
+ (riece-channel-toggle-speaker): Ditto.
+ (riece-channel-operator-p): Abolish.
+ (riece-channel-speaker-p): Abolish.
+ (riece-channel-intern-user): Abolish.
+
+2003-10-23 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-identity.el (riece-identity-member): Take an optional 3rd
+ argument to instruct to use riece-identity-equal-no-server.
+ (riece-identity-assoc): Ditto.
+
+ * riece-display.el (riece-update-user-list-buffer): Use
+ riece-channel-operator-p and riece-channel-speaker-p.
+
+ * riece-button.el (riece-user-button-set-operators): Use
+ riece-channel-operator-p.
+ (riece-user-button-set-speakers): Use riece-channel-speaker-p.
+
+ * riece-channel.el (riece-channel-intern-user): New function.
+ (riece-channel-toggle-operator): Use it.
+ (riece-channel-toggle-speaker): Use it.
+ (riece-channel-operator-p): New function.
+ (riece-channel-speaker-p): New function.
+
+2003-10-23 OHASHI Akira <bg66@koka-in.org>
+
+ * riece-log.el (riece-log-get-directory): Follow the change of
+ `riece-channel-regexp'.
+
+2003-10-22 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-identity.el (riece-format-identity): Return copied strings.
+
+2003-10-22 OHASHI Akira <bg66@koka-in.org>
+
+ * riece.el (riece): When riece server was opened, Do
+ `riece-command-configure-windows' instead of signaling.
+
+2003-10-22 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-rdcc.el (riece-rdcc-send-program): Flush $stdout before
+ accepting a connection.
+ (riece-command-dcc-send): Use riece-completing-read-identity; take
+ an identity object in the 1st argument.
+ (riece-rdcc-format-size): New function.
+ (riece-handle-dcc-request): Use it.
+
+ * riece-ndcc.el (riece-command-dcc-send): Use
+ riece-completing-read-identity; take an identity object in the 1st
+ argument.
+
+ * riece-display.el (riece-update-buffers): Run
+ riece-update-buffer-hook.
+
+ * riece-button.el (riece-user-button-finger): Pass an identity
+ object instead of the prefix.
+
+ * riece-ctcp.el: Require 'riece-highlight.
+ (riece-ctcp-action-face): New face.
+ (riece-ctcp-action-face): New variable.
+ (riece-ctcp-action-prefix): New variable.
+ (riece-ctcp-requires): Require 'riece-highlight if it is enabled.
+ (riece-ctcp-insinuate): Modify riece-dialogue-font-lock-keywords
+ if 'riece-highlight is enabled.
+ (riece-handle-ctcp-action-request): Prepend
+ riece-ctcp-action-prefix instead of riece-change-prefix.
+ (riece-command-ctcp-action): Ditto.
+
+ * riece-server.el (riece-quit-server-process): Use riece-run-at-time.
+ * riece-xemacs.el (riece-run-at-time): New function.
+ * riece-emacs.el (riece-run-at-time): New alias.
+
+ * riece-misc.el (riece-get-identities-on-server): New function.
+ (riece-get-users-on-server): Use it.
+
+ * riece-ctcp.el (riece-ctcp-completing-read-identity): Abolish.
+ (riece-command-ctcp-version): Use riece-completing-read-identity
+ and riece-get-identities-on-server.
+ (riece-command-ctcp-ping): Ditto.
+ (riece-command-ctcp-clientinfo): Ditto.
+ (riece-command-ctcp-action): Ditto.
+
+ * riece-commands.el (riece-command-finger): Pass the current
+ server name to riece-get-users-on-server; use
+ riece-completing-read-identity.
+ (riece-command-invite): Ditto.
+ (riece-command-enter-message-to-user): Ditto.
+
+ * riece-000.el (riece-handle-001-message): Register myself with
+ riece-obarray.
+
+2003-10-21 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-ctcp.el (riece-ctcp-completing-read-identity): New
+ function.
+ (riece-command-ctcp-version): Use it.
+ (riece-command-ctcp-ping): Ditto.
+ (riece-command-ctcp-clientinfo): Ditto.
+ (riece-command-ctcp-action): Ditto; don't encode CHANNEL identity
+ twice.
+
+2003-10-20 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-xemacs.el (riece-xemacs-mode-line-buffer-identification):
+ Abolish.
+ (riece-mode-line-buffer-identification): Don't define alias.
+
+ * riece-server.el (riece-open-server): Handle errors occurred
+ during reading password.
+
+ * riece-options.el (riece-addons): Add riece-icon.
+
+ * riece-layout.el (riece-configure-windows-top): Collect arguments.
+
+ * riece-icon.el: New add-on.
+ * COMPILE (riece-modules): Add riece-icon.
+ * Makefile.am (EXTRA_DIST): Add riece-icon.el
+
+2003-10-20 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-options.el (riece-saved-forms): Add riece-layout.
+
+ * riece-layout.el (riece-layout-alist): Change format.
+ (riece-configure-windows): Take 2 args to specify the position of
+ the command buffer window.
+
+ * riece-commands.el (riece-command-change-layout): Set
+ riece-save-variables-are-dirty.
+
+2003-10-19 Daiki Ueno <ueno@unixuser.org>
+
+ * Riece: Version 0.1.4 released.
+ * riece-version.el (riece-version-number): Bump up to 0.1.4.
+
+2003-10-19 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-server.el (riece-server-process-opened): Return t.
+
+ * riece.el (riece-dialogue-mode-map): Bind "p" to
+ riece-command-enter-message-to-user.
+
+ * riece-misc.el (riece-current-nickname): Use
+ riece-current-server-name.
+ (riece-get-users-on-server): Ditto.
+
+ * riece-server.el (riece-current-server-name): New function.
+ (riece-send-string): Use it.
+
+ * riece-commands.el (riece-command-enter-message-to-user): New command.
+
+2003-10-19 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-menu.el (riece-menu-create-layouts-menu): New function.
+ (riece-menu-items): Use it.
+
+ * riece-server.el (riece-server-process-opened): New function.
+ (riece-server-opened): Use it.
+
+ * riece-url.el: Require 'riece-menu.
+ (riece-url-insinuate): Add "Open URL..." menu in
+ riece-command-mode-hook.
+
+ * riece-options.el (riece-addons): Add riece-menu.
+
+ * riece-menu.el: New add-on.
+ * COMPILE (riece-modules): Add riece-menu.
+ * Makefile.am (EXTRA_DIST): Add riece-menu.el
+
+2003-10-19 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-version.el (riece-extended-version): Remove interactive spec.
+ (riece-version): New command.
+ * riece.el (riece-command-map): Bind "V" to riece-version.
+
+ * riece-options.el (riece-command-prefix): New user option.
+ (riece-tab-stop-list): Abolish.
+
+ * riece.el (riece-define-keys-1): If keymap is a list, eval the
+ 2nd element of it.
+ (riece-select-keys): Use riece-command-prefix instead of "\C-c".
+ (riece-command-map): Ditto.
+ (riece-dialogue-mode): Don't set tab-stop-list.
+
+2003-10-18 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-keyword.el (riece-keyword-message-filter): Ignore messages
+ which belongs to myself.
+
+ * riece-commands.el (riece-command-topic): Use
+ riece-check-channel-commands-are-usable.
+ (riece-command-invite): Ditto.
+ (riece-command-kick): Ditto.
+ (riece-command-change-mode): Ditto.
+ (riece-command-set-operators): Ditto.
+ (riece-command-set-speakers): Ditto.
+ (riece-command-send-message): Ditto.
+ (riece-command-part): Ditto.
+
+ * riece-misc.el (riece-get-users-on-server): If
+ riece-current-channel is not set, check the default server.
+ (riece-check-channel-commands-are-usable): New function.
+
+ * riece-globals.el (riece-channel-regexp): Accept channel names
+ beginning with "!!".
+
+2003-10-16 TAKAHASHI Kaoru <kaoru@kaisei.org>
+
+ * riece-commands.el (riece-command-universal-server-name-argument):
+ Fix parenthesis.
+
+2003-10-16 Daiki Ueno <ueno@unixuser.org>
+
+ * riece.el (riece-buffer-alist): Rename from
+ riece-buffer-mode-alist.
+
+ * riece-misc.el (riece-get-buffer-create): Takes an optional 2nd
+ argument, init-major-mode, which is used to assert the major-mode
+ of the created buffer.
+
+ * riece-naming.el (riece-naming-assert-rename): Merged buffer
+ renaming logic that riece-handle-nick-message was responsible for.
+
+ * riece-globals.el (riece-server-process-alist): Revive.
+ (riece-process-list): Abolish.
+ (riece-command-buffer): Set default to nil.
+ (riece-dialogue-buffer): Ditto.
+ (riece-others-buffer): Ditto.
+ (riece-channel-list-buffer): Ditto.
+ (riece-user-list-buffer): Ditto.
+ (riece-private-buffer): Abolish.
+ (riece-wallops-buffer): Abolish.
+
+ * riece-display.el (riece-channel-buffer-format): Moved from
+ riece-globals.
+ (riece-channel-buffer-alist): New variable.
+ (riece-channel-buffer-create): Assert the major-mode of the
+ created buffer is 'riece-channel-mode.
+ (riece-channel-buffer): New function.
+ (riece-switch-to-channel): Use riece-channel-buffer instead of
+ directly using get-buffer.
+
+2003-10-14 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-commands.el (riece-command-toggle-away): Check user away
+ status in the server buffer.
+ [cf. <Liece:00119>]
+ (riece-command-names): Use identity prefix
+ instead of formatted identity.
+ (riece-command-who): Ditto.
+
+2003-10-14 TAKAHASHI Kaoru <kaoru@kaisei.org>
+
+ * riece.el (riece-dialogue-mode-map): Bind "N" instead of "\C-n"
+ to `riece-command-name'.
+
+2003-10-14 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-layout.el (riece-reconfigure-windows-predicate): Simplified.
+
+2003-10-13 Daiki Ueno <ueno@unixuser.org>
+
+ * Riece: Version 0.1.3 released.
+ * riece-version.el (riece-version-number): Bump up to 0.1.3.
+
+2003-10-13 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-button.el (riece-button-map-identity-region): Abolish.
+ (riece-user-button-set-operators): Use riece-scan-property-region.
+ (riece-user-button-set-speakers): Ditto.
+ (riece-button-add-identity-button): Ditto.
+
+ * riece-keyword.el: Require 'riece-message.
+ (riece-keyword-map-region): Abolish.
+ (riece-keyword-scan-region): Use riece-scan-property-region.
+
+ * riece-misc.el (riece-scan-property-region): New function.
+
+2003-10-13 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-xemacs.el (riece-make-overlay): New alias.
+ (riece-overlay-put): New alias.
+ (riece-overlay-start): New alias.
+ (riece-overlay-buffer): New alias.
+
+ * riece-emacs.el (riece-make-overlay): New alias.
+ (riece-overlay-put): New alias.
+ (riece-overlay-start): New alias.
+ (riece-overlay-buffer): New alias.
+
+ * riece-keyword.el: New add-on.
+ * COMPILE (riece-modules): Add riece-keyword.
+ * Makefile.am (EXTRA_DIST): Add riece-keyword.el
+
+ * riece-message.el (riece-message-filter-functions): New user option.
+ (riece-display-message-1): New function.
+ (riece-display-message): Use it.
+
+2003-10-13 Daiki Ueno <ueno@unixuser.org>
+
+ * riece.el (riece-channel-list-mode): Initialize
+ riece-update-buffer-functions.
+ (riece-user-list-mode): Ditto.
+
+ * riece-globals.el (riece-channel-indicator): Rename from
+ riece-short-channel-indicator.
+ (riece-long-channel-indicator): Rename from
+ riece-channel-indicator.
+
+ * riece-display.el (riece-update-buffer-functions): Default to
+ nil.
+ (riece-update-indicator-functions): New variable splitted from
+ riece-update-buffer-functions.
+ (riece-update-channel-indicator): Rename from
+ riece-update-short-channel-indicator.
+ (riece-update-long-channel-indicator): Rename from
+ riece-update-channel-indicator.
+ (riece-update-buffers): Don't set riece-channel-buffer.
+ (riece-switch-to-channel): Set riece-channel-buffer here.
+
+ * riece-button.el (riece-user-button-popup-menu): Change order.
+ (riece-button-update-buffer): Unify
+ riece-button-update-channel-list-buffer and
+ riece-button-update-user-list-buffer.
+
+2003-10-13 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-history.el (riece-history-insinuate): In
+ riece-after-switch-to-channel-functions, check whether the last
+ channel is nil.
+
+ * riece-xemacs.el (riece-event-buffer): New alias.
+ (riece-event-point): New alias.
+
+ * riece-emacs.el (riece-event-buffer): New function.
+ (riece-event-point): New function.
+
+ * riece-display.el (riece-update-user-list-buffer): Use
+ riece-format-identity to add 'riece-identity property to user
+ names.
+
+ * riece-button.el (riece-user-button-popup-menu): New variable.
+ (riece-identity-button): Rename from riece-channel-button.
+ (riece-button-switch-to-identity): Rename from
+ riece-channel-button-action.
+ (riece-identity-button-popup-menu): Rename from
+ riece-channel-button-popup-menu; set point to the position the
+ event occurred.
+ (riece-user-button-join-partner): New function.
+ (riece-user-button-set-operators): New function.
+ (riece-user-button-set-speakers): New function.
+ (riece-user-button-finger): New function.
+ (riece-make-identity-button-map): New function.
+ (riece-button-map-identity-region): New function; splitted from
+ riece-button-add-identity-button.
+ (riece-button-add-identity-button): Use it.
+ (riece-button-update-user-list-buffer): New function.
+ (riece-button-insinuate): Add riece-button-update-user-list-buffer
+ to riece-update-buffer-functions.
+
+2003-10-13 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-xemacs.el (riece-mouse-2): New variable.
+ (riece-popup-menu-popup): New function.
+
+ * riece-emacs.el (riece-mouse-2): New variable.
+ (riece-popup-menu-bogus-filter-constructor): New macro.
+ (riece-popup-menu-popup): New function.
+
+ * riece-commands.el (riece-command-list): Use identity prefix
+ instead of formatted identity.
+
+ * riece-button.el (riece-channel-button-popup-menu): New variable.
+ (riece-channel-button): Arrange help-echo.
+ (riece-channel-button-switch-to-channel): New function.
+ (riece-channel-button-part): New function.
+ (riece-channel-button-list): New function.
+ (riece-channel-button-map): New variable.
+ (riece-button-add-channel-buttons): Add 'local-map and 'keymap
+ properties on channel buttons.
+
+2003-10-13 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-button.el (riece-button-insinuate): Buttonize channel buffers.
+
+ * riece-history.el (riece-channel-list-history-face): New face.
+ (riece-history-format-channel-list-line): New function.
+ (riece-history-insinuate): Add ?+ to
+ riece-channel-list-mark-face-alist; add
+ riece-history-format-channel-list-line to
+ riece-format-channel-list-line-functions.
+
+ * riece-highlight.el (riece-channel-list-current-face): Arrange colors.
+
+2003-10-13 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-unread.el (riece-unread-after-display-message-function):
+ Do nothing when message-target is already in
+ riece-unread-channels; call riece-redisplay-buffers.
+ (riece-unread-update-channel-list-buffer): Abolish.
+ (riece-unread-after-switch-to-channel-function): Don't call
+ riece-unread-update-channel-list-buffer.
+ (riece-unread-format-channel-list-line): New function.
+ (riece-unread-insinuate): Add
+ riece-unread-format-channel-list-line to
+ riece-format-channel-list-line; don't add
+ riece-unread-update-channel-list-buffer to
+ riece-update-buffer-functions.
+
+ * riece-highlight.el (riece-channel-list-mark-current-channel):
+ Abolish; merged into riece-update-channel-list-buffer.
+ (riece-highlight-insinuate): Don't add
+ riece-channel-list-mark-current-channel to
+ riece-after-switch-to-channel-functions.
+
+ * riece-display.el (riece-channel-list-changed): Abolish.
+ (riece-update-channel-list-buffer): Always redisplay channel-list
+ buffer.
+ (riece-update-channel-list-indicator): Always redisplay
+ channel-list indicator.
+ (riece-format-channel-list-line): New function.
+ (riece-update-buffers): Don't clear riece-channel-list-changed.
+ (riece-join-channel): Don't set riece-channel-list-changed.
+ (riece-part-channel): Ditto.
+
+2003-10-13 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-options.el (riece-addons): Add riece-button.
+
+ * riece-display.el (riece-update-channel-list-buffer): Avoid to
+ use format to preserve 'riece-identity property.
+
+ * riece-unread.el (riece-unread-update-channel-list-buffer):
+ Simplified.
+ (riece-unread-insinuate): Delay adding
+ riece-unread-update-channel-list-buffer to
+ riece-update-buffer-functions.
+
+ * riece-button.el: New add-on.
+ * COMPILE (riece-modules): Add riece-button.
+ * Makefile.am (EXTRA_DIST): Add riece-button.el
+
+2003-10-08 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-server.el (riece-close-server-process):
+ (riece-quit-server-process): Call riece-close-server-process
+ instead of kill-process; call riece-exit if no process is available.
+
+2003-10-07 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-display.el (riece-channel-buffer-name): Check whether
+ IDENTITY is a member of riece-current-channels.
+
+2003-10-07 TAKAHASHI Kaoru <kaoru@kaisei.org>
+
+ * riece-commands.el (riece-command-kick): Fix completing-read
+ collection argument.
+
+2003-10-05 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-000.el: Require 'riece-commands.
+ * riece-200.el: Don't require 'riece-commands.
+ * riece-300.el: Ditto.
+
+2003-10-05 Daiki Ueno <ueno@unixuser.org>
+
+ * Riece: Version 0.1.2 released.
+ * riece-version.el (riece-version-number): Bump up to 0.1.2.
+
+2003-10-05 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-filter.el (riece-sentinel): Don't clear
+ riece-reconnect-with-password.
+ * riece-server.el (riece-open-server): Clear
+ riece-reconnect-with-password here.
+
+2003-10-04 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-globals.el (riece-join-channel-candidate): New variable.
+ * riece-commands.el (riece-command-join): Prompt
+ riece-join-channel-candidate.
+
+ * riece-handle.el (riece-handle-invite-message): Set
+ riece-join-channel-candidate when the user is invited.
+ * riece-naming.el (riece-naming-assert-join): Clear
+ riece-join-channel-candidate.
+
+2003-10-04 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-identity.el (riece-completing-read-identity): Pass 6th &
+ 7th arguments to completing-read.
+
+ * riece-commands.el (riece-command-part): Use 6th argument DEFAULT
+ of riece-completing-read-identity.
+
+ * riece-handle.el (riece-handle-invite-message): Fix parsing of
+ parameters.
+
+ * riece-display.el (riece-update-channel-list-buffer): Don't clear
+ riece-channel-list-changed.
+ (riece-update-buffers): Clear it.
+
+2003-10-01 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-rdcc.el (riece-rdcc-save-directory): New user option.
+
+2003-09-29 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-000.el (riece-handle-001-message): Parse elements in
+ riece-startup-channel-list.
+
+2003-09-21 TAKAHASHI Kaoru <kaoru@kaisei.org>
+
+ * riece-skk-kakutei.el
+ (riece-skk-kakutei-command-enter-message-as-notice): Fix typo.
+
+2003-09-20 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-options.el (riece-startup-channel-list): Revive.
+ * riece-000.el (riece-handle-001-message): Process
+ riece-startup-channel-list.
+
+ * riece-server.el (riece-open-server): Display "Logging in to
+ XXX..." message.
+ * riece-000.el (riece-handle-001-message): Clear "Logging in to
+ XXX..." message; call riece-after-login-hook.
+
+2003-09-07 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-unread.el (riece-unread-after-display-message-function):
+ Simplified.
+
+2003-09-02 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-commands.el (riece-command-join): Extract target
+ identity-prefix before applying riece-channel-p; format target.
+
+2003-08-30 Daiki Ueno <ueno@unixuser.org>
+
+ * Riece: Version 0.1.1 released.
+ * riece-version.el (riece-version-number): Bump up to 0.1.1.
+
+2003-08-29 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-guess.el (riece-guess-channel-try-functions): Default to
+ nil.
+ (riece-default-guess-channel): Abolish.
+ (riece-command-guess-switch-to-channel): Reconstruct
+ riece-guess-candidates when it is empty.
+
+2003-08-28 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-highlight.el (riece-dialogue-change-face): Use defvar to
+ define.
+ (riece-dialogue-notice-face): Ditto.
+ (riece-dialogue-wallops-face): Ditto.
+ (riece-dialogue-error-face): Ditto.
+ (riece-dialogue-info-face): Ditto.
+ (riece-dialogue-server-face): Ditto.
+ (riece-dialogue-prefix-face): Ditto.
+ (riece-channel-list-default-face): Ditto.
+ (riece-channel-list-current-face): Ditto.
+
+ * riece-unread.el (riece-channel-list-unread-face): Use defvar to
+ define.
+
+2003-08-27 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-history.el (riece-history-insinuate): Don't set
+ riece-guess-channel-try-functions here.
+ (riece-history-requires): Don't require riece-guess.
+
+ * riece-unread.el (riece-unread-requires): Don't require
+ riece-guess.
+ (riece-unread-insinuate): Don't set
+ riece-guess-channel-try-functions here.
+
+2003-08-27 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-unread.el (riece-unread-after-display-message-function):
+ Rename from riece-unread-display-message-function.
+ (riece-unread-after-switch-to-channel-function): Rename from
+ riece-unread-channel-switch-hook.
+ (riece-guess-channel-from-unread): New function.
+ (riece-unread-requires): Require 'riece-guess and 'riece-history.
+ (riece-unread-insinuate): Setup riece-guess-channel-try-functions.
+
+ * riece-options.el (riece-addons): Add riece-guess, riece-history,
+ and riece-url.
+
+ * riece-layout.el (riece-reconfigure-windows-predicate): Don't
+ check riece-last-channel.
+
+ * riece-display.el (riece-switch-to-channel): Rename
+ riece-channel-switch-hook to
+ riece-after-switch-to-channel-functions.
+ (riece-switch-to-nearest-channel): Ditto.
+
+ * riece-guess.el: New add-on.
+ * COMPILE (riece-modules): Add riece-guess.
+ * Makefile.am (EXTRA_DIST): Add riece-guess.el
+
+ * riece-history.el: New add-on.
+ * COMPILE (riece-modules): Add riece-history.
+ * Makefile.am (EXTRA_DIST): Add riece-history.el
+
+2003-08-27 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-options.el (riece-connection-timeout): Abolish.
+
+ * riece-server.el (riece-clear-system): Abolish.
+ * riece.el (riece-exit): Merge riece-clear-system.
+
+2003-08-26 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-filter.el (riece-sentinel): Suppress status message when
+ riece-debug is nil.
+
+2003-08-26 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-highlight.el (riece-channel-list-mark-current-channel):
+ New function.
+
+ * riece-display.el (riece-channel-list-changed): New variable.
+ (riece-update-channel-list-buffer): Check riece-channel-list-changed.
+ (riece-update-channel-list-indicator): Ditto.
+
+2003-08-26 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-options.el (riece-addons): Enable riece-unread by default.
+
+ * riece-highlight.el (riece-channel-list-current-face): New variable.
+ (riece-channel-list-default-face): New face.
+
+ * riece-globals.el (riece-channel-list-buffer): Strip leading
+ whitespace.
+
+2003-08-26 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-unread.el: Require 'riece-highlight when compiling.
+ (riece-unread): New custom group.
+ (riece-channel-list-unread-face): New variable.
+ (riece-channel-list-unread-face): New face.
+ (riece-unread-requires): New function.
+ (riece-unread-insinuate): Add ?! to riece-channel-list-mark-face-alist.
+
+ * riece-highlight.el: Highlight *Channels* buffer; rename
+ riece-*-face -> riece-dialogue-*-face, riece-highlight-* ->
+ riece-dialogue-*.
+ (riece-channel-list-font-lock-keywords): New variable.
+ (riece-channel-list-mark-face-alist): New variable.
+
+2003-08-25 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-unread.el (riece-unread-update-channel-list-buffer):
+ Restore channel marks if exist.
+
+ * riece-naming.el (riece-naming-assert-join): Don't set
+ riece-redisplay-buffers.
+ (riece-naming-assert-part): Ditto.
+ (riece-naming-assert-rename): Ditto.
+
+ * riece-display.el (riece-redisplay-buffers): Abolish.
+ (riece-update-user-list-buffer): Don't check
+ riece-redisplay-buffers.
+ (riece-update-channel-list-buffer): Ditto; prefix "*" at the
+ beginning of the current channel.
+ (riece-switch-to-channel): Don't set riece-redisplay-buffers.
+ (riece-join-channel): Ditto.
+ (riece-part-channel): Ditto.
+
+2003-08-25 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-display.el (riece-join-channel): Parse non-nil elements in
+ riece-default-channel-binding.
+
+2003-08-25 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-identity.el (riece-format-identity): Add 'riece-identity
+ property to the resulting string.
+
+ * riece-misc.el (riece-concat-channel-topic): Don't append ":" if
+ topic is "".
+
+ * riece-300.el (riece-handle-322-message): Simplify message.
+
+ * riece-commands.el (riece-command-change-layout): Call
+ riece-command-configure-windows; Use setq instead of
+ custom-set-variables.
+
+2003-08-25 Daiki Ueno <ueno@unixuser.org>
+
+ * Riece: Version 0.1.0 released.
+ * riece-version.el (riece-version-number): Bump up to 0.1.0.
+
+2003-08-25 Daiki Ueno <ueno@unixuser.org>
+
+ * COMPILE (riece-compile-modules): Ignore errors during byte
+ compilation.
+ (riece-install-modules): If there lacks a compiled module, don't
+ attempt to install it.
+
+ * riece-options.el (riece-quit-timeout): Default to 10.
+
+ * riece.el (riece-dialogue-mode-map): Bind riece-command-change-layout.
+ (riece): Switch to riece-command-buffer before riece-redisplay-buffers.
+
+ * riece-unread.el: Require 'riece-commands.
+
+ * riece-server.el: Require 'riece-identity and 'riece-compat.
+
+ * riece-ndcc.el: Require 'riece-globals, 'riece-options,
+ 'riece-display.
+ (riece-handle-dcc-request): Use riece-channel-buffer-name.
+
+ * riece-identity.el: Don't require 'riece-server.
+
+ * riece-doctor.el: Require 'riece-globals, 'riece-identity,
+ 'riece-message, and 'riece-server.
+
+ * riece-ctcp.el: Require 'riece-display.
+
+ * riece-commands.el: Require 'riece-layout.
+ (riece-command-change-layout): New command.
+
+ * riece-alias.el: Require 'riece-identity.
+
+ * riece-layout.el: No longer provided as an add-on.
+ * riece-display.el: Remove window configuration stuff.
+
+2003-08-24 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-rdcc.el (riece-command-dcc-send): Bind
+ process-connection-type to nil.
+
+ * riece-300.el (riece-handle-319-message): New handler.
+
+ * riece.el (riece-buffer-mode-alist): Add riece-command-buffer.
+ (riece): Signal an error when a server is opened;
+ No need to initialize riece-command-buffer specially.
+
+2003-08-22 TAKAHASHI Kaoru <kaoru@kaisei.org>
+
+ * riece-display.el (riece-configure-windows-top): Set
+ `truncate-partial-width-windows' nil, when horizontal window
+ split.
+
+2003-08-21 TAKAHASHI Kaoru <kaoru@kaisei.org>
+
+ * riece-display.el (riece-configure-windows-top): Change
+ user-list-buffer and channel-list-buffer window create logic.
+
+ * riece-skk-kakutei.el (riece-skk-kakutei-insinuate): Add
+ require riece.el when compile.
+
+ * riece.el (riece): Use `riece-redisplay-buffers' instead of
+ `riece-configure-windows'.
+
+2003-08-20 TAKAHASHI Kaoru <kaoru@kaisei.org>
+
+ * riece-display.el (riece-configure-windows-top): New function.
+ * riece-layout.el (riece-layout-alist): Add top.
+
+ * riece-skk-kakutei.el: New add-on.
+ * COMPILE (riece-modules): Add riece-skk-kakutei.
+ * Makefile.am (EXTRA_DIST): Add riece-skk-kakutei.el
+
+2003-08-19 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-layout.el: New add-on.
+ * COMPILE (riece-modules): Add riece-layout.
+ * Makefile.am (EXTRA_DIST): Add riece-layout.el
+
+2003-08-17 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-options.el (riece-quit-timeout): New user option.
+ * riece-server.el (riece-quit-server-process): New function.
+ * riece-commands.el (riece-command-quit): Use it.
+ (riece-command-close-server): Use it.
+
+2003-08-17 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-commands.el (riece-command-previous-channel): Skip nil in
+ riece-current-channels.
+
+2003-08-09 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-rdcc.el (riece-command-dcc-send): Accept output only from
+ the ruby process.
+
+ * riece-xemacs.el: Don't require 'riece-compat.
+
+2003-08-06 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-unread.el (riece-unread-update-channel-list-buffer): Call
+ riece-parse-identity.
+
+2003-08-04 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-server.el (riece-find-server-name): Abolish.
+
+ * riece-alias.el: Add usage.
+
+2003-08-04 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-mini.el (riece-mini-send-message): Use
+ riece-completing-read-identity; don't use riece-own-channel-message.
+
+ * riece-identity.el: Require 'riece-compat.
+ (riece-identity-prefix-case-table): New variable.
+ (riece-abbrev-identity-string-function): New variable.
+ (riece-expand-identity-string-function): New variable.
+ (riece-format-identity): Rename from riece-decode-identity.
+ (riece-parse-identity): Rename from riece-encode-identity.
+ (riece-with-identity-buffer): Abolish.
+ (riece-identity-canonicalize-prefix): Use case-table.
+
+ * riece-filter.el (riece-handle-numeric-reply): Decode messages.
+ (riece-handle-message): Ditto.
+
+ * riece-alias.el: New add-on.
+ * COMPILE (riece-modules): Add riece-alias.
+ * Makefile.am (EXTRA_DIST): Add riece-alias.el.
+
+ * riece-emacs.el (riece-set-case-syntax-pair): New alias.
+ * riece-xemacs.el (riece-set-case-syntax-pair): New alias.
+ * riece-identity.el (riece-identity-canonicalize-prefix): Simplified.
+
+2003-08-03 Daiki Ueno <ueno@unixuser.org>
+
+ * Riece: Version 0.0.4 released.
+ * riece-version.el (riece-version-number): Bump up to 0.0.4.
+
+2003-06-24 OHASHI Akira <bg66@koka-in.org>
+
+ * riece-unread.el (riece-unread-display-message-function): Don't check
+ `selected-window'. It doesn't work as expected.
+
+2003-06-23 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-misc.el (riece-channel-p): Moved from riece-channel.el.
+
+ * riece-300.el: Rewrite using riece-decode-identity.
+
+ * riece-identity.el (riece-completing-read-identity): Signal an
+ error when the encoded channel name is not matched with
+ riece-channel-regexp.
+
+ * riece-globals.el (riece-channel-regexp): Moved from
+ riece-channel.el.
+ (riece-user-regexp): Moved form riece-user.el.
+
+2003-06-23 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-handle.el (riece-handle-join-message): Don't call
+ riece-switch-to-channel.
+ (riece-handle-part-message): Don't decode message if it is empty.
+ (riece-handle-kick-message): Ditto.
+ (riece-handle-quit-message): Ditto.
+ (riece-handle-kill-message): Ditto.
+
+ * riece-commands.el (riece-command-part): Show the current channel
+ as default candidate.
+
+ * riece-identity.el (riece-completing-read-identity): Accept
+ optional 5th argument `initial'.
+
+ * riece-unread.el (riece-unread-update-channel-list-buffer):
+ Simplified.
+
+ * riece-filter.el (riece-sentinel): Don't bind
+ riece-inhibit-update-buffers.
+
+ * riece-display.el (riece-redisplay-buffer): New variable.
+ (riece-inhibit-update-buffers): Abolish.
+ (riece-update-channel-list-buffer): Memorize
+ encoded identity as text property on each line.
+
+ * riece.el (riece-channel-list-mode): Make riece-redisplay-buffer
+ buffer local.
+ (riece-user-list-mode): Ditto.
+
+2003-06-22 Yoichi NAKAYAMA <yoichi@geiin.org>
+
+ * riece-log.el, riece-mini.el, riece-unread.el, riece-url.el:
+ Fix example setting, don't use 3rd arg of add-to-list.
+
+ * riece-coding.el (riece-default-coding-system): Fix default value.
+
+2003-06-22 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-display.el (riece-inhibit-update-buffers): New variable.
+ * riece-filter.el (riece-sentinel): Bind
+ riece-inhibit-update-buffers while removing channels from
+ riece-current-channels.
+ * riece-unread.el (riece-unread-display-message-function): Don't
+ update channel list buffer when riece-inhibit-update-buffers is
+ non-nil.
+ (riece-unread-channel-switch-hook): Ditto.
+ (riece-unread-insinuate): Add
+ riece-unread-update-channel-list-buffer to
+ riece-update-buffer-functions.
+
+ * riece-commands.el (riece-command-switch-to-channel): Call
+ riece-redisplay-buffers instead of riece-command-configure-windows.
+
+ * riece-identity.el (riece-completing-read-identity): Remove nil
+ from riece-current-channels before converting it to an alist.
+
+2003-06-17 OHASHI Akira <bg66@koka-in.org>
+
+ * riece-unread.el (riece-unread-display-message-function): Check a
+ `selected-window'.
+
+ * riece-mini.el: New add-on.
+ * COMPILE (riece-modules): Add `riece-mini'.
+ * Makefile.am (EXTRA_DIST): Add `riece-mini.el'.
+
+ * riece-display.el (riece-channel-buffer-create): Add new hook.
+ * riece-log.el: New add-on for saving irc logs.
+ * COMPILE (riece-modules): Add `riece-log'.
+ * Makefile.am (EXTRA_DIST): Add `riece-log.el'.
+
+ * riece-commands.el (riece-command-join): Use `let*' instead of `let'.
+ (riece-command-part): Ditto.
+
+2003-06-12 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-naming.el (riece-naming-assert-join): Call
+ riece-update-buffers.
+ (riece-naming-assert-part): Ditto.
+
+ * riece-filter.el (riece-sentinel): Don't bind
+ riece-overriding-server-name; use riece-part-channel.
+
+ * riece-display.el (riece-switch-to-channel): Don't set
+ riece-channel-buffer.
+ (riece-update-buffers): Set riece-channel-buffer here.
+
+ * riece-commands.el (riece-command-switch-to-channel-by-number): Fixed.
+ (riece-command-close-server): Fixed completion bug.
+ (riece-command-universal-server-name-argument): Ditto.
+
+2003-06-12 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-doctor.el: Don't require 'doctor; autoload doctor-mode and
+ doctor-read-print.
+
+ * riece-handle.el (riece-handle-nick-message): Use
+ riece-decode-identity to decode user.
+ (riece-handle-join-message): Ditto.
+ (riece-handle-part-message): Ditto.
+ (riece-handle-kick-message): Ditto.
+ (riece-handle-quit-message): Ditto.
+ (riece-handle-kill-message): Ditto.
+ (riece-handle-invite-message): Ditto.
+ (riece-handle-topic-message): Ditto.
+ (riece-handle-mode-message): Ditto.
+
+2003-06-12 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-message.el (riece-own-channel-message): Abolish.
+
+ * riece-commands.el (riece-command-send-message): Don't use
+ riece-own-channel-message.
+
+ * riece-doctor.el (riece-doctor-reply): Don't use
+ riece-own-channel-message.
+ (riece-doctor-hello-regexp): New user option.
+ (riece-doctor-bye-regexp): New user option.
+
+2003-06-11 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-identity.el (riece-identity-member-no-server): Abolish.
+
+ * riece-doctor.el (riece-doctor-patients): Make it global variable.
+ (riece-doctor-after-privmsg-hook): Use riece-identity-member
+ instead of riece-identity-member-no-server.
+
+2003-06-11 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-doctor.el: New add-on.
+ * COMPILE (riece-modules): Add riece-doctor.
+ * Makefile.am (EXTRA_DIST): Add riece-doctor.el
+
+2003-06-11 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-handle.el (riece-handle-nick-message): Follow the change
+ of riece-identity-member.
+
+ * riece-commands.el (riece-command-next-channel): Use
+ riece-identity-member instead of riece-identity-member-no-server.
+ (riece-command-previous-channel): Ditto.
+
+2003-06-11 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-identity.el (riece-completing-read-identity): Remove nil
+ from channels before completing-read.
+
+ * riece-message.el (riece-message-make-name): Fix condition for priv.
+ (riece-message-make-global-name): Ditto.
+ (riece-message-buffer): Ditto.
+
+ * riece-misc.el (riece-current-nickname): Use
+ riece-with-identity-buffer.
+
+2003-06-11 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-message.el (riece-message-parent-buffers): Regard message's
+ speaker as target when priv mode.
+
+ * riece-display.el (riece-update-channel-indicator): Decode
+ riece-current-channel even in priv mode.
+
+ * riece-identity.el (riece-decode-identity): Respect prefix-only.
+ (riece-completing-read-identity): Check if illegal characters in
+ channel name.
+
+2003-06-08 Daiki Ueno <ueno@unixuser.org>
+
+ * riece.el (riece-buffer-mode-alist): Add riece-user-list-buffer.
+ * riece-globals.el (riece-user-buffer-format): Abolish.
+ (riece-user-list-buffer): Default to " *Users*".
+ * riece-display.el (riece-user-list-buffer-name): Abolish.
+ (riece-user-list-buffer-create): Abolish.
+
+2003-06-08 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-filter.el (riece-handle-numeric-reply): Don't decode messages.
+ (riece-handle-message): Ditto.
+ (riece-sentinel): Clear system here.
+
+ * riece-server.el (riece-server-process-name): New function.
+ (riece-server-process): New function.
+ (riece-close-server): Abolish.
+
+ * riece-identity.el: Adopt vector object representation for
+ identity objects.
+ (riece-with-identity-buffer): New macro.
+ (riece-decode-identity): New function.
+ (riece-encode-identity): New function.
+
+ * riece-globals.el (riece-process-list): New variable.
+ (riece-server-process-alist): Abolish.
+ (riece-channel-buffer-alist): Abolish.
+ (riece-user-list-buffer-alist): Abolish.
+ (riece-short-channel-indicator): New variable.
+
+ * riece-channel.el: Assume that we are already in the server buffer.
+ * riece-user.el: Likewise.
+
+2003-06-06 OHASHI Akira <bg66@koka-in.org>
+
+ * riece-ndcc.el (riece-ndcc-server-sentinel): Close a parenthesis.
+
+ * riece-rdcc.el (riece-rdcc-insinuate): Don't use the 3rd argument of
+ `add-to-list'.
+
+2003-06-06 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-channel.el (riece-forget-channel): Fixed.
+ (riece-channel-modeless-regexp): Abolish.
+ (riece-channel-modeless-p): Abolish.
+
+2003-06-06 OHASHI Akira <bg66@koka-in.org>
+
+ * riece-unread.el (riece-unread-display-message-function): Delete the
+ target before adding to list.
+ (riece-unread-switch-to-channel): New function.
+ (riece-unread-insinuate): Bind "\C-c\C-u" to riece-command-mode-map.
+ Bind "u" to riece-dialogue-mode-map.
+ Bind "u" to riece-channel-list-mode-map.
+
+ * riece.el (riece-channel-list-mode-map): Don't bind
+ `riece-command-unread-channel'.
+
+2003-06-04 Yoichi NAKAYAMA <yoichi@geiin.org>
+
+ * riece-000.el,riece-200.el,riece-300.el,riece-400.el,riece-500.el,
+ riece-commands.el,riece-filter.el,riece-handle.el,riece-highlight.el
+ riece-identity.el,riece-message.el,riece-misc.el,riece-naming.el,
+ riece.el: Don't require riece-inlines since it has been removed.
+
+2003-06-03 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-display.el (riece-update-user-list-buffer): Rename from
+ riece-user-list-update-buffer.
+ (riece-update-channel-list-buffer): Rename from
+ riece-channel-list-update-buffer.
+
+2003-06-03 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-identity.el (riece-identity-canonicalize-prefix): Moved
+ from riece-inlines.el; renamed from scandinavian-downcase.
+ (riece-identity-equal-no-server): Moved from riece-inlines.el;
+ renamed from scandinavian-equal-ignore-case.
+ (riece-identity-equal-no-server-safe): New function.
+ (riece-identity-member-no-server): Moved from riece-inlines.el;
+ renamed from scandinavian-member-ignore-case.
+ (riece-identity-member-no-server-safe): New function.
+
+ * riece-inlines.el: Removed.
+ * COMPILE (riece-modules): Remove riece-inlines.
+ * Makefile.am (EXTRA_DIST): Remove riece-inlines.el.
+
+2003-06-03 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-rdcc.el (riece-rdcc-sentinel): Don't call delete-process
+ explicitly.
+ * riece-ndcc.el: Don't call delete-process explicitly.
+ * riece-server.el (riece-close-server-process): Don't call
+ delete-process explicitly unless riece-debug == t.
+
+2003-06-03 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-inlines.el (scandinavian-downcase): New inline function.
+ (scandinavian-equal-ignore-case): Rename from
+ string-equal-ignore-case.
+ (scandinavian-member-ignore-case): Rename from
+ string-list-member-ignore-case.
+
+ * riece-identity.el (riece-identity-equal): Rename from
+ riece-identity-equal-no-server; use scandinavian-equal-ignore-case.
+ (riece-identity-equal-safe): Rename from riece-identity-equal.
+ (riece-identity-member): Rename from riece-identity-member-no-server.
+ (riece-identity-member-safe): Rename from riece-identity-member.
+ (riece-identity-assoc): Rename from riece-identity-assoc-no-server.
+ (riece-identity-assoc-safe): Rename from riece-identity-assoc.
+
+2003-06-03 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-rdcc.el: Require 'riece-ctcp.
+ (riece-rdcc-insinuate): Add "DCC" to
+ riece-ctcp-additional-clientinfo.
+
+ * riece-ctcp.el (riece-ctcp-additional-clientinfo): New variable.
+ (riece-command-ctcp-clientinfo): New command.
+ (riece-ctcp-insinuate): Bind it in riece-dialogue-mode-map.
+ (riece-handle-ctcp-clientinfo-request): New handler.
+ (riece-handle-ctcp-clientinfo-response): New handler.
+
+ * riece-server.el (riece-open-server): No need to use
+ get-buffer-create to reuse process buffer.
+
+2003-06-03 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-rdcc.el (riece-command-dcc-send): Generate new buffer for
+ DCC process.
+ (riece-command-dcc-receive): Likewise; don't set buffer-file-name.
+
+ * riece-server.el (riece-server-keyword-map): `:coding-system' ->
+ `:coding'.
+ (riece-open-server): Follow the change.
+
+ * riece-ctcp.el (riece-command-ctcp-action): New command.
+ (riece-ctcp-insinuate): Bind it in riece-dialogue-mode-map.
+ (riece-handle-ctcp-action-request): New handler.
+
+ * riece.el (riece-command-mode): Enclose status indicators with
+ `{}'; show riece-user-indicator.
+ (riece-channel-mode): Likewise.
+ (riece-dialogue-mode): Enclose status indicators with `{}'.
+ * riece-globals.el (riece-user-indicator): New indicator.
+ (riece-freeze-indicator): Default to "-".
+ * riece-display.el (riece-update-channel-indicator): Don't update
+ modeline.
+ (riece-update-status-indicators): Set riece-user-indicator.
+ * riece-300.el (riece-handle-324-message): Update channel indicator.
+
+2003-06-02 Daiki Ueno <ueno@unixuser.org>
+
+ * riece.el (riece-command-mode): Don't set riece-freeze-indicator.
+ (riece-dialogue-mode): Call riece-update-status-indicators.
+ (riece-channel-mode): Add riece-operator-indicator to
+ mode-line-buffer-identification.
+ * riece-user.el (riece-make-user): New attribute `operator'.
+ (riece-user-operator): New function.
+ (riece-user-set-operator): New function.
+ (riece-user-toggle-away): New function.
+ (riece-user-toggle-operator): New function.
+ * riece-misc.el (riece-own-frozen): Revive.
+ * riece-message.el (riece-display-message): Reset riece-freeze if
+ riece-freeze == 'own && (riece-message-own-p message).
+ * riece-globals.el (riece-own-freeze): Abolish; use riece-freeze.
+ (riece-operator-indicator): New variable.
+ * riece-display.el (riece-update-status-indicators): New function.
+ (riece-update-buffer-functions): Add it.
+ * riece-commands.el (riece-command-toggle-freeze): Don't call
+ riece-freeze.
+ (riece-command-toggle-own-freeze): Don't call riece-own-freeze.
+ * riece-300.el (riece-handle-302-message): Use
+ riece-user-toggle-away instead of riece-user-set-away.
+ (riece-handle-301-message): Ditto.
+ (riece-handle-305-message): Ditto.
+ (riece-handle-306-message): Ditto.
+ (riece-handle-352-message): Ditto.
+
+2003-06-02 Yoichi NAKAYAMA <yoichi@geiin.org>
+
+ * riece-commands.el (riece-command-next-channel): Circularly
+ follow the channel list.
+ (riece-command-previous-channel): Ditto.
+
+2003-06-02 Daiki Ueno <ueno@unixuser.org>
+
+ * riece.el (riece-command-mode): Set default value of riece-freeze
+ & riece-own-freeze.
+ * riece-options.el (riece-away-message): New user option.
+ * riece-commands.el (riece-command-toggle-away): Query user away
+ message.
+ * riece-300.el (riece-handle-301-message): Set user's away status.
+ (riece-handle-305-message): Ditto.
+ (riece-handle-306-message): Ditto.
+ (riece-handle-302-message): Ditto.
+ (riece-handle-352-message): Ditto.
+
+2003-06-02 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-rdcc.el: Require riece-globals, riece-misc, riece-channel,
+ and riece-identity.
+ (riece-command-dcc-receive): Check the existence of
+ set-buffer-multibyte.
+
+2003-06-02 Daiki Ueno <ueno@unixuser.org>
+
+ * Riece: Version 0.0.3 released.
+ * riece-version.el (riece-version-number): Bump up to 0.0.3.
+
+ * riece-ctcp.el (riece-handle-ctcp-request): Catch errors occured
+ in hooks.
+ (riece-handle-ctcp-response): Ditto.
+
+2003-06-01 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-user.el (riece-rename-user): Don't modify entry when
+ old-name == new-name.
+
+ * riece-display.el (riece-configure-windows): Use window-buffer
+ instead of current-buffer.
+
+ * riece-rdcc.el (riece-rdcc-server-address): Default to nil.
+ (riece-rdcc-ruby-command): New user option.
+ (riece-rdcc-send-program): New user option.
+ (riece-rdcc-decode-address-program): New user option.
+ (riece-rdcc-substitute-variables): New function.
+ (riece-command-dcc-send): Use it.
+ (riece-rdcc-decode-address): Use it.
+
+2003-06-01 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-rdcc.el: New add-on.
+
+ * Makefile.am (EXTRA_DIST): Add riece-rdcc.el
+
+2003-06-01 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-ndcc.el: New add-on.
+ * Makefile.am (EXTRA_DIST): Add riece-ndcc.el
+
+2003-05-31 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-server.el (riece-open-server): Simplify message.
+
+ * riece-commands.el (riece-command-open-server): Throw an error
+ when the server is already opened.
+
+ * riece-filter.el (riece-sentinel): Simplified.
+
+ * riece-display.el (riece-user-list-update-buffer): Check the
+ existence of riece-user-list-buffer.
+ (riece-channel-list-update-buffer): Check the existence of
+ riece-channel-list-buffer.
+ (riece-set-window-points): Ditto.
+
+ * riece-commands.el (riece-command-open-server): Simplified.
+ (riece-command-toggle-channel-buffer-mode): Set
+ riece-save-variables-are-dirty to t.
+ (riece-command-toggle-user-list-buffer-mode): Ditto.
+ (riece-command-toggle-channel-list-buffer-mode): Ditto.
+
+ * riece-server.el (riece-start-server): Abolish.
+ (riece-open-server): Set riece-server-process-alist and
+ riece-server-process here.
+
+2003-05-31 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-filter.el (riece-sentinel): Close process even if
+ riece-reconnect-with-password == t.
+ (riece-handle-message): Catch errors occured in hooks.
+
+ * riece-server.el (riece-open-server): Reuse server buffer.
+ (riece-close-server-process): Delete process even if process is
+ not running.
+
+2003-05-31 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-server.el (riece-open-server): No need to reset
+ riece-reconnect-with-password.
+
+ * riece-filter.el (riece-sentinel): Don't call riece when
+ riece-reconnect-with-password = t and process !=
+ riece-server-process.
+
+ * riece-url.el: Fix usage.
+
+ * riece-inlines.el (string-list-member-ignore-case): Remove docstring.
+
+ * riece-unread.el: New add-on.
+ * COMPILE (riece-modules): Add riece-unread.
+ * Makefile.am (EXTRA_DIST): Add riece-unread.el
+
+ * riece-300.el (riece-handle-322-message): New handler.
+ (riece-handle-323-message): New handler.
+
+2003-05-30 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-display.el (riece-configure-windows): Select other window
+ when minibuffer is active.
+
+ * riece-commands.el (riece-command-list): New command.
+ (riece-command-enter-message-as-notice): New command.
+ * riece.el (riece-command-mode-map): Bind
+ riece-command-enter-message-as-notice and riece-command-list.
+
+ * riece-server.el (riece-close-server): Skip nil when leaving
+ channels before closing server.
+
+2003-05-30 Daiki Ueno <ueno@unixuser.org>
+
+ * Riece: Version 0.0.2 released.
+ * riece-version.el (riece-version-number): Bump up to 0.0.2.
+
+ * riece.el (riece-load-and-build-addon-dependencies): Fixed.
+ * riece-url.el (riece-url-requires): Don't assert dependency on
+ riece-highlight unless it appears in riece-addons.
+
+ * riece-url.el: New add-on.
+ * COMPILE (riece-modules): Add riece-url.
+
+ * riece-message.el (riece-message-make-bracket): Abolish.
+ * riece-highlight.el (riece-highlight-font-lock-keywords):
+ Give up to fontify "-nick-" or "-nick server-".
+
+ * riece-highlight.el (riece-highlight-font-lock-keywords):
+ Simplified regexp.
+
+ * riece-ctcp.el (riece-handle-ctcp-request): Don't bind user.
+ (riece-handle-ctcp-response): Ditto.
+
+ * riece-highlight.el: Make it an add-on.
+ (riece-highlight-insinuate): New function.
+ * riece.el: Don't require 'riece-highlight.
+ * riece-options.el (riece-addons): Turn on riece-highlight and
+ riece-ctcp by default.
+
+ * riece-display.el (riece-configure-windows-predicate): New function.
+ (riece-configure-windows-predicate): New user option.
+ (riece-redisplay-buffers): Use it.
+
+ * riece-complete.el: Require 'cl for butlast.
+
+ * Makefile.am (elc): Renamed from "compile".
+
+ * riece.el (riece-dialogue-mode-map): Bind
+ riece-command-toggle-channel-list-buffer-mode.
+
+ * riece-display.el (riece-configure-windows): Typo fixed.
+
+ * riece-user.el (riece-user-toggle-channel): Use member instead of
+ memq.
+
+2003-05-29 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-ctcp.el (riece-ctcp-insinuate): New function.
+
+ * riece-options.el (riece-addons): New user option.
+ (riece-addon-directory): New user option.
+
+ * riece.el (riece-load-and-build-addon-dependencies): New function.
+ (riece-insinuate-addons): New function.
+ (riece): Call riece-insinuate-addons.
+
+ * riece-misc.el (riece-get-users-on-server): Moved from
+ riece-commands.el.
+
+ * riece-ctcp.el: New file.
+ * COMPILE (riece-modules): Add riece-ctcp.
+ * Makefile.am (EXTRA_DIST): Add riece-ctcp.el
+
+2003-05-29 Daiki Ueno <ueno@unixuser.org>
+
+ * Riece: Version 0.0.1 released.
+
+ * riece-commands.el (riece-command-names): New command.
+ (riece-command-who): New command.
+
+ * riece.el (riece-dialogue-mode-map): Bind riece-command-names and
+ riece-command-who.
+
+ * riece-300.el (riece-handle-341-message): New handler.
+ (riece-handle-352-message): New handler.
+
+ * riece-commands.el (riece-command-invite): Don't accept channel
+ argument; throw an error when user is not on a channel.
+ (riece-command-kick): New command.
--- /dev/null
+2003-05-24 Daiki Ueno <ueno@unixuser.org>
+
+ * liece-000.el (liece-handle-000-messages): Don't set liece-nickname.
+ * liece-400.el (liece-iterate-nick): Abolish.
+ (liece-handle-433-message): Don't use liece-iterate-nick.
+ * liece-channel.el: Abolish channel representation format.
+ (liece-default-channel-representation-format): Abolish.
+ (liece-dcc-channel-representation-format): Abolish.
+ (liece-channel-prepare-representation): Abolish.
+ (liece-channel-parse-representation): Abolish.
+ * liece-commands.el (liece-command-save-variables): Rename from
+ liece-command-save-vars; simplify using with-temp-file.
+ * liece-ctcp.el: Require liece-version.
+ * liece-globals.el: Rearrange variables by usage; don't require
+ liece-version.
+ (liece-last-nickname): Rename from liece-nickname-last.
+ (liece-last-who-expression): Rename from liece-who-expression.
+ (liece-real-userhost): Rename from liece-my-userhost.
+ (liece-last-chat-partner): Rename from liece-privmsg-partner.
+ (liece-last-friends): Rename from liece-friends-last.
+ (liece-real-server-name): New variable.
+ (liece-server-process-alist): New variable.
+ (liece-command-buffer-mode-indicator): Rename from
+ liece-private-indicator.
+ (liece-server-buffer): Abolish.
+ * liece-inlines.el (liece-next-line): Abolish.
+ * liece-misc.el (liece-send-pong): Abolish.
+ (liece-increment-long-reply-count): Define as function.
+ (liece-reset-long-reply-count): Ditto.
+ (liece-check-long-reply-count): Ditto.
+ * liece-q-el.el (liece-quote-el-decode-string): Fix typo.
+ * liece-vars.el (liece-saved-forms): Don't purecopy.
+ (liece-want-traditional): Abolish.
+ (liece-command-window-on-top): Abolish.
+ (liece-one-buffer-mode): Abolish.
+ (liece-saved-variables-file): New variable.
+ (liece-server-alist): Default to nil.
+ (liece-my-userhost): Remove.
+ (liece-nick-max-length): Abolish.
+ (liece-real-nickname): Remove.
+ (liece-grow-tail): Abolish.
+ (liece-retry-with-new-nickname): Rename from liece-auto-iterate-nick.
+ (liece-after-registration): Abolish.
+ (liece-status-message-string): Abolish.
+ (liece-channel-unread-list): Moved to liece-globals.el.
+ * liece-version.el: Bind utf-2000-version, and mule-version.
+ * liece-xemacs.el: Require liece-version.
+ * liece.el (liece-tmp-server-name): Abolish.
+ (liece-read-variables-files): Remove migration logic.
+ (liece): Don't add liece-nickname to liece-nick-alist.
+ (liece-accept-response): Don't retry with the new nickname.
+
+2003-05-23 Daiki Ueno <ueno@unixuser.org>
+
+ * liece-message.el: Overhaul; don't depend on dynamic binding.
+ (liece-message-brackets): Abolish.
+ (liece-message-tags): Abolish.
+ (liece-message-empty-predicate): Abolish.
+ (liece-message-make-open-bracket-function): New variable.
+ (liece-message-make-close-bracket-function): New variable.
+ (liece-message-make-name-function): New variable.
+ (liece-message-make-global-name-function): New variable.
+ (liece-message-type): Abolish; define as function.
+ (liece-message-target): Abolish; define as function.
+ (liece-message-speaker): Abolish; define as function.
+ (liece-message-direction): Abolish; use liece-message-own-p.
+ (liece-message-predicate): Abolish.
+ (liece-message-brackets-function): Abolish.
+ (liece-message-tags-function): Abolish.
+ (liece-message-buffer-function): Rename to liece-message-buffers.
+ (liece-message-parent-buffer): Rename to liece-message-parent-buffers.
+ (liece-message-make-open-bracket): New function.
+ (liece-message-make-close-bracket): New function.
+ (liece-message-make-bracket): New function.
+ (liece-message-make-name): New function.
+ (liece-message-make-global-name): New function.
+ (liece-display-message): Rewrite; remove autoload cookie.
+ (liece-make-message): New function.
+ (liece-message-private-p): New function.
+ (liece-message-external-p): New function.
+ * liece-misc.el (liece-own-channel-message): Move to liece-message.el.
+ (liece-own-private-message): Ditto.
+ * liece-commands.el (liece-command-message): Don't use
+ liece-message-empty-predicate.
+ * liece-ctcp.el (liece-ctcp-action-message): Use new API.
+ (liece-ctcp-insert): Ditto.
+ * liece-dcc.el (liece-dcc-chat-filter): Use new API.
+ * liece-handle.el (liece-handle-notice-message): Use new API.
+ (liece-handle-privmsg-message): Ditto.
+
+2003-05-23 Daiki Ueno <ueno@unixuser.org>
+
+ * liece-misc.el (liece-insert-timestamp): Abolish.
+ (liece-own-frozen): Abolish.
+ (liece-own-message): Abolish.
+ (liece-scroll-if-visible): Abolish.
+ (liece-generate-hex-timestamp): Abolish.
+ (liece-hex-timestamp-valid): Abolish.
+
+2003-05-22 Daiki Ueno <ueno@unixuser.org>
+
+ * liece-commands.el (liece-command-tag-region): Simplify.
+ * liece-misc.el (liece-remove-properties-region): Abolish.
+
+2003-05-18 OHASHI Akira <bg66@koka-in.org>
+
+ * liece.el (liece-dialogue-mode-map): Don't bind
+ `liece-command-open-server'.
+
+2003-04-30 OHASHI Akira <bg66@koka-in.org>
+
+ * liece-channel.el (liece-channel-list-redisplay-buffer): Search a
+ channel correctly.
+
+2003-04-17 Daiki Ueno <daiki@xemacs.org>
+
+ * liece-channel.el: Require 'liece-misc when compiling.
+ (liece-channel-equal): Define as function.
+ (liece-channel-buffer-create): Define as function.
+ (liece-channel-switch-to-last): Define before it is used.
+ * liece-ctcp.el: Require 'liece-misc when compiling.
+ * liece-message.el: Require 'liece-misc when compiling.
+ * liece-misc.el: Move some macros to the beginning of the file.
+ * liece-nick.el: Require 'liece-inlines when compiling.
+ (liece-nick-equal): Define as function.
+ (liece-nick-buffer-create): Define as function.
+
+2003-03-26 Steve Youngs <youngs@xemacs.org>
+
+ * liece-channel.el (liece-channel-p): Don't wrap the string-match
+ in a 'eval-when-compile' to avoid a void variable error.
+ (liece-channel-modeless-p): Ditto.
+
+2003-03-09 Ben Wing <ben@xemacs.org>
+
+ * Makefile.lisp:
+ * Makefile.lisp (autoload): New.
+ Separate autoload building from elc building.
+
+ * liece-make.el (install-update-package-files):
+ Use new `batch-update-directory-autoloads' if available.
+
+2002-12-08 Ville Skyttä <scop@xemacs.org>
+
+ * Makefile.lisp (all): Not a double-colon any more.
+
+2002-10-11 Yoichi NAKAYAMA <yoichi@eken.phys.nagoya-u.ac.jp>
+
+ * liece-emacs.el: Require pces to avoid compile error.
+
+2002-09-26 Daiki Ueno <ueno@unixuser.org>
+
+ * liece-minibuf.el (liece-minibuf-completing-read): Don't use the
+ 7th argument of completing-read.
+
+2002-09-24 Daiki Ueno <ueno@unixuser.org>
+
+ * liece-handle.el (liece-handle-mode-message): Check chnlp before
+ passing mode argument to liece-channel-set-*.
+ [cf. <Bug#161779>]
+
+2002-09-03 Daiki Ueno <ueno@unixuser.org>
+
+ * liece-handle.el (liece-handle-quit-message): Don't use
+ liece-nick-mark-as-apart.
+ (liece-handle-join-message): Ditto.
+ [cf. <Liece:00080>]
+
+2002-09-01 Daiki Ueno <ueno@unixuser.org>
+
+ * liece-handle.el (liece-handle-mode-message): The arglist of
+ liece-nick-set-mode was changed.
+
+2002-08-27 Daiki Ueno <ueno@unixuser.org>
+
+ * liece-commands.el (liece-command-join-channel): User
+ liece-nick-get-joined-channels.
+
+ * liece-channel.el (liece-channel-set-topic): Define as function.
+ (liece-channel-add-mode): Ditto.
+ (liece-channel-remove-mode): Ditto.
+ (liece-channel-set-mode): Ditto.
+ (liece-channel-add-ban): Ditto.
+ (liece-channel-remove-ban): Ditto.
+ (liece-channel-set-ban): Ditto.
+ (liece-channel-add-exception): Ditto.
+ (liece-channel-remove-exception): Ditto.
+ (liece-channel-set-exception): Ditto.
+ (liece-channel-add-invite): Ditto.
+ (liece-channel-remove-invite): Ditto.
+ (liece-channel-set-invite): Ditto.
+ * liece-nick.el (liece-nick-mark-as-part): Replace
+ liece-nick-{mark,unmark}-as-apart.
+ (liece-nick-get-modes): Define as function.
+ (liece-nick-add-mode): Ditto.
+ (liece-nick-remove-mode): Ditto.
+ (liece-nick-set-mode): Ditto.
+ * liece-handle.el (liece-handle-mode-message): Follow the changes
+ of arglists of liece-channel-set-mode and liece-nick-set-mode.
+
+ * liece.el: Fix typo.
+ * liece-misc.el (liece-current-nickname): Define as function.
+ (liece-current-channel): Ditto.
+ (liece-current-channels): Ditto.
+ (liece-current-chat-partner): Ditto.
+ (liece-current-chat-partners): Ditto.
+
+2002-08-26 Daiki Ueno <ueno@unixuser.org>
+
+ * liece-handle.el (liece-handle-mode-message): Care
+ liece-channel-set-* are defined as macros.
+ * liece-inlines.el (string-equal-ignore-case): Don't use
+ compare-strings.
+ (string-list-member-ignore-case): Don't use member-ignore-case.
+ Suggested by "Akinori MUSHA" <knu@iDaemons.org>.
+ [cf. <Liece:00075>]
+
+2002-08-11 OHASHI Akira <bg66@koka-in.org>
+
+ * liece-window.el (liece-configure-windows): Set
+ `liece-channel-buffer' to nil when `liece-current-chat-partner' or
+ `liece-current-channel' is nil.
+ (Suggested by Kazushige Maeda <pff@softai.co.jp>.)
+
+ * liece-dcc.el (liece-dcc-dequeue-request): Do nothing when
+ `liece-dcc-requests' is empty.
+ (liece-command-dcc-accept): Ditto.
+ (liece-command-dcc-chat-connect): Ditto.
+
+2002-07-15 Daiki Ueno <ueno@unixuser.org>
+
+ * liece-url.el (liece-url-regexp-alist): New user option.
+ (liece-url-add-buttons): Respect liece-url-regexp-alist. This
+ function is the slightly modified version of the implementation by
+ akira yamada <akira@arika.org>. [cf. <Liece:00070>]
+
+2002-07-13 Daiki Ueno <daiki@xemacs.org>
+
+ * liece-menu.el (liece-menu-add-url): Always switch to *Commands*
+ buffer.
+ * liece-xemacs.el (liece-fix-menu-path-switch-buffer): Removed old
+ defadvice to easy-menu-add-item.
+
+2002-06-08 Adrian Aichner <adrian@xemacs.org>
+
+ * liece-commands.el (liece-command-nickname): Use
+ truncate-string-to-width instead of non-existent truncate-string.
+ * liece.el (liece-open-server): Ditto.
+
+2002-06-05 Steve Youngs <youngs@xemacs.org>
+
+ * liece-inlines.el (string-equal-ignore-case): Don't try to use
+ 'compare-strings'.
+
+2002-05-19 Daiki Ueno <ueno@unixuser.org>
+
+ * liece-xemacs.el (liece-xemacs-modeline-glyph): Check 'xbm.
+
+2002-05-04 Stephen J. Turnbull <stephen@xemacs.org>
+
+ * liece-make.el (config-liece-package-directory):
+ * liece-config.el (PACKAGEDIR):
+ Handle case when dirs is nil.
+
+ * Makefile.lisp (package): Preload advice.
+
+2002-05-12 Daiki Ueno <ueno@unixuser.org>
+
+ * gettext.el (gettext-default-locale): New variable.
+ (bind-text-domain): Use it.
+
+2002-05-07 Daiki Ueno <ueno@unixuser.org>
+
+ * gettext.el (gettext-mapcar*): Eliminate recursion.
+
+2002-04-14 Daiki Ueno <ueno@unixuser.org>
+
+ * bitmap-stipple.el (bitmap-stipple-frame-char-width): New function.
+ (bitmap-stipple-frame-char-height): New function.
+
+ * liece-compat.el (liece-region-active-p): New function.
+ (liece-truncate-string-to-width): New function.
+
+ * liece-misc.el: Sort macrodefs.
+ (liece-maybe-poll): Abolish.
+
+ * liece-channel.el (liece-channel-last): Simplified.
+ (liece-channel-switch-to-last): Define as function.
+
+ * liece-commands.el (liece-command-ping): Send system-name until
+ liece-server-name is determined.
+
+ * liece-ctcp.el: Load `liece-q-*' even when compiling.
+
+ * liece-hilit.el (liece-highlight-turn-on-font-lock): Don't set
+ font-lock-support-mode if it isn't bound.
+
+2002-03-28 Daiki Ueno <ueno@unixuser.org>
+
+ * liece-400.el (liece-handle-475-message): New handler.
+
+ * liece-commands.el (liece-command-join): Don't encode a channel
+ name before treating it as an integer.
+
+ * liece-ctcp.el: Don't throw an error when liece-q-ccl is not found.
+
+2002-04-08 Daiki Ueno <daiki@xemacs.org>
+
+ * liece-misc.el: Don't require pccl and broken.
+
+2002-04-07 Daiki Ueno <daiki@xemacs.org>
+
+ * liece-modules.el: Don't compile liece-q-ccl.el.
+ * liece-ctcp.el: Don't require liece-q-ccl.el.
+
+2002-03-24 Daiki Ueno <daiki@xemacs.org>
+
+ * liece-coding.el (liece-mime-charset-for-write): Use
+ `mime-charset-to-coding-system' instead of `mime-charset-p'.
+ (liece-mime-charset-for-read): Ditto.
+
+2002-03-20 Daiki Ueno <ueno@unixuser.org>
+
+ * gettext.el (bind-text-domain): Respect LC_ALL and LC_MESSAGES;
+ reverse lang-paths.
+
+2002-03-20 Daiki Ueno <ueno@unixuser.org>
+
+ * gettext.el (gettext-parse-Content-Type): Bind `case-fold-search'
+ to t to extract Content-Type: field properly.
+
+2002-03-19 Daiki Ueno <ueno@unixuser.org>
+
+ * gettext.el: Autoload `mime-content-type-parameter' and
+ `mime-read-Content-Type' only when compiling.
+ (gettext-parse-Content-Type): Add bogus detection logic.
+
+2002-03-19 Daiki Ueno <ueno@unixuser.org>
+
+ * liece-compat.el (liece-string-to-list): New definition.
+ * liece-000.el (liece-handle-004-message): Use it.
+ * liece-nick.el (liece-nick-remove-mode): Use it.
+ * liece-channel.el (liece-channel-read-mode): Use it.
+ * liece-handle.el (liece-handle-mode-message): Use it.
+
+ * gettext.el: Require `poem' and `static'.
+ (gettext-string-to-list): New definition.
+
+2002-02-17 OHASHI Akira <bg66@koka-in.org>
+
+ * gettext.el (bind-text-domain): Implement a catalog probe mechanism.
+ (Implemented by YAMASHITA Junji <ysjj@unixuser.org>)
+
+2002-02-12 Daiki Ueno <ueno@unixuser.org>
+
+ * liece-modules.el (liece-modules-to-compile): Add `liece-coding'.
+
+ * liece-coding.el (liece-mime-charset-for-write): Use
+ default-mime-charset-for-write as its default.
+ (liece-mime-charset-for-read): Use default-mime-charset as its
+ default.
+
+2002-01-28 Daiki Ueno <ueno@unixuser.org>
+
+ * liece-dcc.el (liece-dcc-start-process): New function.
+ (liece-command-dcc-send): Use it.
+ (liece-command-dcc-receive): Use it.
+ (liece-command-dcc-chat-listen): Use it.
+ (liece-command-dcc-chat-connect): Use it.
+
+2001-11-09 Yoichi NAKAYAMA <yoichi@eken.phys.nagoya-u.ac.jp>
+
+ * liece-vars.el (liece-truncate-partial-width-windows): Change
+ default value to fix the inconsistency with docstring.
+
+ * liece-window.el (liece-configure-windows): Ditto.
+
+2001-11-03 OHASHI Akira <bg66@koka-in.org>
+
+ * liece-emacs.el (liece-emacs-unread-mark): Use regexp-quote.
+ (liece-emacs-read-mark): Ditto.
+ * liece-xemacs.el (liece-xemacs-unread-mark): Ditto.
+ (liece-xemacs-read-mark): Ditto.
+
+2001-10-07 Daiki Ueno <ueno@unixuser.org>
+
+ * liece-misc.el (liece-subtract-time): New function.
+ (liece-time-difference): Use it.
+
+2001-10-05 Daiki Ueno <ueno@unixuser.org>
+
+ * liece-misc.el (liece-time-difference): Fix the arglist.
+ [cf. <Liece:45>]
+
+2001-10-02 Daiki Ueno <ueno@unixuser.org>
+
+ * liece-compat.el (replace-in-string): Follow a change in XEmacs.
+
+2001-10-02 Daiki Ueno <ueno@unixuser.org>
+
+ * liece-vars.el (liece-buffer-min-size): Rename from
+ `liece-buffer-default-size'.
+
+ * liece-commands.el (liece-command-kill): Use `liece-time-elapsed'
+ instead of `liece-time-add'.
+
+ * liece.el (liece-check-buffers-if-interval-expired): Swap the
+ arguments supplied to `liece-time-difference'.
+ (liece-check-buffers): Use `liece-buffer-min-size' instead of
+ `liece-buffer-default-size'.
+
+ * liece-misc.el (liece-time-difference): Define as function.
+ (liece-time-elapsed): Rename from `liece-time-add'.
+ (liece-generate-hex-timestamp): Define as function.
+
+2001-10-02 Katsuhiro Hermit Endo <hermit@koka-in.org>
+
+ * liece-misc.el (liece-time-difference): Use `abs' for
+ `liece-check-buffers-if-interval-expired'.
+
+2001-09-16 Katsuhiro Hermit Endo <hermit@koka-in.org>
+
+ * liece-vars.el (liece-server-alist): Update default value.
+
+2001-06-19 OHASHI Akira <bg66@koka-in.org>
+
+ * liece-url.el (liece-url-regexp): Fix regexp.
+
+ * liece-vars.el (liece-display-unread-mark): Set default to t.
+
+2001-06-14 OHASHI Akira <bg66@koka-in.org>
+
+ * liece-channel.el (liece-channel-add-buttons): Fix regexp.
+
+ * liece-handle.el (liece-handle-notice-message): Don't set `temp'
+ to nil.
+
+ * liece-menu.el (liece-menu-channel-menu): Don't enable
+ `liece-command-unread-channel' if `liece-channel-unread-list' is nil.
+ (liece-menu-private-menu): Don't bind `liece-command-userhost'.
+
+ * liece-window.el (liece-command-set-window-style): Run
+ `liece-command-reconfigure-windows'.
+
+2001-06-09 OHASHI Akira <bg66@koka-in.org>
+
+ * liece-handle.el (liece-handle-privmsg-message): Don't compare when
+ `item' and `liece-current-chat-partner' are nil.
+
+2001-02-12 Daiki Ueno <ueno@unixuser.org>
+
+ * liece-compat.el (liece-read-passwd): Revive.
+
+ * liece-clfns.el (liece-clfns-subr-fboundp): Check existence of
+ the function `symbol-file'.
+
+ * liece-q-ccl.el: Require `poem' for char-int.
+ (liece-quote-ccl-256-table): Simplified.
+
+2001-01-02 Daiki Ueno <ueno@unixuser.org>
+
+ * liece-modules.el: Simplified.
+
+2000-12-09 Tanaka Akira <akr@m17n.org>
+
+ * liece.el (liece-refresh-buffer-window): Simplified.
+
+2000-11-30 Tanaka Akira <akr@m17n.org>
+
+ * liece.el (liece-refresh-buffer-window): Force to display a last
+ non-empty line in last line in a window on Emacs 21.
+
+2000-10-19 Daiki Ueno <ueno@unixuser.org>
+
+ * liece-ctcp.el: Remove autoload cookies of
+ `liece-command-ctcp-generic',
+ `liece-command-ctcp-userinfo-from-minibuffer',
+ `liece-command-ctcp-x-face-from-xbm-file' and
+ `liece-command-send-file'.
+
+ * liece-commands.el: Add autoload setting for
+ `liece-command-ctcp-action',
+ `liece-command-ctcp-userinfo-from-minibuffer' and
+ `liece-command-ctcp-x-face-from-xbm-file'.
+
+2000-10-16 Daiki Ueno <ueno@unixuser.org>
+
+ * liece-commands.el (liece-command-quit): Use `liece-close-server'.
+
+ * liece.el (liece): Simplify.
+ (liece-close-server): Accept optional argument `quit-string'.
+
+2000-10-12 Akira Ohashi <bg66@luck.gr.jp>
+
+ * liece-menu.el (liece-menu-ctcp-menu): Follow the CTCP command
+ changed from `liece-command-client-*' to `liece-command-ctcp-*'.
+
+2000-10-07 Daiki Ueno <ueno@unixuser.org>
+
+ * liece-commands.el (liece-command-qualify-nicks): Refer 1st argument.
+
+2000-10-05 Daiki Ueno <ueno@unixuser.org>
+
+ * liece-minibuf.el (liece-minibuffer-complete-channel-modes):
+ Don't use old style backquotes.
+ (liece-minibuffer-completing-read-multiple-1): Remove a partially
+ matched word construct if it exists.
+
+2000-10-03 Daiki Ueno <ueno@unixuser.org>
+
+ * liece-commands.el (liece-command-set-operators): Reset `run'.
+ (liece-command-set-voices): Ditto.
+
+2000-09-30 Daiki Ueno <ueno@unixuser.org>
+
+ * liece-xemacs.el (liece-xemacs-modeline-glyph): Add 'xpm check.
+ (liece-xemacs-create-nick-glyph): Ditto.
+ (liece-xemacs-unread-mark): Ditto.
+
+2000-09-23 Akira Ohashi <bg66@luck.gr.jp>
+
+ * liece-menu.el (liece-command-toggle-freeze): Rename from
+ `liece-command-freeze'.
+ (liece-command-toggle-own-freeze): Rename from
+ `liece-command-own-freeze'.
+ (liece-command-toggle-beep): Rename from `liece-dialogue-beep'.
+
+2000-09-22 Daiki Ueno <ueno@unixuser.org>
+
+ * liece-handle.el (liece-handle-kill-message): Call
+ `liece-close-server' instead of `liece-clear-system'.
+
+ * liece-commands.el: Don't autoload `liece-window-configuration-pop'.
+ (liece-command-quit): Just send quit.
+
+ * liece.el (liece-close-server): Run `liece-exit-hook'; abolish
+ argument `quit-string'.
+
+ * liece-filter.el (liece-sentinel): Call `liece-close-server'.
+
+2000-09-20 Daiki Ueno <ueno@unixuser.org>
+
+ * liece-compat.el: Require `wid-edit'.
+
+ * liece-inlines.el (liece-locate-icon-file): Don't check existence
+ of the file.
+
+ * liece-emacs.el: Don't require `static' and `wid-edit'.
+ (liece-splash-image): Set default to nil.
+ (liece-emacs-splash-function): New variable.
+ (liece-emacs-splash-with-image): New function splitted from
+ `liece-emacs-splash'; use `image-size'; hide cursor.
+ (liece-emacs-splash-with-stipple): New function.
+
+2000-09-20 Daiki Ueno <ueno@unixuser.org>
+
+ * liece-commands.el (liece-command-toggle-away): Rename from
+ `liece-command-away'.
+ (liece-command-toggle-freeze): Rename from `liece-command-freeze'.
+ (liece-command-toggle-own-freeze): Rename from
+ `liece-command-own-freeze'.
+ (liece-command-toggle-beep): Rename from `liece-command-beep'.
+ (liece-command-load-vars): Abolish.
+
+ * liece.el (liece-dialogue-beep): Abolish.
+ (liece-dialogue-freeze): Abolish.
+ (liece-dialogue-own-freeze): Abolish.
+ (liece-initialize-buffers): Don't parse error message.
+ (liece): Assume `liece-away-message' is nil.
+ (liece-command-map): Don't bind `liece-command-freeze' and
+ `liece-command-own-freeze'.
+ (liece-dialogue-mode-map): Don't bind `liece-command-timestamp'
+ and `liece-command-find-timestamp'; bind
+ `liece-command-toggle-private' to "C-t p"; bind
+ `liece-command-toggle-away' to "C-t a"; bind
+ `liece-command-toggle-freeze' to "C-t f"; bind
+ `liece-command-toggle-own-freeze' to "C-t o".
+
+ * liece-minibuf.el (liece-minibuffer-parse-modes): Don't complete
+ mode flags when completing an argument.
+
+2000-09-19 Daiki Ueno <ueno@unixuser.org>
+
+ * liece-version.el (liece-version): Bump up to 2.0.0.
+
+ * liece-menu.el (liece-menu-callback-set-operators): Rename from
+ `liece-menu-callback-mode+o'.
+ (liece-menu-callback-set-voices): Rename from
+ `liece-menu-callback-mode+v'.
+ (liece-menu-callback-unset-operators): Rename from
+ `liece-menu-callback-mode-o'.
+ (liece-menu-callback-unset-voices): Rename from
+ `liece-menu-callback-mode-v'.
+
+ * liece-nick.el (liece-nick-region-opers): Abolish.
+ (liece-nick-region-voices): Abolish.
+ (liece-nick-update-region): Don't set them.
+
+ * liece.el (liece-dialogue-mode-map): Don't bind `liece-command-exec',
+ `liece-command-lusers' and `liece-command-userhost'.
+
+ * liece-commands.el (liece-command-exec): Abolish.
+ (liece-command-inline): Abolish.
+ (liece-command-set-operators): Rename from `liece-command-mode+o'.
+ (liece-command-set-voices): Rename from `liece-command-mode+v'.
+ (liece-command-qualify-nicks): New function.
+ (liece-command-mode-o): Abolish.
+ (liece-command-mode-v): Abolish.
+ (liece-command-userhost): Abolish.
+ (liece-command-lusers): Abolish.
+
+2000-09-18 Daiki Ueno <ueno@unixuser.org>
+
+ * liece-vars.el (liece-channel-buffer-mode): Set default to t.
+ (liece-nick-buffer-mode): Ditto.
+ (liece-channel-list-buffer-mode): Ditto.
+
+ * liece.el (liece-open-server-internal): Simplify.
+ (liece-open-server): Strip bracketed server name here.
+ (liece-start-server): Fix last change.
+
+2000-09-17 Daiki Ueno <ueno@unixuser.org>
+
+ * liece-vars.el (liece-highlight-mode): Set default to t.
+
+ * liece.el (liece-open-server): Simplify.
+ (liece-start-server): Canonicalize `liece-server' here.
+
+2000-09-17 Akira Ohashi <bg66@luck.gr.jp>
+
+ * liece-menu.el (liece-menu-channel-menu): Move `liece-command-freeze'
+ from `liece-menu-IRC-menu'.
+ (liece-menu-channel-menu): Move `liece-command-own-freeze'
+ from 'liece-menu-IRC-menu'.
+ (liece-menu-channel-menu): New menu item `liece-dialogue-beep'.
+ (liece-menu-channel-menu): New menu item
+ `liece-command-unread-channel'.
+
+2000-09-17 Akira Ohashi <bg66@luck.gr.jp>
+
+ * liece-channel.el (liece-channel-read-functions): Rename from
+ `liece-channel-read-hook'.
+
+ * liece-handle.el (liece-channel-unread-functions): Rename from
+ `liece-channel-unread-hook'.
+
+ * liece-emacs.el (toplevel): Use them.
+
+ * liece-xemacs.el (toplevel): Ditto.
+
+2000-09-17 Daiki Ueno <ueno@unixuser.org>
+
+ * liece-make.el (make-liece-sample-files): Abolish.
+ (make-liece-info-files): Abolish.
+
+ * liece-url.el (liece-add-url-functions): Rename from `liece-url-add-hook'.
+
+ * liece.el (liece-after-insert-functions): Rename from `liece-insert-hook'.
+ (liece-before-insert-functions): Rename from `liece-before-insert-hook'.
+
+ * liece-handle.el (liece-notice-cleartext-hook): Abolish.
+ (liece-privmsg-cleartext-hook): Abolish.
+
+ * liece-filter.el (liece-handle-message): Simplify.
+
+ * liece-ctcp.el (liece-ctcp-message): Don't ignore errors in hooks.
+ (liece-ctcp-notice): Ditto.
+ (liece-ctcp-file-notice): Ditto.
+
+ * liece-channel.el (liece-channel-add-mode): Don't use pushnew.
+ (liece-channel-add-exception): Ditto.
+ (liece-channel-add-invite): Ditto.
+
+2000-09-12 Daiki Ueno <ueno@unixuser.org>
+
+ * liece-vars.el (liece-inhibit-startup-message): New user option.
+
+2000-09-11 Daiki Ueno <ueno@unixuser.org>
+
+ * liece-xemacs.el (liece-xemacs-splash-at-point): Don't check `console-type'.
+ (liece-x-face-insert-with-xemacs): Ditto.
+
+2000-09-11 Akira Ohashi <bg66@luck.gr.jp>
+
+ * liece-emacs.el (liece-emacs-unread-character): Abolish.
+
+ * liece-vars.el (liece-channel-unread-character): New variable.
+
+ * liece-xemacs.el (liece-xemacs-unread-mark): Simplify; Don't use
+ `featurep' and `console-type'.
+ (toplevel): Ditto.
+
+2000-09-11 Daiki Ueno <ueno@unixuser.org>
+
+ * liece-minibuf.el: Autoload `completing-read-multiple'; declare
+ `crm-separator'.
+ (liece-minibuffer-completing-read): Rename from
+ `liece-minibuffer-completing-default-read'; accept optional arguments
+ `history' and `default'.
+ (liece-minibuffer-completion-separator): New variable.
+ (liece-minibuffer-completion-table): New variable.
+ (liece-minibuffer-completing-read-multiple-1): New completion function.
+ (liece-minibuffer-completing-read-multiple): Rename from
+ `liece-minibuffer-completing-sequential-read'; accept optional
+ arguments `history' and `default'; use `completing-read-multiple'
+ when optional 8th argument `multiple-candidate' is specified.
+
+ * liece-xemacs.el (liece-xemacs-redisplay-unread-mark): Don't bind `chnl'.
+
+2000-09-11 Daiki Ueno <ueno@unixuser.org>
+
+ * liece-commands.el (liece-command-quit): Don't send QUIT.
+
+ * liece-emacs.el (liece-emacs-splash): Use `generate-new-buffer'
+ instead of `liece-get-buffer-create'
+
+ * liece-xemacs.el (liece-xemacs-splash): Synch with liece-emacs.el
+
+ * liece.el (liece-clear-system): Call
+ `liece-buffer-dispose-function' instead of burying buffer.
+ (liece-open-server-internal): Simplify; Don't use
+ `liece-get-buffer-create' to prepare process-buffer.
+ (liece-close-server): Accept optional argument `quit-string'.
+
+ * liece-vars.el (liece-buffer-dispose-function): New variable.
+
+2000-09-10 Daiki Ueno <ueno@unixuser.org>
+
+ * liece-inlines.el (string-list-remove-ignore-case): Remove car of the element.
+ (string-list-delete-ignore-case): Ditto.
+ (string-list-remove): Ditto.
+ (string-list-delete): Ditto.
+
+2000-09-06 Daiki Ueno <ueno@unixuser.org>
+
+ * liece-clfns.el (remq): New compiler macro.
+
+2000-09-05 Akira Ohashi <bg66@luck.gr.jp>
+
+ * liece-channel.el (liece-channel-redisplay-buffer): New hook
+ `liece-channel-read-hook'.
+ (liece-channel-change): Run `liece-redisplay-unread-mark'.
+
+ * liece-handle.el (liece-handle-privmsg-message): New hook
+ `liece-channel-unread-hook'.
+
+ * liece-vars.el (liece-display-unread-mark): New variable.
+
+ * liece-xemacs.el (liece-xemacs-unread-icon): Rename from
+ `liece-xemacs-channel-balloon-icon'.
+ (liece-xemacs-unread-mark): Rename and simplified from
+ `liece-xemacs-channel-balloon'.
+ (liece-xemacs-read-mark): Rename and simplified from
+ `liece-xemacs-channel-balloon-kill'.
+ (liece-xemacs-redisplay-unread-mark): New function.
+ (toplevel): Add them to hook.
+
+ * liece-emacs.el (liece-emacs-unread-character): New variable.
+ (liece-emacs-unread-mark): New function.
+ (liece-emacs-read-mark): Ditto.
+ (liece-emacs-redisplay-unread-mark): Ditto.
+ (toplevel): Add them to hook.
+
+2000-09-04 Daiki Ueno <ueno@unixuser.org>
+
+ * liece-inlines.el (string-equal-ignore-case): Check return value
+ of `compare-strings'.
+
+2000-09-03 Daiki Ueno <ueno@unixuser.org>
+
+ * liece-clfns.el: Require `pym'.
+ (liece-clfns-subr-fboundp): New macro.
+ (last,member-if,member-if-not,delete-if,remove-if,remove-if-not,
+ assoc-if,rassoc-if): Use it.
+
+ * liece-inlines.el (string-list-member-ignore-case): Use
+ `member-ignore-case'.
+ (string-list-remove-ignore-case): Use remq.
+ (string-list-member): Abolish.
+ (string-list-delete-ignore-case): Use delq.
+ (string-equal-ignore-case): Use `compare-strings' if available.
+
+2000-09-01 Daiki Ueno <ueno@unixuser.org>
+
+ * liece-channel.el (liece-channel-change): Handle
+ `liece-current-chat-partner'.
+
+ * Makefile.am (SOURCES): Remove `liece-crypt'.
+
+ * liece-crypt.el: Remove.
+
+ * liece-400.el (liece-handle-433-message): Use `liece-beep'
+ (liece-handle-432-message): Ditto.
+
+ * liece-misc.el (liece-beep): New macro.
+ (liece-set-beep): Rename from `liece-beep'.
+
+ * liece-xemacs.el (liece-xemacs-channel-balloon): Abolish local
+ variable `chnl'.
+
+ * liece.el: Don't require `liece-crypt'.
+ (liece-crypt-map): Abolish.
+ (liece-buffer-mode-alist): Remove `liece-CRYPT-buffer'.
+ (liece-command-mode-map): Don't bind
+ `liece-command-enter-message-opposite-crypt-mode'.
+ (liece): Don't initialize crypt indicator.
+ (liece-command-mode): Ditto.
+ (liece-dialogue-mode): Ditto.
+ (liece-channel-mode): Ditto.
+
+ * liece-xemacs.el: Don't require `liece-crypt'.
+ (liece-toolbar-crypt-active-icon): Abolish.
+ (liece-toolbar-crypt-inactive-icon): Abolish.
+ (liece-toolbar-crypt-icon): Abolish.
+ (liece-toolbar-crypt-glyph): Abolish.
+ (liece-toolbar-crypt-active-glyph): Abolish.
+ (liece-toolbar-crypt-inactive-glyph): Abolish.
+ (liece-toolbar-spec-list): Don't set `liece-toolbar-crypt-glyph'.
+ (liece-xemacs-setup-toolbar-hook): Remove `liece-toolbar-setup-crypt-glyph'.
+ (liece-toolbar-setup-crypt-glyph): Abolish.
+ (liece-toolbar-toggle-crypt): Abolish.
+
+ * liece-vars.el (liece-defected-message-prefix): Abolish.
+ (liece-suspicious-message-prefix): Abolish.
+ (liece-beep-function): New variable.
+
+ * liece-message.el (liece-message-brackets-function): Don't handle
+ `liece-message-encrypted-p'.
+ (liece-message-encrypted-p): Abolish.
+ (liece-message-suspicious-p): Abolish.
+ (liece-message-garbled-p): Abolish.
+ (liece-message-fingerprint): Abolish.
+ (liece-message-timestamp): Abolish.
+
+ * liece-menu.el (liece-menu-crypt-menu): Abolish.
+ (liece-menu-channel-menu): Remove `liece-menu-crypt-menu'.
+ (liece-menu-alist): Ditto.
+ (liece-menu-crypt-menu-map): Abolish.
+
+ * liece-handle.el (liece-handle-notice-message): Don't use
+ `with-liece-decryption'.
+ (liece-handle-privmsg-message): Ditto.
+ Use `liece-beep' instead of `beep'.
+
+ * liece-modules.el (liece-modules-to-compile): Remove `liece-crypt'.
+
+ * liece-globals.el (liece-crypt-indicator): Abolish.
+ (liece-CRYPT-buffer): Abolish.
+ (liece-C-buffer): Abolish.
+
+ * liece-commands.el: Don't require `liece-crypt'.
+ (liece-command-send-message): Abolish optional argument ARG and KEY.
+ (liece-command-enter-message): Ditto.
+ (liece-command-message): Ditto.
+ (liece-enter-message): Abolish.
+ (liece-command-part): Don't set crypt indicator.
+ (liece-switch-to-channel): Ditto.
+ (liece-switch-to-channel-no): Ditto.
+ (liece-command-private-conversation): Ditto.
+ (liece-command-toggle-crypt): Abolish.
+
+2000-08-31 Akira Ohashi <bg66@luck.gr.jp>
+
+ * liece-handle.el (liece-handle-privmsg-message): Fixed.
+
+2000-08-30 Akira Ohashi <bg66@luck.gr.jp>
+
+ * liece-commands.el (liece-command-unread-channel): New function.
+
+ * liece.el (liece-command-map): Bind "\C-u" to it.
+ (liece-channel-list-mode-map): Bind "u" to it.
+
+2000-08-29 Daiki Ueno <ueno@unixuser.org>
+
+ * liece-channel.el (liece-channel-change): Run
+ `liece-redisplay-buffer-functions' only when
+ `liece-current-channel' is non-nil.
+
+ * liece-commands.el (liece-command-who): Check
+ `liece-current-channel'.
+ (liece-command-names): Ditto.
+ Suggested by: Yoichi NAKAYAMA <yoichi@eken.phys.nagoya-u.ac.jp>.
+
+2000-08-30 Akira Ohashi <bg66@luck.gr.jp>
+
+ * liece-vars.el (liece-channel-unread-list): New variable.
+
+ * liece-channel.el (liece-channel-unread-p): New function.
+ (liece-channel-redisplay-buffer): Use it.
+
+ * liece-handle.el (liece-handle-privmsg-message): Ditto.
+
+2000-08-29 Akira Ohashi <bg66@luck.gr.jp>
+
+ * liece-channel.el (liece-channel-change): Run
+ `liece-redisplay-buffer-functions'.
+
+2000-08-23 Daiki Ueno <ueno@unixuser.org>
+
+ * liece-handle.el (liece-handle-privmsg-message): Use
+ `liece-pick-buffer-1' to construct channel buffer name.
+
+2000-08-23 Akira Ohashi <bg66@luck.gr.jp>
+
+ * liece-xemacs.el (liece-xemacs-channel-balloon): New function.
+ Show balloon icon to `liece-cahnnel-list-buffer' as XEmacs glyphs
+ when non-current channel message is received.
+ (liece-xemacs-channel-balloon-kill): New function.
+ Kill the balloon icon.
+
+2000-08-17 Daiki Ueno <ueno@unixuser.org>
+
+ * liece.el (liece-server-keyword-map): Bind connection type.
+
+2000-08-16 Daiki Ueno <ueno@unixuser.org>
+
+ * liece.el (liece-open-server-internal): Use
+ `liece-open-network-stream'; bind liece-tcp-connection-type.
+
+ * liece-tcp.el (liece-tcp-open-program-stream-as-binary): Abolish.
+ (liece-tcp-open-ssl-stream-as-binary): Abolish.
+ (liece-tcp-open-rlogin-stream-as-binary): Abolish.
+ (liece-tcp-wait-for-string): Abolish.
+ (liece-tcp-stream-alist): New variable.
+ (liece-open-network-stream): Abolish 5th argument `type'.
+
+2000-08-01 Yoshiki Hayashi <yoshiki@xemacs.org>
+
+ * liece-xemacs.el (liece-toolbar-position): Use
+ function defaul-toolbar-position instead of variable.
+
+2000-07-17 Daiki Ueno <ueno@unixuser.org>
+
+ * liece-emacs.el (create-image): Don't advise.
+ (liece-widget-keymap): Remove checking about 'button3.
+ (liece-emacs-widget-button-click): Save point in window explicitly.
+
+ * liece-ctcp.el (liece-command-ctcp-generic): Fix format string.
+
+2000-07-16 Akira Ohashi <bg66@luck.gr.jp>
+
+ * liece-commands.el (liece-command-beep): New function.
+ Toggle the automatic beep notice when the channel message is received.
+
+ * liece.el (liece-dialogue-mode-map): Bind "B" to liece-dialogue-beep.
+
+ * liece-vars.el (liece-default-beep): New variable.
+ (liece-beep-when-invited): Ditto.
+ (liece-beep-when-privmsg): Ditto.
+ (liece-beep-words-list): Ditto.
+
+2000-05-07 Daiki Ueno <ueno@unixuser.org>
+
+ * liece-tcp.el
+ (liece-tcp-rlogin-parameters): Use `socket' instead of `telnet'.
+ (liece-tcp-open-rlogin-stream): Don't wait for a connection.
+ (liece-tcp-open-rlogin-stream-as-binary): Simply wrap
+ `liece-tcp-open-rlogin-stream'.
+
+2000-04-21 Daiki Ueno <ueno@unixuser.org>
+
+ * liece-ctcp.el
+ (liece-ctcp-make-menu-command-wrapper): Quote CTCP subcommands.
+
+ * liece-mail.el (liece-maintainer-address): New ML address.
+
+2000-04-12 Daiki Ueno <ueno@unixuser.org>
+
+ * liece-url.el: Don't require browse-url when compiling.
+ (liece-url-browser-name): Abolish.
+ (liece-url-prepare-browser-function): Abolish.
+ (liece-url-mail-regexp): Abolish.
+ (liece-url-browser-function): Abolish.
+ (liece-url-link-action): Use browse-url directly.
+ (liece-command-browse-url): Ditto.
+ (liece-url-add-buttons): Remove local variable `url-start',
+ `url-end' and `url'.
+ Suggested by: Kenichi OKADA <okada@opaopa.org>
+
+ * liece-xemacs.el
+ (liece-toolbar-position): Check feature 'toolbar was provided.
+
+2000-04-08 Daiki Ueno <ueno@unixuser.org>
+
+ * liece-xemacs.el (liece-xemacs-setup-toolbar): Run
+ `liece-xemacs-setup-toolbar-hook' only once.
+ (liece-setup-toolbar): Don't check return value
+ of `liece-xemacs-setup-toolbar'.
+ Reported by: Yosuke MITSUMASU <werdna@ntn.org>
+
+2000-04-05 Daiki Ueno <ueno@unixuser.org>
+
+ * liece-commands.el: Add autoload for liece-command-ctcp-version,
+ liece-command-ctcp-userinfo,liece-command-ctcp-clientinfo,
+ liece-command-ctcp-ping,liece-command-ctcp-time,
+ liece-command-ctcp-x-face,liece-command-ctcp-comment,
+ liece-command-ctcp-help.
+ Suggested by: HARUYAMA Seigo <haruyama@unixuser.org>.
+
+ * liece-ctcp.el
+ (liece-ctcp-make-menu-command-wrapper): Don't use `#'.
+ (liece-ctcp-make-command-wrapper): Ditto.
+
+2000-04-04 Daiki Ueno <ueno@unixuser.org>
+
+ * liece.el (liece-client-query-keys): Rename all commands.
+
+ * liece-vars.el
+ (liece-ctcp-userinfo): Rename from `liece-client-userinfo'.
+ (liece-ctcp-x-face): Ditto.
+
+ * liece-ctcp.el (liece-ctcp-message): Abolish macro.
+ (liece-ctcp-file-message): Ditto.
+
+2000-03-28 Daiki Ueno <ueno@ueda.info.waseda.ac.jp>
+
+ * liece-emacs.el: Require `derived'.
+
+2000-03-24 Daiki Ueno <ueno@ueda.info.waseda.ac.jp>
+
+ * liece-inlines.el (liece-locate-path): Use
+ `liece-locate-data-directory' instead of `locate-data-directory'.
+
+2000-03-23 Daiki Ueno <ueno@ueda.info.waseda.ac.jp>
+
+ * liece-q-ccl.el (ccl-set-register-right): Abolish.
+ (liece-quote-ccl-decode): Simplified.
+
+ * liece-compat.el (liece-suppress-mode-line-format): Copy original
+ `mode-line-format' before modification.
+ (locate-data-directory): Abolish.
+ (liece-locate-data-directory): New function.
+
+ * liece-xemacs.el (liece-xemacs-suppress-modeline-format): Ditto.
+ (liece-locate-data-directory): Override with `locate-data-directory'.
+
+ * liece.el
+ (liece-command-mode): Define `mode-line-format' as buffer local.
+ (liece-dialogue-mode): Exchange `mode-line-modified' position.
+ (liece-clear-system): Check buffer status.
+
+ * liece-ctcp.el (liece-ctcp-xyzzy-message): Abolish.
+ (liece-command-send-file): Don't narrowing buffer.
+ (liece-ctcp-file-save-directory): Default to `liece-directory'.
+ (liece-register-file-handler): New macro.
+ (liece-ctcp-notice): Rewrite.
+ (liece-ctcp-message): Rewrite.
+ (liece-query-client-insert-to-generic): Abolish.
+ (liece-query-client-version): Abolish.
+ (liece-query-client-userinfo): Abolish.
+ (liece-query-client-help): Abolish.
+ (liece-query-client-clientinfo): Abolish.
+ (liece-query-client-ping): Abolish.
+ (liece-query-client-time): Abolish.
+ (liece-query-client-x-face): Abolish.
+ (liece-query-client-last-command): Rename from
+ `liece-query-client-lastcommand'.
+ (liece-query-client-alist): Abolish.
+ (liece-ctcp-last-nick): Rename from `liece-query-client-nick'.
+ (liece-command-ctcp-x-face-from-minibuffer): Abolish.
+ (liece-command-ctcp-x-face-from-commandbuffer): Abolish.
+ (liece-command-ctcp-userinfo-from-commandbuffer): Abolish.
+
+2000-03-22 Daiki Ueno <ueno@ueda.info.waseda.ac.jp>
+
+ * liece-xemacs.el (liece-xemacs-icon-path): Abolish.
+ (liece-toolbar-position): Default to `default-toolbar-position'.
+ (liece-xemacs-setup-toolbar): Remove directory checking.
+ (liece-xemacs-modeline-glyph): Suppress glyph specs.
+ (liece-xemacs-create-nick-glyph): Ditto.
+
+ * liece-emacs.el (liece-emacs-icon-path): Abolish.
+
+ * liece-intl.el (liece-intl-load-catalogue): Rewrite with
+ `liece-locate-path'; remove local binding.
+
+ * liece-window.el (liece-window-load-style-file): Rewrite with
+ `liece-locate-path'; remove local binding.
+
+ * liece-compat.el (locate-data-directory): New function.
+
+ * liece-inlines.el (liece-find-data-directory): Abolish.
+ (liece-locate-path): Rename from `liece-find-path'; use
+ `locate-data-directory'; reorder arguments.
+ (liece-locate-icon-file): New function.
+
+2000-03-20 Daiki Ueno <ueno@ueda.info.waseda.ac.jp>
+
+ * liece-globals.el
+ (liece-command-buffer,liece-dialogue-buffer,liece-private-buffer,
+ liece-others-buffer,liece-channel-buffer,
+ liece-channel-buffer-format,liece-channel-list-buffer,
+ liece-nick-buffer,liece-nick-buffer-format,
+ liece-KILLS-buffer,liece-IGNORED-buffer,liece-WALLOPS-buffer,
+ liece-CRYPT-buffer,liece-server-buffer): Remove preceding `*IRC*'.
+
+ * liece-xemacs.el
+ (liece-xemacs-splash-at-point): Bind
+ `liece-insert-environment-version' to nil.
+ (liece-xemacs-splash): Ditto.
+ (liece-xemacs-suppress-modeline-format): New function.
+ (liece-suppress-mode-line-format): Override with
+ `liece-xemacs-suppress-modeline-format'.
+ (liece-xemacs-mode-line-buffer-identification): Decorate 1st
+ element and modify whole identification by side effect.
+
+ * liece-compat.el (current-language-environment): Abolish.
+ (frame-title-format): Abolish.
+ (enable-multibyte-characters): Abolish.
+ (liece-suppress-mode-line-format): New function.
+
+ * liece-version.el: Use product.el.
+ (liece-version): New function.
+ (liece-user-interface-product): Abolish.
+ (liece-product-name): Abolish.
+ (liece-product-version): Abolish.
+ (liece-product-code-name): Abolish.
+ (liece-user-agent-value): Abolish.
+ (liece-command-version): Abolish.
+ (liece-environment-version): Rename from
+ `liece-emacs-user-agent-value'.
+
+ * bitmap-stipple.el
+ (bitmap-stipple-insert-pixmap): Don't set point to `point-min'.
+
+ * liece-xbm.el: Update.
+
+ * liece-emacs.el (liece-emacs-splash): Display version number;
+ bind `liece-insert-environment-version' to nil.
+ (liece-emacs-mode-line-buffer-identification): Decorate 1st
+ element and modify whole identification by side effect.
+
+ * liece-vars.el (liece-nick-max-length): New variable.
+ (liece-insert-environment-version): New variable.
+
+ * liece.el (liece-truncate-nickname): Abolish.
+ (liece-client-query-keys,liece-dialogue-keys,
+ liece-select-keys,liece-crypt-keys): Define as a plist.
+ (liece-local-set-keys): New function borrowed from gnus-util.el.
+ (liece-define-keys): Ditto.
+ (liece-define-keys-safe): Ditto.
+ (liece-define-keys-1): Ditto.
+ (liece-command-map): Bind "\C-m" to liece-command-modec.
+ (liece-command-mode): Don't set `mode-line-format' directly;
+ exchange `mode-line-modified' position;
+ (liece-dialogue-mode): Ditto.
+ (liece-others-mode): Ditto.
+ (liece-channel-mode): Ditto.
+ (liece-nick-mode): Ditto.
+ (liece-channel-list-mode): Ditto.
+
+2000-03-19 Daiki Ueno <ueno@ueda.info.waseda.ac.jp>
+
+ * gettext.el (bind-text-domain): Don't refer "PATHNAME/DOMAIN.mo"
+ directly.
+
+ * bitmap-stipple.el,gettext.el,liece-000.el,liece-200.el,
+ liece-300.el,liece-400.el,liece-500.el,liece-commands.el,
+ liece-config.el,liece-crypt.el,liece-ctcp.el,liece-dcc.el,
+ liece-filter.el,liece-globals.el,liece-handle.el,liece-hilit.el,
+ liece-inlines.el,liece-intl.el,liece-mail.el,liece-make.el,
+ liece-menu.el,liece-message.el,liece-minibuf.el,liece-misc.el,
+ liece-nick.el,liece-q-ccl.el,liece-q-el.el,liece-tcp.el,
+ liece-version.el,liece-window.el,liece-x-face.el: Checkdoc.
+
+ * liece-menu.el (liece-nick-popup-menu): Use copy-sequence instead
+ of copy-tree.
+
+ * liece-modules.el (liece-modules-to-compile): Modify for
+ `liece-clfns' and `liece-handler'.
+
+ * liece-handler.el: Rename from llunf.el.
+
+ * liece-clfns.el: New file.
+
+ * liece-channel.el (liece-channel-add-buttons): Fix regexp.
+ (liece-channel-add-ban): Use add-to-list instead of pushnew.
+
+ * liece-coding.el
+ (liece-default-coding-system): Abolish.
+ (liece-mime-charset-for-write): Rename from
+ `liece-default-mime-charset'.
+ (liece-mime-charset-for-read): Rename from
+ `liece-default-mime-charset-for-read'.
+
+ * liece.el (liece-client-query-map,liece-dcc-map,
+ liece-crypt-map,liece-friends-map,liece-channel-list-mode-map,
+ liece-nick-mode-map,): Use make-sparse-keymap when initialising.
+ (liece-command-mode): Don't set liece-display-frame-title to nil.
+ (liece-dialogue-mode-map): Bind `L' to liece-command-load-vars
+ instead of `C-l'; bind `S' to liece-command-save-vars instead of
+ `s'; bind `M' to liece-command-modec instead of `C-m'; bind `O' to
+ liece-dialogue-own-freeze instead of `M'.
+ (liece-buffer-last-check-time): Rename from
+ `liece-last-checkbuffer-time'.
+ (liece-check-buffers): Define as function.
+ (liece-check-buffers-if-interval-expired): Simplified.
+
+ * liece-vars.el
+ (liece-buffer-max-size): Rename from `liece-buffer-maxsize'.
+ (liece-buffer-default-size): Rename from `liece-buffer-defsize'.
+ (liece-buffer-check-interval): Rename from
+ `liece-checkbuffer-interval'.
+
+ * liece-emacs.el (liece-emacs-widget-button-click): Don't use
+ `event-buffer'.
+
+ * liece-xemacs.el
+ (liece-xemacs-get-buffer-window-list): Abolish.
+ (liece-xemacs-run-at-time): Abolish.
+ (liece-xemacs-put-text-property): Abolish.
+ (liece-xemacs-add-text-property): Abolish.
+
+ * liece-minibuf.el (liece-minibuffer-map): Use `set-keymap-parent'
+ instead of `liece-set-keymap-parents'.
+
+ * liece-compat.el: Don't require emu, broken, alist.
+ (remassoc): Abolish.
+ (remassq): Abolish.
+ (liece-run-at-time): Abolish.
+ (liece-cancel-timer): Abolish.
+ (with-timeout): Abolish.
+ (with-timeout-handler): Abolish.
+ (liece-get-buffer-window-list): Abolish.
+ (liece-set-keymap-parents): Abolish.
+ (event-buffer): Abolish.
+ (event-point): Abolish.
+ (truncate-string-to-width): Abolish.
+ (plist-get): Abolish.
+ (read-passwd): Abolish.
+ (colon-keyword-usable): Abolish.
+ (turn-on-font-lock): Abolish.
+ (liece-make-overlay): Abolish.
+ (liece-delete-overlay): Abolish.
+ (liece-overlay-put): Abolish.
+ (liece-move-overlay): Abolish.
+ (liece-overlay-end): Abolish.
+ (liece-overlay-get): Abolish.
+ (liece-overlays-at): Abolish.
+ (liece-put-text-property): Abolish.
+ (liece-add-text-property): Abolish.
+ (buffer-disable-undo): Abolish.
+ (valid-plist-p): Abolish.
+
+ * liece-url.el (liece-url-browser-netscape): Abolish.
+
+2000-03-08 Daiki Ueno <ueno@ueda.info.waseda.ac.jp>
+
+ * liece-compat.el (liece-get-buffer-window): Search all frames.
+
+2000-02-28 Daiki Ueno <ueno@ueda.info.waseda.ac.jp>
+
+ * liece.el (liece-command-mode): Set frame-title-format when
+ running on window-system environment.
+
+2000-02-18 Daiki Ueno <ueno@ueda.info.waseda.ac.jp>
+
+ * liece-emacs.el (liece-emacs-splash): Use `frame-char-width' and
+ `frame-char-height' when calculating logo centering.
+
+2000-02-17 Daiki Ueno <ueno@ueda.info.waseda.ac.jp>
+
+ * liece-400.el (liece-handle-443-message): Check channel name.
+
+2000-02-13 Daiki Ueno <ueno@ueda.info.waseda.ac.jp>
+
+ * liece-coding.el
+ (liece-coding-encode-charset-region): Define as function.
+ (liece-coding-encode-charset-string): Define as function.
+
+ * liece-dcc.el
+ (liece-dcc-chat-send): Switch to liece-command-buffer.
+ (liece-dcc-enqueue-request): Rename.
+ (liece-dcc-dequeue-request): Ditto.
+
+ * liece-misc.el (liece-send-as-binary): Abolish.
+ (liece-repair-crlf): Abolish.
+ (liece-send): Switch to liece-command-buffer.
+
+ * liece-emacs.el (liece-emacs-splash): Use `font-info' if 'font
+ parameter of the selected frame is not a fontset name.
+
+ * liece.el (liece-open-server-internal): Set process-buffer of
+ open-network-stream as unibyte.
+
+2000-02-10 Daiki Ueno <ueno@ueda.info.waseda.ac.jp>
+
+ * liece-xemacs.el (liece-toolbar-icon-convert-1): New function.
+ (liece-toolbar-icon-states): New variable.
+
+ * liece-emacs.el (liece-emacs-widget-button-click): Don't preserve
+ previously selected window.
+
+2000-01-23 Daiki Ueno <ueno@ueda.info.waseda.ac.jp>
+
+ * liece-emacs.el: Require `image' when compiling.
+ (create-image): Add optional argument `data-p'.
+
+2000-01-22 Daiki Ueno <ueno@ueda.info.waseda.ac.jp>
+
+ * liece-message.el (liece-message-empty-predicate): New variable.
+
+ * liece-commands.el
+ (liece-command-message): Use `liece-message-empty-predicate'.
+
+2000-01-16 Daiki Ueno <ueno@ueda.info.waseda.ac.jp>
+
+ * liece-modules.el (liece-modules): Don't install `queue-m'.
+
+ * liece-dcc.el: Don't require `queue-m' at runtime.
+
+ * liece-hilit.el:
+ Add autoload setting for `liece-channel-add-buttons' and
+ `liece-nick-add-buttons'.
+ (liece-highlight-maybe-turn-on-font-lock): Activate
+ `liece-channel-add-buttons' and `liece-nick-add-buttons' when
+ inserting every line.
+
+ * liece-compat.el (liece-map-overlays): New function.
+ (liece-kill-all-overlays): Use it.
+
+ * liece-xemacs.el (liece-xemacs-map-extents): New function.
+ (liece-xemacs-kill-all-overlays): Use it.
+ (liece-map-overlays): New alias to `liece-xemacs-map-extents'.
+
+ * liece-nick.el (liece-nick-redisplay-buffer): New function.
+ (liece-nick-add-buttons): New function.
+
+ * liece-channel.el
+ (liece-channel-redisplay-buffer): New function.
+ (liece-channel-list-redisplay-buffer): New function.
+ (liece-channel-buffer-invisible-p): Remove redundant cond.
+ (liece-channel-part-internal): Remove redundant `function'.
+ (liece-channel-list-add-button): Rename from
+ `liece-channel-add-button'.
+ (liece-channel-push-button-action): Use `liece-command-join'
+ instead of `liece-switch-to-channel'.
+
+ * liece-commands.el (liece-switch-to-channel-1): Abolish.
+ (liece-redisplay-buffer-functions): New variable.
+
+2000-01-07 Daiki Ueno <ueno@ueda.info.waseda.ac.jp>
+
+ * liece-commands.el
+ (liece-command-next-channel): Traverse channel list circularly.
+ (liece-command-previous-channel): Likewise.
+
+1999-12-26 Daiki Ueno <ueno@ueda.info.waseda.ac.jp>
+
+ * liece-commands.el
+ (liece-command-previous-channel): Remove nil from channel list.
+ (liece-command-next-channel): Ditto.
+
+1999-12-24 Daiki Ueno <ueno@ueda.info.waseda.ac.jp>
+
+ * liece-emacs.el (liece-emacs-splash): Check whether logo height
+ is larger than frame height.
+
+ * liece-crypt.el (liece-crypt-maybe-encrypt-message): Simplified.
+
+ * liece-commands.el
+ (liece-command-enter-message-encrypted): Abolish.
+ (liece-command-enter-message-cleartext): Abolish.
+ (liece-command-enter-message-opposite-crypt-mode): Abolish.
+ (liece-command-enter-message-with-key): Abolish.
+
+1999-12-23 Daiki Ueno <ueno@ueda.info.waseda.ac.jp>
+
+ * liece-version.el (liece-user-agent-value): Add APEL version.
+
+ * liece-inlines.el (liece-next-line): New macro.
+
+ * liece-ctcp.el
+ (liece-command-client-action): Use `liece-next-line'.
+ (liece-command-client-userinfo-from-commandbuffer): Ditto.
+
+ * liece-channel.el (liece-channel-member): Use `member-if' instead
+ of `find-if'.
+
+ * liece.el (liece): Don't use `liece-command-describe-briefly'.
+ (liece-command-mode): Don't bind `next-line-add-newlines'.
+ (liece-dialogue-keys): Don't bind `C-u'.
+
+ * liece-commands.el (liece-command-topic): If called with prefix
+ argument insert the current topic as default.
+ (liece-command-finger): Add documentation about optional 2nd
+ argument.
+ (liece-command-describe-briefly): Abolish.
+ (liece-enter-message): Abolish local variable `message'.
+ (liece-command-join-channel): Fix paren style.
+ (liece-command-join-partner): Ditto.
+ (liece-command-join): Ditto.
+ (liece-command-part): Ditto.
+ (liece-switch-to-channel-no): Ditto.
+ (liece-command-complete): Ditto.
+ (liece-command-next-channel): Rewrite with using
+ `liece-channel-member'.
+ (liece-command-previous-channel):
+ (liece-command-push): Abolish local variable `rest-sym' and
+ `item'; don't use `liece-channel-remove'.
+ (liece-command-pop): Abolish local variable `rest-sym'.
+ (liece-command-tag-region): Don't create temp buffer.
+
+1999-12-21 Daiki Ueno <ueno@ueda.info.waseda.ac.jp>
+
+ * liece-misc.el (liece-set-channel-indicator): Switch to
+ `liece-command-buffer' when updating modeline.
+
+1999-12-19 Daiki Ueno <ueno@ueda.info.waseda.ac.jp>
+
+ * liece-minibuf.el (liece-minibuffer-map): Don't use
+ `set-keymap-parents'.
+
+ * liece-compat.el (liece-set-keymap-parents): Rename from
+ `set-keymap-parents'.
+ (turn-on-font-lock,event-buffer,event-point,region-active-p,
+ remassoc,remassq,valid-plist-p,plist-get): Add document.
+
+1999-12-14 Daiki Ueno <ueno@ueda.info.waseda.ac.jp>
+
+ * liece.el (liece-insert-internal): Don't bind `tab-stop-list'.
+ (liece-dialogue-mode): Declare `tab-stop-list' as buffer local.
+
+1999-12-01 Daiki Ueno <ueno@unixuser.org>
+
+ * liece-message.el (liece-message-parent-buffer): Add condtion.
+
+1999-11-13 Daiki Ueno <ueno@ueda.info.waseda.ac.jp>
+
+ * liece.el (liece-read-variables-files): Make the `~/.liece/'
+ directory if there is no initialization file.
+
+1999-11-10 Kenichi OKADA <okada@opaopa.org>
+
+ * liece-xemacs.el (liece-xemacs-splash-at-point): Calculate
+ horizontal position of the splash logo.
+
+1999-11-10 Daiki Ueno <ueno@ueda.info.waseda.ac.jp>
+
+ * liece-emacs.el (liece-emacs-splash): Check the number of
+ the arguments of `insert-image'.
+
+1999-11-07 Daiki Ueno <ueno@ueda.info.waseda.ac.jp>
+
+ * liece-coding.el (detect-coding-string): Remove.
+ (liece-detect-coding-string): Don't define if
+ `detect-coding-string' does not exist.
+
+1999-11-05 Daiki Ueno <ueno@ueda.info.waseda.ac.jp>
+
+ * liece-url.el (liece-url-add-buttons): Accept optional arguments
+ `start' and `end'.
+
+ * liece.el (liece-save-point): New macro; borrowed from SKK.
+ (liece-before-insert-hook): New variable.
+ (liece-insert-internal): Refine.
+
+1999-11-01 Daiki Ueno <ueno@ueda.info.waseda.ac.jp>
+
+ * liece-misc.el (liece-get-buffer-create): Use memq instead of
+ member to search over buffers list.
+
+1999-10-29 Daiki Ueno <ueno@ueda.info.waseda.ac.jp>
+
+ * liece-handle.el (liece-handle-ping-message): Return the
+ argument correctly.
+
+ * liece.el (liece-insert-internal): Remove `inline'.
+
+1999-10-27 Daiki Ueno <ueno@ueda.info.waseda.ac.jp>
+
+ * liece-commands.el (liece-command-nick-scroll-down): Fix
+ argument list.
+ (liece-command-nick-scroll-up): Ditto.
+
+ * liece-hilit.el (liece-highlight-turn-on-font-lock): Set
+ `liece-highlight-maybe-play-jingle' as local hook.
+ (liece-highlight-font-lock-keywords): Undo last change.
+
+1999-10-26 Daiki Ueno <ueno@ueda.info.waseda.ac.jp>
+
+ * liece.el (liece-refresh-windows): Remove.
+ (liece-refresh-buffer-window): New function `liece-refresh-windows'.
+ (liece-insert-internal): Preserve old point unconditionally when
+ the buffer is frozen.
+
+1999-10-21 Daiki Ueno <ueno@ueda.info.waseda.ac.jp>
+
+ * liece-misc.el (liece-freeze): Rename from `liece-freeze-toggle'.
+ (liece-own-freeze): Rename from `liece-own-freeze-toggle'.
+
+ * liece.el: Add autoload for `liece-command-submit-bug-report'.
+ (liece-overriding-command-keys): Rename.
+ (liece-dialogue-keys): Bind `liece-command-submit-bug-report'.
+
+ * liece-commands.el (liece-command-scroll-down): Use
+ `scroll-other-window'; accept prefix value.
+ (liece-command-scroll-up): Ditto.
+ (liece-command-nick-scroll-down): Ditto.
+ (liece-command-nick-scroll-up): Ditto.
+ (liece-command-freeze): Accept prefix argument.
+ (liece-command-own-freeze): Ditto.
+ (liece-command-quit): Refine.
+
+1999-10-20 Daiki Ueno <ueno@ueda.info.waseda.ac.jp>
+
+ * liece-commands.el (liece-command-display-friends): Remove
+ `save-excursion'.
+
+ * liece.el (liece-read-variables-files): Prepare startup
+ directory if it does not exist.
+
+ * liece-vars.el (liece-directory): New variable.
+ (liece-variables-file): Relocate under `liece-directory'.
+
+ * liece-ctcp.el (liece-ctcp-version-message): Refer
+ `liece-user-agent-value'.
+
+ * liece-menu.el: Check features about menubars.
+
+ * liece-xemacs.el (liece-xemacs-hide-scrollbars): Set
+ `scrollbar-height' to 0 if `horizontal-scrollbar-visible-p' is not
+ available.
+
+ * liece-mail.el (liece-command-submit-bug-report): New function.
+ (liece-maintainer-address): New variable.
+
+ * gettext.el (gettext-load-message-catalogue): Enclose with
+ `as-binary-input-file' instead of using `set-buffer-multibyte' twice.
+ (gettext-load-portable-message-catalogue): Likewise.
+ (dgettext): Check the cdr of catalogue entry.
+ (gettext-gmo-read-32bit-word): Mask each byte with 255.
+
+ * liece-compat.el (truncate-string-to-width): New alias.
+
+ * liece.el (liece-server-keyword-bind): Quote colon keywords.
+
+ * liece-make.el (make-liece-info-files): Check if
+ `set-language-environment' exists.
+
+ * liece-misc.el (liece-server-host): Quote colon keyword.
+
+1999-10-19 Daiki Ueno <ueno@ueda.info.waseda.ac.jp>
+
+ * liece-hilit.el (liece-highlight-font-lock-keywords): Undo last
+ change; accept partial matcher as the value of
+ `liece-highlight-pattern'.
+ (liece-highlight-maybe-play-jingle): New function.
+ (liece-highlight-maybe-turn-on-font-lock): Add
+ `liece-highlight-maybe-play-jingle' to `after-change-functions'.
+
+1999-10-14 Daiki Ueno <ueno@ueda.info.waseda.ac.jp>
+
+ * gettext.el (gettext-load-message-catalogue): Use hashtable.
+ (gettext-load-portable-message-catalogue): Likewise.
+
+1999-10-13 Daiki Ueno <ueno@ueda.info.waseda.ac.jp>
+
+ * liece-misc.el (next-visible-point): Don't advise.
+ (liece-remove-properties-region): Enclose by `save-restriction'.
+
+1999-10-12 Daiki Ueno <ueno@ueda.info.waseda.ac.jp>
+
+ * liece-commands.el (liece-command-send-action): Remove.
+
+ * liece-ctcp.el (liece-command-client-action): Move from
+ `liece-commands.el'; mark `liece-command-send-action' as obsolete.
+ (liece-client-x-face-notice): Remove whitespaces.
+
+ * liece-handle.el (liece-handle-kick-message): Fix message.
+
+1999-10-11 Daiki Ueno <ueno@ueda.info.waseda.ac.jp>
+
+ * gettext.el (gettext-default-mime-charset): New variable.
+ (gettext-parse-Content-Type): Use it.
+
+1999-10-07 Daiki Ueno <ueno@ueda.info.waseda.ac.jp>
+
+ * liece-misc.el (liece-message): Fix message prefix.
+
+ * liece-compat.el (liece-find-data-directory): Move to
+ `liece-inlines'.
+
+ * liece-xemacs.el (liece-xemacs-icon-path): Use `liece-find-path'.
+
+ * liece-emacs.el (liece-emacs-icon-path): Use `liece-find-path'.
+
+ * liece-inlines.el (liece-find-path): New function.
+
+1999-10-05 Daiki Ueno <ueno@ueda.info.waseda.ac.jp>
+
+ * liece-version.el (liece-user-interface-product): Renamed from
+ `liece-client-product'.
+ (liece-client-version-major): Abolish.
+ (liece-client-version-minor): Abolish.
+ (liece-client-version-beta): Abolish.
+ (liece-client-version-alpha): Abolish.
+ (liece-client-version-codename): Abolish.
+ (liece-product-name): New macro.
+ (liece-product-version): New macro.
+ (liece-product-code-name): New macro.
+
+1999-10-03 Daiki Ueno <ueno@ueda.info.waseda.ac.jp>
+
+ * liece-hilit.el (liece-highlight-jingle-function): New variable.
+ (liece-highlight-font-lock-keywords): If liece-highlight-pattern
+ matches, play jingle.
+
+1999-10-01 Daiki Ueno <ueno@ueda.info.waseda.ac.jp>
+
+ * liece-message.el (liece-message-parent-buffer): Check the
+ message direction in private conversation.
+
+1999-09-28 Daiki Ueno <ueno@ueda.info.waseda.ac.jp>
+
+ * liece-version.el (liece-emacs-user-agent-value): Include
+ `emacs-patch-level'. It exists in XEmacs 21.1.1 or later.
+
+1999-09-22 Daiki Ueno <ueno@ueda.info.waseda.ac.jp>
+
+ * liece.el (liece-channel-mode): Make `truncate-lines' local.
+ (liece-others-mode): Ditto.
+ (liece-channel-list-mode): Ditto.
+ (liece-nick-mode): Ditto.
+
+1999-09-18 Daiki Ueno <ueno@ueda.info.waseda.ac.jp>
+
+ * liece.el (liece-open-server): Set `liece-status-message-string'
+ when timeout is expired.
+
+1999-09-14 Daiki Ueno <ueno@ueda.info.waseda.ac.jp>
+
+ * liece-menu.el (liece-use-localized-menu): New variable.
+ (liece-command-define-menus): Use it.
+ (liece-command-define-menus-1): New function; to raverse menu
+ items recursively.
+
+ * liece.el (liece): Call `liece-intl-load-catalogue' before switch
+ to the command buffer.
+
+ * liece-dcc.el: Refine.
+
+ * liece-ctcp.el (liece-client-x-face-notice): Do not decode empty
+ `X-Face'.
+
+1999-09-11 Daiki Ueno <ueno@ueda.info.waseda.ac.jp>
+
+ * liece-vars.el (liece-dcc-program): Rename to `ldcc'.
+
+ * liece-tcp.el (liece-tcp-program): Rename to `ltcp'.
+
+ * gettext.el (gettext-parse-Content-Type): Require `path-util'.
+
+ * liece-x-face.el: Require `path-util'.
+
+1999-09-10 Daiki Ueno <ueno@ueda.info.waseda.ac.jp>
+
+ * Makefile.am (SOURCES): Add `gettext.el'.
+
+ * liece-modules.el (liece-modules-to-compile): Add `gettext.el'.
+
+ * liece-intl.el: Use `gettext.el'.
+ (liece-intl-domains-alist): Abolish.
+ (liece-intl-domain-to-mime-charset-alist): Abolish.
+ (liece-intl-prepare-prefix): Abolish.
+ (liece-intl-parse-Content-Type): Abolish.
+ (liece-intl-convert-string): Abolish.
+ (liece-intl-catalogue-path): Abolish.
+
+ * gettext.el: New file.
+
+ * liece-ctcp.el: Add autoload setting for `liece-ctcp-dcc-message'.
+
+ * liece.el (liece): Save window splitting only when called
+ interactively.
+ (liece-clear-system): Do not restore window splitting.
+ (liece-command-mode): Set syntax table explicitly; make
+ `frame-title-format' buffer local.
+
+ * liece-window.el (liece-window-configuration-push): Do not save
+ `frame-title-format'.
+ (liece-window-configuration-pop): Likewise.
+
+ * liece-commands.el (liece-command-quit): Restore window splitting
+ only when called interactively.
+
+1999-09-09 Daiki Ueno <ueno@ueda.info.waseda.ac.jp>
+
+ * liece.el (liece-server-keyword-map): New variable.
+ (liece-server-keyword-bind): New macro modified version of
+ `mail-source-bind' from `mail-source.el'.
+ (liece-server-parse-string): New function.
+ (liece-open-server): Use them.
+
+1999-09-08 Daiki Ueno <ueno@ueda.info.waseda.ac.jp>
+
+ * liece-300.el (liece-handle-353-message): Reverse reply list.
+
+ * All files are renamed from `irchat-*' to `liece-*'.
+ All symbols are renamed too.
+
+ * irchat-vars.el (irchat-connection-timeout): Default to 60.
+
+ * irchat-nick.el (irchat-nick-insert): Handle reverse order
+ sorting.
+
+1999-09-07 Daiki Ueno <ueno@ueda.info.waseda.ac.jp>
+
+ * irchat.el (irchat): Call `irchat-command-mode' just once.
+ (irchat-initialize-buffers): Likewise.
+
+ * irchat-channel.el (irchat-channel-buffer-create): Call
+ `irchat-channel-mode' just once.
+
+ * irchat-nick.el (irchat-nick-buffer-create): Call
+ `irchat-nick-mode' just once.
+
+ * irchat-message.el (irchat-message-parent-buffer): Fix condition.
+
+1999-09-06 Daiki Ueno <ueno@ueda.info.waseda.ac.jp>
+
+ * irchat-nick.el (irchat-nick-sort-nicks): New variable.
+
+ * irchat-intl.el (irchat-intl-load-catalogue): Ignore all errors
+ when reading catalogue file.
+
+ * irchat-menu.el: Do not require `irchat-ctcp'; add autoload
+ settings for `irchat-menu-callback-ctcp-version',
+ `irchat-menu-callback-ctcp-userinfo',
+ `irchat-menu-callback-ctcp-help',
+ `irchat-menu-callback-ctcp-clientinfo' and
+ `irchat-menu-callback-ctcp-ping'; add `irchat-menu-add-url' to
+ `irchat-url-add-hook'.
+
+ * irchat-url.el (irchat-url-add-buttons): Enclose with
+ `save-excursion'; run `irchat-url-add-hook'.
+
+1999-09-06 Daiki Ueno <ueno@ueda.info.waseda.ac.jp>
+
+ * Liece 1.3.7.
+
+ * irchat-xemacs.el (irchat-xemacs-setup-menu): Abolish.
+
+ * irchat-intl.el (irchat-intl-get-msgstr-if): Abolish.
+
+ * irchat-vars.el: Remove defconst for colon keyword.
+
+1999-09-05 Daiki Ueno <ueno@ueda.info.waseda.ac.jp>
+
+ * irchat-menu.el: All the menu specs are expanded immediately.
+ (irchat-menu-prepare-menus): Abolish.
+ (irchat-menu-define): New function.
+ (irchat-menu-alist): New variable.
+
+ * irchat-handle.el (irchat-handle-topic-message): Check empty
+ topic line.
+
+ * irchat.el (irchat): When `irchat-startup-channel-list' contains
+ list element send cadr as a channel key.
+
+ * irchat-emacs.el (irchat-emacs-widget-convert-button): Make the
+ keymap `irchat-widget-keymap' parented from current local map.
+
+ * irchat-nick.el (irchat-nick-sort-predicate): New variable.
+ (irchat-nick-update): Sort nicknames with
+ `irchat-nick-sort-predicate'.
+ (irchat-nick-insert): Search sorted position before insertion.
+ (irchat-nick-replace): Call `irchat-nick-insert' when
+ `irchat-nick-sort-predicate' is valid.
+
+ * irchat-message.el (irchat-message-parent-buffer): Add condition
+ for private conversation.
+
+ * irchat-make.el (make-irchat-info-files): Set language
+ environment to `Japanese'.
+
+ * irchat-dcc.el (irchat-dcc-channel-representation-format):
+ Remove.
+
+ * irchat-minibuf.el (irchat-minibuffer-complete-channel-modes):
+ Use `string-list-member-ignore-case' instead of
+ `string-list-ci-member'.
+
+ * irchat-url.el: Remove `irchat-insert-hook'.
+
+ * irchat-hilit.el (irchat-highlight-maybe-turn-on-font-lock):
+ Add `irchat-url-add-buttons' to `irchat-insert-hook'.
+
+ * irchat.el (irchat-initialize-buffers): Fix last change.
+
+ * irchat-300.el: Enclose autoloads by `eval-and-compile'.
+
+ * irchat-channel.el: Declare variable
+ `irchat-dcc-channel-representation-format'.
+
+1999-09-04 Daiki Ueno <ueno@ueda.info.waseda.ac.jp>
+
+ * Liece 1.3.6.
+
+ * irchat.el: Add autoload for `irchat-command-browse-url'; do not
+ require `irchat-url' and `irchat-dcc'; add autoload for
+ `irchat-command-mail-compose'.
+ (irchat-initialize-timers): Rewrite with `dolist'; do
+ not check `irchat-timers-list-initialized-p'.
+ (irchat-truncate-nickname): Use `truncate-string-to-width' instead
+ of `truncate-string'.
+ (irchat-buffer-mode-alist): New variable.
+ (irchat-dialogue-setup-buffer): Abolish.
+ (irchat-others-setup-buffer): Abolish.
+ (irchat-channel-list-setup-buffer): Abolish.
+ (irchat-private-setup-buffer): Abolish.
+ (irchat-KILLS-setup-buffer): Abolish.
+ (irchat-IGNORED-setup-buffer): Abolish.
+ (irchat-WALLOPS-setup-buffer): Abolish.
+ (irchat-CRYPT-setup-buffer): Abolish.
+ (irchat-initialize-buffers): Rewrite.
+
+ * irchat-ctcp.el (irchat-client-version-insert): Do not indent
+ explicitly.
+ (irchat-client-message-no-lf): Abolish.
+
+ * irchat-300.el, irchat-xemacs.el, irchat-commands.el: Do not
+ require `irchat-dcc' and `irchat-mail'.
+
+ * irchat-dcc.el (irchat-command-dcc-send): Remove autoload cookie.
+
+1999-09-03 Daiki Ueno <ueno@ueda.info.waseda.ac.jp>
+
+ * irchat-inlines.el (forward-line): Do not advise.
+
+ * irchat-intl.el: Do not require `alist'; require `mcharset',
+ `static' and `cl' during compilation.
+ (irchat-intl-msgid-regexp): Fix regexp.
+ (irchat-intl-msgstr-regexp): Ditto.
+ (irchat-intl-set-msgstr): Abolish.
+ (irchat-intl-load-catalogue): Optimize with side-effects.
+
+ * irchat.el (irchat): Load message catalogue only once.
+
+1999-08-31 Daiki Ueno <ueno@ueda.info.waseda.ac.jp>
+
+ * irchat.el (irchat-close-server-internal): Use
+ `irchat-server-opened'.
+
+ * irchat-hilit.el (irchat-highlight-maybe-turn-on-widget):
+ Abolish.
+
+ * irchat-channel.el (irchat-channel-add-button): Use
+ `irchat-widget-convert-button'.
+
+ * irchat-nick.el (irchat-nick-insert): Use
+ `irchat-widget-convert-button'.
+ (irchat-nick-replace): Ditto.
+
+ * irchat-compat.el (irchat-widget-convert-button): New alias.
+ (irchat-widget-button-click): Alias to `widget-button-click'.
+
+ * irchat-emacs.el (irchat-widget-keymap): New variable.
+ (irchat-emacs-widget-convert-button): New function.
+ (irchat-emacs-widget-button-click): New function.
+ (irchat-widget-convert-button): Redefine here.
+ (irchat-widget-button-click): Redefine here.
+
+ * irchat-url.el (irchat-url-add-buttons): Use
+ `irchat-widget-convert-button'.
+
+1999-08-23 Daiki Ueno <ueno@ueda.info.waseda.ac.jp>
+
+ * irchat-emacs.el (irchat-emacs-splash): Use `fontset-pixel-size'.
+
+1999-08-22 Daiki Ueno <ueno@ueda.info.waseda.ac.jp>
+
+ * irchat-compat.el: Do not require `wid-browse' during
+ compilation.
+ (irchat-widget-button-click): New function.
+
+ * irchat-emacs.el: Enclose autoloads with `eval-and-compile'.
+ (irchat-emacs-create-mode-line-image): Specify
+ `:ascent' property when creating the image.
+ (irchat-emacs-create-nick-image): Ditto.
+
+1999-08-22 Daiki Ueno <ueno@ueda.info.waseda.ac.jp>
+
+ * Makefile.am (EXTRA_DIST): Add `irchat-emacs.el'.
+
+ * irchat-xemacs.el (irchat-xemacs-glyph-nick-buffer): Abolish.
+ (irchat-xemacs-glyph-nick-region): Remove interactive spec.
+
+ * irchat-intl.el: Do not require `mime-parse'.
+
+ * irchat-tcp.el: Bind `ssl-program-arguments'.
+
+1999-08-22 Daiki Ueno <ueno@ueda.info.waseda.ac.jp>
+
+ * irchat-modules.el (irchat-modules-to-compile): Add
+ `irchat-emacs'.
+
+ * irchat-xemacs.el (irchat-xemacs-glyph-nick-buffer): Refine.
+
+ * irchat-vars.el (irchat-icon-directory): Move from
+ `irchat-xemacs.el'.; To be used under FSF Emacs 20.4.91.
+ (irchat-nick-image-alist): Move from `irchat-xemacs.el'.
+
+ * irchat-emacs.el: New file.; Most of FSF Emacs specific routines
+ are stored here.
+ (irchat-emacs-icon-path): New macro.
+ (irchat-emacs-mode-line-buffer-identification): New function.
+ (irchat-emacs-mode-line-buffer-identification): New variable.
+
+1999-08-20 Daiki Ueno <ueno@ueda.info.waseda.ac.jp>
+
+ * liece.xpm: Reduce colors.
+
+1999-08-20 Daiki Ueno <ueno@ueda.info.waseda.ac.jp>
+
+ * irchat-x-face.el (irchat-x-face-insert-function): Don't use
+ `eval-when-compile' while checking bitmap-mule.
+
+1999-08-20 Daiki Ueno <ueno@ueda.info.waseda.ac.jp>
+
+ * irchat.el (irchat-splash-pixmap): Renamed from
+ `irchat-stipple-pixmap'; use the XPM data under FSF Emacs 20.4.91.
+ (irchat-x-splash): Likewise.
+
+ * irchat-channel.el (irchat-channel-virtual): Undo last change.
+
+1999-08-15 Daiki Ueno <ueno@ueda.info.waseda.ac.jp>
+
+ * irchat-400.el (irchat-handle-400-messages): Do not pass empty
+ channel names to `irchat-channel-virtual'.
+
+ * irchat-channel.el (irchat-channel-virtual): Make channel ID for
+ `!' channels invisible from user.
+
+ * irchat-vars.el (irchat-channel-id-length): Default to 5.
+
+1999-08-14 Daiki Ueno <ueno@ueda.info.waseda.ac.jp>
+
+ * irchat-300.el (irchat-353-channel): Abolish.
+ (irchat-handle-366-message): Do not use `irchat-353-channel'.
+
+1999-08-13 Daiki Ueno <ueno@ueda.info.waseda.ac.jp>
+
+ * irchat-200.el (irchat-handle-218-message): Do not indent
+ explicitly.
+
+1999-08-08 Daiki Ueno <ueno@ueda.info.waseda.ac.jp>
+
+ * irchat-compat.el (with-timeout): New macro for compatibility.
+
+ * irchat-xemacs.el: Check `horizontal-scrollbar-visible-p' for
+ XEmacs 20.4.
+
+ * irchat.el (irchat-open-server): Do not truncate trailing `_'.
+
+ * Liece 1.3.5.
+
+ * irchat-handle.el (irchat-handle-mode-message): Handle channel
+ invite list.
+ (irchat-handle-join-message): Pass optional argument to
+ `match-string'.
+
+ * irchat-channel.el (irchat-channel-get-invites): New macro.
+ (irchat-channel-add-invite): New macro.
+ (irchat-channel-remove-invite): New macro.
+ (irchat-channel-set-invite): New macro.
+
+ * irchat-300.el: Handle channel invite list.
+ (irchat-handle-346-message) <RPL_INVITELIST>: New handler.
+ (irchat-handle-347-message) <RPL_ENDOFINVITE>: New handler
+
+1999-08-07 Daiki Ueno <ueno@ueda.info.waseda.ac.jp>
+
+ * irchat-200.el: Register 200 handler again.
+ (irchat-handle-200-message): Do not indent explicitly.
+ (irchat-handle-201-message): Likewise.
+ (irchat-handle-213-message): Likewise.
+ (irchat-handle-214-message): Likewise.
+ (irchat-handle-262-message) <RPL_ENDOFTRACE>: New handler.
+
+ * irchat-300.el (irchat-handle-365-message): Turn hops count into
+ string.
+
+ * irchat-xemacs.el (irchat-toolbar-map-button-list): Fix typo.
+
+1999-08-06 Daiki Ueno <ueno@ueda.info.waseda.ac.jp>
+
+ * irchat-intl.el (irchat-intl-load-catalogue): Add nil check.
+ (irchat-intl-catalogue-path): Fix last change.
+
+1999-08-06 Daiki Ueno <ueno@ueda.info.waseda.ac.jp>
+
+ * irchat-window.el (irchat-window-load-style-file): Cache
+ `irchat-window-style-directory'.
+
+ * irchat-xemacs.el (irchat-xemacs-icon-path): Cache
+ `irchat-icon-directory'.
+
+ * irchat-intl.el (irchat-intl-catalogue-path): New macro.
+ (irchat-intl-load-catalogue): Use it.
+
+ * irchat-make.el (install-update-manifest-file): Fix for data
+ directories.
+ (config-irchat-package-directory): Splitt into
+ `config-irchat-package'.
+
+ * irchat-xemacs.el: Do not require `smiley'.
+ (irchat-xemacs-icon-path): New macro.
+ (irchat-toolbar-icon-plist-get): Use it.
+ (irchat-xemacs-setup-toolbar): Use it.
+ (irchat-xemacs-create-nick-glyph): Use it.
+ (irchat-xemacs-modeline-glyph): Use it.
+
+ * irchat-vars.el (irchat-use-smiley): Abolish.
+
+ * irchat-hilit.el (irchat-maybe-smiley-region): Abolish. If you
+ want to use this functionality, please setup `irchat-insert-hook'.
+
+1999-08-05 Daiki Ueno <ueno@ueda.info.waseda.ac.jp>
+
+ * liece.xpm: New splash logo.
+
+ * irchat-xemacs.el (irchat-xemacs-splash-at-point): Use
+ `glyph-width', `glyph-height' and `window-pixel-height' to
+ calculate position of the splash logo.
+
+1999-08-04 Daiki Ueno <ueno@ueda.info.waseda.ac.jp>
+
+ * irchat-compat.el (irchat-find-data-directory): Move from
+ `irchat-misc'.
+
+ * irchat-intl.el: Use new style macros.
+ (irchat-intl-parse-Content-Type): Check statically if
+ `mime-content-type-parameter' is available.
+ (irchat-intl-load-catalogue): Use `irchat-find-data-directory'.
+
+ * irchat.el (irchat-open-server): Add server parameter `relay'.
+
+ * irchat-window.el (irchat-window-set-default-style): Use
+ `irchat-find-data-directory'.
+
+ * irchat-tcp.el: Fix comment string.
+ (irchat-tcp-open-rlogin-stream): New function.
+ (irchat-tcp-open-rlogin-stream-as-binary): New function.
+ (irchat-tcp-default-connection-type): Add rlogin to custom spec.
+ (irchat-tcp-rlogin-program): New variable.
+ (irchat-tcp-relay-host): New variable.
+ (irchat-tcp-rlogin-parameters): New variable.
+ (irchat-tcp-rlogin-user-name): New variable.
+
+1999-08-03 Daiki Ueno <ueno@ueda.info.waseda.ac.jp>
+
+ * irchat-config.el (irchat-config-info-file-regexp): New variable.
+
+ * irhcat-hilit.el: Require font-lock during compilation.
+
+ * irchat-vars.el (irchat-tab-stop-list): New variable.
+
+ * irhcat-000.el, irchat-200.el, irchat-300.el, irchat-400.el,
+ irchat-ctcp.el: Do not use `mapcar' when registering handlers.
+
+ * irchat-misc.el (irchat-find-etc-directory): New function.
+
+ * irchat.el: Add autoloads for
+ `bitmap-stipple-xbm-file-to-stipple' and
+ `bitmap-stipple-insert-pixmap'.
+
+ * irchat-xemacs.el (irchat-x-face-insert-with-xemacs): Use xface
+ glyph if this feature has been provided and `console-type' returns
+ 'tty or 'pc, or otherwise make string glyph.
+ [Rename from overriding function `irchat-x-face-insert']
+ (irchat-xemacs-create-nick-glyph): Call `console-type' instead of
+ referring `window-system'.
+ (irchat-xemacs-modeline-glyph): Check current console type.
+ (irchat-xemacs-splash-at-point): Ditto.
+ (irchat-find-etc-directory): Advise it.
+
+ * irchat-compat.el (irchat-static-autoload): New macro.
+ (colon-keyword-usable): New facility checking.
+
+ * irchat-x-face.el: Add autoloads for `x-face-encode',
+ `x-face-read-existing-file-name', `bitmap-insert-xbm-buffer',
+ `bitmap-decode-xbm', `bitmap-read-xbm-buffer' and `bitmap-compose'.
+ (irchat-x-face-insert-function): New variable.
+ (irchat-x-face-insert-with-bitmap): Rename from overriding
+ function `irchat-x-face-insert'.
+
+ * irchat-url.el: Do not check with requiring browse-url. Assume
+ that function `browse-url' have already been autoloaded.
+
+1999-08-01 Daiki Ueno <ueno@ueda.info.waseda.ac.jp>
+
+ * irchat.el (irchat-command-mode): Set local value of
+ `next-line-add-newlines' 't.
+ (irchat-wait-for-response): Use `with-timeout'.
+ (irchat): Do not use `make-variable-buffer-local' when
+ `irchat-freeze' and `irchat-own-freeze' are initialized.
+ (irchat-dialogue-mode): Define `irchat-freeze' and
+ `irchat-own-freeze' here.
+
+ * irchat-misc.el (next-line): Abolish.
+
+ * irchat-handle.el (irchat-handle-nick-message): Fix typo.
+
+1999-07-30 Daiki Ueno <ueno@ueda.info.waseda.ac.jp>
+
+ * irchat-inlines.el (string-list-modify-ignore-case): Fix typo.
+
+1999-07-29 Daiki Ueno <ueno@ueda.info.waseda.ac.jp>
+
+ * irchat-make.el: Generate file `MANIFEST.liece'.
+ (install-update-manifest-file): New function.
+
+1999-07-28 Daiki Ueno <ueno@ueda.info.waseda.ac.jp>
+
+ * irchat-commands.el (irchat-command-end-of-buffer): Do not use
+ `set-window-point'.
+
+ * irchat-300.el (irchat-handle-367-message): Use
+ `irchat-channel-add-ban' instead of temp variable.
+ (irchat-367-channel): Abolish.
+ (irchat-367-regexps): Abolish.
+ (irchat-handle-348-message): New handler for handling channel
+ exception list.
+ (irchat-handle-349-message): New handler for handling channel
+ exception list.
+
+1999-07-27 Daiki Ueno <ueno@ueda.info.waseda.ac.jp>
+
+ * irchat-handle.el (irchat-handle-mode-message): Handle channel
+ exception list.
+
+ * irchat-channel.el: (irchat-channel-get-exceptions): New macro.
+ (irchat-channel-add-exception): New macro.
+ (irchat-channel-remove-exception): New macro.
+ (irchat-channel-set-exception): New macro.
+
+1999-07-25 Daiki Ueno <ueno@ueda.info.waseda.ac.jp>
+
+ * irchat-commands.el (irchat-command-end-of-buffer): Do not use
+ `pop-to-buffer'.
+ (irchat-command-describe-briefly): Do not use backquote.
+
+1999-07-24 Daiki Ueno <ueno@ueda.info.waseda.ac.jp>
+
+ * irchat-compat.el: Do not refer `widget-minor-mode-map'.
+
+ * irchat-hilit.el (irchat-highlight-maybe-turn-on-widget): Use
+ `current-local-map' instead of `widget-minor-mode-map'.
+
+ * Liece 1.3.4.
+
+ * irchat-q-ccl.el (irchat-quote-ccl-encode-region): Fix typo.
+
+ * irchat-crypt.el: Add autoload for `crc32-string'.
+ (irchat-crypt-hash-crc32-string): New function.
+ (irchat-crypt-default-hash-function): New variable.
+ (irchat-crypt-key-fingerprint): Rewrite with above functions.
+
+ * irchat-handle.el (irchat-handle-topic-message): Fix argument
+ order of `irchat-channel-set-topic'.
+
+ * irchat-misc.el (irchat-maybe-update-channel-indicator): Abolish.
+ Call `irchat-set-channel-indicator' directly.
+
+ * irchat-nick.el (irchat-nick-replace): Remove widgets.
+
+ * irchat-menu.el (irchat-nick-popup-menu): Move "Kick" menu to the
+ bottom of menu entries.
+
+ * irchat-xemacs.el (irchat-xemacs-setup-menu): Ditto.
+
+1999-07-23 Daiki Ueno <ueno@ueda.info.waseda.ac.jp>
+
+ * irchat-globals.el (irchat-frame-title-format-last): Abolish.
+
+ * irchat.el (irchat-accept-response): Call `irchat' with no
+ arguments. Here's the point that take care of growing tail.
+ (irchat): Call `irchat-window-configuration-pop' and
+ `irchat-window-configuration-push' consequently.
+
+ * irchat-commands.el (irchat-command-keepalive): Call `irchat'
+ with no arguments.
+
+ * irchat-filter.el (irchat-sentinel): Call `irchat' with no
+ arguments.
+
+ * irchat-window.el: Add window configuration stack utility.
+ (irchat-window-configuration-push): New function.
+ (irchat-window-configuration-pop): New function.
+ (irchat-window-configuration-stack): New variable.
+
+ * irchat-compat.el: Require wid-edit and wid-browse during
+ compilation.
+ (widget-minor-mode-map): Bind `mouse-button-3'.
+ (irchat-dont-set-event-point): New advice against
+ `widget-button-click' for FSF Emacs.
+ (irchat-save-current-buffer): New advice against
+ `widget-button-click' for FSF Emacs.
+ (remassq): New function.
+
+ * irchat-channel.el (irchat-channel-push-button): Abolish.
+ (irchat-channel-list-insert): Abolish.
+ (irchat-channel-button): New widget.
+ (irchat-channel-add-button): New function.
+ (irchat-channel-button-action): New function.
+
+ * irchat-url.el: Use widget.
+ (irchat-url-link): New widget.
+ (irchat-url-add-button): New function.
+ (irchat-url-iterate-buffer): Abolish.
+ (irchat-url-search-forward): Abolish.
+ (irchat-url-add-to-completion): Abolish
+ (irchat-url-link-action): Renamed from irchat-url-push-button.
+
+ * irchat-hilit.el: Renamed from irchat-hilight.el.
+ (irchat-highlight-overlay-put-mouse-face): Abolish.
+ (irchat-highlight-insert-with-mouse-face): Abolish.
+ (irchat-highlight-insert-line-with-mouse-face): Abolish.
+ (irchat-highlight-with-widget): Abolish.
+ (irchat-url-face): Abolish.
+ (irchat-mouse-face): Abolish.
+ (irchat-highlight-maybe-turn-on-widget): New function.
+ This function turns on `widget-minor-mode' in
+ `irchat-nick-mode', `irchat-channel-list-mode' or
+ `irchat-dialogue-mode'.
+
+1999-07-21 Daiki Ueno <ueno@ueda.info.waseda.ac.jp>
+
+ * Liece 1.3.3.
+
+ * irchat.el (irchat-override-command-keys): Bind "\C-c\C-a" to
+ `irchat-command-previous-channel'.
+
+ * irchat-crypt.el: Add routines for encapsulate cipher algorithms.
+ (irchat-crypt-import-cipher-algorithm): New function.
+ (irchat-crypt-key-fingerprint): New function.
+ (irchat-crypt-build-decryption-key): New function.
+ (irchat-crypt-build-encryption-key): New function.
+ (irchat-crypt-encrypt-string): New function.
+ (irchat-crypt-decrypt-string): New function.
+ (irchat-crypt-algorithm-major-version): New function.
+ (irchat-crypt-algorithm-minor-version): New function.
+ (irchat-crypt-secure-passphrase-read): Abolish.
+ (irchat-crypt-ignore-suspicious): Abolish.
+ (irchat-crypt-ignore-defected): Abolish.
+ (irchat-get-idea-decryption-key): Abolish.
+ (irchat-command-set-default-key): Check if this function was
+ called interactively.
+ (irchat-command-add-decryption-key): Renamed from
+ `irchat-command-add-new-key'.
+ (irchat-command-delete-decryption-key): Renamed from
+ `irchat-command-delete-key'.
+ (irchat-crypt-decryption-keys): Renamed from
+ `irchat-crypt-known-keys'.
+ (irchat-crypt-encryption-keys): Renamed from
+ `irchat-crypt-default-keys'.
+
+ * irchat-coding.el (irchat-default-mime-charset-for-read): New
+ variable. Default to 'x-ctext.
+
+ * irchat-compat.el: Do not require 'defface.
+ (irchat-compat-enable-to-read-multibyte): Abolish.
+
+ * irchat-modules.el (irchat-modules-to-compile): Remove
+ `irchat-ck-*' and `defface'. Use `japanese-zenkaku-*' with hook.
+
+ * irchat-vars.el (irchat-convert-hankaku-katakana): Abolished.
+
+ * irchat-inlines.el: All string functions are rewritten.
+
+1999-07-05 Daiki Ueno <ueno@ueda.info.waseda.ac.jp>
+
+ * irchat-ctcp.el: Register ACTION handler.
+
+1999-07-04 Daiki Ueno <ueno@ueda.info.waseda.ac.jp>
+
+ * irchat-version.el (irchat-emacs-user-agent-value): Modify for
+ XEmacs UTF-2000-MULE.
+
+ * irchat-crypt.el: Do not use IDEA as the default cipher algorithm.
+ (irchat-crypt-cipher-algorithm): New variable.
+ (irchat-crypt-encrypt-message-format): Add version field of
+ the cipher algorithm.
+ (irchat-crypt-current-keys): Always restore the computed keys into
+ this variable. [Renamed from irchat-default-idea-key-list]
+
+1999-06-26 Daiki Ueno <ueno@ueda.info.waseda.ac.jp>
+
+ * irchat-xemacs.el (irchat-use-toolbar): Add custom spec.
+ (irchat-toolbar-toggle-crypt): Check irchat-use-toolbar.
+ (irchat-setup-toolbar): Ditto.
+
+1999-06-14 Daiki Ueno <ueno@ueda.info.waseda.ac.jp>
+
+ * Liece 1.3.2.
+
+ * irchat.el (irchat-define-keys): Rewrite.
+ (irchat-truncate-nickname): Rewrite; rename from irchat-read-nickname.
+
+ * irchat-handle.el, irchat-400.el, irchat-300.el, irchat-200.el,
+ irchat-000.el:
+ Declarations of hook variables are splitted into each file.
+
+ * irchat-300.el: Register 322 reply handler.
+
+1999-06-11 Daiki Ueno <ueno@ueda.info.waseda.ac.jp>
+
+ * irchat.el (irchat-dialogue-mode-map): Bind mouse-button-2 to
+ irchat-url-push-button.
+
+ * irchat-url.el (irchat-url-push-button): Check all overlays
+ around event point.
+
+ * irchat-filter.el (irchat-handle-message): Ignore errors which
+ occurs during hook evaluation.
+
+ * irchat-ctcp.el (irchat-ctcp-message): Ignore errors which
+ occurrs during hook evaluation.
+ (irchat-ctcp-notice): Likewise.
+ (irchat-ctcp-file-notice): Likewise.
+
+ * irchat-channel.el (irchat-channel-push-button): Use
+ irchat-overlays-at instead of overlays-at.
+
+1999-06-10 Daiki Ueno <ueno@ueda.info.waseda.ac.jp>
+
+ * irchat-hilight.el (irchat-quoted-colors-mirc):
+ Rename from irchat-quoted-colors.
+ (irchat-quoted-colors-ircle): New color table.
+ (irchat-highlight-maybe-hide-prefix): Fix regexp.
+ (irchat-highlight-colorize-quote): Check vender specific extension.
+
+ * irchat-channel.el (irchat-channel-push-button):
+ Check all overlays under the point.
+
+ * irchat-filter.el: Rename default backend name to "generic".
+
+ * irchat-handle.el: Use multiple values bindings.
+ (irchat-handle-notice-message): Fix argument against
+ irchat-ctcp-notice.
+
+ *irchat-misc.el (irchat-compose-time-string): Use
+ format-time-string. Now only accepts encoded time.
+
+ * irchat-misc.el (irchat-pick-buffer): Check if chnl is string and
+ apropriate buffer does not exist.
+ (irchat-pick-buffer-1): Do not return buffer list.
+
+1999-06-10 Daiki Ueno <ueno@unixuser.org>
+
+ * irchat.el (irchat-debug-mode-map): Abolish.
+ (irchat-debug-keys): Abolish.
+ (irchat-command-keys): Fix return key code.
+
+ * irchat-window.el (irchat-window-to-buffer):
+ Remove irchat-debug-buffer.
+
+ * irchat-vars.el (irchat-debug-mode-hook): Abolish.
+ (irchat-debug-prefix): Abolish.
+
+ * irchat-nick.el (irchat-nick-equal): New alias to string-ci-equal.
+ (irchat-nick-member): New function.
+ (irchat-command-toggle-nick-buffer-mode): Do not toggle when
+ irchat-nick-buffer has not been created.
+
+ * llhandler.el, irchat-modules.el (irchat-modules-to-compile):
+ Remove llhandler.
+
+ * irchat-misc.el (irchat-split-line): New function.
+ (irchat-split-rest): Abolish.
+ (irchat-with-split-rest): Abolish.
+ (irchat-maybe-update-channel-indicator): Do not use backquote.
+ (irchat-freeze-toggle): Use irchat-nick-equal.
+ (irchat-message-from-ignored): Rename from irchat-msg-from-ignored.
+
+ * irchat-message.el (irchat-message-parent-buffer):
+ Use irchat-nick-equal.
+
+ * irchat-make.el (compile-irchat): Add comments.
+
+ * irchat-intl.el (irchat-intl-prepare-prefix):
+ Do not treat irchat-debug-prefix.
+
+ * irchat-inlines.el (filter-elements): Move from irchat-compat.
+
+ * irchat-globals.el (irchat-debug-buffer): Remove.
+
+ * irchat-crypt.el (irchat-idea-encrypt-message-format): Rename from
+ irchat-idea-encrypt-msg-format.
+ (irchat-crypt-maybe-decrypt-message): Use irchat-nick-equal.
+
+ * irchat-compat.el: Require cl at load time.
+ (buffer-or-string-p): Remove.
+ (irchat-get-buffer-window): Enclose with eval-and-compile.
+ (irchat-get-buffer-window-list): Ditto.
+ (irchat-mode-line-buffer-identification): New alias to 'identity.
+ (mapvector): Remove.
+
+ * irchat-commands.el (irchat-command-debug): Abolished.
+ (irchat-command-join-channel): Use irchat-channel-equal.
+ (irchat-command-join): Use force-mode-line-update.
+ (irchat-command-private-conversation): Ditto.
+ (irchat-command-list): Check if 1st argument is empty string.
+ (irchat-command-who): Ditto.
+ (irchat-command-names): Ditto.
+ (irchat-command-mode+o): Use irchat-nick-member.
+
+ * irchat-channel.el (irchat-command-toggle-channel-buffer-mode):
+ Do not toggle when
+ irchat-channel-buffer has not been created.
+
+ * irchat-handle.el, irchat-filter.el, irchat-dcc.el,
+ irchat-ctcp.el, irchat-500.el, irchat-400.el, irchat-300.el,
+ irchat-200.el, irchat-000.el: Use llunf instead of llhandler.
+
+ * llunf.el: New file.
+
+ * idea.el, b64.el (>>): Move from irchat-compat.
+ (<<): Ditto.
+
+1999-06-06 Daiki Ueno <ueno@unixuser.org>
+
+ * irchat-misc.el (irchat-freeze-toggle): Use force-mode-line-update.
+ (irchat-own-freeze-toggle): Ditto.
+
+ * irchat-dcc.el: Require irchat-minibuf.el.
+ (irchat-command-dcc-send): Use
+ irchat-minibuffer-completing-default-read.
+ (irchat-command-dcc-chat-listen): Ditto.
+
+1999-06-04 Daiki Ueno <ueno@unixuser.org>
+
+ * irchat.el (irchat-override-command-keys): Add "\C-v" and "l".
+ (irchat-dialogue-keys): Remove "\C-v" and "\C-f".
+
+ * irchat.el (irchat-override-command-keys):
+ Add "\C-n", "\C-p" and "\C-a".
+ (irchat-dialogue-keys): Remove "\C-n" and "\C-p".
+
+ * irchat-nick.el (irchat-nick-set-user-at-host): New macro.
+ (irchat-nick-mark-as-apart): New macro.
+ (irchat-nick-unmark-as-apart): New macro.
+
+ * irchat-version.el (irchat-emacs-user-agent-value):
+ Ignore parenthesis in
+ `emacs-version' for XEmacs 21.2.15.
+
+1999-06-03 Daiki Ueno <ueno@unixuser.org>
+
+ * irchat-handle.el, irchat-dcc.el, irchat-500.el, irchat-300.el,
+ irchat-200.el: Do not check "strange" reply.
+
+ * irchat-message.el (irchat-message-parent-buffer):
+ Check if irchat-current-channel exists.
+
+ * irchat-coding.el: Do not require irchat-vars.
+
+ * irchat-menu.el (irchat-nick-popup-menu):
+ Enclose save-selected-window.
+
+ * irchat-misc.el (irchat-get-buffer-create): Do not use unless.
+
+ * irchat-nick.el (irchat-nick-change): Set chnl property internally.
+
+ * irchat-dcc.el (irchat-command-dcc-chat-listen):
+ Use irchat-get-buffer-create instead
+ of get-buffer-create.
+ (irchat-command-dcc-chat-connect): Ditto.
+ (irchat-dcc-compare-hostnames): Ditto.
+
+ * irchat-ctcp.el (irchat-file-start):
+ Use irchat-get-buffer-create instead of
+ get-buffer-create.
+ (irchat-file-cont): Ditto.
+ (irchat-file-end): Ditto.
+ (irchat-ctcp-client-notice): Ditto.
+
+ * irchat.el (irchat-open-server-internal):
+ Use irchat-get-buffer-create instead of
+ get-buffer-create.
+ (irchat-dialogue-setup-buffer): Ditto.
+ (irchat-others-setup-buffer): Ditto.
+ (irchat-channel-list-setup-buffer): Ditto.
+ (irchat-private-setup-buffer): Ditto.
+ (irchat-KILLS-setup-buffer): Ditto.
+
+1999-06-02 Daiki Ueno <ueno@unixuser.org>
+
+ * irchat-xemacs.el (irchat-xemacs-nick-popup-menu):
+ Remove save-excursion.
+
+ * irchat-channel.el (irchat-channel-push-button):
+ Remove save-excursion, just use save-selected-window instead.
+ (irchat-channel-real): Remove save-match-data.
+
+ * irchat.el (irchat-clear-system):
+ Check irchat-obarray has been initialized.
+
+ * Makefile.am (SOURCES): Add irchat-message.el and irchat-coding.el.
+ (EXTRA_DIST): Add liece.xbm.
+
+1999-06-02 Daiki Ueno <ueno@unixuser.org>
+
+ * Liece 1.3.1.
+
+ * irchat-url.el (url-irc-liece): New function.
+ [should be called from url-irc.el]
+
+ * Makefile.am (EXTRA_DIST): Add bitmap-stipple.
+
+1999-06-02 Daiki Ueno <ueno@unixuser.org>
+
+ * irchat-coding.el (irchat-detect-coding-region): New function.
+ (irchat-detect-coding-region-function): Use above.
+
+ * irchat-coding.el (irchat-detect-coding-string): New function.
+ (irchat-detect-coding-string-function): Use above.
+
+ * irchat-channel.el (irchat-channel-push-button):
+ Switch to channel list buffer.
+
+1999-06-02 Daiki Ueno <ueno@unixuser.org>
+
+ * irchat-nick.el (irchat-nick-update-region): Undo last change.
+
+ * irchat-menu.el (irchat-nick-popup-menu): Switch to nick buffer.
+
+ * irchat-filter.el: fix comments.
+ (irchat-filter): Split multiple lines without string matching.
+ (irchat-handle-message): Renamed from irchat-handle-message-2.
+ (irchat-parse-user-at-host): New function.
+
+ * irchat-coding.el (irchat-detect-coding-region-function): Renamed from
+ irchat-custom-detect-coding-region-function.
+ (irchat-detect-coding-string-function): Renamed from
+ irchat-custom-detect-coding-string-function.
+
+1999-06-01 Daiki Ueno <ueno@unixuser.org>
+
+ * irchat.el (irchat-command-mode): Do not use mapvector.
+
+ * irchat-handle.el (irchat-handle-notice-msg): Fix arguments against
+ with-irchat-decryption.
+ (irchat-handle-privmsg-msg): Likewise.
+
+ * irchat-commands.el (irchat-command-send-message): Fix arguments of
+ with-irchat-encryption.
+ (irchat-command-message): Likewise.
+
+ * irchat-crypt.el (irchat-crypt-maybe-decrypt-message):
+ Exchange car with cdr in arglist.
+ (with-irchat-encryption): Accept flat arglist.
+ (with-irchat-decryption): Likewise.
+
+ * irchat.el (irchat-nick-mode-map): Define as prefix commands.
+
+ * irchat.el (irchat-channel-mode): Eliminate channel indicator.
+ (irchat-others-mode): Likewise.
+ (irchat-dialogue-mode): Likewise.
+
+ * irchat-misc.el (irchat-set-channel-indicator):
+ Eliminate channel indicator.
+
+ * irchat-ctcp.el (irchat-ctcp-action-msg):
+ Use irchat-display-message.
+
+1999-06-01 Daiki Ueno <ueno@ueda.info.waseda.ac.jp>
+
+ * irchat-400.el: Remove redundancies on regexps.
+ (irchat-handle-432-msg) <ERR_ERRONEUSNICKNAME>: Rewrite.
+ (irchat-handle-433-msg) <ERR_NICKNAMEINUSE>: Resend NICK command only
+ if irchat-auto-iterate-nick is non-nil.
+
+ * irchat.el (irchat-command-keys): Add irchat-command-mode+o,
+ irchat-command-mode-o, irchat-command-mode+v, irchat-command-mode-v.
+ XXX: Should be prefixed commands?
+
+1999-05-31 Daiki Ueno <ueno@ueda.info.waseda.ac.jp>
+
+ * irchat-message.el (irchat-message-predicate):
+ Normalize irchat-message-blackets-predicate.
+
+ * irchat-inlines.el (irchat-eval-form): New function.
+
+ * irchat-message.el (irchat-message-predicate):
+ Rename specifier typep to type.
+
+ * irchat-misc.el (irchat-own-channel-message):
+ Bind irchat-message-direction 'outgoing.
+ (irchat-own-private-message): Ditto.
+
+ * irchat-message.el (irchat-message-tags): New variable.
+ (irchat-message-tags-function): New function.
+ (irchat-message-private-buffer): Abolished.
+ Use irchat-message-buffer-function.
+
+1999-05-31 Daiki Ueno <ueno@ueda.info.waseda.ac.jp>
+
+ * irchat-nick.el (irchat-nick-update-region):
+ Move opening save-excursion.
+
+ * irchat-channel.el (irchat-channel-push-button):
+ Move point to event ocurred position before calling
+ irchat-nick-update-region.
+
+ * irchat-nick.el (irchat-nick-update-region):
+ Remove argument event from arglist.
+
+ * irchat-menu.el (irchat-nick-popup-menu):
+ Move point to event ocurred position before calling
+ irchat-nick-update-region.
+
+ * irchat-xemacs.el (irchat-xemacs-setup-menu):
+ Remove argument event from arglist.
+ (irchat-xemacs-nick-popup-menu): Move point to event ocurred
+ position before calling irchat-nick-update-region.
+
+ * irchat.el: Use modern key sequence expression.
+ (irchat-command-map): New keymap which override
+ irchat-dialogue-keys with prefix command ("\C-c").
+ (irchat-friends-map): New keymap. [prefix command for friends]
+ (irchat-dialogue-keys): Import some useful command keys.
+
+ * irchat-channel.el (irchat-channel-parse-representation):
+ To remove let, construct representation object directly.
+
+ * irchat-channel.el (irchat-channel-list-insert): Remove format.
+
+ * irchat-vars.el: Do not require mcharset.
+
+ * irchat.el (irchat-nick-mode-map): Do not check xemacs.
+
+ * irchat-xemacs.el (irchat-nick-popup-menu): New alias to
+ irchat-xemacs-nick-popup-menu which override original one.
+
+ * irchat-compat.el: Use emu's mouse-button emulation.
+ (irchat-button2): Abolished.
+ (irchat-button3): Abolished.
+
+ * irchat-vars.el (irchat-variables-files): Do not load
+ `~/.irchat3_vars.el' at startup time.
+
+ * irchat-vars.el (irchat-debug-prefix): Clear.
+
+ * irchat.el: Do not check `set-face-stipple' is bound.
+ (irchat-x-splash): Add interactive spec.
+
+1999-05-30 Daiki Ueno <ueno@ueda.info.waseda.ac.jp>
+
+ * irchat.el (irchat-x-splash): Do centering.
+
+ * bitmap-stipple.el (bitmap-stipple-insert-pixmap):
+ Add optional argument center.
+
+ * liece.xbm: New file.
+
+ * irchat.el: Check if liece.xbm exists.
+
+ * irchat.el (irchat-stipple-pixmap): New variable.
+ (irchat-x-splash): New function.
+
+ * bitmap-stipple.el: New file.
+
+ * irchat-modules.el (irchat-modules-to-compile): Add bitmap-stipple.
+
+ * irchat-commands.el (irchat-command-send-action): Fix typo.
+
+ * irchat-hilight.el (irchat-highlight-font-lock-keywords):
+ Fix regexp.
+
+ * irchat-inlines.el (irchat-or): New function.
+ (irchat-and): New function.
+
+ * irchat-filter.el (irchat-handle-msg-msg): Abolished.
+
+ * irchat-crypt.el (irchat-message-encrypted-p): Move into
+ irchat-message.
+ (irchat-message-suspicious-p): Ditto.
+ (irchat-message-garbled-p): Ditto.
+ (irchat-message-fingerprint): Ditto.
+ (irchat-message-timestamp): Ditto.
+
+ * irchat-vars.el: All format strings are removed.
+ (irchat-format-string): Abolished.
+
+ * irchat-modules.el (irchat-modules-to-compile): Add
+ irchat-message.
+
+ * irchat-dcc.el (irchat-dcc-chat-filter): Use
+ irchat-display-message.
+
+ * irchat-commands.el (irchat-command-send-action):
+ Bind irchat-message-type.
+
+ * irchat-handle.el (irchat-handle-privmsg-msg):
+ Use irchat-display-message.
+ (irchat-handle-privmsglike-msg): Abolished.
+
+ * irchat-misc.el (irchat-own-channel-message):
+ Use irchat-display-message.
+ (irchat-own-private-message): Likewise.
+
+ * irchat-message.el: New file.
+
+1999-05-29 Daiki Ueno <ueno@ueda.info.waseda.ac.jp>
+
+ * irchat.el, irchat-vars.el (irchat-before-kill-emacs-hook): New hook.
+
+1999-05-29 Daiki Ueno <ueno@ueda.info.waseda.ac.jp>
+
+ * irchat-vars.el (irchat-signoff-message):
+ Renamed from irchat-signoff-msg.
+
+ * irchat.el (irchat-obarray-size): Moved from irchat-globals.el.
+
+ * irchat-globals.el: Remove obsolete variables.
+
+ * irchat-ctcp.el (irchat-client-error-message):
+ Moved from irchat-globals.el.
+
+ * irchat-commands.el (irchat-save-variables-are-dirty): Renamed
+ from irchat-save-vars-is-dirty.
+ (irchat-command-send-action): Add prefix.
+
+ * irchat-400.el (irchat-nickname-last): Renamed from
+ irchat-old-nickname.
+
+ * irchat-000.el (irchat-servername): Abolished.
+
+1999-05-28 Daiki Ueno <ueno@ueda.info.waseda.ac.jp>
+
+ * irchat-crypt.el: Do not require 'idea.
+
+ * irchat-commands.el (irchat-command-message): Treat channel target.
+
+ * irchat-300.el (irchat-handle-317-msg) <RPL_WHOISIDLE>:
+ Add argument rest to match-string.
+
+1999-05-28 Daiki Ueno <ueno@ueda.info.waseda.ac.jp>
+
+ * Liece 1.2.8.25.
+
+ * irchat.el (irchat-command-keys): Do not bind lisp-complete-symbol.
+
+ * irchat-commands.el (irchat-command-load-vars): Enclose body with
+ unwind-protect.
+ (irchat-command-complete): Use irchat-minibuffer-finalize-completion.
+ (get-word-left): Abolished.
+ (irchat-switch-to-channel-1): New function.
+ (irchat-switch-to-channel): Use irchat-switch-to-channel-1.
+ (irchat-switch-to-channel-no): Likewise.
+ (irchat-command-message): Check crypt-type.
+
+ * irchat-minibuf.el (irchat-minibuffer-complete-channel-modes):
+ Complete ban patterns.
+ (irchat-minibuffer-parse-modes): Rename property 'uah to 'ban.
+
+ * irchat-handle.el (irchat-handle-mode-msg):
+ Use irchat-channel-set-ban.
+
+ * irchat-channel.el (irchat-channel-add-ban): New macro.
+ (irchat-channel-remove-ban): New macro.
+ (irchat-channel-set-ban): New macro.
+ (irchat-channel-get-bans): New function.
+
+ * irchat-300.el:
+ (irchat-handle-317-msg) <RPL_WHOISIDLE>: Remove condtionals for
+ obsolete servers. [2.5 or 2.6].
+ (irchat-handle-367-msg) <RPL_BANLIST>: Treat it as generic long
+ reply handler.
+ (irchat-367-channel): New variable.
+ (irchat-367-regexps): New variable.
+ (irchat-handle-368-msg) <RPL_ENDOF_BANLIST>: Save ban patterns as
+ 'ban property.
+
+1999-05-26 Daiki Ueno <ueno@ueda.info.waseda.ac.jp>
+
+ * irchat.el (irchat-clear-system):
+ Use dotimes when initializing irchat-obarray.
+
+1999-05-26 Daiki Ueno <ueno@ueda.info.waseda.ac.jp>
+
+ * irchat.el (irchat-command-keys):
+ Bind irchat-command-display-friends.
+
+ * irchat-commands.el (irchat-command-display-friends): New command.
+
+ * irchat-vars.el (irchat-display-friends-function): New variable.
+
+ * irchat-300.el (irchat-303-display-friends): New function.
+ (irchat-303-display-all-friends): New function.
+
+ * irchat-minibuf.el (irchat-minibuffer-complete-channel-modes):
+ Complete nickname using operators and voices.
+ (irchat-minibuffer-parse-modes): Likewise.
+ (irchat-minibuffer-finalize-completion): Notice no match found.
+
+ * Makefile.am: New file.
+
+1999-05-25 UENO Daiki <daiki@kiss.kake.info.waseda.ac.jp>
+
+ * irchat.el (irchat-others-mode): Set parent mode explicitly.
+ (irchat-channel-mode): Ditto.
+
+1999-05-24 Daiki Ueno <ueno@ueda.info.waseda.ac.jp>
+
+ * irchat-minibuf.el (irchat-minibuffer-parse-modes): Parse ban
+ pattern.
+
+ * irchat-200.el (irchat-handle-206-msg) <RPL_TRACESERVER>:
+ Use multiline display format.
+ (irchat-handle-214-msg) <RPL_STATSNLINE>: Likewise.
+ (irchat-handle-213-msg) <RPL_STATSCLINE>: Likewise.
+
+ * irchat-ctcp.el (irchat-client-insert): Quote format string.
+
+1999-05-23 Daiki Ueno <ueno@ueda.info.waseda.ac.jp>
+
+ * Liece 1.2.8.24.
+
+ * irchat-ctcp.el (irchat-minibuffer-complete-client-query): Use
+ `irchat-minibuffer-finalize-completion'.
+
+ * irchat-minibuf.el (irchat-minibuffer-finalize-completion): New
+ function.
+ (irchat-minibuffer-complete-channel-modes): Use above.
+
+ * irchat.el (irchat-check-buffers): Fix loop condition.
+
+1999-05-23 Daiki Ueno <ueno@ueda.info.waseda.ac.jp>
+
+ * irchat-dcc.el (irchat-dcc-message): New function.
+
+ * irchat-nick.el (irchat-nick-join-1): Check dups.
+
+ * irchat-ctcp.el (irchat-client-insert): New function.
+
+ * irchat-commands.el (irchat-command-prepare-message-prefix):
+ Abolished.
+ (irchat-command-prepare-own-message-prefix): Ditto.
+
+ * irchat-misc.el (irchat-own-private-message): Generate prefix
+ string automatically.
+ (irchat-own-channel-message): Likewise.
+
+1999-05-22 Daiki Ueno <ueno@ueda.info.waseda.ac.jp>
+
+ * irchat-compat.el (run-hook-with-args-until-success): Abolished.
+
+ * irchat.el (irchat-command-mode): Change mode-line-format.
+ (irchat-open-server): Save password.
+ (irchat-insert-internal): Rewrite.
+
+ * irchat-200.el (irchat-handle-215-msg) <RPL_STATSILINE>:
+ Fix regexp.
+ (irchat-handle-242-msg) <RPL_STATSUPTIME>: Cut off preceding `:'.
+ (irchat-handle-205-msg) <RPL_TRACEUSER>: Fix typo.
+ (irchat-handle-218-msg) <RPL_STATSYLINE>: Fix display format.
+
+1999-05-13 Daiki Ueno <daiki@kiss.kake.info.waseda.ac.jp>
+
+ * irchat-inlines.el (format-quote): Abolished.
+
+ * irchat-ctcp.el (irchat-ctcp-action-msg): Pass arguments to
+ PRIVMSG handler.
+
+ * irchat-hilight.el (irchat-highlight-turn-on-font-lock): Make
+ `after-change-hook' local.
+
+1999-05-12 sphere <sphere@pop12.odn.ne.jp>
+
+ * irchat-url.el (irchat-command-browse-url): Fix typo.
+
+1999-05-11 Daiki Ueno <daiki@kiss.kake.info.waseda.ac.jp>
+
+ * irchat-crypt.el (irchat-command-set-default-key): Fix typo.
+
+ * irchat-window.el (irchat-command-set-window-style): Fix typo.
+
+ * irchat-url.el (irchat-command-browse-url): Fix typo.
+
+ * irchat-channel.el (irchat-channel-set-voice): Quote regexp.
+
+1999-05-09 Daiki Ueno <daiki@kiss.kake.info.waseda.ac.jp>
+
+ * irchat-ctcp.el (irchat-command-client-time): Fix typo.
+
+ * irchat.el (irchat-channel-mode): Explicitly define as
+ it derives from `irchat-dialogue-mode'.
+ (irchat-others-mode): Ditto.
+
+ * irchat-compat.el (irchat-kill-all-overlays): New function.
+
+ * irchat-nick.el (irchat-nick-update): Do not switch to buffer.
+ (irchat-nick-join): Do not check whether nickname has been inserted.
+ (irchat-nick-update): Kill all overlays.
+
+ * irchat-mail.el: Follow the value of `mail-user-agent'.
+ (irchat-mail-pop-to-buffer): Abolished.
+ (irchat-mail-compose-with-mail): Abolished.
+ (irchat-mail-compose-with-gnus): Abolished.
+
+ * irchat-inlines.el (nth1, nth1cdr):Abolished.
+ (matching-substring): Abolished.
+ (irchat-greater-flags): Abolished.
+
+1999-05-08 Daiki Ueno <daiki@kiss.kake.info.waseda.ac.jp>
+
+ * irchat-300.el (irchat-353-scan-channels): New macro.
+
+ * irchat-minibuf.el (irchat-minibuffer-completing-default-read):
+ Renamed from `irchat-completing-default-read'.
+ (irchat-minibuffer-completing-sequential-read): Renamed from
+ `irchat-completing-sequential-read'.
+
+ * irchat-channel.el (irchat-channel-set-operator-1): Renamed from
+ `irchat-set-channel-operator' within irchat-misc.el.
+ Restrict its use to internal only.
+ (irchat-channel-set-voice-1): Likewise.
+
+ * irchat-commands.el (irchat-command-wait): Abolished.
+
+ * irchat-nick.el (irchat-nick-update): Assume that the 2nd
+ argument CHNL is one of channels we've already joined.
+
+ * irchat-misc.el (irchat-change-nick-of): Change nicks, opers and
+ voices properties properly.
+ (irchat-change-nick-of-1): New function. Modify nick alist by
+ side effect.
+ (irchat-change-nick-of-2): New function which resembles above,
+ but it acts on singular list.
+ (irchat-greet-user): Abolished.
+ (irchat-user-on-my-channel): Abolished.
+ (irchat-user-on-this-channel): Abolished.
+
+ * irchat-handle.el (irchat-handle-channel-msg): Do not use
+ `irchat-change-nick-of' directly.
+ (irchat-handle-nick-msg): Likewise.
+ (irchat-handle-quit-msg): Likewise.
+
+1999-05-07 Daiki Ueno <daiki@kiss.kake.info.waseda.ac.jp>
+
+ * irchat-commands.el (irchat-command-nickname): Do not set
+ `irchat-real-nickname'.
+
+1999-05-06 Daiki Ueno <daiki@kiss.kake.info.waseda.ac.jp>
+
+ * Liece 1.2.8.23.
+
+ * irchat-hilight.el (irchat-quoted-colors): New variable.
+ (irchat-highlight-colorize-quote): New function.
+ (irchat-highlight-turn-on-font-lock): Add buffer locality to
+ some members of `after-change-hook'.
+
+ * Makefile (install): Do not depend on `dcc'.
+
+1999-05-05 Daiki Ueno <daiki@kiss.kake.info.waseda.ac.jp>
+
+ * irchat-handle.el (irchat-handle-part-msg): Call
+ `irchat-channel-part' and `irchat-nick-part' exclusively.
+ (irchat-handle-kick-msg): Likewise.
+
+ * irchat-channel.el (irchat-channel-equal): New alias.
+ (irchat-channel-member): Renamed from `irchat-channel-memberp'.
+ (irchat-channel-join-internal): New function.
+ (irchat-channel-part-internal): New function.
+
+ * irchat-ctcp.el (irchat-ctcp-client-msg): Fix reply string.
+
+ * irchat-minibuf.el (irchat-minibuffer-parse-modes): Completion
+ fixed for ban pattern.
+
+ * irchat-nick.el (irchat-nick-normalize): New macro.
+ (irchat-nick-strip): New macro.
+ (irchat-nick-parse-nick-after): New function.
+
+ * irchat-handle.el (irchat-handle-silence-msg): New handler.
+
+1999-05-04 Daiki Ueno <daiki@kiss.kake.info.waseda.ac.jp>
+
+ * irchat-handle.el (irchat-handle-part-msg): Fix quotation of part
+ message.
+
+ * irchat-400.el: Fix unconsistent user data returned from pirc.
+ (irchat-handle-442-msg): `ERR_NOTONCHANNEL'.
+ (irchat-handle-443-msg): `ERR_USERONCHANNEL'.
+
+ * irchat-misc.el (irchat-update-thischannel): Abolished.
+
+ * irchat-commands.el (irchat-channel-virtual): Save matched data.
+ (irchat-channel-real): Likewise.
+
+ * irchat-300.el (irchat-handle-364-msg): `RPL_LINKS'. Fix regexp.
+ (irchat-handle-333-msg): New hander for `RPL_TOPICWHOTIME'.
+ (irchat-handle-namereply-msg): Abolished.
+ (irchat-handle-whoreply-msg): Abolished.
+
+ * irchat-000.el (irchat-handle-005-msg): `RPL_MAP'.
+ Support for ircu server mapping facility.
+ (irchat-handle-006-msg): New handler for `RPL_MAPMORE'.
+ (irchat-handle-007-msg): New handler for `RPL_MAPEND'.
+
+1999-05-03 Daiki Ueno <daiki@kiss.kake.info.waseda.ac.jp>
+
+ * irchat-handle.el (irchat-handle-part-msg): Handle left message.
+
+ * irchat-custom.el (irchat-connection-timeout): New variable.
+
+ * irchat.el (irchat-accept-response): Add optional arg timeout.
+ (irchat-accept-process-output): New function.
+ (irchat-clear-system): Reset `irchat-timers-list-initialized-p'.
+ (irchat-initialize-timers): Fix secs parameter.
+
+ * irchat-xemacs.el (irchat-xemacs-run-at-time): New function.
+
+ * irchat-compat.el (irchat-run-at-time): New alias.
+ (irchat-cancel-timer): New alias.
+
+ * irchat-commands.el (irchat-command-start-ison-timer): Abolished.
+ (irchat-command-cancel-ison-timer): Abolished.
+
+ * irchat-timer.el: Removed.
+\f
+1999-04-29 Daiki Ueno <daiki@kiss.kake.info.waseda.ac.jp>
+
+ * irchat.el (irchat-initialize-timers): New function.
+
+ * irchat-q-ccl.el (irchat-quote-ccl-decode-region): New function.
+ (irchat-quote-ccl-encode-region): New function.
+
+ * irchat-q-el.el (irchat-quote-el-decode-region): New function.
+ (irchat-quote-el-encode-region): New function.
+
+ * irchat-ctcp.el (irchat-complete-client): New macro.
+ (irchat-complete-query): New macro.
+ (irchat-command-client-time): New command.
+ (irchat-ctcp-client-msg): Rename each *-msg-hook to *-hook.
+ (irchat-minibuffer-complete-client-query): New function.
+
+ * irchat-commands.el (irchat-command-activate-friends): Fix
+ completion.
+
+ * irchat-compat.el (filter-elements): Add `lisp-indent-function'
+ property with value 2.
+
+1999-04-28 Daiki Ueno <daiki@kiss.kake.info.waseda.ac.jp>
+
+ * irchat-dcc.el (irchat-dcc-object): Implement as cl-struct.
+
+ * irchat-compat.el (irchat-static-require): New macro.
+ (irchat-static-require-if): New macro.
+ (irchat-static-defun-if): New macro.
+
+ * Liece 1.2.8.22.
+
+1999-04-27 Daiki Ueno <daiki@kiss.kake.info.waseda.ac.jp>
+
+ * README-styles.ja, TODO.ja, sample.dot.liece.ja: Removed.
+
+1999-04-26 Daiki Ueno <daiki@kiss.kake.info.waseda.ac.jp>
+
+ * irchat-inlines.el: Require irchat-setup.
+
+ * irchat-x-face.el: Use `static.el'.
+
+ * irchat-handle.el (irchat-handle-join-msg): Set user-at-host
+ information after calling `irchat-nick-join'.
+
+ * irchat-globals.el (irchat-default-channel-candidate): New
+ variable.
+
+1999-04-22 Daiki Ueno <daiki@kiss.kake.info.waseda.ac.jp>
+
+ * irchat-handle.el (irchat-handle-324-msg): Fix regexp.
+
+1999-04-16 Daiki Ueno <ueno@bleu.ueda.info.waseda.ac.jp>
+
+ * irchat-xemacs.el: Add hooks to hide modelines.
+
+1999-04-12 Daiki Ueno <ueno@bleu.ueda.info.waseda.ac.jp>
+
+ * irchat.el (irchat-refresh-windows): New function.
+
+ * irchat-300.el: Remove all occurrences of `matching-substring'.
+ (irchat-handle-352-msg): Do not pick-up channel buffer.
+
+ * irchat-config.el, irchat-modules.el: New files.
+
+1999-04-07 Daiki Ueno <daiki@kiss.kake.info.waseda.ac.jp>
+
+ * irchat.el (irchat-switch-to-channel-no-*): Use `dotimes' on the
+ definitions of themselves.
+
+ * irchat-vars.el (irchat-ignore-spec-convert): Fix tag.
+
+1999-04-06 Daiki Ueno <daiki@kiss.kake.info.waseda.ac.jp>
+
+ * dcc.c (send_file): Use `get_address_externally'.
+ (chat_listen): Likewise.
+
+1999-04-05 Daiki Ueno <daiki@kiss.kake.info.waseda.ac.jp>
+
+ * getaddrinfo.c: Include `stdlib.h'.
+
+1999-04-04 Daiki Ueno <daiki@kiss.kake.info.waseda.ac.jp>
+
+ * Liece 1.2.8.21.
+
+ * irchat-handle.el (irchat-handle-mode-msg): Fix channel mode parser.
+
+ * irchat-commands.el (irchat-command-ban-kick): New command.
+ (irchat-command-ban): New command.
+
+ * irchat-ctcp.el (irchat-ctcp-version-msg): Eliminate the client
+ version string.
+ (irchat-client-version-notice): Fix regexp.
+ (irchat-client-version-insert): New function.
+
+ * irchat-misc.el (irchat-repair-crlf): Fixed.
+
+1999-04-01 Daiki Ueno <daiki@kiss.kake.info.waseda.ac.jp>
+
+ * tcp.c (NI_MAXHOST): Add check if it has been already defined.
+
+ * irchat.el (irchat-command-keys): Bind `C-c C-j'.
+\f
+1999-03-31 Daiki Ueno <daiki@kiss.kake.info.waseda.ac.jp>
+
+ * irchat-handle.el (irchat-handle-mode-msg): Fix regexp.
+
+ * irchat-commands.el (irchat-command-finger): Add prefix arg.
+
+1999-03-30 Daiki Ueno <daiki@kiss.kake.info.waseda.ac.jp>
+
+ * irchat-filter.el (irchat-handle-message): Fix regexp.
+
+ * irchat-handle.el (irchat-handle-join-msg): Fix regexp.
+ (irchat-handle-nick-msg): Fix regexp.
+
+1999-03-24 Daiki Ueno <daiki@kiss.kake.info.waseda.ac.jp>
+
+ * irchat-commands.el (irchat-command-finger): Specify nick twice.
+
+ * liece-faq.texinfo: Fix URI of APEL's ftp sites.
+
+1999-03-17 Daiki Ueno <daiki@kiss.kake.info.waseda.ac.jp>
+
+ * Liece 1.2.8.20.
+
+ * irchat-crypt.el (with-irchat-encryption): New macro.
+ (with-irchat-decryption): New macro.
+
+ * irchat-compat.el (valid-plist-p): Fixed.
+
+ * irchat-tcp.el (irchat-tcp-default-connection-type): Renamed from
+ `irchat-tcp-connection-type'.
+ (irchat-open-network-stream-as-binary): Add optional arg `type'.
+ (irchat-open-network-stream): Likewise.
+
+ * irchat-vars.el (irchat-server-alist): Add `:prescript' and
+ `:type' keywords.
+
+1999-03-16 Daiki Ueno <daiki@kiss.kake.info.waseda.ac.jp>
+
+ * irchat-compat.el: Require `pcustom'.
+ (point-at-bol): Abolished. Use `line-beginning-position'.
+ (point-at-eol): Abolished. Use `line-end-position'.
+
+ * tcp.c: New file.
+
+ * irchat-tcp.el: New file; TCP/IP emulation using external program.
+
+ * irchat-compat.el (read-passwd): New function to keep compatibility.
+ (passwd-echo): New variable to keep compatibility.
+
+ * irchat-commands.el (irchat-command-who): Confirm really send WHO
+ command with no arguments.
+ (irchat-command-list): Likewise.
+ (irchat-command-names): Likewise.
+
+ * irchat-misc.el (irchat-set-crypt-indicator): Activate crypt mode
+ also in private mode.
+ (irchat-read-passwd): Abolished. Use `read-passwd'.
+
+ * irchat-crypt.el (irchat-crypt-maybe-encrypt-message): Renamed
+ from `irchat-crypt-with-encrypt-message'.
+ (irchat-crypt-maybe-decrypt-message): Likewise.
+
+1999-03-15 Daiki Ueno <daiki@kiss.kake.info.waseda.ac.jp>
+
+ * irchat-handle.el (irchat-handle-join-msg): Fix regexp.
+
+ * irchat-hilight.el (irchat-highlight-maybe-hide-quote): Fixed.
+
+1999-03-14 Daiki Ueno <daiki@kiss.kake.info.waseda.ac.jp>
+
+ * Liece 1.2.8.19.
+
+ * irchat-commands.el (irchat-command-poll-names): Check if
+ `irchat-server-opened' returns t.
+ (irchat-command-poll-friends): Likewise.
+
+ * irchat-hilight.el (irchat-highlight-turn-on-font-lock): Remove
+ all hooks before calling `turn-on-font-lock'.
+
+ * irchat-compat.el (run-hook-with-args-until-success): Do not use
+ `run-hook-with-args'.
+
+ * irchat-filter.el (irchat-handle-message-2): Use
+ `run-hook-with-args-until-success' instead of
+ `run-hook-with-args'.
+
+ * irchat-handle.el (irchat-handle-with-running-cleartext-hook):
+ Use `run-hook-with-args-until-success' instead of
+ `run-hook-with-args'.
+ (irchat-handle-run-cleartext-hook): Likewise.
+ (irchat-handle-run-hook-with-args): Likewise.
+
+ * irchat-timer.el (irchat-start-timer): Use `run-at-time' with 1st
+ argument 0 instead of nil.
+
+ * irchat-ctcp.el (irchat-query-client-nick-maybe-change): Return
+ with nil explicitly.
+
+ * irchat-vars.el (irchat-service-spec): New widget.
+ (irchat-service-spec-convert): New function; widget-converter.
+ (irchat-server-spec): New widget.
+ (irchat-server-spec-convert): New function; widget-converter.
+ (irchat-ignore-spec): New widget.
+ (irchat-ignore-spec-convert): New function; widget-converter.
+
+ * irchat-url.el (irchat-command-browse-url): Use the URL added
+ most recently, if `current-prefix' equals `-'.
+ (irchat-url-browser-netscape): Do not bind the process buffer.
+
+ * irchat-menu.el (irchat-menu-add-button): Add 3rd argument.
+
+1999-03-13 Daiki Ueno <daiki@kiss.kake.info.waseda.ac.jp>
+
+ * irchat-xemacs.el: Use extents instead of overlays.
+ (irchat-xemacs-put-text-property): New function.
+ (irchat-xemacs-get-text-property): New function.
+ (irchat-xemacs-kill-all-overlays): New function.
+ (irchat-xemacs-overlays-at): New function.
+
+ * irchat-compat.el (irchat-make-overlay): New emulation function.
+ (irchat-delete-overlay): Ditto.
+ (irchat-overlay-put): Ditto.
+ (irchat-move-overlay): Ditto.
+ (irchat-overlay-end): Ditto.
+ (irchat-overlay-get): Ditto.
+ (irchat-overlays-at): Ditto.
+ (irchat-kill-all-overlays): Ditto.
+
+1999-03-12 Daiki Ueno <daiki@kiss.kake.info.waseda.ac.jp>
+
+ * irchat-xemacs.el (irchat-toolbar-toggle-crypt): New function.
+ (irchat-toolbar-icon-convert): New function; widget-converter.
+ (irchat-toolbar-icon): New widget.
+ (irchat-toolbar-icon-plist-get): New function.
+ (irchat-toolbar-map-button-list): New function.
+ (irchat-xemacs-setup-toolbar): Renamed from
+ `irchat-xemacs-setup-toolbar-list'.
+ (irchat-toolbar-setup-crypt-glyph): New function.
+ (irchat-toolbar-toggle-crypt): New function.
+ (irchat-use-toolbar): New customizable variable.
+
+ * irchat-compat.el (irchat-put-text-property): Implemented as
+ function.
+
+ * irchat.el (irchat-after-load-startup-hook): New hook variable.
+
+ * irchat-hilight.el (irchat-highlight-maybe-turn-on-font-lock):
+ New function.
+
+ * Liece 1.2.8.18.
+
+ * irchat-channel.el (irchat-channel-create-buffer): Use
+ `irchat-format-time-function'.
+
+ * irchat-hilight.el: Use font-lock.el.
+
+1999-03-11 Daiki Ueno <daiki@kiss.kake.info.waseda.ac.jp>
+
+ * irchat-debug.el (irchat-debug-enter-handler): Moved from
+ llhandler.el.
+ (irchat-debug-leave-handler): Ditto.
+
+ * llhandler.el (llhandler-debug-enter): Abolished.
+ (llhandler-debug-leave): Abolished.
+
+ * irchat-version.el (irchat-emacs-user-agent-value): New variable
+ imported from `mime-edit-user-agent-value' of SEMI.
+ (irchat-user-agent-value): New variable.
+ (irchat-make-user-agent-string): Abolished.
+ (irchat-make-emacs-user-agent-string): Abolished.
+ (irchat-command-version): New command.
+
+ * irchat-hilight.el (irchat-maybe-highlight-region): New function.
+ (irchat-maybe-smiley-region): New function.
+ (irchat-maybe-highlight-url-region): New function.
+ (irchat-highlight-put-url-properties-region): New function.
+
+ * irchat-ctcp.el: Add hooks in order to let
+ `irchat-query-client-nick' follow the changes.
+ (irchat-query-client-nick-maybe-change): New function.
+ (irchat-query-client-nick-maybe-reset): New function.
+
+ * irchat-url.el (irchat-url-gather-hook): New hook variable.
+ (irchat-command-browse-url): Use `_'.
+ (irchat-url-gather-urls-region): New function.
+ (irchat-url-search-forward): New function.
+
+ * irchat-compat.el (easy-menu-add-item): New alias.
+
+ * irchat-xemacs.el (easy-menu-add-item): New advice.
+
+1999-03-10 Tsunehiko Baba <tbaba@mtl.t.u-tokyo.ac.jp>
+
+ * dcc.c (main): Add cast against return value of basename(3).
+
+1999-03-10 Daiki Ueno <daiki@kiss.kake.info.waseda.ac.jp>
+
+ * irchat-menu.el (irchat-menu-url-menu): New variable.
+
+ * Liece 1.2.8.17.
+
+ * irchat-misc.el (irchat-compose-time-string): Renamed from
+ `irchat-compose-servertimestring'.
+
+ * irchat-compat.el (plist-get): New function for compatibility.
+
+ * irchat-ctcp.el (irchat-client-time-notice): New handler.
+ (irchat-ctcp-time-msg): Ditto.
+
+ * irchat-minibuf.el (irchat-minibuffer-complete-channel-modes):
+ Also display candidates when `irchat-minibuffer-parse-modes'
+ returns 'flag.
+
+ * irchat-400.el (irchat-handle-433-msg): `ERR_NICKNAMEINUSE'.
+ Do grow-tail iteration on `irchat-real-nickname' only if
+ `irchat-auto-iterate-nick' is specified.
+
+ * irchat-vars.el (irchat-server-alist): Enable to specify keywords
+ (:host, :service, :password, etc.).
+ (irchat-auto-iterate-nick): New customizable variable.
+
+ * irchat-menu.el (irchat-menu-add-url): New function.
+ (irchat-command-mode-url-menu): New menu entry.
+
+ * irchat.el (irchat): Do not ping to server.
+ (irchat-open-server): Use new format of `irchat-server-alist'.
+
+1999-03-02 Daiki Ueno <daiki@kiss.kake.info.waseda.ac.jp>
+
+ * irchat-handle.el (irchat-handle-privmsglike-msg): Define as subst.
+
+ * irchat-make.el (install-just-print-p): New function
+ imported from APEL 9.13's `APEL-MK'.
+ (config-irchat-package): Likewise.
+ (compile-irchat-package): Likewise.
+ (install-irchat-package): Likewise.
+ (install-update-package-files): Likewise.
+ (make-irchat-sample-files): New function imported from packaged
+ version of Liece.
+ (make-irchat-info-files): Ditto.
+
+ * irchat-300.el (irchat-handle-366-msg): Do not update nicks when
+ `irchat-353-nameslist' holds no element.
+
+1999-03-01 Daiki Ueno <daiki@kiss.kake.info.waseda.ac.jp>
+
+ * irchat-handle.el (irchat-handle-quit-msg,
+ irchat-handle-mode-msg, irchat-handle-join-msg,
+ irchat-handle-part-msg): Quote regexp.
+
+1999-02-28 Daiki Ueno <daiki@kiss.kake.info.waseda.ac.jp>
+
+ * irchat.el (irchat-clear-system): Fix backquotes.
+
+1999-02-25 Daiki Ueno <daiki@kiss.kake.info.waseda.ac.jp>
+
+ * irchat-300.el (irchat-handle-303-msg): Fix. Add check for empty
+ reply.
+
+1999-02-24 Daiki Ueno <daiki@kiss.kake.info.waseda.ac.jp>
+
+ * irchat-handle.el (irchat-handle-notice-msg): Fix. Call handler
+ with `funcall'.
+
+ * irchat.el (irchat-channel-mode-map): Make keymap as sparse.
+ (irchat-others-mode-map): Likewise.
+
+ * irchat-commands.el (irchat-command-deactivate-friends):
+ Fix argument.
+
+ * Liece 1.2.8.16.
+
+ * irchat-globals.el (irchat-who-expression): New variable.
+
+ * irchat-misc.el (irchat-toggle-command-buffer-mode): Change
+ `irchat-private-indicator'.
+
+ * irchat-300.el (irchat-handle-315-msg): `RPL_ENDOFWHO'.
+ Display `no matches found' message
+ (irchat-handle-{322,323,353,366}-msg): Count iterations.
+
+ * irchat.el (irchat-command-mode): Do not save
+ `frame-title-format' twice. Use `irchat-current-channel' in place
+ of `irchat-channel-indicator'.
+
+ * llhandler.el (llhandler-debug-enter): New function.
+ (llhandler-debug-leave): New function.
+ (llhandler-define-handler): New macro.
+ (llhandler-eval-args): Abolished.
+
+ * irchat-crypt.el (irchat-encrypt-message): Encode messages.
+ (irchat-decrypt-message): Likewise. Decode messages.
+ (irchat-crypt-with-encrypted-message): Do not encode message which
+ has type `cleartext'.
+
+1999-02-23 Daiki Ueno <daiki@kiss.kake.info.waseda.ac.jp>
+
+ * irchat-misc.el (irchat-send-pong): New macro.
+ (irchat-increment-long-reply-count): New macro.
+ (irchat-reset-long-reply-count): New macro.
+ (irchat-check-long-reply-count): New macro.
+
+ * irchat-globals.el (irchat-long-reply-count) New variable.
+ (irchat-long-reply-max): New variable.
+
+ * irchat-commands.el (irchat-command-save-vars): Fix. Set marker
+ at output position.
+
+1999-02-21 Daiki Ueno <daiki@kiss.kake.info.waseda.ac.jp>
+
+ * irchat-300.el (irchat-handle-303-msg): Add differential IsON.
+
+ * irchat-commands.el (irchat-command-start-ison-timer,
+ irchat-command-cancel-ison-timer, irchat-command-activate-friends,
+ irchat-command-deactivate-friends): Do completion case
+ insensitively.
+
+ * irchat-vars.el (irchat-saved-forms): Add symbol `irchat-friends'
+ to be saved its value.
+
+1999-02-20 Daiki Ueno <daiki@kiss.kake.info.waseda.ac.jp>
+
+ * Liece 1.2.8.15.
+
+ * irchat-filter.el (irchat-sentinel): Do not throw signal, just
+ clear whole system.
+ (irchat-sentinel-error): Ditto.
+
+ * irchat-vars.el (irchat-friends): New user customizable variable.
+ (irchat-poll-friends-interval): New user customizable variable.
+ (irchat-poll-names-interval): New user customizable variable.
+
+ * irchat-commands.el (irchat-command-poll-names): Renamed from
+ `irchat-command-pollnames'; implemented as function.
+ (irchat-command-keepalive): Implemented as function.
+ (irchat-command-poll-friends): New function.
+ (irchat-command-activate-friends): New command.
+ (irchat-command-deactivate-friends): New command.
+
+ * irchat-300.el (irchat-handle-331-msg): Call
+ `irchat-set-channel-indicator'.
+ (irchat-handle-332-msg): Ditto.
+
+ * irchat-globals.el (irchat-channel-status-indicator): New
+ variable; default value of `frame-title-format'.
+ (irchat-friends-last): New variable.
+ (irchat-frame-title-format-last): New variable.
+
+ * irchat-misc.el (irchat-set-frame-title-format): Do not calculate
+ `frame-title-format' directly.
+ (irchat-maybe-update-channel-indicator): New macro.
+
+1999-02-20 P.F.FrontJr. <pff@softai.co.jp>:
+
+ * irchat-misc.el (irchat-set-channel-indicator): Display channel
+ status on mode line.
+
+ * irchat-vars.el (irchat-display-status-on-channel-indicator):
+ New user customizable variable.
+
+1999-02-15 Daiki Ueno <daiki@kiss.kake.info.waseda.ac.jp>
+
+ * irchat.el (irchat-read-variables-files): Set alternative
+ startup file as primary one.
+
+ * irchat-timer.el (irchat-start-timer): Do not require `timer' or
+ `itimer'; autoload timer functions.
+ (irchat-cancel-timer): Ditto.
+
+1999-02-14 Daiki Ueno <daiki@kiss.kake.info.waseda.ac.jp>
+
+ * irchat-ck-ccl (irchat-ck-ccl): Remove.
+ (irchat-ck-ccl-cj-to-ck-string): Use `ccl-execute-on-string'.
+ (irchat-ck-ccl-ck-to-cj-string): Ditto.
+
+ * irchat-xemacs.el (irchat-xemacs-setup-toolbar): New function.
+
+ * irchat-menu.el (irchat-command-add-menus): New function; add
+ menubar menus explicitly.
+
+ * irchat-coding.el (irchat-coding-custom-detect-coding-region):
+ New variable; set user customizable function to detect coding system.
+ (irchat-coding-custom-detect-coding-string): Likewise.
+ (irchat-detect-coding-string-tcljp): Transported from
+ `tclKanjiUtil.c'; trivial encoding detection routine.
+ (irchat-default-coding-system): Moved from `irchat-vars.el'.
+ (irchat-default-mime-charset): Ditto.
+ (irchat-detect-coding-system): Ditto.
+
+ * crc32.el (crc32-region): Remove `mark-active'.
+
+ * irchat-timer.el (irchat-cancel-timer): Fix for XEmacs's
+ `itimer'.
+
+ * Liece 1.2.8.14.
+
+ * irchat-dcc.el (irchat-dcc-requests): Rename from
+ `irchat-dcc-request-list'; implemented as actually a queue.
+
+ * queue-m.el: New file; imported from elib.
+
+ * irchat-filter.el (irchat-filter): Remove checking whether
+ process output line contains LF; remove duplicated LF checking
+ likewise; enclose with `save-match-data'.
+ (irchat-handle-message): Add checking user-at-host cookie with
+ restricted line.
+
+ * irchat-window.el (irchat-window-functionp): Remove; use
+ `irchat-functionp'.
+
+ * irchat-channel.el (irchat-channel-get-nicks): Fix; apply car
+ against each elements.
+
+1999-02-13 Daiki Ueno <daiki@kiss.kake.info.waseda.ac.jp>
+
+ * irchat-commands.el (irchat-command-mode+o,
+ irchat-command-mode+v): Build completion list using
+ `filter-elements'.
+
+ * irchat-vars.el (irchat-exit-hook): Rename from
+ `irchat-Exit-hook'.
+
+ * irchat-inlines.el (irchat-functionp): New macro.
+
+ * irchat-compat.el (mapvector): New macro.
+
+ * irchat-misc.el (irchat-greet-author): Remove.
+ (irchat-split-rest): Fix arguments.
+ (irchat-completing-default-read): 3rd and later arguments become
+ optional.
+ (irchat-completing-sequential-read): Evaluate completion table
+ consequently; Add optional argument `multiple-candidate', if this
+ arg is non-nil always create new table with its initial state.
+
+ * llhandler.el (llhandler-define-entry-point): Add debugging
+ triger in frount of function definition.
+ (llhandler-define-with-return): Ditto.
+ (llhandler-define): Ditto.
+ (llhandler-enter-format-string): New constant; for debugging use.
+ (llhandler-leave-format-string): Ditto.
+ (llhandler-eval-args): New macro.
+
+ * irchat.el (irchat-open-server-internal): Use
+ `open-network-stream-as-binary'.
+ (irchat-startup-hook): Rename from `irchat-Startup-hook'.
+
+1999-02-07 Daiki Ueno <daiki@kiss.kake.info.waseda.ac.jp>
+
+ * Liece 1.2.8.13.
+
+ * idea.el (idea-ecb-decrypt-string): Enclose Base64 decoded string
+ with `string-as-unibyte'.
+ (idea-cbc-decrypt-string): Ditto.
+
+ * idea.el: Sync up with Irchat-980625-2.
+
+ * crc32.el: Ditto.
+
+ * irchat-300.el (irchat-handle-303-msg): Fix matched string.
+
+ * irchat-handle.el (irchat-handle-privmsg-msg): Check whether
+ private message has come from entirely outer.
+
+ * irchat-filter.el (irchat-handle-message): Remove all occurence
+ of CR out of inputs :(
+
+1999-02-06 Daiki Ueno <daiki@kiss.kake.info.waseda.ac.jp>
+
+ * irchat.el (irchat-read-variables-files): Save alternatively
+ specified startup file name into `irchat-variables-files'.
+
+1999-02-04 Daiki Ueno <daiki@kiss.kake.info.waseda.ac.jp>
+
+ * irchat-dcc.el (irchat-command-dcc-accept): Remove destructive
+ checking.
+
+ * irchat-make.el: Do not use `add-to-list' for Emacs19.
+
+ * irchat-nick.el (irchat-nick-replace): Fixed regexp.
+
+1999-02-03 Daiki Ueno <daiki@kiss.kake.info.waseda.ac.jp>
+
+ * irchat-coding.el (irchat-coding-detect-coding-region)
+ (irchat-coding-detect-coding-string): New function.
+ (irchat-coding-decode-mime-charset-region): Use above directly.
+ (irchat-coding-decode-mime-charset-string): Ditto.
+
+1999-02-02 Daiki Ueno <daiki@kiss.kake.info.waseda.ac.jp>
+
+ * irchat-commands.el (irchat-command-who): Fixed setting
+ `irchat-channel-alist.
+
+ * Liece 1.2.8.12.
+
+ * irchat-nick.el (irchat-nick-get-user-at-host): New macro.
+
+ * irchat-compat.el (temp-minibuffer-message): New function.
+
+ * irchat-minibuf.el: New file; custom minibuffer completion.
+
+ * irchat.el (irchat-open-server-internal): Add check for dotless
+ IP or IPv6 address representation.
+
+ * irchat-channel.el (irchat-channel-set-voice): Replace with
+ regexp.
+
+1999-02-01 Daiki Ueno <daiki@kiss.kake.info.waseda.ac.jp>
+
+ * irchat-300.el (irchat-handle-319-msg): Fixed channel conversion.
+
+ * irchat-commands.el (irchat-command-modec): Fixed completion.
+ (irchat-command-mode-o,irchat-command-mode+v,irchat-command-mode-v):
+ Fix format string.
+
+ * dcc.c (chat_listen): Print connection result.
+
+ * irchat-dcc.el (irchat-command-dcc-chat-listen): Add dummy
+ argument `chat' for compatibility.
+
+ * irchat-channel.el (irchat-channel-remove-mode): Use `delq'.
+ (irchat-nick-remove-mode): Ditto.
+
+ * Liece 1.2.8.11.
+
+ * irchat-menu.el (irchat-menu-popup-menu): Check whether XEmacs or
+ not compile time.
+\f
+1999-01-31 Daiki Ueno <daiki@kiss.kake.info.waseda.ac.jp>
+
+ * irchat-compat.el (set-keymap-parents): New macro.
+
+ * irchat-commands.el (irchat-command-join-channel): Add flag
+ whether `irchat-command-buffer-mode' is toggled.
+ (irchat-command-join-partner): Ditto.
+
+ * irchat-300.el (irchat-count-words-from-string): Count postfix
+ white spaces.
+
+ * irchat-q-el.el: Splited from `irchat-ctcp.el'; binary data
+ quotation in emacs-lisp.
+ * irchat-q-ccl.el: Same functionality as above but implemented in
+ Emacs CCL.
+
+ * b64.el (b64-encode-string, b64-decode-string): Add autoload
+ cookie.
+
+ * irchat.el (irchat-channel-list-keys): New variable.
+ (irchat-define-keys): Add lisp-mode indentation.
+ (irchat-channel-mode-map, irchat-others-mode-map): Set
+ `irchat-dialogue-mode-map' as its keymap parent.
+
+1999-01-28 Daiki Ueno <daiki@kiss.kake.info.waseda.ac.jp>
+
+ * Liece 1.2.8.10.
+
+ * dcc.c: Rewritten but this is obsoleted.
+
+ * irchat-commands.el (irchat-command-end-of-buffer): Renamed from
+ `irchat-command-eod-buffer'; this works also in `irchat-{channel,
+ others}-buffer-mode'.
+
+ * dcc.ml (getaddr_ext): New function.
+
+ * irchat-dcc.el (irchat-dcc-send-filter): Fix regexp.
+ (irchat-dcc-add-to-process-alist): Add process key as symbol.
+ (irchat-dcc-get-process-object): Likewise.
+ (irchat-command-dcc-receive): Fixed arguments of
+ `irchat-dcc-add-to-process-alist'.
+ (irchat-command-dcc-send): Likewise.
+ (irchat-command-dcc-accept): Fix typo.
+
+1999-01-27 Daiki Ueno <daiki@kiss.kake.info.waseda.ac.jp>
+
+ * irchat.el (irchat-others-mode-map): Add key binding of
+ `irchat-command-tag-region'
+
+ * irchat-commands.el (irchat-command-join-channel): Use
+ `irchat-channel-memberp'.
+ (irchat-command-modec): Make completion from supported mode list.
+ (irchat-channel-real): Try match with
+ `irchat-channel-conversion-map' case insensitively.
+ (irchat-channel-virtual): Ditto.
+
+1999-01-26 Daiki Ueno <daiki@kiss.kake.info.waseda.ac.jp>
+
+ * irchat-globals.el (irchat-supported-channel-mode-alist):
+ (irchat-supported-user-mode-alist): New variable
+
+ * irchat-nick.el (irchat-nick-get-modes): New macro.
+ (irchat-nick-add-mode): New macro.
+ (irchat-nick-remove-mode): New macro.
+ (irchat-nick-set-mode): New macro.
+
+ * irchat-000.el (irchat-handle-004-msg): Save server supported
+ modes.
+
+ * Liece 1.2.8.9.
+
+ * irchat-make.el: Add local copy of APEL to `load-path'.
+ (autoload-irchat): New function to generate autoload file.
+
+ * irchat.el (irchat-command-keys): Add key definition of
+ `irchat-command-set-window-style' (C-c s).
+ (irchat): Parse `irchat-variables-files' specified in command
+ line.
+ (irchat-read-variables-files): Add optional argument `file'.
+
+ * irchat-window.el (irchat-window-set-default-style): Fallback
+ style used when encountered an error at style-file loading time.
+
+ * irchat-handle.el (irchat-handle-mode-msg): Gather channel modes
+ correctly.
+
+ * irchat-channel.el (irchat-channel-get-modes): New macro.
+ (irchat-channel-set-mode): New macro.
+ (irchat-channel-add-mode): New macro.
+ (irchat-channel-remove-mode): New macro.
+
+ * irchat-menu.el (irchat-menu-prepare-menus): Fix typo in
+ `irchat-command-previous-channel'.
+ (irchat-menu-IRC-menu): Add menu items.
+
+1999-01-23 Daiki Ueno <daiki@kiss.kake.info.waseda.ac.jp>
+
+ * irchat-misc.el (irchat-change-nick-of): Fixed.
+
+1999-01-22 Daiki Ueno <daiki@kiss.kake.info.waseda.ac.jp>
+
+ * llhandler.el: New file.
+
+ * Liece 1.2.8.8.
+
+ * irchat-handle.el (irchat-handler-defun-*): Abolished.
+ (irchat-handler-defsubst-*): Abolished.
+ (irchat-handler-obarray): New variable.
+ (irchat-handle-error-msg): New handler.
+ Handler API has been rewritten with `irchat-handler-obarray',
+ which enables faster handler lookup from hash.
+
+1999-01-21 Daiki Ueno <daiki@kiss.kake.info.waseda.ac.jp>
+
+ * irchat-ctcp.el: Rewritten with new handler API.
+ (irchat-ctcp-file-save-directory): New user variable.
+ (irchat-client-message): New macro.
+ (irchat-client-file-message): New macro.
+
+ * irchat-vars.el (irchat-gather-channel-modes): New user variable.
+ (irchat-*-buffer): Moved into `irchat-globals.el'.
+
+ * irchat-misc.el: Require `invisible'.
+ (irchat-remove-properties-region): Use
+ `next-single-property-change' instead of `next-property-change'.
+ (next-visible-point): Add advice to pass optional argument
+ `limit'.
+ (irchat-change-nick-of): Fixed.
+
+1999-01-20 Daiki Ueno <daiki@kiss.kake.info.waseda.ac.jp>
+
+ * irchat-compat.el (filter-elements): Renamed from `filtercar'.
+ Rewritten as macro with referring to `dabbrev-filter-elements'.
+
+ * defface.el (defface-set-face-inverse): New function.
+ (defface-face-inverse): Ditto.
+ (defface-set-face-bold): Abolished. Use `face-set-bold-p'.
+ (defface-face-bold): Abolished. Use `face-bold-p'.
+ (defface-set-face-italic): Abolished. Use `face-set-italic-p'.
+ (defface-face-italic): Abolished. Use `face-italic-p'.
+
+1999-01-19 Daiki Ueno <daiki@kiss.kake.info.waseda.ac.jp>
+
+ * irchat-commands.el (irchat-command-tag-region): Renamed from
+ `irchat-dialogue-tag-line'. Add removing 'face and 'invisible
+ properties from text moved into kill ring.
+
+ * sample.dot.liece{,.ja}: Fixed documentation about window
+ configuration.
+
+ * irchat-misc.el (irchat-pick-buffer): Assume that channel names
+ are associated to channel buffers case insensitively.
+ (irchat-remove-properties-region): New macro.
+
+1999-01-18 Daiki Ueno <daiki@kiss.kake.info.waseda.ac.jp>
+
+ * irchat-compat.el (keymap-accept-event-array): Abolished.
+
+ * Liece 1.2.8.7.
+
+ * irchat-misc.el (matching-substring): Became an alias for
+ `match-string'.
+
+ * irchat.el (irchat-open-server): Fixed.
+ (irchat-open-server-internal): Fixed.
+ Do not require `smiley'.
+
+1999-01-17 Daiki Ueno <daiki@kiss.kake.info.waseda.ac.jp>
+
+ * irchat-300.el (irchat-handle-364-msg): Fixed.
+
+ * irchat-200.el (irchat-handle-213-msg): Fixed.
+
+ * irchat-intl.el (irchat-intl-load-catalogue): Do not bind `lang'
+ to `current-language-environment'.
+
+ * irchat-window.el (irchat-configure-windows): Switch to
+ `irchat-command-buffer' before calling function
+ `irchat-window-configure-frame'.
+
+ * irchat-timer.el: Enclose statement which has newly styled macros
+ with `eval'.
+
+ * irchat-compat.el (run-hook-with-args-until-success): New macro
+ for compatibility.
+
+ * irchat-misc.el (irchat-convert-received-input): New macro.
+ No longer require `irchat-filter'.
+
+1999-01-16 Daiki Ueno <daiki@kiss.kake.info.waseda.ac.jp>
+
+ * irchat-caesar.el: Abolished.
+
+ * irchat-compat.el (function-documentation): New macro.
+
+ * irchat-commands.el (irchat-command-point-back-to-command-buffer):
+ New command. Bind key to `c'.
+ (irchat-command-caesar-line): Abolished. Use `mule-caesar-region'.
+
+ * irchat-misc.el (irchat-is-message-ignored): Moved from
+ `irchat.el'.
+ (irchat-maybe-poll): Ditto.
+ (irchat-set-crypt-indicator): Ditto.
+ (irchat-get-buffer-create): Ditto.
+ (irchat-hex-char-to-integer): Imported from `misty1.el'.
+ (irchat-hex-string-to-integer): Ditto.
+
+1999-01-15 Daiki Ueno <daiki@kiss.kake.info.waseda.ac.jp>
+
+ * irchat.el (irchat-read-variables-files): New function.
+ (irchat-command-read-variables-files): New alias to
+ `irchat-read-variables-files'.
+ (irchat-initialize-buffers): New wrapper function.
+ (irchat-replace-internal): New macro.
+ (irchat-insert-internal): New macro.
+
+ * irchat-compat.el (ccl-enable-to-read-multibyte): New broken
+ facility.
+ (buffer-or-string-p): New macro.
+
+ * irchat-misc.el (irchat-send-as-binary): New macro.
+ (irchat-send): Add `string-as-unibyte' while checking length of
+ string.
+ (irchat-replace-in-string): Abolished.
+
+ * irchat-ck-ccl.el: CCL version of `ck' to `cj' converter.
+
+ * irchat-ck-el.el: Renamed from `irchat-hankana.el'.
+
+ * irchat-make.el: irchat-make.el: Add checking whether CCL accepts
+ `read-multibyte-character'.
+
+1999-01-14 Daiki Ueno <daiki@kiss.kake.info.waseda.ac.jp>
+
+ * irchat-misc.el (irchat-nickname): New macro.
+
+ * irchat-window.el (irchat-configure-windows): Enclose
+ calling function `irchat-window-configure-frame' with
+ `save-excursion'.
+
+ * irchat-crypt.el (irchat-crypt-with-decrypt-message):
+ Renamed from `irchat-crypt-with-encrypted-message'.
+ (irchat-crypt-with-encrypt-message): New macro.
+
+ * irchat-commands.el (irchat-command-join-partner): Fixed.
+ (irchat-command-timestamp): Fixed.
+ (irchat-command-send-message): Fixed.
+ (irchat-command-message): Fixed.
+ (irchat-command-prepare-message-prefix): New macro.
+ (irchat-command-prepare-own-message-prefix): New macro.
+
+ * Liece 1.2.8.6.
+
+ * irchat-channel.el (irchat-channel-join): Fixed.
+
+ * irchat-url.el (irchat-url-prepare-browser-function): New macro.
+ (irchat-url-command-browse-url): Add checking
+ `irchat-url-browser-name' prior to `irchat-url-browser-function'.
+
+1999-01-13 Daiki Ueno <daiki@kiss.kake.info.waseda.ac.jp>
+
+ * README-styles.ja: New file.
+
+ * irchat-channel.el (irchat-channel-change): Enclose with
+ `save-excursion'.
+
+1999-01-11 Daiki Ueno <daiki@kiss.kake.info.waseda.ac.jp>
+
+ * irchat.el (irchat): Fixed bug in XEmacs toolbar specification.
+
+1999-01-10 Daiki Ueno <daiki@kiss.kake.info.waseda.ac.jp>
+
+ * irchat-nick.el (irchat-nick-get-joined-channels): New macro.
+
+ * irchat-channel.el (irchat-channel-get-nicks): New macro.
+ (irchat-channel-get-opers): Ditto.
+ (irchat-channel-get-voices): Ditto.
+ (irchat-channel-get-topic): Ditto.
+
+ * styles/{top,bottom}: Fixed command buffer lines.
+
+ * Liece 1.2.8.5.
+
+ * irchat.el (irchat-insert): Remove checking "(featurep 'custom)".
+
+ * defface.el: New file.
+
+1999-01-09 Daiki Ueno <daiki@kiss.kake.info.waseda.ac.jp>
+
+ * irchat-handle.el (irchat-handler-define-entry-point): New alias.
+ (irchat-handler-defun-with-return): New macro.
+ (irchat-handler-defsubst-with-return): New macro.
+
+ * irchat-{000,200,300,400,500}.el: Rewritten with new handler API.
+
+ * irchat-handle.el (irchat-handler-entry-point-defun): New macro.
+ (irchat-handler-entry-point-defsubst): New macro.
+
+ * irchat-handle.el (irchat-handle-with-running-cleartext-hook):
+ Renamed from `irchat-handle-with-cleartext-hook'.
+ (irchat-handle-run-cleartext-hook):
+ Renamed from `irchat-handle-cleartext-hook'.
+
+1999-01-08 Daiki Ueno <daiki@kiss.kake.info.waseda.ac.jp>
+
+ * styles/top: New file.
+
+ * irchat-misc.el (irchat-message): New macro.
+
+ * Liece 1.2.8.4.
+
+ * styles/{bottom,middle}: New file.
+
+ * irchat-window.el (irchat-configure-windows): Moved from
+ `irchat'.
+
+ * irchat-window.el: New file for style-based window configuration.
+
+ * irchat-nick.el (irchat-nick-replace): Fixed moving point to
+ highlight mouse face.
+
+1999-01-05 Daiki Ueno <daiki@kiss.kake.info.waseda.ac.jp>
+
+ * irchat-nick.el (irchat-nick-update-region): Set point to mouse
+ clicked position.
+
+ * Liece 1.2.8.3.
+
+ * irchat.el (irchat-nick-mode-map): Add popup menu.
+
+ * irchat-menu.el (irchat-nick-popup-menu): New function.
+ (irchat-menu-popup-menu): New macro.
+
+ * irchat-intl.el (irchat-intl-get-msgstr-if): New macro.
+
+ * irchat-nick.el (irchat-nick-update-region): New function.
+ (irchat-nick-region-nicks): Moved from `irchat-xemacs'.
+ (irchat-nick-region-opers): Ditto.
+ (irchat-nick-region-voices): Ditto.
+
+ * irchat-menu.el (irchat-menu-callback-*): Moved from
+ `irchat-xemacs'.
+ (irchat-menu-define-menus): Moved to defadviced block.
+
+ * irchat-xemacs.el (irchat-xemacs-setup-menu): Shared
+ `irchat-nick-update-region'.
+
+ * irchat-channel.el (irchat-channel-set-operator): Fixed regexp.
+
+ * irchat-nick.el (irchat-nick-replace): Fixed regexp.
+
+1999-01-04 Daiki Ueno <daiki@kiss.kake.info.waseda.ac.jp>
+
+ * irchat-nick.el (irchat-nick-replace): Fixed execution order.
+
+ * irchat-nick.el (irchat-nick-replace): Fixed regexp.
+ And enclose `save-restriction'.
+
+ * irchat-menu.el: Add easymenu support.
+
+ * Liece 1.2.8.2.
+
+ * irchat-crypt.el (irchat-crypt-with-encrypted-message):
+ New macro.
+
+ * irchat-handle.el (irchat-handler-defsubst): New macro.
+ (irchat-handler-defun): Ditto.
+ (irchat-handler-return): Ditto.
+ All handler routines are defined with new form.
+ (irchat-handle-with-cleartext-hook): New macro.
+ (irchat-handle-cleartext-hook): Ditto.
+ (irchat-handle-run-hook-with-args): Ditto.
+ Handler code eliminated by global jump.
+ (irchat-handle-set-channel-prefix): New macro.
+ (irchat-handle-set-dialogue-prefix): Ditto.
+ (irchat-handle-set-private-prefix): Ditto.
+
+ * irchat-misc.el (irchat-insert-change): New macro.
+ (irchat-insert-notice): Ditto.
+ (irchat-insert-broadcast): Ditto.
+ (irchat-insert-wallops): Ditto.
+ (irchat-insert-error): Ditto.
+ (irchat-insert-info): Ditto.
+ (irchat-insert-timestamp): Ditto.
+ (irchat-insert-dcc): Ditto.
+ (irchat-insert-client): Ditto.
+
+1999-01-03 Daiki Ueno <daiki@kiss.kake.info.waseda.ac.jp>
+
+ * irchat-commands.el (irchat-switch-to-channel-no): Fixed.
+
+ * irchat-hilight.el (irchat-highlight-region): Check
+ `irchat-display-prefix-tag'.
+
+ * irchat-vars.el (irchat-display-prefix-tag): New variable.
+
+ * irchat-hilight.el (irchat-highlight-hide-prefix-region):
+ New function.
+
+ * irchat-version.el (irchat-version-user-agent-style): Abolished.
+ (liece-client-product): New variable.
+ (liece-client-name): New macro.
+ (liece-client-version-major): Ditto.
+ (liece-client-version-minor): Ditto.
+ (liece-client-version-beta): Ditto.
+ (liece-client-version-alpha): Ditto.
+ (liece-client-codename): Ditto.
+
+ * irchat-version.el (irchat-make-emacs-user-agent-string): New
+ function.
+
+ * irchat.el (irchat-insert): Renamed from `irchat-w-insert'.
+ (irchat-replace): Renamed from `irchat-w-replace'.
+
+ * irchat-intl.el (irchat-intl-domain-to-mime-charset-alist): New
+ variable.
+
+ * irchat-intl.el (irchat-intl-parse-Content-Type): Do not use
+ `mime-parse-Content-Type' when `mime-parse' is not loaded.
+
+ * irchat.el: Remove extra calls of `suppress-keymap'.
+
+ * irchat-compat.el: Remove all CL emulation.
+
+ * Liece 1.2.8.1.
+
+ * irchat-intl.el (irchat-intl-use-localized-messages): New
+ variable.
+
+1999-01-02 Daiki Ueno <daiki@kiss.kake.info.waseda.ac.jp>
+
+ * irchat-intl.el (irchat-intl-parse-Content-Type): Parse
+ "Content-Type:" header to recognize coding used in PO files.
+
+1999-01-01 Daiki Ueno <daiki@kiss.kake.info.waseda.ac.jp>
+
+ * irchat-intl.el (irchat-intl-domains-to-coding-system-alist):
+ Abolished.
+
+ * irchat-commands.el (irchat-command-find-timestamp): Regexp fixed.
+\f
+1998-12-30 Daiki Ueno <daiki@kiss.kake.info.waseda.ac.jp>
+
+ * Add experimental i18n feature.
+
+ * po/ja.po: New file.
+
+ * irchat-intl.el: New file.
+
+ * irchat-ctcp.el (irchat-ctcp-msg): Message format fixed.
+
+ * irchat-channel.el (irchat-channel-join): Fixed.
+ (irchat-channel-create-buffer): Fixed.
+
+1998-12-29 Daiki Ueno <daiki@kiss.kake.info.waseda.ac.jp>
+
+ * irchat-commands.el (irchat-switch-to-channel{,-no}):
+ Do not reconfigure windows.
+
+ * TODO.ja: New file.
+
+ * Liece 1.2.6.13/1.2.8.0.
+
+ * irchat-commands.el (irchat-switch-to-channel): Fixed.
+ (irchat-switch-to-channel-no): Fixed.
+
+ * irchat-misc.el (irchat-toggle-command-buffer-mode): When hiding
+ state of nick buffer is toggled, reconfigure windows every time.
+
+ * irchat-handle.el (irchat-handle-join-msg): Check whether joined
+ channel is modeless.
+
+ * irchat-misc.el (irchat-channel-modeless-p): New macro.
+ (irchat-channel-modeless-regexp): New variable.
+
+ * irchat-handle.el (irchat-handle-{join,quit,mode,part}-msg):
+ Compression of changes reworked.
+
+ * irchat-vars.el (irchat-display-time): Rename from
+ `irchat-print-time'.
+ (irchat-time-prefix-regexp): Regexp for time prefix.
+
+ * irchat-mail.el: Add autoloads instead of all requires
+ (`gnus-msg', `sendmail', `mime-edit').
+ (irchat-mail-compose-with-mail): Add evals to silence
+ byte-compiler.
+ (irchat-command-mail-compose): Fix completion.
+
+ * irchat-channel.el (irchat-channel-buffer-create):
+ Rewritten as a macro.
+
+ * irchat-nick.el (irchat-nick-buffer-create): Ditto.
+
+ * irchat-compat.el: `<<' and `>>' are become aliases of lsh.
+
+ * irchat.el: Rename `irchat-Select-keys' to `irchat-select-keys'.
+
+ * sample.liece{,.ja}: Add sample setting of
+ `irchat-startup-channel-list'.
+
+ * irchat.el (irchat-command-keys): Bind `C-c b' and `C-c N b' to
+ `irchat-command{,-nick}-scroll-down' (synced up with irchat-2.4jp24f).
+ (irchat-nick-keys): Bind scrolling functions.
+
+ * irchat.el (irchat-command-mode): Display `minor-mode-alist' on
+ mode-line.
+
+ * irchat-globals.el (irchat-obarray):
+ Set initial array length to 1.
+
+ * irchat.el: Remove preparation code of `irchat-obarray'.
+
+ * liece-faq.texinfo: Change formatting style.
+
+1998-12-10 Daiki Ueno <daiki@kiss.kake.info.waseda.ac.jp>
+
+ * irchat-commands.el (irchat-command-nick-scroll-down): Add check
+ whether `irchat-nick-buffer' is visible.
+ (irchat-command-nick-scroll-up): Ditto.
+
+ * irchat-commands.el (irchat-command-scroll-down): Add check
+ whether `irchat-channel-buffer' is visible.
+ (irchat-command-scroll-up): Ditto.
+
+1998-12-09 Daiki Ueno <daiki@kiss.kake.info.waseda.ac.jp>
+
+ * irchat-misc.el (irchat-set-channel-indicator): Add check for
+ `irchat-display-frame-title'.
+
+ * irchat.el (irchat-configure-windows): Bind
+ `irchat-channel-buffer-mode' and `irchat-nick-buffer-mode' at the
+ entry point.
+
+ * irchat-channel.el (irchat-channel-switch-to-last): New macro.
+
+ * Liece 1.2.6.12.
+
+ * irchat-commands.el (irchat-channel-real): Fix spelling.
+ (irchat-channel-virtual): Ditto.
+
+ * irchat-channel.el (irchat-channel-switch-to-last): New function.
+
+ * irchat-channel.el (irchat-channel-last): New macro.
+
+ * irchat-misc.el (irchat-change-nick-of): Fixed.
+
+1998-12-04 Daiki Ueno <daiki@kiss.kake.info.waseda.ac.jp>
+
+ * irchat-misc.el (irchat-own-channel-message):
+ (ircaht-own-private-message): Remove dialogue buffer from target
+ buffers.
+
+ * liece-faq.texinfo: Fix hook for auto invisible.
+
+1998-12-03 Daiki Ueno <daiki@kiss.kake.info.waseda.ac.jp>
+
+ * irchat-handle.el (irchat-pick-buffer): Moved to `irchat-misc.el'.
+
+ * irchat-highlit.el (irchat-highlight-pattern-alist): Fix regexp
+ for DCC chatting line.
+
+ * irchat-commands.el (irchat-command-modec): Select target channel.
+
+ * irchat-dcc.el (irchat-command-dcc-chat-listen):
+ (irchat-command-dcc-chat-listen): Use `as-binary-process'
+ block.
+
+ * irchat.el (irchat-open-server-internal): Ditto.
+
+ * irchat-vars.el (irchat-binary-coding-system): Abolished.
+
+ * irchat.el (irchat-open-server-internal): Bind
+ `file-coding-system-for-{read|write}' for Mule 2.3.
+
+ * irchat.el: `irchat-switch-to-channel-no-*' registered automatically.
+
+1998-12-02 Daiki Ueno <daiki@kiss.kake.info.waseda.ac.jp>
+
+ * irchat-vars.el: Require `mcharset'.
+
+ * Liece 1.2.6.11.
+
+ * irchat-vars.el (irchat-default-mime-charset): New variable.
+
+ * irchat-coding.el: Use `mcharset' instead of
+ `{encode|decode}-coding-*'.
+ (irchat-coding-encode-charset-region):
+ (irchat-coding-encode-charset-string): New macro.
+
+ * irchat-dcc.el (irchat-dcc-pop-request-object): Fixed.
+
+ * irchat-compat.el (caar): New macro.
+
+ * irchat-misc.el (irchat-repair-crlf): New function.
+
+ * Liece 1.2.6.10.
+
+ * irchat.el (irchat-dcc-map): New keymap.
+
+ * irchat-dcc.el (irchat-command-dcc-accept): New function.
+ (irchat-dcc-get-*): Access method for request object.
+ (irchat-dcc-pop-request-object): New macro.
+
+ * Liece 1.2.6.9.
+
+ * irchat-dcc.el: Very experimental DCC chat support added.
+ (irchat-command-dcc-chat-listen): New function.
+ (irchat-command-dcc-chat-connect): Ditto.
+ (irchat-dcc-chat-listen-filter): Ditto.
+ (irchat-dcc-chat-connect-filter): Ditto.
+ (irchat-dcc-chat-filter): Ditto.
+ (irchat-dcc-channel-representation-format): New variable.
+
+ * irchat-channel.el: Very experimental multiple server support
+ added.
+ (irchat-default-channel-representation-format): New variable. This
+ is unified channel locater. Set default as
+ "@<server abbreviation>+<channel name>".
+ (irchat-channel-parse-representation): New function.
+ (irchat-channel-prepare-representation): Ditto.
+
+ * irchat-misc.el (irchat-own-channel-message): New function.
+
+ * irchat-misc.el (irchat-own-message): New macro.
+
+ * dcc.ml: Explicitly return with code 0.
+
+ * irchat-dcc.el (irchat-dcc-send-filter): Fixed.
+ (irchat-dcc-receive-filter): Fixed.
+
+1998-12-01 Daiki Ueno <daiki@kiss.kake.info.waseda.ac.jp>
+
+ * irchat-vars.el (irchat-dcc-prefix): New variable.
+
+ * irchat-compat.el (cdddr): New macro.
+
+ * irchat-dcc.el (irchat-dcc-add-to-receive-list): New macro.
+ (irchat-dcc-add-to-process-alist): Ditto.
+ (irchat-dcc-get-process-object): Ditto.
+ (irchat-dcc-sentinel): New sentinel function.
+ (irchat-dcc-prepare-directory): New function.
+ (irchat-ctcp-dcc-msg): Add handler for DCC chat.
+ (irchat-command-dcc-send): Rewritten.
+ (irchat-command-dcc-receive): Ditto.
+ (irchat-command-dcc-list): Ditto.
+
+ * Liece 1.2.6.8.
+
+ * dcc.ml: New file.
+
+ * naddr.mli: Ditto.
+
+ * naddr.ml: Ditto.
+
+ * irchat-misc.el (irchat-own-message):
+ (irchat-own-private-message): Add check whether channel buffer has
+ been created.
+
+ * sample.dot.liece: Fix typo.
+
+ * sample.dot.liece.ja: Ditto.
+
+ * irchat-url.el (irchat-url-browser-netscape): Use builtin
+ composer when encounted `mailto:'.
+
+ * irchat-commands.el (irchat-dialogue-insert): Abolished.
+\f
+1998-11-28 Daiki Ueno <daiki@kiss.kake.info.waseda.ac.jp>
+
+ * irchat-misc.el (irchat-own-private-message): Check if
+ `irchat-command-buffer-mode' is not 'chat.
+
+ * Liece 1.2.6.7.
+
+ * irchat-channel.el (irchat-channel-prepare-partner):
+ Fixed for setting `irchat-current-chat-partner'.
+
+ * irchat.el: Do not require `irchat-mail'.
+
+1998-11-27 Daiki Ueno <daiki@kiss.kake.info.waseda.ac.jp>
+
+ * irchat.el: Set default `truncate-lines'.
+
+1998-11-26 Daiki Ueno <daiki@kiss.kake.info.waseda.ac.jp>
+
+ * irchat-vars.el (irchat-display-frame-title): New variable.
+
+ * Liece 1.2.6.6.
+
+ * irchat-channel.el (irchat-command-toggle-channel-buffer-mode):
+ Remove setting dirty flag.
+
+ * irchat-nick.el (irchat-command-toggle-nick-buffer-mode):
+ Ditto
+
+1998-11-25 Daiki Ueno <daiki@kiss.kake.info.waseda.ac.jp>
+
+ * irchat-mail.el: New file.
+
+ * irchat-vars.el (irchat-convert-hankaku-katakana): New variable.
+
+ * irchat-hankana.el: New file.
+
+ * Liece 1.2.6.5.
+
+ * irchat-300.el (irchat-handle-303-msg): Print come back
+ messages for private conversation.
+
+ * irchat-misc.el (irchat-set-channel-indicator): New macro.
+
+ * irchat-handle.el (irchat-handle-nick-msg): Fixed channel indicator.
+
+ * irchat.el (irchat-close-server): Set `irchat-server' to nil.
+
+ * irchat-handle.el (irchat-handle-join-msg): Fixed for private
+ conversation.
+
+ * Add copylefts.
+
+1998-11-23 Daiki Ueno <daiki@kiss.kake.info.waseda.ac.jp>
+
+ * irchat-globals.el (irchat-ison-timer): New variable.
+
+ * irchat-vars.el (irchat-ison-interval): New variable.
+
+ * irchat-commands.el (irchat-command-set-ison-timer): New
+ function.
+ (irchat-command-cancel-ison-timer): Ditto.
+
+ * irchat-misc.el (irchat-completing-sequential-read): New function.
+
+ * Liece 1.2.6.4.
+
+ * irchat-compat.el (irchat-button3): Moved into `eval-and-compile'
+ enclosure.
+
+ * irchat.el: Do not require alist.
+
+ * irchat-handle.el (irchat-handle-quit-msg): Rewritten.
+
+ * irchat-handle.el (irchat-handle-nick-msg): Handle nick message
+ and reflect changes to private buffers.
+
+1998-11-21 Daiki Ueno <daiki@kiss.kake.info.waseda.ac.jp>
+
+ * Liece 1.2.6.3.
+
+ * irchat-misc.el (irchat-channel-p): New macro.
+ (irchat-toggle-command-buffer-mode): New wrapper function.
+
+ * irchat.el (irchat-windows-reconfiguration-needed): Fixed
+ predicate for nick buffer mode and channel list mode.
+
+ * irchat.el (irchat-command-keys): Removed duplicated binding of
+ `irchat-command-enter-message'(`\C-j' and `\M-\C-j').
+
+1998-11-19 Daiki Ueno <daiki@kiss.kake.info.waseda.ac.jp>
+
+ * irchat-handle.el (irchat-handle-privmsg-msg): Fixed.
+
+ * etc/ball.*.xpm: Remove background color in each XPM file
+ (From Yasushi Shoji <yashi@yashi.com>).
+
+ * sample.dot.liece: Add sample customizations of new feature.
+ `irchat-channel-list-buffer-mode',
+ `irchat-channel-list-window-width-percent',
+ `irchat-auto-join-partner'.
+
+ * irchat-filter.el (irchat-filter): Remove unreferenced binding.
+
+ * irchat-handle.el (irchat-handle-privmsg-msg): Handle private
+ message and join automatically.
+
+ * Liece 1.2.6.2.
+
+ * irchat-vars.el (irchat-auto-join-partner): New variable.
+ (irchat-channel-list-window-width-percent): Ditto.
+
+ * irchat-compat.el (irchat-button3): New variable.
+
+ * irchat-channel.el (irchat-channel-push-button): New handler.
+ (irchat-channel-list-insert): New function.
+ (irchat-channel-prepare-partner): New function.
+
+ * irchat-url.el (irchat-url-push-button): Search URL string around
+ event line.
+
+ * irchat.el (irchat-channel-list-mode): New major mode.
+ (irchat-configure-windows): Fixed for channel list window.
+ (irchat-channel-list-mode-map); New keymap.
+
+ * All irchat-{`Command', `Nick', `Channel', `Others', `Crypt'}-*
+ symbols renamed with uncapitalized one.
+
+1998-11-16 Daiki Ueno <daiki@kiss.kake.info.waseda.ac.jp>
+
+ * Liece 1.2.4.4.
+
+ * irchat-filter.el: Do not require mcharset.
+
+ * irchat-timer.el: Macro expression fixed (for Emacs19).
+
+ * Liece 1.2.4.3/1.2.6.1.
+
+ * irchat-vars.el (irchat-binary-coding-system):
+ New variable.
+
+ * irchat-coding.el: New file.
+
+ * irchat-filter.el (irchat-run-message-hook-types):
+ Abolished.
+ (irchat-handle-message): Rewritten.
+ (irchat-handle-message-2): Rewritten.
+
+1998-11-15 Daiki Ueno <daiki@kiss.kake.info.waseda.ac.jp>
+
+ * irchat.el (irchat-Dialogue-mode-map):
+ (irchat-Channel-mode-map):
+ (irchat-Others-mode-map): Add check whether array style keymap
+ expression is acceptable.
+
+ * liece-faq.texinfo: New FAQ added for older version of emacsen.
+
+ * irchat-handle.el (irchat-handle-privmsg-msg):
+ Rewritten.
+
+ * irchat-200.el (irchat-handle-200-msgs):
+ Channel mask regexp fixed.
+
+ * irchat-300.el (irchat-handle-300-msgs):
+ Ditto.
+
+ * irchat-400.el (irchat-handle-400-msgs):
+ Ditto.
+
+ * sample.dot.liece: Add sample hook for auto invisible.
+
+ * Liece 1.2.3.5.
+
+ * irchat-vars.el (irchat-default-coding-system):
+ Set default to 'iso-2022-jp.
+ (irchat-detect-coding-system): New custom variable.
+
+ * irchat-misc.el (irchat-send): Add code conversion with
+ `encode-coding-region' .
+
+ * irchat-filter.el (irchat-filter): Add coding-system detection.
+
+ * irchat-compat.el (irchat-set-process-coding-system):
+ (irchat-buffer-disable-undo): Abolished.
+ (buffer-disable-undo): New macro.
+
+ * defsubst.el: Removed.
+
+1998-11-14 Daiki Ueno <daiki@kiss.kake.info.waseda.ac.jp>
+
+ * irchat-ctcp.el (irchat-ccl-quote-decode): Fixed.
+
+1998-11-13 Daiki Ueno <daiki@kiss.kake.info.waseda.ac.jp>
+
+ * irchat-ctcp.el (ccl-cascade-write):
+ (ccl-set-register-right): New broken facility.
+ (irchat-ccl-quote-decode): Rewritten with checking broken CCL
+ facilities.
+
+ * irchat-timer.el (irchat-start-timer):
+ Fixed macro expression for older versions of emacsen.
+
+ * irchat-compat.el (defface): New macro for older versions of
+ emacsen.
+
+1998-11-12 Daiki Ueno <daiki@kiss.kake.info.waseda.ac.jp>
+
+ * irchat-ctcp.el: Add CCL usability checking with `ccl-usable'.
+
+1998-11-11 Daiki Ueno <daiki@kiss.kake.info.waseda.ac.jp>
+
+ * irchat-version.el (irchat-make-user-agent-string):
+ (irchat-make-version-string):
+ Regexp fixed.
+
+ * irchat-ctcp.el (irchat-ccl-quote-decode):
+ (irchat-ccl-quote-encode): Check if module `pccl' exists.
+
+ * sample.dot.liece: Renamed from sample.irchat3_vars.el.
+
+ * irchat-version.el (liece-client-minor-version):
+ Numbered as 1.2.3.3.
+ (irchat-version-user-agent-style):
+ Declaration revereted to `defvar' from `defcustom'.
+
+ * Makefile: Removed `-lnsl'.
+\f
+1998-10-20 Daiki Ueno <daiki@kake.info.waseda.ac.jp>
+
+ * irchat-nick.el (irchat-Nick-update): Bug fixed in splitting 353
+ (NAMEREPLY) message.
+
+ * irchat-inlines.el (list-to-assoclist): Rewritten.
+
+1998-10-08 Daiki Ueno <daiki@dice.cache.waseda.ac.jp>
+
+ * irchat-xemacs.el (irchat-toolbar-spec-list): Replace
+ `irchat-Command-push' and `irchat-Command-pop' with
+ `irchat-Command-previous-channel' and `irchat-Command-next-channel'.
+ (irchat-x-face-face-insert): Evaluate also when loaded.
+
+1998-10-07 Daiki Ueno <daiki@dice.cache.waseda.ac.jp>
+
+ * irchat-crypt.el (base64-encode-string): Fixed autoload with
+ `mel' to `mel-b' package.
+ (base64-decode-string): Ditto.
+
+1998-10-06 Daiki Ueno <daiki@dice.cache.waseda.ac.jp>
+
+ * irchat-xemacs.el (irchat-xemacs-splash-logo): Splash screen with
+ "liece.xpm" on every loadup time.
+
+ * irchat-version.el (liece-client-version): Numbered as 1.2.1.
+
+ * irchat-x-face.el (irchat-x-face-face-insert): Display X-Face on
+ each prefix line align middle.
+
+ * irchat-debug.el: New file.
+
+1998-10-02 Daiki Ueno <daiki@dice.cache.waseda.ac.jp>
+
+ * irchat.el (irchat-Debug-mode): New major mode for
+ `irchat-Command-debug'.
+
+ * liece-faq.texinfo: New file.
+
+ * irchat-commands.el (irchat-Client-query-map): Key binding for
+ `irchat-Command-client-x-face-from-minibuffer' substituted with
+ `irchat-Command-client-x-face-from-xbm-file'.
+
+ * irchat-compat.el (replace-in-string): New function from XEmacs
+ subr.el.
+
+ * irchat-x-face.el: New file.
+ (irchat-x-face-insert): Now works properly with GNU Emacs.
+
+ * irchat-xemacs.el (irchat-x-face-insert): New function.
+ (irchat-x-face-encode): Ditto.
+
+ * irchat-ctcp.el (irchat-ctcp-x-face-msg): X-Face query support.
+ Now it works only with X-Face utility.
+
+ * irchat-version.el (liece-client-version-beta): New variable.
+
+1998-10-01 Daiki Ueno <daiki@dice.cache.waseda.ac.jp>
+
+ * irchat.el (irchat-clear-system): Restart now reworked.
+
+ * irchat-make.el (config-irchat): Add check wheter APEL version is
+ 9.0 or later.
+
+ * irchat-ctcp.el (irchat-ctcp-version-msg): Rewritten with new
+ style version string.
+
+ * irchat-version.el (irchat-version-user-agent-style): New
+ variable.
+ (irchat-make-user-agent-string): New function.
+ (irchat-make-client-version-string): Ditto.
+ (irchat-make-version-string): Ditto.
+
+ * irchat-make.el (config-irchat): Rewritten.
+
+ * irchat-ctcp.el: Renamed from irchat-cta.el.
+ (irchat-ccl-quote-cs): New coding system for file transfer.
+ (irchat-ccl-quote-encode): New CCL program.
+ (irchat-ccl-quote-decode): Ditto.
+ (irchat-ctcp-msg): Hook checking code eliminated.
+ (irchat-ctcp-client-msg): Ditto.
+\f
+1998-09-30 Daiki Ueno <daiki@dice.cache.waseda.ac.jp>
+
+ * irchat-hilight.el (irchat-highlight-buffer):
+ Add check whether there is point has
+
+ * irchat-compat (irchat-get-text-property):
+ Add signal handler for XEmacs extents.
+
+ * irchat-commands.el: Require `irchat-dcc.el'.
+
+ * Makefile: New rule for .texinfo to .info.
+
+ * irchat-hilight.el (irchat-highlight-buffer): Bug fix for
+ `irchat-highlight-pattern'.
+
+1998-09-29 Daiki Ueno <daiki@kiss.kake.info.waseda.ac.jp>
+
+ * irchat-make.el (install-irchat): Fixed usage of function
+ install-files.
+
+ * irchat-nick.el: Do not require widget wid-edit.
+
+ * irchat-make.el (irchat-modules-to-compile): Added
+ irchat-channel, irchat-nick to module list.
+
+ * irchat-hilight.el (irchat-highlight-insert-with-mouse-face):
+ Addded check whether function widget-create is bounded.
+
+ * irchat-compat.el: Require cl.
+
+ * Makefile: Require cl. Machine specific option removed.
+
+ * irchat-commands.el (irchat-Command-send-message):
+ New signal handler for `encode-coding-string' with unknown coding
+ system. This encoding is needed when `irchat-crypt-mode-active-p'
+ is non nil.
+
+ * irchat.el: Renamed from irchat-main.el.
+
+ * irchat-main.el: Removed.
+
+1998-09-29 Daiki Ueno <daiki@dice.cache.waseda.ac.jp>
+
+ * irchat-crypt.el (irchat-read-passphrase): New alias.
+
+1998-09-28 Daiki Ueno <daiki@dice.cache.waseda.ac.jp>
+
+ * irchat-make.el: New file.
+
+ * irchat-compat.el: New file.
+
+ * irchat-ja.texinfo: New file.
+
+ * setpath.el: Removed.
+
+ * irchat-url.el (irchat-url-button-push): New handler.
+
+ * irchat-main.el (irchat-Select-map): New keymap.
+
+ * irchat-filter.el: Added autoloads for entry points of 000, 200,
+ 300, 400, 500 message handlers.
+
+ * irchat-misc.el (irchat-greet-author): Abolished.
+
+ * irchat-channel.el: Splitted from irchat-commands.el.
+
+ * irchat-nick.el: Ditto.
--- /dev/null
+SUBDIRS = test
+
+EXTRA_DIST = COMPILE \
+ riece-000.el riece-200.el riece-300.el riece-400.el riece-500.el \
+ riece-addon-modules.el riece-addon.el riece-cache.el riece-channel.el \
+ riece-coding.el riece-commands.el riece-compat.el riece-complete.el \
+ riece-debug.el riece-display.el riece-emacs.el riece-filter.el \
+ riece-globals.el riece-handle.el riece-highlight.el riece-identity.el \
+ riece-mcat.el riece-message.el riece-misc.el riece-mode.el \
+ riece-naming.el riece-options.el riece-ruby.el riece-server.el \
+ riece-signal.el riece-user.el riece-version.el riece-xemacs.el \
+ riece-irc.el riece.el \
+ riece-mcat-japanese.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-lsdb.el riece-xface.el \
+ riece-ctlseq.el riece-ignore.el riece-hangman.el riece-biff.el \
+ riece-kakasi.el riece-foolproof.el riece-yank.el riece-toolbar.el \
+ riece-eval.el riece-google.el riece-keepalive.el riece-eval-ruby.el \
+ riece-shrink-buffer.el riece-xfaceb.el riece-epg.el riece-twitter.el \
+ riece-desktop-notify.el \
+ url-riece.el \
+ riece-command-previous-channel.xpm riece-command-next-channel.xpm \
+ riece-command-configure-windows.xpm riece-command-list-addons.xpm \
+ riece-command-join.xpm riece-command-part.xpm riece-notify-icon.png \
+ server.rb aproxy.rb
+
+CLEANFILES = auto-autoloads.el custom-load.el *.elc lunit-report.xml
+DISTCLEANFILES = riece-package-info.el
+FLAGS ?= -batch -q -no-site-file
+
+all: elc
+
+elc:
+ $(EMACS) $(FLAGS) -l $(srcdir)/COMPILE -f riece-compile \
+ $(srcdir)
+
+install: elc
+ $(EMACS) $(FLAGS) -l $(srcdir)/COMPILE -f riece-install \
+ $(srcdir) $(DESTDIR)/$(lispdir) # $(MAKE)
+
+uninstall:
+ $(EMACS) $(FLAGS) -l $(srcdir)/COMPILE -f riece-uninstall \
+ $(DESTDIR)/$(lispdir)
+
+package:
+ $(XEMACS) $(FLAGS) -l $(srcdir)/COMPILE -f riece-compile-package \
+ $(srcdir)
+
+install-package: package
+ $(XEMACS) $(FLAGS) -l $(srcdir)/COMPILE -f riece-install-package \
+ $(srcdir) $(PACKAGEDIR) # $(MAKE)
+
+check-local:
+ $(EMACS) $(FLAGS) -l $(srcdir)/COMPILE -f riece-test \
+ $(srcdir) lunit-report.xml
+
+compile-individually:
+ @for i in `$(EMACS) $(FLAGS) -l $(srcdir)/COMPILE -f riece-examine`; \
+ do \
+ echo $(EMACS) $(FLAGS) -l $(srcdir)/COMPILE \
+ -f riece-compile-module $$i; \
+ $(EMACS) $(FLAGS) -l $(srcdir)/COMPILE \
+ -f riece-compile-module $$i; \
+ done
+
+update-mcat:
+ $(EMACS) $(FLAGS) -l $(srcdir)/COMPILE -f riece-update-mcat \
+ $(srcdir)
--- /dev/null
+# aproxy.rb --- async proxy between an IRC server and a client
+# Copyright (C) 1998-2005 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., 51 Franklin Street, Fifth Floor,
+# Boston, MA 02110-1301, USA.
+
+require 'io/nonblock'
+require 'socket'
+
+class AProxy
+ def initialize(host, port, size, back)
+ @host = host
+ @port = port
+ @size = size
+ @back = File.new(back, 'a') if back
+ end
+
+ def start
+ $stdout.nonblock = true
+ trap('STOP', 'IGNORE')
+ trap('TSTP', 'IGNORE')
+ socket = TCPSocket.new(@host, @port)
+ $stdout.write("NOTICE CONNECTED #{$$}\r\n")
+ wfds_in = []
+ buf = ''
+ loop do
+ rfds, wfds, = select([socket, $stdin], wfds_in)
+ unless wfds.empty?
+ if buf.length > @size
+ s = buf.slice!(0 ... @size)
+ @back.write(s) if @back
+ end
+ begin
+ until buf.empty?
+ len = $stdout.syswrite(buf)
+ buf.slice!(0 .. len)
+ end
+ wfds_in.clear
+ rescue Errno::EAGAIN
+ end
+ end
+ if rfds.include?(socket)
+ line = socket.gets("\r\n")
+ break unless line
+ if line =~ /\A(?::\S+\s+)?PING\s+(.*)\r\n/i
+ socket.write("PONG #{$1}\r\n")
+ else
+ wfds_in = [$stdout]
+ buf << line
+ end
+ end
+ if rfds.include?($stdin)
+ line = $stdin.gets("\r\n")
+ break unless line
+ socket.write(line)
+ end
+ end
+ socket.close
+ end
+end
+
+if $0 == __FILE__
+ require 'optparse'
+
+ opt_size, opt_back = nil, nil
+ opts = OptionParser.new do |opts|
+ opts.banner = <<"End"
+Usage: #{$0} [OPTIONS] host port
+End
+ opts.on('-s', '--size SIZE', 'Size of buffer.') do |size|
+ opt_size = size.to_i
+ end
+ opts.on('-b', '--back BACK', 'Send outdated messages to BACK.') do |back|
+ opt_back = back
+ end
+ opts.on_tail('--help', '-h', 'Show this message.') do
+ $stdout.print(opts.to_s)
+ exit(0)
+ end
+ end
+ begin
+ opts.parse!(ARGV)
+ rescue OptionParser::ParseError
+ $stderr.print(opts.to_s)
+ exit(1)
+ end
+
+ AProxy.new(ARGV.shift, ARGV.shift, opt_size, opt_back).start
+end
--- /dev/null
+;;; riece-000.el --- handlers for 000 replies -*- lexical-binding: t -*-
+;; Copyright (C) 1998-2003 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., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
+
+;;; Code:
+
+(require 'riece-misc)
+(require 'riece-version)
+(require 'riece-commands) ;riece-command-join
+
+(eval-when-compile
+ (autoload 'riece-default-handle-numeric-reply "riece-handle"))
+(defun riece-handle-default-000-message (prefix number name string)
+ (setq riece-nick-accepted 'ok)
+ (riece-default-handle-numeric-reply
+ riece-info-prefix prefix number name string))
+
+(defun riece-handle-001-message (prefix _number name string)
+ "RPL_WELCOME \"Welcome to the Internet Relay Network <nick>!<user>@<host>\""
+ (if riece-real-server-name
+ (error (riece-mcat "Already registered")))
+ (setq riece-real-server-name prefix
+ riece-real-nickname name
+ riece-real-userhost nil)
+ ;; Before sending USERHOST, register myself with riece-obarray
+ ;; because it may take some time.
+ (riece-get-user name)
+ (riece-send-string (format "USERHOST %s\r\n" riece-real-nickname))
+ (riece-insert-info
+ (list riece-dialogue-buffer riece-others-buffer)
+ (concat (substring string 1) "\n"))
+ (if (equal riece-server-name "")
+ (message (riece-mcat "Logging in to IRC server...done"))
+ (message (riece-mcat "Logging in to %s...done") riece-server-name))
+ (run-hooks 'riece-after-login-hook)
+ (let ((channel-list riece-startup-channel-list)
+ entry identity)
+ (while channel-list
+ (unless (listp (setq entry (car channel-list)))
+ (setq entry (list (car channel-list))))
+ (if (equal (riece-identity-server
+ (setq identity (riece-parse-identity (car entry))))
+ riece-server-name)
+ (riece-command-join-channel identity (nth 1 entry)))
+ (setq channel-list (cdr channel-list)))))
+
+(defun riece-handle-004-message (_prefix _number _name string)
+ "RPL_MYINFO \"<umodes> <chnlmodes>\""
+ (if (string-match "^[^ ]+ +[^ ]+ +\\([^ ]+\\) +" string)
+ (setq riece-supported-user-modes
+ (string-to-list (match-string 1 string))
+ riece-supported-channel-modes
+ (string-to-list (substring string (match-end 0))))
+ (riece-insert-info
+ (list riece-dialogue-buffer riece-others-buffer)
+ (concat string "\n"))))
+
+(provide 'riece-000)
+
+;;; riece-000.el ends here
--- /dev/null
+;;; riece-200.el --- handlers for 200 replies -*- lexical-binding: t -*-
+;; Copyright (C) 1998-2003 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., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
+
+;;; Code:
+
+(require 'riece-misc)
+
+(eval-when-compile
+ (autoload 'riece-default-handle-numeric-reply "riece-handle"))
+(defun riece-handle-default-200-message (prefix number name string)
+ (riece-default-handle-numeric-reply
+ riece-info-prefix prefix number name string))
+
+(provide 'riece-200)
+
+;;; riece-200.el ends here
--- /dev/null
+;;; riece-300.el --- handlers for 300 replies -*- lexical-binding: t -*-
+;; Copyright (C) 1998-2003 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., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
+
+;;; Code:
+
+(require 'riece-misc)
+(require 'riece-naming)
+(require 'riece-signal)
+(require 'riece-display)
+
+(eval-when-compile
+ (autoload 'riece-default-handle-numeric-reply "riece-handle"))
+(defun riece-handle-default-300-message (prefix number name string)
+ (riece-default-handle-numeric-reply
+ riece-info-prefix prefix number name string))
+
+(defun riece-handle-302-message (_prefix _number _name string)
+ "RPL_USERHOST \":*1<reply> *( \" \" <reply> )\""
+ (let ((replies (split-string (if (eq (aref string 0) ?:)
+ (substring string 1)
+ string)
+ " ")))
+ (while replies
+ (if (string-match
+ (concat "^\\([^ ]+\\)\\(\\*\\)?=\\([-+]\\)\\([^ ]+\\)")
+ (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)))
+ 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
+ (riece-concat-user-status
+ status
+ (format (riece-mcat "%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)))))
+
+(defun riece-handle-303-message (_prefix _number _name string)
+ (riece-insert-info
+ (list riece-dialogue-buffer riece-others-buffer)
+ (concat
+ (riece-concat-server-name
+ (concat (riece-mcat "Online: ")
+ (mapconcat
+ (lambda (user)
+ (riece-format-identity
+ (riece-make-identity user riece-server-name)
+ t))
+ (split-string (if (eq (aref string 0) ?:)
+ (substring string 1)
+ string)
+ " ")
+ "")))
+ "\n")))
+
+(defun riece-handle-301-message (_prefix _number _name string)
+ (if (string-match (concat "^\\([^ ]+\\) :?") string)
+ (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-concat-server-name
+ (format (riece-mcat "%s is away: %s")
+ (riece-format-identity
+ (riece-make-identity user riece-server-name)
+ t)
+ message))
+ "\n")))))
+
+(defun riece-handle-305-message (_prefix _number _name _string)
+ (riece-user-toggle-away riece-real-nickname nil)
+ (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-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
+ (concat "^\\([^ ]+\\) \\([^ ]+\\) \\([^ ]+\\) \\* :?")
+ string)
+ (let ((user (match-string 1 string))
+ (name (substring string (match-end 0)))
+ (user-at-host (concat (match-string 2 string) "@"
+ (match-string 3 string))))
+ (riece-insert-info
+ (list riece-dialogue-buffer riece-others-buffer)
+ (concat
+ (riece-concat-server-name
+ (format (riece-mcat "%s is %s (%s)")
+ (riece-format-identity
+ (riece-make-identity user riece-server-name)
+ t)
+ name
+ user-at-host))
+ "\n")))))
+
+(defun riece-handle-312-message (_prefix _number _name string)
+ (if (string-match
+ (concat "^\\([^ ]+\\) \\([^ ]+\\) :?")
+ string)
+ (riece-insert-info
+ (list riece-dialogue-buffer riece-others-buffer)
+ (concat
+ (riece-concat-server-name
+ (format (riece-mcat "on via server %s: %s")
+ (match-string 2 string)
+ (substring string (match-end 0))))
+ "\n"))))
+
+(defun riece-handle-313-message (_prefix _number _name string)
+ (if (string-match "^[^ ]+" string)
+ (let ((user (match-string 0 string)))
+ (riece-insert-info
+ (list riece-dialogue-buffer riece-others-buffer)
+ (concat
+ (riece-concat-server-name
+ (format "%s is an IRC operator"
+ (riece-format-identity
+ (riece-make-identity user riece-server-name)
+ t)))
+ "\n")))))
+
+(defun riece-handle-317-message (_prefix _number _name string)
+ (if (string-match
+ (concat "^\\([^ ]+\\) \\([0-9]+\\) ")
+ string)
+ (let* ((user (match-string 1 string))
+ (seconds (string-to-number (match-string 2 string)))
+ (units (list (cons (/ seconds 60 60 24) (riece-mcat "days"))
+ (cons (mod (/ seconds 60 60) 24)
+ (riece-mcat "hours"))
+ (cons (mod (/ seconds 60) 60) (riece-mcat "minutes"))
+ (cons (mod seconds 60) (riece-mcat "seconds")))))
+ (riece-insert-info
+ (list riece-dialogue-buffer riece-others-buffer)
+ (concat
+ (riece-concat-server-name
+ (format (riece-mcat "%s is %s idle")
+ (riece-format-identity
+ (riece-make-identity user riece-server-name)
+ t)
+ (mapconcat #'identity
+ (delq nil
+ (mapcar
+ (lambda (unit)
+ (if (/= (car unit) 0)
+ (format "%d %s"
+ (car unit) (cdr unit))))
+ units))
+ " ")))
+ "\n")))))
+
+(defun riece-handle-319-message (_prefix _number _name string)
+ (if (string-match (concat "^\\([^ ]+\\) :?") string)
+ (let ((user (match-string 1 string))
+ (channels
+ (mapconcat
+ (lambda (channel)
+ (if (string-match
+ (concat "^\\([@+]?\\)\\(" riece-channel-regexp "\\)")
+ channel)
+ (concat
+ (match-string 1 channel)
+ (riece-format-identity
+ (riece-make-identity (match-string 2 channel)
+ riece-server-name)
+ t))))
+ (split-string (substring string (match-end 0)) " ")
+ " ")))
+ (riece-insert-info
+ (list riece-dialogue-buffer riece-others-buffer)
+ (concat
+ (riece-concat-server-name
+ (format "%s: %s"
+ (riece-format-identity
+ (riece-make-identity user riece-server-name)
+ t)
+ channels))
+ "\n")))))
+
+(defun riece-handle-351-message (_prefix _number _name string)
+ (if (string-match "\\([^ ]+\\.[^ ]+\\) \\([^ ]+\\) :?" string)
+ (riece-insert-info
+ (list riece-dialogue-buffer riece-others-buffer)
+ (concat
+ (riece-concat-server-name
+ (format (riece-mcat "%s is running on %s: %s")
+ (match-string 1 string)
+ (match-string 2 string)
+ (substring string (match-end 0))))
+ "\n"))))
+
+(defvar riece-353-message-alist nil)
+(defun riece-handle-353-message (_prefix _number _name string)
+ "RPL_NAMREPLY \"[=\*@] <channel> :[[@|+]<nick> [[@|+]<nick> [...]]]\"."
+ (make-local-variable 'riece-353-message-alist)
+ (if (string-match "^[=\*@] *\\([^ ]+\\) +:?" string)
+ (let* ((channel (match-string 1 string))
+ (entry (riece-identity-assoc channel riece-353-message-alist t)))
+ (if entry
+ (setcdr entry
+ (concat (cdr entry)
+ (substring string (match-end 0)) " "))
+ (setq riece-353-message-alist
+ (cons (cons channel
+ (concat (substring string (match-end 0)) " "))
+ riece-353-message-alist))))))
+
+(defun riece-handle-322-message (_prefix _number _name decoded)
+ (let* ((parameters (riece-split-parameters (riece-decoded-string decoded)))
+ (channel (car parameters))
+ (visible (nth 1 parameters))
+ (channel-identity (riece-make-identity channel riece-server-name))
+ (buffer (riece-channel-buffer channel-identity))
+ topic)
+ (setq parameters (riece-split-parameters
+ (riece-decoded-string-for-identity decoded
+ channel-identity))
+ topic (nth 2 parameters))
+ (riece-channel-set-topic (riece-get-channel channel) topic)
+ (riece-insert-info buffer (format (riece-mcat "%s users, topic: %s\n")
+ visible topic))
+ (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 (riece-mcat "%s: %s users, topic: %s")
+ (riece-format-identity channel-identity t) visible topic))
+ "\n"))))
+
+(defun riece-handle-324-message (_prefix _number _name string)
+ (if (string-match "^\\([^ ]+\\) \\([^ ]+\\) " string)
+ (let* ((channel (match-string 1 string))
+ (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)))
+ (riece-insert-info buffer (concat (riece-mcat "Mode: ") mode-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 (riece-mcat "Mode for %s: %s")
+ (riece-format-identity channel-identity t)
+ mode-string))
+ "\n"))))))
+
+(defun riece-handle-set-topic (_prefix _number _name decoded remove)
+ (let* ((parameters (riece-split-parameters (riece-decoded-string decoded)))
+ (channel (car parameters))
+ topic
+ (channel-identity (riece-make-identity channel riece-server-name))
+ (buffer (riece-channel-buffer channel-identity)))
+ (if remove
+ (riece-channel-set-topic (riece-get-channel channel) nil)
+ (setq parameters (riece-split-parameters
+ (riece-decoded-string-for-identity decoded
+ channel-identity))
+ topic (nth 1 parameters))
+ (riece-channel-set-topic (riece-get-channel channel) topic)
+ (riece-insert-info buffer (concat (riece-mcat "Topic: ") topic "\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 (riece-mcat "Topic for %s: %s")
+ (riece-format-identity channel-identity t)
+ topic))
+ "\n")))
+ (riece-emit-signal 'channel-topic-changed channel-identity topic)))
+
+(defun riece-handle-331-message (prefix number name string)
+ (riece-handle-set-topic prefix number name string t))
+
+(defun riece-handle-332-message (prefix number name string)
+ (riece-handle-set-topic prefix number name string nil))
+
+(defun riece-handle-341-message (_prefix _number _name string)
+ (if (string-match "^\\([^ ]+\\) " string)
+ (let* ((channel (substring string (match-end 0)))
+ (user (match-string 1 string))
+ (channel-identity (riece-make-identity channel riece-server-name))
+ (buffer (riece-channel-buffer channel-identity)))
+ (riece-insert-info buffer (format (riece-mcat "Inviting %s\n") user))
+ (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 (riece-mcat "Inviting %s to %s") user
+ (riece-format-identity channel-identity t)))
+ "\n")))))
+
+(defun riece-handle-352-message (_prefix _number _name string)
+ (if (string-match "^\\([^ ]+\\) \\([^ ]+\\) \\([^ ]+\\) \\([^ ]+\\) \\([^ ]+\\) \\([HG]\\)\\(\\*\\)?\\([@+]\\)? :\\([0-9]+\\) " string)
+ (let* ((channel (match-string 1 string))
+ (user (match-string 2 string))
+ (host (match-string 3 string))
+ (server (match-string 4 string))
+ (nick (match-string 5 string))
+ (away (equal (match-string 6 string) "G"))
+ (operator (not (null (match-beginning 7))))
+ (flag (match-string 8 string))
+ (hops (match-string 9 string))
+ (name (substring string (match-end 0)))
+ (buffer (riece-channel-buffer (riece-make-identity
+ channel riece-server-name)))
+ (info (format "%10s = %s (%s)"
+ (concat
+ (if (memq flag '(?@ ?+))
+ (char-to-string flag)
+ " ")
+ (riece-format-identity
+ (riece-make-identity nick riece-server-name)
+ t))
+ name
+ (riece-strip-user-at-host
+ (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-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)))
+ (list riece-dialogue-buffer riece-others-buffer)
+ riece-dialogue-buffer)
+ (concat
+ (riece-concat-server-name
+ (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))
+(defun riece-handle-323-message (_prefix _number _name _string))
+
+(defun riece-handle-366-message (_prefix _number _name string)
+ "RPL_ENDOFNAMES \"<channel> :End of NAMES list\""
+ (if (string-match "^\\([^ ]+\\) " string)
+ (let* ((channel (match-string 1 string))
+ (channel-identity (riece-make-identity channel
+ riece-server-name))
+ (buffer (riece-channel-buffer channel-identity))
+ (entry (riece-identity-assoc channel riece-353-message-alist t))
+ (string (cdr entry))
+ (start 0)
+ users)
+ (if entry
+ (setq riece-353-message-alist
+ (delq entry riece-353-message-alist)))
+ (while (string-match
+ (concat "\\([@+]\\)?\\([^ ]+\\) +")
+ 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)
+ users (cons (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)))
+ (setq users (nreverse users))
+ (riece-naming-assert-channel-users users channel)
+ (riece-insert-info
+ buffer
+ (concat (format (riece-mcat "%d users: ") (length 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
+ (concat (format (riece-mcat "%d users on %s: ")
+ (length users)
+ (riece-format-identity channel-identity t))
+ string))
+ "\n")))))
+
+(provide 'riece-300)
+
+;;; riece-300.el ends here
--- /dev/null
+;;; riece-400.el --- handlers for 400 replies -*- lexical-binding: t -*-
+;; Copyright (C) 1998-2003 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., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
+
+;;; Code:
+
+(require 'riece-globals)
+(require 'riece-misc)
+(require 'riece-mcat)
+(require 'riece-commands)
+
+(eval-when-compile
+ (autoload 'riece-default-handle-numeric-reply "riece-handle"))
+(defun riece-handle-default-400-message (prefix number name string)
+ (riece-default-handle-numeric-reply
+ riece-error-prefix prefix number name string))
+
+(defun riece-handle-read-string (prompt)
+ (condition-case nil
+ (let (inhibit-quit)
+ (read-string prompt))
+ (quit
+ (ignore (message "%s" (concat prompt "Quit"))))))
+
+(defun riece-handle-432-message (_prefix _number _name string)
+ "ERR_ERRONEUSNICKNAME \"<nick> :Erroneous nickname\"."
+ (let ((nickname
+ (riece-handle-read-string
+ (format (riece-mcat "Erroneous nickname \"%s\". Choose a new one: ")
+ (car (riece-split-parameters string))))))
+ (if nickname
+ (riece-send-string (format "NICK %s\r\n" nickname)))))
+
+(defun riece-handle-433-message (_prefix _number _name string)
+ "ERR_NICKNAMEINUSE \"<nick> :Nickname is already in use\"."
+ (let ((nickname
+ (riece-handle-read-string
+ (format (riece-mcat "Nickname \"%s\" already in use. Choose a new one: ")
+ (car (riece-split-parameters string))))))
+ (if nickname
+ (riece-send-string (format "NICK %s\r\n" nickname)))))
+
+(defun riece-handle-464-message (prefix _number _name _string)
+ "ERR_PASSWDMISMATCH \":Password incorrect\"."
+ (message (riece-mcat "Password incorrect from %s.") prefix)
+ (setq riece-reconnect-with-password t))
+
+(defun riece-handle-475-message (_prefix _number _name string)
+ "ERR_BADCHANNELKEY \"<channel> :Cannot join channel (+k)\"."
+ (let* ((parameters (riece-split-parameters string))
+ (channel-identity (riece-make-identity (car parameters)
+ riece-server-name))
+ key)
+ (setq key
+ (condition-case nil
+ (let (inhibit-quit)
+ (riece-read-passwd
+ (format (riece-mcat "Key for %s: ")
+ (riece-format-identity channel-identity t))))
+ (quit
+ (message (riece-mcat "Key for %s: Quit")
+ (riece-format-identity channel-identity t))
+ 'quit)))
+ (unless (eq key 'quit)
+ (riece-command-join-channel channel-identity key))))
+
+(provide 'riece-400)
+
+;;; riece-400.el ends here
--- /dev/null
+;;; riece-500.el --- handlers for 500 replies -*- lexical-binding: t -*-
+;; Copyright (C) 1998-2003 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., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
+
+;;; Code:
+
+(require 'riece-misc)
+
+(eval-when-compile
+ (autoload 'riece-default-handle-numeric-reply "riece-handle"))
+(defun riece-handle-default-500-message (prefix number name string)
+ (riece-default-handle-numeric-reply
+ riece-error-prefix prefix number name string))
+
+(provide 'riece-500)
+
+;;; riece-500.el ends here
--- /dev/null
+(require 'riece-mcat)
+
+(defconst riece-addon-modules
+ (list
+ (cons 'riece-alias
+ (riece-mcat "Define aliases for IRC names."))
+ (cons 'riece-async
+ (riece-mcat "Connect to IRC server via async proxy."))
+ (cons 'riece-biff
+ (riece-mcat "Be notified if messages arrives."))
+ (cons 'riece-button
+ (riece-mcat "Display useful buttons in IRC buffers."))
+ (cons 'riece-ctcp
+ (riece-mcat "CTCP (Client To Client Protocol) support."))
+ (cons 'riece-ctlseq
+ (riece-mcat "Mark up control sequences in IRC buffers."))
+ (cons 'riece-desktop-notify
+ (riece-mcat "Display notification to desktop."))
+ (cons 'riece-doctor
+ (riece-mcat "Pretend to be a psychotherapist."))
+ (cons 'riece-epg
+ (riece-mcat "Encrypt/decrypt messages."))
+ (cons 'riece-eval-ruby
+ (riece-mcat "Evaluate input string as a Ruby program."))
+ (cons 'riece-eval
+ (riece-mcat "Evaluate an input string as an elisp form."))
+ (cons 'riece-foolproof
+ (riece-mcat "Prevent miss-operation in the command buffer."))
+ (cons 'riece-google
+ (riece-mcat "Search keywords by Google."))
+ (cons 'riece-guess
+ (riece-mcat "Guess the next channel, using multiple methods."))
+ (cons 'riece-hangman
+ (riece-mcat "Allow channel members to play the hangman game."))
+ (cons 'riece-highlight
+ (riece-mcat "Highlight IRC buffers."))
+ (cons 'riece-history
+ (riece-mcat "Manage history of channel shifting."))
+ (cons 'riece-icon
+ (riece-mcat "Display icons in IRC buffers."))
+ (cons 'riece-ignore
+ (riece-mcat "Ignore messages from some users."))
+ (cons 'riece-kakasi
+ (riece-mcat "Convert Japanese to roman string by KAKASI."))
+ (cons 'riece-keepalive
+ (riece-mcat "Keep an IRC connection."))
+ (cons 'riece-keyword
+ (riece-mcat "Detect keywords in IRC buffers."))
+ (cons 'riece-log
+ (riece-mcat "Save IRC logs."))
+ (cons 'riece-lsdb
+ (riece-mcat "Help register nicknames in LSDB rolodex program."))
+ (cons 'riece-mcat
+ (riece-mcat "Translate messages."))
+ (cons 'riece-menu
+ (riece-mcat "Setup Riece's command menus."))
+ (cons 'riece-mini
+ (riece-mcat "Use Riece only on the minibuffer."))
+;;; (cons 'riece-ndcc
+;;; (riece-mcat "DCC file sending protocol support (written in elisp.)"))
+ (cons 'riece-rdcc
+ (riece-mcat "DCC file sending protocol support (written in Ruby.)"))
+ (cons 'riece-shrink-buffer
+ (riece-mcat "Free old IRC messages to save memory usage."))
+ (cons 'riece-skk-kakutei
+ (riece-mcat "Remove SKK's preedit mark before sending messages."))
+ (cons 'riece-toolbar
+ (riece-mcat "Display toolbar icons."))
+ (cons 'riece-twitter
+ (riece-mcat "Send your status to Twitter."))
+ (cons 'riece-unread
+ (riece-mcat "Mark channels where new messages arrived."))
+ (cons 'riece-url
+ (riece-mcat "Collect URL in IRC buffers."))
+ (cons 'riece-xface
+ (riece-mcat "Display X-Face in IRC buffers."))
+ (cons 'riece-xfaceb
+ (riece-mcat "Display X-Face & Colour Face images in IRC buffers \(BBDB\)."))
+ (cons 'riece-yank
+ (riece-mcat "Enter the element of kill-ring."))))
+
+(provide 'riece-addon-modules)
--- /dev/null
+;;; riece-addon.el --- add-on management -*- lexical-binding: t -*-
+;; 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., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
+
+;;; Code:
+
+(require 'font-lock)
+(require 'riece-options)
+(require 'riece-compat)
+(require 'riece-misc)
+(require 'riece-addon-modules)
+(require 'riece-mcat)
+
+(defgroup riece-addon-list nil
+ "Add-on listing."
+ :tag "Addon list"
+ :prefix "riece-addon-list-"
+ :group 'riece)
+
+(defgroup riece-addon-list-faces nil
+ "Faces for riece-addon-list-mode."
+ :tag "Faces"
+ :prefix "riece-addon-list-"
+ :group 'riece-addon-list)
+
+(defface riece-addon-list-enabled-face
+ '((((class color) (background dark))
+ (:foreground "PaleTurquoise" :bold t))
+ (t
+ (:bold t)))
+ "Face used for displaying the enabled addon."
+ :group 'riece-addon-list-faces)
+(defvar riece-addon-list-enabled-face 'riece-addon-list-enabled-face)
+
+(defface riece-addon-list-disabled-face
+ '((((class color) (background dark))
+ (:foreground "PaleTurquoise" :italic t))
+ (t
+ ()))
+ "Face used for displaying the disabled addon."
+ :group 'riece-addon-list-faces)
+(defvar riece-addon-list-disabled-face 'riece-addon-list-disabled-face)
+
+(defface riece-addon-list-uninstalled-face
+ '((t
+ (:italic t)))
+ "Face used for displaying the uninstalled addon."
+ :group 'riece-addon-list-faces)
+(defvar riece-addon-list-uninstalled-face 'riece-addon-list-uninstalled-face)
+
+(defface riece-addon-list-unloaded-face
+ '((t
+ (:italic t :inverse-video t)))
+ "Face used for displaying the unloaded addon."
+ :group 'riece-addon-list-faces)
+(defvar riece-addon-list-unloaded-face 'riece-addon-list-unloaded-face)
+
+(defface riece-addon-list-description-face
+ '((((class color)
+ (background dark))
+ (:foreground "lightyellow"))
+ (((class color)
+ (background light))
+ (:foreground "blue4"))
+ (t
+ ()))
+ "Face used for displaying the description addon."
+ :group 'riece-addon-list-faces)
+(defvar riece-addon-list-description-face 'riece-addon-list-description-face)
+
+(defcustom riece-addon-list-mark-face-alist
+ '((?+ . riece-addon-list-enabled-face)
+ (?- . riece-addon-list-disabled-face)
+ (?? . riece-addon-list-uninstalled-face)
+ (? . riece-addon-list-unloaded-face))
+ "An alist mapping marks on riece-addon-list-buffer to faces."
+ :type '(repeat (cons character symbol))
+ :group 'riece-addon-list)
+
+(defcustom riece-addon-list-font-lock-keywords
+ '(("^\\([-+? ] \\S-+\\)\\s-+\\(.*\\)"
+ (1 (cdr (assq (aref (match-string 1) 0)
+ riece-addon-list-mark-face-alist)))
+ (2 riece-addon-list-description-face)))
+ "Default expressions to addon in riece-addon-list-mode."
+ :type '(repeat (list string))
+ :group 'riece-addon-list)
+
+(eval-when-compile
+ (autoload 'riece-command-save-variables "riece-commands"))
+
+(defvar riece-addon-list-mode-map
+ (let ((keymap (make-sparse-keymap)))
+ (define-key keymap "+" 'riece-command-enable-addon)
+ (define-key keymap "-" 'riece-command-disable-addon)
+ (define-key keymap "i" 'riece-command-insinuate-addon)
+ (define-key keymap "u" 'riece-command-uninstall-addon)
+ (define-key keymap "U" 'riece-command-unload-addon)
+ (define-key keymap "n" 'next-line)
+ (define-key keymap "p" 'previous-line)
+ (define-key keymap " " 'scroll-up)
+ (define-key keymap [delete] 'scroll-down)
+ (define-key keymap "q" 'bury-buffer)
+ (define-key keymap "s" 'riece-command-save-variables)
+ keymap))
+
+(defun riece-load-and-build-addon-dependencies (addons)
+ (let ((load-path (cons riece-addon-directory load-path))
+ dependencies)
+ (while addons
+ (require (car addons)) ;error will be reported here
+ (let* ((requires-function
+ (intern-soft
+ (concat (symbol-name (car addons)) "-requires")))
+ (requires
+ (if (and requires-function
+ (fboundp requires-function))
+ (funcall requires-function)))
+ (pointer requires)
+ entry)
+ ;; Increment succs' pred count.
+ (if (setq entry (assq (car addons) dependencies))
+ (setcar (cdr entry) (+ (length requires) (nth 1 entry)))
+ (setq dependencies (cons (list (car addons) (length requires))
+ dependencies)))
+ ;; Merge pred's succs.
+ (while pointer
+ (if (setq entry (assq (car pointer) dependencies))
+ (setcdr (cdr entry) (cons (car addons) (nthcdr 2 entry)))
+ (setq dependencies (cons (list (car pointer) 0 (car addons))
+ dependencies)))
+ (setq pointer (cdr pointer))))
+ (setq addons (cdr addons)))
+ dependencies))
+
+(defun riece-sort-addon-dependencies (dependencies)
+ (let ((pointer dependencies)
+ addons queue)
+ (while pointer
+ (if (zerop (nth 1 (car pointer)))
+ (setq dependencies (delq (car pointer) dependencies)
+ queue (cons (car pointer) queue)))
+ (setq pointer (cdr pointer)))
+ (while queue
+ (setq addons (cons (cons (car (car queue)) (nthcdr 2 (car queue)))
+ addons)
+ pointer (nthcdr 2 (car queue)))
+ (while pointer
+ (let* ((entry (assq (car pointer) dependencies))
+ (count (1- (nth 1 entry))))
+ (if (zerop count)
+ (setq dependencies (delq entry dependencies)
+ queue (nconc queue (list entry)))
+ (setcar (cdr entry) count)))
+ (setq pointer (cdr pointer)))
+ (setq queue (cdr queue)))
+ (if dependencies
+ (error "Circular add-on dependency found: %S" dependencies))
+ (nreverse addons)))
+
+(defun riece-resolve-addons (addons)
+ ;; Add files in riece-addon-directory to addons.
+ (if (file-directory-p riece-addon-directory)
+ (setq addons (nconc
+ addons
+ (mapcar
+ (lambda (name)
+ (unless (file-directory-p
+ (expand-file-name name riece-addon-directory))
+ (intern (file-name-sans-extension name))))
+ (directory-files riece-addon-directory nil "\\`[^.]")))))
+ ;; Sort & uniquify.
+ (setq addons (sort addons (lambda (symbol1 symbol2)
+ (string-lessp (symbol-name symbol1)
+ (symbol-name symbol2)))))
+ (let ((pointer addons))
+ (while pointer
+ (if (memq (car pointer) (cdr pointer))
+ (setcar pointer nil))
+ (setq pointer (cdr pointer)))
+ (delq nil addons))
+ ;; Build & resolve dependencies.
+ (riece-sort-addon-dependencies
+ (riece-load-and-build-addon-dependencies addons)))
+
+(defun riece-insinuate-addon-1 (addon verbose)
+ (if (get addon 'riece-addon-insinuated)
+ (if verbose
+ (message (riece-mcat "Add-on %S is already insinuated") addon))
+ (require addon)
+ (funcall (intern (concat (symbol-name addon) "-insinuate")))
+ (put addon 'riece-addon-insinuated t)
+ (if verbose
+ (message (riece-mcat "Add-on %S is insinuated") addon))
+ (unless (get addon 'riece-addon-default-disabled)
+ (riece-enable-addon addon t))))
+
+(defun riece-insinuate-addon (addon &optional verbose)
+ (unless (assq addon riece-addon-dependencies)
+ (setq riece-addons (cons addon riece-addons)
+ riece-save-variables-are-dirty t
+ riece-addon-dependencies
+ (riece-resolve-addons
+ (cons addon (mapcar #'car riece-addon-dependencies)))))
+ (let ((pointer riece-addon-dependencies)
+ addons)
+ (while pointer
+ (unless (get (car (car pointer)) 'riece-addon-insinuated)
+ (setq addons (cons (car (car pointer)) addons)))
+ (if (eq (car (car pointer)) addon)
+ (setq pointer nil)
+ (setq pointer (cdr pointer))))
+ (setq addons (nreverse addons))
+ (if (and (> (length addons) 1)
+ (eq verbose 'ask)
+ (not (y-or-n-p (format (riece-mcat
+ "%s will be insinuated. Continue? ")
+ (mapconcat #'symbol-name addons ", ")))))
+ (error "Insinuate operation was cancelled"))
+ (while addons
+ (riece-insinuate-addon-1 (car addons) verbose)
+ (setq addons (cdr addons)))))
+
+(defun riece-uninstall-addon (addon &optional verbose)
+ (if (not (get addon 'riece-addon-insinuated))
+ (if verbose
+ (message (riece-mcat "Add-on %S is not insinuated") addon))
+ (let ((entry (assq addon riece-addon-dependencies))
+ (uninstall (intern-soft (concat (symbol-name addon) "-uninstall"))))
+ (if entry
+ (if (cdr entry)
+ (if (= (length (cdr entry)) 1)
+ (error "%S depends on %S" (car (cdr entry)) addon)
+ (error "%s depend on %S"
+ (mapconcat #'symbol-name (cdr entry) ", ")
+ addon))
+ (riece-disable-addon addon verbose)
+ (if (and uninstall
+ (fboundp uninstall))
+ (funcall uninstall))
+ (setq riece-addon-dependencies
+ (delq entry riece-addon-dependencies))
+ (put addon 'riece-addon-insinuated nil)
+ (setq riece-addons (delq addon riece-addons)
+ riece-save-variables-are-dirty t
+ riece-addon-dependencies
+ (riece-resolve-addons
+ (delq addon (mapcar #'car riece-addon-dependencies))))))
+ (if verbose
+ (message (riece-mcat "Add-on %S is uninstalled") addon)))))
+
+(defun riece-enable-addon (addon &optional verbose)
+ (unless (get addon 'riece-addon-insinuated)
+ (error "Add-on %S is not insinuated" addon))
+ (if (get addon 'riece-addon-enabled)
+ (if verbose
+ (message (riece-mcat "Add-on %S is already enabled") addon))
+ (let ((enable (intern-soft (concat (symbol-name addon) "-enable"))))
+ (if (and enable
+ (fboundp enable))
+ (funcall enable))
+ (put addon 'riece-addon-enabled t)
+ (if verbose
+ (message (riece-mcat "Add-on %S enabled") addon)))))
+
+(defun riece-disable-addon (addon &optional verbose)
+ (unless (get addon 'riece-addon-insinuated)
+ (error "Add-on %S is not insinuated" addon))
+ (if (not (get addon 'riece-addon-enabled))
+ (if verbose
+ (message (riece-mcat "Add-on %S is already disabled") addon))
+ (let ((disable (intern-soft (concat (symbol-name addon) "-disable"))))
+ (if (and disable
+ (fboundp disable))
+ (funcall disable))
+ (put addon 'riece-addon-enabled nil)
+ (if verbose
+ (message (riece-mcat "Add-on %S disabled") addon)))))
+
+(put 'riece-addon-list-mode 'font-lock-defaults
+ '(riece-addon-list-font-lock-keywords t))
+
+(defun riece-addon-list-mode ()
+ "Major mode for displaying addon list.
+All normal editing commands are turned off."
+ (kill-all-local-variables)
+ (buffer-disable-undo)
+ (setq major-mode 'riece-addon-list-mode
+ mode-name "AddOns"
+ mode-line-buffer-identification
+ (riece-mode-line-buffer-identification '("Riece: %12b"))
+ truncate-lines t
+ buffer-read-only t)
+ (use-local-map riece-addon-list-mode-map)
+ (make-local-variable 'font-lock-defaults)
+ (setq font-lock-defaults '(riece-addon-list-font-lock-keywords t))
+ ;; In XEmacs, auto-initialization of font-lock is not effective
+ ;; if buffer-file-name is not set.
+ (font-lock-set-defaults)
+ (run-hooks 'riece-addon-list-mode-hook))
+
+(defun riece-command-list-addons ()
+ (interactive)
+ (set-buffer (riece-get-buffer-create "*AddOn*" 'riece-addon-list-mode))
+ (riece-addon-list-mode)
+ (let ((inhibit-read-only t)
+ buffer-read-only
+ (pointer riece-addon-dependencies)
+ module-description-alist
+ description point longest)
+ (while pointer
+ (setq description (intern-soft (concat (symbol-name (car (car pointer)))
+ "-description"))
+ module-description-alist
+ (cons (cons (car (car pointer))
+ (if (and description
+ (boundp description))
+ (riece-mcat (symbol-value description))
+ (riece-mcat "(no description)")))
+ module-description-alist)
+ pointer (cdr pointer)))
+ (setq pointer riece-addon-modules)
+ (while pointer
+ (unless (assq (car (car pointer))
+ module-description-alist)
+ (setq module-description-alist
+ (cons (cons (car (car pointer)) (riece-mcat (cdr (car pointer))))
+ module-description-alist)))
+ (setq pointer (cdr pointer)))
+ (erase-buffer)
+ (riece-kill-all-overlays)
+ (setq pointer module-description-alist
+ longest "")
+ (while pointer
+ (if (> (length (symbol-name (car (car pointer))))
+ (length longest))
+ (setq longest (symbol-name (car (car pointer)))))
+ (setq pointer (cdr pointer)))
+ (setq pointer (sort module-description-alist
+ (lambda (entry1 entry2)
+ (string-lessp (symbol-name (car entry1))
+ (symbol-name (car entry2))))))
+ (while pointer
+ (setq point (point))
+ (insert (format (format "%%c %%-%dS %%s\n" (length longest))
+ (if (not (featurep (car (car pointer))))
+ ?
+ (if (not (get (car (car pointer))
+ 'riece-addon-insinuated))
+ ??
+ (if (get (car (car pointer)) 'riece-addon-enabled)
+ ?+
+ ?-)))
+ (car (car pointer))
+ (cdr (car pointer))))
+ (put-text-property point (point) 'riece-addon (car (car pointer)))
+ (setq pointer (cdr pointer)))
+ (insert (riece-mcat "
+Symbols in the leftmost column:
+
+ + The add-on is enabled.
+ - The add-on is disabled.
+ ? The add-on is not insinuated.
+ The add-on is not loaded.
+"))
+ (insert (substitute-command-keys (riece-mcat "
+Useful keys:
+
+ `\\[riece-command-enable-addon]' to enable the current add-on.
+ `\\[riece-command-disable-addon]' to disable the current add-on.
+ `\\[riece-command-insinuate-addon]' to insinuate the current add-on.
+ `\\[riece-command-uninstall-addon]' to uninstall the current add-on.
+ `\\[riece-command-unload-addon]' to unload the current add-on.
+ `\\[riece-command-save-variables]' to save the current setting.
+")))
+ (goto-char (point-min))
+ (pop-to-buffer (current-buffer))
+ (delete-other-windows)))
+
+(defun riece-addon-list-set-point (addon)
+ (let ((point (point-min)))
+ (while (and (not (eq (get-text-property point 'riece-addon) addon))
+ (setq point (next-single-property-change point
+ 'riece-addon))))
+ (if point
+ (goto-char point))))
+
+(defun riece-command-enable-addon (addon)
+ (interactive
+ (list
+ (or (if (eq major-mode 'riece-addon-list-mode)
+ (get-text-property (point) 'riece-addon))
+ (intern-soft
+ (completing-read (riece-mcat "Add-on: ")
+ (mapcar (lambda (dependency)
+ (list (symbol-name (car dependency))))
+ riece-addon-dependencies)
+ (lambda (pointer)
+ (let ((enabled
+ (intern-soft (concat (car pointer)
+ "-enabled"))))
+ (and enabled
+ (null (symbol-value enabled)))))
+ t)))))
+ (riece-command-insinuate-addon addon)
+ (riece-enable-addon addon t)
+ (when (eq major-mode 'riece-addon-list-mode)
+ (riece-command-list-addons)
+ (riece-addon-list-set-point addon)))
+
+(defun riece-command-disable-addon (addon)
+ (interactive
+ (list
+ (or (if (eq major-mode 'riece-addon-list-mode)
+ (get-text-property (point) 'riece-addon))
+ (intern-soft
+ (completing-read (riece-mcat "Add-on: ")
+ (mapcar (lambda (dependency)
+ (list (symbol-name (car dependency))))
+ riece-addon-dependencies)
+ (lambda (pointer)
+ (let ((enabled
+ (intern-soft (concat (car pointer)
+ "-enabled"))))
+ (and enabled
+ (symbol-value enabled))))
+ t)))))
+ (riece-disable-addon addon t)
+ (when (eq major-mode 'riece-addon-list-mode)
+ (riece-command-list-addons)
+ (riece-addon-list-set-point addon)))
+
+(defun riece-command-insinuate-addon (addon)
+ (interactive
+ (list
+ (or (if (eq major-mode 'riece-addon-list-mode)
+ (get-text-property (point) 'riece-addon))
+ (intern-soft
+ (completing-read (riece-mcat "Add-on: ")
+ (mapcar (lambda (dependency)
+ (list (symbol-name (car dependency))))
+ riece-addon-modules)
+ (lambda (pointer)
+ (not (get (intern-soft (car pointer))
+ 'riece-addon-insinuated)))
+ t)))))
+ (riece-insinuate-addon addon 'ask)
+ (when (eq major-mode 'riece-addon-list-mode)
+ (riece-command-list-addons)
+ (riece-addon-list-set-point addon)))
+
+(defun riece-command-uninstall-addon (addon)
+ (interactive
+ (list
+ (or (if (eq major-mode 'riece-addon-list-mode)
+ (get-text-property (point) 'riece-addon))
+ (intern-soft
+ (completing-read (riece-mcat "Add-on: ")
+ (mapcar (lambda (dependency)
+ (list (symbol-name (car dependency))))
+ riece-addon-dependencies)
+ (lambda (pointer)
+ (get (intern-soft (car pointer))
+ 'riece-addon-insinuated))
+ t)))))
+ (riece-uninstall-addon addon t)
+ (when (eq major-mode 'riece-addon-list-mode)
+ (riece-command-list-addons)
+ (riece-addon-list-set-point addon)))
+
+(defun riece-command-unload-addon (addon)
+ (interactive
+ (list
+ (or (if (eq major-mode 'riece-addon-list-mode)
+ (get-text-property (point) 'riece-addon))
+ (intern-soft
+ (completing-read (riece-mcat "Add-on: ")
+ (mapcar (lambda (dependency)
+ (list (symbol-name (car dependency))))
+ riece-addon-dependencies)
+ (lambda (pointer)
+ (get (intern-soft (car pointer))
+ 'riece-addon-insinuated))
+ t)))))
+ (riece-uninstall-addon addon t)
+ (if (get addon 'riece-addon-not-unloadable)
+ (message (riece-mcat "Add-on %S is not allowed to unload") addon)
+ (unload-feature addon)
+ (message (riece-mcat "Add-on %S is unloaded") addon))
+ (when (eq major-mode 'riece-addon-list-mode)
+ (riece-command-list-addons)
+ (riece-addon-list-set-point addon)))
+
+(provide 'riece-addon)
+
+;;; riece-addon.el ends here
--- /dev/null
+;;; riece-alias.el --- define aliases for IRC names -*- lexical-binding: t -*-
+;; Copyright (C) 1998-2003 Daiki Ueno
+
+;; Author: Daiki Ueno <ueno@unixuser.org>
+;; 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., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
+
+;;; Commentary:
+
+;; NOTE: This is an add-on module for Riece.
+
+;; This add-on allows you to define aliases for IRC names.
+
+;; For example, if you want to define an alias `#r' for `#riece', you
+;; can customize riece-alias-alist as follows:
+;; (setq riece-alias-alist '(("#riece" . "#r")))
+
+;;; Code:
+
+(require 'riece-identity)
+(require 'riece-signal)
+
+(defgroup riece-alias nil
+ "Aliases of channel/user names."
+ :prefix "riece-"
+ :group 'riece)
+
+(defcustom riece-alias-percent-hack-mask "*.jp"
+ "The mask of local IRC network"
+ :type 'string
+ :group 'riece-alias)
+
+(defcustom riece-alias-enable-percent-hack t
+ "If non-nil, the target mask is abbreviated with `%'."
+ :type 'boolean
+ :group 'riece-alias)
+
+(defcustom riece-alias-alternate-separator "@"
+ "A string to separate prefix and server."
+ :type '(choice (const nil) string)
+ :group 'riece-alias)
+
+(defcustom riece-alias-alist nil
+ "An alist mapping aliases to names."
+ :type 'list
+ :group 'riece-alias)
+
+(defconst riece-alias-description
+ "Define aliases for IRC names.")
+
+(defun riece-alias-abbrev-percent-hack (string)
+ (if (string-match (concat "^#\\([^ ]+\\):"
+ (regexp-quote riece-alias-percent-hack-mask)
+ "\\( .+\\|$\\)")
+ string)
+ (replace-match "%\\1\\2" nil nil string)
+ string))
+
+(defun riece-alias-expand-percent-hack (string)
+ (if (string-match "^%\\([^ ]+\\)\\( .+\\|$\\)" string)
+ (replace-match (concat "#\\1:" riece-alias-percent-hack-mask "\\2")
+ nil nil string)
+ string))
+
+(defun riece-alias-escape-alternate-separator (string)
+ (let ((index 0))
+ (while (string-match (regexp-quote riece-alias-alternate-separator)
+ string index)
+ (setq index (1+ (match-end 0))
+ string (replace-match (concat riece-alias-alternate-separator
+ riece-alias-alternate-separator)
+ nil t string)))
+ string))
+
+(defun riece-alias-abbrev-alternate-separator (string)
+ (if (string-match " " string)
+ (let ((prefix (substring string 0 (match-beginning 0)))
+ (server (substring string (match-end 0))))
+ (concat (riece-alias-escape-alternate-separator prefix)
+ riece-alias-alternate-separator
+ (riece-alias-escape-alternate-separator server)))
+ (riece-alias-escape-alternate-separator string)))
+
+(defun riece-alias-expand-alternate-separator (string)
+ (let ((index 0)
+ prefix
+ server)
+ (while (and (null prefix)
+ (string-match
+ (concat (regexp-quote riece-alias-alternate-separator)
+ (regexp-quote riece-alias-alternate-separator)
+ "\\|\\("
+ (regexp-quote riece-alias-alternate-separator)
+ "\\)")
+ string index))
+ (if (match-beginning 1) ;found a separator
+ (setq prefix (substring string 0 (match-beginning 1))
+ index (match-end 1))
+ (setq string (replace-match riece-alias-alternate-separator
+ nil t string)
+ index (- (match-end 0)
+ (length riece-alias-alternate-separator)))))
+ (if (null prefix)
+ string
+ (setq server (substring string index)
+ index 0)
+ (if (equal server "")
+ (while (string-match (regexp-quote
+ (concat riece-alias-alternate-separator
+ riece-alias-alternate-separator))
+ server index)
+ (setq server (replace-match riece-alias-alternate-separator
+ nil t server)
+ index (- (match-end 0)
+ (length riece-alias-alternate-separator))))
+ (concat prefix " " server)))))
+
+(defun riece-alias-abbrev-identity-string (string)
+ (if riece-alias-enable-percent-hack
+ (setq string (riece-alias-abbrev-percent-hack string)))
+ (if riece-alias-alternate-separator
+ (setq string (riece-alias-abbrev-alternate-separator string)))
+ (let ((alist riece-alias-alist))
+ (while alist
+ (if (equal (downcase (car (car alist))) (downcase string))
+ (setq string (cdr (car alist))
+ alist nil)
+ (setq alist (cdr alist)))))
+ (copy-sequence string))
+
+(defun riece-alias-expand-identity-string (string)
+ (let ((alist riece-alias-alist))
+ (while alist
+ (if (equal (downcase (cdr (car alist))) (downcase string))
+ (setq string (car (car alist))
+ alist nil)
+ (setq alist (cdr alist)))))
+ (if riece-alias-alternate-separator
+ (setq string (riece-alias-expand-alternate-separator string)))
+ (if riece-alias-enable-percent-hack
+ (setq string (riece-alias-expand-percent-hack string)))
+ (copy-sequence string))
+
+(defun riece-alias-insinuate ()
+ )
+
+(defun riece-alias-enable ()
+ (setq riece-abbrev-identity-string-function
+ #'riece-alias-abbrev-identity-string
+ riece-expand-identity-string-function
+ #'riece-alias-expand-identity-string)
+ (riece-emit-signal 'channel-list-changed))
+
+(defun riece-alias-disable ()
+ (setq riece-abbrev-identity-string-function nil
+ riece-expand-identity-string-function nil)
+ (riece-emit-signal 'channel-list-changed))
+
+(provide 'riece-alias)
+
+;;; riece-alias.el ends here
--- /dev/null
+;;; riece-async.el --- connect to IRC server via async proxy -*- lexical-binding: t -*-
+;; Copyright (C) 1998-2003 Daiki Ueno
+
+;; Author: Daiki Ueno <ueno@unixuser.org>
+;; 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., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
+
+;;; Commentary:
+
+;; NOTE: This is an add-on module for Riece.
+
+;; This program allows to connect to an IRC server via local proxy
+;; which responds to PING requests from server.
+
+;; If you want to enable this feature per server, write the server
+;; spec like this:
+;; (add-to-list 'riece-server-alist
+;; '("async" :host "irc.tokyo.wide.ad.jp"
+;; :function riece-async-open-network-stream))
+
+;;; Code:
+
+(require 'riece-options)
+(require 'riece-ruby) ;riece-ruby-command
+
+(defgroup riece-async nil
+ "Connect to IRC server via async proxy."
+ :prefix "riece-"
+ :group 'riece)
+
+(defcustom riece-async-buffer-size 65535
+ "Maximum size of the write buffer."
+ :type 'integer
+ :group 'riece-async)
+
+(defcustom riece-async-backup-file (expand-file-name "riece-async.bak"
+ riece-directory)
+ "A file which contains outdated messages."
+ :type 'string
+ :group 'riece-async)
+
+(defvar riece-async-server-program "aproxy.rb"
+ "The server program file. If the filename is not absolute, it is
+assumed that the file is in the same directory of this file.")
+
+(defvar riece-async-server-program-arguments
+ (list "-s" (number-to-string riece-async-buffer-size)
+ "-b" riece-async-backup-file)
+ "Command line arguments passed to `riece-async-server-program'.")
+
+(defconst riece-async-description
+ "Connect to IRC server via async proxy.")
+
+;;;###autoload
+(defun riece-async-open-network-stream (name buffer _host _service)
+ (let* (process-connection-type
+ (process
+ (apply #'start-process name buffer riece-ruby-command
+ (expand-file-name riece-async-server-program
+ riece-data-directory)
+ riece-async-server-program-arguments)))
+ (if buffer
+ (with-current-buffer (process-buffer process)
+ (while (and (eq (process-status process) 'run)
+ (progn
+ (goto-char (point-min))
+ (not (looking-at (format "NOTICE CONNECTED %d"
+ (process-id process))))))
+ (accept-process-output process))))
+ (riece-set-process-query-on-exit-flag process nil)
+ process))
+
+(defun riece-async-insinuate ()
+ (setq riece-default-open-connection-function
+ #'riece-async-open-network-stream))
+
+(provide 'riece-async)
+
+;;; riece-async.el ends here
--- /dev/null
+;;; riece-biff.el --- be notified if messages arrives -*- lexical-binding: t -*-
+;; Copyright (C) 2004 OHASHI Akira
+
+;; Author: OHASHI Akira <bg66@koka-in.org>
+;; 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., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
+
+;;; Commentary:
+
+;; NOTE: This is an add-on module for Riece.
+
+;;; Code:
+
+(require 'riece-message)
+
+(defgroup riece-biff nil
+ "Be notified if messages arrives."
+ :prefix "riece-"
+ :group 'riece)
+
+(defcustom riece-biff-check-channels nil
+ "*If non-nil, riece-biff checks only the channel contained in this list."
+ :type '(repeat string)
+ :group 'riece-biff)
+
+(defcustom riece-biff-default-mode-string "[-]"
+ "*String displayed when there is no arrival message."
+ :type 'string
+ :group 'riece-biff)
+
+(defcustom riece-biff-biff-mode-string "[R]"
+ "*String displayed when there are new arrival messages."
+ :type 'string
+ :group 'riece-biff)
+
+(defvar riece-biff-mode-string 'riece-biff-default-mode-string)
+
+(defconst riece-biff-description
+ "Be notified if messages arrives.")
+
+(defun riece-biff-after-display-message-function (message)
+ (when (and (get 'riece-biff 'riece-addon-enabled)
+ (not (or (eq (window-buffer (selected-window))
+ (get-buffer riece-command-buffer))
+ (riece-message-own-p message)
+ (riece-message-type message))))
+ (when (or (null riece-biff-check-channels)
+ (member (riece-format-identity (riece-message-target message))
+ riece-biff-check-channels))
+ (setq riece-biff-mode-string 'riece-biff-biff-mode-string))))
+
+(defun riece-biff-clear (&optional _dummy)
+ (when (get 'riece-biff 'riece-addon-enabled)
+ (setq riece-biff-mode-string 'riece-biff-default-mode-string)))
+
+(defun riece-biff-insinuate ()
+ (add-hook 'riece-after-display-message-functions
+ 'riece-biff-after-display-message-function)
+ (add-hook 'riece-redisplay-buffers-hook 'riece-biff-clear)
+ (add-hook 'riece-after-switch-to-channel-functions 'riece-biff-clear)
+ (add-hook 'riece-exit-hook 'riece-biff-disable))
+
+(defun riece-biff-uninstall ()
+ (remove-hook 'riece-after-display-message-functions
+ 'riece-biff-after-display-message-function)
+ (remove-hook 'riece-redisplay-buffers-hook 'riece-biff-clear)
+ (remove-hook 'riece-after-switch-to-channel-functions 'riece-biff-clear)
+ (remove-hook 'riece-exit-hook 'riece-biff-disable))
+
+(defun riece-biff-enable ()
+ (setq global-mode-string
+ (cond
+ ((nlistp global-mode-string)
+ (list "" 'riece-biff-mode-string global-mode-string))
+ ((not (memq 'riece-biff-mode-string global-mode-string))
+ (append '("" riece-biff-mode-string)
+ (remove "" global-mode-string)))
+ (t
+ global-mode-string))))
+
+(defun riece-biff-disable ()
+ (setq global-mode-string
+ (cond
+ ((and (listp global-mode-string)
+ (memq 'riece-biff-mode-string global-mode-string))
+ (remq 'riece-biff-mode-string global-mode-string))
+ (t
+ global-mode-string)))
+ (riece-biff-clear))
+
+(provide 'riece-biff)
+
+;;; riece-biff.el ends here
--- /dev/null
+;;; riece-button.el --- display useful buttons in IRC buffers -*- lexical-binding: t -*-
+;; Copyright (C) 1998-2003 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., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
+
+;;; Commentary:
+
+;; NOTE: This is an add-on module for Riece.
+
+;;; Code:
+
+(require 'riece-commands)
+(require 'riece-identity)
+(require 'riece-misc)
+(require 'wid-edit)
+
+(defconst riece-channel-button-popup-menu
+ '("Channel"
+ ["Switch To Channel" riece-channel-button-switch-to-channel]
+ ["Part Channel" riece-channel-button-part]
+ ["List Channel" riece-channel-button-list])
+ "Menu for channel buttons.")
+
+(defconst riece-user-button-popup-menu
+ '("User"
+ ["Finger (WHOIS)" riece-user-button-finger]
+ ["Start Private Conversation" riece-user-button-join-partner]
+ ["Set +o" riece-user-button-set-operators]
+ ["Set +v" riece-user-button-set-speakers])
+ "Menu for user buttons.")
+
+(defconst riece-button-description
+ "Display useful buttons in IRC buffers.")
+
+(defvar help-echo-owns-message)
+(define-widget 'riece-identity-button 'push-button
+ "A channel button."
+ :action 'riece-button-switch-to-identity
+ :help-echo
+ (lambda (widget/window &optional overlay _pos)
+ ;; Needed to properly clear the message due to a bug in
+ ;; wid-edit (XEmacs only).
+ (if (boundp 'help-echo-owns-message)
+ (setq help-echo-owns-message t))
+ (format (riece-mcat "%S: switch to %s; down-mouse-3: more options")
+ (aref riece-mouse-2 0)
+ ;; XEmacs will get a single widget arg; Emacs 21 will get
+ ;; window, overlay, position.
+ (riece-format-identity
+ (if overlay
+ (with-current-buffer (riece-overlay-buffer overlay)
+ (widget-value (widget-at (riece-overlay-start overlay))))
+ (widget-value widget/window))))))
+
+(defun riece-button-switch-to-identity (widget &optional _event)
+ "Switch to identity stored in WIDGET.
+This function is used as a callback for a channel button."
+ (let ((channel (widget-value widget)))
+ (if (riece-identity-member channel riece-current-channels)
+ (riece-command-switch-to-channel channel)
+ (message "%s" (substitute-command-keys
+ (riece-mcat
+ "Type \\[riece-command-join] to join the channel"))))))
+
+(defun riece-identity-button-click (event)
+ "Call widget-button-click and select the last selected window."
+ (interactive "e") ;widget-button-click has
+ ;interactive spec "@e"
+ (let ((buffer (current-buffer))
+ (point (point))
+ window)
+ (unwind-protect
+ (with-current-buffer (riece-event-buffer event)
+ (goto-char (riece-event-point event))
+ (widget-button-click event))
+ ;; riece-button-switch-to-identity changes window-configuration
+ ;; so we must select the last selected window by _buffer_.
+ (if (setq window (get-buffer-window buffer))
+ (progn
+ (select-window window)
+ (set-window-point window point))
+ (if riece-debug
+ (riece-debug (format "buffer %s not visible"
+ (buffer-name buffer))))))))
+
+(defun riece-identity-button-popup-menu (event)
+ "Popup the menu for identity buttons."
+ (interactive "e")
+ (with-current-buffer (riece-event-buffer event)
+ (goto-char (riece-event-point event))
+ (riece-popup-menu-popup
+ (if (riece-channel-p (riece-identity-prefix
+ (get-text-property (point) 'riece-identity)))
+ riece-channel-button-popup-menu
+ riece-user-button-popup-menu)
+ event)))
+
+(defun riece-channel-button-switch-to-channel ()
+ (interactive)
+ (riece-command-switch-to-channel
+ (get-text-property (point) 'riece-identity)))
+
+(defun riece-channel-button-part ()
+ (interactive)
+ (riece-command-part
+ (get-text-property (point) 'riece-identity)))
+
+(defun riece-channel-button-list ()
+ (interactive)
+ (riece-command-list
+ (riece-identity-prefix (get-text-property (point) 'riece-identity))))
+
+(defun riece-user-button-join-partner ()
+ (interactive)
+ (riece-command-join-partner
+ (get-text-property (point) 'riece-identity)))
+
+(defun riece-user-button-set-operators ()
+ (interactive)
+ (let (group users)
+ (if (riece-region-active-p)
+ (save-excursion
+ (riece-scan-property-region
+ 'riece-identity
+ (region-beginning) (region-end)
+ (lambda (start _end)
+ (setq group (cons (get-text-property start 'riece-identity)
+ group)))))
+ (setq group (list (get-text-property (point) 'riece-identity))))
+ (setq users (riece-with-server-buffer
+ (riece-identity-server riece-current-channel)
+ (riece-channel-get-users (riece-identity-prefix
+ riece-current-channel))))
+ (if (setq group
+ (delq nil
+ (mapcar
+ (lambda (identity)
+ (unless (memq ?o (cdr (riece-identity-assoc
+ (riece-identity-prefix identity)
+ users
+ t)))
+ identity))
+ group)))
+ (riece-command-set-operators (mapcar #'riece-identity-prefix group)))))
+
+(defun riece-user-button-set-speakers ()
+ (interactive)
+ (let (group users)
+ (if (riece-region-active-p)
+ (save-excursion
+ (riece-scan-property-region
+ 'riece-identity
+ (region-beginning) (region-end)
+ (lambda (start _end)
+ (setq group (cons (get-text-property start 'riece-identity)
+ group)))))
+ (setq group (list (get-text-property (point) 'riece-identity))))
+ (setq users (riece-with-server-buffer
+ (riece-identity-server riece-current-channel)
+ (riece-channel-get-users (riece-identity-prefix
+ riece-current-channel))))
+ (if (setq group
+ (delq nil
+ (mapcar
+ (lambda (identity)
+ (unless (memq ?v (cdr (riece-identity-assoc
+ (riece-identity-prefix identity)
+ users
+ t)))
+ identity))
+ group)))
+ (riece-command-set-speakers (mapcar #'riece-identity-prefix group)))))
+
+(defun riece-user-button-finger ()
+ (interactive)
+ (riece-command-finger (get-text-property (point) 'riece-identity)))
+
+(defun riece-make-identity-button-map ()
+ (let ((map (make-sparse-keymap)))
+ (set-keymap-parent map (current-local-map))
+ (define-key map [down-mouse-2] 'riece-identity-button-click)
+ (define-key map [down-mouse-3] 'riece-identity-button-popup-menu)
+ map))
+
+(defvar riece-identity-button-map)
+(defun riece-button-add-identity-button (start end)
+ (if (get 'riece-button 'riece-addon-enabled)
+ (riece-scan-property-region
+ 'riece-identity
+ start end
+ (lambda (start end)
+ (let ((inhibit-read-only t)
+ buffer-read-only)
+ (widget-convert-button 'riece-identity-button start end
+ (get-text-property start 'riece-identity))
+ (add-text-properties
+ start end
+ (list 'local-map riece-identity-button-map
+ 'keymap riece-identity-button-map)))))))
+
+(defun riece-button-update-buffer ()
+ (riece-button-add-identity-button (point-min) (point-max)))
+
+(defvar riece-channel-list-mode-map)
+(defvar riece-user-list-mode-map)
+(defvar riece-dialogue-mode-map)
+
+(defun riece-button-channel-list-mode-hook ()
+ (set-keymap-parent riece-channel-list-mode-map widget-keymap)
+ (set (make-local-variable 'riece-identity-button-map)
+ (riece-make-identity-button-map))
+ (add-hook 'riece-update-buffer-functions
+ 'riece-button-update-buffer t t))
+
+(defun riece-button-user-list-mode-hook ()
+ (set-keymap-parent riece-user-list-mode-map widget-keymap)
+ (set (make-local-variable 'riece-identity-button-map)
+ (riece-make-identity-button-map))
+ (add-hook 'riece-update-buffer-functions
+ 'riece-button-update-buffer t t))
+
+(defun riece-button-dialogue-mode-hook ()
+ (set-keymap-parent riece-dialogue-mode-map widget-keymap)
+ (set (make-local-variable 'riece-identity-button-map)
+ (riece-make-identity-button-map)))
+
+(defun riece-button-insinuate ()
+ (save-excursion
+ (when riece-channel-list-buffer
+ (set-buffer riece-channel-list-buffer)
+ (riece-button-channel-list-mode-hook))
+ (when riece-user-list-buffer
+ (set-buffer riece-user-list-buffer)
+ (riece-button-user-list-mode-hook))
+ (let ((buffers riece-buffer-list))
+ (while buffers
+ (set-buffer (car buffers))
+ (if (riece-derived-mode-p 'riece-dialogue-mode)
+ (riece-button-dialogue-mode-hook))
+ (setq buffers (cdr buffers)))))
+ (add-hook 'riece-channel-list-mode-hook
+ 'riece-button-channel-list-mode-hook)
+ (add-hook 'riece-user-list-mode-hook
+ 'riece-button-user-list-mode-hook)
+ (add-hook 'riece-dialogue-mode-hook
+ 'riece-button-dialogue-mode-hook)
+ (add-hook 'riece-after-insert-functions 'riece-button-add-identity-button))
+
+(defun riece-button-uninstall ()
+ (let ((buffers riece-buffer-list))
+ (save-excursion
+ (while buffers
+ (set-buffer (car buffers))
+ (remove-hook 'riece-update-buffer-functions
+ 'riece-button-update-buffer t)
+ (if (local-variable-p 'riece-identity-button-map
+ (car buffers))
+ (kill-local-variable 'riece-identity-button-map))
+ (setq buffers (cdr buffers)))))
+ (remove-hook 'riece-channel-list-mode-hook
+ 'riece-button-channel-list-mode-hook)
+ (remove-hook 'riece-user-list-mode-hook
+ 'riece-button-user-list-mode-hook)
+ (remove-hook 'riece-dialogue-mode-hook
+ 'riece-button-dialogue-mode-hook)
+ (remove-hook 'riece-after-insert-functions
+ 'riece-button-add-identity-button))
+
+(defun riece-button-enable ()
+ (let ((pointer riece-buffer-list))
+ (while pointer
+ (with-current-buffer (car pointer)
+ (if (riece-derived-mode-p 'riece-dialogue-mode)
+ (riece-button-update-buffer)))
+ (setq pointer (cdr pointer)))
+ (if riece-current-channel
+ (riece-emit-signal 'user-list-changed riece-current-channel))
+ (riece-emit-signal 'channel-list-changed)))
+
+(defun riece-button-disable ()
+ (save-excursion
+ (let ((pointer riece-buffer-list))
+ (while pointer
+ ;; On XEmacs, BUFFER arg of widget-map-buttons is ignored.
+ (set-buffer (car pointer))
+ (widget-map-buttons
+ (lambda (widget _maparg)
+ (widget-leave-text widget)))
+ (setq pointer (cdr pointer))))))
+
+(provide 'riece-button)
+
+;;; riece-button.el ends here
--- /dev/null
+;;; riece-cache.el --- LRU cache -*- lexical-binding: t -*-
+;; Copyright (C) 1998-2005 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., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
+
+;;; Code:
+
+(defun riece-cache-make-node (key value &optional previous next)
+ "Make riece-cache-node object."
+ (vector key value previous next))
+
+(defun riece-cache-node-key (node)
+ "Return key of NODE."
+ (aref node 0))
+
+(defun riece-cache-node-value (node)
+ "Return value of NODE."
+ (aref node 1))
+
+(defun riece-cache-node-set-value (node value)
+ "Set value of NODE to VALUE."
+ (aset node 1 value))
+
+(defun riece-cache-node-next (node)
+ "Return next of NODE."
+ (aref node 3))
+
+(defun riece-cache-node-set-next (node next)
+ "Set next of NODE to NEXT."
+ (aset node 3 next))
+
+(defun riece-cache-node-previous (node)
+ "Return previous of NODE."
+ (aref node 2))
+
+(defun riece-cache-node-set-previous (node previous)
+ "Set previous of NODE to PREVIOUS."
+ (aset node 2 previous))
+
+(defun riece-make-cache (max-length)
+ "Make riece-cache object."
+ (vector max-length (make-vector (* max-length 2) 0) 0 nil nil))
+
+(defun riece-cache-max-length (cache)
+ "Return max-length of CACHE."
+ (aref cache 0))
+
+(defun riece-cache-hash-obarray (cache)
+ "Return hash-obarray of CACHE."
+ (aref cache 1))
+
+(defun riece-cache-hash-length (cache)
+ "Return hash-length of CACHE."
+ (aref cache 2))
+
+(defun riece-cache-set-hash-length (cache hash-length)
+ "Set hash-length of CACHE to HASH-LENGTH."
+ (aset cache 2 hash-length))
+
+(defun riece-cache-first (cache)
+ "Return first of CACHE."
+ (aref cache 3))
+
+(defun riece-cache-set-first (cache first)
+ "Set first of CACHE to FIRST."
+ (aset cache 3 first))
+
+(defun riece-cache-last (cache)
+ "Return last of CACHE."
+ (aref cache 4))
+
+(defun riece-cache-set-last (cache last)
+ "Set last of CACHE to LAST."
+ (aset cache 4 last))
+
+(defun riece-cache-contains (cache key)
+ "Return t if CACHE contains an entry whose key is KEY."
+ (intern-soft key (riece-cache-hash-obarray cache)))
+
+(defun riece-cache-get (cache key)
+ "Return the value associated with KEY in CACHE.
+If KEY is not associated in CACHE, it returns nil."
+ (let ((node (riece-cache-get-node cache key)))
+ (if node
+ (riece-cache-node-value node))))
+
+(defun riece-cache-get-node (cache key)
+ "Return a node object associcated with KEY in CACHE.
+If KEY is not associated in CACHE, it returns nil."
+ (let ((symbol (intern-soft key (riece-cache-hash-obarray cache)))
+ previous next last node)
+ (when symbol
+ (setq node (symbol-value symbol)
+ previous (riece-cache-node-previous node)
+ next (riece-cache-node-next node)
+ last (riece-cache-last cache))
+ (if previous
+ (riece-cache-node-set-next previous next))
+ (if next
+ (riece-cache-node-set-previous next previous))
+ (riece-cache-node-set-next node nil)
+ (riece-cache-node-set-previous node last)
+ (riece-cache-node-set-next last node)
+ (riece-cache-set-last cache node)
+ (if (and (eq node (riece-cache-first cache)) next)
+ (riece-cache-set-first cache next))
+ node)))
+
+(defun riece-cache-delete (cache key)
+ "Remove an entry from CACHE whose key is KEY."
+ (let ((symbol (intern-soft key (riece-cache-hash-obarray cache)))
+ previous next node)
+ (when symbol
+ (setq node (symbol-value symbol)
+ previous (riece-cache-node-previous node)
+ next (riece-cache-node-next node))
+ (if previous
+ (riece-cache-node-set-next previous next))
+ (if next
+ (riece-cache-node-set-previous next previous))
+ (if (eq (riece-cache-last cache) node)
+ (riece-cache-set-last cache previous))
+ (if (eq (riece-cache-first cache) node)
+ (riece-cache-set-first cache next))
+ (unintern symbol (riece-cache-hash-obarray cache))
+ (riece-cache-set-hash-length cache
+ (1- (riece-cache-hash-length cache)))
+ (riece-cache-node-value node))))
+
+(defun riece-cache-set (cache key value)
+ "Associate KEY with VALUE in CACHE."
+ (let ((node (riece-cache-get-node cache key)))
+ (if node
+ (riece-cache-node-set-value node value)
+ (if (>= (riece-cache-hash-length cache)
+ (riece-cache-max-length cache))
+ (riece-cache-delete cache (riece-cache-node-key
+ (riece-cache-first cache))))
+ (setq node (riece-cache-make-node key value (riece-cache-last cache)))
+ (set (intern key (riece-cache-hash-obarray cache)) node)
+ (riece-cache-set-hash-length cache
+ (1+ (riece-cache-hash-length cache)))
+ (unless (riece-cache-first cache)
+ (riece-cache-set-first cache node))
+ (when (riece-cache-last cache)
+ (riece-cache-node-set-next (riece-cache-last cache) node)
+ (riece-cache-node-set-previous node (riece-cache-last cache)))
+ (riece-cache-set-last cache node))))
+
+(provide 'riece-cache)
+
+;;; riece-cache.el ends here
--- /dev/null
+;;; riece-channel.el --- a channel object -*- lexical-binding: t -*-
+;; Copyright (C) 1998-2003 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., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
+
+;;; Code:
+
+(require 'riece-options)
+(require 'riece-globals)
+(require 'riece-identity)
+(require 'riece-mode)
+(require 'riece-cache)
+
+;;; Channel object:
+(defun riece-find-channel (name)
+ "Get a channel object named NAME from the server buffer."
+ (riece-cache-get riece-channel-cache name)
+ (let ((symbol (intern-soft (riece-identity-canonicalize-prefix name)
+ riece-channel-obarray)))
+ (if symbol
+ (symbol-value symbol))))
+
+(defun riece-forget-channel (name)
+ (riece-cache-delete riece-channel-cache name)
+ (let ((symbol (intern-soft (riece-identity-canonicalize-prefix name)
+ riece-channel-obarray)))
+ (when symbol
+ (makunbound symbol)
+ (unintern (symbol-name symbol) riece-channel-obarray))))
+
+(defun riece-make-channel (users topic modes banned invited uninvited key)
+ "Make an instance of channel object.
+Arguments are appropriate to channel users, topic, modes, banned
+users, invited users, uninvited users, and the channel key,
+respectively."
+ (vector users topic modes banned invited uninvited key))
+
+(defun riece-get-channel (name)
+ (let ((symbol (intern-soft (riece-identity-canonicalize-prefix name)
+ riece-channel-obarray)))
+ (if symbol
+ (progn
+ (riece-cache-get riece-channel-cache name)
+ (symbol-value symbol))
+ (riece-cache-set riece-channel-cache name name)
+ (set (intern (riece-identity-canonicalize-prefix name)
+ riece-channel-obarray)
+ (riece-make-channel nil nil nil nil nil nil nil)))))
+
+(defun riece-channel-users (channel)
+ "Return the users of CHANNEL."
+ (aref channel 0))
+
+(defun riece-channel-topic (channel)
+ "Return the topic of CHANNEL."
+ (aref channel 1))
+
+(defun riece-channel-modes (channel)
+ "Return the modes of CHANNEL."
+ (aref channel 2))
+
+(defun riece-channel-banned (channel)
+ "Return the banned users of CHANNEL."
+ (aref channel 3))
+
+(defun riece-channel-invited (channel)
+ "Return the invited users of CHANNEL."
+ (aref channel 4))
+
+(defun riece-channel-uninvited (channel)
+ "Return the uninvited users of CHANNEL."
+ (aref channel 5))
+
+(defun riece-channel-key (channel)
+ "Return the key of CHANNEL."
+ (aref channel 6))
+
+(defun riece-channel-set-users (channel value)
+ "Set the users of CHANNEL to VALUE."
+ (aset channel 0 value))
+
+(defun riece-channel-set-topic (channel value)
+ "Set the topic of CHANNEL to VALUE."
+ (aset channel 1 value))
+
+(defun riece-channel-set-modes (channel value)
+ "Set the modes of CHANNEL to VALUE."
+ (aset channel 2 value))
+
+(defun riece-channel-set-banned (channel value)
+ "Set the banned users of CHANNEL to VALUE."
+ (aset channel 3 value))
+
+(defun riece-channel-set-invited (channel value)
+ "Set the invited users of CHANNEL to VALUE."
+ (aset channel 4 value))
+
+(defun riece-channel-set-uninvited (channel value)
+ "Set the uninvited users of CHANNEL to VALUE."
+ (aset channel 5 value))
+
+(defun riece-channel-set-key (channel value)
+ "Set the key of CHANNEL to VALUE."
+ (aset channel 6 value))
+
+(defun riece-channel-get-users (name)
+ "Return channel's users as list."
+ (riece-channel-users (riece-get-channel name)))
+
+(defun riece-channel-get-topic (name)
+ "Return channel's topic."
+ (riece-channel-topic (riece-get-channel name)))
+
+(defun riece-channel-get-modes (name)
+ "Return channel's modes as list."
+ (riece-channel-modes (riece-get-channel name)))
+
+(defun riece-channel-get-banned (name)
+ "Return channel's banned users as list."
+ (riece-channel-banned (riece-get-channel name)))
+
+(defun riece-channel-get-invited (name)
+ "Return channel's invited users as list."
+ (riece-channel-invited (riece-get-channel name)))
+
+(defun riece-channel-get-uninvited (name)
+ "Return channel's uninvited users as list."
+ (riece-channel-uninvited (riece-get-channel name)))
+
+(defun riece-channel-get-key (name)
+ "Return channel's key."
+ (riece-channel-key (riece-get-channel name)))
+
+;;; Functions called from `riece-handle-mode-message':
+(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))
+ (old (riece-mode-assoc (riece-mode-flag mode) modes)))
+ (if flag
+ (unless old
+ (riece-channel-set-modes channel (cons 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."
+ (let* ((channel (riece-get-channel name))
+ (banned (riece-channel-banned channel)))
+ (if flag
+ (unless (member pattern banned)
+ (riece-channel-set-banned channel (cons pattern banned)))
+ (if (setq pattern (car (member pattern banned)))
+ (riece-channel-set-banned channel (delq pattern banned))))))
+
+(defun riece-channel-toggle-invited (name pattern flag)
+ "Add or remove invited PATTERN of channel."
+ (let* ((channel (riece-get-channel name))
+ (invited (riece-channel-invited channel)))
+ (if flag
+ (unless (member pattern invited)
+ (riece-channel-set-invited channel (cons pattern invited)))
+ (if (setq pattern (car (member pattern invited)))
+ (riece-channel-set-invited channel (delq pattern invited))))))
+
+(defun riece-channel-toggle-uninvited (name pattern flag)
+ "Add or remove uninvited PATTERN to channel."
+ (let* ((channel (riece-get-channel name))
+ (uninvited (riece-channel-uninvited channel)))
+ (if flag
+ (unless (member pattern uninvited)
+ (riece-channel-set-uninvited channel (cons pattern uninvited)))
+ (if (setq pattern (car (member pattern uninvited)))
+ (riece-channel-set-uninvited
+ channel (delq pattern uninvited))))))
+
+(defun riece-channel-toggle-user (name user flag)
+ "Add or remove an user to channel."
+ (let* ((channel (riece-get-channel name))
+ (users (riece-channel-users channel)))
+ (if flag
+ (unless (riece-identity-assoc user users t)
+ (riece-channel-set-users channel (cons (list user) users)))
+ (if (setq user (riece-identity-assoc user users t))
+ (riece-channel-set-users channel (delq user users))))))
+
+(defun riece-channel-toggle-operator (name user flag)
+ "Add or remove an operator to channel."
+ (let* ((channel (riece-get-channel name))
+ (users (riece-channel-users channel)))
+ (setq user (riece-identity-assoc user users t))
+ (if flag
+ (if user
+ (unless (memq ?o (cdr user))
+ (setcdr user (cons ?o (cdr user))))
+ (riece-channel-set-users channel (cons (list user ?o) users)))
+ (if user
+ (setcdr user (delq ?o (cdr user)))))))
+
+(defun riece-channel-toggle-speaker (name user flag)
+ "Add or remove an speaker to channel."
+ (let* ((channel (riece-get-channel name))
+ (users (riece-channel-users channel)))
+ (setq user (riece-identity-assoc user users t))
+ (if flag
+ (if user
+ (unless (memq ?v (cdr user))
+ (setcdr user (cons ?v (cdr user))))
+ (riece-channel-set-users channel (cons (list user ?v) users)))
+ (if user
+ (setcdr user (delq ?v (cdr user)))))))
+
+(provide 'riece-channel)
+
+;;; riece-channel.el ends here
--- /dev/null
+;;; riece-coding.el --- converting string with coding system -*- lexical-binding: t -*-
+;; Copyright (C) 1998-2003 Daiki Ueno
+
+;; Author: Daiki Ueno <ueno@unixuser.org>
+;; Created: 1998-09-28
+;; Keywords: IRC, riece, coding-system, MULE
+
+;; 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., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
+
+;;; Code:
+
+(require 'riece-globals)
+(require 'riece-options)
+
+(defun riece-encode-coding-string (string)
+ (if (and (local-variable-p 'riece-coding-system (current-buffer))
+ riece-coding-system) ;should be nil on non-Mule environment
+ (encode-coding-string string (if (consp riece-coding-system)
+ (cdr riece-coding-system)
+ riece-coding-system))
+ string))
+
+(defun riece-decode-coding-string (string)
+ (if (and (local-variable-p 'riece-coding-system (current-buffer))
+ riece-coding-system) ;should be nil on non-Mule environment
+ (riece-decode-coding-string-1 string
+ (if (consp riece-coding-system)
+ (car riece-coding-system)
+ riece-coding-system))
+ string))
+
+(defun riece-decode-coding-string-1 (string coding-system)
+ (let* ((decoded (decode-coding-string string coding-system))
+ (length (length decoded)))
+ (put-text-property 0 length 'riece-decoded-encoded-string
+ string decoded)
+ (put-text-property 0 length 'riece-decoded-coding-system
+ coding-system decoded)
+ decoded))
+
+;; The following functions are API used by handler functions. For the
+;; meantime DECODED is actually a string (with some text properties).
+;; In the future, however, the implementation _should_ be changed so
+;; that decoding phase is delayed until the body of handler functions.
+(defun riece-decoded-coding-system (decoded)
+ "Return the coding-system used for decoding DECODED."
+ (get-text-property 0 'riece-decoded-coding-system decoded))
+
+(defun riece-decoded-encoded-string (decoded)
+ "Return the string before decoding."
+ (get-text-property 0 'riece-decoded-encoded-string decoded))
+
+(defalias 'riece-decoded-string 'identity)
+
+(provide 'riece-coding)
+
+;;; riece-coding.el ends here
--- /dev/null
+/* XPM */
+static char *riece_command_configure_windows[] = {
+/* columns rows colors chars-per-pixel */
+"24 24 156 2",
+" c #1D3F75",
+". c #1C4177",
+"X c #1D447B",
+"o c #1F4986",
+"O c #1F4B87",
+"+ c #1F4A88",
+"@ c #1F4B88",
+"# c #204985",
+"$ c #204987",
+"% c #204A86",
+"& c #204A87",
+"* c #214A87",
+"= c #204B87",
+"- c #214B87",
+"; c #244B86",
+": c #214C87",
+"> c #204988",
+", c #204A88",
+"< c #214A88",
+"1 c #204B88",
+"2 c #214B88",
+"3 c #214B89",
+"4 c #224B88",
+"5 c #204C88",
+"6 c #214C88",
+"7 c #214C89",
+"8 c #224C88",
+"9 c #224C89",
+"0 c #234D89",
+"q c #224C8A",
+"w c #224D8B",
+"e c #234E8B",
+"r c #244D89",
+"t c #254D89",
+"y c #254F8A",
+"u c #244E8B",
+"i c #274F8A",
+"p c #264E8B",
+"a c #234E8C",
+"s c #234F8C",
+"d c #244E8C",
+"f c #244F8D",
+"g c #26508B",
+"h c #27518C",
+"j c #28508C",
+"k c #28528D",
+"l c #2B538D",
+"z c #29548E",
+"x c #285390",
+"c c #2B5590",
+"v c #2B5792",
+"b c #2C5590",
+"n c #2D5690",
+"m c #2A5695",
+"M c #2F5996",
+"N c #2F5B97",
+"B c #2E5D9C",
+"V c #315991",
+"C c #305A96",
+"Z c #305E9B",
+"A c #355E99",
+"S c #30609E",
+"D c #31619F",
+"F c #35619C",
+"G c #3A649A",
+"H c #3A649D",
+"J c #3162A1",
+"K c #3262A1",
+"L c #3363A2",
+"P c #3364A3",
+"I c #3564A2",
+"U c #3465A4",
+"Y c #3667A4",
+"T c #3864A1",
+"R c #3865A2",
+"E c #3C67A1",
+"W c #3867A4",
+"Q c #3768A5",
+"! c #3768A6",
+"~ c #3C68A3",
+"^ c #3969A6",
+"/ c #3A69A7",
+"( c #3D6BA6",
+") c #3A6BA8",
+"_ c #3A6AA9",
+"` c #3E6CA8",
+"' c #3F6DA8",
+"] c #43689A",
+"[ c #436BA3",
+"{ c #446BA1",
+"} c #466EA3",
+"| c #4B6DA1",
+" . c #426EA8",
+".. c #416FAA",
+"X. c #406FAB",
+"o. c #4B71A5",
+"O. c #4B71A6",
+"+. c #4672AC",
+"@. c #4874AD",
+"#. c #4974AF",
+"$. c #4B76AE",
+"%. c #4B77AE",
+"&. c #4D78AF",
+"*. c #4E78AF",
+"=. c #5173A3",
+"-. c #577AAB",
+";. c #4F7AB0",
+":. c #507AB0",
+">. c #517BB0",
+",. c #517BB1",
+"<. c #537CB1",
+"1. c #547DB0",
+"2. c #547DB2",
+"3. c #577FB3",
+"4. c #5880B4",
+"5. c #5B82B5",
+"6. c #5F84B4",
+"7. c #6086B7",
+"8. c #6286B6",
+"9. c #6487B5",
+"0. c #6288B8",
+"q. c #6288B9",
+"w. c #648ABA",
+"e. c #668BBA",
+"r. c #678CBB",
+"t. c #688DBB",
+"y. c #6D8FBA",
+"u. c #6C8EBB",
+"i. c #6E91BE",
+"p. c #7493BC",
+"a. c #7294BF",
+"s. c #7895BD",
+"d. c #628DC3",
+"f. c #658EC4",
+"g. c #6C96CA",
+"h. c #7999C3",
+"j. c #7B9BC4",
+"k. c #7E9DC5",
+"l. c #819DC3",
+"z. c #809EC6",
+"x. c #83A1C7",
+"c. c #85A2C7",
+"v. c #86A2C7",
+"b. c #84A1C8",
+"n. c #86A3C8",
+"m. c #87A3C8",
+"M. c #89A4C9",
+"N. c #8AA5C9",
+"B. c #8BA7CB",
+"V. c #8FA9CB",
+"C. c #90ABCC",
+"Z. c #91ABCD",
+"A. c #91ACCE",
+"S. c #93ADCE",
+"D. c #95AECF",
+"F. c None",
+/* pixels */
+"F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.",
+"F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.",
+"F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.",
+"F.F.F.F.F.F.F.4 7 , 1 2 6 1 F.F.F.F.F.F.O F.F.F.",
+"F.F.F.F.F.4 6 m S L ^ ( ~ F z < F.F.F.2 & F.F.F.",
+"F.F.F.F.4 f P J S W ' +.$.*.<.1.A - 2 { l F.F.F.",
+"F.F.F.F.0 B s 7 d 1 + k H >.,.@.7.6.O.j.j F.F.F.",
+"F.F.F.4 d 9 R X.Y F.F.F.7 7 [ w.&.%.i.z.h F.F.F.",
+"F.F.F.3 & #.d./ F.F.F.F.F.F.7 c 9.r.U b.y F.F.F.",
+"F.F.F.7 M g.F._ F.F.F.F.F.F.F.p y.;.U B.: F.F.F.",
+"F.F.F.5 F.F.F.F.F.F.F.F.F.F.- 9.k.x.B.A.2 F.F.F.",
+"F.F.F.F.F.F.F.F.F.F.F.F.F.O & r 8 8 2 2 & F.F.F.",
+"F.F.F.2 = = = = = = * F.F.F.F.F.F.F.F.F.F.F.F.F.",
+"F.F.F.* M.V.V.V.c.V F.F.F.F.F.F.F.F.F.F.< F.F.F.",
+"F.F.F., C.' ` m.| - F.F.F.F.F.F.) F.F.C w F.F.F.",
+"F.F.F.@ Z.Q 7.N.n 6 F.F.F.F.F.F.! f.E % q F.F.F.",
+"F.F.F.O S.a.&.q.n.} 2 = F.F.F.K T x a e F.F.F.F.",
+"F.F.F.= D.p.v.h.5.a.u.o.G b u g v Z D 2 F.F.F.F.",
+"F.F.F.> s.4 : =.l.t.0.7.4.3.2.$...I 7 F.F.F.F.F.",
+"F.F.F.% i F.F.F.; ] -.8.e.5.:. .N , F.F.F.F.F.",
+"F.F.F.$ F.F.F.F.F.F.. # & t & o X F.F.F.F.F.F.F.",
+"F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.",
+"F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.",
+"F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F."
+};
--- /dev/null
+/* XPM */
+static char *riece_command_join[] = {
+/* columns rows colors chars-per-pixel */
+"24 24 189 2",
+" c #EDD400",
+". c #F2F02B",
+"X c #F5F328",
+"o c #F5F329",
+"O c #F4F22A",
+"+ c #F5F32A",
+"@ c #F2F02C",
+"# c #F4F22D",
+"$ c #EBE933",
+"% c #EDEC32",
+"& c #80827E",
+"* c #D1D150",
+"= c #D2D25E",
+"- c #E0DF40",
+"; c #E3E242",
+": c #EFEE4F",
+"> c #E4E351",
+", c #F0EF55",
+"< c #F2F152",
+"1 c #F2F157",
+"2 c #C2C261",
+"3 c #CDCD66",
+"4 c #EFEE60",
+"5 c #ECEC6B",
+"6 c #F1F063",
+"7 c #F7F66E",
+"8 c #EFEF70",
+"9 c #EEEE74",
+"0 c #E2E27D",
+"q c #ECEB79",
+"w c #EBEB7D",
+"e c #EBEC7C",
+"r c #F0EF76",
+"t c #F1F177",
+"y c #F7F677",
+"u c #F1F07E",
+"i c #838581",
+"p c #8A8C87",
+"a c #8B8D88",
+"s c #8C8E88",
+"d c #8C8E89",
+"f c #8D8F8A",
+"g c #8D908A",
+"h c #8E908B",
+"j c #8F918B",
+"k c #90928C",
+"l c #91938E",
+"z c #92948F",
+"x c #93958F",
+"c c #939590",
+"v c #949691",
+"b c #959892",
+"n c #979993",
+"m c #989A95",
+"M c #999B96",
+"N c #9A9D97",
+"B c #9C9E98",
+"V c #9D9F9A",
+"C c #9FA283",
+"Z c #9EA19B",
+"A c #9FA29C",
+"S c #BEBF81",
+"D c #A1A39D",
+"F c #A2A59E",
+"G c #ABAE9D",
+"H c #B3B594",
+"J c #A3A6A0",
+"K c #A4A7A1",
+"L c #A6A9A2",
+"P c #A6A9A3",
+"I c #A7A9A3",
+"U c #A7AAA3",
+"Y c #A7AAA4",
+"T c #A8AAA4",
+"R c #AAADA6",
+"E c #ABAEA7",
+"W c #EBEB86",
+"Q c #EDED8D",
+"! c #EEEE8E",
+"~ c #EFEE8F",
+"^ c #F0EF8D",
+"/ c #F1F082",
+"( c #F9F780",
+") c #F0F08D",
+"_ c #E9E995",
+"` c #ECEC96",
+"' c #EAEB98",
+"] c #ECEB99",
+"[ c #F0F09D",
+"{ c #E7E9A2",
+"} c #E8E8A5",
+"| c #E8E9A5",
+" . c #E9EAA6",
+".. c #E6E8AB",
+"X. c #E7E8AD",
+"o. c #EDEDAB",
+"O. c #EBEBAF",
+"+. c #FBFAAC",
+"@. c #EFEFB5",
+"#. c #E5E7BB",
+"$. c #E7E8BE",
+"%. c #F0F0B2",
+"&. c #F1F0B5",
+"*. c #F2F2B7",
+"=. c #F7F7BB",
+"-. c #DADBD9",
+";. c #DDDEDB",
+":. c #E5E7C3",
+">. c #E4E5CB",
+",. c #E4E6CB",
+"<. c #E5E7CB",
+"1. c #F0F0C1",
+"2. c #F0F0C7",
+"3. c #FBFBCA",
+"4. c #E3E5D0",
+"5. c #E3E5D3",
+"6. c #E4E6D0",
+"7. c #E4E6D4",
+"8. c #EAEBD1",
+"9. c #E4E7D8",
+"0. c #E2E4DF",
+"q. c #E2E5DF",
+"w. c #E4E6DD",
+"e. c #E5E7DE",
+"r. c #E7E8D9",
+"t. c #ECEDDC",
+"y. c #EFF0D1",
+"u. c #EFF0DA",
+"i. c #FBFBD5",
+"p. c #FAFADA",
+"a. c #FCFBD8",
+"s. c #E2E4E0",
+"d. c #E3E4E0",
+"f. c #E2E5E0",
+"g. c #E3E5E0",
+"h. c #E3E5E1",
+"j. c #E4E6E1",
+"k. c #E4E6E2",
+"l. c #E4E7E2",
+"z. c #E5E7E2",
+"x. c #E5E7E3",
+"c. c #E6E7E3",
+"v. c #E5E8E3",
+"b. c #E6E8E4",
+"n. c #E7E8E4",
+"m. c #E7E9E5",
+"M. c #E8E9E6",
+"N. c #E8EAE6",
+"B. c #E9EAE6",
+"V. c #E9EAE7",
+"C. c #E9EBE7",
+"Z. c #EAEBE8",
+"A. c #EBECE9",
+"S. c #ECEDEA",
+"D. c #ECEEEB",
+"F. c #EDEEEB",
+"G. c #EDEFEB",
+"H. c #EDEEEC",
+"J. c #EEEEEC",
+"K. c #EEEFEC",
+"L. c #EFEFED",
+"P. c #EFF0E9",
+"I. c #EFF0ED",
+"U. c #EFF0EE",
+"Y. c #F0F0EE",
+"T. c #F0F1EF",
+"R. c #F1F1EF",
+"E. c #FDFCEA",
+"W. c #FDFCEC",
+"Q. c #FEFDEC",
+"!. c #FEFEEF",
+"~. c #F1F1F0",
+"^. c #F1F2F0",
+"/. c #F2F2F0",
+"(. c #F2F2F1",
+"). c #F2F3F1",
+"_. c #F3F3F2",
+"`. c #F3F4F2",
+"'. c #F4F4F3",
+"]. c #F5F5F4",
+"[. c #FEFEF6",
+"{. c #FEFEF7",
+"}. c #FDFDF9",
+"|. c #FEFEF8",
+" X c #FEFEFA",
+".X c #FEFEFB",
+"XX c #FEFEFE",
+"oX c gray100",
+"OX c None",
+/* pixels */
+"OXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOX",
+"OXOXOXE T Y Y U I P G H S 3 OXOXOXOXOXOXOXOXOXOX",
+"OXOXR ;.XXoXoXoXoXQ.p.*.] 0 = > O OXOXOXOXOXOXOX",
+"OXOXL XXG.C.N.b.9.:. .! t 6 ; @ + OXOXOXOXOX",
+"OXOXK oXN.m.b.e.<...` 5 : {.oX % O + OXOXOXOX",
+"OXOXJ oXb.v.l.7.#._ 3.oXoX!. + OXOXOX",
+"OXOXF oXl.k.j.6.X. =.}.oXoXoXoXoXoXoXa. OXOXOX",
+"OXOXD oXj.h.g.,.} w .XoXoXoXoXoXoXoX o + OXOX",
+"OXOXA oXg.f.f.>.{ q y XXoXoXoXoXoXi. o + OXOX",
+"OXOXZ oXd.f.q.4.| e , W.oXoXoXoXoX . o + OXOX",
+"OXOXV oX0.f.s.5.X.W 4 XoXoXoXoXoX $ o OXOXOX",
+"OXOXB oXf.g.h.w.$.' 9 oX[. E.oX - + OXOXOX",
+"OXOXN oXz.x.c.b.r.O.Q 8 # X 7 * OXOXOXOX",
+"OXOXM oXn.m.M.N.V.8.o.~ r 6 1 < 1 6 ( 2 OXOXOXOX",
+"OXOXm oXB.C.Z.A.A.S.t.@.[ ) / u / ^ +.C OXOXOXOX",
+"OXOXn oXZ.A.S.F.H.K.L.P.u.2.&.%.1.y.|.z OXOXOXOX",
+"OXOXb oXA.S.F.K.I.Y.R.^.(.).).(./.R.oXl OXOXOXOX",
+"OXOXv oXS.F.K.I.Y.R./._.'.].].'._.).oXk OXOXOXOX",
+"OXOXc oXS.F.J.L.U.T.^.)._.`.`._.)./.oXh OXOXOXOX",
+"OXOXx XXF.S.D.H.K.I.Y.T.T.R.R.R.T.~.XXh OXOXOXOX",
+"OXOXg -.XXoXoXoXoXoXoXoXoXoXoXoXoXXX-.p OXOXOXOX",
+"OXOXOXi j h h h g f f f d d d s a d & OXOXOXOXOX",
+"OXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOX",
+"OXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOX"
+};
--- /dev/null
+/* XPM */
+static char *riece_command_list_addons[] = {
+/* columns rows colors chars-per-pixel */
+"24 24 76 1",
+" c #2E3436",
+". c #343A3B",
+"X c #414646",
+"o c #4D5252",
+"O c #555753",
+"+ c #5A5E5D",
+"@ c #676A68",
+"# c #737673",
+"$ c #80827E",
+"% c #868984",
+"& c #888A85",
+"* c #898B86",
+"= c #898C87",
+"- c #8D908B",
+"; c #8F928C",
+": c #BABDB6",
+"> c gray78",
+", c #C8C8C8",
+"< c gray79",
+"1 c #CACBC9",
+"2 c #CACACA",
+"3 c #CBCBCB",
+"4 c gray80",
+"5 c #CDCDCD",
+"6 c #CECFCD",
+"7 c #CECECE",
+"8 c gray81",
+"9 c #D0D0D0",
+"0 c gray82",
+"q c #D2D2D2",
+"w c LightGray",
+"e c #D5D5D5",
+"r c gray86",
+"t c gainsboro",
+"y c #DDDDDD",
+"u c gray87",
+"i c #DFDFDF",
+"p c gray88",
+"a c #E1E1E0",
+"s c #E1E1E1",
+"d c #E2E2E1",
+"f c #E2E2E2",
+"g c #E3E3E2",
+"h c gray89",
+"j c #E4E4E3",
+"k c #E4E4E4",
+"l c #E5E5E4",
+"z c gray90",
+"x c #E6E6E5",
+"c c #E7E7E6",
+"v c #E8E8E6",
+"b c #E8E8E7",
+"n c #E9E9E7",
+"m c #E9E9E8",
+"M c #EAEAE8",
+"N c #EAEAE9",
+"B c #EBEBE9",
+"V c #EBEBEA",
+"C c #ECECEA",
+"Z c #ECECEB",
+"A c #EFEFEF",
+"S c gray94",
+"D c #F1F1F1",
+"F c gray95",
+"G c #F3F3F2",
+"H c #F3F3F3",
+"J c #F4F4F4",
+"K c #F5F5F4",
+"L c gray96",
+"P c #F6F6F5",
+"I c #F6F6F6",
+"U c #F7F7F6",
+"Y c gray97",
+"T c #FEFEFE",
+"R c gray100",
+"E c None",
+/* pixels */
+"EEEEEEEEEEEEEEEEEEEEEEEE",
+"EEEEEEEEEEEEEEEEEEEEEEEE",
+"EEEEEEEEEEEEEEEEEEEEEEEE",
+"EE-*&&&&&&&&&&&&&&&*-EEE",
+"E;6LUUIPPLLKJJHHHHHD1;EE",
+"E*LZVBNMnbcxljhfsppsD*EE",
+"E&UVOOOOOmbcxljhfsppH&EE",
+"E&UBORRROM xl spH&EE",
+"E&INO:::OB...cx...daH&EE",
+"E&PmOOOOOBXXXcOOOOOsH&EE",
+"E&LbmoooCBooobORRROfH&EE",
+"E&Lcb+++BB+++bO:::OgH&EE",
+"E&Lxc@@@MM@@@bOOOOOhH&EE",
+"E&Hlx###nOOOOOv###khG&EE",
+"E&Fjl$$$cORRROc$$$ljF&EE",
+"E&Dgj&&&xO:::Oc&&&ljD&EE",
+"E&SdghjllOOOOOxxxlljD&EE",
+"E&IdsfgjjllzxxxxllklY&EE",
+"E&HTRRRRRRRRRRRRRRRTA&EE",
+"E*zewq0988754322<,>,u*EE",
+"E=8hkhffspppiiuyyytr2=EE",
+"EE%*&&&&&&&&&&&&&&&*%EEE",
+"EEEEEEEEEEEEEEEEEEEEEEEE",
+"EEEEEEEEEEEEEEEEEEEEEEEE"
+};
--- /dev/null
+/* XPM */
+static char *riece_command_next_channel[] = {
+/* columns rows colors chars-per-pixel */
+"24 24 83 1",
+" c #1F4884",
+". c #1F4B86",
+"X c #1F4B87",
+"o c #204A87",
+"O c #214A87",
+"+ c #204B87",
+"@ c #214C87",
+"# c #204A88",
+"$ c #204B88",
+"% c #214B88",
+"& c #214B89",
+"* c #224B88",
+"= c #224A8A",
+"- c #214C88",
+"; c #204C89",
+": c #214C89",
+"> c #224C88",
+", c #234D8A",
+"< c #244E89",
+"1 c #264F8B",
+"2 c #254F8C",
+"3 c #29528E",
+"4 c #2B548E",
+"5 c #2F5D9B",
+"6 c #365F97",
+"7 c #32619F",
+"8 c #3765A2",
+"9 c #3666A3",
+"0 c #3465A4",
+"q c #3767A5",
+"w c #3B6AA5",
+"e c #3868A6",
+"r c #3A69A6",
+"t c #3B6BA7",
+"y c #3C6AA5",
+"u c #3C6BA7",
+"i c #3F6CA6",
+"p c #3F6CA7",
+"a c #3D6CA8",
+"s c #3F70AB",
+"d c #3F70AC",
+"f c #41689E",
+"g c #466EA4",
+"h c #416EA8",
+"j c #446FA8",
+"k c #4B72A7",
+"l c #4371AB",
+"z c #4471AB",
+"x c #4772AA",
+"c c #4070AC",
+"v c #4071AC",
+"b c #4171AC",
+"n c #4070AD",
+"m c #4071AD",
+"M c #4171AD",
+"N c #4272AD",
+"B c #4872AA",
+"V c #4E76AA",
+"C c #4C76AD",
+"Z c #4E76AD",
+"A c #5178AD",
+"S c #5079AE",
+"D c #4979B3",
+"F c #4A7AB3",
+"G c #4B7AB3",
+"H c #4D79B1",
+"J c #4C7BB4",
+"K c #4E7CB5",
+"L c #4E7DB5",
+"P c #507BB0",
+"I c #537FB5",
+"U c #5B83B5",
+"Y c #5982B6",
+"T c #5883B7",
+"R c #5B84B8",
+"E c #5A86BA",
+"W c #5E87B9",
+"Q c #628BBB",
+"! c #638CBC",
+"~ c #678EBD",
+"^ c #6B8FBE",
+"/ c #6990BF",
+"( c None",
+/* pixels */
+"((((((((((((((((((((((((",
+"((((((((((((((((((((((((",
+"((((((((((((((((((((((((",
+"(((((((((((+*(((((((((((",
+"(((((((((((+6:((((((((((",
+"(((((((((((+^f$(((((((((",
+"(((((((((((+//g$((((((((",
+"(((%+++++++>~L!k&(((((((",
+"(((;UQQQQQQ!EDGWV>((((((",
+"(((;RKFFFFFFDDDDTA<(((((",
+"(((;YJDDDDDDDDDDDIS1((((",
+"(((;PNcsdcccvbnmmMHZ+(((",
+"(((;Bq00000000000aC4=(((",
+"(((;jq0000000000ux3$((((",
+"(((;izlzzzzzu00th2%(((((",
+"(((##oooooo@p0ry,(((((((",
+"(((((((((((+we8-((((((((",
+"(((((((((((X97%(((((((((",
+"(((((((((((.5#((((((((((",
+"(((((((((((.O(((((((((((",
+"((((((((((( ((((((((((((",
+"((((((((((((((((((((((((",
+"((((((((((((((((((((((((",
+"(((((((((((((((((((((((("
+};
--- /dev/null
+/* XPM */
+static char *riece_command_part[] = {
+/* columns rows colors chars-per-pixel */
+"24 24 108 2",
+" c #4F514E",
+". c #51524F",
+"X c #535550",
+"o c #535652",
+"O c #545552",
+"+ c #545553",
+"@ c #555653",
+"# c #545753",
+"$ c #565753",
+"% c #555754",
+"& c #565754",
+"* c #565854",
+"= c #565954",
+"- c #575954",
+"; c #565855",
+": c #575855",
+"> c #565955",
+", c #575955",
+"< c #575A55",
+"1 c #575A56",
+"2 c #585955",
+"3 c #585A55",
+"4 c #585956",
+"5 c #585A56",
+"6 c #595A56",
+"7 c #585B56",
+"8 c #585A57",
+"9 c #585B57",
+"0 c #595B57",
+"q c #71726E",
+"w c #747672",
+"e c #757773",
+"r c #767874",
+"t c #777974",
+"y c #767875",
+"u c #777975",
+"i c #7A7B78",
+"p c #7A7C78",
+"a c #7D7F7A",
+"s c #7D7F7C",
+"d c #7F817D",
+"f c #81827E",
+"g c #80827F",
+"h c #828480",
+"j c #828481",
+"k c #838481",
+"l c #848582",
+"z c #858783",
+"x c #858784",
+"c c #868784",
+"v c #888A85",
+"b c #888986",
+"n c #888A86",
+"m c #898B86",
+"M c #898A87",
+"N c #8B8D8A",
+"B c #8C8E89",
+"V c #8C8D8A",
+"C c #8C8E8A",
+"Z c #8E8F8B",
+"A c #8E8F8C",
+"S c #8F8F8C",
+"D c #8F908C",
+"F c #8F918C",
+"G c #90928D",
+"H c #90928E",
+"J c #91928E",
+"K c #91938E",
+"L c #919390",
+"P c #929490",
+"I c #929590",
+"U c #939590",
+"Y c #939591",
+"T c #949691",
+"R c #949692",
+"E c #959792",
+"W c #959793",
+"Q c #969793",
+"! c #969893",
+"~ c #979994",
+"^ c #989A95",
+"/ c #999B97",
+"( c #9A9B97",
+") c #9B9D99",
+"_ c #9C9E9A",
+"` c #9E9F9B",
+"' c #A0A19D",
+"] c #A0A29D",
+"[ c #A0A29E",
+"{ c #A1A39F",
+"} c #A2A4A0",
+"| c #A4A6A1",
+" . c #A8A9A5",
+".. c #A9AAA6",
+"X. c #A9ABA7",
+"o. c #AAACA8",
+"O. c #ABACA8",
+"+. c #ABADA9",
+"@. c #ACADA9",
+"#. c #ACAEAA",
+"$. c #ADAEAA",
+"%. c #ADAEAB",
+"&. c #AEAFAC",
+"*. c #AEB0AC",
+"=. c #AFB0AC",
+"-. c #AEB0AD",
+";. c #AFB1AE",
+":. c None",
+/* pixels */
+":.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.",
+":.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.",
+":.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.",
+":.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.",
+":.:.:.:.:.9 7 7 :.:.:.:.:.:.:.:.6 0 8 :.:.:.:.:.",
+":.:.:.:.9 D ;.L 4 :.:.:.:.:.:.3 J ;.L 8 :.:.:.:.",
+":.:.:.:.5 -.F #.S 4 :.:.:.:.3 N +.G *.< :.:.:.:.",
+":.:.:.:.1 x .K @.A 5 :.:.3 V +.K .x 1 :.:.:.:.",
+":.:.:.:.:.1 M ..R %.Z 2 , C $.R ..M 1 :.:.:.:.:.",
+":.:.:.:.:.:.1 n o.~ =.A C &.~ o.n 1 :.:.:.:.:.:.",
+":.:.:.:.:.:.:.1 b O./ X.X./ O.b 1 :.:.:.:.:.:.:.",
+":.:.:.:.:.:.:.:.> l | ^ ^ | c > :.:.:.:.:.:.:.:.",
+":.:.:.:.:.:.:.:.: z { E E { j : :.:.:.:.:.:.:.:.",
+":.:.:.:.:.:.:.4 k } T ] ] T } k 4 :.:.:.:.:.:.:.",
+":.:.:.:.:.:.4 f ` G [ h g ' G ` f 4 :.:.:.:.:.:.",
+":.:.:.:.:.4 a ( B _ d : ; s ) B ( a 4 :.:.:.:.:.",
+":.:.:.:.< y W v ~ p : :.:., p ! v Q i $ :.:.:.:.",
+":.:.:.:.- I v Y u $ :.:.:.:.% r U m P = :.:.:.:.",
+":.:.:.:.+ e H w @ :.:.:.:.:.:.# q D t O :.:.:.:.",
+":.:.:.:.:.o * . :.:.:.:.:.:.:.:. & X :.:.:.:.:.",
+":.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.",
+":.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.",
+":.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.",
+":.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:."
+};
--- /dev/null
+/* XPM */
+static char *riece_command_previous_channel[] = {
+/* columns rows colors chars-per-pixel */
+"24 24 75 1",
+" c #1F4985",
+". c #204A86",
+"X c #204A87",
+"o c #214A87",
+"O c #204B87",
+"+ c #214C87",
+"@ c #204A88",
+"# c #214A88",
+"$ c #204B88",
+"% c #214B88",
+"& c #214C88",
+"* c #204C89",
+"= c #214C89",
+"- c #224D89",
+"; c #244D89",
+": c #244F8B",
+"> c #28528C",
+", c #2E5D9B",
+"< c #355D96",
+"1 c #305E9D",
+"2 c #3C639B",
+"3 c #3564A0",
+"4 c #3465A4",
+"5 c #3767A5",
+"6 c #3A68A3",
+"7 c #3868A6",
+"8 c #3B6AA7",
+"9 c #3B6BA7",
+"0 c #3C6BA7",
+"q c #3F6CA6",
+"w c #3E6CA8",
+"e c #3F70AB",
+"r c #3F70AC",
+"t c #41679D",
+"y c #456DA2",
+"u c #406EA9",
+"i c #446FA8",
+"p c #406FAC",
+"a c #4971A6",
+"s c #4471AB",
+"d c #4571AB",
+"f c #4572AB",
+"g c #4070AC",
+"h c #4071AC",
+"j c #4171AC",
+"k c #4070AD",
+"l c #4071AD",
+"z c #4171AD",
+"x c #4672AC",
+"c c #4972A9",
+"v c #4B73A9",
+"b c #4C74AB",
+"n c #4A74AC",
+"m c #4A75AD",
+"M c #4E78AF",
+"N c #4979B3",
+"B c #4A7AB3",
+"V c #4B7BB3",
+"C c #4D79B1",
+"Z c #4D7BB4",
+"A c #547FB5",
+"S c #5781B5",
+"D c #5883B8",
+"F c #5884B9",
+"G c #5D87BA",
+"H c #6089BA",
+"J c #618ABB",
+"K c #628BBC",
+"L c #638BBC",
+"P c #638CBC",
+"I c #6990BE",
+"U c #6E92BF",
+"Y c #6991C0",
+"T c #6D94C2",
+"R c None",
+/* pixels */
+"RRRRRRRRRRRRRRRRRRRRRRRR",
+"RRRRRRRRRRRRRRRRRRRRRRRR",
+"RRRRRRRRRRRRRRRRRRRRRRRR",
+"RRRRRRRRRRRR*XRRRRRRRRRR",
+"RRRRRRRRRRR$<XRRRRRRRRRR",
+"RRRRRRRRRR$2UXRRRRRRRRRR",
+"RRRRRRRRR%tITXRRRRRRRRRR",
+"RRRRRRRR%yKZY;OOOOOOO@RR",
+"RRRRRRR#aGVNFPLLLLLPHoRR",
+"RRRRRR=vDBNNNBBBBBBVJoRR",
+"RRRRR;bANNNNNNNNNNNNGoRR",
+"RRRR.cCzllkjhgggregpSoRR",
+"RRRR&>nw444444444444MoRR",
+"RRRRRR:iw44444444444moRR",
+"RRRRRRR-q0449sfffffxdoRR",
+"RRRRRRRR=684u+XXXXXXXXRR",
+"RRRRRRRRR&379XRRRRRRRRRR",
+"RRRRRRRRRR@15XRRRRRRRRRR",
+"RRRRRRRRRRRO,XRRRRRRRRRR",
+"RRRRRRRRRRRRXXRRRRRRRRRR",
+"RRRRRRRRRRRRR RRRRRRRRRR",
+"RRRRRRRRRRRRRRRRRRRRRRRR",
+"RRRRRRRRRRRRRRRRRRRRRRRR",
+"RRRRRRRRRRRRRRRRRRRRRRRR"
+};
--- /dev/null
+;;; riece-commands.el --- commands available in command buffer -*- lexical-binding: t -*-
+;; Copyright (C) 1998-2003 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., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
+
+;;; Code:
+
+(require 'riece-channel)
+(require 'riece-complete)
+(require 'riece-layout)
+(require 'riece-display)
+(require 'riece-server)
+(require 'riece-misc)
+(require 'riece-identity)
+(require 'riece-message)
+(require 'riece-mcat)
+
+;;; Channel movement:
+(defun riece-command-switch-to-channel (channel)
+ (interactive (list (riece-completing-read-identity
+ (riece-mcat "Switch to channel/user: ")
+ riece-current-channels nil t)))
+ (unless (equal channel riece-current-channel)
+ (riece-switch-to-channel channel)))
+
+(defun riece-command-switch-to-channel-by-number (number)
+ (interactive
+ (let ((command-name (symbol-name this-command)))
+ (if (string-match "[0-9]+$" command-name)
+ (list (string-to-number (match-string 0 command-name)))
+ (list (string-to-number (read-string (riece-mcat "Switch to number: ")))))))
+ (let ((channel (nth (1- number) riece-current-channels)))
+ (if channel
+ (riece-command-switch-to-channel channel)
+ (error "No such number!"))))
+
+(eval-and-compile
+ (let ((number 1))
+ (while (<= number 20)
+ (defalias (intern (concat "riece-command-switch-to-channel-by-number-"
+ (number-to-string number)))
+ 'riece-command-switch-to-channel-by-number)
+ (setq number (1+ number)))))
+
+(defun riece-command-next-channel ()
+ "Select the next channel."
+ (interactive)
+ (when (> (length riece-current-channels) 1)
+ (let ((pointer (cdr (riece-identity-member
+ riece-current-channel
+ riece-current-channels))))
+ (while (and pointer
+ (null (car pointer)))
+ (setq pointer (cdr pointer)))
+ (when (null pointer)
+ (setq pointer riece-current-channels)
+ (while (and pointer
+ (null (car pointer)))
+ (setq pointer (cdr pointer))))
+ (if (car pointer)
+ (riece-command-switch-to-channel (car pointer))
+ (error "No such channel!")))))
+
+(defun riece-command-previous-channel ()
+ "Select the previous channel."
+ (interactive)
+ (when (> (length riece-current-channels) 1)
+ (let ((pointer (riece-identity-member
+ riece-current-channel
+ riece-current-channels))
+ (start riece-current-channels)
+ channel)
+ (while (and start (not (eq start pointer)))
+ (if (car start)
+ (setq channel (car start)))
+ (setq start (cdr start)))
+ (when (null channel)
+ (setq start (copy-sequence riece-current-channels))
+ (setq start (delq nil start))
+ (and (> (length start) 1)
+ (setq channel (nth (1- (length start)) start))))
+ (if channel
+ (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
+ (if (car pointer)
+ (setq channels (riece-identity-assign-binding (car pointer) channels
+ binding)))
+ (setq 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)
+ (let ((window (get-buffer-window riece-command-buffer)))
+ (if window
+ (select-window window))))
+
+(defun riece-command-configure-windows ()
+ (interactive)
+ "Reconfigure windows with the current layout."
+ (riece-redisplay-buffers t))
+
+(defun riece-command-suspend-resume ()
+ (interactive)
+ "Save or restore the current window configuration."
+ (let ((entry (assq 'riece-window-configuration (frame-parameters))))
+ (modify-frame-parameters (selected-frame)
+ (list (cons 'riece-window-configuration
+ (current-window-configuration))))
+ (if (cdr entry)
+ (set-window-configuration (cdr entry))
+ (delete-other-windows))
+ (message
+ (substitute-command-keys
+ "\\[riece-command-suspend-resume] to get back the last windows"))))
+
+(defun riece-command-change-layout (name)
+ "Select a layout-name from all current available layouts and change
+the layout to the selected layout-name."
+ (interactive (list (completing-read (riece-mcat "Change layout: ")
+ riece-layout-alist)))
+ (setq riece-layout name
+ riece-save-variables-are-dirty t)
+ (riece-command-configure-windows))
+
+(defun riece-command-toggle-channel-buffer-mode ()
+ (interactive)
+ (setq riece-channel-buffer-mode
+ (not riece-channel-buffer-mode)
+ 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
+ (not riece-user-list-buffer-mode)
+ riece-save-variables-are-dirty t)
+ (riece-command-configure-windows))
+
+(defun riece-command-toggle-channel-list-buffer-mode ()
+ (interactive)
+ (setq riece-channel-list-buffer-mode
+ (not riece-channel-list-buffer-mode)
+ riece-save-variables-are-dirty t)
+ (riece-command-configure-windows))
+
+(defun riece-command-finger (user &optional recurse)
+ (interactive
+ (let* ((completion-ignore-case t)
+ (user (riece-completing-read-identity
+ (riece-mcat "Finger user: ")
+ (riece-get-users-on-server (riece-current-server-name))
+ nil nil nil nil nil t)))
+ (list user current-prefix-arg)))
+ (if recurse
+ (riece-send-string (format "WHOIS %s %s\r\n"
+ (riece-identity-prefix user)
+ (riece-identity-prefix user)))
+ (riece-send-string (format "WHOIS %s\r\n" (riece-identity-prefix user)))))
+
+(defun riece-command-topic (topic)
+ (interactive
+ (progn
+ (riece-check-channel-commands-are-usable t)
+ (list (read-from-minibuffer
+ (riece-mcat "Set topic: ")
+ (cons (or (riece-with-server-buffer
+ (riece-identity-server
+ riece-current-channel)
+ (riece-channel-get-topic
+ (riece-identity-prefix
+ riece-current-channel)))
+ "")
+ 0)))))
+ (riece-send-string (format "TOPIC %s :%s\r\n"
+ (riece-identity-prefix riece-current-channel)
+ topic)
+ riece-current-channel))
+
+(defun riece-command-invite (user)
+ (interactive
+ (let ((completion-ignore-case t))
+ (riece-check-channel-commands-are-usable t)
+ (list (riece-completing-read-identity
+ (riece-mcat "Invite user: ")
+ (riece-get-users-on-server (riece-current-server-name))
+ nil nil nil nil nil t))))
+ (riece-send-string (format "INVITE %s :%s\r\n"
+ (riece-identity-prefix user)
+ (riece-identity-prefix riece-current-channel))))
+
+(defun riece-command-kick (user &optional message)
+ (interactive
+ (let ((completion-ignore-case t))
+ (riece-check-channel-commands-are-usable t)
+ (list (completing-read
+ (riece-mcat "Kick user: ")
+ (riece-with-server-buffer
+ (riece-identity-server riece-current-channel)
+ (riece-channel-get-users (riece-identity-prefix
+ riece-current-channel))))
+ (if current-prefix-arg
+ (read-string "Message: ")))))
+ (riece-send-string
+ (if message
+ (format "KICK %s %s :%s\r\n"
+ (riece-identity-prefix riece-current-channel)
+ user message)
+ (format "KICK %s %s\r\n"
+ (riece-identity-prefix riece-current-channel)
+ user))
+ riece-current-channel))
+
+(defun riece-command-kick-with-ban (user pattern &optional message)
+ (interactive
+ (let ((completion-ignore-case t)
+ user)
+ (riece-check-channel-commands-are-usable t)
+ (riece-with-server-buffer (riece-identity-server riece-current-channel)
+ (setq user (completing-read
+ (riece-mcat "Kick user: ")
+ (riece-channel-get-users (riece-identity-prefix
+ riece-current-channel))))
+ (list
+ user
+ (read-from-minibuffer
+ (riece-mcat "Ban pattern: ")
+ (concat user "!" (riece-user-get-user-at-host user)))
+ (if current-prefix-arg
+ (read-string "Message: "))))))
+ (riece-send-string (format "MODE %s :+b %s\r\n"
+ (riece-identity-prefix riece-current-channel)
+ pattern)
+ riece-current-channel)
+ (riece-send-string
+ (if message
+ (format "KICK %s %s :%s\r\n"
+ (riece-identity-prefix riece-current-channel)
+ user message)
+ (format "KICK %s %s\r\n"
+ (riece-identity-prefix riece-current-channel)
+ user))
+ riece-current-channel))
+
+(defun riece-command-names (pattern)
+ (interactive
+ (let ((completion-ignore-case t))
+ (list (read-from-minibuffer
+ (riece-mcat "NAMES pattern: ")
+ (if (and riece-current-channel
+ (riece-channel-p (riece-identity-prefix
+ riece-current-channel)))
+ (cons (riece-identity-prefix riece-current-channel)
+ 0))))))
+ (if (or (not (equal pattern ""))
+ (yes-or-no-p (riece-mcat
+ "Really want to query NAMES without argument? ")))
+ (riece-send-string (format "NAMES %s\r\n" pattern))))
+
+(defun riece-command-who (pattern)
+ (interactive
+ (let ((completion-ignore-case t))
+ (list (read-from-minibuffer
+ (riece-mcat "WHO pattern: ")
+ (if (and riece-current-channel
+ (riece-channel-p (riece-identity-prefix
+ riece-current-channel)))
+ (cons (riece-identity-prefix riece-current-channel)
+ 0))))))
+ (if (or (not (equal pattern ""))
+ (yes-or-no-p (riece-mcat
+ "Really want to query WHO without argument? ")))
+ (riece-send-string (format "WHO %s\r\n" pattern))))
+
+(defun riece-command-list (pattern)
+ (interactive
+ (let ((completion-ignore-case t))
+ (list (read-from-minibuffer
+ (riece-mcat "LIST pattern: ")
+ (if (and riece-current-channel
+ (riece-channel-p (riece-identity-prefix
+ riece-current-channel)))
+ (cons (riece-identity-prefix riece-current-channel)
+ 0))))))
+ (if (or (not (equal pattern ""))
+ (yes-or-no-p (riece-mcat
+ "Really want to query LIST without argument? ")))
+ (riece-send-string (format "LIST %s\r\n" pattern))))
+
+(defvar riece-temp-minibuffer-message)
+(defvar riece-overriding-server-name)
+(defun riece-command-change-mode (channel change)
+ (interactive
+ (let* ((completion-ignore-case t)
+ (channel
+ (if current-prefix-arg
+ (riece-completing-read-identity
+ (riece-mcat "Change mode for channel/user: ")
+ (riece-get-identities-on-server (riece-current-server-name))
+ nil nil nil nil nil t)
+ (riece-check-channel-commands-are-usable t)
+ riece-current-channel))
+ (riece-overriding-server-name (riece-identity-server channel))
+ (riece-temp-minibuffer-message
+ (concat (riece-mcat "[Available modes: ")
+ (riece-with-server-buffer (riece-identity-server channel)
+ (if (riece-channel-p (riece-identity-prefix channel))
+ (if riece-supported-channel-modes
+ (apply #'string riece-supported-channel-modes))
+ (if riece-supported-user-modes
+ (apply #'string riece-supported-user-modes))))
+ "]")))
+ (list channel
+ (read-from-minibuffer
+ (concat (riece-concat-channel-modes
+ channel (riece-mcat "Mode (? for help)")) ": ")
+ nil riece-minibuffer-map))))
+ (if (equal change "")
+ (riece-send-string (format "MODE %s\r\n"
+ (riece-identity-prefix channel)))
+ (riece-send-string (format "MODE %s %s\r\n"
+ (riece-identity-prefix channel)
+ change))))
+
+(defun riece-command-set-operators (users &optional _arg)
+ (interactive
+ (progn
+ (riece-check-channel-commands-are-usable t)
+ (let ((completion-ignore-case t))
+ (list (riece-completing-read-multiple
+ (if current-prefix-arg
+ (riece-mcat "Unset +o for users")
+ (riece-mcat "Set +o for users"))
+ (riece-with-server-buffer
+ (riece-identity-server riece-current-channel)
+ (riece-channel-get-users (riece-identity-prefix
+ riece-current-channel)))
+ (if current-prefix-arg
+ (lambda (user)
+ (memq ?o (cdr user)))
+ (lambda (user)
+ (not (memq ?o (cdr user))))))
+ current-prefix-arg))))
+ (let (group)
+ (while users
+ (setq group (cons (car users) group)
+ users (cdr users))
+ (when (or (= (length group) 3)
+ (null users))
+ (riece-send-string
+ (format "MODE %s %c%s %s\r\n"
+ (riece-identity-prefix riece-current-channel)
+ (if current-prefix-arg
+ ?-
+ ?+)
+ (make-string (length group) ?o)
+ (mapconcat #'identity (nreverse group) " ")))
+ (setq group nil)))))
+
+(defun riece-command-set-speakers (users &optional _arg)
+ (interactive
+ (progn
+ (riece-check-channel-commands-are-usable t)
+ (let ((completion-ignore-case t))
+ (list (riece-completing-read-multiple
+ (if current-prefix-arg
+ (riece-mcat "Unset +v for users")
+ (riece-mcat "Set +v for users"))
+ (riece-with-server-buffer
+ (riece-identity-server riece-current-channel)
+ (riece-channel-get-users (riece-identity-prefix
+ riece-current-channel)))
+ (if current-prefix-arg
+ (lambda (user)
+ (memq ?v (cdr user)))
+ (lambda (user)
+ (not (memq ?v (cdr user))))))
+ current-prefix-arg))))
+ (let (group)
+ (while users
+ (setq group (cons (car users) group)
+ users (cdr users))
+ (when (or (= (length group) 3)
+ (null users))
+ (riece-send-string
+ (format "MODE %s %c%s %s\r\n"
+ (riece-identity-prefix riece-current-channel)
+ (if current-prefix-arg
+ ?-
+ ?+)
+ (make-string (length group) ?v)
+ (mapconcat #'identity (nreverse group) " ")))
+ (setq group nil)))))
+
+(defun riece-command-send-message (message notice)
+ "Send MESSAGE to the current channel."
+ (run-hooks 'riece-command-send-message-hook)
+ (if (equal message "")
+ (error (riece-mcat "No text to send")))
+ (riece-check-channel-commands-are-usable)
+ (if notice
+ (progn
+ (riece-send-string
+ (format "NOTICE %s :%s\r\n"
+ (riece-identity-prefix riece-current-channel)
+ message)
+ riece-current-channel)
+ (riece-display-message
+ (riece-make-message (riece-current-nickname) riece-current-channel
+ message 'notice t)))
+ (riece-send-string
+ (format "PRIVMSG %s :%s\r\n"
+ (riece-identity-prefix riece-current-channel)
+ message)
+ riece-current-channel)
+ (riece-display-message
+ (riece-make-message (riece-current-nickname) riece-current-channel
+ message nil t))))
+
+(defun riece-command-enter-message ()
+ "Send the current line to the current channel."
+ (interactive)
+ (riece-command-send-message (buffer-substring
+ (riece-line-beginning-position)
+ (riece-line-end-position))
+ nil)
+ (forward-line 1)
+ (when (eobp)
+ (insert "\n")))
+
+
+(defun riece-command-enter-message-as-notice ()
+ "Send the current line to the current channel as NOTICE."
+ (interactive)
+ (riece-command-send-message (buffer-substring
+ (riece-line-beginning-position)
+ (riece-line-end-position))
+ t)
+ (forward-line 1)
+ (when (eobp)
+ (insert "\n")))
+
+(defun riece-command-enter-message-to-user (user)
+ "Send the current line to USER."
+ (interactive
+ (if (and (bolp) (eolp))
+ (error "No text to send")
+ (let ((completion-ignore-case t))
+ (list (riece-completing-read-identity
+ (riece-mcat "Message to user: ")
+ (riece-get-users-on-server (riece-current-server-name))
+ nil nil nil nil nil t)))))
+ (let ((text (buffer-substring
+ (riece-line-beginning-position)
+ (riece-line-end-position))))
+ (riece-send-string
+ (format "PRIVMSG %s :%s\r\n" (riece-identity-prefix user) text)
+ user)
+ (riece-display-message
+ (riece-make-message (riece-current-nickname) user text nil t)))
+ (forward-line 1)
+ (when (eobp)
+ (insert "\n")))
+
+(defun riece-command-join-channel (target key)
+ (unless (riece-server-opened (riece-identity-server target))
+ (error "%s" (substitute-command-keys
+ "Type \\[riece-command-open-server] to open server.")))
+ (riece-send-string (if key
+ (format "JOIN %s :%s\r\n"
+ (riece-identity-prefix target)
+ key)
+ (format "JOIN %s\r\n"
+ (riece-identity-prefix target)))
+ target))
+
+(defun riece-command-join-partner (target)
+ (let ((pointer (riece-identity-member target riece-current-channels)))
+ (if pointer
+ (riece-command-switch-to-channel (car pointer))
+ (riece-join-channel target)
+ (riece-switch-to-channel target))))
+
+(defun riece-command-join (targets)
+ (interactive
+ (let ((completion-ignore-case t)
+ (candidates (mapcar (lambda (channel)
+ (list (riece-format-identity channel)))
+ (delq nil (riece-get-identities-on-server
+ (riece-current-server-name)))))
+ (default (if riece-join-channel-candidate
+ (riece-format-identity
+ riece-join-channel-candidate))))
+ (list
+ (mapcar #'riece-parse-identity
+ (riece-completing-read-multiple
+ (if default
+ (format (riece-mcat "Join channel/user (default %s)")
+ default)
+ (riece-mcat "Join channel/user"))
+ candidates nil nil nil nil default)))))
+ (let (pointer)
+ (if (and (= (length targets) 1)
+ (setq pointer (riece-identity-member (car targets)
+ riece-current-channels)))
+ (riece-command-switch-to-channel (car pointer))
+ (setq pointer targets)
+ (while pointer
+ (if (riece-channel-p (riece-identity-prefix (car pointer)))
+ (riece-command-join-channel (car pointer) nil)
+ (riece-command-join-partner (car pointer)))
+ (setq pointer (cdr pointer))))))
+
+(defun riece-command-part-channel (target message)
+ (unless (riece-server-opened (riece-identity-server target))
+ (error "%s" (substitute-command-keys
+ "Type \\[riece-command-open-server] to open server.")))
+ (riece-send-string (if message
+ (format "PART %s :%s\r\n"
+ (riece-identity-prefix target)
+ message)
+ (format "PART %s\r\n"
+ (riece-identity-prefix target)))
+ target))
+
+(defun riece-command-part (target &optional message)
+ (interactive
+ (progn
+ (riece-check-channel-commands-are-usable)
+ (let* ((completion-ignore-case t)
+ (target
+ (riece-completing-read-identity
+ (format (riece-mcat "Part from channel/user (default %s): ")
+ (riece-format-identity riece-current-channel))
+ riece-current-channels nil nil nil nil
+ (riece-format-identity riece-current-channel)))
+ (message
+ (if current-prefix-arg
+ (read-string (riece-mcat "Message: "))
+ riece-part-message)))
+ (list target message))))
+ (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))
+ (error "You are not talking with %s" target)))
+
+(defun riece-command-change-nickname (nickname)
+ "Change your nickname to NICK."
+ (interactive "sEnter your nickname: ")
+ (riece-send-string (format "NICK %s\r\n" nickname)))
+
+(defun riece-command-scroll-down (lines)
+ "Scroll LINES down dialogue buffer from command buffer."
+ (interactive "P")
+ (let ((buffer (if (and riece-channel-buffer-mode
+ riece-current-channel)
+ riece-channel-buffer
+ riece-dialogue-buffer)))
+ (if (get-buffer-window buffer)
+ (condition-case nil
+ (let ((other-window-scroll-buffer buffer))
+ (scroll-other-window-down lines))
+ (beginning-of-buffer
+ (message (riece-mcat "Beginning of buffer")))))))
+
+(defun riece-command-scroll-up (lines)
+ "Scroll LINES up dialogue buffer from command buffer."
+ (interactive "P")
+ (let ((buffer (if (and riece-channel-buffer-mode
+ riece-current-channel)
+ riece-channel-buffer
+ riece-dialogue-buffer)))
+ (if (get-buffer-window buffer)
+ (condition-case nil
+ (let ((other-window-scroll-buffer buffer))
+ (scroll-other-window lines))
+ (end-of-buffer
+ (message (riece-mcat "End of buffer")))))))
+
+(defun riece-command-user-list-scroll-down (lines)
+ "Scroll LINES down user list buffer from command buffer."
+ (interactive "P")
+ (if (get-buffer-window riece-user-list-buffer)
+ (condition-case nil
+ (let ((other-window-scroll-buffer riece-user-list-buffer))
+ (scroll-other-window-down lines))
+ (beginning-of-buffer
+ (message (riece-mcat "Beginning of buffer"))))))
+
+(defun riece-command-user-list-scroll-up (lines)
+ "Scroll LINES up user list buffer from command buffer."
+ (interactive "P")
+ (if (get-buffer-window riece-user-list-buffer)
+ (condition-case nil
+ (let ((other-window-scroll-buffer riece-user-list-buffer))
+ (scroll-other-window lines))
+ (end-of-buffer
+ (message (riece-mcat "End of buffer"))))))
+
+(defun riece-command-toggle-away (&optional message)
+ "Mark yourself as being away."
+ (interactive
+ (if (and (not (riece-with-server-buffer (riece-identity-server
+ (riece-current-nickname))
+ (riece-user-get-away (riece-identity-prefix
+ (riece-current-nickname)))))
+ current-prefix-arg)
+ (list (read-from-minibuffer
+ (riece-mcat "Away message: ") (cons (or riece-away-message "")
+ 0)))))
+ (if (riece-with-server-buffer (riece-identity-server
+ (riece-current-nickname))
+ (riece-user-get-away (riece-identity-prefix
+ (riece-current-nickname))))
+ (riece-send-string "AWAY\r\n")
+ (riece-send-string (format "AWAY :%s\r\n" (or message
+ riece-away-message)))))
+
+(defun riece-command-toggle-freeze (&optional arg)
+ "Prevent automatic scrolling of the dialogue window.
+If prefix argument ARG is non-nil, toggle frozen status."
+ (interactive "P")
+ (with-current-buffer (if (riece-derived-mode-p '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-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 (riece-derived-mode-p '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-emit-signal 'buffer-freeze-changed
+ (current-buffer) riece-freeze)))
+
+(eval-when-compile
+ (autoload 'riece-exit "riece"))
+(defun riece-command-quit (&optional arg)
+ "Quit IRC."
+ (interactive "P")
+ (if (null riece-server-process-alist)
+ (progn
+ (message (riece-mcat "No server process"))
+ (ding))
+ (if (y-or-n-p (riece-mcat "Really quit IRC? "))
+ (let ((message
+ (if arg
+ (read-string (riece-mcat "Message: "))
+ riece-quit-message))
+ (alist riece-server-process-alist))
+ (while alist
+ (riece-quit-server-process (cdr (car alist)) message)
+ (setq alist (cdr alist)))))))
+
+(defun riece-command-raw (command)
+ "Enter raw IRC command, which is sent to the server."
+ (interactive "sIRC command: ")
+ (riece-send-string (concat command "\r\n")))
+
+(defun riece-command-beginning-of-buffer ()
+ "Scroll channel buffer to the beginning."
+ (interactive)
+ (let (buffer window)
+ (setq buffer (if riece-channel-buffer-mode
+ riece-channel-buffer
+ riece-dialogue-buffer))
+ (or (setq window (get-buffer-window buffer))
+ (setq window (get-buffer-window riece-dialogue-buffer)
+ buffer riece-dialogue-buffer))
+ (when window
+ (save-selected-window
+ (select-window window)
+ (goto-char (point-min))))))
+
+(defun riece-command-end-of-buffer ()
+ "Scroll channel buffer to the end."
+ (interactive)
+ (let (buffer window)
+ (setq buffer (if riece-channel-buffer-mode
+ riece-channel-buffer
+ riece-dialogue-buffer))
+ (or (setq window (get-buffer-window buffer))
+ (setq window (get-buffer-window riece-dialogue-buffer)
+ buffer riece-dialogue-buffer))
+ (when window
+ (save-selected-window
+ (select-window window)
+ (goto-char (point-max))))))
+
+(defun riece-command-copy-region (start end)
+ "Move current region between START and END to `kill-ring'."
+ (interactive "r")
+ (kill-new (buffer-substring-no-properties start end)))
+
+(defun riece-command-complete-user ()
+ "Complete a user name in the current buffer."
+ (interactive)
+ (let* ((completion-ignore-case t)
+ (table (mapcar (lambda (user)
+ (list (riece-format-identity user t)))
+ (riece-get-users-on-server
+ (riece-current-server-name))))
+ (current (or (current-word) ""))
+ (completion (try-completion current table))
+ (all (all-completions current table)))
+ (if (eq completion t)
+ nil
+ (if (null completion)
+ (message (riece-mcat "Can't find completion for \"%s\"") current)
+ (if (equal current completion)
+ (with-output-to-temp-buffer "*Help*"
+ (display-completion-list all))
+ (re-search-forward "\\>" nil t)
+ (delete-region (point) (- (point) (length current)))
+ (insert completion))))))
+
+(defun riece-command-open-server (server-name)
+ (interactive
+ (list (completing-read (riece-mcat "Open server: ") riece-server-alist)))
+ (if (riece-server-process server-name)
+ (error "%s is already opened" server-name))
+ (riece-open-server
+ (riece-server-name-to-server (if (equal server-name "")
+ riece-server
+ server-name))
+ server-name))
+
+(defun riece-command-close-server (server-name &optional message)
+ (interactive
+ (list (completing-read (riece-mcat "Close server: ")
+ riece-server-process-alist)
+ (if current-prefix-arg
+ (read-string (riece-mcat "Message: "))
+ riece-quit-message)))
+ (let ((process (riece-server-process server-name)))
+ (unless process
+ (error "%s is not opened" server-name))
+ (riece-quit-server-process process message)))
+
+(defun riece-command-universal-server-name-argument ()
+ (interactive)
+ (let* ((riece-overriding-server-name
+ (completing-read (riece-mcat "Server: ") riece-server-process-alist))
+ (command
+ (key-binding (read-key-sequence
+ (format (riece-mcat "Command to execute on \"%s\":")
+ riece-overriding-server-name)))))
+ (message "")
+ (call-interactively command)))
+
+(eval-when-compile
+ (autoload 'riece-save-variables-files "riece"))
+(defun riece-command-save-variables ()
+ "Save `riece-variables-file'."
+ (interactive)
+ (if (or riece-save-variables-are-dirty
+ (y-or-n-p (riece-mcat "No changes made. Save anyway? ")))
+ (riece-save-variables-files)))
+
+(provide 'riece-commands)
+
+;;; riece-commands.el ends here
--- /dev/null
+;;; riece-compat.el --- compatibility functions -*- lexical-binding: t -*-
+;; Copyright (C) 1998-2003 Daiki Ueno
+
+;; Author: Daiki Ueno <ueno@unixuser.org>
+;; Created: 1998-09-28
+;; Keywords: IRC, riece, APEL
+
+;; 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., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
+
+;;; Code:
+
+(if (featurep 'xemacs)
+ (require 'riece-xemacs)
+ (require 'riece-emacs))
+
+(defalias 'riece-mode-line-buffer-identification
+ 'identity)
+
+(defun riece-simplify-mode-line-format ()
+ "Remove unnecessary information from `mode-line-format'."
+ (let ((value (rassq 'mode-line-modified mode-line-format)))
+ (if value
+ (setq mode-line-format (delq value (copy-sequence mode-line-format)))
+ mode-line-format)))
+
+(defun riece-line-beginning-position ()
+ (save-excursion
+ (beginning-of-line)
+ (point)))
+
+(defun riece-line-end-position ()
+ (save-excursion
+ (end-of-line)
+ (point)))
+
+(autoload 'read-passwd "passwd")
+(defvar riece-read-passwd #'read-passwd)
+(defun riece-read-passwd (prompt)
+ (funcall riece-read-passwd prompt))
+
+(if (string-match "0\\{0\\}" "")
+ (defun riece-make-interval-regexp (regexp min &optional max)
+ (if max
+ (format "%s\\{%d,%d\\}" regexp min max)
+ (format "%s\\{%d\\}" regexp min)))
+ ;; Emacs 20.7 doesn't support \{...\} in regexps.
+ (defun riece-make-interval-regexp (regexp min &optional max)
+ (mapconcat #'identity
+ (nconc (make-list min regexp)
+ (if max
+ (make-list (- max min) (concat regexp "?"))))
+ "")))
+
+(if (or (not (fboundp 'make-local-hook))
+ (get 'make-local-hook 'byte-obsolete-info))
+ (defalias 'riece-make-local-hook 'ignore)
+ (defalias 'riece-make-local-hook 'make-local-hook))
+
+(autoload 'derived-mode-class "derived")
+(if (fboundp 'derived-mode-p)
+ (defalias 'riece-derived-mode-p 'derived-mode-p)
+ (defun riece-derived-mode-p (&rest modes)
+ (memq (derived-mode-class major-mode) modes)))
+
+(if (fboundp 'set-process-query-on-exit-flag)
+ (defalias 'riece-set-process-query-on-exit-flag
+ 'set-process-query-on-exit-flag)
+ (defalias 'riece-set-process-query-on-exit-flag
+ 'process-kill-without-query))
+
+(provide 'riece-compat)
+
+;;; riece-compat.el ends here
--- /dev/null
+;;; riece-complete.el --- completion -*- lexical-binding: t -*-
+;; Copyright (C) 1998-2003 Daiki Ueno
+
+;; Author: Daiki Ueno <ueno@unixuser.org>
+;; Created: 1999-02-02
+;; Keywords: minibuffer, completion
+
+;; 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., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
+
+;;; Code:
+
+(eval-when-compile (require 'cl)) ;butlast
+
+(require 'riece-compat)
+
+(defvar riece-minibuffer-map
+ (let ((map (make-sparse-keymap)))
+ (set-keymap-parent map minibuffer-local-map)
+ (define-key map "?" 'riece-minibuffer-help)
+ map))
+
+(defvar riece-temp-minibuffer-message nil)
+
+;; stolen (and renamed) from XEmacs's minibuf.el.
+(defun riece-temp-minibuffer-message (message)
+ (let ((end (point-max)))
+ (save-excursion
+ (goto-char (point-max))
+ (message nil)
+ (insert message))
+ (let ((inhibit-quit t))
+ (sit-for 2)
+ (delete-region end (point-max)))))
+
+(defun riece-minibuffer-help ()
+ (interactive)
+ (if riece-temp-minibuffer-message
+ (riece-temp-minibuffer-message riece-temp-minibuffer-message)))
+
+;;; stolen (and renamed) from crm.el.
+(defvar riece-completing-read-multiple-separator ",")
+(defvar riece-completing-read-multiple-table nil)
+
+(defun riece-completing-read-multiple-1 (string predicate flag)
+ "Function used by `riece-completing-read-multiple'.
+The value of STRING is the string to be completed.
+
+The value of PREDICATE is a function to filter possible matches, or
+nil if none.
+
+The value of FLAG is used to specify the type of completion operation.
+A value of nil specifies `try-completion'. A value of t specifies
+`all-completions'. A value of lambda specifes a test for an exact match.
+
+For more information on STRING, PREDICATE, and FLAG, see the Elisp
+Reference sections on 'Programmed Completion' and 'Basic Completion
+Functions'."
+ (let ((except (split-string string riece-completing-read-multiple-separator))
+ (table (copy-sequence riece-completing-read-multiple-table))
+ lead)
+ ;; Remove a partially matched word construct if it exists.
+ (or (string-match
+ (concat riece-completing-read-multiple-separator "$")
+ string)
+ (setq except (butlast except)))
+ (when (string-match
+ (concat ".*" riece-completing-read-multiple-separator)
+ string)
+ (setq lead (substring string 0 (match-end 0))
+ string (substring string (match-end 0))))
+ (while except
+ (let ((entry (assoc (car except) table)))
+ (if entry
+ (setq table (delq entry table)))
+ (setq except (cdr except))))
+ (if (null flag)
+ (progn
+ (setq string (try-completion string table predicate))
+ (or (eq t string)
+ (concat lead string)))
+ (if (eq flag 'lambda)
+ (eq t (try-completion string table predicate))
+ (if flag
+ (all-completions string table predicate))))))
+
+(defun riece-completing-read-multiple
+ (prompt table &optional predicate require-match initial-input
+ history default)
+ "Execute `completing-read' consequently.
+
+See the documentation for `completing-read' for details on the arguments:
+PROMPT, TABLE, PREDICATE, REQUIRE-MATCH, INITIAL-INPUT, HISTORY, DEFAULT."
+ (let ((prompt
+ (format "%s (separated by \"%s\"): "
+ prompt riece-completing-read-multiple-separator))
+ (riece-completing-read-multiple-table table))
+ (split-string
+ (completing-read
+ prompt #'riece-completing-read-multiple-1
+ predicate require-match initial-input history default)
+ riece-completing-read-multiple-separator)))
+
+(provide 'riece-complete)
+
+;;; riece-complete.el ends here
--- /dev/null
+;;; riece-ctcp.el --- CTCP (Client To Client Protocol) support -*- lexical-binding: t -*-
+;; Copyright (C) 1998-2003 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., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
+
+;;; Commentary:
+
+;; NOTE: This is an add-on module for Riece.
+
+;;; Code:
+
+(require 'riece-version)
+(require 'riece-misc)
+(require 'riece-highlight)
+(require 'riece-display)
+(require 'riece-debug)
+(require 'riece-mcat)
+(require 'riece-message)
+
+(defface riece-ctcp-action-face
+ '((((class color)
+ (background dark))
+ (:foreground "PaleGreen" :italic t))
+ (((class color)
+ (background light))
+ (:foreground "ForestGreen" :italic t))
+ (t
+ (:bold t)))
+ "Face used for displaying \"*** Action:\" line"
+ :group 'riece-highlight-faces)
+(defvar riece-ctcp-action-face 'riece-ctcp-action-face)
+
+(defconst riece-ctcp-action-prefix "*** Action: ")
+
+(defvar riece-ctcp-ping-time nil)
+(defvar riece-ctcp-additional-clientinfo nil)
+
+(defvar riece-dialogue-mode-map)
+
+(defconst riece-ctcp-description
+ "CTCP (Client To Client Protocol) support.")
+
+(defun riece-handle-ctcp-request (prefix string)
+ (when (and (get 'riece-ctcp 'riece-addon-enabled) prefix string
+ (riece-prefix-nickname prefix))
+ (let* ((parameters (riece-split-parameters string))
+ (targets (split-string (car parameters) ","))
+ (message (nth 1 parameters)))
+ (if (string-match "\1\\([^ ]+\\)\\( .+\\)?\1" message)
+ (let ((request (downcase (match-string 1 message))))
+ (if (match-beginning 2)
+ (setq message (substring (match-string 2 message) 1)))
+ (let ((hook
+ (intern (concat "riece-ctcp-" request "-request-hook")))
+ (function
+ (intern-soft (concat "riece-handle-ctcp-" request
+ "-request")))
+ (after-hook
+ (intern (concat "riece-ctcp-after-" request
+ "-request-hook"))))
+ (unless (riece-funcall-ignore-errors
+ (symbol-name hook)
+ #'run-hook-with-args-until-success
+ hook prefix (car targets) message)
+ (if function
+ (riece-funcall-ignore-errors (symbol-name function)
+ function prefix (car targets)
+ message))
+ (riece-funcall-ignore-errors (symbol-name after-hook)
+ #'run-hook-with-args-until-success
+ after-hook prefix (car targets)
+ message)))
+ t)))))
+
+(defun riece-handle-ctcp-version-request (prefix target _string)
+ (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))
+ (riece-insert-change
+ (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 (riece-mcat "CTCP VERSION from %s (%s) to %s")
+ user
+ (riece-strip-user-at-host (riece-prefix-user-at-host prefix))
+ (riece-format-identity target-identity t)))
+ "\n"))))
+
+(defun riece-handle-ctcp-ping-request (prefix target string)
+ (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 "NOTICE %s :\1PING\1\r\n" user)))
+ (riece-insert-change buffer (format "CTCP PING from %s\n" user))
+ (riece-insert-change
+ (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 (riece-mcat "CTCP PING from %s (%s) to %s")
+ user
+ (riece-strip-user-at-host (riece-prefix-user-at-host prefix))
+ (riece-format-identity target-identity t)))
+ "\n"))))
+
+(defun riece-handle-ctcp-clientinfo-request (prefix target _string)
+ (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
+ (let (messages)
+ (mapatoms
+ (lambda (atom)
+ (let ((case-fold-search t))
+ (if (and (fboundp atom)
+ (string-match
+ "riece-handle-ctcp-\\(.+\\)-request"
+ (symbol-name atom)))
+ (setq messages
+ (cons (match-string 1 (symbol-name atom))
+ messages))))))
+ (mapconcat #'upcase (append messages
+ riece-ctcp-additional-clientinfo)
+ " "))))
+ (riece-insert-change buffer (format "CTCP CLIENTINFO from %s\n" user))
+ (riece-insert-change
+ (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 (riece-mcat "CTCP CLIENTINFO from %s (%s) to %s")
+ user
+ (riece-strip-user-at-host (riece-prefix-user-at-host prefix))
+ (riece-format-identity target-identity t)))
+ "\n"))))
+
+(defun riece-ctcp-action-format-message (message &optional global)
+ (riece-with-server-buffer (riece-identity-server
+ (riece-message-speaker message))
+ (concat
+ (if global
+ (riece-concat-server-name
+ (concat riece-ctcp-action-prefix
+ (riece-format-identity (riece-message-target message) t) ": "
+ (riece-identity-prefix (riece-message-speaker message)) " "
+ (riece-message-text message)))
+ (concat riece-ctcp-action-prefix
+ (riece-identity-prefix (riece-message-speaker message)) " "
+ (riece-message-text message)))
+ "\n")))
+
+(defun riece-handle-ctcp-action-request (prefix target string)
+ (let ((user (riece-prefix-nickname prefix)))
+ (riece-display-message
+ (riece-make-message (riece-make-identity user
+ riece-server-name)
+ (riece-make-identity target
+ riece-server-name)
+ string
+ 'action
+ (riece-identity-equal-no-server
+ user riece-real-nickname)))))
+
+(defun riece-handle-ctcp-time-request (prefix target _string)
+ (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))
+ (time (format-time-string "%c")))
+ (riece-send-string
+ (format "NOTICE %s :\1TIME %s\1\r\n" user time))
+ (riece-insert-change buffer (format (riece-mcat "CTCP TIME from %s\n")
+ user))
+ (riece-insert-change
+ (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 (riece-mcat "CTCP TIME from %s (%s) to %s")
+ user
+ (riece-strip-user-at-host (riece-prefix-user-at-host prefix))
+ (riece-format-identity target-identity t)))
+ "\n"))))
+
+(defun riece-handle-ctcp-response (prefix string)
+ (when (and (get 'riece-ctcp 'riece-addon-enabled) prefix string
+ (riece-prefix-nickname prefix))
+ (let* ((parameters (riece-split-parameters string))
+ (targets (split-string (car parameters) ","))
+ (message (nth 1 parameters)))
+ (if (string-match "\1\\([^ ]+\\)\\( .+\\)?\1" message)
+ (let ((response (downcase (match-string 1 message))))
+ (if (match-beginning 2)
+ (setq message (substring (match-string 2 message) 1)))
+ (let ((hook
+ (intern (concat "riece-ctcp-" response "-response-hook")))
+ (function (intern-soft (concat "riece-handle-ctcp-"
+ response "-response")))
+ (after-hook
+ (intern (concat "riece-ctcp-after-" response
+ "-response-hook"))))
+ (unless (riece-funcall-ignore-errors
+ (symbol-name hook)
+ #'run-hook-with-args-until-success
+ hook prefix (car targets) message)
+ (if function
+ (riece-funcall-ignore-errors
+ (symbol-name function)
+ function prefix (car targets) message))
+ (riece-funcall-ignore-errors (symbol-name after-hook)
+ #'run-hook-with-args-until-success
+ after-hook prefix (car targets)
+ message)))
+ t)))))
+
+(defun riece-handle-ctcp-version-response (prefix _target string)
+ (riece-insert-change
+ (list riece-dialogue-buffer riece-others-buffer)
+ (concat
+ (riece-concat-server-name
+ (format (riece-mcat "CTCP VERSION for %s (%s) = %s")
+ (riece-prefix-nickname prefix)
+ (riece-strip-user-at-host (riece-prefix-user-at-host prefix))
+ string))
+ "\n")))
+
+(defun riece-handle-ctcp-ping-response (prefix _target _string)
+ (let* ((now (current-time))
+ (elapsed (+ (* 65536 (- (car now) (car riece-ctcp-ping-time)))
+ (- (nth 1 now) (nth 1 riece-ctcp-ping-time)))))
+ (riece-insert-change
+ (list riece-dialogue-buffer riece-others-buffer)
+ (concat
+ (riece-concat-server-name
+ (format (riece-mcat "CTCP PING for %s (%s) = %d sec")
+ (riece-prefix-nickname prefix)
+ (riece-strip-user-at-host (riece-prefix-user-at-host prefix))
+ elapsed))
+ "\n"))))
+
+(defun riece-handle-ctcp-clientinfo-response (prefix _target string)
+ (riece-insert-change
+ (list riece-dialogue-buffer riece-others-buffer)
+ (concat
+ (riece-concat-server-name
+ (format (riece-mcat "CTCP CLIENTINFO for %s (%s) = %s")
+ (riece-prefix-nickname prefix)
+ (riece-strip-user-at-host (riece-prefix-user-at-host prefix))
+ string))
+ "\n")))
+
+(defun riece-handle-ctcp-time-response (prefix _target string)
+ (riece-insert-change
+ (list riece-dialogue-buffer riece-others-buffer)
+ (concat
+ (riece-concat-server-name
+ (format (riece-mcat "CTCP TIME for %s (%s) = %s")
+ (riece-prefix-nickname prefix)
+ (riece-strip-user-at-host (riece-prefix-user-at-host prefix))
+ string))
+ "\n")))
+
+(defun riece-command-ctcp-version (target)
+ (interactive
+ (list (riece-completing-read-identity
+ (riece-mcat "Channel/User: ")
+ (riece-get-identities-on-server (riece-current-server-name)))))
+ (riece-send-string (format "PRIVMSG %s :\1VERSION\1\r\n"
+ (riece-identity-prefix target))))
+
+(defun riece-command-ctcp-ping (target)
+ (interactive
+ (list (riece-completing-read-identity
+ (riece-mcat "Channel/User: ")
+ (riece-get-identities-on-server (riece-current-server-name)))))
+ (riece-send-string (format "PRIVMSG %s :\1PING\1\r\n"
+ (riece-identity-prefix target)))
+ (setq riece-ctcp-ping-time (current-time)))
+
+(defun riece-command-ctcp-clientinfo (target)
+ (interactive
+ (list (riece-completing-read-identity
+ (riece-mcat "Channel/User: ")
+ (riece-get-identities-on-server (riece-current-server-name)))))
+ (riece-send-string (format "PRIVMSG %s :\1CLIENTINFO\1\r\n"
+ (riece-identity-prefix target))))
+
+(defun riece-command-ctcp-action (target action)
+ (interactive
+ (list (if current-prefix-arg
+ (riece-completing-read-identity
+ (riece-mcat "Channel/User: ")
+ (riece-get-identities-on-server (riece-current-server-name)))
+ riece-current-channel)
+ (let (message)
+ (beginning-of-line)
+ (setq message (buffer-substring (point)
+ (progn (end-of-line) (point))))
+ (if (equal message "")
+ (read-string (riece-mcat "Action: "))
+ (prog1 (read-from-minibuffer (riece-mcat "Action: ")
+ (cons message 0))
+ (if (> (forward-line) 0)
+ (insert "\n")))))))
+ (if (equal action "")
+ (error "No action"))
+ (riece-send-string (format "PRIVMSG %s :\1ACTION %s\1\r\n"
+ (riece-identity-prefix target)
+ action))
+ (riece-display-message
+ (riece-make-message (riece-current-nickname) target action 'action t)))
+
+(defun riece-command-ctcp-time (target)
+ (interactive
+ (list (riece-completing-read-identity
+ (riece-mcat "Channel/User: ")
+ (riece-get-identities-on-server (riece-current-server-name)))))
+ (riece-send-string (format "PRIVMSG %s :\1TIME\1\r\n"
+ (riece-identity-prefix target))))
+
+(defun riece-ctcp-requires ()
+ (if (memq 'riece-highlight riece-addons)
+ '(riece-highlight)))
+
+(defvar riece-ctcp-dialogue-font-lock-keywords
+ (list (concat "^" riece-time-prefix-regexp "\\("
+ (regexp-quote riece-ctcp-action-prefix)
+ ".*\\)$")
+ 1 riece-ctcp-action-face t t))
+
+(defun riece-ctcp-insinuate ()
+ (add-hook 'riece-privmsg-hook 'riece-handle-ctcp-request)
+ (add-hook 'riece-notice-hook 'riece-handle-ctcp-response)
+ (if (memq 'riece-highlight riece-addons)
+ (setq riece-dialogue-font-lock-keywords
+ (cons riece-ctcp-dialogue-font-lock-keywords
+ riece-dialogue-font-lock-keywords)))
+ (unless (assq 'action riece-message-format-function-alist)
+ (setq riece-message-format-function-alist
+ (cons (cons 'action #'riece-ctcp-action-format-message)
+ riece-message-format-function-alist))))
+
+(defun riece-ctcp-uninstall ()
+ (remove-hook 'riece-privmsg-hook 'riece-handle-ctcp-request)
+ (remove-hook 'riece-notice-hook 'riece-handle-ctcp-response)
+ (setq riece-dialogue-font-lock-keywords
+ (delq riece-ctcp-dialogue-font-lock-keywords
+ riece-dialogue-font-lock-keywords)))
+
+(defun riece-ctcp-enable ()
+ (define-key riece-dialogue-mode-map "\C-cv" 'riece-command-ctcp-version)
+ (define-key riece-dialogue-mode-map "\C-cp" 'riece-command-ctcp-ping)
+ (define-key riece-dialogue-mode-map "\C-ca" 'riece-command-ctcp-action)
+ (define-key riece-dialogue-mode-map "\C-cc" 'riece-command-ctcp-clientinfo)
+ (define-key riece-dialogue-mode-map "\C-ct" 'riece-command-ctcp-time))
+
+(defun riece-ctcp-disable ()
+ (define-key riece-dialogue-mode-map "\C-cv" nil)
+ (define-key riece-dialogue-mode-map "\C-cp" nil)
+ (define-key riece-dialogue-mode-map "\C-ca" nil)
+ (define-key riece-dialogue-mode-map "\C-cc" nil)
+ (define-key riece-dialogue-mode-map "\C-ct" nil))
+
+(provide 'riece-ctcp)
+
+;;; riece-ctcp.el ends here
--- /dev/null
+;;; riece-ctlseq.el --- mark up control sequences in IRC buffers -*- lexical-binding: t -*-
+;; 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., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
+
+;;; Commentary:
+
+;; NOTE: This is an add-on module for Riece.
+
+;;; Code:
+
+(require 'riece-message)
+(require 'riece-misc)
+
+(defgroup riece-ctlseq nil
+ "Mark up control sequences in IRC buffer."
+ :prefix "riece-"
+ :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>.
+
+To set up colors compatible with X-Chat and mIRC, do:
+\(setq riece-ctlseq-colors '(\"#cecece\" \"black\" \"#0000cc\" \"#00cc00\"
+ \"#dd0000\" \"#aa0000\" \"#bb00bb\" \"#ffaa00\"
+ \"#eedd22\" \"#33de55\" \"#00cccc\" \"#33eeff\"
+ \"#0000ff\" \"#ee22ee\" \"#777777\" \"#999999\"))
+"
+ :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)
+
+(defconst riece-ctlseq-description
+ "Mark up control sequences in IRC buffers.")
+
+(defconst riece-ctlseq-regexp
+ "[\x2\xF\x16\x1F]\\|\x3\\([0-9][0-9]?\\)\\(,[0-9][0-9]?\\)?")
+
+(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-attribute (tag attrs)
+ (let ((attrs (copy-sequence attrs)))
+ (cond
+ ((eq (aref tag 0) ?\x2) ;^B
+ (setq attrs (plist-put attrs 'bold (not (plist-get attrs 'bold)))))
+ ((eq (aref tag 0) ?\xF) ;^O
+ (setq attrs nil))
+ ((eq (aref tag 0) ?\x16) ;^V
+ (setq attrs (plist-put attrs 'inverse-video
+ (not (plist-get attrs 'inverse-video)))))
+ ((eq (aref tag 0) ?\x1F) ;^_
+ (setq attrs (plist-put attrs 'underline
+ (not (plist-get attrs 'underline)))))
+ ((eq (aref tag 0) ?\x3) ;^C<fg>[,<bg>]
+ (setq attrs (plist-put attrs 'foreground
+ (nth (string-to-number (substring tag 1))
+ riece-ctlseq-colors)))
+ (if (string-match "," tag)
+ (setq attrs (plist-put attrs 'background
+ (nth (string-to-number
+ (substring tag (match-end 0)))
+ riece-ctlseq-colors))))))
+ attrs))
+
+(defun riece-ctlseq-update-attributes (tags attrs)
+ (let ((start 0))
+ (while (string-match riece-ctlseq-regexp tags start)
+ (setq start (match-end 0)
+ attrs (riece-ctlseq-update-attribute (match-string 0 tags) attrs)))
+ attrs))
+
+(defun riece-ctlseq-put-attributes (string start end attrs)
+ (when (and (> end start) attrs)
+ (put-text-property start end
+ 'riece-ctlseq-attributes (copy-sequence attrs)
+ string)
+ (put-text-property start end
+ 'riece-overlay-face
+ (riece-ctlseq-face-from-cache attrs)
+ string)))
+
+(defun riece-ctlseq-message-filter (message)
+ (if (get 'riece-ctlseq 'riece-addon-enabled)
+ (let ((start 0)
+ (end (length (riece-message-text message)))
+ tags-start tags-end attrs)
+ (while (string-match (concat "\\(" riece-ctlseq-regexp "\\)+")
+ (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)))
+ (setq tags-start (match-beginning 0)
+ tags-end (match-end 0))
+ (riece-ctlseq-put-attributes (riece-message-text message)
+ start tags-start
+ attrs)
+ (setq attrs (riece-ctlseq-update-attributes
+ (substring (riece-message-text message)
+ tags-start tags-end)
+ attrs)
+ start tags-end))
+ (riece-ctlseq-put-attributes (riece-message-text message)
+ start end
+ attrs)))
+ message)
+
+(defun riece-ctlseq-requires ()
+ '(riece-highlight))
+
+(defun riece-ctlseq-insinuate ()
+ (add-hook 'riece-message-filter-functions 'riece-ctlseq-message-filter))
+
+(defun riece-ctlseq-uninstall ()
+ (remove-hook 'riece-message-filter-functions 'riece-ctlseq-message-filter))
+
+(provide 'riece-ctlseq)
+
+;;; riece-ctlseq.el ends here
--- /dev/null
+;;; riece-debug.el --- debug support -*- lexical-binding: t -*-
+;; Copyright (C) 1998-2005 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., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
+
+;;; Code:
+
+(require 'riece-globals)
+(require 'riece-options)
+
+(defun riece-debug-1 (message detail)
+ (message "riece-debug: %s" message)
+ (with-current-buffer riece-debug-buffer
+ (goto-char (point-max))
+ (let ((time (format-time-string "%Y-%m-%d:%H:%M:%S")))
+ (if detail
+ (insert "*** " time ": " message "\n" detail "\n")
+ (insert "*** " time ": " message "\n")))))
+
+(defun riece-debug (message &optional detail)
+ "Print a one-line debug MESSAGE at the bottom of the frame.
+If the optional 2nd argument DETAIL is specified, it is stored into
+`riece-debug-buffer'."
+ (ignore (riece-debug-1 message detail)))
+
+(defun riece-debug-reset-standard-output ()
+ "Reset `riece-temp-buffer' to be used as `standard-output'."
+ (with-current-buffer riece-temp-buffer
+ (buffer-disable-undo)
+ (erase-buffer)))
+
+(defmacro riece-debug-with-backtrace (&rest body)
+ "Execute BODY and send a backtrace to `riece-temp-buffer'."
+ `(unwind-protect
+ (progn ,@body)
+ (riece-debug-reset-standard-output)
+ (let ((standard-output riece-temp-buffer))
+ (backtrace))))
+
+(put 'riece-debug-with-backtrace 'lisp-indent-function 0)
+(put 'riece-debug-with-backtrace 'edebug-form-spec '(form body))
+
+(defmacro riece-ignore-errors (location &rest body)
+ "Execute BODY; if an error occurs, return nil.
+Otherwise, return result of last FORM.
+If `riece-debug' is non-nil and an error occurred, it sends a
+backtrace to standard-output."
+ `(condition-case error
+ (if riece-debug
+ (riece-debug-with-backtrace ,@body)
+ ,@body)
+ (error
+ (if riece-debug
+ (with-current-buffer riece-temp-buffer
+ (goto-char (point-min))
+ (if (re-search-forward "^ signal(" nil t)
+ (delete-region (point-min) (match-beginning 0)))
+ (riece-debug (format "Error in `%s': %S" ,location error)
+ (buffer-string))))
+ nil)))
+
+(put 'riece-ignore-errors 'lisp-indent-function 1)
+(put 'riece-ignore-errors 'edebug-form-spec '(form body))
+
+(defun riece-funcall-ignore-errors (location function &rest args)
+ "Call FUNCTION with ARGS; if an error occurs, return nil.
+Otherwise, return result of the function.
+If `riece-debug' is non-nil and an error occurred, it sends a
+backtrace to standard-output."
+ (riece-ignore-errors location
+ (apply function args)))
+
+(provide 'riece-debug)
+
+;;; riece-debug.el ends here
--- /dev/null
+;;; riece-desktop-notify.el --- Display notification to desktop -*- lexical-binding: t -*-
+;; Copyright (C) 2009 OHASHI Akira
+
+;; Author: OHASHI Akira <bg66@koka-in.org>
+;; Created: 2009-03-29
+;; 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., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
+
+;;; Commentary:
+
+;; NOTE: This is an add-on module for Riece.
+
+;; riece-desktop-notify.el needs an external program to notify desktop.
+;; The setting prepared beforehand for most popular OS uses the
+;; following external programs.
+;;
+;; Mac OS X:
+;; growlnotify <URL:http://growl.info/extras.php#growlnotify>
+;; (of course you need Growl <URL:http://growl.info>)
+;;
+;; GNU/Linux:
+;; notify-send (which is included in libnotify)
+;; <URL:http://www.galago-project.org/news/index.php>
+;;
+;; If you use Debian, you can install it by the following command:
+;;
+;; % sudo aptitude install libnotify-bin
+;;
+;; Windows:
+;; Snarl_CMD.exe <URL:http://tlhan-ghun.de/?q=node/59>
+;; (of course you need Snarl <URL:http://www.fullphat.net/>)
+
+;;; Code:
+
+(require 'riece-message)
+(eval-when-compile (require 'riece-keyword))
+
+(defconst riece-desktop-notify-description
+ "Display notification to desktop.")
+
+(defgroup riece-desktop-notify nil
+ "Display notification to desktop."
+ :group 'riece)
+
+(defcustom riece-desktop-notify-title-function
+ #'(lambda (message)
+ (format "%s said in %s..."
+ (riece-identity-prefix (riece-message-speaker message))
+ (riece-identity-prefix (riece-message-target message))))
+ "*The function which make title.
+This function must have only one message object as argument."
+ :type 'function
+ :group 'riece-desktop-notify)
+
+(defcustom riece-desktop-notify-message-function 'riece-format-message
+ "*The function which make message.
+This function must have only one message object as argument."
+ :type 'function
+ :group 'riece-desktop-notify)
+
+(defcustom riece-desktop-notify-coding-system (terminal-coding-system)
+ "*Coding system used to notify desktop."
+ :type 'coding-system
+ :group 'riece-desktop-notify)
+
+(defcustom riece-desktop-notify-icon
+ (expand-file-name "riece-notify-icon.png" riece-data-directory)
+ "*Icon to display in desktop notifications."
+ :type '(file :must-match t)
+ :group 'riece-desktop-notify)
+
+(defcustom riece-desktop-notify-type
+ (if (eq system-type 'linux) 'gnu/linux system-type)
+ "*The type to notify desktop."
+ :type '(radio (const :tag "Like Darwin" darwin)
+ (const :tag "Like GNU/Linux" gnu/linux)
+ (const :tag "Like Windows" windows-nt)
+ (symbol :tag "The other type"))
+ :group 'riece-desktop-notify)
+
+;; for Darwin
+(defcustom riece-desktop-notify-darwin-program "growlnotify"
+ "*The program name to notify for darwin."
+ :type 'file
+ :group 'riece-desktop-notify)
+
+(defcustom riece-desktop-notify-darwin-args
+ '("-t" title "-m" message "-H" "localhost")
+ "*The Arguments to notify for darwin."
+ :type '(repeat (radio (string :tag "Argument")
+ (const :tag "Title" title)
+ (const :tag "Message" message)))
+ :group 'riece-desktop-notify)
+
+;; for GNU/Linux
+(defcustom riece-desktop-notify-gnu/linux-program "notify-send"
+ "*The program name to notify for GNU/Linux."
+ :type 'file
+ :group 'riece-desktop-notify)
+
+(defcustom riece-desktop-notify-gnu/linux-args
+ '("-i" icon "-u" "low" title message)
+ "*The Arguments to notify for GNU/Linux."
+ :type '(repeat (radio (string :tag "Argument")
+ (const :tag "Title" title)
+ (const :tag "Message" message)
+ (const :tag "Icon" icon)))
+ :group 'riece-desktop-notify)
+
+;; for Windows
+(defcustom riece-desktop-notify-windows-nt-program "snarl_cmd.exe"
+ "*The program name to notify for Windows."
+ :type 'file
+ :group 'riece-desktop-notify)
+
+(defcustom riece-desktop-notify-windows-nt-args
+ '("snShowMessage" "-1" title message)
+ "*The Arguments string to notify for Windows."
+ :type '(repeat (radio (string :tag "Argument")
+ (const :tag "Title" title)
+ (const :tag "Message" message)))
+ :group 'riece-desktop-notify)
+
+;; stolen and modified from riece-ruby.el
+(defun riece-desktop-notify-substitute-variables (args alist)
+ "Substitute symbols in ARGS by looking up ALIST."
+ (setq args (copy-sequence args))
+ (while alist
+ (let ((pointer args))
+ (while pointer
+ (setq pointer (memq (car (car alist)) args))
+ (if pointer
+ (setcar pointer (cdr (car alist))))))
+ (setq alist (cdr alist)))
+ args)
+
+(defsubst riece-desktop-notify-make-symbol (symbol)
+ (intern (format "riece-desktop-notify-%s-%s"
+ (symbol-name riece-desktop-notify-type)
+ (symbol-name symbol))))
+
+(defvar riece-desktop-notify-last-message nil
+ "The previous message we have seen in
+`riece-desktop-notify-keyword-notify-function'.")
+
+(defun riece-desktop-notify-keyword-notify-function (_keyword message)
+ ;; Don't send notification multiple times for a single message.
+ (unless (eq riece-desktop-notify-last-message message)
+ (let ((program-symbol (riece-desktop-notify-make-symbol 'program))
+ (args-symbol (riece-desktop-notify-make-symbol 'args)))
+ (when (and (boundp program-symbol) (boundp args-symbol))
+ (let ((program (eval program-symbol))
+ (args (eval args-symbol)))
+ (when (fboundp 'executable-find)
+ (setq program (executable-find program)))
+ (when (stringp program)
+ (let ((title (funcall riece-desktop-notify-title-function message))
+ (message (funcall riece-desktop-notify-message-function
+ message)))
+ (condition-case nil
+ (apply #'call-process program nil 0 nil
+ (riece-desktop-notify-substitute-variables
+ args
+ (list (cons 'title
+ (encode-coding-string
+ title
+ riece-desktop-notify-coding-system))
+ (cons 'message
+ (encode-coding-string
+ message
+ riece-desktop-notify-coding-system))
+ (cons 'icon
+ riece-desktop-notify-icon))))
+ (file-error nil))))))))
+ (setq riece-desktop-notify-last-message message))
+
+(defun riece-desktop-notify-requires ()
+ '(riece-keyword))
+
+(defun riece-desktop-notify-insinuate ()
+ (add-hook 'riece-keyword-notify-functions
+ 'riece-desktop-notify-keyword-notify-function))
+
+(defun riece-desktop-notify-uninstall ()
+ (remove-hook 'riece-keyword-notify-functions
+ 'riece-desktop-notify-keyword-notify-function))
+
+(provide 'riece-desktop-notify)
+
+;;; riece-desktop-notify.el ends here
--- /dev/null
+(defun riece-insert-struct-template (prefix struct) -*- lexical-binding: t -*-
+ (interactive "sPrefix: \nsStruct: ")
+ (let (attributes
+ optional-attributes
+ name
+ pointer
+ arglist
+ strings
+ (index 0))
+ (if (and prefix
+ (not (string-match "-\\'" prefix)))
+ (setq prefix (concat prefix "-")))
+ (catch 'finish
+ (while t
+ (setq name (read-from-minibuffer "Attribute: "))
+ (if (equal name "")
+ (throw 'finish nil))
+ (setq attributes
+ (cons (vector name
+ (y-or-n-p "Optional? ")
+ (y-or-n-p "Readable? ")
+ (y-or-n-p "Writable? "))
+ attributes))))
+ (setq attributes (nreverse attributes)
+ pointer (cons (vector "" nil nil nil) attributes))
+ (while (cdr pointer)
+ (if (aref (car (cdr pointer)) 1)
+ (progn
+ (setq optional-attributes (cons (car (cdr pointer))
+ optional-attributes))
+ (setcdr pointer (nthcdr 2 pointer)))
+ (setq pointer (cdr pointer))))
+ (setq optional-attributes (nreverse optional-attributes)
+ arglist (mapconcat (lambda (attribute)
+ (aref attribute 0))
+ attributes " "))
+ (if optional-attributes
+ (setq arglist (concat arglist " &optional "
+ (mapconcat (lambda (attribute)
+ (aref attribute 0))
+ optional-attributes " "))))
+ (setq strings (list (format "\
+\(defun %smake-%s (%s)
+ \"Make %s%s object.\"
+ (vector %s))"
+ prefix struct arglist
+ prefix struct
+ (mapconcat (lambda (attribute)
+ (aref attribute 0))
+ (append attributes
+ optional-attributes)
+ " "))))
+ (setq pointer (append attributes optional-attributes))
+ (while pointer
+ (if (aref (car pointer) 2)
+ (setq strings (cons (format "\
+\(defun %s%s-%s (%s)
+ \"Return %s of %s.\"
+ (aref %s %d))"
+ prefix struct (aref (car pointer) 0)
+ struct
+ (aref (car pointer) 0)
+ (upcase struct)
+ struct index)
+ strings)))
+ (if (aref (car pointer) 3)
+ (setq strings (cons (format "\
+\(defun %s%s-set-%s (%s %s)
+ \"Set %s of %s to %s.\"
+ (aset %s %d %s))"
+ prefix struct (aref (car pointer) 0)
+ struct (aref (car pointer) 0)
+ (aref (car pointer) 0)
+ (upcase struct)
+ (upcase (aref (car pointer) 0))
+ struct index (aref (car pointer) 0))
+ strings)))
+ (setq pointer (cdr pointer)
+ index (1+ index)))
+ (insert (mapconcat #'identity (nreverse strings) "\n\n"))))
--- /dev/null
+;;; riece-display.el --- buffer arrangement -*- lexical-binding: t -*-
+;; Copyright (C) 1998-2003 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., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
+
+;;; Code:
+
+(require 'riece-options)
+(require 'riece-channel)
+(require 'riece-misc)
+(require 'riece-layout)
+(require 'riece-signal)
+(require 'riece-mcat)
+
+(defvar riece-channel-buffer-format "*Channel:%s*"
+ "Format of channel message buffer.")
+(defvar riece-channel-buffer-alist nil
+ "An alist mapping identities to channel buffers.")
+
+(defvar riece-update-buffer-functions nil
+ "Functions to redisplay the buffer.
+Local to the buffer in `riece-buffer-list'.")
+
+(defvar riece-update-indicator-functions
+ '(riece-update-status-indicators
+ riece-update-channel-status-indicator
+ riece-update-channel-indicator
+ riece-update-long-channel-indicator
+ riece-update-channel-list-indicator)
+ "Functions to update modeline indicators.")
+
+(defun riece-display-connect-signals ()
+ (riece-connect-signal
+ 'channel-list-changed
+ (lambda (_signal _handback)
+ (with-current-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)
+ (with-current-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-status-indicator)
+ (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)
+ (when (riece-channel-p (riece-identity-prefix
+ 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-update-channel-status-indicator)
+ (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-update-channel-status-indicator)
+ (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
+ (if (and riece-current-channel
+ (riece-channel-p (riece-identity-prefix riece-current-channel)))
+ (let* ((users
+ (riece-with-server-buffer (riece-identity-server
+ riece-current-channel)
+ (riece-channel-get-users (riece-identity-prefix
+ riece-current-channel))))
+ (inhibit-read-only t)
+ buffer-read-only)
+ (erase-buffer)
+ (riece-kill-all-overlays)
+ (while users
+ (insert (if (memq ?o (cdr (car users)))
+ "@"
+ (if (memq ?v (cdr (car users)))
+ "+"
+ " "))
+ (riece-format-identity
+ (riece-make-identity (car (car users))
+ (riece-identity-server
+ riece-current-channel))
+ 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
+ (let ((inhibit-read-only t)
+ buffer-read-only
+ (index 1)
+ (channels riece-current-channels))
+ (erase-buffer)
+ (riece-kill-all-overlays)
+ (while channels
+ (if (car channels)
+ (insert (riece-format-identity-for-channel-list-buffer
+ index (car channels))
+ "\n"))
+ (setq index (1+ index)
+ channels (cdr channels))))))
+
+(defun riece-update-channel-indicator ()
+ (setq riece-channel-indicator
+ (if riece-current-channel
+ (riece-format-identity riece-current-channel)
+ (riece-mcat "None"))))
+
+(defun riece-update-long-channel-indicator ()
+ (setq riece-long-channel-indicator
+ (if riece-current-channel
+ (if (riece-channel-p (riece-identity-prefix riece-current-channel))
+ (riece-concat-channel-topic
+ riece-current-channel
+ (riece-concat-channel-modes
+ riece-current-channel
+ (riece-format-identity riece-current-channel)))
+ (riece-format-identity riece-current-channel))
+ (riece-mcat "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)
+ pointer)
+ (setq riece-channel-list-indicator
+ (delq
+ nil
+ (mapcar
+ (lambda (channel)
+ (prog1
+ (if channel
+ (riece-format-identity-for-channel-list-indicator
+ index channel))
+ (setq index (1+ index))))
+ riece-current-channels))
+ pointer riece-channel-list-indicator)
+ (while pointer
+ (if (cdr pointer)
+ (setcdr pointer (cons "," (cdr pointer))))
+ (setq pointer (cdr (cdr pointer))))
+ (setq riece-channel-list-indicator
+ (riece-normalize-modeline-string riece-channel-list-indicator)))
+ (setq riece-channel-list-indicator (riece-mcat "No channel"))))
+
+(defun riece-update-status-indicators ()
+ (let ((server-name (riece-current-server-name)))
+ (if server-name
+ (with-current-buffer riece-command-buffer
+ (riece-with-server-buffer server-name
+ (setq riece-away-indicator
+ (if (and riece-real-nickname
+ (riece-user-get-away riece-real-nickname))
+ "A"
+ "-")
+ riece-operator-indicator
+ (if (and riece-real-nickname
+ (riece-user-get-operator riece-real-nickname))
+ "O"
+ "-")
+ )
+ (if riece-real-nickname
+ (setq riece-user-indicator
+ (riece-format-identity
+ (riece-make-identity riece-real-nickname
+ riece-server-name)
+ t)))))))
+ (walk-windows
+ (lambda (window)
+ (with-current-buffer (window-buffer window)
+ (if (riece-derived-mode-p 'riece-dialogue-mode)
+ (setq riece-freeze-indicator
+ (if (eq riece-freeze 'own)
+ "f"
+ (if riece-freeze
+ "F"
+ "-"))))))))
+
+(defun riece-update-channel-status-indicator ()
+ (if (and riece-current-channel
+ (riece-channel-p (riece-identity-prefix riece-current-channel)))
+ (let ((users
+ (riece-with-server-buffer (riece-identity-server
+ riece-current-channel)
+ (riece-channel-get-users (riece-identity-prefix
+ riece-current-channel))))
+ (nickname
+ (riece-with-server-buffer (riece-identity-server
+ riece-current-channel)
+ riece-real-nickname)))
+ (with-current-buffer riece-command-buffer
+ (setq riece-channel-status-indicator
+ (if nickname
+ (let ((user (cdr (riece-identity-assoc nickname users t))))
+ (if (memq ?o user)
+ "@"
+ (if (memq ?v user)
+ "+"
+ "-")))
+ "-"))))))
+
+(defun riece-update-buffers (&optional buffers)
+ (unless buffers
+ (setq buffers riece-buffer-list))
+ (while buffers
+ (if (buffer-live-p (car buffers))
+ (with-current-buffer (car buffers)
+ (run-hooks 'riece-update-buffer-functions)))
+ (setq buffers (cdr buffers)))
+ (run-hooks 'riece-update-indicator-functions)
+ (force-mode-line-update t)
+ (run-hooks 'riece-update-buffer-hook))
+
+(defun riece-channel-buffer-name (identity)
+ (let ((channels (riece-identity-member identity riece-current-channels)))
+ (if channels
+ (setq identity (car channels))
+ (if riece-debug
+ (riece-debug (format "%S is not a member of riece-current-channels"
+ identity))))
+ (format riece-channel-buffer-format (riece-format-identity identity))))
+
+(eval-when-compile
+ (autoload 'riece-channel-mode "riece"))
+(defun riece-channel-buffer-create (identity)
+ (with-current-buffer
+ (riece-get-buffer-create (riece-channel-buffer-name identity)
+ 'riece-channel-mode)
+ (setq riece-channel-buffer-alist
+ (cons (cons identity (current-buffer))
+ riece-channel-buffer-alist))
+ (unless (eq major-mode 'riece-channel-mode)
+ (riece-channel-mode)
+ (let (buffer-read-only)
+ (riece-insert-info (current-buffer)
+ (format (riece-mcat "Created on %s\n")
+ (funcall riece-format-time-function
+ (current-time))))
+ (run-hook-with-args 'riece-channel-buffer-create-functions identity)))
+ (current-buffer)))
+
+(defun riece-channel-buffer (identity)
+ (let ((entry (riece-identity-assoc identity riece-channel-buffer-alist)))
+ (if entry
+ (if (buffer-live-p (cdr entry))
+ (cdr entry)
+ (if riece-debug
+ (riece-debug
+ (format "riece-channel-buffer: nonexistent buffer: %s"
+ (riece-format-identity identity))))))))
+
+(defun riece-switch-to-channel (identity)
+ (let ((last riece-current-channel)
+ window)
+ (if (and riece-channel-buffer
+ (setq window (get-buffer-window riece-channel-buffer)))
+ (with-current-buffer riece-channel-buffer
+ (setq riece-channel-buffer-window-point (window-point window))))
+ (setq riece-current-channel identity
+ riece-channel-buffer (riece-channel-buffer riece-current-channel))
+ (run-hook-with-args 'riece-after-switch-to-channel-functions last)
+ (riece-emit-signal 'channel-switched)))
+
+(defun riece-join-channel (identity)
+ (unless (riece-identity-member identity riece-current-channels)
+ (setq riece-current-channels
+ (riece-identity-assign-binding
+ identity riece-current-channels
+ (mapcar
+ (lambda (channel)
+ (if channel
+ (riece-parse-identity channel)))
+ riece-default-channel-binding)))
+ (riece-channel-buffer-create identity)))
+
+(defun riece-switch-to-nearest-channel (pointer)
+ (let ((start riece-current-channels)
+ identity)
+ (while (and start (not (eq start pointer)))
+ (if (car start)
+ (setq identity (car start)))
+ (setq start (cdr start)))
+ (unless identity
+ (while (and pointer
+ (null (car pointer)))
+ (setq pointer (cdr pointer)))
+ (setq identity (car pointer)))
+ (if identity
+ (riece-switch-to-channel identity)
+ (let ((last riece-current-channel))
+ (run-hook-with-args 'riece-after-switch-to-channel-functions last)
+ (setq riece-current-channel nil)
+ (riece-emit-signal 'channel-switched)))))
+
+(defun riece-part-channel (identity)
+ (let ((pointer (riece-identity-member identity riece-current-channels)))
+ (unless pointer
+ (error "No such channel!"))
+ (setcar pointer nil)
+ (if (riece-identity-equal identity riece-current-channel)
+ (riece-switch-to-nearest-channel pointer)
+ (riece-emit-signal 'channel-list-changed))
+ (funcall riece-buffer-dispose-function (riece-channel-buffer identity))))
+
+(defun riece-redisplay-buffers (&optional force)
+ (riece-update-buffers)
+ (riece-redraw-layout force)
+ (run-hooks 'riece-redisplay-buffers-hook))
+
+(provide 'riece-display)
+
+;;; riece-display.el ends here
--- /dev/null
+;;; riece-doctor.el --- pretend to be a psychotherapist -*- lexical-binding: t -*-
+;; Copyright (C) 1998-2003 Daiki Ueno
+
+;; Author: Daiki Ueno <ueno@unixuser.org>
+;; 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., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
+
+;;; Commentary:
+
+;; NOTE: This is an add-on module for Riece.
+
+;;; Code:
+
+(require 'riece-globals)
+(require 'riece-identity)
+(require 'riece-message)
+(require 'riece-server)
+
+(defgroup riece-doctor nil
+ "Interface to doctor.el."
+ :prefix "riece-"
+ :group 'riece)
+
+(defcustom riece-doctor-hello-regexp "^,doctor$"
+ "Pattern of string patients start consultation."
+ :type 'string
+ :group 'riece-doctor)
+
+(defcustom riece-doctor-bye-regexp "^,doctor bye$"
+ "Pattern of string patients end consultation."
+ :type 'string
+ :group 'riece-doctor)
+
+(defvar riece-doctor-patients nil)
+
+(defconst riece-doctor-description
+ "Pretend to be a psychotherapist.")
+
+(put 'riece-doctor 'riece-addon-default-disabled t)
+
+(autoload 'doctor-mode "doctor")
+(autoload 'doctor-read-print "doctor")
+
+(defun riece-doctor-buffer-name (user)
+ (concat " *riece-doctor*"
+ (riece-format-identity
+ (riece-make-identity user riece-server-name))))
+
+(defun riece-doctor-reply (target string)
+ (riece-display-message
+ (riece-make-message (riece-make-identity riece-real-nickname
+ riece-server-name)
+ (riece-make-identity target riece-server-name)
+ string 'notice t))
+ (riece-send-string (format "NOTICE %s :%s\r\n" target string)))
+
+(defun riece-doctor-after-privmsg-hook (prefix string)
+ (if (get 'riece-doctor 'riece-addon-enabled)
+ (let* ((user (riece-prefix-nickname prefix))
+ (parameters (riece-split-parameters string))
+ (targets (split-string (car parameters) ","))
+ (message (nth 1 parameters)))
+ (if (string-match riece-doctor-hello-regexp message)
+ (if (riece-identity-member user riece-doctor-patients t)
+ (riece-doctor-reply
+ (car targets)
+ (format "%s: You are already talking with me." user))
+ (with-current-buffer (get-buffer-create
+ (riece-doctor-buffer-name user))
+ (erase-buffer)
+ (doctor-mode))
+ (setq riece-doctor-patients (cons user riece-doctor-patients))
+ (riece-doctor-reply
+ (car targets)
+ (format
+ "%s: I am the psychotherapist. \
+Please, describe your problems."
+ user)))
+ (if (string-match riece-doctor-bye-regexp message)
+ (let ((pointer (riece-identity-member user
+ riece-doctor-patients t)))
+ (when pointer
+ (kill-buffer (riece-doctor-buffer-name user))
+ (setq riece-doctor-patients (delq (car pointer)
+ riece-doctor-patients))
+ (riece-doctor-reply
+ (car targets)
+ (format "%s: Good bye." user))))
+ (if (riece-identity-member user riece-doctor-patients t)
+ (let (string)
+ (with-current-buffer (riece-doctor-buffer-name user)
+ (goto-char (point-max))
+ (insert message "\n")
+ (let ((point (point)))
+ (doctor-read-print)
+ (setq string (buffer-substring (1+ point)
+ (- (point) 2))))
+ (with-temp-buffer
+ (insert string)
+ (subst-char-in-region (point-min) (point-max) ?\n ? )
+ (setq string (buffer-string))))
+ (riece-doctor-reply
+ (car targets)
+ (format "%s: %s" user string)))))))))
+
+(defun riece-doctor-insinuate ()
+ (add-hook 'riece-after-privmsg-hook 'riece-doctor-after-privmsg-hook))
+
+(defun riece-doctor-uninstall ()
+ (remove-hook 'riece-after-privmsg-hook 'riece-doctor-after-privmsg-hook))
+
+(provide 'riece-doctor)
+
+;;; riece-doctor.el ends here
--- /dev/null
+;;; riece-emacs.el --- FSF Emacs specific functions -*- lexical-binding: t -*-
+;; Copyright (C) 1999 Daiki Ueno
+
+;; Author: Daiki Ueno <ueno@unixuser.org>
+;; Created: 1999-08-21
+;; Keywords: emulation
+
+;; 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., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
+
+;;; Code:
+
+;;; stolen (and renamed) from gnus-ems.el.
+;;; In GNU Emacs, user can intercept whole mouse tracking events by
+;;; assigning [mouse-X]. In XEmacs, however, which causes different
+;;; effect, that is, the command assigned to [mouse-X] only catches
+;;; button-release events.
+(defvar riece-mouse-2 [mouse-2])
+
+;;; popup-menu compatibility stuff, stolen (and renamed) from
+;;; semi-def.el.
+(defmacro riece-popup-menu-bogus-filter-constructor (menu)
+ ;; #### Kludge for FSF Emacs-style menu.
+ (let ((bogus-menu (make-symbol "bogus-menu")))
+ `(let (,bogus-menu selection function)
+ (easy-menu-define ,bogus-menu nil nil ,menu)
+ (setq selection (x-popup-menu t ,bogus-menu))
+ (when selection
+ (setq function (lookup-key ,bogus-menu (apply #'vector selection)))
+ ;; If a callback entry has no name, easy-menu wraps its value.
+ ;; See `easy-menu-make-symbol'.
+ (if (eq t (compare-strings "menu-function-" 0 nil
+ (symbol-name function) 0 14))
+ (car (last (symbol-function function)))
+ function)))))
+
+(defun riece-popup-menu-popup (menu _event)
+ (let ((function (riece-popup-menu-bogus-filter-constructor menu)))
+ (if function
+ (funcall function))))
+
+(defun riece-event-buffer (event)
+ "Return the buffer of the window over which mouse event EVENT occurred."
+ (window-buffer (posn-window (event-start event))))
+
+(defun riece-event-point (event)
+ "Return the character position of the mouse event EVENT."
+ (posn-point (event-start event)))
+
+;;; stolen (and renamed) from gnus-ems.el.
+(defun riece-region-active-p ()
+ "Say whether the region is active."
+ (and (boundp 'transient-mark-mode)
+ transient-mark-mode
+ (boundp 'mark-active)
+ mark-active))
+
+(defalias 'riece-make-overlay 'make-overlay)
+(defalias 'riece-overlay-put 'overlay-put)
+(defalias 'riece-overlay-start 'overlay-start)
+(defalias 'riece-overlay-buffer 'overlay-buffer)
+(defalias 'riece-overlays-in 'overlays-in)
+(defalias 'riece-delete-overlay 'delete-overlay)
+
+(defun riece-kill-all-overlays ()
+ "Delete all overlays in the current buffer."
+ (let* ((overlay-lists (overlay-lists))
+ (buffer-read-only nil)
+ (overlays (delq nil (nconc (car overlay-lists) (cdr overlay-lists)))))
+ (while overlays
+ (delete-overlay (car overlays))
+ (setq overlays (cdr overlays)))))
+
+(defalias 'riece-run-at-time 'run-at-time)
+(defalias 'riece-run-with-idle-timer 'run-with-idle-timer)
+(defalias 'riece-cancel-timer 'cancel-timer)
+
+(defalias 'riece-match-string-no-properties 'match-string-no-properties)
+
+(defun riece-propertize-modeline-string (string &rest properties)
+ (add-text-properties 0 (length string) properties string)
+ string)
+
+(defun riece-normalize-modeline-string-1 (string)
+ (if string
+ (if (listp (car string))
+ (cons (car (car string)) (riece-normalize-modeline-string-1
+ (append (cdr (car string)) (cdr string))))
+ (cons (car string) (riece-normalize-modeline-string-1
+ (cdr string))))))
+
+(defun riece-normalize-modeline-string (string)
+ (if (listp string)
+ (list (apply #'concat (riece-normalize-modeline-string-1 string)))
+ string))
+
+(defun riece-put-text-property-nonsticky (start end prop value
+ &optional object)
+ (add-text-properties start end
+ (list prop value 'front-sticky nil 'rear-nonsticky t)
+ object))
+
+(defalias 'riece-facep 'facep)
+
+;;; stolen (and renamed) from emacsbug.el.
+(defun riece-recent-messages (n)
+ "Return N most recent messages, most recent first.
+If N is nil, all messages will be returned."
+ (let ((message-buf (get-buffer "*Messages*")))
+ (if message-buf
+ (with-temp-buffer
+ (let (beg-pos end-pos)
+ (with-current-buffer message-buf
+ (setq end-pos (goto-char (point-max)))
+ (if n
+ (progn
+ (forward-line (- n))
+ (setq beg-pos (point)))
+ (setq beg-pos (point-min))))
+ (insert-buffer-substring message-buf beg-pos end-pos)
+ (reverse-region (point-min) (point-max))
+ (buffer-string))))))
+
+(defun riece-remprop (symbol property)
+ (let ((plist (symbol-plist symbol)))
+ (if (eq (car plist) property)
+ (setplist symbol (cdr (cdr plist)))
+ (while (and (nthcdr 2 plist)
+ (not (eq (car (nthcdr 2 plist)) property)))
+ (setq plist (nthcdr 2 plist)))
+ (if (nthcdr 2 plist)
+ (setcdr (cdr plist) (nthcdr 4 plist))))))
+
+(provide 'riece-emacs)
+
+;;; riece-emacs.el ends here
--- /dev/null
+;;; riece-epg.el --- Encrypt/decrypt messages add-on -*- lexical-binding: t -*-
+;; Copyright (C) 2006 Daiki Ueno
+
+;; Author: Daiki Ueno <ueno@unixuser.org>
+;; 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., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
+
+;;; Code:
+
+(require 'riece-message)
+(require 'riece-identity)
+
+(autoload 'widget-convert-button "wid-edit")
+(autoload 'epg-make-context "epg")
+(autoload 'epg-decrypt-string "epg")
+(autoload 'epg-encrypt-string "epg")
+(autoload 'epg-passphrase-callback-function "epg")
+(autoload 'epg-context-set-passphrase-callback "epg")
+(autoload 'epg-cancel "epg")
+
+(eval-when-compile
+ (autoload 'riece-command-send-message "riece-commands"))
+
+(defgroup riece-epg nil
+ "Encrypt/decrypt messages."
+ :group 'riece)
+
+(defconst riece-epg-description
+ "Encrypt/decrypt messages.")
+
+(defvar riece-epg-passphrase-alist nil)
+
+(defun riece-epg-passphrase-callback-function (context key-id identity)
+ (if (eq key-id 'SYM)
+ (let ((entry (riece-identity-assoc identity riece-epg-passphrase-alist))
+ passphrase)
+ (or (copy-sequence (cdr entry))
+ (progn
+ (unless entry
+ (setq entry (list identity)
+ riece-epg-passphrase-alist (cons entry
+ riece-epg-passphrase-alist)))
+ (setq passphrase (epg-passphrase-callback-function context
+ key-id nil))
+ (setcdr entry (copy-sequence passphrase))
+ passphrase)))
+ (epg-passphrase-callback-function context key-id nil)))
+
+(defun riece-epg-passphrase-callback-function-for-decrypt (context key-id
+ identity)
+ (if (eq key-id 'SYM)
+ (let ((entry (riece-identity-assoc identity riece-epg-passphrase-alist)))
+ (if (cdr entry)
+ (copy-sequence (cdr entry))
+ (epg-cancel context)))
+ (epg-passphrase-callback-function context key-id nil)))
+
+(defun riece-epg-funcall-clear-passphrase (identity function &rest args)
+ (condition-case error
+ (apply function args)
+ (error
+ (let ((entry (riece-identity-assoc identity riece-epg-passphrase-alist)))
+ (if entry
+ (setq riece-epg-passphrase-alist
+ (delq entry riece-epg-passphrase-alist))))
+ (signal (car error) (cdr error)))))
+
+(defun riece-command-enter-encrypted-message ()
+ "Encrypt the current line and send it to the current channel."
+ (interactive)
+ (let ((context (epg-make-context))
+ (string (buffer-substring (riece-line-beginning-position)
+ (riece-line-end-position))))
+ (epg-context-set-passphrase-callback
+ context
+ (cons #'riece-epg-passphrase-callback-function
+ riece-current-channel))
+ (riece-send-string
+ (format "PRIVMSG %s :[encrypted:%s]\r\n"
+ (riece-identity-prefix riece-current-channel)
+ (base64-encode-string
+ (riece-epg-funcall-clear-passphrase
+ riece-current-channel
+ #'epg-encrypt-string
+ context
+ (riece-with-server-buffer
+ (riece-identity-server riece-current-channel)
+ (riece-encode-coding-string-for-identity
+ string
+ riece-current-channel))
+ nil)
+ t)))
+ (riece-display-message
+ (riece-make-message (riece-current-nickname) riece-current-channel
+ (concat "[encrypted:" string "]") nil t))
+ (if (> (forward-line) 0)
+ (insert "\n"))))
+
+(defun riece-command-set-passphrase (identity passphrase)
+ "Set PASSPHRASE associated with IDENTITY."
+ (interactive
+ (let ((identity
+ (riece-completing-read-identity
+ "Channel/user: "
+ riece-current-channels nil t nil nil
+ (riece-format-identity riece-current-channel))))
+ (list identity
+ (read-passwd (format "Passphrase for %s: "
+ (riece-format-identity identity))))))
+ (let ((entry (riece-identity-assoc identity riece-epg-passphrase-alist)))
+ (if (equal passphrase "")
+ (if entry
+ (setq riece-epg-passphrase-alist
+ (delq entry riece-epg-passphrase-alist)))
+ (if entry
+ (setcdr entry passphrase)
+ (setq riece-epg-passphrase-alist
+ (cons (cons identity passphrase)
+ riece-epg-passphrase-alist))))))
+
+(defun riece-epg-decrypt-string-for-identity (context cipher target)
+ (let ((coding-system
+ (or (riece-coding-system-for-identity target)
+ riece-default-coding-system)))
+ (riece-with-server-buffer (riece-identity-server target)
+ (decode-coding-string
+ (riece-epg-funcall-clear-passphrase
+ target
+ #'epg-decrypt-string
+ context
+ (base64-decode-string cipher))
+ (if (consp coding-system)
+ (car coding-system)
+ coding-system)))))
+
+(defun riece-epg-message-filter (message)
+ (if (get 'riece-epg 'riece-addon-enabled)
+ (when (string-match "\\`\\[encrypted:\\(.*\\)]"
+ (riece-message-text message))
+ (let ((context (epg-make-context))
+ (string (match-string 1 (riece-message-text message))))
+ (epg-context-set-passphrase-callback
+ context
+ (cons #'riece-epg-passphrase-callback-function-for-decrypt
+ riece-current-channel))
+ (condition-case error
+ (progn
+ (riece-message-set-text
+ message
+ (format "[encrypted:%s]"
+ (riece-epg-decrypt-string-for-identity
+ context string (riece-message-target message)))))
+ (error
+ (riece-put-text-property-nonsticky
+ 0 (length (riece-message-text message))
+ 'riece-epg-encryption-target (riece-message-target message)
+ (riece-message-text message))
+ (if riece-debug
+ (message "Couldn't decrypt: %s" (cdr error))
+ (message "Couldn't decrypt")))))))
+ message)
+
+(defun riece-epg-add-encrypted-button (start end)
+ (if (and (get 'riece-button 'riece-addon-enabled)
+ (get 'riece-epg 'riece-addon-enabled))
+ (riece-scan-property-region
+ 'riece-epg-encryption-target
+ start end
+ (lambda (start end)
+ (let ((inhibit-read-only t)
+ buffer-read-only)
+ (widget-convert-button
+ 'link start end
+ :help-echo "Click to decrypt"
+ :notify #'riece-epg-encrypted-button-notify
+ (get-text-property start 'riece-epg-encryption-target)))))))
+
+(defun riece-epg-encrypted-button-notify (widget &rest _ignore)
+ (let* ((from (marker-position (widget-get widget :from)))
+ (to (marker-position (widget-get widget :to)))
+ (target (widget-get widget :value))
+ (cipher (buffer-substring from to))
+ (inhibit-read-only t)
+ buffer-read-only
+ plain)
+ (when (string-match "\\`\\[encrypted:\\(.*\\)]" cipher)
+ (setq plain (riece-epg-decrypt-string-for-identity
+ (epg-make-context) (match-string 1 cipher) target))
+ (widget-delete widget)
+ (delete-region from to)
+ (save-excursion
+ (goto-char from)
+ (insert "[encrypted:" plain "]")))))
+
+(defun riece-epg-requires ()
+ (if (memq 'riece-button riece-addons)
+ '(riece-button)))
+
+(defun riece-epg-insinuate ()
+ (add-hook 'riece-message-filter-functions 'riece-epg-message-filter)
+ (add-hook 'riece-after-insert-functions 'riece-epg-add-encrypted-button))
+
+(defun riece-epg-uninstall ()
+ (remove-hook 'riece-message-filter-functions 'riece-epg-message-filter)
+ (remove-hook 'riece-after-insert-functions 'riece-epg-add-encrypted-button))
+
+(defvar riece-command-mode-map)
+(defun riece-epg-enable ()
+ (define-key riece-command-mode-map
+ "\C-ce" 'riece-command-enter-encrypted-message)
+ (define-key riece-command-mode-map
+ "\C-c\C-ec" 'riece-command-set-passphrase))
+
+(defun riece-epg-disable ()
+ (define-key riece-command-mode-map
+ "\C-ce" nil)
+ (define-key riece-command-mode-map
+ "\C-c\C-ec" nil))
+
+(provide 'riece-epg)
+
+;;; riece-epg.el ends here
--- /dev/null
+;;; riece-eval-ruby.el --- evaluate input string as a Ruby program -*- lexical-binding: t -*-
+;; Copyright (C) 1998-2005 Daiki Ueno
+
+;; Author: Daiki Ueno <ueno@unixuser.org>
+;; Created: 1998-09-28
+;; Keywords: IRC, riece, Ruby
+
+;; 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., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
+
+;;; Commentary:
+
+;; NOTE: This is an add-on module for Riece.
+
+;;; Code:
+
+(require 'riece-ruby)
+(require 'riece-message)
+
+(defgroup riece-eval-ruby nil
+ "Evaluate input string as a Ruby program."
+ :prefix "riece-"
+ :group 'riece)
+
+(defcustom riece-eval-ruby-prefix-regexp "^,ruby\\s-+"
+ "Pattern of of the prefix for sending Ruby programs."
+ :type 'string
+ :group 'riece-eval-ruby)
+
+(defconst riece-eval-ruby-description
+ "Evaluate input string as a Ruby program.")
+
+(defun riece-eval-ruby-exit-handler (name)
+ (riece-ruby-inspect name)
+ (let* ((data (copy-sequence (or riece-ruby-data "nil")))
+ (length (length data))
+ (index 0))
+ (while (< index length)
+ (if (eq (aref data index) ?\n)
+ (aset data index ? ))
+ (setq index (1+ index)))
+ (riece-send-string
+ (format "NOTICE %s :%s\r\n"
+ (riece-identity-prefix
+ (riece-ruby-property name 'riece-eval-ruby-target))
+ data))
+ (riece-display-message
+ (riece-make-message (riece-current-nickname)
+ (riece-ruby-property name 'riece-eval-ruby-target)
+ data
+ 'notice))))
+
+(defun riece-eval-ruby-display-message-function (message)
+ (if (and (get 'riece-eval-ruby 'riece-addon-enabled)
+ (riece-message-own-p message)
+ (string-match riece-eval-ruby-prefix-regexp
+ (riece-message-text message)))
+ (let ((name (riece-ruby-execute
+ (substring (riece-message-text message)
+ (match-end 0)))))
+ (riece-ruby-set-property name
+ 'riece-eval-ruby-target
+ (riece-message-target message))
+ (riece-ruby-set-exit-handler name
+ #'riece-eval-ruby-exit-handler))))
+
+(defun riece-eval-ruby-insinuate ()
+ (add-hook 'riece-after-display-message-functions
+ 'riece-eval-ruby-display-message-function))
+
+(defun riece-eval-ruby-uninstall ()
+ (remove-hook 'riece-after-display-message-functions
+ 'riece-eval-ruby-display-message-function))
+
+(provide 'riece-eval-ruby)
+
+;;; riece-eval-ruby.el ends here
--- /dev/null
+;;; riece-eval.el --- evaluate input string as an elisp form -*- lexical-binding: t -*-
+;; Copyright (C) 2005 OHASHI Akira
+
+;; Author: OHASHI Akira <bg66@koka-in.org>
+;; 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., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
+
+;;; Commentary:
+
+;; NOTE: This is an add-on module for Riece.
+
+;;; Code:
+
+(require 'pp)
+(require 'riece-message)
+
+(defgroup riece-eval nil
+ "Evaluate an input string as an elisp form."
+ :prefix "riece-"
+ :group 'riece)
+
+(defcustom riece-eval-regexp "^, \\(.+\\)"
+ "*Pattern of string evaluating."
+ :type 'string
+ :group 'riece-eval)
+
+(defcustom riece-eval-ignore-error nil
+ "*If non-nil, an error is ignored."
+ :type 'boolean
+ :group 'riece-eval)
+
+(defconst riece-eval-description
+ "Evaluate an input string as an elisp form.")
+
+(defun riece-eval-display-message-function (message)
+ (when (and (get 'riece-eval 'riece-addon-enabled)
+ (riece-message-own-p message)
+ (string-match riece-eval-regexp (riece-message-text message)))
+ (let* ((form (match-string 1 (riece-message-text message)))
+ (string (riece-eval-form form)))
+ (unless (equal string "")
+ (riece-send-string
+ (format "NOTICE %s :%s\r\n"
+ (riece-identity-prefix (riece-message-target message))
+ string))
+ (riece-display-message
+ (riece-make-message (riece-current-nickname)
+ (riece-message-target message)
+ string 'notice))))))
+
+(defun riece-eval-form (form)
+ (condition-case err
+ (let ((object (eval (read form))))
+ (cond
+ ((stringp object) object)
+ ((and (listp object)
+ (not (eq object nil)))
+ (let ((string (pp-to-string object)))
+ (substring string 0 (1- (length string)))))
+ ((numberp object)
+ (number-to-string object))
+ ((eq object nil) "")
+ (t (pp-to-string object))))
+ (error
+ (unless riece-eval-ignore-error
+ (format "Error evaluating %s: %s" form err)))))
+
+(defun riece-eval-insinuate ()
+ (add-hook 'riece-after-display-message-functions
+ 'riece-eval-display-message-function))
+
+(defun riece-eval-uninstall ()
+ (remove-hook 'riece-after-display-message-functions
+ 'riece-eval-display-message-function))
+
+(provide 'riece-eval)
+
+;;; riece-eval.el ends here
--- /dev/null
+;;; riece-filter.el --- process filter and sentinel -*- lexical-binding: t -*-
+;; Copyright (C) 1998-2003 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., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
+
+;;; Code:
+
+(require 'riece-handle)
+(require 'riece-misc)
+(require 'riece-server) ;riece-close-server
+(require 'riece-identity)
+(require 'riece-debug)
+
+(defun riece-handle-numeric-reply (prefix number name string)
+ (let ((base-number (* (/ number 100) 100))
+ function)
+ (setq function (intern-soft (format "riece-handle-%03d-message" number)))
+ (unless (and function
+ (symbol-function function))
+ (setq function
+ (intern-soft
+ (format "riece-handle-default-%03d-message" base-number))))
+ (if (and function
+ (symbol-function function))
+ (riece-funcall-ignore-errors (symbol-name function)
+ function prefix number name
+ (riece-decode-coding-string string)))))
+
+(defun riece-handle-message (prefix message string)
+ (if (and prefix
+ (string-match "![^\x00\x0d\x0a @]+@" prefix))
+ (riece-user-set-user-at-host
+ (riece-get-user (substring prefix 0 (match-beginning 0)))
+ (riece-parse-user-at-host (substring prefix (1+ (match-beginning 0))))))
+ (setq message (downcase message)
+ string (riece-decode-coding-string string))
+ (let ((function (intern-soft (concat "riece-handle-" message "-message")))
+ (hook (intern (concat "riece-" message "-hook")))
+ (after-hook (intern (concat "riece-after-" message "-hook"))))
+ (unless (riece-funcall-ignore-errors (symbol-name hook)
+ #'run-hook-with-args-until-success
+ hook prefix string)
+ (if function
+ (riece-funcall-ignore-errors (symbol-name function)
+ function prefix string))
+ (riece-funcall-ignore-errors (symbol-name after-hook)
+ #'run-hook-with-args-until-success
+ after-hook prefix string))))
+
+(defsubst riece-chomp-string (string)
+ (if (string-match "\r\\'" string)
+ (substring string 0 (match-beginning 0))
+ string))
+
+(defun riece-filter (process input)
+ (with-current-buffer (process-buffer process)
+ (goto-char (point-max))
+ (insert input)
+ (unless riece-filter-running
+ (unwind-protect
+ (progn
+ (setq riece-filter-running t)
+ (goto-char riece-read-point)
+ (beginning-of-line)
+ (while (looking-at ".*\n") ;the input line is finished
+ (save-excursion
+ (if (looking-at
+ ":\\([^ ]+\\) +\\([0-5][0-9][0-9]\\) +\\([^ ]+\\)\
+ +\\(.*\\)")
+ (riece-handle-numeric-reply
+ (match-string 1) ;prefix
+ (string-to-number (match-string 2)) ;number
+ (match-string 3) ;name
+ (riece-chomp-string (match-string 4))) ;reply string
+ (if (looking-at "\\(:\\([^ ]+\\) +\\)?\\([^ ]+\\) +\\(.*\\)")
+ (riece-handle-message
+ (match-string 2) ;optional prefix
+ (match-string 3) ;command
+ (riece-chomp-string (match-string 4))
+ ;params & trailing
+ )
+ (if riece-debug
+ (message "Weird message from server: %s"
+ (buffer-substring (point) (progn
+ (end-of-line)
+ (point))))))))
+ (forward-line))
+ (unless riece-debug
+ (delete-region (point-min) (point)))
+ (setq riece-read-point (point)))
+ (setq riece-filter-running nil)))))
+
+(eval-when-compile
+ (autoload 'riece-exit "riece"))
+(defun riece-sentinel (process status)
+ (if riece-reconnect-with-password
+ (let ((server-name
+ (with-current-buffer (process-buffer process)
+ riece-server-name)))
+ (riece-close-server-process process)
+ (riece-open-server
+ (if (equal server-name "")
+ riece-server
+ (riece-server-name-to-server server-name))
+ server-name))
+ (let ((server-name (with-current-buffer (process-buffer process)
+ riece-server-name)))
+ (if riece-debug
+ (if (equal server-name "")
+ (riece-debug (format "Connection closed: %s"
+ (substring status 0 (1- (length status)))))
+ (riece-debug (format "Connection to \"%s\" closed: %s"
+ server-name
+ (substring status 0 (1- (length status))))))
+ (if (equal server-name "")
+ (message "Connection closed")
+ (message "Connection to \"%s\" closed" server-name)))
+ (let ((channels riece-current-channels))
+ (while channels
+ (if (and (car channels)
+ (equal (riece-identity-server (car channels))
+ server-name))
+ (riece-part-channel (car channels)))
+ (setq channels (cdr channels))))
+ (riece-redisplay-buffers)
+ (riece-close-server-process process)
+ ;; If no server process is available, exit.
+ (unless riece-server-process-alist
+ (riece-exit)))))
+
+(provide 'riece-filter)
+
+;;; riece-filter.el ends here
--- /dev/null
+;;; riece-foolproof.el --- prevent miss-operation in the command buffer -*- lexical-binding: t -*-
+;; Copyright (C) 2004 TAKAHASHI Kaoru
+
+;; Author: TAKAHASHI Kaoru <kaoru@kaisei.org>
+;; 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., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
+
+;;; Commentary:
+
+;; NOTE: This is an add-on module for Riece.
+
+;;; Code:
+
+(eval-when-compile
+ (require 'riece-identity)
+ (require 'riece-display))
+
+(defconst riece-foolproof-description
+ "Prevent miss-operation in the command buffer.")
+
+(defun riece-foolproof-get-channel-window (identity)
+ (get-buffer-window
+ (cdr (riece-identity-assoc
+ identity riece-channel-buffer-alist))))
+
+(defun riece-foolproof-command-send-message-function ()
+ (when (get 'riece-foolproof 'riece-addon-enabled)
+ (unless (or (not riece-channel-buffer-mode)
+ (riece-foolproof-get-channel-window
+ riece-current-channel))
+ (error "Channel %s is not displayed"
+ (riece-identity-prefix riece-current-channel)))
+ (when (text-property-not-all
+ (riece-line-beginning-position) (riece-line-end-position)
+ 'invisible nil)
+ (error "Invisible text included: %s"
+ (buffer-substring-no-properties
+ (riece-line-beginning-position)
+ (riece-line-end-position))))
+ (when executing-kbd-macro
+ (error "%s" "Forbidden to run keyboard macro"))))
+
+(defun riece-foolproof-insinuate ()
+ (add-hook 'riece-command-send-message-hook
+ 'riece-foolproof-command-send-message-function))
+
+(defun riece-foolproof-uninstall ()
+ (remove-hook 'riece-command-send-message-hook
+ 'riece-foolproof-command-send-message-function))
+
+(provide 'riece-foolproof)
+
+;;; riece-foolproof.el ends here
--- /dev/null
+;;; riece-globals.el --- global variables and constants. -*- lexical-binding: t -*-
+;; Copyright (C) 1998-2003 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., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
+
+;;; Code:
+
+(require 'riece-compat) ;riece-make-interval-regexp
+
+;;; Constants:
+(defconst riece-strict-channel-regexp
+ (concat "\\([+&#]\\|!"
+ (riece-make-interval-regexp "[A-Z0-9]" 5)
+ "\\|!!\\)[^\0\7\r\n ,:]*\\(:[^\0\7\r\n ,:]*\\)?"))
+
+(defconst riece-strict-user-regexp
+ (concat "[][\\\\`_^{|}A-Za-z]"
+ (riece-make-interval-regexp "[][\\\\`_^{|}A-Za-z0-9-]" 0 8)))
+
+(defconst riece-laxed-channel-regexp
+ "[+&#!][^\0\7\r\n ,:]*\\(:[^\0\7\r\n ,:]*\\)?")
+
+(defconst riece-laxed-user-regexp
+ "[][\\\\`_^{|}A-Za-z][][\\\\`_^{|}A-Za-z0-9-]*")
+
+(defvar riece-channel-regexp riece-laxed-channel-regexp)
+(defvar riece-user-regexp riece-laxed-user-regexp)
+
+;;; Global variables:
+(defvar riece-server-process-alist nil
+ "An alist mapping server names to processes.")
+
+(defvar riece-current-channel nil
+ "The channel you currently have joined.")
+(defvar riece-current-channels nil
+ "The channels you have currently joined.")
+(defvar riece-join-channel-candidate nil
+ "The candidate for channel to be used with the next join command.")
+
+(defvar riece-save-variables-are-dirty nil
+ "Non nil if the variables in `riece-saved-forms' are changed.")
+
+(defvar riece-polling 0
+ "Interval for polling the server.")
+
+(defvar riece-reconnect-with-password nil
+ "If non-nil, attempt to reconnect with password.")
+
+(defvar riece-user-obarray-size 1327
+ "The size of obarray used by riece on user name space.")
+
+(defvar riece-channel-obarray-size 103
+ "The size of obarray used by riece on channel name space.")
+
+(defvar riece-addon-dependencies nil)
+
+;;; Variables local to the server buffers:
+(defvar riece-server-name nil
+ "The name of the server.
+Local to the server buffers.")
+(defvar riece-real-nickname nil
+ "Your nickname the server offers.
+Local to the server buffers.")
+(defvar riece-last-nickname nil
+ "The last nickname you requested.
+Local to the server buffers.")
+(defvar riece-nick-accepted nil
+ "The flag your nickname is accepted by the server.
+Possible values are nil, `ok', and `sent'.
+Local to the server buffers.")
+(defvar riece-real-server-name nil
+ "The server name offered by the server.
+Local to the server buffers.")
+(defvar riece-real-userhost nil
+ "Your hostname the server offers.
+Local to the server buffers.")
+(defvar riece-user-at-host ""
+ "The user@host for the current input.
+Local to the server buffers.")
+(defvar riece-user-at-host-type nil
+ "The authentication type of `riece-user-at-host'.
+Possible values are 'ok 'not-verified 'fake or 'invalid.
+Local to the server buffers.")
+(defvar riece-supported-user-modes nil
+ "User modes supported by server.
+Local to the server buffers.")
+(defvar riece-supported-channel-modes nil
+ "Channel modes supported by server.
+Local to the server buffers.")
+(defvar riece-channel-filter ""
+ "Filter of the result of NAMES or LIST.
+This enables us to use \\[universal-argument] with NAMES and TOPIC.
+Local to the server buffers.")
+(defvar riece-read-point nil
+ "Point at the last input was seen.
+Local to the server buffers.")
+(defvar riece-filter-running nil
+ "Lock of the process filter; non-nil indicates the process filter is running.
+Local to the server buffers.")
+(defvar riece-send-queue nil
+ "Send queue for avoiding client flood.
+Local to the server buffers.")
+(defvar riece-send-size nil
+ "Size of the last send.
+Local to the server buffers.")
+(defvar riece-last-send-time nil
+ "Timestamp of the last send.
+Local to the server buffers.")
+(defvar riece-user-obarray nil
+ "USER namespace of the IRC world.
+Local to the server buffers.")
+(defvar riece-channel-obarray nil
+ "Channel namespace of the IRC world.
+Local to the server buffers.")
+(defvar riece-coding-system nil
+ "Coding system for process I/O.
+Local to the server buffers.")
+(defvar riece-channel-cache nil
+ "Cache of channel names.
+Local to the server buffers.")
+(defvar riece-user-cache nil
+ "Cache of user names.
+Local to the server buffers.")
+
+;;; Variables local to the channel buffers:
+(defvar riece-freeze nil
+ "If t, channel window is locked and will not be scrolled.
+If 'own, channel window is locked until the user begins to speak.
+Local to the channel buffers.")
+
+(defvar riece-freeze-indicator nil
+ "String displayed on the modeline to allow the user to tell if the
+channel buffer is locked.
+Local to the channel buffers.")
+
+(defvar riece-channel-buffer-window-point nil
+ "Last value of point in window which displayed the channel buffer.
+Local to the channel buffers.")
+
+;;; Modeline indicators:
+(defvar riece-mode-line-buffer-identification nil)
+(put 'riece-mode-line-buffer-identification 'risky-local-variable t)
+(defvar riece-channel-indicator "None"
+ "String displayed on the modeline to indicate the current channel.")
+(put 'riece-channel-indicator 'risky-local-variable t)
+(defvar riece-long-channel-indicator "None"
+ "String displayed on the modeline to indicate the current channel.
+Generally, this string will contain more information than
+riece-channel-indicator.")
+(put 'riece-long-channel-indicator 'risky-local-variable t)
+(defvar riece-channel-list-indicator "No channel"
+ "String displayed on the modeline to show the joined channels.")
+(put 'riece-channel-list-indicator 'risky-local-variable t)
+(defvar riece-user-indicator nil
+ "String displayed on the modeline to show the current nickname.")
+(put 'riece-user-indicator 'risky-local-variable t)
+
+(defvar riece-away-indicator "-"
+ "String displayed on the modeline to allow the user to tell if the
+user is away.")
+(put 'riece-away-indicator 'risky-local-variable t)
+(defvar riece-operator-indicator "-"
+ "String displayed on the modeline to allow the user to tell if the
+user is an operator.")
+(put 'riece-operator-indicator 'risky-local-variable t)
+(defvar riece-channel-status-indicator "-"
+ "String displayed on the modeline to allow the user to tell if the
+user's status on the current channel.")
+(put 'riece-channel-status-indicator 'risky-local-variable t)
+
+;;; Buffers:
+(defvar riece-command-buffer nil
+ "The command buffer.")
+(defvar riece-dialogue-buffer nil
+ "Buffer for whole conversation.")
+(defvar riece-others-buffer nil
+ "Buffer for other messages.")
+(defvar riece-channel-list-buffer nil
+ "Buffer for channel list.")
+(defvar riece-user-list-buffer nil
+ "Buffer for user list.")
+(defvar riece-channel-buffer nil
+ "Buffer for messages arrived in the current channel.")
+(defvar riece-temp-buffer nil
+ "Buffer for temporally use.")
+(defvar riece-debug-buffer nil
+ "Buffer for debug output.")
+
+(defvar riece-buffer-list nil)
+(defvar riece-overriding-server-name nil)
+
+(defconst riece-change-prefix "*** Change: ")
+(defconst riece-notice-prefix "*** Notice: ")
+(defconst riece-wallops-prefix "*** Notice: ")
+(defconst riece-error-prefix "*** Error: ")
+(defconst riece-info-prefix "*** Info: ")
+(defconst riece-prefix-regexp "\\*\\*\\* \\([^:]+: \\)")
+
+(defconst riece-time-prefix-regexp "[0-9][0-9]:[0-9][0-9] ")
+
+(provide 'riece-globals)
+
+;;; riece-globals.el ends here
--- /dev/null
+;;; riece-google.el --- search keywords by Google -*- lexical-binding: t -*-
+;; Copyright (C) 2005 OHASHI Akira
+
+;; Author: OHASHI Akira <bg66@koka-in.org>
+;; SASADA Koichi <ko1 at atdot.net>
+;; 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., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
+
+;;; Commentary:
+
+;; NOTE: This is an add-on module for Riece.
+
+;; Ruby code was stolen (and modified) from nadoka.
+
+;;; Code:
+
+(require 'riece-message)
+
+(defgroup riece-google nil
+ "Search keywords by Google."
+ :prefix "riece-"
+ :group 'riece)
+
+(defcustom riece-google-ruby-command "ruby"
+ "Command name for Ruby interpreter."
+ :type 'string
+ :group 'riece-google)
+
+(defcustom riece-google-program
+ '("\
+# Copyright (c) 2004 SASADA Koichi <ko1 at atdot.net>
+#
+# This program is free software with ABSOLUTELY NO WARRANTY.
+# You can re-distribute and/or modify this program under
+# the same terms of the Ruby's lisence.
+
+require 'soap/wsdlDriver'
+require 'iconv'
+require 'kconv'
+require 'cgi'
+
+keywords = '" keywords "'
+max_results = " max-results "
+license_key = '" license-key "'
+default_lang = '" lang "'
+google_wsdl = 'http://api.google.com/GoogleSearch.wsdl'
+google = SOAP::WSDLDriverFactory.new(google_wsdl).create_driver
+
+def erace_tag str
+ CGI.unescapeHTML(str.gsub(/\\<.+?\\>/, ''))
+end
+
+def lang_check lang
+ if lang.empty? || /^lang_/ =~ lang
+ lang
+ else
+ 'lang_' + lang
+ end
+end
+
+def show_char_code_and_erace_tag str
+ case $KCODE
+ when 'EUC', 'SJIS'
+ CGI.unescapeHTML(str.gsub(/\\<.+?\\>/, '')).tojis
+ when 'NONE', 'UTF-8'
+ begin
+ str = Iconv.conv(\"EUC-JP\", \"UTF-8\", str)
+ CGI.unescapeHTML(str.gsub(/\\<.+?\\>/, '')).tojis
+ rescue => e
+ \"(char code problem: #{e.class}[#{e.message.dump}])\"
+ end
+ else
+ str
+ end
+end
+
+def search_char_code str
+ case $KCODE
+ when 'EUC', 'SJIS'
+ str.toeuc
+ when 'NONE'
+ begin
+ Iconv.conv(\"UTF-8\", \"EUC-JP\", str.toeuc)
+ rescue => e
+ \"(char code problem: #{e.class})\"
+ end
+ when 'UTF-8'
+ str
+ else
+ raise
+ end
+end
+
+begin
+ lang = lang_check(default_lang)
+ word = search_char_code(keywords)
+ result = google.doGoogleSearch(
+ license_key, word, 0, max_results, false, \"\",
+ false, lang, 'utf-8', 'utf-8'
+ )
+
+ count = result.estimatedTotalResultsCount
+ if count > 0
+ word = show_char_code_and_erace_tag(keywords)
+ count = count.to_s.gsub(/(\\d)(?=\\d{3}+$)/, '\\\\1,')
+ time = result.searchTime.to_s
+ print \"Search results for #{word} (Hits: #{count}: Time: #{time}):\\n\"
+
+ result.resultElements.each_with_index{|e, i|
+ title = show_char_code_and_erace_tag(e.title)
+ url = e.URL
+ print \"#{title} - #{url}\\n\"
+ }
+ else
+ print \"no match\\n\"
+ end
+
+rescue Exception => e
+ print \"#{e.class}(#{e.message})\"
+end
+")
+ "Ruby program for searching by Google."
+ :type 'sexp
+ :group 'riece-google)
+
+(defcustom riece-google-license-key nil
+ "*License key for Google API."
+ :type 'string
+ :group 'riece-google)
+
+(defcustom riece-google-default-lang '("lang_en" "lang_ja")
+ "*Default language for searching keywords."
+ :type '(repeat (choice (const "lang_en" :tag "English")
+ (const "lang_ja" :tag "Japanese")
+ (string :tag "The other language")))
+ :group 'riece-google)
+
+(defconst riece-google-regexp
+ "^go\\(o+\\)gle\\(:\\([a-z]+\\)\\)?>\\s-*\\(.*\\)")
+
+(defconst riece-google-description
+ "Search keywords by Google.")
+
+(defvar riece-google-target nil)
+
+(defun riece-google-display-message-function (message)
+ (when (and (get 'riece-google 'riece-addon-enabled)
+ (stringp riece-google-license-key)
+ (string-match riece-google-regexp (riece-message-text message)))
+ (let ((keywords (match-string 4 (riece-message-text message)))
+ (max-results (number-to-string
+ (length
+ (match-string 1 (riece-message-text message)))))
+ (lang (or (match-string 3 (riece-message-text message))
+ riece-google-default-lang))
+ (process-connection-type nil)
+ selective-display
+ (coding-system-for-read 'binary)
+ (coding-system-for-write 'binary)
+ (process (start-process "Google" (generate-new-buffer " *Google*")
+ riece-google-ruby-command)))
+ (when (listp lang)
+ (setq lang (mapconcat #'identity lang " ")))
+ (setq riece-google-target (riece-message-target message))
+ (process-send-string process
+ (apply #'concat
+ (riece-google-substitute-variables
+ (riece-google-substitute-variables
+ (riece-google-substitute-variables
+ (riece-google-substitute-variables
+ riece-google-program
+ 'keywords keywords)
+ 'max-results max-results)
+ 'license-key riece-google-license-key)
+ 'lang lang)))
+ (process-send-eof process)
+ (with-current-buffer (process-buffer process)
+ (set-buffer-multibyte t)
+ (erase-buffer)
+ (set-buffer-modified-p nil))
+ (set-process-filter process #'riece-google-filter)
+ (set-process-sentinel process #'riece-google-sentinel))))
+
+(defun riece-google-filter (process output)
+ (when (buffer-live-p (process-buffer process))
+ (with-current-buffer (process-buffer process)
+ (goto-char (point-max))
+ (insert output)
+ (goto-char (point-min))
+ (while (progn (end-of-line) (and (not (eobp)) (eq (char-after) ?\n)))
+ (if (eq (char-after (1- (point))) ?\r) ; cut off preceding LF
+ (delete-region (1- (point)) (point)))
+ (riece-google-send-string riece-google-target
+ (buffer-substring (point-min) (point)))
+ (delete-region (point-min) (progn (beginning-of-line 2) (point)))))))
+
+(defun riece-google-sentinel (process _string)
+ (delete-process process))
+
+(defun riece-google-send-string (target message)
+ (riece-send-string
+ (format "NOTICE %s :%s\r\n" (riece-identity-prefix target) message))
+ (riece-display-message
+ (riece-make-message (riece-current-nickname) target message 'notice)))
+
+(defun riece-google-substitute-variables (program variable value)
+ (setq program (copy-sequence program))
+ (let ((pointer program))
+ (while pointer
+ (setq pointer (memq variable program))
+ (if pointer
+ (setcar pointer value)))
+ program))
+
+(defun riece-google-insinuate ()
+ (add-hook 'riece-after-display-message-functions
+ 'riece-google-display-message-function))
+
+(defun riece-google-uninstall ()
+ (remove-hook 'riece-after-display-message-functions
+ 'riece-google-display-message-function))
+
+(provide 'riece-google)
+
+;;; riece-google.el ends here
--- /dev/null
+;;; riece-guess.el --- guess the next channel, using multiple methods -*- lexical-binding: t -*-
+;; Copyright (C) 1998-2003 Daiki Ueno
+
+;; Author: Daiki Ueno <ueno@unixuser.org>
+;; 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., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
+
+;;; Commentary:
+
+;; NOTE: This is an add-on module for Riece.
+
+;;; Code:
+
+(require 'riece-identity)
+(require 'riece-commands)
+
+(defgroup riece-guess nil
+ "Guess the next channel."
+ :tag "Guess"
+ :prefix "riece-"
+ :group 'riece)
+
+(defcustom riece-guess-channel-try-functions nil
+ "Functions which returns a list of channels the user wants to switch."
+ :type '(repeat function)
+ :group 'riece-guess)
+
+(defconst riece-guess-description
+ "Guess the next channel, using multiple methods.")
+
+(defvar riece-current-channels)
+
+(defun riece-guess-candidates ()
+ "Build candidate list.
+This function calls \\[riece-guess-channel-try-functions] in turn and
+merge the results."
+ (let ((functions riece-guess-channel-try-functions)
+ candidates)
+ (while functions
+ (setq candidates
+ (nconc candidates
+ (delq nil (mapcar
+ (lambda (channel)
+ (unless (riece-identity-member
+ channel candidates)
+ channel))
+ (funcall (car functions)))))
+ functions (cdr functions)))
+ ;; Merge the default.
+ (setq candidates
+ (nconc candidates
+ (delq nil (mapcar
+ (lambda (channel)
+ (if (and channel
+ (not (riece-identity-member
+ channel candidates)))
+ channel))
+ riece-current-channels))))
+ candidates))
+
+(defvar riece-guess-candidates nil)
+
+(defun riece-command-guess-switch-to-channel ()
+ "Try to switch to the channel where the user is interested in."
+ (interactive)
+ (unless (and (eq last-command this-command)
+ riece-guess-candidates)
+ (setq riece-guess-candidates (riece-guess-candidates)))
+ (unless riece-guess-candidates
+ (error "No channel"))
+ (riece-command-switch-to-channel
+ (prog1 (car riece-guess-candidates)
+ (setq riece-guess-candidates (cdr riece-guess-candidates)))))
+
+(defvar riece-command-mode-map)
+(defvar riece-dialogue-mode-map)
+(defvar riece-channel-list-mode-map)
+
+(defun riece-guess-insinuate ()
+ )
+
+(defun riece-guess-enable ()
+ (define-key riece-command-mode-map
+ "\C-cg" 'riece-command-guess-switch-to-channel)
+ (define-key riece-dialogue-mode-map
+ "g" 'riece-command-guess-switch-to-channel)
+ (define-key riece-channel-list-mode-map
+ "g" 'riece-command-guess-switch-to-channel))
+
+(defun riece-guess-disable ()
+ (define-key riece-command-mode-map
+ "\C-cg" nil)
+ (define-key riece-dialogue-mode-map
+ "g" nil)
+ (define-key riece-channel-list-mode-map
+ "g" nil))
+
+(provide 'riece-guess)
+
+;;; riece-guess.el ends here
--- /dev/null
+;;; riece-handle.el --- basic message handlers -*- lexical-binding: t -*-
+;; Copyright (C) 1998-2003 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., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
+
+;;; Code:
+
+(require 'riece-misc)
+(require 'riece-message)
+(require 'riece-channel)
+(require 'riece-naming)
+(require 'riece-signal)
+(require 'riece-mode)
+(require 'riece-000)
+(require 'riece-200)
+(require 'riece-300)
+(require 'riece-400)
+(require 'riece-500)
+
+(defun riece-default-handle-numeric-reply
+ (client-prefix _prefix _number _name string)
+ (riece-insert
+ (list riece-dialogue-buffer riece-others-buffer)
+ (concat client-prefix
+ (riece-concat-server-name
+ (mapconcat #'identity (riece-split-parameters string) " "))
+ "\n")))
+
+(defun riece-handle-nick-message (prefix string)
+ (let* ((old (riece-prefix-nickname prefix))
+ (new (car (riece-split-parameters string)))
+ (old-identity (riece-make-identity old riece-server-name))
+ (new-identity (riece-make-identity new riece-server-name))
+ (channels (riece-user-get-channels old))
+ (visible (riece-identity-member
+ riece-current-channel
+ (mapcar (lambda (channel)
+ (riece-make-identity channel riece-server-name))
+ channels))))
+ (riece-naming-assert-rename old new)
+ (if (riece-identity-member old-identity riece-current-channels)
+ (setq channels (cons new channels)))
+ (riece-insert-change (delq nil (mapcar
+ (lambda (channel)
+ (riece-channel-buffer
+ (riece-make-identity
+ channel riece-server-name)))
+ channels))
+ (format "%s -> %s\n"
+ (riece-format-identity old-identity t)
+ (riece-format-identity new-identity t)))
+ (riece-insert-change (if visible
+ riece-dialogue-buffer
+ (list riece-dialogue-buffer riece-others-buffer))
+ (concat
+ (riece-concat-server-name
+ (format "%s -> %s"
+ (riece-format-identity old-identity t)
+ (riece-format-identity new-identity t)))
+ "\n"))))
+
+(defun riece-handle-privmsg-message (prefix decoded)
+ (let* ((user (riece-prefix-nickname prefix))
+ (parameters (riece-split-parameters (riece-decoded-string decoded)))
+ (targets (split-string (car parameters) ","))
+ message)
+ (setq parameters (riece-split-parameters
+ (riece-decoded-string-for-identity
+ decoded
+ (riece-make-identity (car targets) riece-server-name)))
+ message (nth 1 parameters))
+ (riece-display-message
+ (riece-make-message (riece-make-identity user
+ riece-server-name)
+ (riece-make-identity (car targets)
+ riece-server-name)
+ message
+ nil
+ (riece-identity-equal-no-server
+ user riece-real-nickname)))))
+
+(defun riece-handle-notice-message (prefix decoded)
+ (let* ((user (if prefix
+ (riece-prefix-nickname prefix)))
+ (parameters (riece-split-parameters (riece-decoded-string decoded)))
+ (targets (split-string (car parameters) ","))
+ message)
+ (setq parameters (riece-split-parameters
+ (riece-decoded-string-for-identity
+ decoded
+ (riece-make-identity (car targets) riece-server-name)))
+ message (nth 1 parameters))
+ (if user
+ (riece-display-message
+ (riece-make-message (riece-make-identity user
+ riece-server-name)
+ (riece-make-identity (car targets)
+ riece-server-name)
+ message 'notice
+ (if riece-real-nickname
+ (riece-identity-equal-no-server
+ user riece-real-nickname))))
+ ;; message from server
+ (riece-insert-notice
+ (list riece-dialogue-buffer riece-others-buffer)
+ (concat (riece-concat-server-name message) "\n")))))
+
+(defun riece-handle-ping-message (_prefix string)
+ (riece-send-string (format "PONG :%s\r\n"
+ (if (eq (aref string 0) ?:)
+ (substring string 1)
+ string))))
+
+(defun riece-handle-join-message (prefix string)
+ (let* ((user (riece-prefix-nickname prefix))
+ ;; RFC2812 3.2.1 doesn't recommend server to send join
+ ;; messages which contain multiple targets.
+ (channels (split-string (car (riece-split-parameters string)) ","))
+ (user-identity (riece-make-identity user riece-server-name)))
+ (while channels
+ (riece-naming-assert-join user (car channels))
+ (if (and riece-gather-channel-modes
+ (riece-identity-equal-no-server user riece-real-nickname))
+ (riece-send-string (format "MODE %s\r\n" (car channels))))
+ (unless (and (memq 'joins riece-hide-list)
+ (not (riece-identity-equal-no-server
+ user riece-real-nickname)))
+ (let* ((channel-identity (riece-make-identity (car channels)
+ riece-server-name))
+ (buffer (riece-channel-buffer channel-identity)))
+ (riece-insert-change
+ buffer
+ (format (riece-mcat "%s (%s) has joined %s\n")
+ (riece-format-identity user-identity t)
+ (riece-user-get-user-at-host user)
+ (riece-format-identity channel-identity t)))
+ (riece-insert-change
+ (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 (riece-mcat "%s (%s) has joined %s")
+ (riece-format-identity user-identity t)
+ (riece-user-get-user-at-host user)
+ (riece-format-identity channel-identity t)))
+ "\n"))))
+ (setq channels (cdr channels)))))
+
+(defun riece-handle-part-message (prefix decoded)
+ (let* ((user (riece-prefix-nickname prefix))
+ (parameters (riece-split-parameters (riece-decoded-string decoded)))
+ ;; RFC2812 3.2.2 doesn't recommend server to send part
+ ;; messages which contain multiple targets.
+ (channels (split-string (car parameters) ","))
+ (user-identity (riece-make-identity user riece-server-name)))
+ (while channels
+ (unless (and (memq 'parts riece-hide-list)
+ (not (riece-identity-equal-no-server
+ user riece-real-nickname)))
+ (let* ((channel-identity (riece-make-identity (car channels)
+ riece-server-name))
+ (buffer (riece-channel-buffer channel-identity))
+ message)
+ (setq parameters (riece-split-parameters
+ (riece-decoded-string-for-identity decoded
+ channel-identity))
+ message (nth 1 parameters))
+ (riece-insert-change
+ buffer
+ (concat
+ (riece-concat-message
+ (format (riece-mcat "%s has left %s")
+ (riece-format-identity user-identity t)
+ (riece-format-identity channel-identity t))
+ message)
+ "\n"))
+ (riece-insert-change
+ (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
+ (riece-concat-message
+ (format (riece-mcat "%s has left %s")
+ (riece-format-identity user-identity t)
+ (riece-format-identity channel-identity t))
+ message))
+ "\n"))))
+ (riece-naming-assert-part user (car channels))
+ (setq channels (cdr channels)))))
+
+(defun riece-handle-kick-message (prefix decoded)
+ (let* ((kicker (riece-prefix-nickname prefix))
+ (parameters (riece-split-parameters (riece-decoded-string decoded)))
+ (channel (car parameters))
+ (user (nth 1 parameters))
+ message
+ (kicker-identity (riece-make-identity kicker riece-server-name))
+ (channel-identity (riece-make-identity channel riece-server-name))
+ (user-identity (riece-make-identity user riece-server-name)))
+ (setq parameters (riece-split-parameters
+ (riece-decoded-string-for-identity decoded
+ channel-identity))
+ message (nth 2 parameters))
+ (riece-naming-assert-part user channel)
+ (let ((buffer (riece-channel-buffer channel-identity)))
+ (riece-insert-change
+ buffer
+ (concat
+ (riece-concat-message
+ (format (riece-mcat "%s kicked %s out from %s")
+ (riece-format-identity kicker-identity t)
+ (riece-format-identity user-identity t)
+ (riece-format-identity channel-identity t))
+ message)
+ "\n"))
+ (riece-insert-change
+ (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
+ (riece-concat-message
+ (format (riece-mcat "%s kicked %s out from %s\n")
+ (riece-format-identity kicker-identity t)
+ (riece-format-identity user-identity t)
+ (riece-format-identity channel-identity t))
+ message))
+ "\n")))))
+
+(defun riece-handle-quit-message (prefix string)
+ (let* ((user (riece-prefix-nickname prefix))
+ (channels (copy-sequence (riece-user-get-channels user)))
+ (pointer channels)
+ (parameters (riece-split-parameters string))
+ (message (car parameters))
+ (user-identity (riece-make-identity user riece-server-name)))
+ ;; If you are talking with the user, quit it.
+ (if (riece-identity-member user-identity riece-current-channels)
+ (riece-part-channel user-identity))
+ (setq pointer channels)
+ (while pointer
+ (riece-naming-assert-part user (car pointer))
+ (setq pointer (cdr pointer)))
+ (unless (and (memq 'quits riece-hide-list)
+ (not (riece-identity-equal-no-server
+ user riece-real-nickname)))
+ (let ((buffers
+ (delq nil (mapcar
+ (lambda (channel)
+ (riece-channel-buffer (riece-make-identity
+ channel riece-server-name)))
+ channels))))
+ (riece-insert-change
+ buffers
+ (concat
+ (riece-concat-message
+ (format (riece-mcat "%s has left IRC")
+ (riece-format-identity user-identity t))
+ message)
+ "\n"))
+ (riece-insert-change
+ (if (and riece-channel-buffer-mode
+ (not (memq riece-channel-buffer buffers)))
+ (list riece-dialogue-buffer riece-others-buffer)
+ riece-dialogue-buffer)
+ (concat
+ (riece-concat-server-name
+ (riece-concat-message
+ (format (riece-mcat "%s has left IRC")
+ (riece-format-identity user-identity t))
+ message))
+ "\n"))))))
+
+(defun riece-handle-kill-message (prefix string)
+ (let* ((killer (riece-prefix-nickname prefix))
+ (parameters (riece-split-parameters string))
+ (user (car parameters))
+ (message (nth 1 parameters))
+ (channels (copy-sequence (riece-user-get-channels user)))
+ (killer-identity (riece-make-identity killer riece-server-name))
+ (user-identity (riece-make-identity user riece-server-name))
+ pointer)
+ ;; If you are talking with the user, quit it.
+ (if (riece-identity-member user-identity riece-current-channels)
+ (riece-part-channel user))
+ (setq pointer channels)
+ (while pointer
+ (riece-naming-assert-part user (car pointer))
+ (setq pointer (cdr pointer)))
+ (let ((buffers
+ (delq nil (mapcar
+ (lambda (channel)
+ (riece-channel-buffer (riece-make-identity
+ channel riece-server-name)))
+ channels))))
+ (riece-insert-change
+ buffers
+ (concat
+ (riece-concat-message
+ (format (riece-mcat "%s killed %s")
+ (riece-format-identity killer-identity t)
+ (riece-format-identity user-identity t))
+ message)
+ "\n"))
+ (riece-insert-change
+ (if (and riece-channel-buffer-mode
+ (not (memq riece-channel-buffer buffers)))
+ (list riece-dialogue-buffer riece-others-buffer)
+ riece-dialogue-buffer)
+ (concat
+ (riece-concat-server-name
+ (riece-concat-message
+ (format (riece-mcat "%s killed %s")
+ (riece-format-identity killer-identity t)
+ (riece-format-identity user-identity t))
+ message))
+ "\n")))))
+
+(defun riece-handle-invite-message (prefix string)
+ (let* ((user (riece-prefix-nickname prefix))
+ (parameters (riece-split-parameters string))
+ (invited (car parameters))
+ (channel (nth 1 parameters))
+ (channel-identity (riece-make-identity channel riece-server-name)))
+ (if (riece-identity-equal-no-server invited riece-real-nickname)
+ (setq riece-join-channel-candidate channel-identity))
+ (riece-insert-info
+ (list riece-dialogue-buffer riece-others-buffer)
+ (concat
+ (riece-concat-server-name
+ (format (riece-mcat "%s invites %s to %s")
+ (riece-format-identity (riece-make-identity
+ user riece-server-name))
+ (riece-format-identity (riece-make-identity
+ invited riece-server-name))
+ (riece-format-identity channel-identity)))
+ "\n"))))
+
+(defun riece-handle-topic-message (prefix decoded)
+ (let* ((user (riece-prefix-nickname prefix))
+ (parameters (riece-split-parameters (riece-decoded-string decoded)))
+ (channel (car parameters))
+ topic
+ (user-identity (riece-make-identity user riece-server-name))
+ (channel-identity (riece-make-identity channel riece-server-name)))
+ (setq parameters (riece-split-parameters
+ (riece-decoded-string-for-identity decoded
+ channel-identity))
+ topic (nth 1 parameters))
+ (riece-channel-set-topic (riece-get-channel channel) topic)
+ (riece-emit-signal 'channel-topic-changed
+ channel-identity topic)
+ (let ((buffer (riece-channel-buffer channel-identity)))
+ (riece-insert-change
+ buffer
+ (format (riece-mcat "Topic by %s: %s\n")
+ (riece-format-identity user-identity t)
+ topic))
+ (riece-insert-change
+ (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 (riece-mcat "Topic on %s by %s: %s")
+ (riece-format-identity channel-identity t)
+ (riece-format-identity user-identity t)
+ topic))
+ "\n")))))
+
+(defun riece-handle-mode-message (prefix string)
+ (let* ((user (riece-prefix-nickname prefix))
+ (user-identity (riece-make-identity user riece-server-name))
+ channel)
+ (when (string-match "^\\([^ ]+\\) *:?" string)
+ (setq channel (match-string 1 string)
+ string (substring string (match-end 0)))
+ (if (string-match (concat "^" riece-channel-regexp "$") channel)
+ (riece-naming-assert-channel-modes channel
+ (riece-parse-modes string)))
+ (let* ((channel-identity (riece-make-identity channel riece-server-name))
+ (buffer (riece-channel-buffer channel-identity)))
+ (riece-insert-change
+ buffer
+ (format (riece-mcat "Mode by %s: %s\n")
+ (riece-format-identity user-identity t)
+ string))
+ (riece-insert-change
+ (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 (riece-mcat "Mode on %s by %s: %s")
+ (riece-format-identity channel-identity t)
+ (riece-format-identity user-identity t)
+ string))
+ "\n"))))))
+
+(provide 'riece-handle)
+
+;;; riece-handle.el ends here
--- /dev/null
+;;; riece-hangman.el --- allow channel members to play the hangman game -*- lexical-binding: t -*-
+;; Copyright (C) 1998-2004 Daiki Ueno
+
+;; Author: Daiki Ueno <ueno@unixuser.org>
+;; 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., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
+
+;;; Commentary:
+
+;; NOTE: This is an add-on module for Riece.
+
+;;; Code:
+
+(require 'riece-globals)
+(require 'riece-identity)
+(require 'riece-message)
+(require 'riece-server)
+
+(defgroup riece-hangman nil
+ "Allow channel members to play the hangman game."
+ :prefix "riece-"
+ :group 'riece)
+
+(defcustom riece-hangman-hello-regexp "^,hangman$"
+ "Pattern of string to start the game."
+ :type 'string
+ :group 'riece-hangman)
+
+(defcustom riece-hangman-bye-regexp "^,hangman bye$"
+ "Pattern of string to end the game."
+ :type 'string
+ :group 'riece-hangman)
+
+(defcustom riece-hangman-words-file "/usr/share/dict/words"
+ "Location of words file."
+ :type 'file
+ :group 'riece-hangman)
+
+(defvar riece-hangman-player-context-alist nil)
+(defvar riece-hangman-words-buffer nil)
+
+(defconst riece-hangman-description
+ "Allow channel members to play the hangman game.")
+
+(put 'riece-hangman 'riece-addon-default-disabled t)
+
+(defun riece-hangman-make-context (word)
+ "Make an instance of player context object.
+This function is for internal use only."
+ (vector word nil 0))
+
+(defun riece-hangman-context-word (context)
+ "Return the correct word of CONTEXT.
+This function is for internal use only."
+ (aref context 0))
+
+(defun riece-hangman-context-guessed (context)
+ "Return the guessed letters in this CONTEXT.
+This function is for internal use only."
+ (aref context 1))
+
+(defun riece-hangman-context-missed-count (context)
+ "Return the count of missed guesses in this CONTEXT.
+This function is for internal use only."
+ (aref context 2))
+
+(defun riece-hangman-context-set-guessed (context guessed)
+ "Set the GUESSED letters in this CONTEXT.
+This function is for internal use only."
+ (aset context 1 guessed))
+
+(defun riece-hangman-context-set-missed-count (context missed-count)
+ "Set the count of MISSED guesses in this CONTEXT.
+This function is for internal use only."
+ (aset context 2 missed-count))
+
+(defun riece-hangman-word ()
+ "Return random word.
+The wordlist is read from `riece-hangman-words-file'."
+ (unless (and riece-hangman-words-buffer
+ (buffer-name riece-hangman-words-buffer))
+ (setq riece-hangman-words-buffer (generate-new-buffer " *riece-hangman*"))
+ (with-current-buffer riece-hangman-words-buffer
+ (buffer-disable-undo)
+ (insert-file-contents riece-hangman-words-file)
+ (let ((case-fold-search nil))
+ (delete-non-matching-lines "^[a-z][a-z][a-z][a-z][a-z][a-z]+"))))
+ (with-current-buffer riece-hangman-words-buffer
+ (goto-char (1+ (random (buffer-size))))
+ (if (eobp)
+ (beginning-of-line -1)
+ (beginning-of-line))
+ (buffer-substring (point) (progn (end-of-line) (point)))))
+
+(defun riece-hangman-reply (target string)
+ (riece-display-message
+ (riece-make-message (riece-make-identity riece-real-nickname
+ riece-server-name)
+ (riece-make-identity target riece-server-name)
+ string 'notice t))
+ (riece-send-string (format "NOTICE %s :%s\r\n" target string)))
+
+(defun riece-hangman-reply-with-context (user target context)
+ (let ((masked-word (make-string
+ (length (riece-hangman-context-word context))
+ ?-))
+ (guessed (copy-sequence (riece-hangman-context-guessed context)))
+ (index 0))
+ (while (< index (length (riece-hangman-context-word context)))
+ (if (memq (aref (riece-hangman-context-word context) index) guessed)
+ (aset masked-word index
+ (aref (riece-hangman-context-word context) index)))
+ (setq index (1+ index)))
+ (riece-hangman-reply
+ target
+ (format "%s: Word: %s, Guessed: %s"
+ user masked-word
+ (if guessed
+ (apply #'string (sort guessed #'<))
+ "")))))
+
+(defun riece-hangman-after-privmsg-hook (prefix string)
+ (if (get 'riece-hangman 'riece-addon-enabled)
+ (let* ((user (riece-prefix-nickname prefix))
+ (parameters (riece-split-parameters string))
+ (targets (split-string (car parameters) ","))
+ (message (nth 1 parameters))
+ case-fold-search
+ pointer word guessed index)
+ (if (string-match riece-hangman-hello-regexp message)
+ (if (riece-identity-assoc user riece-hangman-player-context-alist
+ t)
+ (riece-hangman-reply
+ (car targets)
+ (format "%s: You are already playing the game." user))
+ (let ((context (riece-hangman-make-context
+ (riece-hangman-word))))
+ (setq riece-hangman-player-context-alist
+ (cons (cons user context)
+ riece-hangman-player-context-alist))
+ (riece-hangman-reply-with-context user (car targets) context)))
+ (if (string-match riece-hangman-bye-regexp message)
+ (when (setq pointer (riece-identity-assoc
+ user riece-hangman-player-context-alist t))
+ (setq riece-hangman-player-context-alist
+ (delq pointer riece-hangman-player-context-alist))
+ (riece-hangman-reply
+ (car targets)
+ (format "%s: Sorry, the word was \"%s\""
+ user
+ (riece-hangman-context-word (cdr pointer)))))
+ (if (setq pointer (riece-identity-assoc
+ user riece-hangman-player-context-alist t))
+ (if (or (/= (length message) 1)
+ (not (string-match "[a-z]" message)))
+ (riece-hangman-reply
+ (car targets)
+ (format "%s: Not a valid guess: %s" user message))
+ (if (memq (aref message 0)
+ (riece-hangman-context-guessed (cdr pointer)))
+ (riece-hangman-reply (car targets)
+ (format "%s: Already guessed '%c'"
+ user (aref message 0)))
+ (setq guessed (riece-hangman-context-set-guessed
+ (cdr pointer)
+ (cons (aref message 0)
+ (riece-hangman-context-guessed
+ (cdr pointer))))
+ word (riece-hangman-context-word (cdr pointer)))
+ (unless (catch 'found
+ (setq index 0)
+ (while (< index (length word))
+ (if (eq (aref word index) (aref message 0))
+ (throw 'found t))
+ (setq index (1+ index))))
+ (riece-hangman-context-set-missed-count
+ (cdr pointer)
+ (1+ (riece-hangman-context-missed-count
+ (cdr pointer)))))
+ (if (>= (riece-hangman-context-missed-count (cdr pointer))
+ 7)
+ (progn
+ (riece-hangman-reply
+ (car targets)
+ (format "%s: Sorry, the word was \"%s\""
+ user
+ (riece-hangman-context-word (cdr pointer))))
+ (setq riece-hangman-player-context-alist
+ (delq pointer
+ riece-hangman-player-context-alist)))
+ (if (catch 'missing
+ (setq index 0)
+ (while (< index (length word))
+ (unless (memq (aref word index) guessed)
+ (throw 'missing t))
+ (setq index (1+ index))))
+ (riece-hangman-reply-with-context user (car targets)
+ (cdr pointer))
+ (riece-hangman-reply (car targets)
+ (format "%s: You got it! (%s)"
+ user word))
+ (setq riece-hangman-player-context-alist
+ (delq
+ pointer
+ riece-hangman-player-context-alist))))))))))))
+
+(defun riece-hangman-insinuate ()
+ (add-hook 'riece-after-privmsg-hook 'riece-hangman-after-privmsg-hook))
+
+(defun riece-hangman-uninstall ()
+ (remove-hook 'riece-after-privmsg-hook 'riece-hangman-after-privmsg-hook))
+
+(defun riece-hangman-enable ()
+ (random t))
+
+(provide 'riece-hangman)
+
+;;; riece-hangman.el ends here
--- /dev/null
+;;; riece-highlight.el --- highlight IRC buffers -*- lexical-binding: t -*-
+;; Copyright (C) 1998-2003 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., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
+
+;;; Commentary:
+
+;; NOTE: This is an add-on module for Riece.
+
+;;; Code:
+
+(require 'riece-globals)
+(require 'riece-options) ;riece-channel-list-buffer-mode
+(require 'riece-identity) ;riece-format-identity
+(require 'riece-misc)
+(require 'font-lock)
+(require 'derived)
+
+(defgroup riece-highlight nil
+ "Decorate IRC buffers with faces and fonts."
+ :tag "Highlight"
+ :prefix "riece-"
+ :group 'riece)
+
+(defgroup riece-highlight-faces nil
+ "Faces for highlight IRC buffers."
+ :tag "Faces"
+ :prefix "riece-highlight-"
+ :group 'riece-highlight)
+
+(defface riece-dialogue-change-face
+ '((((class color)
+ (background dark))
+ (:foreground "cyan" :bold t))
+ (((class color)
+ (background light))
+ (:foreground "RoyalBlue" :bold t))
+ (t
+ (:bold t)))
+ "Face used for displaying \"*** Change:\" line"
+ :group 'riece-highlight-faces)
+(defvar riece-dialogue-change-face 'riece-dialogue-change-face)
+
+(defface riece-dialogue-notice-face
+ '((((class color)
+ (background dark))
+ (:foreground "green2" :bold t))
+ (((class color)
+ (background light))
+ (:foreground "MidnightBlue" :bold t))
+ (t
+ (:bold t)))
+ "Face used for displaying \"*** Notice:\" line"
+ :group 'riece-highlight-faces)
+(defvar riece-dialogue-notice-face 'riece-dialogue-notice-face)
+
+(defface riece-dialogue-wallops-face
+ '((((class color)
+ (background dark))
+ (:foreground "yellow" :bold t))
+ (((class color)
+ (background light))
+ (:foreground "blue4" :bold t))
+ (t
+ (:bold t)))
+ "Face used for displaying \"*** Wallops:\" line"
+ :group 'riece-highlight-faces)
+(defvar riece-dialogue-wallops-face 'riece-dialogue-wallops-face)
+
+(defface riece-dialogue-error-face
+ '((((class color)
+ (background dark))
+ (:foreground "cornflower blue" :bold t))
+ (((class color)
+ (background light))
+ (:foreground "DarkGreen"))
+ (t
+ (:bold t)))
+ "Face used for displaying \"*** Error:\" line"
+ :group 'riece-highlight-faces)
+(defvar riece-dialogue-error-face 'riece-dialogue-error-face)
+
+(defface riece-dialogue-info-face
+ '((((class color)
+ (background dark))
+ (:foreground "PaleTurquoise" :bold t))
+ (((class color)
+ (background light))
+ (:foreground "RoyalBlue"))
+ (t
+ (:bold t)))
+ "Face used for displaying \"*** Info:\" line"
+ :group 'riece-highlight-faces)
+(defvar riece-dialogue-info-face 'riece-dialogue-info-face)
+
+(defface riece-dialogue-server-face
+ '((((class color)
+ (background dark))
+ (:foreground "Gray70"))
+ (((class color)
+ (background light))
+ (:foreground "DimGray"))
+ (t
+ (:bold t)))
+ "Face used for displaying \"(from server)\" extent."
+ :group 'riece-highlight-faces)
+(defvar riece-dialogue-server-face 'riece-dialogue-server-face)
+
+(defface riece-dialogue-prefix-face
+ '((((class color)
+ (background dark))
+ (:foreground "moccasin"))
+ (((class color)
+ (background light))
+ (:foreground "firebrick"))
+ (t
+ (:bold nil)))
+ "Face used for displaying \"<nick>\" extent"
+ :group 'riece-highlight-faces)
+(defvar riece-dialogue-prefix-face 'riece-dialogue-prefix-face)
+
+(defcustom riece-dialogue-font-lock-keywords
+ (append
+ (list (list (concat "^" riece-time-prefix-regexp
+ "\\(<[^>]+>\\|>[^<]+<\\|([^)]+)\\|{[^}]+}\\|=[^=]+=\\)")
+ '(1 riece-dialogue-prefix-face append t)))
+ ;; set property to the whole line
+ (mapcar
+ (lambda (line)
+ (cons
+ (concat
+ "^" riece-time-prefix-regexp "\\("
+ (regexp-quote
+ (symbol-value (intern (format "riece-%s-prefix" line))))
+ ".*\\)$")
+ (list 1 (intern (format "riece-dialogue-%s-face" line)) t t)))
+ '(change notice wallops error info))
+ '((riece-highlight-server-match 0 riece-dialogue-server-face t)))
+ "Default expressions to highlight in riece-dialogue-mode."
+ :type '(repeat (list string))
+ :group 'riece-highlight)
+
+(defface riece-channel-list-default-face
+ '((t ()))
+ "Face used for displaying channels."
+ :group 'riece-highlight-faces)
+(defvar riece-channel-list-default-face 'riece-channel-list-default-face)
+
+(defface riece-channel-list-current-face
+ '((((class color)
+ (background dark))
+ (:foreground "turquoise" :underline t))
+ (((class color)
+ (background light))
+ (:foreground "SeaGreen" :underline t))
+ (t
+ ()))
+ "Face used for displaying the current channel."
+ :group 'riece-highlight-faces)
+(defvar riece-channel-list-current-face 'riece-channel-list-current-face)
+
+(defcustom riece-channel-list-mark-face-alist
+ '((?* . riece-channel-list-current-face))
+ "An alist mapping marks on riece-channel-list-buffer to faces."
+ :type '(repeat (cons character symbol))
+ :group 'riece-highlight)
+
+(defcustom riece-channel-list-font-lock-keywords
+ '(("^[ 0-9][0-9]:\\(.\\)\\(.*\\)"
+ (2 (or (cdr (assq (aref (match-string 1) 0)
+ riece-channel-list-mark-face-alist))
+ riece-channel-list-default-face))))
+ "Default expressions to highlight in riece-channel-list-mode."
+ :type '(repeat (list string))
+ :group 'riece-highlight)
+
+(unless (riece-facep 'riece-modeline-current-face)
+ ;; In Emacs, set-face-doc-string is an alias to
+ ;; set-face-documentation, but we use the former since it is
+ ;; available in both Emacs and XEmacs.
+ (make-face 'riece-modeline-current-face)
+ (set-face-doc-string
+ 'riece-modeline-current-face
+ "Face used for displaying the current channel in modeline.")
+ (if (featurep 'xemacs)
+ (set-face-parent 'riece-modeline-current-face 'modeline))
+ (set-face-foreground 'riece-modeline-current-face
+ (face-foreground 'riece-channel-list-current-face)))
+
+(defconst riece-highlight-description
+ "Highlight IRC buffers.")
+
+(defun riece-highlight-server-match (limit)
+ (and (re-search-forward "(from [^)]+)$" limit t)
+ (get-text-property (match-beginning 0) 'riece-server-name)))
+
+(defun riece-highlight-setup-dialogue ()
+ (make-local-variable 'font-lock-defaults)
+ (setq font-lock-defaults '(riece-dialogue-font-lock-keywords t))
+ ;; In XEmacs, auto-initialization of font-lock is not affective
+ ;; when buffer-file-name is not set.
+ (font-lock-set-defaults)
+ (riece-make-local-hook 'after-change-functions)
+ (add-hook 'after-change-functions
+ 'riece-highlight-hide-prefix nil t)
+ (if (get 'riece-highlight 'riece-addon-enabled)
+ (font-lock-mode 1)))
+
+(defun riece-highlight-setup-channel-list ()
+ (make-local-variable 'font-lock-defaults)
+ (setq font-lock-defaults '(riece-channel-list-font-lock-keywords t))
+ ;; In XEmacs, auto-initialization of font-lock is not affective
+ ;; when buffer-file-name is not set.
+ (font-lock-set-defaults)
+ (if (get 'riece-highlight 'riece-addon-enabled)
+ (font-lock-mode 1)))
+
+(defun riece-highlight-hide-prefix (start _end _length)
+ (save-excursion
+ (goto-char start)
+ (if (looking-at riece-prefix-regexp)
+ (put-text-property (match-beginning 1) (match-end 1) 'invisible t))))
+
+(defun riece-highlight-put-overlay-faces (start end)
+ (if (get 'riece-highlight 'riece-addon-enabled)
+ (riece-scan-property-region
+ 'riece-overlay-face
+ start end
+ (lambda (start end)
+ (riece-overlay-put (riece-make-overlay start end)
+ 'face
+ (get-text-property start 'riece-overlay-face))))))
+
+(defun riece-highlight-format-identity-for-channel-list-indicator (index
+ identity)
+ (if (and (get 'riece-highlight 'riece-addon-enabled)
+ (riece-identity-equal identity riece-current-channel))
+ (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)))
+ (list (format "%d:" index)
+ (riece-propertize-modeline-string
+ string 'face 'riece-modeline-current-face)))))
+
+(defun riece-highlight-insinuate ()
+ (put 'riece-channel-mode 'font-lock-defaults
+ '(riece-dialogue-font-lock-keywords t))
+ (put 'riece-others-mode 'font-lock-defaults
+ '(riece-dialogue-font-lock-keywords t))
+ (put 'riece-dialogue-mode 'font-lock-defaults
+ '(riece-dialogue-font-lock-keywords t))
+ (add-hook 'riece-dialogue-mode-hook
+ 'riece-highlight-setup-dialogue)
+ (put 'riece-channel-list-mode 'font-lock-defaults
+ '(riece-channel-list-font-lock-keywords t))
+ (add-hook 'riece-channel-list-mode-hook
+ 'riece-highlight-setup-channel-list)
+ (add-hook 'riece-format-identity-for-channel-list-indicator-functions
+ 'riece-highlight-format-identity-for-channel-list-indicator)
+ (add-hook 'riece-after-insert-functions
+ 'riece-highlight-put-overlay-faces))
+
+(defun riece-highlight-uninstall ()
+ (let ((buffers riece-buffer-list))
+ (save-excursion
+ (while buffers
+ (set-buffer (car buffers))
+ (if (riece-derived-mode-p 'riece-dialogue-mode)
+ (remove-hook 'after-change-functions
+ 'riece-highlight-hide-prefix t))
+ (setq buffers (cdr buffers)))))
+ (riece-remprop 'riece-channel-mode 'font-lock-defaults)
+ (riece-remprop 'riece-others-mode 'font-lock-defaults)
+ (riece-remprop 'riece-dialogue-mode 'font-lock-defaults)
+ (remove-hook 'riece-dialogue-mode-hook
+ 'riece-highlight-setup-dialogue)
+ (riece-remprop 'riece-channel-list-mode 'font-lock-defaults)
+ (remove-hook 'riece-channel-list-mode-hook
+ 'riece-highlight-setup-channel-list)
+ (remove-hook 'riece-format-identity-for-channel-list-indicator-functions
+ 'riece-highlight-format-identity-for-channel-list-indicator)
+ (remove-hook 'riece-after-insert-functions
+ 'riece-highlight-put-overlay-faces))
+
+(defun riece-highlight-enable ()
+ (let ((buffers riece-buffer-list))
+ (while buffers
+ (if (with-current-buffer (car buffers)
+ (riece-derived-mode-p 'riece-dialogue-mode
+ 'riece-channel-list-mode))
+ (with-current-buffer (car buffers)
+ (font-lock-mode 1)))
+ (setq buffers (cdr buffers)))))
+
+(defun riece-highlight-disable ()
+ (let ((buffers riece-buffer-list))
+ (while buffers
+ (if (with-current-buffer (car buffers)
+ (riece-derived-mode-p 'riece-dialogue-mode
+ 'riece-channel-list-mode))
+ (with-current-buffer (car buffers)
+ (font-lock-mode 0)))
+ (setq buffers (cdr buffers)))))
+
+(provide 'riece-highlight)
+
+;;; riece-highlight.el ends here
--- /dev/null
+;;; riece-history.el --- manage history of channel shifting -*- lexical-binding: t -*-
+;; Copyright (C) 1998-2003 Daiki Ueno
+
+;; Author: Daiki Ueno <ueno@unixuser.org>
+;; 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., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
+
+;;; Commentary:
+
+;; NOTE: This is an add-on module for Riece.
+
+;; You can check recently visited channels via `C-c g' in the commands
+;; buffer, by adding the following lines to ~/.riece/init.el:
+
+;; (add-hook 'riece-guess-channel-try-functions
+;; 'riece-guess-channel-from-history)
+
+;;; Code:
+
+(require 'riece-options)
+(require 'riece-globals)
+(require 'riece-identity)
+(require 'riece-signal)
+(require 'ring)
+(require 'riece-highlight)
+
+(defgroup riece-history nil
+ "Manage history of channel shifting."
+ :tag "History"
+ :prefix "riece-"
+ :group 'riece)
+
+(defcustom riece-channel-history-length 3
+ "Length of riece-channel-history."
+ :type 'integer
+ :group 'riece-history)
+
+(defface riece-channel-list-history-face
+ '((((class color)
+ (background dark))
+ (:foreground "PaleTurquoise"))
+ (((class color)
+ (background light))
+ (:foreground "SeaGreen3"))
+ (t
+ (:bold t)))
+ "Face used for displaying history channels."
+ :group 'riece-highlight-faces)
+(defvar riece-channel-list-history-face 'riece-channel-list-history-face)
+
+(unless (riece-facep 'riece-modeline-history-face)
+ ;; In Emacs, set-face-doc-string is an alias to
+ ;; set-face-documentation, but we use the former since it is
+ ;; available in both Emacs and XEmacs.
+ (make-face 'riece-modeline-history-face)
+ (set-face-doc-string
+ 'riece-modeline-history-face
+ "Face used for displaying history channels in modeline.")
+ (if (featurep 'xemacs)
+ (set-face-parent 'riece-modeline-history-face 'modeline))
+ (set-face-foreground 'riece-modeline-history-face
+ (face-foreground 'riece-channel-list-history-face)))
+
+(defvar riece-modeline-history-face 'riece-modeline-history-face)
+
+(defvar riece-channel-history nil)
+
+(defconst riece-history-description
+ "Manage history of channel shifting.")
+
+(defun riece-guess-channel-from-history ()
+ (let ((length (ring-length riece-channel-history))
+ (index 0)
+ result)
+ (while (< index length)
+ (setq result (cons (ring-ref riece-channel-history index) result)
+ index (1+ index)))
+ (nreverse result)))
+
+(defun riece-history-format-identity-for-channel-list-buffer (index identity)
+ (if (and (get 'riece-history 'riece-addon-enabled)
+ (not (ring-empty-p riece-channel-history))
+ (riece-identity-equal identity (ring-ref riece-channel-history 0)))
+ (concat (format "%2d:+" index)
+ (riece-format-identity identity))))
+
+(defun riece-history-format-identity-for-channel-list-indicator (index
+ identity)
+ (if (and (get 'riece-history 'riece-addon-enabled)
+ (not (ring-empty-p riece-channel-history))
+ (riece-identity-equal identity (ring-ref riece-channel-history 0)))
+ (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)))
+ (list (format "%d:" index)
+ (riece-propertize-modeline-string
+ string 'face 'riece-modeline-history-face)))))
+
+;;; (defun riece-history-requires ()
+;;; (if (memq 'riece-guess riece-addons)
+;;; '(riece-guess)))
+
+(defun riece-history-after-switch-to-channel-functions (last)
+ (if (and (get 'riece-history 'riece-addon-enabled) last
+ (not (riece-identity-equal last riece-current-channel)))
+ (ring-insert riece-channel-history last)))
+
+(defun riece-history-requires ()
+ (if (memq 'riece-highlight riece-addons)
+ '(riece-highlight)))
+
+(defun riece-history-insinuate ()
+ (add-hook 'riece-after-switch-to-channel-functions
+ 'riece-history-after-switch-to-channel-functions)
+ (add-hook 'riece-format-identity-for-channel-list-buffer-functions
+ 'riece-history-format-identity-for-channel-list-buffer)
+ (add-hook 'riece-format-identity-for-channel-list-indicator-functions
+ 'riece-history-format-identity-for-channel-list-indicator)
+ (if (memq 'riece-highlight riece-addons)
+ (setq riece-channel-list-mark-face-alist
+ (cons '(?+ . riece-channel-list-history-face)
+ riece-channel-list-mark-face-alist)))
+;;; (if (memq 'riece-guess riece-addons)
+;;; (add-hook 'riece-guess-channel-try-functions
+;;; 'riece-guess-channel-from-history))
+ )
+
+(defun riece-history-uninstall ()
+ (remove-hook 'riece-after-switch-to-channel-functions
+ 'riece-history-after-switch-to-channel-functions)
+ (remove-hook 'riece-format-identity-for-channel-list-buffer-functions
+ 'riece-history-format-identity-for-channel-list-buffer)
+ (remove-hook 'riece-format-identity-for-channel-list-indicator-functions
+ 'riece-history-format-identity-for-channel-list-indicator)
+ (setq riece-channel-list-mark-face-alist
+ (delq (assq ?+ riece-channel-list-mark-face-alist)
+ riece-channel-list-mark-face-alist)))
+
+(defun riece-history-enable ()
+ (setq riece-channel-history
+ (make-ring riece-channel-history-length))
+ (riece-emit-signal 'channel-list-changed))
+
+(defun riece-history-disable ()
+ (setq riece-channel-history nil)
+ (riece-emit-signal 'channel-list-changed))
+
+(provide 'riece-history)
+
+;;; riece-history.el ends here
--- /dev/null
+;;; riece-icon.el --- display icons in IRC buffers -*- lexical-binding: t -*-
+;; Copyright (C) 1998-2003 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., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
+
+;;; Commentary:
+
+;; NOTE: This is an add-on module for Riece.
+
+;;; Code:
+
+(require 'riece-globals)
+(require 'riece-signal)
+
+(defvar riece-channel-list-icons
+ '((" " . "/* XPM */
+static char * blank_xpm[] = {
+\"12 12 1 1\",
+\" c None\",
+\" \",
+\" \",
+\" \",
+\" \",
+\" \",
+\" \",
+\" \",
+\" \",
+\" \",
+\" \",
+\" \",
+\" \"};")
+ ("!" . "/* XPM */
+static char * balloon_xpm[] = {
+\"12 12 3 1\",
+\" c None\",
+\"+ c #FFDD99\",
+\"@ c #000000\",
+\" \",
+\" ++++ \",
+\" ++++++++ \",
+\" ++@@@@@@++ \",
+\" ++++++++++ \",
+\" ++@@@@@@++ \",
+\" ++++++++++ \",
+\" ++@@@@@@++ \",
+\" ++++++++ \",
+\" ++++++ \",
+\" +++ \",
+\" + \"};")
+ ("+" . "/* XPM */
+static char * check_xpm[] = {
+\"12 12 3 1\",
+\" c None\",
+\". c #9696FF\",
+\"+ c #5959FF\",
+\" \",
+\" \",
+\" .. .. \",
+\".++. .++.\",
+\" .++. .++. \",
+\" .++..++. \",
+\" .++++. \",
+\" .++. \",
+\" .. \",
+\" \",
+\" \",
+\" \"};")
+ ("*" . "/* XPM */
+static char * active_xpm[] = {
+\"12 12 3 1\",
+\" c None\",
+\". c #96FF96\",
+\"+ c #59FF59\",
+\" \",
+\" .. \",
+\" .+. \",
+\" .....++. \",
+\" .+++++++. \",
+\" .++++++++. \",
+\" .+++++++. \",
+\" .....++. \",
+\" .+. \",
+\" .. \",
+\" \",
+\" \"};")))
+
+(defvar riece-user-list-icons
+ '((" " . "/* XPM */
+static char * blank_xpm[] = {
+\"12 12 1 1\",
+\" c None\",
+\" \",
+\" \",
+\" \",
+\" \",
+\" \",
+\" \",
+\" \",
+\" \",
+\" \",
+\" \",
+\" \",
+\" \"};")
+ ("@" . "/* XPM */
+static char * spiral_xpm[] = {
+\"12 12 3 1\",
+\" c None\",
+\". c #FF5959\",
+\"+ c #FF9696\",
+\" \",
+\" \",
+\" +++++ \",
+\" ++...++ \",
+\" ++.+++.++ \",
+\" +.++.++.+ \",
+\" +.+.+.+.+ \",
+\" +.+.+++.+ \",
+\" +.++...++ \",
+\" ++.+++++.+\",
+\" ++.....+ \",
+\" ++++++ \"};")
+ ("+" . "/* XPM */
+static char * cross_xpm[] = {
+\"12 12 3 1\",
+\" c None\",
+\". c #7F7F7F\",
+\"+ c #B2B2B2\",
+\" ++ \",
+\" +..+ \",
+\" +..+ \",
+\" +++..+++ \",
+\" +........+ \",
+\" +........+ \",
+\" +++..+++ \",
+\" +..+ \",
+\" +..+ \",
+\" +..+ \",
+\" +..+ \",
+\" ++ \"};")))
+
+(defvar riece-pointer-icon
+ "/* XPM */
+static char * a_xpm[] = {
+\"14 14 5 1\",
+\" c None\",
+\". c #FF9646\",
+\"+ c #FF5909\",
+\"@ c #FF7020\",
+\"* c #FFA500\",
+\" \",
+\" @@@@@@@@@@@ \",
+\" @*.++++++.**@\",
+\" @*.++...++.*@\",
+\" @*.++.*.++.*@\",
+\" @*.++...+.**@\",
+\" @*.+++.+.***@\",
+\" @*.++.*.+.**@\",
+\" @*.++.*.++.*@\",
+\" @*.++.*.++.*@\",
+\" @*.++.*.++.*@\",
+\" @**..***..**@\",
+\" @@@@@@@@@@@ \",
+\" \"};")
+
+(defconst riece-icon-description
+ "Display icons in IRC buffers.")
+
+(defun riece-icon-available-p ()
+ (if (featurep 'xemacs)
+ (featurep 'xpm)
+ (if (fboundp 'image-type-available-p)
+ (image-type-available-p 'xpm))))
+
+(eval-and-compile
+ (if (featurep 'xemacs)
+ (defun riece-icon-make-image (data string)
+ (make-glyph (list (vector 'xpm :data data)
+ (vector 'string :data string))))
+ (defun riece-icon-make-image (data _string)
+ (create-image data 'xpm t :ascent 'center))))
+
+(defun riece-icon-make-images (alist)
+ (let ((pointer (setq alist (copy-alist alist))))
+ (while pointer
+ (setcdr (car pointer)
+ (riece-icon-make-image (cdr (car pointer)) (car (car pointer))))
+ (setq pointer (cdr pointer)))
+ alist))
+
+(eval-and-compile
+ (if (featurep 'xemacs)
+ (defun riece-icon-add-image-region (image start end)
+ (map-extents
+ (lambda (extent _ignore)
+ (if (or (extent-property extent 'riece-icon-user-list-extent)
+ (extent-property extent 'riece-icon-user-list-annotation))
+ (delete-extent extent)))
+ (current-buffer) start end)
+ (let ((extent (make-extent start end))
+ (annotation (make-annotation image end 'text)))
+ (set-extent-property extent 'end-open t)
+ (set-extent-property extent 'start-open t)
+ (set-extent-property extent 'invisible t)
+ (set-extent-property extent 'intangible t)
+ (set-extent-property annotation
+ 'riece-icon-user-list-extent extent)
+ (set-extent-property extent
+ 'riece-icon-user-list-annotation annotation)))
+ (defun riece-icon-add-image-region (image start end)
+ (let ((inhibit-read-only t)
+ buffer-read-only)
+ (add-text-properties start end
+ (list 'display
+ image
+ 'rear-nonsticky (list 'display)))))))
+
+(defun riece-icon-update-user-list-buffer ()
+ (if (get 'riece-icon 'riece-addon-enabled)
+ (let ((images (riece-icon-make-images riece-user-list-icons)))
+ (save-excursion
+ (goto-char (point-min))
+ (while (re-search-forward "^[ @+]" nil t)
+ (riece-icon-add-image-region
+ (cdr (assoc (match-string 0) images))
+ (1- (point)) (point)))))))
+
+(defun riece-icon-update-channel-list-buffer ()
+ (if (get 'riece-icon 'riece-addon-enabled)
+ (let ((images (riece-icon-make-images riece-channel-list-icons)))
+ (save-excursion
+ (goto-char (point-min))
+ (while (re-search-forward "^ ?[0-9]+:\\([ !+*]\\)" nil t)
+ (riece-icon-add-image-region
+ (cdr (assoc (match-string 1) images))
+ (match-beginning 1) (match-end 1)))))))
+
+(eval-and-compile
+ (if (featurep 'xemacs)
+ (progn
+ (defvar riece-icon-xemacs-modeline-left-extent
+ (copy-extent modeline-buffer-id-left-extent))
+
+ (defvar riece-icon-xemacs-modeline-right-extent
+ (copy-extent modeline-buffer-id-right-extent))
+
+ (defun riece-icon-modeline-buffer-identification (line)
+ "Decorate 1st element of `mode-line-buffer-identification' LINE.
+Modify whole identification by side effect."
+ (let ((id (car line)) chopped)
+ (if (and (stringp id) (string-match "^Riece:" id))
+ (progn
+ (setq chopped (substring id 0 (match-end 0))
+ id (substring id (match-end 0)))
+ (nconc
+ (list
+ (let ((glyph
+ (make-glyph
+ (nconc
+ (if (featurep 'xpm)
+ (list (vector 'xpm :data
+ riece-pointer-icon)))
+ (list (vector 'string :data chopped))))))
+ (set-glyph-face glyph 'modeline-buffer-id)
+ (cons riece-icon-xemacs-modeline-left-extent glyph))
+ (cons riece-icon-xemacs-modeline-right-extent id))
+ (cdr line)))
+ line))))
+ (condition-case nil
+ (progn
+ (require 'image)
+ (defun riece-icon-modeline-buffer-identification (line)
+ "Decorate 1st element of `mode-line-buffer-identification' LINE.
+Modify whole identification by side effect."
+ (let ((id (copy-sequence (car line)))
+ (image
+ (if (image-type-available-p 'xpm)
+ (create-image riece-pointer-icon 'xpm t
+ :ascent 'center))))
+ (when (and image
+ (stringp id) (string-match "^Riece:" id))
+ (add-text-properties 0 (length id)
+ (list 'display image
+ 'rear-nonsticky (list 'display))
+ id)
+ (setcar line id))
+ line)))
+ (error
+ (defalias 'riece-icon-modeline-buffer-identification 'identity)))))
+
+(defun riece-icon-user-list-mode-hook ()
+ (if (riece-icon-available-p)
+ (add-hook 'riece-update-buffer-functions
+ 'riece-icon-update-user-list-buffer t t)))
+
+(defun riece-icon-channel-list-mode-hook ()
+ (if (riece-icon-available-p)
+ (add-hook 'riece-update-buffer-functions
+ 'riece-icon-update-channel-list-buffer t t)))
+
+(defun riece-icon-insinuate ()
+ (save-excursion
+ (when riece-user-list-buffer
+ (set-buffer riece-user-list-buffer)
+ (riece-icon-user-list-mode-hook))
+ (when riece-channel-list-buffer
+ (set-buffer riece-channel-list-buffer)
+ (riece-icon-channel-list-mode-hook)))
+ (add-hook 'riece-user-list-mode-hook
+ 'riece-icon-user-list-mode-hook)
+ (add-hook 'riece-channel-list-mode-hook
+ 'riece-icon-channel-list-mode-hook))
+
+(defun riece-icon-uninstall ()
+ (save-excursion
+ (when riece-user-list-buffer
+ (set-buffer riece-user-list-buffer)
+ (remove-hook 'riece-update-buffer-functions
+ 'riece-icon-update-user-list-buffer t))
+ (when riece-channel-list-buffer
+ (set-buffer riece-channel-list-buffer)
+ (remove-hook 'riece-update-buffer-functions
+ 'riece-icon-update-channel-list-buffer t)))
+ (remove-hook 'riece-user-list-mode-hook
+ 'riece-icon-user-list-mode-hook)
+ (remove-hook 'riece-channel-list-mode-hook
+ 'riece-icon-channel-list-mode-hook))
+
+(defvar riece-icon-original-mode-line-buffer-identification nil)
+
+(defun riece-icon-update-mode-line-buffer-identification ()
+ (let ((buffers riece-buffer-list))
+ (save-excursion
+ (while buffers
+ (set-buffer (car buffers))
+ (if (local-variable-p 'riece-mode-line-buffer-identification
+ (car buffers))
+ (setq mode-line-buffer-identification
+ (riece-mode-line-buffer-identification
+ riece-mode-line-buffer-identification)))
+ (setq buffers (cdr buffers))))))
+
+(defun riece-icon-enable ()
+ (setq riece-icon-original-mode-line-buffer-identification
+ (symbol-function 'riece-mode-line-buffer-identification))
+ (defalias 'riece-mode-line-buffer-identification
+ 'riece-icon-modeline-buffer-identification)
+ (riece-icon-update-mode-line-buffer-identification)
+ (if riece-current-channel
+ (riece-emit-signal 'user-list-changed riece-current-channel))
+ (riece-emit-signal 'channel-list-changed))
+
+(defun riece-icon-disable ()
+ (fset 'riece-mode-line-buffer-identification
+ riece-icon-original-mode-line-buffer-identification)
+ (riece-icon-update-mode-line-buffer-identification)
+ (if riece-current-channel
+ (riece-emit-signal 'user-list-changed riece-current-channel))
+ (riece-emit-signal 'channel-list-changed))
+
+(provide 'riece-icon)
+
+;;; riece-icon.el ends here
--- /dev/null
+;;; riece-identity.el --- an identity object -*- lexical-binding: t -*-
+;; Copyright (C) 1998-2003 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., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
+
+;;; Code:
+
+(require 'riece-globals)
+(require 'riece-coding)
+
+(defcustom riece-channel-coding-system-alist nil
+ "An alist mapping from channels to coding-systems."
+ :type '(repeat (cons (string :tag "Channel")
+ (symbol :tag "Coding system")))
+ :group 'riece-coding)
+
+(defvar riece-abbrev-identity-string-function nil)
+(defvar riece-expand-identity-string-function nil)
+
+(defconst riece-identity-prefix-case-pair-alist
+ '((?\[ . ?{)
+ (?\] . ?})
+ (?\\ . ?|)
+ (?~ . ?^))
+ "An alist used to canonicalize identity-prefix.
+RFC2812, 2.2 \"Character codes\" says:
+ Because of IRC's Scandinavian origin, the characters {}|^ are
+ considered to be the lower case equivalents of the characters []\~,
+ respectively. This is a critical issue when determining the
+ equivalence of two nicknames or channel names.")
+
+(defun riece-identity-prefix (identity)
+ "Return the component sans its server name from IDENTITY."
+ (aref identity 0))
+
+(defun riece-identity-server (identity)
+ "Return the server name component in IDENTITY."
+ (aref identity 1))
+
+(defun riece-make-identity (prefix server)
+ "Make an identity object from PREFIX and SERVER."
+ (vector prefix server))
+
+(defun riece-identity-equal (ident1 ident2)
+ "Return t, if IDENT1 and IDENT2 are equal."
+ (and (riece-identity-equal-no-server
+ (riece-identity-prefix ident1)
+ (riece-identity-prefix ident2))
+ (equal
+ (riece-identity-server ident1)
+ (riece-identity-server ident2))))
+
+(defun riece-identity-canonicalize-prefix (prefix)
+ "Canonicalize identity PREFIX."
+ (let ((i 0)
+ c)
+ (setq prefix (downcase prefix))
+ (while (< i (length prefix))
+ (if (setq c (cdr (assq (aref prefix i)
+ riece-identity-prefix-case-pair-alist)))
+ (aset prefix i c))
+ (setq i (1+ i)))
+ prefix))
+
+(defun riece-identity-equal-no-server (prefix1 prefix2)
+ "Return t, if IDENT1 and IDENT2 are equal without server part."
+ (equal (riece-identity-canonicalize-prefix prefix1)
+ (riece-identity-canonicalize-prefix prefix2)))
+
+(defun riece-identity-member (elt list &optional no-server)
+ "Return non-nil if an identity ELT is an element of LIST."
+ (catch 'found
+ (while list
+ (if (and (car list) ;needed because riece-current-channels
+ ;contains nil.
+ (if no-server
+ (riece-identity-equal-no-server (car list) elt)
+ (riece-identity-equal (car list) elt)))
+ (throw 'found list)
+ (setq list (cdr list))))))
+
+(defun riece-identity-assoc (elt alist &optional no-server)
+ "Return non-nil if an identity ELT matches the car of an element of ALIST."
+ (catch 'found
+ (while alist
+ (if (if no-server
+ (riece-identity-equal-no-server (car (car alist)) elt)
+ (riece-identity-equal (car (car alist)) elt))
+ (throw 'found (car alist))
+ (setq alist (cdr alist))))))
+
+(defun riece-identity-assign-binding (item list binding)
+ (let ((slot (riece-identity-member item binding))
+ pointer)
+ (unless list ;we need at least one room
+ (setq list (list nil)))
+ (setq pointer list)
+ (if slot
+ (while (not (eq binding slot))
+ (unless (cdr pointer)
+ (setcdr pointer (list nil)))
+ (setq pointer (cdr pointer)
+ binding (cdr binding)))
+ (while (or (car pointer) (car binding))
+ (unless (cdr pointer)
+ (setcdr pointer (list nil)))
+ (setq pointer (cdr pointer)
+ binding (cdr binding))))
+ (setcar pointer item)
+ list))
+
+(defun riece-format-identity (identity &optional prefix-only)
+ "Convert IDENTITY object to a string.
+If the optional 2nd argument PREFIX-ONLY is non-nil, don't append
+server part of the identity.
+
+The returned string will be abbreviated by
+`riece-abbrev-identity-string-function', and `riece-identity' property
+will be added."
+ (let ((string
+ (if (or prefix-only
+ (equal (riece-identity-server identity) ""))
+ (copy-sequence (riece-identity-prefix identity))
+ (concat (riece-identity-prefix identity) " "
+ (riece-identity-server identity)))))
+ (if riece-abbrev-identity-string-function
+ (setq string (funcall riece-abbrev-identity-string-function string)))
+ (riece-put-text-property-nonsticky 0 (length string)
+ 'riece-identity identity
+ string)
+ (if prefix-only
+ (riece-put-text-property-nonsticky 0 (length string)
+ 'riece-format-identity-prefix-only t
+ string))
+ string))
+
+(defun riece-parse-identity (string)
+ "Convert STRING to an identity object.
+The string will be expanded by
+`riece-expand-identity-string-function'."
+ (if riece-expand-identity-string-function
+ (setq string (funcall riece-expand-identity-string-function string)))
+ (riece-make-identity (if (string-match " " string)
+ (substring string 0 (match-beginning 0))
+ string)
+ (if (string-match " " string)
+ (substring string (match-end 0))
+ "")))
+
+(defun riece-completing-read-identity (prompt channels
+ &optional predicate require-match
+ initial history default
+ no-server)
+ "Read an identity object in the minibuffer, with completion.
+PROMPT is a string to prompt with; normally it ends in a colon and a space.
+CHANNELS is a list of identity objects.
+The rest of arguments are the same as `completing-read'."
+ (let* ((string
+ (completing-read
+ prompt
+ (mapcar (lambda (channel)
+ (list (riece-format-identity channel no-server)))
+ (delq nil (copy-sequence (or channels
+ riece-current-channels))))
+ predicate require-match initial history default))
+ (identity
+ (riece-parse-identity string)))
+;;; (unless (string-match (concat "^\\(" riece-channel-regexp "\\|"
+;;; riece-user-regexp "\\)")
+;;; (riece-identity-prefix identity))
+;;; (error "Invalid channel name!"))
+ identity))
+
+(defun riece-coding-system-for-identity (identity)
+ (let ((alist riece-channel-coding-system-alist)
+ matcher)
+ (catch 'found
+ (while alist
+ (setq matcher (riece-parse-identity (car (car alist))))
+ (if (and (equal (riece-identity-server matcher)
+ (riece-identity-server identity))
+ (equal (riece-identity-prefix matcher)
+ (riece-identity-prefix identity)))
+ (throw 'found (cdr (car alist))))
+ (setq alist (cdr alist))))))
+
+(defun riece-decoded-string-for-identity (decoded identity)
+ "Return the string decoded for IDENTITY."
+ (let ((coding-system (riece-coding-system-for-identity identity)))
+ (if (and coding-system
+ (not (eq (riece-decoded-coding-system decoded)
+ (if (consp coding-system)
+ (car coding-system)
+ coding-system))))
+ (riece-decode-coding-string-1 (riece-decoded-encoded-string decoded)
+ coding-system)
+ decoded)))
+
+(defun riece-encode-coding-string-for-identity (string identity)
+ (let ((coding-system (riece-coding-system-for-identity identity)))
+ (if coding-system
+ (encode-coding-string string
+ (if (consp coding-system)
+ (cdr coding-system)
+ coding-system))
+ (riece-encode-coding-string string))))
+
+(provide 'riece-identity)
+
+;;; riece-identity.el ends here
--- /dev/null
+;;; riece-ignore.el --- ignore messages from some users -*- lexical-binding: t -*-
+;; 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., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
+
+;;; Commentary:
+
+;; NOTE: This is an add-on module for Riece.
+
+;;; Code:
+
+(require 'riece-signal)
+(require 'riece-identity)
+(require 'riece-message)
+
+(defgroup riece-ignore nil
+ "Ignore messages from some users."
+ :prefix "riece-"
+ :group 'riece)
+
+(defcustom riece-ignore-discard-message 'log
+ "If t, messages from ignored user are completely discarded.
+If 'log, messages are removed from IRC buffers, but they are saved in
+`riece-ignore-buffer'.
+Otherwise, they are not removed from IRC buffers, but are hidden with
+'invisible text-property."
+ :group 'riece-ignore
+ :type '(choice (const :tag "Discard completely" t)
+ (const :tag "Discard but save logs" log)
+ (const :tag "Make messages invisible" nil)))
+
+(defcustom riece-ignore-buffer-name "*Ignore*"
+ "The name of buffer where ignored messages are stored."
+ :group 'riece-ignore
+ :type 'string)
+
+(defcustom riece-startup-ignored-user-list nil
+ "List of user names whose messages are ignored."
+ :group 'riece-ignore
+ :type '(repeat string))
+
+(defvar riece-ignore-buffer nil)
+
+(defconst riece-ignore-description
+ "Ignore messages from some users.")
+(defvar riece-ignored-user-list nil)
+
+(defun riece-ignore-user-rename-signal-function (signal _handback)
+ (let ((pointer (riece-identity-member (car (riece-signal-args signal))
+ riece-ignored-user-list)))
+ (if pointer
+ (setcar pointer (nth 1 (riece-signal-args signal))))))
+
+(defun riece-ignore-user (user toggle)
+ (interactive
+ (let ((completion-ignore-case t))
+ (list (if current-prefix-arg
+ (riece-completing-read-identity
+ "Unignore user: "
+ riece-ignored-user-list)
+ (riece-completing-read-identity
+ "Ignore user: "
+ (riece-get-users-on-server (riece-current-server-name))
+ (lambda (user)
+ (not (riece-identity-member
+ (riece-parse-identity (car user))
+ riece-ignored-user-list)))))
+ (not current-prefix-arg))))
+ (if toggle
+ (progn
+ (setq riece-ignored-user-list (cons user riece-ignored-user-list))
+ (riece-connect-signal
+ 'user-renamed
+ #'riece-ignore-user-rename-signal-function))
+ (let ((pointer (riece-identity-member user riece-ignored-user-list)))
+ (setq riece-ignored-user-list (delq (car pointer)
+ riece-ignored-user-list))
+ (riece-disconnect-signal
+ 'user-renamed
+ #'riece-ignore-user-rename-signal-function))))
+
+(eval-when-compile
+ (autoload 'riece-dialogue-mode "riece"))
+(defun riece-ignore-message-filter (message)
+ (if (and (get 'riece-ignore 'riece-addon-enabled)
+ (riece-identity-member (riece-message-speaker message)
+ riece-ignored-user-list))
+ (if riece-ignore-discard-message
+ (when (eq riece-ignore-discard-message 'log)
+ (unless riece-ignore-buffer
+ (with-current-buffer (setq riece-ignore-buffer
+ (riece-get-buffer-create
+ riece-ignore-buffer-name
+ 'riece-dialogue-mode))
+ (riece-dialogue-mode)))
+ (with-current-buffer riece-ignore-buffer
+ (goto-char (point-max))
+ (let ((inhibit-read-only t)
+ buffer-read-only)
+ (insert (concat (format-time-string "%H:%M") " "
+ (riece-format-message message t))))))
+ (put-text-property 0 (length (riece-message-text message))
+ 'invisible 'riece-ignore
+ (riece-message-text message))
+ message)
+ message))
+
+(defvar riece-command-mode-map)
+(defun riece-ignore-insinuate ()
+ (setq riece-ignored-user-list
+ (mapcar #'riece-parse-identity riece-startup-ignored-user-list))
+ (add-hook 'riece-message-filter-functions 'riece-ignore-message-filter))
+
+(defun riece-ignore-uninstall ()
+ (setq riece-ignored-user-list nil)
+ (remove-hook 'riece-message-filter-functions 'riece-ignore-message-filter))
+
+(defun riece-ignore-enable ()
+ (define-key riece-command-mode-map
+ "\C-ck" 'riece-ignore-user))
+
+(defun riece-ignore-disable ()
+ (define-key riece-command-mode-map
+ "\C-ck" nil))
+
+(provide 'riece-ignore)
+
+;;; riece-ignore.el ends here
--- /dev/null
+;;; riece-irc.el --- IRC protocol -*- lexical-binding: t -*-
+;; 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., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
+
+;;; Code:
+
+(require 'riece-filter)
+(require 'riece-server)
+(require 'riece-mcat)
+
+(defun riece-irc-open-server (server server-name)
+ (riece-server-keyword-bind server
+ (let (selective-display
+ (coding-system-for-read 'binary)
+ (coding-system-for-write 'binary)
+ process)
+ (if (equal server-name "")
+ (message (riece-mcat "Connecting to IRC server..."))
+ (message (riece-mcat "Connecting to %s...") server-name))
+ (condition-case error
+ (setq process
+ (funcall function (riece-server-process-name server-name)
+ (concat " *IRC*" server-name)
+ host service))
+ (error
+ (if (equal server-name "")
+ (message (riece-mcat "Connecting to IRC server...failed: %S")
+ error)
+ (message (riece-mcat "Connecting to %s...failed: %S") server-name
+ error))
+ (signal (car error) (cdr error))))
+ (if (equal server-name "")
+ (message (riece-mcat "Connecting to IRC server...done"))
+ (message (riece-mcat "Connecting to %s...done") server-name))
+ (riece-reset-process-buffer process)
+ (with-current-buffer (process-buffer process)
+ (setq riece-server-name server-name))
+ (set-process-sentinel process 'riece-sentinel)
+ (set-process-filter process 'riece-filter)
+ (if (equal server-name "")
+ (message (riece-mcat "Logging in to IRC server..."))
+ (message (riece-mcat "Logging in to %s...") server-name))
+ (if riece-reconnect-with-password ;password incorrect or not set.
+ (unwind-protect
+ (setq password
+ (condition-case nil
+ (let (inhibit-quit)
+ (if (equal server-name "")
+ (riece-read-passwd (riece-mcat "Password: "))
+ (riece-read-passwd
+ (format (riece-mcat "Password for %s: ")
+ server-name))))
+ (quit
+ (if (equal server-name "")
+ (message (riece-mcat "Password: Quit"))
+ (message (riece-mcat "Password for %s: Quit")
+ server-name))
+ 'quit)))
+ (setq riece-reconnect-with-password nil)))
+ (if (eq password 'quit)
+ (delete-process process)
+ (if password
+ (riece-process-send-string process
+ (format "PASS %s\r\n" password)))
+ (riece-process-send-string process (format "NICK %s\r\n" nickname))
+ (unless realname
+ (setq realname (riece-mcat "No information given")))
+ (if coding
+ (setq realname (encode-coding-string realname
+ (if (consp coding)
+ (cdr coding)
+ coding))))
+ (riece-process-send-string process
+ (format "USER %s * * :%s\r\n"
+ (or username
+ (user-real-login-name))
+ realname))
+ (with-current-buffer (process-buffer process)
+ (setq riece-last-nickname riece-real-nickname
+ riece-nick-accepted 'sent
+ riece-coding-system coding))
+ process))))
+
+(defun riece-irc-quit-server-process (process &optional message)
+ (if riece-quit-timeout
+ (riece-run-at-time riece-quit-timeout nil
+ (lambda (process)
+ (if (rassq process riece-server-process-alist)
+ (delete-process process)))
+ process))
+ (let ((server-name (with-current-buffer (process-buffer process)
+ riece-server-name)))
+ (if (equal server-name "")
+ (message (riece-mcat "Sending QUIT..."))
+ (message (riece-mcat "Sending QUIT to \"%s\"...") server-name))
+ (riece-process-send-string process
+ (if message
+ (format "QUIT :%s\r\n" message)
+ "QUIT\r\n"))
+ (if (equal server-name "")
+ (message (riece-mcat "Sending QUIT...done"))
+ (message (riece-mcat "Sending QUIT to \"%s\"...done") server-name))))
+
+(provide 'riece-irc)
+
+;;; riece-irc.el ends here
--- /dev/null
+;;; riece-kakasi.el --- convert Japanese to roman string by KAKASI -*- lexical-binding: t -*-
+;; 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., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
+
+;;; Commentary:
+
+;; NOTE: This is an add-on module for Riece.
+
+;;; Code:
+
+(defconst riece-kakasi-description
+ "Convert Japanese to roman string by KAKASI.")
+
+(defvar riece-kakasi-process nil)
+
+(require 'riece-message)
+
+(defun riece-kakasi-convert-string (string)
+ (process-send-string riece-kakasi-process (concat string "\n"))
+ (with-current-buffer (process-buffer riece-kakasi-process)
+ (while (progn
+ (goto-char (point-min))
+ (not (search-forward "\n" nil t)))
+ (accept-process-output riece-kakasi-process))
+ (prog1 (buffer-substring (point-min) (1- (point)))
+ (delete-region (point-min) (point)))))
+
+(defun riece-kakasi-message-filter (message)
+ (if (get 'riece-kakasi 'riece-addon-enabled)
+ (riece-message-set-text message
+ (riece-kakasi-convert-string
+ (riece-message-text message))))
+ message)
+
+(defun riece-kakasi-insinuate ()
+ (add-hook 'riece-message-filter-functions 'riece-kakasi-message-filter))
+
+(defun riece-kakasi-uninstall ()
+ (remove-hook 'riece-message-filter-functions 'riece-kakasi-message-filter))
+
+(defun riece-kakasi-enable ()
+ (setq riece-kakasi-process
+ (start-process "kakasi" (generate-new-buffer " *riece-kakasi*")
+ "kakasi" "-Ha" "-Ka" "-Ja" "-Ea" "-ka"))
+ (with-current-buffer (process-buffer riece-kakasi-process)
+ (buffer-disable-undo)
+ (erase-buffer)))
+
+(defun riece-kakasi-disable ()
+ (kill-buffer (process-buffer riece-kakasi-process)))
+
+(provide 'riece-kakasi)
+
+;;; riece-kakasi.el ends here
--- /dev/null
+;;; riece-keepalive.el --- keep an IRC connection -*- lexical-binding: t -*-
+;; 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., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
+
+;;; Commentary:
+
+;; NOTE: This is an add-on module for Riece.
+
+;;; Code:
+
+(require 'riece-options)
+(require 'riece-server)
+
+(defgroup riece-keepalive nil
+ "Keep an IRC connection."
+ :prefix "riece-"
+ :group 'riece)
+
+(defcustom riece-keepalive-ping-repeat 120
+ "Interval for sending PING to server."
+ :type 'integer
+ :group 'riece-keepalive)
+
+(defvar riece-keepalive-timer nil)
+
+(defconst riece-keepalive-description
+ "Keep an IRC connection.")
+
+(defun riece-keepalive-after-login-hook ()
+ (make-local-variable 'riece-keepalive-timer)
+ (unless riece-keepalive-timer
+ (setq riece-keepalive-timer
+ (riece-run-at-time
+ riece-keepalive-ping-repeat riece-keepalive-ping-repeat
+ (lambda (buffer)
+ (with-current-buffer buffer
+ (riece-send-string "PING riece-keepalive\r\n")))
+ (current-buffer)))))
+
+(defun riece-keepalive-after-close-hook ()
+ (when riece-keepalive-timer
+ (riece-cancel-timer riece-keepalive-timer)
+ (setq riece-keepalive-timer nil)))
+
+(defun riece-keepalive-insinuate ()
+ (add-hook 'riece-after-login-hook 'riece-keepalive-after-login-hook)
+ (add-hook 'riece-after-close-hook 'riece-keepalive-after-close-hook))
+
+(defun riece-keepalive-uninstall ()
+ (remove-hook 'riece-after-login-hook 'riece-keepalive-after-login-hook)
+ (remove-hook 'riece-after-close-hook 'riece-keepalive-after-close-hook))
+
+(provide 'riece-keepalive)
+
+;;; riece-ignore.el ends here
--- /dev/null
+;;; riece-keyword.el --- detect keywords in IRC buffers -*- lexical-binding: t -*-
+;; Copyright (C) 1998-2003 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., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
+
+;;; Commentary:
+
+;; NOTE: This is an add-on module for Riece.
+
+;;; Code:
+
+(require 'riece-message)
+
+(defgroup riece-keyword nil
+ "Detect keywords in IRC buffers."
+ :prefix "riece-"
+ :group 'riece)
+
+(defcustom riece-keywords nil
+ "Keywords to be highlightened."
+ :type '(repeat (choice (string :tag "Keyword")
+ (cons (string :tag "Regexp")
+ (integer :tag "Match"))))
+ :group 'riece-keyword)
+
+(defcustom riece-notify-keyword-functions nil
+ "Functions used to notify keyword match."
+ :type '(repeat function)
+ :group 'riece-keyword)
+
+(make-obsolete-variable 'riece-notify-keyword-functions
+ 'riece-keyword-notify-functions
+ "2003-12-22")
+
+(defcustom riece-keyword-notify-functions nil
+ "Functions used to notify keyword match.
+Two arguments are passed to each function: the keyword used to match
+and the matched message object."
+ :type '(repeat function)
+ :group 'riece-keyword)
+
+(defface riece-keyword-face
+ '((((class color))
+ (:foreground "red" :underline t))
+ (t
+ (:underline t)))
+ "Face used for highlightening matching keyword."
+ :group 'riece-highlight-faces)
+(defvar riece-keyword-face 'riece-keyword-face)
+
+(defconst riece-keyword-description
+ "Detect keywords in IRC buffers.")
+
+;;; The old XEmacs package doesn't have autoload setting for regexp-opt.
+(autoload 'regexp-opt "regexp-opt")
+(defun riece-keyword-message-filter (message)
+ (if (and (get 'riece-keyword 'riece-addon-enabled)
+ riece-keywords
+ ;; Ignore messages which belongs to myself.
+ (not (riece-message-own-p message)))
+ (let* (keywords
+ (alist
+ (nconc
+ (delq nil (mapcar
+ (lambda (matcher)
+ (if (stringp matcher)
+ (ignore
+ (setq keywords (cons matcher keywords)))
+ matcher))
+ riece-keywords))
+ (if keywords
+ (list (cons (regexp-opt keywords) 0)))))
+ index)
+ (while alist
+ (setq index 0)
+ (while (and (< index (length (riece-message-text message)))
+ (string-match (car (car alist))
+ (riece-message-text message) index))
+ (put-text-property (match-beginning (cdr (car alist)))
+ (match-end (cdr (car alist)))
+ 'riece-overlay-face riece-keyword-face
+ (riece-message-text message))
+ (save-match-data
+ (run-hook-with-args 'riece-notify-keyword-functions
+ (match-string (cdr (car alist))
+ (riece-message-text message)))
+ (run-hook-with-args 'riece-keyword-notify-functions
+ (cdr (car alist))
+ message))
+ (setq index (1+ (match-end (cdr (car alist))))))
+ (setq alist (cdr alist)))))
+ message)
+
+(defun riece-keyword-requires ()
+ (if (memq 'riece-highlight riece-addons)
+ '(riece-highlight)))
+
+(defun riece-keyword-insinuate ()
+ (add-hook 'riece-message-filter-functions 'riece-keyword-message-filter))
+
+(defun riece-keyword-uninstall ()
+ (remove-hook 'riece-message-filter-functions 'riece-keyword-message-filter))
+
+(provide 'riece-keyword)
+
+;;; riece-keyword.el ends here
--- /dev/null
+;;; riece-layout.el --- layout management -*- lexical-binding: t -*-
+;; Copyright (C) 1998-2003 Daiki Ueno
+
+;; Author: Daiki Ueno <ueno@unixuser.org>
+;; TAKAHASHI Kaoru <kaoru@kaisei.org>
+;; 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., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
+
+;;; Code:
+
+(require 'riece-globals)
+(require 'riece-misc)
+
+(defgroup riece-layout nil
+ "Window layouts."
+ :prefix "riece-"
+ :group 'riece)
+
+(defcustom riece-layout "default"
+ "Current layout setting."
+ :type 'string
+ :group 'riece-layout)
+
+(defcustom riece-layout-alist
+ '(("middle-right" riece-configure-windows right middle)
+ ("middle-left" riece-configure-windows left middle)
+ ("top-right" riece-configure-windows right top)
+ ("top-left" riece-configure-windows left top)
+ ("bottom-right" riece-configure-windows right bottom)
+ ("bottom-left" riece-configure-windows left bottom)
+ ("top" riece-configure-windows-top)
+ ("spiral" riece-configure-windows-spiral)
+ ("one-window" riece-configure-windows-one-window)
+ ("default" . "middle-right"))
+ "An alist mapping the names to layout functions.
+An element of this alist is either in the following forms:
+
+\(NAME CONFIGURE-FUNCTION [PARAMETERS]\)
+\(NAME1 . NAME2\)
+
+In the first form, NAME is a string which specifies the layout
+setting, and CONFIGURE-FUNCTION is a function which does window
+splitting, etc. PARAMETERS are collected and passed to CONFIGURE-FUNCTION.
+In the second form, NAME1 is an alias for NAME2."
+ :type '(repeat (choice (list :tag "Layout"
+ (string :tag "Name")
+ (function :tag "Configure function")
+ (repeat :tag "Parameters" :inline t symbol))
+ (cons :tag "Alias" string string)))
+ :group 'riece-layout)
+
+(defun riece-redraw-layout (&optional force)
+ "Reconfigure windows with the current layout.
+If optional argument FORCE is non-nil, window reconfiguration will
+happen unconditionally."
+ (let ((layout (cdr (assoc riece-layout riece-layout-alist))))
+ (unless layout
+ (error "No such layout!"))
+ (if (stringp layout)
+ (let ((riece-layout layout))
+ (riece-redraw-layout force))
+ (if (or force
+ (riece-reconfigure-windows-predicate))
+ (apply (car layout) (cdr layout))))))
+
+(defun riece-set-window-points ()
+ (if (get-buffer-window riece-user-list-buffer)
+ (with-current-buffer riece-user-list-buffer
+ (unless (riece-frozen riece-user-list-buffer)
+ (set-window-start (get-buffer-window riece-user-list-buffer)
+ (point-min)))))
+ (if (get-buffer-window riece-channel-list-buffer)
+ (with-current-buffer riece-channel-list-buffer
+ (unless (riece-frozen riece-channel-list-buffer)
+ (set-window-start (get-buffer-window riece-channel-list-buffer)
+ (point-min)))))
+ (if (and riece-channel-buffer
+ (get-buffer-window riece-channel-buffer))
+ (with-current-buffer riece-channel-buffer
+ (if (riece-frozen riece-channel-buffer)
+ (if riece-channel-buffer-window-point
+ (set-window-point (get-buffer-window riece-channel-buffer)
+ riece-channel-buffer-window-point))
+ (set-window-point (get-buffer-window riece-channel-buffer)
+ (point-max)))))
+ (if (get-buffer-window riece-others-buffer)
+ (with-current-buffer riece-others-buffer
+ (unless (riece-frozen riece-others-buffer)
+ (set-window-point (get-buffer-window riece-others-buffer)
+ (point-max)))))
+ (if (get-buffer-window riece-dialogue-buffer)
+ (with-current-buffer riece-dialogue-buffer
+ (unless (riece-frozen riece-dialogue-buffer)
+ (set-window-point (get-buffer-window riece-dialogue-buffer)
+ (point-max))))))
+
+(defun riece-reconfigure-windows-predicate ()
+ "Return t, if window reconfiguration is needed.
+This function is used by \"default\" layout."
+ (memq (window-buffer (selected-window))
+ riece-buffer-list))
+
+(defun riece-configure-windows (hpos vpos)
+ (let ((buffer (window-buffer))
+ (show-user-list
+ (and riece-user-list-buffer-mode
+ riece-current-channel
+ ;; User list buffer is nuisance for private conversation.
+ (riece-channel-p (riece-identity-prefix
+ riece-current-channel)))))
+ ;; Can't expand minibuffer to full frame.
+ (if (eq (selected-window) (minibuffer-window))
+ (other-window 1))
+ (delete-other-windows)
+ (if (and riece-current-channel
+ (or show-user-list riece-channel-list-buffer-mode))
+ (let ((rest-window (split-window (selected-window)
+ (if (eq hpos 'left)
+ (- (window-width)
+ (/ (window-width) 5))
+ (/ (window-width) 5))
+ t)))
+ (when (eq hpos 'left)
+ (setq rest-window (selected-window))
+ (other-window 1))
+ (if (and show-user-list riece-channel-list-buffer-mode)
+ (progn
+ (set-window-buffer (split-window)
+ riece-channel-list-buffer)
+ (set-window-buffer (selected-window)
+ riece-user-list-buffer))
+ (if show-user-list
+ (set-window-buffer (selected-window)
+ riece-user-list-buffer)
+ (if riece-channel-list-buffer-mode
+ (set-window-buffer (selected-window)
+ riece-channel-list-buffer))))
+ (select-window rest-window)))
+ (if (and riece-current-channel
+ riece-channel-buffer-mode)
+ (progn
+ (if (eq vpos 'top)
+ (let ((rest-window (split-window nil 4)))
+ (set-window-buffer (selected-window)
+ riece-command-buffer)
+ (select-window rest-window)
+ (if riece-others-buffer-mode
+ (set-window-buffer (split-window rest-window)
+ riece-others-buffer))
+ (set-window-buffer (selected-window)
+ riece-channel-buffer))
+ (if (and (eq vpos 'middle)
+ riece-others-buffer-mode)
+ (let ((rest-window (split-window)))
+ (set-window-buffer (selected-window)
+ riece-channel-buffer)
+ (set-window-buffer (split-window rest-window 4)
+ riece-others-buffer)
+ (set-window-buffer rest-window
+ riece-command-buffer))
+ (let ((rest-window (split-window nil (- (window-height) 4))))
+ (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)
+ (progn
+ (set-window-buffer (selected-window)
+ riece-command-buffer)
+ (set-window-buffer (split-window (selected-window) 4)
+ riece-dialogue-buffer))
+ (set-window-buffer (split-window (selected-window) 4)
+ riece-dialogue-buffer)
+ (set-window-buffer (selected-window)
+ riece-command-buffer)))
+ (riece-set-window-points)
+ (select-window (or (get-buffer-window buffer)
+ (get-buffer-window riece-command-buffer)))))
+
+(defun riece-configure-windows-top (&rest plist)
+ "Candidate of `riece-configure-windows-function'.
+PLIST accept :command-height, :user-list-width, and :channel-list-width."
+ (let ((command-height (or (plist-get plist :command-height) 4))
+ (user-list-width (or (plist-get plist :user-list-width) (+ 9 1 1)))
+ (channel-list-width (or (plist-get plist :channel-list-width) 18))
+ (buffer (window-buffer))
+ (show-user-list
+ (and riece-user-list-buffer-mode
+ riece-current-channel
+ ;; User list buffer is nuisance for private conversation.
+ (riece-channel-p (riece-identity-prefix
+ riece-current-channel)))))
+ ;; Can't expand minibuffer to full frame.
+ (when (eq (selected-window) (minibuffer-window))
+ (other-window 1))
+ (delete-other-windows)
+ ;; top of frame
+ (let ((rest-window (split-window (selected-window) command-height)))
+ (set-window-buffer (selected-window)
+ riece-command-buffer)
+ (select-window rest-window))
+ ;; middle of frame (vertical-spilit when need)
+ (when (or (and riece-current-channel riece-channel-buffer-mode)
+ show-user-list)
+ (let ((rest-window
+ (split-window (selected-window)
+ (/ (* 5 (+ (window-height) command-height)) 8))))
+ (cond
+ ;; channel-buffer + user-list
+ ((and show-user-list
+ (and riece-current-channel riece-channel-buffer-mode))
+ (let ((user-list-window (split-window (selected-window) nil t)))
+ (set-window-buffer (selected-window) riece-channel-buffer)
+ (set-window-buffer user-list-window riece-user-list-buffer)
+ (select-window user-list-window)
+ (shrink-window-horizontally (- (window-width) user-list-width))))
+ ;; only user-list
+ (show-user-list
+ (set-window-buffer (selected-window) riece-user-list-buffer))
+ ;; only channel-buffer
+ (riece-channel-buffer-mode
+ (set-window-buffer (selected-window) riece-channel-buffer)))
+ (select-window rest-window)))
+ ;; bottom of frame
+ (if (and riece-current-channel
+ riece-channel-list-buffer-mode)
+ (let ((channel-list-window (split-window (selected-window) nil t)))
+ (set-window-buffer (selected-window) riece-others-buffer)
+ (set-window-buffer channel-list-window riece-channel-list-buffer)
+ (select-window channel-list-window)
+ (shrink-window-horizontally (- (window-width) channel-list-width)))
+ (set-window-buffer (selected-window) riece-dialogue-buffer))
+ (riece-set-window-points)
+ (select-window (or (get-buffer-window buffer)
+ (get-buffer-window riece-command-buffer)))))
+
+;; +---+-------------------+---+
+;; | c | channel | u |
+;; | h | | s |
+;; | a | | e |
+;; | n |-------------------+ r | | +---+
+;; | n | command | s | | | |
+;; | e +-------------------+---+ | +-> |
+;; | l | others | +-----+
+;; | s | |
+;; +---+-----------------------+
+(defun riece-configure-windows-spiral ()
+ "spiral placement of windows"
+;; (interactive)
+ (let ((command-height 4)
+ (users-width 15)
+ (channels-width 30)
+ (buffer (window-buffer)))
+ (when (eq (selected-window) (minibuffer-window)) (other-window 1))
+ (delete-other-windows)
+
+ ;; (1) create channels window
+ (let ((rest (split-window (selected-window) channels-width t)))
+ (set-window-buffer (selected-window) riece-channel-list-buffer)
+ (select-window rest))
+
+ ;; (2) create others window
+ (set-window-buffer (split-window (selected-window)
+ (+ (/ (window-height) 2)
+ command-height))
+ riece-others-buffer)
+
+ ;; (3) create users window
+ (set-window-buffer (split-window (selected-window)
+ (- (window-width) users-width) t)
+ riece-user-list-buffer)
+
+ ;; (4) create current channel window
+ (let ((rest (split-window (selected-window)
+ (- (window-height) command-height))))
+ (set-window-buffer rest riece-command-buffer)
+ (set-window-buffer (selected-window) riece-channel-buffer))
+
+ (riece-set-window-points)
+ (select-window (or (get-buffer-window buffer)
+ (get-buffer-window riece-command-buffer)))))
+
+(defun riece-configure-windows-one-window ()
+ ;; Can't expand minibuffer to full frame.
+ (if (eq (selected-window) (minibuffer-window))
+ (other-window 1))
+ (delete-other-windows)
+ (set-window-buffer (selected-window) riece-dialogue-buffer))
+
+(provide 'riece-layout)
+
+;;; riece-layout.el ends here
--- /dev/null
+;;; riece-log.el --- Save IRC logs -*- lexical-binding: t -*-
+;; Copyright (C) 2003 OHASHI Akira
+;; Copyright (C) 2004 Daiki Ueno
+
+;; Author: OHASHI Akira <bg66@koka-in.org>
+;; Daiki Ueno <ueno@unixuser.org>
+;; 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., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
+
+;;; Commentary:
+
+;;; NOTE: This is an add-on module for Riece.
+
+;;; Code:
+
+(require 'riece-message)
+(require 'riece-button)
+(require 'riece-mcat)
+
+(defgroup riece-log nil
+ "Save IRC logs."
+ :prefix "riece-"
+ :group 'riece)
+
+(defcustom riece-log-directory
+ (expand-file-name "log" riece-directory)
+ "*Where to look for log files."
+ :type 'directory
+ :group 'riece-log)
+
+(defcustom riece-log-directory-map nil
+ "*The map of channel name and directory name."
+ :type '(repeat (cons (string :tag "Channel name")
+ (string :tag "Directory name")))
+ :group 'riece-log)
+
+(defcustom riece-log-flashback 10
+ "*If non-nil, irc messages flash back from log files.
+If integer, flash back only this line numbers. t means all lines."
+ :type '(choice (integer :tag "line numbers")
+ (const t :tag "of the day")
+ (const nil :tag "no flashback"))
+ :group 'riece-log)
+
+(defcustom riece-log-coding-system nil
+ "*Coding system used for log files."
+ :type 'symbol
+ :group 'riece-log)
+
+(defcustom riece-log-file-name-coding-system
+ (if (boundp 'file-name-coding-system)
+ file-name-coding-system)
+ "*Coding system used for filenames of log files."
+ :type 'symbol
+ :group 'riece-log)
+
+(defface riece-log-date-face
+ '((((class color)
+ (background dark))
+ (:foreground "Gray70"))
+ (((class color)
+ (background light))
+ (:foreground "DimGray"))
+ (t
+ (:bold t)))
+ "Face used for displaying \"(YYYY/MM/dd)\" extent."
+ :group 'riece-highlight-faces)
+(defvar riece-log-date-face 'riece-log-date-face)
+
+(defvar riece-log-lock-file nil
+ "Lock file for riece-log.
+It is created if there is at least one instance of Emacs running riece-log.")
+
+(defconst riece-log-file-name-regexp
+ (concat (riece-make-interval-regexp "[0-9]" 8) "\\.txt\\(\\.\\(.*\\)\\)?$"))
+
+(defconst riece-log-description
+ "Save IRC logs.")
+
+(defun riece-log-display-message-function (message)
+ (if (get 'riece-log 'riece-addon-enabled)
+ (let* ((coding-system-for-write
+ (if (featurep 'mule)
+ (or riece-log-coding-system
+ (car (get-language-info current-language-environment
+ 'coding-system)))))
+ (file (riece-log-make-file-name
+ (if (and (riece-message-private-p message)
+ (not (riece-message-own-p message)))
+ (riece-message-speaker message)
+ (riece-message-target message))
+ coding-system-for-write))
+ (file-name-coding-system 'no-conversion))
+ (unless (file-directory-p (file-name-directory file))
+ (make-directory (file-name-directory file) t))
+ (write-region (concat (format-time-string "%H:%M") " "
+ (riece-format-message message))
+ nil file t 0
+ riece-log-lock-file))))
+
+(defun riece-log-make-file-name (identity coding-system)
+ (expand-file-name (if (and (featurep 'mule) coding-system)
+ (format "%s.txt.%s"
+ (format-time-string "%Y%m%d")
+ coding-system)
+ (format "%s.txt"
+ (format-time-string "%Y%m%d")))
+ (riece-log-directory identity)))
+
+(defun riece-log-list-files (identity time)
+ (let ((directory (riece-log-directory identity))
+ (time-prefix (format-time-string "%Y%m%d" (or time '(0 0))))
+ files)
+ (when (file-directory-p directory)
+ (setq files (nreverse (sort (directory-files
+ directory t
+ (concat "^" riece-log-file-name-regexp)
+ t)
+ #'string-lessp)))
+ (while (and files
+ (string-lessp (file-name-nondirectory (car files))
+ time-prefix))
+ (setq files (cdr files)))
+ files)))
+
+(defun riece-log-directory (identity)
+ (let ((prefix (riece-identity-canonicalize-prefix
+ (riece-identity-prefix identity)))
+ (server (riece-identity-server identity))
+ (map (assoc (riece-format-identity identity) riece-log-directory-map)))
+ (if map
+ (expand-file-name (cdr map) riece-log-directory)
+ (expand-file-name (riece-log-encode-file-name prefix)
+ (expand-file-name
+ (concat "." (riece-log-encode-file-name server))
+ riece-log-directory)))))
+
+(defun riece-log-encode-file-name (file-name)
+ (if riece-log-file-name-coding-system
+ (setq file-name
+ (encode-coding-string file-name
+ riece-log-file-name-coding-system)))
+ (let ((index 0)
+ c)
+ (while (string-match "[^-0-9A-Za-z_\x80-\xFF]" file-name index)
+ (setq c (aref file-name (match-beginning 0)))
+ (if (eq c ?=)
+ (setq file-name (replace-match "==" nil t file-name)
+ index (1+ (match-end 0)))
+ (setq file-name (replace-match (format "=%02X" c) nil t file-name)
+ index (+ 2 (match-end 0)))))
+ file-name))
+
+(defun riece-log-decode-file-name (file-name)
+ (let ((index 0))
+ (while (string-match "==\\|=\\([0-7][0-9A-F]\\)" file-name index)
+ (setq file-name (replace-match
+ (if (eq (aref file-name (1- (match-end 0))) ?=)
+ "="
+ (char-to-string
+ (car (read-from-string
+ (concat "?\\x" (match-string 1 file-name))))))
+ nil t file-name)
+ index (1+ (match-beginning 0))))
+ file-name)
+ (if riece-log-file-name-coding-system
+ (setq file-name
+ (decode-coding-string file-name
+ riece-log-file-name-coding-system)))
+ file-name)
+
+(defun riece-log-insert (identity lines)
+ "Insert logs for IDENTITY at most LINES.
+If LINES is t, insert today's logs entirely."
+ (let* ((file-name-coding-system 'no-conversion)
+ (files (riece-log-list-files identity
+ (if (eq lines t) (current-time))))
+ name coding-system date point)
+ (while (and (or (eq lines t) (> lines 0)) files)
+ (save-restriction
+ (narrow-to-region (point) (point))
+ (if (and (string-match
+ (concat "^" riece-log-file-name-regexp)
+ (setq name (file-name-nondirectory (car files))))
+ (match-beginning 2))
+ (progn
+ (setq coding-system
+ (intern (substring name (match-beginning 2))))
+ (if (featurep 'xemacs)
+ (setq coding-system (find-coding-system coding-system))
+ (unless (coding-system-p coding-system)
+ (setq coding-system nil)))
+ (if coding-system
+ (let ((coding-system-for-read coding-system))
+ (insert-file-contents (car files)))
+ ;;don't insert file contents if they use non
+ ;;supported coding-system.
+ ))
+ ;;if the filename has no coding-system suffix, decode with
+ ;;riece-log-coding-system.
+ (let ((coding-system-for-read riece-log-coding-system))
+ (insert-file-contents (car files))))
+ ;;lines in the file contents are in reversed order.
+ (unless (eq lines t)
+ (goto-char (point-max))
+ (setq lines (- (forward-line (- lines))))
+ (delete-region (point-min) (point)))
+ ;;add (YYYY/MM/dd) suffix on each line left in the current buffer.
+ (unless (equal (substring name 0 8) (format-time-string "%Y%m%d"))
+ (setq date (concat " (" (substring name 0 4) "/"
+ (substring name 4 6) "/"
+ (substring name 6 8) ")"))
+ (while (not (eobp))
+ (end-of-line)
+ (setq point (point))
+ (insert date)
+ (put-text-property point (point)
+ 'riece-overlay-face 'riece-log-date-face)
+ (forward-line))
+ (goto-char (point-min))))
+ (setq files (cdr files)))))
+
+(defun riece-log-flashback (identity)
+ (when riece-log-flashback
+ (riece-insert-info (current-buffer)
+ (if (eq riece-log-flashback t)
+ (riece-mcat "Recent messages of the day:\n")
+ (format (riece-mcat
+ "Recent messages up to %d lines:\n")
+ riece-log-flashback)))
+ (let (buffer-read-only
+ (point (goto-char (point-max))))
+ (insert (with-temp-buffer
+ (riece-log-insert identity riece-log-flashback)
+ (buffer-string)))
+ (goto-char point)
+ (while (re-search-forward
+ (concat "^" riece-time-prefix-regexp
+ "\\(<[^>]+>\\|>[^<]+<\\|([^)]+)\\|{[^}]+}\\|=[^=]+=\\)")
+ nil t)
+ (put-text-property (1+ (match-beginning 1)) (1- (match-end 1))
+ 'riece-identity
+ (riece-make-identity
+ (buffer-substring (1+ (match-beginning 1))
+ (1- (match-end 1)))
+ (riece-identity-server identity))))
+ (run-hook-with-args 'riece-after-insert-functions
+ point (goto-char (point-max)))
+ (set-window-point (get-buffer-window (current-buffer))
+ (point)))))
+
+(defun riece-log-dired (&optional channel)
+ (interactive)
+ (let ((directory (riece-log-directory (or channel riece-current-channel))))
+ (if (file-directory-p directory)
+ (dired directory)
+ (error "No log directory"))))
+
+(defun riece-log-requires ()
+ (if (memq 'riece-button riece-addons)
+ '(riece-button)))
+
+(defun riece-log-insinuate ()
+ (make-directory riece-log-directory t)
+ (setq riece-log-lock-file
+ (expand-file-name (format "!%s-%d-%d"
+ (riece-log-encode-file-name (system-name))
+ (user-uid)
+ (emacs-pid))
+ riece-log-directory))
+ ;; FIXME: Use `riece-after-insert-functions' for trapping change,
+ ;; notice, wallops and so on. But must add argument.
+ (add-hook 'riece-after-display-message-functions
+ 'riece-log-display-message-function)
+ (add-hook 'riece-channel-buffer-create-functions
+ 'riece-log-flashback))
+
+(defun riece-log-uninstall ()
+ (setq riece-log-lock-file nil)
+ (remove-hook 'riece-after-display-message-functions
+ 'riece-log-display-message-function)
+ (remove-hook 'riece-channel-buffer-create-functions
+ 'riece-log-flashback))
+
+(defvar riece-command-mode-map)
+(defun riece-log-enable ()
+ (define-key riece-command-mode-map "\C-cd" 'riece-log-dired))
+
+(defun riece-log-disable ()
+ (define-key riece-command-mode-map "\C-cd" nil))
+
+(provide 'riece-log)
+
+;;; riece-log.el ends here
--- /dev/null
+;;; riece-lsdb.el --- help register nicknames in LSDB rolodex program -*- lexical-binding: t -*-
+;; Copyright (C) 1998-2003 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., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
+
+;;; Commentary:
+
+;; NOTE: This is an add-on module for Riece.
+
+;;; Code:
+
+(require 'riece-identity)
+(require 'riece-misc)
+
+(eval-when-compile
+ (autoload 'lsdb-maybe-load-hash-tables "lsdb")
+ (autoload 'lsdb-rebuild-secondary-hash-tables "lsdb")
+ (autoload 'lsdb-lookup-records "lsdb")
+ (autoload 'lsdb-puthash "lsdb")
+ (autoload 'lsdb-maphash "lsdb")
+ (autoload 'lsdb-gethash "lsdb")
+ (autoload 'lsdb-display-records "lsdb")
+ (autoload 'lsdb-update-record "lsdb"))
+
+(defvar riece-lsdb-cache nil)
+
+(defconst riece-lsdb-description
+ "Help register nicknames in LSDB rolodex program.")
+
+(defun riece-lsdb-update-cache (record)
+ (let ((irc (cdr (assq 'irc record))))
+ (while irc
+ (lsdb-puthash (car irc)
+ (cons (car record)
+ (lsdb-gethash (car irc) riece-lsdb-cache))
+ riece-lsdb-cache)
+ (setq irc (cdr irc)))))
+
+(defun riece-lsdb-delete-cache (record)
+ (let ((irc (cdr (assq 'irc record))))
+ (while irc
+ (lsdb-puthash (car irc)
+ (delete (car record)
+ (lsdb-gethash (car irc) riece-lsdb-cache))
+ riece-lsdb-cache)
+ (setq irc (cdr irc)))))
+
+(defun riece-lsdb-lookup-records (user)
+ (lsdb-maybe-load-hash-tables)
+ (unless riece-lsdb-cache
+ (lsdb-rebuild-secondary-hash-tables))
+ (let ((names (lsdb-gethash (riece-format-identity user t)
+ riece-lsdb-cache))
+ records)
+ (while names
+ (setq records (append records (lsdb-lookup-records (car names))))
+ (setq names (cdr names)))
+ records))
+
+(defun riece-lsdb-display-records (user)
+ (interactive
+ (let ((completion-ignore-case t))
+ (list (riece-completing-read-identity
+ "User: "
+ (riece-get-users-on-server (riece-current-server-name))))))
+ (let ((records (riece-lsdb-lookup-records user)))
+ (if records
+ (lsdb-display-records records)
+ (message "No entry for `%s'" (riece-format-identity user t)))))
+
+(defvar lsdb-hash-table)
+(defun riece-lsdb-add-user (user full-name)
+ (interactive
+ (let ((completion-ignore-case t)
+ (table lsdb-hash-table))
+ (unless (vectorp table)
+ (setq table (make-vector 29 0))
+ (lsdb-maphash (lambda (key _value)
+ (intern key table))
+ lsdb-hash-table))
+ (list (riece-completing-read-identity
+ "User: "
+ (riece-get-users-on-server (riece-current-server-name)))
+ (completing-read "Full name: " table))))
+ (let* ((record (lsdb-gethash full-name lsdb-hash-table))
+ (irc (riece-format-identity user t))
+ (old (cdr (assq 'irc record))))
+ ;; Remove all properties before adding entry.
+ (set-text-properties 0 (length irc) nil irc)
+ (unless (member irc old)
+ (lsdb-update-record (list full-name
+ ;; LSDB does not allow empty 'net entry.
+ (or (nth 1 (assq 'net (lsdb-lookup-records
+ full-name)))
+ ""))
+ (list (cons 'irc (cons irc old)))))))
+
+(defvar riece-command-mode-map)
+(defvar lsdb-secondary-hash-tables)
+(defvar lsdb-after-update-record-functions)
+(defvar lsdb-after-delete-record-functions)
+(defun riece-lsdb-insinuate ()
+ (require 'lsdb)
+ (add-to-list 'lsdb-secondary-hash-tables
+ 'riece-lsdb-cache)
+ (add-to-list 'lsdb-after-update-record-functions
+ 'riece-lsdb-update-cache)
+ (add-to-list 'lsdb-after-delete-record-functions
+ 'riece-lsdb-delete-cache))
+
+(defun riece-lsdb-uninstall ()
+ (setq lsdb-secondary-hash-tables
+ (delq 'riece-lsdb-cache lsdb-secondary-hash-tables)
+ lsdb-after-update-record-functions
+ (delq 'riece-lsdb-update-cache lsdb-after-update-record-functions)
+ lsdb-after-delete-record-functions
+ (delq 'riece-lsdb-delete-cache lsdb-after-delete-record-functions)))
+
+(defun riece-lsdb-enable ()
+ (define-key riece-command-mode-map
+ "\C-c\C-ll" 'riece-lsdb-display-records)
+ (define-key riece-command-mode-map
+ "\C-c\C-la" 'riece-lsdb-add-user))
+
+(defun riece-lsdb-disable ()
+ (define-key riece-command-mode-map
+ "\C-c\C-ll" nil)
+ (define-key riece-command-mode-map
+ "\C-c\C-la" nil))
+
+(provide 'riece-lsdb)
+
+;;; riece-lsdb.el ends here
--- /dev/null
+;;; riece-mcat.el --- message catalog for Japanese -*- coding: iso-2022-jp -*- -*- lexical-binding: t -*-
+;; Copyright (C) 2007 Daiki Ueno
+
+;; Author: Daiki Ueno <ueno@unixuser.org>
+
+;; 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., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
+
+;;; Commentary:
+
+;; To update riece-mcat-japanese-alist, do `make update-mcat'.
+
+;;; Code:
+
+(defconst riece-mcat-japanese-alist
+ '(("\nSymbols in the leftmost column:\n\n + The add-on is enabled.\n - The add-on is disabled.\n ? The add-on is not insinuated.\n The add-on is not loaded.\n" . "\n\e$B:8C<$N%7%s%\%k\e(B:\n\n + \e$BM-8z$J%"%I%*%s\e(B\n - \e$BL58z$J%"%I%*%s\e(B\n ? \e$BAH$_9~$^$l$F$$$J$$%"%I%*%s\e(B\n \e$B%m!<%I$5$l$F$$$J$$%"%I%*%s\e(B\n")
+ ("\nUseful keys:\n\n `\\[riece-command-enable-addon]' to enable the current add-on.\n `\\[riece-command-disable-addon]' to disable the current add-on.\n `\\[riece-command-insinuate-addon]' to insinuate the current add-on.\n `\\[riece-command-uninstall-addon]' to uninstall the current add-on.\n `\\[riece-command-unload-addon]' to unload the current add-on.\n `\\[riece-command-save-variables]' to save the current setting.\n" . "\n\e$BJXMx$J%-!<\e(B:\n\n `\\[riece-command-enable-addon]' \e$B%"%I%*%s$rM-8z2=\e(B\n `\\[riece-command-disable-addon]' \e$B%"%I%*%s$rL58z2=\e(B\n `\\[riece-command-insinuate-addon]' \e$B%"%I%*%s$rAH$_9~$_\e(B\n `\\[riece-command-uninstall-addon]' \e$B%"%I%*%s$N=|30\e(B\n `\\[riece-command-unload-addon]' \e$B%"%I%*%s$r%"%s%m!<%I\e(B\n `\\[riece-command-save-variables]' \e$B@_Dj$rJ]B8\e(B\n")
+ ("%2d: %s %s (%d bytes)\n" . "%2d: %s %s (%d \e$B%P%$%H\e(B)\n")
+ ("%S: switch to %s; down-mouse-3: more options" . "%S: %s \e$B$K0\F0\e(B; down-mouse-3: \e$B$=$NB>$N%*%W%7%g%s\e(B")
+ ("%d users on %s: " . "%d \e$B?M$,\e(B %s \e$B$K$$$^$9\e(B: ")
+ ("%d users: " . "%d \e$B?M\e(B: ")
+ ("%s (%s) has joined %s" . "%s (%s) \e$B$,\e(B %s \e$B$K;22C$7$^$7$?\e(B")
+ ("%s (%s) has joined %s\n" . "%s (%s) \e$B$,\e(B %s \e$B$K;22C$7$^$7$?\e(B\n")
+ ("%s has left %s" . "%s \e$B$,\e(B %s \e$B$rN%$l$^$7$?\e(B")
+ ("%s has left IRC" . "%s \e$B$,\e(B IRC \e$B$rN%$l$^$7$?\e(B")
+ ("%s invites %s to %s" . "%s \e$B$,\e(B %s \e$B$r\e(B %s \e$B$K>7BT$7$F$$$^$9\e(B")
+ ("%s is %s (%s)" . "%s \e$B$O\e(B %s (%s)")
+ ("%s is %s idle" . "%s \e$B$O\e(B %s \e$B%"%$%I%k>uBV\e(B")
+ ("%s is (%s)" . "%s \e$B$O\e(B (%s)")
+ ("%s is away: %s" . "%s \e$B$ON%@JCf\e(B: %s")
+ ("%s is running on %s: %s" . "%s \e$B$,\e(B %s \e$B$GF0$$$F$$$^$9\e(B: %s")
+ ("%s kicked %s out from %s" . "%s \e$B$,\e(B %s \e$B$r\e(B %s \e$B$+$i=3$j=P$7$^$7$?\e(B")
+ ("%s kicked %s out from %s\n" . "%s \e$B$,\e(B %s \e$B$r\e(B %s \e$B$+$i=3$j=P$7$^$7$?\e(B\n")
+ ("%s killed %s" . "%s \e$B$,\e(B %s \e$B$r\e(B KILL \e$B$7$^$7$?\e(B")
+ ("%s users, topic: %s\n" . "%s \e$B?M!"%H%T%C%/\e(B: %s\n")
+ ("%s will be insinuated. Continue? " . "%s \e$B$OAH$_9~$^$l$F$$$^$;$s!#B39T$7$^$9$+\e(B? ")
+ ("%s: %s users, topic: %s" . "%s: %s \e$B?M!"%H%T%C%/\e(B: %s\n")
+ ("(no description)" . "(\e$B@bL@$J$7\e(B)")
+ ("Action: " . "\e$B%"%/%7%g%s\e(B: ")
+ ("Add-on %S disabled" . "\e$B%"%I%*%s\e(B %S \e$B$,L58z$K$J$j$^$7$?\e(B")
+ ("Add-on %S enabled" . "\e$B%"%I%*%s\e(B %S \e$B$,M-8z$K$J$j$^$7$?\e(B")
+ ("Add-on %S is already disabled" . "\e$B%"%I%*%s\e(B %S \e$B$O4{$KL58z$G$9\e(B")
+ ("Add-on %S is already enabled" . "\e$B%"%I%*%s\e(B %S \e$B$O4{$KM-8z$G$9\e(B")
+ ("Add-on %S is already insinuated" . "\e$B%"%I%*%s\e(B %S \e$B$O4{$KAH$_9~$^$l$F$$$^$9\e(B")
+ ("Add-on %S is insinuated" . "\e$B%"%I%*%s\e(B %S \e$B$,AH$_9~$^$l$^$7$?\e(B")
+ ("Add-on %S is not allowed to unload" . "\e$B%"%I%*%s\e(B %S \e$B$O%"%s%m!<%I$G$-$^$;$s\e(B")
+ ("Add-on %S is not insinuated" . "\e$B%"%I%*%s\e(B %S \e$B$OAH$_9~$^$l$F$$$^$;$s\e(B")
+ ("Add-on %S is uninstalled" . "\e$B%"%I%*%s\e(B %S \e$B$,=|30$5$l$^$7$?\e(B")
+ ("Add-on %S is unloaded" . "\e$B%"%I%*%s\e(B %S \e$B$,%"%s%m!<%I$5$l$^$7$?\e(B")
+ ("Add-on: " . "\e$B%"%I%*%s\e(B: ")
+ ("Allow channel members to play the hangman game." . "\e$B%A%c%s%M%k$N;22C<T$,%O%s%0%^%s$GM7$Y$k$h$&$K$J$j$^$9\e(B")
+ ("Already registered" . "\e$BEPO?:Q$_$G$9\e(B")
+ ("Away message: " . "\e$BN%@J$N%a%C%;!<%8\e(B: ")
+ ("Ban pattern: " . "\e$BN)F~6X;_%Q%?!<%s\e(B: ")
+ ("Be notified if messages arrives." . "\e$B%a%C%;!<%8$,FO$/$HDLCN$5$l$^$9\e(B")
+ ("Beginning of buffer" . "\e$B%P%C%U%!$N@hF,$G$9\e(B")
+ ("CTCP (Client To Client Protocol) support." . "CTCP (Client To Client Protocol) \e$BBP1~\e(B")
+ ("CTCP CLIENTINFO for %s (%s) = %s" . "%s (%s) \e$B$N\e(B CTCP CLIENTINFO = %s")
+ ("CTCP CLIENTINFO from %s (%s) to %s" . "%s (%s) \e$B$,\e(B %s \e$B$K\e(B CTCP CLIENTINFO")
+ ("CTCP PING for %s (%s) = %d sec" . "%s (%s) \e$B$N\e(B CTCP PING = %d \e$BIC\e(B")
+ ("CTCP PING from %s (%s) to %s" . "%s (%s) \e$B$,\e(B %s \e$B$K\e(B CTCP PING")
+ ("CTCP TIME for %s (%s) = %s" . "%s (%s) \e$B$N\e(B CTCP TIME = %s")
+ ("CTCP TIME from %s\n" . "%s \e$B$+$i\e(B CTCP TIME\n")
+ ("CTCP TIME from %s (%s) to %s" . "%s (%s) \e$B$,\e(B %s \e$B$K\e(B CTCP TIME")
+ ("CTCP VERSION for %s (%s) = %s" . "%s (%s) \e$B$N\e(B CTCP VERSION = %s")
+ ("CTCP VERSION from %s (%s) to %s" . "%s (%s) \e$B$,\e(B %s \e$B$K\e(B CTCP VERSION")
+ ("Can't find completion for \"%s\"" . "\"%s\" \e$B$KBP$9$kJd40$,8+$D$+$j$^$;$s\e(B")
+ ("Change Nickname" . "\e$B%K%C%/%M!<%`$rJQ99\e(B")
+ ("Change Window Layout..." . "\e$B%&%#%s%I%&%l%$%"%&%H$rJQ99\e(B...")
+ ("Change layout: " . "\e$BJQ998e$N%l%$%"%&%H\e(B: ")
+ ("Change mode for channel/user: " . "\e$B%b!<%I$rJQ99$9$k%A%c%s%M%k$^$?$O%f!<%6\e(B: ")
+ ("Channel/User: " . "\e$B%A%c%s%M%k$^$?$O%f!<%6\e(B: ")
+ ("Channels" . "\e$B%A%c%s%M%k0lMw\e(B")
+ ("Close Server" . "\e$B%5!<%P$H$N@\B3$rJD$8$k\e(B")
+ ("Close server: " . "\e$B@\B3$rJD$8$k%5!<%P\e(B: ")
+ ("Collect URL in IRC buffers." . "\e$B%P%C%U%!$K=P$F$-$?\e(B URL \e$B$r=8$a$^$9\e(B")
+ ("Command to execute on \"%s\":" . "\"%s\" \e$B$G<B9T$9$k%3%^%s%I\e(B: ")
+ ("Connect to IRC server via async proxy." . "\e$B@\B3@Z$l$rKI$0$?$a$K30It$N%W%m%;%9\e(B (aproxy.rb) \e$B$r2p$7$F\e(B IRC \e$B%5!<%P$K@\B3$7$^$9\e(B")
+ ("Connecting to %s..." . "%s \e$B$K@\B3$7$F$$$^$9\e(B...")
+ ("Connecting to %s...done" . "%s \e$B$K@\B3$7$F$$$^$9\e(B...\e$B40N;\e(B")
+ ("Connecting to %s...failed: %S" . "%s \e$B$K@\B3$7$F$$$^$9\e(B...\e$B<:GT\e(B: %S")
+ ("Connecting to IRC server..." . "IRC \e$B%5!<%P$K@\B3$7$F$$$^$9\e(B...")
+ ("Connecting to IRC server...done" . "IRC \e$B%5!<%P$K@\B3$7$F$$$^$9\e(B...\e$B40N;\e(B")
+ ("Connecting to IRC server...failed: %S" . "IRC \e$B%5!<%P$K@\B3$7$F$$$^$9\e(B...\e$B<:GT\e(B: %S")
+ ("Convert Japanese to roman string by KAKASI." . "KAKASI \e$B$rMQ$$$FF|K\8l$r%m!<%^;z$KJQ49$7$^$9\e(B")
+ ("Created on %s\n" . "%s \e$B$K:n@.$5$l$^$7$?\e(B\n")
+ ("DCC file sending protocol support (written in Ruby.)" . "DCC \e$B%U%!%$%kE>Aw\e(B (Ruby \e$B$K$h$k<BAu\e(B)")
+ ("Define aliases for IRC names." . "\e$B%K%C%/%M!<%`$d%A%c%s%M%kL>$NJLL>Dj5A\e(B")
+ ("Detect keywords in IRC buffers." . "\e$B%P%C%U%!$K=P$F$-$?%-!<%o!<%I$N8!=P\e(B")
+ ("Display Channel Buffer" . "\e$B%A%c%s%M%k%P%C%U%!$NI=<(\e(B")
+ ("Display Channel List Buffer" . "\e$B%A%c%s%M%k0lMw%P%C%U%!$NI=<(\e(B")
+ ("Display User List Buffer" . "\e$B%f!<%60lMw%P%C%U%!$NI=<(\e(B")
+ ("Display X-Face & Colour Face images in IRC buffers (BBDB)." . "X-Face \e$B$d?'IU$-$N\e(B Face \e$B2hA|$rI=<(\e(B (BBDB \e$BMxMQ\e(B)")
+ ("Display X-Face in IRC buffers." . "X-Face \e$B$d?'IU$-\e(B Face \e$B2hA|$rI=<(\e(B (LSDB \e$BMxMQ\e(B)")
+ ("Display icons in IRC buffers." . "\e$B%"%$%3%s$rI=<(\e(B")
+ ("Display notification to desktop." . "\e$B%G%9%/%H%C%W$KDLCN\e(B")
+ ("Display toolbar icons." . "\e$B%D!<%k%P!<$N%"%$%3%s$rI=<(\e(B")
+ ("Display useful buttons in IRC buffers." . "\e$B%\%?%s$rI=<(\e(B")
+ ("Encrypt/decrypt messages." . "\e$B%a%C%;!<%8$N0E9f2=!&I|9f\e(B")
+ ("End of buffer" . "\e$B%P%C%U%!$N=*C<$G$9\e(B")
+ ("Enter the element of kill-ring." . "kill-ring \e$B$+$i0l9TH/8@\e(B")
+ ("Erroneous nickname \"%s\". Choose a new one: " . "\e$BIT@5$J%K%C%/%M!<%`\e(B \"%s\"\e$B!#?7$7$$%K%C%/%M!<%`\e(B: ")
+ ("Evaluate an input string as an elisp form." . "\e$BF~NO9T$r\e(B Elisp \e$B$N<0$H$7$FI>2A\e(B")
+ ("Evaluate input string as a Ruby program." . "\e$BF~NO9T$r\e(B Ruby \e$B$N<0$H$7$FI>2A\e(B")
+ ("File: " . "\e$B%U%!%$%k\e(B: ")
+ ("Finger user: " . "\e$B?H85$rD4$Y$k%f!<%6\e(B: ")
+ ("Free old IRC messages to save memory usage." . "\e$B8E$$%a%C%;!<%8$r>C5n$7$F%a%b%j>CHq$r8:$i$9\e(B")
+ ("Freeze Channel Buffer" . "\e$B<+F0%9%/%m!<%k$r6X;_\e(B")
+ ("Freeze Channel Buffer Until Next Message" . "\e$B%a%C%;!<%8$,Mh$k$^$G<+F0%9%/%m!<%k$r6X;_\e(B")
+ ("Guess the next channel, using multiple methods." . "\e$BJ#?t$NJ}K!$G0\F0@h$N%A%c%s%M%k$rM=B,\e(B")
+ ("Help register nicknames in LSDB rolodex program." . "LSDB \e$B=;=jO?$K%K%C%/%M!<%`$rEPO?\e(B")
+ ("Highlight IRC buffers." . "\e$B%P%C%U%!$N?'IU$1\e(B")
+ ("Ignore messages from some users." . "\e$B;XDj$7$?%f!<%6$+$i$N%a%C%;!<%8$rL5;k\e(B")
+ ("Invite User" . "\e$B%f!<%6$r>7BT$9$k\e(B")
+ ("Invite user: " . "\e$B>7BT$9$k%f!<%6\e(B: ")
+ ("Inviting %s\n" . "%s \e$B$r>7BT$7$F$$$^$9\e(B\n")
+ ("Inviting %s to %s" . "%s \e$B$r\e(B %s \e$B$K>7BT$7$F$$$^$9\e(B")
+ ("Join Channel" . "\e$B%A%c%s%M%k$K;22C$9$k\e(B")
+ ("Join channel/user" . "\e$B;22C$9$k%A%c%s%M%k$^$?$O%f!<%6\e(B")
+ ("Join channel/user (default %s)" . "\e$B;22C$9$k%A%c%s%M%k$^$?$O%f!<%6\e(B (\e$B4{DjCM\e(B %s)")
+ ("Keep an IRC connection." . "\e$B@\B3$r0];}\e(B")
+ ("Key for %s: " . "%s \e$B$N%-!<\e(B: ")
+ ("Key for %s: Quit" . "%s \e$B$N%-!<\e(B: \e$BCf;_\e(B")
+ ("Kick User" . "\e$B%f!<%6$r=3$j=P$9\e(B")
+ ("Kick user: " . "\e$B=3$j=P$9%f!<%6\e(B: ")
+ ("LIST pattern: " . "LIST \e$B$N%Q%?!<%s\e(B: ")
+ ("List Channel" . "\e$B%A%c%s%M%k$rD4$Y$k\e(B")
+ ("Logging in to %s..." . "%s \e$B$K%m%0%$%s$7$F$$$^$9\e(B...")
+ ("Logging in to %s...done" . "%s \e$B$K%m%0%$%s$7$F$$$^$9\e(B...\e$B40N;\e(B")
+ ("Logging in to IRC server..." . "IRC \e$B%5!<%P$K%m%0%$%s$7$F$$$^$9\e(B...")
+ ("Logging in to IRC server...done" . "IRC \e$B%5!<%P$K%m%0%$%s$7$F$$$^$9\e(B...\e$B40N;\e(B")
+ ("Manage Add-ons" . "\e$B%"%I%*%s$N4IM}\e(B")
+ ("Manage history of channel shifting." . "\e$B%A%c%s%M%k0\F0$NMzNr\e(B")
+ ("Mark As Away" . "\e$BN%@J>uBV$K$9$k\e(B")
+ ("Mark channels where new messages arrived." . "\e$B?7$7$$%a%C%;!<%8$,FO$$$?%A%c%s%M%k$r%^!<%/\e(B")
+ ("Mark up control sequences in IRC buffers." . "\e$B%3%s%H%m!<%k%7!<%1%s%9$K$h$k?'IU$1\e(B")
+ ("Message to user: " . "\e$B%f!<%6$X$N%a%C%;!<%8\e(B: ")
+ ("Message: " . "\e$B%a%C%;!<%8\e(B: ")
+ ("Mode (? for help)" . "\e$B%b!<%I\e(B (\e$B%X%k%W$O\e(B ?)")
+ ("Mode by %s: %s\n" . "%s \e$B$K$h$k%b!<%I@_Dj\e(B: %s\n")
+ ("Mode for %s: %s" . "%s \e$B$N%b!<%I\e(B: %s")
+ ("Mode on %s by %s: %s" . "%s \e$B$N%b!<%I$,\e(B %s \e$B$K$h$j@_Dj$5$l$^$7$?\e(B: %s")
+ ("Mode: " . "\e$B%b!<%I\e(B: ")
+ ("NAMES pattern: " . "NAMES \e$B$N%Q%?!<%s\e(B: ")
+ ("Next Channel" . "\e$B<!$N%A%c%s%M%k\e(B")
+ ("Nickname \"%s\" already in use. Choose a new one: " . "\e$B%K%C%/%M!<%`\e(B \"%s\" \e$B$O4{$K;HMQ$5$l$F$$$^$9!#?7$7$$%K%C%/%M!<%`\e(B: ")
+ ("No changes made. Save anyway? " . "\e$BJQ99$,$"$j$^$;$s$,!"J]B8$7$^$9$+\e(B? ")
+ ("No channel" . "\e$B%A%c%s%M%k$J$7\e(B")
+ ("No information given" . "\e$B>pJs$,$"$j$^$;$s\e(B")
+ ("No server process" . "\e$B%5!<%P$N%W%m%;%9$,$"$j$^$;$s\e(B")
+ ("No text to send" . "\e$BAw?.$9$k%F%-%9%H$,$"$j$^$;$s\e(B")
+ ("None" . "\e$B$J$7\e(B")
+ ("Online: " . "\e$B%*%s%i%$%s\e(B: ")
+ ("Open Server" . "\e$B%5!<%P$K@\B3\e(B")
+ ("Open URL..." . "URL \e$B$r3+$/\e(B...")
+ ("Open URL: " . "\e$B3+$/\e(B URL: ")
+ ("Open server: " . "\e$B@\B3$9$k%5!<%P\e(B: ")
+ ("Part Channel" . "\e$B%A%c%s%M%k$+$iN%C&$9$k\e(B")
+ ("Part from channel/user (default %s): " . "\e$BN%C&$9$k%A%c%s%M%k$^$?$O%f!<%6\e(B (\e$B4{DjCM\e(B %s): ")
+ ("Password for %s: " . "%s \e$B$N%Q%9%o!<%I\e(B: ")
+ ("Password for %s: Quit" . "%s \e$B$N%Q%9%o!<%I\e(B: \e$BCf;_\e(B")
+ ("Password incorrect from %s." . "%s \e$B$N%Q%9%o!<%I$,IT@5$G$9!#\e(B")
+ ("Password: " . "\e$B%Q%9%o!<%I\e(B: ")
+ ("Password: Quit" . "\e$B%Q%9%o!<%I\e(B: \e$BCf;_\e(B")
+ ("Pretend to be a psychotherapist." . "\e$B?4M}NEK!;N$K$J$j$9$^$9\e(B")
+ ("Prevent miss-operation in the command buffer." . "\e$B%3%^%s%I%P%C%U%!$G$N8mA`:n$rKI$0\e(B")
+ ("Previous Channel" . "\e$BA0$N%A%c%s%M%k\e(B")
+ ("Quit IRC" . "IRC \e$B$r$d$a$k\e(B")
+ ("Really quit IRC? " . "\e$BK\Ev$K\e(B IRC \e$B$r$d$a$^$9$+\e(B? ")
+ ("Really want to query LIST without argument? " . "\e$BK\Ev$K0z?t$J$7$N\e(B LIST \e$B$rH/9T$7$^$9$+\e(B? ")
+ ("Really want to query NAMES without argument? " . "\e$BK\Ev$K0z?t$J$7$N\e(B NAMES \e$B$rH/9T$7$^$9$+\e(B? ")
+ ("Really want to query WHO without argument? " . "\e$BK\Ev$K0z?t$J$7$N\e(B WHO \e$B$rH/9T$7$^$9$+\e(B? ")
+ ("Receiving %s from %s...(%s/%s)" . "%s \e$B$r\e(B %s \e$B$+$i<u?.Cf\e(B...(%s/%s)")
+ ("Receiving %s from %s...done" . "%s \e$B$r\e(B %s \e$B$+$i<u?.Cf\e(B...\e$B40N;\e(B")
+ ("Recent messages of the day:\n" . "\e$B:G6a$N%a%C%;!<%8\e(B (\e$B:#F|Cf\e(B):\n")
+ ("Recent messages up to %d lines:\n" . "\e$B:G6a$N%a%C%;!<%8\e(B (%d \e$B9T$^$G\e(B):\n")
+ ("Redraw Layout" . "\e$B2hLL$N:FIA2h\e(B")
+ ("Remove SKK's preedit mark before sending messages." . "SKK \e$B$NJQ49A0J8;zNs$rAw$i$J$$$h$&$K$9$k\e(B")
+ ("Save IRC logs." . "\e$B%m%0$rJ]B8\e(B")
+ ("Save as (default %s) " . "\e$BJ]B8@h\e(B (\e$B4{DjCM\e(B %s) ")
+ ("Saving %s..." . "%s \e$B$rJ]B8$7$F$$$^$9\e(B...")
+ ("Saving %s...done" . "%s \e$B$rJ]B8$7$F$$$^$9\e(B...\e$B40N;\e(B")
+ ("Search keywords by Google." . "\e$B%-!<%o!<%I$r\e(B Google \e$B$G8!:w\e(B")
+ ("Send your status to Twitter." . "Twitter \e$B$K%9%F!<%?%9>pJs$rAw$k\e(B")
+ ("Sending %s...(%s/%d)" . "%s \e$B$rAw?.Cf\e(B...(%s/%d)")
+ ("Sending %s...done" . "%s \e$B$rAw?.Cf\e(B...\e$B40N;\e(B")
+ ("Sending QUIT to \"%s\"..." . "\"%s\" \e$B$K\e(B QUIT \e$B$rAw?.$7$F$$$^$9\e(B...")
+ ("Sending QUIT to \"%s\"...done" . "\"%s\" \e$B$K\e(B QUIT \e$B$rAw?.$7$F$$$^$9\e(B...\e$B40N;\e(B")
+ ("Sending QUIT..." . "QUIT \e$B$rAw?.$7$F$$$^$9\e(B...")
+ ("Sending QUIT...done" . "QUIT \e$B$rAw?.$7$F$$$^$9\e(B...\e$B40N;\e(B")
+ ("Server: " . "\e$B%5!<%P\e(B: ")
+ ("Servers" . "\e$B%5!<%P0lMw\e(B")
+ ("Set +o for users" . "+o \e$B$9$k%f!<%6\e(B")
+ ("Set +v for users" . "+v \e$B$9$k%f!<%6\e(B")
+ ("Set Channel Topic" . "\e$B%A%c%s%M%k$N%H%T%C%/\e(B")
+ ("Set topic: " . "\e$B?7$7$$%H%T%C%/\e(B: ")
+ ("Setup Riece's command menus." . "\e$B%a%K%e!<%P!<$NMxMQ\e(B")
+ ("Submit Bug Report" . "\e$B%P%0$rJs9p\e(B")
+ ("Switch To Channel" . "\e$B%A%c%s%M%k$K0\F0\e(B")
+ ("Switch to channel/user: " . "\e$B0\F0@h$N%A%c%s%M%k$^$?$O%f!<%6\e(B: ")
+ ("Switch to number: " . "\e$B0\F0@h$NHV9f\e(B: ")
+ ("Toggle..." . "\e$B%H%0%k\e(B...")
+ ("Topic by %s: %s\n" . "%s \e$B$K$h$k%H%T%C%/@_Dj\e(B: %s\n")
+ ("Topic for %s: %s" . "%s \e$B$N%H%T%C%/\e(B: ")
+ ("Topic on %s by %s: %s" . "%s \e$B$N%H%T%C%/$,\e(B %s \e$B$K$h$j@_Dj$5$l$^$7$?\e(B: %s")
+ ("Topic: " . "\e$B%H%T%C%/\e(B: ")
+ ("Translate messages." . "\e$B%a%C%;!<%8$NK]Lu\e(B")
+ ("Type \\[describe-mode] for help" . "\e$B%X%k%W$r8+$k$K$O\e(B \\[describe-mode]")
+ ("Type \\[riece-command-dcc-receive] to receive" . "\e$B<u?.$9$k$K$O\e(B \\[riece-command-dcc-receive]")
+ ("Type \\[riece-command-join] to join the channel" . "\e$B%A%c%s%M%k$K;22C$9$k$K$O\e(B \\[riece-command-join]")
+ ("Unset +o for users" . "-o \e$B$9$k%f!<%6\e(B")
+ ("Unset +v for users" . "-v \e$B$9$k%f!<%6\e(B")
+ ("Use Riece only on the minibuffer." . "\e$B%_%K%P%C%U%!$@$1$G\e(B Riece \e$B$r;H$&\e(B")
+ ("User: " . "\e$B%f!<%6\e(B: ")
+ ("Version" . "\e$B%P!<%8%g%s\e(B")
+ ("WHO pattern: " . "WHO \e$B$N%Q%?!<%s\e(B: ")
+ ("[Available modes: " . "[\e$B;HMQ2DG=$J%b!<%I\e(B: ")
+ ("days" . "\e$BF|\e(B")
+ ("hours" . "\e$B;~4V\e(B")
+ ("minutes" . "\e$BJ,\e(B")
+ ("on via server %s: %s" . "\e$B%5!<%P\e(B %s \e$B7PM3\e(B: %s")
+ ("seconds" . "\e$BIC\e(B")))
+
+(provide 'riece-mcat-japanese)
+
+;;; riece-mcat-japanese.el ends here
--- /dev/null
+;;; riece-mcat.el --- message catalog -*- lexical-binding: t -*-
+;; Copyright (C) 2007 Daiki Ueno
+
+;; Author: Daiki Ueno <ueno@unixuser.org>
+
+;; 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., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
+
+;;; Code:
+
+(require 'pp)
+
+(defun riece-mcat (string)
+ "Translate STRING in the current language environment."
+ (let ((feature (if (featurep 'mule)
+ (get-language-info current-language-environment
+ 'riece-mcat-feature))))
+ (if feature
+ (progn
+ (require feature)
+ (or (cdr (assoc string
+ (symbol-value
+ (intern (concat (symbol-name feature) "-alist")))))
+ string))
+ string)))
+
+(defun riece-mcat-extract-from-form (form)
+ (if (and form (listp form) (listp (cdr form)))
+ (if (and (= (length form) 2)
+ (eq (car form) 'riece-mcat)
+ (stringp (car (cdr form))))
+ (cdr form)
+ (delq nil (apply #'nconc
+ (mapcar #'riece-mcat-extract-from-form form))))))
+
+(defun riece-mcat-extract (files)
+ (save-excursion
+ (let (message-list pointer)
+ (while files
+ (with-temp-buffer
+ (insert-file-contents (car files))
+ (goto-char (point-min))
+ (while (progn
+ (while (progn (skip-chars-forward " \t\n\f")
+ (looking-at ";"))
+ (forward-line 1))
+ (not (eobp)))
+ (setq message-list
+ (nconc message-list
+ (riece-mcat-extract-from-form
+ (read (current-buffer)))))))
+ (setq files (cdr files)))
+ (setq message-list (sort message-list #'string-lessp)
+ pointer message-list)
+ (while pointer
+ (if (member (car pointer) (cdr pointer))
+ (setcar pointer nil))
+ (setq pointer (cdr pointer)))
+ (delq nil message-list))))
+
+(defun riece-mcat-update (files mcat-file mcat-alist-symbol)
+ "Update MCAT-FILE."
+ (let ((pp-escape-newlines t)
+ alist)
+ (with-current-buffer (find-file-noselect mcat-file)
+ (goto-char (point-min))
+ (if (re-search-forward (concat "^\\s-*(\\(defvar\\|defconst\\)\\s-+"
+ (regexp-quote (symbol-name
+ mcat-alist-symbol)))
+ nil t)
+ (progn
+ (goto-char (match-beginning 0))
+ (save-excursion
+ (eval (read (current-buffer))))
+ (delete-region (point) (progn (forward-sexp) (point))))
+ (set mcat-alist-symbol nil))
+ (setq alist (mapcar (lambda (message)
+ (or (assoc message
+ (symbol-value mcat-alist-symbol))
+ (list message)))
+ (riece-mcat-extract files)))
+ (insert "(defconst " (symbol-name mcat-alist-symbol) "\n '(")
+ (while alist
+ (insert "(" (pp-to-string (car (car alist))) " . "
+ (pp-to-string (cdr (car alist))) ")")
+ (if (cdr alist)
+ (insert "\n "))
+ (setq alist (cdr alist)))
+ (insert "))")
+ (save-buffer))))
+
+(defconst riece-mcat-description "Translate messages.")
+
+(defun riece-mcat-insinuate ()
+ (set-language-info "Japanese" 'riece-mcat-feature 'riece-mcat-japanese))
+
+(defun riece-mcat-uninstall ()
+ (set-language-info "Japanese" 'riece-mcat-feature nil))
+
+(provide 'riece-mcat)
+
+;;; riece-mcat.el ends here
--- /dev/null
+;;; riece-menu.el --- setup menus -*- lexical-binding: t -*-
+;; Copyright (C) 1998-2003 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., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
+
+;;; Commentary:
+
+;; NOTE: This is an add-on module for Riece.
+
+;;; Code:
+
+(require 'riece-options)
+(require 'riece-globals)
+(require 'riece-identity)
+(require 'riece-layout)
+(require 'riece-server)
+(require 'riece-mcat)
+
+(defcustom riece-menu-items
+ (list
+ "Riece"
+ (vector (riece-mcat "Next Channel") 'riece-command-next-channel
+ 'riece-current-channels)
+ (vector (riece-mcat "Previous Channel") 'riece-command-previous-channel
+ 'riece-current-channels)
+ "----"
+ (list (riece-mcat "Channels")
+ :filter 'riece-menu-create-channels-menu)
+ (list (riece-mcat "Servers")
+ :filter 'riece-menu-create-servers-menu)
+ "----"
+ (vector (riece-mcat "Redraw Layout") 'riece-command-configure-windows t)
+ (list (riece-mcat "Change Window Layout...")
+ :filter 'riece-menu-create-layouts-menu)
+ (list (riece-mcat "Toggle...")
+ (vector (riece-mcat "Freeze Channel Buffer")
+ 'riece-command-toggle-freeze t)
+ (vector (riece-mcat "Freeze Channel Buffer Until Next Message")
+ 'riece-command-toggle-own-freeze t)
+ (vector (riece-mcat "Display Channel Buffer")
+ 'riece-command-toggle-channel-buffer-mode t)
+ (vector (riece-mcat "Display Channel List Buffer")
+ 'riece-command-toggle-channel-list-buffer-mode t)
+ (vector (riece-mcat "Display User List Buffer")
+ 'riece-command-toggle-user-list-buffer-mode t))
+ "----"
+ (vector (riece-mcat "Join Channel") 'riece-command-join t)
+ (vector (riece-mcat "Part Channel") 'riece-command-part
+ 'riece-current-channel)
+ (vector (riece-mcat "Set Channel Topic") 'riece-command-topic
+ 'riece-current-channel)
+ (vector (riece-mcat "Kick User") 'riece-command-kick
+ 'riece-current-channel)
+ (vector (riece-mcat "Invite User") 'riece-command-invite
+ 'riece-current-channel)
+ "----"
+ (vector (riece-mcat "Manage Add-ons") 'riece-command-list-addons t)
+ (vector (riece-mcat "Version") 'riece-version t)
+ (vector (riece-mcat "Submit Bug Report") 'riece-submit-bug-report t)
+ "----"
+ (vector (riece-mcat "Mark As Away") 'riece-command-toggle-away t)
+ (vector (riece-mcat "Change Nickname") 'riece-command-change-nickname t)
+ (vector (riece-mcat "Quit IRC") 'riece-command-quit t))
+ "Menu used in command mode."
+ :type 'sexp
+ :group 'riece-options)
+
+(defconst riece-menu-description
+ "Setup Riece's command menus.")
+
+(defun riece-menu-create-layouts-menu (_menu)
+ (mapcar (lambda (entry)
+ (vector (car entry) (list 'riece-command-change-layout (car entry))
+ t))
+ riece-layout-alist))
+
+(defun riece-menu-create-channels-menu (_menu)
+ (delq nil
+ (mapcar (lambda (channel)
+ (if channel
+ (list (riece-format-identity channel)
+ (vector (riece-mcat "Switch To Channel")
+ (list 'riece-command-switch-to-channel
+ channel)
+ t)
+ (vector (riece-mcat "Part Channel")
+ (list 'riece-command-part channel) t)
+ (vector (riece-mcat "List Channel")
+ (list 'riece-command-list
+ (riece-identity-prefix channel)) t))))
+ riece-current-channels)))
+
+(defun riece-menu-create-servers-menu (_menu)
+ (mapcar (lambda (entry)
+ (list (car entry)
+ (vector (riece-mcat "Open Server")
+ (list 'riece-command-open-server (car entry))
+ (not (riece-server-opened (car entry))))
+ (vector (riece-mcat "Close Server")
+ (list 'riece-command-close-server (car entry))
+ (riece-server-opened (car entry)))))
+ riece-server-alist))
+
+(defvar riece-command-mode-map)
+(defvar riece-menu)
+
+(defun riece-menu-command-mode-hook ()
+ (easy-menu-define riece-menu
+ riece-command-mode-map
+ "Riece Menu"
+ riece-menu-items)
+ (easy-menu-add riece-menu))
+
+(defun riece-menu-requires ()
+ (if (memq 'riece-mcat riece-addons)
+ '(riece-mcat)))
+
+(defun riece-menu-insinuate ()
+ (if (fboundp 'custom-reevaluate-setting)
+ (custom-reevaluate-setting 'riece-menu-items)
+ ;; We could emulate custom-reevaluate-setting by manually eval the
+ ;; 'standard-value property of 'riece-menu-items. In that case
+ ;; (i.e. XEmacs 21.4), however, there is no way to render
+ ;; non-ASCII labels in the menu, so give up here.
+ )
+ (if riece-command-buffer
+ (with-current-buffer riece-command-buffer
+ (riece-menu-command-mode-hook)))
+ (add-hook 'riece-command-mode-hook
+ 'riece-menu-command-mode-hook))
+
+(defun riece-menu-uninstall ()
+ (if riece-command-buffer
+ (with-current-buffer riece-command-buffer
+ (easy-menu-remove riece-menu)))
+ (remove-hook 'riece-command-mode-hook
+ 'riece-menu-command-mode-hook))
+
+(provide 'riece-menu)
+
+;;; riece-menu.el ends here
--- /dev/null
+;;; riece-message.el --- generate and display message line -*- lexical-binding: t -*-
+;; Copyright (C) 1999-2003 Daiki Ueno
+
+;; Author: Daiki Ueno <ueno@unixuser.org>
+;; Keywords: message
+
+;; 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., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
+
+;;; Code:
+
+(require 'riece-identity)
+(require 'riece-channel)
+(require 'riece-user)
+(require 'riece-display)
+(require 'riece-misc)
+
+(defgroup riece-message nil
+ "Display messages."
+ :tag "Message"
+ :prefix "riece-"
+ :group 'riece)
+
+(defcustom riece-message-filter-functions nil
+ "Functions to filter incoming messages."
+ :type 'function
+ :group 'riece-message)
+
+(defcustom riece-message-make-open-bracket-function
+ #'riece-message-make-open-bracket
+ "Function which makes `open-bracket' string for each message."
+ :type 'function
+ :group 'riece-message)
+
+(defcustom riece-message-make-close-bracket-function
+ #'riece-message-make-close-bracket
+ "Function which makes `close-bracket' string for each message."
+ :type 'function
+ :group 'riece-message)
+
+(defcustom riece-message-make-name-function
+ #'riece-message-make-name
+ "Function which makes local identity for each message."
+ :type 'function
+ :group 'riece-message)
+
+(defcustom riece-message-make-global-name-function
+ #'riece-message-make-global-name
+ "Function which makes global identity for each message."
+ :type 'function
+ :group 'riece-message)
+
+(defcustom riece-message-format-function-alist nil
+ "Alist mapping message types to format functions."
+ :type 'list
+ :group 'riece-message)
+
+(defun riece-message-make-open-bracket (message)
+ "Make `open-bracket' string for MESSAGE."
+ (if (eq (riece-message-type message) 'notice)
+ "{"
+ (if (riece-message-own-p message)
+ ">"
+ (if (riece-message-private-p message)
+ "="
+ (if (riece-message-external-p message)
+ "("
+ "<")))))
+
+(defun riece-message-make-close-bracket (message)
+ "Make `close-bracket' string for MESSAGE."
+ (if (eq (riece-message-type message) 'notice)
+ "}"
+ (if (riece-message-own-p message)
+ "<"
+ (if (riece-message-private-p message)
+ "="
+ (if (riece-message-external-p message)
+ ")"
+ ">")))))
+
+(defun riece-message-make-name (message)
+ "Make local identity for MESSAGE."
+ (if (riece-message-private-p message)
+ (if (riece-message-own-p message)
+ (riece-format-identity (riece-message-target message) t)
+ (riece-format-identity (riece-message-speaker message) t))
+ (riece-format-identity (riece-message-speaker message) t)))
+
+(defun riece-message-make-global-name (message)
+ "Make global identity for MESSAGE."
+ (if (riece-message-private-p message)
+ (if (riece-message-own-p message)
+ (riece-format-identity (riece-message-target message) t)
+ (riece-format-identity (riece-message-speaker message) t))
+ (concat (riece-format-identity (riece-message-target message) t) ":"
+ (riece-format-identity (riece-message-speaker message) t))))
+
+(defun riece-message-buffer (message)
+ "Return the buffer where MESSAGE should appear."
+ (let ((target (if (riece-message-private-p message)
+ (if (riece-message-own-p message)
+ (riece-message-target message)
+ (riece-message-speaker message))
+ (riece-message-target message))))
+ (unless (riece-identity-member target riece-current-channels)
+ (riece-join-channel target)
+ ;; If you are not joined to any channel,
+ ;; switch to the target immediately.
+ (unless riece-current-channel
+ (riece-switch-to-channel target)))
+ (riece-channel-buffer target)))
+
+(defun riece-message-parent-buffers (message buffer)
+ "Return the parents of BUFFER where MESSAGE should appear.
+Normally they are *Dialogue* and/or *Others*."
+ (if (and buffer (riece-frozen buffer)) ;the message might not be
+ ;visible in buffer's window
+ (list riece-dialogue-buffer riece-others-buffer)
+ (if (and riece-current-channel ;the message is not sent to
+ ;the current channel
+ (if (riece-message-private-p message)
+ (if (riece-message-own-p message)
+ (not (riece-identity-equal
+ (riece-message-target message)
+ riece-current-channel))
+ (not (riece-identity-equal
+ (riece-message-speaker message)
+ riece-current-channel)))
+ (not (riece-identity-equal
+ (riece-message-target message)
+ riece-current-channel))))
+ (list riece-dialogue-buffer riece-others-buffer)
+ riece-dialogue-buffer)))
+
+(defun riece-format-message-1 (message &optional global)
+ (let ((open-bracket
+ (funcall riece-message-make-open-bracket-function message))
+ (close-bracket
+ (funcall riece-message-make-close-bracket-function message))
+ (name
+ (if global
+ (funcall riece-message-make-global-name-function message)
+ (funcall riece-message-make-name-function message)))
+ (server-name (riece-identity-server (riece-message-speaker message))))
+ (riece-with-server-buffer server-name
+ (concat
+ (if global
+ (riece-concat-server-name
+ (concat open-bracket name close-bracket
+ " " (riece-message-text message)))
+ (concat open-bracket name close-bracket
+ " " (riece-message-text message)))
+ "\n"))))
+
+(defun riece-format-message (message &optional global)
+ (funcall (or (cdr (assq (riece-message-type message)
+ riece-message-format-function-alist))
+ #'riece-format-message-1)
+ message global))
+
+(defun riece-display-message-1 (message)
+ (let ((buffer (riece-message-buffer message))
+ parent-buffers)
+ (when (and buffer
+ (riece-message-own-p message)
+ (riece-own-frozen buffer))
+ (with-current-buffer buffer
+ (setq riece-freeze nil))
+ (riece-emit-signal 'buffer-freeze-changed buffer nil))
+ (setq parent-buffers (riece-message-parent-buffers message buffer))
+ (riece-insert buffer (riece-format-message message))
+ (riece-insert parent-buffers (riece-format-message message t))
+ (with-current-buffer buffer
+ (run-hook-with-args 'riece-after-display-message-functions message))))
+
+(defun riece-display-message (message)
+ "Display MESSAGE object."
+ (let ((functions riece-message-filter-functions))
+ (setq message (copy-sequence message))
+ (while (and functions message)
+ (setq message (funcall (car functions) message)
+ functions (cdr functions)))
+ (if message
+ (riece-display-message-1 message))))
+
+(defun riece-make-message (speaker target text &optional type own-p)
+ "Make an instance of message object.
+Arguments are appropriate to the sender, the receiver, and text
+content, respectively.
+Optional 4th argument TYPE specifies the type of the message.
+Currently possible values are `nil' or `notice'.
+Optional 5th argument is the flag to indicate that this message is not
+from the network."
+ (vector speaker target text type own-p))
+
+(defun riece-message-speaker (message)
+ "Return the sender of MESSAGE."
+ (aref message 0))
+
+(defun riece-message-target (message)
+ "Return the receiver of MESSAGE."
+ (aref message 1))
+
+(defun riece-message-text (message)
+ "Return the text part of MESSAGE."
+ (aref message 2))
+
+(defun riece-message-type (message)
+ "Return the type of MESSAGE.
+Currently possible values are `action' and `notice'."
+ (aref message 3))
+
+(defun riece-message-own-p (message)
+ "Return t if MESSAGE is not from the network."
+ (aref message 4))
+
+(defun riece-message-set-speaker (message speaker)
+ "Set the sender of MESSAGE."
+ (aset message 0 speaker))
+
+(defun riece-message-set-target (message target)
+ "Set the receiver of MESSAGE."
+ (aset message 1 target))
+
+(defun riece-message-set-text (message text)
+ "Set the text part of MESSAGE."
+ (aset message 2 text))
+
+(defun riece-message-set-type (message type)
+ "Set the type of MESSAGE.
+Currently possible values are `action' and `notice'."
+ (aset message 3 type))
+
+(defun riece-message-set-own-p (message own-p)
+ "Set t if MESSAGE is not from the network."
+ (aset message 4 own-p))
+
+(defun riece-message-private-p (message)
+ "Return t if MESSAGE is a private message."
+ (not (or (riece-channel-p (riece-identity-prefix
+ (riece-message-speaker message)))
+ (riece-channel-p (riece-identity-prefix
+ (riece-message-target message))))))
+
+(defun riece-message-external-p (message)
+ "Return t if MESSAGE is from outside the channel."
+ (not (riece-identity-member
+ (riece-message-speaker message)
+ (let ((target (riece-message-target message)))
+ (riece-with-server-buffer (riece-identity-server target)
+ (mapcar
+ (lambda (user)
+ (riece-make-identity (car user) riece-server-name))
+ (riece-channel-get-users (riece-identity-prefix target))))))))
+
+(provide 'riece-message)
+
+;;; riece-message.el ends here
--- /dev/null
+;;; riece-mini.el --- use Riece only on the minibuffer -*- lexical-binding: t -*-
+;; Copyright (C) 2003 OHASHI Akira
+
+;; Author: OHASHI Akira <bg66@koka-in.org>
+;; 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., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
+
+;;; Commentary:
+
+;; NOTE: This is an add-on module for Riece.
+
+;; This add-on shows arrival messages to minibuffer. And you can send
+;; message using minibuffer.
+;;
+;; By using this add-on, you can use always "mini riece", even if you
+;; are visiting other buffers.
+
+;; To use, add the following line to your ~/.riece/init.el:
+;; (add-to-list 'riece-addons 'riece-mini)
+;;
+;; For using conveniently, bind any global key to
+;; `riece-mini-send-message' and `riece-mini-show-backlog'.
+;; For example:
+;; (global-set-key "\C-cm" 'riece-mini-send-message)
+;; (global-set-key "\C-cb" 'riece-mini-show-backlog)
+
+;;; Code:
+
+(require 'riece-message)
+(require 'riece-biff)
+
+(defgroup riece-mini nil
+ "Use Riece only on the minibuffer."
+ :group 'riece)
+
+(defcustom riece-mini-backlog-size 5
+ "*Line numbers for logging back log."
+ :type 'integer
+ :group 'riece-mini)
+
+(defvar riece-mini-last-channel nil)
+(defvar riece-mini-backlog-history nil)
+(defvar riece-mini-backlog-shown nil)
+
+(defconst riece-mini-description
+ "Use Riece only on the minibuffer.")
+
+(defun riece-mini-message-no-log (string &rest args)
+ "Like `message', except that message logging is disabled."
+ (if (featurep 'xemacs)
+ (if args
+ (display-message 'no-log (apply #'format string args))
+ (display-message 'no-log string))
+ (let (message-log-max)
+ (apply #'message string args))))
+
+(defun riece-mini-display-message-function (message)
+ "Show arrival messages to minibuffer."
+ (let ((string (concat (format-time-string "%H:%M") " "
+ (riece-format-message message t))))
+ (when (string-match "\\(.*\\)$" string)
+ (setq string (riece-match-string-no-properties 1 string)))
+ (while (>= (length riece-mini-backlog-history)
+ riece-mini-backlog-size)
+ (setq riece-mini-backlog-history
+ (cdr riece-mini-backlog-history)))
+ (setq riece-mini-backlog-history
+ (reverse (cons string (reverse riece-mini-backlog-history))))
+ (when (and (get 'riece-mini 'riece-addon-enabled)
+ (not (or (eq (window-buffer (selected-window))
+ (get-buffer riece-command-buffer))
+ (riece-message-own-p message)
+ (active-minibuffer-window))))
+ (unless (riece-message-type message)
+ (setq riece-mini-last-channel (riece-message-target message)))
+ (riece-mini-message-no-log "%s" string))))
+
+(defun riece-mini-send-message (arg)
+ "Send message using minibuffer.
+Prefix argument onece (C-u), send message to last received channel.
+If twice (C-u C-u), then ask the channel."
+ (interactive "P")
+ (let* ((completion-ignore-case t)
+ (target
+ (cond
+ ((equal arg '(16))
+ (riece-completing-read-identity
+ "Channel/User: " riece-current-channels nil t))
+ (arg (or riece-mini-last-channel riece-current-channel))
+ (t riece-current-channel)))
+ (message (read-string (format "Message to %s: "
+ (riece-format-identity target)))))
+ (unless (equal message "")
+ (riece-switch-to-channel target)
+ (riece-send-string
+ (format "PRIVMSG %s :%s\r\n"
+ (riece-identity-prefix target)
+ message))
+ (riece-display-message
+ (riece-make-message (riece-current-nickname) target
+ message nil t)))))
+
+(defun riece-mini-show-backlog ()
+ "Send back logs to minibuffer."
+ (interactive)
+ (when riece-mini-backlog-history
+ (let ((height (1+ riece-mini-backlog-size)))
+ (mapc #'(lambda (string)
+ (setq height (+ height
+ (/ (string-width string) (window-width)))))
+ riece-mini-backlog-history)
+ (let ((max-mini-window-height height)
+ (resize-mini-windows t))
+ (setq riece-mini-backlog-shown t)
+ (when (and (memq 'riece-biff riece-addons)
+ (get 'riece-biff 'riece-addon-enabled))
+ (riece-biff-clear))
+ (riece-mini-message-no-log
+ "%s" (mapconcat #'identity riece-mini-backlog-history "\n"))))))
+
+(defun riece-mini-pre-command ()
+ (when riece-mini-backlog-shown
+ (let ((resize-mini-windows t))
+ (setq riece-mini-backlog-shown nil)
+ (riece-mini-message-no-log ""))))
+
+(defun riece-mini-requires ()
+ (if (memq 'riece-biff riece-addons)
+ '(riece-biff)))
+
+(defun riece-mini-insinuate ()
+ (add-hook 'riece-after-display-message-functions
+ 'riece-mini-display-message-function)
+ (add-hook 'pre-command-hook 'riece-mini-pre-command))
+
+(defun riece-mini-uninstall ()
+ (remove-hook 'riece-after-display-message-functions
+ 'riece-mini-display-message-function)
+ (remove-hook 'pre-command-hook 'riece-mini-pre-command))
+
+(provide 'riece-mini)
+
+;;; riece-mini.el ends here
--- /dev/null
+;;; riece-misc.el --- miscellaneous functions (not inlined) -*- lexical-binding: t -*-
+;; Copyright (C) 1998-2003 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., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
+
+;;; Code:
+
+(require 'riece-options)
+(require 'riece-coding)
+(require 'riece-identity)
+(require 'riece-version)
+(require 'riece-channel)
+(require 'riece-server)
+(require 'riece-user)
+(require 'riece-mode)
+(require 'riece-cache)
+
+(defun riece-get-buffer-create (name &optional init-major-mode)
+ (let ((buffer (get-buffer name)))
+ (unless (and buffer
+ (or (null init-major-mode)
+ (eq (with-current-buffer buffer
+ major-mode)
+ init-major-mode)))
+ (setq buffer (generate-new-buffer name)))
+ (unless (memq buffer riece-buffer-list)
+ (setq riece-buffer-list (cons buffer riece-buffer-list)))
+ buffer))
+
+(defun riece-scan-property-region (property start end function)
+ (catch 'done
+ (while t
+ ;; Search for the beginning of the property region.
+ (unless (get-text-property start property)
+ (setq start (next-single-property-change start property nil end)))
+ (if (= start end)
+ (throw 'done nil))
+ ;; Search for the end of the property region.
+ (let ((region-end (next-single-property-change start property nil end)))
+ (if (= region-end end)
+ (throw 'done nil))
+ (funcall function start region-end)
+ (setq start region-end)))))
+
+(defun riece-insert (buffers string)
+ (unless (listp buffers)
+ (setq buffers (list buffers)))
+ (while buffers
+ (run-hooks 'riece-before-insert-functions)
+ (with-current-buffer (car buffers)
+ (let ((inhibit-read-only t)
+ buffer-read-only
+ start
+ window
+ point)
+ ;; Save the current for the case when (car buffers) is the
+ ;; currently selected buffer.
+ (save-excursion
+ (setq start (goto-char (point-max)))
+ (insert (format-time-string "%H:%M") " " string)
+ (setq point (point)))
+ (if (and (not (riece-frozen (current-buffer)))
+ (setq window (get-buffer-window (current-buffer)))
+ (not (pos-visible-in-window-p point window)))
+ (save-excursion ;save-selected-window changes
+ ;current buffer
+ (save-selected-window
+ (select-window window)
+ (goto-char point) ;select-window changes current point
+ (recenter riece-window-center-line))))
+ (run-hook-with-args 'riece-after-insert-functions start point)))
+ (setq buffers (cdr buffers))))
+
+(defun riece-insert-change (buffer message)
+ (riece-insert buffer (concat riece-change-prefix message)))
+
+(defun riece-insert-notice (buffer message)
+ (riece-insert buffer (concat riece-notice-prefix message)))
+
+(defun riece-insert-wallops (buffer message)
+ (riece-insert buffer (concat riece-wallops-prefix message)))
+
+(defun riece-insert-error (buffer message)
+ (riece-insert buffer (concat riece-error-prefix message)))
+
+(defun riece-insert-info (buffer message)
+ (riece-insert buffer (concat riece-info-prefix message)))
+
+(defun riece-frozen (buffer)
+ (with-current-buffer buffer
+ riece-freeze))
+
+(defun riece-own-frozen (buffer)
+ (with-current-buffer buffer
+ (eq riece-freeze 'own)))
+
+(defun riece-channel-p (string)
+ "Return t if STRING is a channel.
+\(i.e. it matches `riece-channel-regexp')"
+ (string-match (concat "^" riece-channel-regexp) string))
+
+(defun riece-user-p (string)
+ "Return t if STRING is a user.
+\(i.e. it matches `riece-user-regexp')"
+ (string-match (concat "^" riece-user-regexp) string))
+
+(defun riece-current-nickname ()
+ "Return the current nickname."
+ (riece-with-server-buffer (riece-current-server-name)
+ (if riece-real-nickname
+ (riece-make-identity riece-real-nickname riece-server-name))))
+
+(defun riece-split-parameters (string)
+ (if (eq ?: (aref string 0))
+ (list (substring string 1))
+ (let (parameters)
+ (catch 'done
+ (while (string-match "^\\([^ ]+\\) +" string)
+ (setq parameters (nconc parameters (list (match-string 1 string)))
+ string (substring string (match-end 0)))
+ (when (and (not (equal "" string)) (eq ?: (aref string 0)))
+ (setq string (substring string 1)
+ parameters (nconc parameters (list string)))
+ (throw 'done nil)))
+ (or (equal "" string)
+ (setq parameters (nconc parameters (list string)))))
+ parameters)))
+
+(defun riece-concat-channel-topic (target string)
+ (riece-with-server-buffer (riece-identity-server target)
+ (let ((topic (riece-channel-get-topic (riece-identity-prefix target))))
+ (if (or (null topic)
+ (equal topic ""))
+ string
+ (concat string ": " topic)))))
+
+(defun riece-concat-channel-modes (target string)
+ (riece-with-server-buffer (riece-identity-server target)
+ (let ((modes (riece-channel-get-modes (riece-identity-prefix target))))
+ (if modes
+ (concat string " ["
+ (mapconcat
+ (lambda (mode)
+ (if (riece-mode-parameter mode)
+ (format "%c(%s)"
+ (riece-mode-flag mode)
+ (riece-mode-parameter mode))
+ (char-to-string (riece-mode-flag mode))))
+ modes "")
+ "]")
+ string))))
+
+(defun riece-concat-message (string message)
+ (if (or (null message)
+ (equal message ""))
+ string
+ (concat string " (" message ")")))
+
+(defun riece-concat-server-name (string)
+ (if (equal riece-server-name "")
+ string
+ (let ((server-name (concat " (from " riece-server-name ")")))
+ (put-text-property 0 (length server-name)
+ 'riece-server-name riece-server-name
+ server-name)
+ (concat string server-name))))
+
+(defun riece-concat-user-status (status string)
+ (if status
+ (concat string " [" (mapconcat #'identity status ", ") "]")
+ string))
+
+(defun riece-prefix-user-at-host (prefix)
+ (if (string-match "!" prefix)
+ (substring prefix (match-end 0))
+ prefix))
+
+(defun riece-prefix-nickname (prefix)
+ (if (string-match "!" prefix)
+ (substring prefix 0 (match-beginning 0))
+ prefix))
+
+(defun riece-parse-user-at-host (user-at-host)
+ (if (memq (aref user-at-host 0) '(?^ ?= ?~ ?- ?+))
+ (progn
+ (if (memq (aref user-at-host 0) '(?^ ?=))
+ (setq riece-user-at-host-type 'fake)
+ (if (memq (aref user-at-host 0) '(?~ ?-))
+ (setq riece-user-at-host-type 'not-verified)
+ (if (eq (aref user-at-host 0) ?+)
+ (setq riece-user-at-host-type 'ok))))
+ (substring user-at-host 1))
+ (setq riece-user-at-host-type 'ok)
+ user-at-host))
+
+(defun riece-strip-user-at-host (user-at-host)
+ (if (memq (aref user-at-host 0) '(?^ ?= ?~ ?- ?+))
+ (substring user-at-host 1)
+ user-at-host))
+
+(defun riece-get-users-on-server (server-name)
+ (riece-with-server-buffer server-name
+ (let (identities)
+ (mapatoms
+ (lambda (user)
+ (setq identities
+ (cons (riece-make-identity (symbol-name user) server-name)
+ identities)))
+ (riece-cache-hash-obarray riece-user-cache))
+ identities)))
+
+(defun riece-get-channels-on-server (server-name)
+ (riece-with-server-buffer server-name
+ (let (identities)
+ (mapatoms
+ (lambda (channel)
+ (setq identities
+ (cons (riece-make-identity (symbol-name channel) server-name)
+ identities)))
+ (riece-cache-hash-obarray riece-channel-cache))
+ identities)))
+
+(defun riece-get-identities-on-server (server-name)
+ (nconc (riece-get-channels-on-server server-name)
+ (riece-get-users-on-server server-name)))
+
+(defun riece-check-channel-commands-are-usable (&optional channel)
+ (unless riece-current-channel
+ (error (substitute-command-keys
+ "Type \\[riece-command-join] to join a channel")))
+ (if (and channel
+ (not (riece-channel-p (riece-identity-prefix
+ riece-current-channel))))
+ (error "Not on a channel")))
+
+(provide 'riece-misc)
+
+;;; riece-misc.el ends here
--- /dev/null
+;;; riece-mode.el --- functions for manipulating channel/user modes -*- lexical-binding: t -*-
+;; Copyright (C) 1998-2003 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., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
+
+;;; Code:
+
+(defun riece-parse-modes (string)
+ (let ((start 0)
+ result)
+ (while (and (string-match "[-+]\\([^-+ ]*\\) *" string start)
+ (= (match-beginning 0) start))
+ (let ((toggle (eq (aref string start) ?+))
+ (modes (string-to-list (match-string 1 string))))
+ (setq start (match-end 0))
+ (while modes
+ (if (and (string-match "\\([^-+][^ ]*\\) *" string start)
+ (= (match-beginning 0) start))
+ (setq start (match-end 0)
+ result (cons (list (riece-make-mode
+ (car modes) (match-string 1 string))
+ toggle)
+ result))
+ (setq result (cons (list (riece-make-mode (car modes))
+ toggle)
+ result)))
+ (setq modes (cdr modes)))))
+ (nreverse result)))
+
+(defun riece-mode-assoc (flag modes)
+ "Return a mode object matched with FLAG in MODES."
+ (catch 'found
+ (while modes
+ (if (eq flag (riece-mode-flag (car modes)))
+ (throw 'found (car modes)))
+ (setq modes (cdr modes)))))
+
+(defun riece-make-mode (flag &optional parameter)
+ "Make an instance of mode object.
+Arguments are appropriate to the flag and the parameter."
+ (vector flag parameter))
+
+(defun riece-mode-flag (mode)
+ "Return the flag of MODE."
+ (aref mode 0))
+
+(defun riece-mode-parameter (mode)
+ "Return the parameter of MODE."
+ (aref mode 1))
+
+(provide 'riece-mode)
+
+;;; riece-mode.el ends here
--- /dev/null
+;;; riece-naming.el --- toplevel naming management -*- lexical-binding: t -*-
+;; Copyright (C) 1998-2003 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., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
+
+;;; Code:
+
+(require 'riece-globals)
+(require 'riece-channel)
+(require 'riece-user)
+(require 'riece-signal)
+
+(defun riece-naming-assert-join (user-name channel-name)
+ (riece-user-toggle-channel user-name channel-name t)
+ (riece-channel-toggle-user channel-name user-name t)
+ (riece-emit-signal 'user-joined-channel
+ (riece-make-identity user-name
+ riece-server-name)
+ (riece-make-identity channel-name
+ riece-server-name)))
+
+(defun riece-naming-assert-part (user-name channel-name)
+ (riece-user-toggle-channel user-name channel-name nil)
+ (riece-channel-toggle-user channel-name user-name nil)
+ (riece-channel-toggle-operator channel-name user-name nil)
+ (riece-channel-toggle-speaker channel-name user-name nil)
+ (riece-emit-signal 'user-left-channel
+ (riece-make-identity user-name
+ riece-server-name)
+ (riece-make-identity channel-name
+ riece-server-name)))
+
+(defun riece-naming-assert-rename (old-name new-name)
+ (if (riece-identity-equal-no-server old-name riece-real-nickname)
+ (setq riece-last-nickname riece-real-nickname
+ riece-real-nickname new-name))
+ (let* ((old (riece-get-user old-name))
+ (channels (riece-user-channels old))
+ users user)
+ (while channels
+ (setq users (riece-channel-get-users (car channels))
+ user (riece-identity-assoc old-name users t))
+ (if user
+ (setcar user new-name))
+ (setq channels (cdr channels)))
+ (riece-rename-user old-name new-name))
+ (riece-emit-signal 'user-renamed
+ (riece-make-identity old-name riece-server-name)
+ (riece-make-identity new-name riece-server-name)))
+
+(defun riece-naming-assert-channel-users (users channel-name)
+ (let ((channel-identity (riece-make-identity channel-name
+ riece-server-name))
+ (pointer users))
+ (while pointer
+ (riece-user-toggle-channel (car (car pointer)) channel-name t)
+ (riece-channel-toggle-user channel-name (car (car pointer)) t)
+ (if (memq ?o (cdr (car pointer)))
+ (riece-channel-toggle-operator channel-name (car (car pointer)) t)
+ (if (memq ?v (cdr (car pointer)))
+ (riece-channel-toggle-speaker channel-name (car (car pointer)) t)
+ (riece-channel-toggle-operator channel-name (car (car pointer)) nil)
+ (riece-channel-toggle-speaker channel-name (car (car pointer)) nil)))
+ (setq pointer (cdr pointer)))
+ ;; Remove nonexistent users.
+ (setq pointer (riece-channel-users (riece-get-channel channel-name)))
+ (while pointer
+ (unless (assoc (car (car pointer)) users)
+ (riece-user-toggle-channel (car (car pointer)) channel-name nil)
+ (riece-channel-toggle-user channel-name (car (car pointer)) nil))
+ (setq pointer (cdr pointer)))
+ (riece-emit-signal 'user-list-changed channel-identity)))
+
+(defun riece-naming-assert-channel-modes (channel modes)
+ (while modes
+ (cond
+ ((eq (riece-mode-flag (car (car modes))) ?o)
+ (riece-channel-toggle-operator channel
+ (riece-mode-parameter (car (car modes)))
+ (nth 1 (car modes)))
+ (riece-emit-signal 'channel-operators-changed
+ (riece-make-identity channel
+ riece-server-name)
+ (riece-make-identity (riece-mode-parameter
+ (car (car modes)))
+ riece-server-name)
+ (nth 1 (car modes))))
+ ((eq (riece-mode-flag (car (car modes))) ?v)
+ (riece-channel-toggle-speaker channel
+ (riece-mode-parameter (car (car modes)))
+ (nth 1 (car modes)))
+ (riece-emit-signal 'channel-speakers-changed
+ (riece-make-identity channel
+ riece-server-name)
+ (riece-make-identity (riece-mode-parameter
+ (car (car modes)))
+ riece-server-name)
+ (nth 1 (car modes))))
+ ((eq (riece-mode-flag (car (car modes))) ?b)
+ (riece-channel-toggle-banned channel
+ (riece-mode-parameter (car (car modes)))
+ (nth 1 (car modes))))
+ ((eq (riece-mode-flag (car (car modes))) ?e)
+ (riece-channel-toggle-uninvited channel
+ (riece-mode-parameter (car (car modes)))
+ (nth 1 (car modes))))
+ ((eq (riece-mode-flag (car (car modes))) ?I)
+ (riece-channel-toggle-invited channel
+ (riece-mode-parameter (car (car modes)))
+ (nth 1 (car modes))))
+ (t
+ (apply #'riece-channel-toggle-mode channel (car modes))))
+ (setq modes (cdr modes)))
+ (riece-emit-signal 'channel-modes-changed
+ (riece-make-identity channel riece-server-name)))
+
+(provide 'riece-naming)
+
+;;; riece-naming.el ends here
--- /dev/null
+;;; riece-ndcc.el --- DCC file sending protocol support (written in elisp) -*- lexical-binding: t -*-
+;; Copyright (C) 1998-2003 Daiki Ueno
+
+;; Author: Daiki Ueno <ueno@unixuser.org>
+;; 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., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
+
+;;; Commentary:
+
+;; NOTE: This is an add-on module for Riece.
+
+;;; Code:
+
+(require 'riece-globals)
+(require 'riece-options)
+
+(defgroup riece-ndcc nil
+ "DCC written in elisp."
+ :prefix "riece-"
+ :group 'riece)
+
+(defcustom riece-ndcc-server-address "127.0.0.1"
+ "Local address of the DCC server.
+Only used for sending files."
+ :type 'vector
+ :group 'riece-ndcc)
+
+(defvar riece-ndcc-requests nil)
+
+(defvar riece-ndcc-request-user nil)
+(defvar riece-ndcc-request-size nil)
+
+(defconst riece-ndcc-description
+ "DCC file sending protocol support (written in elisp.)")
+
+(defun riece-ndcc-encode-address (address)
+ (unless (string-match
+ "^\\([0-9]+\\)\\.\\([0-9]+\\)\\.\\([0-9]+\\)\\.\\([0-9]+\\)$"
+ address)
+ (error "% is not an IP address" address))
+ (let ((string (number-to-string
+ (+ (* (float (string-to-number (match-string 1 address)))
+ 16777216)
+ (* (float (string-to-number (match-string 2 address)))
+ 65536)
+ (* (float (string-to-number (match-string 3 address)))
+ 256)
+ (float (string-to-number (match-string 4 address)))))))
+ (if (string-match "\\." string)
+ (substring string 0 (match-beginning 0))
+ string)))
+
+(defun riece-ndcc-decode-address (address)
+ (let ((float-address (string-to-number (concat address ".0"))))
+ (format "%d.%d.%d.%d"
+ (floor (mod (/ float-address 16777216) 256))
+ (floor (mod (/ float-address 65536) 256))
+ (floor (mod (/ float-address 256) 256))
+ (floor (mod float-address 256)))))
+
+(defun riece-ndcc-server-sentinel (process status)
+ (when (string-match "^open from " status)
+ (let ((parent-name
+ (if (string-match " <[^>]+>$" (process-name process))
+ (substring (process-name process) 0 (match-beginning 0)))))
+ (save-excursion
+ (set-buffer (process-buffer (get-process parent-name)))
+ (goto-char (point-min))
+ (while (not (eobp))
+ (process-send-region process
+ (point)
+ (goto-char (min (+ 1024 (point)) (point-max))))
+ (message "Sending %s...(%d/%d)"
+ (buffer-file-name) (1- (point)) (buffer-size)))
+ (message "Sending %s...done"
+ (buffer-file-name)))
+ (kill-buffer (process-buffer (get-process parent-name))))
+ (kill-buffer (process-buffer process))))
+
+(defun riece-command-dcc-send (user file)
+ (interactive
+ (let ((completion-ignore-case t))
+ (unless riece-ndcc-server-address
+ (error "Set riece-ndcc-server-address to your host"))
+ (list (riece-completing-read-identity
+ "User: "
+ (riece-get-users-on-server (riece-current-server-name)))
+ (expand-file-name (read-file-name "File: ")))))
+ (let* (selective-display
+ (coding-system-for-read 'binary)
+ format-alist
+ jka-compr-compression-info-list
+ (buffer (find-file-noselect file))
+ process)
+ (with-current-buffer buffer ;To throw an error when the
+ (setq buffer-read-only t)) ;process has input.
+ (setq process (make-network-process :name "DCC" :buffer buffer
+ :host riece-ndcc-server-address
+ :server t :service t
+ :coding 'binary
+ :sentinel 'riece-ndcc-server-sentinel))
+ (riece-send-string
+ (format "PRIVMSG %s :\1DCC SEND %s %s %d %d\1\r\n"
+ (riece-identity-prefix user)
+ (file-name-nondirectory file)
+ (riece-ndcc-encode-address riece-ndcc-server-address)
+ (nth 1 (process-contact process))
+ (nth 7 (file-attributes file))))))
+
+(defun riece-ndcc-filter (process input)
+ (save-excursion
+ (set-buffer (process-buffer process))
+ (goto-char (point-max))
+ (insert input)
+ (message "Receiving %s from %s...(%d/%d)"
+ (file-name-nondirectory buffer-file-name)
+ riece-ndcc-request-user
+ (1- (point))
+ riece-ndcc-request-size)))
+
+(defun riece-ndcc-sentinel (process status)
+ (save-excursion
+ (set-buffer (process-buffer process))
+ (unless (= (buffer-size) riece-ndcc-request-size)
+ (error "Premature end of file"))
+ (message "Receiving %s from %s...done"
+ (file-name-nondirectory buffer-file-name)
+ riece-ndcc-request-user)
+ (let ((coding-system-for-write 'binary))
+ (save-buffer))))
+
+(defun riece-command-dcc-receive (request file)
+ (interactive
+ (progn
+ (unless riece-ndcc-requests
+ (error "No request"))
+ (list
+ (if (= (length riece-ndcc-requests) 1)
+ (car riece-ndcc-requests)
+ (with-output-to-temp-buffer "*Help*"
+ (let ((requests riece-ndcc-requests)
+ (index 1))
+ (while requests
+ (princ (format "%2d: %s %s (%d bytes)\n"
+ index
+ (car (car requests))
+ (nth 1 (car requests))
+ (nth 4 (car requests))))
+ (setq index (1+ index)
+ requests (cdr requests)))))
+ (let ((number (read-string "Request#: ")))
+ (unless (string-match "^[0-9]+$" number)
+ (error "Not a number"))
+ (if (or (> (setq number (string-to-number number))
+ (length riece-ndcc-requests))
+ (< number 1))
+ (error "Invalid number"))
+ (nth (1- number) riece-ndcc-requests)))
+ (expand-file-name (read-file-name "Save as: ")))))
+ (let* (selective-display
+ (coding-system-for-read 'binary)
+ (coding-system-for-write 'binary)
+ (process (open-network-stream
+ "DCC" " *DCC*"
+ (riece-ndcc-decode-address (nth 2 request))
+ (nth 3 request))))
+ (setq riece-ndcc-requests (delq request riece-ndcc-requests))
+ (with-current-buffer (process-buffer process)
+ (set-buffer-multibyte nil)
+ (buffer-disable-undo)
+ (setq buffer-file-name file)
+ (make-local-variable 'riece-ndcc-request-user)
+ (setq riece-ndcc-request-user (car request))
+ (make-local-variable 'riece-ndcc-request-size)
+ (setq riece-ndcc-request-size (nth 4 request)))
+ (set-process-filter process #'riece-ndcc-filter)
+ (set-process-sentinel process #'riece-ndcc-sentinel)))
+
+(defun riece-handle-dcc-request (prefix target message)
+ (let ((case-fold-search t))
+ (when (and (get 'riece-ndcc 'riece-addon-enabled)
+ (string-match
+ "SEND \\([^ ]+\\) \\([^ ]+\\) \\([^ ]+\\) \\([^ ]+\\)"
+ message))
+ (let ((file (match-string 1 message))
+ (address (match-string 2 message))
+ (port (string-to-number (match-string 3 message)))
+ (size (string-to-number (match-string 4 message)))
+ (buffer (if (riece-channel-p target)
+ (riece-channel-buffer (riece-make-identity
+ target riece-server-name))))
+ (user (riece-prefix-nickname prefix)))
+ (setq riece-ndcc-requests
+ (cons (list user file address port size)
+ riece-ndcc-requests))
+ (riece-insert-change buffer (format "DCC SEND from %s\n" user))
+ (riece-insert-change
+ (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 "DCC SEND from %s (%s) to %s"
+ user
+ (riece-strip-user-at-host
+ (riece-prefix-user-at-host prefix))
+ target))
+ "\n")))
+ t)))
+
+(defun riece-ndcc-requires ()
+ '(riece-ctcp))
+
+(defvar riece-dialogue-mode-map)
+(defun riece-ndcc-insinuate ()
+ (unless (fboundp 'make-network-process)
+ (error "This Emacs does not have make-network-process"))
+ (add-hook 'riece-ctcp-dcc-request-hook 'riece-handle-dcc-request))
+
+(defun riece-ndcc-uninstall ()
+ (remove-hook 'riece-ctcp-dcc-request-hook 'riece-handle-dcc-request))
+
+(defun riece-ndcc-enable ()
+ (define-key riece-dialogue-mode-map "\C-ds" 'riece-command-dcc-send)
+ (define-key riece-dialogue-mode-map "\C-dr" 'riece-command-dcc-receive))
+
+(defun riece-ndcc-disable ()
+ (define-key riece-dialogue-mode-map "\C-ds" nil)
+ (define-key riece-dialogue-mode-map "\C-dr" nil))
+
+(provide 'riece-ndcc)
+
+;;; riece-ndcc.el ends here
--- /dev/null
+;;; riece-options.el --- customization -*- lexical-binding: t -*-
+;; Copyright (C) 1998-2003 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., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
+
+;;; Code:
+
+(require 'riece-version)
+(require 'riece-globals)
+
+;; User modifiable variables.
+(defgroup riece nil
+ "Riece specific customize group."
+ :prefix "riece-"
+ :group 'applications)
+
+(defgroup riece-options nil
+ "Riece user customizable variables."
+ :prefix "riece-"
+ :group 'riece)
+
+(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
+ riece-addons)
+ "Variables saved after each session is completed."
+ :type 'string
+ :group 'riece-options)
+
+(defcustom riece-debug nil
+ "If non-nil, random debug spews."
+ :type 'boolean
+ :group 'riece-options)
+
+(defcustom riece-command-prefix "\C-c"
+ "Key sequence to be used as prefix for command mode key bindings."
+ :type 'string
+ :group 'riece-options)
+
+(defgroup riece-looks nil
+ "Look and feel."
+ :prefix "riece-"
+ :group 'riece)
+
+(defcustom riece-window-center-line -2
+ "Line number of center point in window when scrolling.
+If nil, erases the entire frame and then redraws with point in the
+center of the window. Negative means relative to bottom of window.
+See the document of the function `recenter'."
+ :type 'integer
+ :group 'riece-looks)
+
+(defcustom riece-directory (expand-file-name "~/.riece")
+ "Where to look for startup files."
+ :type 'directory
+ :group 'riece-options)
+
+(defcustom riece-addon-directory
+ (expand-file-name "addons" riece-directory)
+ "Where to look for add-on files."
+ :type 'directory
+ :group 'riece-options)
+
+(defcustom riece-data-directory
+ (if (fboundp 'locate-data-directory)
+ (locate-data-directory "riece")
+ (file-name-directory load-file-name))
+ "Where to look for data files."
+ :type 'directory
+ :group 'riece-options)
+
+(defcustom riece-variables-file
+ (expand-file-name "init" riece-directory)
+ "Where to look for variables."
+ :type 'file
+ :group 'riece-options)
+
+(defcustom riece-saved-variables-file
+ (expand-file-name "save" riece-directory)
+ "Where to look for variables.
+This file was saved the last session."
+ :type 'file
+ :group 'riece-options)
+
+(defcustom riece-variables-files
+ (list riece-saved-variables-file riece-variables-file)
+ "Where to look for variables. Helps to remove clutter from your .emacs.
+This feature is most likely to dissappear in near future. The preferred
+way is to put Riece variables on .emacs or file loaded from there."
+ :type '(repeat (file :tag "Initialization File"))
+ :group 'riece-options)
+
+(defcustom riece-addons '(riece-highlight
+ riece-ctcp
+ riece-guess
+ riece-unread
+ riece-history
+ riece-url
+ riece-button
+ riece-menu
+ riece-icon
+ riece-ignore
+ riece-log
+ riece-toolbar
+ riece-alias
+ riece-ctlseq
+ riece-keyword
+ riece-shrink-buffer
+ riece-mcat)
+ "Add-ons insinuated into Riece."
+ :type '(repeat symbol)
+ :group 'riece-options)
+
+(defgroup riece-server nil
+ "Server settings."
+ :prefix "riece-"
+ :group 'riece)
+
+(defgroup riece-channel nil
+ "Channel settings."
+ :prefix "riece-"
+ :group 'riece)
+
+(defgroup riece-coding nil
+ "Coding system."
+ :tag "Coding"
+ :prefix "riece-"
+ :group 'riece)
+
+(defcustom riece-default-coding-system
+ (if (featurep 'mule)
+ (cons 'ctext 'iso-2022-jp-2))
+ "Coding system for process I/O.
+The value is a coding system, or a cons cell (DECODING . ENCODING)
+specifying the coding systems for decoding and encoding respectively."
+ :type '(choice (symbol :tag "Coding system")
+ (cons (symbol :tag "Input coding system")
+ (symbol :tag "Output coding system"))
+ (const nil :tag "No conversion"))
+ :group 'riece-coding)
+
+(defcustom riece-server-alist nil
+ "An alist mapping server names to plist."
+ :type '(repeat
+ (group
+ (string :tag "Server")
+ (list :inline t :tag "Host"
+ :format "%{%t%}: %v"
+ (const :tag "" :value :host)
+ string)
+ (repeat :inline t :tag "Options"
+ (choice :inline t :value nil
+ (list :inline t :tag "Port"
+ :format "%{%t%}: %v"
+ (const :tag "" :value :service)
+ (choice (const :tag "Default" 6667)
+ integer
+ string))
+ (list :inline t :tag "Nickname"
+ :format "%{%t%}: %v"
+ (const :tag "" :value :nickname)
+ (choice (const :tag "Default" riece-nickname)
+ string))
+ (list :inline t :tag "Realname"
+ :format "%{%t%}: %v"
+ (const :tag "" :value :realname)
+ (choice (const :tag "Default" riece-realname)
+ string))
+ (list :inline t :tag "Username"
+ :format "%{%t%}: %v"
+ (const :tag "" :value :username)
+ (choice (const :tag "Default" riece-username)
+ string))
+ (list :inline t :tag "Password"
+ :format "%{%t%}: %v"
+ (const :tag "" :value :password)
+ string)
+ (list :inline t :tag "Function"
+ :format "%{%t%}: %v"
+ (const :tag "" :value :function)
+ (choice
+ (const :tag "Default"
+ riece-default-open-connection-function)
+ function))
+ (list :inline t :tag "Coding system"
+ :format "%{%t%}: %v"
+ (const :tag "" :value :coding)
+ (choice
+ (const :tag "Default"
+ riece-default-coding-system)
+ (choice
+ (symbol :tag "Coding system")
+ (cons (symbol :tag "Input coding system")
+ (symbol :tag "Output coding system"))
+ (const nil :tag "No conversion"))))))))
+ :group 'riece-server)
+
+(defcustom riece-server (getenv "IRCSERVER")
+ "IRC server host we are connecting to."
+ :type 'string
+ :group 'riece-server)
+
+(defcustom riece-protocol 'irc
+ "Protocol support."
+ :type 'symbol
+ :group 'riece-server)
+
+(defcustom riece-max-send-size 512
+ "Maximum size of messages to be sent at a time."
+ :type 'integer
+ :group 'riece-server)
+
+(defcustom riece-send-delay 2
+ "Duration of multiple send."
+ :type 'integer
+ :group 'riece-server)
+
+(defcustom riece-default-password (getenv "IRCPASSWORD")
+ "Your password."
+ :type '(radio (string :tag "Password")
+ (const :tag "No" nil))
+ :group 'riece-server)
+
+(defcustom riece-username nil
+ "Your login name."
+ :type 'string
+ :group 'riece-server)
+
+(defcustom riece-realname nil
+ "Your user name."
+ :type 'string
+ :group 'riece-server)
+
+(defcustom riece-nickname (or (getenv "IRCNICK")
+ (user-real-login-name))
+ "Your nickname."
+ :type 'string
+ :group 'riece-server)
+
+(defcustom riece-startup-channel-list nil
+ "A list of channels to join automatically at startup."
+ :type '(repeat (choice (string :tag "Channel")
+ (list (string :tag "Channel") (string :tag "Key"))))
+ :group 'riece-channel)
+
+(defcustom riece-startup-server-list nil
+ "A list of servers to connect automatically at startup."
+ :type '(repeat (string :tag "Server"))
+ :group 'riece-server)
+
+(defcustom riece-retry-with-new-nickname nil
+ "When nickname has already been in use, grow-tail automatically."
+ :type 'boolean
+ :group 'riece-server)
+
+(defcustom riece-quit-timeout 1
+ "Quit timeout when there is no response from server."
+ :type '(radio (integer :tag "Seconds")
+ (const nil))
+ :group 'riece-server)
+
+(defcustom riece-default-open-connection-function #'open-network-stream
+ "Default function used for connecting to an IRC server."
+ :type 'function
+ :group 'riece-server)
+
+(defcustom riece-user-cache-max-size 512
+ "Maximum size of cache of user names."
+ :type 'integer
+ :group 'riece-server)
+
+(defcustom riece-channel-cache-max-size 512
+ "Maximum size of cache of channel names."
+ :type 'integer
+ :group 'riece-server)
+
+(defcustom riece-channel-buffer-mode t
+ "When non-nil, Riece will display a channel buffer."
+ :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
+ :group 'riece-looks)
+
+(defcustom riece-channel-list-buffer-mode t
+ "When non-nil, Riece will display a channel list buffer."
+ :type 'boolean
+ :group 'riece-looks)
+
+(defcustom riece-default-freeze nil
+ "Channel buffer local freeze flag is on at starting."
+ :type 'boolean
+ :group 'riece-looks)
+
+(defcustom riece-default-channel-binding nil
+ "The channel list to bind the channel number when joining."
+ :type '(repeat (radio (string :tag "Bound Channel")
+ (const nil)))
+ :group 'riece-channel)
+
+(defcustom riece-blink-parens nil
+ "Should we blink matching parenthesis in the command buffer?"
+ :type 'boolean
+ :group 'riece-options)
+
+(defcustom riece-quit-message (riece-extended-version)
+ "Default quit message."
+ :type '(string :tag "Quit message")
+ :group 'riece-options)
+
+(defcustom riece-part-message nil
+ "Default part message."
+ :type '(choice (const :tag "No message" nil)
+ (string :tag "Part message"))
+ :group 'riece-options)
+
+(defcustom riece-away-message "Gone"
+ "Default away message."
+ :type '(string :tag "Away message")
+ :group 'riece-options)
+
+(defcustom riece-gather-channel-modes nil
+ "If non-nil, gather channel modes when we join a channel."
+ :type 'boolean
+ :group 'riece-options)
+
+(defcustom riece-buffer-dispose-function #'kill-buffer
+ "Function called after the buffer was disposed."
+ :type 'function
+ :group 'riece-options)
+
+(defcustom riece-format-time-function #'current-time-string
+ "Function to convert the specified time to the human readable form."
+ :type 'function
+ :group 'riece-options)
+
+(defcustom riece-hide-list '()
+ "Whether to hide certain server messages.
+
+Currently supported are join, part, and quit messages.
+This is a list of up to 3 symbols, namely: `joins', `parts',
+`quits'."
+ :type '(set (symbol :tag "Hide Joins" joins)
+ (symbol :tag "Hide Parts" parts)
+ (symbol :tag "Hide Quits" quits))
+ :group 'riece-options)
+
+(provide 'riece-options)
+
+;;; riece-options.el ends here
--- /dev/null
+;;; riece-package-info.el --- package information about Riece
+;; Copyright (C) 2006 Daiki Ueno
+
+;; Author: Daiki Ueno <ueno@unixuser.org>
+
+;; 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., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
+
+;;; Code:
+
+;;(defconst riece-package-name "@PACKAGE@")
+(defconst riece-package-name "Riece")
+
+(defconst riece-version-number "@VERSION@"
+ "Version number for this version of Riece.")
+
+(provide 'riece-package-info)
+
+;;; riece-package-info.el ends here
--- /dev/null
+;;; riece-rdcc.el --- DCC file sending protocol support (written in Ruby) -*- lexical-binding: t -*-
+;; Copyright (C) 1998-2003 Daiki Ueno
+
+;; Author: Daiki Ueno <ueno@unixuser.org>
+;; 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., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
+
+;;; Commentary:
+
+;; NOTE: This is an add-on module for Riece.
+
+;;; Code:
+
+(require 'riece-globals)
+(require 'riece-misc)
+(require 'riece-channel)
+(require 'riece-identity)
+(require 'riece-ctcp) ;for riece-ctcp-additional-clientinfo
+(require 'riece-ruby)
+(require 'riece-mcat)
+
+(defgroup riece-rdcc nil
+ "DCC written in Ruby."
+ :prefix "riece-"
+ :group 'riece)
+
+(defcustom riece-rdcc-server-address nil
+ "Local address of the DCC server.
+Only used for sending files."
+ :type 'string
+ :group 'riece-rdcc)
+
+(defcustom riece-rdcc-server-port nil
+ "Local port of the DCC server.
+Only used for sending files."
+ :type 'integer
+ :group 'riece-rdcc)
+
+(defcustom riece-rdcc-send-program
+ '("\
+require 'socket'
+address = " address "
+port = " port "
+unless address
+ sock = UDPSocket.new
+ sock.connect('164.46.176.4', 7) # www.unixuser.org/echo
+ address = sock.getsockname[4 .. 7].unpack('CCCC').join('.')
+end
+server = TCPServer.new(address, port)
+output(\"#{server.addr[3].split(/\\./).collect{|c| c.to_i}.pack('CCCC').unpack('N')[0]} #{server.addr[1]}\")
+session = server.accept
+if session
+ total = 0
+ File.open(" file ") {|file|
+ while (bytes = file.read(" block-size "))
+ total += bytes.length
+ output(total)
+ session.write(bytes)
+ begin
+ buf = session.read(4)
+ end until buf.unpack('N')[0] == total
+ end
+ }
+ session.close
+end
+")
+ "Ruby program to send file with DCC."
+ :type 'sexp
+ :group 'riece-rdcc)
+
+(defcustom riece-rdcc-decode-address-program
+ '("\"#{" address " >> 24 & 0xFF}.#{" address " >> 16 & 0xFF}.#{"
+ address " >> 8 & 0xFF}.#{" address " & 0xFF}\"")
+ "Ruby program to numeric IP address."
+ :type 'sexp
+ :group 'riece-rdcc)
+
+(defcustom riece-rdcc-save-directory nil
+ "Default directory where received files are saved in."
+ :type 'directory
+ :group 'riece-rdcc)
+
+(defcustom riece-rdcc-block-size 1024
+ "Number of bytes sent as a block."
+ :type 'integer
+ :group 'riece-rdcc)
+
+(defvar riece-rdcc-requests nil)
+
+(defvar riece-rdcc-request-user nil)
+(defvar riece-rdcc-request-file nil)
+(defvar riece-rdcc-request-size nil)
+
+(defvar riece-rdcc-temp-file nil)
+(defvar riece-rdcc-received-size nil)
+
+(defconst riece-rdcc-description
+ "DCC file sending protocol support (written in Ruby.)")
+
+(defvar temporary-file-directory)
+(defvar jka-compr-compression-info-list)
+(defvar jam-zcat-filename-list)
+
+(defun riece-rdcc-output-handler (name output _time)
+ (if (string-match "\\([0-9]+\\) \\([0-9]+\\)" output)
+ (let ((address (match-string 1 output))
+ (port (match-string 2 output)))
+ (riece-send-string
+ (format "PRIVMSG %s :\1DCC SEND %s %s %s %d\1\r\n"
+ (riece-identity-prefix
+ (riece-ruby-property name 'riece-rdcc-request-user))
+ (file-name-nondirectory
+ (riece-ruby-property name 'riece-rdcc-request-file))
+ address port
+ (riece-ruby-property name 'riece-rdcc-request-size)))))
+ (riece-ruby-set-output-handler name #'riece-rdcc-output-handler-2))
+
+(defun riece-rdcc-output-handler-2 (name output _time)
+ (message (riece-mcat "Sending %s...(%s/%d)")
+ (riece-ruby-property name 'riece-rdcc-request-file)
+ (string-to-number output)
+ (riece-ruby-property name 'riece-rdcc-request-size)))
+
+(defun riece-rdcc-exit-handler (name)
+ (message (riece-mcat "Sending %s...done")
+ (riece-ruby-property name 'riece-rdcc-request-file)))
+
+(defun riece-command-dcc-send (user file)
+ (interactive
+ (let ((completion-ignore-case t))
+ (list (riece-completing-read-identity
+ (riece-mcat "User: ")
+ (riece-get-users-on-server (riece-current-server-name)))
+ (expand-file-name (read-file-name (riece-mcat "File: "))))))
+ (let ((name (riece-ruby-execute
+ (riece-ruby-substitute-variables
+ riece-rdcc-send-program
+ (list (cons 'address
+ (if riece-rdcc-server-address
+ (concat "'" riece-rdcc-server-address
+ "'")
+ "nil"))
+ (cons 'port
+ (if riece-rdcc-server-port
+ (number-to-string riece-rdcc-server-port)
+ "0"))
+ (cons 'file
+ (concat "'" file "'"))
+ (cons 'block-size
+ (number-to-string
+ riece-rdcc-block-size)))))))
+ (riece-ruby-set-property name 'riece-rdcc-request-user user)
+ (riece-ruby-set-property name 'riece-rdcc-request-file file)
+ (riece-ruby-set-property name 'riece-rdcc-request-size
+ (nth 7 (file-attributes file)))
+ (riece-ruby-set-output-handler name #'riece-rdcc-output-handler)
+ (riece-ruby-set-exit-handler name #'riece-rdcc-exit-handler)))
+
+(defun riece-rdcc-filter (process input)
+ (with-current-buffer (process-buffer process)
+ (erase-buffer)
+ (insert input)
+ (let ((coding-system-for-write 'binary)
+ jka-compr-compression-info-list jam-zcat-filename-list)
+ (write-region (point-min) (point-max) riece-rdcc-temp-file t 0))
+ (setq riece-rdcc-received-size (+ (buffer-size) riece-rdcc-received-size))
+ (process-send-string
+ process
+ (format "%c%c%c%c"
+ (lsh riece-rdcc-received-size -24)
+ (logand (lsh riece-rdcc-received-size -16) 255)
+ (logand (lsh riece-rdcc-received-size -8) 255)
+ (logand riece-rdcc-received-size 255)))
+ (message (riece-mcat "Receiving %s from %s...(%s/%s)")
+ (file-name-nondirectory riece-rdcc-request-file)
+ riece-rdcc-request-user
+ (riece-rdcc-format-size riece-rdcc-received-size)
+ (riece-rdcc-format-size riece-rdcc-request-size))
+ (if (= riece-rdcc-received-size riece-rdcc-request-size)
+ (set-process-filter process nil))))
+
+(defun riece-rdcc-sentinel (process _status)
+ (with-current-buffer (process-buffer process)
+ (unless (= riece-rdcc-received-size riece-rdcc-request-size)
+ (error "Premature end of file"))
+ (message (riece-mcat "Receiving %s from %s...done")
+ (file-name-nondirectory riece-rdcc-request-file)
+ riece-rdcc-request-user)
+ (condition-case nil
+ (progn
+ (rename-file riece-rdcc-temp-file riece-rdcc-request-file)
+ (delete-directory (file-name-directory riece-rdcc-temp-file)))
+ (file-already-exists
+ (error "Can't save %s. Temporarily saved in %s"
+ riece-rdcc-request-file riece-rdcc-temp-file))))
+ (kill-buffer (process-buffer process)))
+
+(defun riece-rdcc-decode-address (address)
+ (let ((name (riece-ruby-execute
+ (riece-ruby-substitute-variables
+ riece-rdcc-decode-address-program
+ (list (cons 'address address)))))
+ response)
+ (while (equal (nth 2 (setq response (riece-ruby-inspect name))) "running")
+ (accept-process-output riece-ruby-process))
+ (riece-ruby-clear name)
+ (nth 1 response)))
+
+(defun riece-command-dcc-receive (request file)
+ (interactive
+ (progn
+ (unless riece-rdcc-requests
+ (error "No request"))
+ (let* ((request
+ (if (= (length riece-rdcc-requests) 1)
+ (car riece-rdcc-requests)
+ (with-output-to-temp-buffer "*Help*"
+ (let ((requests riece-rdcc-requests)
+ (index 1))
+ (while requests
+ (princ (format (riece-mcat "%2d: %s %s (%d bytes)\n")
+ index
+ (car (car requests))
+ (nth 1 (car requests))
+ (nth 4 (car requests))))
+ (setq index (1+ index)
+ requests (cdr requests)))))
+ (let ((number (read-string "Request#: ")))
+ (unless (string-match "^[0-9]+$" number)
+ (error "Not a number"))
+ (if (or (> (setq number (string-to-number number))
+ (length riece-rdcc-requests))
+ (< number 1))
+ (error "Invalid number"))
+ (nth (1- number) riece-rdcc-requests))))
+ (default-name (expand-file-name
+ (convert-standard-filename (nth 1 request))
+ (or riece-rdcc-save-directory
+ default-directory))))
+ (list request
+ (expand-file-name
+ (read-file-name
+ (format (riece-mcat "Save as (default %s) ")
+ (file-name-nondirectory default-name))
+ (file-name-directory default-name)
+ default-name))))))
+ (let* ((temp-file (expand-file-name
+ (file-name-nondirectory file)
+ (expand-file-name (make-temp-name "riece-rdcc")
+ (if (featurep 'xemacs)
+ (temp-directory)
+ temporary-file-directory))))
+ (orig-mode (default-file-modes))
+ selective-display
+ (coding-system-for-read 'binary)
+ (coding-system-for-write 'binary)
+ process)
+ (unwind-protect
+ (progn
+ (set-default-file-modes 448)
+ ;; This may throw an error.
+ (make-directory (file-name-directory temp-file)))
+ (set-default-file-modes orig-mode))
+ (setq process (open-network-stream
+ "DCC" (generate-new-buffer " *DCC*")
+ (riece-rdcc-decode-address (nth 2 request))
+ (nth 3 request)))
+ (setq riece-rdcc-requests (delq request riece-rdcc-requests))
+ (with-current-buffer (process-buffer process)
+ (if (fboundp 'set-buffer-multibyte)
+ (set-buffer-multibyte nil))
+ (buffer-disable-undo)
+ (erase-buffer)
+ (make-local-variable 'riece-rdcc-request-user)
+ (setq riece-rdcc-request-user (car request))
+ (make-local-variable 'riece-rdcc-request-file)
+ (setq riece-rdcc-request-file file)
+ (make-local-variable 'riece-rdcc-request-size)
+ (setq riece-rdcc-request-size (nth 4 request))
+ (make-local-variable 'riece-rdcc-temp-file)
+ (setq riece-rdcc-temp-file temp-file)
+ (make-local-variable 'riece-rdcc-received-size)
+ (setq riece-rdcc-received-size 0))
+ (set-process-filter process #'riece-rdcc-filter)
+ (set-process-sentinel process #'riece-rdcc-sentinel)))
+
+(defun riece-rdcc-format-size (size)
+ (if (< size 1024)
+ (format "%0.1f" size)
+ (setq size (/ size 1024.0))
+ (if (< size 1024)
+ (format "%0.1fKB" size)
+ (setq size (/ size 1024.0))
+ (if (< size 1024)
+ (format "%0.1fMB" size)
+ (format "%0.1fGB" (/ size 1024.0))))))
+
+(defun riece-handle-dcc-request (prefix target message)
+ (let ((case-fold-search t))
+ (when (and (get 'riece-rdcc 'riece-addon-enabled)
+ (string-match
+ "SEND \\(\\([^ ]+\\)\\|\"\\(.+\\)\"\\) \\([^ ]+\\) \\([^ ]+\\) \\([^ ]+\\)"
+ message))
+ (let ((file (or (match-string 2 message)
+ (match-string 3 message)))
+ (address (match-string 4 message))
+ (port (string-to-number (match-string 5 message)))
+ (size (string-to-number (match-string 6 message)))
+ (buffer (if (riece-channel-p target)
+ (riece-channel-buffer (riece-make-identity
+ target riece-server-name))))
+ (user (riece-prefix-nickname prefix)))
+ (setq riece-rdcc-requests
+ (cons (list user file address port size)
+ riece-rdcc-requests))
+ (message "%s"
+ (with-current-buffer (window-buffer (selected-window))
+ (substitute-command-keys
+ (format
+ (riece-mcat
+ "Type \\[riece-command-dcc-receive] to receive")
+ user))))
+ (riece-insert-change buffer (format "DCC SEND from %s: %s (%s)\n"
+ user file
+ (riece-rdcc-format-size size)))
+ (riece-insert-change
+ (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 "DCC SEND from %s (%s) to %s: %s (%s)"
+ user
+ (riece-strip-user-at-host
+ (riece-prefix-user-at-host prefix))
+ (riece-decode-coding-string target)
+ file
+ (riece-rdcc-format-size size)))
+ "\n")))
+ t)))
+
+(defun riece-rdcc-requires ()
+ '(riece-ctcp))
+
+(defvar riece-dialogue-mode-map)
+(defun riece-rdcc-insinuate ()
+ (add-to-list 'riece-ctcp-additional-clientinfo "DCC")
+ (add-hook 'riece-ctcp-dcc-request-hook 'riece-handle-dcc-request))
+
+(defun riece-rdcc-uninstall ()
+ (setq riece-ctcp-additional-clientinfo
+ (delete "DCC" riece-ctcp-additional-clientinfo))
+ (remove-hook 'riece-ctcp-dcc-request-hook 'riece-handle-dcc-request))
+
+(defun riece-rdcc-enable ()
+ (define-key riece-dialogue-mode-map "\C-ds" 'riece-command-dcc-send)
+ (define-key riece-dialogue-mode-map "\C-dr" 'riece-command-dcc-receive))
+
+(defun riece-rdcc-disable ()
+ (define-key riece-dialogue-mode-map "\C-ds" nil)
+ (define-key riece-dialogue-mode-map "\C-dr" nil))
+
+(provide 'riece-rdcc)
+
+;;; riece-rdcc.el ends here
--- /dev/null
+;;; riece-ruby.el --- interact with Ruby interpreter -*- lexical-binding: t -*-
+;; Copyright (C) 1998-2005 Daiki Ueno
+
+;; Author: Daiki Ueno <ueno@unixuser.org>
+;; Created: 1998-09-28
+;; Keywords: IRC, riece, Ruby
+
+;; 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., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
+
+;;; Commentary:
+
+;; riece-ruby.el is a library to interact with Ruby interpreter.
+;; It supports concurrent execution of Ruby programs in a single
+;; session. For example:
+;;
+;; (riece-ruby-execute "sleep 30"); returns immediately
+;; => "rubyserv0"
+;;
+;; (riece-ruby-execute "1 + 1")
+;; => "rubyserv1"
+;;
+;; (riece-ruby-execute "\"")
+;; => "rubyserv2"
+;;
+;; (riece-ruby-inspect "rubyserv0")
+;; => ((OK nil) nil (("running")))
+;;
+;; (riece-ruby-inspect "rubyserv1")
+;; => ((OK nil) "2" (("finished")))
+;;
+;; (riece-ruby-inspect "rubyserv2")
+;; => ((OK nil) "(eval):1: unterminated string meets end of file" (("exited")))
+
+;;; Code:
+
+(require 'riece-debug)
+
+(defgroup riece-ruby nil
+ "Interact with Ruby interpreter."
+ :prefix "riece-"
+ :group 'riece)
+
+(defcustom riece-ruby-command "ruby"
+ "Command name for Ruby interpreter."
+ :type 'string
+ :group 'riece-ruby)
+
+(defcustom riece-ruby-out-file (expand-file-name "riece-ruby.out"
+ riece-directory)
+ "A file which records stdout of Ruby programs."
+ :type 'string
+ :group 'riece-ruby)
+
+(defcustom riece-ruby-err-file (expand-file-name "riece-ruby.err"
+ riece-directory)
+ "A file which records stderr of Ruby programs."
+ :type 'string
+ :group 'riece-ruby)
+
+(defcustom riece-ruby-log-file (expand-file-name "riece-ruby.log"
+ riece-directory)
+ "A file used to logging."
+ :type 'string
+ :group 'riece-ruby)
+
+(defvar riece-ruby-server-program "server.rb"
+ "The server program file. If the filename is not absolute, it is
+assumed that the file is in the same directory of this file.")
+
+(defvar riece-ruby-server-program-arguments (list "-o" riece-ruby-out-file
+ "-e" riece-ruby-err-file
+ "-l" riece-ruby-log-file)
+ "Command line arguments passed to `riece-ruby-server-program'.")
+
+(defvar riece-ruby-process nil
+ "Process object of Ruby interpreter.")
+
+(defvar riece-ruby-lock nil
+ "Lock for waiting server response.
+Local to the process buffer.")
+(defvar riece-ruby-response nil
+ "The server response.
+Local to the process buffer.")
+(defvar riece-ruby-data nil
+ "Data from server.
+Local to the process buffer.")
+(defvar riece-ruby-escaped-data nil
+ "Escaped data from server. This variable is cleared every time
+server response arrives.
+Local to the process buffer.")
+(defvar riece-ruby-status-alist nil
+ "Status from server.
+Local to the process buffer.")
+
+(defvar riece-ruby-output-queue-alist nil
+ "An alist mapping from program name to output data.")
+(defvar riece-ruby-output-handler-alist nil
+ "An alist mapping from program name to output handler.
+Output handlers are called every time \"# output\" line arrives.
+Use `riece-ruby-set-output-handler' to set this variable.")
+(defvar riece-ruby-exit-handler-alist nil
+ "An alist mapping from program name to exit handler.
+Exit handlers are called once when \"# exit\" line arrives.
+Use `riece-ruby-set-exit-handler' to set this variable.")
+(defvar riece-ruby-property-alist nil
+ "An alist mapping from program name to the property list.
+Use `riece-ruby-set-property' to set this variable.")
+
+(defun riece-ruby-escape-data (data)
+ (let ((index 0))
+ (while (string-match "[%\r\n]+" data index)
+ (setq data (replace-match
+ (mapconcat (lambda (c) (format "%%%02X" c))
+ (match-string 0 data) "")
+ nil nil data)
+ index (+ (match-end 0)
+ (* (- (match-end 0) (match-beginning 0)) 2))))
+ data))
+
+(defun riece-ruby-unescape-data (data)
+ (let ((index 0))
+ (while (string-match "%\\([0-9A-F][0-9A-F]\\)" data index)
+ (setq data (replace-match
+ (read (concat "\"\\x" (match-string 1 data) "\""))
+ nil nil data)
+ index (- (match-end 0) 2)))
+ data))
+
+(defun riece-ruby-reset-process-buffer ()
+ (with-current-buffer (process-buffer riece-ruby-process)
+ (buffer-disable-undo)
+ (make-local-variable 'riece-ruby-response)
+ (setq riece-ruby-response nil)
+ (make-local-variable 'riece-ruby-data)
+ (setq riece-ruby-data nil)
+ (make-local-variable 'riece-ruby-escaped-data)
+ (setq riece-ruby-escaped-data nil)
+ (make-local-variable 'riece-ruby-status-alist)
+ (setq riece-ruby-status-alist nil)))
+
+(defun riece-ruby-send-eval (program)
+ (let* ((string (riece-ruby-escape-data program))
+ (length (- (length string) 998))
+ (index 0)
+ data)
+ (while (< index length)
+ (setq data (cons (substring string index (setq index (+ index 998)))
+ data)))
+ (setq data (cons (substring string index) data)
+ data (nreverse data))
+ (process-send-string riece-ruby-process "EVAL\r\n")
+ (while data
+ (process-send-string riece-ruby-process
+ (concat "D " (car data) "\r\n"))
+ (setq data (cdr data)))
+ (process-send-string riece-ruby-process "END\r\n")))
+
+(defun riece-ruby-send-poll (name)
+ (process-send-string riece-ruby-process
+ (concat "POLL " name "\r\n")))
+
+(defun riece-ruby-send-exit (name)
+ (process-send-string riece-ruby-process
+ (concat "EXIT " name "\r\n")))
+
+(defun riece-ruby-filter (process input)
+ (with-current-buffer (process-buffer process)
+ (goto-char (point-max))
+ (insert input)
+ (goto-char (point-min))
+ (beginning-of-line)
+ (while (looking-at ".*\r\n")
+ (if (looking-at "OK\\( \\(.*\\)\\)?\r")
+ (progn
+ (if riece-ruby-escaped-data
+ (setq riece-ruby-data (mapconcat #'riece-ruby-unescape-data
+ riece-ruby-escaped-data "")))
+ (setq riece-ruby-escaped-data nil
+ riece-ruby-response (list 'OK (match-string 2))
+ riece-ruby-lock nil))
+ (if (looking-at "ERR \\([0-9]+\\)\\( \\(.*\\)\\)?\r")
+ (progn
+ (setq riece-ruby-escaped-data nil
+ riece-ruby-response
+ (list 'ERR (string-to-number (match-string 1))
+ (match-string 3))
+ riece-ruby-lock nil))
+ (if (looking-at "D \\(.*\\)\r")
+ (setq riece-ruby-escaped-data (cons (match-string 1)
+ riece-ruby-escaped-data))
+ (if (looking-at "S \\([^ ]*\\) \\(.*\\)\r")
+ (progn
+ (setq riece-ruby-status-alist (cons (cons (match-string 1)
+ (match-string 2))
+ riece-ruby-status-alist))
+ (if (member (car (car riece-ruby-status-alist))
+ '("finished" "exited"))
+ (riece-ruby-run-exit-handler
+ (cdr (car riece-ruby-status-alist)))))
+ (if (looking-at "# output \\([^ ]*\\) \\(.*\\)\r")
+ (riece-ruby-run-output-handler (match-string 1)
+ (match-string 2)
+ (current-time))
+ (if (looking-at "# exit \\(.*\\)\r")
+ (riece-ruby-run-exit-handler (match-string 1))))))))
+ (forward-line))
+ (delete-region (point-min) (point))))
+
+(defun riece-ruby-run-exit-handler (name)
+ (let ((entry (assoc name riece-ruby-exit-handler-alist)))
+ (when entry
+ (setq riece-ruby-exit-handler-alist
+ (delq entry riece-ruby-exit-handler-alist))
+ (riece-funcall-ignore-errors (if (symbolp (cdr entry))
+ (symbol-name (cdr entry))
+ (format "%s-exit-handler" name))
+ (cdr entry) (car entry))
+ (riece-ruby-clear name))))
+
+(defun riece-ruby-run-output-handler (name output time)
+ (let ((handler-entry (assoc name riece-ruby-output-handler-alist))
+ (entry (assoc name riece-ruby-output-queue-alist)))
+ (if handler-entry
+ (riece-funcall-ignore-errors (if (symbolp (cdr handler-entry))
+ (symbol-name (cdr handler-entry))
+ (format "%s-output-handler" name))
+ (cdr handler-entry) name output time)
+ (if entry
+ (setcdr entry (cons (cons output time) (cdr entry)))
+ (setq riece-ruby-output-queue-alist
+ (cons (list name (cons output time))
+ riece-ruby-output-queue-alist))))))
+
+(defun riece-ruby-sentinel (process _status)
+ (kill-buffer (process-buffer process)))
+
+(defun riece-ruby-execute (program)
+ "Schedule an execution of a Ruby PROGRAM.
+Return a string name assigned by the server."
+ (unless (and riece-ruby-process
+ (eq (process-status riece-ruby-process) 'run))
+ (let (selective-display
+ (coding-system-for-write 'binary)
+ (coding-system-for-read 'binary))
+ (setq riece-ruby-process
+ (apply #'start-process "riece-ruby" (generate-new-buffer " *Ruby*")
+ riece-ruby-command
+ (expand-file-name riece-ruby-server-program
+ riece-data-directory)
+ riece-ruby-server-program-arguments))
+ (riece-set-process-query-on-exit-flag riece-ruby-process nil)
+ (set-process-filter riece-ruby-process #'riece-ruby-filter)
+ (set-process-sentinel riece-ruby-process #'riece-ruby-sentinel)))
+ (with-current-buffer (process-buffer riece-ruby-process)
+ (riece-ruby-reset-process-buffer)
+ (make-local-variable 'riece-ruby-lock)
+ (setq riece-ruby-lock t)
+ (riece-ruby-send-eval program)
+ (while riece-ruby-lock
+ (accept-process-output riece-ruby-process))
+ (if (eq (car riece-ruby-response) 'ERR)
+ (error "Couldn't execute: %S" (cdr riece-ruby-response)))
+ (cdr (assoc "name" riece-ruby-status-alist))))
+
+(defun riece-ruby-inspect (name)
+ "Inspect a result of program execution distinguished by NAME.
+Return a three element list.
+The car is protocol response line which looks like:
+ \(ERR 103 \"Not implemented\").
+The cadr is data from the server, that is, the result of the program.
+The caddr is status from the server."
+ (with-current-buffer (process-buffer riece-ruby-process)
+ (riece-ruby-reset-process-buffer)
+ (make-local-variable 'riece-ruby-lock)
+ (setq riece-ruby-lock t)
+ (riece-ruby-send-poll name)
+ (while riece-ruby-lock
+ (accept-process-output riece-ruby-process))
+ (list riece-ruby-response
+ riece-ruby-data
+ riece-ruby-status-alist)))
+
+(defun riece-ruby-clear (name)
+ "Clear a result of program execution distinguished by NAME.
+Note that riece-ruby-clear is automatically called iff an exit-handler
+is specified. Otherwise, it should be called explicitly."
+ (with-current-buffer (process-buffer riece-ruby-process)
+ (riece-ruby-reset-process-buffer)
+ (make-local-variable 'riece-ruby-lock)
+ (setq riece-ruby-lock t)
+ (riece-ruby-send-exit name)
+ (while riece-ruby-lock
+ (accept-process-output riece-ruby-process)))
+ (let ((entry (assoc name riece-ruby-property-alist)))
+ (if entry
+ (delq entry riece-ruby-property-alist))))
+
+(defun riece-ruby-set-exit-handler (name handler)
+ "Set an exit-handler HANDLER for the program distinguished by NAME.
+An exit-handler is called when the program is finished or exited abnormally.
+An exit-handler is called with an argument same as NAME.
+Note that riece-ruby-clear is automatically called iff an exit-handler
+is specified. Otherwise, it should be called explicitly."
+ (let ((entry (assoc name riece-ruby-exit-handler-alist)))
+ (if handler
+ (progn
+ (if entry
+ (setcdr entry handler)
+ (setq riece-ruby-exit-handler-alist
+ (cons (cons name handler)
+ riece-ruby-exit-handler-alist)))
+ ;;check if the program already exited
+ (riece-ruby-inspect name))
+ (if entry
+ (setq riece-ruby-exit-handler-alist
+ (delq entry riece-ruby-exit-handler-alist))))))
+
+(defun riece-ruby-set-output-handler (name handler)
+ "Set an output-handler HANDLER for the program distinguished by NAME.
+An output-handler is called when the program sends any output by using
+`output' method in the Ruby program.
+An output-handler is called with three argument. The first argument
+is the same as NAME. The second argument is the output string. The
+third argument is the timestamp of the output event."
+ (let ((entry (assoc name riece-ruby-output-handler-alist))
+ queue-entry pointer)
+ (if handler
+ (progn
+ (when (setq queue-entry (assoc name riece-ruby-output-queue-alist))
+ (setq pointer (nreverse (cdr queue-entry))
+ riece-ruby-output-queue-alist
+ (delq queue-entry riece-ruby-output-queue-alist))
+ (while pointer
+ (riece-funcall-ignore-errors (if (symbolp handler)
+ (symbol-name handler)
+ (format "%s-output-handler" name))
+ handler name (car (car pointer))
+ (cdr (car pointer)))
+ (setq pointer (cdr pointer))))
+ (if entry
+ (setcdr entry handler)
+ (setq riece-ruby-output-handler-alist
+ (cons (cons name handler)
+ riece-ruby-output-handler-alist))))
+ (if entry
+ (setq riece-ruby-output-handler-alist
+ (delq entry riece-ruby-output-handler-alist))))))
+
+(defun riece-ruby-set-property (name property value)
+ "Set given PROPERTY/VALUE pair to the program distinguished by NAME."
+ (let ((entry (assoc name riece-ruby-property-alist))
+ property-entry)
+ (unless entry
+ (setq entry (list name)
+ riece-ruby-property-alist (cons entry riece-ruby-property-alist)))
+ (if (setq property-entry (assoc property (cdr entry)))
+ (setcdr property-entry value)
+ (setcdr entry (cons (cons property value) (cdr entry))))))
+
+(defun riece-ruby-property (name property)
+ "Return the value of PROPERTY set to the program distinguished by NAME."
+ (cdr (assoc property (cdr (assoc name riece-ruby-property-alist)))))
+
+(defun riece-ruby-substitute-variables (program alist)
+ "Substitute symbols in PROGRAM by looking up ALIST.
+Return a string concatenating elements in PROGRAM."
+ (setq program (copy-sequence program))
+ (while alist
+ (let ((pointer program))
+ (while pointer
+ (setq pointer (memq (car (car alist)) program))
+ (if pointer
+ (setcar pointer (cdr (car alist))))))
+ (setq alist (cdr alist)))
+ (apply #'concat program))
+
+(provide 'riece-ruby)
+
+;;; riece-ruby.el ends here
--- /dev/null
+;;; riece-server.el --- functions to open and close servers -*- lexical-binding: t -*-
+;; Copyright (C) 1998-2003 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., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
+
+;;; Code:
+
+(require 'riece-options)
+(require 'riece-globals) ;for server local variables.
+(require 'riece-coding) ;riece-default-coding-system
+(require 'riece-identity)
+(require 'riece-compat)
+(require 'riece-cache)
+(require 'riece-debug)
+
+(eval-and-compile
+ (defvar riece-server-keyword-map
+ '((:host)
+ (:service 6667)
+ (:nickname riece-nickname)
+ (:realname riece-realname)
+ (:username riece-username)
+ (:password)
+ (:function riece-default-open-connection-function)
+ (:coding riece-default-coding-system))
+ "Mapping from keywords to default values.
+All keywords that can be used must be listed here."))
+
+(defmacro riece-server-keyword-bind (plist &rest body)
+ "Return a `let' form that binds all variables in PLIST.
+After this is done, BODY will be executed in the scope
+of the `let' form.
+
+The variables bound and their default values are described by
+the `riece-server-keyword-map' variable."
+ `(let ,(mapcar
+ (lambda (keyword)
+ (list (intern (substring (symbol-name (car keyword)) 1))
+ (if (cadr keyword)
+ `(or (plist-get ,plist ',(car keyword))
+ ,(cadr keyword))
+ `(plist-get ,plist ',(car keyword)))))
+ riece-server-keyword-map)
+ ,@body))
+
+(put 'riece-server-keyword-bind 'lisp-indent-function 1)
+(put 'riece-server-keyword-bind 'edebug-form-spec '(form body))
+
+(defun riece-server-parse-string (string)
+ "Convert a STRING set as `riece-server' and return a property list."
+ (when (or (string-match "^\\[\\([^]]+\\)\\]:?\\([0-9]*\\)" string)
+ (string-match "^\\([^:]+\\):?\\([0-9]*\\)" string))
+ (let ((host (match-string 1 string))
+ (service (match-string 2 string))
+ (password (substring string (match-end 0)))
+ plist)
+ (setq plist (cons `(:host ,host) plist))
+ (unless (equal service "")
+ (setq plist (cons `(:service ,(string-to-number service)) plist)))
+ (unless (equal password "")
+ (setq plist (cons `(:password ,(substring password 1)) plist)))
+ (apply #'nconc plist))))
+
+(defun riece-server-name-to-server (server-name)
+ (let ((entry (assoc server-name riece-server-alist)))
+ (if entry
+ (unless (listp (cdr entry))
+ (setcdr entry (riece-server-parse-string (cdr entry))))
+ (setq entry (cons server-name (riece-server-parse-string server-name))
+ riece-server-alist (cons entry riece-server-alist)
+ riece-save-variables-are-dirty t))
+ (cdr entry)))
+
+(defun riece-server-process-name (server-name)
+ (if (equal server-name "")
+ "IRC"
+ (format "IRC<%s>" server-name)))
+
+(defun riece-server-process (server-name)
+ (cdr (assoc server-name riece-server-process-alist)))
+
+(defmacro riece-with-server-buffer (server-name &rest body)
+ `(let ((process (riece-server-process ,server-name)))
+ (if process
+ (with-current-buffer (process-buffer process)
+ ,@body)
+ (error "Server closed"))))
+
+(put 'riece-with-server-buffer 'lisp-indent-function 1)
+(put 'riece-with-server-buffer 'edebug-form-spec '(form body))
+
+(defun riece-make-queue ()
+ "Make a queue object."
+ (vector nil nil))
+
+(defun riece-queue-enqueue (queue object)
+ "Add OBJECT to the end of QUEUE."
+ (if (aref queue 1)
+ (let ((last (list object)))
+ (nconc (aref queue 1) last)
+ (aset queue 1 last))
+ (aset queue 0 (list object))
+ (aset queue 1 (aref queue 0))))
+
+(defun riece-queue-dequeue (queue)
+ "Remove an object from the beginning of QUEUE."
+ (unless (aref queue 0)
+ (error "Empty queue"))
+ (prog1 (car (aref queue 0))
+ (unless (aset queue 0 (cdr (aref queue 0)))
+ (aset queue 1 nil))))
+
+(defun riece-queue-empty (queue)
+ "Return t if QUEUE is empty."
+ (null (aref queue 0)))
+
+;; stolen (and renamed) from time-date.el.
+(defun riece-seconds-to-time (seconds)
+ "Convert SECONDS (a floating point number) to a time value."
+ (list (floor seconds 65536)
+ (floor (mod seconds 65536))
+ (floor (* (- seconds (ffloor seconds)) 1000000))))
+
+;; stolen (and renamed) from time-date.el.
+(defun riece-time-less-p (t1 t2)
+ "Say whether time value T1 is less than time value T2."
+ (or (< (car t1) (car t2))
+ (and (= (car t1) (car t2))
+ (< (nth 1 t1) (nth 1 t2)))))
+
+;; stolen (and renamed) from time-date.el.
+(defun riece-time-since (time)
+ "Return the time elapsed since TIME."
+ (let* ((current (current-time))
+ (rest (when (< (nth 1 current) (nth 1 time))
+ (expt 2 16))))
+ (list (- (+ (car current) (if rest -1 0)) (car time))
+ (- (+ (or rest 0) (nth 1 current)) (nth 1 time)))))
+
+(defun riece-flush-send-queue (process)
+ (with-current-buffer (process-buffer process)
+ (let ((length 0)
+ string)
+ (if (riece-time-less-p (riece-seconds-to-time riece-send-delay)
+ (riece-time-since riece-last-send-time))
+ (setq riece-send-size 0))
+ (while (and (not (riece-queue-empty riece-send-queue))
+ (<= riece-send-size riece-max-send-size))
+ (setq string (riece-queue-dequeue riece-send-queue)
+ length (length string))
+ (if (> length riece-max-send-size)
+ (message "Long message (%d > %d)" length riece-max-send-size)
+ (setq riece-send-size (+ riece-send-size length))
+ (when (<= riece-send-size riece-max-send-size)
+ (process-send-string process string)
+ (setq riece-last-send-time (current-time)))))
+ (unless (riece-queue-empty riece-send-queue)
+ (riece-run-at-time riece-send-delay nil
+ (lambda (process)
+ (if (riece-server-process-opened process)
+ (riece-flush-send-queue process)))
+ process)))))
+
+(defun riece-process-send-string (process string)
+ (with-current-buffer (process-buffer process)
+ (riece-queue-enqueue riece-send-queue string))
+ (riece-flush-send-queue process))
+
+(defun riece-current-server-name ()
+ (or riece-overriding-server-name
+ ;already in the server buffer
+ (if (local-variable-p 'riece-server-name (current-buffer))
+ riece-server-name
+ (if riece-current-channel
+ (riece-identity-server riece-current-channel)
+ (if (riece-server-opened "")
+ "")))))
+
+(defun riece-send-string (string &optional identity)
+ (let* ((server-name (if identity
+ (riece-identity-server identity)
+ (riece-current-server-name)))
+ (process (riece-server-process server-name)))
+ (unless process
+ (error "%s" (substitute-command-keys
+ "Type \\[riece-command-open-server] to open server.")))
+ (riece-process-send-string
+ process
+ (with-current-buffer (process-buffer process)
+ (if identity
+ (riece-encode-coding-string-for-identity string identity)
+ (riece-encode-coding-string string))))))
+
+(defun riece-open-server (server server-name)
+ (let ((protocol (or (plist-get server :protocol)
+ riece-protocol))
+ function
+ process)
+ (condition-case nil
+ (require (intern (concat "riece-" (symbol-name protocol))))
+ (error))
+ (setq function (intern-soft (concat "riece-"
+ (symbol-name protocol)
+ "-open-server")))
+ (unless function
+ (error "\"%S\" is not supported" protocol))
+ (setq process (riece-funcall-ignore-errors (symbol-name function)
+ function server server-name))
+ (when process
+ (with-current-buffer (process-buffer process)
+ (make-local-variable 'riece-protocol)
+ (setq riece-protocol protocol))
+ (setq riece-server-process-alist
+ (cons (cons server-name process)
+ riece-server-process-alist)))))
+
+(defun riece-quit-server-process (process &optional message)
+ (let ((function (intern-soft
+ (concat "riece-"
+ (with-current-buffer (process-buffer process)
+ (symbol-name riece-protocol))
+ "-quit-server-process"))))
+ (if function
+ (funcall function process message))))
+
+(defun riece-reset-process-buffer (process)
+ (with-current-buffer (process-buffer process)
+ (if (fboundp 'set-buffer-multibyte)
+ (set-buffer-multibyte nil))
+ (kill-all-local-variables)
+ (make-local-variable 'riece-real-nickname)
+ (make-local-variable 'riece-last-nickname)
+ (make-local-variable 'riece-nick-accepted)
+ (make-local-variable 'riece-real-server-name)
+ (make-local-variable 'riece-real-userhost)
+ (make-local-variable 'riece-user-at-host)
+ (make-local-variable 'riece-user-at-host-type)
+ (make-local-variable 'riece-supported-user-modes)
+ (make-local-variable 'riece-supported-channel-modes)
+ (make-local-variable 'riece-channel-filter)
+ (make-local-variable 'riece-server-name)
+ (make-local-variable 'riece-read-point)
+ (setq riece-read-point (point-min))
+ (make-local-variable 'riece-filter-running)
+ (make-local-variable 'riece-send-queue)
+ (setq riece-send-queue (riece-make-queue))
+ (make-local-variable 'riece-send-size)
+ (setq riece-send-size 0)
+ (make-local-variable 'riece-last-send-time)
+ (setq riece-last-send-time '(0 0 0))
+ (make-local-variable 'riece-user-obarray)
+ (setq riece-user-obarray (make-vector riece-user-obarray-size 0))
+ (make-local-variable 'riece-channel-obarray)
+ (setq riece-channel-obarray (make-vector riece-channel-obarray-size 0))
+ (make-local-variable 'riece-coding-system)
+ (make-local-variable 'riece-channel-cache)
+ (setq riece-channel-cache (riece-make-cache riece-channel-cache-max-size))
+ (make-local-variable 'riece-user-cache)
+ (setq riece-user-cache (riece-make-cache riece-user-cache-max-size))
+ (buffer-disable-undo)
+ (erase-buffer)))
+
+(defun riece-close-server-process (process)
+ (with-current-buffer (process-buffer process)
+ (run-hooks 'riece-after-close-hook))
+ (kill-buffer (process-buffer process))
+ (setq riece-server-process-alist
+ (delq (rassq process riece-server-process-alist)
+ riece-server-process-alist)))
+
+(defun riece-server-process-opened (process)
+ (not (null (memq (process-status process) '(open run)))))
+
+(defun riece-server-opened (&optional server-name)
+ (if server-name
+ (let ((process (riece-server-process server-name)))
+ (and process
+ (riece-server-process-opened process)))
+ (let ((alist riece-server-process-alist))
+ (catch 'found
+ (while alist
+ (if (riece-server-process-opened (cdr (car alist)))
+ (throw 'found t))
+ (setq alist (cdr alist)))))))
+
+(defun riece-server-properties (server-name)
+ "Return a list of properties associated with SERVER-NAME."
+ (if (equal server-name "")
+ riece-server
+ (let ((entry (assoc server-name riece-server-alist)))
+ (unless entry
+ (error "No such server"))
+ (cdr entry))))
+
+(provide 'riece-server)
+
+;;; riece-server.el ends here
--- /dev/null
+;;; riece-shrink-buffer.el --- free old IRC messages to save memory usage -*- lexical-binding: t -*-
+;; Copyright (C) 1998-2005 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., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
+
+;;; Commentary:
+
+;; NOTE: This is an add-on module for Riece.
+
+;;; Code:
+
+(require 'riece-globals)
+(require 'derived)
+
+(defgroup riece-shrink-buffer nil
+ "Free old IRC messages to save memory usage."
+ :prefix "riece-"
+ :group 'riece)
+
+(defcustom riece-shrink-buffer-idle-time-delay 5
+ "Number of idle seconds to wait before shrinking channel buffers."
+ :type 'integer
+ :group 'riece-shrink-buffer)
+
+(defcustom riece-max-buffer-size 65536
+ "Maximum size of channel buffers."
+ :type '(integer :tag "Number of characters")
+ :group 'riece-shrink-buffer)
+
+(defcustom riece-shrink-buffer-remove-chars (/ riece-max-buffer-size 2)
+ "Number of chars removed when shrinking channel buffers."
+ :type 'integer
+ :group 'riece-shrink-buffer)
+
+(defvar riece-shrink-buffer-idle-timer nil
+ "Timer object to periodically shrink channel buffers.")
+
+(defconst riece-shrink-buffer-description
+ "Free old IRC messages to save memory usage.")
+
+(defun riece-shrink-buffer-idle-timer ()
+ (let ((buffers riece-buffer-list))
+ (while buffers
+ (if (and (get 'riece-shrink-buffer 'riece-addon-enabled)
+ (buffer-live-p (car buffers))
+ (with-current-buffer (car buffers)
+ (riece-derived-mode-p 'riece-dialogue-mode)))
+ (riece-shrink-buffer (car buffers)))
+ (setq buffers (cdr buffers)))))
+
+(defun riece-shrink-buffer (buffer)
+ (save-excursion
+ (set-buffer buffer)
+ (goto-char (point-min))
+ (while (> (buffer-size) riece-max-buffer-size)
+ (let* ((inhibit-read-only t)
+ buffer-read-only
+ (end (progn
+ (goto-char riece-shrink-buffer-remove-chars)
+ (beginning-of-line 2)
+ (point)))
+ (overlays (riece-overlays-in (point-min) end)))
+ (while overlays
+ (riece-delete-overlay (car overlays))
+ (setq overlays (cdr overlays)))
+ (delete-region (point-min) end)))))
+
+(defun riece-shrink-buffer-startup-hook ()
+ (setq riece-shrink-buffer-idle-timer
+ (riece-run-with-idle-timer
+ riece-shrink-buffer-idle-time-delay t
+ 'riece-shrink-buffer-idle-timer)))
+
+(defun riece-shrink-buffer-exit-hook ()
+ (if riece-shrink-buffer-idle-timer
+ (riece-cancel-timer riece-shrink-buffer-idle-timer)))
+
+(defun riece-shrink-buffer-insinuate ()
+ (add-hook 'riece-startup-hook
+ 'riece-shrink-buffer-startup-hook)
+ ;; Reset the timer since riece-shrink-buffer-insinuate will be
+ ;; called before running riece-startup-hook.
+ (unless riece-shrink-buffer-idle-timer
+ (riece-shrink-buffer-startup-hook))
+ (add-hook 'riece-exit-hook
+ 'riece-shrink-buffer-exit-hook))
+
+(defun riece-shrink-buffer-uninstall ()
+ (riece-shrink-buffer-exit-hook)
+ (remove-hook 'riece-startup-hook
+ 'riece-shrink-buffer-startup-hook)
+ (remove-hook 'riece-exit-hook
+ 'riece-shrink-buffer-exit-hook))
+
+(provide 'riece-shrink-buffer)
+
+;;; riece-shrink-buffer.el ends here
--- /dev/null
+;;; riece-signal.el --- "signal-slot" abstraction for routing display events -*- lexical-binding: t -*-
+;; Copyright (C) 1998-2003 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., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
+
+;;; Commentary:
+
+;;; This module implements Qt like "signal-slot" abstraction for
+;;; routing display events.
+
+;;; Code:
+
+(require 'riece-options)
+(require 'riece-debug)
+
+(defvar riece-signal-slot-obarray
+ (make-vector 31 0))
+
+(defun riece-make-slot (function &optional filter handback)
+ "Make an instance of slot object.
+Arguments are corresponding to callback function, filter function, and
+a handback object, respectively.
+This function is for internal use only."
+ (vector function filter handback))
+
+(defun riece-slot-function (slot)
+ "Return the callback function of SLOT.
+This function is for internal use only."
+ (aref slot 0))
+
+(defun riece-slot-filter (slot)
+ "Return the filter function of SLOT.
+This function is for internal use only."
+ (aref slot 1))
+
+(defun riece-slot-handback (slot)
+ "Return the handback object of SLOT.
+This function is for internal use only."
+ (aref slot 2))
+
+(defun riece-make-signal (name args)
+ "Make an instance of signal object.
+The 1st arguments is the name of the signal and the rest of arguments
+are the data of the signal.
+This function is for internal use only."
+ (vector name args))
+
+(defun riece-signal-name (signal)
+ "Return the name of SIGNAL."
+ (aref signal 0))
+
+(defun riece-signal-args (signal)
+ "Return the data of SIGNAL."
+ (aref signal 1))
+
+(defun riece-connect-signal (signal-name function &optional filter handback)
+ "Add FUNCTION as a listener of a signal identified by SIGNAL-NAME."
+ (let ((symbol (intern (symbol-name signal-name) riece-signal-slot-obarray)))
+ (set symbol (cons (riece-make-slot function filter handback)
+ (if (boundp symbol)
+ (symbol-value symbol))))))
+
+(defun riece-disconnect-signal (signal-name function)
+ "Remove FUNCTION from the listener of the signal identified by SIGNAL-NAME."
+ (let* ((symbol (intern-soft (symbol-name signal-name)
+ riece-signal-slot-obarray))
+ (slots (symbol-value symbol)))
+ (while slots
+ (if (eq (riece-slot-function (car slots))
+ function)
+ (set symbol (delq (car slots) (symbol-value symbol))))
+ (setq slots (cdr slots)))))
+
+(defun riece-clear-signal-slots ()
+ "Remove all functions from listeners list."
+ (fillarray riece-signal-slot-obarray 0))
+
+(defun riece-emit-signal (signal-name &rest args)
+ "Emit SIGNAL."
+ (let ((symbol (intern-soft (symbol-name signal-name)
+ riece-signal-slot-obarray))
+ signal
+ slots)
+ (when symbol
+ (setq signal (riece-make-signal signal-name args)
+ slots (symbol-value symbol))
+ (while slots
+ (if (or (null (riece-slot-filter (car slots)))
+ (riece-funcall-ignore-errors (format "signal filter for \"%S\""
+ signal-name)
+ (riece-slot-filter (car slots))
+ signal))
+ (riece-funcall-ignore-errors (format "slot function for \"%S\""
+ signal-name)
+ (riece-slot-function (car slots))
+ signal
+ (riece-slot-handback (car slots))))
+ (setq slots (cdr slots))))))
+
+(provide 'riece-signal)
+
+;;; riece-signal.el ends here
--- /dev/null
+;;; riece-skk-kakutei.el --- remove SKK's preedit mark before sending messages -*- lexical-binding: t -*-
+;; Copyright (C) 2003 TAKAHASHI Kaoru
+
+;; Author: TAKAHASHI Kaoru <kaoru@kaisei.org>
+;; 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., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
+
+;;; Commentary:
+
+;; NOTE: This is an add-on module for Riece.
+
+;;; Code:
+
+(eval-when-compile (require 'riece))
+
+(defvar skk-mode)
+(defvar skk-henkan-mode)
+(defvar skk-henkan-on)
+(defvar skk-egg-like-newline)
+(autoload 'skk-kakutei "skk")
+
+(defconst riece-skk-kakutei-description
+ "Remove SKK's preedit mark before sending messages.")
+
+(defun riece-skk-kakutei-command-enter-message ()
+ "Send the current line to the current channel."
+ (interactive)
+ (when (riece-skk-kakutei)
+ (riece-command-enter-message)))
+
+(defun riece-skk-kakutei-command-enter-message-as-notice ()
+ "Send the current line to the current channel as NOTICE."
+ (interactive)
+ (when (riece-skk-kakutei)
+ (riece-command-enter-message-as-notice)))
+
+(defun riece-skk-kakutei ()
+ "When required after-follow return `t'."
+ (interactive)
+ (cond ((or (not (boundp 'skk-mode)) (not skk-mode))
+ t)
+ ((and (boundp 'skk-henkan-mode) (not skk-henkan-mode))
+ t)
+ ((and (boundp 'skk-henkan-on) (not skk-henkan-on))
+ t)
+ (skk-egg-like-newline
+ (skk-kakutei)
+ nil)
+ (t
+ (skk-kakutei)
+ t)))
+
+(defun riece-skk-kakutei-insinuate ()
+ )
+
+(defun riece-skk-kakutei-enable ()
+ (riece-define-keys riece-command-mode-map
+ "\r" riece-skk-kakutei-command-enter-message
+ [(control return)] riece-skk-kakutei-command-enter-message-as-notice))
+
+(defun riece-skk-kakutei-disable ()
+ (riece-define-keys riece-command-mode-map
+ "\r" riece-command-enter-message
+ [(control return)] riece-command-enter-message-as-notice))
+
+(provide 'riece-skk-kakutei)
+
+;;; riece-skk-kakutei.el ends here
--- /dev/null
+/* XPM */
+static char *bug-buddy[] = {
+/* columns rows colors chars-per-pixel */
+"32 32 139 2",
+" c #1C1D1B",
+". c #1E201C",
+"X c #20221E",
+"o c #262E1F",
+"O c #323A12",
+"+ c #242522",
+"@ c #272824",
+"# c #2A2B26",
+"$ c #2C2D29",
+"% c #2D3129",
+"& c #31342B",
+"* c #35392C",
+"= c #393C2D",
+"- c #343533",
+"; c #363833",
+": c #3A3B36",
+"> c #3A3B39",
+", c #3D412E",
+"< c #3F4235",
+"1 c #3E413A",
+"2 c #414532",
+"3 c #42443E",
+"4 c #464B36",
+"5 c #484D36",
+"6 c #494E3D",
+"7 c #4C5431",
+"8 c #4C533A",
+"9 c #515A2D",
+"0 c #50573D",
+"q c #51583F",
+"w c #65591F",
+"e c #444443",
+"r c #444840",
+"t c #494C45",
+"y c #4B4C4A",
+"u c #4C5344",
+"i c #505247",
+"p c #50544C",
+"a c #545B41",
+"s c #54584F",
+"d c #585B4E",
+"f c gray33",
+"g c #565951",
+"h c #595C54",
+"j c #5C5C5C",
+"k c #5A6246",
+"l c #5C6B4F",
+"z c #5C6256",
+"x c #606547",
+"c c #61664B",
+"v c #636B4B",
+"b c #616656",
+"n c #62655A",
+"m c #656854",
+"M c #68714D",
+"N c #6B7251",
+"B c #70735C",
+"V c #727955",
+"C c #777E59",
+"Z c #787D57",
+"A c #787D59",
+"S c #646464",
+"D c #6B6E62",
+"F c #6C6C6C",
+"G c #717468",
+"H c #747473",
+"J c #777877",
+"K c #787A73",
+"L c #7B7B7B",
+"P c #7B825B",
+"I c #80865E",
+"U c #918656",
+"Y c #9C954F",
+"T c #949658",
+"R c #858B63",
+"E c #808B68",
+"W c #888F65",
+"Q c #80817E",
+"! c #8E946B",
+"~ c #869675",
+"^ c #91986D",
+"/ c #969C72",
+"( c #989F75",
+") c #9A9F7A",
+"_ c #9CA37A",
+"` c #A0A67D",
+"' c #A5AA7F",
+"] c #838383",
+"[ c #878986",
+"{ c #8B8C84",
+"} c #8C8C8C",
+"| c #9A9F89",
+" . c #919191",
+".. c gray62",
+"X. c #A2A588",
+"o. c #A4AB84",
+"O. c #A1A495",
+"+. c #A1A29F",
+"@. c #A8AC91",
+"#. c #ACB18B",
+"$. c #B0B690",
+"%. c #B5B996",
+"&. c #B5B99B",
+"*. c #B8BC9C",
+"=. c #A3A3A3",
+"-. c #ACACAC",
+";. c #B4B7A3",
+":. c #B4B6A8",
+">. c #BDBFA5",
+",. c #BBBEAC",
+"<. c #B3B3B3",
+"1. c #BABBB7",
+"2. c #BABBBA",
+"3. c #BFC1A8",
+"4. c #C2C4AC",
+"5. c #C5CBAD",
+"6. c #CAC6AF",
+"7. c #C3C7B1",
+"8. c #C5CAB2",
+"9. c #C8CCB5",
+"0. c #CED1BC",
+"q. c #D1D3BE",
+"w. c #C3C3C3",
+"e. c #CDCDC4",
+"r. c #CCCCCC",
+"t. c #D2D5C3",
+"y. c #D6D8C4",
+"u. c #D9D6C4",
+"i. c #D9DBC9",
+"p. c #D1D1D1",
+"a. c #D9D9D7",
+"s. c #DCDCDC",
+"d. c #E2E2DF",
+"f. c #E8E5DA",
+"g. c #E3E3E3",
+"h. c #ECECEB",
+"j. c #F3F3F3",
+"k. c #FEFEFE",
+"l. c None",
+/* pixels */
+"l.l.l.l.l.l.l.l.l.l.l.k.k.l.l.l.l.l.l.l.l.l.l.l.l.l.l.l.l.l.l.l.",
+"l.l.l.l.l.l.l.l.l.l.k.r.h.l.l.l.l.l.l.l.l.l.l.l.l.l.l.l.l.l.l.l.",
+"l.l.l.l.l.l.l.l.l.k.p.] g.k.l.l.l.l.l.l.l.l.l.l.l.l.l.l.l.l.l.l.",
+"l.l.l.l.l.l.l.l.l.j.} } g.k.l.l.l.l.l.l.l.l.l.l.l.l.l.l.l.l.l.l.",
+"l.l.l.l.l.l.l.l.l.h.J =.g.f.u.8.g.k.k.k.k.l.l.l.k.l.l.l.l.l.l.l.",
+"l.l.l.l.l.l.l.l.l.g.j } 2.U Y w J a.e.h.j.k.l.l.h.k.l.l.l.l.l.l.",
+"l.l.l.l.l.l.l.l.l.p.e H { c B B u 7 T A r.h.k.r.1.k.l.l.l.l.l.l.",
+"l.l.l.l.l.l.l.l.l.r.: K | #.5.8.~ l 9 O L g.h.<.=.k.l.l.l.l.l.l.",
+"l.l.l.l.l.l.l.l.l.g.D ;.4.3.%.#.X.P a o H w.g.=.[ j.l.l.l.l.l.l.",
+"l.l.l.l.l.l.l.l.k.d.7.9.9.8.3.X._ / C k [ -.-.Q 2.s.k.l.l.l.l.l.",
+"l.l.l.l.l.l.k.l.h.q.0.y.y.0.;.h o._ R A G F - J ..r.k.l.l.l.l.l.",
+"l.l.l.l.j.p...2.t.9.0.i.i.y.K r #._ W A k + > F -.h.l.l.l.l.l.l.",
+"l.l.l.j.=.y 3 n *.4.q.y.i.O.1 s $._ R C x > f ] s.k.l.l.l.l.l.l.",
+"l.l.j.-.H ] =.@.*.4.7.0.,.g t z #._ I V x t S =.h.k.l.l.l.l.l.l.",
+"l.l.w.H ..1.:._ #.%.4.4.D > g n ' ! P M k i H 1.h.k.l.l.l.l.l.l.",
+"l.l.r.F -.g.X.! _ #.%.X.& t h m / R C M a f Q 1.g.k.l.l.l.l.l.l.",
+"l.l.2.J 1.1.P I ! ( ) 8 1 h p m R A M k 8 h [ <.h.j.l.l.l.l.l.l.",
+"l.k.a.<.2.G M V P W N @ t z u c Z N k 8 4 e ] <.g.j.l.l.l.l.l.l.",
+"l.k.j.h.K 2 a v N V % - h g 3 k v k q 5 3 $ > .g.k.l.l.l.l.l.l.",
+"l.k.j.w.y 6 8 q k 8 + 1 h p < q a 8 4 2 1 e - f s.j.l.l.l.l.l.l.",
+"l.j.s.] ] s 2 5 8 $ # y p 3 * 8 4 4 , = r j j e r.k.l.l.l.l.l.l.",
+"l.k.=.H =.n = , * . ; p t 1 % 2 , = & * y F L e -.g.k.l.l.l.l.l.",
+"l.k. .j 1.Q % * X > t > $ # * & % % # j Q S S 1.g.l.l.l.l.l.l.",
+"l.l. .L r.1.; % X . ; 3 - + # & % % @ . j . .-.s.k.l.l.l.l.l.l.",
+"l.k.=.w.h.s.H 3 e $ $ + $ $ $ $ $ @ S -.s.h.k.l.l.l.l.l.l.l.",
+"l.k.g.j.k.h.w.] L y $ $ + $ $ $ $ e e > F 2.j.k.l.l.l.l.l.l.l.l.",
+"l.l.l.l.l.j.g.p.-.} H j f - & > j L S S L r.k.l.l.l.l.l.l.l.l.l.",
+"l.l.l.l.l.k.k.h.p.1...} F j S H } .S L .r.k.l.l.l.l.l.l.l.l.l.",
+"l.l.l.l.l.l.l.k.j.j.s.r.<.<.-.<.<.F S ..1.g.l.l.l.l.l.l.l.l.l.l.",
+"l.l.l.l.l.l.l.l.k.j.j.h.g.s.s.s.<.H w.a.h.k.l.l.l.l.l.l.l.l.l.l.",
+"l.l.l.l.l.l.l.l.l.l.l.k.k.k.k.j.a.p.k.k.l.l.l.l.l.l.l.l.l.l.l.l.",
+"l.l.l.l.l.l.l.l.l.l.l.l.l.l.k.k.j.k.l.l.l.l.l.l.l.l.l.l.l.l.l.l."
+};
--- /dev/null
+;;; riece-toolbar.el --- display toolbar icons -*- lexical-binding: t -*-
+;; 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., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
+
+;;; Commentary:
+
+;; Image files are taken from stock icons:
+
+;; riece-command-next-channel.xpm gtk-go-forward
+;; riece-command-previous-channel.xpm gtk-go-back
+;; riece-command-configure-windows.xpm gtk-refresh
+;; riece-command-list-addons gtk-preferences
+;; riece-command-join gtk-new
+;; riece-command-part gtk-close
+
+;; NOTE: This is an add-on module for Riece.
+
+;;; Code:
+
+(require 'riece-menu)
+
+(defconst riece-toolbar-description
+ "Display toolbar icons.")
+
+(defvar riece-toolbar-items
+ '((riece-command-previous-channel . "left-arrow")
+ (riece-command-next-channel . "right-arrow")
+ (riece-command-configure-windows . "refresh")
+ (riece-command-join . "new")
+ (riece-command-part . "close")
+ (riece-command-list-addons . "preferences")))
+
+(defun riece-toolbar-find-menu-item (command)
+ (let ((pointer riece-menu-items)
+ item)
+ (while pointer
+ (if (and (not (stringp (car pointer)))
+ (vectorp (car pointer))
+ (eq (aref (car pointer) 1) command))
+ (setq item (car pointer)
+ pointer nil)
+ (setq pointer (cdr pointer))))
+ item))
+
+(eval-and-compile
+ (if (featurep 'xemacs)
+ (if (featurep 'toolbar)
+ (progn
+ (defun riece-make-toolbar-from-menu (items _menu-items _map)
+ (let ((pointer items)
+ toolbar
+ file
+ menu-item)
+ (while pointer
+ (setq file (locate-file (symbol-name (car (car pointer)))
+ (cons riece-data-directory load-path)
+ '(".xpm" ".pbm" ".xbm"))
+ menu-item (riece-toolbar-find-menu-item
+ (car (car pointer))))
+ (if (and file (file-exists-p file))
+ (setq toolbar
+ (toolbar-add-item
+ toolbar
+ (toolbar-new-button
+ file
+ (car (car pointer))
+ (if menu-item
+ (aref menu-item 0)
+ (symbol-name (car (car pointer))))))))
+ (setq pointer (cdr pointer)))
+ toolbar))
+ (defvar riece-toolbar-original-toolbar nil)
+ (defun riece-set-toolbar (toolbar)
+ (make-local-variable 'riece-toolbar-original-toolbar)
+ (setq riece-toolbar-original-toolbar
+ (specifier-specs default-toolbar (current-buffer)))
+ (set-specifier default-toolbar toolbar (current-buffer)))
+ (defun riece-unset-toolbar ()
+ (if riece-toolbar-original-toolbar
+ (set-specifier default-toolbar riece-toolbar-original-toolbar
+ (current-buffer))
+ (remove-specifier default-toolbar (current-buffer)))
+ (kill-local-variable 'riece-toolbar-original-toolbar)))
+ (defalias 'riece-make-toolbar-from-menu 'ignore)
+ (defalias 'riece-set-toolbar 'ignore)
+ (defalias 'riece-unset-toolbar 'ignore))
+ (defun riece-make-toolbar-from-menu (items _menu-items map)
+ (let ((pointer items)
+ (tool-bar-map (make-sparse-keymap)))
+ (while pointer
+ (tool-bar-add-item-from-menu (car (car pointer))
+ (cdr (car pointer))
+ map)
+ (setq pointer (cdr pointer)))
+ tool-bar-map))
+ (defun riece-set-toolbar (toolbar)
+ (make-local-variable 'tool-bar-map)
+ (setq tool-bar-map toolbar))
+ (defun riece-unset-toolbar ()
+ (kill-local-variable 'tool-bar-map))))
+
+(defvar riece-command-mode-map)
+(defun riece-toolbar-command-mode-hook ()
+ (riece-set-toolbar
+ (riece-make-toolbar-from-menu
+ riece-toolbar-items
+ riece-menu-items
+ riece-command-mode-map)))
+
+(defun riece-toolbar-requires ()
+ '(riece-menu))
+
+(defun riece-toolbar-insinuate ()
+ (if riece-command-buffer
+ (with-current-buffer riece-command-buffer
+ (riece-toolbar-command-mode-hook)))
+ (add-hook 'riece-command-mode-hook
+ 'riece-toolbar-command-mode-hook t))
+
+(defun riece-toolbar-uninstall ()
+ (if riece-command-buffer
+ (with-current-buffer riece-command-buffer
+ (riece-unset-toolbar)))
+ (remove-hook 'riece-command-mode-hook
+ 'riece-toolbar-command-mode-hook))
+
+(provide 'riece-toolbar)
+
+;;; riece-toolbar.el ends here
--- /dev/null
+;;; riece-twitter.el --- post your status to Twitter -*- lexical-binding: t -*-
+;; Copyright (C) 2007 Daiki Ueno
+
+;; Author: Daiki Ueno <ueno@unixuser.org>
+;; 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., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
+
+;;; Commentary:
+
+;; NOTE: This is an add-on module for Riece.
+
+;;; Code:
+
+(require 'riece-message)
+
+(defgroup riece-twitter nil
+ "Post your status to Twitter"
+ :group 'riece)
+
+(defcustom riece-twitter-credential nil
+ "Your credential used to login to Twitter."
+ :group 'riece-twitter
+ :type 'string)
+
+(eval-and-compile
+ (if (fboundp 'clear-string)
+ (defalias 'riece-twitter-clear-string 'clear-string)
+ (defun riece-twitter-clear-string (string)
+ (fillarray string ?\0))))
+
+(defun riece-twitter-set-credential (credential)
+ "Set your credential used to login to Twitter."
+ (interactive
+ (let ((username (read-string "Username: "))
+ password)
+ (unwind-protect
+ (list (concat username ":"
+ (setq password (read-passwd "Password: "))))
+ (if password
+ (riece-twitter-clear-string password))
+ (setq password nil))))
+ (setq riece-twitter-credential credential))
+
+(defun riece-twitter-update (status)
+ "Update your status."
+ (interactive
+ (progn
+ (unless riece-twitter-credential
+ (error "%s"
+ (substitute-command-keys
+ "\\[riece-twitter-set-credential] to set your credential")))
+ (list (read-string "Status: "))))
+ (message "Sending to Twitter...")
+ (let* ((args
+ (list "-u" riece-twitter-credential
+ "-d" (concat "status="
+ (riece-twitter-escape-string
+ (encode-coding-string status 'utf-8)))
+ "-s"
+ "http://twitter.com/statuses/update.json"))
+ (process
+ (apply #'start-process
+ "curl" nil "curl"
+ (if (interactive-p)
+ args
+ (append args
+ (list "-H" "X-Twitter-Client: Riece"
+ "-H" (concat "X-Twitter-Client-Version: "
+ riece-version-number)
+ "-H" "X-Twitter-Client-URL: http://riece.nongnu.org/twitter.xml"
+ "-d" "source=riece"))))))
+ (set-process-sentinel process #'riece-twitter-sentinel)))
+
+(defun riece-twitter-sentinel (_process status)
+ (if (equal status "finished\n")
+ (message "Sending to Twitter...done")
+ (message "Sending to Twitter...failed: %s"
+ (substring status 0 (1- (length status))))))
+
+(defun riece-twitter-message-filter (message)
+ (if (and (riece-message-own-p message)
+ (eq 'action (riece-message-type message)))
+ (if riece-twitter-credential
+ (riece-twitter-update (riece-message-text message))
+ (message "%s"
+ (substitute-command-keys
+ "\\[riece-twitter-set-credential] to set your credential"))))
+ message)
+
+(defun riece-twitter-escape-string (string)
+ (let ((index 0))
+ (while (string-match "[^0-9A-Za-z\-\._~:/?@!\$'()*,]" string index)
+ (setq string (replace-match
+ (format "%%%02X" (aref string (match-beginning 0)))
+ t t string)
+ index (+ 3 (match-beginning 0))))
+ string))
+
+(defun riece-twitter-insinuate ()
+ (add-hook 'riece-message-filter-functions 'riece-twitter-message-filter))
+
+(defun riece-twitter-uninstall ()
+ (remove-hook 'riece-message-filter-functions 'riece-twitter-message-filter))
+
+(provide 'riece-twitter)
+
+;;; riece-twitter.el ends here
--- /dev/null
+;;; riece-unread.el --- mark channels where new messages arrived -*- lexical-binding: t -*-
+;; Copyright (C) 1998-2003 Daiki Ueno
+
+;; Author: Daiki Ueno <ueno@unixuser.org>
+;; 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., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
+
+;;; Commentary:
+
+;; NOTE: This is an add-on module for Riece.
+
+;; This add-on marks channels where new messages arrived.
+
+;; You can check the unread channels via `C-c g' in the commands
+;; buffer, by adding the following lines to ~/.riece/init.el:
+
+;; (add-hook 'riece-guess-channel-try-functions
+;; 'riece-guess-channel-from-unread)
+
+;;; Code:
+
+(require 'riece-message)
+(require 'riece-commands)
+(require 'riece-signal)
+(require 'riece-highlight)
+
+(defgroup riece-unread nil
+ "Mark unread channels."
+ :tag "Unread"
+ :prefix "riece-"
+ :group 'riece)
+
+(defface riece-channel-list-unread-face
+ '((((class color)
+ (background dark))
+ (:foreground "orange"))
+ (((class color)
+ (background light))
+ (:foreground "firebrick"))
+ (t
+ (:bold t)))
+ "Face used for displaying unread channels."
+ :group 'riece-highlight-faces)
+(defvar riece-channel-list-unread-face 'riece-channel-list-unread-face)
+
+(unless (riece-facep 'riece-modeline-unread-face)
+ ;; In Emacs, set-face-doc-string is an alias to
+ ;; set-face-documentation, but we use the former since it is
+ ;; available in both Emacs and XEmacs.
+ (make-face 'riece-modeline-unread-face)
+ (set-face-doc-string
+ 'riece-modeline-unread-face
+ "Face used for displaying unread channels in modeline.")
+ (if (featurep 'xemacs)
+ (set-face-parent 'riece-modeline-unread-face 'modeline))
+ (set-face-foreground 'riece-modeline-unread-face
+ (face-foreground 'riece-channel-list-unread-face)))
+
+(defvar riece-unread-channels nil)
+
+(defconst riece-unread-description
+ "Mark channels where new messages arrived.")
+
+(defun riece-unread-after-display-message-function (message)
+ (if (get 'riece-unread 'riece-addon-enabled)
+ (let ((target (if (riece-message-private-p message)
+ (riece-message-speaker message)
+ (riece-message-target message))))
+ (unless (or (riece-message-own-p message)
+ (riece-message-type message)
+ (riece-identity-equal target riece-current-channel)
+ (riece-identity-member target riece-unread-channels))
+ (setq riece-unread-channels (cons target riece-unread-channels))
+ (riece-emit-signal 'channel-list-changed)))))
+
+(defun riece-unread-after-switch-to-channel-function (_last)
+ (if (get 'riece-unread 'riece-addon-enabled)
+ (setq riece-unread-channels
+ (delq (car (riece-identity-member riece-current-channel
+ riece-unread-channels))
+ riece-unread-channels))))
+
+(defun riece-unread-format-identity-for-channel-list-buffer (index identity)
+ (if (and (get 'riece-unread 'riece-addon-enabled)
+ (riece-identity-member identity riece-unread-channels))
+ (concat (format "%2d:!" index)
+ (riece-format-identity identity))))
+
+(defun riece-unread-format-identity-for-channel-list-indicator (index identity)
+ (if (and (get 'riece-unread 'riece-addon-enabled)
+ (riece-identity-member identity riece-unread-channels))
+ (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)))
+ (list (format "%d:" index)
+ (riece-propertize-modeline-string
+ string 'face 'riece-modeline-unread-face)))))
+
+(defun riece-unread-switch-to-channel ()
+ (interactive)
+ (if riece-unread-channels
+ (let ((channel (car riece-unread-channels)))
+ (if (riece-identity-member channel riece-current-channels)
+ (riece-command-switch-to-channel channel)
+ (setq riece-unread-channels
+ (delete channel riece-unread-channels))
+ (riece-unread-switch-to-channel)))
+ (error "No unread channel!")))
+
+(defun riece-guess-channel-from-unread ()
+ (reverse riece-unread-channels))
+
+(defun riece-unread-requires ()
+ (let (requires)
+ (if (memq 'riece-highlight riece-addons)
+ (setq requires (cons 'riece-highlight requires)))
+ ;; To override riece-history's channel mark in the channel list buffer.
+ (if (memq 'riece-history riece-addons)
+ (setq requires (cons 'riece-history requires)))
+;;; (if (memq 'riece-guess riece-addons)
+;;; (setq requires (cons 'riece-guess requires)))
+ requires))
+
+(defun riece-unread-insinuate ()
+ (add-hook 'riece-after-display-message-functions
+ 'riece-unread-after-display-message-function)
+ (add-hook 'riece-after-switch-to-channel-functions
+ 'riece-unread-after-switch-to-channel-function)
+ (add-hook 'riece-format-identity-for-channel-list-buffer-functions
+ 'riece-unread-format-identity-for-channel-list-buffer)
+ (add-hook 'riece-format-identity-for-channel-list-indicator-functions
+ 'riece-unread-format-identity-for-channel-list-indicator)
+ (if (memq 'riece-highlight riece-addons)
+ (setq riece-channel-list-mark-face-alist
+ (cons '(?! . riece-channel-list-unread-face)
+ riece-channel-list-mark-face-alist)))
+;;; (if (memq 'riece-guess riece-addons)
+;;; (add-hook 'riece-guess-channel-try-functions
+;;; 'riece-guess-channel-from-unread))
+ )
+
+(defun riece-unread-uninstall ()
+ (remove-hook 'riece-after-display-message-functions
+ 'riece-unread-after-display-message-function)
+ (remove-hook 'riece-after-switch-to-channel-functions
+ 'riece-unread-after-switch-to-channel-function)
+ (remove-hook 'riece-format-identity-for-channel-list-buffer-functions
+ 'riece-unread-format-identity-for-channel-list-buffer)
+ (remove-hook 'riece-format-identity-for-channel-list-indicator-functions
+ 'riece-unread-format-identity-for-channel-list-indicator)
+ (setq riece-channel-list-mark-face-alist
+ (delq (assq ?! riece-channel-list-mark-face-alist)
+ riece-channel-list-mark-face-alist))
+;;; (if (memq 'riece-guess riece-addons)
+;;; (add-hook 'riece-guess-channel-try-functions
+;;; 'riece-guess-channel-from-unread))
+ )
+
+(defvar riece-command-mode-map)
+(defvar riece-dialogue-mode-map)
+(defvar riece-channel-list-mode-map)
+(defun riece-unread-enable ()
+ (define-key riece-command-mode-map
+ "\C-c\C-u" 'riece-unread-switch-to-channel)
+ (define-key riece-dialogue-mode-map
+ "u" 'riece-unread-switch-to-channel)
+ (define-key riece-channel-list-mode-map
+ "u" 'riece-unread-switch-to-channel)
+ (riece-emit-signal 'channel-list-changed))
+
+(defun riece-unread-disable ()
+ (define-key riece-command-mode-map
+ "\C-c\C-u" nil)
+ (define-key riece-dialogue-mode-map
+ "u" nil)
+ (define-key riece-channel-list-mode-map
+ "u" nil)
+ (setq riece-unread-channels nil)
+ (riece-emit-signal 'channel-list-changed))
+
+(provide 'riece-unread)
+
+;;; riece-unread.el ends here
--- /dev/null
+;;; riece-url.el --- collect URL in IRC buffers -*- lexical-binding: t -*-
+;; Copyright (C) 1998-2003 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., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
+
+;;; Commentary:
+
+;; NOTE: This is an add-on module for Riece.
+
+;;; Code:
+
+(require 'riece-options)
+(require 'riece-menu) ;riece-menu-items
+(require 'easymenu)
+
+(autoload 'browse-url "browse-url")
+(defvar browse-url-browser-function)
+
+(defgroup riece-url nil
+ "URL Browsing in IRC buffer."
+ :prefix "riece-"
+ :group 'riece)
+
+;; the default value was copied from gnus-button-url-regexp
+(defcustom riece-url-regexp
+ (concat
+ "\\b\\(\\(www\\.\\|\\(s?https?\\|ftp\\|file\\|gopher\\|"
+ "nntp\\|news\\|telnet\\|wais\\|mailto\\|info\\):\\)"
+ "\\(//[-a-z0-9_.]+:[0-9]*\\)?"
+ (if (string-match "[[:digit:]]" "1") ;; Support POSIX?
+ (let ((chars "-a-z0-9_=#$@~%&*+\\/[:word:]")
+ (punct "!?:;.,"))
+ (concat
+ "\\(?:"
+ ;; Match paired parentheses, e.g. in Wikipedia URLs:
+ ;; http://thread.gmane.org/47B4E3B2.3050402@gmail.com
+ "[" chars punct "]+" "(" "[" chars punct "]+" "[" chars "]*)" "[" chars "]*"
+ "\\|"
+ "[" chars punct "]+" "[" chars "]"
+ "\\)"))
+ (concat ;; XEmacs 21.4 doesn't support POSIX.
+ "\\([-a-z0-9_=!?#$@~%&*+\\/:;.,]\\|\\w\\)+"
+ "\\([-a-z0-9_=#$@~%&*+\\/]\\|\\w\\)"))
+ "\\)")
+ "Regular expression that matches URLs."
+ :group 'riece-url
+ :type 'regexp)
+
+(defcustom riece-url-regexp-alist nil
+ "An alist mapping regexp to URL.
+For example:
+ (setq riece-url-regexp-alist
+ '((\"\\\\bBug#\\\\([0-9]+\\\\)\\\\b\" .
+ \"http://bugs.debian.org/\\\\1\")))
+
+This maps a string \"Bug#12345\" to a URL
+\"http://bugs.debian.org/12345\"."
+ :type 'alist
+ :group 'riece-url)
+
+(defvar riece-urls nil
+ "A list of URL which appears in Riece buffers.")
+
+(defconst riece-url-description
+ "Collect URL in IRC buffers.")
+
+(autoload 'widget-convert-button "wid-edit")
+
+(defun riece-url-replace-match (string)
+ (let ((match-data (match-data))
+ (index 0)
+ number
+ replacement)
+ (while (string-match "\\\\[&1-9\\\\]" string index)
+ (if (eq (aref string (1+ (match-beginning 0))) ?&)
+ (setq number 0)
+ (unless (eq (aref string (1+ (match-beginning 0))) ?\\)
+ (setq number (string-to-number (substring (match-string 0 string)
+ 1)))))
+ (if number
+ (setq replacement
+ (buffer-substring (nth (* number 2) match-data)
+ (nth (1+ (* number 2)) match-data)))
+ (setq replacement "\\"))
+ (setq string (concat (substring string 0 (match-beginning 0))
+ replacement
+ (substring string (match-end 0)))
+ index (+ index (length replacement))))
+ string))
+
+(defun riece-url-scan-region (start end)
+ (let ((alist (cons (cons riece-url-regexp "\\&")
+ riece-url-regexp-alist)))
+ (while alist
+ (save-excursion
+ (goto-char start)
+ (while (re-search-forward (car (car alist)) end t)
+ (let ((url (save-match-data
+ (riece-url-replace-match (cdr (car alist))))))
+ (if (memq 'riece-highlight riece-addons)
+ (widget-convert-button
+ 'url-link (match-beginning 0) (match-end 0) url))
+ (unless (member url riece-urls)
+ (setq riece-urls (cons url riece-urls))))))
+ (setq alist (cdr alist)))))
+
+(defun riece-command-browse-url (&optional url)
+ (interactive
+ (list (completing-read (riece-mcat "Open URL: ")
+ (mapcar #'list riece-urls))))
+ (browse-url url))
+
+(defun riece-url-create-menu (_menu)
+ (mapcar (lambda (url)
+ (vector url (list 'browse-url url)))
+ riece-urls))
+
+(defvar riece-dialogue-mode-map)
+
+(defun riece-url-requires ()
+ (append (if (memq 'riece-highlight riece-addons)
+ '(riece-highlight))
+ (if (memq 'riece-menu riece-addons)
+ '(riece-menu))))
+
+(defun riece-url-command-mode-hook ()
+ (easy-menu-add-item
+ nil (list (car riece-menu-items))
+ (list (if (featurep 'xemacs)
+ "Open URL..."
+ (riece-mcat "Open URL..."))
+ :filter 'riece-url-create-menu)))
+
+(defun riece-url-insinuate ()
+ (add-hook 'riece-after-insert-functions 'riece-url-scan-region)
+ (if (memq 'riece-menu riece-addons)
+ (add-hook 'riece-command-mode-hook
+ 'riece-url-command-mode-hook
+ t)))
+
+(defun riece-url-uninstall ()
+ (easy-menu-remove-item
+ nil (list (car riece-menu-items))
+ (if (featurep 'xemacs)
+ "Open URL..."
+ (riece-mcat "Open URL...")))
+ (remove-hook 'riece-after-insert-functions 'riece-url-scan-region)
+ (remove-hook 'riece-command-mode-hook
+ 'riece-url-command-mode-hook))
+
+(defun riece-url-enable ()
+ (define-key riece-dialogue-mode-map "U" 'riece-command-browse-url))
+
+(defun riece-url-disable ()
+ (define-key riece-dialogue-mode-map "U" nil))
+
+(provide 'riece-url)
+
+;;; riece-url.el ends here
--- /dev/null
+;;; riece-user.el --- a user object -*- lexical-binding: t -*-
+;; Copyright (C) 1998-2003 Daiki Ueno
+
+;; Author: Daiki Ueno <ueno@unixuser.org>
+;; 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., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
+
+;;; Code:
+
+(require 'riece-identity)
+(require 'riece-mode)
+(require 'riece-cache)
+
+;;; User object:
+(defun riece-find-user (name)
+ "Get a user object named NAME from the server buffer."
+ (riece-cache-get riece-user-cache name)
+ (let ((symbol (intern-soft (riece-identity-canonicalize-prefix name)
+ riece-user-obarray)))
+ (if symbol
+ (symbol-value symbol))))
+
+(defun riece-forget-user (name)
+ (riece-cache-delete riece-user-cache name)
+ (let ((symbol (intern-soft (riece-identity-canonicalize-prefix name))))
+ (when symbol
+ (makunbound symbol)
+ (unintern (symbol-name symbol) riece-user-obarray))))
+
+(defun riece-rename-user (old-name new-name)
+ (riece-cache-delete riece-user-cache old-name)
+ (riece-cache-set riece-user-cache new-name new-name)
+ (unless (equal (riece-identity-canonicalize-prefix old-name)
+ (riece-identity-canonicalize-prefix new-name))
+ (let ((symbol (intern-soft (riece-identity-canonicalize-prefix old-name)
+ riece-user-obarray)))
+ (when symbol
+ (set (intern (riece-identity-canonicalize-prefix new-name)
+ riece-user-obarray)
+ (symbol-value symbol))
+ (makunbound symbol)
+ (unintern (symbol-name symbol) riece-user-obarray)))))
+
+(defun riece-make-user (channels user-at-host modes away operator)
+ "Make an instance of user object.
+Arguments are appropriate to joined channels, user-at-host, mode, and
+away status, respectively."
+ (vector channels user-at-host modes away operator))
+
+(defun riece-get-user (name)
+ (let ((symbol (intern-soft (riece-identity-canonicalize-prefix name)
+ riece-user-obarray)))
+ (if symbol
+ (progn
+ (riece-cache-get riece-user-cache name)
+ (symbol-value symbol))
+ (riece-cache-set riece-user-cache name name)
+ (set (intern (riece-identity-canonicalize-prefix name)
+ riece-user-obarray)
+ (riece-make-user nil nil nil nil nil)))))
+
+(defun riece-user-channels (user)
+ "Return joined channels of USER."
+ (aref user 0))
+
+(defun riece-user-user-at-host (user)
+ "Return the user-at-host of USER."
+ (aref user 1))
+
+(defun riece-user-modes (user)
+ "Return the modes of USER."
+ (aref user 2))
+
+(defun riece-user-away (user)
+ "Return t, if USER has been marked as away."
+ (aref user 3))
+
+(defun riece-user-operator (user)
+ "Return t, if USER has operator privilege."
+ (aref user 4))
+
+(defun riece-user-set-channels (user value)
+ "Set the joined channels of USER to VALUE."
+ (aset user 0 value))
+
+(defun riece-user-set-user-at-host (user value)
+ "Set the user-at-host of USER to VALUE."
+ (aset user 1 value))
+
+(defun riece-user-set-modes (user value)
+ "Set the modes of USER to VALUE."
+ (aset user 2 value))
+
+(defun riece-user-set-away (user value)
+ "Set the away status of USER to VALUE."
+ (aset user 3 value))
+
+(defun riece-user-set-operator (user value)
+ "Set the operator status of USER to VALUE."
+ (aset user 4 value))
+
+(defun riece-user-get-channels (name)
+ (riece-user-channels (riece-get-user name)))
+
+(defun riece-user-get-user-at-host (name)
+ (riece-user-user-at-host (riece-get-user name)))
+
+(defun riece-user-get-modes (name)
+ (riece-user-modes (riece-get-user name)))
+
+(defun riece-user-get-away (name)
+ (riece-user-away (riece-get-user name)))
+
+(defun riece-user-get-operator (name)
+ (riece-user-operator (riece-get-user name)))
+
+(defun riece-user-toggle-channel (name channel flag)
+ "Add or remove the joined channel of user."
+ (let* ((user (riece-get-user name))
+ (channels (riece-user-channels user)))
+ (if flag
+ (unless (member channel channels)
+ (riece-user-set-channels user (cons channel channels)))
+ (if (setq channel (car (member channel channels)))
+ (riece-user-set-channels user (delq channel channels))))))
+
+(defun riece-user-toggle-mode (name mode flag)
+ "Add or remove user MODE of user."
+ (let* ((user (riece-get-user name))
+ (modes (riece-user-modes user))
+ (old (riece-mode-assoc (riece-mode-flag mode) modes)))
+ (if flag
+ (unless old
+ (riece-user-set-modes user (cons mode modes)))
+ (if old
+ (riece-user-set-modes user (delq mode modes))))))
+
+(defun riece-user-toggle-away (name flag)
+ (riece-user-set-away (riece-get-user name) flag))
+
+(defun riece-user-toggle-operator (name flag)
+ (riece-user-set-operator (riece-get-user name) flag))
+
+(provide 'riece-user)
+
+;;; riece-user.el ends here
--- /dev/null
+;;; riece-version.el --- version information handling -*- lexical-binding: t -*-
+;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+;; Free Software Foundation, Inc.
+;; Copyright (C) 1998-2003 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., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
+
+;;; Code:
+
+(require 'riece-package-info)
+
+;; NOTE: Most part of this file is copied from Gnus.
+
+(defcustom riece-user-agent 'emacs-riece-type
+ "Which information should be exposed in the User-Agent header.
+
+It can be one of the symbols `riece' \(show only Riece version\), `emacs-riece'
+\(show only Emacs and Riece versions\), `emacs-riece-config' \(same as
+`emacs-riece' plus system configuration\), `emacs-riece-type' \(same as
+`emacs-riece' plus system type\) or a custom string. If you set it to a
+string, be sure to use a valid format, see RFC 2616."
+ :group 'riece-options
+ :type '(choice
+ (item :tag "Show Riece and Emacs versions and system type"
+ emacs-riece-type)
+ (item :tag "Show Riece and Emacs versions and system configuration"
+ emacs-riece-config)
+ (item :tag "Show Riece and Emacs versions" emacs-riece)
+ (item :tag "Show only Riece version" riece)
+ (string :tag "Other")))
+
+(defconst riece-version (format "%s v%s" riece-package-name
+ riece-version-number)
+ "Version string for this version of Riece.")
+
+(eval-when-compile
+ (defvar emacs-program-version)
+ (defvar xemacs-codename)
+ (defvar sxemacs-codename))
+
+(defun riece-extended-version ()
+ "Stringified Riece version and Emacs version.
+See the variable `riece-user-agent'."
+ (let* ((riece-v
+ (concat riece-package-name "/"
+ (prin1-to-string riece-version-number t)))
+ (system-v
+ (cond
+ ((eq riece-user-agent 'emacs-riece-config)
+ system-configuration)
+ ((eq riece-user-agent 'emacs-riece-type)
+ (symbol-name system-type))
+ (t nil)))
+ (emacs-v
+ (cond
+ ((eq riece-user-agent 'riece)
+ nil)
+ ((string-match "^\\(\\([.0-9]+\\)*\\)\\.[0-9]+$" emacs-version)
+ (concat "Emacs/" (match-string 1 emacs-version)
+ (if system-v
+ (concat " (" system-v ")")
+ "")))
+ ((featurep 'sxemacs)
+ (concat "SXEmacs/" emacs-program-version
+ (when system-v
+ (concat " ("
+ (when sxemacs-codename
+ (concat sxemacs-codename ", "))
+ system-v ")"))))
+ ((featurep 'xemacs)
+ (concat "XEmacs/" emacs-program-version
+ (when system-v
+ (concat " ("
+ (when xemacs-codename
+ (concat xemacs-codename ", "))
+ system-v ")"))))
+ (t emacs-version))))
+ (if (stringp riece-user-agent)
+ riece-user-agent
+ (concat riece-v
+ (when emacs-v
+ (concat " " emacs-v))))))
+
+(defun riece-version (&optional arg)
+ "Version number of this version of Riece.
+If ARG, use user-agent format."
+ (interactive "P")
+ (if arg
+ (message "%s" (riece-extended-version))
+ (message "%s" riece-version)))
+
+(provide 'riece-version)
+
+;;; riece-version.el ends here
--- /dev/null
+;;; riece-xemacs.el --- XEmacs specific functions -*- lexical-binding: t -*-
+;; Copyright (C) 1998-2003 Daiki Ueno
+
+;; Author: Daiki Ueno <ueno@unixuser.org>
+;; Keywords: emulation
+
+;; 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., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
+
+;;; Code:
+
+(defun riece-xemacs-hide-modeline ()
+ "Remove modeline from current window."
+ (set-specifier has-modeline-p nil (current-buffer)))
+
+(when (featurep 'scrollbar)
+ (defun riece-xemacs-hide-scrollbars ()
+ (if (boundp 'horizontal-scrollbar-visible-p)
+ (set-specifier horizontal-scrollbar-visible-p nil (current-buffer))
+ (if (boundp 'scrollbar-height)
+ (set-specifier scrollbar-height 0 (current-buffer)))))
+ (add-hook 'riece-user-list-mode-hook 'riece-xemacs-hide-scrollbars)
+ (add-hook 'riece-channel-list-mode-hook 'riece-xemacs-hide-scrollbars))
+
+(add-hook 'riece-user-list-mode-hook 'riece-xemacs-hide-modeline)
+(add-hook 'riece-channel-list-mode-hook 'riece-xemacs-hide-modeline)
+
+(defun riece-xemacs-simplify-modeline-format ()
+ "Remove unnecessary information from `modeline-format'."
+ (setq modeline-format
+ (remrassq 'modeline-modified
+ (delq 'modeline-multibyte-status
+ (copy-sequence mode-line-format)))))
+
+(defalias 'riece-simplify-mode-line-format
+ 'riece-xemacs-simplify-modeline-format)
+
+;;; stolen (and renamed) from gnus-xmas.el.
+;;; In GNU Emacs, user can intercept whole mouse tracking events by
+;;; assigning [mouse-X]. In XEmacs, however, which causes different
+;;; effect, that is, the command assigned to [mouse-X] only catches
+;;; button-release events.
+(defvar riece-mouse-2 [button2])
+
+;;; popup-menu compatibility stuff, stolen (and renamed) from
+;;; semi-def.el.
+(defun riece-popup-menu-popup (menu event)
+ (let ((response (get-popup-menu-response menu event)))
+ (if response
+ (funcall (event-function response) (event-object response)))))
+
+(defalias 'riece-event-buffer 'event-buffer)
+(defalias 'riece-event-point 'event-point)
+
+;;; stolen (and renamed) from gnus-xmas.el.
+(defalias 'riece-region-active-p 'region-active-p)
+
+(defalias 'riece-make-overlay 'make-extent)
+(defalias 'riece-overlay-put 'set-extent-property)
+(defalias 'riece-overlay-start 'extent-start-position)
+(defalias 'riece-overlay-buffer 'extent-buffer)
+
+(defun riece-overlays-in (start end)
+ (extent-list (current-buffer) start end))
+
+(defalias 'riece-delete-overlay 'delete-extent)
+
+(defun riece-kill-all-overlays ()
+ "Delete all extents in the current buffer."
+ (map-extents (lambda (extent ignore)
+ (delete-extent extent)
+ nil)))
+
+;;; stolen (and renamed) from nnheaderxm.el.
+(defun riece-xemacs-generate-timer-name (&optional prefix)
+ (let ((counter '(0)))
+ (format "%s-%d"
+ (or prefix
+ "riece-xemacs-timer")
+ (prog1 (car counter)
+ (setcar counter (1+ (car counter)))))))
+
+(defun riece-run-at-time (time repeat function &rest args)
+ (let ((name (riece-xemacs-generate-timer-name "riece-run-at-time")))
+ (start-itimer
+ name
+ `(lambda ()
+ (,function ,@args))
+ time repeat)
+ name))
+
+(defun riece-run-with-idle-timer (time repeat function &rest args)
+ (let ((name (riece-xemacs-generate-timer-name "riece-run-with-idle-timer")))
+ (start-itimer
+ name
+ `(lambda ()
+ (,function ,@args))
+ time (if repeat 1) t)
+ name))
+
+(defalias 'riece-cancel-timer 'delete-itimer)
+
+(defun riece-match-string-no-properties (number &optional string)
+ (format "%s" (match-string number string)))
+
+(defun riece-propertize-modeline-string (string &rest properties)
+ (let ((extent (make-extent nil nil)))
+ (set-extent-properties extent properties)
+ (cons extent string)))
+
+(defalias 'riece-normalize-modeline-string 'identity)
+
+(defalias 'riece-facep 'find-face)
+
+(defun riece-put-text-property-nonsticky (start end prop value
+ &optional object)
+ (add-text-properties start end (list prop value 'start-open t 'end-open t)
+ object))
+
+(defun riece-recent-messages (n)
+ "Return N most recent messages, most recent first.
+If N is nil, all messages will be returned."
+ (with-output-to-string
+ (print-recent-messages n)))
+
+(defalias 'riece-remprop 'remprop)
+
+(provide 'riece-xemacs)
+
+;;; riece-xemacs.el ends here
--- /dev/null
+;;; riece-xface.el --- display X-Face in IRC buffers -*- lexical-binding: t -*-
+;; Copyright (C) 1998-2003 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., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
+
+;;; Commentary:
+
+;; NOTE: This is an add-on module for Riece.
+
+;;; Code:
+
+(require 'riece-identity)
+(require 'riece-globals)
+(require 'riece-display)
+(require 'riece-lsdb)
+
+(defconst riece-xface-description
+ "Display X-Face in IRC buffers.")
+
+(defvar lsdb-insert-x-face-function)
+
+(defun riece-xface-update-user-list-buffer ()
+ (if (get 'riece-xface 'riece-addon-enabled)
+ (riece-scan-property-region
+ 'riece-identity (point-min)(point-max)
+ (lambda (start end)
+ (let ((records (riece-lsdb-lookup-records (get-text-property
+ start 'riece-identity)))
+ xface)
+ (while (and records
+ (null xface))
+ (setq xface (nth 1 (assq 'x-face (car records)))
+ records (cdr records)))
+ (if (and xface
+ (not (eq (char-after end) ? )))
+ (let ((inhibit-read-only t)
+ buffer-read-only)
+ (goto-char end)
+ (insert " ")
+ (funcall lsdb-insert-x-face-function xface))))))))
+
+(defun riece-xface-requires ()
+ '(riece-lsdb))
+
+(defun riece-xface-user-list-mode-hook ()
+ (add-hook 'riece-update-buffer-functions
+ 'riece-xface-update-user-list-buffer t t))
+
+(defun riece-xface-insinuate ()
+ (if riece-user-list-buffer
+ (with-current-buffer riece-user-list-buffer
+ (riece-xface-user-list-mode-hook)))
+ (add-hook 'riece-user-list-mode-hook
+ 'riece-xface-user-list-mode-hook))
+
+(defun riece-xface-uninstall ()
+ (if riece-user-list-buffer
+ (with-current-buffer riece-user-list-buffer
+ (remove-hook 'riece-update-buffer-functions
+ 'riece-xface-update-user-list-buffer t)))
+ (remove-hook 'riece-user-list-mode-hook
+ 'riece-xface-user-list-mode-hook))
+
+(defun riece-xface-enable ()
+ (if riece-current-channel
+ (riece-emit-signal 'user-list-changed riece-current-channel)))
+
+(defun riece-xface-disable ()
+ (if riece-current-channel
+ (riece-emit-signal 'user-list-changed riece-current-channel)))
+
+(provide 'riece-xface)
+
+;;; riece-xface.el ends here
--- /dev/null
+;;; riece-xfaceb.el --- display X-Face/Colour Face in IRC buffers -*- lexical-binding: t -*-
+;; Copyright (C) 2005 Daiki Ueno
+
+;; Author: Steve Youngs <steve@sxemacs.org>
+;; Created: 2005-09-03
+;; 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., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
+
+;;; Commentary:
+
+;; NOTE: This is an add-on module for Riece. It is adapted from
+;; `riece-xface' but gets the image data from BBDB instead of LSDB.
+
+;; This add-on displays either X-Face or colour Face images in the
+;; Riece "Users" buffers. The image data comes from entries in a BBDB
+;; db. Consequently it does require a little setting up in BBDB...
+
+;; BBDB Setup:
+
+;; You need a new field called "ircnick" for each IRC contact that is
+;; in your BBDB. Its value is the IRC nickname of the contact (what
+;; is listed in the Riece "Users" buffer).
+
+;; M-x bbdb-insert-new-field RET ircnick RET
+;; answer `yes' to the prompt about the field not being defined
+;; then give it a value which will be that record's IRC nickname
+
+;; Then you'll need to collect X-Face: and Face: headers from your mail.
+;; To do that see: <http://www.emacswiki.org/cgi-bin/wiki/BbdbFaces>
+
+;;; Code:
+
+(require 'riece-identity)
+(require 'riece-globals)
+(require 'riece-display)
+
+(autoload 'bbdb-records "bbdb")
+(autoload 'bbdb-record-getprop "bbdb")
+
+;; `bbdb-search' is defined as a macro in bbdb-com.
+(eval-when-compile
+ (condition-case nil
+ (require 'bbdb-com)
+ (error)))
+
+(defconst riece-xfaceb-description
+ "Display X-Face & Colour Face images in IRC buffers \(BBDB\).")
+
+(defcustom riece-xfaceb-channels nil
+ "*If non-nil, faces are only added in channels in this list.
+
+You really want to set this to a list of small-ish channels that
+you're in because having it set globally can slow Emacs to a crawl,
+rendering it unusable if you're in some busy channels.
+
+`riece-xfaceb-addremove-channel' can be used to interactively add or
+remove the current channel to/from this list."
+ :type '(repeat string)
+ :group 'riece-looks)
+
+(defcustom riece-xfaceb-prefer-cface-to-xface (featurep 'png)
+ "*When non-nil, display colour face images instead of X-Face."
+ :type 'boolean
+ :group 'riece-looks)
+
+(defun riece-xfaceb-addremove-channel (&optional remove)
+ "*Add the current channel to `riece-xfaceb-channels'.
+
+With optional argument, REMOVE, remove the current channel from the
+list."
+ (interactive "P")
+ (if (or current-prefix-arg remove)
+ ;; Remove channel.
+ (progn
+ (setq riece-xfaceb-channels
+ (remove (riece-identity-prefix riece-current-channel)
+ riece-xfaceb-channels))
+ (message "Channel: %s removed from riece-xfaceb channel list."
+ (riece-identity-prefix riece-current-channel)))
+ ;; Add channel.
+ (add-to-list 'riece-xfaceb-channels
+ (riece-identity-prefix riece-current-channel))
+ (message "Channel: %s added to riece-xfaceb channel list."
+ (riece-identity-prefix riece-current-channel)))
+ (riece-emit-signal 'user-list-changed riece-current-channel))
+
+(defun riece-xfaceb-face-to-png (face)
+ "Base64 decode a Face header into a PNG.
+Returns a string."
+ (with-temp-buffer
+ (insert face)
+ (base64-decode-region (point-min) (point-max))
+ (buffer-string)))
+
+(defun riece-xfaceb-add-glyph (type extent data)
+ "Adds a cface or xface glyph to an extent.
+
+TYPE is a symbol, either `cface', or `xface'.
+EXTENT is the extent to add the glyph to.
+DATA is the image data from BBDB."
+ (cond
+ ((eq type 'cface)
+ (let ((glyph (riece-xfaceb-face-to-png data)))
+ (set-extent-begin-glyph
+ extent
+ (make-glyph `([png :data ,glyph])))))
+ ((eq type 'xface)
+ (let ((glyph (concat "X-Face: " data)))
+ (set-extent-begin-glyph
+ extent
+ (make-glyph `([xface :data ,glyph
+ :foreground "black"
+ :background "white"])))))
+ (t nil)))
+
+(defun riece-xfaceb-update-user-list-buffer ()
+ "Add X-Face or Colour Face images to channel users' buffer."
+ (when (and (get 'riece-xfaceb 'riece-addon-enabled)
+ riece-current-channel
+ (or (null riece-xfaceb-channels)
+ (member (riece-identity-prefix riece-current-channel)
+ riece-xfaceb-channels)))
+ (let ((users (ignore-errors
+ (riece-with-server-buffer
+ (riece-identity-server riece-current-channel)
+ (riece-channel-get-users (riece-identity-prefix
+ riece-current-channel))))))
+ (while users
+ (let* ((name (regexp-quote (caar users)))
+ (str (cons 'ircnick name))
+ (records (bbdb-search (bbdb-records) nil nil nil str nil))
+ cface xface)
+ (mapcar
+ #'(lambda (record)
+ (setq xface (bbdb-record-getprop record 'face))
+ (setq cface (bbdb-record-getprop record 'cface)))
+ records)
+ (when (or cface xface)
+ (with-current-buffer riece-user-list-buffer
+ (goto-char (point-min))
+ (re-search-forward (regexp-quote name) nil t)
+ (beginning-of-line)
+ (let ((ext (extent-at (point))))
+ (cond
+ ((and cface
+ (or riece-xfaceb-prefer-cface-to-xface
+ (not xface)))
+ (riece-xfaceb-add-glyph 'cface ext cface))
+ (xface (riece-xfaceb-add-glyph 'xface ext xface))
+ (t nil))))))
+ (setq users (cdr users))))))
+
+(defun riece-xfaceb-requires ()
+ )
+
+(defun riece-xfaceb-user-list-mode-hook ()
+ (add-hook 'riece-update-buffer-functions
+ 'riece-xfaceb-update-user-list-buffer t t))
+
+(defun riece-xfaceb-insinuate ()
+ (if riece-user-list-buffer
+ (with-current-buffer riece-user-list-buffer
+ (riece-xfaceb-user-list-mode-hook)))
+ (add-hook 'riece-user-list-mode-hook
+ 'riece-xfaceb-user-list-mode-hook))
+
+(defun riece-xfaceb-uninstall ()
+ (if riece-user-list-buffer
+ (with-current-buffer riece-user-list-buffer
+ (remove-hook 'riece-update-buffer-functions
+ 'riece-xfaceb-update-user-list-buffer t)))
+ (remove-hook 'riece-user-list-mode-hook
+ 'riece-xfaceb-user-list-mode-hook))
+
+(defun riece-xfaceb-enable ()
+ (add-to-list 'riece-saved-forms 'riece-xfaceb-channels)
+ (define-key riece-command-mode-map "\C-c\C-cx"
+ #'riece-xfaceb-addremove-channel)
+ (if riece-current-channel
+ (riece-emit-signal 'user-list-changed riece-current-channel)))
+
+(defun riece-xfaceb-disable ()
+ (setq riece-saved-forms
+ (remove 'riece-xfaceb-channels riece-saved-forms))
+ (define-key riece-command-mode-map "\C-c\C-cx" nil)
+ (if riece-current-channel
+ (riece-emit-signal 'user-list-changed riece-current-channel)))
+
+(provide 'riece-xfaceb)
+
+;;; riece-xfaceb.el ends here
+
--- /dev/null
+;;; riece-yank.el --- enter the element of kill-ring -*- lexical-binding: t -*-
+;; Copyright (C) 2004 Masatake YAMATO
+
+;; Author: Masatake YAMATO <jet@gyve.org>
+;; Keywords: IRC, 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., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
+
+;;; Commentary:
+
+;; NOTE: This is an add-on module for Riece.
+
+;;; Code:
+(require 'riece-commands)
+
+(defgroup riece-yank nil
+ "Enter the element of kill-ring."
+ :tag "Yank"
+ :prefix "riece-"
+ :group 'riece)
+
+(defcustom riece-yank-tick 1
+ "Time span in second to send multiple lines."
+ :type 'number
+ :group 'riece-yank)
+
+(defcustom riece-yank-strip-space nil
+ "If non-nil, strip common spaces in front of lines and blank lines
+before/after the first/last non-blank line."
+ :type 'boolean
+ :group 'riece-yank)
+
+(defconst riece-yank-description
+ "Enter the element of kill-ring.")
+
+(defun riece-yank-insinuate ()
+ )
+
+(defvar riece-command-mode-map)
+(defun riece-yank-enable ()
+ (define-key riece-command-mode-map "\C-cy" 'riece-command-yank))
+(defun riece-yank-disable ()
+ (define-key riece-command-mode-map "\C-cy" 'undefined))
+
+(defun riece-yank-strip-space (string)
+ (with-temp-buffer
+ (insert string)
+ (untabify (point-min) (point-max))
+ ;; Delete blank lines before the first non-blank line.
+ (goto-char (point-min))
+ (while (looking-at " *$")
+ (delete-region (point) (progn (forward-line) (point))))
+ ;; Delete blank lines after the last non-blank line.
+ (goto-char (point-max))
+ (while (progn (beginning-of-line) (looking-at " *$"))
+ (delete-region (point) (progn (end-of-line 0) (point))))
+ ;; Delete common spaces in front of lines.
+ (let ((space-width (point-max)))
+ (while (looking-at " +")
+ (setq space-width (min space-width (length (match-string 0))))
+ (forward-line))
+ (goto-char (point-min))
+ (while (not (eobp))
+ (delete-char space-width)
+ (forward-line)))
+ (buffer-string)))
+
+(defun riece-command-yank (arg prefix)
+ (interactive "P\nsPrefix: ")
+ (when (or (not prefix)
+ (string= prefix ""))
+ (setq prefix " "))
+ (let* ((kill (current-kill 0))
+ msg)
+ (unless kill
+ (error "Nothing to send in kill-ring"))
+ (if riece-yank-strip-space
+ (setq kill (riece-yank-strip-space kill)))
+ (setq msg (split-string kill "\n"))
+ (when (y-or-n-p (format "Send \"%s\"\n? " kill))
+ (mapcar
+ (lambda (x)
+ (riece-command-send-message (concat prefix x) arg)
+ ;; Without next line, you will be kicked out from ircd.
+ ;; It may mean "Don't send much data at once."
+ (sit-for riece-yank-tick))
+ msg))))
+
+(provide 'riece-yank)
+;;; riece-yank.el ends here
--- /dev/null
+;;; riece.el --- IRC client for Emacsen -*- lexical-binding: t -*-
+;; Copyright (C) 1998-2003 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., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
+
+;;; Code:
+
+(require 'riece-display)
+(require 'riece-server)
+(require 'riece-compat)
+(require 'riece-commands)
+(require 'riece-addon)
+(require 'riece-signal)
+
+(defvar riece-channel-list-mode-map (make-sparse-keymap))
+(defvar riece-user-list-mode-map (make-sparse-keymap))
+
+(defvar riece-dialogue-mode-map
+ (let ((keymap (make-keymap)))
+ (suppress-keymap keymap 'nodigit)
+ keymap))
+
+(defvar riece-command-mode-map (make-keymap))
+(defvar riece-command-map (make-sparse-keymap))
+
+(defvar riece-command-mode-syntax-table nil)
+
+(put 'riece-command-mode 'mode-class 'special)
+(put 'riece-dialogue-mode 'mode-class 'special)
+(put 'riece-others-mode 'derived-mode-parent 'riece-dialogue-mode)
+(put 'riece-channel-list-mode 'mode-class 'special)
+(put 'riece-user-list-mode 'mode-class 'special)
+(put 'riece-channel-mode 'derived-mode-parent 'riece-dialogue-mode)
+
+(defvar riece-buffer-alist
+ '((riece-command-buffer "*Command*" riece-command-mode)
+ (riece-dialogue-buffer "*Dialogue*" riece-dialogue-mode)
+ (riece-others-buffer "*Others*" riece-others-mode)
+ (riece-channel-list-buffer "*Channels*" riece-channel-list-mode)
+ (riece-user-list-buffer " *Users*" riece-user-list-mode)
+ (riece-temp-buffer " *Temp*")
+ (riece-debug-buffer "*Debug*")))
+
+(defvar riece-select-keys
+ `("#" riece-command-switch-to-channel-by-number
+ "1" riece-command-switch-to-channel-by-number-1
+ "2" riece-command-switch-to-channel-by-number-2
+ "3" riece-command-switch-to-channel-by-number-3
+ "4" riece-command-switch-to-channel-by-number-4
+ "5" riece-command-switch-to-channel-by-number-5
+ "6" riece-command-switch-to-channel-by-number-6
+ "7" riece-command-switch-to-channel-by-number-7
+ "8" riece-command-switch-to-channel-by-number-8
+ "9" riece-command-switch-to-channel-by-number-9
+ "0" riece-command-switch-to-channel-by-number-10
+ ,(concat riece-command-prefix "1")
+ riece-command-switch-to-channel-by-number-11
+ ,(concat riece-command-prefix "2")
+ riece-command-switch-to-channel-by-number-12
+ ,(concat riece-command-prefix "3")
+ riece-command-switch-to-channel-by-number-13
+ ,(concat riece-command-prefix "4")
+ riece-command-switch-to-channel-by-number-14
+ ,(concat riece-command-prefix "5")
+ riece-command-switch-to-channel-by-number-15
+ ,(concat riece-command-prefix "6")
+ riece-command-switch-to-channel-by-number-16
+ ,(concat riece-command-prefix "7")
+ riece-command-switch-to-channel-by-number-17
+ ,(concat riece-command-prefix "8")
+ riece-command-switch-to-channel-by-number-18
+ ,(concat riece-command-prefix "9")
+ riece-command-switch-to-channel-by-number-19
+ ,(concat riece-command-prefix "0")
+ riece-command-switch-to-channel-by-number-20))
+
+;;; Keymap macros. -- borrowed from `gnus-util.el'.
+(defmacro riece-local-set-keys (&rest plist)
+ "Set the keys in PLIST in the current keymap."
+ `(riece-define-keys-1 (current-local-map) ',plist))
+
+(defmacro riece-define-keys (keymap &rest plist)
+ "Assign KEYMAP keys from PLIST."
+ `(riece-define-keys-1 ',keymap ',plist))
+
+(defmacro riece-define-keys-safe (keymap &rest plist)
+ "Assign KEYMAP keys from PLIST without overwriting previous definitions."
+ `(riece-define-keys-1 ',keymap ',plist t))
+
+(put 'riece-define-keys 'lisp-indent-function 1)
+(put 'riece-define-keys-safe 'lisp-indent-function 1)
+(put 'riece-local-set-keys 'lisp-indent-function 1)
+
+(defun riece-define-keys-1 (keymap plist &optional safe)
+ "Assign KEYMAP keys from PLIST.
+If optional argument SAFE is nil, overwrite previous definitions."
+ (unless keymap
+ (error "Can't set keys in a null keymap"))
+ (cond
+ ((symbolp keymap)
+ (setq keymap (symbol-value keymap)))
+ ((keymapp keymap))
+ ((listp keymap)
+ (set (car keymap) nil)
+ (define-prefix-command (car keymap))
+ (define-key (symbol-value (nth 2 keymap))
+ (if (symbolp (nth 1 keymap))
+ (symbol-value (nth 1 keymap))
+ (nth 1 keymap))
+ (car keymap))
+ (setq keymap (symbol-value (car keymap)))))
+ (let (key)
+ (while plist
+ (if (symbolp (setq key (car plist)))
+ (setq key (symbol-value key)))
+ (setq plist (cdr plist))
+ (if (or (not safe)
+ (eq (lookup-key keymap key) 'undefined))
+ (define-key keymap key (car plist))
+ (car plist))
+ (setq plist (cdr plist)))))
+
+(when t
+ (riece-define-keys riece-dialogue-mode-map
+ "\177" scroll-down
+ [delete] scroll-down
+ [backspace] scroll-down
+ [return] scroll-up
+ " " scroll-up
+ [home] beginning-of-buffer
+ "$" end-of-buffer
+ [end] end-of-buffer
+ "/" riece-command-raw
+ ">" end-of-buffer
+ "<" beginning-of-buffer
+ "^" riece-command-list-addons
+ "\C-ta" riece-command-toggle-away
+ "c" riece-command-select-command-buffer
+ "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
+ "\C-tl" riece-command-change-layout
+ "i" riece-command-invite
+ "j" riece-command-join
+ "\C-k" riece-command-kick
+ "l" riece-command-list
+ "M" riece-command-change-mode
+ "n" riece-command-change-nickname
+ "N" riece-command-names
+ "o" other-window
+ "O" riece-command-open-server
+ "C" riece-command-close-server
+ "M" riece-command-universal-server-name-argument
+ "p" riece-command-enter-message-to-user
+ "q" riece-command-quit
+ "r" riece-command-configure-windows
+ "s" riece-command-save-variables
+ "x" riece-command-copy-region
+ "t" riece-command-topic
+ "w" riece-command-who
+ "z" riece-command-suspend-resume)
+
+ (riece-define-keys riece-command-mode-map
+ "\r" riece-command-enter-message
+ [(control return)] riece-command-enter-message-as-notice
+ [tab] riece-command-complete-user)
+
+ (riece-define-keys (riece-command-map riece-command-prefix
+ riece-command-mode-map)
+ "\177" riece-command-scroll-down
+ [delete] riece-command-scroll-down
+ [backspace] riece-command-scroll-down
+ " " riece-command-scroll-up
+ [home] riece-command-beginning-of-buffer
+ "$" riece-command-end-of-buffer
+ [end] riece-command-end-of-buffer
+ ">" riece-command-next-channel
+ "<" riece-command-previous-channel
+ "\C-j" riece-command-next-channel
+ "\C-n" riece-command-names
+ "l" riece-command-list
+ "\C-m" riece-command-change-mode
+ "o" riece-command-set-operators
+ "\C-p" riece-command-part
+ "r" riece-command-configure-windows
+ "v" riece-command-set-speakers
+ "V" riece-version)
+ (set-keymap-parent riece-command-map riece-dialogue-mode-map)
+
+ (riece-define-keys riece-user-list-mode-map
+ "o" riece-command-set-operators
+ "v" riece-command-set-voices
+ "f" riece-command-finger
+ " " riece-command-user-list-scroll-up
+ "\177" riece-command-user-list-scroll-down
+ [delete] riece-command-user-list-scroll-down
+ [backspace] riece-command-user-list-scroll-down
+ "c" riece-command-select-command-buffer)
+
+ (riece-define-keys riece-channel-list-mode-map
+ ">" riece-command-next-channel
+ "<" riece-command-previous-channel
+ "o" other-window
+ "c" riece-command-select-command-buffer)
+
+ (riece-define-keys-1 riece-dialogue-mode-map riece-select-keys)
+ (riece-define-keys-1 riece-channel-list-mode-map riece-select-keys))
+
+(defun riece-read-variables-files (&optional file)
+ "Read variables FILEs."
+ (or (file-directory-p riece-directory)
+ (make-directory riece-directory))
+ (let ((files (if file
+ (setq riece-variables-file file
+ riece-variables-files (list file))
+ riece-variables-files)))
+ (while files
+ (condition-case nil
+ (load (expand-file-name (car files)))
+ (file-error nil))
+ (setq files (cdr files)))))
+
+(defvar print-quoted)
+(defvar print-escape-multibyte)
+(defvar print-readably)
+(defun riece-save-variables-files ()
+ "Save current settings to `riece-saved-variables-file'."
+ (message (riece-mcat "Saving %s...") riece-saved-variables-file)
+ (with-temp-file riece-saved-variables-file
+ (insert ";;; This file is generated automatically by " riece-version ".\n"
+ ";;; Do not edit this file!\n\n")
+ (let ((print-quoted t)
+ (print-readably t)
+ print-escape-multibyte
+ print-level
+ print-length
+ (variables riece-saved-forms))
+ (while variables
+ (prin1 `(setq ,(car variables)
+ ',(symbol-value (car variables)))
+ (current-buffer))
+ (insert "\n")
+ (setq variables (cdr variables)))))
+ (message (riece-mcat "Saving %s...done") riece-saved-variables-file)
+ (setq riece-save-variables-are-dirty nil))
+
+;;;###autoload
+(defun riece (&optional confirm)
+ "Connect to the IRC server and start chatting.
+If optional argument CONFIRM is non-nil, ask which IRC server to connect."
+ (interactive "P")
+ (riece-read-variables-files (if noninteractive
+ (car command-line-args-left)))
+ (run-hooks 'riece-after-load-startup-hook)
+ (if (riece-server-opened)
+ (riece-command-configure-windows)
+ (modify-frame-parameters (selected-frame)
+ (list (cons 'riece-window-configuration
+ (current-window-configuration))))
+ (setq riece-addon-dependencies (riece-resolve-addons
+ (copy-sequence riece-addons)))
+ (let ((pointer riece-addon-dependencies))
+ (while pointer
+ (riece-insinuate-addon (car (car pointer)) riece-debug)
+ (setq pointer (cdr pointer))))
+ (if (or confirm (null riece-server))
+ (setq riece-server (completing-read (riece-mcat "Server: ")
+ riece-server-alist)))
+ (if (stringp riece-server)
+ (setq riece-server (riece-server-name-to-server riece-server)))
+ (riece-create-buffers)
+ (switch-to-buffer riece-command-buffer)
+ (riece-display-connect-signals)
+ (riece-redisplay-buffers)
+ (riece-open-server riece-server "")
+ ;; If no server process is available, exit.
+ (if (null riece-server-process-alist)
+ (riece-exit)
+ (let ((server-list riece-startup-server-list))
+ (while server-list
+ (riece-command-open-server (car server-list))
+ (setq server-list (cdr server-list))))
+ (let ((channel-list riece-startup-channel-list)
+ server)
+ (while channel-list
+ (setq server (riece-identity-server
+ (riece-parse-identity (car channel-list))))
+ (unless (riece-server-opened server)
+ (riece-command-open-server server))
+ (setq channel-list (cdr channel-list))))
+ (let ((pointer riece-addon-dependencies))
+ (while pointer
+ (unless (get (car (car pointer)) 'riece-addon-default-disabled)
+ (riece-enable-addon (car (car pointer)) riece-debug))
+ (setq pointer (cdr pointer))))
+ (run-hooks 'riece-startup-hook)
+ (message "%s" (substitute-command-keys
+ (riece-mcat "Type \\[describe-mode] for help"))))))
+
+(defun riece-exit ()
+ (if riece-save-variables-are-dirty
+ (riece-save-variables-files))
+ (while riece-buffer-list
+ (if (and (get-buffer (car riece-buffer-list))
+ (buffer-live-p (car riece-buffer-list)))
+ (funcall riece-buffer-dispose-function (car riece-buffer-list)))
+ (setq riece-buffer-list (cdr riece-buffer-list)))
+ (riece-clear-signal-slots)
+ (setq riece-server nil
+ riece-current-channels nil
+ riece-current-channel nil
+ riece-channel-buffer nil
+ riece-channel-buffer-alist nil
+ riece-user-indicator nil
+ riece-long-channel-indicator (riece-mcat "None")
+ riece-channel-list-indicator (riece-mcat "No channel")
+ riece-away-indicator "-"
+ riece-operator-indicator "-"
+ riece-channel-status-indicator "-"
+ riece-freeze-indicator "-")
+ (modify-frame-parameters (selected-frame)
+ (list (list 'riece-window-configuration)))
+ (delete-other-windows)
+ (run-hooks 'riece-exit-hook))
+
+(defun riece-command-mode ()
+ "Major mode for Riece. Normal edit function are available.
+Typing Return or Linefeed enters the current line in the dialogue.
+The following special commands are available:
+For a list of the generic commands type \\[riece-command-generic] ? RET.
+\\{riece-command-mode-map}"
+ (interactive)
+ (kill-all-local-variables)
+
+ ;; Make `truncate-partial-width-windows' buffer local and set it to
+ ;; nil. This causes `truncate-lines' to directly control line
+ ;; truncation.
+ (make-local-variable 'truncate-partial-width-windows)
+ (setq truncate-partial-width-windows nil)
+
+ (make-local-variable 'riece-mode-line-buffer-identification)
+ (setq riece-away-indicator "-"
+ riece-operator-indicator "-"
+ riece-channel-status-indicator "-"
+ major-mode 'riece-command-mode
+ mode-name "Command"
+ riece-mode-line-buffer-identification
+ '("Riece: "
+ riece-away-indicator
+ riece-operator-indicator
+ riece-channel-status-indicator
+ " "
+ riece-user-indicator
+ " "
+ riece-channel-indicator)
+ mode-line-buffer-identification
+ (riece-mode-line-buffer-identification
+ riece-mode-line-buffer-identification)
+ truncate-lines nil)
+ (riece-simplify-mode-line-format)
+ (use-local-map riece-command-mode-map)
+
+ (unless riece-command-mode-syntax-table
+ (setq riece-command-mode-syntax-table
+ (copy-syntax-table (syntax-table)))
+ (set-syntax-table riece-command-mode-syntax-table)
+ (let* ((chars "^[]{}'`")
+ (length (length chars))
+ (index 0))
+ (while (< index length)
+ (modify-syntax-entry (aref chars index) "w")
+ (setq index (1+ index)))))
+
+ (run-hooks 'riece-command-mode-hook))
+
+(defun riece-dialogue-mode ()
+ "Major mode for displaying the IRC dialogue.
+All normal editing commands are turned off.
+Instead, these commands are available:
+\\{riece-dialogue-mode-map}"
+ (kill-all-local-variables)
+ (make-local-variable 'riece-freeze)
+ (make-local-variable 'riece-freeze-indicator)
+
+ ;; Make `truncate-partial-width-windows' buffer local and set it to
+ ;; nil. This causes `truncate-lines' to directly control line truncation.
+ (make-local-variable 'truncate-partial-width-windows)
+ (setq truncate-partial-width-windows nil)
+
+ (make-local-variable 'riece-mode-line-buffer-identification)
+ (setq riece-freeze riece-default-freeze
+ riece-away-indicator "-"
+ riece-operator-indicator "-"
+ riece-channel-status-indicator "-"
+ major-mode 'riece-dialogue-mode
+ mode-name "Dialogue"
+ riece-mode-line-buffer-identification
+ '("Riece: "
+ riece-away-indicator
+ riece-operator-indicator
+ riece-freeze-indicator
+ riece-channel-status-indicator
+ " "
+ riece-channel-list-indicator " ")
+ mode-line-buffer-identification
+ (riece-mode-line-buffer-identification
+ riece-mode-line-buffer-identification)
+ truncate-lines nil
+ buffer-read-only t)
+ (riece-simplify-mode-line-format)
+ (use-local-map riece-dialogue-mode-map)
+ (buffer-disable-undo)
+ (run-hooks 'riece-dialogue-mode-hook))
+
+(define-derived-mode riece-others-mode riece-dialogue-mode
+ "Others"
+ "Major mode for displaying the IRC others message except current channel.
+All normal editing commands are turned off.
+Instead, these commands are available:
+\\{riece-others-mode-map}")
+
+(define-derived-mode riece-channel-mode riece-dialogue-mode
+ "Channel"
+ "Major mode for displaying the IRC current channel buffer.
+All normal editing commands are turned off.
+Instead, these commands are available:
+\\{riece-channel-mode-map}"
+ (make-local-variable 'riece-channel-buffer-window-point)
+ (make-local-variable 'riece-mode-line-buffer-identification)
+ (setq riece-mode-line-buffer-identification
+ '("Riece: "
+ riece-away-indicator
+ riece-operator-indicator
+ riece-freeze-indicator
+ riece-channel-status-indicator
+ " "
+ riece-long-channel-indicator)
+ mode-line-buffer-identification
+ (riece-mode-line-buffer-identification
+ riece-mode-line-buffer-identification)))
+
+(defun riece-channel-list-mode ()
+ "Major mode for displaying channel list.
+All normal editing commands are turned off."
+ (kill-all-local-variables)
+ (buffer-disable-undo)
+
+ ;; Make `truncate-partial-width-windows' buffer local and set it to
+ ;; nil. This causes `truncate-lines' to directly control line truncation.
+ (make-local-variable 'truncate-partial-width-windows)
+ (setq truncate-partial-width-windows nil)
+
+ (make-local-variable 'riece-mode-line-buffer-identification)
+ (setq major-mode 'riece-channel-list-mode
+ mode-name "Channels"
+ riece-mode-line-buffer-identification '("Riece: ")
+ mode-line-buffer-identification
+ (riece-mode-line-buffer-identification
+ riece-mode-line-buffer-identification)
+ truncate-lines t
+ buffer-read-only t)
+ (riece-make-local-hook 'riece-update-buffer-functions)
+ (add-hook 'riece-update-buffer-functions
+ 'riece-update-channel-list-buffer nil t)
+ (use-local-map riece-channel-list-mode-map)
+ (run-hooks 'riece-channel-list-mode-hook))
+
+(defun riece-user-list-mode ()
+ "Major mode for displaying members in the IRC current channel buffer.
+All normal editing commands are turned off.
+Instead, these commands are available:
+\\{riece-user-list-mode-map}"
+ (kill-all-local-variables)
+ (buffer-disable-undo)
+
+ ;; Make `truncate-partial-width-windows' buffer local and set it to
+ ;; nil. This causes `truncate-lines' to directly control line truncation.
+ (make-local-variable 'truncate-partial-width-windows)
+ (setq truncate-partial-width-windows nil)
+
+ (make-local-variable 'riece-mode-line-buffer-identification)
+ (setq major-mode 'riece-user-list-mode
+ mode-name "Users"
+ riece-mode-line-buffer-identification
+ '("Riece: " riece-long-channel-indicator " ")
+ mode-line-buffer-identification
+ (riece-mode-line-buffer-identification
+ riece-mode-line-buffer-identification)
+ truncate-lines t
+ buffer-read-only t)
+ (if (boundp 'transient-mark-mode)
+ (set (make-local-variable 'transient-mark-mode) t))
+ (riece-make-local-hook 'riece-update-buffer-functions)
+ (add-hook 'riece-update-buffer-functions
+ 'riece-update-user-list-buffer nil t)
+ (use-local-map riece-user-list-mode-map)
+ (run-hooks 'riece-user-list-mode-hook))
+
+(defun riece-create-buffers ()
+ (let ((alist riece-buffer-alist))
+ (while alist
+ (with-current-buffer (apply #'riece-get-buffer-create
+ (cdr (car alist)))
+ (set (car (car alist)) (current-buffer))
+ (unless (or (null (nth 2 (car alist)))
+ (eq major-mode (nth 2 (car alist))))
+ (funcall (nth 2 (car alist))))
+ (setq alist (cdr alist))))))
+
+(defun riece-submit-bug-report ()
+ "Submit via mail a bug report on Riece."
+ (interactive)
+ (browse-url "https://savannah.nongnu.org/bugs/?group=riece"))
+
+(provide 'riece)
+
+;;; riece.el ends here
--- /dev/null
+# server.rb --- A simple IPC server executing Ruby programs.
+# Copyright (C) 1998-2005 Daiki Ueno
+
+# Author: Daiki Ueno <ueno@unixuser.org>
+# Created: 1998-09-28
+# Keywords: IRC, riece, Ruby
+
+# 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., 51 Franklin Street, Fifth Floor,
+# Boston, MA 02110-1301, USA.
+
+require 'thread'
+require 'stringio'
+
+class Server
+ def initialize(outfile, errfile, logfile)
+ @out = $stdout
+ @err = $stderr
+ $stdout = outfile ? File.new(outfile, 'a') : StringIO.new
+ $stderr = errfile ? File.new(errfile, 'a') : StringIO.new
+ @log = File.new(logfile, 'a') if logfile
+
+ @buf = ''
+ @que = Queue.new
+ @thr = Hash.new
+ @cnt = 0
+ end
+
+ def dispatch(line)
+ @log.puts(line) if @log
+ case line.chomp
+ when /\AD /
+ @buf << $'
+ when /\A(\S+)\s*/
+ c = $1
+ r = $'
+ d = "dispatch_#{c.downcase}"
+ if respond_to?(d, true)
+ Thread.start do
+ self.send(d, c, r)
+ end
+ else
+ send_line("ERR 103 Unknown command\r\n")
+ end
+ end
+ end
+
+ def dispatch_cancel(c, r)
+ send_line("ERR 100 Not implemented\r\n")
+ end
+
+ def dispatch_bye(c, r)
+ send_line("ERR 100 Not implemented\r\n")
+ end
+
+ def dispatch_auth(c, r)
+ send_line("ERR 100 Not implemented\r\n")
+ end
+
+ def dispatch_reset(c, r)
+ send_line("ERR 100 Not implemented\r\n")
+ end
+
+ def dispatch_end(c, r)
+ enq_data
+ end
+
+ def dispatch_help(c, r)
+ send_line("ERR 100 Not implemented\r\n")
+ end
+
+ def dispatch_quit(c, r)
+ send_line("ERR 100 Not implemented\r\n")
+ end
+
+ def dispatch_eval(c, r)
+ r = deq_data if r.empty?
+ name = nil
+ Thread.exclusive do
+ while @thr.include?(name = @cnt.to_s)
+ @cnt += 1
+ end
+ @thr[name] = Thread.current
+ end
+ send_line("S name #{name}\r\n")
+ send_line("OK\r\n")
+ Thread.current[:rubyserv_name] = name
+ begin
+ Thread.current[:rubyserv_error] = false
+ Thread.current[:rubyserv_response] = eval(r, exec_env.empty_binding)
+ rescue Exception => e
+ Thread.current[:rubyserv_error] = true
+ Thread.current[:rubyserv_response] =
+ e.to_s.sub(/\A.*?\n#{Regexp.quote(__FILE__)}:\d+: /o, '')
+ end
+ send_line("# exit #{name}\r\n")
+ end
+
+ def dispatch_poll(c, r)
+ thr = @thr[r]
+ if !thr
+ send_line("ERR 105 Parameter error: no such name \"#{r}\"\r\n")
+ elsif thr.alive?
+ send_line("S running #{r}\r\n")
+ send_line("OK\r\n")
+ else
+ if thr[:rubyserv_error]
+ send_line("S exited #{r}\r\n")
+ else
+ send_line("S finished #{r}\r\n")
+ end
+ if d = thr[:rubyserv_response]
+ send_data(d.to_s)
+ end
+ send_line("OK\r\n")
+ end
+ end
+
+ def dispatch_exit(c, r)
+ thr = @thr[r]
+ if !thr
+ send_line("ERR 105 Parameter error: no such name \"#{r}\"\r\n")
+ return
+ end
+ thr.kill if thr.alive?
+ @thr.delete(r)
+ send_line("OK\r\n")
+ end
+
+ def escape(s)
+ s.gsub(/[%\r\n]/) {|m| '%%%02X' % m[0]}
+ end
+
+ def unescape(s)
+ s.gsub(/%([0-9A-Z][0-9A-Z])/) {[$1].pack('H*')}
+ end
+
+ def send_data(d)
+ d = escape(d)
+ begin
+ len = [d.length, 998].min # 998 = 1000 - "D "
+ send_line("D #{d[0 ... len]}\r\n")
+ d = d[len .. -1]
+ end until d.empty?
+ end
+
+ def enq_data
+ d = unescape(@buf)
+ @buf = ''
+ @que.enq(d)
+ end
+
+ def deq_data
+ @que.deq
+ end
+
+ def send_line(line)
+ @out.puts(line)
+ @log.puts(line) if @log
+ end
+
+ def exec_env
+ env = Object.new
+ def env.empty_binding
+ binding
+ end
+ out, log = @out, @log
+ env.instance_eval {@out, @log = out, log}
+ def env.send_line(line)
+ @out.puts(line)
+ @log.puts(line) if @log
+ end
+ def env.output(s)
+ send_line("# output #{Thread.current[:rubyserv_name]} #{s}\r\n")
+ end
+ env
+ end
+end
+
+if $0 == __FILE__
+ require 'optparse'
+
+ opt_outfile, opt_errfile, opt_logfile = nil, nil, nil
+ opts = OptionParser.new do |opts|
+ opts.banner = <<"End"
+Usage: #{$0} [OPTIONS]
+End
+ opts.on('-o', '--out OUTFILE', 'Send stdout to OUTFILE.') do |outfile|
+ opt_outfile = outfile
+ end
+ opts.on('-e', '--err ERRFILE', 'Send stderr to ERRFILE.') do |errfile|
+ opt_errfile = errfile
+ end
+ opts.on('-l', '--log LOGFILE', 'Send log to LOGFILE.') do |logfile|
+ opt_logfile = logfile
+ end
+ opts.on_tail('--help', '-h', 'Show this message.') do
+ $stdout.print(opts.to_s)
+ exit(0)
+ end
+ end
+ begin
+ opts.parse!(ARGV)
+ rescue OptionParser::ParseError
+ $stderr.print(opts.to_s)
+ exit(1)
+ end
+
+ server = Server.new(opt_outfile, opt_errfile, opt_logfile)
+ while gets
+ server.dispatch($_)
+ end
+end
--- /dev/null
+Makefile.in
+Makefile
--- /dev/null
+EXTRA_DIST = luna.el lunit.el lunit-report.el \
+ test-riece-addon.el test-riece-alias.el test-riece-cache.el \
+ test-riece-eval.el test-riece-log.el test-riece-shrink-buffer.el \
+ test-riece-url.el test-riece-yank.el
--- /dev/null
+;;; luna.el --- tiny OOP system kernel
+
+;; Copyright (C) 1999,2000,2002 Free Software Foundation, Inc.
+
+;; Author: MORIOKA Tomohiko <tomo@m17n.org>
+;; Keywords: OOP
+
+;; This file is part of FLIM (Faithful Library about Internet Message).
+
+;; 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., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
+
+;;; Code:
+
+(eval-when-compile (require 'cl))
+
+
+;;; @ class
+;;;
+
+(defmacro luna-find-class (name)
+ "Return a luna-class that has NAME."
+ `(get ,name 'luna-class))
+
+;; Give NAME (symbol) the luna-class CLASS.
+(defmacro luna-set-class (name class)
+ `(put ,name 'luna-class ,class))
+
+;; Return the obarray of luna-class CLASS.
+(defmacro luna-class-obarray (class)
+ `(aref ,class 1))
+
+;; Return the parents of luna-class CLASS.
+(defmacro luna-class-parents (class)
+ `(aref ,class 2))
+
+;; Return the number of slots of luna-class CLASS.
+(defmacro luna-class-number-of-slots (class)
+ `(aref ,class 3))
+
+(defmacro luna-define-class (class &optional parents slots)
+ "Define CLASS as a luna-class.
+CLASS always inherits the luna-class `standard-object'.
+
+The optional 1st arg PARENTS is a list luna-class names. These
+luna-classes are also inheritted by CLASS.
+
+The optional 2nd arg SLOTS is a list of slots CLASS will have."
+ `(luna-define-class-function ',class ',(append parents '(standard-object))
+ ',slots))
+
+
+;; Define CLASS as a luna-class. PARENTS, if non-nil, is a list of
+;; luna-class names inherited by CLASS. SLOTS, if non-nil, is a list
+;; of slots belonging to CLASS.
+
+(defun luna-define-class-function (class &optional parents slots)
+ (let ((oa (make-vector 31 0))
+ (rest parents)
+ parent name
+ (i 2)
+ b j)
+ (while rest
+ (setq parent (pop rest)
+ b (- i 2))
+ (mapatoms (lambda (sym)
+ (when (setq j (get sym 'luna-slot-index))
+ (setq name (symbol-name sym))
+ (unless (intern-soft name oa)
+ (put (intern name oa) 'luna-slot-index (+ j b))
+ (setq i (1+ i)))))
+ (luna-class-obarray (luna-find-class parent))))
+ (setq rest slots)
+ (while rest
+ (setq name (symbol-name (pop rest)))
+ (unless (intern-soft name oa)
+ (put (intern name oa) 'luna-slot-index i)
+ (setq i (1+ i))))
+ (luna-set-class class (vector 'class oa parents i))))
+
+
+;; Return a member (slot or method) of CLASS that has name
+;; MEMBER-NAME.
+
+(defun luna-class-find-member (class member-name)
+ (or (stringp member-name)
+ (setq member-name (symbol-name member-name)))
+ (intern-soft member-name (luna-class-obarray class)))
+
+
+;; Return a member (slot or method) of CLASS that has name
+;; MEMBER-NAME. If CLASS doesnt' have such a member, make it in
+;; CLASS.
+
+(defsubst luna-class-find-or-make-member (class member-name)
+ (or (stringp member-name)
+ (setq member-name (symbol-name member-name)))
+ (intern member-name (luna-class-obarray class)))
+
+
+;; Return the index number of SLOT-NAME in CLASS.
+
+(defmacro luna-class-slot-index (class slot-name)
+ `(get (luna-class-find-member ,class ,slot-name) 'luna-slot-index))
+
+(defmacro luna-define-method (name &rest definition)
+ "Define NAME as a method of a luna class.
+
+Usage of this macro follows:
+
+ (luna-define-method NAME [METHOD-QUALIFIER] ARGLIST [DOCSTRING] BODY...)
+
+The optional 1st argument METHOD-QUALIFIER specifies when and how the
+method is called.
+
+If it is :before, call the method before calling the parents' methods.
+
+If it is :after, call the method after calling the parents' methods.
+
+If it is :around, call the method only. The parents' methods can be
+executed by calling the function `luna-call-next-method' in BODY.
+
+Otherwize, call the method only, and the parents' methods are never
+executed. In this case, METHOD-QUALIFIER is treated as ARGLIST.
+
+ARGLIST has the form ((VAR CLASS) METHOD-ARG ...), where VAR is a
+variable name that should be bound to an entity that receives the
+message NAME, CLASS is a class name. The first argument to the method
+is VAR, and the remaining arguments are METHOD-ARGs.
+
+If VAR is nil, arguments to the method are METHOD-ARGs. This kind of
+methods can't be called from generic-function (see
+`luna-define-generic').
+
+The optional 4th argument DOCSTRING is the documentation of the
+method. If it is not string, it is treated as BODY.
+
+The optional 5th BODY is the body of the method."
+ (let ((method-qualifier (pop definition))
+ args specializer class self)
+ (if (memq method-qualifier '(:before :after :around))
+ (setq args (pop definition))
+ (setq args method-qualifier
+ method-qualifier nil))
+ (setq specializer (car args)
+ class (nth 1 specializer)
+ self (car specializer))
+ `(let ((func (lambda ,(if self
+ (cons self (cdr args))
+ (cdr args))
+ ,@definition))
+ (sym (luna-class-find-or-make-member
+ (luna-find-class ',class) ',name))
+ (cache (get ',name 'luna-method-cache)))
+ (and cache
+ (fboundp sym)
+ (mapatoms
+ (lambda (s)
+ (if (memq (symbol-function sym) (symbol-value s))
+ (unintern s cache)))
+ cache))
+ (fset sym func)
+ (put sym 'luna-method-qualifier ,method-qualifier))))
+
+(put 'luna-define-method 'lisp-indent-function 'defun)
+
+(def-edebug-spec luna-define-method
+ (&define name [&optional &or ":before" ":after" ":around"]
+ ((arg symbolp)
+ [&rest arg]
+ [&optional ["&optional" arg &rest arg]]
+ &optional ["&rest" arg])
+ def-body))
+
+
+;; Return a list of method functions named SERVICE registered in the
+;; parents of CLASS.
+
+(defun luna-class-find-parents-functions (class service)
+ (let ((parents (luna-class-parents class))
+ ret)
+ (while (and parents
+ (null
+ (setq ret (luna-class-find-functions
+ (luna-find-class (pop parents))
+ service)))))
+ ret))
+
+;; Return a list of method functions named SERVICE registered in CLASS
+;; and the parents..
+
+(defun luna-class-find-functions (class service)
+ (let ((sym (luna-class-find-member class service)))
+ (if (fboundp sym)
+ (cond ((eq (get sym 'luna-method-qualifier) :before)
+ (cons (symbol-function sym)
+ (luna-class-find-parents-functions class service)))
+ ((eq (get sym 'luna-method-qualifier) :after)
+ (nconc (luna-class-find-parents-functions class service)
+ (list (symbol-function sym))))
+ ((eq (get sym 'luna-method-qualifier) :around)
+ (cons sym (luna-class-find-parents-functions class service)))
+ (t
+ (list (symbol-function sym))))
+ (luna-class-find-parents-functions class service))))
+
+
+;;; @ instance (entity)
+;;;
+
+(defmacro luna-class-name (entity)
+ "Return class-name of the ENTITY."
+ `(aref ,entity 0))
+
+(defmacro luna-set-class-name (entity name)
+ `(aset ,entity 0 ,name))
+
+(defmacro luna-get-obarray (entity)
+ `(aref ,entity 1))
+
+(defmacro luna-set-obarray (entity obarray)
+ `(aset ,entity 1 ,obarray))
+
+(defmacro luna-slot-index (entity slot-name)
+ `(luna-class-slot-index (luna-find-class (luna-class-name ,entity))
+ ,slot-name))
+
+(defsubst luna-slot-value (entity slot)
+ "Return the value of SLOT of ENTITY."
+ (aref entity (luna-slot-index entity slot)))
+
+(defsubst luna-set-slot-value (entity slot value)
+ "Store VALUE into SLOT of ENTITY."
+ (aset entity (luna-slot-index entity slot) value))
+
+(defmacro luna-find-functions (entity service)
+ `(luna-class-find-functions (luna-find-class (luna-class-name ,entity))
+ ,service))
+
+(defsubst luna-send (entity message &rest luna-current-method-arguments)
+ "Send MESSAGE to ENTITY, and return the result.
+ENTITY is an instance of a luna class, and MESSAGE is a method name of
+the luna class.
+LUNA-CURRENT-METHOD-ARGUMENTS is arguments of the MESSAGE."
+ (let ((luna-next-methods (luna-find-functions entity message))
+ luna-current-method
+ luna-previous-return-value)
+ (while (and luna-next-methods
+ (progn
+ (setq luna-current-method (pop luna-next-methods)
+ luna-previous-return-value
+ (apply luna-current-method
+ luna-current-method-arguments))
+ (if (symbolp luna-current-method)
+ (not (eq (get luna-current-method
+ 'luna-method-qualifier) :around))
+ t))))
+ luna-previous-return-value))
+
+(eval-when-compile
+ (defvar luna-next-methods nil)
+ (defvar luna-current-method-arguments nil))
+
+(defun luna-call-next-method ()
+ "Call the next method in the current method function.
+A method function that has :around qualifier should call this function
+to execute the parents' methods."
+ (let (luna-current-method
+ luna-previous-return-value)
+ (while (and luna-next-methods
+ (progn
+ (setq luna-current-method (pop luna-next-methods)
+ luna-previous-return-value
+ (apply luna-current-method
+ luna-current-method-arguments))
+ (if (symbolp luna-current-method)
+ (not (eq (get luna-current-method
+ 'luna-method-qualifier) :around))
+ t))))
+ luna-previous-return-value))
+
+(defun luna-make-entity (class &rest init-args)
+ "Make an entity (instance) of luna-class CLASS and return it.
+INIT-ARGS is a plist of the form (:SLOT1 VAL1 :SLOT2 VAL2 ...),
+where SLOTs are slots of CLASS and the VALs are initial values of
+the corresponding SLOTs."
+ (let* ((c (get class 'luna-class))
+ (v (make-vector (luna-class-number-of-slots c) nil)))
+ (luna-set-class-name v class)
+ (luna-set-obarray v (make-vector 7 0))
+ (apply #'luna-send v 'initialize-instance v init-args)))
+
+
+;;; @ interface (generic function)
+;;;
+
+;; Find a method of ENTITY that handles MESSAGE, and call it with
+;; arguments LUNA-CURRENT-METHOD-ARGUMENTS.
+
+(defun luna-apply-generic (entity message &rest luna-current-method-arguments)
+ (let* ((class (luna-class-name entity))
+ (cache (get message 'luna-method-cache))
+ (sym (intern-soft (symbol-name class) cache))
+ luna-next-methods)
+ (if sym
+ (setq luna-next-methods (symbol-value sym))
+ (setq luna-next-methods
+ (luna-find-functions entity message))
+ (set (intern (symbol-name class) cache)
+ luna-next-methods))
+ (luna-call-next-method)))
+
+
+;; Convert ARGLIST (argument list spec for a method function) to the
+;; actual list of arguments.
+
+(defsubst luna-arglist-to-arguments (arglist)
+ (let (dest)
+ (while arglist
+ (let ((arg (car arglist)))
+ (or (memq arg '(&optional &rest))
+ (setq dest (cons arg dest))))
+ (setq arglist (cdr arglist)))
+ (nreverse dest)))
+
+
+(defmacro luna-define-generic (name args &optional doc)
+ "Define a function NAME that provides a generic interface to the method NAME.
+ARGS is the argument list for NAME. The first element of ARGS is an
+entity.
+
+The function handles a message sent to the entity by calling the
+method with proper arguments.
+
+The optional 3rd argument DOC is the documentation string for NAME."
+ (if doc
+ `(progn
+ (defun ,(intern (symbol-name name)) ,args
+ ,doc
+ (luna-apply-generic ,(car args) ',name
+ ,@(luna-arglist-to-arguments args)))
+ (put ',name 'luna-method-cache (make-vector 31 0)))
+ `(progn
+ (defun ,(intern (symbol-name name)) ,args
+ (luna-apply-generic ,(car args) ',name
+ ,@(luna-arglist-to-arguments args)))
+ (put ',name 'luna-method-cache (make-vector 31 0)))))
+
+(put 'luna-define-generic 'lisp-indent-function 'defun)
+
+
+;;; @ accessor
+;;;
+
+(defun luna-define-internal-accessors (class-name)
+ "Define internal accessors for instances of the luna class CLASS-NAME.
+
+Internal accessors are macros to refer and set a slot value of the
+instances. For instance, if the class has SLOT, macros
+CLASS-NAME-SLOT-internal and CLASS-NAME-set-SLOT-internal are defined.
+
+CLASS-NAME-SLOT-internal accepts one argument INSTANCE, and returns
+the value of SLOT.
+
+CLASS-NAME-set-SLOT-internal accepts two arguemnt INSTANCE and VALUE,
+and sets SLOT to VALUE."
+ (let ((entity-class (luna-find-class class-name))
+ parents parent-class)
+ (mapatoms
+ (lambda (slot)
+ (if (luna-class-slot-index entity-class slot)
+ (catch 'derived
+ (setq parents (luna-class-parents entity-class))
+ (while parents
+ (setq parent-class (luna-find-class (car parents)))
+ (if (luna-class-slot-index parent-class slot)
+ (throw 'derived nil))
+ (setq parents (cdr parents)))
+ (eval
+ `(progn
+ (defmacro ,(intern (format "%s-%s-internal"
+ class-name slot))
+ (entity)
+ (list 'aref entity
+ ,(luna-class-slot-index entity-class
+ (intern (symbol-name slot)))))
+ (defmacro ,(intern (format "%s-set-%s-internal"
+ class-name slot))
+ (entity value)
+ (list 'aset entity
+ ,(luna-class-slot-index
+ entity-class (intern (symbol-name slot)))
+ value)))))))
+ (luna-class-obarray entity-class))))
+
+
+;;; @ standard object
+;;;
+
+;; Define super class of all luna classes.
+(luna-define-class-function 'standard-object)
+
+(luna-define-method initialize-instance ((entity standard-object)
+ &rest init-args)
+ "Initialize slots of ENTITY by INIT-ARGS."
+ (let* ((c (luna-find-class (luna-class-name entity)))
+ (oa (luna-class-obarray c))
+ s i)
+ (while init-args
+ (setq s (intern-soft (substring (symbol-name (pop init-args)) 1) oa)
+ i (pop init-args))
+ (if s
+ (aset entity (get s 'luna-slot-index) i)))
+ entity))
+
+
+;;; @ end
+;;;
+
+(provide 'luna)
+
+;; luna.el ends here
--- /dev/null
+;;; lunit-report.el --- output test report in XML compatible with JUnitTask
+
+;; Copyright (C) 2004 Daiki Ueno.
+
+;; Author: Daiki Ueno <ueno@unixuser.org>
+
+;; 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., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
+
+;;; Code:
+
+(require 'lunit)
+
+(eval-and-compile
+ (luna-define-class lunit-test-reporter (lunit-test-listener)
+ (buffer
+ start-time))
+
+ (luna-define-internal-accessors 'lunit-test-reporter))
+
+;; stolen (and renamed) from time-date.el.
+(defun lunit-time-since (time)
+ "Return the time elapsed since TIME."
+ (let* ((current (current-time))
+ (rest (when (< (nth 1 current) (nth 1 time))
+ (expt 2 16))))
+ (list (- (+ (car current) (if rest -1 0)) (car time))
+ (- (+ (or rest 0) (nth 1 current)) (nth 1 time))
+ (- (nth 2 current) (nth 2 time)))))
+
+(defun lunit-escape-quote (string)
+ (let ((index 0))
+ (while (string-match "\"" string index)
+ (setq string (replace-match """ nil t string)
+ index (+ 5 index)))
+ string))
+
+(luna-define-method lunit-test-listener-error ((reporter lunit-test-reporter)
+ case error)
+ (save-excursion
+ (set-buffer (lunit-test-reporter-buffer-internal reporter))
+ (insert (format "\
+ <error message=\"%s\" type=\"error\"/>
+"
+ (lunit-escape-quote (pp-to-string error))))))
+
+(luna-define-method lunit-test-listener-failure ((reporter lunit-test-reporter)
+ case failure)
+ (save-excursion
+ (set-buffer (lunit-test-reporter-buffer-internal reporter))
+ (insert (format "\
+ <failure message=\"%s\" type=\"failure\"/>
+"
+ (lunit-escape-quote (pp-to-string failure))))))
+
+(luna-define-method lunit-test-listener-start ((reporter lunit-test-reporter)
+ case)
+ (save-excursion
+ (set-buffer (lunit-test-reporter-buffer-internal reporter))
+ (goto-char (point-max))
+ (narrow-to-region (point) (point))
+ (insert (format "\
+ <testcase name=\"%s\" classname=\"%s\">
+"
+ (lunit-test-name-internal case)
+ (luna-class-name case)))
+ (lunit-test-reporter-set-start-time-internal reporter (current-time))))
+
+(luna-define-method lunit-test-listener-end ((reporter lunit-test-reporter)
+ case)
+ (let ((elapsed
+ (lunit-time-since
+ (lunit-test-reporter-start-time-internal reporter))))
+ (save-excursion
+ (set-buffer (lunit-test-reporter-buffer-internal reporter))
+
+ (insert "\
+ </testcase>
+")
+ (goto-char (point-min))
+ (looking-at " *<testcase\\>")
+ (goto-char (match-end 0))
+ (insert (format " time=\"%.03f\" "
+ (+ (nth 1 elapsed)
+ (/ (nth 2 elapsed) 1000000.0))))
+ (widen))))
+
+(defun lunit-report (test file)
+ "Run TEST and output result as XML."
+ (let* ((printer
+ (luna-make-entity 'lunit-test-printer))
+ (result
+ (lunit-make-test-result printer))
+ (buffer (find-file-noselect file))
+ start-time)
+ (save-excursion
+ (set-buffer buffer)
+ (erase-buffer))
+ (lunit-test-result-add-listener
+ result
+ (luna-make-entity 'lunit-test-reporter :buffer buffer))
+ (setq start-time (current-time))
+ (lunit-test-run test result)
+ (let ((assert-count
+ (lunit-test-result-assert-count-internal result))
+ (failures
+ (lunit-test-result-failures-internal result))
+ (errors
+ (lunit-test-result-errors-internal result))
+
+ (elapsed (lunit-time-since start-time)))
+ (princ (format "%d runs, %d assertions, %d failures, %d errors\n"
+ (lunit-test-number-of-tests test)
+ assert-count
+ (length failures)
+ (length errors)))
+ (save-excursion
+ (set-buffer buffer)
+ (goto-char (point-min))
+ (insert (format "\
+<?xml version=\"1.0\" encoding=\"UTF-8\"?>
+<testsuites>
+ <testsuite name=\"\" tests=\"%d\" failures=\"%d\" \
+errors=\"%d\" time =\"%.03f\">
+ <properties>
+ <property name=\"emacs-version\" value=\"%s\"/>
+ </properties>
+"
+ (lunit-test-number-of-tests test)
+ (length failures)
+ (length errors)
+ (+ (nth 1 elapsed)
+ (/ (nth 2 elapsed) 1000000.0))
+ (lunit-escape-quote (emacs-version))))
+ (goto-char (point-max))
+ (insert "\
+ </testsuite>
+</testsuites>")
+ (save-buffer)))))
+
+(provide 'lunit-report)
\ No newline at end of file
--- /dev/null
+;;; lunit.el --- simple testing framework for luna
+
+;; Copyright (C) 2000-2004 Daiki Ueno.
+
+;; Author: Daiki Ueno <ueno@unixuser.org>
+;; Keywords: OOP, XP
+
+;; This file is part of FLIM (Faithful Library about Internet Message).
+
+;; 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., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
+
+;;; Commentary:
+
+;; This module is inspired by "JUnit A Cook's Tour".
+;; <URL:http://www.junit.org/junit/doc/cookstour/cookstour.htm>
+
+;; (require 'lunit)
+;;
+;; (luna-define-class silly-test-case (lunit-test-case))
+;;
+;; (luna-define-method test-1 ((case silly-test-case))
+;; (lunit-assert-2 case (integerp "a")))
+;;
+;; (luna-define-method test-2 ((case silly-test-case))
+;; (lunit-assert-2 case (stringp "b")))
+;;
+;; (with-output-to-temp-buffer "*Lunit Results*"
+;; (lunit (lunit-make-test-suite-from-class 'silly-test-case)))
+;; ______________________________________________________________________
+;; Running `silly-test-case#test-1'... failure: (integerp "a")
+;; Running `silly-test-case#test-2'...
+;; 2 runs, 2 assertions, 1 failures, 0 errors
+
+;;; Code:
+
+(require 'luna)
+
+(eval-when-compile (require 'cl))
+
+(require 'pp)
+
+;;; @ test
+;;;
+
+(eval-and-compile
+ (luna-define-class lunit-test ()
+ (name))
+
+ (luna-define-internal-accessors 'lunit-test))
+
+(luna-define-generic lunit-test-number-of-tests (test)
+ "Count the number of test cases that will be run by the test.")
+
+(luna-define-generic lunit-test-run (test result)
+ "Run the test and collects its result in result.")
+
+(luna-define-generic lunit-test-suite-add-test (suite test)
+ "Add the test to the suite.")
+
+;;; @ test listener
+;;;
+
+(luna-define-class lunit-test-listener)
+
+;;; @ test result
+;;;
+
+(put 'lunit-error 'error-message "test error")
+(put 'lunit-error 'error-conditions '(lunit-error error))
+
+(put 'lunit-failure 'error-message "test failure")
+(put 'lunit-failure 'error-conditions '(lunit-failure lunit-error error))
+
+(eval-and-compile
+ (luna-define-class lunit-test-result ()
+ (errors
+ failures
+ listeners
+ assert-count))
+
+ (luna-define-internal-accessors 'lunit-test-result))
+
+(luna-define-generic lunit-test-result-run (result case)
+ "Run the test case.")
+
+(luna-define-generic lunit-test-result-notify (result message &rest args)
+ "Report the current state of execution.")
+
+(luna-define-generic lunit-test-result-add-listener (result listener)
+ "Add listener to the list of listeners.")
+
+(defun lunit-make-test-result (&rest listeners)
+ "Return a newly allocated `lunit-test-result' instance with LISTENERS."
+ (luna-make-entity 'lunit-test-result :listeners listeners :assert-count 0))
+
+(luna-define-method lunit-test-result-notify ((result lunit-test-result)
+ message args)
+ (let ((listeners
+ (lunit-test-result-listeners-internal result)))
+ (dolist (listener listeners)
+ (apply #'luna-send listener message listener args))))
+
+(luna-define-method lunit-test-result-run ((result lunit-test-result) case)
+ (lunit-test-result-notify result 'lunit-test-listener-start case)
+ (condition-case error
+ (lunit-test-case-run case)
+ (lunit-failure
+ (lunit-test-result-set-failures-internal
+ result
+ (nconc (lunit-test-result-failures-internal result)
+ (list (cons case (cdr error)))))
+ (lunit-test-result-notify
+ result 'lunit-test-listener-failure case (cdr error)))
+ (lunit-error
+ (lunit-test-result-set-errors-internal
+ result
+ (nconc (lunit-test-result-errors-internal result)
+ (list (cons case (cdr error)))))
+ (lunit-test-result-notify
+ result 'lunit-test-listener-error case (cdr error))))
+ (lunit-test-result-set-assert-count-internal
+ result
+ (+ (lunit-test-result-assert-count-internal result)
+ (lunit-test-case-assert-count-internal case)))
+ (lunit-test-result-notify result 'lunit-test-listener-end case))
+
+(luna-define-method lunit-test-result-add-listener ((result lunit-test-result)
+ listener)
+ (let ((listeners
+ (lunit-test-result-listeners-internal result)))
+ (setq listeners (nconc listeners (list listener)))
+ (lunit-test-result-set-listeners-internal result listeners)))
+
+;;; @ test case
+;;;
+
+(eval-and-compile
+ (luna-define-class lunit-test-case (lunit-test)
+ (assert-count))
+
+ (luna-define-internal-accessors 'lunit-test-case))
+
+(luna-define-generic lunit-test-case-run (case)
+ "Run the test case.")
+
+(luna-define-generic lunit-test-case-setup (case)
+ "Setup the test case.")
+
+(luna-define-generic lunit-test-case-teardown (case)
+ "Clear the test case.")
+
+(defun lunit-make-test-case (class name)
+ "Return a newly allocated `lunit-test-case'.
+CLASS is a symbol for class derived from `lunit-test-case'.
+NAME is name of the method to be tested."
+ (luna-make-entity class :name name :assert-count 0))
+
+(luna-define-method lunit-test-number-of-tests ((case lunit-test-case))
+ 1)
+
+(luna-define-method lunit-test-run ((case lunit-test-case) result)
+ (lunit-test-result-run result case))
+
+(luna-define-method lunit-test-case-setup ((case lunit-test-case)))
+(luna-define-method lunit-test-case-teardown ((case lunit-test-case)))
+
+(luna-define-method lunit-test-case-run ((case lunit-test-case))
+ (lunit-test-case-setup case)
+ (unwind-protect
+ (let* ((name
+ (lunit-test-name-internal case))
+ (functions
+ (luna-find-functions case name)))
+ (unless functions
+ (error "Method \"%S\" not found" name))
+ (condition-case error
+ (funcall (car functions) case)
+ (lunit-failure
+ (signal (car error)(cdr error)))
+ (error
+ (signal 'lunit-error error))))
+ (lunit-test-case-teardown case)))
+
+;;; @ test suite
+;;;
+
+(eval-and-compile
+ (luna-define-class lunit-test-suite (lunit-test)
+ (tests))
+
+ (luna-define-internal-accessors 'lunit-test-suite))
+
+(defun lunit-make-test-suite (&rest tests)
+ "Return a newly allocated `lunit-test-suite' instance.
+TESTS holds a number of instances of `lunit-test'."
+ (luna-make-entity 'lunit-test-suite :tests tests))
+
+(luna-define-method lunit-test-suite-add-test ((suite lunit-test-suite) test)
+ (let ((tests (lunit-test-suite-tests-internal suite)))
+ (lunit-test-suite-set-tests-internal suite (nconc tests (list test)))))
+
+(luna-define-method lunit-test-number-of-tests ((suite lunit-test-suite))
+ (let ((tests (lunit-test-suite-tests-internal suite))
+ (accu 0))
+ (dolist (test tests)
+ (setq accu (+ accu (lunit-test-number-of-tests test))))
+ accu))
+
+(luna-define-method lunit-test-run ((suite lunit-test-suite) result)
+ (let ((tests (lunit-test-suite-tests-internal suite)))
+ (dolist (test tests)
+ (lunit-test-run test result))))
+
+;;; @ test runner
+;;;
+
+(defmacro lunit-assert (condition-expr)
+ "Verify that CONDITION-EXPR returns non-nil; signal an error if not."
+ `(unless ,condition-expr
+ (signal 'lunit-failure (list ',condition-expr))))
+
+(defmacro lunit-assert-2 (case condition-expr)
+ "In regard to CASE, verify that CONDITION-EXPR returns non-nil;
+signal an error if not."
+ `(let ((case ,case))
+ (lunit-test-case-set-assert-count-internal
+ case
+ (1+ (lunit-test-case-assert-count-internal case)))
+ (unless ,condition-expr
+ (signal 'lunit-failure (list ',condition-expr)))))
+
+(luna-define-class lunit-test-printer (lunit-test-listener))
+
+(luna-define-method lunit-test-listener-error ((printer lunit-test-printer)
+ case error)
+ (princ (format " error: %S" error)))
+
+(luna-define-method lunit-test-listener-failure ((printer lunit-test-printer)
+ case failure)
+ (princ (format " failure: %S" failure)))
+
+(luna-define-method lunit-test-listener-start ((printer lunit-test-printer)
+ case)
+ (princ (format "Running `%S#%S'..."
+ (luna-class-name case)
+ (lunit-test-name-internal case))))
+
+(luna-define-method lunit-test-listener-end ((printer lunit-test-printer) case)
+ (princ "\n"))
+
+(defun lunit-make-test-suite-from-class (class)
+ "Make a test suite from all test methods of the CLASS."
+ (let (tests)
+ (mapatoms
+ (lambda (symbol)
+ (if (and (fboundp symbol)
+ (string-match "^test" (symbol-name symbol))
+ (null (get symbol 'luna-method-qualifier)))
+ (push (lunit-make-test-case class symbol) tests)))
+ (luna-class-obarray (luna-find-class class)))
+ (apply #'lunit-make-test-suite tests)))
+
+(defun lunit (test)
+ "Run TEST and display the result."
+ (let* ((printer
+ (luna-make-entity 'lunit-test-printer))
+ (result
+ (lunit-make-test-result printer)))
+ (lunit-test-run test result)
+ (let ((assert-count
+ (lunit-test-result-assert-count-internal result))
+ (failures
+ (lunit-test-result-failures-internal result))
+ (errors
+ (lunit-test-result-errors-internal result)))
+ (princ (format "%d runs, %d assertions, %d failures, %d errors\n"
+ (lunit-test-number-of-tests test)
+ assert-count
+ (length failures)
+ (length errors))))))
+
+(defvar imenu-create-index-function)
+(defun lunit-create-index-function ()
+ (require 'imenu)
+ (save-excursion
+ (unwind-protect
+ (progn
+ (goto-char (point-min))
+ (setq imenu-generic-expression
+ '((nil "^\\s-*(def\\(un\\|subst\\|macro\\)\\s-+\\([-A-Za-z0-9+*|:]+\\)" 2)))
+ (funcall imenu-create-index-function))
+ (setq imenu-create-index-function lisp-imenu-generic-expression))))
+
+(defun lunit-generate-template (file)
+ (interactive "fGenerate lunit template for: ")
+ (save-excursion
+ (set-buffer (find-file-noselect file))
+ (let ((index-alist
+ (lunit-create-index-function)))
+ (with-output-to-temp-buffer "*Lunit template*"
+ (let* ((feature
+ (file-name-sans-extension
+ (file-name-nondirectory file)))
+ (class
+ (concat "test-" feature)))
+ (set-buffer standard-output)
+ (insert "\
+\(require 'lunit)
+\(require '" feature ")
+
+\(luna-define-class " class " (lunit-test-case))
+
+")
+ (dolist (index index-alist)
+ (insert "\
+\(luna-define-method " class "-" (car index) " ((case " class "))
+ (lunit-assert nil))
+
+")))))))
+
+(provide 'lunit)
+
+;;; lunit.el ends here
--- /dev/null
+(require 'riece-addon)
+
+(defun test-riece-addon-1-requires ()
+ '(test-riece-addon-2))
+(provide 'test-riece-addon-1)
+
+(defun test-riece-addon-2-requires ()
+ '(test-riece-addon-3 test-riece-addon-4))
+(provide 'test-riece-addon-2)
+
+(defun test-riece-addon-3-requires ())
+(provide 'test-riece-addon-3)
+
+(defun test-riece-addon-4-requires ())
+(provide 'test-riece-addon-4)
+
+(defun test-riece-addon-5-requires ()
+ '(test-riece-addon-6))
+(provide 'test-riece-addon-5)
+
+(defun test-riece-addon-6-requires ()
+ '(test-riece-addon-5))
+(provide 'test-riece-addon-6)
+
+(luna-define-class test-riece-addon (lunit-test-case))
+
+(luna-define-method test-riece-resolve-addons-1 ((case test-riece-addon))
+ (lunit-assert-2
+ case
+ (equal
+ (mapcar #'car (riece-resolve-addons
+ '(test-riece-addon-1 test-riece-addon-2)))
+ '(test-riece-addon-3 test-riece-addon-4
+ test-riece-addon-2 test-riece-addon-1))))
+
+(luna-define-method test-riece-resolve-addons-2 ((case test-riece-addon))
+ (lunit-assert-2
+ case
+ (condition-case error
+ (progn
+ (riece-resolve-addons '(test-riece-addon-5 test-riece-addon-6))
+ nil)
+ (error (nth 1 error)))))
--- /dev/null
+(require 'riece-alias)
+
+(luna-define-class test-riece-alias (lunit-test-case))
+
+(luna-define-method test-riece-alias-percent-hack ((case test-riece-alias))
+ (let ((riece-alias-percent-hack-mask "*.jp"))
+ (lunit-assert-2
+ case
+ (equal
+ (riece-alias-abbrev-percent-hack "#riece:*.jp")
+ "%riece"))
+ (lunit-assert-2
+ case
+ (equal
+ (riece-alias-expand-percent-hack "%riece")
+ "#riece:*.jp"))))
+
+(luna-define-method test-riece-alias-alist-1 ((case test-riece-alias))
+ (let ((riece-alias-alist '(("#riece" . "#r"))))
+ (lunit-assert-2
+ case
+ (equal
+ (riece-alias-abbrev-identity-string "#riece")
+ "#r"))
+ (lunit-assert-2
+ case
+ (equal
+ (riece-alias-expand-identity-string "#r")
+ "#riece"))))
+
+(luna-define-method test-riece-alias-alist-2 ((case test-riece-alias))
+ (let ((riece-alias-alist '(("%riece" . "%r")))
+ (riece-alias-percent-hack-mask "*.jp"))
+ (lunit-assert-2
+ case
+ (equal
+ (riece-alias-abbrev-identity-string "#riece:*.jp")
+ "%r"))
+ (lunit-assert-2
+ case
+ (equal
+ (riece-alias-expand-identity-string "%r")
+ "#riece:*.jp"))))
+
+(luna-define-method test-riece-alias-altsep-1 ((case test-riece-alias))
+ (let ((riece-alias-alternate-separator "@"))
+ (lunit-assert-2
+ case
+ (equal
+ (riece-alias-abbrev-alternate-separator "#riece")
+ "#riece"))
+ (lunit-assert-2
+ case
+ (equal
+ (riece-alias-abbrev-alternate-separator "#riece localhost")
+ "#riece@localhost"))
+ (lunit-assert-2
+ case
+ (equal
+ (riece-alias-abbrev-alternate-separator "#ch@nnel")
+ "#ch@@nnel"))
+ (lunit-assert-2
+ case
+ (equal
+ (riece-alias-abbrev-alternate-separator "#ch@nnel localhost")
+ "#ch@@nnel@localhost"))))
+
+(luna-define-method test-riece-alias-altsep-2 ((case test-riece-alias))
+ (let ((riece-alias-alternate-separator "@@"))
+ (lunit-assert-2
+ case
+ (equal
+ (riece-alias-abbrev-alternate-separator "#riece")
+ "#riece"))
+ (lunit-assert-2
+ case
+ (equal
+ (riece-alias-abbrev-alternate-separator "#riece localhost")
+ "#riece@@localhost"))
+ (lunit-assert-2
+ case
+ (equal
+ (riece-alias-abbrev-alternate-separator "#ch@@nnel")
+ "#ch@@@@nnel"))
+ (lunit-assert-2
+ case
+ (equal
+ (riece-alias-abbrev-alternate-separator "#ch@@nnel localhost")
+ "#ch@@@@nnel@@localhost"))))
+
+(luna-define-method test-riece-alias-altsep-3 ((case test-riece-alias))
+ (let ((riece-alias-alternate-separator "@"))
+ (lunit-assert-2
+ case
+ (equal
+ (riece-alias-expand-alternate-separator "#riece")
+ "#riece"))
+ (lunit-assert-2
+ case
+ (equal
+ (riece-alias-expand-alternate-separator "#riece@localhost")
+ "#riece localhost"))
+ (lunit-assert-2
+ case
+ (equal
+ (riece-alias-expand-alternate-separator "#ch@@nnel")
+ "#ch@nnel"))
+ (lunit-assert-2
+ case
+ (equal
+ (riece-alias-expand-alternate-separator "#ch@@nnel@localhost")
+ "#ch@nnel localhost"))))
+
+(luna-define-method test-riece-alias-altsep-4 ((case test-riece-alias))
+ (let ((riece-alias-alternate-separator "@@"))
+ (lunit-assert-2
+ case
+ (equal
+ (riece-alias-expand-alternate-separator "#riece")
+ "#riece"))
+ (lunit-assert-2
+ case
+ (equal
+ (riece-alias-expand-alternate-separator "#riece@@localhost")
+ "#riece localhost"))
+ (lunit-assert-2
+ case
+ (equal
+ (riece-alias-expand-alternate-separator "#ch@@@@nnel")
+ "#ch@@nnel"))
+ (lunit-assert-2
+ case
+ (equal
+ (riece-alias-expand-alternate-separator "#ch@@@@nnel@@localhost")
+ "#ch@@nnel localhost"))))
\ No newline at end of file
--- /dev/null
+(require 'riece-cache)
+
+(luna-define-class test-riece-cache (lunit-test-case))
+
+(luna-define-method test-riece-cache-get-set ((case test-riece-cache))
+ (let ((cache (riece-make-cache 3)))
+ (riece-cache-set cache "0" 0)
+ (lunit-assert-2
+ case
+ (= (riece-cache-get cache "0") 0))))
+
+(luna-define-method test-riece-cache-set-overflow ((case test-riece-cache))
+ (let ((cache (riece-make-cache 3)))
+ (riece-cache-set cache "0" 0)
+ (lunit-assert-2
+ case
+ (= (riece-cache-hash-length cache) 1))
+ (riece-cache-set cache "1" 1)
+ (lunit-assert-2
+ case
+ (= (riece-cache-hash-length cache) 2))
+ (riece-cache-set cache "2" 2)
+ (lunit-assert-2
+ case
+ (= (riece-cache-hash-length cache) 3))
+ (riece-cache-set cache "3" 3)
+ (lunit-assert-2
+ case
+ (= (riece-cache-hash-length cache) 3))
+ (lunit-assert-2
+ case
+ (null (riece-cache-get cache "0")))))
+
+(luna-define-method test-riece-cache-get-increase-key ((case test-riece-cache))
+ (let ((cache (riece-make-cache 3)))
+ (riece-cache-set cache "0" 0)
+ (riece-cache-set cache "1" 1)
+ (riece-cache-set cache "2" 2)
+ (lunit-assert-2
+ case
+ (equal (riece-cache-node-key (riece-cache-first cache)) "0"))
+ (lunit-assert-2
+ case
+ (equal (riece-cache-node-key (riece-cache-last cache)) "2"))
+ (riece-cache-get cache "1")
+ (lunit-assert-2
+ case
+ (equal (riece-cache-node-key (riece-cache-last cache)) "1"))))
+
+(luna-define-method test-riece-cache-delete ((case test-riece-cache))
+ (let ((cache (riece-make-cache 3)))
+ (riece-cache-set cache "0" 0)
+ (riece-cache-set cache "1" 1)
+ (riece-cache-set cache "2" 2)
+ (riece-cache-delete cache "1")
+ (lunit-assert-2
+ case
+ (= (riece-cache-hash-length cache) 2))
+ (lunit-assert-2
+ case
+ (null (riece-cache-get cache "1")))
+ (riece-cache-set cache "1" 1)
+ (riece-cache-delete cache "0")
+ (lunit-assert-2
+ case
+ (= (riece-cache-hash-length cache) 2))
+ (lunit-assert-2
+ case
+ (null (riece-cache-get cache "0")))
+ (riece-cache-set cache "0" 0)
+ (riece-cache-delete cache "2")
+ (lunit-assert-2
+ case
+ (= (riece-cache-hash-length cache) 2))
+ (lunit-assert-2
+ case
+ (null (riece-cache-get cache "2")))))
--- /dev/null
+(require 'riece-eval)
+
+(luna-define-class test-riece-eval (lunit-test-case))
+
+(luna-define-method test-riece-eval-string ((case test-riece-eval))
+ (lunit-assert-2
+ case
+ (equal
+ (riece-eval-form "\"abc\"")
+ "abc"))
+ (lunit-assert-2
+ case
+ (equal
+ (riece-eval-form "(concat \"d\" \"e\" \"f\")")
+ "def")))
+
+(luna-define-method test-riece-eval-list ((case test-riece-eval))
+ (lunit-assert-2
+ case
+ (equal
+ (riece-eval-form "'(a b c)")
+ "(a b c)"))
+ (lunit-assert-2
+ case
+ (equal
+ (riece-eval-form "(cons 'd \"e\")")
+ "(d . \"e\")")))
+
+(luna-define-method test-riece-eval-number ((case test-riece-eval))
+ (lunit-assert-2
+ case
+ (equal
+ (riece-eval-form "123")
+ "123"))
+ (lunit-assert-2
+ case
+ (equal
+ (riece-eval-form "(+ 123 45.6)")
+ "168.6")))
+
+(luna-define-method test-riece-eval-nil ((case test-riece-eval))
+ (lunit-assert-2
+ case
+ (equal
+ (riece-eval-form "nil")
+ ""))
+ (lunit-assert-2
+ case
+ (equal
+ (riece-eval-form "'()")
+ "")))
+
+(luna-define-method test-riece-eval-error ((case test-riece-eval))
+ (let (riece-eval-ignore-error symbol)
+ (makunbound 'symbol)
+ (lunit-assert-2
+ case
+ (equal
+ (riece-eval-form "symbol")
+ "Error evaluating symbol: (void-variable symbol)"))
+ (setq riece-eval-ignore-error t)
+ (lunit-assert-2
+ case
+ (equal
+ (riece-eval-form "symbol")
+ nil))))
--- /dev/null
+(require 'riece-log)
+
+(luna-define-class test-riece-log (lunit-test-case))
+
+(defun test-riece-log-delete-directory (directory)
+ (condition-case nil
+ ;; delete-directory has an optional parameter RECURSIVE, since
+ ;; Emacs 23.2.
+ (delete-directory directory t)
+ (wrong-number-of-arguments
+ ;; FIXME: we could use this portable version always, but it
+ ;; doesn't work well with Emacs 23.
+ (let* ((file-name-coding-system 'no-conversion)
+ (files (directory-files directory t nil t)))
+ (while files
+ (if (file-directory-p (car files))
+ (unless (member (file-name-nondirectory (car files)) '("." ".."))
+ (test-riece-log-delete-directory (car files)))
+ (delete-file (car files)))
+ (setq files (cdr files)))
+ (delete-directory directory)))))
+
+(luna-define-method lunit-test-case-setup ((case test-riece-log))
+ (setq riece-log-directory
+ (expand-file-name (make-temp-name "test-riece-log")
+ (if (featurep 'xemacs)
+ (temp-directory)
+ temporary-file-directory))
+ test-riece-log-directory
+ (expand-file-name "=23riece" riece-log-directory))
+ (make-directory riece-log-directory)
+ (make-directory test-riece-log-directory)
+ (write-region "03:14 <test> a b c\n03:15 <test> a b c\n" nil
+ (expand-file-name "19700102.txt" test-riece-log-directory)
+ t 0)
+ (write-region "03:14 <test> 1 2 3\n" nil
+ (expand-file-name "19700101.txt" test-riece-log-directory)
+ t 0))
+
+(luna-define-method lunit-test-case-teardown ((case test-riece-log))
+ (test-riece-log-delete-directory riece-log-directory))
+
+(luna-define-method test-riece-log-insert-1 ((case test-riece-log))
+ (let (riece-log-directory-map)
+ (lunit-assert-2
+ case
+ (equal
+ (concat "03:14 <test> 1 2 3 (1970/01/01)\n"
+ "03:14 <test> a b c (1970/01/02)\n"
+ "03:15 <test> a b c (1970/01/02)\n")
+ (with-temp-buffer
+ (riece-log-insert (riece-make-identity "#riece" "") 3)
+ (buffer-string))))))
+
+(luna-define-method test-riece-log-insert-2 ((case test-riece-log))
+ (let (riece-log-directory-map)
+ (lunit-assert-2
+ case
+ (equal ""
+ (with-temp-buffer
+ (riece-log-insert (riece-make-identity "#riece" "") t)
+ (buffer-string))))))
+
+(luna-define-method test-riece-log-encode-file-name ((case test-riece-log))
+ (let (riece-log-file-name-coding-system)
+ (lunit-assert-2
+ case
+ (equal "=23riece"
+ (riece-log-encode-file-name "#riece")))
+ (lunit-assert-2
+ case
+ (equal "=23riece=3A=2A=2Ejp"
+ (riece-log-encode-file-name "#riece:*.jp")))
+ (lunit-assert-2
+ case
+ (equal "=23riece=="
+ (riece-log-encode-file-name "#riece=")))))
+
+(luna-define-method test-riece-log-encode-file-name-mule
+ ((case test-riece-log))
+ (let ((riece-log-file-name-coding-system 'iso-8859-1))
+ (lunit-assert-2
+ case
+ (equal "=23\xABriece\xBB"
+ (riece-log-encode-file-name
+ (format "#%criece%c"
+ (make-char 'latin-iso8859-1 43)
+ (make-char 'latin-iso8859-1 59))))))
+ (let ((riece-log-file-name-coding-system 'iso-2022-jp))
+ (lunit-assert-2
+ case
+ (equal "=23=1B=24B=24j=21=3C=249=1B=28B"
+ (riece-log-encode-file-name
+ (format "#%c%c%c"
+ (make-char 'japanese-jisx0208 36 106)
+ (make-char 'japanese-jisx0208 33 60)
+ (make-char 'japanese-jisx0208 36 57)))))))
+
+(luna-define-method test-riece-log-decode-file-name ((case test-riece-log))
+ (let (riece-log-file-name-coding-system)
+ (lunit-assert-2
+ case
+ (equal "#riece"
+ (riece-log-decode-file-name "=23riece")))
+ (lunit-assert-2
+ case
+ (equal "#riece:*.jp"
+ (riece-log-decode-file-name "=23riece=3A=2A=2Ejp")))
+ (lunit-assert-2
+ case
+ (equal "#riece="
+ (riece-log-decode-file-name "=23riece==")))))
+
+(luna-define-method test-riece-log-decode-file-name-mule
+ ((case test-riece-log))
+ (let ((riece-log-file-name-coding-system 'iso-8859-1))
+ (lunit-assert-2
+ case
+ (equal (format "#%criece%c"
+ (make-char 'latin-iso8859-1 43)
+ (make-char 'latin-iso8859-1 59))
+ (riece-log-decode-file-name
+ "=23\xABriece\xBB"))))
+ (let ((riece-log-file-name-coding-system 'iso-2022-jp))
+ (lunit-assert-2
+ case
+ (equal (format "#%c%c%c"
+ (make-char 'japanese-jisx0208 36 106)
+ (make-char 'japanese-jisx0208 33 60)
+ (make-char 'japanese-jisx0208 36 57))
+ (riece-log-decode-file-name
+ "=23=1B=24B=24j=21=3C=249=1B=28B")))))
+
+(luna-define-method test-riece-log-display-message-function
+ ((case test-riece-log))
+ (let ((riece-log-file-name-coding-system 'euc-jp)
+ (riece-log-enabled t)
+ riece-log-directory-map
+ (riece-server-process-alist
+ (list (cons "" (start-process "" (current-buffer) "true")))))
+ (put 'riece-log 'riece-addon-enabled t)
+ (riece-log-display-message-function
+ (riece-make-message
+ (riece-make-identity "ueno" "")
+ (riece-make-identity (format "#%c%c%c"
+ (make-char 'japanese-jisx0208 36 106)
+ (make-char 'japanese-jisx0208 33 60)
+ (make-char 'japanese-jisx0208 36 57))
+ "")
+ "a b c\n" nil t))
+ (put 'riece-log 'riece-addon-enabled nil))
+ (let ((file-name-coding-system 'no-conversion))
+ (lunit-assert-2
+ case
+ (file-directory-p
+ (expand-file-name
+ (encode-coding-string
+ (format "=23%c%c%c"
+ (make-char 'japanese-jisx0208 36 106)
+ (make-char 'japanese-jisx0208 33 60)
+ (make-char 'japanese-jisx0208 36 57))
+ 'euc-jp)
+ riece-log-directory)))))
--- /dev/null
+(require 'riece-ruby)
+
+(luna-define-class test-riece-ruby (lunit-test-case))
+
+(luna-define-method lunit-test-case-teardown ((case test-riece-ruby))
+ (setq riece-ruby-output-handler-alist nil
+ riece-ruby-output-queue-alist nil)
+ (riece-ruby-execute "exit!")
+ (sleep-for 1))
+
+(luna-define-method test-riece-ruby-execute-1 ((case test-riece-ruby))
+ (lunit-assert-2
+ case
+ (equal (riece-ruby-execute "sleep 30") "0"))
+ (lunit-assert-2
+ case
+ (equal (riece-ruby-execute "1 << 32") "1"))
+ (lunit-assert-2
+ case
+ (equal (riece-ruby-execute "\"") "2")))
+
+(luna-define-method test-riece-ruby-inspect-1 ((case test-riece-ruby))
+ (let ((name (riece-ruby-execute "sleep 30")))
+ (lunit-assert-2
+ case
+ (eq (car (car (riece-ruby-inspect name))) 'OK))
+ (lunit-assert-2
+ case
+ (assoc "running" (nth 2 (riece-ruby-inspect name))))))
+
+(luna-define-method test-riece-ruby-inspect-2 ((case test-riece-ruby))
+ (let ((name (riece-ruby-execute "1 << 32")))
+ (lunit-assert-2
+ case
+ (eq (car (car (riece-ruby-inspect name))) 'OK))
+ (lunit-assert-2
+ case
+ (equal (nth 1 (riece-ruby-inspect name)) "4294967296"))
+ (lunit-assert-2
+ case
+ (assoc "finished" (nth 2 (riece-ruby-inspect name))))))
+
+(luna-define-method test-riece-ruby-inspect-3 ((case test-riece-ruby))
+ (let ((name (riece-ruby-execute "\"")))
+ (lunit-assert-2
+ case
+ (eq (car (car (riece-ruby-inspect name))) 'OK))
+ (lunit-assert-2
+ case
+ (equal (nth 1 (riece-ruby-inspect name))
+ "unterminated string meets end of file"))
+ (lunit-assert-2
+ case
+ (assoc "exited" (nth 2 (riece-ruby-inspect name))))))
+
+(luna-define-method test-riece-ruby-clear-1 ((case test-riece-ruby))
+ (let ((name (riece-ruby-execute "sleep 30")))
+ (riece-ruby-clear name)
+ (lunit-assert-2
+ case
+ (eq (car (car (riece-ruby-inspect name))) 'ERR))
+ (lunit-assert-2
+ case
+ (= (nth 1 (car (riece-ruby-inspect name))) 105))))
+
+(defvar test-riece-ruby-exit-handler-1 nil)
+(luna-define-method test-riece-ruby-exit-handler-1 ((case test-riece-ruby))
+ (let ((name (riece-ruby-execute "1 << 32")))
+ (riece-ruby-set-exit-handler
+ name
+ (lambda (name)
+ (setq test-riece-ruby-exit-handler-1 name)))
+ (sleep-for 1)
+ (lunit-assert-2
+ case
+ (equal test-riece-ruby-exit-handler-1 name))))
+
+(defvar test-riece-ruby-output-handler-1 nil)
+(luna-define-method test-riece-ruby-output-handler-1 ((case test-riece-ruby))
+ (let ((name (riece-ruby-execute "output(1 << 32)")))
+ (riece-ruby-set-output-handler
+ name
+ (lambda (name output time)
+ (setq test-riece-ruby-output-handler-1 output)))
+ (sleep-for 1)
+ (lunit-assert-2
+ case
+ (equal test-riece-ruby-output-handler-1 "4294967296"))))
+
+(defvar test-riece-ruby-output-handler-2 nil)
+(luna-define-method test-riece-ruby-output-handler-2 ((case test-riece-ruby))
+ (let ((name (riece-ruby-execute "output(1 << 32)")))
+ (sleep-for 1)
+ (riece-ruby-set-output-handler
+ name
+ (lambda (name output time)
+ (setq test-riece-ruby-output-handler-2 output)))
+ (lunit-assert-2
+ case
+ (equal test-riece-ruby-output-handler-2 "4294967296"))))
--- /dev/null
+(require 'riece-shrink-buffer)
+
+(luna-define-class test-riece-shrink-buffer (lunit-test-case))
+
+(luna-define-method test-riece-shrink-buffer ((case test-riece-shrink-buffer))
+ (let* ((riece-max-buffer-size 255)
+ (riece-shrink-buffer-remove-chars 128)
+ (line (concat (make-string 15 ? ) "\n"))
+ (index 0))
+ (with-temp-buffer
+ (while (< index 16)
+ (insert line)
+ (setq index (1+ index)))
+ (riece-shrink-buffer (current-buffer))
+ (lunit-assert-2
+ case
+ (equal
+ (apply #'concat (make-list 8 line))
+ (buffer-string))))))
--- /dev/null
+(require 'riece-url)
+
+(luna-define-class test-riece-url (lunit-test-case))
+
+(luna-define-method test-riece-url-replace-match ((case test-riece-url))
+ (with-temp-buffer
+ (insert "111\n222\n333\n")
+ (goto-char (point-min))
+ (re-search-forward "2\\(2\\)2")
+ (lunit-assert-2
+ case
+ (equal (save-match-data
+ (riece-url-replace-match "\\&"))
+ "222"))
+ (lunit-assert-2
+ case
+ (equal (save-match-data
+ (riece-url-replace-match "\\0"))
+ "\\0"))
+ (lunit-assert-2
+ case
+ (equal (save-match-data
+ (riece-url-replace-match "\\1"))
+ "2"))
+ (lunit-assert-2
+ case
+ (equal (save-match-data
+ (riece-url-replace-match "\\\\"))
+ "\\"))))
+
+(luna-define-method test-riece-url-regexp-alist ((case test-riece-url))
+ (with-temp-buffer
+ (insert "Bug#12345\n")
+ (let ((riece-url-regexp-alist
+ '(("\\bBug#\\([0-9]+\\)\\b" .
+ "http://bugs.debian.org/\\1")))
+ riece-urls
+ riece-addons)
+ (riece-url-scan-region (point-min) (point-max))
+ (lunit-assert-2
+ case
+ (member "http://bugs.debian.org/12345" riece-urls)))))
--- /dev/null
+(require 'riece-yank)
+
+(luna-define-class test-riece-yank (lunit-test-case))
+
+(luna-define-method test-riece-yank-strip-space ((case test-riece-yank))
+ (lunit-assert-2
+ case
+ (equal
+ (riece-yank-strip-space "\
+ def a
+ 0.times do
+ 0.times do
+ p 1 # this line begins with a TAB
+ end
+ end
+ end
+
+")
+ "\
+def a
+ 0.times do
+ 0.times do
+ p 1 # this line begins with a TAB
+ end
+ end
+end")))
--- /dev/null
+;;; url-riece.el --- Adapting `riece' to `url-irc'
+;; Copyright (C) 2004 Masatake YAMATO
+
+;; Author: Masatake YAMATO <jet@gyve.org>
+;; Keywords: IRC, riece, url, comm, data, processes
+
+;; 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., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
+
+;;; Commentary:
+;;
+;; With this package you can opne an url which protocol is irc by
+;; riece via url package of GNU Emacs.
+;;
+;; e.g.
+;; (url-retrieve-synchronously "irc://irc.gnome.org:6667/#gtk+")
+;; (url-mm-url "irc://irc.gnome.org:6667/#gtk+")
+;;
+
+;;; Code:
+(require 'riece)
+(require 'url)
+(require 'url-irc)
+
+(defun url-irc-riece-ready-p ()
+ "Riece is active or not.
+\(If it is active, a server named \"\" may exists.)"
+ (and (boundp 'riece-server-process-alist)
+ riece-server-process-alist))
+
+;; Based on the code posted to liece ml by Daiki Ueno <ueno@unixuser.org>
+;; Message-Id: <612cb699-83c0-47ad-a991-423c46bc8384@well-done.deisui.org>
+(defun url-irc-riece-find-server (host &optional port)
+ "Find an entry for HOST:PORT in `riece-server-process-alist'."
+ (unless port (setq port 6667))
+ (catch 'found
+ (let (name name-sans-service plist)
+ (mapc (lambda (pointer)
+ (setq name (car pointer)
+ name-sans-service (plist-get
+ (riece-server-name-to-server name)
+ :host)
+ plist (if (equal name "")
+ riece-server
+ (cdr (or (assoc name riece-server-alist)
+ (assoc name-sans-service riece-server-alist)))))
+ (when (and plist
+ (equal (plist-get plist :host) host)
+ (eq (or (plist-get plist :service) 6667) port))
+ (throw 'found pointer)))
+ riece-server-process-alist)
+ nil)))
+;(url-irc-riece-find-server "localhost")
+;(url-irc-riece-find-server "localhost" 6667)
+;(url-irc-riece-find-server "irc.gnome.org")
+
+(defun url-irc-riece (host port channel user password)
+ "Adapting `riece' to `url-irc'.
+See the documentation of `url-irc-function'about HOST, PORT, CHANNEL, USER
+and PASSWORD. Just give nil to it."
+ (unless user (setq user riece-nickname))
+ (let ((server (if port (format "%s:%d" host port) host)))
+ (cond
+ ((not (url-irc-riece-ready-p))
+ (setq riece-server server)
+ (let ((riece-default-password password)
+ (riece-nickname user))
+ ;; Just start riece
+ (riece))
+ (url-irc-riece host port channel user password))
+ ((not (url-irc-riece-find-server host port))
+ (let ((riece-default-password password)
+ (riece-nickname user))
+ ;; Just open the server
+ (riece-command-open-server server))
+ (url-irc-riece host port channel user password))
+ (t
+ (let ((server-name (car (url-irc-riece-find-server host port))))
+ (riece-command-join
+ (riece-parse-identity (if (string= server-name "")
+ channel
+ (format "%s %s" channel server-name)))))
+ ;; Show the windows
+ (riece)))))
+; (url-irc-riece "localhost" nil "#mandara" "jetgx" nil)
+; (url-irc-riece "localhost" nil "#misc" "jetgx" nil)
+; (url-irc-riece "irc.gnome.org" nil "#mandara" "jetgx" nil)
+; (url-irc-riece "irc.gnome.org" nil "#misc" "jetgx" nil)
+
+(setq url-irc-function 'url-irc-riece)
+
+(provide 'url-riece)
+
+;; arch-tag: b54bcdf0-0ee3-447b-bc07-e7329d9f2f45
+;;; url-riece.el ends here