From ddc5c7797a5af35f6aa7d64128db476923e814f3 Mon Sep 17 00:00:00 2001 From: Steve Youngs Date: Sun, 12 Jun 2016 20:18:00 +1000 Subject: [PATCH] Remove riece, making way for new subtree Riece pkg Signed-off-by: Steve Youngs --- xemacs-packages/riece/AUTHORS | 25 - xemacs-packages/riece/ChangeLog | 293 - xemacs-packages/riece/INSTALL-CVS | 20 - xemacs-packages/riece/Makefile | 82 - xemacs-packages/riece/Makefile.am | 10 - xemacs-packages/riece/NEWS | 601 -- xemacs-packages/riece/NEWS.ja | 596 -- xemacs-packages/riece/README | 50 - xemacs-packages/riece/README.ja | 51 - xemacs-packages/riece/acinclude.m4 | 359 - xemacs-packages/riece/configure.ac | 17 - xemacs-packages/riece/doc/HACKING | 445 - xemacs-packages/riece/doc/HACKING.ja | 421 - xemacs-packages/riece/doc/Makefile.am | 13 - xemacs-packages/riece/doc/fdl.texi | 403 - xemacs-packages/riece/doc/infohack.el | 177 - xemacs-packages/riece/doc/irchat-copyright.el | 82 - xemacs-packages/riece/doc/ptexinfmt.el | 892 -- xemacs-packages/riece/doc/riece-en.texi | 462 -- xemacs-packages/riece/doc/riece-ja.texi | 833 -- xemacs-packages/riece/doc/texinfo.tex | 7210 ----------------- xemacs-packages/riece/doc/version-en.texi | 4 - xemacs-packages/riece/doc/version-ja.texi | 4 - xemacs-packages/riece/lisp/COMPILE | 235 - xemacs-packages/riece/lisp/ChangeLog | 4599 ----------- xemacs-packages/riece/lisp/ChangeLog.Liece | 4696 ----------- xemacs-packages/riece/lisp/Makefile.am | 58 - xemacs-packages/riece/lisp/aproxy.rb | 107 - xemacs-packages/riece/lisp/riece-000.el | 80 - xemacs-packages/riece/lisp/riece-200.el | 37 - xemacs-packages/riece/lisp/riece-300.el | 481 -- xemacs-packages/riece/lisp/riece-400.el | 88 - xemacs-packages/riece/lisp/riece-500.el | 37 - .../riece/lisp/riece-addon-modules.el | 39 - xemacs-packages/riece/lisp/riece-addon.el | 512 -- xemacs-packages/riece/lisp/riece-alias.el | 177 - xemacs-packages/riece/lisp/riece-async.el | 96 - xemacs-packages/riece/lisp/riece-biff.el | 109 - xemacs-packages/riece/lisp/riece-button.el | 316 - xemacs-packages/riece/lisp/riece-cache.el | 171 - xemacs-packages/riece/lisp/riece-channel.el | 234 - xemacs-packages/riece/lisp/riece-coding.el | 89 - .../riece/lisp/riece-command-next-channel.xpm | 67 - .../lisp/riece-command-previous-channel.xpm | 68 - xemacs-packages/riece/lisp/riece-commands.el | 758 -- xemacs-packages/riece/lisp/riece-compat.el | 71 - xemacs-packages/riece/lisp/riece-complete.el | 120 - xemacs-packages/riece/lisp/riece-ctcp.el | 415 - xemacs-packages/riece/lisp/riece-ctlseq.el | 193 - xemacs-packages/riece/lisp/riece-debug.el | 97 - xemacs-packages/riece/lisp/riece-develop.el | 81 - xemacs-packages/riece/lisp/riece-display.el | 501 -- xemacs-packages/riece/lisp/riece-doctor.el | 132 - xemacs-packages/riece/lisp/riece-emacs.el | 150 - xemacs-packages/riece/lisp/riece-epg.el | 238 - xemacs-packages/riece/lisp/riece-eval-ruby.el | 91 - xemacs-packages/riece/lisp/riece-eval.el | 94 - xemacs-packages/riece/lisp/riece-filter.el | 153 - xemacs-packages/riece/lisp/riece-foolproof.el | 69 - xemacs-packages/riece/lisp/riece-globals.el | 214 - xemacs-packages/riece/lisp/riece-google.el | 241 - xemacs-packages/riece/lisp/riece-guess.el | 116 - xemacs-packages/riece/lisp/riece-handle.el | 418 - xemacs-packages/riece/lisp/riece-hangman.el | 236 - xemacs-packages/riece/lisp/riece-highlight.el | 327 - xemacs-packages/riece/lisp/riece-history.el | 164 - xemacs-packages/riece/lisp/riece-icon.el | 381 - xemacs-packages/riece/lisp/riece-identity.el | 229 - xemacs-packages/riece/lisp/riece-ignore.el | 148 - xemacs-packages/riece/lisp/riece-irc.el | 120 - xemacs-packages/riece/lisp/riece-kakasi.el | 75 - xemacs-packages/riece/lisp/riece-keepalive.el | 76 - xemacs-packages/riece/lisp/riece-keyword.el | 121 - xemacs-packages/riece/lisp/riece-layout.el | 302 - xemacs-packages/riece/lisp/riece-log.el | 308 - xemacs-packages/riece/lisp/riece-lsdb.el | 151 - .../riece/lisp/riece-mcat-japanese.el | 170 - xemacs-packages/riece/lisp/riece-mcat.el | 114 - xemacs-packages/riece/lisp/riece-menu.el | 129 - xemacs-packages/riece/lisp/riece-message.el | 262 - xemacs-packages/riece/lisp/riece-mini.el | 158 - xemacs-packages/riece/lisp/riece-misc.el | 254 - xemacs-packages/riece/lisp/riece-mode.el | 72 - xemacs-packages/riece/lisp/riece-naming.el | 138 - xemacs-packages/riece/lisp/riece-ndcc.el | 250 - xemacs-packages/riece/lisp/riece-options.el | 339 - .../riece/lisp/riece-package-info.el | 33 - .../riece/lisp/riece-package-info.el.in | 33 - xemacs-packages/riece/lisp/riece-rdcc.el | 373 - xemacs-packages/riece/lisp/riece-ruby.el | 399 - xemacs-packages/riece/lisp/riece-server.el | 317 - .../riece/lisp/riece-shrink-buffer.el | 117 - xemacs-packages/riece/lisp/riece-signal.el | 121 - .../riece/lisp/riece-skk-kakutei.el | 84 - .../riece/lisp/riece-submit-bug-report.xpm | 177 - xemacs-packages/riece/lisp/riece-toolbar.el | 139 - xemacs-packages/riece/lisp/riece-unread.el | 197 - xemacs-packages/riece/lisp/riece-url.el | 151 - xemacs-packages/riece/lisp/riece-user.el | 162 - xemacs-packages/riece/lisp/riece-version.el | 113 - xemacs-packages/riece/lisp/riece-xemacs.el | 144 - xemacs-packages/riece/lisp/riece-xface.el | 93 - xemacs-packages/riece/lisp/riece-xfaceb.el | 149 - xemacs-packages/riece/lisp/riece-yank.el | 103 - xemacs-packages/riece/lisp/riece.el | 627 -- xemacs-packages/riece/lisp/server.rb | 226 - xemacs-packages/riece/lisp/test/Makefile.am | 4 - xemacs-packages/riece/lisp/test/luna.el | 434 - .../riece/lisp/test/lunit-report.el | 155 - xemacs-packages/riece/lisp/test/lunit.el | 336 - .../riece/lisp/test/test-riece-addon.el | 43 - .../riece/lisp/test/test-riece-alias.el | 135 - .../riece/lisp/test/test-riece-cache.el | 77 - .../riece/lisp/test/test-riece-eval.el | 66 - .../riece/lisp/test/test-riece-log.el | 158 - .../riece/lisp/test/test-riece-ruby.el | 100 - .../lisp/test/test-riece-shrink-buffer.el | 19 - .../riece/lisp/test/test-riece-url.el | 42 - .../riece/lisp/test/test-riece-yank.el | 26 - xemacs-packages/riece/lisp/url-riece.el | 107 - xemacs-packages/riece/package-info.in | 19 - 121 files changed, 39501 deletions(-) delete mode 100644 xemacs-packages/riece/AUTHORS delete mode 100644 xemacs-packages/riece/ChangeLog delete mode 100644 xemacs-packages/riece/INSTALL-CVS delete mode 100644 xemacs-packages/riece/Makefile delete mode 100644 xemacs-packages/riece/Makefile.am delete mode 100644 xemacs-packages/riece/NEWS delete mode 100644 xemacs-packages/riece/NEWS.ja delete mode 100644 xemacs-packages/riece/README delete mode 100644 xemacs-packages/riece/README.ja delete mode 100644 xemacs-packages/riece/acinclude.m4 delete mode 100644 xemacs-packages/riece/configure.ac delete mode 100644 xemacs-packages/riece/doc/HACKING delete mode 100644 xemacs-packages/riece/doc/HACKING.ja delete mode 100644 xemacs-packages/riece/doc/Makefile.am delete mode 100644 xemacs-packages/riece/doc/fdl.texi delete mode 100644 xemacs-packages/riece/doc/infohack.el delete mode 100644 xemacs-packages/riece/doc/irchat-copyright.el delete mode 100644 xemacs-packages/riece/doc/ptexinfmt.el delete mode 100644 xemacs-packages/riece/doc/riece-en.texi delete mode 100644 xemacs-packages/riece/doc/riece-ja.texi delete mode 100644 xemacs-packages/riece/doc/texinfo.tex delete mode 100644 xemacs-packages/riece/doc/version-en.texi delete mode 100644 xemacs-packages/riece/doc/version-ja.texi delete mode 100644 xemacs-packages/riece/lisp/COMPILE delete mode 100644 xemacs-packages/riece/lisp/ChangeLog delete mode 100644 xemacs-packages/riece/lisp/ChangeLog.Liece delete mode 100644 xemacs-packages/riece/lisp/Makefile.am delete mode 100644 xemacs-packages/riece/lisp/aproxy.rb delete mode 100644 xemacs-packages/riece/lisp/riece-000.el delete mode 100644 xemacs-packages/riece/lisp/riece-200.el delete mode 100644 xemacs-packages/riece/lisp/riece-300.el delete mode 100644 xemacs-packages/riece/lisp/riece-400.el delete mode 100644 xemacs-packages/riece/lisp/riece-500.el delete mode 100644 xemacs-packages/riece/lisp/riece-addon-modules.el delete mode 100644 xemacs-packages/riece/lisp/riece-addon.el delete mode 100644 xemacs-packages/riece/lisp/riece-alias.el delete mode 100644 xemacs-packages/riece/lisp/riece-async.el delete mode 100644 xemacs-packages/riece/lisp/riece-biff.el delete mode 100644 xemacs-packages/riece/lisp/riece-button.el delete mode 100644 xemacs-packages/riece/lisp/riece-cache.el delete mode 100644 xemacs-packages/riece/lisp/riece-channel.el delete mode 100644 xemacs-packages/riece/lisp/riece-coding.el delete mode 100644 xemacs-packages/riece/lisp/riece-command-next-channel.xpm delete mode 100644 xemacs-packages/riece/lisp/riece-command-previous-channel.xpm delete mode 100644 xemacs-packages/riece/lisp/riece-commands.el delete mode 100644 xemacs-packages/riece/lisp/riece-compat.el delete mode 100644 xemacs-packages/riece/lisp/riece-complete.el delete mode 100644 xemacs-packages/riece/lisp/riece-ctcp.el delete mode 100644 xemacs-packages/riece/lisp/riece-ctlseq.el delete mode 100644 xemacs-packages/riece/lisp/riece-debug.el delete mode 100644 xemacs-packages/riece/lisp/riece-develop.el delete mode 100644 xemacs-packages/riece/lisp/riece-display.el delete mode 100644 xemacs-packages/riece/lisp/riece-doctor.el delete mode 100644 xemacs-packages/riece/lisp/riece-emacs.el delete mode 100644 xemacs-packages/riece/lisp/riece-epg.el delete mode 100644 xemacs-packages/riece/lisp/riece-eval-ruby.el delete mode 100644 xemacs-packages/riece/lisp/riece-eval.el delete mode 100644 xemacs-packages/riece/lisp/riece-filter.el delete mode 100644 xemacs-packages/riece/lisp/riece-foolproof.el delete mode 100644 xemacs-packages/riece/lisp/riece-globals.el delete mode 100644 xemacs-packages/riece/lisp/riece-google.el delete mode 100644 xemacs-packages/riece/lisp/riece-guess.el delete mode 100644 xemacs-packages/riece/lisp/riece-handle.el delete mode 100644 xemacs-packages/riece/lisp/riece-hangman.el delete mode 100644 xemacs-packages/riece/lisp/riece-highlight.el delete mode 100644 xemacs-packages/riece/lisp/riece-history.el delete mode 100644 xemacs-packages/riece/lisp/riece-icon.el delete mode 100644 xemacs-packages/riece/lisp/riece-identity.el delete mode 100644 xemacs-packages/riece/lisp/riece-ignore.el delete mode 100644 xemacs-packages/riece/lisp/riece-irc.el delete mode 100644 xemacs-packages/riece/lisp/riece-kakasi.el delete mode 100644 xemacs-packages/riece/lisp/riece-keepalive.el delete mode 100644 xemacs-packages/riece/lisp/riece-keyword.el delete mode 100644 xemacs-packages/riece/lisp/riece-layout.el delete mode 100644 xemacs-packages/riece/lisp/riece-log.el delete mode 100644 xemacs-packages/riece/lisp/riece-lsdb.el delete mode 100644 xemacs-packages/riece/lisp/riece-mcat-japanese.el delete mode 100644 xemacs-packages/riece/lisp/riece-mcat.el delete mode 100644 xemacs-packages/riece/lisp/riece-menu.el delete mode 100644 xemacs-packages/riece/lisp/riece-message.el delete mode 100644 xemacs-packages/riece/lisp/riece-mini.el delete mode 100644 xemacs-packages/riece/lisp/riece-misc.el delete mode 100644 xemacs-packages/riece/lisp/riece-mode.el delete mode 100644 xemacs-packages/riece/lisp/riece-naming.el delete mode 100644 xemacs-packages/riece/lisp/riece-ndcc.el delete mode 100644 xemacs-packages/riece/lisp/riece-options.el delete mode 100644 xemacs-packages/riece/lisp/riece-package-info.el delete mode 100644 xemacs-packages/riece/lisp/riece-package-info.el.in delete mode 100644 xemacs-packages/riece/lisp/riece-rdcc.el delete mode 100644 xemacs-packages/riece/lisp/riece-ruby.el delete mode 100644 xemacs-packages/riece/lisp/riece-server.el delete mode 100644 xemacs-packages/riece/lisp/riece-shrink-buffer.el delete mode 100644 xemacs-packages/riece/lisp/riece-signal.el delete mode 100644 xemacs-packages/riece/lisp/riece-skk-kakutei.el delete mode 100644 xemacs-packages/riece/lisp/riece-submit-bug-report.xpm delete mode 100644 xemacs-packages/riece/lisp/riece-toolbar.el delete mode 100644 xemacs-packages/riece/lisp/riece-unread.el delete mode 100644 xemacs-packages/riece/lisp/riece-url.el delete mode 100644 xemacs-packages/riece/lisp/riece-user.el delete mode 100644 xemacs-packages/riece/lisp/riece-version.el delete mode 100644 xemacs-packages/riece/lisp/riece-xemacs.el delete mode 100644 xemacs-packages/riece/lisp/riece-xface.el delete mode 100644 xemacs-packages/riece/lisp/riece-xfaceb.el delete mode 100644 xemacs-packages/riece/lisp/riece-yank.el delete mode 100644 xemacs-packages/riece/lisp/riece.el delete mode 100644 xemacs-packages/riece/lisp/server.rb delete mode 100644 xemacs-packages/riece/lisp/test/Makefile.am delete mode 100644 xemacs-packages/riece/lisp/test/luna.el delete mode 100644 xemacs-packages/riece/lisp/test/lunit-report.el delete mode 100644 xemacs-packages/riece/lisp/test/lunit.el delete mode 100644 xemacs-packages/riece/lisp/test/test-riece-addon.el delete mode 100644 xemacs-packages/riece/lisp/test/test-riece-alias.el delete mode 100644 xemacs-packages/riece/lisp/test/test-riece-cache.el delete mode 100644 xemacs-packages/riece/lisp/test/test-riece-eval.el delete mode 100644 xemacs-packages/riece/lisp/test/test-riece-log.el delete mode 100644 xemacs-packages/riece/lisp/test/test-riece-ruby.el delete mode 100644 xemacs-packages/riece/lisp/test/test-riece-shrink-buffer.el delete mode 100644 xemacs-packages/riece/lisp/test/test-riece-url.el delete mode 100644 xemacs-packages/riece/lisp/test/test-riece-yank.el delete mode 100644 xemacs-packages/riece/lisp/url-riece.el delete mode 100644 xemacs-packages/riece/package-info.in diff --git a/xemacs-packages/riece/AUTHORS b/xemacs-packages/riece/AUTHORS deleted file mode 100644 index 67d6235c..00000000 --- a/xemacs-packages/riece/AUTHORS +++ /dev/null @@ -1,25 +0,0 @@ -Copyright (C) 1998-2005 Daiki Ueno -Copyright (C) 1989 Tor Lillqvist - -Riece is mainly written by Daiki Ueno . - -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 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 -OHASHI Akira -Yoichi NAKAYAMA -Masatake YAMATO (riece-yank.el) -Steve Youngs (riece-xfaceb.el) \ No newline at end of file diff --git a/xemacs-packages/riece/ChangeLog b/xemacs-packages/riece/ChangeLog deleted file mode 100644 index 34219e62..00000000 --- a/xemacs-packages/riece/ChangeLog +++ /dev/null @@ -1,293 +0,0 @@ -2014-06-22 Norbert Koch - - * Makefile (VERSION): XEmacs package 1.26 released. - -2014-06-02 Jerry James - - * Makefile (COMPILE_INFO_AS_MULE): Enable when bulding with MULE - to properly process Japanese info files. - -2014-05-15 Norbert Koch - - * Makefile (VERSION): XEmacs package 1.25 released. - -2014-05-15 Norbert Koch - - * Makefile (VERSION): XEmacs package 1.24 released. - -2014-05-13 Jerry James - - * .cvsignore: Remove. - * doc/.cvsignore: Remove. - * lisp/.cvsignore: Remove. - * lisp/test/.cvsignore: Remove. - * .hgignore: New file. - * doc/irchat-copyright.el: Restore CVS keyword expansions. - * doc/riece-en.texi: Update for texinfo 5.x. - * doc/riece-ja.texi: Ditto. - -2007-03-20 Norbert Koch - - * Makefile (VERSION): XEmacs package 1.23 released. - -2007-01-29 Daiki Ueno - - * Riece: Version 3.1.2 released. - * configure.ac: Bump up version to 3.1.2. - -2006-12-18 Daiki Ueno - - * configure.ac: Generate lisp/riece-package-info.el. - -2006-09-29 Daiki Ueno - - * Riece: Version 3.1.1 released. - * configure.ac: Bump up version to 3.1.1. - -2006-07-29 Daiki Ueno - - * Riece: Version 3.1.0 released. - * configure.ac: Bump up version to 3.1.0. - -2006-05-29 Daiki Ueno - - * Riece: Version 3.0.0 released. - * configure.ac: Bump up version to 3.0.0. - -2006-01-13 Norbert Koch - - * Makefile (VERSION): XEmacs package 1.22 released. - -2006-01-13 Daiki Ueno - - * Makefile (ELCS): Added riece.elc. - From Mike FABIAN . - -2005-11-21 Norbert Koch - - * Makefile (VERSION): XEmacs package 1.21 released. - -2005-11-19 Daiki Ueno - - * Riece: Version 2.0.2 released. - * configure.ac: Bump up version to 2.0.2. - -2005-09-29 Daiki Ueno - - * Riece: Version 2.0.1 released. - * configure.ac: Bump up version to 2.0.1. - -2005-08-31 Norbert Koch - - * Makefile (VERSION): XEmacs package 1.20 released. - -2005-08-29 Daiki Ueno - - * Riece: Version 2.0.0 released. - * configure.ac: Bump up version to 2.0.0. - -2005-08-06 Daiki Ueno - - * Makefile.am (EXTRA_DIST): Add HACKING.ja. - -2005-03-21 Norbert Koch - - * Makefile (VERSION): XEmacs package 1.19 released. - -2005-03-20 Daiki Ueno - - * Makefile (DATA_DEST): Put *.xpm files into etc/riece/. - -2005-03-20 Norbert Koch - - * Makefile (VERSION): XEmacs package 1.18 released. - -2005-03-06 Daiki Ueno - - * Riece: Version 1.0.8 released. - * configure.ac: Bump up version to 1.0.8. - -2005-02-05 Daiki Ueno - - * Riece: Version 1.0.7 released. - * configure.ac: Bump up version to 1.0.7. - -2004-12-07 Daiki Ueno - - * README.ja: New file. - -2004-12-07 Norbert Koch - - * Makefile (VERSION): XEmacs package 1.17 released. - -2004-12-05 Daiki Ueno - - * Riece: Version 1.0.6 released. - * configure.ac: Bump up version to 1.0.6. - -2004-11-07 Daiki Ueno - - * Riece: Version 1.0.5 released. - * configure.ac: Bump up version to 1.0.5. - -2004-10-11 Daiki Ueno - - * Riece: Version 1.0.4 released. - * configure.ac: Bump up version to 1.0.4. - -2004-09-06 Norbert Koch - - * Makefile (VERSION): XEmacs package 1.16 released. - -2004-06-27 Ilya N. Golubev - - * .cvsignore: Remove `Makefile'. - -2004-09-05 Daiki Ueno - - * Riece: Version 1.0.3 released. - * configure.ac: Bump up version to 1.0.3. - -2004-08-16 Daiki Ueno - - * Riece: Version 1.0.2 released. - * configure.ac: Bump up version to 1.0.2. - -2004-07-10 Daiki Ueno - - * Riece: Version 1.0.1 released. - * configure.ac: Bump up version to 1.0.1. - -2004-05-29 Daiki Ueno - - * Riece: Version 1.0.0 released. - * configure.ac: Bump up version to 1.0.0. - -2004-05-07 Daiki Ueno - - * configure.ac: Set AM_CONDITIONAL XEMACS. - * Makefile.am: Emit install-package and package target only if - EMACS_FLAVOR = xemacs. - -2004-05-05 Norbert Koch - - * Makefile (VERSION): XEmacs package 1.15 released. - -2004-05-04 Daiki Ueno - - * Riece: Version 0.2.2 released. - * configure.ac: Bump up version to 0.2.2. - -2004-03-09 Daiki Ueno - - * Riece: Version 0.2.1 released. - * configure.ac: Bump up version to 0.2.1. - -2004-03-07 Daiki Ueno - - * Riece: Version 0.2.0 released. - * configure.ac: Bump up version to 0.2.0. - -2004-01-28 Daiki Ueno - - * Riece: Version 0.1.8 released. - * configure.ac: Bump up version to 0.1.8. - -2003-12-28 Norbert Koch - - * Makefile (VERSION): XEmacs package 1.14 released. - -2003-12-25 Daiki Ueno - - * Riece: Version 0.1.7 released. - * configure.ac: Bump up version to 0.1.7. - -2003-11-10 Daiki Ueno - - * Riece: Version 0.1.6 released. - * configure.ac: Bump up version to 0.1.6. - -2003-12-01 Norbert Koch - - * Makefile (VERSION): XEmacs package 1.13 released. - -2003-12-01 Adrian Aichner - - * Makefile: Fix a copy-cat error. - -2003-10-29 Norbert Koch - - * Makefile (VERSION): XEmacs package 1.12 released. - -2003-10-26 Daiki Ueno - - * Makefile: Don't add "skk" to REQUIRES even when building with - MULE. - -2003-10-25 Norbert Koch - - * Makefile (VERSION): XEmacs package 1.11 released. - -2003-10-24 Daiki Ueno - - * Riece: Version 0.1.5 released. - * configure.ac: Bump up version to 0.1.5. - -2003-10-19 Daiki Ueno - - * Riece: Version 0.1.4 released. - * configure.ac: Bump up version to 0.1.4. - -2003-10-13 Daiki Ueno - - * Riece: Version 0.1.3 released. - * configure.ac: Bump up version to 0.1.3. - -2003-10-05 Daiki Ueno - - * Riece: Version 0.1.2 released. - * configure.ac: Bump up version to 0.1.2. - -2003-08-30 Daiki Ueno - - * Riece: Version 0.1.1 released. - * configure.ac: Bump up version to 0.1.1. - -2003-08-25 Daiki Ueno - - * Riece: Version 0.1.0 released. - * configure.ac: Bump up version to 0.1.0. - -2003-08-03 Daiki Ueno - - * Riece: Version 0.0.4 released. - * configure.ac: Bump up version to 0.0.4. - -2003-06-02 Daiki Ueno - - * 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 - - * configure.ac: Simplified. - * Makefile.am (SUBDIRS): Remove dcc. - -2003-05-30 Daiki Ueno - - * 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 - - * Makefile.am (AUTOMAKE_OPTIONS): Add "no-dependencies". - -2003-05-29 Daiki Ueno - - * Riece: Version 0.0.1 released. - diff --git a/xemacs-packages/riece/INSTALL-CVS b/xemacs-packages/riece/INSTALL-CVS deleted file mode 100644 index 3e06e7f0..00000000 --- a/xemacs-packages/riece/INSTALL-CVS +++ /dev/null @@ -1,20 +0,0 @@ -Development of Riece uses CVS, Concurrent Versions System. -Latest developing version is available at CVS. - -(0) logging in to anonymous CVS server. - - % cvs -d :pserver:anonymous@cvs.m17n.org:/cvs/root login - - CVS password: [CR] # NULL string - -(1) checkout modules - - % cvs -d :pserver:anonymous@cvs.m17n.org:/cvs/root checkout riece - -Specify revision tag in front of the module name. - -(2) bootstrapping - - % autoreconf -f -i - -You will need newer versions of autoconf & automake. diff --git a/xemacs-packages/riece/Makefile b/xemacs-packages/riece/Makefile deleted file mode 100644 index 8c3367cc..00000000 --- a/xemacs-packages/riece/Makefile +++ /dev/null @@ -1,82 +0,0 @@ -# Makefile for Riece lisp code - -# This file is part of XEmacs. - -# XEmacs 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. - -# XEmacs 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 XEmacs; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -# Boston, MA 02111-1307, USA. - -# This XEmacs package contains the riece IRC client package - -VERSION = 1.26 -AUTHOR_VERSION = 3.1.2 -MAINTAINER = Daiki Ueno -PACKAGE = riece -PKG_TYPE = regular -REQUIRES = xemacs-base mail-lib bbdb -CATEGORY = standard - -include ../../Local.rules.inc - -ELCS = lisp/riece.elc lisp/riece-000.elc lisp/riece-200.elc \ -lisp/riece-300.elc lisp/riece-400.elc lisp/riece-500.elc \ -lisp/riece-addon-modules.elc lisp/riece-addon.elc lisp/riece-alias.elc \ -lisp/riece-async.elc lisp/riece-biff.elc lisp/riece-button.elc \ -lisp/riece-cache.elc lisp/riece-channel.elc lisp/riece-coding.elc \ -lisp/riece-commands.elc lisp/riece-compat.elc lisp/riece-complete.elc \ -lisp/riece-ctcp.elc lisp/riece-ctlseq.elc lisp/riece-debug.elc \ -lisp/riece-develop.elc lisp/riece-display.elc lisp/riece-doctor.elc \ -lisp/riece-epg.elc lisp/riece-eval-ruby.elc lisp/riece-eval.elc \ -lisp/riece-filter.elc lisp/riece-foolproof.elc lisp/riece-globals.elc \ -lisp/riece-google.elc lisp/riece-guess.elc lisp/riece-handle.elc \ -lisp/riece-hangman.elc lisp/riece-highlight.elc lisp/riece-history.elc \ -lisp/riece-icon.elc lisp/riece-identity.elc lisp/riece-ignore.elc \ -lisp/riece-irc.elc lisp/riece-kakasi.elc lisp/riece-keepalive.elc \ -lisp/riece-keyword.elc lisp/riece-layout.elc lisp/riece-log.elc \ -lisp/riece-lsdb.elc lisp/riece-menu.elc lisp/riece-message.elc \ -lisp/riece-mini.elc lisp/riece-misc.elc lisp/riece-mode.elc \ -lisp/riece-naming.elc lisp/riece-options.elc \ -lisp/riece-package-info.elc lisp/riece-rdcc.elc lisp/riece-ruby.elc \ -lisp/riece-server.elc lisp/riece-shrink-buffer.elc \ -lisp/riece-signal.elc lisp/riece-toolbar.elc lisp/riece-unread.elc \ -lisp/riece-url.elc lisp/riece-user.elc lisp/riece-version.elc \ -lisp/riece-xemacs.elc lisp/riece-xface.elc lisp/riece-xfaceb.elc \ -lisp/riece-yank.elc - -EXTRA_SOURCES = lisp/riece-emacs.el lisp/riece-ndcc.el \ - lisp/riece-skk-kakutei.el lisp/riece-mcat.el \ - lisp/riece-mcat-japanese.el lisp/riece-package-info.el.in \ - lisp/url-riece.el -AUTOLOAD_PATH = lisp - -EXPLICIT_DOCS = doc/riece-en.texi -ifeq ($(BUILD_WITHOUT_MULE),) -COMPILE_INFO_AS_MULE = t -EXPLICIT_DOCS += doc/riece-ja.texi -ELCS += lisp/riece-skk-kakutei.elc lisp/riece-mcat.elc \ - lisp/riece-mcat-japanese.elc -endif - -PRELOADS = -eval \("push \"./lisp\" load-path"\) - -DATA_FILES = AUTHORS NEWS NEWS.ja README README.ja doc/HACKING doc/HACKING.ja -DATA_DEST = $(PACKAGE) - -DATA_1_FILES = $(wildcard lisp/*.xpm) -DATA_1_DEST = $(PACKAGE) - -DATA_2_FILES = $(wildcard lisp/*.rb) -DATA_2_DEST = $(PACKAGE) - -include ../../XEmacs.rules diff --git a/xemacs-packages/riece/Makefile.am b/xemacs-packages/riece/Makefile.am deleted file mode 100644 index 1e08d284..00000000 --- a/xemacs-packages/riece/Makefile.am +++ /dev/null @@ -1,10 +0,0 @@ -SUBDIRS = lisp doc -EXTRA_DIST = INSTALL-CVS README.ja NEWS.ja -AUTOMAKE_OPTIONS = no-dependencies - -if XEMACS -install-package package: - list='$(SUBDIRS)'; for subdir in $$list; do \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $@) \ - done -endif diff --git a/xemacs-packages/riece/NEWS b/xemacs-packages/riece/NEWS deleted file mode 100644 index cac43dcb..00000000 --- a/xemacs-packages/riece/NEWS +++ /dev/null @@ -1,601 +0,0 @@ -* 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 # 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 $B"&(B 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. - -Local variables: -mode: text -mode: outline -paragraph-separate: "[ ]*$" -end: diff --git a/xemacs-packages/riece/NEWS.ja b/xemacs-packages/riece/NEWS.ja deleted file mode 100644 index 794a5885..00000000 --- a/xemacs-packages/riece/NEWS.ja +++ /dev/null @@ -1,596 +0,0 @@ -* Riece 3.1.1 $B$N$rJQ99$9$kI,(B - $BMW$,$"$k!#(B - -** $B@ZCG:Q$_$N%5!<%P$r:FEY@ZCG$7$h$&$H$7$?>l9g$K!"%(%i!<$K$J$k$h$&$K$7(B - $B$?(B (yoichi) - -** $B?75,%"%I%*%s(B riece-epg.el $B$rF3F~!#(BGnuPG $B$r;H$C$?0BA4$J2qOC$,2DG=(B (ueno) - -** $B%f!<%6$r>7BT(B (invite) $B$9$k:]$N%P%0$r(B 2 $B$D=$@5(B (Steve Youngs) - -** $B%f!<%6$,%A%c%s%M%k$rN%C&$7$?>lLL$G$N!":FIA2h$N%P%0$r=$@5(B (ueno) - -** riece-alias-alternate-separator $B$N%G%U%)%k%HCM$r(B "@" $B$KLa$7$?(B (ueno) - -* Riece 2.0.2 $B$N$NJd408uJd$NI=<($GBgJ8;z>.J8;z$rJ]B8$9$k(B - $B$h$&$K$7$?(B (ueno) - -** $B%A%c%s%M%kL>$H%5!<%PL>$N6h@Z$jJ8;zNs$N%G%U%)%k%HCM$r(B "@" $B$+$i(B "%" - $B$KJQ99(B (ueno) - -* Riece 2.0.1 $B$NA0$KA*Br$7$F$$$?%A%c%s%M%k$KL$FI%a%C%;!<%8$,$"$k>l9g$K(B unread $B%^!<(B - $B%/$,I=<($5$l$J$$IT6q9g$N=$@5(B (ueno) - -** $B?75,%"%I%*%s(B riece-xfaceb.el $B$rF3F~!#(BBBDB $B$+$i(B X-Face/Face $B$r8!:w$7!"(B - $B%f!<%60lMw$KI=<($9$k(B (Steve Youngs) - -* Riece 2.0.0 $B$N2A$9$k5!9=$NF3F~!#(B - $BMxMQJ}K!$O(B riece-ruby.el $BKAF,$N%3%a%s%H$r;2>H(B (ueno) - -** $B?75,%"%I%*%s(B riece-eval-ruby.el $B$rF3F~!#(B",ruby " $B$KB3$$$FG$0U$N(B - Ruby $B$N%W%m%0%i%`$rH/8@$9$k$H!"I>2A7k2L$r%A%c%s%M%k$KAw?.$9$k(B (ueno) - -** $BDj4|E*$K%P%C%U%!$r@Z$j5M$a$k5!G=$r%"%I%*%s$KJ,N%(B - $B$3$l$^$G(B riece-max-buffer-size $B$r@_Dj$7$F$$$??M$O!"(B - riece-shrink-buffer $B%"%I%*%s$rM-8z$K$9$kI,MW$,$"$k$N$GCm0U(B (ueno) - -** $BN%C&$7$?%A%c%s%M%k$K;22C$7$F$$$?%f!<%6$,(B IRC $B$r$d$a$?>l9g$K!"%(%i!<(B - $B$,H/@8$9$kIT6q9g$N=$@5(B (ueno) - -** $B%m%0$NJ]B8;~$K!";HMQ$7$?(B coding-system $B$NL>A0$r%U%!%$%kL>$KKd$a9~$`(B - $B$h$&$K$7$?!#$3$l$K$h$j(B riece-log-coding-system $B$r@_Dj$7$J$/$F$bJ8;z(B - $B2=$1$,H/@8$7$K$/$/$J$C$?(B (ueno) - -** C-c g $B$G%A%c%s%M%k$r0\F0$9$k:]$K!"?7$7$$H/8@$,$"$C$?%A%c%s%M%k$+$i(B - $BC)$k$h$&$K$7$?(B (ueno) - -** $B%A%c%s%M%kL>$H%5!<%PL>$N6h@Z$jJ8;zNs$H$7$F(B " " $B0J30$K(B "@" $B$b5v$9$h(B - $B$&$K$7$?(B (ueno) - -** $BF|K\8l%^%K%e%"%k(B (riece-ja.texi) $B$r=i?4]$K=q$-D>$7$?(B (ueno) - -** *Others* $B%P%C%U%!$r1#$;$k$h$&$K$7$?(B (ueno) - -** $B%G%P%C%0=PNO$r@lMQ$N%P%C%U%!$KJ,N%(B (ueno) - -** elisp $B%U%!%$%k$r#1$D$:$D(B byte-compile $B$9$k(B make $B%k!<%k$r@_$1$?!#(B - configure $B8e!"(Blisp/ $B0J2<$G(B make compile-individually (ueno) - -** $B3+H/$NBgJ8;z>.J8;z$,6hJL$5$l$k%P%0$X$NBP1~(B (ueno) - -** SXEmacs $B$N%P!<%8%g%sI=5-$KBP1~(B (Steve Youngs) - -** CTCP TIME $B$KBP1~(B (Steve Youngs) - -** ~/.riece/addons $B0J2<$N%G%#%l%/%H%j$rFI$_9~$^$J$$$h$&$K$7$?(B (kaoru) - -** riece-command-part $B$,%(%i!<$K$J$k%P%0$N=$@5(B (yoichi) - -** ~/.riece/addons $B%G%#%l%/%H%j$,$J$$$H5/F0;~$K%(%i!<$K$J$k%P%0$N=$@5(B (ueno) - -* Riece 1.0.7 $B$N2A7k2L$r%A%c%s%M%k$KAw$j$^$9!#(B - -** $B$$$/$D$+$N%"%I%*%s$r%G%U%)%k%H$GM-8z2=(B (ueno) - riece-log, riece-alias, riece-ctlseq, riece-keyword $B$,:#2s$+$i%G%U%)(B - $B%k%H$GM-8z$K$J$j$^$9!#(B - -** $B?75,%3%^%s%I(B riece-command-suspend-resume (ueno) - riece-command-suspend-resume $B$O8=:_$N%&%#%s%I%&9=@.$rJ]B8!&:F8=$7$^$9!#(B - -** $B%\%?%s%&%#%8%'%C%H%/%j%C%/;~$N%+!<%=%k0\F0$NM^;_(B (ueno) - -** $B%b!<%I%i%$%s$N%$%s%8%1!<%?$r(B face $B$GAu>~(B (ueno) - -** NAMES $B%j%W%i%$$K4^$^$l$k%f!<%6?t$r?t$($k$h$&$K$J$j$^$7$?(B (ueno) - -** $B?75,%f!<%6%*%W%7%g%s(B riece-part-message (ueno) - -** riece-addon-directory $B0J2<$KCV$+$l$?%"%I%*%s$r<+F0E*$KM-8z2=(B (ueno) - -** riece-buffer-dispose-function $B$N%G%U%)%k%HCM$,:#2s$+$i(B kill-buffer - $B$K$J$j$^$7$?(B (ueno) - -** process-filter $BFb$G%(%i!<$,H/@8$7$?>l9g!"(Bbacktrace $B$r9T$J$&$h$&$K$J(B - $B$j$^$7$?(B (ueno) - -** $BI,MW$K1~$8$F%A%c%s%M%k%-!<$rLd$$9g$o$;$k$h$&$K$7$^$7$?(B (ueno) - -** $B%P%C%U%!$N<+F0E*$J@Z$j5M$a$r%G%U%)%k%H$G$OL58z2=(B (ueno) - -** riece-log $B$N$?$a$N?7$7$$%G%#%l%/%H%j9=@.(B (ueno) - -** user-renamed signal-filter $B$N%P%0$r=$@5(B (kaoru) - -** riece-command-enable-addon $B$H(B riece-command-disable-addon $B$N%P%0$N(B - $B=$@5(B (yoichi) - -* Riece 1.0.6 $B$Nee$H%5!<%PL>$N6h@Z$j$K6uGr0J30$NJ8;z(B - $BNs$r;H$($k$h$&$K$7$?!#(B(ueno) - - riece-alias-alternate-separator == "@" $B$N;~$NJQ495,B'$O0J2<$NDL$j!'(B - - "#riece" -> "#riece" - "#riece localhost" -> "#riece@localhost" - "#ch@nnel" -> "#ch@@nnel" - "#ch@nnel localhost" -> "#ch@@nnel@localhost" - -** DCC $B$,B>$N%/%i%$%"%s%H$H$N4V$G$&$^$/F0$+$J$$IT6q9g$N=$@5!#(B(ueno) - -** kill-ring $B$+$iJ8;zNs$rAw?.$9$k%"%I%*%s(B riece-yank $B$rDI2C!#(B(by $BBgOB$5$s(B) - -** $B1Q8l$NJ8=q$rDI2C!#(B(ueno) - -* Riece 1.0.4 $B$Nl9g$K!"%U%m!<@)8f$r9T$&$h$&$K$7$?!#(B(ueno) - -** $B5/F0;~$KJ#?t%5!<%P>e$N%A%c%s%M%k$K;22C$9$k@_Dj$G!"(B - riece-startup-server-list $B$N@_Dj$r>JN,2DG=$K$7$?!#(B(ueno) - -** riece-mini $B;HMQ;~$K2a5n$N%a%C%;!<%8$r1\Mw$9$k5!G=$r@_$1$?!#(B(bg66) - -* Riece 1.0.3 $B$Nl9g!"%A%c%s%M%k0lMw$+$i=|30$9$k$h(B - $B$&$K$7$?(B (Thanks to $B?9K\$5$s(B) - -** $B%G%U%)%k%H$N(B IRC $B%5!<%P$X$N@\B3;~$K%(%i!<$,=P$?>l9g$K$O!"B(:B$K=*N;(B - $B$9$k$h$&$K$7$?(B(Thanks to k-to $B$5$s(B) - -* Riece 1.0.2 $B$N!";(B?$J=$@5(B - -* Riece 1.0.1 $B$NuBV$N%A%c%s%M%k$G$O!"%A%c%s%M%k$r0\F0$7$F$b%A%c%s%M%k%P%C(B - $B%U%!$N%+!<%=%k0LCV$rJ]$D$h$&$K$7$?(B - -** CVS $BHG$N(B Emacs $B$G!"0z?t$J$7$N(B current-word $B$,(B nil $B$rJV$9$h$&$K$J$C$?$?$a!"(B - riece-command-complete-user $B$,%(%i!<$K$J$kIT6q9g$N=$@5(B (by $BCf;3$5$s(B) - -** riece-hangman $B$NMp?tH/@8%m%8%C%/$N=$@5(B (by $B9b66$5$s(B) - -** $B6u9T$N>e$G!"(BC-c p $B$G%a%C%;!<%8$rAw$m$&$H$7$?>l9g!"%(%i!<$rDLCN$9$k(B - $B$h$&$K$7$?(B - -** riece-ignore $B;HMQ;~$K!"@_Dj%U%!%$%k$GL5;k$9$k%f!<%6$r;XDj$G$-$k$h$&!"(B - $B%*%W%7%g%s(B riece-startup-ignored-user-list $B$r?7@_(B - -** riece-rdcc $B;HMQ;~$K!"%U%!%$%kL>$K6uGr$,F~$C$?%U%!%$%k$rAwl9g$K(B C-c q $B$7$?>l9g$N%a%C%;!<%8$rJQ99(B - -** $B%f!<%6$rL5;k$9$k%"%I%*%s(B riece-ignore $B$rDI2C(B - -** 9 $BJ8;z0J>e$N%K%C%/%M!<%`$b$N%P%C%U%!$K$$$k;~$KH/8@$,$"$k$H%b!<%I%i%$%s$K0u(B ("[R]") $B$rI=<($9(B - $B$k%"%I%*%s(B riece-biff $B$rDI2C(B (by $BBg66$5$s(B) - -** $BF|K\8l$NDL$i$J$$C$+$i5a$a$k$h$&$K$7$?!#(B(by $BBg66$5$s(B) - -* Riece 0.2.0 $B$NA0$N0lMw$rI=<($9$k$h$&$K$7$?!#(B - -** riece-lsdb $B;HMQ;~$NIT6q9g$N=$@5(B (by $BCf;3$5$s(B) - -* Riece 0.1.8 $B$N$NBgJ8;z>.J8;z$,6hJL$5$l$F$7$^$&%P%0$r=$@5(B - -** IRC proxy $B$KB>$N%/%i%$%"%s%H$H0l=o$K@\B3$7$F$$$k>l9g$G$b!$<+J,$NH/(B - $B8@$r$-$A$s$H07$&$h$&$K$7$?(B (by $B9b66$5$s(B) - -* Riece 0.1.7 $B$NuBV$K$J$k$3$H$KHw$(!"(B - PING $B$K1~Ez$9$k(B local proxy $B7PM3$G(B IRC $B%5!<%P$K@\B3$9$k%"%I%*%s(B - riece-async $B$rDI2C(B - -** riece-away-message $B$,;XDj$5$l$?>l9g$K(B AWAY $B>uBV$N%H%0%k$K<:GT$9$k%P(B - $B%0$r=$@5(B (Thanks to $BF#B<$5$s(B) - -** GNU Emacs $B$G!"%m!<%I;~$K(B standard-syntax-table $B$rJQ99$7$F$7$^$&%P%0$r=$@5(B - (Thanks to Hori $B$5$s(B) - -** riece-startup-channel-list $B$K2C$(!"(Briece-startup-server-list $B$r;XDj(B - $B$9$k$3$H$G!"5/F0;~$KJ#?t$N%5!<%P>e$N%A%c%s%M%k$K;22C$G$-$k$h$&$K$7$?(B - -** riece-log $B;HMQ;~$K%m%0%U%!%$%k$N(B coding system $B$r;XDj$9$k%*%W%7%g%s(B - riece-log-coding-system $B$rDI2C(B - -** riece-keyword $B;HMQ;~$K;XDj$7$?%-!<%o!<%I$NH/8@$,$"$C$?;~$K8F$P$l$k(B - riece-keyword-notify-functions $B$rDI2C!#4{B8$N(B - riece-notify-keyword-functions($B$J$s$FJ6$i$o$7$$L>A0(B!) $B$NBe$o$j$K$3$A$i(B - $B$r;HMQ$7$F$/$@$5$$(B - -** riece-log $B;HMQ;~$K(B riece-log-flashback $B$,%O%$%i%$%H$d%\%?%s$bI|85$9(B - $B$k$h$&$K$7$?(B - -** riece-{unread,mini} $B$r(B NOTICE $B$d(B CTCP ACTION $B$K$OH?1~$7$J$$$h$&$K$7$?(B - -* Riece 0.1.6 $B$NZ(B)$B!#(B - -** riece-rdcc $B$G!"5pBg$J%U%!%$%k$rl9g!"%A%c%s%M%k;22C;~$K%A%c%s%M(B - $B%k$N%b!<%I$rD4$Y$k$h$&$K$7$?!#(B - -** $B%A%c%s%M%k%P%C%U%!$N%5%$%:$r@Z$j5M$a$k%?%$%_%s%0$r=$@5!#(B - -** $B%A%c%s%M%k0\F0;~$K!"%P%C%U%!$,<+F0E*$K%9%/%m!<%k$7$J$$IT6q9g$N=$@5!#(B - -** riece-log $B$G!"(Briece-log-directory-map $B$K%5!<%PL>IU$-$N%A%c%s%M%k$r(B - $B;XDj$G$-$k$h$&$K$7$?!#(B(by $BBg66$5$s(B) - -* Riece 0.1.5 $B$NAw$r;O$a$k:]$K!"$?$^$K8G$^$k%P%0$r=$@5!#(B - -** $B4{$K(B Riece $B$,5/F0$7$?>uBV$G$b$&0lEY5/F0$7$?>l9g!"%(%i!<$rDLCN$9$k$N(B - $B$G$O$J$/!"(Briece-command-configure-windows $B$r8F$V$h$&$K$7$?(B (Thanks - to $BBg66$5$s(B) - -** C-c o (riece-command-set-operators) $B$H(B C-c v - (riece-command-set-speakers) $B$G!"(B3 $B?M0J>e$N%f!<%6$rBP>]$K$7$?>l9g$N%P(B - $B%0$r=$@5!#(B - -** $B%P%C%U%!$N%5%$%:$,(B riece-max-buffer-size $B$r1[$($?>l9g!"<+F0E*$K@Z$j(B - $B5M$a$k$h$&$K$7$?!#(B - -* Riece 0.1.4 $B$N$N%P%C%U%!$,(B Riece $B0J30$N%W%m%0%i%`$K;H$o$l$F$$$k;~!"(B - generate-new-buffer $B$G?7$7$$%P%C%U%!$r:n@.$7$FMxMQ$9$k$h$&$K$7$?!#(B - -** ! $B$G=i$^$k%A%c%s%M%k$r:n@.$G$-$J$$%P%0$r=$@5!#(B - -** riece-keyword $B;HMQ;~$K!"<+J,$NH/8@$K4^$^$l$k%-!<%o!<%I$KH?1~$7$J$$(B - $B$h$&$K$7$?!#(B - -** $B$R$H$D$b%A%c%s%M%k$KF~$C$F$$$J$$;~!"%A%c%s%M%kFb$G$N$_M-8z$J%3%^%s(B - $B%I$r$NBgJ8;z>.J8;z$r6hJL$7$J(B - $B$$$h$&$K$7$?!#(B - -** riece-history $B;HMQ;~$K!$%R%9%H%j$N@hF,$K$"$k%A%c%s%M%k$K(B "+" $B%^!<%/(B - $B$r$D$1$k$h$&$K$7$?!#(B - -** $B%\%?%s$H%]%C%W%"%C%W%a%K%e!<$rI=<($9$k%"%I%*%s(B (riece-button) $B$rDI2C!#(B - -** $B%-!<%o!<%I$r8!=P$9$k%"%I%*%s(B (riece-keyword) $B$rDI2C!#(B - - XEmacs $B$r$*;H$$$J$i!$0J2<$N@_Dj$r(B ~/.riece/init.el $B$K2C$($k$3$H$G!$(B - "$B$[$2(B" $B$d(B "$B$U$,(B" $B$KH?1~$7$F2;$rLD$i$9$3$H$,$G$-$^$9!%(B - - (load-default-sounds) - (setq riece-keywords '("$B$[$2(B" "$B$U$,(B")) - (add-hook 'riece-notify-keyword-functions - (lambda (keyword) (play-sound 'cuckoo))) - -* Riece 0.1.2 $B$Nl9g!"%G%U%)%k%H$N%A%c%s%M%kL>$r;H$&$h$&$K$7$?!#(B - -** JOIN $B$N%?%$%_%s%0$K$h$j(B riece-channel-list-indicator $B$,99?7$5$l$J$$(B - $B%P%0$r=$@5(B - -* Riece 0.1.1 $B$N$NF,$K%^!<%/(B "*" $B$rIU$1$k(B - $B$h$&$K$7$?(B - -** riece-debug == nil $B$N>l9g!"@ZCG;~$N%a%C%;!<%8$r4JN,2=$7$?(B - -** $B%A%c%s%M%k0\F0$NMzNr$r4IM}$9$k%"%I%*%s(B riece-history $B$rDI2C(B - -** $B0\F0@h$N%A%c%s%M%k$r?dB,$9$k%"%I%*%s(B riece-guess $B$rDI2C(B - -Tips: - -~/.riece/init.el $B$K0J2<$N$h$&$K;XDj$9$k$H!"(B - - (setq riece-guess-channel-try-functions - '(riece-guess-channel-from-unread - riece-guess-channel-from-history)) - -C-c g $B$G0J2<$N=g=x$G0\F0$G$-$^$9!#(B - -# $BL$FI$N%a%C%;!<%8$N$"$k%A%c%s%M%k(B -# $B:G6aK,$l$?%A%c%s%M%k(B -# $B$=$l0J30(B - -* Riece 0.1.0 $B$N$G%5!<%P$r<1JL$9$k$h$&$KJQ99$7$?(B - -*** $B@\B3!&@ZCG$N=hM}$r(B riece-server.el $B$K$^$H$a$?(B - -*** QUIT $B$rEj$2$F$b1~Ez$,$J$$>l9g!"6/@)E*$K@ZCG$9$k$h$&$K$7$?(B - -** M-x doctor $B$HO"7H$9$k%"%I%*%s$rDI2C(B - -** $BH/8@$K(B SKK $B$NJQ49Cf$N0u"&$,:.$6$i$J$$$h$&$K$9$k%"%I%*%s$rDI2C(B (by $B9b66$5$s(B) - -** $B%&%#%s%I%&%l%$%"%&%H$rJQ99$G$-$k$h$&$K$7$?(B (C-c t l) - -** Liece $B$N(B "top" $B%9%?%$%k$K;w$?%&%#%s%I%&%l%$%"%&%H$rDI2C(B (by $B9b66$5$s(B) - -* Riece 0.0.4 $B$N), riece-command-previous-channel - (C-c <) $B$G%A%c%s%M%k$r$0$k$0$k0\F0$G$-$k$h$&$K$7$?(B (by $BCf;3$5$s(B) - -** riece-unread $B%"%I%*%s;HMQ;~$KH/8@$N$"$C$?%A%c%s%M%k$K(B C-c C-u $B$G0\(B - $BF0$G$-$k$h$&$K$7$?(B (by $BBg66$5$s(B) - -** IRC $B%a%C%;!<%8$K=>$C$F%$%s%8%1!<%?$r99?7$9$k$h$&$K$7$?(B - -** ptexinfmt.el $B$r(B APEL free $B$J$b$N$KCV$-49$($?(B (Thanks to $B;32,$5$s(B) - -* Riece 0.0.3 $B$Ne@\B3$G$-$J$$%P%0$N=$@5(B (Thanks to - $BCf;3$5$s(B) - -** $B%K%C%/$NBgJ8;z>.J8;z$@$1$rJQ99$9$k$H0l4S@-$,<:$o$l$kLdBj$r=$@5(B - -** $B%O%s%I%i%U%C%/$GH/@8$7$?%(%i!<$rJaB*(B - -** DCC $B$K$h$k%U%!%$%kE>Aw$KBP1~(B (riece-ndcc.el, riece-rdcc.el) - -** $BH/8@$N$"$C$?%A%c%s%M%k$K(B "!" $B%^!<%/$r$D$1$k%"%I%*%s$NDI2C(B (riece-unread.el) - -** $BF|K\8l$N%^%K%e%"%k$NDI2C(B - -* Riece 0.0.2 $B$N$N(B elisp $B%Q%C%1!<%8$K0MB8$7$J$$$?$a!"%$%s%9%H!<%k$,4JC1(B -- $B@_Dj$,4JC1$G!"A02s5/F0;~$N@_Dj$r5-O?!&I|85$9$k;EAH$_$rDs6!(B -- $BCJ3,E*$JA`:n@bL@=q(B (info $B7A<0(B) $B$,ImB0(B -- $B:G?7$N(B IRC $B$N%/%i%$%"%s%H%W%m%H%3%k(B (RFC2812) $B$K=`5r(B - -* $B%G%#%l%/%H%j9=@.(B - -$B$3$N%Q%C%1!<%8$O0J2<$N%G%#%l%/%H%j$+$i@.$j$^$9(B: - -lisp/ - Emacs Lisp $B$N%U%!%$%k(B -doc/ - $BJ8=q%U%!%$%k(B - -* $BI,MW$J$b$N(B - -- Emacs 20.7 $B0J9_!"$^$?$O(B XEmacs 21.4 $B0J9_(B -- Ruby 1.8 $B0J9_(B ($BG$0U(B) - -* $B%$%s%9%H!<%k(B - -$ ./configure -$ sudo make install - -~/.emacs $BEy$K0J2<$N0l9T$rDI2C$7$F$/$@$5$$!#(B - - (autoload 'riece "riece" "Start Riece" t) - -XEmacs $B$G;H$&>l9g$K$O(B "--with-xemacs" $B%*%W%7%g%s$r(B configure $B%9%/%j%W(B -$B%H$KM?$($F$/$@$5$$!#$^$?!"(B"make install" $B$NBe$o$j$K(B "make -install-package" $B$H$9$k$3$H$G(BXEmacs $B$N%Q%C%1!<%8$H$7$F%$%s%9%H!<%k$9$k(B -$B$3$H$,$G$-$^$9!#(B - -* $B%^%K%e%"%k(B - -$B;H$$J}$OF1:-$N%^%K%e%"%k$K5-:\$5$l$F$$$^$9!#(B -$B%^%K%e%"%k$rFI$`$K$O(B "M-x info" $B$G0J2<$N%a%K%e!<$rA*Br$7$^$9!#(B - - * Riece-ja: (riece-ja). An IRC client for Emacsen - -* $B%P%0Js9p(B - -$B%P%0Js9p$O!"(BLiece $B%a!<%j%s%0%j%9%H(B (liece@unixuser.org) $B$K$*Aw$j$/$@$5(B -$B$$!#(BRiece $B$N& 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} & 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} & 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} & 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)]) diff --git a/xemacs-packages/riece/configure.ac b/xemacs-packages/riece/configure.ac deleted file mode 100644 index ea731138..00000000 --- a/xemacs-packages/riece/configure.ac +++ /dev/null @@ -1,17 +0,0 @@ -AC_INIT -AC_CONFIG_SRCDIR([configure.ac]) -AC_PREREQ(2.59) -AM_INIT_AUTOMAKE(riece, 3.1.2) - -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 diff --git a/xemacs-packages/riece/doc/HACKING b/xemacs-packages/riece/doc/HACKING deleted file mode 100644 index 22590f80..00000000 --- a/xemacs-packages/riece/doc/HACKING +++ /dev/null @@ -1,445 +0,0 @@ --*- mode: text -*- - -This document is for Riece developers. The information necessary for -Riece development is explained (i.e. its development process and the -internals.) - -* Development process - -** Bug report - -You can create a template of a bug report by clicking the "bug" button -in a toolbar, or M-x riece-submit-bug-report. It is necessary to set -riece-debug to t before preparing a bug report. - -** Debug output - -If the riece-debug variable is set to t, Riece begins to collect -debugging information in *Debug* buffer. Interactions with IRC -servers are stored in " *IRC*" buffers. Note that -these buffers have names starting with a whitespace character (" "). - -** Joining the development - -To join the development, send us a patch or an add-on. - -** CVS - -Development of Riece uses CVS. Latest developing version is available -at CVS. Please note that the version from CVS may NOT be reliable, -and you can only use it at your own risk. We may ignore bug reports -for that version. The instruction to access the CVS server is below. - -(1) logging in to anonymous CVS server - - cvs -d :pserver:anonymous@cvs.m17n.org:/cvs/root login - CVS password: [CR] # NULL string - -(2) checkout modules - - cvs -d :pserver:anonymous@cvs.m17n.org:/cvs/root checkout riece - -(3) generate configure script - - autoreconf -f -i -v - -You will need newer version of GNU Automake. - -* Internals - -** 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 "@" 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. - -- -requires (optional) - Return a list of names of other add-ons this add-on depends. - -- -insinuate - Called on initialization of this module. - -- -uninstall (optional) - Called on uninstallation of this module. - -- -enable (optional) - Called when this add-on is enabled. - -- -disable (optional) - Called when this add-on is disabled. - -It is recommended to set short explanation of the add-on to --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 symbol. - -Riece does the following procedure on add-ons when startup. - -(1) Load add-ons listed in the riece-addons variable. - -(2) Call -requires on each add-on (if exists) and build a - dependency graph. - -(3) Sort the dependency graph. - -(4) Call -insinuate on each add-on in order of the - dependencies. - -(5) Call -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--hook - Called before processing an IRC message. - -- riece-after--hook - Called after processing an IRC message. - -Where is a type of IRC message and consists only lowercase -characters. - -If riece--hook returns non-nil, is not processed. -In this case riece-after--hook is not called. - -Handler hooks gets two arguments corresponding to prefix and -parameters in RFC2812. diff --git a/xemacs-packages/riece/doc/HACKING.ja b/xemacs-packages/riece/doc/HACKING.ja deleted file mode 100644 index 4a492e86..00000000 --- a/xemacs-packages/riece/doc/HACKING.ja +++ /dev/null @@ -1,421 +0,0 @@ --*- mode: text; coding: iso-2022-jp -*- - -$B$3$NJ8=q$G$O!"(BRiece $B$N3+H/%W%m%;%9$dFbIt9=B$$J$I!"3+H/$KI,MW$J>pJs$r$^(B -$B$H$a$F$$$^$9!#(B - -* $B3+H/%W%m%;%9(B - -** $B%P%0Js9p(B - -$B%P%0Js9p$O!"%D!<%k%P!<$NCn$N%"%$%3%s$r%/%j%C%/$9$k$+!"(B -M-x riece-submit-bug-report $B$G:n@.$7$F$/$@$5$$!#$^$?!"%P%0Js9p$N:n@.$N(B -$BA0$K%G%P%C%0=PNO$rM-8z$K$7$F$*$/I,MW$,$"$j$^$9!#(B - -** $B%G%P%C%0=PNO(B - -$BJQ?t(B riece-debug $B$r(B t $B$K@_Dj$9$k$H!"(BRiece $B$NpJs$,=PNO(B -$B$5$l$k$h$&$K$J$j$^$9!#%G%P%C%0>pJs$O(B *Debug* $B%P%C%U%!$KC_@Q$5$l$^$9!#(B - -$B$^$?!"(BIRC $B%5!<%P$H$N$d$j$H$j$,(B " *IRC*A0(B>" $B%P%C%U%!$KC_(B -$B@Q$5$l$^$9!#%P%C%U%!$NL>A0$,6uGr(B " " $B$G;O$^$k$3$H$K$4Cm0U$/$@$5$$!#(B - -** $B3+H/$X$N;22C(B - -$B%Q%C%A$+%"%I%*%s$r=q$$$FAw$C$F$/$@$5$$!#E,@Z$J$b$N$G$"$l$Pe$N$b$N$G$"$j!"MxMQ$O8D?M$N@UG$(B -$B$G$*4j$$$7$^$9!#(BCVS $BHG$K4X$9$k%P%0Js9p$Oe0L$K(B -$B$"$k$b$N$r@h$K5s$2$^$9!#(B - -- riece-globals - $BBg0hJQ?t$NDj5A(B - -- riece-options - $B%f!<%6%*%W%7%g%s$NDj5A(B - -- riece-version - $B%P!<%8%g%s$NDj5A(B - -- riece-coding - $B%3!<%G%#%s%0%7%9%F%`4XO"$N4X?t$NDj5A(B - -- riece-complete - $B%_%K%P%C%U%!$G$NJd40$r=u$1$k4X?t$NDj5A(B - -- riece-addon - $B%"%I%*%s4IM}(B - -- riece-mode - riece-channel/riece-user $B%*%V%8%'%/%H$N%b!<%I4IM}(B - -- riece-identity - riece-channel/riece-user $B%*%V%8%'%/%H(B $B$NBg0hI=5-$rA`:n$9$k4X?t$NDj5A(B - -- riece-channel - riece-channel $B%*%V%8%'%/%H(B $B4XO"$NDj5A(B - -- riece-user - riece-user $B%*%V%8%'%/%H(B $B4XO"$NDj5A(B - -- riece-misc - $B;(B?$J4X?t$NDj5A(B - -- riece-signal - $B%7%0%J%k4IM}(B - -- riece-layout - $B%&%#%s%I%&%l%$%"%&%H4IM}(B - -- riece-display - $BI=<(MQ%P%C%U%!$N4IM}(B - -- riece-server - IRC $B%5!<%P$H$N@\B34IM}(B - -- riece-naming - $B%A%c%s%M%k$X$N%f!<%6$N;22C!&N%C&$r4IM}$9$k(B mediator - -- riece-message - riece-message $B%*%V%8%'%/%H(B $B4XO"$NDj5A(B - -- riece-filter - $B%W%m%;%9%U%#%k%?$N%(%s%H%j%]%$%s%H(B - -- riece-handle - $BDL>o$N%a%C%;!<%8$N%O%s%I%i!#(Briece-filter $B$+$i8F$P$l$k(B - -- riece-000 - 000$BHVBf$N(B numeric reply $B$N%O%s%I%i!#(Briece-filter $B$+$i8F$P$l$k(B - -- riece-200 - 200$BHVBf$N(B numeric reply $B$N%O%s%I%i!#(Briece-filter $B$+$i8F$P$l$k(B - -- riece-300 - 300$BHVBf$N(B numeric reply $B$N%O%s%I%i!#(Briece-filter $B$+$i8F$P$l$k(B - -- riece-400 - 400$BHVBf$N(B numeric reply $B$N%O%s%I%i!#(Briece-filter $B$+$i8F$P$l$k(B - -- riece-500 - 500$BHVBf$N(B numeric reply $B$N%O%s%I%i!#(Briece-filter $B$+$i8F$P$l$k(B - -- riece-commands - $B%3%^%s%I$NDj5A(B - -- riece-irc - IRC $B%W%m%H%3%k$KBP1~$7$?(B process-filter $B$J$I$N@_Dj(B - -- riece - $B5/F0;~$N%(%s%H%j%]%$%s%H!#3F%P%C%U%!$N%a%8%c!<%b!<%I$N@_Dj$J$I(B - -** $BL>A06u4V$N4IM}(B - -Riece $B$OF1;~$KJ#?t$N(B IRC $B%5!<%P$K@\B3$G$-$k$N$G!"(BIRC $B%5!<%PKh$KJL!9$N(B -$BL>A06u4V$r4IM}$9$kI,MW$,$"$j$^$9!#$3$N$h$&$JL>A06u4V$K$O!"(BIRC $B%5!<%P$H(B -$B$N@\B3%W%m%;%9$K7k$SIU$1$i$l$?%P%C%U%!$N%m!<%+%kJQ?t$r2p$7$F%"%/%;%9$7(B -$B$^$9!#(B - -*** $B%W%m%;%9%P%C%U%!$NA0$rCN$kI,MW$,(B -$B$"$j$^$9!#(BIRC $B%5!<%P$NL>A0$O0J2<$K5s$2$k$$$/$D$+$NJ}K!$GA0(B - -$B$3$&$7$FA0$r0z?t$K4X?t(B riece-server-process $B$r(B -$B8F=P$7!"%5!<%P$N%W%m%;%9$rl9g!"%A%c%s%M%kL>$d%K%C%/%M!<%`$rBg0h(B -$BE*$K6hJL$9$kI,MW$,@8$8$^$9!#$3$N$h$&$JL>A0$rI=8=$9$k$N$,(B -riece-identity $B%*%V%8%'%/%H$G$9!#(B - -riece-identity $B%*%V%8%'%/%H$O0J2<$N(B 2 $B$D$NMWAG$r$b$D%Y%/%?!<$G$9!#(B - -- prefix - $B%A%c%s%M%kL>$d%K%C%/%M!<%`$J$I!"(BIRC $B%5!<%P$K8GM-$NL>A0(B - -- server - IRC $B%5!<%P$NL>A0(B - -riece-identity $B%*%V%8%'%/%H$KE,MQ2DG=$JA`:n$K$O0J2<$N$h$&$J$b$N$,$"$j$^$9!#(B - -- riece-make-identity prefix &optional server - riece-identity $B%*%V%8%'%/%H$r?75,$K:n@.$7$^$9!#(Bserver $B0z?t$,>JN,$5$l$?(B - $B>l9g$K$O!"4X?t(B riece-find-server-name $B$G$r;H$$$^$9(B - -- riece-identity-prefix identity - riece-identity $B%*%V%8%'%/%H$+$i(B IRC $B%5!<%P$K8GM-$NL>A0$r@Z$j=P$7$^$9!#(B - -- riece-identity-server identity - riece-identity $B%*%V%8%'%/%H$+$i%5!<%P$NL>A0$r@Z$j=P$7$^$9!#(B - -- riece-identity-equal ident1 ident2 - 2 $B$D$N(B riece-identity $B%*%V%8%'%/%H$,F1Ey$G$"$k$+D4$Y$^$9!#(B - -- riece-identity-equal-no-server ident1 ident2 - 2 $B$D$N(B riece-identity $B%*%V%8%'%/%H$N!"(BIRC $B%5!<%P$K8GM-$NL>A0$,F1Ey$G$"(B - $B$k$+D4$Y$^$9!#(B - -- riece-identity-member elt list - riece-identity $B%*%V%8%'%/%H(B elt $B$,(B list $B$K4^$^$l$k$+D4$Y$^$9!#(B - -*** $B%A%c%s%M%k$H%f!<%6$N4IM}(B - -riece-identity $B%*%V%8%'%/%H$+$i@Z$j=P$5$l$?(B IRC $B%5!<%P$K8GM-$NL>A0!"$9(B -$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(B -$B$l(B riece-channel $B%*%V%8%'%/%H$H(B riece-user $B%*%V%8%'%/%H$G(B -$BI=8=$5$l$^$9!#(B - -**** riece-channel $B%*%V%8%'%/%H(B - -riece-channel $B$O%A%c%s%M%k$rI=$9%*%V%8%'%/%H$G!"0J2<$NMWAG$r;}$A$^$9!#(B - -- users - $B;22C$7$F$$$k%f!<%6$N%K%C%/%M!<%`$N%j%9%H(B - -- operators - $B%*%Z%l!<%?8"8B$r$b$D%f!<%6$N%K%C%/%M!<%`$N%j%9%H(B - -- speakers - $BH/8@8"$r$b$D%f!<%6$N%K%C%/%M!<%`$N%j%9%H(B - -- modes - $B%A%c%s%M%k$N%b!<%I(B - -- banned - MODE +b $B$G;XDj$5$l$?%Q%?!<%s$N0lMw(B - -- invited - MODE +I $B$G;XDj$5$l$?%Q%?!<%s$N0lMw(B - -- uninvited - MODE +e $B$G;XDj$5$l$?%Q%?!<%s$N0lMw(B - -**** riece-user $B%*%V%8%'%/%H(B - -riece-user $B$O!"(BIRC $B$K;22C$7$F$$$k%f!<%6$rI=$9%*%V%8%'%/%H$G!"0J2<$NMW(B -$BAG$r;}$A$^$9!#(B - -- channels - $B;22C$7$F$$$k%A%c%s%M%kL>$N%j%9%H(B - -- user-at-host - "@" $B$N7A$GM?$($i$l$k%f!<%6$N@\B3>pJs(B - -- modes - $B%f!<%6$N%b!<%I(B - -- away - $BN%@JCf$+$I$&$+(B - -**** Mediator $B%Q%?!<%s(B - -$B%A%c%s%M%k$X$N%f!<%6$N;22C!&N%C&$r4IM}$9$k$?$a$K!"(B riece-naming $B%b%8%e!<(B -$B%k$r;H$$$^$9!#(Briece-naming $B$O!"%G%6%$%s%Q%?!<%s$G$$$&$H$3$m$N(B Mediator -$B%Q%?!<%s$KAjEv$9$k$b$N$G$9!#(B - -riece-naming $B$r2p$9$k$3$H$G!"A0=R$N(B riece-channel, riece-user $B%*%V%8%'(B -$B%/%H$rD>@\A`:n$9$k$3$H$J$/!"0BA4$KL>A06u4V$K%"%/%;%9$9$k$3$H$,$G$-$^$9!#(B - -riece-naming $B$,Ds6!$9$kA0$,JQ99$5$l$?$3$H$rI=L@$7$^$9(B - -** $B%7%0%J%k(B - -$B%7%0%J%k$H$O!"2hLL$N:FIA2h$r8zN(NI$/9T$&$?$a$K!"%$%Y%s%H$HIA2hBP>]$N%*(B -$B%V%8%'%/%H(B($B%P%C%U%!$d!"%b!<%I%i%$%s$N0u(B)$B$r7k$SIU$1$k5!9=$G$9!#(B - -$B%&%#%s%I%&$N:FIA2h$rH<$&%$%Y%s%H$,H/@8$9$k$H!"%7%0%J%k$,Aw=P$5$l$^$9!#(B -$B%7%0%J%k$N35G0$O!"(BQt $B$d(B GTK+ $B$H$$$C$?0lHLE*$J(B GUI $B%D!<%k%-%C%H$KMQ0U$5(B -$B$l$F$$$k$b$N$HF1MM$G$9!#(B - -$B%7%0%J%k$rAw?.$9$k$K$O!"(Briece-emit-signal $B$r;H$$$^$9!#(B - -- riece-emit-signal signal-name &rest args - $B0z?t(B signal-name $B$G;X<($5$l$k%7%0%J%k$r!"0z?t(B args $B$H$H$b$KAw=P$7$^(B - $B$9(B - -$B%7%0%J%k$K1~Ez$9$k=hM}$O!"(Briece-connect-signal $B$r;H$C$FDj5A$7$^$9!#(B - -- riece-connect-signal signal-name slot-function &optional - filter-function handback - - $B0z?t(B signal-name $B$G;XDj$5$l$?%7%0%J%k$K1~Ez$9$k4X?t(B slot-function $B$r(B - $B@_Dj$7$^$9!#(Bslot-function $B$K;XDj$5$l$?4X?t$O(B 2 $B$D$N0z?t$rl9g$K$O!"(Bslot-function $B$OA0$rJV$7$^$9!#(B - -- riece-signal-args - $B%7%0%J%k$NAw?.;~$KM?$($i$l$?0z?t$rJV$7$^$9!#(B - -$B8=:_!"0J2<$N%7%0%J%k$,;HMQ$5$l$F$$$^$9!#(B - -- channel-list-changed - $B;22C$7$F$$$k%A%c%s%M%k$N0lMw$NJQ2=(B - -- user-list-changed - $B%A%c%s%M%k$N;22CA0$rJQ99(B - ($B0z?t$O!"0JA0$H8=:_$NL>A0$KAjEv$9$k(B riece-identity $B%*%V%8%'%/%H(B) - -- user-away-changed - $B%f!<%6$NN%@J>uBV$NJQ2=(B - ($B0z?t$O!"%f!<%6$KAjEv$9$k(B riece-identity $B%*%V%8%'%/%H(B) - -- user-operator-changed - $B%f!<%6$N%*%Z%l!<%?>uBV$NJQ2=(B - ($B0z?t$O!"%f!<%6$KAjEv$9$k(B riece-identity $B%*%V%8%'%/%H(B) - -- channel-topic-changed - $B%A%c%s%M%k$N%H%T%C%/$NJQ2=(B - ($B0z?t$O!"%A%c%s%M%k$KAjEv$9$k(B riece-identity $B%*%V%8%'%/%H(B) - -- channel-modes-changed - $B%A%c%s%M%k$N%b!<%I$NJQ2=(B - ($B0z?t$O!"%A%c%s%M%k$KAjEv$9$k(B riece-identity $B%*%V%8%'%/%H(B) - -- channel-operators-changed - $B%A%c%s%M%k$G%*%Z%l!<%?8"8B$r;}$D%f!<%6$N0lMw$NJQ2=(B - ($B0z?t$O!"%A%c%s%M%k$KAjEv$9$k(B riece-identity $B%*%V%8%'%/%H(B) - -- channel-speakers-changed - $B%A%c%s%M%k$GH/8@8"$r;}$D%f!<%6$N0lMw$NJQ2=(B - ($B0z?t$O!"%A%c%s%M%k$KAjEv$9$k(B riece-identity $B%*%V%8%'%/%H(B) - -- buffer-freeze-changed - $B%P%C%U%!$NE`7k>uBV$NJQ2=(B - ($B0z?t$O%P%C%U%!(B) - -** $B%"%I%*%s$N=q$-J}(B - -$B%"%I%*%s$N>r7o$rK~$?$9%b%8%e!<%k$O0J2<$N4X?t$rDs6!$7$^$9!#(B - -- <$B%b%8%e!<%kL>(B>-requires ($B%*%W%7%g%s(B) - $B0MB8$9$kB>$N%"%I%*%s(B($B%7%s%\%k$N%j%9%H(B)$B$rJV$7$^$9(B - -- <$B%b%8%e!<%kL>(B>-insinuate - $B=i4|2==hM}$r9T$$$^$9(B - -- <$B%b%8%e!<%kL>(B>-uninstall ($B%*%W%7%g%s(B) - $B%"%I%*%s$r%"%s%$%s%9%H!<%k$9$k$H8F$P$l$^$9(B - -- <$B%b%8%e!<%kL>(B>-enable ($B%*%W%7%g%s(B) - $B%"%I%*%s$NM-8z$K$9$k$H8F$P$l$^$9(B - -- <$B%b%8%e!<%kL>(B>-disable ($B%*%W%7%g%s(B) - $B%"%I%*%s$NL58z$K$9$k$H8F$P$l$^$9(B - -$B$^$?!"%"%I%*%s$N4JC1$J@bL@$r!"JQ?t(B <$B%b%8%e!<%kL>(B>-description $B$K@_Dj$9(B -$B$k$HNI$$$G$7$g$&!#$3$NJ8;zNs$O(B C-c ^ (M-x riece-command-list-addons) -$B$K$h$k%"%I%*%s$N0lMw$GI=<($5$l$^$9!#(B - -$B%"%I%*%s$NM-8z!&L58z$N>uBV$O!"(B<$B%b%8%e!<%kL>(B> $B$N%7%s%\%k$K(B -$BIUM?$5$l$k(B riece-addon-enabled $B%W%m%Q%F%#$GD4$Y$k$3$H$,$G$-$^$9!#(B - -Riece $B$O5/F0;~$K0J2<$N=hM}$r9T$$$^$9!#(B - -(1) $BJQ?t(B riece-addons $B$KNs5s$5$l$?%b%8%e!<%k$rFI$_9~$`(B - -(2) $B$=$l$>$l$N%b%8%e!<%k$KBP$7!"(B<$B%b%8%e!<%kL>(B>-requires $B$,MQ0U(B - $B$5$l$F$$$l$P8F$S=P$7!"0MB8%0%i%U$r:n$k(B - -(3) $B0MB8%0%i%U$KBP$7$F%H%]%m%8%+%k%=!<%H$r9T$&(B - -(4) $BF@$i$l$?0MB8=g=x$K=>$C$F(B <$B%b%8%e!<%kL>(B>-insinuate $B8F$S=P$9(B - -(5) $B$b$7!"%"%I%*%s$,M-8z2=!&L58z2=$KBP1~$7$F$*$j!"L@<(E*$KL58z2=$5$l$F(B - $B$$$J$1$l$P!"(B<$B%b%8%e!<%kL>(B>-enable $B$r8F$S=P$9!#(B - -$B:n@.$7$?%"%I%*%s$O!"(Bload-path $B$NDL$C$?%G%#%l%/%H%j$+!"(B -~/.riece/addons/ $B0J2<$KG[CV$9$k$HAH$_9~$_2DG=$J>uBV$K$J$j$^$9!#(B - -** $B%O%s%I%i%U%C%/(B - -Riece $B$K$O!"%O%s%I%i%U%C%/$H8F$P$l$kFCJL$J0UL#$r;}$D%U%C%/$,$"$j$^$9!#(B -$B%O%s%I%i%U%C%/$O(B IRC $B$N%a%C%;!<%8$r $B$r(B IRC $B$N%a%C%;!<%8$r>.J8;z$K$7$?$b$N$H$9$k$H!"%O%s%I%i%U%C(B -$B%/$O-hook - $B%a%C%;!<%8$,FO$$$?$H$-$K:G=i$K8F$P$l$k%U%C%/(B - -- riece-after--hook - $B%a%C%;!<%8$N=hM}$,=*$o$C$?8e$K8F$P$l$k%U%C%/(B - -$BNc$($P!"(BPRIVMSG $B$K4X$7$F$O!"(Briece-privmsg-hook, -riece-after-privmsg-hook $B$NFs$D$N%U%C%/$,8F$P$l$^$9!#(B - -$B$3$3$G(B riece--hook $B$NJV$jCM$K$O0UL#$,$"$j!"(Bt $B$rJV$9$b$N$,$"$l(B -$B$P!"$=$N8e$N=hM}$r$*$3$J$$$^$;$s!#$^$?!"$=$N>l9g$K$O(B -riece-after--hook $B$b8F$S=P$5$l$^$;$s!#(B - -$B%U%C%/$N0z?t$K$O(B RFC2812 $B$N(B prefix $B$H(B parameters $B$,EO$j$^$9!#(B \ No newline at end of file diff --git a/xemacs-packages/riece/doc/Makefile.am b/xemacs-packages/riece/doc/Makefile.am deleted file mode 100644 index 77d585d5..00000000 --- a/xemacs-packages/riece/doc/Makefile.am +++ /dev/null @@ -1,13 +0,0 @@ -EXTRA_DIST = texinfo.tex infohack.el ptexinfmt.el irchat-copyright.el \ - HACKING HACKING.ja - -info_TEXINFOS = riece-ja.texi riece-en.texi - -package: all - $(MAKE) EMACS=$(XEMACS) - -install-package: package - $(MAKE) infodir=$(PACKAGEDIR)/info install - -%.info: %.texi - $(EMACS) -batch -q -no-site-file -l ./infohack.el -f batch-makeinfo $< diff --git a/xemacs-packages/riece/doc/fdl.texi b/xemacs-packages/riece/doc/fdl.texi deleted file mode 100644 index 361f90f7..00000000 --- a/xemacs-packages/riece/doc/fdl.texi +++ /dev/null @@ -1,403 +0,0 @@ - -@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. -59 Temple Place, Suite 330, Boston, MA 02111-1307, 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: - diff --git a/xemacs-packages/riece/doc/infohack.el b/xemacs-packages/riece/doc/infohack.el deleted file mode 100644 index 9b4af97b..00000000 --- a/xemacs-packages/riece/doc/infohack.el +++ /dev/null @@ -1,177 +0,0 @@ -;;; infohack.el --- a hack to format info file. -;; Copyright (C) 2001 Free Software Foundation, Inc. - -;; Author: Shenghuo Zhu -;; 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" "./")) - -(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)) - - -(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 diff --git a/xemacs-packages/riece/doc/irchat-copyright.el b/xemacs-packages/riece/doc/irchat-copyright.el deleted file mode 100644 index 24d14261..00000000 --- a/xemacs-packages/riece/doc/irchat-copyright.el +++ /dev/null @@ -1,82 +0,0 @@ -;;; -*- emacs-lisp -*- -;;; -;;; $Id: irchat-copyright.el,v 1.7 2007-03-19 09:52:59 daiki Exp $ -;;; -(defvar irchat-copyright " - $Id: irchat-copyright.el,v 1.7 2007-03-19 09:52:59 daiki 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 - - 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 - Markku Järvinen - Jukka Partanen - Kim Nyberg - Tero T. Mononen - - 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 - Tero T. Mononen - Kim Nyberg - Tomi Ollila - Jukka Partanen - Timo J. Rinne -" "Basically GPL") - -;;; -;;; $Log: irchat-copyright.el,v $ -;;; Revision 1.7 2007-03-19 09:52:59 daiki -;;; Sync riece with upstream version 3.1.2 -;;; -;;; 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 -;;; diff --git a/xemacs-packages/riece/doc/ptexinfmt.el b/xemacs-packages/riece/doc/ptexinfmt.el deleted file mode 100644 index 341c8c07..00000000 --- a/xemacs-packages/riece/doc/ptexinfmt.el +++ /dev/null @@ -1,892 +0,0 @@ -;;; ptexinfmt.el -- portable Texinfo formatter. - -;; Copyright (C) 1985, 1986, 1988, 1990, 1991, 1992, 1993, -;; 1994, 1995, 1996, 1997 Free Software Foundation, Inc. -;; Copyright (C) 1999 Yoshiki Hayashi -;; Copyright (C) 2000, 2001, 2002 TAKAHASHI Kaoru - -;; Author: TAKAHASHI Kaoru -;; Yoshiki Hayashi -;; Katsumi Yamaoka -;; Maintainer: TAKAHASHI Kaoru -;; 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 -;; makeinfo.el (gnujdoc project) - -;; Support texinfmt.el 2.32 or later. - -;; Modified by Yamaoka not to use APEL functions. - -;;; Code: - -(require 'backquote) -(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 -(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 -(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 -(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 "$BI}9-J8;z(B")) - (texinfo-mode) - (insert (format " {%s}\n" str)) - (goto-char (point-min)) - (if (= (car (texinfo-multitable-widths)) (length str)) - nil - t))) - ;; function definition is void - t)) - -(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) - -;; 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) - -;; 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) - -;; @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 " ")) - - -;;; Directory File -;; @direcategory -(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 -(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) - - -;; @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)))) - -;; @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)))) - - - -;;; Marking -;; @url, @env, @command -(put 'url 'texinfo-format 'texinfo-format-code) -(put 'env 'texinfo-format 'texinfo-format-code) -(put 'command 'texinfo-format 'texinfo-format-code) - -;; @acronym -(put 'acronym 'texinfo-format 'texinfo-format-var) - -(ptexinfmt-defun-if-broken texinfo-format-var () - (let ((arg (texinfo-parse-expanded-arg))) - (texinfo-discard-command) - (insert (upcase arg)))) - -;; @key -(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 -(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{TEXT} (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-backward-char 1) - (unless (looking-at "}") - (error "Not found: @verb end brace")) - (delete-char 1)) - - -;;; Accents and Special characters -;; @pounds{} ==> # Pounds Sterling -(put 'pounds 'texinfo-format 'texinfo-format-pounds) -(ptexinfmt-defun-if-void texinfo-format-pounds () - (texinfo-parse-arg-discard) - (insert "#")) - -;; @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} ==> 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)) - - -;;; Cross References -;; @ref, @xref -(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 -(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 -;; 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)) - - - -;;; 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)))) - - -;;; 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 - - - -;;; 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))) - -;; @hyphenation command discards an argument within braces -(put 'hyphenation 'texinfo-format 'texinfo-discard-command-and-arg) -(ptexinfmt-defun-if-void texinfo-discard-command-and-arg () - "Discard both @-command and its argument in braces." - (goto-char texinfo-command-end) - (forward-list 1) - (setq texinfo-command-end (point)) - (delete-region texinfo-command-start texinfo-command-end)) - - -;;; @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))) - - -(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)))) - -(provide 'ptexinfmt) - -;;; ptexinfmt.el ends here diff --git a/xemacs-packages/riece/doc/riece-en.texi b/xemacs-packages/riece/doc/riece-en.texi deleted file mode 100644 index 4aecc16a..00000000 --- a/xemacs-packages/riece/doc/riece-en.texi +++ /dev/null @@ -1,462 +0,0 @@ -\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 - -@ifnottex -This file describes Riece. - -Copyright (C) 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 ifnottex - -@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 talk 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://irc.kyoto-u.ac.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: diff --git a/xemacs-packages/riece/doc/riece-ja.texi b/xemacs-packages/riece/doc/riece-ja.texi deleted file mode 100644 index ea1eec08..00000000 --- a/xemacs-packages/riece/doc/riece-ja.texi +++ /dev/null @@ -1,833 +0,0 @@ -\input texinfo @c -*- mode: texinfo; coding: iso-2022-jp -*- -@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 - -@dircategory GNU Emacs Lisp -@direntry -* Riece-ja: (riece-ja). An IRC client for Emacsen -@end direntry - -@ifnottex -This file describes Riece. - -Copyright (C) 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 ifnottex - -@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 - -$B$3$N%^%K%e%"%k$G$O!"(BRiece $B%P!<%8%g%s(B @value{VERSION} $B$K$D$$$F2r@b$7$^$9!#(B -$B$3$N%^%K%e%"%k$G07$&HO0O$r1[$($?>pJs$O(B Riece $B$N8x<0%[!<%`%Z!<%8(B -@uref{http://www.nongnu.org/riece/} $B$+$iF@$i$l$k$+$b$7$l$^$;$s!#(B - -@menu -* Overview:: $B$O$8$a$KFI$s$G$M(B -* Getting started:: IRC $B%5!<%P$K@\B3$7$F2qOC$7$F$_$h$&(B -* Basic usage:: $B4pK\E*$J;H$$J}(B -* Advanced usage:: $B?J$s$@;H$$J}(B -* Tips:: $BJXMx$J@_Dj(B -* Index:: -* Function Index:: -* Variable Index:: -@end menu - -@node Overview, Getting started, Top, Top -@chapter Overview - -Riece $B$O(B IRC (Internet Relay Chat) $B$N@$3&$G%A%c%C%H$r3Z$7$`$?$a$N%f!<%6(B -$B%$%s%?!<%U%'!<%9$G$9!#(BRiece $B$O!V$j!<$9!W$HFI$_$^$9!#(B - -Riece $B$N$N(B elisp $B%Q%C%1!<%8$K0MB8$7$J$$$?$a!"%$%s%9%H!<%k$,4JC1(B -@item $B@_Dj$,4JC1$G!"A02s5/F0;~$N@_Dj$r5-O?!&I|85$9$k;EAH$_$rDs6!(B -@item $BCJ3,E*$JA`:n@bL@=q$,ImB0(B -@item $B:G?7$N(B IRC $B$N%/%i%$%"%s%H%W%m%H%3%k(B (RFC2812) $B$K=`5r(B -@end itemize - -@node Getting started, Basic usage, Overview, Top -@chapter Getting started - -Riece $B$r5/F0$9$kl9g$K(B -$B$O%$%s%9%H!<%k$K<:GT$7$F$$$^$9!#<+J,$G%=!<%9$+$i%$%s%9%H!<%k$7$?>l9g$K$O(B -README $B$r$b$&0lEYFI$_D>$7$F$/$@$5$$!#(BOS$B!&%G%#%9%H%j%S%e!<%7%g%s$N%Q%C%1!<(B -$B%8$+$i%$%s%9%H!<%k$7$?>l9g$K$O!"%Q%C%1!<%8$K4^$^$l$kJ8=q$r$43NG'$/$@$5$$!#(B - -Riece $B$r5/F0$9$k$H!"(BIRC $B%5!<%P$NL>A0$rJ9$+$l$^$9!#8x6&$KMxMQ2DG=$J(B IRC -$B%5!<%P$N0lMw$O(B Web $B%Z!<%8$J$I$+$iF@$k$3$H$,$G$-$^$9!#(B - -@itemize @bullet -@item http://irc.kyoto-u.ac.jp -@item http://freenode.net -@end itemize - -$B$^$?!"0J2<$N$h$&$J%a%C%;!<%8$,I=<($5$l$k$+$b$7$l$^$;$s!#(B - -@example -Nickname "ueno" already in use. Choose a new one: -@end example - -IRC $B$G$O!";22CN$,;H$o$l(B -$B$^$9!#$b$74uK>$N%K%C%/%M!<%`$,B>$NC/$+$K;HMQ$5$l$F$$$k>l9g!"JL$N%K%C%/%M!<(B -$B%`$rA*$VI,MW$,$"$j$^$9!#(B - -IRC $B%5!<%P$K@\B3$G$-$?$i!"A[E*$J2q5D<<$K;22C$7$F2qOC$r9T$J$$$^$9!#%A%c%s%M%k$KF~$k$K$O(B -@kbd{C-c j} $B$H%?%$%W$7$^$9!#;22C$9$k%A%c%s%M%kL>$r?R$M$i$l$?$i!"E,@Z$J%A%c(B -$B%s%M%kL>$rF~NO$7$^$7$g$&!#(BIRCnet $B$K$O(B @samp{#Riece} $B$H$$$&%A%c%s%M%k$,$"(B -$B$k$N$G!"%F%9%H$r$7$?$$>l9g$K$O<+M3$K$*;H$$$/$@$5$$!#(B - -$B%A%c%s%M%k$KF~$k$H!"2<$N?^$K<($9$h$&$J(B 5 $B$D$N%&%#%s%I%&(B -@footnote{$B$^$.$i$o$7$$$G$9$,!"(BEmacs $B$N@$3&$G$O%P%C%U%!$rI=<($9$kNN0h$r%&%#(B -$B%s%I%&$H8F$S$^$9!#(B}$B$+$i$J$k2hLL$K@Z$jBX$o$j$^$9!#(B - -@example -+-----+-----------------+ -| | | -| | | -| (1) | (2) | -| | | -| | | -+-----+-----------------+ -| | (4) | -| +-----------------+ -| (3) | | -| | (5) | -| | | -+-----+-----------------+ -@end example - -(4) $B$N%&%#%s%I%&$KI=<($5$l$k%P%C%U%!$KJ8>O$rF~NO$7$F%j%?!<%s%-!<$r2!$9$H(B -$BH/8@$G$-$^$9!#B>$N;22CuBV$NI=<((B -* Commands:: $B%3%^%s%I$N0lMw(B -@end menu - -@node Windows, Indicators, Basic usage, Basic usage -@section Windows - -@example -+-----+-----------------+ -| | | -| | | -| (1) | (2) | -| | | -| | | -+-----+-----------------+ -| | (4) | -| +-----------------+ -| (3) | | -| | (5) | -| | | -+-----+-----------------+ -@end example - -$B3F%&%#%s%I%&$KI=<($5$l$k%P%C%U%!$NLr3d$O0J2<$NDL$j$G$9!#(B - -@enumerate -@item -$B%f!<%6%j%9%H%P%C%U%!(B (@samp{ *Users*})$B!#%A%c%s%M%k$K;22C$7$F$$$k%f!<(B -$B%6$N%K%C%/%M!<%`$N0lMw$,I=<($5$l$^$9!#(B - -@item -$B%A%c%s%M%k%P%C%U%!(B (@samp{ *Channel:XXX*})$B!#%A%c%s%M%kFb$N2qOC$,I=<($5$l(B -$B$^$9!#(B - -@item -$B%A%c%s%M%k%j%9%H%P%C%U%!(B (@samp{ *Channels*})$B!#<+J,$,;22C$7$F$$$k%A%c%s%M(B -$B%k$N0lMw$,I=<($5$l$^$9!#(B - -@item -$B%3%^%s%I%P%C%U%!(B (@samp{*Command*})$B!#J8>O$d%3%^%s%I$rAw?.$9$k$?$a$K;H$$(B -$B$^$9!#(B - -@item -$B%"%6!<%:%P%C%U%!(B (@samp{ *Others*})$B!#8=:_A*BrCf$N%A%c%s%M%k0J30$N2qOC$,N.(B -$B$l$^$9!#(B -@end enumerate - -@node Indicators, Commands, Windows, Basic usage -@section Indicators - -$B%b!<%I%i%$%s$N:8C<$K$O!"8=:_$N<+J,$N>uBV$r<($90u$,I=<($5$l$^$9!#(B -@footnote{$B$b$72hA|$rI=<($G$-$k(B Emacs $B$r$*;H$$$J$i!":8C<$K(B "R" $B$N%"%$%3%s(B -$B$,I=<($5$l$^$9!#(B} - -@example -Riece: ---- ueno #Riece [n] -@end example - -$B$3$3$G!"(B@samp{----} $B$NItJ,$K$O:8$+$i=g$K0J2<$N0UL#$,$"$j$^$9!#(B - -@enumerate -@item -$BN%@J>uBV(B ($BN%@J$7$F$$$l$P(B @samp{A}) - -@item -IRC $B%*%Z%l!<%?>uBV(B (IRC $B%M%C%H%o!<%/$N4IM}uBV(B ($B%A%c%s%M%k$N4IM}O$rF~NO$7$?%P%C%U%!$O%3%^%s%I%P%C%U%!$H8F$P$l$^$9!#(B -$B%3%^%s%I%P%C%U%!$+$i$OJ8>O$rAw?.$9$k0J30$K!"MM!9$J%3%^%s%I$rH/9T$9$k$3$H(B -$B$,$G$-$^$9!#0J2<$K0lIt$r5s$2$^$9!#(B - -$B:G=i$O$J$+$J$+3P$($K$/$$$G$9$,!"(B@kbd{C-h b} - (@kbd{M-x describe-bindings}) $B$G;HMQ2DG=$J%-!/$7$:$D3P$($F$$$/$HNI$$$G$7$g$&!#(B - -@subsection IRC commands -@table @kbd -@item RET -@findex riece-command-enter-message -$BJ8>O$rAw$j$^$9(B(@code{riece-command-enter-message}) -@item C-RET -@findex riece-command-enter-message-as-notice -$BJ8>O$r(B NOTICE $B$H$7$FAw$j$^$9(B(@code{riece-command-enter-message-as-notice}) -@item C-c j -@findex riece-command-join -$B%A%c%s%M%k$K;22C$7$^$9(B(@code{riece-command-join}) -@item C-c C-p -@findex riece-command-part -$B%A%c%s%M%k$+$iN%C&$7$^$9(B(@code{riece-command-part}) -@item C-c p -@findex riece-command-enter-message-to-user -$B08@h$r;XDj$7$F8=:_$N9T$rAw$j$^$9(B(@code{riece-command-enter-message-to-user}) -@item C-c q -@findex riece-command-quit -IRC $B$r$d$a$^$9(B(@code{riece-command-quit}) -@item C-c n -@findex riece-command-change-nickname -$B<+J,$N%K%C%/%M!<%`$rJQ99$7$^$9(B(@code{riece-command-change-nickname}) -@item C-c f -@findex riece-command-finger -$B%f!<%6$N>pJs$rD4$Y$^$9(B(@code{riece-command-finger}) -@item C-c C-k -@findex riece-command-kick -$B%f!<%6$r%A%c%s%M%k$+$i=3$j=P$7$^$9(B(@code{riece-command-kick}) -@item C-c i -@findex riece-command-invite -$B%f!<%6$r%A%c%s%M%k$K>7BT$7$^$9(B(@code{riece-command-invite}) -@item C-c l -@findex riece-command-list -$B%Q%?!<%s$KBP$7$F(B LIST $B$rH/9T$7$^$9(B(@code{riece-command-list}) -@item C-c C-n -@findex riece-command-names -$B%Q%?!<%s$KBP$7$F(B NAMES $B$rH/9T$7$^$9(B(@code{riece-command-names}) -@item C-c w -@findex riece-command-who -$B%Q%?!<%s$KBP$7$F(B WHO $B$rH/9T$7$^$9(B(@code{riece-command-who}) -@item C-c t -@findex riece-command-topic -$B%A%c%s%M%k$N%H%T%C%/$r@_Dj$7$^$9(B(@code{riece-command-topic}) -@item C-c C-m -@findex riece-command-change-mode -$B%A%c%s%M%k$N%b!<%I$r@_Dj$7$^$9(B(@code{riece-command-change-mode}) -@item C-c o -@findex riece-command-set-operators -$B%f!<%6$K%A%c%s%M%k$N4IM}\:Y$J>pJs$rI=<($7$^$9!#(B -@item C-c / -@findex riece-command-raw -IRC $B%3%^%s%I$rD>@\Aw$j$^$9(B(@code{riece-command-raw}) -@end table - -@subsection Window manipulating commands -@table @kbd -@item C-c r -@findex riece-command-configure-windows -$B%U%l!<%`A4BN$r:FIA2h$7$^$9(B(@code{riece-command-configure-windows}) -@item C-c C-j $B$^$?$O(B C-c > -@findex riece-command-next-channel -$B%A%c%s%M%k0lMw$GeC<$^$G%9%/%m!<%k$7$^$9(B(@code{riece-command-beginning-of-buffer}) -@item C-c $ -@findex riece-command-end-of-buffer -$B%A%c%s%M%k%P%C%U%!!"$^$?$O%@%$%"%m%0%P%C%U%!$r2eJ}8~$K%9%/%m!<%k$7$^$9(B(@code{riece-command-scroll-up}) -@item C-c DEL -@findex riece-command-scroll-down -$B%A%c%s%M%k%P%C%U%!!"$^$?$O%@%$%"%m%0%P%C%U%!$r2uBV$r@Z$jBX$($^$9(B(@code{riece-command-toggle-away}) -@end table - -@node Advanced usage, Tips, Basic usage, Top -@chapter Advanced usage - -$B$3$N>O$G$O!"$b$C$H?J$s$@;H$$J}$r2r@b$7$^$9!#(B - -@menu -* Startup File:: $B@_Dj%U%!%$%k(B -* Server settings:: $B%5!<%P$N>\:Y@_Dj(B -* Connecting to multiple servers:: $BF1;~$KJ#?t$N%5!<%P$K@\B3$9$k$K$O(B -* Add-ons:: $B%"%I%*%s$H$O(B -@end menu - -@node Startup File, Server settings, Advanced usage, Advanced usage -@section Startup file - -$B$3$N>O$G$O!"@_Dj%U%!%$%k$K$D$$$F2r@b$7$^$9!#(BRiece $B$N@_Dj$O(B Emacs $B$N@_Dj(B -$B%U%!%$%k$K=q$$$F$bNI$$$G$9$,!"(BRiece $B$K8GM-$N@_Dj$O$J$k$Y$/(B -@file{~/.riece/init} $B$K=q$/$3$H$r4+$a$^$9!#(B - -$B$^$?!"(BRiece $B$r;H$$;O$a$k$H(B @file{~/.riece/save} $B$H$$$&%U%!%$%k$,:n@.$5$l(B -$B$^$9!#$3$N%U%!%$%k$K$OA02s5/F0;~$N@_Dj$N0lIt(B($B%&%#%s%I%&9=@.Ey(B)$B$,<+F0E*$K(B -$BJ]B8$5$l$^$9!#(B - -$B5/F0;~$K$O!":G=i$K(B @file{~/.riece/save} $B$r!"e=q$-$5$l$^$9!#(B - -@node Server settings, Connecting to multiple servers, Startup File, Advanced usage -@section Server settings - -$B5/F0;~$K@\B3$9$k(B IRC $B%5!<%P$NL>A0$OJQ?t(B @code{riece-server} $B$G;XDj$7$^$9!#(B -@vindex riece-server - -@code{riece-server} $B$N7A<0$O(B>:<$B%]!<%HHV9f(B>[:<$B%Q%9%o!<%I(B>] -@end example - -@code{riece-server-alist} $B$r@_Dj$9$k$H!"$h$jJ#;($J;XDj$,2DG=$K$J$j$^$9!#(B -@vindex riece-server-alist - -$B0J2<$NNc$r9M$($^$9!#(B - -@example -(setq riece-server-alist - '(("foo" :host "irc.example.com" :coding shift_jis) - ("bar" :host "irc.example.net" :nickname "baz"))) - -(setq riece-server "foo") -@end example - -$B$3$N@_Dj$N0UL#$O0J2<$NDL$j$G$9!#(B - -@itemize -@item -@samp{foo} $B$H$$$&L>A0$N(B IRC $B%5!<%P$N%[%9%HL>$O(B @samp{irc.example.com} $B$G!";HMQ$9$kJ8;z%3!<%I$O(B Shift_JIS - -@item -@samp{bar} $B$H$$$&L>A0$N(B IRC $B%5!<%P$N%[%9%HL>$O(B @samp{irc.example.net} $B$G!"$3$N%5!<%P$G$O%K%C%/%M!<%`(B @samp{baz} $B$r;H$&(B -@end itemize - -$B;XDj$G$-$k%-!<%o!<%I$N0lMw$O0J2<$NDL$j$G$9!#(B - -@table @code -@item :host -$B%5!<%P$N%[%9%HL>$^$?$O(B IP $B%"%I%l%9(B -@item :service -$B%5!<%P$N%5!<%S%9L>$^$?$O%]!<%HHV9f(B -@item :nickname -$B@\B3;~$N%K%C%/%M!<%`(B -@item :username -$B@\B3;~$N%f!<%6%M!<%`(B -@item :password -$B@\B3;~$N%Q%9%o!<%I(B -@item :function -$B@\B3MQ4X?t(B -@item :coding -$BJ8;z%3!<%I(B -@end table - -@node Connecting to multiple servers, Add-ons, Server settings, Advanced usage -@section Connecting to multiple servers - -$BF1;~$KJ#?t$N%5!<%P$K@\B3$9$kuBV$G!"JL$N%5!<%P$K@\B3$9$k$K$O(B @kbd{C-c O} (@code{riece-command-open-server}) $B$r;H$$$^$9!#(B - -$BJL$N%5!<%P>e$N%A%c%s%M%k$K;22C$9$k$K$O!"(B@kbd{C-c j} -(@code{riece-command-join})$B$G%A%c%s%M%kL>$K(B @samp{@@} $B$KB3$$$F%5!<%PL>$r(B -$BB3$1$^$9!#(B - -$B$?$H$($P!"%5!<%P(B @samp{irc.freenode.net} $B>e$N(B @samp{#Riece} $B$O$H%5!<%P$N6h@Z$jJ8;z(B @samp{@@} $B$O(B -$BJQ?t(B @code{riece-alias-alternate-separator} $B$GJQ99$G$-$^$9!#(B - -$B$^$?$O!"6uGrJ8;z$G$bBeMQ$G$-$^$9!#$3$N;~$K$O!"(B@kbd{C-q SPC} $B$HF~NO$9$k(B -$BI,MW$,$"$j$^$9!#(B - -$BJ#?t$N@\B3$rA`:n$9$k%3%^%s%I$r0J2<$K$^$H$a$^$9!#(B - -@table @kbd -@item C-c O -@findex riece-command-open-server -$BJL$N%5!<%P$K@\B3$7$^$9(B(@code{riece-command-open-server}) -@item C-c C -@findex riece-command-close-server -$B%5!<%P$H$N@\B3$r@ZCG$7$^$9(B(@code{riece-command-close-server}) -@item C-c M -@findex riece-command-universal-server-name-argument -$BFCDj$N%5!<%P$KBP$7$F!"B3$/%3%^%s%I$rH/9T$7$^$9(B(@code{riece-command-universal-server-name-argument}) -@end table - -@node Add-ons, , Connecting to multiple servers, Advanced usage -@section Add-ons - -Riece $B$G$O!";(B?$J5!G=$rA*BrE*$KMxMQ$G$-$k$h$&!"%"%I%*%s$H8F$P$l$k5!9=(B -$B$rMQ0U$7$F$$$^$9!#%"%I%*%s$ODL>o$N(B elisp $B%b%8%e!<%k$r3HD%$7$?$b$N$G!"(B -$B0BA4$JuBV$,$"$j$^$9!#(B - -@table @asis -@item unloaded -$BFI$_9~$_A0!#%"%I%*%s$N(B elisp $B%b%8%e!<%k$,FI$_9~$^$l$F$$$J$$>uBV(B - -@item insinuated -$BAH$_9~$_:Q$_!#%"%I%*%s$N(B elisp $B%b%8%e!<%k$,FI$_9~$^$l!"=i4|2==hM}$,40N;$7$?>uBV(B - -@item enabled -$BM-8z!#%"%I%*%s$,F0:nCf(B - -@item disabled -$BL58z!#%"%I%*%s$NF0:n$,Dd;_Cf(B - -@end table - -@menu -* Add-on browser:: $B%"%I%*%s$N0lMwI=<((B -* Available add-ons:: $BI8=`E:IU$N%"%I%*%s$N>R2p(B -@end menu - -@node Add-on browser, Available add-ons, Add-ons, Add-ons -@subsection Add-on browser - -Riece $B$NF0:nCf$K%"%I%*%s$N0lMw$rD/$a$k$K$O%"%I%*%s%V%i%&%6$r;H$&$HJXMx$G$9!#(B -$B%3%^%s%I%P%C%U%!$G(B @kbd{C-c ^} $B$H$9$k$H!"uBV$rI=$o$7$F$$$^$9!#(B@samp{+} $B$OAH9~$^(B -$B$l$FM-8z$J%"%I%*%s!"6uGr$O%m!<%I$5$l$F$$$J$$%"%I%*%s$G$9!#(B - -$B$3$3$G!"(Briece-button $B$rL58z$K$7$?$$>l9g!";M9TL\$N@hF,$G(B @kbd{-} $B$H$7$^(B -$B$9!#$9$k$H!"@hF,$N%^!<%/$,(B @samp{+} $B$+$i(B @samp{-} $B$KJQ2=$7$^$9!#(B - -@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 - -$B$5$i$K!"(B@samp{u} $B$H$9$k$H!"(Briece-button $B$r%"%I%*%s$N@_Dj$+$i=|30$7$^$9!#(B -$B$5$i$K!"(B@samp{U} $B$H$9$k$H!"(Briece-button $B$r40A4$K%"%s%m!<%I$7$^$9!#(B - -$B$3$N>uBV$G!"(B@samp{s} $B$^$?$O(B @samp{M-x riece-command-save-variables} $B$H(B -$B$9$k$H!"@_Dj$rJ]B8$7$^$9!#(B - -@file{~/.riece/init} $B$G%"%I%*%s$rAH$_9~$`$K$O(B @code{riece-addons} $B$r@_(B -$BDj$7$^$9!#$?$H$($P(B @samp{riece-alias} $B$rAH$_9~$`>l9g$K$O!"0J2<$N$h$&$K(B -$B5-=R$7$^$9!#(B -@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 - -$BMxMQ2DG=$J%"%I%*%s$O$d%K%C%/%M!<%`$NJLL>$rDj5A(B -@item riece-async -Emacs $B$,(B busy or suspend $B>uBV$K$J$k$3$H$KHw$(!"(B -PING $B$K1~Ez$9$k(B local proxy $B7PM3$G(B IRC $B%5!<%P$K@\B3(B -@item riece-biff -$BB>$N%P%C%U%!$K$$$k;~$KH/8@$,$"$k$H%b!<%I%i%$%s$K0u(B ("[R]") $B$rI=<((B -@item riece-button -$B%\%?%s$d%]%C%W%"%C%W%a%K%e!<$NI=<((B -@item riece-ctcp -CTCP (Client To Client Protocol) -@item riece-ctlseq -$B%3%s%H%m!<%k%7!<%1%s%9(B (^B $B$J$I(B) $B$K$h$k6/D4I=<((B -@item riece-doctor -doctor.el $B$HO"7H$7$F@:?@2J0e$K$J$j$9$^$9(B -@item riece-epg -EasyPG @uref{http://www.easypg.org} $B$K$h$k2qOC$N0E9f2=(B -@item riece-eval-ruby -$BF~NO$5$l$?J8;zNs$r(B Ruby $B$N<0$H$7$FI>2A(B -@item riece-eval -$BF~NO$5$l$?J8;zNs$r(B Emacs Lisp $B$N<0$H$7$FI>2A(B -@item riece-foolproof -$B%A%c%s%M%k%_%9$rKI$0(B -@item riece-google -$B%-!<%o!<%I$r(B Google $B$G8!:w(B -@item riece-guess -$B?'!9$JJ}K!$G0\F0@h$N%A%c%s%M%k$r?dB,(B -@item reice-hangman -$B%A%c%s%M%kFb$G(B hangman $B$GM7$V(B -@item riece-highlight -$B%P%C%U%!$N?'IU$1(B -@item riece-history -$B%A%c%s%M%k0\F0$NMzNr4IM}(B -@item riece-icon -$B%P%C%U%!Cf$K%"%$%3%s$rI=<((B -@item riece-ignore -$B;XDj$7$?%f!<%6$NH/8@$rL5;k(B -@item riece-kakasi -$BF|K\8l$NDL$i$J$$CAw(B -(Emacs 22 $B$G$N$_F0:n(B) -@item riece-rdcc -DCC (Direct Client to Client protocol) $B$K$h$k%U%!%$%kE>Aw(B -@item riece-shrink-buffer -$B%a%b%j3NJ]$N$?$a!"%P%C%U%!$rDj4|E*$K@Z$j5M$a$k(B -@item riece-skk-kakutei -SKK $B;HMQ;~$KJQ49%b!<%I$N0u$rH/8@$+$iO$G$O!"$h$/J9$+$l$kR2p$7$^$9!#(B - -@section $BD>A0$KA*Br$7$F$$$?%A%c%s%M%k$K0\F0$7$?$$(B -@vindex riece-guess-channel-try-functions - -$B0J2<$N9T$r(B @file{~/.riece/init} $B$KDI2C$9$k$3$H$G!"(B@kbd{C-c g} $B$GMzNr$rC)(B -$B$j$D$D0\F0$G$-$^$9!#(B@samp{riece-guess} $B%"%I%*%s$O!"%A%c%s%M%kA*Br$NMzNr(B -$B$dL$FI%a%C%;!<%8$NM-L5$J$I$+$i~$rM^@)$7$?$$(B - -@code{riece-addons} $B$+$iAu>~$N$?$a$N%"%I%*%s$r=|30$7$^$9!#(B -$BDL>oM-8z$K$J$C$F$$$kAu>~$N$?$a$N%"%I%*%s$Ol9g!"$=$N%A%c%s%M%k$,(B 3 $BHVL\$N0LCV$K3dEv$F$i$l$^$9!#(B - -@section $B5/F0;~$K<+F0E*$K%A%c%s%M%k$K;22C$7$?$$(B -@vindex riece-startup-channel-list - -$BJQ?t(B @samp{riece-startup-channel-list} $B$r@_Dj$7$^$9!#(B - -@example -(setq riece-startup-channel-list - '("#Riece" "#public")) -@end example - -$B$3$N@_DjNc$O!"(B@samp{#Riece} $B$H(B @samp{#public} $B$K;22C$9$k$3$H$r0UL#$7$F$$(B -$B$^$9!#%A%c%s%M%k$K;22C$9$k:]$K%Q%9%o!<%I$,I,MW$J>l9g$K$Ol9g$K$O!"0J2<$N9T$r(B -@file{~/.riece/init} $B$KDI2C$7$^$9!#(B - -@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 $B2qOC$N%m%0$r%U%!%$%k$KJ]B8$7$?$$(B -@vindex riece-log-directory-map - -@samp{riece-log} $B%"%I%*%s$r;H$&$H!"2qOC$N%m%0$r%U%!%$%k$KJ]B8$7!":F5/F0(B -$B;~$K;2>H$G$-$^$9!#(B@samp{riece-log} $B%"%I%*%s$OI8=`$GAH$_9~$^$l$F$$$^$9!#(B - -$BDL>o$O(B @file{~/.riece/log} $B$N2<$K(B IRC $B%5!<%P$NL>A0!"%A%c%s%M%kL>$N%G%#%l(B -$B%/%j$,:n@.$5$l!"$=$NCf$KF|$K$AKh$KJ,JL$5$l$FJ]B8$5$l$^$9!#(B - -$B%G%#%l%/%H%jL>$,J8;z2=$1$9$k>l9g$K$O!"(B -@code{file-name-coding-system} $B$NCM$rE,@Z$K@_Dj$9$k$+!"$"$k$$$O(B -@code{riece-log-directory-map} $B$r;H$C$F%A%c%s%M%kL>$r(B US-ASCII $BJ8;zNs$K(B -$BJQ49$9$kI,MW$,$"$j$^$9!#(B - -@example -(setq riece-log-directory-map '(("#$B$j!<$9(B" . "riece"))) -@end example - -@section $B%&%#%s%I%&4V$r<+M3$K0\F0$7$?$$(B - -GNU Emacs $B$KImB0$N(B @samp{windmove.el} $B$r;H$&$HJXMx$G$9!#>\:Y$O(B -@samp{windmove.el} $B$N%3%a%s%H$r;2>H$/$@$5$$!#(B@samp{windmove.el} $B$O(B -$B:n -\let\ptexhat=^ -\let\ptexi=\i -\let\ptexindent=\indent -\let\ptexinsert=\insert -\let\ptexlbrace=\{ -\let\ptexless=< -\let\ptexnewwrite\newwrite -\let\ptexnoindent=\noindent -\let\ptexplus=+ -\let\ptexrbrace=\} -\let\ptexslash=\/ -\let\ptexstar=\* -\let\ptext=\t - -% If this character appears in an error message or help string, it -% starts a new line in the output. -\newlinechar = `^^J - -% Use TeX 3.0's \inputlineno to get the line number, for better error -% messages, but if we're using an old version of TeX, don't do anything. -% -\ifx\inputlineno\thisisundefined - \let\linenumber = \empty % Pre-3.0. -\else - \def\linenumber{l.\the\inputlineno:\space} -\fi - -% Set up fixed words for English if not already set. -\ifx\putwordAppendix\undefined \gdef\putwordAppendix{Appendix}\fi -\ifx\putwordChapter\undefined \gdef\putwordChapter{Chapter}\fi -\ifx\putwordfile\undefined \gdef\putwordfile{file}\fi -\ifx\putwordin\undefined \gdef\putwordin{in}\fi -\ifx\putwordIndexIsEmpty\undefined \gdef\putwordIndexIsEmpty{(Index is empty)}\fi -\ifx\putwordIndexNonexistent\undefined \gdef\putwordIndexNonexistent{(Index is nonexistent)}\fi -\ifx\putwordInfo\undefined \gdef\putwordInfo{Info}\fi -\ifx\putwordInstanceVariableof\undefined \gdef\putwordInstanceVariableof{Instance Variable of}\fi -\ifx\putwordMethodon\undefined \gdef\putwordMethodon{Method on}\fi -\ifx\putwordNoTitle\undefined \gdef\putwordNoTitle{No Title}\fi -\ifx\putwordof\undefined \gdef\putwordof{of}\fi -\ifx\putwordon\undefined \gdef\putwordon{on}\fi -\ifx\putwordpage\undefined \gdef\putwordpage{page}\fi -\ifx\putwordsection\undefined \gdef\putwordsection{section}\fi -\ifx\putwordSection\undefined \gdef\putwordSection{Section}\fi -\ifx\putwordsee\undefined \gdef\putwordsee{see}\fi -\ifx\putwordSee\undefined \gdef\putwordSee{See}\fi -\ifx\putwordShortTOC\undefined \gdef\putwordShortTOC{Short Contents}\fi -\ifx\putwordTOC\undefined \gdef\putwordTOC{Table of Contents}\fi -% -\ifx\putwordMJan\undefined \gdef\putwordMJan{January}\fi -\ifx\putwordMFeb\undefined \gdef\putwordMFeb{February}\fi -\ifx\putwordMMar\undefined \gdef\putwordMMar{March}\fi -\ifx\putwordMApr\undefined \gdef\putwordMApr{April}\fi -\ifx\putwordMMay\undefined \gdef\putwordMMay{May}\fi -\ifx\putwordMJun\undefined \gdef\putwordMJun{June}\fi -\ifx\putwordMJul\undefined \gdef\putwordMJul{July}\fi -\ifx\putwordMAug\undefined \gdef\putwordMAug{August}\fi -\ifx\putwordMSep\undefined \gdef\putwordMSep{September}\fi -\ifx\putwordMOct\undefined \gdef\putwordMOct{October}\fi -\ifx\putwordMNov\undefined \gdef\putwordMNov{November}\fi -\ifx\putwordMDec\undefined \gdef\putwordMDec{December}\fi -% -\ifx\putwordDefmac\undefined \gdef\putwordDefmac{Macro}\fi -\ifx\putwordDefspec\undefined \gdef\putwordDefspec{Special Form}\fi -\ifx\putwordDefvar\undefined \gdef\putwordDefvar{Variable}\fi -\ifx\putwordDefopt\undefined \gdef\putwordDefopt{User Option}\fi -\ifx\putwordDeffunc\undefined \gdef\putwordDeffunc{Function}\fi - -% In some macros, we cannot use the `\? notation---the left quote is -% in some cases the escape char. -\chardef\backChar = `\\ -\chardef\colonChar = `\: -\chardef\commaChar = `\, -\chardef\dotChar = `\. -\chardef\exclamChar= `\! -\chardef\plusChar = `\+ -\chardef\questChar = `\? -\chardef\semiChar = `\; -\chardef\underChar = `\_ - -\chardef\spaceChar = `\ % -\chardef\spacecat = 10 -\def\spaceisspace{\catcode\spaceChar=\spacecat} - -{% for help with debugging. - % example usage: \expandafter\show\activebackslash - \catcode`\! = 0 \catcode`\\ = \active - !global!def!activebackslash{\} -} - -% Ignore a token. -% -\def\gobble#1{} - -% The following is used inside several \edef's. -\def\makecsname#1{\expandafter\noexpand\csname#1\endcsname} - -% Hyphenation fixes. -\hyphenation{ - Flor-i-da Ghost-script Ghost-view Mac-OS Post-Script - ap-pen-dix bit-map bit-maps - data-base data-bases eshell fall-ing half-way long-est man-u-script - man-u-scripts mini-buf-fer mini-buf-fers over-view par-a-digm - par-a-digms rath-er rec-tan-gu-lar ro-bot-ics se-vere-ly set-up spa-ces - spell-ing spell-ings - stand-alone strong-est time-stamp time-stamps which-ever white-space - wide-spread wrap-around -} - -% Margin to add to right of even pages, to left of odd pages. -\newdimen\bindingoffset -\newdimen\normaloffset -\newdimen\pagewidth \newdimen\pageheight - -% For a final copy, take out the rectangles -% that mark overfull boxes (in case you have decided -% that the text looks ok even though it passes the margin). -% -\def\finalout{\overfullrule=0pt} - -% @| inserts a changebar to the left of the current line. It should -% surround any changed text. This approach does *not* work if the -% change spans more than two lines of output. To handle that, we would -% have adopt a much more difficult approach (putting marks into the main -% vertical list for the beginning and end of each change). -% -\def\|{% - % \vadjust can only be used in horizontal mode. - \leavevmode - % - % Append this vertical mode material after the current line in the output. - \vadjust{% - % We want to insert a rule with the height and depth of the current - % leading; that is exactly what \strutbox is supposed to record. - \vskip-\baselineskip - % - % \vadjust-items are inserted at the left edge of the type. So - % the \llap here moves out into the left-hand margin. - \llap{% - % - % For a thicker or thinner bar, change the `1pt'. - \vrule height\baselineskip width1pt - % - % This is the space between the bar and the text. - \hskip 12pt - }% - }% -} - -% Sometimes it is convenient to have everything in the transcript file -% and nothing on the terminal. We don't just call \tracingall here, -% since that produces some useless output on the terminal. We also make -% some effort to order the tracing commands to reduce output in the log -% file; cf. trace.sty in LaTeX. -% -\def\gloggingall{\begingroup \globaldefs = 1 \loggingall \endgroup}% -\def\loggingall{% - \tracingstats2 - \tracingpages1 - \tracinglostchars2 % 2 gives us more in etex - \tracingparagraphs1 - \tracingoutput1 - \tracingmacros2 - \tracingrestores1 - \showboxbreadth\maxdimen \showboxdepth\maxdimen - \ifx\eTeXversion\undefined\else % etex gives us more logging - \tracingscantokens1 - \tracingifs1 - \tracinggroups1 - \tracingnesting2 - \tracingassigns1 - \fi - \tracingcommands3 % 3 gives us more in etex - \errorcontextlines16 -}% - -% add check for \lastpenalty to plain's definitions. If the last thing -% we did was a \nobreak, we don't want to insert more space. -% -\def\smallbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\smallskipamount - \removelastskip\penalty-50\smallskip\fi\fi} -\def\medbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\medskipamount - \removelastskip\penalty-100\medskip\fi\fi} -\def\bigbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\bigskipamount - \removelastskip\penalty-200\bigskip\fi\fi} - -% For @cropmarks command. -% Do @cropmarks to get crop marks. -% -\newif\ifcropmarks -\let\cropmarks = \cropmarkstrue -% -% Dimensions to add cropmarks at corners. -% Added by P. A. MacKay, 12 Nov. 1986 -% -\newdimen\outerhsize \newdimen\outervsize % set by the paper size routines -\newdimen\cornerlong \cornerlong=1pc -\newdimen\cornerthick \cornerthick=.3pt -\newdimen\topandbottommargin \topandbottommargin=.75in - -% Main output routine. -\chardef\PAGE = 255 -\output = {\onepageout{\pagecontents\PAGE}} - -\newbox\headlinebox -\newbox\footlinebox - -% \onepageout takes a vbox as an argument. Note that \pagecontents -% does insertions, but you have to call it yourself. -\def\onepageout#1{% - \ifcropmarks \hoffset=0pt \else \hoffset=\normaloffset \fi - % - \ifodd\pageno \advance\hoffset by \bindingoffset - \else \advance\hoffset by -\bindingoffset\fi - % - % Do this outside of the \shipout so @code etc. will be expanded in - % the headline as they should be, not taken literally (outputting ''code). - \setbox\headlinebox = \vbox{\let\hsize=\pagewidth \makeheadline}% - \setbox\footlinebox = \vbox{\let\hsize=\pagewidth \makefootline}% - % - {% - % Have to do this stuff outside the \shipout because we want it to - % take effect in \write's, yet the group defined by the \vbox ends - % before the \shipout runs. - % - \indexdummies % don't expand commands in the output. - \shipout\vbox{% - % Do this early so pdf references go to the beginning of the page. - \ifpdfmakepagedest \pdfdest name{\the\pageno} xyz\fi - % - \ifcropmarks \vbox to \outervsize\bgroup - \hsize = \outerhsize - \vskip-\topandbottommargin - \vtop to0pt{% - \line{\ewtop\hfil\ewtop}% - \nointerlineskip - \line{% - \vbox{\moveleft\cornerthick\nstop}% - \hfill - \vbox{\moveright\cornerthick\nstop}% - }% - \vss}% - \vskip\topandbottommargin - \line\bgroup - \hfil % center the page within the outer (page) hsize. - \ifodd\pageno\hskip\bindingoffset\fi - \vbox\bgroup - \fi - % - \unvbox\headlinebox - \pagebody{#1}% - \ifdim\ht\footlinebox > 0pt - % Only leave this space if the footline is nonempty. - % (We lessened \vsize for it in \oddfootingxxx.) - % The \baselineskip=24pt in plain's \makefootline has no effect. - \vskip 2\baselineskip - \unvbox\footlinebox - \fi - % - \ifcropmarks - \egroup % end of \vbox\bgroup - \hfil\egroup % end of (centering) \line\bgroup - \vskip\topandbottommargin plus1fill minus1fill - \boxmaxdepth = \cornerthick - \vbox to0pt{\vss - \line{% - \vbox{\moveleft\cornerthick\nsbot}% - \hfill - \vbox{\moveright\cornerthick\nsbot}% - }% - \nointerlineskip - \line{\ewbot\hfil\ewbot}% - }% - \egroup % \vbox from first cropmarks clause - \fi - }% end of \shipout\vbox - }% end of group with \indexdummies - \advancepageno - \ifnum\outputpenalty>-20000 \else\dosupereject\fi -} - -\newinsert\margin \dimen\margin=\maxdimen - -\def\pagebody#1{\vbox to\pageheight{\boxmaxdepth=\maxdepth #1}} -{\catcode`\@ =11 -\gdef\pagecontents#1{\ifvoid\topins\else\unvbox\topins\fi -% marginal hacks, juha@viisa.uucp (Juha Takala) -\ifvoid\margin\else % marginal info is present - \rlap{\kern\hsize\vbox to\z@{\kern1pt\box\margin \vss}}\fi -\dimen@=\dp#1 \unvbox#1 -\ifvoid\footins\else\vskip\skip\footins\footnoterule \unvbox\footins\fi -\ifr@ggedbottom \kern-\dimen@ \vfil \fi} -} - -% Here are the rules for the cropmarks. Note that they are -% offset so that the space between them is truly \outerhsize or \outervsize -% (P. A. MacKay, 12 November, 1986) -% -\def\ewtop{\vrule height\cornerthick depth0pt width\cornerlong} -\def\nstop{\vbox - {\hrule height\cornerthick depth\cornerlong width\cornerthick}} -\def\ewbot{\vrule height0pt depth\cornerthick width\cornerlong} -\def\nsbot{\vbox - {\hrule height\cornerlong depth\cornerthick width\cornerthick}} - -% Parse an argument, then pass it to #1. The argument is the rest of -% the input line (except we remove a trailing comment). #1 should be a -% macro which expects an ordinary undelimited TeX argument. -% -\def\parsearg{\parseargusing{}} -\def\parseargusing#1#2{% - \def\next{#2}% - \begingroup - \obeylines - \spaceisspace - #1% - \parseargline\empty% Insert the \empty token, see \finishparsearg below. -} - -{\obeylines % - \gdef\parseargline#1^^M{% - \endgroup % End of the group started in \parsearg. - \argremovecomment #1\comment\ArgTerm% - }% -} - -% First remove any @comment, then any @c comment. -\def\argremovecomment#1\comment#2\ArgTerm{\argremovec #1\c\ArgTerm} -\def\argremovec#1\c#2\ArgTerm{\argcheckspaces#1\^^M\ArgTerm} - -% Each occurence of `\^^M' or `\^^M' is replaced by a single space. -% -% \argremovec might leave us with trailing space, e.g., -% @end itemize @c foo -% This space token undergoes the same procedure and is eventually removed -% by \finishparsearg. -% -\def\argcheckspaces#1\^^M{\argcheckspacesX#1\^^M \^^M} -\def\argcheckspacesX#1 \^^M{\argcheckspacesY#1\^^M} -\def\argcheckspacesY#1\^^M#2\^^M#3\ArgTerm{% - \def\temp{#3}% - \ifx\temp\empty - % We cannot use \next here, as it holds the macro to run; - % thus we reuse \temp. - \let\temp\finishparsearg - \else - \let\temp\argcheckspaces - \fi - % Put the space token in: - \temp#1 #3\ArgTerm -} - -% If a _delimited_ argument is enclosed in braces, they get stripped; so -% to get _exactly_ the rest of the line, we had to prevent such situation. -% We prepended an \empty token at the very beginning and we expand it now, -% just before passing the control to \next. -% (Similarily, we have to think about #3 of \argcheckspacesY above: it is -% either the null string, or it ends with \^^M---thus there is no danger -% that a pair of braces would be stripped. -% -% But first, we have to remove the trailing space token. -% -\def\finishparsearg#1 \ArgTerm{\expandafter\next\expandafter{#1}} - -% \parseargdef\foo{...} -% is roughly equivalent to -% \def\foo{\parsearg\Xfoo} -% \def\Xfoo#1{...} -% -% Actually, I use \csname\string\foo\endcsname, ie. \\foo, as it is my -% favourite TeX trick. --kasal, 16nov03 - -\def\parseargdef#1{% - \expandafter \doparseargdef \csname\string#1\endcsname #1% -} -\def\doparseargdef#1#2{% - \def#2{\parsearg#1}% - \def#1##1% -} - -% Several utility definitions with active space: -{ - \obeyspaces - \gdef\obeyedspace{ } - - % Make each space character in the input produce a normal interword - % space in the output. Don't allow a line break at this space, as this - % is used only in environments like @example, where each line of input - % should produce a line of output anyway. - % - \gdef\sepspaces{\obeyspaces\let =\tie} - - % If an index command is used in an @example environment, any spaces - % therein should become regular spaces in the raw index file, not the - % expansion of \tie (\leavevmode \penalty \@M \ ). - \gdef\unsepspaces{\let =\space} -} - - -\def\flushcr{\ifx\par\lisppar \def\next##1{}\else \let\next=\relax \fi \next} - -% Define the framework for environments in texinfo.tex. It's used like this: -% -% \envdef\foo{...} -% \def\Efoo{...} -% -% It's the responsibility of \envdef to insert \begingroup before the -% actual body; @end closes the group after calling \Efoo. \envdef also -% defines \thisenv, so the current environment is known; @end checks -% whether the environment name matches. The \checkenv macro can also be -% used to check whether the current environment is the one expected. -% -% Non-false conditionals (@iftex, @ifset) don't fit into this, so they -% are not treated as enviroments; they don't open a group. (The -% implementation of @end takes care not to call \endgroup in this -% special case.) - - -% At runtime, environments start with this: -\def\startenvironment#1{\begingroup\def\thisenv{#1}} -% initialize -\let\thisenv\empty - -% ... but they get defined via ``\envdef\foo{...}'': -\long\def\envdef#1#2{\def#1{\startenvironment#1#2}} -\def\envparseargdef#1#2{\parseargdef#1{\startenvironment#1#2}} - -% Check whether we're in the right environment: -\def\checkenv#1{% - \def\temp{#1}% - \ifx\thisenv\temp - \else - \badenverr - \fi -} - -% Evironment mismatch, #1 expected: -\def\badenverr{% - \errhelp = \EMsimple - \errmessage{This command can appear only \inenvironment\temp, - not \inenvironment\thisenv}% -} -\def\inenvironment#1{% - \ifx#1\empty - out of any environment% - \else - in environment \expandafter\string#1% - \fi -} - -% @end foo executes the definition of \Efoo. -% But first, it executes a specialized version of \checkenv -% -\parseargdef\end{% - \if 1\csname iscond.#1\endcsname - \else - % The general wording of \badenverr may not be ideal, but... --kasal, 06nov03 - \expandafter\checkenv\csname#1\endcsname - \csname E#1\endcsname - \endgroup - \fi -} - -\newhelp\EMsimple{Press RETURN to continue.} - - -%% Simple single-character @ commands - -% @@ prints an @ -% Kludge this until the fonts are right (grr). -\def\@{{\tt\char64}} - -% This is turned off because it was never documented -% and you can use @w{...} around a quote to suppress ligatures. -%% Define @` and @' to be the same as ` and ' -%% but suppressing ligatures. -%\def\`{{`}} -%\def\'{{'}} - -% Used to generate quoted braces. -\def\mylbrace {{\tt\char123}} -\def\myrbrace {{\tt\char125}} -\let\{=\mylbrace -\let\}=\myrbrace -\begingroup - % Definitions to produce \{ and \} commands for indices, - % and @{ and @} for the aux/toc files. - \catcode`\{ = \other \catcode`\} = \other - \catcode`\[ = 1 \catcode`\] = 2 - \catcode`\! = 0 \catcode`\\ = \other - !gdef!lbracecmd[\{]% - !gdef!rbracecmd[\}]% - !gdef!lbraceatcmd[@{]% - !gdef!rbraceatcmd[@}]% -!endgroup - -% @comma{} to avoid , parsing problems. -\let\comma = , - -% Accents: @, @dotaccent @ringaccent @ubaraccent @udotaccent -% Others are defined by plain TeX: @` @' @" @^ @~ @= @u @v @H. -\let\, = \c -\let\dotaccent = \. -\def\ringaccent#1{{\accent23 #1}} -\let\tieaccent = \t -\let\ubaraccent = \b -\let\udotaccent = \d - -% Other special characters: @questiondown @exclamdown @ordf @ordm -% Plain TeX defines: @AA @AE @O @OE @L (plus lowercase versions) @ss. -\def\questiondown{?`} -\def\exclamdown{!`} -\def\ordf{\leavevmode\raise1ex\hbox{\selectfonts\lllsize \underbar{a}}} -\def\ordm{\leavevmode\raise1ex\hbox{\selectfonts\lllsize \underbar{o}}} - -% Dotless i and dotless j, used for accents. -\def\imacro{i} -\def\jmacro{j} -\def\dotless#1{% - \def\temp{#1}% - \ifx\temp\imacro \ptexi - \else\ifx\temp\jmacro \j - \else \errmessage{@dotless can be used only with i or j}% - \fi\fi -} - -% The \TeX{} logo, as in plain, but resetting the spacing so that a -% period following counts as ending a sentence. (Idea found in latex.) -% -\edef\TeX{\TeX \spacefactor=1000 } - -% @LaTeX{} logo. Not quite the same results as the definition in -% latex.ltx, since we use a different font for the raised A; it's most -% convenient for us to use an explicitly smaller font, rather than using -% the \scriptstyle font (since we don't reset \scriptstyle and -% \scriptscriptstyle). -% -\def\LaTeX{% - L\kern-.36em - {\setbox0=\hbox{T}% - \vbox to \ht0{\hbox{\selectfonts\lllsize A}\vss}}% - \kern-.15em - \TeX -} - -% Be sure we're in horizontal mode when doing a tie, since we make space -% equivalent to this in @example-like environments. Otherwise, a space -% at the beginning of a line will start with \penalty -- and -% since \penalty is valid in vertical mode, we'd end up putting the -% penalty on the vertical list instead of in the new paragraph. -{\catcode`@ = 11 - % Avoid using \@M directly, because that causes trouble - % if the definition is written into an index file. - \global\let\tiepenalty = \@M - \gdef\tie{\leavevmode\penalty\tiepenalty\ } -} - -% @: forces normal size whitespace following. -\def\:{\spacefactor=1000 } - -% @* forces a line break. -\def\*{\hfil\break\hbox{}\ignorespaces} - -% @/ allows a line break. -\let\/=\allowbreak - -% @. is an end-of-sentence period. -\def\.{.\spacefactor=\endofsentencespacefactor\space} - -% @! is an end-of-sentence bang. -\def\!{!\spacefactor=\endofsentencespacefactor\space} - -% @? is an end-of-sentence query. -\def\?{?\spacefactor=\endofsentencespacefactor\space} - -% @frenchspacing on|off says whether to put extra space after punctuation. -% -\def\onword{on} -\def\offword{off} -% -\parseargdef\frenchspacing{% - \def\temp{#1}% - \ifx\temp\onword \plainfrenchspacing - \else\ifx\temp\offword \plainnonfrenchspacing - \else - \errhelp = \EMsimple - \errmessage{Unknown @frenchspacing option `\temp', must be on/off}% - \fi\fi -} - -% @w prevents a word break. Without the \leavevmode, @w at the -% beginning of a paragraph, when TeX is still in vertical mode, would -% produce a whole line of output instead of starting the paragraph. -\def\w#1{\leavevmode\hbox{#1}} - -% @group ... @end group forces ... to be all on one page, by enclosing -% it in a TeX vbox. We use \vtop instead of \vbox to construct the box -% to keep its height that of a normal line. According to the rules for -% \topskip (p.114 of the TeXbook), the glue inserted is -% max (\topskip - \ht (first item), 0). If that height is large, -% therefore, no glue is inserted, and the space between the headline and -% the text is small, which looks bad. -% -% Another complication is that the group might be very large. This can -% cause the glue on the previous page to be unduly stretched, because it -% does not have much material. In this case, it's better to add an -% explicit \vfill so that the extra space is at the bottom. The -% threshold for doing this is if the group is more than \vfilllimit -% percent of a page (\vfilllimit can be changed inside of @tex). -% -\newbox\groupbox -\def\vfilllimit{0.7} -% -\envdef\group{% - \ifnum\catcode`\^^M=\active \else - \errhelp = \groupinvalidhelp - \errmessage{@group invalid in context where filling is enabled}% - \fi - \startsavinginserts - % - \setbox\groupbox = \vtop\bgroup - % Do @comment since we are called inside an environment such as - % @example, where each end-of-line in the input causes an - % end-of-line in the output. We don't want the end-of-line after - % the `@group' to put extra space in the output. Since @group - % should appear on a line by itself (according to the Texinfo - % manual), we don't worry about eating any user text. - \comment -} -% -% The \vtop produces a box with normal height and large depth; thus, TeX puts -% \baselineskip glue before it, and (when the next line of text is done) -% \lineskip glue after it. Thus, space below is not quite equal to space -% above. But it's pretty close. -\def\Egroup{% - % To get correct interline space between the last line of the group - % and the first line afterwards, we have to propagate \prevdepth. - \endgraf % Not \par, as it may have been set to \lisppar. - \global\dimen1 = \prevdepth - \egroup % End the \vtop. - % \dimen0 is the vertical size of the group's box. - \dimen0 = \ht\groupbox \advance\dimen0 by \dp\groupbox - % \dimen2 is how much space is left on the page (more or less). - \dimen2 = \pageheight \advance\dimen2 by -\pagetotal - % if the group doesn't fit on the current page, and it's a big big - % group, force a page break. - \ifdim \dimen0 > \dimen2 - \ifdim \pagetotal < \vfilllimit\pageheight - \page - \fi - \fi - \box\groupbox - \prevdepth = \dimen1 - \checkinserts -} -% -% TeX puts in an \escapechar (i.e., `@') at the beginning of the help -% message, so this ends up printing `@group can only ...'. -% -\newhelp\groupinvalidhelp{% -group can only be used in environments such as @example,^^J% -where each line of input produces a line of output.} - -% @need space-in-mils -% forces a page break if there is not space-in-mils remaining. - -\newdimen\mil \mil=0.001in - -% Old definition--didn't work. -%\parseargdef\need{\par % -%% This method tries to make TeX break the page naturally -%% if the depth of the box does not fit. -%{\baselineskip=0pt% -%\vtop to #1\mil{\vfil}\kern -#1\mil\nobreak -%\prevdepth=-1000pt -%}} - -\parseargdef\need{% - % Ensure vertical mode, so we don't make a big box in the middle of a - % paragraph. - \par - % - % If the @need value is less than one line space, it's useless. - \dimen0 = #1\mil - \dimen2 = \ht\strutbox - \advance\dimen2 by \dp\strutbox - \ifdim\dimen0 > \dimen2 - % - % Do a \strut just to make the height of this box be normal, so the - % normal leading is inserted relative to the preceding line. - % And a page break here is fine. - \vtop to #1\mil{\strut\vfil}% - % - % TeX does not even consider page breaks if a penalty added to the - % main vertical list is 10000 or more. But in order to see if the - % empty box we just added fits on the page, we must make it consider - % page breaks. On the other hand, we don't want to actually break the - % page after the empty box. So we use a penalty of 9999. - % - % There is an extremely small chance that TeX will actually break the - % page at this \penalty, if there are no other feasible breakpoints in - % sight. (If the user is using lots of big @group commands, which - % almost-but-not-quite fill up a page, TeX will have a hard time doing - % good page breaking, for example.) However, I could not construct an - % example where a page broke at this \penalty; if it happens in a real - % document, then we can reconsider our strategy. - \penalty9999 - % - % Back up by the size of the box, whether we did a page break or not. - \kern -#1\mil - % - % Do not allow a page break right after this kern. - \nobreak - \fi -} - -% @br forces paragraph break (and is undocumented). - -\let\br = \par - -% @page forces the start of a new page. -% -\def\page{\par\vfill\supereject} - -% @exdent text.... -% outputs text on separate line in roman font, starting at standard page margin - -% This records the amount of indent in the innermost environment. -% That's how much \exdent should take out. -\newskip\exdentamount - -% This defn is used inside fill environments such as @defun. -\parseargdef\exdent{\hfil\break\hbox{\kern -\exdentamount{\rm#1}}\hfil\break} - -% This defn is used inside nofill environments such as @example. -\parseargdef\nofillexdent{{\advance \leftskip by -\exdentamount - \leftline{\hskip\leftskip{\rm#1}}}} - -% @inmargin{WHICH}{TEXT} puts TEXT in the WHICH margin next to the current -% paragraph. For more general purposes, use the \margin insertion -% class. WHICH is `l' or `r'. -% -\newskip\inmarginspacing \inmarginspacing=1cm -\def\strutdepth{\dp\strutbox} -% -\def\doinmargin#1#2{\strut\vadjust{% - \nobreak - \kern-\strutdepth - \vtop to \strutdepth{% - \baselineskip=\strutdepth - \vss - % if you have multiple lines of stuff to put here, you'll need to - % make the vbox yourself of the appropriate size. - \ifx#1l% - \llap{\ignorespaces #2\hskip\inmarginspacing}% - \else - \rlap{\hskip\hsize \hskip\inmarginspacing \ignorespaces #2}% - \fi - \null - }% -}} -\def\inleftmargin{\doinmargin l} -\def\inrightmargin{\doinmargin r} -% -% @inmargin{TEXT [, RIGHT-TEXT]} -% (if RIGHT-TEXT is given, use TEXT for left page, RIGHT-TEXT for right; -% else use TEXT for both). -% -\def\inmargin#1{\parseinmargin #1,,\finish} -\def\parseinmargin#1,#2,#3\finish{% not perfect, but better than nothing. - \setbox0 = \hbox{\ignorespaces #2}% - \ifdim\wd0 > 0pt - \def\lefttext{#1}% have both texts - \def\righttext{#2}% - \else - \def\lefttext{#1}% have only one text - \def\righttext{#1}% - \fi - % - \ifodd\pageno - \def\temp{\inrightmargin\righttext}% odd page -> outside is right margin - \else - \def\temp{\inleftmargin\lefttext}% - \fi - \temp -} - -% @include file insert text of that file as input. -% -\def\include{\parseargusing\filenamecatcodes\includezzz} -\def\includezzz#1{% - \pushthisfilestack - \def\thisfile{#1}% - {% - \makevalueexpandable - \def\temp{\input #1 }% - \expandafter - }\temp - \popthisfilestack -} -\def\filenamecatcodes{% - \catcode`\\=\other - \catcode`~=\other - \catcode`^=\other - \catcode`_=\other - \catcode`|=\other - \catcode`<=\other - \catcode`>=\other - \catcode`+=\other - \catcode`-=\other -} - -\def\pushthisfilestack{% - \expandafter\pushthisfilestackX\popthisfilestack\StackTerm -} -\def\pushthisfilestackX{% - \expandafter\pushthisfilestackY\thisfile\StackTerm -} -\def\pushthisfilestackY #1\StackTerm #2\StackTerm {% - \gdef\popthisfilestack{\gdef\thisfile{#1}\gdef\popthisfilestack{#2}}% -} - -\def\popthisfilestack{\errthisfilestackempty} -\def\errthisfilestackempty{\errmessage{Internal error: - the stack of filenames is empty.}} - -\def\thisfile{} - -% @center line -% outputs that line, centered. -% -\parseargdef\center{% - \ifhmode - \let\next\centerH - \else - \let\next\centerV - \fi - \next{\hfil \ignorespaces#1\unskip \hfil}% -} -\def\centerH#1{% - {% - \hfil\break - \advance\hsize by -\leftskip - \advance\hsize by -\rightskip - \line{#1}% - \break - }% -} -\def\centerV#1{\line{\kern\leftskip #1\kern\rightskip}} - -% @sp n outputs n lines of vertical space - -\parseargdef\sp{\vskip #1\baselineskip} - -% @comment ...line which is ignored... -% @c is the same as @comment -% @ignore ... @end ignore is another way to write a comment - -\def\comment{\begingroup \catcode`\^^M=\other% -\catcode`\@=\other \catcode`\{=\other \catcode`\}=\other% -\commentxxx} -{\catcode`\^^M=\other \gdef\commentxxx#1^^M{\endgroup}} - -\let\c=\comment - -% @paragraphindent NCHARS -% We'll use ems for NCHARS, close enough. -% NCHARS can also be the word `asis' or `none'. -% We cannot feasibly implement @paragraphindent asis, though. -% -\def\asisword{asis} % no translation, these are keywords -\def\noneword{none} -% -\parseargdef\paragraphindent{% - \def\temp{#1}% - \ifx\temp\asisword - \else - \ifx\temp\noneword - \defaultparindent = 0pt - \else - \defaultparindent = #1em - \fi - \fi - \parindent = \defaultparindent -} - -% @exampleindent NCHARS -% We'll use ems for NCHARS like @paragraphindent. -% It seems @exampleindent asis isn't necessary, but -% I preserve it to make it similar to @paragraphindent. -\parseargdef\exampleindent{% - \def\temp{#1}% - \ifx\temp\asisword - \else - \ifx\temp\noneword - \lispnarrowing = 0pt - \else - \lispnarrowing = #1em - \fi - \fi -} - -% @firstparagraphindent WORD -% If WORD is `none', then suppress indentation of the first paragraph -% after a section heading. If WORD is `insert', then do indent at such -% paragraphs. -% -% The paragraph indentation is suppressed or not by calling -% \suppressfirstparagraphindent, which the sectioning commands do. -% We switch the definition of this back and forth according to WORD. -% By default, we suppress indentation. -% -\def\suppressfirstparagraphindent{\dosuppressfirstparagraphindent} -\def\insertword{insert} -% -\parseargdef\firstparagraphindent{% - \def\temp{#1}% - \ifx\temp\noneword - \let\suppressfirstparagraphindent = \dosuppressfirstparagraphindent - \else\ifx\temp\insertword - \let\suppressfirstparagraphindent = \relax - \else - \errhelp = \EMsimple - \errmessage{Unknown @firstparagraphindent option `\temp'}% - \fi\fi -} - -% Here is how we actually suppress indentation. Redefine \everypar to -% \kern backwards by \parindent, and then reset itself to empty. -% -% We also make \indent itself not actually do anything until the next -% paragraph. -% -\gdef\dosuppressfirstparagraphindent{% - \gdef\indent{% - \restorefirstparagraphindent - \indent - }% - \gdef\noindent{% - \restorefirstparagraphindent - \noindent - }% - \global\everypar = {% - \kern -\parindent - \restorefirstparagraphindent - }% -} - -\gdef\restorefirstparagraphindent{% - \global \let \indent = \ptexindent - \global \let \noindent = \ptexnoindent - \global \everypar = {}% -} - - -% @asis just yields its argument. Used with @table, for example. -% -\def\asis#1{#1} - -% @math outputs its argument in math mode. -% -% One complication: _ usually means subscripts, but it could also mean -% an actual _ character, as in @math{@var{some_variable} + 1}. So make -% _ active, and distinguish by seeing if the current family is \slfam, -% which is what @var uses. -{ - \catcode\underChar = \active - \gdef\mathunderscore{% - \catcode\underChar=\active - \def_{\ifnum\fam=\slfam \_\else\sb\fi}% - } -} -% Another complication: we want \\ (and @\) to output a \ character. -% FYI, plain.tex uses \\ as a temporary control sequence (why?), but -% this is not advertised and we don't care. Texinfo does not -% otherwise define @\. -% -% The \mathchar is class=0=ordinary, family=7=ttfam, position=5C=\. -\def\mathbackslash{\ifnum\fam=\ttfam \mathchar"075C \else\backslash \fi} -% -\def\math{% - \tex - \mathunderscore - \let\\ = \mathbackslash - \mathactive - $\finishmath -} -\def\finishmath#1{#1$\endgroup} % Close the group opened by \tex. - -% Some active characters (such as <) are spaced differently in math. -% We have to reset their definitions in case the @math was an argument -% to a command which sets the catcodes (such as @item or @section). -% -{ - \catcode`^ = \active - \catcode`< = \active - \catcode`> = \active - \catcode`+ = \active - \gdef\mathactive{% - \let^ = \ptexhat - \let< = \ptexless - \let> = \ptexgtr - \let+ = \ptexplus - } -} - -% @bullet and @minus need the same treatment as @math, just above. -\def\bullet{$\ptexbullet$} -\def\minus{$-$} - -% @dots{} outputs an ellipsis using the current font. -% We do .5em per period so that it has the same spacing in a typewriter -% font as three actual period characters. -% -\def\dots{% - \leavevmode - \hbox to 1.5em{% - \hskip 0pt plus 0.25fil - .\hfil.\hfil.% - \hskip 0pt plus 0.5fil - }% -} - -% @enddots{} is an end-of-sentence ellipsis. -% -\def\enddots{% - \dots - \spacefactor=\endofsentencespacefactor -} - -% @comma{} is so commas can be inserted into text without messing up -% Texinfo's parsing. -% -\let\comma = , - -% @refill is a no-op. -\let\refill=\relax - -% If working on a large document in chapters, it is convenient to -% be able to disable indexing, cross-referencing, and contents, for test runs. -% This is done with @novalidate (before @setfilename). -% -\newif\iflinks \linkstrue % by default we want the aux files. -\let\novalidate = \linksfalse - -% @setfilename is done at the beginning of every texinfo file. -% So open here the files we need to have open while reading the input. -% This makes it possible to make a .fmt file for texinfo. -\def\setfilename{% - \fixbackslash % Turn off hack to swallow `\input texinfo'. - \iflinks - \tryauxfile - % Open the new aux file. TeX will close it automatically at exit. - \immediate\openout\auxfile=\jobname.aux - \fi % \openindices needs to do some work in any case. - \openindices - \let\setfilename=\comment % Ignore extra @setfilename cmds. - % - % If texinfo.cnf is present on the system, read it. - % Useful for site-wide @afourpaper, etc. - \openin 1 texinfo.cnf - \ifeof 1 \else \input texinfo.cnf \fi - \closein 1 - % - \comment % Ignore the actual filename. -} - -% Called from \setfilename. -% -\def\openindices{% - \newindex{cp}% - \newcodeindex{fn}% - \newcodeindex{vr}% - \newcodeindex{tp}% - \newcodeindex{ky}% - \newcodeindex{pg}% -} - -% @bye. -\outer\def\bye{\pagealignmacro\tracingstats=1\ptexend} - - -\message{pdf,} -% adobe `portable' document format -\newcount\tempnum -\newcount\lnkcount -\newtoks\filename -\newcount\filenamelength -\newcount\pgn -\newtoks\toksA -\newtoks\toksB -\newtoks\toksC -\newtoks\toksD -\newbox\boxA -\newcount\countA -\newif\ifpdf -\newif\ifpdfmakepagedest - -% when pdftex is run in dvi mode, \pdfoutput is defined (so \pdfoutput=1 -% can be set). So we test for \relax and 0 as well as \undefined, -% borrowed from ifpdf.sty. -\ifx\pdfoutput\undefined -\else - \ifx\pdfoutput\relax - \else - \ifcase\pdfoutput - \else - \pdftrue - \fi - \fi -\fi - -% PDF uses PostScript string constants for the names of xref targets, to -% for display in the outlines, and in other places. Thus, we have to -% double any backslashes. Otherwise, a name like "\node" will be -% interpreted as a newline (\n), followed by o, d, e. Not good. -% http://www.ntg.nl/pipermail/ntg-pdftex/2004-July/000654.html -% (and related messages, the final outcome is that it is up to the TeX -% user to double the backslashes and otherwise make the string valid, so -% that's we do). - -% double active backslashes. -% -{\catcode`\@=0 \catcode`\\=\active - @gdef@activebackslash{@catcode`@\=@active @otherbackslash} - @gdef@activebackslashdouble{% - @catcode@backChar=@active - @let\=@doublebackslash} -} - -% To handle parens, we must adopt a different approach, since parens are -% not active characters. hyperref.dtx (which has the same problem as -% us) handles it with this amazing macro to replace tokens. I've -% tinkered with it a little for texinfo, but it's definitely from there. -% -% #1 is the tokens to replace. -% #2 is the replacement. -% #3 is the control sequence with the string. -% -\def\HyPsdSubst#1#2#3{% - \def\HyPsdReplace##1#1##2\END{% - ##1% - \ifx\\##2\\% - \else - #2% - \HyReturnAfterFi{% - \HyPsdReplace##2\END - }% - \fi - }% - \xdef#3{\expandafter\HyPsdReplace#3#1\END}% -} -\long\def\HyReturnAfterFi#1\fi{\fi#1} - -% #1 is a control sequence in which to do the replacements. -\def\backslashparens#1{% - \xdef#1{#1}% redefine it as its expansion; the definition is simply - % \lastnode when called from \setref -> \pdfmkdest. - \HyPsdSubst{(}{\backslashlparen}{#1}% - \HyPsdSubst{)}{\backslashrparen}{#1}% -} - -{\catcode\exclamChar = 0 \catcode\backChar = \other - !gdef!backslashlparen{\(}% - !gdef!backslashrparen{\)}% -} - -\ifpdf - \input pdfcolor - \pdfcatalog{/PageMode /UseOutlines}% - \def\dopdfimage#1#2#3{% - \def\imagewidth{#2}% - \def\imageheight{#3}% - % without \immediate, pdftex seg faults when the same image is - % included twice. (Version 3.14159-pre-1.0-unofficial-20010704.) - \ifnum\pdftexversion < 14 - \immediate\pdfimage - \else - \immediate\pdfximage - \fi - \ifx\empty\imagewidth\else width \imagewidth \fi - \ifx\empty\imageheight\else height \imageheight \fi - \ifnum\pdftexversion<13 - #1.pdf% - \else - {#1.pdf}% - \fi - \ifnum\pdftexversion < 14 \else - \pdfrefximage \pdflastximage - \fi} - \def\pdfmkdest#1{{% - % We have to set dummies so commands such as @code, and characters - % such as \, aren't expanded when present in a section title. - \atdummies - \activebackslashdouble - \def\pdfdestname{#1}% - \backslashparens\pdfdestname - \pdfdest name{\pdfdestname} xyz% - }}% - % - % used to mark target names; must be expandable. - \def\pdfmkpgn#1{#1}% - % - \let\linkcolor = \Blue % was Cyan, but that seems light? - \def\endlink{\Black\pdfendlink} - % Adding outlines to PDF; macros for calculating structure of outlines - % come from Petr Olsak - \def\expnumber#1{\expandafter\ifx\csname#1\endcsname\relax 0% - \else \csname#1\endcsname \fi} - \def\advancenumber#1{\tempnum=\expnumber{#1}\relax - \advance\tempnum by 1 - \expandafter\xdef\csname#1\endcsname{\the\tempnum}} - % - % #1 is the section text, which is what will be displayed in the - % outline by the pdf viewer. #2 is the pdf expression for the number - % of subentries (or empty, for subsubsections). #3 is the node text, - % which might be empty if this toc entry had no corresponding node. - % #4 is the page number - % - \def\dopdfoutline#1#2#3#4{% - % Generate a link to the node text if that exists; else, use the - % page number. We could generate a destination for the section - % text in the case where a section has no node, but it doesn't - % seem worth the trouble, since most documents are normally structured. - \def\pdfoutlinedest{#3}% - \ifx\pdfoutlinedest\empty - \def\pdfoutlinedest{#4}% - \else - % Doubled backslashes in the name. - {\activebackslashdouble \xdef\pdfoutlinedest{#3}% - \backslashparens\pdfoutlinedest}% - \fi - % - % Also double the backslashes in the display string. - {\activebackslashdouble \xdef\pdfoutlinetext{#1}% - \backslashparens\pdfoutlinetext}% - % - \pdfoutline goto name{\pdfmkpgn{\pdfoutlinedest}}#2{\pdfoutlinetext}% - } - % - \def\pdfmakeoutlines{% - \begingroup - % Thanh's hack / proper braces in bookmarks - \edef\mylbrace{\iftrue \string{\else}\fi}\let\{=\mylbrace - \edef\myrbrace{\iffalse{\else\string}\fi}\let\}=\myrbrace - % - % Read toc silently, to get counts of subentries for \pdfoutline. - \def\numchapentry##1##2##3##4{% - \def\thischapnum{##2}% - \def\thissecnum{0}% - \def\thissubsecnum{0}% - }% - \def\numsecentry##1##2##3##4{% - \advancenumber{chap\thischapnum}% - \def\thissecnum{##2}% - \def\thissubsecnum{0}% - }% - \def\numsubsecentry##1##2##3##4{% - \advancenumber{sec\thissecnum}% - \def\thissubsecnum{##2}% - }% - \def\numsubsubsecentry##1##2##3##4{% - \advancenumber{subsec\thissubsecnum}% - }% - \def\thischapnum{0}% - \def\thissecnum{0}% - \def\thissubsecnum{0}% - % - % use \def rather than \let here because we redefine \chapentry et - % al. a second time, below. - \def\appentry{\numchapentry}% - \def\appsecentry{\numsecentry}% - \def\appsubsecentry{\numsubsecentry}% - \def\appsubsubsecentry{\numsubsubsecentry}% - \def\unnchapentry{\numchapentry}% - \def\unnsecentry{\numsecentry}% - \def\unnsubsecentry{\numsubsecentry}% - \def\unnsubsubsecentry{\numsubsubsecentry}% - \readdatafile{toc}% - % - % Read toc second time, this time actually producing the outlines. - % The `-' means take the \expnumber as the absolute number of - % subentries, which we calculated on our first read of the .toc above. - % - % We use the node names as the destinations. - \def\numchapentry##1##2##3##4{% - \dopdfoutline{##1}{count-\expnumber{chap##2}}{##3}{##4}}% - \def\numsecentry##1##2##3##4{% - \dopdfoutline{##1}{count-\expnumber{sec##2}}{##3}{##4}}% - \def\numsubsecentry##1##2##3##4{% - \dopdfoutline{##1}{count-\expnumber{subsec##2}}{##3}{##4}}% - \def\numsubsubsecentry##1##2##3##4{% count is always zero - \dopdfoutline{##1}{}{##3}{##4}}% - % - % PDF outlines are displayed using system fonts, instead of - % document fonts. Therefore we cannot use special characters, - % since the encoding is unknown. For example, the eogonek from - % Latin 2 (0xea) gets translated to a | character. Info from - % Staszek Wawrykiewicz, 19 Jan 2004 04:09:24 +0100. - % - % xx to do this right, we have to translate 8-bit characters to - % their "best" equivalent, based on the @documentencoding. Right - % now, I guess we'll just let the pdf reader have its way. - \indexnofonts - \setupdatafile - \activebackslash - \input \jobname.toc - \endgroup - } - % - \def\skipspaces#1{\def\PP{#1}\def\D{|}% - \ifx\PP\D\let\nextsp\relax - \else\let\nextsp\skipspaces - \ifx\p\space\else\addtokens{\filename}{\PP}% - \advance\filenamelength by 1 - \fi - \fi - \nextsp} - \def\getfilename#1{\filenamelength=0\expandafter\skipspaces#1|\relax} - \ifnum\pdftexversion < 14 - \let \startlink \pdfannotlink - \else - \let \startlink \pdfstartlink - \fi - \def\pdfurl#1{% - \begingroup - \normalturnoffactive\def\@{@}% - \makevalueexpandable - \leavevmode\Red - \startlink attr{/Border [0 0 0]}% - user{/Subtype /Link /A << /S /URI /URI (#1) >>}% - \endgroup} - \def\pdfgettoks#1.{\setbox\boxA=\hbox{\toksA={#1.}\toksB={}\maketoks}} - \def\addtokens#1#2{\edef\addtoks{\noexpand#1={\the#1#2}}\addtoks} - \def\adn#1{\addtokens{\toksC}{#1}\global\countA=1\let\next=\maketoks} - \def\poptoks#1#2|ENDTOKS|{\let\first=#1\toksD={#1}\toksA={#2}} - \def\maketoks{% - \expandafter\poptoks\the\toksA|ENDTOKS|\relax - \ifx\first0\adn0 - \else\ifx\first1\adn1 \else\ifx\first2\adn2 \else\ifx\first3\adn3 - \else\ifx\first4\adn4 \else\ifx\first5\adn5 \else\ifx\first6\adn6 - \else\ifx\first7\adn7 \else\ifx\first8\adn8 \else\ifx\first9\adn9 - \else - \ifnum0=\countA\else\makelink\fi - \ifx\first.\let\next=\done\else - \let\next=\maketoks - \addtokens{\toksB}{\the\toksD} - \ifx\first,\addtokens{\toksB}{\space}\fi - \fi - \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi - \next} - \def\makelink{\addtokens{\toksB}% - {\noexpand\pdflink{\the\toksC}}\toksC={}\global\countA=0} - \def\pdflink#1{% - \startlink attr{/Border [0 0 0]} goto name{\pdfmkpgn{#1}} - \linkcolor #1\endlink} - \def\done{\edef\st{\global\noexpand\toksA={\the\toksB}}\st} -\else - \let\pdfmkdest = \gobble - \let\pdfurl = \gobble - \let\endlink = \relax - \let\linkcolor = \relax - \let\pdfmakeoutlines = \relax -\fi % \ifx\pdfoutput - - -\message{fonts,} - -% Change the current font style to #1, remembering it in \curfontstyle. -% For now, we do not accumulate font styles: @b{@i{foo}} prints foo in -% italics, not bold italics. -% -\def\setfontstyle#1{% - \def\curfontstyle{#1}% not as a control sequence, because we are \edef'd. - \csname ten#1\endcsname % change the current font -} - -% Select #1 fonts with the current style. -% -\def\selectfonts#1{\csname #1fonts\endcsname \csname\curfontstyle\endcsname} - -\def\rm{\fam=0 \setfontstyle{rm}} -\def\it{\fam=\itfam \setfontstyle{it}} -\def\sl{\fam=\slfam \setfontstyle{sl}} -\def\bf{\fam=\bffam \setfontstyle{bf}}\def\bfstylename{bf} -\def\tt{\fam=\ttfam \setfontstyle{tt}} - -% Texinfo sort of supports the sans serif font style, which plain TeX does not. -% So we set up a \sf. -\newfam\sffam -\def\sf{\fam=\sffam \setfontstyle{sf}} -\let\li = \sf % Sometimes we call it \li, not \sf. - -% We don't need math for this font style. -\def\ttsl{\setfontstyle{ttsl}} - -% Default leading. -\newdimen\textleading \textleading = 13.2pt - -% Set the baselineskip to #1, and the lineskip and strut size -% correspondingly. There is no deep meaning behind these magic numbers -% used as factors; they just match (closely enough) what Knuth defined. -% -\def\lineskipfactor{.08333} -\def\strutheightpercent{.70833} -\def\strutdepthpercent {.29167} -% -\def\setleading#1{% - \normalbaselineskip = #1\relax - \normallineskip = \lineskipfactor\normalbaselineskip - \normalbaselines - \setbox\strutbox =\hbox{% - \vrule width0pt height\strutheightpercent\baselineskip - depth \strutdepthpercent \baselineskip - }% -} - -% Set the font macro #1 to the font named #2, adding on the -% specified font prefix (normally `cm'). -% #3 is the font's design size, #4 is a scale factor -\def\setfont#1#2#3#4{\font#1=\fontprefix#2#3 scaled #4} - -% Use cm as the default font prefix. -% To specify the font prefix, you must define \fontprefix -% before you read in texinfo.tex. -\ifx\fontprefix\undefined -\def\fontprefix{cm} -\fi -% Support font families that don't use the same naming scheme as CM. -\def\rmshape{r} -\def\rmbshape{bx} %where the normal face is bold -\def\bfshape{b} -\def\bxshape{bx} -\def\ttshape{tt} -\def\ttbshape{tt} -\def\ttslshape{sltt} -\def\itshape{ti} -\def\itbshape{bxti} -\def\slshape{sl} -\def\slbshape{bxsl} -\def\sfshape{ss} -\def\sfbshape{ss} -\def\scshape{csc} -\def\scbshape{csc} - -% Text fonts (11.2pt, magstep1). -\def\textnominalsize{11pt} -\edef\mainmagstep{\magstephalf} -\setfont\textrm\rmshape{10}{\mainmagstep} -\setfont\texttt\ttshape{10}{\mainmagstep} -\setfont\textbf\bfshape{10}{\mainmagstep} -\setfont\textit\itshape{10}{\mainmagstep} -\setfont\textsl\slshape{10}{\mainmagstep} -\setfont\textsf\sfshape{10}{\mainmagstep} -\setfont\textsc\scshape{10}{\mainmagstep} -\setfont\textttsl\ttslshape{10}{\mainmagstep} -\font\texti=cmmi10 scaled \mainmagstep -\font\textsy=cmsy10 scaled \mainmagstep - -% A few fonts for @defun names and args. -\setfont\defbf\bfshape{10}{\magstep1} -\setfont\deftt\ttshape{10}{\magstep1} -\setfont\defttsl\ttslshape{10}{\magstep1} -\def\df{\let\tentt=\deftt \let\tenbf = \defbf \let\tenttsl=\defttsl \bf} - -% Fonts for indices, footnotes, small examples (9pt). -\def\smallnominalsize{9pt} -\setfont\smallrm\rmshape{9}{1000} -\setfont\smalltt\ttshape{9}{1000} -\setfont\smallbf\bfshape{10}{900} -\setfont\smallit\itshape{9}{1000} -\setfont\smallsl\slshape{9}{1000} -\setfont\smallsf\sfshape{9}{1000} -\setfont\smallsc\scshape{10}{900} -\setfont\smallttsl\ttslshape{10}{900} -\font\smalli=cmmi9 -\font\smallsy=cmsy9 - -% Fonts for small examples (8pt). -\def\smallernominalsize{8pt} -\setfont\smallerrm\rmshape{8}{1000} -\setfont\smallertt\ttshape{8}{1000} -\setfont\smallerbf\bfshape{10}{800} -\setfont\smallerit\itshape{8}{1000} -\setfont\smallersl\slshape{8}{1000} -\setfont\smallersf\sfshape{8}{1000} -\setfont\smallersc\scshape{10}{800} -\setfont\smallerttsl\ttslshape{10}{800} -\font\smalleri=cmmi8 -\font\smallersy=cmsy8 - -% Fonts for title page (20.4pt): -\def\titlenominalsize{20pt} -\setfont\titlerm\rmbshape{12}{\magstep3} -\setfont\titleit\itbshape{10}{\magstep4} -\setfont\titlesl\slbshape{10}{\magstep4} -\setfont\titlett\ttbshape{12}{\magstep3} -\setfont\titlettsl\ttslshape{10}{\magstep4} -\setfont\titlesf\sfbshape{17}{\magstep1} -\let\titlebf=\titlerm -\setfont\titlesc\scbshape{10}{\magstep4} -\font\titlei=cmmi12 scaled \magstep3 -\font\titlesy=cmsy10 scaled \magstep4 -\def\authorrm{\secrm} -\def\authortt{\sectt} - -% Chapter (and unnumbered) fonts (17.28pt). -\def\chapnominalsize{17pt} -\setfont\chaprm\rmbshape{12}{\magstep2} -\setfont\chapit\itbshape{10}{\magstep3} -\setfont\chapsl\slbshape{10}{\magstep3} -\setfont\chaptt\ttbshape{12}{\magstep2} -\setfont\chapttsl\ttslshape{10}{\magstep3} -\setfont\chapsf\sfbshape{17}{1000} -\let\chapbf=\chaprm -\setfont\chapsc\scbshape{10}{\magstep3} -\font\chapi=cmmi12 scaled \magstep2 -\font\chapsy=cmsy10 scaled \magstep3 - -% Section fonts (14.4pt). -\def\secnominalsize{14pt} -\setfont\secrm\rmbshape{12}{\magstep1} -\setfont\secit\itbshape{10}{\magstep2} -\setfont\secsl\slbshape{10}{\magstep2} -\setfont\sectt\ttbshape{12}{\magstep1} -\setfont\secttsl\ttslshape{10}{\magstep2} -\setfont\secsf\sfbshape{12}{\magstep1} -\let\secbf\secrm -\setfont\secsc\scbshape{10}{\magstep2} -\font\seci=cmmi12 scaled \magstep1 -\font\secsy=cmsy10 scaled \magstep2 - -% Subsection fonts (13.15pt). -\def\ssecnominalsize{13pt} -\setfont\ssecrm\rmbshape{12}{\magstephalf} -\setfont\ssecit\itbshape{10}{1315} -\setfont\ssecsl\slbshape{10}{1315} -\setfont\ssectt\ttbshape{12}{\magstephalf} -\setfont\ssecttsl\ttslshape{10}{1315} -\setfont\ssecsf\sfbshape{12}{\magstephalf} -\let\ssecbf\ssecrm -\setfont\ssecsc\scbshape{10}{1315} -\font\sseci=cmmi12 scaled \magstephalf -\font\ssecsy=cmsy10 scaled 1315 - -% Reduced fonts for @acro in text (10pt). -\def\reducednominalsize{10pt} -\setfont\reducedrm\rmshape{10}{1000} -\setfont\reducedtt\ttshape{10}{1000} -\setfont\reducedbf\bfshape{10}{1000} -\setfont\reducedit\itshape{10}{1000} -\setfont\reducedsl\slshape{10}{1000} -\setfont\reducedsf\sfshape{10}{1000} -\setfont\reducedsc\scshape{10}{1000} -\setfont\reducedttsl\ttslshape{10}{1000} -\font\reducedi=cmmi10 -\font\reducedsy=cmsy10 - -% In order for the font changes to affect most math symbols and letters, -% we have to define the \textfont of the standard families. Since -% texinfo doesn't allow for producing subscripts and superscripts except -% in the main text, we don't bother to reset \scriptfont and -% \scriptscriptfont (which would also require loading a lot more fonts). -% -\def\resetmathfonts{% - \textfont0=\tenrm \textfont1=\teni \textfont2=\tensy - \textfont\itfam=\tenit \textfont\slfam=\tensl \textfont\bffam=\tenbf - \textfont\ttfam=\tentt \textfont\sffam=\tensf -} - -% The font-changing commands redefine the meanings of \tenSTYLE, instead -% of just \STYLE. We do this because \STYLE needs to also set the -% current \fam for math mode. Our \STYLE (e.g., \rm) commands hardwire -% \tenSTYLE to set the current font. -% -% Each font-changing command also sets the names \lsize (one size lower) -% and \lllsize (three sizes lower). These relative commands are used in -% the LaTeX logo and acronyms. -% -% This all needs generalizing, badly. -% -\def\textfonts{% - \let\tenrm=\textrm \let\tenit=\textit \let\tensl=\textsl - \let\tenbf=\textbf \let\tentt=\texttt \let\smallcaps=\textsc - \let\tensf=\textsf \let\teni=\texti \let\tensy=\textsy - \let\tenttsl=\textttsl - \def\curfontsize{text}% - \def\lsize{reduced}\def\lllsize{smaller}% - \resetmathfonts \setleading{\textleading}} -\def\titlefonts{% - \let\tenrm=\titlerm \let\tenit=\titleit \let\tensl=\titlesl - \let\tenbf=\titlebf \let\tentt=\titlett \let\smallcaps=\titlesc - \let\tensf=\titlesf \let\teni=\titlei \let\tensy=\titlesy - \let\tenttsl=\titlettsl - \def\curfontsize{title}% - \def\lsize{chap}\def\lllsize{subsec}% - \resetmathfonts \setleading{25pt}} -\def\titlefont#1{{\titlefonts\rm #1}} -\def\chapfonts{% - \let\tenrm=\chaprm \let\tenit=\chapit \let\tensl=\chapsl - \let\tenbf=\chapbf \let\tentt=\chaptt \let\smallcaps=\chapsc - \let\tensf=\chapsf \let\teni=\chapi \let\tensy=\chapsy - \let\tenttsl=\chapttsl - \def\curfontsize{chap}% - \def\lsize{sec}\def\lllsize{text}% - \resetmathfonts \setleading{19pt}} -\def\secfonts{% - \let\tenrm=\secrm \let\tenit=\secit \let\tensl=\secsl - \let\tenbf=\secbf \let\tentt=\sectt \let\smallcaps=\secsc - \let\tensf=\secsf \let\teni=\seci \let\tensy=\secsy - \let\tenttsl=\secttsl - \def\curfontsize{sec}% - \def\lsize{subsec}\def\lllsize{reduced}% - \resetmathfonts \setleading{16pt}} -\def\subsecfonts{% - \let\tenrm=\ssecrm \let\tenit=\ssecit \let\tensl=\ssecsl - \let\tenbf=\ssecbf \let\tentt=\ssectt \let\smallcaps=\ssecsc - \let\tensf=\ssecsf \let\teni=\sseci \let\tensy=\ssecsy - \let\tenttsl=\ssecttsl - \def\curfontsize{ssec}% - \def\lsize{text}\def\lllsize{small}% - \resetmathfonts \setleading{15pt}} -\let\subsubsecfonts = \subsecfonts -\def\reducedfonts{% - \let\tenrm=\reducedrm \let\tenit=\reducedit \let\tensl=\reducedsl - \let\tenbf=\reducedbf \let\tentt=\reducedtt \let\reducedcaps=\reducedsc - \let\tensf=\reducedsf \let\teni=\reducedi \let\tensy=\reducedsy - \let\tenttsl=\reducedttsl - \def\curfontsize{reduced}% - \def\lsize{small}\def\lllsize{smaller}% - \resetmathfonts \setleading{10.5pt}} -\def\smallfonts{% - \let\tenrm=\smallrm \let\tenit=\smallit \let\tensl=\smallsl - \let\tenbf=\smallbf \let\tentt=\smalltt \let\smallcaps=\smallsc - \let\tensf=\smallsf \let\teni=\smalli \let\tensy=\smallsy - \let\tenttsl=\smallttsl - \def\curfontsize{small}% - \def\lsize{smaller}\def\lllsize{smaller}% - \resetmathfonts \setleading{10.5pt}} -\def\smallerfonts{% - \let\tenrm=\smallerrm \let\tenit=\smallerit \let\tensl=\smallersl - \let\tenbf=\smallerbf \let\tentt=\smallertt \let\smallcaps=\smallersc - \let\tensf=\smallersf \let\teni=\smalleri \let\tensy=\smallersy - \let\tenttsl=\smallerttsl - \def\curfontsize{smaller}% - \def\lsize{smaller}\def\lllsize{smaller}% - \resetmathfonts \setleading{9.5pt}} - -% Set the fonts to use with the @small... environments. -\let\smallexamplefonts = \smallfonts - -% About \smallexamplefonts. If we use \smallfonts (9pt), @smallexample -% can fit this many characters: -% 8.5x11=86 smallbook=72 a4=90 a5=69 -% If we use \scriptfonts (8pt), then we can fit this many characters: -% 8.5x11=90+ smallbook=80 a4=90+ a5=77 -% For me, subjectively, the few extra characters that fit aren't worth -% the additional smallness of 8pt. So I'm making the default 9pt. -% -% By the way, for comparison, here's what fits with @example (10pt): -% 8.5x11=71 smallbook=60 a4=75 a5=58 -% -% I wish the USA used A4 paper. -% --karl, 24jan03. - - -% Set up the default fonts, so we can use them for creating boxes. -% -\textfonts \rm - -% Define these so they can be easily changed for other fonts. -\def\angleleft{$\langle$} -\def\angleright{$\rangle$} - -% Count depth in font-changes, for error checks -\newcount\fontdepth \fontdepth=0 - -% Fonts for short table of contents. -\setfont\shortcontrm\rmshape{12}{1000} -\setfont\shortcontbf\bfshape{10}{\magstep1} % no cmb12 -\setfont\shortcontsl\slshape{12}{1000} -\setfont\shortconttt\ttshape{12}{1000} - -%% Add scribe-like font environments, plus @l for inline lisp (usually sans -%% serif) and @ii for TeX italic - -% \smartitalic{ARG} outputs arg in italics, followed by an italic correction -% unless the following character is such as not to need one. -\def\smartitalicx{\ifx\next,\else\ifx\next-\else\ifx\next.\else - \ptexslash\fi\fi\fi} -\def\smartslanted#1{{\ifusingtt\ttsl\sl #1}\futurelet\next\smartitalicx} -\def\smartitalic#1{{\ifusingtt\ttsl\it #1}\futurelet\next\smartitalicx} - -% like \smartslanted except unconditionally uses \ttsl. -% @var is set to this for defun arguments. -\def\ttslanted#1{{\ttsl #1}\futurelet\next\smartitalicx} - -% like \smartslanted except unconditionally use \sl. We never want -% ttsl for book titles, do we? -\def\cite#1{{\sl #1}\futurelet\next\smartitalicx} - -\let\i=\smartitalic -\let\slanted=\smartslanted -\let\var=\smartslanted -\let\dfn=\smartslanted -\let\emph=\smartitalic - -% @b, explicit bold. -\def\b#1{{\bf #1}} -\let\strong=\b - -% @sansserif, explicit sans. -\def\sansserif#1{{\sf #1}} - -% We can't just use \exhyphenpenalty, because that only has effect at -% the end of a paragraph. Restore normal hyphenation at the end of the -% group within which \nohyphenation is presumably called. -% -\def\nohyphenation{\hyphenchar\font = -1 \aftergroup\restorehyphenation} -\def\restorehyphenation{\hyphenchar\font = `- } - -% Set sfcode to normal for the chars that usually have another value. -% Can't use plain's \frenchspacing because it uses the `\x notation, and -% sometimes \x has an active definition that messes things up. -% -\catcode`@=11 - \def\plainfrenchspacing{% - \sfcode\dotChar =\@m \sfcode\questChar=\@m \sfcode\exclamChar=\@m - \sfcode\colonChar=\@m \sfcode\semiChar =\@m \sfcode\commaChar =\@m - \def\endofsentencespacefactor{1000}% for @. and friends - } - \def\plainnonfrenchspacing{% - \sfcode`\.3000\sfcode`\?3000\sfcode`\!3000 - \sfcode`\:2000\sfcode`\;1500\sfcode`\,1250 - \def\endofsentencespacefactor{3000}% for @. and friends - } -\catcode`@=\other -\def\endofsentencespacefactor{3000}% default - -\def\t#1{% - {\tt \rawbackslash \plainfrenchspacing #1}% - \null -} -\def\samp#1{`\tclose{#1}'\null} -\setfont\keyrm\rmshape{8}{1000} -\font\keysy=cmsy9 -\def\key#1{{\keyrm\textfont2=\keysy \leavevmode\hbox{% - \raise0.4pt\hbox{\angleleft}\kern-.08em\vtop{% - \vbox{\hrule\kern-0.4pt - \hbox{\raise0.4pt\hbox{\vphantom{\angleleft}}#1}}% - \kern-0.4pt\hrule}% - \kern-.06em\raise0.4pt\hbox{\angleright}}}} -% The old definition, with no lozenge: -%\def\key #1{{\ttsl \nohyphenation \uppercase{#1}}\null} -\def\ctrl #1{{\tt \rawbackslash \hat}#1} - -% @file, @option are the same as @samp. -\let\file=\samp -\let\option=\samp - -% @code is a modification of @t, -% which makes spaces the same size as normal in the surrounding text. -\def\tclose#1{% - {% - % Change normal interword space to be same as for the current font. - \spaceskip = \fontdimen2\font - % - % Switch to typewriter. - \tt - % - % But `\ ' produces the large typewriter interword space. - \def\ {{\spaceskip = 0pt{} }}% - % - % Turn off hyphenation. - \nohyphenation - % - \rawbackslash - \plainfrenchspacing - #1% - }% - \null -} - -% We *must* turn on hyphenation at `-' and `_' in @code. -% Otherwise, it is too hard to avoid overfull hboxes -% in the Emacs manual, the Library manual, etc. - -% Unfortunately, TeX uses one parameter (\hyphenchar) to control -% both hyphenation at - and hyphenation within words. -% We must therefore turn them both off (\tclose does that) -% and arrange explicitly to hyphenate at a dash. -% -- rms. -{ - \catcode`\-=\active - \catcode`\_=\active - % - \global\def\code{\begingroup - \catcode`\-=\active \catcode`\_=\active - \ifallowcodebreaks - \let-\codedash - \let_\codeunder - \else - \let-\realdash - \let_\realunder - \fi - \codex - } -} - -\def\realdash{-} -\def\codedash{-\discretionary{}{}{}} -\def\codeunder{% - % this is all so @math{@code{var_name}+1} can work. In math mode, _ - % is "active" (mathcode"8000) and \normalunderscore (or \char95, etc.) - % will therefore expand the active definition of _, which is us - % (inside @code that is), therefore an endless loop. - \ifusingtt{\ifmmode - \mathchar"075F % class 0=ordinary, family 7=ttfam, pos 0x5F=_. - \else\normalunderscore \fi - \discretionary{}{}{}}% - {\_}% -} -\def\codex #1{\tclose{#1}\endgroup} - -% An additional complication: the above will allow breaks after, e.g., -% each of the four underscores in __typeof__. This is undesirable in -% some manuals, especially if they don't have long identifiers in -% general. @allowcodebreaks provides a way to control this. -% -\newif\ifallowcodebreaks \allowcodebreakstrue - -\def\keywordtrue{true} -\def\keywordfalse{false} - -\parseargdef\allowcodebreaks{% - \def\txiarg{#1}% - \ifx\txiarg\keywordtrue - \allowcodebreakstrue - \else\ifx\txiarg\keywordfalse - \allowcodebreaksfalse - \else - \errhelp = \EMsimple - \errmessage{Unknown @allowcodebreaks option `\txiarg'}% - \fi\fi -} - -% @kbd is like @code, except that if the argument is just one @key command, -% then @kbd has no effect. - -% @kbdinputstyle -- arg is `distinct' (@kbd uses slanted tty font always), -% `example' (@kbd uses ttsl only inside of @example and friends), -% or `code' (@kbd uses normal tty font always). -\parseargdef\kbdinputstyle{% - \def\txiarg{#1}% - \ifx\txiarg\worddistinct - \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\ttsl}% - \else\ifx\txiarg\wordexample - \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\tt}% - \else\ifx\txiarg\wordcode - \gdef\kbdexamplefont{\tt}\gdef\kbdfont{\tt}% - \else - \errhelp = \EMsimple - \errmessage{Unknown @kbdinputstyle option `\txiarg'}% - \fi\fi\fi -} -\def\worddistinct{distinct} -\def\wordexample{example} -\def\wordcode{code} - -% Default is `distinct.' -\kbdinputstyle distinct - -\def\xkey{\key} -\def\kbdfoo#1#2#3\par{\def\one{#1}\def\three{#3}\def\threex{??}% -\ifx\one\xkey\ifx\threex\three \key{#2}% -\else{\tclose{\kbdfont\look}}\fi -\else{\tclose{\kbdfont\look}}\fi} - -% For @indicateurl, @env, @command quotes seem unnecessary, so use \code. -\let\indicateurl=\code -\let\env=\code -\let\command=\code - -% @uref (abbreviation for `urlref') takes an optional (comma-separated) -% second argument specifying the text to display and an optional third -% arg as text to display instead of (rather than in addition to) the url -% itself. First (mandatory) arg is the url. Perhaps eventually put in -% a hypertex \special here. -% -\def\uref#1{\douref #1,,,\finish} -\def\douref#1,#2,#3,#4\finish{\begingroup - \unsepspaces - \pdfurl{#1}% - \setbox0 = \hbox{\ignorespaces #3}% - \ifdim\wd0 > 0pt - \unhbox0 % third arg given, show only that - \else - \setbox0 = \hbox{\ignorespaces #2}% - \ifdim\wd0 > 0pt - \ifpdf - \unhbox0 % PDF: 2nd arg given, show only it - \else - \unhbox0\ (\code{#1})% DVI: 2nd arg given, show both it and url - \fi - \else - \code{#1}% only url given, so show it - \fi - \fi - \endlink -\endgroup} - -% @url synonym for @uref, since that's how everyone uses it. -% -\let\url=\uref - -% rms does not like angle brackets --karl, 17may97. -% So now @email is just like @uref, unless we are pdf. -% -%\def\email#1{\angleleft{\tt #1}\angleright} -\ifpdf - \def\email#1{\doemail#1,,\finish} - \def\doemail#1,#2,#3\finish{\begingroup - \unsepspaces - \pdfurl{mailto:#1}% - \setbox0 = \hbox{\ignorespaces #2}% - \ifdim\wd0>0pt\unhbox0\else\code{#1}\fi - \endlink - \endgroup} -\else - \let\email=\uref -\fi - -% Check if we are currently using a typewriter font. Since all the -% Computer Modern typewriter fonts have zero interword stretch (and -% shrink), and it is reasonable to expect all typewriter fonts to have -% this property, we can check that font parameter. -% -\def\ifmonospace{\ifdim\fontdimen3\font=0pt } - -% Typeset a dimension, e.g., `in' or `pt'. The only reason for the -% argument is to make the input look right: @dmn{pt} instead of @dmn{}pt. -% -\def\dmn#1{\thinspace #1} - -\def\kbd#1{\def\look{#1}\expandafter\kbdfoo\look??\par} - -% @l was never documented to mean ``switch to the Lisp font'', -% and it is not used as such in any manual I can find. We need it for -% Polish suppressed-l. --karl, 22sep96. -%\def\l#1{{\li #1}\null} - -% Explicit font changes: @r, @sc, undocumented @ii. -\def\r#1{{\rm #1}} % roman font -\def\sc#1{{\smallcaps#1}} % smallcaps font -\def\ii#1{{\it #1}} % italic font - -% @acronym for "FBI", "NATO", and the like. -% We print this one point size smaller, since it's intended for -% all-uppercase. -% -\def\acronym#1{\doacronym #1,,\finish} -\def\doacronym#1,#2,#3\finish{% - {\selectfonts\lsize #1}% - \def\temp{#2}% - \ifx\temp\empty \else - \space ({\unsepspaces \ignorespaces \temp \unskip})% - \fi -} - -% @abbr for "Comput. J." and the like. -% No font change, but don't do end-of-sentence spacing. -% -\def\abbr#1{\doabbr #1,,\finish} -\def\doabbr#1,#2,#3\finish{% - {\plainfrenchspacing #1}% - \def\temp{#2}% - \ifx\temp\empty \else - \space ({\unsepspaces \ignorespaces \temp \unskip})% - \fi -} - -% @pounds{} is a sterling sign, which Knuth put in the CM italic font. -% -\def\pounds{{\it\$}} - -% @euro{} comes from a separate font, depending on the current style. -% We use the free feym* fonts from the eurosym package by Henrik -% Theiling, which support regular, slanted, bold and bold slanted (and -% "outlined" (blackboard board, sort of) versions, which we don't need). -% It is available from http://www.ctan.org/tex-archive/fonts/eurosym. -% -% Although only regular is the truly official Euro symbol, we ignore -% that. The Euro is designed to be slightly taller than the regular -% font height. -% -% feymr - regular -% feymo - slanted -% feybr - bold -% feybo - bold slanted -% -% There is no good (free) typewriter version, to my knowledge. -% A feymr10 euro is ~7.3pt wide, while a normal cmtt10 char is ~5.25pt wide. -% Hmm. -% -% Also doesn't work in math. Do we need to do math with euro symbols? -% Hope not. -% -% -\def\euro{{\eurofont e}} -\def\eurofont{% - % We set the font at each command, rather than predefining it in - % \textfonts and the other font-switching commands, so that - % installations which never need the symbol don't have to have the - % font installed. - % - % There is only one designed size (nominal 10pt), so we always scale - % that to the current nominal size. - % - % By the way, simply using "at 1em" works for cmr10 and the like, but - % does not work for cmbx10 and other extended/shrunken fonts. - % - \def\eurosize{\csname\curfontsize nominalsize\endcsname}% - % - \ifx\curfontstyle\bfstylename - % bold: - \font\thiseurofont = \ifusingit{feybo10}{feybr10} at \eurosize - \else - % regular: - \font\thiseurofont = \ifusingit{feymo10}{feymr10} at \eurosize - \fi - \thiseurofont -} - -% @registeredsymbol - R in a circle. The font for the R should really -% be smaller yet, but lllsize is the best we can do for now. -% Adapted from the plain.tex definition of \copyright. -% -\def\registeredsymbol{% - $^{{\ooalign{\hfil\raise.07ex\hbox{\selectfonts\lllsize R}% - \hfil\crcr\Orb}}% - }$% -} - -% Laurent Siebenmann reports \Orb undefined with: -% Textures 1.7.7 (preloaded format=plain 93.10.14) (68K) 16 APR 2004 02:38 -% so we'll define it if necessary. -% -\ifx\Orb\undefined -\def\Orb{\mathhexbox20D} -\fi - - -\message{page headings,} - -\newskip\titlepagetopglue \titlepagetopglue = 1.5in -\newskip\titlepagebottomglue \titlepagebottomglue = 2pc - -% First the title page. Must do @settitle before @titlepage. -\newif\ifseenauthor -\newif\iffinishedtitlepage - -% Do an implicit @contents or @shortcontents after @end titlepage if the -% user says @setcontentsaftertitlepage or @setshortcontentsaftertitlepage. -% -\newif\ifsetcontentsaftertitlepage - \let\setcontentsaftertitlepage = \setcontentsaftertitlepagetrue -\newif\ifsetshortcontentsaftertitlepage - \let\setshortcontentsaftertitlepage = \setshortcontentsaftertitlepagetrue - -\parseargdef\shorttitlepage{\begingroup\hbox{}\vskip 1.5in \chaprm \centerline{#1}% - \endgroup\page\hbox{}\page} - -\envdef\titlepage{% - % Open one extra group, as we want to close it in the middle of \Etitlepage. - \begingroup - \parindent=0pt \textfonts - % Leave some space at the very top of the page. - \vglue\titlepagetopglue - % No rule at page bottom unless we print one at the top with @title. - \finishedtitlepagetrue - % - % Most title ``pages'' are actually two pages long, with space - % at the top of the second. We don't want the ragged left on the second. - \let\oldpage = \page - \def\page{% - \iffinishedtitlepage\else - \finishtitlepage - \fi - \let\page = \oldpage - \page - \null - }% -} - -\def\Etitlepage{% - \iffinishedtitlepage\else - \finishtitlepage - \fi - % It is important to do the page break before ending the group, - % because the headline and footline are only empty inside the group. - % If we use the new definition of \page, we always get a blank page - % after the title page, which we certainly don't want. - \oldpage - \endgroup - % - % Need this before the \...aftertitlepage checks so that if they are - % in effect the toc pages will come out with page numbers. - \HEADINGSon - % - % If they want short, they certainly want long too. - \ifsetshortcontentsaftertitlepage - \shortcontents - \contents - \global\let\shortcontents = \relax - \global\let\contents = \relax - \fi - % - \ifsetcontentsaftertitlepage - \contents - \global\let\contents = \relax - \global\let\shortcontents = \relax - \fi -} - -\def\finishtitlepage{% - \vskip4pt \hrule height 2pt width \hsize - \vskip\titlepagebottomglue - \finishedtitlepagetrue -} - -%%% Macros to be used within @titlepage: - -\let\subtitlerm=\tenrm -\def\subtitlefont{\subtitlerm \normalbaselineskip = 13pt \normalbaselines} - -\def\authorfont{\authorrm \normalbaselineskip = 16pt \normalbaselines - \let\tt=\authortt} - -\parseargdef\title{% - \checkenv\titlepage - \leftline{\titlefonts\rm #1} - % print a rule at the page bottom also. - \finishedtitlepagefalse - \vskip4pt \hrule height 4pt width \hsize \vskip4pt -} - -\parseargdef\subtitle{% - \checkenv\titlepage - {\subtitlefont \rightline{#1}}% -} - -% @author should come last, but may come many times. -% It can also be used inside @quotation. -% -\parseargdef\author{% - \def\temp{\quotation}% - \ifx\thisenv\temp - \def\quotationauthor{#1}% printed in \Equotation. - \else - \checkenv\titlepage - \ifseenauthor\else \vskip 0pt plus 1filll \seenauthortrue \fi - {\authorfont \leftline{#1}}% - \fi -} - - -%%% Set up page headings and footings. - -\let\thispage=\folio - -\newtoks\evenheadline % headline on even pages -\newtoks\oddheadline % headline on odd pages -\newtoks\evenfootline % footline on even pages -\newtoks\oddfootline % footline on odd pages - -% Now make TeX use those variables -\headline={{\textfonts\rm \ifodd\pageno \the\oddheadline - \else \the\evenheadline \fi}} -\footline={{\textfonts\rm \ifodd\pageno \the\oddfootline - \else \the\evenfootline \fi}\HEADINGShook} -\let\HEADINGShook=\relax - -% Commands to set those variables. -% For example, this is what @headings on does -% @evenheading @thistitle|@thispage|@thischapter -% @oddheading @thischapter|@thispage|@thistitle -% @evenfooting @thisfile|| -% @oddfooting ||@thisfile - - -\def\evenheading{\parsearg\evenheadingxxx} -\def\evenheadingxxx #1{\evenheadingyyy #1\|\|\|\|\finish} -\def\evenheadingyyy #1\|#2\|#3\|#4\finish{% -\global\evenheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}} - -\def\oddheading{\parsearg\oddheadingxxx} -\def\oddheadingxxx #1{\oddheadingyyy #1\|\|\|\|\finish} -\def\oddheadingyyy #1\|#2\|#3\|#4\finish{% -\global\oddheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}} - -\parseargdef\everyheading{\oddheadingxxx{#1}\evenheadingxxx{#1}}% - -\def\evenfooting{\parsearg\evenfootingxxx} -\def\evenfootingxxx #1{\evenfootingyyy #1\|\|\|\|\finish} -\def\evenfootingyyy #1\|#2\|#3\|#4\finish{% -\global\evenfootline={\rlap{\centerline{#2}}\line{#1\hfil#3}}} - -\def\oddfooting{\parsearg\oddfootingxxx} -\def\oddfootingxxx #1{\oddfootingyyy #1\|\|\|\|\finish} -\def\oddfootingyyy #1\|#2\|#3\|#4\finish{% - \global\oddfootline = {\rlap{\centerline{#2}}\line{#1\hfil#3}}% - % - % Leave some space for the footline. Hopefully ok to assume - % @evenfooting will not be used by itself. - \global\advance\pageheight by -\baselineskip - \global\advance\vsize by -\baselineskip -} - -\parseargdef\everyfooting{\oddfootingxxx{#1}\evenfootingxxx{#1}} - - -% @headings double turns headings on for double-sided printing. -% @headings single turns headings on for single-sided printing. -% @headings off turns them off. -% @headings on same as @headings double, retained for compatibility. -% @headings after turns on double-sided headings after this page. -% @headings doubleafter turns on double-sided headings after this page. -% @headings singleafter turns on single-sided headings after this page. -% By default, they are off at the start of a document, -% and turned `on' after @end titlepage. - -\def\headings #1 {\csname HEADINGS#1\endcsname} - -\def\HEADINGSoff{% -\global\evenheadline={\hfil} \global\evenfootline={\hfil} -\global\oddheadline={\hfil} \global\oddfootline={\hfil}} -\HEADINGSoff -% When we turn headings on, set the page number to 1. -% For double-sided printing, put current file name in lower left corner, -% chapter name on inside top of right hand pages, document -% title on inside top of left hand pages, and page numbers on outside top -% edge of all pages. -\def\HEADINGSdouble{% -\global\pageno=1 -\global\evenfootline={\hfil} -\global\oddfootline={\hfil} -\global\evenheadline={\line{\folio\hfil\thistitle}} -\global\oddheadline={\line{\thischapter\hfil\folio}} -\global\let\contentsalignmacro = \chapoddpage -} -\let\contentsalignmacro = \chappager - -% For single-sided printing, chapter title goes across top left of page, -% page number on top right. -\def\HEADINGSsingle{% -\global\pageno=1 -\global\evenfootline={\hfil} -\global\oddfootline={\hfil} -\global\evenheadline={\line{\thischapter\hfil\folio}} -\global\oddheadline={\line{\thischapter\hfil\folio}} -\global\let\contentsalignmacro = \chappager -} -\def\HEADINGSon{\HEADINGSdouble} - -\def\HEADINGSafter{\let\HEADINGShook=\HEADINGSdoublex} -\let\HEADINGSdoubleafter=\HEADINGSafter -\def\HEADINGSdoublex{% -\global\evenfootline={\hfil} -\global\oddfootline={\hfil} -\global\evenheadline={\line{\folio\hfil\thistitle}} -\global\oddheadline={\line{\thischapter\hfil\folio}} -\global\let\contentsalignmacro = \chapoddpage -} - -\def\HEADINGSsingleafter{\let\HEADINGShook=\HEADINGSsinglex} -\def\HEADINGSsinglex{% -\global\evenfootline={\hfil} -\global\oddfootline={\hfil} -\global\evenheadline={\line{\thischapter\hfil\folio}} -\global\oddheadline={\line{\thischapter\hfil\folio}} -\global\let\contentsalignmacro = \chappager -} - -% Subroutines used in generating headings -% This produces Day Month Year style of output. -% Only define if not already defined, in case a txi-??.tex file has set -% up a different format (e.g., txi-cs.tex does this). -\ifx\today\undefined -\def\today{% - \number\day\space - \ifcase\month - \or\putwordMJan\or\putwordMFeb\or\putwordMMar\or\putwordMApr - \or\putwordMMay\or\putwordMJun\or\putwordMJul\or\putwordMAug - \or\putwordMSep\or\putwordMOct\or\putwordMNov\or\putwordMDec - \fi - \space\number\year} -\fi - -% @settitle line... specifies the title of the document, for headings. -% It generates no output of its own. -\def\thistitle{\putwordNoTitle} -\def\settitle{\parsearg{\gdef\thistitle}} - - -\message{tables,} -% Tables -- @table, @ftable, @vtable, @item(x). - -% default indentation of table text -\newdimen\tableindent \tableindent=.8in -% default indentation of @itemize and @enumerate text -\newdimen\itemindent \itemindent=.3in -% margin between end of table item and start of table text. -\newdimen\itemmargin \itemmargin=.1in - -% used internally for \itemindent minus \itemmargin -\newdimen\itemmax - -% Note @table, @ftable, and @vtable define @item, @itemx, etc., with -% these defs. -% They also define \itemindex -% to index the item name in whatever manner is desired (perhaps none). - -\newif\ifitemxneedsnegativevskip - -\def\itemxpar{\par\ifitemxneedsnegativevskip\nobreak\vskip-\parskip\nobreak\fi} - -\def\internalBitem{\smallbreak \parsearg\itemzzz} -\def\internalBitemx{\itemxpar \parsearg\itemzzz} - -\def\itemzzz #1{\begingroup % - \advance\hsize by -\rightskip - \advance\hsize by -\tableindent - \setbox0=\hbox{\itemindicate{#1}}% - \itemindex{#1}% - \nobreak % This prevents a break before @itemx. - % - % If the item text does not fit in the space we have, put it on a line - % by itself, and do not allow a page break either before or after that - % line. We do not start a paragraph here because then if the next - % command is, e.g., @kindex, the whatsit would get put into the - % horizontal list on a line by itself, resulting in extra blank space. - \ifdim \wd0>\itemmax - % - % Make this a paragraph so we get the \parskip glue and wrapping, - % but leave it ragged-right. - \begingroup - \advance\leftskip by-\tableindent - \advance\hsize by\tableindent - \advance\rightskip by0pt plus1fil - \leavevmode\unhbox0\par - \endgroup - % - % We're going to be starting a paragraph, but we don't want the - % \parskip glue -- logically it's part of the @item we just started. - \nobreak \vskip-\parskip - % - % Stop a page break at the \parskip glue coming up. However, if - % what follows is an environment such as @example, there will be no - % \parskip glue; then the negative vskip we just inserted would - % cause the example and the item to crash together. So we use this - % bizarre value of 10001 as a signal to \aboveenvbreak to insert - % \parskip glue after all. Section titles are handled this way also. - % - \penalty 10001 - \endgroup - \itemxneedsnegativevskipfalse - \else - % The item text fits into the space. Start a paragraph, so that the - % following text (if any) will end up on the same line. - \noindent - % Do this with kerns and \unhbox so that if there is a footnote in - % the item text, it can migrate to the main vertical list and - % eventually be printed. - \nobreak\kern-\tableindent - \dimen0 = \itemmax \advance\dimen0 by \itemmargin \advance\dimen0 by -\wd0 - \unhbox0 - \nobreak\kern\dimen0 - \endgroup - \itemxneedsnegativevskiptrue - \fi -} - -\def\item{\errmessage{@item while not in a list environment}} -\def\itemx{\errmessage{@itemx while not in a list environment}} - -% @table, @ftable, @vtable. -\envdef\table{% - \let\itemindex\gobble - \tablecheck{table}% -} -\envdef\ftable{% - \def\itemindex ##1{\doind {fn}{\code{##1}}}% - \tablecheck{ftable}% -} -\envdef\vtable{% - \def\itemindex ##1{\doind {vr}{\code{##1}}}% - \tablecheck{vtable}% -} -\def\tablecheck#1{% - \ifnum \the\catcode`\^^M=\active - \endgroup - \errmessage{This command won't work in this context; perhaps the problem is - that we are \inenvironment\thisenv}% - \def\next{\doignore{#1}}% - \else - \let\next\tablex - \fi - \next -} -\def\tablex#1{% - \def\itemindicate{#1}% - \parsearg\tabley -} -\def\tabley#1{% - {% - \makevalueexpandable - \edef\temp{\noexpand\tablez #1\space\space\space}% - \expandafter - }\temp \endtablez -} -\def\tablez #1 #2 #3 #4\endtablez{% - \aboveenvbreak - \ifnum 0#1>0 \advance \leftskip by #1\mil \fi - \ifnum 0#2>0 \tableindent=#2\mil \fi - \ifnum 0#3>0 \advance \rightskip by #3\mil \fi - \itemmax=\tableindent - \advance \itemmax by -\itemmargin - \advance \leftskip by \tableindent - \exdentamount=\tableindent - \parindent = 0pt - \parskip = \smallskipamount - \ifdim \parskip=0pt \parskip=2pt \fi - \let\item = \internalBitem - \let\itemx = \internalBitemx -} -\def\Etable{\endgraf\afterenvbreak} -\let\Eftable\Etable -\let\Evtable\Etable -\let\Eitemize\Etable -\let\Eenumerate\Etable - -% This is the counter used by @enumerate, which is really @itemize - -\newcount \itemno - -\envdef\itemize{\parsearg\doitemize} - -\def\doitemize#1{% - \aboveenvbreak - \itemmax=\itemindent - \advance\itemmax by -\itemmargin - \advance\leftskip by \itemindent - \exdentamount=\itemindent - \parindent=0pt - \parskip=\smallskipamount - \ifdim\parskip=0pt \parskip=2pt \fi - \def\itemcontents{#1}% - % @itemize with no arg is equivalent to @itemize @bullet. - \ifx\itemcontents\empty\def\itemcontents{\bullet}\fi - \let\item=\itemizeitem -} - -% Definition of @item while inside @itemize and @enumerate. -% -\def\itemizeitem{% - \advance\itemno by 1 % for enumerations - {\let\par=\endgraf \smallbreak}% reasonable place to break - {% - % If the document has an @itemize directly after a section title, a - % \nobreak will be last on the list, and \sectionheading will have - % done a \vskip-\parskip. In that case, we don't want to zero - % parskip, or the item text will crash with the heading. On the - % other hand, when there is normal text preceding the item (as there - % usually is), we do want to zero parskip, or there would be too much - % space. In that case, we won't have a \nobreak before. At least - % that's the theory. - \ifnum\lastpenalty<10000 \parskip=0in \fi - \noindent - \hbox to 0pt{\hss \itemcontents \kern\itemmargin}% - \vadjust{\penalty 1200}}% not good to break after first line of item. - \flushcr -} - -% \splitoff TOKENS\endmark defines \first to be the first token in -% TOKENS, and \rest to be the remainder. -% -\def\splitoff#1#2\endmark{\def\first{#1}\def\rest{#2}}% - -% Allow an optional argument of an uppercase letter, lowercase letter, -% or number, to specify the first label in the enumerated list. No -% argument is the same as `1'. -% -\envparseargdef\enumerate{\enumeratey #1 \endenumeratey} -\def\enumeratey #1 #2\endenumeratey{% - % If we were given no argument, pretend we were given `1'. - \def\thearg{#1}% - \ifx\thearg\empty \def\thearg{1}\fi - % - % Detect if the argument is a single token. If so, it might be a - % letter. Otherwise, the only valid thing it can be is a number. - % (We will always have one token, because of the test we just made. - % This is a good thing, since \splitoff doesn't work given nothing at - % all -- the first parameter is undelimited.) - \expandafter\splitoff\thearg\endmark - \ifx\rest\empty - % Only one token in the argument. It could still be anything. - % A ``lowercase letter'' is one whose \lccode is nonzero. - % An ``uppercase letter'' is one whose \lccode is both nonzero, and - % not equal to itself. - % Otherwise, we assume it's a number. - % - % We need the \relax at the end of the \ifnum lines to stop TeX from - % continuing to look for a . - % - \ifnum\lccode\expandafter`\thearg=0\relax - \numericenumerate % a number (we hope) - \else - % It's a letter. - \ifnum\lccode\expandafter`\thearg=\expandafter`\thearg\relax - \lowercaseenumerate % lowercase letter - \else - \uppercaseenumerate % uppercase letter - \fi - \fi - \else - % Multiple tokens in the argument. We hope it's a number. - \numericenumerate - \fi -} - -% An @enumerate whose labels are integers. The starting integer is -% given in \thearg. -% -\def\numericenumerate{% - \itemno = \thearg - \startenumeration{\the\itemno}% -} - -% The starting (lowercase) letter is in \thearg. -\def\lowercaseenumerate{% - \itemno = \expandafter`\thearg - \startenumeration{% - % Be sure we're not beyond the end of the alphabet. - \ifnum\itemno=0 - \errmessage{No more lowercase letters in @enumerate; get a bigger - alphabet}% - \fi - \char\lccode\itemno - }% -} - -% The starting (uppercase) letter is in \thearg. -\def\uppercaseenumerate{% - \itemno = \expandafter`\thearg - \startenumeration{% - % Be sure we're not beyond the end of the alphabet. - \ifnum\itemno=0 - \errmessage{No more uppercase letters in @enumerate; get a bigger - alphabet} - \fi - \char\uccode\itemno - }% -} - -% Call \doitemize, adding a period to the first argument and supplying the -% common last two arguments. Also subtract one from the initial value in -% \itemno, since @item increments \itemno. -% -\def\startenumeration#1{% - \advance\itemno by -1 - \doitemize{#1.}\flushcr -} - -% @alphaenumerate and @capsenumerate are abbreviations for giving an arg -% to @enumerate. -% -\def\alphaenumerate{\enumerate{a}} -\def\capsenumerate{\enumerate{A}} -\def\Ealphaenumerate{\Eenumerate} -\def\Ecapsenumerate{\Eenumerate} - - -% @multitable macros -% Amy Hendrickson, 8/18/94, 3/6/96 -% -% @multitable ... @end multitable will make as many columns as desired. -% Contents of each column will wrap at width given in preamble. Width -% can be specified either with sample text given in a template line, -% or in percent of \hsize, the current width of text on page. - -% Table can continue over pages but will only break between lines. - -% To make preamble: -% -% Either define widths of columns in terms of percent of \hsize: -% @multitable @columnfractions .25 .3 .45 -% @item ... -% -% Numbers following @columnfractions are the percent of the total -% current hsize to be used for each column. You may use as many -% columns as desired. - - -% Or use a template: -% @multitable {Column 1 template} {Column 2 template} {Column 3 template} -% @item ... -% using the widest term desired in each column. - -% Each new table line starts with @item, each subsequent new column -% starts with @tab. Empty columns may be produced by supplying @tab's -% with nothing between them for as many times as empty columns are needed, -% ie, @tab@tab@tab will produce two empty columns. - -% @item, @tab do not need to be on their own lines, but it will not hurt -% if they are. - -% Sample multitable: - -% @multitable {Column 1 template} {Column 2 template} {Column 3 template} -% @item first col stuff @tab second col stuff @tab third col -% @item -% first col stuff -% @tab -% second col stuff -% @tab -% third col -% @item first col stuff @tab second col stuff -% @tab Many paragraphs of text may be used in any column. -% -% They will wrap at the width determined by the template. -% @item@tab@tab This will be in third column. -% @end multitable - -% Default dimensions may be reset by user. -% @multitableparskip is vertical space between paragraphs in table. -% @multitableparindent is paragraph indent in table. -% @multitablecolmargin is horizontal space to be left between columns. -% @multitablelinespace is space to leave between table items, baseline -% to baseline. -% 0pt means it depends on current normal line spacing. -% -\newskip\multitableparskip -\newskip\multitableparindent -\newdimen\multitablecolspace -\newskip\multitablelinespace -\multitableparskip=0pt -\multitableparindent=6pt -\multitablecolspace=12pt -\multitablelinespace=0pt - -% Macros used to set up halign preamble: -% -\let\endsetuptable\relax -\def\xendsetuptable{\endsetuptable} -\let\columnfractions\relax -\def\xcolumnfractions{\columnfractions} -\newif\ifsetpercent - -% #1 is the @columnfraction, usually a decimal number like .5, but might -% be just 1. We just use it, whatever it is. -% -\def\pickupwholefraction#1 {% - \global\advance\colcount by 1 - \expandafter\xdef\csname col\the\colcount\endcsname{#1\hsize}% - \setuptable -} - -\newcount\colcount -\def\setuptable#1{% - \def\firstarg{#1}% - \ifx\firstarg\xendsetuptable - \let\go = \relax - \else - \ifx\firstarg\xcolumnfractions - \global\setpercenttrue - \else - \ifsetpercent - \let\go\pickupwholefraction - \else - \global\advance\colcount by 1 - \setbox0=\hbox{#1\unskip\space}% Add a normal word space as a - % separator; typically that is always in the input, anyway. - \expandafter\xdef\csname col\the\colcount\endcsname{\the\wd0}% - \fi - \fi - \ifx\go\pickupwholefraction - % Put the argument back for the \pickupwholefraction call, so - % we'll always have a period there to be parsed. - \def\go{\pickupwholefraction#1}% - \else - \let\go = \setuptable - \fi% - \fi - \go -} - -% multitable-only commands. -% -% @headitem starts a heading row, which we typeset in bold. -% Assignments have to be global since we are inside the implicit group -% of an alignment entry. Note that \everycr resets \everytab. -\def\headitem{\checkenv\multitable \crcr \global\everytab={\bf}\the\everytab}% -% -% A \tab used to include \hskip1sp. But then the space in a template -% line is not enough. That is bad. So let's go back to just `&' until -% we encounter the problem it was intended to solve again. -% --karl, nathan@acm.org, 20apr99. -\def\tab{\checkenv\multitable &\the\everytab}% - -% @multitable ... @end multitable definitions: -% -\newtoks\everytab % insert after every tab. -% -\envdef\multitable{% - \vskip\parskip - \startsavinginserts - % - % @item within a multitable starts a normal row. - % We use \def instead of \let so that if one of the multitable entries - % contains an @itemize, we don't choke on the \item (seen as \crcr aka - % \endtemplate) expanding \doitemize. - \def\item{\crcr}% - % - \tolerance=9500 - \hbadness=9500 - \setmultitablespacing - \parskip=\multitableparskip - \parindent=\multitableparindent - \overfullrule=0pt - \global\colcount=0 - % - \everycr = {% - \noalign{% - \global\everytab={}% - \global\colcount=0 % Reset the column counter. - % Check for saved footnotes, etc. - \checkinserts - % Keeps underfull box messages off when table breaks over pages. - %\filbreak - % Maybe so, but it also creates really weird page breaks when the - % table breaks over pages. Wouldn't \vfil be better? Wait until the - % problem manifests itself, so it can be fixed for real --karl. - }% - }% - % - \parsearg\domultitable -} -\def\domultitable#1{% - % To parse everything between @multitable and @item: - \setuptable#1 \endsetuptable - % - % This preamble sets up a generic column definition, which will - % be used as many times as user calls for columns. - % \vtop will set a single line and will also let text wrap and - % continue for many paragraphs if desired. - \halign\bgroup &% - \global\advance\colcount by 1 - \multistrut - \vtop{% - % Use the current \colcount to find the correct column width: - \hsize=\expandafter\csname col\the\colcount\endcsname - % - % In order to keep entries from bumping into each other - % we will add a \leftskip of \multitablecolspace to all columns after - % the first one. - % - % If a template has been used, we will add \multitablecolspace - % to the width of each template entry. - % - % If the user has set preamble in terms of percent of \hsize we will - % use that dimension as the width of the column, and the \leftskip - % will keep entries from bumping into each other. Table will start at - % left margin and final column will justify at right margin. - % - % Make sure we don't inherit \rightskip from the outer environment. - \rightskip=0pt - \ifnum\colcount=1 - % The first column will be indented with the surrounding text. - \advance\hsize by\leftskip - \else - \ifsetpercent \else - % If user has not set preamble in terms of percent of \hsize - % we will advance \hsize by \multitablecolspace. - \advance\hsize by \multitablecolspace - \fi - % In either case we will make \leftskip=\multitablecolspace: - \leftskip=\multitablecolspace - \fi - % Ignoring space at the beginning and end avoids an occasional spurious - % blank line, when TeX decides to break the line at the space before the - % box from the multistrut, so the strut ends up on a line by itself. - % For example: - % @multitable @columnfractions .11 .89 - % @item @code{#} - % @tab Legal holiday which is valid in major parts of the whole country. - % Is automatically provided with highlighting sequences respectively - % marking characters. - \noindent\ignorespaces##\unskip\multistrut - }\cr -} -\def\Emultitable{% - \crcr - \egroup % end the \halign - \global\setpercentfalse -} - -\def\setmultitablespacing{% - \def\multistrut{\strut}% just use the standard line spacing - % - % Compute \multitablelinespace (if not defined by user) for use in - % \multitableparskip calculation. We used define \multistrut based on - % this, but (ironically) that caused the spacing to be off. - % See bug-texinfo report from Werner Lemberg, 31 Oct 2004 12:52:20 +0100. -\ifdim\multitablelinespace=0pt -\setbox0=\vbox{X}\global\multitablelinespace=\the\baselineskip -\global\advance\multitablelinespace by-\ht0 -\fi -%% Test to see if parskip is larger than space between lines of -%% table. If not, do nothing. -%% If so, set to same dimension as multitablelinespace. -\ifdim\multitableparskip>\multitablelinespace -\global\multitableparskip=\multitablelinespace -\global\advance\multitableparskip-7pt %% to keep parskip somewhat smaller - %% than skip between lines in the table. -\fi% -\ifdim\multitableparskip=0pt -\global\multitableparskip=\multitablelinespace -\global\advance\multitableparskip-7pt %% to keep parskip somewhat smaller - %% than skip between lines in the table. -\fi} - - -\message{conditionals,} - -% @iftex, @ifnotdocbook, @ifnothtml, @ifnotinfo, @ifnotplaintext, -% @ifnotxml always succeed. They currently do nothing; we don't -% attempt to check whether the conditionals are properly nested. But we -% have to remember that they are conditionals, so that @end doesn't -% attempt to close an environment group. -% -\def\makecond#1{% - \expandafter\let\csname #1\endcsname = \relax - \expandafter\let\csname iscond.#1\endcsname = 1 -} -\makecond{iftex} -\makecond{ifnotdocbook} -\makecond{ifnothtml} -\makecond{ifnotinfo} -\makecond{ifnotplaintext} -\makecond{ifnotxml} - -% Ignore @ignore, @ifhtml, @ifinfo, and the like. -% -\def\direntry{\doignore{direntry}} -\def\documentdescription{\doignore{documentdescription}} -\def\docbook{\doignore{docbook}} -\def\html{\doignore{html}} -\def\ifdocbook{\doignore{ifdocbook}} -\def\ifhtml{\doignore{ifhtml}} -\def\ifinfo{\doignore{ifinfo}} -\def\ifnottex{\doignore{ifnottex}} -\def\ifplaintext{\doignore{ifplaintext}} -\def\ifxml{\doignore{ifxml}} -\def\ignore{\doignore{ignore}} -\def\menu{\doignore{menu}} -\def\xml{\doignore{xml}} - -% Ignore text until a line `@end #1', keeping track of nested conditionals. -% -% A count to remember the depth of nesting. -\newcount\doignorecount - -\def\doignore#1{\begingroup - % Scan in ``verbatim'' mode: - \catcode`\@ = \other - \catcode`\{ = \other - \catcode`\} = \other - % - % Make sure that spaces turn into tokens that match what \doignoretext wants. - \spaceisspace - % - % Count number of #1's that we've seen. - \doignorecount = 0 - % - % Swallow text until we reach the matching `@end #1'. - \dodoignore{#1}% -} - -{ \catcode`_=11 % We want to use \_STOP_ which cannot appear in texinfo source. - \obeylines % - % - \gdef\dodoignore#1{% - % #1 contains the command name as a string, e.g., `ifinfo'. - % - % Define a command to find the next `@end #1', which must be on a line - % by itself. - \long\def\doignoretext##1^^M@end #1{\doignoretextyyy##1^^M@#1\_STOP_}% - % And this command to find another #1 command, at the beginning of a - % line. (Otherwise, we would consider a line `@c @ifset', for - % example, to count as an @ifset for nesting.) - \long\def\doignoretextyyy##1^^M@#1##2\_STOP_{\doignoreyyy{##2}\_STOP_}% - % - % And now expand that command. - \obeylines % - \doignoretext ^^M% - }% -} - -\def\doignoreyyy#1{% - \def\temp{#1}% - \ifx\temp\empty % Nothing found. - \let\next\doignoretextzzz - \else % Found a nested condition, ... - \advance\doignorecount by 1 - \let\next\doignoretextyyy % ..., look for another. - % If we're here, #1 ends with ^^M\ifinfo (for example). - \fi - \next #1% the token \_STOP_ is present just after this macro. -} - -% We have to swallow the remaining "\_STOP_". -% -\def\doignoretextzzz#1{% - \ifnum\doignorecount = 0 % We have just found the outermost @end. - \let\next\enddoignore - \else % Still inside a nested condition. - \advance\doignorecount by -1 - \let\next\doignoretext % Look for the next @end. - \fi - \next -} - -% Finish off ignored text. -\def\enddoignore{\endgroup\ignorespaces} - - -% @set VAR sets the variable VAR to an empty value. -% @set VAR REST-OF-LINE sets VAR to the value REST-OF-LINE. -% -% Since we want to separate VAR from REST-OF-LINE (which might be -% empty), we can't just use \parsearg; we have to insert a space of our -% own to delimit the rest of the line, and then take it out again if we -% didn't need it. -% We rely on the fact that \parsearg sets \catcode`\ =10. -% -\parseargdef\set{\setyyy#1 \endsetyyy} -\def\setyyy#1 #2\endsetyyy{% - {% - \makevalueexpandable - \def\temp{#2}% - \edef\next{\gdef\makecsname{SET#1}}% - \ifx\temp\empty - \next{}% - \else - \setzzz#2\endsetzzz - \fi - }% -} -% Remove the trailing space \setxxx inserted. -\def\setzzz#1 \endsetzzz{\next{#1}} - -% @clear VAR clears (i.e., unsets) the variable VAR. -% -\parseargdef\clear{% - {% - \makevalueexpandable - \global\expandafter\let\csname SET#1\endcsname=\relax - }% -} - -% @value{foo} gets the text saved in variable foo. -\def\value{\begingroup\makevalueexpandable\valuexxx} -\def\valuexxx#1{\expandablevalue{#1}\endgroup} -{ - \catcode`\- = \active \catcode`\_ = \active - % - \gdef\makevalueexpandable{% - \let\value = \expandablevalue - % We don't want these characters active, ... - \catcode`\-=\other \catcode`\_=\other - % ..., but we might end up with active ones in the argument if - % we're called from @code, as @code{@value{foo-bar_}}, though. - % So \let them to their normal equivalents. - \let-\realdash \let_\normalunderscore - } -} - -% We have this subroutine so that we can handle at least some @value's -% properly in indexes (we call \makevalueexpandable in \indexdummies). -% The command has to be fully expandable (if the variable is set), since -% the result winds up in the index file. This means that if the -% variable's value contains other Texinfo commands, it's almost certain -% it will fail (although perhaps we could fix that with sufficient work -% to do a one-level expansion on the result, instead of complete). -% -\def\expandablevalue#1{% - \expandafter\ifx\csname SET#1\endcsname\relax - {[No value for ``#1'']}% - \message{Variable `#1', used in @value, is not set.}% - \else - \csname SET#1\endcsname - \fi -} - -% @ifset VAR ... @end ifset reads the `...' iff VAR has been defined -% with @set. -% -% To get special treatment of `@end ifset,' call \makeond and the redefine. -% -\makecond{ifset} -\def\ifset{\parsearg{\doifset{\let\next=\ifsetfail}}} -\def\doifset#1#2{% - {% - \makevalueexpandable - \let\next=\empty - \expandafter\ifx\csname SET#2\endcsname\relax - #1% If not set, redefine \next. - \fi - \expandafter - }\next -} -\def\ifsetfail{\doignore{ifset}} - -% @ifclear VAR ... @end ifclear reads the `...' iff VAR has never been -% defined with @set, or has been undefined with @clear. -% -% The `\else' inside the `\doifset' parameter is a trick to reuse the -% above code: if the variable is not set, do nothing, if it is set, -% then redefine \next to \ifclearfail. -% -\makecond{ifclear} -\def\ifclear{\parsearg{\doifset{\else \let\next=\ifclearfail}}} -\def\ifclearfail{\doignore{ifclear}} - -% @dircategory CATEGORY -- specify a category of the dir file -% which this file should belong to. Ignore this in TeX. -\let\dircategory=\comment - -% @defininfoenclose. -\let\definfoenclose=\comment - - -\message{indexing,} -% Index generation facilities - -% Define \newwrite to be identical to plain tex's \newwrite -% except not \outer, so it can be used within macros and \if's. -\edef\newwrite{\makecsname{ptexnewwrite}} - -% \newindex {foo} defines an index named foo. -% It automatically defines \fooindex such that -% \fooindex ...rest of line... puts an entry in the index foo. -% It also defines \fooindfile to be the number of the output channel for -% the file that accumulates this index. The file's extension is foo. -% The name of an index should be no more than 2 characters long -% for the sake of vms. -% -\def\newindex#1{% - \iflinks - \expandafter\newwrite \csname#1indfile\endcsname - \openout \csname#1indfile\endcsname \jobname.#1 % Open the file - \fi - \expandafter\xdef\csname#1index\endcsname{% % Define @#1index - \noexpand\doindex{#1}} -} - -% @defindex foo == \newindex{foo} -% -\def\defindex{\parsearg\newindex} - -% Define @defcodeindex, like @defindex except put all entries in @code. -% -\def\defcodeindex{\parsearg\newcodeindex} -% -\def\newcodeindex#1{% - \iflinks - \expandafter\newwrite \csname#1indfile\endcsname - \openout \csname#1indfile\endcsname \jobname.#1 - \fi - \expandafter\xdef\csname#1index\endcsname{% - \noexpand\docodeindex{#1}}% -} - - -% @synindex foo bar makes index foo feed into index bar. -% Do this instead of @defindex foo if you don't want it as a separate index. -% -% @syncodeindex foo bar similar, but put all entries made for index foo -% inside @code. -% -\def\synindex#1 #2 {\dosynindex\doindex{#1}{#2}} -\def\syncodeindex#1 #2 {\dosynindex\docodeindex{#1}{#2}} - -% #1 is \doindex or \docodeindex, #2 the index getting redefined (foo), -% #3 the target index (bar). -\def\dosynindex#1#2#3{% - % Only do \closeout if we haven't already done it, else we'll end up - % closing the target index. - \expandafter \ifx\csname donesynindex#2\endcsname \undefined - % The \closeout helps reduce unnecessary open files; the limit on the - % Acorn RISC OS is a mere 16 files. - \expandafter\closeout\csname#2indfile\endcsname - \expandafter\let\csname\donesynindex#2\endcsname = 1 - \fi - % redefine \fooindfile: - \expandafter\let\expandafter\temp\expandafter=\csname#3indfile\endcsname - \expandafter\let\csname#2indfile\endcsname=\temp - % redefine \fooindex: - \expandafter\xdef\csname#2index\endcsname{\noexpand#1{#3}}% -} - -% Define \doindex, the driver for all \fooindex macros. -% Argument #1 is generated by the calling \fooindex macro, -% and it is "foo", the name of the index. - -% \doindex just uses \parsearg; it calls \doind for the actual work. -% This is because \doind is more useful to call from other macros. - -% There is also \dosubind {index}{topic}{subtopic} -% which makes an entry in a two-level index such as the operation index. - -\def\doindex#1{\edef\indexname{#1}\parsearg\singleindexer} -\def\singleindexer #1{\doind{\indexname}{#1}} - -% like the previous two, but they put @code around the argument. -\def\docodeindex#1{\edef\indexname{#1}\parsearg\singlecodeindexer} -\def\singlecodeindexer #1{\doind{\indexname}{\code{#1}}} - -% Take care of Texinfo commands that can appear in an index entry. -% Since there are some commands we want to expand, and others we don't, -% we have to laboriously prevent expansion for those that we don't. -% -\def\indexdummies{% - \escapechar = `\\ % use backslash in output files. - \def\@{@}% change to @@ when we switch to @ as escape char in index files. - \def\ {\realbackslash\space }% - % Need these in case \tex is in effect and \{ is a \delimiter again. - % But can't use \lbracecmd and \rbracecmd because texindex assumes - % braces and backslashes are used only as delimiters. - \let\{ = \mylbrace - \let\} = \myrbrace - % - % Do the redefinitions. - \commondummies -} - -% For the aux and toc files, @ is the escape character. So we want to -% redefine everything using @ as the escape character (instead of -% \realbackslash, still used for index files). When everything uses @, -% this will be simpler. -% -\def\atdummies{% - \def\@{@@}% - \def\ {@ }% - \let\{ = \lbraceatcmd - \let\} = \rbraceatcmd - % - % Do the redefinitions. - \commondummies -} - -% Called from \indexdummies and \atdummies. -% -\def\commondummies{% - % - % \definedummyword defines \#1 as \string\#1\space, thus effectively - % preventing its expansion. This is used only for control% words, - % not control letters, because the \space would be incorrect for - % control characters, but is needed to separate the control word - % from whatever follows. - % - % For control letters, we have \definedummyletter, which omits the - % space. - % - % These can be used both for control words that take an argument and - % those that do not. If it is followed by {arg} in the input, then - % that will dutifully get written to the index (or wherever). - % - \def\definedummyword ##1{\def##1{\string##1\space}}% - \def\definedummyletter##1{\def##1{\string##1}}% - \let\definedummyaccent\definedummyletter - % - \commondummiesnofonts - % - \definedummyletter\_% - % - % Non-English letters. - \definedummyword\AA - \definedummyword\AE - \definedummyword\L - \definedummyword\OE - \definedummyword\O - \definedummyword\aa - \definedummyword\ae - \definedummyword\l - \definedummyword\oe - \definedummyword\o - \definedummyword\ss - \definedummyword\exclamdown - \definedummyword\questiondown - \definedummyword\ordf - \definedummyword\ordm - % - % Although these internal commands shouldn't show up, sometimes they do. - \definedummyword\bf - \definedummyword\gtr - \definedummyword\hat - \definedummyword\less - \definedummyword\sf - \definedummyword\sl - \definedummyword\tclose - \definedummyword\tt - % - \definedummyword\LaTeX - \definedummyword\TeX - % - % Assorted special characters. - \definedummyword\bullet - \definedummyword\comma - \definedummyword\copyright - \definedummyword\registeredsymbol - \definedummyword\dots - \definedummyword\enddots - \definedummyword\equiv - \definedummyword\error - \definedummyword\euro - \definedummyword\expansion - \definedummyword\minus - \definedummyword\pounds - \definedummyword\point - \definedummyword\print - \definedummyword\result - % - % We want to disable all macros so that they are not expanded by \write. - \macrolist - % - \normalturnoffactive - % - % Handle some cases of @value -- where it does not contain any - % (non-fully-expandable) commands. - \makevalueexpandable -} - -% \commondummiesnofonts: common to \commondummies and \indexnofonts. -% -% Better have this without active chars. -{ - \catcode`\~=\other - \gdef\commondummiesnofonts{% - % Control letters and accents. - \definedummyletter\!% - \definedummyaccent\"% - \definedummyaccent\'% - \definedummyletter\*% - \definedummyaccent\,% - \definedummyletter\.% - \definedummyletter\/% - \definedummyletter\:% - \definedummyaccent\=% - \definedummyletter\?% - \definedummyaccent\^% - \definedummyaccent\`% - \definedummyaccent\~% - \definedummyword\u - \definedummyword\v - \definedummyword\H - \definedummyword\dotaccent - \definedummyword\ringaccent - \definedummyword\tieaccent - \definedummyword\ubaraccent - \definedummyword\udotaccent - \definedummyword\dotless - % - % Texinfo font commands. - \definedummyword\b - \definedummyword\i - \definedummyword\r - \definedummyword\sc - \definedummyword\t - % - % Commands that take arguments. - \definedummyword\acronym - \definedummyword\cite - \definedummyword\code - \definedummyword\command - \definedummyword\dfn - \definedummyword\emph - \definedummyword\env - \definedummyword\file - \definedummyword\kbd - \definedummyword\key - \definedummyword\math - \definedummyword\option - \definedummyword\samp - \definedummyword\strong - \definedummyword\tie - \definedummyword\uref - \definedummyword\url - \definedummyword\var - \definedummyword\verb - \definedummyword\w - } -} - -% \indexnofonts is used when outputting the strings to sort the index -% by, and when constructing control sequence names. It eliminates all -% control sequences and just writes whatever the best ASCII sort string -% would be for a given command (usually its argument). -% -\def\indexnofonts{% - % Accent commands should become @asis. - \def\definedummyaccent##1{\let##1\asis}% - % We can just ignore other control letters. - \def\definedummyletter##1{\let##1\empty}% - % Hopefully, all control words can become @asis. - \let\definedummyword\definedummyaccent - % - \commondummiesnofonts - % - % Don't no-op \tt, since it isn't a user-level command - % and is used in the definitions of the active chars like <, >, |, etc. - % Likewise with the other plain tex font commands. - %\let\tt=\asis - % - \def\ { }% - \def\@{@}% - % how to handle braces? - \def\_{\normalunderscore}% - % - % Non-English letters. - \def\AA{AA}% - \def\AE{AE}% - \def\L{L}% - \def\OE{OE}% - \def\O{O}% - \def\aa{aa}% - \def\ae{ae}% - \def\l{l}% - \def\oe{oe}% - \def\o{o}% - \def\ss{ss}% - \def\exclamdown{!}% - \def\questiondown{?}% - \def\ordf{a}% - \def\ordm{o}% - % - \def\LaTeX{LaTeX}% - \def\TeX{TeX}% - % - % Assorted special characters. - % (The following {} will end up in the sort string, but that's ok.) - \def\bullet{bullet}% - \def\comma{,}% - \def\copyright{copyright}% - \def\registeredsymbol{R}% - \def\dots{...}% - \def\enddots{...}% - \def\equiv{==}% - \def\error{error}% - \def\euro{euro}% - \def\expansion{==>}% - \def\minus{-}% - \def\pounds{pounds}% - \def\point{.}% - \def\print{-|}% - \def\result{=>}% - % - % We need to get rid of all macros, leaving only the arguments (if present). - % Of course this is not nearly correct, but it is the best we can do for now. - % makeinfo does not expand macros in the argument to @deffn, which ends up - % writing an index entry, and texindex isn't prepared for an index sort entry - % that starts with \. - % - % Since macro invocations are followed by braces, we can just redefine them - % to take a single TeX argument. The case of a macro invocation that - % goes to end-of-line is not handled. - % - \macrolist -} - -\let\indexbackslash=0 %overridden during \printindex. -\let\SETmarginindex=\relax % put index entries in margin (undocumented)? - -% Most index entries go through here, but \dosubind is the general case. -% #1 is the index name, #2 is the entry text. -\def\doind#1#2{\dosubind{#1}{#2}{}} - -% Workhorse for all \fooindexes. -% #1 is name of index, #2 is stuff to put there, #3 is subentry -- -% empty if called from \doind, as we usually are (the main exception -% is with most defuns, which call us directly). -% -\def\dosubind#1#2#3{% - \iflinks - {% - % Store the main index entry text (including the third arg). - \toks0 = {#2}% - % If third arg is present, precede it with a space. - \def\thirdarg{#3}% - \ifx\thirdarg\empty \else - \toks0 = \expandafter{\the\toks0 \space #3}% - \fi - % - \edef\writeto{\csname#1indfile\endcsname}% - % - \ifvmode - \dosubindsanitize - \else - \dosubindwrite - \fi - }% - \fi -} - -% Write the entry in \toks0 to the index file: -% -\def\dosubindwrite{% - % Put the index entry in the margin if desired. - \ifx\SETmarginindex\relax\else - \insert\margin{\hbox{\vrule height8pt depth3pt width0pt \the\toks0}}% - \fi - % - % Remember, we are within a group. - \indexdummies % Must do this here, since \bf, etc expand at this stage - \def\backslashcurfont{\indexbackslash}% \indexbackslash isn't defined now - % so it will be output as is; and it will print as backslash. - % - % Process the index entry with all font commands turned off, to - % get the string to sort by. - {\indexnofonts - \edef\temp{\the\toks0}% need full expansion - \xdef\indexsorttmp{\temp}% - }% - % - % Set up the complete index entry, with both the sort key and - % the original text, including any font commands. We write - % three arguments to \entry to the .?? file (four in the - % subentry case), texindex reduces to two when writing the .??s - % sorted result. - \edef\temp{% - \write\writeto{% - \string\entry{\indexsorttmp}{\noexpand\folio}{\the\toks0}}% - }% - \temp -} - -% Take care of unwanted page breaks: -% -% If a skip is the last thing on the list now, preserve it -% by backing up by \lastskip, doing the \write, then inserting -% the skip again. Otherwise, the whatsit generated by the -% \write will make \lastskip zero. The result is that sequences -% like this: -% @end defun -% @tindex whatever -% @defun ... -% will have extra space inserted, because the \medbreak in the -% start of the @defun won't see the skip inserted by the @end of -% the previous defun. -% -% But don't do any of this if we're not in vertical mode. We -% don't want to do a \vskip and prematurely end a paragraph. -% -% Avoid page breaks due to these extra skips, too. -% -% But wait, there is a catch there: -% We'll have to check whether \lastskip is zero skip. \ifdim is not -% sufficient for this purpose, as it ignores stretch and shrink parts -% of the skip. The only way seems to be to check the textual -% representation of the skip. -% -% The following is almost like \def\zeroskipmacro{0.0pt} except that -% the ``p'' and ``t'' characters have catcode \other, not 11 (letter). -% -\edef\zeroskipmacro{\expandafter\the\csname z@skip\endcsname} -% -% ..., ready, GO: -% -\def\dosubindsanitize{% - % \lastskip and \lastpenalty cannot both be nonzero simultaneously. - \skip0 = \lastskip - \edef\lastskipmacro{\the\lastskip}% - \count255 = \lastpenalty - % - % If \lastskip is nonzero, that means the last item was a - % skip. And since a skip is discardable, that means this - % -\skip0 glue we're inserting is preceded by a - % non-discardable item, therefore it is not a potential - % breakpoint, therefore no \nobreak needed. - \ifx\lastskipmacro\zeroskipmacro - \else - \vskip-\skip0 - \fi - % - \dosubindwrite - % - \ifx\lastskipmacro\zeroskipmacro - % If \lastskip was zero, perhaps the last item was a penalty, and - % perhaps it was >=10000, e.g., a \nobreak. In that case, we want - % to re-insert the same penalty (values >10000 are used for various - % signals); since we just inserted a non-discardable item, any - % following glue (such as a \parskip) would be a breakpoint. For example: - % - % @deffn deffn-whatever - % @vindex index-whatever - % Description. - % would allow a break between the index-whatever whatsit - % and the "Description." paragraph. - \ifnum\count255>9999 \penalty\count255 \fi - \else - % On the other hand, if we had a nonzero \lastskip, - % this make-up glue would be preceded by a non-discardable item - % (the whatsit from the \write), so we must insert a \nobreak. - \nobreak\vskip\skip0 - \fi -} - -% The index entry written in the file actually looks like -% \entry {sortstring}{page}{topic} -% or -% \entry {sortstring}{page}{topic}{subtopic} -% The texindex program reads in these files and writes files -% containing these kinds of lines: -% \initial {c} -% before the first topic whose initial is c -% \entry {topic}{pagelist} -% for a topic that is used without subtopics -% \primary {topic} -% for the beginning of a topic that is used with subtopics -% \secondary {subtopic}{pagelist} -% for each subtopic. - -% Define the user-accessible indexing commands -% @findex, @vindex, @kindex, @cindex. - -\def\findex {\fnindex} -\def\kindex {\kyindex} -\def\cindex {\cpindex} -\def\vindex {\vrindex} -\def\tindex {\tpindex} -\def\pindex {\pgindex} - -\def\cindexsub {\begingroup\obeylines\cindexsub} -{\obeylines % -\gdef\cindexsub "#1" #2^^M{\endgroup % -\dosubind{cp}{#2}{#1}}} - -% Define the macros used in formatting output of the sorted index material. - -% @printindex causes a particular index (the ??s file) to get printed. -% It does not print any chapter heading (usually an @unnumbered). -% -\parseargdef\printindex{\begingroup - \dobreak \chapheadingskip{10000}% - % - \smallfonts \rm - \tolerance = 9500 - \everypar = {}% don't want the \kern\-parindent from indentation suppression. - % - % See if the index file exists and is nonempty. - % Change catcode of @ here so that if the index file contains - % \initial {@} - % as its first line, TeX doesn't complain about mismatched braces - % (because it thinks @} is a control sequence). - \catcode`\@ = 11 - \openin 1 \jobname.#1s - \ifeof 1 - % \enddoublecolumns gets confused if there is no text in the index, - % and it loses the chapter title and the aux file entries for the - % index. The easiest way to prevent this problem is to make sure - % there is some text. - \putwordIndexNonexistent - \else - % - % If the index file exists but is empty, then \openin leaves \ifeof - % false. We have to make TeX try to read something from the file, so - % it can discover if there is anything in it. - \read 1 to \temp - \ifeof 1 - \putwordIndexIsEmpty - \else - % Index files are almost Texinfo source, but we use \ as the escape - % character. It would be better to use @, but that's too big a change - % to make right now. - \def\indexbackslash{\backslashcurfont}% - \catcode`\\ = 0 - \escapechar = `\\ - \begindoublecolumns - \input \jobname.#1s - \enddoublecolumns - \fi - \fi - \closein 1 -\endgroup} - -% These macros are used by the sorted index file itself. -% Change them to control the appearance of the index. - -\def\initial#1{{% - % Some minor font changes for the special characters. - \let\tentt=\sectt \let\tt=\sectt \let\sf=\sectt - % - % Remove any glue we may have, we'll be inserting our own. - \removelastskip - % - % We like breaks before the index initials, so insert a bonus. - \nobreak - \vskip 0pt plus 3\baselineskip - \penalty 0 - \vskip 0pt plus -3\baselineskip - % - % Typeset the initial. Making this add up to a whole number of - % baselineskips increases the chance of the dots lining up from column - % to column. It still won't often be perfect, because of the stretch - % we need before each entry, but it's better. - % - % No shrink because it confuses \balancecolumns. - \vskip 1.67\baselineskip plus .5\baselineskip - \leftline{\secbf #1}% - % Do our best not to break after the initial. - \nobreak - \vskip .33\baselineskip plus .1\baselineskip -}} - -% \entry typesets a paragraph consisting of the text (#1), dot leaders, and -% then page number (#2) flushed to the right margin. It is used for index -% and table of contents entries. The paragraph is indented by \leftskip. -% -% A straightforward implementation would start like this: -% \def\entry#1#2{... -% But this frozes the catcodes in the argument, and can cause problems to -% @code, which sets - active. This problem was fixed by a kludge--- -% ``-'' was active throughout whole index, but this isn't really right. -% -% The right solution is to prevent \entry from swallowing the whole text. -% --kasal, 21nov03 -\def\entry{% - \begingroup - % - % Start a new paragraph if necessary, so our assignments below can't - % affect previous text. - \par - % - % Do not fill out the last line with white space. - \parfillskip = 0in - % - % No extra space above this paragraph. - \parskip = 0in - % - % Do not prefer a separate line ending with a hyphen to fewer lines. - \finalhyphendemerits = 0 - % - % \hangindent is only relevant when the entry text and page number - % don't both fit on one line. In that case, bob suggests starting the - % dots pretty far over on the line. Unfortunately, a large - % indentation looks wrong when the entry text itself is broken across - % lines. So we use a small indentation and put up with long leaders. - % - % \hangafter is reset to 1 (which is the value we want) at the start - % of each paragraph, so we need not do anything with that. - \hangindent = 2em - % - % When the entry text needs to be broken, just fill out the first line - % with blank space. - \rightskip = 0pt plus1fil - % - % A bit of stretch before each entry for the benefit of balancing - % columns. - \vskip 0pt plus1pt - % - % Swallow the left brace of the text (first parameter): - \afterassignment\doentry - \let\temp = -} -\def\doentry{% - \bgroup % Instead of the swallowed brace. - \noindent - \aftergroup\finishentry - % And now comes the text of the entry. -} -\def\finishentry#1{% - % #1 is the page number. - % - % The following is kludged to not output a line of dots in the index if - % there are no page numbers. The next person who breaks this will be - % cursed by a Unix daemon. - \def\tempa{{\rm }}% - \def\tempb{#1}% - \edef\tempc{\tempa}% - \edef\tempd{\tempb}% - \ifx\tempc\tempd - \ % - \else - % - % If we must, put the page number on a line of its own, and fill out - % this line with blank space. (The \hfil is overwhelmed with the - % fill leaders glue in \indexdotfill if the page number does fit.) - \hfil\penalty50 - \null\nobreak\indexdotfill % Have leaders before the page number. - % - % The `\ ' here is removed by the implicit \unskip that TeX does as - % part of (the primitive) \par. Without it, a spurious underfull - % \hbox ensues. - \ifpdf - \pdfgettoks#1.% - \ \the\toksA - \else - \ #1% - \fi - \fi - \par - \endgroup -} - -% Like \dotfill except takes at least 1 em. -\def\indexdotfill{\cleaders - \hbox{$\mathsurround=0pt \mkern1.5mu ${\it .}$ \mkern1.5mu$}\hskip 1em plus 1fill} - -\def\primary #1{\line{#1\hfil}} - -\newskip\secondaryindent \secondaryindent=0.5cm -\def\secondary#1#2{{% - \parfillskip=0in - \parskip=0in - \hangindent=1in - \hangafter=1 - \noindent\hskip\secondaryindent\hbox{#1}\indexdotfill - \ifpdf - \pdfgettoks#2.\ \the\toksA % The page number ends the paragraph. - \else - #2 - \fi - \par -}} - -% Define two-column mode, which we use to typeset indexes. -% Adapted from the TeXbook, page 416, which is to say, -% the manmac.tex format used to print the TeXbook itself. -\catcode`\@=11 - -\newbox\partialpage -\newdimen\doublecolumnhsize - -\def\begindoublecolumns{\begingroup % ended by \enddoublecolumns - % Grab any single-column material above us. - \output = {% - % - % Here is a possibility not foreseen in manmac: if we accumulate a - % whole lot of material, we might end up calling this \output - % routine twice in a row (see the doublecol-lose test, which is - % essentially a couple of indexes with @setchapternewpage off). In - % that case we just ship out what is in \partialpage with the normal - % output routine. Generally, \partialpage will be empty when this - % runs and this will be a no-op. See the indexspread.tex test case. - \ifvoid\partialpage \else - \onepageout{\pagecontents\partialpage}% - \fi - % - \global\setbox\partialpage = \vbox{% - % Unvbox the main output page. - \unvbox\PAGE - \kern-\topskip \kern\baselineskip - }% - }% - \eject % run that output routine to set \partialpage - % - % Use the double-column output routine for subsequent pages. - \output = {\doublecolumnout}% - % - % Change the page size parameters. We could do this once outside this - % routine, in each of @smallbook, @afourpaper, and the default 8.5x11 - % format, but then we repeat the same computation. Repeating a couple - % of assignments once per index is clearly meaningless for the - % execution time, so we may as well do it in one place. - % - % First we halve the line length, less a little for the gutter between - % the columns. We compute the gutter based on the line length, so it - % changes automatically with the paper format. The magic constant - % below is chosen so that the gutter has the same value (well, +-<1pt) - % as it did when we hard-coded it. - % - % We put the result in a separate register, \doublecolumhsize, so we - % can restore it in \pagesofar, after \hsize itself has (potentially) - % been clobbered. - % - \doublecolumnhsize = \hsize - \advance\doublecolumnhsize by -.04154\hsize - \divide\doublecolumnhsize by 2 - \hsize = \doublecolumnhsize - % - % Double the \vsize as well. (We don't need a separate register here, - % since nobody clobbers \vsize.) - \vsize = 2\vsize -} - -% The double-column output routine for all double-column pages except -% the last. -% -\def\doublecolumnout{% - \splittopskip=\topskip \splitmaxdepth=\maxdepth - % Get the available space for the double columns -- the normal - % (undoubled) page height minus any material left over from the - % previous page. - \dimen@ = \vsize - \divide\dimen@ by 2 - \advance\dimen@ by -\ht\partialpage - % - % box0 will be the left-hand column, box2 the right. - \setbox0=\vsplit255 to\dimen@ \setbox2=\vsplit255 to\dimen@ - \onepageout\pagesofar - \unvbox255 - \penalty\outputpenalty -} -% -% Re-output the contents of the output page -- any previous material, -% followed by the two boxes we just split, in box0 and box2. -\def\pagesofar{% - \unvbox\partialpage - % - \hsize = \doublecolumnhsize - \wd0=\hsize \wd2=\hsize - \hbox to\pagewidth{\box0\hfil\box2}% -} -% -% All done with double columns. -\def\enddoublecolumns{% - \output = {% - % Split the last of the double-column material. Leave it on the - % current page, no automatic page break. - \balancecolumns - % - % If we end up splitting too much material for the current page, - % though, there will be another page break right after this \output - % invocation ends. Having called \balancecolumns once, we do not - % want to call it again. Therefore, reset \output to its normal - % definition right away. (We hope \balancecolumns will never be - % called on to balance too much material, but if it is, this makes - % the output somewhat more palatable.) - \global\output = {\onepageout{\pagecontents\PAGE}}% - }% - \eject - \endgroup % started in \begindoublecolumns - % - % \pagegoal was set to the doubled \vsize above, since we restarted - % the current page. We're now back to normal single-column - % typesetting, so reset \pagegoal to the normal \vsize (after the - % \endgroup where \vsize got restored). - \pagegoal = \vsize -} -% -% Called at the end of the double column material. -\def\balancecolumns{% - \setbox0 = \vbox{\unvbox255}% like \box255 but more efficient, see p.120. - \dimen@ = \ht0 - \advance\dimen@ by \topskip - \advance\dimen@ by-\baselineskip - \divide\dimen@ by 2 % target to split to - %debug\message{final 2-column material height=\the\ht0, target=\the\dimen@.}% - \splittopskip = \topskip - % Loop until we get a decent breakpoint. - {% - \vbadness = 10000 - \loop - \global\setbox3 = \copy0 - \global\setbox1 = \vsplit3 to \dimen@ - \ifdim\ht3>\dimen@ - \global\advance\dimen@ by 1pt - \repeat - }% - %debug\message{split to \the\dimen@, column heights: \the\ht1, \the\ht3.}% - \setbox0=\vbox to\dimen@{\unvbox1}% - \setbox2=\vbox to\dimen@{\unvbox3}% - % - \pagesofar -} -\catcode`\@ = \other - - -\message{sectioning,} -% Chapters, sections, etc. - -% \unnumberedno is an oxymoron, of course. But we count the unnumbered -% sections so that we can refer to them unambiguously in the pdf -% outlines by their "section number". We avoid collisions with chapter -% numbers by starting them at 10000. (If a document ever has 10000 -% chapters, we're in trouble anyway, I'm sure.) -\newcount\unnumberedno \unnumberedno = 10000 -\newcount\chapno -\newcount\secno \secno=0 -\newcount\subsecno \subsecno=0 -\newcount\subsubsecno \subsubsecno=0 - -% This counter is funny since it counts through charcodes of letters A, B, ... -\newcount\appendixno \appendixno = `\@ -% -% \def\appendixletter{\char\the\appendixno} -% We do the following ugly conditional instead of the above simple -% construct for the sake of pdftex, which needs the actual -% letter in the expansion, not just typeset. -% -\def\appendixletter{% - \ifnum\appendixno=`A A% - \else\ifnum\appendixno=`B B% - \else\ifnum\appendixno=`C C% - \else\ifnum\appendixno=`D D% - \else\ifnum\appendixno=`E E% - \else\ifnum\appendixno=`F F% - \else\ifnum\appendixno=`G G% - \else\ifnum\appendixno=`H H% - \else\ifnum\appendixno=`I I% - \else\ifnum\appendixno=`J J% - \else\ifnum\appendixno=`K K% - \else\ifnum\appendixno=`L L% - \else\ifnum\appendixno=`M M% - \else\ifnum\appendixno=`N N% - \else\ifnum\appendixno=`O O% - \else\ifnum\appendixno=`P P% - \else\ifnum\appendixno=`Q Q% - \else\ifnum\appendixno=`R R% - \else\ifnum\appendixno=`S S% - \else\ifnum\appendixno=`T T% - \else\ifnum\appendixno=`U U% - \else\ifnum\appendixno=`V V% - \else\ifnum\appendixno=`W W% - \else\ifnum\appendixno=`X X% - \else\ifnum\appendixno=`Y Y% - \else\ifnum\appendixno=`Z Z% - % The \the is necessary, despite appearances, because \appendixletter is - % expanded while writing the .toc file. \char\appendixno is not - % expandable, thus it is written literally, thus all appendixes come out - % with the same letter (or @) in the toc without it. - \else\char\the\appendixno - \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi - \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi} - -% Each @chapter defines this as the name of the chapter. -% page headings and footings can use it. @section does likewise. -% However, they are not reliable, because we don't use marks. -\def\thischapter{} -\def\thissection{} - -\newcount\absseclevel % used to calculate proper heading level -\newcount\secbase\secbase=0 % @raisesections/@lowersections modify this count - -% @raisesections: treat @section as chapter, @subsection as section, etc. -\def\raisesections{\global\advance\secbase by -1} -\let\up=\raisesections % original BFox name - -% @lowersections: treat @chapter as section, @section as subsection, etc. -\def\lowersections{\global\advance\secbase by 1} -\let\down=\lowersections % original BFox name - -% we only have subsub. -\chardef\maxseclevel = 3 -% -% A numbered section within an unnumbered changes to unnumbered too. -% To achive this, remember the "biggest" unnum. sec. we are currently in: -\chardef\unmlevel = \maxseclevel -% -% Trace whether the current chapter is an appendix or not: -% \chapheadtype is "N" or "A", unnumbered chapters are ignored. -\def\chapheadtype{N} - -% Choose a heading macro -% #1 is heading type -% #2 is heading level -% #3 is text for heading -\def\genhead#1#2#3{% - % Compute the abs. sec. level: - \absseclevel=#2 - \advance\absseclevel by \secbase - % Make sure \absseclevel doesn't fall outside the range: - \ifnum \absseclevel < 0 - \absseclevel = 0 - \else - \ifnum \absseclevel > 3 - \absseclevel = 3 - \fi - \fi - % The heading type: - \def\headtype{#1}% - \if \headtype U% - \ifnum \absseclevel < \unmlevel - \chardef\unmlevel = \absseclevel - \fi - \else - % Check for appendix sections: - \ifnum \absseclevel = 0 - \edef\chapheadtype{\headtype}% - \else - \if \headtype A\if \chapheadtype N% - \errmessage{@appendix... within a non-appendix chapter}% - \fi\fi - \fi - % Check for numbered within unnumbered: - \ifnum \absseclevel > \unmlevel - \def\headtype{U}% - \else - \chardef\unmlevel = 3 - \fi - \fi - % Now print the heading: - \if \headtype U% - \ifcase\absseclevel - \unnumberedzzz{#3}% - \or \unnumberedseczzz{#3}% - \or \unnumberedsubseczzz{#3}% - \or \unnumberedsubsubseczzz{#3}% - \fi - \else - \if \headtype A% - \ifcase\absseclevel - \appendixzzz{#3}% - \or \appendixsectionzzz{#3}% - \or \appendixsubseczzz{#3}% - \or \appendixsubsubseczzz{#3}% - \fi - \else - \ifcase\absseclevel - \chapterzzz{#3}% - \or \seczzz{#3}% - \or \numberedsubseczzz{#3}% - \or \numberedsubsubseczzz{#3}% - \fi - \fi - \fi - \suppressfirstparagraphindent -} - -% an interface: -\def\numhead{\genhead N} -\def\apphead{\genhead A} -\def\unnmhead{\genhead U} - -% @chapter, @appendix, @unnumbered. Increment top-level counter, reset -% all lower-level sectioning counters to zero. -% -% Also set \chaplevelprefix, which we prepend to @float sequence numbers -% (e.g., figures), q.v. By default (before any chapter), that is empty. -\let\chaplevelprefix = \empty -% -\outer\parseargdef\chapter{\numhead0{#1}} % normally numhead0 calls chapterzzz -\def\chapterzzz#1{% - % section resetting is \global in case the chapter is in a group, such - % as an @include file. - \global\secno=0 \global\subsecno=0 \global\subsubsecno=0 - \global\advance\chapno by 1 - % - % Used for \float. - \gdef\chaplevelprefix{\the\chapno.}% - \resetallfloatnos - % - \message{\putwordChapter\space \the\chapno}% - % - % Write the actual heading. - \chapmacro{#1}{Ynumbered}{\the\chapno}% - % - % So @section and the like are numbered underneath this chapter. - \global\let\section = \numberedsec - \global\let\subsection = \numberedsubsec - \global\let\subsubsection = \numberedsubsubsec -} - -\outer\parseargdef\appendix{\apphead0{#1}} % normally apphead0 calls appendixzzz -\def\appendixzzz#1{% - \global\secno=0 \global\subsecno=0 \global\subsubsecno=0 - \global\advance\appendixno by 1 - \gdef\chaplevelprefix{\appendixletter.}% - \resetallfloatnos - % - \def\appendixnum{\putwordAppendix\space \appendixletter}% - \message{\appendixnum}% - % - \chapmacro{#1}{Yappendix}{\appendixletter}% - % - \global\let\section = \appendixsec - \global\let\subsection = \appendixsubsec - \global\let\subsubsection = \appendixsubsubsec -} - -\outer\parseargdef\unnumbered{\unnmhead0{#1}} % normally unnmhead0 calls unnumberedzzz -\def\unnumberedzzz#1{% - \global\secno=0 \global\subsecno=0 \global\subsubsecno=0 - \global\advance\unnumberedno by 1 - % - % Since an unnumbered has no number, no prefix for figures. - \global\let\chaplevelprefix = \empty - \resetallfloatnos - % - % This used to be simply \message{#1}, but TeX fully expands the - % argument to \message. Therefore, if #1 contained @-commands, TeX - % expanded them. For example, in `@unnumbered The @cite{Book}', TeX - % expanded @cite (which turns out to cause errors because \cite is meant - % to be executed, not expanded). - % - % Anyway, we don't want the fully-expanded definition of @cite to appear - % as a result of the \message, we just want `@cite' itself. We use - % \the to achieve this: TeX expands \the only once, - % simply yielding the contents of . (We also do this for - % the toc entries.) - \toks0 = {#1}% - \message{(\the\toks0)}% - % - \chapmacro{#1}{Ynothing}{\the\unnumberedno}% - % - \global\let\section = \unnumberedsec - \global\let\subsection = \unnumberedsubsec - \global\let\subsubsection = \unnumberedsubsubsec -} - -% @centerchap is like @unnumbered, but the heading is centered. -\outer\parseargdef\centerchap{% - % Well, we could do the following in a group, but that would break - % an assumption that \chapmacro is called at the outermost level. - % Thus we are safer this way: --kasal, 24feb04 - \let\centerparametersmaybe = \centerparameters - \unnmhead0{#1}% - \let\centerparametersmaybe = \relax -} - -% @top is like @unnumbered. -\let\top\unnumbered - -% Sections. -\outer\parseargdef\numberedsec{\numhead1{#1}} % normally calls seczzz -\def\seczzz#1{% - \global\subsecno=0 \global\subsubsecno=0 \global\advance\secno by 1 - \sectionheading{#1}{sec}{Ynumbered}{\the\chapno.\the\secno}% -} - -\outer\parseargdef\appendixsection{\apphead1{#1}} % normally calls appendixsectionzzz -\def\appendixsectionzzz#1{% - \global\subsecno=0 \global\subsubsecno=0 \global\advance\secno by 1 - \sectionheading{#1}{sec}{Yappendix}{\appendixletter.\the\secno}% -} -\let\appendixsec\appendixsection - -\outer\parseargdef\unnumberedsec{\unnmhead1{#1}} % normally calls unnumberedseczzz -\def\unnumberedseczzz#1{% - \global\subsecno=0 \global\subsubsecno=0 \global\advance\secno by 1 - \sectionheading{#1}{sec}{Ynothing}{\the\unnumberedno.\the\secno}% -} - -% Subsections. -\outer\parseargdef\numberedsubsec{\numhead2{#1}} % normally calls numberedsubseczzz -\def\numberedsubseczzz#1{% - \global\subsubsecno=0 \global\advance\subsecno by 1 - \sectionheading{#1}{subsec}{Ynumbered}{\the\chapno.\the\secno.\the\subsecno}% -} - -\outer\parseargdef\appendixsubsec{\apphead2{#1}} % normally calls appendixsubseczzz -\def\appendixsubseczzz#1{% - \global\subsubsecno=0 \global\advance\subsecno by 1 - \sectionheading{#1}{subsec}{Yappendix}% - {\appendixletter.\the\secno.\the\subsecno}% -} - -\outer\parseargdef\unnumberedsubsec{\unnmhead2{#1}} %normally calls unnumberedsubseczzz -\def\unnumberedsubseczzz#1{% - \global\subsubsecno=0 \global\advance\subsecno by 1 - \sectionheading{#1}{subsec}{Ynothing}% - {\the\unnumberedno.\the\secno.\the\subsecno}% -} - -% Subsubsections. -\outer\parseargdef\numberedsubsubsec{\numhead3{#1}} % normally numberedsubsubseczzz -\def\numberedsubsubseczzz#1{% - \global\advance\subsubsecno by 1 - \sectionheading{#1}{subsubsec}{Ynumbered}% - {\the\chapno.\the\secno.\the\subsecno.\the\subsubsecno}% -} - -\outer\parseargdef\appendixsubsubsec{\apphead3{#1}} % normally appendixsubsubseczzz -\def\appendixsubsubseczzz#1{% - \global\advance\subsubsecno by 1 - \sectionheading{#1}{subsubsec}{Yappendix}% - {\appendixletter.\the\secno.\the\subsecno.\the\subsubsecno}% -} - -\outer\parseargdef\unnumberedsubsubsec{\unnmhead3{#1}} %normally unnumberedsubsubseczzz -\def\unnumberedsubsubseczzz#1{% - \global\advance\subsubsecno by 1 - \sectionheading{#1}{subsubsec}{Ynothing}% - {\the\unnumberedno.\the\secno.\the\subsecno.\the\subsubsecno}% -} - -% These macros control what the section commands do, according -% to what kind of chapter we are in (ordinary, appendix, or unnumbered). -% Define them by default for a numbered chapter. -\let\section = \numberedsec -\let\subsection = \numberedsubsec -\let\subsubsection = \numberedsubsubsec - -% Define @majorheading, @heading and @subheading - -% NOTE on use of \vbox for chapter headings, section headings, and such: -% 1) We use \vbox rather than the earlier \line to permit -% overlong headings to fold. -% 2) \hyphenpenalty is set to 10000 because hyphenation in a -% heading is obnoxious; this forbids it. -% 3) Likewise, headings look best if no \parindent is used, and -% if justification is not attempted. Hence \raggedright. - - -\def\majorheading{% - {\advance\chapheadingskip by 10pt \chapbreak }% - \parsearg\chapheadingzzz -} - -\def\chapheading{\chapbreak \parsearg\chapheadingzzz} -\def\chapheadingzzz#1{% - {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 - \parindent=0pt\raggedright - \rm #1\hfill}}% - \bigskip \par\penalty 200\relax - \suppressfirstparagraphindent -} - -% @heading, @subheading, @subsubheading. -\parseargdef\heading{\sectionheading{#1}{sec}{Yomitfromtoc}{} - \suppressfirstparagraphindent} -\parseargdef\subheading{\sectionheading{#1}{subsec}{Yomitfromtoc}{} - \suppressfirstparagraphindent} -\parseargdef\subsubheading{\sectionheading{#1}{subsubsec}{Yomitfromtoc}{} - \suppressfirstparagraphindent} - -% These macros generate a chapter, section, etc. heading only -% (including whitespace, linebreaking, etc. around it), -% given all the information in convenient, parsed form. - -%%% Args are the skip and penalty (usually negative) -\def\dobreak#1#2{\par\ifdim\lastskip<#1\removelastskip\penalty#2\vskip#1\fi} - -%%% Define plain chapter starts, and page on/off switching for it -% Parameter controlling skip before chapter headings (if needed) - -\newskip\chapheadingskip - -\def\chapbreak{\dobreak \chapheadingskip {-4000}} -\def\chappager{\par\vfill\supereject} -\def\chapoddpage{\chappager \ifodd\pageno \else \hbox to 0pt{} \chappager\fi} - -\def\setchapternewpage #1 {\csname CHAPPAG#1\endcsname} - -\def\CHAPPAGoff{% -\global\let\contentsalignmacro = \chappager -\global\let\pchapsepmacro=\chapbreak -\global\let\pagealignmacro=\chappager} - -\def\CHAPPAGon{% -\global\let\contentsalignmacro = \chappager -\global\let\pchapsepmacro=\chappager -\global\let\pagealignmacro=\chappager -\global\def\HEADINGSon{\HEADINGSsingle}} - -\def\CHAPPAGodd{% -\global\let\contentsalignmacro = \chapoddpage -\global\let\pchapsepmacro=\chapoddpage -\global\let\pagealignmacro=\chapoddpage -\global\def\HEADINGSon{\HEADINGSdouble}} - -\CHAPPAGon - -% Chapter opening. -% -% #1 is the text, #2 is the section type (Ynumbered, Ynothing, -% Yappendix, Yomitfromtoc), #3 the chapter number. -% -% To test against our argument. -\def\Ynothingkeyword{Ynothing} -\def\Yomitfromtockeyword{Yomitfromtoc} -\def\Yappendixkeyword{Yappendix} -% -\def\chapmacro#1#2#3{% - \pchapsepmacro - {% - \chapfonts \rm - % - % Have to define \thissection before calling \donoderef, because the - % xref code eventually uses it. On the other hand, it has to be called - % after \pchapsepmacro, or the headline will change too soon. - \gdef\thissection{#1}% - \gdef\thischaptername{#1}% - % - % Only insert the separating space if we have a chapter/appendix - % number, and don't print the unnumbered ``number''. - \def\temptype{#2}% - \ifx\temptype\Ynothingkeyword - \setbox0 = \hbox{}% - \def\toctype{unnchap}% - \gdef\thischapter{#1}% - \else\ifx\temptype\Yomitfromtockeyword - \setbox0 = \hbox{}% contents like unnumbered, but no toc entry - \def\toctype{omit}% - \gdef\thischapter{}% - \else\ifx\temptype\Yappendixkeyword - \setbox0 = \hbox{\putwordAppendix{} #3\enspace}% - \def\toctype{app}% - % We don't substitute the actual chapter name into \thischapter - % because we don't want its macros evaluated now. And we don't - % use \thissection because that changes with each section. - % - \xdef\thischapter{\putwordAppendix{} \appendixletter: - \noexpand\thischaptername}% - \else - \setbox0 = \hbox{#3\enspace}% - \def\toctype{numchap}% - \xdef\thischapter{\putwordChapter{} \the\chapno: - \noexpand\thischaptername}% - \fi\fi\fi - % - % Write the toc entry for this chapter. Must come before the - % \donoderef, because we include the current node name in the toc - % entry, and \donoderef resets it to empty. - \writetocentry{\toctype}{#1}{#3}% - % - % For pdftex, we have to write out the node definition (aka, make - % the pdfdest) after any page break, but before the actual text has - % been typeset. If the destination for the pdf outline is after the - % text, then jumping from the outline may wind up with the text not - % being visible, for instance under high magnification. - \donoderef{#2}% - % - % Typeset the actual heading. - \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \raggedright - \hangindent=\wd0 \centerparametersmaybe - \unhbox0 #1\par}% - }% - \nobreak\bigskip % no page break after a chapter title - \nobreak -} - -% @centerchap -- centered and unnumbered. -\let\centerparametersmaybe = \relax -\def\centerparameters{% - \advance\rightskip by 3\rightskip - \leftskip = \rightskip - \parfillskip = 0pt -} - - -% I don't think this chapter style is supported any more, so I'm not -% updating it with the new noderef stuff. We'll see. --karl, 11aug03. -% -\def\setchapterstyle #1 {\csname CHAPF#1\endcsname} -% -\def\unnchfopen #1{% -\chapoddpage {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 - \parindent=0pt\raggedright - \rm #1\hfill}}\bigskip \par\nobreak -} -\def\chfopen #1#2{\chapoddpage {\chapfonts -\vbox to 3in{\vfil \hbox to\hsize{\hfil #2} \hbox to\hsize{\hfil #1} \vfil}}% -\par\penalty 5000 % -} -\def\centerchfopen #1{% -\chapoddpage {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 - \parindent=0pt - \hfill {\rm #1}\hfill}}\bigskip \par\nobreak -} -\def\CHAPFopen{% - \global\let\chapmacro=\chfopen - \global\let\centerchapmacro=\centerchfopen} - - -% Section titles. These macros combine the section number parts and -% call the generic \sectionheading to do the printing. -% -\newskip\secheadingskip -\def\secheadingbreak{\dobreak \secheadingskip{-1000}} - -% Subsection titles. -\newskip\subsecheadingskip -\def\subsecheadingbreak{\dobreak \subsecheadingskip{-500}} - -% Subsubsection titles. -\def\subsubsecheadingskip{\subsecheadingskip} -\def\subsubsecheadingbreak{\subsecheadingbreak} - - -% Print any size, any type, section title. -% -% #1 is the text, #2 is the section level (sec/subsec/subsubsec), #3 is -% the section type for xrefs (Ynumbered, Ynothing, Yappendix), #4 is the -% section number. -% -\def\sectionheading#1#2#3#4{% - {% - % Switch to the right set of fonts. - \csname #2fonts\endcsname \rm - % - % Insert space above the heading. - \csname #2headingbreak\endcsname - % - % Only insert the space after the number if we have a section number. - \def\sectionlevel{#2}% - \def\temptype{#3}% - % - \ifx\temptype\Ynothingkeyword - \setbox0 = \hbox{}% - \def\toctype{unn}% - \gdef\thissection{#1}% - \else\ifx\temptype\Yomitfromtockeyword - % for @headings -- no section number, don't include in toc, - % and don't redefine \thissection. - \setbox0 = \hbox{}% - \def\toctype{omit}% - \let\sectionlevel=\empty - \else\ifx\temptype\Yappendixkeyword - \setbox0 = \hbox{#4\enspace}% - \def\toctype{app}% - \gdef\thissection{#1}% - \else - \setbox0 = \hbox{#4\enspace}% - \def\toctype{num}% - \gdef\thissection{#1}% - \fi\fi\fi - % - % Write the toc entry (before \donoderef). See comments in \chfplain. - \writetocentry{\toctype\sectionlevel}{#1}{#4}% - % - % Write the node reference (= pdf destination for pdftex). - % Again, see comments in \chfplain. - \donoderef{#3}% - % - % Output the actual section heading. - \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \raggedright - \hangindent=\wd0 % zero if no section number - \unhbox0 #1}% - }% - % Add extra space after the heading -- half of whatever came above it. - % Don't allow stretch, though. - \kern .5 \csname #2headingskip\endcsname - % - % Do not let the kern be a potential breakpoint, as it would be if it - % was followed by glue. - \nobreak - % - % We'll almost certainly start a paragraph next, so don't let that - % glue accumulate. (Not a breakpoint because it's preceded by a - % discardable item.) - \vskip-\parskip - % - % This is purely so the last item on the list is a known \penalty > - % 10000. This is so \startdefun can avoid allowing breakpoints after - % section headings. Otherwise, it would insert a valid breakpoint between: - % - % @section sec-whatever - % @deffn def-whatever - \penalty 10001 -} - - -\message{toc,} -% Table of contents. -\newwrite\tocfile - -% Write an entry to the toc file, opening it if necessary. -% Called from @chapter, etc. -% -% Example usage: \writetocentry{sec}{Section Name}{\the\chapno.\the\secno} -% We append the current node name (if any) and page number as additional -% arguments for the \{chap,sec,...}entry macros which will eventually -% read this. The node name is used in the pdf outlines as the -% destination to jump to. -% -% We open the .toc file for writing here instead of at @setfilename (or -% any other fixed time) so that @contents can be anywhere in the document. -% But if #1 is `omit', then we don't do anything. This is used for the -% table of contents chapter openings themselves. -% -\newif\iftocfileopened -\def\omitkeyword{omit}% -% -\def\writetocentry#1#2#3{% - \edef\writetoctype{#1}% - \ifx\writetoctype\omitkeyword \else - \iftocfileopened\else - \immediate\openout\tocfile = \jobname.toc - \global\tocfileopenedtrue - \fi - % - \iflinks - {\atdummies - \edef\temp{% - \write\tocfile{@#1entry{#2}{#3}{\lastnode}{\noexpand\folio}}}% - \temp - } - \fi - \fi - % - % Tell \shipout to create a pdf destination on each page, if we're - % writing pdf. These are used in the table of contents. We can't - % just write one on every page because the title pages are numbered - % 1 and 2 (the page numbers aren't printed), and so are the first - % two pages of the document. Thus, we'd have two destinations named - % `1', and two named `2'. - \ifpdf \global\pdfmakepagedesttrue \fi -} - - -% These characters do not print properly in the Computer Modern roman -% fonts, so we must take special care. This is more or less redundant -% with the Texinfo input format setup at the end of this file. -% -\def\activecatcodes{% - \catcode`\"=\active - \catcode`\$=\active - \catcode`\<=\active - \catcode`\>=\active - \catcode`\\=\active - \catcode`\^=\active - \catcode`\_=\active - \catcode`\|=\active - \catcode`\~=\active -} - - -% Read the toc file, which is essentially Texinfo input. -\def\readtocfile{% - \setupdatafile - \activecatcodes - \input \jobname.toc -} - -\newskip\contentsrightmargin \contentsrightmargin=1in -\newcount\savepageno -\newcount\lastnegativepageno \lastnegativepageno = -1 - -% Prepare to read what we've written to \tocfile. -% -\def\startcontents#1{% - % If @setchapternewpage on, and @headings double, the contents should - % start on an odd page, unlike chapters. Thus, we maintain - % \contentsalignmacro in parallel with \pagealignmacro. - % From: Torbjorn Granlund - \contentsalignmacro - \immediate\closeout\tocfile - % - % Don't need to put `Contents' or `Short Contents' in the headline. - % It is abundantly clear what they are. - \def\thischapter{}% - \chapmacro{#1}{Yomitfromtoc}{}% - % - \savepageno = \pageno - \begingroup % Set up to handle contents files properly. - \raggedbottom % Worry more about breakpoints than the bottom. - \advance\hsize by -\contentsrightmargin % Don't use the full line length. - % - % Roman numerals for page numbers. - \ifnum \pageno>0 \global\pageno = \lastnegativepageno \fi -} - - -% Normal (long) toc. -\def\contents{% - \startcontents{\putwordTOC}% - \openin 1 \jobname.toc - \ifeof 1 \else - \readtocfile - \fi - \vfill \eject - \contentsalignmacro % in case @setchapternewpage odd is in effect - \ifeof 1 \else - \pdfmakeoutlines - \fi - \closein 1 - \endgroup - \lastnegativepageno = \pageno - \global\pageno = \savepageno -} - -% And just the chapters. -\def\summarycontents{% - \startcontents{\putwordShortTOC}% - % - \let\numchapentry = \shortchapentry - \let\appentry = \shortchapentry - \let\unnchapentry = \shortunnchapentry - % We want a true roman here for the page numbers. - \secfonts - \let\rm=\shortcontrm \let\bf=\shortcontbf - \let\sl=\shortcontsl \let\tt=\shortconttt - \rm - \hyphenpenalty = 10000 - \advance\baselineskip by 1pt % Open it up a little. - \def\numsecentry##1##2##3##4{} - \let\appsecentry = \numsecentry - \let\unnsecentry = \numsecentry - \let\numsubsecentry = \numsecentry - \let\appsubsecentry = \numsecentry - \let\unnsubsecentry = \numsecentry - \let\numsubsubsecentry = \numsecentry - \let\appsubsubsecentry = \numsecentry - \let\unnsubsubsecentry = \numsecentry - \openin 1 \jobname.toc - \ifeof 1 \else - \readtocfile - \fi - \closein 1 - \vfill \eject - \contentsalignmacro % in case @setchapternewpage odd is in effect - \endgroup - \lastnegativepageno = \pageno - \global\pageno = \savepageno -} -\let\shortcontents = \summarycontents - -% Typeset the label for a chapter or appendix for the short contents. -% The arg is, e.g., `A' for an appendix, or `3' for a chapter. -% -\def\shortchaplabel#1{% - % This space should be enough, since a single number is .5em, and the - % widest letter (M) is 1em, at least in the Computer Modern fonts. - % But use \hss just in case. - % (This space doesn't include the extra space that gets added after - % the label; that gets put in by \shortchapentry above.) - % - % We'd like to right-justify chapter numbers, but that looks strange - % with appendix letters. And right-justifying numbers and - % left-justifying letters looks strange when there is less than 10 - % chapters. Have to read the whole toc once to know how many chapters - % there are before deciding ... - \hbox to 1em{#1\hss}% -} - -% These macros generate individual entries in the table of contents. -% The first argument is the chapter or section name. -% The last argument is the page number. -% The arguments in between are the chapter number, section number, ... - -% Chapters, in the main contents. -\def\numchapentry#1#2#3#4{\dochapentry{#2\labelspace#1}{#4}} -% -% Chapters, in the short toc. -% See comments in \dochapentry re vbox and related settings. -\def\shortchapentry#1#2#3#4{% - \tocentry{\shortchaplabel{#2}\labelspace #1}{\doshortpageno\bgroup#4\egroup}% -} - -% Appendices, in the main contents. -% Need the word Appendix, and a fixed-size box. -% -\def\appendixbox#1{% - % We use M since it's probably the widest letter. - \setbox0 = \hbox{\putwordAppendix{} M}% - \hbox to \wd0{\putwordAppendix{} #1\hss}} -% -\def\appentry#1#2#3#4{\dochapentry{\appendixbox{#2}\labelspace#1}{#4}} - -% Unnumbered chapters. -\def\unnchapentry#1#2#3#4{\dochapentry{#1}{#4}} -\def\shortunnchapentry#1#2#3#4{\tocentry{#1}{\doshortpageno\bgroup#4\egroup}} - -% Sections. -\def\numsecentry#1#2#3#4{\dosecentry{#2\labelspace#1}{#4}} -\let\appsecentry=\numsecentry -\def\unnsecentry#1#2#3#4{\dosecentry{#1}{#4}} - -% Subsections. -\def\numsubsecentry#1#2#3#4{\dosubsecentry{#2\labelspace#1}{#4}} -\let\appsubsecentry=\numsubsecentry -\def\unnsubsecentry#1#2#3#4{\dosubsecentry{#1}{#4}} - -% And subsubsections. -\def\numsubsubsecentry#1#2#3#4{\dosubsubsecentry{#2\labelspace#1}{#4}} -\let\appsubsubsecentry=\numsubsubsecentry -\def\unnsubsubsecentry#1#2#3#4{\dosubsubsecentry{#1}{#4}} - -% This parameter controls the indentation of the various levels. -% Same as \defaultparindent. -\newdimen\tocindent \tocindent = 15pt - -% Now for the actual typesetting. In all these, #1 is the text and #2 is the -% page number. -% -% If the toc has to be broken over pages, we want it to be at chapters -% if at all possible; hence the \penalty. -\def\dochapentry#1#2{% - \penalty-300 \vskip1\baselineskip plus.33\baselineskip minus.25\baselineskip - \begingroup - \chapentryfonts - \tocentry{#1}{\dopageno\bgroup#2\egroup}% - \endgroup - \nobreak\vskip .25\baselineskip plus.1\baselineskip -} - -\def\dosecentry#1#2{\begingroup - \secentryfonts \leftskip=\tocindent - \tocentry{#1}{\dopageno\bgroup#2\egroup}% -\endgroup} - -\def\dosubsecentry#1#2{\begingroup - \subsecentryfonts \leftskip=2\tocindent - \tocentry{#1}{\dopageno\bgroup#2\egroup}% -\endgroup} - -\def\dosubsubsecentry#1#2{\begingroup - \subsubsecentryfonts \leftskip=3\tocindent - \tocentry{#1}{\dopageno\bgroup#2\egroup}% -\endgroup} - -% We use the same \entry macro as for the index entries. -\let\tocentry = \entry - -% Space between chapter (or whatever) number and the title. -\def\labelspace{\hskip1em \relax} - -\def\dopageno#1{{\rm #1}} -\def\doshortpageno#1{{\rm #1}} - -\def\chapentryfonts{\secfonts \rm} -\def\secentryfonts{\textfonts} -\def\subsecentryfonts{\textfonts} -\def\subsubsecentryfonts{\textfonts} - - -\message{environments,} -% @foo ... @end foo. - -% @point{}, @result{}, @expansion{}, @print{}, @equiv{}. -% -% Since these characters are used in examples, it should be an even number of -% \tt widths. Each \tt character is 1en, so two makes it 1em. -% -\def\point{$\star$} -\def\result{\leavevmode\raise.15ex\hbox to 1em{\hfil$\Rightarrow$\hfil}} -\def\expansion{\leavevmode\raise.1ex\hbox to 1em{\hfil$\mapsto$\hfil}} -\def\print{\leavevmode\lower.1ex\hbox to 1em{\hfil$\dashv$\hfil}} -\def\equiv{\leavevmode\lower.1ex\hbox to 1em{\hfil$\ptexequiv$\hfil}} - -% The @error{} command. -% Adapted from the TeXbook's \boxit. -% -\newbox\errorbox -% -{\tentt \global\dimen0 = 3em}% Width of the box. -\dimen2 = .55pt % Thickness of rules -% The text. (`r' is open on the right, `e' somewhat less so on the left.) -\setbox0 = \hbox{\kern-.75pt \tensf error\kern-1.5pt} -% -\setbox\errorbox=\hbox to \dimen0{\hfil - \hsize = \dimen0 \advance\hsize by -5.8pt % Space to left+right. - \advance\hsize by -2\dimen2 % Rules. - \vbox{% - \hrule height\dimen2 - \hbox{\vrule width\dimen2 \kern3pt % Space to left of text. - \vtop{\kern2.4pt \box0 \kern2.4pt}% Space above/below. - \kern3pt\vrule width\dimen2}% Space to right. - \hrule height\dimen2} - \hfil} -% -\def\error{\leavevmode\lower.7ex\copy\errorbox} - -% @tex ... @end tex escapes into raw Tex temporarily. -% One exception: @ is still an escape character, so that @end tex works. -% But \@ or @@ will get a plain tex @ character. - -\envdef\tex{% - \catcode `\\=0 \catcode `\{=1 \catcode `\}=2 - \catcode `\$=3 \catcode `\&=4 \catcode `\#=6 - \catcode `\^=7 \catcode `\_=8 \catcode `\~=\active \let~=\tie - \catcode `\%=14 - \catcode `\+=\other - \catcode `\"=\other - \catcode `\|=\other - \catcode `\<=\other - \catcode `\>=\other - \escapechar=`\\ - % - \let\b=\ptexb - \let\bullet=\ptexbullet - \let\c=\ptexc - \let\,=\ptexcomma - \let\.=\ptexdot - \let\dots=\ptexdots - \let\equiv=\ptexequiv - \let\!=\ptexexclam - \let\i=\ptexi - \let\indent=\ptexindent - \let\noindent=\ptexnoindent - \let\{=\ptexlbrace - \let\+=\tabalign - \let\}=\ptexrbrace - \let\/=\ptexslash - \let\*=\ptexstar - \let\t=\ptext - \let\frenchspacing=\plainfrenchspacing - % - \def\endldots{\mathinner{\ldots\ldots\ldots\ldots}}% - \def\enddots{\relax\ifmmode\endldots\else$\mathsurround=0pt \endldots\,$\fi}% - \def\@{@}% -} -% There is no need to define \Etex. - -% Define @lisp ... @end lisp. -% @lisp environment forms a group so it can rebind things, -% including the definition of @end lisp (which normally is erroneous). - -% Amount to narrow the margins by for @lisp. -\newskip\lispnarrowing \lispnarrowing=0.4in - -% This is the definition that ^^M gets inside @lisp, @example, and other -% such environments. \null is better than a space, since it doesn't -% have any width. -\def\lisppar{\null\endgraf} - -% This space is always present above and below environments. -\newskip\envskipamount \envskipamount = 0pt - -% Make spacing and below environment symmetrical. We use \parskip here -% to help in doing that, since in @example-like environments \parskip -% is reset to zero; thus the \afterenvbreak inserts no space -- but the -% start of the next paragraph will insert \parskip. -% -\def\aboveenvbreak{{% - % =10000 instead of <10000 because of a special case in \itemzzz and - % \sectionheading, q.v. - \ifnum \lastpenalty=10000 \else - \advance\envskipamount by \parskip - \endgraf - \ifdim\lastskip<\envskipamount - \removelastskip - % it's not a good place to break if the last penalty was \nobreak - % or better ... - \ifnum\lastpenalty<10000 \penalty-50 \fi - \vskip\envskipamount - \fi - \fi -}} - -\let\afterenvbreak = \aboveenvbreak - -% \nonarrowing is a flag. If "set", @lisp etc don't narrow margins; it will -% also clear it, so that its embedded environments do the narrowing again. -\let\nonarrowing=\relax - -% @cartouche ... @end cartouche: draw rectangle w/rounded corners around -% environment contents. -\font\circle=lcircle10 -\newdimen\circthick -\newdimen\cartouter\newdimen\cartinner -\newskip\normbskip\newskip\normpskip\newskip\normlskip -\circthick=\fontdimen8\circle -% -\def\ctl{{\circle\char'013\hskip -6pt}}% 6pt from pl file: 1/2charwidth -\def\ctr{{\hskip 6pt\circle\char'010}} -\def\cbl{{\circle\char'012\hskip -6pt}} -\def\cbr{{\hskip 6pt\circle\char'011}} -\def\carttop{\hbox to \cartouter{\hskip\lskip - \ctl\leaders\hrule height\circthick\hfil\ctr - \hskip\rskip}} -\def\cartbot{\hbox to \cartouter{\hskip\lskip - \cbl\leaders\hrule height\circthick\hfil\cbr - \hskip\rskip}} -% -\newskip\lskip\newskip\rskip - -\envdef\cartouche{% - \ifhmode\par\fi % can't be in the midst of a paragraph. - \startsavinginserts - \lskip=\leftskip \rskip=\rightskip - \leftskip=0pt\rightskip=0pt % we want these *outside*. - \cartinner=\hsize \advance\cartinner by-\lskip - \advance\cartinner by-\rskip - \cartouter=\hsize - \advance\cartouter by 18.4pt % allow for 3pt kerns on either - % side, and for 6pt waste from - % each corner char, and rule thickness - \normbskip=\baselineskip \normpskip=\parskip \normlskip=\lineskip - % Flag to tell @lisp, etc., not to narrow margin. - \let\nonarrowing = t% - \vbox\bgroup - \baselineskip=0pt\parskip=0pt\lineskip=0pt - \carttop - \hbox\bgroup - \hskip\lskip - \vrule\kern3pt - \vbox\bgroup - \kern3pt - \hsize=\cartinner - \baselineskip=\normbskip - \lineskip=\normlskip - \parskip=\normpskip - \vskip -\parskip - \comment % For explanation, see the end of \def\group. -} -\def\Ecartouche{% - \ifhmode\par\fi - \kern3pt - \egroup - \kern3pt\vrule - \hskip\rskip - \egroup - \cartbot - \egroup - \checkinserts -} - - -% This macro is called at the beginning of all the @example variants, -% inside a group. -\def\nonfillstart{% - \aboveenvbreak - \hfuzz = 12pt % Don't be fussy - \sepspaces % Make spaces be word-separators rather than space tokens. - \let\par = \lisppar % don't ignore blank lines - \obeylines % each line of input is a line of output - \parskip = 0pt - \parindent = 0pt - \emergencystretch = 0pt % don't try to avoid overfull boxes - \ifx\nonarrowing\relax - \advance \leftskip by \lispnarrowing - \exdentamount=\lispnarrowing - \else - \let\nonarrowing = \relax - \fi - \let\exdent=\nofillexdent -} - -% If you want all examples etc. small: @set dispenvsize small. -% If you want even small examples the full size: @set dispenvsize nosmall. -% This affects the following displayed environments: -% @example, @display, @format, @lisp -% -\def\smallword{small} -\def\nosmallword{nosmall} -\let\SETdispenvsize\relax -\def\setnormaldispenv{% - \ifx\SETdispenvsize\smallword - \smallexamplefonts \rm - \fi -} -\def\setsmalldispenv{% - \ifx\SETdispenvsize\nosmallword - \else - \smallexamplefonts \rm - \fi -} - -% We often define two environments, @foo and @smallfoo. -% Let's do it by one command: -\def\makedispenv #1#2{ - \expandafter\envdef\csname#1\endcsname {\setnormaldispenv #2} - \expandafter\envdef\csname small#1\endcsname {\setsmalldispenv #2} - \expandafter\let\csname E#1\endcsname \afterenvbreak - \expandafter\let\csname Esmall#1\endcsname \afterenvbreak -} - -% Define two synonyms: -\def\maketwodispenvs #1#2#3{ - \makedispenv{#1}{#3} - \makedispenv{#2}{#3} -} - -% @lisp: indented, narrowed, typewriter font; @example: same as @lisp. -% -% @smallexample and @smalllisp: use smaller fonts. -% Originally contributed by Pavel@xerox. -% -\maketwodispenvs {lisp}{example}{% - \nonfillstart - \tt - \let\kbdfont = \kbdexamplefont % Allow @kbd to do something special. - \gobble % eat return -} - -% @display/@smalldisplay: same as @lisp except keep current font. -% -\makedispenv {display}{% - \nonfillstart - \gobble -} - -% @format/@smallformat: same as @display except don't narrow margins. -% -\makedispenv{format}{% - \let\nonarrowing = t% - \nonfillstart - \gobble -} - -% @flushleft: same as @format, but doesn't obey \SETdispenvsize. -\envdef\flushleft{% - \let\nonarrowing = t% - \nonfillstart - \gobble -} -\let\Eflushleft = \afterenvbreak - -% @flushright. -% -\envdef\flushright{% - \let\nonarrowing = t% - \nonfillstart - \advance\leftskip by 0pt plus 1fill - \gobble -} -\let\Eflushright = \afterenvbreak - - -% @quotation does normal linebreaking (hence we can't use \nonfillstart) -% and narrows the margins. We keep \parskip nonzero in general, since -% we're doing normal filling. So, when using \aboveenvbreak and -% \afterenvbreak, temporarily make \parskip 0. -% -\envdef\quotation{% - {\parskip=0pt \aboveenvbreak}% because \aboveenvbreak inserts \parskip - \parindent=0pt - % - % @cartouche defines \nonarrowing to inhibit narrowing at next level down. - \ifx\nonarrowing\relax - \advance\leftskip by \lispnarrowing - \advance\rightskip by \lispnarrowing - \exdentamount = \lispnarrowing - \else - \let\nonarrowing = \relax - \fi - \parsearg\quotationlabel -} - -% We have retained a nonzero parskip for the environment, since we're -% doing normal filling. -% -\def\Equotation{% - \par - \ifx\quotationauthor\undefined\else - % indent a bit. - \leftline{\kern 2\leftskip \sl ---\quotationauthor}% - \fi - {\parskip=0pt \afterenvbreak}% -} - -% If we're given an argument, typeset it in bold with a colon after. -\def\quotationlabel#1{% - \def\temp{#1}% - \ifx\temp\empty \else - {\bf #1: }% - \fi -} - - -% LaTeX-like @verbatim...@end verbatim and @verb{...} -% If we want to allow any as delimiter, -% we need the curly braces so that makeinfo sees the @verb command, eg: -% `@verbx...x' would look like the '@verbx' command. --janneke@gnu.org -% -% [Knuth]: Donald Ervin Knuth, 1996. The TeXbook. -% -% [Knuth] p.344; only we need to do the other characters Texinfo sets -% active too. Otherwise, they get lost as the first character on a -% verbatim line. -\def\dospecials{% - \do\ \do\\\do\{\do\}\do\$\do\&% - \do\#\do\^\do\^^K\do\_\do\^^A\do\%\do\~% - \do\<\do\>\do\|\do\@\do+\do\"% -} -% -% [Knuth] p. 380 -\def\uncatcodespecials{% - \def\do##1{\catcode`##1=\other}\dospecials} -% -% [Knuth] pp. 380,381,391 -% Disable Spanish ligatures ?` and !` of \tt font -\begingroup - \catcode`\`=\active\gdef`{\relax\lq} -\endgroup -% -% Setup for the @verb command. -% -% Eight spaces for a tab -\begingroup - \catcode`\^^I=\active - \gdef\tabeightspaces{\catcode`\^^I=\active\def^^I{\ \ \ \ \ \ \ \ }} -\endgroup -% -\def\setupverb{% - \tt % easiest (and conventionally used) font for verbatim - \def\par{\leavevmode\endgraf}% - \catcode`\`=\active - \tabeightspaces - % Respect line breaks, - % print special symbols as themselves, and - % make each space count - % must do in this order: - \obeylines \uncatcodespecials \sepspaces -} - -% Setup for the @verbatim environment -% -% Real tab expansion -\newdimen\tabw \setbox0=\hbox{\tt\space} \tabw=8\wd0 % tab amount -% -\def\starttabbox{\setbox0=\hbox\bgroup} -\begingroup - \catcode`\^^I=\active - \gdef\tabexpand{% - \catcode`\^^I=\active - \def^^I{\leavevmode\egroup - \dimen0=\wd0 % the width so far, or since the previous tab - \divide\dimen0 by\tabw - \multiply\dimen0 by\tabw % compute previous multiple of \tabw - \advance\dimen0 by\tabw % advance to next multiple of \tabw - \wd0=\dimen0 \box0 \starttabbox - }% - } -\endgroup -\def\setupverbatim{% - \let\nonarrowing = t% - \nonfillstart - % Easiest (and conventionally used) font for verbatim - \tt - \def\par{\leavevmode\egroup\box0\endgraf}% - \catcode`\`=\active - \tabexpand - % Respect line breaks, - % print special symbols as themselves, and - % make each space count - % must do in this order: - \obeylines \uncatcodespecials \sepspaces - \everypar{\starttabbox}% -} - -% Do the @verb magic: verbatim text is quoted by unique -% delimiter characters. Before first delimiter expect a -% right brace, after last delimiter expect closing brace: -% -% \def\doverb'{'#1'}'{#1} -% -% [Knuth] p. 382; only eat outer {} -\begingroup - \catcode`[=1\catcode`]=2\catcode`\{=\other\catcode`\}=\other - \gdef\doverb{#1[\def\next##1#1}[##1\endgroup]\next] -\endgroup -% -\def\verb{\begingroup\setupverb\doverb} -% -% -% Do the @verbatim magic: define the macro \doverbatim so that -% the (first) argument ends when '@end verbatim' is reached, ie: -% -% \def\doverbatim#1@end verbatim{#1} -% -% For Texinfo it's a lot easier than for LaTeX, -% because texinfo's \verbatim doesn't stop at '\end{verbatim}': -% we need not redefine '\', '{' and '}'. -% -% Inspired by LaTeX's verbatim command set [latex.ltx] -% -\begingroup - \catcode`\ =\active - \obeylines % - % ignore everything up to the first ^^M, that's the newline at the end - % of the @verbatim input line itself. Otherwise we get an extra blank - % line in the output. - \xdef\doverbatim#1^^M#2@end verbatim{#2\noexpand\end\gobble verbatim}% - % We really want {...\end verbatim} in the body of the macro, but - % without the active space; thus we have to use \xdef and \gobble. -\endgroup -% -\envdef\verbatim{% - \setupverbatim\doverbatim -} -\let\Everbatim = \afterenvbreak - - -% @verbatiminclude FILE - insert text of file in verbatim environment. -% -\def\verbatiminclude{\parseargusing\filenamecatcodes\doverbatiminclude} -% -\def\doverbatiminclude#1{% - {% - \makevalueexpandable - \setupverbatim - \input #1 - \afterenvbreak - }% -} - -% @copying ... @end copying. -% Save the text away for @insertcopying later. -% -% We save the uninterpreted tokens, rather than creating a box. -% Saving the text in a box would be much easier, but then all the -% typesetting commands (@smallbook, font changes, etc.) have to be done -% beforehand -- and a) we want @copying to be done first in the source -% file; b) letting users define the frontmatter in as flexible order as -% possible is very desirable. -% -\def\copying{\checkenv{}\begingroup\scanargctxt\docopying} -\def\docopying#1@end copying{\endgroup\def\copyingtext{#1}} -% -\def\insertcopying{% - \begingroup - \parindent = 0pt % paragraph indentation looks wrong on title page - \scanexp\copyingtext - \endgroup -} - -\message{defuns,} -% @defun etc. - -\newskip\defbodyindent \defbodyindent=.4in -\newskip\defargsindent \defargsindent=50pt -\newskip\deflastargmargin \deflastargmargin=18pt - -% Start the processing of @deffn: -\def\startdefun{% - \ifnum\lastpenalty<10000 - \medbreak - \else - % If there are two @def commands in a row, we'll have a \nobreak, - % which is there to keep the function description together with its - % header. But if there's nothing but headers, we need to allow a - % break somewhere. Check specifically for penalty 10002, inserted - % by \defargscommonending, instead of 10000, since the sectioning - % commands also insert a nobreak penalty, and we don't want to allow - % a break between a section heading and a defun. - % - \ifnum\lastpenalty=10002 \penalty2000 \fi - % - % Similarly, after a section heading, do not allow a break. - % But do insert the glue. - \medskip % preceded by discardable penalty, so not a breakpoint - \fi - % - \parindent=0in - \advance\leftskip by \defbodyindent - \exdentamount=\defbodyindent -} - -\def\dodefunx#1{% - % First, check whether we are in the right environment: - \checkenv#1% - % - % As above, allow line break if we have multiple x headers in a row. - % It's not a great place, though. - \ifnum\lastpenalty=10002 \penalty3000 \fi - % - % And now, it's time to reuse the body of the original defun: - \expandafter\gobbledefun#1% -} -\def\gobbledefun#1\startdefun{} - -% \printdefunline \deffnheader{text} -% -\def\printdefunline#1#2{% - \begingroup - % call \deffnheader: - #1#2 \endheader - % common ending: - \interlinepenalty = 10000 - \advance\rightskip by 0pt plus 1fil - \endgraf - \nobreak\vskip -\parskip - \penalty 10002 % signal to \startdefun and \dodefunx - % Some of the @defun-type tags do not enable magic parentheses, - % rendering the following check redundant. But we don't optimize. - \checkparencounts - \endgroup -} - -\def\Edefun{\endgraf\medbreak} - -% \makedefun{deffn} creates \deffn, \deffnx and \Edeffn; -% the only thing remainnig is to define \deffnheader. -% -\def\makedefun#1{% - \expandafter\let\csname E#1\endcsname = \Edefun - \edef\temp{\noexpand\domakedefun - \makecsname{#1}\makecsname{#1x}\makecsname{#1header}}% - \temp -} - -% \domakedefun \deffn \deffnx \deffnheader -% -% Define \deffn and \deffnx, without parameters. -% \deffnheader has to be defined explicitly. -% -\def\domakedefun#1#2#3{% - \envdef#1{% - \startdefun - \parseargusing\activeparens{\printdefunline#3}% - }% - \def#2{\dodefunx#1}% - \def#3% -} - -%%% Untyped functions: - -% @deffn category name args -\makedefun{deffn}{\deffngeneral{}} - -% @deffn category class name args -\makedefun{defop}#1 {\defopon{#1\ \putwordon}} - -% \defopon {category on}class name args -\def\defopon#1#2 {\deffngeneral{\putwordon\ \code{#2}}{#1\ \code{#2}} } - -% \deffngeneral {subind}category name args -% -\def\deffngeneral#1#2 #3 #4\endheader{% - % Remember that \dosubind{fn}{foo}{} is equivalent to \doind{fn}{foo}. - \dosubind{fn}{\code{#3}}{#1}% - \defname{#2}{}{#3}\magicamp\defunargs{#4\unskip}% -} - -%%% Typed functions: - -% @deftypefn category type name args -\makedefun{deftypefn}{\deftypefngeneral{}} - -% @deftypeop category class type name args -\makedefun{deftypeop}#1 {\deftypeopon{#1\ \putwordon}} - -% \deftypeopon {category on}class type name args -\def\deftypeopon#1#2 {\deftypefngeneral{\putwordon\ \code{#2}}{#1\ \code{#2}} } - -% \deftypefngeneral {subind}category type name args -% -\def\deftypefngeneral#1#2 #3 #4 #5\endheader{% - \dosubind{fn}{\code{#4}}{#1}% - \defname{#2}{#3}{#4}\defunargs{#5\unskip}% -} - -%%% Typed variables: - -% @deftypevr category type var args -\makedefun{deftypevr}{\deftypecvgeneral{}} - -% @deftypecv category class type var args -\makedefun{deftypecv}#1 {\deftypecvof{#1\ \putwordof}} - -% \deftypecvof {category of}class type var args -\def\deftypecvof#1#2 {\deftypecvgeneral{\putwordof\ \code{#2}}{#1\ \code{#2}} } - -% \deftypecvgeneral {subind}category type var args -% -\def\deftypecvgeneral#1#2 #3 #4 #5\endheader{% - \dosubind{vr}{\code{#4}}{#1}% - \defname{#2}{#3}{#4}\defunargs{#5\unskip}% -} - -%%% Untyped variables: - -% @defvr category var args -\makedefun{defvr}#1 {\deftypevrheader{#1} {} } - -% @defcv category class var args -\makedefun{defcv}#1 {\defcvof{#1\ \putwordof}} - -% \defcvof {category of}class var args -\def\defcvof#1#2 {\deftypecvof{#1}#2 {} } - -%%% Type: -% @deftp category name args -\makedefun{deftp}#1 #2 #3\endheader{% - \doind{tp}{\code{#2}}% - \defname{#1}{}{#2}\defunargs{#3\unskip}% -} - -% Remaining @defun-like shortcuts: -\makedefun{defun}{\deffnheader{\putwordDeffunc} } -\makedefun{defmac}{\deffnheader{\putwordDefmac} } -\makedefun{defspec}{\deffnheader{\putwordDefspec} } -\makedefun{deftypefun}{\deftypefnheader{\putwordDeffunc} } -\makedefun{defvar}{\defvrheader{\putwordDefvar} } -\makedefun{defopt}{\defvrheader{\putwordDefopt} } -\makedefun{deftypevar}{\deftypevrheader{\putwordDefvar} } -\makedefun{defmethod}{\defopon\putwordMethodon} -\makedefun{deftypemethod}{\deftypeopon\putwordMethodon} -\makedefun{defivar}{\defcvof\putwordInstanceVariableof} -\makedefun{deftypeivar}{\deftypecvof\putwordInstanceVariableof} - -% \defname, which formats the name of the @def (not the args). -% #1 is the category, such as "Function". -% #2 is the return type, if any. -% #3 is the function name. -% -% We are followed by (but not passed) the arguments, if any. -% -\def\defname#1#2#3{% - % Get the values of \leftskip and \rightskip as they were outside the @def... - \advance\leftskip by -\defbodyindent - % - % How we'll format the type name. Putting it in brackets helps - % distinguish it from the body text that may end up on the next line - % just below it. - \def\temp{#1}% - \setbox0=\hbox{\kern\deflastargmargin \ifx\temp\empty\else [\rm\temp]\fi} - % - % Figure out line sizes for the paragraph shape. - % The first line needs space for \box0; but if \rightskip is nonzero, - % we need only space for the part of \box0 which exceeds it: - \dimen0=\hsize \advance\dimen0 by -\wd0 \advance\dimen0 by \rightskip - % The continuations: - \dimen2=\hsize \advance\dimen2 by -\defargsindent - % (plain.tex says that \dimen1 should be used only as global.) - \parshape 2 0in \dimen0 \defargsindent \dimen2 - % - % Put the type name to the right margin. - \noindent - \hbox to 0pt{% - \hfil\box0 \kern-\hsize - % \hsize has to be shortened this way: - \kern\leftskip - % Intentionally do not respect \rightskip, since we need the space. - }% - % - % Allow all lines to be underfull without complaint: - \tolerance=10000 \hbadness=10000 - \exdentamount=\defbodyindent - {% - % defun fonts. We use typewriter by default (used to be bold) because: - % . we're printing identifiers, they should be in tt in principle. - % . in languages with many accents, such as Czech or French, it's - % common to leave accents off identifiers. The result looks ok in - % tt, but exceedingly strange in rm. - % . we don't want -- and --- to be treated as ligatures. - % . this still does not fix the ?` and !` ligatures, but so far no - % one has made identifiers using them :). - \df \tt - \def\temp{#2}% return value type - \ifx\temp\empty\else \tclose{\temp} \fi - #3% output function name - }% - {\rm\enskip}% hskip 0.5 em of \tenrm - % - \boldbrax - % arguments will be output next, if any. -} - -% Print arguments in slanted roman (not ttsl), inconsistently with using -% tt for the name. This is because literal text is sometimes needed in -% the argument list (groff manual), and ttsl and tt are not very -% distinguishable. Prevent hyphenation at `-' chars. -% -\def\defunargs#1{% - % use sl by default (not ttsl), - % tt for the names. - \df \sl \hyphenchar\font=0 - % - % On the other hand, if an argument has two dashes (for instance), we - % want a way to get ttsl. Let's try @var for that. - \let\var=\ttslanted - #1% - \sl\hyphenchar\font=45 -} - -% We want ()&[] to print specially on the defun line. -% -\def\activeparens{% - \catcode`\(=\active \catcode`\)=\active - \catcode`\[=\active \catcode`\]=\active - \catcode`\&=\active -} - -% Make control sequences which act like normal parenthesis chars. -\let\lparen = ( \let\rparen = ) - -% Be sure that we always have a definition for `(', etc. For example, -% if the fn name has parens in it, \boldbrax will not be in effect yet, -% so TeX would otherwise complain about undefined control sequence. -{ - \activeparens - \global\let(=\lparen \global\let)=\rparen - \global\let[=\lbrack \global\let]=\rbrack - \global\let& = \& - - \gdef\boldbrax{\let(=\opnr\let)=\clnr\let[=\lbrb\let]=\rbrb} - \gdef\magicamp{\let&=\amprm} -} - -\newcount\parencount - -% If we encounter &foo, then turn on ()-hacking afterwards -\newif\ifampseen -\def\amprm#1 {\ampseentrue{\bf\ }} - -\def\parenfont{% - \ifampseen - % At the first level, print parens in roman, - % otherwise use the default font. - \ifnum \parencount=1 \rm \fi - \else - % The \sf parens (in \boldbrax) actually are a little bolder than - % the contained text. This is especially needed for [ and ] . - \sf - \fi -} -\def\infirstlevel#1{% - \ifampseen - \ifnum\parencount=1 - #1% - \fi - \fi -} -\def\bfafterword#1 {#1 \bf} - -\def\opnr{% - \global\advance\parencount by 1 - {\parenfont(}% - \infirstlevel \bfafterword -} -\def\clnr{% - {\parenfont)}% - \infirstlevel \sl - \global\advance\parencount by -1 -} - -\newcount\brackcount -\def\lbrb{% - \global\advance\brackcount by 1 - {\bf[}% -} -\def\rbrb{% - {\bf]}% - \global\advance\brackcount by -1 -} - -\def\checkparencounts{% - \ifnum\parencount=0 \else \badparencount \fi - \ifnum\brackcount=0 \else \badbrackcount \fi -} -\def\badparencount{% - \errmessage{Unbalanced parentheses in @def}% - \global\parencount=0 -} -\def\badbrackcount{% - \errmessage{Unbalanced square braces in @def}% - \global\brackcount=0 -} - - -\message{macros,} -% @macro. - -% To do this right we need a feature of e-TeX, \scantokens, -% which we arrange to emulate with a temporary file in ordinary TeX. -\ifx\eTeXversion\undefined - \newwrite\macscribble - \def\scantokens#1{% - \toks0={#1}% - \immediate\openout\macscribble=\jobname.tmp - \immediate\write\macscribble{\the\toks0}% - \immediate\closeout\macscribble - \input \jobname.tmp - } -\fi - -\def\scanmacro#1{% - \begingroup - \newlinechar`\^^M - \let\xeatspaces\eatspaces - % Undo catcode changes of \startcontents and \doprintindex - % When called from @insertcopying or (short)caption, we need active - % backslash to get it printed correctly. Previously, we had - % \catcode`\\=\other instead. We'll see whether a problem appears - % with macro expansion. --kasal, 19aug04 - \catcode`\@=0 \catcode`\\=\active \escapechar=`\@ - % ... and \example - \spaceisspace - % - % Append \endinput to make sure that TeX does not see the ending newline. - % - % I've verified that it is necessary both for e-TeX and for ordinary TeX - % --kasal, 29nov03 - \scantokens{#1\endinput}% - \endgroup -} - -\def\scanexp#1{% - \edef\temp{\noexpand\scanmacro{#1}}% - \temp -} - -\newcount\paramno % Count of parameters -\newtoks\macname % Macro name -\newif\ifrecursive % Is it recursive? - -% List of all defined macros in the form -% \definedummyword\macro1\definedummyword\macro2... -% Currently is also contains all @aliases; the list can be split -% if there is a need. -\def\macrolist{} - -% Add the macro to \macrolist -\def\addtomacrolist#1{\expandafter \addtomacrolistxxx \csname#1\endcsname} -\def\addtomacrolistxxx#1{% - \toks0 = \expandafter{\macrolist\definedummyword#1}% - \xdef\macrolist{\the\toks0}% -} - -% Utility routines. -% This does \let #1 = #2, with \csnames; that is, -% \let \csname#1\endcsname = \csname#2\endcsname -% (except of course we have to play expansion games). -% -\def\cslet#1#2{% - \expandafter\let - \csname#1\expandafter\endcsname - \csname#2\endcsname -} - -% Trim leading and trailing spaces off a string. -% Concepts from aro-bend problem 15 (see CTAN). -{\catcode`\@=11 -\gdef\eatspaces #1{\expandafter\trim@\expandafter{#1 }} -\gdef\trim@ #1{\trim@@ @#1 @ #1 @ @@} -\gdef\trim@@ #1@ #2@ #3@@{\trim@@@\empty #2 @} -\def\unbrace#1{#1} -\unbrace{\gdef\trim@@@ #1 } #2@{#1} -} - -% Trim a single trailing ^^M off a string. -{\catcode`\^^M=\other \catcode`\Q=3% -\gdef\eatcr #1{\eatcra #1Q^^MQ}% -\gdef\eatcra#1^^MQ{\eatcrb#1Q}% -\gdef\eatcrb#1Q#2Q{#1}% -} - -% Macro bodies are absorbed as an argument in a context where -% all characters are catcode 10, 11 or 12, except \ which is active -% (as in normal texinfo). It is necessary to change the definition of \. - -% It's necessary to have hard CRs when the macro is executed. This is -% done by making ^^M (\endlinechar) catcode 12 when reading the macro -% body, and then making it the \newlinechar in \scanmacro. - -\def\scanctxt{% - \catcode`\"=\other - \catcode`\+=\other - \catcode`\<=\other - \catcode`\>=\other - \catcode`\@=\other - \catcode`\^=\other - \catcode`\_=\other - \catcode`\|=\other - \catcode`\~=\other -} - -\def\scanargctxt{% - \scanctxt - \catcode`\\=\other - \catcode`\^^M=\other -} - -\def\macrobodyctxt{% - \scanctxt - \catcode`\{=\other - \catcode`\}=\other - \catcode`\^^M=\other - \usembodybackslash -} - -\def\macroargctxt{% - \scanctxt - \catcode`\\=\other -} - -% \mbodybackslash is the definition of \ in @macro bodies. -% It maps \foo\ => \csname macarg.foo\endcsname => #N -% where N is the macro parameter number. -% We define \csname macarg.\endcsname to be \realbackslash, so -% \\ in macro replacement text gets you a backslash. - -{\catcode`@=0 @catcode`@\=@active - @gdef@usembodybackslash{@let\=@mbodybackslash} - @gdef@mbodybackslash#1\{@csname macarg.#1@endcsname} -} -\expandafter\def\csname macarg.\endcsname{\realbackslash} - -\def\macro{\recursivefalse\parsearg\macroxxx} -\def\rmacro{\recursivetrue\parsearg\macroxxx} - -\def\macroxxx#1{% - \getargs{#1}% now \macname is the macname and \argl the arglist - \ifx\argl\empty % no arguments - \paramno=0% - \else - \expandafter\parsemargdef \argl;% - \fi - \if1\csname ismacro.\the\macname\endcsname - \message{Warning: redefining \the\macname}% - \else - \expandafter\ifx\csname \the\macname\endcsname \relax - \else \errmessage{Macro name \the\macname\space already defined}\fi - \global\cslet{macsave.\the\macname}{\the\macname}% - \global\expandafter\let\csname ismacro.\the\macname\endcsname=1% - \addtomacrolist{\the\macname}% - \fi - \begingroup \macrobodyctxt - \ifrecursive \expandafter\parsermacbody - \else \expandafter\parsemacbody - \fi} - -\parseargdef\unmacro{% - \if1\csname ismacro.#1\endcsname - \global\cslet{#1}{macsave.#1}% - \global\expandafter\let \csname ismacro.#1\endcsname=0% - % Remove the macro name from \macrolist: - \begingroup - \expandafter\let\csname#1\endcsname \relax - \let\definedummyword\unmacrodo - \xdef\macrolist{\macrolist}% - \endgroup - \else - \errmessage{Macro #1 not defined}% - \fi -} - -% Called by \do from \dounmacro on each macro. The idea is to omit any -% macro definitions that have been changed to \relax. -% -\def\unmacrodo#1{% - \ifx #1\relax - % remove this - \else - \noexpand\definedummyword \noexpand#1% - \fi -} - -% This makes use of the obscure feature that if the last token of a -% is #, then the preceding argument is delimited by -% an opening brace, and that opening brace is not consumed. -\def\getargs#1{\getargsxxx#1{}} -\def\getargsxxx#1#{\getmacname #1 \relax\getmacargs} -\def\getmacname #1 #2\relax{\macname={#1}} -\def\getmacargs#1{\def\argl{#1}} - -% Parse the optional {params} list. Set up \paramno and \paramlist -% so \defmacro knows what to do. Define \macarg.blah for each blah -% in the params list, to be ##N where N is the position in that list. -% That gets used by \mbodybackslash (above). - -% We need to get `macro parameter char #' into several definitions. -% The technique used is stolen from LaTeX: let \hash be something -% unexpandable, insert that wherever you need a #, and then redefine -% it to # just before using the token list produced. -% -% The same technique is used to protect \eatspaces till just before -% the macro is used. - -\def\parsemargdef#1;{\paramno=0\def\paramlist{}% - \let\hash\relax\let\xeatspaces\relax\parsemargdefxxx#1,;,} -\def\parsemargdefxxx#1,{% - \if#1;\let\next=\relax - \else \let\next=\parsemargdefxxx - \advance\paramno by 1% - \expandafter\edef\csname macarg.\eatspaces{#1}\endcsname - {\xeatspaces{\hash\the\paramno}}% - \edef\paramlist{\paramlist\hash\the\paramno,}% - \fi\next} - -% These two commands read recursive and nonrecursive macro bodies. -% (They're different since rec and nonrec macros end differently.) - -\long\def\parsemacbody#1@end macro% -{\xdef\temp{\eatcr{#1}}\endgroup\defmacro}% -\long\def\parsermacbody#1@end rmacro% -{\xdef\temp{\eatcr{#1}}\endgroup\defmacro}% - -% This defines the macro itself. There are six cases: recursive and -% nonrecursive macros of zero, one, and many arguments. -% Much magic with \expandafter here. -% \xdef is used so that macro definitions will survive the file -% they're defined in; @include reads the file inside a group. -\def\defmacro{% - \let\hash=##% convert placeholders to macro parameter chars - \ifrecursive - \ifcase\paramno - % 0 - \expandafter\xdef\csname\the\macname\endcsname{% - \noexpand\scanmacro{\temp}}% - \or % 1 - \expandafter\xdef\csname\the\macname\endcsname{% - \bgroup\noexpand\macroargctxt - \noexpand\braceorline - \expandafter\noexpand\csname\the\macname xxx\endcsname}% - \expandafter\xdef\csname\the\macname xxx\endcsname##1{% - \egroup\noexpand\scanmacro{\temp}}% - \else % many - \expandafter\xdef\csname\the\macname\endcsname{% - \bgroup\noexpand\macroargctxt - \noexpand\csname\the\macname xx\endcsname}% - \expandafter\xdef\csname\the\macname xx\endcsname##1{% - \expandafter\noexpand\csname\the\macname xxx\endcsname ##1,}% - \expandafter\expandafter - \expandafter\xdef - \expandafter\expandafter - \csname\the\macname xxx\endcsname - \paramlist{\egroup\noexpand\scanmacro{\temp}}% - \fi - \else - \ifcase\paramno - % 0 - \expandafter\xdef\csname\the\macname\endcsname{% - \noexpand\norecurse{\the\macname}% - \noexpand\scanmacro{\temp}\egroup}% - \or % 1 - \expandafter\xdef\csname\the\macname\endcsname{% - \bgroup\noexpand\macroargctxt - \noexpand\braceorline - \expandafter\noexpand\csname\the\macname xxx\endcsname}% - \expandafter\xdef\csname\the\macname xxx\endcsname##1{% - \egroup - \noexpand\norecurse{\the\macname}% - \noexpand\scanmacro{\temp}\egroup}% - \else % many - \expandafter\xdef\csname\the\macname\endcsname{% - \bgroup\noexpand\macroargctxt - \expandafter\noexpand\csname\the\macname xx\endcsname}% - \expandafter\xdef\csname\the\macname xx\endcsname##1{% - \expandafter\noexpand\csname\the\macname xxx\endcsname ##1,}% - \expandafter\expandafter - \expandafter\xdef - \expandafter\expandafter - \csname\the\macname xxx\endcsname - \paramlist{% - \egroup - \noexpand\norecurse{\the\macname}% - \noexpand\scanmacro{\temp}\egroup}% - \fi - \fi} - -\def\norecurse#1{\bgroup\cslet{#1}{macsave.#1}} - -% \braceorline decides whether the next nonwhitespace character is a -% {. If so it reads up to the closing }, if not, it reads the whole -% line. Whatever was read is then fed to the next control sequence -% as an argument (by \parsebrace or \parsearg) -\def\braceorline#1{\let\next=#1\futurelet\nchar\braceorlinexxx} -\def\braceorlinexxx{% - \ifx\nchar\bgroup\else - \expandafter\parsearg - \fi \next} - - -% @alias. -% We need some trickery to remove the optional spaces around the equal -% sign. Just make them active and then expand them all to nothing. -\def\alias{\parseargusing\obeyspaces\aliasxxx} -\def\aliasxxx #1{\aliasyyy#1\relax} -\def\aliasyyy #1=#2\relax{% - {% - \expandafter\let\obeyedspace=\empty - \addtomacrolist{#1}% - \xdef\next{\global\let\makecsname{#1}=\makecsname{#2}}% - }% - \next -} - - -\message{cross references,} - -\newwrite\auxfile - -\newif\ifhavexrefs % True if xref values are known. -\newif\ifwarnedxrefs % True if we warned once that they aren't known. - -% @inforef is relatively simple. -\def\inforef #1{\inforefzzz #1,,,,**} -\def\inforefzzz #1,#2,#3,#4**{\putwordSee{} \putwordInfo{} \putwordfile{} \file{\ignorespaces #3{}}, - node \samp{\ignorespaces#1{}}} - -% @node's only job in TeX is to define \lastnode, which is used in -% cross-references. The @node line might or might not have commas, and -% might or might not have spaces before the first comma, like: -% @node foo , bar , ... -% We don't want such trailing spaces in the node name. -% -\parseargdef\node{\checkenv{}\donode #1 ,\finishnodeparse} -% -% also remove a trailing comma, in case of something like this: -% @node Help-Cross, , , Cross-refs -\def\donode#1 ,#2\finishnodeparse{\dodonode #1,\finishnodeparse} -\def\dodonode#1,#2\finishnodeparse{\gdef\lastnode{#1}} - -\let\nwnode=\node -\let\lastnode=\empty - -% Write a cross-reference definition for the current node. #1 is the -% type (Ynumbered, Yappendix, Ynothing). -% -\def\donoderef#1{% - \ifx\lastnode\empty\else - \setref{\lastnode}{#1}% - \global\let\lastnode=\empty - \fi -} - -% @anchor{NAME} -- define xref target at arbitrary point. -% -\newcount\savesfregister -% -\def\savesf{\relax \ifhmode \savesfregister=\spacefactor \fi} -\def\restoresf{\relax \ifhmode \spacefactor=\savesfregister \fi} -\def\anchor#1{\savesf \setref{#1}{Ynothing}\restoresf \ignorespaces} - -% \setref{NAME}{SNT} defines a cross-reference point NAME (a node or an -% anchor), which consists of three parts: -% 1) NAME-title - the current sectioning name taken from \thissection, -% or the anchor name. -% 2) NAME-snt - section number and type, passed as the SNT arg, or -% empty for anchors. -% 3) NAME-pg - the page number. -% -% This is called from \donoderef, \anchor, and \dofloat. In the case of -% floats, there is an additional part, which is not written here: -% 4) NAME-lof - the text as it should appear in a @listoffloats. -% -\def\setref#1#2{% - \pdfmkdest{#1}% - \iflinks - {% - \atdummies % preserve commands, but don't expand them - \edef\writexrdef##1##2{% - \write\auxfile{@xrdef{#1-% #1 of \setref, expanded by the \edef - ##1}{##2}}% these are parameters of \writexrdef - }% - \toks0 = \expandafter{\thissection}% - \immediate \writexrdef{title}{\the\toks0 }% - \immediate \writexrdef{snt}{\csname #2\endcsname}% \Ynumbered etc. - \writexrdef{pg}{\folio}% will be written later, during \shipout - }% - \fi -} - -% @xref, @pxref, and @ref generate cross-references. For \xrefX, #1 is -% the node name, #2 the name of the Info cross-reference, #3 the printed -% node name, #4 the name of the Info file, #5 the name of the printed -% manual. All but the node name can be omitted. -% -\def\pxref#1{\putwordsee{} \xrefX[#1,,,,,,,]} -\def\xref#1{\putwordSee{} \xrefX[#1,,,,,,,]} -\def\ref#1{\xrefX[#1,,,,,,,]} -\def\xrefX[#1,#2,#3,#4,#5,#6]{\begingroup - \unsepspaces - \def\printedmanual{\ignorespaces #5}% - \def\printedrefname{\ignorespaces #3}% - \setbox1=\hbox{\printedmanual\unskip}% - \setbox0=\hbox{\printedrefname\unskip}% - \ifdim \wd0 = 0pt - % No printed node name was explicitly given. - \expandafter\ifx\csname SETxref-automatic-section-title\endcsname\relax - % Use the node name inside the square brackets. - \def\printedrefname{\ignorespaces #1}% - \else - % Use the actual chapter/section title appear inside - % the square brackets. Use the real section title if we have it. - \ifdim \wd1 > 0pt - % It is in another manual, so we don't have it. - \def\printedrefname{\ignorespaces #1}% - \else - \ifhavexrefs - % We know the real title if we have the xref values. - \def\printedrefname{\refx{#1-title}{}}% - \else - % Otherwise just copy the Info node name. - \def\printedrefname{\ignorespaces #1}% - \fi% - \fi - \fi - \fi - % - % Make link in pdf output. - \ifpdf - \leavevmode - \getfilename{#4}% - {\turnoffactive - % See comments at \activebackslashdouble. - {\activebackslashdouble \xdef\pdfxrefdest{#1}% - \backslashparens\pdfxrefdest}% - % - \ifnum\filenamelength>0 - \startlink attr{/Border [0 0 0]}% - goto file{\the\filename.pdf} name{\pdfxrefdest}% - \else - \startlink attr{/Border [0 0 0]}% - goto name{\pdfmkpgn{\pdfxrefdest}}% - \fi - }% - \linkcolor - \fi - % - % Float references are printed completely differently: "Figure 1.2" - % instead of "[somenode], p.3". We distinguish them by the - % LABEL-title being set to a magic string. - {% - % Have to otherify everything special to allow the \csname to - % include an _ in the xref name, etc. - \indexnofonts - \turnoffactive - \expandafter\global\expandafter\let\expandafter\Xthisreftitle - \csname XR#1-title\endcsname - }% - \iffloat\Xthisreftitle - % If the user specified the print name (third arg) to the ref, - % print it instead of our usual "Figure 1.2". - \ifdim\wd0 = 0pt - \refx{#1-snt}% - \else - \printedrefname - \fi - % - % if the user also gave the printed manual name (fifth arg), append - % "in MANUALNAME". - \ifdim \wd1 > 0pt - \space \putwordin{} \cite{\printedmanual}% - \fi - \else - % node/anchor (non-float) references. - % - % If we use \unhbox0 and \unhbox1 to print the node names, TeX does not - % insert empty discretionaries after hyphens, which means that it will - % not find a line break at a hyphen in a node names. Since some manuals - % are best written with fairly long node names, containing hyphens, this - % is a loss. Therefore, we give the text of the node name again, so it - % is as if TeX is seeing it for the first time. - \ifdim \wd1 > 0pt - \putwordsection{} ``\printedrefname'' \putwordin{} \cite{\printedmanual}% - \else - % _ (for example) has to be the character _ for the purposes of the - % control sequence corresponding to the node, but it has to expand - % into the usual \leavevmode...\vrule stuff for purposes of - % printing. So we \turnoffactive for the \refx-snt, back on for the - % printing, back off for the \refx-pg. - {\turnoffactive - % Only output a following space if the -snt ref is nonempty; for - % @unnumbered and @anchor, it won't be. - \setbox2 = \hbox{\ignorespaces \refx{#1-snt}{}}% - \ifdim \wd2 > 0pt \refx{#1-snt}\space\fi - }% - % output the `[mynode]' via a macro so it can be overridden. - \xrefprintnodename\printedrefname - % - % But we always want a comma and a space: - ,\space - % - % output the `page 3'. - \turnoffactive \putwordpage\tie\refx{#1-pg}{}% - \fi - \fi - \endlink -\endgroup} - -% This macro is called from \xrefX for the `[nodename]' part of xref -% output. It's a separate macro only so it can be changed more easily, -% since square brackets don't work well in some documents. Particularly -% one that Bob is working on :). -% -\def\xrefprintnodename#1{[#1]} - -% Things referred to by \setref. -% -\def\Ynothing{} -\def\Yomitfromtoc{} -\def\Ynumbered{% - \ifnum\secno=0 - \putwordChapter@tie \the\chapno - \else \ifnum\subsecno=0 - \putwordSection@tie \the\chapno.\the\secno - \else \ifnum\subsubsecno=0 - \putwordSection@tie \the\chapno.\the\secno.\the\subsecno - \else - \putwordSection@tie \the\chapno.\the\secno.\the\subsecno.\the\subsubsecno - \fi\fi\fi -} -\def\Yappendix{% - \ifnum\secno=0 - \putwordAppendix@tie @char\the\appendixno{}% - \else \ifnum\subsecno=0 - \putwordSection@tie @char\the\appendixno.\the\secno - \else \ifnum\subsubsecno=0 - \putwordSection@tie @char\the\appendixno.\the\secno.\the\subsecno - \else - \putwordSection@tie - @char\the\appendixno.\the\secno.\the\subsecno.\the\subsubsecno - \fi\fi\fi -} - -% Define \refx{NAME}{SUFFIX} to reference a cross-reference string named NAME. -% If its value is nonempty, SUFFIX is output afterward. -% -\def\refx#1#2{% - {% - \indexnofonts - \otherbackslash - \expandafter\global\expandafter\let\expandafter\thisrefX - \csname XR#1\endcsname - }% - \ifx\thisrefX\relax - % If not defined, say something at least. - \angleleft un\-de\-fined\angleright - \iflinks - \ifhavexrefs - \message{\linenumber Undefined cross reference `#1'.}% - \else - \ifwarnedxrefs\else - \global\warnedxrefstrue - \message{Cross reference values unknown; you must run TeX again.}% - \fi - \fi - \fi - \else - % It's defined, so just use it. - \thisrefX - \fi - #2% Output the suffix in any case. -} - -% This is the macro invoked by entries in the aux file. Usually it's -% just a \def (we prepend XR to the control sequence name to avoid -% collisions). But if this is a float type, we have more work to do. -% -\def\xrdef#1#2{% - \expandafter\gdef\csname XR#1\endcsname{#2}% remember this xref value. - % - % Was that xref control sequence that we just defined for a float? - \expandafter\iffloat\csname XR#1\endcsname - % it was a float, and we have the (safe) float type in \iffloattype. - \expandafter\let\expandafter\floatlist - \csname floatlist\iffloattype\endcsname - % - % Is this the first time we've seen this float type? - \expandafter\ifx\floatlist\relax - \toks0 = {\do}% yes, so just \do - \else - % had it before, so preserve previous elements in list. - \toks0 = \expandafter{\floatlist\do}% - \fi - % - % Remember this xref in the control sequence \floatlistFLOATTYPE, - % for later use in \listoffloats. - \expandafter\xdef\csname floatlist\iffloattype\endcsname{\the\toks0{#1}}% - \fi -} - -% Read the last existing aux file, if any. No error if none exists. -% -\def\tryauxfile{% - \openin 1 \jobname.aux - \ifeof 1 \else - \readdatafile{aux}% - \global\havexrefstrue - \fi - \closein 1 -} - -\def\setupdatafile{% - \catcode`\^^@=\other - \catcode`\^^A=\other - \catcode`\^^B=\other - \catcode`\^^C=\other - \catcode`\^^D=\other - \catcode`\^^E=\other - \catcode`\^^F=\other - \catcode`\^^G=\other - \catcode`\^^H=\other - \catcode`\^^K=\other - \catcode`\^^L=\other - \catcode`\^^N=\other - \catcode`\^^P=\other - \catcode`\^^Q=\other - \catcode`\^^R=\other - \catcode`\^^S=\other - \catcode`\^^T=\other - \catcode`\^^U=\other - \catcode`\^^V=\other - \catcode`\^^W=\other - \catcode`\^^X=\other - \catcode`\^^Z=\other - \catcode`\^^[=\other - \catcode`\^^\=\other - \catcode`\^^]=\other - \catcode`\^^^=\other - \catcode`\^^_=\other - % It was suggested to set the catcode of ^ to 7, which would allow ^^e4 etc. - % in xref tags, i.e., node names. But since ^^e4 notation isn't - % supported in the main text, it doesn't seem desirable. Furthermore, - % that is not enough: for node names that actually contain a ^ - % character, we would end up writing a line like this: 'xrdef {'hat - % b-title}{'hat b} and \xrdef does a \csname...\endcsname on the first - % argument, and \hat is not an expandable control sequence. It could - % all be worked out, but why? Either we support ^^ or we don't. - % - % The other change necessary for this was to define \auxhat: - % \def\auxhat{\def^{'hat }}% extra space so ok if followed by letter - % and then to call \auxhat in \setq. - % - \catcode`\^=\other - % - % Special characters. Should be turned off anyway, but... - \catcode`\~=\other - \catcode`\[=\other - \catcode`\]=\other - \catcode`\"=\other - \catcode`\_=\other - \catcode`\|=\other - \catcode`\<=\other - \catcode`\>=\other - \catcode`\$=\other - \catcode`\#=\other - \catcode`\&=\other - \catcode`\%=\other - \catcode`+=\other % avoid \+ for paranoia even though we've turned it off - % - % This is to support \ in node names and titles, since the \ - % characters end up in a \csname. It's easier than - % leaving it active and making its active definition an actual \ - % character. What I don't understand is why it works in the *value* - % of the xrdef. Seems like it should be a catcode12 \, and that - % should not typeset properly. But it works, so I'm moving on for - % now. --karl, 15jan04. - \catcode`\\=\other - % - % Make the characters 128-255 be printing characters. - {% - \count1=128 - \def\loop{% - \catcode\count1=\other - \advance\count1 by 1 - \ifnum \count1<256 \loop \fi - }% - }% - % - % @ is our escape character in .aux files, and we need braces. - \catcode`\{=1 - \catcode`\}=2 - \catcode`\@=0 -} - -\def\readdatafile#1{% -\begingroup - \setupdatafile - \input\jobname.#1 -\endgroup} - -\message{insertions,} -% including footnotes. - -\newcount \footnoteno - -% The trailing space in the following definition for supereject is -% vital for proper filling; pages come out unaligned when you do a -% pagealignmacro call if that space before the closing brace is -% removed. (Generally, numeric constants should always be followed by a -% space to prevent strange expansion errors.) -\def\supereject{\par\penalty -20000\footnoteno =0 } - -% @footnotestyle is meaningful for info output only. -\let\footnotestyle=\comment - -{\catcode `\@=11 -% -% Auto-number footnotes. Otherwise like plain. -\gdef\footnote{% - \let\indent=\ptexindent - \let\noindent=\ptexnoindent - \global\advance\footnoteno by \@ne - \edef\thisfootno{$^{\the\footnoteno}$}% - % - % In case the footnote comes at the end of a sentence, preserve the - % extra spacing after we do the footnote number. - \let\@sf\empty - \ifhmode\edef\@sf{\spacefactor\the\spacefactor}\ptexslash\fi - % - % Remove inadvertent blank space before typesetting the footnote number. - \unskip - \thisfootno\@sf - \dofootnote -}% - -% Don't bother with the trickery in plain.tex to not require the -% footnote text as a parameter. Our footnotes don't need to be so general. -% -% Oh yes, they do; otherwise, @ifset (and anything else that uses -% \parseargline) fails inside footnotes because the tokens are fixed when -% the footnote is read. --karl, 16nov96. -% -\gdef\dofootnote{% - \insert\footins\bgroup - % We want to typeset this text as a normal paragraph, even if the - % footnote reference occurs in (for example) a display environment. - % So reset some parameters. - \hsize=\pagewidth - \interlinepenalty\interfootnotelinepenalty - \splittopskip\ht\strutbox % top baseline for broken footnotes - \splitmaxdepth\dp\strutbox - \floatingpenalty\@MM - \leftskip\z@skip - \rightskip\z@skip - \spaceskip\z@skip - \xspaceskip\z@skip - \parindent\defaultparindent - % - \smallfonts \rm - % - % Because we use hanging indentation in footnotes, a @noindent appears - % to exdent this text, so make it be a no-op. makeinfo does not use - % hanging indentation so @noindent can still be needed within footnote - % text after an @example or the like (not that this is good style). - \let\noindent = \relax - % - % Hang the footnote text off the number. Use \everypar in case the - % footnote extends for more than one paragraph. - \everypar = {\hang}% - \textindent{\thisfootno}% - % - % Don't crash into the line above the footnote text. Since this - % expands into a box, it must come within the paragraph, lest it - % provide a place where TeX can split the footnote. - \footstrut - \futurelet\next\fo@t -} -}%end \catcode `\@=11 - -% In case a @footnote appears in a vbox, save the footnote text and create -% the real \insert just after the vbox finished. Otherwise, the insertion -% would be lost. -% Similarily, if a @footnote appears inside an alignment, save the footnote -% text to a box and make the \insert when a row of the table is finished. -% And the same can be done for other insert classes. --kasal, 16nov03. - -% Replace the \insert primitive by a cheating macro. -% Deeper inside, just make sure that the saved insertions are not spilled -% out prematurely. -% -\def\startsavinginserts{% - \ifx \insert\ptexinsert - \let\insert\saveinsert - \else - \let\checkinserts\relax - \fi -} - -% This \insert replacement works for both \insert\footins{foo} and -% \insert\footins\bgroup foo\egroup, but it doesn't work for \insert27{foo}. -% -\def\saveinsert#1{% - \edef\next{\noexpand\savetobox \makeSAVEname#1}% - \afterassignment\next - % swallow the left brace - \let\temp = -} -\def\makeSAVEname#1{\makecsname{SAVE\expandafter\gobble\string#1}} -\def\savetobox#1{\global\setbox#1 = \vbox\bgroup \unvbox#1} - -\def\checksaveins#1{\ifvoid#1\else \placesaveins#1\fi} - -\def\placesaveins#1{% - \ptexinsert \csname\expandafter\gobblesave\string#1\endcsname - {\box#1}% -} - -% eat @SAVE -- beware, all of them have catcode \other: -{ - \def\dospecials{\do S\do A\do V\do E} \uncatcodespecials % ;-) - \gdef\gobblesave @SAVE{} -} - -% initialization: -\def\newsaveins #1{% - \edef\next{\noexpand\newsaveinsX \makeSAVEname#1}% - \next -} -\def\newsaveinsX #1{% - \csname newbox\endcsname #1% - \expandafter\def\expandafter\checkinserts\expandafter{\checkinserts - \checksaveins #1}% -} - -% initialize: -\let\checkinserts\empty -\newsaveins\footins -\newsaveins\margin - - -% @image. We use the macros from epsf.tex to support this. -% If epsf.tex is not installed and @image is used, we complain. -% -% Check for and read epsf.tex up front. If we read it only at @image -% time, we might be inside a group, and then its definitions would get -% undone and the next image would fail. -\openin 1 = epsf.tex -\ifeof 1 \else - % Do not bother showing banner with epsf.tex v2.7k (available in - % doc/epsf.tex and on ctan). - \def\epsfannounce{\toks0 = }% - \input epsf.tex -\fi -\closein 1 -% -% We will only complain once about lack of epsf.tex. -\newif\ifwarnednoepsf -\newhelp\noepsfhelp{epsf.tex must be installed for images to - work. It is also included in the Texinfo distribution, or you can get - it from ftp://tug.org/tex/epsf.tex.} -% -\def\image#1{% - \ifx\epsfbox\undefined - \ifwarnednoepsf \else - \errhelp = \noepsfhelp - \errmessage{epsf.tex not found, images will be ignored}% - \global\warnednoepsftrue - \fi - \else - \imagexxx #1,,,,,\finish - \fi -} -% -% Arguments to @image: -% #1 is (mandatory) image filename; we tack on .eps extension. -% #2 is (optional) width, #3 is (optional) height. -% #4 is (ignored optional) html alt text. -% #5 is (ignored optional) extension. -% #6 is just the usual extra ignored arg for parsing this stuff. -\newif\ifimagevmode -\def\imagexxx#1,#2,#3,#4,#5,#6\finish{\begingroup - \catcode`\^^M = 5 % in case we're inside an example - \normalturnoffactive % allow _ et al. in names - % If the image is by itself, center it. - \ifvmode - \imagevmodetrue - \nobreak\bigskip - % Usually we'll have text after the image which will insert - % \parskip glue, so insert it here too to equalize the space - % above and below. - \nobreak\vskip\parskip - \nobreak - \line\bgroup\hss - \fi - % - % Output the image. - \ifpdf - \dopdfimage{#1}{#2}{#3}% - \else - % \epsfbox itself resets \epsf?size at each figure. - \setbox0 = \hbox{\ignorespaces #2}\ifdim\wd0 > 0pt \epsfxsize=#2\relax \fi - \setbox0 = \hbox{\ignorespaces #3}\ifdim\wd0 > 0pt \epsfysize=#3\relax \fi - \epsfbox{#1.eps}% - \fi - % - \ifimagevmode \hss \egroup \bigbreak \fi % space after the image -\endgroup} - - -% @float FLOATTYPE,LABEL,LOC ... @end float for displayed figures, tables, -% etc. We don't actually implement floating yet, we always include the -% float "here". But it seemed the best name for the future. -% -\envparseargdef\float{\eatcommaspace\eatcommaspace\dofloat#1, , ,\finish} - -% There may be a space before second and/or third parameter; delete it. -\def\eatcommaspace#1, {#1,} - -% #1 is the optional FLOATTYPE, the text label for this float, typically -% "Figure", "Table", "Example", etc. Can't contain commas. If omitted, -% this float will not be numbered and cannot be referred to. -% -% #2 is the optional xref label. Also must be present for the float to -% be referable. -% -% #3 is the optional positioning argument; for now, it is ignored. It -% will somehow specify the positions allowed to float to (here, top, bottom). -% -% We keep a separate counter for each FLOATTYPE, which we reset at each -% chapter-level command. -\let\resetallfloatnos=\empty -% -\def\dofloat#1,#2,#3,#4\finish{% - \let\thiscaption=\empty - \let\thisshortcaption=\empty - % - % don't lose footnotes inside @float. - % - % BEWARE: when the floats start float, we have to issue warning whenever an - % insert appears inside a float which could possibly float. --kasal, 26may04 - % - \startsavinginserts - % - % We can't be used inside a paragraph. - \par - % - \vtop\bgroup - \def\floattype{#1}% - \def\floatlabel{#2}% - \def\floatloc{#3}% we do nothing with this yet. - % - \ifx\floattype\empty - \let\safefloattype=\empty - \else - {% - % the floattype might have accents or other special characters, - % but we need to use it in a control sequence name. - \indexnofonts - \turnoffactive - \xdef\safefloattype{\floattype}% - }% - \fi - % - % If label is given but no type, we handle that as the empty type. - \ifx\floatlabel\empty \else - % We want each FLOATTYPE to be numbered separately (Figure 1, - % Table 1, Figure 2, ...). (And if no label, no number.) - % - \expandafter\getfloatno\csname\safefloattype floatno\endcsname - \global\advance\floatno by 1 - % - {% - % This magic value for \thissection is output by \setref as the - % XREFLABEL-title value. \xrefX uses it to distinguish float - % labels (which have a completely different output format) from - % node and anchor labels. And \xrdef uses it to construct the - % lists of floats. - % - \edef\thissection{\floatmagic=\safefloattype}% - \setref{\floatlabel}{Yfloat}% - }% - \fi - % - % start with \parskip glue, I guess. - \vskip\parskip - % - % Don't suppress indentation if a float happens to start a section. - \restorefirstparagraphindent -} - -% we have these possibilities: -% @float Foo,lbl & @caption{Cap}: Foo 1.1: Cap -% @float Foo,lbl & no caption: Foo 1.1 -% @float Foo & @caption{Cap}: Foo: Cap -% @float Foo & no caption: Foo -% @float ,lbl & Caption{Cap}: 1.1: Cap -% @float ,lbl & no caption: 1.1 -% @float & @caption{Cap}: Cap -% @float & no caption: -% -\def\Efloat{% - \let\floatident = \empty - % - % In all cases, if we have a float type, it comes first. - \ifx\floattype\empty \else \def\floatident{\floattype}\fi - % - % If we have an xref label, the number comes next. - \ifx\floatlabel\empty \else - \ifx\floattype\empty \else % if also had float type, need tie first. - \appendtomacro\floatident{\tie}% - \fi - % the number. - \appendtomacro\floatident{\chaplevelprefix\the\floatno}% - \fi - % - % Start the printed caption with what we've constructed in - % \floatident, but keep it separate; we need \floatident again. - \let\captionline = \floatident - % - \ifx\thiscaption\empty \else - \ifx\floatident\empty \else - \appendtomacro\captionline{: }% had ident, so need a colon between - \fi - % - % caption text. - \appendtomacro\captionline{\scanexp\thiscaption}% - \fi - % - % If we have anything to print, print it, with space before. - % Eventually this needs to become an \insert. - \ifx\captionline\empty \else - \vskip.5\parskip - \captionline - % - % Space below caption. - \vskip\parskip - \fi - % - % If have an xref label, write the list of floats info. Do this - % after the caption, to avoid chance of it being a breakpoint. - \ifx\floatlabel\empty \else - % Write the text that goes in the lof to the aux file as - % \floatlabel-lof. Besides \floatident, we include the short - % caption if specified, else the full caption if specified, else nothing. - {% - \atdummies - % since we read the caption text in the macro world, where ^^M - % is turned into a normal character, we have to scan it back, so - % we don't write the literal three characters "^^M" into the aux file. - \scanexp{% - \xdef\noexpand\gtemp{% - \ifx\thisshortcaption\empty - \thiscaption - \else - \thisshortcaption - \fi - }% - }% - \immediate\write\auxfile{@xrdef{\floatlabel-lof}{\floatident - \ifx\gtemp\empty \else : \gtemp \fi}}% - }% - \fi - \egroup % end of \vtop - % - % place the captured inserts - % - % BEWARE: when the floats start float, we have to issue warning whenever an - % insert appears inside a float which could possibly float. --kasal, 26may04 - % - \checkinserts -} - -% Append the tokens #2 to the definition of macro #1, not expanding either. -% -\def\appendtomacro#1#2{% - \expandafter\def\expandafter#1\expandafter{#1#2}% -} - -% @caption, @shortcaption -% -\def\caption{\docaption\thiscaption} -\def\shortcaption{\docaption\thisshortcaption} -\def\docaption{\checkenv\float \bgroup\scanargctxt\defcaption} -\def\defcaption#1#2{\egroup \def#1{#2}} - -% The parameter is the control sequence identifying the counter we are -% going to use. Create it if it doesn't exist and assign it to \floatno. -\def\getfloatno#1{% - \ifx#1\relax - % Haven't seen this figure type before. - \csname newcount\endcsname #1% - % - % Remember to reset this floatno at the next chap. - \expandafter\gdef\expandafter\resetallfloatnos - \expandafter{\resetallfloatnos #1=0 }% - \fi - \let\floatno#1% -} - -% \setref calls this to get the XREFLABEL-snt value. We want an @xref -% to the FLOATLABEL to expand to "Figure 3.1". We call \setref when we -% first read the @float command. -% -\def\Yfloat{\floattype@tie \chaplevelprefix\the\floatno}% - -% Magic string used for the XREFLABEL-title value, so \xrefX can -% distinguish floats from other xref types. -\def\floatmagic{!!float!!} - -% #1 is the control sequence we are passed; we expand into a conditional -% which is true if #1 represents a float ref. That is, the magic -% \thissection value which we \setref above. -% -\def\iffloat#1{\expandafter\doiffloat#1==\finish} -% -% #1 is (maybe) the \floatmagic string. If so, #2 will be the -% (safe) float type for this float. We set \iffloattype to #2. -% -\def\doiffloat#1=#2=#3\finish{% - \def\temp{#1}% - \def\iffloattype{#2}% - \ifx\temp\floatmagic -} - -% @listoffloats FLOATTYPE - print a list of floats like a table of contents. -% -\parseargdef\listoffloats{% - \def\floattype{#1}% floattype - {% - % the floattype might have accents or other special characters, - % but we need to use it in a control sequence name. - \indexnofonts - \turnoffactive - \xdef\safefloattype{\floattype}% - }% - % - % \xrdef saves the floats as a \do-list in \floatlistSAFEFLOATTYPE. - \expandafter\ifx\csname floatlist\safefloattype\endcsname \relax - \ifhavexrefs - % if the user said @listoffloats foo but never @float foo. - \message{\linenumber No `\safefloattype' floats to list.}% - \fi - \else - \begingroup - \leftskip=\tocindent % indent these entries like a toc - \let\do=\listoffloatsdo - \csname floatlist\safefloattype\endcsname - \endgroup - \fi -} - -% This is called on each entry in a list of floats. We're passed the -% xref label, in the form LABEL-title, which is how we save it in the -% aux file. We strip off the -title and look up \XRLABEL-lof, which -% has the text we're supposed to typeset here. -% -% Figures without xref labels will not be included in the list (since -% they won't appear in the aux file). -% -\def\listoffloatsdo#1{\listoffloatsdoentry#1\finish} -\def\listoffloatsdoentry#1-title\finish{{% - % Can't fully expand XR#1-lof because it can contain anything. Just - % pass the control sequence. On the other hand, XR#1-pg is just the - % page number, and we want to fully expand that so we can get a link - % in pdf output. - \toksA = \expandafter{\csname XR#1-lof\endcsname}% - % - % use the same \entry macro we use to generate the TOC and index. - \edef\writeentry{\noexpand\entry{\the\toksA}{\csname XR#1-pg\endcsname}}% - \writeentry -}} - -\message{localization,} -% and i18n. - -% @documentlanguage is usually given very early, just after -% @setfilename. If done too late, it may not override everything -% properly. Single argument is the language abbreviation. -% It would be nice if we could set up a hyphenation file here. -% -\parseargdef\documentlanguage{% - \tex % read txi-??.tex file in plain TeX. - % Read the file if it exists. - \openin 1 txi-#1.tex - \ifeof 1 - \errhelp = \nolanghelp - \errmessage{Cannot read language file txi-#1.tex}% - \else - \input txi-#1.tex - \fi - \closein 1 - \endgroup -} -\newhelp\nolanghelp{The given language definition file cannot be found or -is empty. Maybe you need to install it? In the current directory -should work if nowhere else does.} - - -% @documentencoding should change something in TeX eventually, most -% likely, but for now just recognize it. -\let\documentencoding = \comment - - -% Page size parameters. -% -\newdimen\defaultparindent \defaultparindent = 15pt - -\chapheadingskip = 15pt plus 4pt minus 2pt -\secheadingskip = 12pt plus 3pt minus 2pt -\subsecheadingskip = 9pt plus 2pt minus 2pt - -% Prevent underfull vbox error messages. -\vbadness = 10000 - -% Don't be so finicky about underfull hboxes, either. -\hbadness = 2000 - -% Following George Bush, just get rid of widows and orphans. -\widowpenalty=10000 -\clubpenalty=10000 - -% Use TeX 3.0's \emergencystretch to help line breaking, but if we're -% using an old version of TeX, don't do anything. We want the amount of -% stretch added to depend on the line length, hence the dependence on -% \hsize. We call this whenever the paper size is set. -% -\def\setemergencystretch{% - \ifx\emergencystretch\thisisundefined - % Allow us to assign to \emergencystretch anyway. - \def\emergencystretch{\dimen0}% - \else - \emergencystretch = .15\hsize - \fi -} - -% Parameters in order: 1) textheight; 2) textwidth; -% 3) voffset; 4) hoffset; 5) binding offset; 6) topskip; -% 7) physical page height; 8) physical page width. -% -% We also call \setleading{\textleading}, so the caller should define -% \textleading. The caller should also set \parskip. -% -\def\internalpagesizes#1#2#3#4#5#6#7#8{% - \voffset = #3\relax - \topskip = #6\relax - \splittopskip = \topskip - % - \vsize = #1\relax - \advance\vsize by \topskip - \outervsize = \vsize - \advance\outervsize by 2\topandbottommargin - \pageheight = \vsize - % - \hsize = #2\relax - \outerhsize = \hsize - \advance\outerhsize by 0.5in - \pagewidth = \hsize - % - \normaloffset = #4\relax - \bindingoffset = #5\relax - % - \ifpdf - \pdfpageheight #7\relax - \pdfpagewidth #8\relax - \fi - % - \setleading{\textleading} - % - \parindent = \defaultparindent - \setemergencystretch -} - -% @letterpaper (the default). -\def\letterpaper{{\globaldefs = 1 - \parskip = 3pt plus 2pt minus 1pt - \textleading = 13.2pt - % - % If page is nothing but text, make it come out even. - \internalpagesizes{46\baselineskip}{6in}% - {\voffset}{.25in}% - {\bindingoffset}{36pt}% - {11in}{8.5in}% -}} - -% Use @smallbook to reset parameters for 7x9.25 trim size. -\def\smallbook{{\globaldefs = 1 - \parskip = 2pt plus 1pt - \textleading = 12pt - % - \internalpagesizes{7.5in}{5in}% - {\voffset}{.25in}% - {\bindingoffset}{16pt}% - {9.25in}{7in}% - % - \lispnarrowing = 0.3in - \tolerance = 700 - \hfuzz = 1pt - \contentsrightmargin = 0pt - \defbodyindent = .5cm -}} - -% Use @smallerbook to reset parameters for 6x9 trim size. -% (Just testing, parameters still in flux.) -\def\smallerbook{{\globaldefs = 1 - \parskip = 1.5pt plus 1pt - \textleading = 12pt - % - \internalpagesizes{7.4in}{4.8in}% - {-.2in}{-.4in}% - {0pt}{14pt}% - {9in}{6in}% - % - \lispnarrowing = 0.25in - \tolerance = 700 - \hfuzz = 1pt - \contentsrightmargin = 0pt - \defbodyindent = .4cm -}} - -% Use @afourpaper to print on European A4 paper. -\def\afourpaper{{\globaldefs = 1 - \parskip = 3pt plus 2pt minus 1pt - \textleading = 13.2pt - % - % Double-side printing via postscript on Laserjet 4050 - % prints double-sided nicely when \bindingoffset=10mm and \hoffset=-6mm. - % To change the settings for a different printer or situation, adjust - % \normaloffset until the front-side and back-side texts align. Then - % do the same for \bindingoffset. You can set these for testing in - % your texinfo source file like this: - % @tex - % \global\normaloffset = -6mm - % \global\bindingoffset = 10mm - % @end tex - \internalpagesizes{51\baselineskip}{160mm} - {\voffset}{\hoffset}% - {\bindingoffset}{44pt}% - {297mm}{210mm}% - % - \tolerance = 700 - \hfuzz = 1pt - \contentsrightmargin = 0pt - \defbodyindent = 5mm -}} - -% Use @afivepaper to print on European A5 paper. -% From romildo@urano.iceb.ufop.br, 2 July 2000. -% He also recommends making @example and @lisp be small. -\def\afivepaper{{\globaldefs = 1 - \parskip = 2pt plus 1pt minus 0.1pt - \textleading = 12.5pt - % - \internalpagesizes{160mm}{120mm}% - {\voffset}{\hoffset}% - {\bindingoffset}{8pt}% - {210mm}{148mm}% - % - \lispnarrowing = 0.2in - \tolerance = 800 - \hfuzz = 1.2pt - \contentsrightmargin = 0pt - \defbodyindent = 2mm - \tableindent = 12mm -}} - -% A specific text layout, 24x15cm overall, intended for A4 paper. -\def\afourlatex{{\globaldefs = 1 - \afourpaper - \internalpagesizes{237mm}{150mm}% - {\voffset}{4.6mm}% - {\bindingoffset}{7mm}% - {297mm}{210mm}% - % - % Must explicitly reset to 0 because we call \afourpaper. - \globaldefs = 0 -}} - -% Use @afourwide to print on A4 paper in landscape format. -\def\afourwide{{\globaldefs = 1 - \afourpaper - \internalpagesizes{241mm}{165mm}% - {\voffset}{-2.95mm}% - {\bindingoffset}{7mm}% - {297mm}{210mm}% - \globaldefs = 0 -}} - -% @pagesizes TEXTHEIGHT[,TEXTWIDTH] -% Perhaps we should allow setting the margins, \topskip, \parskip, -% and/or leading, also. Or perhaps we should compute them somehow. -% -\parseargdef\pagesizes{\pagesizesyyy #1,,\finish} -\def\pagesizesyyy#1,#2,#3\finish{{% - \setbox0 = \hbox{\ignorespaces #2}\ifdim\wd0 > 0pt \hsize=#2\relax \fi - \globaldefs = 1 - % - \parskip = 3pt plus 2pt minus 1pt - \setleading{\textleading}% - % - \dimen0 = #1 - \advance\dimen0 by \voffset - % - \dimen2 = \hsize - \advance\dimen2 by \normaloffset - % - \internalpagesizes{#1}{\hsize}% - {\voffset}{\normaloffset}% - {\bindingoffset}{44pt}% - {\dimen0}{\dimen2}% -}} - -% Set default to letter. -% -\letterpaper - - -\message{and turning on texinfo input format.} - -% Define macros to output various characters with catcode for normal text. -\catcode`\"=\other -\catcode`\~=\other -\catcode`\^=\other -\catcode`\_=\other -\catcode`\|=\other -\catcode`\<=\other -\catcode`\>=\other -\catcode`\+=\other -\catcode`\$=\other -\def\normaldoublequote{"} -\def\normaltilde{~} -\def\normalcaret{^} -\def\normalunderscore{_} -\def\normalverticalbar{|} -\def\normalless{<} -\def\normalgreater{>} -\def\normalplus{+} -\def\normaldollar{$}%$ font-lock fix - -% This macro is used to make a character print one way in \tt -% (where it can probably be output as-is), and another way in other fonts, -% where something hairier probably needs to be done. -% -% #1 is what to print if we are indeed using \tt; #2 is what to print -% otherwise. Since all the Computer Modern typewriter fonts have zero -% interword stretch (and shrink), and it is reasonable to expect all -% typewriter fonts to have this, we can check that font parameter. -% -\def\ifusingtt#1#2{\ifdim \fontdimen3\font=0pt #1\else #2\fi} - -% Same as above, but check for italic font. Actually this also catches -% non-italic slanted fonts since it is impossible to distinguish them from -% italic fonts. But since this is only used by $ and it uses \sl anyway -% this is not a problem. -\def\ifusingit#1#2{\ifdim \fontdimen1\font>0pt #1\else #2\fi} - -% Turn off all special characters except @ -% (and those which the user can use as if they were ordinary). -% Most of these we simply print from the \tt font, but for some, we can -% use math or other variants that look better in normal text. - -\catcode`\"=\active -\def\activedoublequote{{\tt\char34}} -\let"=\activedoublequote -\catcode`\~=\active -\def~{{\tt\char126}} -\chardef\hat=`\^ -\catcode`\^=\active -\def^{{\tt \hat}} - -\catcode`\_=\active -\def_{\ifusingtt\normalunderscore\_} -\let\realunder=_ -% Subroutine for the previous macro. -\def\_{\leavevmode \kern.07em \vbox{\hrule width.3em height.1ex}\kern .07em } - -\catcode`\|=\active -\def|{{\tt\char124}} -\chardef \less=`\< -\catcode`\<=\active -\def<{{\tt \less}} -\chardef \gtr=`\> -\catcode`\>=\active -\def>{{\tt \gtr}} -\catcode`\+=\active -\def+{{\tt \char 43}} -\catcode`\$=\active -\def${\ifusingit{{\sl\$}}\normaldollar}%$ font-lock fix - -% If a .fmt file is being used, characters that might appear in a file -% name cannot be active until we have parsed the command line. -% So turn them off again, and have \everyjob (or @setfilename) turn them on. -% \otherifyactive is called near the end of this file. -\def\otherifyactive{\catcode`+=\other \catcode`\_=\other} - -\catcode`\@=0 - -% \backslashcurfont outputs one backslash character in current font, -% as in \char`\\. -\global\chardef\backslashcurfont=`\\ -\global\let\rawbackslashxx=\backslashcurfont % let existing .??s files work - -% \rawbackslash defines an active \ to do \backslashcurfont. -% \otherbackslash defines an active \ to be a literal `\' character with -% catcode other. -{\catcode`\\=\active - @gdef@rawbackslash{@let\=@backslashcurfont} - @gdef@otherbackslash{@let\=@realbackslash} -} - -% \realbackslash is an actual character `\' with catcode other, and -% \doublebackslash is two of them (for the pdf outlines). -{\catcode`\\=\other @gdef@realbackslash{\} @gdef@doublebackslash{\\}} - -% \normalbackslash outputs one backslash in fixed width font. -\def\normalbackslash{{\tt\backslashcurfont}} - -\catcode`\\=\active - -% Used sometimes to turn off (effectively) the active characters -% even after parsing them. -@def@turnoffactive{% - @let"=@normaldoublequote - @let\=@realbackslash - @let~=@normaltilde - @let^=@normalcaret - @let_=@normalunderscore - @let|=@normalverticalbar - @let<=@normalless - @let>=@normalgreater - @let+=@normalplus - @let$=@normaldollar %$ font-lock fix - @unsepspaces -} - -% Same as @turnoffactive except outputs \ as {\tt\char`\\} instead of -% the literal character `\'. (Thus, \ is not expandable when this is in -% effect.) -% -@def@normalturnoffactive{@turnoffactive @let\=@normalbackslash} - -% Make _ and + \other characters, temporarily. -% This is canceled by @fixbackslash. -@otherifyactive - -% If a .fmt file is being used, we don't want the `\input texinfo' to show up. -% That is what \eatinput is for; after that, the `\' should revert to printing -% a backslash. -% -@gdef@eatinput input texinfo{@fixbackslash} -@global@let\ = @eatinput - -% On the other hand, perhaps the file did not have a `\input texinfo'. Then -% the first `\{ in the file would cause an error. This macro tries to fix -% that, assuming it is called before the first `\' could plausibly occur. -% Also turn back on active characters that might appear in the input -% file name, in case not using a pre-dumped format. -% -@gdef@fixbackslash{% - @ifx\@eatinput @let\ = @normalbackslash @fi - @catcode`+=@active - @catcode`@_=@active -} - -% Say @foo, not \foo, in error messages. -@escapechar = `@@ - -% These look ok in all fonts, so just make them not special. -@catcode`@& = @other -@catcode`@# = @other -@catcode`@% = @other - - -@c Local variables: -@c eval: (add-hook 'write-file-hooks 'time-stamp) -@c page-delimiter: "^\\\\message" -@c time-stamp-start: "def\\\\texinfoversion{" -@c time-stamp-format: "%:y-%02m-%02d.%02H" -@c time-stamp-end: "}" -@c End: - -@c vim:sw=2: - -@ignore - arch-tag: e1b36e32-c96e-4135-a41a-0b2efa2ea115 -@end ignore diff --git a/xemacs-packages/riece/doc/version-en.texi b/xemacs-packages/riece/doc/version-en.texi deleted file mode 100644 index db9bc7b8..00000000 --- a/xemacs-packages/riece/doc/version-en.texi +++ /dev/null @@ -1,4 +0,0 @@ -@set UPDATED 18 December 2006 -@set UPDATED-MONTH December 2006 -@set EDITION 3.1.2 -@set VERSION 3.1.2 diff --git a/xemacs-packages/riece/doc/version-ja.texi b/xemacs-packages/riece/doc/version-ja.texi deleted file mode 100644 index ff02c760..00000000 --- a/xemacs-packages/riece/doc/version-ja.texi +++ /dev/null @@ -1,4 +0,0 @@ -@set UPDATED 29 January 2007 -@set UPDATED-MONTH January 2007 -@set EDITION 3.1.2 -@set VERSION 3.1.2 diff --git a/xemacs-packages/riece/lisp/COMPILE b/xemacs-packages/riece/lisp/COMPILE deleted file mode 100644 index 61a65e04..00000000 --- a/xemacs-packages/riece/lisp/COMPILE +++ /dev/null @@ -1,235 +0,0 @@ -;;; -*- 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-mcat - 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-icons - '("riece-command-quit.xpm" - "riece-command-join.xpm" - "riece-command-part.xpm" - "riece-command-previous-channel.xpm" - "riece-command-next-channel.xpm" - "riece-command-change-layout.xpm" - "riece-submit-bug-report.xpm")) - -(defvar riece-scripts - '("server.rb" - "aproxy.rb")) - -(defun riece-compile-modules (modules) - (let ((load-path (cons nil load-path)) - error-modules) - (while modules - (let ((source (expand-file-name - (concat (symbol-name (car modules)) ".el")))) - (if (file-newer-than-file-p source (concat source "c")) - (condition-case error - (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))))) - -(defun riece-install-modules (modules dest just-print) - (unless (or just-print (file-exists-p dest)) - (make-directory dest t)) - (while modules - (let ((name (symbol-name (car modules)))) - (princ (format "%s.el -> %s\n" name dest)) - (unless just-print - (copy-file (expand-file-name (concat name ".el")) - (expand-file-name (concat name ".el") dest) - t t)) - (princ (format "%s.elc -> %s\n" name dest)) - (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") dest) - t t) - (princ (format "(%s was not successfully compiled, ignored)\n" - name))))) - (setq modules (cdr modules)))) - -(defun riece-install-icons (icons dest just-print) - (unless (or just-print (file-exists-p dest)) - (make-directory dest t)) - (while icons - (when (file-exists-p (expand-file-name (car icons))) - (princ (format "%s -> %s\n" (car icons) dest)) - (unless just-print - (copy-file (expand-file-name (car icons)) - (expand-file-name (car icons) dest) - t t))) - (setq icons (cdr icons)))) - -(defun riece-install-scripts (scripts dest just-print) - (unless (or just-print (file-exists-p dest)) - (make-directory dest t)) - (while scripts - (when (file-exists-p (expand-file-name (car scripts))) - (princ (format "%s -> %s\n" (car scripts) dest)) - (unless just-print - (copy-file (expand-file-name (car scripts)) - (expand-file-name (car scripts) dest) - 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 () - (let ((load-path (cons nil 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) " "))) - -(defun riece-update-mcat () - (let ((modules (riece-examine-modules)) - (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))))) - -(defun riece-compile () - (riece-compile-modules (riece-examine-modules))) - -(defun riece-install () - (riece-install-modules - (riece-examine-modules) - (expand-file-name "riece" (car command-line-args-left)) - (riece-install-just-print-p)) - (riece-install-icons - riece-icons - (expand-file-name "riece" (car command-line-args-left)) - (riece-install-just-print-p)) - (riece-install-scripts - riece-scripts - (expand-file-name "riece" (car command-line-args-left)) - (riece-install-just-print-p))) - -(defun riece-compile-package () - (setq autoload-package-name "riece") - (add-to-list 'command-line-args-left ".") - (batch-update-directory) - (add-to-list 'command-line-args-left ".") - (Custom-make-dependencies) - (riece-compile-modules - (append (riece-examine-modules) - '(auto-autoloads custom-load)))) - -(defun riece-install-package () - (riece-install-modules - (append (riece-examine-modules) - '(auto-autoloads custom-load)) - (expand-file-name "lisp/riece" (car command-line-args-left)) - (riece-install-just-print-p)) - (riece-install-icons - riece-icons - (expand-file-name "etc/riece" (car command-line-args-left)) - (riece-install-just-print-p)) - (riece-install-scripts - riece-scripts - (expand-file-name "etc/riece" (car command-line-args-left)) - (riece-install-just-print-p))) - -(defun riece-test () - (let ((load-path (cons (expand-file-name "test") (cons nil load-path))) - (files (directory-files "test" 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 (car command-line-args-left)))) diff --git a/xemacs-packages/riece/lisp/ChangeLog b/xemacs-packages/riece/lisp/ChangeLog deleted file mode 100644 index 9d1622de..00000000 --- a/xemacs-packages/riece/lisp/ChangeLog +++ /dev/null @@ -1,4599 +0,0 @@ -2007-01-29 Daiki Ueno - - * Riece: Version 3.1.2 released. - -2007-01-29 Daiki Ueno - - * 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 - - * riece-mcat.el (riece-mcat-extract): Abolished ALIST arg. - -2007-01-19 Daiki Ueno - - * 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 - - * 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 - - * 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 - - * 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 - - * Riece: Version 3.1.1 released. - * configure.ac: Bump up version to 3.1.1. - -2006-09-27 Daiki Ueno - - * 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 - - * riece-layout.el (riece-layout-alist): Added - riece-configure-windows-spiral. - (riece-configure-windows-spiral): New window layout. Written by - URABE Shyouhei . - - * 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 - - * Riece: Version 3.1.0 released. - * configure.ac: Bump up version to 3.1.0. - -2006-07-17 Daiki Ueno - - * riece-commands.el (riece-command-join-channel): Simplified by - using riece-server-opened. - (riece-command-part-channel): Ditto. - -2006-07-16 Daiki Ueno - - * 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 - - * 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 - - * Riece: Version 3.0.0 released. - * configure.ac: Bump up version to 3.0.0. - -2006-05-16 Daiki Ueno - - * 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 - - * riece-commands.el (riece-command-close-server): Cause error - on non-existent server process. - -2006-04-26 Daiki Ueno - - * 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 - - * 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 - - * 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 - - * riece.el (riece-buffer-alist): " *Debug*" -> "*Debug*". - (riece-save-variables-files): Fixed a typo in the docstring. - -2006-01-14 Daiki Ueno - - * riece-display.el (riece-part-channel): Emit - 'channel-list-changed signal. - -2005-12-29 Daiki Ueno - - * riece-alias.el (riece-alias-alternate-separator): Reverted the - default value. - -2005-11-19 Daiki Ueno - - * Riece: Version 2.0.2 released. - * configure.ac: Bump up version to 2.0.2. - -2005-11-19 Daiki Ueno - - * 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 - - * riece-cache.el: Renamed from riece-lru.el. - -2005-11-18 Daiki Ueno - - * 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 - - * 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 - - * Riece: Version 2.0.1 released. - * configure.ac: Bump up version to 2.0.1. - -2005-09-11 Daiki Ueno - - * 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 - - * riece-alias.el (riece-alias-abbrev-identity-string): Compare car - of riece-alias-alist with identities case insensitively. - -2005-09-05 Daiki Ueno - - * Makefile.am (EXTRA_DIST): Added riece-xfaceb.el. - * riece-addon-modules.el (riece-addon-modules): Added riece-xfaceb. - -2005-09-03 Steve Youngs - - * 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 - - * riece-unread.el (riece-unread-requires): Require 'riece-history. - -2005-08-29 Daiki Ueno - - * Riece: Version 2.0.0 released. - * riece-version.el (riece-version-number): Bump up to 2.0.0. - -2005-08-29 Daiki Ueno - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * riece-addon.el (riece-uninstall-addon): Update - riece-addon-dependencies. - -2005-08-26 Daiki Ueno - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * riece-addon.el (riece-command-enable-addon): Redraw entire - add-on list. - (riece-command-disable-addon): Ditto. - -2005-08-17 Daiki Ueno - - * 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 - - * riece-options.el (riece-data-directory): Use load-file-name. - -2005-08-15 TAKAHASHI Kaoru - - * riece-options.el (riece-data-directory): Avoid compile time - error when locate-data-directory undefined. - -2005-08-15 Daiki Ueno - - * 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 - - * 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 - - * 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 - - * riece-ruby.el (riece-ruby-filter): Pass timestamp of output - event to output-handler. - -2005-08-12 Daiki Ueno - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * riece-ruby.el: New file. - * rubyserv.rb: Rewrite. - -2005-08-09 Daiki Ueno - - * riece-mini.el (riece-mini-message-no-log): Defined as a - function. - (riece-mini-requires): Fixed indent. - -2005-08-08 Daiki Ueno - - * riece.el (riece-dialogue-mode-map): Bind - riece-command-toggle-others-buffer-mode. - - * riece-commands.el (riece-command-toggle-others-buffer-mode): New - command. - - * riece-layout.el (riece-configure-windows): Hide - riece-others-buffer if riece-others-buffer-mode is nil. - - * riece-options.el (riece-saved-forms): Add - riece-others-buffer-mode and riece-channel-list-buffer-mode. - (riece-others-buffer-mode): New user option. - -2005-08-06 Daiki Ueno - - * riece-alias.el (riece-alias-alternate-separator): Set to "@". - -2005-07-28 Daiki Ueno - - * riece-debug.el: Don't bind unused variable; prepend time to - debug message. - -2005-07-19 Daiki Ueno - - * 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 - - * 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 - - * 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 - - * riece-ruby.el: New file. - -2005-04-04 Daiki Ueno - - * 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 - - * rubyserv.rb: New file. - -2005-03-20 Daiki Ueno - - * riece-toolbar.el [XEmacs] (riece-make-toolbar-from-menu): - Pick up toolbar icons from etc/riece/. - -2005-03-12 Daiki Ueno - - * 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 - - * Riece: Version 1.0.8 released. - * riece-version.el (riece-version-number): Bump up to 1.0.8. - -2005-03-06 Daiki Ueno - - * COMPILE (riece-compile-modules): Print summary. - -2005-03-05 Daiki Ueno - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 . - -2005-02-19 Daiki Ueno - - * 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 - - * 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 - - * riece-addon.el (riece-resolve-addons): Fixed - avoid add directory to addons condition. - -2005-02-10 TAKAHASHI Kaoru - - * riece-addon.el (riece-resolve-addons): Don't add directory to - addons. - -2005-02-09 Yoichi NAKAYAMA - - * riece-commands.el (riece-command-part): Fix argument. - -2005-02-07 Daiki Ueno - - * riece-filter.el (riece-filter): Simplified. - - * riece-addon.el (riece-resolve-addons): Check the existence of - riece-addon-directory. - -2005-02-06 Daiki Ueno - - * riece-filter.el (riece-filter): Modified regexp. - -2005-02-05 Daiki Ueno - - * 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 - - * Riece: Version 1.0.7 released. - * riece-version.el (riece-version-number): Bump up to 1.0.7. - -2005-02-05 Daiki Ueno - - * 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 - - * 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 - - * riece-eval.el (riece-eval-form): New function. - (riece-eval-display-message-function): Use it. - -2005-02-04 Daiki Ueno - - * 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 - - * riece-biff.el (riece-biff-functions): Abolish. - (riece-biff-after-display-message-function): Follow the change above. - -2005-02-04 Daiki Ueno - - * 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 - - * riece-google.el (riece-google-default-lang): Change value. - (riece-google-display-message-function): Follow the change above. - -2005-02-03 OHASHI Akira - - * 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 - - * riece-400.el (riece-handle-475-message): New handler; query - channel key. - -2005-02-03 Daiki Ueno - - * 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 - - * riece-message.el (riece-display-message): When filter-function - return nil, escape from while loop. - -2005-02-02 Daiki Ueno - - * 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 - - * 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 - - * riece-eval.el (riece-eval-regexp): Fix regexp. - (riece-eval-display-message-function): Follow the change above. - -2005-02-02 Daiki Ueno - - * 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 - - * 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 - - * riece-display.el (riece-display-connect-signals): Check nick or - channel, before call `riece-channel-get-users'. - -2004-12-15 Yoichi NAKAYAMA - - * riece-addon.el (riece-command-enable-addon): Fixed. - (riece-command-disable-addon): Ditto. - -2004-12-14 Daiki Ueno - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * riece-log.el (riece-log-display-message-function): Suppress - further file-name encoding. - -2004-12-07 Daiki Ueno - - * 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. ] - -2004-12-07 TAKAHASHI Kaoru - - * riece-foolproof.el (riece-foolproof-command-send-message-function): - Check invisible text. - -2004-12-07 Daiki Ueno - - * 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 - - * 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 - - * riece-message.el (riece-display-message-1): Call - riece-after-display-message-functions in riece-message-buffer. - [cf. ] - -2004-12-05 Daiki Ueno - - * Riece: Version 1.0.6 released. - * riece-version.el (riece-version-number): Bump up to 1.0.6. - -2004-12-01 Daiki Ueno - - * riece-display.el (riece-update-channel-status-indicator): Fixed typo. - -2004-11-28 Daiki Ueno - - * 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 - - * 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 - - * test/lunit.el: Update copyright year. - (lunit-test-result-run): Fixed the argument of - lunit-test-listener-error listener. - -2004-11-26 Daiki Ueno - - * 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 - - * Makefile.am (EXTRA_DIST): Add url-riece.el. - * url-riece.el: url-irc backend provided by Masatake YAMATO - . - [cf. ] - -2004-11-25 Daiki Ueno - - * 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 - - * riece-server.el (riece-server-properties): New function. - -2004-11-22 Daiki Ueno - - * riece-display.el (riece-update-status-indicators): Format - riece-user-indicator as an identity. - -2004-11-22 Daiki Ueno - - * 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 - - * 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 - - * riece.el (riece): Remove nonexistent buffer from - riece-buffer-list when running riece-shrink-buffer. - -2004-11-20 Daiki Ueno - - * riece-display.el (riece-update-buffers): Check existence of each - buffer in riece-buffer-list. - * riece.el (riece): Ditto. - -2004-11-20 Daiki Ueno - - * riece.el: Bind reporter-prompt-for-summary-p. - -2004-11-19 Daiki Ueno - - * riece.el (riece-submit-bug-report): Query VERSION. - -2004-11-19 Daiki Ueno - - * riece.el (riece-submit-bug-report): Query CTCP VERSION before - inspecting *IRC* buffer. - -2004-11-19 Daiki Ueno - - * 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 - - * riece.el (riece-submit-bug-report): New command. - -2004-11-15 Daiki Ueno - - * riece-misc.el (riece-insert): Don't bind unused variable `buffer'. - -2004-11-15 Daiki Ueno - - * 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 - - * 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 - - * riece.el (riece-select-keys): Bind - riece-command-switch-to-channel-by-number to "#". - -2004-11-11 Masatake YAMATO - - * riece-yank.el (riece-command-yank): Fix a typo in comments. - -2004-11-09 OHASHI Akira - - * riece-yank.el (riece-command-yank): Take a 1st argument to send - messages as notice. - -2004-11-07 Daiki Ueno - - * Riece: Version 1.0.5 released. - * riece-version.el (riece-version-number): Bump up to 1.0.5. - -2004-11-07 Daiki Ueno - - * 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 - - * 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 - - * 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 - - * riece-alias.el (riece-alias-abbrev-atmark): Don't append "@" to - a channel on default server. - -2004-11-05 Daiki Ueno - - * 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 - - * 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 - - * riece-yank.el: New add-on from Masatake YAMATO . - * COMPILE (riece-modules): Add riece-yank. - * Makefile.am (EXTRA_DIST): Add riece-yank.el. - -2004-10-11 Daiki Ueno - - * Riece: Version 1.0.4 released. - * riece-version.el (riece-version-number): Bump up to 1.0.4. - -2004-10-05 Daiki Ueno - - * riece.el (riece): Scan riece-startup-channel-list and open servers. - -2004-09-27 Daiki Ueno - - * 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 - - * 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 - - * 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 - - * riece-mini.el (riece-mini-show-backlog): Fix for long messages. - (riece-mini-backlog-size): Change default value. - -2004-09-12 OHASHI Akira - - * riece-mini.el (riece-mini-show-backlog): Protect 1st arg of - `riece-mini-message-no-log'. - -2004-09-11 OHASHI Akira - - * 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 - - * 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 - - * Riece: Version 1.0.3 released. - * riece-version.el (riece-version-number): Bump up to 1.0.3. - -2004-09-01 Daiki Ueno - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * riece-misc.el (riece-insert): Use (recenter -1) to set window - point instead of doing so manually. - -2004-08-28 Daiki Ueno - - * 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 - - * riece-commands.el (riece-command-complete-user): Move point to - the end of the current word. - -2004-08-23 Daiki Ueno - - * 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 - - * 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 - - * riece-highlight.el (riece-highlight-server-match): Simplified. - -2004-08-16 Daiki Ueno - - * Riece: Version 1.0.2 released. - * riece-version.el (riece-version-number): Bump up to 1.0.2. - -2004-08-16 Daiki Ueno - - * 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 - - * 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 - - * riece-menu.el: Do not support enable/disable addon since - easy-menu-remove is not working. - -2004-07-19 Daiki Ueno - - * 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 - - * 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 - - * Riece: Version 1.0.1 released. - * riece-version.el (riece-version-number): Bump up to 1.0.1. - -2004-07-09 Daiki Ueno - - * 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 - - * 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 - - * riece-commands.el (riece-command-complete-user): current-word - can return nil (follow the change in emacs-cvs). - -2004-07-01 Daiki Ueno - - * riece.el (riece-exit): Clear signal-slots. - * riece-signal.el (riece-clear-signal-slots): New function. - -2004-06-28 Daiki Ueno - - * riece-misc.el (riece-split-parameters): Fixed parenthesis. - -2004-06-26 Daiki Ueno - - * riece-commands.el (riece-command-change-mode): Don't send ":". - [cf. ] - -2004-06-18 TAKAHASHI Kaoru - - * 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 - - * 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 - - * 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 - - * 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 - - * riece-foolproof.el (riece-foolproof-dmacro-override): New - function. - (riece-foolproof-insinuate): Check keyboard macro. - -2004-06-10 TAKAHASHI Kaoru - - * 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 - - * 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 - - * 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 - - * 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 - - * riece-hangman.el (riece-hangman-word): Check killed-buffer or - not. Fix random number generation logic. - -2004-06-03 Daiki Ueno - - * 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 - - * 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 - - * riece-button.el (riece-button-disable): On XEmacs, BUFFER arg of - widget-map-buttons is ignored. - -2004-06-01 Daiki Ueno - - * 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 - - * riece-hangman.el (riece-hangman-after-privmsg-hook): Display answer. - (riece-hangman-enable): Initialize random seed. - -2004-05-29 Daiki Ueno - - * Riece: Version 1.0.0 released. - * riece-version.el (riece-version-number): Bump up to 1.0.0. - -2004-05-29 Daiki Ueno - - * 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 - - * 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 - - * 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 - - * riece-biff.el (riece-biff-insinuate): Add riece-biff-disable to - riece-exit-hook. - -2004-05-28 Daiki Ueno - - * 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 - - * 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 - - * 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 - - * 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 - - * riece-addon.el (riece-command-list-addons): Sort add-ons. - -2004-05-23 Daiki Ueno - - * 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 - - * riece-unread.el (riece-unread-disable): Reset riece-unread-channels. - -2004-05-22 Daiki Ueno - - * 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 - - * 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 - - * 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 - - * riece.el (riece-dialogue-mode-map): Bind - riece-command-list-addons as "^". - -2004-05-21 TAKAHASHI Kaoru - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * riece-400.el (riece-handle-read-string): Append "Quit" to prompt - if user quits input. - -2004-05-19 Daiki Ueno - - * riece-commands.el (riece-command-complete-user): New command. - * riece.el: Bind riece-command-complete-user. - -2004-05-19 Daiki Ueno - - * 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 - - * riece-ignore.el (riece-ignore-message-filter): Set the - major-mode of riece-ignore-buffer riece-dialogue-mode. - -2004-05-18 Daiki Ueno - - * 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 - - * riece-ignore.el (riece-ignore-user): Renamed from - riece-ignore-by-user. - -2004-05-18 Daiki Ueno - - * 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 - - * 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 - - * riece-log.el (riece-log-get-directory): Follow the name change - of riece-channel-regexp. - -2004-05-12 Daiki Ueno - - * 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 - - * 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 - - * riece-misc.el (riece-split-parameters): Don't remove a trailing - string even if it is empty. - -2004-05-05 Daiki Ueno - - * 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 - - * riece-300.el (riece-handle-312-message): Use server name - returned by WHOIS instead of riece-real-server-name. - [cf. ] - -2004-05-04 Daiki Ueno - - * 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 - - * 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 - - * 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 - - * riece-button.el (riece-button-requires): Abolish. - -2004-03-29 Daiki Ueno - - * riece.el (riece-buffer-alist): Rename *Commands* -> *Command*. - (riece-command-mode): Rename Commands -> Command. - -2004-03-28 Daiki Ueno - - * riece-signal.el: Require 'riece-options for riece-debug. - * riece-async.el: Require 'riece-options for riece-debug. - -2004-03-28 Daiki Ueno - - * 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 - - * riece-unread.el (riece-unread-after-display-message-function): - Treat private messages as unread. - -2004-03-21 Daiki Ueno - - * riece.el (riece-exit): Don't clear riece-user-list-buffer and - riece-channel-list-buffer. - -2004-03-21 Daiki Ueno - - * riece.el (riece-exit): Clear riece-channel-buffer, - riece-user-list-buffer, and riece-channel-list-buffer. - -2004-03-20 Daiki Ueno - - * riece-server.el (riece-open-server): Append the server-name to - the prompt string. - -2004-03-14 Daiki Ueno - - * 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 - - * 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 - - * Riece: Version 0.2.1 released. - * riece-version.el (riece-version-number): Bump up to 0.2.1. - -2004-03-09 Daiki Ueno - - * riece-emacs.el (riece-propertize-modeline-string): Fix arguments - for add-text-properties. - -2004-03-08 Daiki Ueno - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * riece-display.el (riece-connect-signal): Create slot object - internally. - -2004-02-27 Daiki Ueno - - * 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 - - * 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 - - * riece-300.el (riece-handle-353-message): Add 'riece-identity - property on user list string. - -2004-02-17 Daiki Ueno - - * riece-lsdb.el: Add autoload setting for - lsdb-rebuild-secondary-hash-tables to suppress warning. - -2004-02-16 Daiki Ueno - - * riece-300.el (riece-handle-353-message): Print user list in - channel buffer. - -2004-02-14 Yoichi NAKAYAMA - - * riece-lsdb.el (riece-lsdb-lookup-records): Build - riece-lsdb-cache if necessary. - -2004-01-29 Daiki Ueno - - * 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 - - * Riece: Version 0.1.8 released. - * riece-version.el (riece-version-number): Bump up to 0.1.8. - -2004-01-27 Daiki Ueno - - * 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 - - * 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 - - * riece-identity.el (riece-identity-canonicalize-prefix): Convert - characters in prefix to lower case. - -2004-01-18 Daiki Ueno - - * 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 - - * riece-lsdb.el (riece-lsdb-add-user): Always pass canonical - address for 'net entry. - -2004-01-04 TAKAHASHI Kaoru - - * riece-300.el (riece-handle-317-message): Fix regexp for signon - time extenstion. - -2004-01-03 Daiki Ueno - - * 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 - - * riece-lsdb.el (riece-lsdb-insinuate): Don't require 'lsdb. - -2004-01-02 Daiki Ueno - - * 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 - - * Riece: Version 0.1.7 released. - * riece-version.el (riece-version-number): Bump up to 0.1.7. - -2003-12-22 Daiki Ueno - - * 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 - [cf. ] - -2003-12-17 Daiki Ueno - - * 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 - - * 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 - - [cf. ] - -2003-12-14 Daiki Ueno - - * 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 - - * 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 - - * 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 - - * riece-server.el (riece-with-server-buffer): Store 'edebug-form-spec - property. - -2003-12-03 OHASHI Akira - - * riece-log.el (riece-log-requires): New function. - (riece-log-flashback): Revert 'riece-identity property and button. - -2003-11-28 OHASHI Akira - - * riece-unread.el (riece-unread-after-display-message-function): - Do nothing when message is not a privmsg. - -2003-11-22 Daiki Ueno - - * 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 - - * Riece: Version 0.1.6 released. - * riece-version.el (riece-version-number): Bump up to 0.1.6. - -2003-11-08 Daiki Ueno - - * riece-ctcp.el (riece-command-ctcp-action): Display channel names - in "*Others*" buffer. - -2003-11-05 OHASHI Akira - - * riece-unread.el (riece-unread-switch-to-channel): Protect - switching to the channel not existing. - -2003-10-29 OHASHI Akira - - * riece-log.el (riece-log-get-directory): Support riece-identity - for mapping. - -2003-10-28 Daiki Ueno - - * 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 - - * 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 - - * riece-log.el (riece-log-get-directory): Fix for server name and - private messages handling. - -2003-10-26 Daiki Ueno - - * 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 - - * 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 - - * 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 - - * Riece: Version 0.1.5 released. - * riece-version.el (riece-version-number): Bump up to 0.1.5. - -2003-10-24 Daiki Ueno - - * 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 - [cf. ] - - * 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 - - * 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 - - * 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 - - * riece-log.el (riece-log-get-directory): Follow the change of - `riece-channel-regexp'. - -2003-10-22 Daiki Ueno - - * riece-identity.el (riece-format-identity): Return copied strings. - -2003-10-22 OHASHI Akira - - * riece.el (riece): When riece server was opened, Do - `riece-command-configure-windows' instead of signaling. - -2003-10-22 Daiki Ueno - - * 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 - - * 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 - - * 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 - - * 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 - - * Riece: Version 0.1.4 released. - * riece-version.el (riece-version-number): Bump up to 0.1.4. - -2003-10-19 Daiki Ueno - - * 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 - - * 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 - - * 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 - - * 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 - - * riece-commands.el (riece-command-universal-server-name-argument): - Fix parenthesis. - -2003-10-16 Daiki Ueno - - * 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 - - * riece-commands.el (riece-command-toggle-away): Check user away - status in the server buffer. - [cf. ] - (riece-command-names): Use identity prefix - instead of formatted identity. - (riece-command-who): Ditto. - -2003-10-14 TAKAHASHI Kaoru - - * riece.el (riece-dialogue-mode-map): Bind "N" instead of "\C-n" - to `riece-command-name'. - -2003-10-14 Daiki Ueno - - * riece-layout.el (riece-reconfigure-windows-predicate): Simplified. - -2003-10-13 Daiki Ueno - - * Riece: Version 0.1.3 released. - * riece-version.el (riece-version-number): Bump up to 0.1.3. - -2003-10-13 Daiki Ueno - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * riece-display.el (riece-channel-buffer-name): Check whether - IDENTITY is a member of riece-current-channels. - -2003-10-07 TAKAHASHI Kaoru - - * riece-commands.el (riece-command-kick): Fix completing-read - collection argument. - -2003-10-05 Daiki Ueno - - * riece-000.el: Require 'riece-commands. - * riece-200.el: Don't require 'riece-commands. - * riece-300.el: Ditto. - -2003-10-05 Daiki Ueno - - * Riece: Version 0.1.2 released. - * riece-version.el (riece-version-number): Bump up to 0.1.2. - -2003-10-05 Daiki Ueno - - * 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 - - * 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 - - * 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 - - * riece-rdcc.el (riece-rdcc-save-directory): New user option. - -2003-09-29 Daiki Ueno - - * riece-000.el (riece-handle-001-message): Parse elements in - riece-startup-channel-list. - -2003-09-21 TAKAHASHI Kaoru - - * riece-skk-kakutei.el - (riece-skk-kakutei-command-enter-message-as-notice): Fix typo. - -2003-09-20 Daiki Ueno - - * 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 - - * riece-unread.el (riece-unread-after-display-message-function): - Simplified. - -2003-09-02 Daiki Ueno - - * riece-commands.el (riece-command-join): Extract target - identity-prefix before applying riece-channel-p; format target. - -2003-08-30 Daiki Ueno - - * Riece: Version 0.1.1 released. - * riece-version.el (riece-version-number): Bump up to 0.1.1. - -2003-08-29 Daiki Ueno - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * riece-filter.el (riece-sentinel): Suppress status message when - riece-debug is nil. - -2003-08-26 Daiki Ueno - - * 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 - - * 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 - - * 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 - - * 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 - - * riece-display.el (riece-join-channel): Parse non-nil elements in - riece-default-channel-binding. - -2003-08-25 Daiki Ueno - - * 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 - - * Riece: Version 0.1.0 released. - * riece-version.el (riece-version-number): Bump up to 0.1.0. - -2003-08-25 Daiki Ueno - - * 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 - - * 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 - - * riece-display.el (riece-configure-windows-top): Set - `truncate-partial-width-windows' nil, when horizontal window - split. - -2003-08-21 TAKAHASHI Kaoru - - * 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 - - * 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 - - * 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 - - * 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 - - * riece-commands.el (riece-command-previous-channel): Skip nil in - riece-current-channels. - -2003-08-09 Daiki Ueno - - * 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 - - * riece-unread.el (riece-unread-update-channel-list-buffer): Call - riece-parse-identity. - -2003-08-04 Daiki Ueno - - * riece-server.el (riece-find-server-name): Abolish. - - * riece-alias.el: Add usage. - -2003-08-04 Daiki Ueno - - * 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 - - * Riece: Version 0.0.4 released. - * riece-version.el (riece-version-number): Bump up to 0.0.4. - -2003-06-24 OHASHI Akira - - * riece-unread.el (riece-unread-display-message-function): Don't check - `selected-window'. It doesn't work as expected. - -2003-06-23 Daiki Ueno - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * riece-channel.el (riece-forget-channel): Fixed. - (riece-channel-modeless-regexp): Abolish. - (riece-channel-modeless-p): Abolish. - -2003-06-06 OHASHI Akira - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * riece-commands.el (riece-command-next-channel): Circularly - follow the channel list. - (riece-command-previous-channel): Ditto. - -2003-06-02 Daiki Ueno - - * 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 - - * 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 - - * 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 - - * 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 - - * riece-rdcc.el: New add-on. - - * Makefile.am (EXTRA_DIST): Add riece-rdcc.el - -2003-06-01 Daiki Ueno - - * riece-ndcc.el: New add-on. - * Makefile.am (EXTRA_DIST): Add riece-ndcc.el - -2003-05-31 Daiki Ueno - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * 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. diff --git a/xemacs-packages/riece/lisp/ChangeLog.Liece b/xemacs-packages/riece/lisp/ChangeLog.Liece deleted file mode 100644 index 8aeb3813..00000000 --- a/xemacs-packages/riece/lisp/ChangeLog.Liece +++ /dev/null @@ -1,4696 +0,0 @@ -2003-05-24 Daiki Ueno - - * 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 - - * 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 - - * 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 - - * liece-commands.el (liece-command-tag-region): Simplify. - * liece-misc.el (liece-remove-properties-region): Abolish. - -2003-05-18 OHASHI Akira - - * liece.el (liece-dialogue-mode-map): Don't bind - `liece-command-open-server'. - -2003-04-30 OHASHI Akira - - * liece-channel.el (liece-channel-list-redisplay-buffer): Search a - channel correctly. - -2003-04-17 Daiki Ueno - - * 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 - - * 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 - - * 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ä - - * Makefile.lisp (all): Not a double-colon any more. - -2002-10-11 Yoichi NAKAYAMA - - * liece-emacs.el: Require pces to avoid compile error. - -2002-09-26 Daiki Ueno - - * liece-minibuf.el (liece-minibuf-completing-read): Don't use the - 7th argument of completing-read. - -2002-09-24 Daiki Ueno - - * liece-handle.el (liece-handle-mode-message): Check chnlp before - passing mode argument to liece-channel-set-*. - [cf. ] - -2002-09-03 Daiki Ueno - - * liece-handle.el (liece-handle-quit-message): Don't use - liece-nick-mark-as-apart. - (liece-handle-join-message): Ditto. - [cf. ] - -2002-09-01 Daiki Ueno - - * liece-handle.el (liece-handle-mode-message): The arglist of - liece-nick-set-mode was changed. - -2002-08-27 Daiki Ueno - - * 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 - - * 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" . - [cf. ] - -2002-08-11 OHASHI Akira - - * 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 .) - - * 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 - - * 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 . [cf. ] - -2002-07-13 Daiki Ueno - - * 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 - - * 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 - - * liece-inlines.el (string-equal-ignore-case): Don't try to use - 'compare-strings'. - -2002-05-19 Daiki Ueno - - * liece-xemacs.el (liece-xemacs-modeline-glyph): Check 'xbm. - -2002-05-04 Stephen J. Turnbull - - * 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 - - * gettext.el (gettext-default-locale): New variable. - (bind-text-domain): Use it. - -2002-05-07 Daiki Ueno - - * gettext.el (gettext-mapcar*): Eliminate recursion. - -2002-04-14 Daiki Ueno - - * 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 - - * 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 - - * liece-misc.el: Don't require pccl and broken. - -2002-04-07 Daiki Ueno - - * 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 - - * 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 - - * gettext.el (bind-text-domain): Respect LC_ALL and LC_MESSAGES; - reverse lang-paths. - -2002-03-20 Daiki Ueno - - * gettext.el (gettext-parse-Content-Type): Bind `case-fold-search' - to t to extract Content-Type: field properly. - -2002-03-19 Daiki Ueno - - * 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 - - * 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 - - * gettext.el (bind-text-domain): Implement a catalog probe mechanism. - (Implemented by YAMASHITA Junji ) - -2002-02-12 Daiki Ueno - - * 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 - - * 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 - - * 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 - - * 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 - - * liece-misc.el (liece-subtract-time): New function. - (liece-time-difference): Use it. - -2001-10-05 Daiki Ueno - - * liece-misc.el (liece-time-difference): Fix the arglist. - [cf. ] - -2001-10-02 Daiki Ueno - - * liece-compat.el (replace-in-string): Follow a change in XEmacs. - -2001-10-02 Daiki Ueno - - * 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 - - * liece-misc.el (liece-time-difference): Use `abs' for - `liece-check-buffers-if-interval-expired'. - -2001-09-16 Katsuhiro Hermit Endo - - * liece-vars.el (liece-server-alist): Update default value. - -2001-06-19 OHASHI Akira - - * liece-url.el (liece-url-regexp): Fix regexp. - - * liece-vars.el (liece-display-unread-mark): Set default to t. - -2001-06-14 OHASHI Akira - - * 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 - - * liece-handle.el (liece-handle-privmsg-message): Don't compare when - `item' and `liece-current-chat-partner' are nil. - -2001-02-12 Daiki Ueno - - * 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 - - * liece-modules.el: Simplified. - -2000-12-09 Tanaka Akira - - * liece.el (liece-refresh-buffer-window): Simplified. - -2000-11-30 Tanaka Akira - - * 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 - - * 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 - - * 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 - - * 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 - - * liece-commands.el (liece-command-qualify-nicks): Refer 1st argument. - -2000-10-05 Daiki Ueno - - * 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 - - * liece-commands.el (liece-command-set-operators): Reset `run'. - (liece-command-set-voices): Ditto. - -2000-09-30 Daiki Ueno - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * liece-vars.el (liece-inhibit-startup-message): New user option. - -2000-09-11 Daiki Ueno - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * liece-clfns.el (remq): New compiler macro. - -2000-09-05 Akira Ohashi - - * 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 - - * liece-inlines.el (string-equal-ignore-case): Check return value - of `compare-strings'. - -2000-09-03 Daiki Ueno - - * 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 - - * 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 - - * liece-handle.el (liece-handle-privmsg-message): Fixed. - -2000-08-30 Akira Ohashi - - * 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 - - * 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 . - -2000-08-30 Akira Ohashi - - * 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 - - * liece-channel.el (liece-channel-change): Run - `liece-redisplay-buffer-functions'. - -2000-08-23 Daiki Ueno - - * liece-handle.el (liece-handle-privmsg-message): Use - `liece-pick-buffer-1' to construct channel buffer name. - -2000-08-23 Akira Ohashi - - * 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 - - * liece.el (liece-server-keyword-map): Bind connection type. - -2000-08-16 Daiki Ueno - - * 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 - - * liece-xemacs.el (liece-toolbar-position): Use - function defaul-toolbar-position instead of variable. - -2000-07-17 Daiki Ueno - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * liece-xemacs.el - (liece-toolbar-position): Check feature 'toolbar was provided. - -2000-04-08 Daiki Ueno - - * 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 - -2000-04-05 Daiki Ueno - - * 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 . - - * liece-ctcp.el - (liece-ctcp-make-menu-command-wrapper): Don't use `#'. - (liece-ctcp-make-command-wrapper): Ditto. - -2000-04-04 Daiki Ueno - - * 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 - - * liece-emacs.el: Require `derived'. - -2000-03-24 Daiki Ueno - - * liece-inlines.el (liece-locate-path): Use - `liece-locate-data-directory' instead of `locate-data-directory'. - -2000-03-23 Daiki Ueno - - * 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 - - * 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 - - * 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 - - * 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 - - * liece-compat.el (liece-get-buffer-window): Search all frames. - -2000-02-28 Daiki Ueno - - * liece.el (liece-command-mode): Set frame-title-format when - running on window-system environment. - -2000-02-18 Daiki Ueno - - * liece-emacs.el (liece-emacs-splash): Use `frame-char-width' and - `frame-char-height' when calculating logo centering. - -2000-02-17 Daiki Ueno - - * liece-400.el (liece-handle-443-message): Check channel name. - -2000-02-13 Daiki Ueno - - * 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 - - * 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 - - * liece-emacs.el: Require `image' when compiling. - (create-image): Add optional argument `data-p'. - -2000-01-22 Daiki Ueno - - * 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 - - * 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 - - * liece-commands.el - (liece-command-next-channel): Traverse channel list circularly. - (liece-command-previous-channel): Likewise. - -1999-12-26 Daiki Ueno - - * liece-commands.el - (liece-command-previous-channel): Remove nil from channel list. - (liece-command-next-channel): Ditto. - -1999-12-24 Daiki Ueno - - * 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 - - * 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 - - * liece-misc.el (liece-set-channel-indicator): Switch to - `liece-command-buffer' when updating modeline. - -1999-12-19 Daiki Ueno - - * 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 - - * 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 - - * liece-message.el (liece-message-parent-buffer): Add condtion. - -1999-11-13 Daiki Ueno - - * liece.el (liece-read-variables-files): Make the `~/.liece/' - directory if there is no initialization file. - -1999-11-10 Kenichi OKADA - - * liece-xemacs.el (liece-xemacs-splash-at-point): Calculate - horizontal position of the splash logo. - -1999-11-10 Daiki Ueno - - * liece-emacs.el (liece-emacs-splash): Check the number of - the arguments of `insert-image'. - -1999-11-07 Daiki Ueno - - * 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 - - * 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 - - * liece-misc.el (liece-get-buffer-create): Use memq instead of - member to search over buffers list. - -1999-10-29 Daiki Ueno - - * liece-handle.el (liece-handle-ping-message): Return the - argument correctly. - - * liece.el (liece-insert-internal): Remove `inline'. - -1999-10-27 Daiki Ueno - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * gettext.el (gettext-load-message-catalogue): Use hashtable. - (gettext-load-portable-message-catalogue): Likewise. - -1999-10-13 Daiki Ueno - - * liece-misc.el (next-visible-point): Don't advise. - (liece-remove-properties-region): Enclose by `save-restriction'. - -1999-10-12 Daiki Ueno - - * 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 - - * gettext.el (gettext-default-mime-charset): New variable. - (gettext-parse-Content-Type): Use it. - -1999-10-07 Daiki Ueno - - * 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 - - * 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 - - * 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 - - * liece-message.el (liece-message-parent-buffer): Check the - message direction in private conversation. - -1999-09-28 Daiki Ueno - - * 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 - - * 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 - - * liece.el (liece-open-server): Set `liece-status-message-string' - when timeout is expired. - -1999-09-14 Daiki Ueno - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * irchat-emacs.el (irchat-emacs-splash): Use `fontset-pixel-size'. - -1999-08-22 Daiki Ueno - - * 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 - - * 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 - - * 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 - - * liece.xpm: Reduce colors. - -1999-08-20 Daiki Ueno - - * irchat-x-face.el (irchat-x-face-insert-function): Don't use - `eval-when-compile' while checking bitmap-mule. - -1999-08-20 Daiki Ueno - - * 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 - - * 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 - - * irchat-300.el (irchat-353-channel): Abolish. - (irchat-handle-366-message): Do not use `irchat-353-channel'. - -1999-08-13 Daiki Ueno - - * irchat-200.el (irchat-handle-218-message): Do not indent - explicitly. - -1999-08-08 Daiki Ueno - - * 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) : New handler. - (irchat-handle-347-message) : New handler - -1999-08-07 Daiki Ueno - - * 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) : 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 - - * irchat-intl.el (irchat-intl-load-catalogue): Add nil check. - (irchat-intl-catalogue-path): Fix last change. - -1999-08-06 Daiki Ueno - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * irchat-inlines.el (string-list-modify-ignore-case): Fix typo. - -1999-07-29 Daiki Ueno - - * irchat-make.el: Generate file `MANIFEST.liece'. - (install-update-manifest-file): New function. - -1999-07-28 Daiki Ueno - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * irchat-ctcp.el: Register ACTION handler. - -1999-07-04 Daiki Ueno - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * irchat-400.el: Remove redundancies on regexps. - (irchat-handle-432-msg) : Rewrite. - (irchat-handle-433-msg) : 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 - - * 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 - - * 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 - - * 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 - - * irchat.el, irchat-vars.el (irchat-before-kill-emacs-hook): New hook. - -1999-05-29 Daiki Ueno - - * 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 - - * irchat-crypt.el: Do not require 'idea. - - * irchat-commands.el (irchat-command-message): Treat channel target. - - * irchat-300.el (irchat-handle-317-msg) : - Add argument rest to match-string. - -1999-05-28 Daiki Ueno - - * 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) : Remove condtionals for - obsolete servers. [2.5 or 2.6]. - (irchat-handle-367-msg) : Treat it as generic long - reply handler. - (irchat-367-channel): New variable. - (irchat-367-regexps): New variable. - (irchat-handle-368-msg) : Save ban patterns as - 'ban property. - -1999-05-26 Daiki Ueno - - * irchat.el (irchat-clear-system): - Use dotimes when initializing irchat-obarray. - -1999-05-26 Daiki Ueno - - * 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 - - * irchat.el (irchat-others-mode): Set parent mode explicitly. - (irchat-channel-mode): Ditto. - -1999-05-24 Daiki Ueno - - * irchat-minibuf.el (irchat-minibuffer-parse-modes): Parse ban - pattern. - - * irchat-200.el (irchat-handle-206-msg) : - Use multiline display format. - (irchat-handle-214-msg) : Likewise. - (irchat-handle-213-msg) : Likewise. - - * irchat-ctcp.el (irchat-client-insert): Quote format string. - -1999-05-23 Daiki Ueno - - * 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 - - * 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 - - * 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) : - Fix regexp. - (irchat-handle-242-msg) : Cut off preceding `:'. - (irchat-handle-205-msg) : Fix typo. - (irchat-handle-218-msg) : Fix display format. - -1999-05-13 Daiki Ueno - - * 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 - - * irchat-url.el (irchat-command-browse-url): Fix typo. - -1999-05-11 Daiki Ueno - - * 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 - - * 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 - - * 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 - - * irchat-commands.el (irchat-command-nickname): Do not set - `irchat-real-nickname'. - -1999-05-06 Daiki Ueno - - * 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 - - * 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 - - * 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 - - * 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. - -1999-04-29 Daiki Ueno - - * 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 - - * 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 - - * README-styles.ja, TODO.ja, sample.dot.liece.ja: Removed. - -1999-04-26 Daiki Ueno - - * 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 - - * irchat-handle.el (irchat-handle-324-msg): Fix regexp. - -1999-04-16 Daiki Ueno - - * irchat-xemacs.el: Add hooks to hide modelines. - -1999-04-12 Daiki Ueno - - * 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 - - * 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 - - * dcc.c (send_file): Use `get_address_externally'. - (chat_listen): Likewise. - -1999-04-05 Daiki Ueno - - * getaddrinfo.c: Include `stdlib.h'. - -1999-04-04 Daiki Ueno - - * 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 - - * tcp.c (NI_MAXHOST): Add check if it has been already defined. - - * irchat.el (irchat-command-keys): Bind `C-c C-j'. - -1999-03-31 Daiki Ueno - - * irchat-handle.el (irchat-handle-mode-msg): Fix regexp. - - * irchat-commands.el (irchat-command-finger): Add prefix arg. - -1999-03-30 Daiki Ueno - - * 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 - - * irchat-commands.el (irchat-command-finger): Specify nick twice. - - * liece-faq.texinfo: Fix URI of APEL's ftp sites. - -1999-03-17 Daiki Ueno - - * 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 - - * 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 - - * irchat-handle.el (irchat-handle-join-msg): Fix regexp. - - * irchat-hilight.el (irchat-highlight-maybe-hide-quote): Fixed. - -1999-03-14 Daiki Ueno - - * 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 - - * 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 - - * 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 - - * 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 - - * dcc.c (main): Add cast against return value of basename(3). - -1999-03-10 Daiki Ueno - - * 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 - - * 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 - - * 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 - - * irchat.el (irchat-clear-system): Fix backquotes. - -1999-02-25 Daiki Ueno - - * irchat-300.el (irchat-handle-303-msg): Fix. Add check for empty - reply. - -1999-02-24 Daiki Ueno - - * 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 - - * 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 - - * 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 - - * 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. : - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * irchat.el (irchat-read-variables-files): Save alternatively - specified startup file name into `irchat-variables-files'. - -1999-02-04 Daiki Ueno - - * 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 - - * 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 - - * 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 - - * 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. - -1999-01-31 Daiki Ueno - - * 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 - - * 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 - - * 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 - - * 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 - - * irchat-misc.el (irchat-change-nick-of): Fixed. - -1999-01-22 Daiki Ueno - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * README-styles.ja: New file. - - * irchat-channel.el (irchat-channel-change): Enclose with - `save-excursion'. - -1999-01-11 Daiki Ueno - - * irchat.el (irchat): Fixed bug in XEmacs toolbar specification. - -1999-01-10 Daiki Ueno - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * irchat-intl.el (irchat-intl-parse-Content-Type): Parse - "Content-Type:" header to recognize coding used in PO files. - -1999-01-01 Daiki Ueno - - * irchat-intl.el (irchat-intl-domains-to-coding-system-alist): - Abolished. - - * irchat-commands.el (irchat-command-find-timestamp): Regexp fixed. - -1998-12-30 Daiki Ueno - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - - * 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 - "@+". - (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 - - * 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. - -1998-11-28 Daiki Ueno - - * 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 - - * irchat.el: Set default `truncate-lines'. - -1998-11-26 Daiki Ueno - - * 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 - - * 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 - - * 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 - - * 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 - - * irchat-handle.el (irchat-handle-privmsg-msg): Fixed. - - * etc/ball.*.xpm: Remove background color in each XPM file - (From Yasushi Shoji ). - - * 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 - - * 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 - - * 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 - - * irchat-ctcp.el (irchat-ccl-quote-decode): Fixed. - -1998-11-13 Daiki Ueno - - * 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 - - * irchat-ctcp.el: Add CCL usability checking with `ccl-usable'. - -1998-11-11 Daiki Ueno - - * 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'. - -1998-10-20 Daiki Ueno - - * 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 - - * 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 - - * irchat-crypt.el (base64-encode-string): Fixed autoload with - `mel' to `mel-b' package. - (base64-decode-string): Ditto. - -1998-10-06 Daiki Ueno - - * 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 - - * 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 - - * 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. - -1998-09-30 Daiki Ueno - - * 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 - - * 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 - - * irchat-crypt.el (irchat-read-passphrase): New alias. - -1998-09-28 Daiki Ueno - - * 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. diff --git a/xemacs-packages/riece/lisp/Makefile.am b/xemacs-packages/riece/lisp/Makefile.am deleted file mode 100644 index c01a6be0..00000000 --- a/xemacs-packages/riece/lisp/Makefile.am +++ /dev/null @@ -1,58 +0,0 @@ -SUBDIRS = test - -EXTRA_DIST = COMPILE ChangeLog ChangeLog.Liece \ - 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 url-riece.el \ - riece-command-previous-channel.xpm riece-command-next-channel.xpm \ - riece-submit-bug-report.xpm \ - server.rb aproxy.rb - -CLEANFILES = auto-autoloads.el custom-load.el *.elc -DISTCLEANFILES = riece-package-info.el -FLAGS ?= -batch -q -no-site-file - -all: elc - -elc: - $(EMACS) $(FLAGS) -l COMPILE -f riece-compile - -install: elc - $(EMACS) $(FLAGS) -l COMPILE -f riece-install $(lispdir) # $(MAKE) - -package: - $(XEMACS) $(FLAGS) -l COMPILE -f riece-compile-package - -install-package: package - $(XEMACS) $(FLAGS) -l COMPILE -f riece-install-package \ - $(PACKAGEDIR) # $(MAKE) - -check-local: - $(EMACS) $(FLAGS) -l COMPILE -f riece-test lunit-report.xml - -compile-individually: - @for i in `$(EMACS) $(FLAGS) -l COMPILE -f riece-examine`; do \ - echo $(EMACS) $(FLAGS) -l COMPILE \ - -f riece-compile-module $$i; \ - $(EMACS) $(FLAGS) -l COMPILE \ - -f riece-compile-module $$i; \ - done - -update-mcat: - $(EMACS) $(FLAGS) -l COMPILE -f riece-update-mcat diff --git a/xemacs-packages/riece/lisp/aproxy.rb b/xemacs-packages/riece/lisp/aproxy.rb deleted file mode 100644 index 90c80bac..00000000 --- a/xemacs-packages/riece/lisp/aproxy.rb +++ /dev/null @@ -1,107 +0,0 @@ -# aproxy.rb --- async proxy between an IRC server and a client -# Copyright (C) 1998-2005 Daiki Ueno - -# Author: Daiki Ueno -# 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 diff --git a/xemacs-packages/riece/lisp/riece-000.el b/xemacs-packages/riece/lisp/riece-000.el deleted file mode 100644 index 277cae5b..00000000 --- a/xemacs-packages/riece/lisp/riece-000.el +++ /dev/null @@ -1,80 +0,0 @@ -;;; riece-000.el --- handlers for 000 replies -;; Copyright (C) 1998-2003 Daiki Ueno - -;; Author: Daiki Ueno -;; 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 !@\"" - (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)) - (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)))) - (run-hooks 'riece-after-login-hook)) - -(defun riece-handle-004-message (prefix number name string) - "RPL_MYINFO \" \"" - (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 diff --git a/xemacs-packages/riece/lisp/riece-200.el b/xemacs-packages/riece/lisp/riece-200.el deleted file mode 100644 index 47256d29..00000000 --- a/xemacs-packages/riece/lisp/riece-200.el +++ /dev/null @@ -1,37 +0,0 @@ -;;; riece-200.el --- handlers for 200 replies -;; Copyright (C) 1998-2003 Daiki Ueno - -;; Author: Daiki Ueno -;; 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 diff --git a/xemacs-packages/riece/lisp/riece-300.el b/xemacs-packages/riece/lisp/riece-300.el deleted file mode 100644 index ad43b24e..00000000 --- a/xemacs-packages/riece/lisp/riece-300.el +++ /dev/null @@ -1,481 +0,0 @@ -;;; riece-300.el --- handlers for 300 replies -;; Copyright (C) 1998-2003 Daiki Ueno - -;; Author: Daiki Ueno -;; 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 *( \" \" )\"" - (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 \"[=\*@] :[[@|+] [[@|+] [...]]]\"." - (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 \" :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 diff --git a/xemacs-packages/riece/lisp/riece-400.el b/xemacs-packages/riece/lisp/riece-400.el deleted file mode 100644 index 63863752..00000000 --- a/xemacs-packages/riece/lisp/riece-400.el +++ /dev/null @@ -1,88 +0,0 @@ -;;; riece-400.el --- handlers for 400 replies -;; Copyright (C) 1998-2003 Daiki Ueno - -;; Author: Daiki Ueno -;; 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) - -(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 \" :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 \" :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 \" :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 diff --git a/xemacs-packages/riece/lisp/riece-500.el b/xemacs-packages/riece/lisp/riece-500.el deleted file mode 100644 index 0bf715cd..00000000 --- a/xemacs-packages/riece/lisp/riece-500.el +++ /dev/null @@ -1,37 +0,0 @@ -;;; riece-500.el --- handlers for 500 replies -;; Copyright (C) 1998-2003 Daiki Ueno - -;; Author: Daiki Ueno -;; 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 diff --git a/xemacs-packages/riece/lisp/riece-addon-modules.el b/xemacs-packages/riece/lisp/riece-addon-modules.el deleted file mode 100644 index 4bd4b3aa..00000000 --- a/xemacs-packages/riece/lisp/riece-addon-modules.el +++ /dev/null @@ -1,39 +0,0 @@ -(defconst riece-addon-modules - '((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.") - (riece-doctor . "Pretend to be a psychotherapist.") - (riece-epg . "Encrypt/decrypt messages.") - (riece-eval-ruby . "Evaluate input string as a Ruby program.") - (riece-eval . "Evaluate an input string as an elisp form.") - (riece-foolproof . "Prevent miss-operation in the command buffer.") - (riece-google . "Search keywords by Google.") - (riece-guess . "Guess the next channel, using multiple methods.") - (riece-hangman . "Allow channel members to play the hangman game.") - (riece-highlight . "Highlight IRC buffers.") - (riece-history . "Manage history of channel shifting.") - (riece-icon . "Display icons in IRC buffers.") - (riece-ignore . "Ignore messages from some users.") - (riece-kakasi . "Convert Japanese to roman string by KAKASI.") - (riece-keepalive . "Keep an IRC connection.") - (riece-keyword . "Detect keywords in IRC buffers.") - (riece-log . "Save IRC logs.") - (riece-lsdb . "Help register nicknames in LSDB rolodex program.") - (riece-mcat . "Translate messages.") - (riece-menu . "Setup Riece's command menus.") - (riece-mini . "Use Riece only on the minibuffer.") - ;;(riece-ndcc . "DCC file sending protocol support (written in elisp.)") - (riece-rdcc . "DCC file sending protocol support (written in Ruby.)") - (riece-shrink-buffer . "Free old IRC messages to save memory usage.") - (riece-skk-kakutei . "Remove SKK's preedit mark before sending messages.") - (riece-toolbar . "Display toolbar icons.") - (riece-unread . "Mark channels where new messages arrived.") - (riece-url . "Collect URL in IRC buffers.") - (riece-xface . "Display X-Face in IRC buffers.") - (riece-xfaceb . "Display X-Face & Colour Face images in IRC buffers \(BBDB\).") - (riece-yank . "Enter the element of kill-ring."))) - -(provide 'riece-addon-modules) \ No newline at end of file diff --git a/xemacs-packages/riece/lisp/riece-addon.el b/xemacs-packages/riece/lisp/riece-addon.el deleted file mode 100644 index 671ba2ee..00000000 --- a/xemacs-packages/riece/lisp/riece-addon.el +++ /dev/null @@ -1,512 +0,0 @@ -;;; riece-addon.el --- add-on management -;; Copyright (C) 1998-2004 Daiki Ueno - -;; Author: Daiki Ueno -;; 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 'list - :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)) - (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 (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 (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 (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 (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 diff --git a/xemacs-packages/riece/lisp/riece-alias.el b/xemacs-packages/riece/lisp/riece-alias.el deleted file mode 100644 index f2bb6953..00000000 --- a/xemacs-packages/riece/lisp/riece-alias.el +++ /dev/null @@ -1,177 +0,0 @@ -;;; riece-alias.el --- define aliases for IRC names -;; Copyright (C) 1998-2003 Daiki Ueno - -;; Author: Daiki Ueno -;; 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 diff --git a/xemacs-packages/riece/lisp/riece-async.el b/xemacs-packages/riece/lisp/riece-async.el deleted file mode 100644 index b633ff57..00000000 --- a/xemacs-packages/riece/lisp/riece-async.el +++ /dev/null @@ -1,96 +0,0 @@ -;;; riece-async.el --- connect to IRC server via async proxy -;; Copyright (C) 1998-2003 Daiki Ueno - -;; Author: Daiki Ueno -;; 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 - (save-excursion - (set-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)))) - (process-kill-without-query process) - process)) - -(defun riece-async-insinuate () - (setq riece-default-open-connection-function - #'riece-async-open-network-stream)) - -(provide 'riece-async) - -;;; riece-async.el ends here diff --git a/xemacs-packages/riece/lisp/riece-biff.el b/xemacs-packages/riece/lisp/riece-biff.el deleted file mode 100644 index 63c5dff3..00000000 --- a/xemacs-packages/riece/lisp/riece-biff.el +++ /dev/null @@ -1,109 +0,0 @@ -;;; riece-biff.el --- be notified if messages arrives -;; Copyright (C) 2004 OHASHI Akira - -;; Author: OHASHI Akira -;; 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 diff --git a/xemacs-packages/riece/lisp/riece-button.el b/xemacs-packages/riece/lisp/riece-button.el deleted file mode 100644 index 27e4a73e..00000000 --- a/xemacs-packages/riece/lisp/riece-button.el +++ /dev/null @@ -1,316 +0,0 @@ -;;; riece-button.el --- display useful buttons in IRC buffers -;; Copyright (C) 1998-2003 Daiki Ueno - -;; Author: Daiki Ueno -;; 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 - (save-excursion - (set-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") - (save-excursion - (set-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 (eq (derived-mode-class major-mode) - '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 (eq (derived-mode-class major-mode) - '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 diff --git a/xemacs-packages/riece/lisp/riece-cache.el b/xemacs-packages/riece/lisp/riece-cache.el deleted file mode 100644 index 859f26f1..00000000 --- a/xemacs-packages/riece/lisp/riece-cache.el +++ /dev/null @@ -1,171 +0,0 @@ -;;; riece-cache.el --- LRU cache -;; Copyright (C) 1998-2005 Daiki Ueno - -;; Author: Daiki Ueno -;; 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 diff --git a/xemacs-packages/riece/lisp/riece-channel.el b/xemacs-packages/riece/lisp/riece-channel.el deleted file mode 100644 index a4fc8bde..00000000 --- a/xemacs-packages/riece/lisp/riece-channel.el +++ /dev/null @@ -1,234 +0,0 @@ -;;; riece-channel.el --- a channel object -;; Copyright (C) 1998-2003 Daiki Ueno - -;; Author: Daiki Ueno -;; 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)) - -(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 diff --git a/xemacs-packages/riece/lisp/riece-coding.el b/xemacs-packages/riece/lisp/riece-coding.el deleted file mode 100644 index c0d1ac66..00000000 --- a/xemacs-packages/riece/lisp/riece-coding.el +++ /dev/null @@ -1,89 +0,0 @@ -;;; riece-coding.el --- converting string with coding system -;; Copyright (C) 1998-2003 Daiki Ueno - -;; Author: Daiki Ueno -;; 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) - -(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) - -(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 diff --git a/xemacs-packages/riece/lisp/riece-command-next-channel.xpm b/xemacs-packages/riece/lisp/riece-command-next-channel.xpm deleted file mode 100644 index 713187da..00000000 --- a/xemacs-packages/riece/lisp/riece-command-next-channel.xpm +++ /dev/null @@ -1,67 +0,0 @@ -/* XPM */ -static char * right_xpm[] = { -"32 32 32 1", -" c #000200", -". c #090A06", -"+ c #111310", -"@ c #191A18", -"# c #212220", -"$ c #282827", -"% c #2E2F2E", -"& c #363835", -"* c #3E403D", -"= c #464845", -"- c #4D4E4C", -"; c #535453", -"> c #5B5D5A", -", c #636562", -"' c #6A6C6A", -") c #828100", -"! c #747573", -"~ c #8A8903", -"{ c #7C7D7B", -"] c #939214", -"^ c #9A970C", -"/ c #9EA119", -"( c #A9AB27", -"_ c #B4B532", -": c #C1C13F", -"< c #CDCD4B", -"[ c #D8D855", -"} c #CACCC9", -"| c #E3E25F", -"1 c #F0EE6B", -"2 c #FDFA77", -"3 c #FEFFFC", -" ", -" ", -" ", -" ", -" ", -" } ", -" },} ", -" }>'} ", -" }>>;} ", -" };,;;} ", -" }}}}}}}}}}}}}}}}}}[;>;;} ", -" }[<[<;;;;<<<[;;;;[<<<;;;;} ", -" };<<<<---;<<<<----<<<<---;} ", -" }=-<<<:-=--:<:<==--<<<:----} ", -" }***::::=*==::::=**=::::***-} ", -" }*=*=::::****::::=***::::****}", -" }:****:_::****:_::****::::***}", -" }__&&*%:___&&&&____&&*%____&} ", -" }___%&&&____&&&&____%&&&___} ", -" }(___%%%%(___%%%%(___%&%%(} ", -" }%(((_%%%%((((%%%%((((%%%} ", -" }}}}}}}}}}}}}}}}}}(((($} ", -" }#/](} ", -" }#$]} ", -" }@#} ", -" }@} ", -" } ", -" ", -" ", -" ", -" ", -" "}; diff --git a/xemacs-packages/riece/lisp/riece-command-previous-channel.xpm b/xemacs-packages/riece/lisp/riece-command-previous-channel.xpm deleted file mode 100644 index db423844..00000000 --- a/xemacs-packages/riece/lisp/riece-command-previous-channel.xpm +++ /dev/null @@ -1,68 +0,0 @@ -/* XPM */ -static char * left_xpm[] = { -"32 32 33 1", -" c None", -". c #000200", -"+ c #090A06", -"@ c #111310", -"# c #191A18", -"$ c #212220", -"% c #282827", -"& c #2E2F2E", -"* c #363835", -"= c #3E403D", -"- c #464845", -"; c #4D4E4C", -"> c #535453", -", c #5B5D5A", -"' c #636562", -") c #6A6C6A", -"! c #828100", -"~ c #747573", -"{ c #8A8903", -"] c #7C7D7B", -"^ c #939214", -"/ c #9A970C", -"( c #9EA119", -"_ c #A9AB27", -": c #B4B532", -"< c #C1C13F", -"[ c #CDCD4B", -"} c #D8D855", -"| c #CACCC9", -"1 c #E3E25F", -"2 c #F0EE6B", -"3 c #FDFA77", -"4 c #FEFFFC", -" ", -" ", -" ", -" ", -" ", -" | ", -" |)| ", -" |11| ", -" |111| ", -" |>>}}| ", -" |>,>>}|||||||||||||||||| ", -" |}[>>>>[[[}>>>>}[[[>>>>[[| ", -" |[[[[;;;>[[[[;;;;[[[[;;;>[| ", -" |-;[[[<;-;;<[<[--;;[[[<;;;;| ", -" |-===<<<<-=--<<<<-==-<<<<===| ", -"|<<=-=-<<<<====<<<<-===<<<<==| ", -"|:<<====<:<<====<:<<====<<<<=| ", -" |:::**=&<:::****::::**=&::::| ", -" |:::&***::::****::::&***:::| ", -" |:::&&&&_:::&&&&_:::&*&&_:| ", -" |__:&&&&____&&&&____&&&&_| ", -" |___%%|||||||||||||||||| ", -" |/__%| ", -" |^/^| ", -" |(^| ", -" |(| ", -" | ", -" ", -" ", -" ", -" ", -" "}; diff --git a/xemacs-packages/riece/lisp/riece-commands.el b/xemacs-packages/riece/lisp/riece-commands.el deleted file mode 100644 index 8efa507a..00000000 --- a/xemacs-packages/riece/lisp/riece-commands.el +++ /dev/null @@ -1,758 +0,0 @@ -;;; riece-commands.el --- commands available in command buffer -;; Copyright (C) 1998-2003 Daiki Ueno - -;; Author: Daiki Ueno -;; 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) - -(autoload 'derived-mode-class "derived") - -;;; 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-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-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)))) - -(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) - (let ((next-line-add-newlines t)) - (next-line 1))) - -(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) - (let ((next-line-add-newlines t)) - (next-line 1))) - -(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))) - (let ((next-line-add-newlines t)) - (next-line 1))) - -(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 (target) - (interactive - (let ((completion-ignore-case t)) - (list - (if riece-join-channel-candidate - (let ((default (riece-format-identity - riece-join-channel-candidate))) - (riece-completing-read-identity - (format (riece-mcat "Join channel/user (default %s): ") default) - (riece-get-identities-on-server (riece-current-server-name)) - nil nil nil nil default)) - (riece-completing-read-identity - (riece-mcat "Join channel/user: ") - (riece-get-identities-on-server (riece-current-server-name))))))) - (let ((pointer (riece-identity-member target riece-current-channels))) - (if pointer - (riece-command-switch-to-channel (car pointer)) - (if (riece-channel-p (riece-identity-prefix target)) - (riece-command-join-channel target nil) - (riece-command-join-partner target))))) - -(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 (eq (derived-mode-class major-mode) - 'riece-dialogue-mode) - (current-buffer) - (if (and riece-channel-buffer-mode - riece-channel-buffer) - riece-channel-buffer - riece-dialogue-buffer)) - (setq riece-freeze (if arg - (< 0 (prefix-numeric-value arg)) - (not riece-freeze))) - (riece-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 (eq (derived-mode-class major-mode) - 'riece-dialogue-mode) - (current-buffer) - (if (and riece-channel-buffer-mode - riece-channel-buffer) - riece-channel-buffer - riece-dialogue-buffer)) - (if (if arg - (< 0 (prefix-numeric-value arg)) - (not (eq riece-freeze 'own))) - (setq riece-freeze 'own) - (setq riece-freeze nil)) - (riece-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 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 diff --git a/xemacs-packages/riece/lisp/riece-compat.el b/xemacs-packages/riece/lisp/riece-compat.el deleted file mode 100644 index 3e54caf5..00000000 --- a/xemacs-packages/riece/lisp/riece-compat.el +++ /dev/null @@ -1,71 +0,0 @@ -;;; riece-compat.el --- compatibility functions -;; Copyright (C) 1998-2003 Daiki Ueno - -;; Author: Daiki Ueno -;; 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 "?")))) - ""))) - -(provide 'riece-compat) - -;;; riece-compat.el ends here diff --git a/xemacs-packages/riece/lisp/riece-complete.el b/xemacs-packages/riece/lisp/riece-complete.el deleted file mode 100644 index ac3366bb..00000000 --- a/xemacs-packages/riece/lisp/riece-complete.el +++ /dev/null @@ -1,120 +0,0 @@ -;;; riece-complete.el --- completion -;; Copyright (C) 1998-2003 Daiki Ueno - -;; Author: Daiki Ueno -;; 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 diff --git a/xemacs-packages/riece/lisp/riece-ctcp.el b/xemacs-packages/riece/lisp/riece-ctcp.el deleted file mode 100644 index 8e47be08..00000000 --- a/xemacs-packages/riece/lisp/riece-ctcp.el +++ /dev/null @@ -1,415 +0,0 @@ -;;; riece-ctcp.el --- CTCP (Client To Client Protocol) support -;; Copyright (C) 1998-2003 Daiki Ueno - -;; Author: Daiki Ueno -;; 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) - -(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-handle-ctcp-action-request (prefix target string) - (let ((buffer (if (riece-channel-p target) - (riece-channel-buffer (riece-make-identity - target riece-server-name)))) - (user (riece-prefix-nickname prefix))) - (riece-insert buffer (concat riece-ctcp-action-prefix - (riece-format-identity - (riece-make-identity user riece-server-name) - t) - " " string - "\n")) - (riece-insert - (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 riece-ctcp-action-prefix - (riece-format-identity - (riece-make-identity target riece-server-name) - t) - ": " - (riece-format-identity - (riece-make-identity user riece-server-name) - t) - " " string)) "\n")))) - -(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)) - (let ((next-line-add-newlines t)) - (next-line 1))))))) - (if (equal action "") - (error "No action")) - (riece-send-string (format "PRIVMSG %s :\1ACTION %s\1\r\n" - (riece-identity-prefix target) - action)) - (let ((buffer (riece-channel-buffer target))) - (riece-insert - buffer - (concat riece-ctcp-action-prefix - (riece-identity-prefix (riece-current-nickname)) " " action "\n")) - (riece-insert - (if (and riece-channel-buffer-mode - (not (eq buffer riece-channel-buffer))) - (list riece-dialogue-buffer riece-others-buffer) - riece-dialogue-buffer) - (concat - (riece-with-server-buffer (riece-identity-server target) - (riece-concat-server-name - (concat riece-ctcp-action-prefix - (riece-format-identity target t) ": " - (riece-identity-prefix (riece-current-nickname)) " " action))) - "\n")))) - -(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)))) - -(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 diff --git a/xemacs-packages/riece/lisp/riece-ctlseq.el b/xemacs-packages/riece/lisp/riece-ctlseq.el deleted file mode 100644 index bf3d4b36..00000000 --- a/xemacs-packages/riece/lisp/riece-ctlseq.el +++ /dev/null @@ -1,193 +0,0 @@ -;;; riece-ctlseq.el --- mark up control sequences in IRC buffers -;; Copyright (C) 1998-2004 Daiki Ueno - -;; Author: Daiki Ueno -;; 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,." - :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.") - -(defun riece-ctlseq-compatible-attributes-p (this other) - (let ((pointer this)) - (catch 'mismatched - (while pointer - (unless (equal (plist-get other (car pointer)) (nth 1 pointer)) - (throw 'mismatched nil)) - (setq pointer (nthcdr 2 pointer))) - t))) - -(defun riece-ctlseq-face-foreground-name (face) - "Return the name of FACE's foreground color." - (if (fboundp 'face-foreground-name) ;XEmacs - (face-foreground-name face) - (face-foreground face))) - -(defun riece-ctlseq-face-background-name (face) - "Return the name of FACE's background color." - (if (fboundp 'face-background-name) ;XEmacs - (face-background-name face) - (face-background face))) - -(defun riece-ctlseq-make-face (attrs) - (let* ((face-name (intern (format "riece-ctlseq-face-%d" - (prog1 riece-ctlseq-face-counter - (setq riece-ctlseq-face-counter - (1+ riece-ctlseq-face-counter)))))) - (face (make-face face-name)) - foreground - background) - (if (plist-get attrs 'bold) - (make-face-bold face)) - (if (plist-get attrs 'underline) - (set-face-underline-p face t)) - (if (setq foreground (plist-get attrs 'foreground)) - (set-face-foreground face foreground)) - (if (setq background (plist-get attrs 'background)) - (set-face-background face background)) - (when (plist-get attrs 'inverse-video) - (setq foreground (or (riece-ctlseq-face-background-name face) - (riece-ctlseq-face-background-name 'default)) - background (or (riece-ctlseq-face-foreground-name face) - (riece-ctlseq-face-foreground-name 'default))) - (set-face-foreground face foreground) - (set-face-background face background)) - (put face-name 'riece-ctlseq-attributes attrs) - face-name)) - -(defun riece-ctlseq-face-from-cache (attrs) - (if (null attrs) - 'default - (let ((pointer riece-ctlseq-face-cache) - last-pointer - other) - (catch 'found - (while pointer - (setq other (get (car pointer) 'riece-ctlseq-attributes)) - (when (and (riece-ctlseq-compatible-attributes-p attrs other) - (riece-ctlseq-compatible-attributes-p other attrs)) - (if last-pointer - (setcdr last-pointer (cdr pointer))) - (throw 'found (setcar riece-ctlseq-face-cache (car pointer)))) - (setq last-pointer pointer - pointer (cdr pointer))) - (if (>= (length riece-ctlseq-face-cache) - riece-ctlseq-face-cache-size) - (setq riece-ctlseq-face-cache - (butlast riece-ctlseq-face-cache))) - (setq riece-ctlseq-face-cache - (cons (riece-ctlseq-make-face attrs) - riece-ctlseq-face-cache)) - (car riece-ctlseq-face-cache))))) - -(defun riece-ctlseq-update-attributes (tag attrs) - (cond - ((eq (aref tag 0) ?\x2) ;^B - (plist-put attrs 'bold (not (plist-get attrs 'bold)))) - ((eq (aref tag 0) ?\xF)) ;^O - ((eq (aref tag 0) ?\x16) ;^V - (plist-put attrs 'inverse-video (not (plist-get attrs 'inverse-video)))) - ((eq (aref tag 0) ?\x1F) ;^_ - (plist-put attrs 'underline (not (plist-get attrs 'underline)))) - ((string-match "\x3\\([0-9]+\\)?\\(,[0-9]+\\)?" tag) ;^C, - (if (match-beginning 1) - (setq attrs (plist-put attrs 'foreground - (nth (string-to-number (match-string 1 tag)) - riece-ctlseq-colors)))) - (if (match-beginning 2) - (setq attrs (plist-put attrs 'background - (nth (string-to-number - (substring (match-string 2 tag) 1)) - riece-ctlseq-colors)))) - attrs))) - -(defun riece-ctlseq-message-filter (message) - (if (get 'riece-ctlseq 'riece-addon-enabled) - (let ((start 0) - (end (length (riece-message-text message))) - attrs) - (while (string-match - "[\x2\xF\x16\x1F]\\|\x3\\([0-9]+\\)?\\(,[0-9]+\\)?" - (riece-message-text message) start) - (if riece-ctlseq-hide-controls - (put-text-property (match-beginning 0) (match-end 0) - 'invisible 'riece-ctlseq - (riece-message-text message))) - (if attrs - (put-text-property start (match-beginning 0) - 'riece-ctlseq-attributes (copy-sequence attrs) - (riece-message-text message))) - (setq start (match-end 0) - attrs (riece-ctlseq-update-attributes - (match-string 0 (riece-message-text message)) attrs))) - (if (and (< start end) attrs) - (put-text-property start end - 'riece-overlay-face - (riece-ctlseq-face-from-cache attrs) - (riece-message-text message))))) - 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 diff --git a/xemacs-packages/riece/lisp/riece-debug.el b/xemacs-packages/riece/lisp/riece-debug.el deleted file mode 100644 index c2ba3c6c..00000000 --- a/xemacs-packages/riece/lisp/riece-debug.el +++ /dev/null @@ -1,97 +0,0 @@ -;;; riece-debug.el --- debug support -;; Copyright (C) 1998-2005 Daiki Ueno - -;; Author: Daiki Ueno -;; 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) - (save-excursion - (set-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'." - (save-excursion - (set-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 - (save-excursion - (set-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 diff --git a/xemacs-packages/riece/lisp/riece-develop.el b/xemacs-packages/riece/lisp/riece-develop.el deleted file mode 100644 index 3bcd3f7e..00000000 --- a/xemacs-packages/riece/lisp/riece-develop.el +++ /dev/null @@ -1,81 +0,0 @@ -(defun riece-insert-struct-template (prefix struct) - (interactive "sPrefix: -sStruct: ") - (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")))) diff --git a/xemacs-packages/riece/lisp/riece-display.el b/xemacs-packages/riece/lisp/riece-display.el deleted file mode 100644 index 96c32ff6..00000000 --- a/xemacs-packages/riece/lisp/riece-display.el +++ /dev/null @@ -1,501 +0,0 @@ -;;; riece-display.el --- buffer arrangement -;; Copyright (C) 1998-2003 Daiki Ueno - -;; Author: Daiki Ueno -;; 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) - -(autoload 'derived-mode-class "derived") - -(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) - (save-excursion - (set-buffer riece-channel-list-buffer) - (run-hooks 'riece-update-buffer-functions)) - (riece-update-channel-list-indicator))) - (riece-connect-signal - 'user-list-changed - (lambda (signal handback) - (save-excursion - (set-buffer riece-user-list-buffer) - (run-hooks 'riece-update-buffer-functions))) - (lambda (signal) - (and riece-current-channel - (riece-identity-equal (car (riece-signal-args signal)) - riece-current-channel)))) - (riece-connect-signal - 'channel-switched - (lambda (signal handback) - (riece-update-status-indicators) - (riece-update-channel-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" - "-") - 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 (eq (derived-mode-class major-mode) - '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)) - (save-excursion - (set-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 diff --git a/xemacs-packages/riece/lisp/riece-doctor.el b/xemacs-packages/riece/lisp/riece-doctor.el deleted file mode 100644 index ee7068b8..00000000 --- a/xemacs-packages/riece/lisp/riece-doctor.el +++ /dev/null @@ -1,132 +0,0 @@ -;;; riece-doctor.el --- pretend to be a psychotherapist -;; Copyright (C) 1998-2003 Daiki Ueno - -;; Author: Daiki Ueno -;; 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)) - (save-excursion - (set-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) - (save-excursion - (set-buffer (get-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 diff --git a/xemacs-packages/riece/lisp/riece-emacs.el b/xemacs-packages/riece/lisp/riece-emacs.el deleted file mode 100644 index cc58b4c7..00000000 --- a/xemacs-packages/riece/lisp/riece-emacs.el +++ /dev/null @@ -1,150 +0,0 @@ -;;; riece-emacs.el --- FSF Emacs specific functions -;; Copyright (C) 1999 Daiki Ueno - -;; Author: Daiki Ueno -;; 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 diff --git a/xemacs-packages/riece/lisp/riece-epg.el b/xemacs-packages/riece/lisp/riece-epg.el deleted file mode 100644 index 63c59972..00000000 --- a/xemacs-packages/riece/lisp/riece-epg.el +++ /dev/null @@ -1,238 +0,0 @@ -;;; riece-epg.el --- Encrypt/decrypt messages add-on -;; Copyright (C) 2006 Daiki Ueno - -;; Author: Daiki Ueno -;; 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)) - (let ((next-line-add-newlines t)) - (next-line 1)))) - -(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 diff --git a/xemacs-packages/riece/lisp/riece-eval-ruby.el b/xemacs-packages/riece/lisp/riece-eval-ruby.el deleted file mode 100644 index 8595a579..00000000 --- a/xemacs-packages/riece/lisp/riece-eval-ruby.el +++ /dev/null @@ -1,91 +0,0 @@ -;;; riece-eval-ruby.el --- evaluate input string as a Ruby program -;; Copyright (C) 1998-2005 Daiki Ueno - -;; Author: Daiki Ueno -;; 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 diff --git a/xemacs-packages/riece/lisp/riece-eval.el b/xemacs-packages/riece/lisp/riece-eval.el deleted file mode 100644 index 4969bf5e..00000000 --- a/xemacs-packages/riece/lisp/riece-eval.el +++ /dev/null @@ -1,94 +0,0 @@ -;;; riece-eval.el --- evaluate input string as an elisp form -;; Copyright (C) 2005 OHASHI Akira - -;; Author: OHASHI Akira -;; 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 diff --git a/xemacs-packages/riece/lisp/riece-filter.el b/xemacs-packages/riece/lisp/riece-filter.el deleted file mode 100644 index 1249dd71..00000000 --- a/xemacs-packages/riece/lisp/riece-filter.el +++ /dev/null @@ -1,153 +0,0 @@ -;;; riece-filter.el --- process filter and sentinel -;; Copyright (C) 1998-2003 Daiki Ueno - -;; Author: Daiki Ueno -;; 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) - (save-excursion - (set-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 diff --git a/xemacs-packages/riece/lisp/riece-foolproof.el b/xemacs-packages/riece/lisp/riece-foolproof.el deleted file mode 100644 index 18946348..00000000 --- a/xemacs-packages/riece/lisp/riece-foolproof.el +++ /dev/null @@ -1,69 +0,0 @@ -;;; riece-foolproof.el --- prevent miss-operation in the command buffer -;; Copyright (C) 2004 TAKAHASHI Kaoru - -;; Author: TAKAHASHI "beatmaria" Kaoru -;; 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 diff --git a/xemacs-packages/riece/lisp/riece-globals.el b/xemacs-packages/riece/lisp/riece-globals.el deleted file mode 100644 index 017e037f..00000000 --- a/xemacs-packages/riece/lisp/riece-globals.el +++ /dev/null @@ -1,214 +0,0 @@ -;;; riece-globals.el --- global variables and constants. -;; Copyright (C) 1998-2003 Daiki Ueno - -;; Author: Daiki Ueno -;; 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) -(defvar riece-channel-indicator "None" - "String displayed on the modeline to indicate the current channel.") -(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.") -(defvar riece-channel-list-indicator "No channel" - "String displayed on the modeline to show the joined channels.") -(defvar riece-user-indicator nil - "String displayed on the modeline to show the current nickname.") - -(defvar riece-away-indicator "-" - "String displayed on the modeline to allow the user to tell if the -user is away.") -(defvar riece-operator-indicator "-" - "String displayed on the modeline to allow the user to tell if the -user is an operator.") -(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.") - -;;; 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 diff --git a/xemacs-packages/riece/lisp/riece-google.el b/xemacs-packages/riece/lisp/riece-google.el deleted file mode 100644 index 3bfe96e1..00000000 --- a/xemacs-packages/riece/lisp/riece-google.el +++ /dev/null @@ -1,241 +0,0 @@ -;;; riece-google.el --- search keywords by Google -;; Copyright (C) 2005 OHASHI Akira - -;; Author: OHASHI Akira -;; SASADA Koichi -;; 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 -# -# 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 'list - :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 diff --git a/xemacs-packages/riece/lisp/riece-guess.el b/xemacs-packages/riece/lisp/riece-guess.el deleted file mode 100644 index b6fc51ea..00000000 --- a/xemacs-packages/riece/lisp/riece-guess.el +++ /dev/null @@ -1,116 +0,0 @@ -;;; riece-guess.el --- guess the next channel, using multiple methods -;; Copyright (C) 1998-2003 Daiki Ueno - -;; Author: Daiki Ueno -;; 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 diff --git a/xemacs-packages/riece/lisp/riece-handle.el b/xemacs-packages/riece/lisp/riece-handle.el deleted file mode 100644 index 87a602a1..00000000 --- a/xemacs-packages/riece/lisp/riece-handle.el +++ /dev/null @@ -1,418 +0,0 @@ -;;; riece-handle.el --- basic message handlers -;; Copyright (C) 1998-2003 Daiki Ueno - -;; Author: Daiki Ueno -;; 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 - (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)))) - (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 - (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))) - (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 diff --git a/xemacs-packages/riece/lisp/riece-hangman.el b/xemacs-packages/riece/lisp/riece-hangman.el deleted file mode 100644 index 1d59f27e..00000000 --- a/xemacs-packages/riece/lisp/riece-hangman.el +++ /dev/null @@ -1,236 +0,0 @@ -;;; riece-hangman.el --- allow channel members to play the hangman game -;; Copyright (C) 1998-2004 Daiki Ueno - -;; Author: Daiki Ueno -;; 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*")) - (save-excursion - (set-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]+")))) - (save-excursion - (set-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 diff --git a/xemacs-packages/riece/lisp/riece-highlight.el b/xemacs-packages/riece/lisp/riece-highlight.el deleted file mode 100644 index 30577476..00000000 --- a/xemacs-packages/riece/lisp/riece-highlight.el +++ /dev/null @@ -1,327 +0,0 @@ -;;; riece-highlight.el --- highlight IRC buffers -;; Copyright (C) 1998-2003 Daiki Ueno - -;; Author: Daiki Ueno -;; 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 \"\" 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 'list - :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) - (make-face '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) - (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 (eq (derived-mode-class major-mode) - '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 (memq (derived-mode-class - (with-current-buffer (car buffers) - major-mode)) - '(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 (memq (derived-mode-class - (with-current-buffer (car buffers) - major-mode)) - '(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 diff --git a/xemacs-packages/riece/lisp/riece-history.el b/xemacs-packages/riece/lisp/riece-history.el deleted file mode 100644 index 25b8e7e6..00000000 --- a/xemacs-packages/riece/lisp/riece-history.el +++ /dev/null @@ -1,164 +0,0 @@ -;;; riece-history.el --- manage history of channel shifting -;; Copyright (C) 1998-2003 Daiki Ueno - -;; Author: Daiki Ueno -;; 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) - (make-face '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 diff --git a/xemacs-packages/riece/lisp/riece-icon.el b/xemacs-packages/riece/lisp/riece-icon.el deleted file mode 100644 index a137fd0e..00000000 --- a/xemacs-packages/riece/lisp/riece-icon.el +++ /dev/null @@ -1,381 +0,0 @@ -;;; riece-icon.el --- display icons in IRC buffers -;; Copyright (C) 1998-2003 Daiki Ueno - -;; Author: Daiki Ueno -;; 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 diff --git a/xemacs-packages/riece/lisp/riece-identity.el b/xemacs-packages/riece/lisp/riece-identity.el deleted file mode 100644 index b1a2f340..00000000 --- a/xemacs-packages/riece/lisp/riece-identity.el +++ /dev/null @@ -1,229 +0,0 @@ -;;; riece-identity.el --- an identity object -;; Copyright (C) 1998-2003 Daiki Ueno - -;; Author: Daiki Ueno -;; 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 diff --git a/xemacs-packages/riece/lisp/riece-ignore.el b/xemacs-packages/riece/lisp/riece-ignore.el deleted file mode 100644 index 4a7af89b..00000000 --- a/xemacs-packages/riece/lisp/riece-ignore.el +++ /dev/null @@ -1,148 +0,0 @@ -;;; riece-ignore.el --- ignore messages from some users -;; Copyright (C) 1998-2004 Daiki Ueno - -;; Author: Daiki Ueno -;; 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))) - (save-excursion - (set-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 \ No newline at end of file diff --git a/xemacs-packages/riece/lisp/riece-irc.el b/xemacs-packages/riece/lisp/riece-irc.el deleted file mode 100644 index a621c24b..00000000 --- a/xemacs-packages/riece/lisp/riece-irc.el +++ /dev/null @@ -1,120 +0,0 @@ -;;; riece-irc.el --- IRC protocol -;; Copyright (C) 1998-2004 Daiki Ueno - -;; Author: Daiki Ueno -;; 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 "USER %s * * :%s\r\n" - (or username - (user-real-login-name)) - (or realname - "No information given"))) - (riece-process-send-string process (format "NICK %s\r\n" nickname)) - (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 diff --git a/xemacs-packages/riece/lisp/riece-kakasi.el b/xemacs-packages/riece/lisp/riece-kakasi.el deleted file mode 100644 index e285ca7f..00000000 --- a/xemacs-packages/riece/lisp/riece-kakasi.el +++ /dev/null @@ -1,75 +0,0 @@ -;;; riece-kakasi.el --- convert Japanese to roman string by KAKASI -;; Copyright (C) 1998-2004 Daiki Ueno - -;; Author: Daiki Ueno -;; 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")) - (save-excursion - (set-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 diff --git a/xemacs-packages/riece/lisp/riece-keepalive.el b/xemacs-packages/riece/lisp/riece-keepalive.el deleted file mode 100644 index 955b6abe..00000000 --- a/xemacs-packages/riece/lisp/riece-keepalive.el +++ /dev/null @@ -1,76 +0,0 @@ -;;; riece-keepalive.el --- keep an IRC connection -;; Copyright (C) 1998-2004 Daiki Ueno - -;; Author: Daiki Ueno -;; 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) - (save-excursion - (set-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 diff --git a/xemacs-packages/riece/lisp/riece-keyword.el b/xemacs-packages/riece/lisp/riece-keyword.el deleted file mode 100644 index 85251b77..00000000 --- a/xemacs-packages/riece/lisp/riece-keyword.el +++ /dev/null @@ -1,121 +0,0 @@ -;;; riece-keyword.el --- detect keywords in IRC buffers -;; Copyright (C) 1998-2003 Daiki Ueno - -;; Author: Daiki Ueno -;; 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 '(list function) - :group 'riece-keyword) - -(make-obsolete-variable 'riece-notify-keyword-functions - 'riece-keyword-notify-functions) - -(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 '(list 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)) - (list (cons (regexp-opt keywords) 0)))) - index) - (while alist - (setq index 0) - (while (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)) - (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 (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 \ No newline at end of file diff --git a/xemacs-packages/riece/lisp/riece-layout.el b/xemacs-packages/riece/lisp/riece-layout.el deleted file mode 100644 index 6583b1bd..00000000 --- a/xemacs-packages/riece/lisp/riece-layout.el +++ /dev/null @@ -1,302 +0,0 @@ -;;; riece-layout.el --- layout management -;; Copyright (C) 1998-2003 Daiki Ueno - -;; Author: Daiki Ueno -;; TAKAHASHI "beatmaria" Kaoru -;; 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) - ("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 'list - :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))))) - -(provide 'riece-layout) - -;;; riece-layout.el ends here diff --git a/xemacs-packages/riece/lisp/riece-log.el b/xemacs-packages/riece/lisp/riece-log.el deleted file mode 100644 index 624115b4..00000000 --- a/xemacs-packages/riece/lisp/riece-log.el +++ /dev/null @@ -1,308 +0,0 @@ -;;; riece-log.el --- Save IRC logs -;; Copyright (C) 2003 OHASHI Akira -;; Copyright (C) 2004 Daiki Ueno - -;; Author: OHASHI Akira -;; Daiki Ueno -;; 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 (riece-message-target message) - coding-system-for-write)) - file-name-coding-system - default-file-name-coding-system) - (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 (featurep 'mule) - (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 - default-file-name-coding-system - (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 diff --git a/xemacs-packages/riece/lisp/riece-lsdb.el b/xemacs-packages/riece/lisp/riece-lsdb.el deleted file mode 100644 index eae8c44e..00000000 --- a/xemacs-packages/riece/lisp/riece-lsdb.el +++ /dev/null @@ -1,151 +0,0 @@ -;;; riece-lsdb.el --- help register nicknames in LSDB rolodex program -;; Copyright (C) 1998-2003 Daiki Ueno - -;; Author: Daiki Ueno -;; 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) - -(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 diff --git a/xemacs-packages/riece/lisp/riece-mcat-japanese.el b/xemacs-packages/riece/lisp/riece-mcat-japanese.el deleted file mode 100644 index fa603821..00000000 --- a/xemacs-packages/riece/lisp/riece-mcat-japanese.el +++ /dev/null @@ -1,170 +0,0 @@ -;;; riece-mcat.el --- message catalog for Japanese -*- coding: iso-2022-jp -*- -;; Copyright (C) 2007 Daiki Ueno - -;; Author: Daiki Ueno - -;; 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$B:8C<$N%7%s%\%k(B:\n\n + $BM-8z$J%"%I%*%s(B\n - $BL58z$J%"%I%*%s(B\n ? $BAH$_9~$^$l$F$$$J$$%"%I%*%s(B\n $B%m!<%I$5$l$F$$$J$$%"%I%*%s(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$BJXMx$J%-!<(B:\n\n `\\[riece-command-enable-addon]' $B%"%I%*%s$rM-8z2=(B\n `\\[riece-command-disable-addon]' $B%"%I%*%s$rL58z2=(B\n `\\[riece-command-insinuate-addon]' $B%"%I%*%s$rAH$_9~$_(B\n `\\[riece-command-uninstall-addon]' $B%"%I%*%s$N=|30(B\n `\\[riece-command-unload-addon]' $B%"%I%*%s$r%"%s%m!<%I(B\n `\\[riece-command-save-variables]' $B@_Dj$rJ]B8(B\n") - ("%2d: %s %s (%d bytes)\n" . "%2d: %s %s (%d $B%P%$%H(B)\n") - ("%S: switch to %s; down-mouse-3: more options" . "%S: %s $B$K0\F0(B; down-mouse-3: $B$=$NB>$N%*%W%7%g%s(B") - ("%d users on %s: " . "%d $B?M$,(B %s $B$K$$$^$9(B: ") - ("%d users: " . "%d $B?M(B: ") - ("%s (%s) has joined %s" . "%s (%s) $B$,(B %s $B$K;22C$7$^$7$?(B") - ("%s (%s) has joined %s\n" . "%s (%s) $B$,(B %s $B$K;22C$7$^$7$?(B\n") - ("%s has left %s" . "%s $B$,(B %s $B$rN%$l$^$7$?(B") - ("%s has left IRC" . "%s $B$,(B IRC $B$rN%$l$^$7$?(B") - ("%s invites %s to %s" . "%s $B$,(B %s $B$r(B %s $B$K>7BT$7$F$$$^$9(B") - ("%s is %s (%s)" . "%s $B$O(B %s (%s)") - ("%s is %s idle" . "%s $B$O(B %s $B%"%$%I%k>uBV(B") - ("%s is (%s)" . "%s $B$O(B (%s)") - ("%s is away: %s" . "%s $B$ON%@JCf(B: %s") - ("%s is running on %s: %s" . "%s $B$,(B %s $B$GF0$$$F$$$^$9(B: %s") - ("%s kicked %s out from %s" . "%s $B$,(B %s $B$r(B %s $B$+$i=3$j=P$7$^$7$?(B") - ("%s kicked %s out from %s\n" . "%s $B$,(B %s $B$r(B %s $B$+$i=3$j=P$7$^$7$?(B\n") - ("%s killed %s" . "%s $B$,(B %s $B$r(B KILL $B$7$^$7$?(B") - ("%s users, topic: %s\n" . "%s $B?M!"%H%T%C%/(B: %s\n") - ("%s will be insinuated. Continue? " . "%s $B$OAH$_9~$^$l$F$$$^$;$s!#B39T$7$^$9$+(B? ") - ("%s: %s users, topic: %s" . "%s: %s $B?M!"%H%T%C%/(B: %s\n") - ("(no description)" . "($B@bL@$J$7(B)") - ("Action: " . "$B%"%/%7%g%s(B: ") - ("Add-on %S disabled" . "$B%"%I%*%s(B %S $B$,L58z$K$J$j$^$7$?(B") - ("Add-on %S enabled" . "$B%"%I%*%s(B %S $B$,M-8z$K$J$j$^$7$?(B") - ("Add-on %S is already disabled" . "$B%"%I%*%s(B %S $B$O4{$KL58z$G$9(B") - ("Add-on %S is already enabled" . "$B%"%I%*%s(B %S $B$O4{$KM-8z$G$9(B") - ("Add-on %S is already insinuated" . "$B%"%I%*%s(B %S $B$O4{$KAH$_9~$^$l$F$$$^$9(B") - ("Add-on %S is insinuated" . "$B%"%I%*%s(B %S $B$,AH$_9~$^$l$^$7$?(B") - ("Add-on %S is not allowed to unload" . "$B%"%I%*%s(B %S $B$O%"%s%m!<%I$G$-$^$;$s(B") - ("Add-on %S is not insinuated" . "$B%"%I%*%s(B %S $B$OAH$_9~$^$l$F$$$^$;$s(B") - ("Add-on %S is uninstalled" . "$B%"%I%*%s(B %S $B$,=|30$5$l$^$7$?(B") - ("Add-on %S is unloaded" . "$B%"%I%*%s(B %S $B$,%"%s%m!<%I$5$l$^$7$?(B") - ("Add-on: " . "$B%"%I%*%s(B: ") - ("Already registered" . "$BEPO?:Q$_$G$9(B") - ("Away message: " . "$BN%@J$N%a%C%;!<%8(B: ") - ("Beginning of buffer" . "$B%P%C%U%!$N@hF,$G$9(B") - ("CTCP CLIENTINFO for %s (%s) = %s" . "%s (%s) $B$N(B CTCP CLIENTINFO = %s") - ("CTCP CLIENTINFO from %s (%s) to %s" . "%s (%s) $B$,(B %s $B$K(B CTCP CLIENTINFO") - ("CTCP PING for %s (%s) = %d sec" . "%s (%s) $B$N(B CTCP PING = %d $BIC(B") - ("CTCP PING from %s (%s) to %s" . "%s (%s) $B$,(B %s $B$K(B CTCP PING") - ("CTCP TIME for %s (%s) = %s" . "%s (%s) $B$N(B CTCP TIME = %s") - ("CTCP TIME from %s\n" . "%s $B$+$i(B CTCP TIME\n") - ("CTCP TIME from %s (%s) to %s" . "%s (%s) $B$,(B %s $B$K(B CTCP TIME") - ("CTCP VERSION for %s (%s) = %s" . "%s (%s) $B$N(B CTCP VERSION = %s") - ("CTCP VERSION from %s (%s) to %s" . "%s (%s) $B$,(B %s $B$K(B CTCP VERSION") - ("Can't find completion for \"%s\"" . "\"%s\" $B$KBP$9$kJd40$,8+$D$+$j$^$;$s(B") - ("Change layout: " . "$BJQ998e$N%l%$%"%&%H(B: ") - ("Change mode for channel/user: " . "$B%b!<%I$rJQ99$9$k%A%c%s%M%k$^$?$O%f!<%6(B: ") - ("Channel/User: " . "$B%A%c%s%M%k$^$?$O%f!<%6(B: ") - ("Close server: " . "$B@\B3$rJD$8$k%5!<%P(B: ") - ("Command to execute on \"%s\":" . "\"%s\" $B$G7BT$9$k%f!<%6(B: ") - ("Inviting %s\n" . "%s $B$r>7BT$7$F$$$^$9(B\n") - ("Inviting %s to %s" . "%s $B$r(B %s $B$K>7BT$7$F$$$^$9(B") - ("Join channel/user (default %s): " . "$B;22C$9$k%A%c%s%M%k$^$?$O%f!<%6(B ($B4{DjCM(B %s): ") - ("Join channel/user: " . "$B;22C$9$k%A%c%s%M%k$^$?$O%f!<%6(B: ") - ("Key for %s: " . "%s $B$N%-!<(B: ") - ("Key for %s: Quit" . "%s $B$N%-!<(B: $BCf;_(B") - ("Kick user: " . "$B=3$j=P$9%f!<%6(B: ") - ("LIST pattern: " . "LIST $B$N%Q%?!<%s(B: ") - ("Logging in to %s..." . "%s $B$K%m%0%$%s$7$F$$$^$9(B...") - ("Logging in to %s...done" . "%s $B$K%m%0%$%s$7$F$$$^$9(B...$B40N;(B") - ("Logging in to IRC server..." . "IRC $B%5!<%P$K%m%0%$%s$7$F$$$^$9(B...") - ("Logging in to IRC server...done" . "IRC $B%5!<%P$K%m%0%$%s$7$F$$$^$9(B...$B40N;(B") - ("Message to user: " . "$B%f!<%6$X$N%a%C%;!<%8(B: ") - ("Message: " . "$B%a%C%;!<%8(B") - ("Mode (? for help)" . "$B%b!<%I(B ($B%X%k%W$O(B ?)") - ("Mode by %s: %s\n" . "%s $B$K$h$k%b!<%I@_Dj(B: %s\n") - ("Mode for %s: %s" . "%s $B$N%b!<%I(B: %s") - ("Mode on %s by %s: %s" . "%s $B$N%b!<%I$,(B %s $B$K$h$j@_Dj$5$l$^$7$?(B: %s") - ("Mode: " . "$B%b!<%I(B: ") - ("NAMES pattern: " . "NAMES $B$N%Q%?!<%s(B: ") - ("Nickname \"%s\" already in use. Choose a new one: " . "$B%K%C%/%M!<%`(B \"%s\" $B$O4{$K;HMQ$5$l$F$$$^$9!#?7$7$$%K%C%/%M!<%`(B: ") - ("No changes made. Save anyway? " . "$BJQ99$,$"$j$^$;$s$,!"J]B8$7$^$9$+(B? ") - ("No channel" . "$B%A%c%s%M%k$J$7(B") - ("No server process" . "$B%5!<%P$N%W%m%;%9$,$"$j$^$;$s(B") - ("No text to send" . "$BAw?.$9$k%F%-%9%H$,$"$j$^$;$s(B") - ("None" . "$B$J$7(B") - ("Online: " . "$B%*%s%i%$%s(B: ") - ("Open server: " . "$B@\B3$9$k%5!<%P(B: ") - ("Part from channel/user (default %s): " . "$BN%C&$9$k%A%c%s%M%k$^$?$O%f!<%6(B ($B4{DjCM(B %s): ") - ("Password for %s: " . "%s $B$N%Q%9%o!<%I(B: ") - ("Password for %s: Quit" . "%s $B$N%Q%9%o!<%I(B: $BCf;_(B") - ("Password incorrect from %s." . "%s $B$N%Q%9%o!<%I$,IT@5$G$9!#(B") - ("Password: " . "$B%Q%9%o!<%I(B: ") - ("Password: Quit" . "$B%Q%9%o!<%I(B: $BCf;_(B") - ("Really quit IRC? " . "$BK\Ev$K(B IRC $B$r$d$a$^$9$+(B? ") - ("Really want to query LIST without argument? " . "$BK\Ev$K0z?t$J$7$N(B LIST $B$rH/9T$7$^$9$+(B? ") - ("Really want to query NAMES without argument? " . "$BK\Ev$K0z?t$J$7$N(B NAMES $B$rH/9T$7$^$9$+(B? ") - ("Really want to query WHO without argument? " . "$BK\Ev$K0z?t$J$7$N(B WHO $B$rH/9T$7$^$9$+(B? ") - ("Receiving %s from %s...(%s/%s)" . "%s $B$r(B %s $B$+$i - -;; 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 (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 (eq (car form) 'riece-mcat) - (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) - (save-excursion - (set-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 diff --git a/xemacs-packages/riece/lisp/riece-menu.el b/xemacs-packages/riece/lisp/riece-menu.el deleted file mode 100644 index 4368f16a..00000000 --- a/xemacs-packages/riece/lisp/riece-menu.el +++ /dev/null @@ -1,129 +0,0 @@ -;;; riece-menu.el --- setup Riece's command menus -;; Copyright (C) 1998-2003 Daiki Ueno - -;; Author: Daiki Ueno -;; 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) - -(defvar riece-menu-items - `("Riece" - ["Version" riece-version t] - ["Submit Bug Report" riece-submit-bug-report t] - "----" - ("Change Window Layout..." :filter riece-menu-create-layouts-menu) - ["Toggle Freeze Channel Buffer" - riece-command-toggle-freeze t] - ["Toggle Freeze Channel Buffer Until Next Message" - riece-command-toggle-own-freeze t] - ["Toggle Display Channel Buffer" - riece-command-toggle-channel-buffer-mode t] - ["Toggle Display Channel List Buffer" - riece-command-toggle-channel-list-buffer-mode t] - ["Toggle Display User List Buffer" - riece-command-toggle-user-list-buffer-mode t] - "----" - ["Join Channel" riece-command-join t] - ["Change Nickname" riece-command-change-nickname t] - ["Mark As Away" riece-command-toggle-away t] - ["Quit IRC" riece-command-quit t] - "----" - ["Part Channel" riece-command-part riece-current-channel] - ["Set Channel Topic" riece-command-topic riece-current-channel] - ["Kick User" riece-command-kick riece-current-channel] - ["Invite User" riece-command-invite riece-current-channel] - "----" - ["Next Channel" riece-command-next-channel riece-current-channels] - ["Previous Channel" riece-command-previous-channel riece-current-channels] - "----" - ("Channels" :filter riece-menu-create-channels-menu) - ("Servers" :filter riece-menu-create-servers-menu)) - "Menu used in command mode.") - -(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) - (mapcar (lambda (channel) - (list (riece-format-identity channel) - (vector "Switch To Channel" - (list 'riece-command-switch-to-channel channel) t) - (vector "Part Channel" - (list 'riece-command-part channel) t) - (vector "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 "Open Server" - (list 'riece-command-open-server (car entry)) - (not (riece-server-opened (car entry)))) - (vector "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-insinuate () - (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 diff --git a/xemacs-packages/riece/lisp/riece-message.el b/xemacs-packages/riece/lisp/riece-message.el deleted file mode 100644 index e32c45f2..00000000 --- a/xemacs-packages/riece/lisp/riece-message.el +++ /dev/null @@ -1,262 +0,0 @@ -;;; riece-message.el --- generate and display message line -;; Copyright (C) 1999-2003 Daiki Ueno - -;; Author: Daiki Ueno -;; 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) - -(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 (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-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 `action' and `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 diff --git a/xemacs-packages/riece/lisp/riece-mini.el b/xemacs-packages/riece/lisp/riece-mini.el deleted file mode 100644 index 4a19a726..00000000 --- a/xemacs-packages/riece/lisp/riece-mini.el +++ /dev/null @@ -1,158 +0,0 @@ -;;; riece-mini.el --- use Riece only on the minibuffer -;; Copyright (C) 2003 OHASHI Akira - -;; Author: OHASHI Akira -;; 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: " 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 - (/ (length 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 diff --git a/xemacs-packages/riece/lisp/riece-misc.el b/xemacs-packages/riece/lisp/riece-misc.el deleted file mode 100644 index fb511b5c..00000000 --- a/xemacs-packages/riece/lisp/riece-misc.el +++ /dev/null @@ -1,254 +0,0 @@ -;;; riece-misc.el --- miscellaneous functions (not inlined) -;; Copyright (C) 1998-2003 Daiki Ueno - -;; Author: Daiki Ueno -;; 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) - (save-excursion - (set-buffer (car buffers)) - (let ((inhibit-read-only t) - buffer-read-only - (start (goto-char (point-max))) - window - point) - (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 diff --git a/xemacs-packages/riece/lisp/riece-mode.el b/xemacs-packages/riece/lisp/riece-mode.el deleted file mode 100644 index 6f9c4e32..00000000 --- a/xemacs-packages/riece/lisp/riece-mode.el +++ /dev/null @@ -1,72 +0,0 @@ -;;; riece-mode.el --- functions for manipulating channel/user modes -;; Copyright (C) 1998-2003 Daiki Ueno - -;; Author: Daiki Ueno -;; 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 \ No newline at end of file diff --git a/xemacs-packages/riece/lisp/riece-naming.el b/xemacs-packages/riece/lisp/riece-naming.el deleted file mode 100644 index cb0e5a9a..00000000 --- a/xemacs-packages/riece/lisp/riece-naming.el +++ /dev/null @@ -1,138 +0,0 @@ -;;; riece-naming.el --- toplevel naming management -;; Copyright (C) 1998-2003 Daiki Ueno - -;; Author: Daiki Ueno -;; 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 diff --git a/xemacs-packages/riece/lisp/riece-ndcc.el b/xemacs-packages/riece/lisp/riece-ndcc.el deleted file mode 100644 index 82130897..00000000 --- a/xemacs-packages/riece/lisp/riece-ndcc.el +++ /dev/null @@ -1,250 +0,0 @@ -;;; riece-ndcc.el --- DCC file sending protocol support (written in elisp) -;; Copyright (C) 1998-2003 Daiki Ueno - -;; Author: Daiki Ueno -;; 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 diff --git a/xemacs-packages/riece/lisp/riece-options.el b/xemacs-packages/riece/lisp/riece-options.el deleted file mode 100644 index 04069145..00000000 --- a/xemacs-packages/riece/lisp/riece-options.el +++ /dev/null @@ -1,339 +0,0 @@ -;;; riece-options.el --- customization -;; Copyright (C) 1998-2003 Daiki Ueno - -;; Author: Daiki Ueno -;; 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-use-full-window t - "If non-nil, whole Emacs window is used to display dialogue." - :type 'boolean - :group 'riece-looks) - -(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) - -(define-widget 'riece-service-spec 'radio - "Edit service spec entries" - :convert-widget 'riece-service-spec-convert) - -(defun riece-service-spec-convert (widget) - (widget-put widget :args '((integer :tag "Port Number") - (string :tag "Name"))) - widget) - -(define-widget 'riece-server-spec 'repeat - "Edit server spec entries" - :match (lambda (widget value) - (eval `(and ,@(mapcar - (lambda (entry) - (or (stringp (cdr entry)) - (listp (cdr entry)))) - value)))) - :convert-widget 'riece-server-spec-convert) - -(defun riece-server-spec-convert (widget) - (let* ((host '(const :format "" :value :host)) - (service '(const :format "" :value :service)) - (host - `(group :inline t ,host (string :tag "Host"))) - (service - `(group :inline t ,service riece-service-spec)) - (spec - `(cons (string :tag "Name") - (radio (string :tag "Host") - (list ,host ,service)))) - (args (list spec))) - (widget-put widget :args args) - widget)) - -(defcustom riece-server-alist nil - "An alist mapping server names to plist." - :type 'riece-server-spec - :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) - -(provide 'riece-options) - -;;; riece-options.el ends here diff --git a/xemacs-packages/riece/lisp/riece-package-info.el b/xemacs-packages/riece/lisp/riece-package-info.el deleted file mode 100644 index 39983c44..00000000 --- a/xemacs-packages/riece/lisp/riece-package-info.el +++ /dev/null @@ -1,33 +0,0 @@ -;;; riece-package-info.el --- package information about Riece -;; Copyright (C) 2006 Daiki Ueno - -;; Author: Daiki Ueno - -;; 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 "riece") -(defconst riece-package-name "Riece") - -(defconst riece-version-number "3.1.2" - "Version number for this version of Riece.") - -(provide 'riece-package-info) - -;;; riece-package-info.el ends here diff --git a/xemacs-packages/riece/lisp/riece-package-info.el.in b/xemacs-packages/riece/lisp/riece-package-info.el.in deleted file mode 100644 index 652b9d79..00000000 --- a/xemacs-packages/riece/lisp/riece-package-info.el.in +++ /dev/null @@ -1,33 +0,0 @@ -;;; riece-package-info.el --- package information about Riece -;; Copyright (C) 2006 Daiki Ueno - -;; Author: Daiki Ueno - -;; 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 diff --git a/xemacs-packages/riece/lisp/riece-rdcc.el b/xemacs-packages/riece/lisp/riece-rdcc.el deleted file mode 100644 index 9b5286f6..00000000 --- a/xemacs-packages/riece/lisp/riece-rdcc.el +++ /dev/null @@ -1,373 +0,0 @@ -;;; riece-rdcc.el --- DCC file sending protocol support (written in Ruby) -;; Copyright (C) 1998-2003 Daiki Ueno - -;; Author: Daiki Ueno -;; 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-send-program - '("\ -require 'socket' -address = " address " -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, 0) -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 'list - :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 'list - :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 '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) - (save-excursion - (set-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) - (save-excursion - (set-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 diff --git a/xemacs-packages/riece/lisp/riece-ruby.el b/xemacs-packages/riece/lisp/riece-ruby.el deleted file mode 100644 index 699ddd08..00000000 --- a/xemacs-packages/riece/lisp/riece-ruby.el +++ /dev/null @@ -1,399 +0,0 @@ -;;; riece-ruby.el --- interact with Ruby interpreter -;; Copyright (C) 1998-2005 Daiki Ueno - -;; Author: Daiki Ueno -;; 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 () - (save-excursion - (set-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) - (save-excursion - (set-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)) - (process-kill-without-query riece-ruby-process) - (set-process-filter riece-ruby-process #'riece-ruby-filter) - (set-process-sentinel riece-ruby-process #'riece-ruby-sentinel))) - (save-excursion - (set-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." - (save-excursion - (set-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." - (save-excursion - (set-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 diff --git a/xemacs-packages/riece/lisp/riece-server.el b/xemacs-packages/riece/lisp/riece-server.el deleted file mode 100644 index 5a0db116..00000000 --- a/xemacs-packages/riece/lisp/riece-server.el +++ /dev/null @@ -1,317 +0,0 @@ -;;; riece-server.el --- functions to open and close servers -;; Copyright (C) 1998-2003 Daiki Ueno - -;; Author: Daiki Ueno -;; 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) - -(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)) - (condition-case nil - (setq process (funcall function server server-name)) - (error)) - (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) - (save-excursion - (set-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 diff --git a/xemacs-packages/riece/lisp/riece-shrink-buffer.el b/xemacs-packages/riece/lisp/riece-shrink-buffer.el deleted file mode 100644 index acbb5106..00000000 --- a/xemacs-packages/riece/lisp/riece-shrink-buffer.el +++ /dev/null @@ -1,117 +0,0 @@ -;;; riece-shrink-buffer.el --- free old IRC messages to save memory usage -;; Copyright (C) 1998-2005 Daiki Ueno - -;; Author: Daiki Ueno -;; 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) - -(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)) - (eq (derived-mode-class - (with-current-buffer (car buffers) - major-mode)) - '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 diff --git a/xemacs-packages/riece/lisp/riece-signal.el b/xemacs-packages/riece/lisp/riece-signal.el deleted file mode 100644 index d5fe870b..00000000 --- a/xemacs-packages/riece/lisp/riece-signal.el +++ /dev/null @@ -1,121 +0,0 @@ -;;; riece-signal.el --- "signal-slot" abstraction for routing display events -;; Copyright (C) 1998-2003 Daiki Ueno - -;; Author: Daiki Ueno -;; 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 diff --git a/xemacs-packages/riece/lisp/riece-skk-kakutei.el b/xemacs-packages/riece/lisp/riece-skk-kakutei.el deleted file mode 100644 index eef19195..00000000 --- a/xemacs-packages/riece/lisp/riece-skk-kakutei.el +++ /dev/null @@ -1,84 +0,0 @@ -;;; riece-skk-kakutei.el --- remove SKK's preedit mark before sending messages -;; Copyright (C) 2003 TAKAHASHI Kaoru - -;; Author: TAKAHASHI "beatmaria" Kaoru -;; 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 diff --git a/xemacs-packages/riece/lisp/riece-submit-bug-report.xpm b/xemacs-packages/riece/lisp/riece-submit-bug-report.xpm deleted file mode 100644 index 5d16164a..00000000 --- a/xemacs-packages/riece/lisp/riece-submit-bug-report.xpm +++ /dev/null @@ -1,177 +0,0 @@ -/* 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." -}; diff --git a/xemacs-packages/riece/lisp/riece-toolbar.el b/xemacs-packages/riece/lisp/riece-toolbar.el deleted file mode 100644 index 75bcb2f3..00000000 --- a/xemacs-packages/riece/lisp/riece-toolbar.el +++ /dev/null @@ -1,139 +0,0 @@ -;;; riece-toolbar.el --- display toolbar icons -;; Copyright (C) 1998-2004 Daiki Ueno - -;; Author: Daiki Ueno -;; 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-menu) - -(defconst riece-toolbar-description - "Display toolbar icons.") - -(defvar riece-toolbar-items - '(riece-command-quit - riece-command-join - riece-command-part - riece-command-previous-channel - riece-command-next-channel - riece-command-change-layout - riece-submit-bug-report)) - -(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)) - -(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 pointer)) - (cons riece-data-directory load-path) - '(".xpm" ".pbm" ".xbm")) - menu-item (riece-toolbar-find-menu-item (car pointer))) - (if (and file (file-exists-p file)) - (setq toolbar - (toolbar-add-item - toolbar - (toolbar-new-button - file - (car pointer) - (if menu-item - (aref menu-item 0) - (symbol-name (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 pointer) - (symbol-name (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 \ No newline at end of file diff --git a/xemacs-packages/riece/lisp/riece-unread.el b/xemacs-packages/riece/lisp/riece-unread.el deleted file mode 100644 index c07c8408..00000000 --- a/xemacs-packages/riece/lisp/riece-unread.el +++ /dev/null @@ -1,197 +0,0 @@ -;;; riece-unread.el --- mark channels where new messages arrived -;; Copyright (C) 1998-2003 Daiki Ueno - -;; Author: Daiki Ueno -;; 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) - (make-face '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 diff --git a/xemacs-packages/riece/lisp/riece-url.el b/xemacs-packages/riece/lisp/riece-url.el deleted file mode 100644 index 946139c2..00000000 --- a/xemacs-packages/riece/lisp/riece-url.el +++ /dev/null @@ -1,151 +0,0 @@ -;;; riece-url.el --- collect URL in IRC buffers -;; Copyright (C) 1998-2003 Daiki Ueno - -;; Author: Daiki Ueno -;; 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 - -(autoload 'browse-url "browse-url") -(defvar browse-url-browser-function) - -(defgroup riece-url nil - "URL Browsing in IRC buffer." - :prefix "riece-" - :group 'riece) - -(defcustom riece-url-regexp "\\b\\(s?https?\\|ftp\\|file\\|gopher\\|news\\|telnet\\|wais\\|mailto\\):\\(//[-a-zA-Z0-9_.]+:[0-9]*\\)?[-a-zA-Z0-9_=?#$@~`%&*+|\\/.,;]*[-a-zA-Z0-9_=#$@~`%&*+|\\/;]" - "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 "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)) - '("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)) - "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 diff --git a/xemacs-packages/riece/lisp/riece-user.el b/xemacs-packages/riece/lisp/riece-user.el deleted file mode 100644 index c780e61d..00000000 --- a/xemacs-packages/riece/lisp/riece-user.el +++ /dev/null @@ -1,162 +0,0 @@ -;;; riece-user.el --- a user object -;; Copyright (C) 1998-2003 Daiki Ueno - -;; Author: Daiki Ueno -;; 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 diff --git a/xemacs-packages/riece/lisp/riece-version.el b/xemacs-packages/riece/lisp/riece-version.el deleted file mode 100644 index 49fb1fbd..00000000 --- a/xemacs-packages/riece/lisp/riece-version.el +++ /dev/null @@ -1,113 +0,0 @@ -;;; riece-version.el --- version information handling -;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 -;; Free Software Foundation, Inc. -;; Copyright (C) 1998-2003 Daiki Ueno - -;; Author: Daiki Ueno -;; 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 diff --git a/xemacs-packages/riece/lisp/riece-xemacs.el b/xemacs-packages/riece/lisp/riece-xemacs.el deleted file mode 100644 index 4ebad2be..00000000 --- a/xemacs-packages/riece/lisp/riece-xemacs.el +++ /dev/null @@ -1,144 +0,0 @@ -;;; riece-xemacs.el --- XEmacs specific functions -;; Copyright (C) 1998-2003 Daiki Ueno - -;; Author: Daiki Ueno -;; 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 diff --git a/xemacs-packages/riece/lisp/riece-xface.el b/xemacs-packages/riece/lisp/riece-xface.el deleted file mode 100644 index d43cf5ec..00000000 --- a/xemacs-packages/riece/lisp/riece-xface.el +++ /dev/null @@ -1,93 +0,0 @@ -;;; riece-xface.el --- display X-Face in IRC buffers -;; Copyright (C) 1998-2003 Daiki Ueno - -;; Author: Daiki Ueno -;; 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 diff --git a/xemacs-packages/riece/lisp/riece-xfaceb.el b/xemacs-packages/riece/lisp/riece-xfaceb.el deleted file mode 100644 index 18cd7158..00000000 --- a/xemacs-packages/riece/lisp/riece-xfaceb.el +++ /dev/null @@ -1,149 +0,0 @@ -;;; riece-xfaceb.el --- display X-Face/Colour Face in IRC buffers -;; Copyright (C) 2005 Daiki Ueno - -;; Author: Steve Youngs -;; 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: - -;;; Code: - -(require 'riece-identity) -(require 'riece-globals) -(require 'riece-display) - -(autoload 'bbdb-records "bbdb") -(autoload 'bbdb-record-getprop "bbdb") - -(defconst riece-xfaceb-description - "Display X-Face & Colour Face images in IRC buffers \(BBDB\).") - -(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-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-update-user-list-buffer () - "Add X-Face or Colour Face images to channel users' buffer." - (when (get 'riece-xfaceb 'riece-addon-enabled) - (let ((users (ignore-errors - (riece-with-server-buffer - (riece-identity-server riece-current-channel) - (riece-channel-get-users (riece-identity-prefix - riece-current-channel))))) - all-records cface xface nick name record) - (while users - (setq name (caar users)) - (setq all-records (bbdb-records)) - (while all-records - (setq record (car all-records) - nick (bbdb-record-getprop record 'ircnick) - xface (bbdb-record-getprop record 'face) - cface (bbdb-record-getprop record 'cface)) - (when (and (equal nick name) - (or xface cface)) - (with-current-buffer riece-user-list-buffer - (goto-char (point-min)) - (re-search-forward (regexp-quote name) nil t) - (beginning-of-line) - (when (and xface - (or (not riece-xfaceb-prefer-cface-to-xface) - (not cface))) - (set-extent-begin-glyph - (extent-at (point)) - (make-glyph (list (vector 'xface - :data (concat "X-Face: " xface) - :foreground "black" - :background "white"))))) - (when (and (featurep 'png) - riece-xfaceb-prefer-cface-to-xface - cface) - (set-extent-begin-glyph - (extent-at (point)) - (make-glyph (list (vector 'png - :data (riece-xfaceb-face-to-png cface))))))) - ;; We have a match, get out of the inner loop - (setq all-records nil)) - (setq all-records (cdr all-records))) - (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 () - (if riece-current-channel - (riece-emit-signal 'user-list-changed riece-current-channel))) - -(defun riece-xfaceb-disable () - (if riece-current-channel - (riece-emit-signal 'user-list-changed riece-current-channel))) - -(provide 'riece-xfaceb) - -;;; riece-xfaceb.el ends here - diff --git a/xemacs-packages/riece/lisp/riece-yank.el b/xemacs-packages/riece/lisp/riece-yank.el deleted file mode 100644 index 914d05f0..00000000 --- a/xemacs-packages/riece/lisp/riece-yank.el +++ /dev/null @@ -1,103 +0,0 @@ -;;; riece-yank.el --- enter the element of kill-ring -;; Copyright (C) 2004 Masatake YAMATO - -;; Author: Masatake YAMATO -;; 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 diff --git a/xemacs-packages/riece/lisp/riece.el b/xemacs-packages/riece/lisp/riece.el deleted file mode 100644 index 75356bd4..00000000 --- a/xemacs-packages/riece/lisp/riece.el +++ /dev/null @@ -1,627 +0,0 @@ -;;; riece.el --- IRC client for Emacsen -;; Copyright (C) 1998-2003 Daiki Ueno - -;; Author: Daiki Ueno -;; 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) - -(autoload 'derived-mode-class "derived") - -(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) -(defun riece-save-variables-files () - "Save current settings to `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))))) - (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) - (mapcar - (lambda (c) (modify-syntax-entry c "w")) - "^[]{}'`")) - - (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) - (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)) - (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 - (save-excursion - (set-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)))))) - -(defvar reporter-prompt-for-summary-p) -(defun riece-submit-bug-report (&optional recent-messages recent-keys) - "Submit via mail a bug report on Riece." - ;; This strange form ensures that (recent-keys) is the value before - ;; the bug subject string is read. - (interactive (list (riece-recent-messages 20) (recent-keys))) - (message "Querying server version...") - (let ((pointer riece-server-process-alist) - nickname) - (while pointer - (when (riece-server-process-opened (cdr (car pointer))) - (process-send-string (cdr (car pointer)) "VERSION\r\n") - (if (setq nickname - (with-current-buffer (process-buffer (cdr (car pointer))) - riece-real-nickname)) - (process-send-string - (cdr (car pointer)) - (format "PRIVMSG %s :\1VERSION\1\r\n" nickname)))) - (setq pointer (cdr pointer)))) - (sit-for 3) - (message "Querying server version...done") - (require 'reporter) - (let ((reporter-prompt-for-summary-p t)) - (unless riece-debug - (error "Please turn on riece-debug and restart Riece.")) - (reporter-submit-bug-report - "liece@unixuser.org" - (riece-version) - '(riece-debug) - nil - nil - "This bug report will be sent to the Riece Development Team, -not to your local site managers!! - -Please write in Japanese or English, because the Riece maintainers do -not have translators to read other languages for them. - -Please describe as succinctly as possible: -\t- What happened. -\t- What you thought should have happened. -\t- Precisely what you were doing at the time. - -Also include a reliable recipe for triggering the bug, as well as -any lisp back-traces that you may have. -\(setq stack-trace-on-error t\), or \(setq debug-on-error t\) if you -are familiar with the debugger, to get a lisp back-trace.") - (delete-other-windows) - (save-excursion - (goto-char (point-max)) - (insert - "\nAdd-on state:\n" - "------------\n" - (save-window-excursion - (save-excursion - (riece-command-list-addons) - (search-forward "\n\n") - (buffer-substring (point-min) (point))))) - (insert "Recent messages from servers:\n" - "--------------------------") - (let ((pointer riece-server-process-alist)) - (while pointer - (insert "\n- \"" (car (car pointer)) "\", \n" - (format "%S" (if (equal (car (car pointer)) "") - riece-server - (cdr (assoc (car (car pointer)) - riece-server-alist)))) - "\n" - (if (riece-server-process-opened (cdr (car pointer))) - (save-excursion - (set-buffer (process-buffer (cdr (car pointer)))) - (goto-char (point-max)) - (beginning-of-line -60) - (buffer-substring (point) (point-max))) - "(closed server)")) - (setq pointer (cdr pointer)))) - (insert "\n\nRecent debug messages:\n" - "-----------------------------------\n" - (with-current-buffer riece-debug-buffer - (buffer-string))) - ;; Insert recent keystrokes. - (insert "\n\nRecent keystrokes:\n" - "-----------------\n\n") - (let ((before-keys (point))) - (insert (key-description recent-keys)) - (save-restriction - (narrow-to-region before-keys (point)) - (goto-char before-keys) - (while (progn (move-to-column 50) (not (eobp))) - (search-forward " " nil t) - (insert "\n")))) - ;; Insert recent minibuffer messages. - (insert "\n\nRecent messages (most recent first):\n" - "-----------------------------------\n" - recent-messages)))) - -(provide 'riece) - -;;; riece.el ends here diff --git a/xemacs-packages/riece/lisp/server.rb b/xemacs-packages/riece/lisp/server.rb deleted file mode 100644 index e18c5276..00000000 --- a/xemacs-packages/riece/lisp/server.rb +++ /dev/null @@ -1,226 +0,0 @@ -# server.rb --- A simple IPC server executing Ruby programs. -# Copyright (C) 1998-2005 Daiki Ueno - -# Author: Daiki Ueno -# 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 diff --git a/xemacs-packages/riece/lisp/test/Makefile.am b/xemacs-packages/riece/lisp/test/Makefile.am deleted file mode 100644 index 85a8f5e3..00000000 --- a/xemacs-packages/riece/lisp/test/Makefile.am +++ /dev/null @@ -1,4 +0,0 @@ -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 diff --git a/xemacs-packages/riece/lisp/test/luna.el b/xemacs-packages/riece/lisp/test/luna.el deleted file mode 100644 index 238fba8e..00000000 --- a/xemacs-packages/riece/lisp/test/luna.el +++ /dev/null @@ -1,434 +0,0 @@ -;;; luna.el --- tiny OOP system kernel - -;; Copyright (C) 1999,2000,2002 Free Software Foundation, Inc. - -;; Author: MORIOKA Tomohiko -;; 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 diff --git a/xemacs-packages/riece/lisp/test/lunit-report.el b/xemacs-packages/riece/lisp/test/lunit-report.el deleted file mode 100644 index 10ce3f2f..00000000 --- a/xemacs-packages/riece/lisp/test/lunit-report.el +++ /dev/null @@ -1,155 +0,0 @@ -;;; lunit-report.el --- output test report in XML compatible with JUnitTask - -;; Copyright (C) 2004 Daiki Ueno. - -;; Author: Daiki Ueno - -;; 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 "\ - -" - (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 "\ - -" - (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 "\ - -" - (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 "\ - -") - (goto-char (point-min)) - (looking-at " *") - (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 "\ - - - - - - -" - (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 "\ - -") - (save-buffer))))) - -(provide 'lunit-report) \ No newline at end of file diff --git a/xemacs-packages/riece/lisp/test/lunit.el b/xemacs-packages/riece/lisp/test/lunit.el deleted file mode 100644 index 313283a5..00000000 --- a/xemacs-packages/riece/lisp/test/lunit.el +++ /dev/null @@ -1,336 +0,0 @@ -;;; lunit.el --- simple testing framework for luna - -;; Copyright (C) 2000-2004 Daiki Ueno. - -;; Author: Daiki Ueno -;; 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". -;; - -;; (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 diff --git a/xemacs-packages/riece/lisp/test/test-riece-addon.el b/xemacs-packages/riece/lisp/test/test-riece-addon.el deleted file mode 100644 index 9fae05cd..00000000 --- a/xemacs-packages/riece/lisp/test/test-riece-addon.el +++ /dev/null @@ -1,43 +0,0 @@ -(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))))) diff --git a/xemacs-packages/riece/lisp/test/test-riece-alias.el b/xemacs-packages/riece/lisp/test/test-riece-alias.el deleted file mode 100644 index fe272050..00000000 --- a/xemacs-packages/riece/lisp/test/test-riece-alias.el +++ /dev/null @@ -1,135 +0,0 @@ -(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 diff --git a/xemacs-packages/riece/lisp/test/test-riece-cache.el b/xemacs-packages/riece/lisp/test/test-riece-cache.el deleted file mode 100644 index b378dd3d..00000000 --- a/xemacs-packages/riece/lisp/test/test-riece-cache.el +++ /dev/null @@ -1,77 +0,0 @@ -(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"))))) diff --git a/xemacs-packages/riece/lisp/test/test-riece-eval.el b/xemacs-packages/riece/lisp/test/test-riece-eval.el deleted file mode 100644 index d4ec1931..00000000 --- a/xemacs-packages/riece/lisp/test/test-riece-eval.el +++ /dev/null @@ -1,66 +0,0 @@ -(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)))) diff --git a/xemacs-packages/riece/lisp/test/test-riece-log.el b/xemacs-packages/riece/lisp/test/test-riece-log.el deleted file mode 100644 index fc147745..00000000 --- a/xemacs-packages/riece/lisp/test/test-riece-log.el +++ /dev/null @@ -1,158 +0,0 @@ -(require 'riece-log) - -(luna-define-class test-riece-log (lunit-test-case)) - -(defun test-riece-log-delete-directory (directory) - (let (file-name-coding-system - default-file-name-coding-system - (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 a b c\n03:15 a b c\n" nil - (expand-file-name "19700102.txt" test-riece-log-directory) - t 0) - (write-region "03:14 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 1 2 3 (1970/01/01)\n" - "03:14 a b c (1970/01/02)\n" - "03:15 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 - default-file-name-coding-system) - (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))))) diff --git a/xemacs-packages/riece/lisp/test/test-riece-ruby.el b/xemacs-packages/riece/lisp/test/test-riece-ruby.el deleted file mode 100644 index 3c2a8f53..00000000 --- a/xemacs-packages/riece/lisp/test/test-riece-ruby.el +++ /dev/null @@ -1,100 +0,0 @@ -(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")))) diff --git a/xemacs-packages/riece/lisp/test/test-riece-shrink-buffer.el b/xemacs-packages/riece/lisp/test/test-riece-shrink-buffer.el deleted file mode 100644 index 2da10088..00000000 --- a/xemacs-packages/riece/lisp/test/test-riece-shrink-buffer.el +++ /dev/null @@ -1,19 +0,0 @@ -(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)))))) diff --git a/xemacs-packages/riece/lisp/test/test-riece-url.el b/xemacs-packages/riece/lisp/test/test-riece-url.el deleted file mode 100644 index d5defe30..00000000 --- a/xemacs-packages/riece/lisp/test/test-riece-url.el +++ /dev/null @@ -1,42 +0,0 @@ -(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))))) diff --git a/xemacs-packages/riece/lisp/test/test-riece-yank.el b/xemacs-packages/riece/lisp/test/test-riece-yank.el deleted file mode 100644 index 6039bada..00000000 --- a/xemacs-packages/riece/lisp/test/test-riece-yank.el +++ /dev/null @@ -1,26 +0,0 @@ -(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"))) diff --git a/xemacs-packages/riece/lisp/url-riece.el b/xemacs-packages/riece/lisp/url-riece.el deleted file mode 100644 index 0848eff2..00000000 --- a/xemacs-packages/riece/lisp/url-riece.el +++ /dev/null @@ -1,107 +0,0 @@ -;;; url-riece.el --- Adapting `riece' to `url-irc' -;; Copyright (C) 2004 Masatake YAMATO - -;; Author: Masatake YAMATO -;; 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 -;; 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 diff --git a/xemacs-packages/riece/package-info.in b/xemacs-packages/riece/package-info.in deleted file mode 100644 index 60d14959..00000000 --- a/xemacs-packages/riece/package-info.in +++ /dev/null @@ -1,19 +0,0 @@ -(riece - (standards-version 1.1 - version VERSION - author-version AUTHOR_VERSION - date DATE - build-date BUILD_DATE - maintainer MAINTAINER - distribution xemacs - priority high - category CATEGORY - dump nil - description "IRC (Internet Relay Chat) client for Emacs." - filename FILENAME - md5sum MD5SUM - size SIZE - provides (riece-compat riece-xemacs riece-globals riece-options riece-debug riece-version riece-coding riece-complete riece-addon-modules riece-addon riece-ruby riece-cache riece-mode riece-identity riece-channel riece-user riece-misc riece-signal riece-layout riece-display riece-server riece-naming riece-message riece-filter riece-handle riece-000 riece-200 riece-300 riece-400 riece-500 riece-commands riece-irc riece riece-alias riece-async riece-biff riece-button riece-ctcp riece-ctlseq riece-doctor riece-eval-ruby riece-eval riece-foolproof riece-google riece-guess riece-hangman riece-highlight riece-history riece-icon riece-ignore riece-kakasi riece-keepalive riece-keyword riece-log riece-lsdb riece-menu riece-mini riece-rdcc riece-shrink-buffer riece-skk-kakutei riece-toolbar riece-unread riece-url riece-xface riece-xfaceb riece-yank) - requires (REQUIRES) - type regular -)) -- 2.25.1