riece-9.0.0/0000775000076400007640000000000011761025307007624 500000000000000riece-9.0.0/missing0000755000076400007640000002415211761025270011144 00000000000000#! /bin/sh # Common stub for a few missing GNU programs while installing. scriptversion=2012-01-06.13; # UTC # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006, # 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc. # Originally by Fran,cois Pinard , 1996. # 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 this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then echo 1>&2 "Try \`$0 --help' for more information" exit 1 fi run=: sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' sed_minuso='s/.* -o \([^ ]*\).*/\1/p' # In the cases where this matters, `missing' is being run in the # srcdir already. if test -f configure.ac; then configure_ac=configure.ac else configure_ac=configure.in fi msg="missing on your system" case $1 in --run) # Try to run requested program, and just exit if it succeeds. run= shift "$@" && exit 0 # Exit code 63 means version mismatch. This often happens # when the user try to use an ancient version of a tool on # a file that requires a minimum version. In this case we # we should proceed has if the program had been absent, or # if --run hadn't been passed. if test $? = 63; then run=: msg="probably too old" fi ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an error status if there is no known handling for PROGRAM. Options: -h, --help display this help and exit -v, --version output version information and exit --run try to run the given command, and emulate it if it fails Supported PROGRAM values: aclocal touch file \`aclocal.m4' autoconf touch file \`configure' autoheader touch file \`config.h.in' autom4te touch the output file, or create a stub one automake touch all \`Makefile.in' files bison create \`y.tab.[ch]', if possible, from existing .[ch] flex create \`lex.yy.c', if possible, from existing .c help2man touch the output file lex create \`lex.yy.c', if possible, from existing .c makeinfo touch the output file yacc create \`y.tab.[ch]', if possible, from existing .[ch] Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and \`g' are ignored when checking the name. Send bug reports to ." exit $? ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing $scriptversion (GNU Automake)" exit $? ;; -*) echo 1>&2 "$0: Unknown \`$1' option" echo 1>&2 "Try \`$0 --help' for more information" exit 1 ;; esac # normalize program name to check for. program=`echo "$1" | sed ' s/^gnu-//; t s/^gnu//; t s/^g//; t'` # Now exit if we have it, but it failed. Also exit now if we # don't have it and --version was passed (most likely to detect # the program). This is about non-GNU programs, so use $1 not # $program. case $1 in lex*|yacc*) # Not GNU programs, they don't have --version. ;; *) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then # Could not run --version or --help. This is probably someone # running `$TOOL --version' or `$TOOL --help' to check whether # $TOOL exists and not knowing $TOOL uses missing. exit 1 fi ;; esac # If it does not exist, or fails to run (possibly an outdated version), # try to emulate it. case $program in aclocal*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." touch aclocal.m4 ;; autoconf*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." touch configure ;; autoheader*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acconfig.h' or \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` test -z "$files" && files="config.h" touch_files= for f in $files; do case $f in *:*) touch_files="$touch_files "`echo "$f" | sed -e 's/^[^:]*://' -e 's/:.*//'`;; *) touch_files="$touch_files $f.in";; esac done touch $touch_files ;; automake*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." find . -type f -name Makefile.am -print | sed 's/\.am$/.in/' | while read f; do touch "$f"; done ;; autom4te*) echo 1>&2 "\ WARNING: \`$1' is needed, but is $msg. You might have modified some files without having the proper tools for further handling them. You can get \`$1' as part of \`Autoconf' from any GNU archive site." file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo "#! /bin/sh" echo "# Created by GNU Automake missing as a replacement of" echo "# $ $@" echo "exit 0" chmod +x $file exit 1 fi ;; bison*|yacc*) echo 1>&2 "\ WARNING: \`$1' $msg. You should only need it if you modified a \`.y' file. You may need the \`Bison' package in order for those modifications to take effect. You can get \`Bison' from any GNU archive site." rm -f y.tab.c y.tab.h if test $# -ne 1; then eval LASTARG=\${$#} case $LASTARG in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.c fi SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.h fi ;; esac fi if test ! -f y.tab.h; then echo >y.tab.h fi if test ! -f y.tab.c; then echo 'main() { return 0; }' >y.tab.c fi ;; lex*|flex*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.l' file. You may need the \`Flex' package in order for those modifications to take effect. You can get \`Flex' from any GNU archive site." rm -f lex.yy.c if test $# -ne 1; then eval LASTARG=\${$#} case $LASTARG in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` if test -f "$SRCFILE"; then cp "$SRCFILE" lex.yy.c fi ;; esac fi if test ! -f lex.yy.c; then echo 'main() { return 0; }' >lex.yy.c fi ;; help2man*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a dependency of a manual page. You may need the \`Help2man' package in order for those modifications to take effect. You can get \`Help2man' from any GNU archive site." file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo ".ab help2man is required to generate this page" exit $? fi ;; makeinfo*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.texi' or \`.texinfo' file, or any other file indirectly affecting the aspect of the manual. The spurious call might also be the consequence of using a buggy \`make' (AIX, DU, IRIX). You might want to install the \`Texinfo' package or the \`GNU make' package. Grab either from any GNU archive site." # The file to touch is that specified with -o ... file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -z "$file"; then # ... or it is the one specified with @setfilename ... infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` file=`sed -n ' /^@setfilename/{ s/.* \([^ ]*\) *$/\1/ p q }' $infile` # ... or it is derived from the source name (dir/f.texi becomes f.info) test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info fi # If the file does not exist, the user really needs makeinfo; # let's fail without touching anything. test -f $file || exit 1 touch $file ;; *) echo 1>&2 "\ WARNING: \`$1' is needed, and is $msg. You might have modified some files without having the proper tools for further handling them. Check the \`README' file, it often tells you about the needed prerequisites for installing this package. You may also peek at any GNU archive site, in case some other package would contain this missing \`$1' program." exit 1 ;; esac exit 0 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: riece-9.0.0/NEWS0000664000076400007640000005015611761025103010244 00000000000000* Major changes in 9.0.0 ** New command to re-order channels is added (ueno) See the doc string of riece-command-reorder-channels. ** Complete multiple channels when joining (ueno) * Major changes in 8.0.0 ** Extend URL regexp used in riece-url (ueno) ** Use lexical binding everywhere (ueno) ** Update doc/ptexinfmt.el (kaoru) * Major changes in 7.0.3 ** Fix freeze behavior when the cursor is on a channel buffer (ueno) riece-shrink-buffer had a bug which moves the cursor to the top or bottom of buffer even when the buffer is frozen. ** Fix out-of-tree build (kaoru, ueno) There were some code not passing srcdir correctly. ** Remove old-style backquotes for Emacs 24 (ueno) * Major changes in 7.0.2 ** Fix bug of reading IRC logs (ueno) If coding-system was not specified when writing log to file, Riece added extra ".nil" to the filename. That causes erronous behavior on reading the logs back. ** Fix control sequence parsing (ueno) * Major changes in 7.0.1 ** Fix compilation error on Emacs 24. (ueno) Emacs 24 does not have make-local-hook. ** Suppress byte-compile warnings. (kaoru) Suppress "`save-excursion' defeated by `set-buffer'". ** Support "make distcheck". (ueno) * Major changes in 7.0.0 ** Mailing list address changed to riece-discuss@nongnu.org. ** Fix build for XEmacs 21.5. (ueno) ** Fix coloring riece-channel-list-indicator on mode-line. (ueno) * Major changes in 6.1.0 ** Revert to use setq instead of Custom for saved settings. (ueno) ** Add-on management commands can now be usable from the Command buffer. (kaoru) * Major changes in 6.0.0 ** New add-on riece-desktop-notify. (bg66) ** Fix Custom-based setting mechanism. * Major changes in 5.0.0 ** Use Custom for saved settings. (ueno) ** Use stock icons for toolbar. (ueno) ** Follow the procedure recommended in RFC2812 when making a connection to the server. This change is needed for some IRC servers including TwitterIrcGateway. (ueno) ** Allow non-ASCII realname. (KASUGA Toru) ** Fixed a corner case bug of riece-keywords settings. (Takeru Naito) * Major changes in 4.0.0 ** New add-on riece-twitter. (ueno) ** riece-rdcc can now specify sending ports. (ueno) * Major changes in 3.1.2 ** Message catalog. (ueno) * Major changes in 3.1.1 ** riece-async works again. (ueno) ** riece-shrink-buffer is now enabled by default. (ueno) ** New window layout "spiral". (URABE Shyouhei) * Major changes in 3.1.0 ** Prevent reentrace of message handlers. This might fix some long standing bug in message handling. (ueno) ** Removed dependency on the calc package from riece-ndcc.el. (ueno) ** Fixed a bug in the 353 message handler. (ueno) * Major changes in 3.0.0 ** Changed the meaning of riece-username. If you set this option, you will need to set riece-realname instead. (ueno) ** Cause an error if a user requests to close already closed server. (yoichi) ** New add-on riece-epg.el, which enables secure conversation using GnuPG. (ueno) ** Fixed a couple of bugs in inviting users. (Steve Youngs) ** Fixed a redisplay bug when a user leaves a channel. (ueno) ** Reverted the default value of riece-alias-alternate-separator to "@". (ueno) * Major changes in 2.0.2 ** Fixed C-c l (riece-command-list) behavior. It didn't display channel TOPIC correctly. (ueno) ** Don't alter case of user/channel names when completing user input. (ueno) ** Changed default value of alternate separator of a channel name and an IRC server name to "%". (ueno) * Major changes in 2.0.1 ** If there is a message in previously selected channel, Riece 2.0.0 doesn't treat it as an unread channel. 2.0.1 fixes it. (ueno) ** New add-on riece-xfaceb.el, which displays X-Face/Colour Face in IRC buffers. (Steve Youngs) * Major changes in 2.0.0 ** Support multiple coding-systems on a server. You can use different coding-systems for different channels. (ueno) For example: (setq riece-channel-coding-system-alist '(("#euc-jp" . euc-jp) ("#utf-8 irc.freenode.net" . utf-8))) ** Support uninstall, unload (dangerous) operations for add-ons. Now you can fully customize riece-addons in the add-on listing mode. (ueno) ** New mechanism for executing Ruby programs. To use it, see the commentary section of riece-ruby.el. (ueno) ** New add-on riece-eval-ruby.el, which regards user input prefixed by ",ruby " as a Ruby program and sends the result to the current channel. (ueno) ** New add-on riece-shrink-buffer.el, which now takes care of periodic buffer shrinking. If you have set riece-max-buffer-size, you will need to enable the riece-shrink-buffer add-on in the add-on listing mode. (ueno) ** Don't signal an error when a user is quitting, and who has joined a channel where you left. (ueno) ** When saving a log file, suffix the name of the coding-system used onto the filename. This will avoid mojibake even riece-log-coding-system is not set. (ueno) ** While traversing channel list with C-c g, offer channels in order of precedence where they have newer unread messages. (ueno) ** Allow "@" instead of " " as a separator of a channel name and an IRC server name. (ueno) ** Rewrite the Japanese manual (riece-ja.texi) for IRC & Emacs newbies. (ueno) ** Allow users to hide *Others* buffer. (ueno) ** Use seperate buffer to store debugging output. (ueno) ** Added new make rule for byte-compiling elisp files individually. To use it, after configure, do "make compile-individually" in lisp/. (ueno) ** Include a document for developers (doc/HACKING{,.ja}) (ueno) * Major changes in 1.0.8 ** Mitigate file locking scheme of riece-log. (ueno) ** Format idle seconds in human readable form. (ueno) ** Separate riece-obarray into riece-channel-obarray and riece-user-obarray. (kaoru) ** Fixed bugs caused by mishandling of channel names (which should be case insensitive.) (ueno) ** Support SXEmacs version names. (Steve Youngs) ** Support CTCP TIME. (Steve Youngs) ** Ignore directories under ~/.riece/addons. (kaoru) ** Fixed wrong-number-of-arguments error on riece-command-part. (yoichi) ** Fixed a bug which assumes existence of ~/.riece/addons when startup. (ueno) * Major changes in 1.0.7 ** New add-on riece-toolbar. (ueno) riece-toolbar displays icons on toolbar. Currently not all the icons are included. ** New add-on riece-keepalive. (ueno) riece-keepalive spontaneously sends a PING message to server to keep an IRC connection. ** New add-on riece-google. (bg66) riece-google searches on Google and sends the result to the channel. ** New add-on riece-eval. (bg66) riece-eval evaluates elisp expression and sends the result to the channel. ** Some add-ons are enabled by default. (ueno) riece-log, riece-alias, riece-ctlseq, and riece-keyword are now enabled by default. ** New command riece-command-suspend-resume. (ueno) riece-command-suspend-resume saves or restores the current window configuration. ** Preserve cursor position when clicking button widget. (ueno) ** Decorate modeline indicator with faces. (ueno) ** Count users in NAMES reply. (ueno) ** New user option riece-part-message. (ueno) ** Add-ons located in riece-addon-directory are automatically enabled. (ueno) ** Default value of riece-buffer-dispose-function is now kill-buffer. (ueno) ** Backtrace when encountered an error in process-filter. (ueno) ** Ask channel key to user when it is required. (ueno) ** Automatic buffer shrinking is now disabled by default. (ueno) ** New directory structure for riece-log. (ueno) ** Fixed a bug in user-renamed signal-filter. (kaoru) ** Fixed a bug in riece-command-enable-addon and riece-command-disable-addon. (yoichi) * Major changes in 1.0.6 ** Bundle url-riece, a backend of url-irc which comes with the recent GNU Emacs. (Yamato-san) ** New user option riece-url-regexp-alist to allow users to define mapping from arbitrary strings (such as "Bug#12345") to URL. (This feature is a backport from Liece) (ueno) ** New modeline indicator which represents user's channel operator status in the current channel. (ueno, thanks to k-to) ** Remove multiple lines at a time when shrinking channel buffers. Number of lines to be removed is controlled by riece-shrink-buffer-remove-lines option. (ueno, thanks to ysjj) ** riece-alias-alist now works again. (ueno) ** Fixed a bug in flow control for sending long messages, introduced in 1.0.4. (ueno) ** New command riece-submit-bug-report to generate a template for good problem report. (ueno) ** Accept radical IRC proxy programs which break with tradition of the original IRC server implementation. (ueno, thanks to k-to san) ** New key bind C-c # to switch channel by number. (ueno, thanks to ysjj) ** If a prefix-argument is given, riece-yank sends message as a NOTICE. (bg66) * Major changes in 1.0.5 ** Added some test cases. (ueno) ** Alternate separator string for channel names. (ueno) In case riece-alias-alternate-separator set to "@", rewriting will be done as follows: "#riece" -> "#riece" "#riece localhost" -> "#riece@localhost" "#ch@nnel" -> "#ch@@nnel" "#ch@nnel localhost" -> "#ch@@nnel@localhost" ** Fixed interop bug in DCC. (ueno) ** New add-on riece-yank to send strings from kill-ring. (by Yamato-san) ** English translation of texinfo document is included. (ueno) * Major changes in 1.0.4 ** Do "flow control" to avoid flooding. (ueno) ** Automatically open servers when joining channels at startup. Users can now omit riece-startup-server-list settings. (ueno) ** riece-mini provides a command to browse recent messages. (bg66) * Major changes in 1.0.3 NOTE: This release includes some fixes to long standing bugs in essential features. I recommend to upgrade from the older versions. ** Remove nonexistent users from user list. (Thanks to Yamashita-san) ** Improved line truncation customizability. Users can now control it by simply setting truncate-lines on each buffer. (Thanks to Yamashita-san) ** Added new user option riece-window-center-line to control buffer scrolling behavior. ** Fixed completion bug in command buffer. (Thanks to Yamashita-san) ** Remove chat partner from channel list when he/she resigned from IRC. (Thanks to Morimoto-san) ** Exit immediately after an error occurred in connecting to the default IRC server. (Thanks to k-to san) * Major changes in 1.0.2 ** Fixed problem hiding menubar menus when riece-url is enabled. ** Split IRC protocol interface from the core modules. ** Fixed minor bugs. * Major changes in 1.0.1 ** Arranged background colors of modeline faces (for XEmacs) ** When changing channel modes, do not prepend ":" to MODE message (Thanks to Yamada-san) ** Added riece-foolproof add-on which prevents miss posting to channels (by Takahashi-san) ** Arranged the order of modeline elements on channel buffers (by Takahashi-san) ** Changed open/close bracket for displaying own notices (by Takahashi-san) ** Don't register signal-slot functions duplicatedly. ** New user command riece-command-beginning-of-buffer bound to C-c Home. ** For frozen channels, preserve cursor position of channel buffers while zapping between other channels. ** Follow the change in emacs-cvs, check the return value of current-word (by Nakayama-san) ** Fixed random number generation logic for riece-hangman (by Takahashi-san) ** Signal "No text to send" error if user types C-c p on an empty line. ** New user option riece-startup-ignored-user-list: which can be used to set up riece-ignored-user-list in ~/.riece/init.el. ** Allow sending/receiving files whose names contain whitespaces. * Major changes in 1.0.0 ** New UI for enabling/disabling add-ons (to enter this mode, C-c ^) ** Fixed bug that a user couldn't quit password input with C-g. ** New add-on "riece-hangman" which allows channel members to play hangman(6). ** Display error message on C-c q when no IRC process are running. ** New add-on "riece-ignore" which allows to ignore messages from particular users. ** Accept nicknames consisting more than 9 letters. ** Avoid duplicate initialization of add-ons. ** New add-on "riece-biff" which displays biff mark ("[R]") on mode-line. (by Ohashi-san) ** New add-on "riece-kakasi" which converts Japanese to roman string. ** Fixed prompt strings to indicate the current action more precisely. (suggested by Yamashita-san) * Major changes in 0.2.2 ** Interpret control sequences used in IRC such as ^B, ^V, ^_, etc. This feature is implemented as an add-on called riece-ctlseq. ** Fixed bug that private messages were not treated as unread. ** Buffer "freeze" status can be toggled in each buffer respectively. (use C-t C-f) ** Use canonicalized channel names to locate directories where log files are stored. (by Ohashi-san) * Major changes in 0.2.0 ** Introduced "signal-slot" (as in Qt, GTK+) mechanism to routing display events. ** When a user requests NAMES, insert nicknames into the channel buffer. ** Fixed bug in riece-lsdb. (by Nakayama-san) * Major changes in 0.1.8 ** Added riece-lsdb add-on which cooperates with LSDB. ** Added riece-xface add-on which displays X-Faces in user list buffer. ** Fixed bug that channel names were treated case sensitively. ** Handle messages from other clients which use the same IRC proxy. (by Takahashi-san) * Major changes in 0.1.7 ** Added riece-async add-on which provides safe connection to an IRC server via local proxy which responds to PING requests while Emacs is busy or suspended. ** Fixed changing user away status bug when riece-away-message is set. (Thanks to Fujimura-san) ** Remove side effects on standard-syntax-table when loading. (Thanks to Hori-san) ** Can join channels on several servers at startup by setting riece-startup-server-list as well as riece-startup-channel-list. ** New user option `riece-log-coding-system' to specify default coding system used for log files. ** New user option `riece-keyword-notify-functions' called when someone spoke a message including the specified keyword. Please use it instead of `riece-notify-keyword-functions'(very confusing name!). ** riece-log-flashback also restores faces and buttons. ** riece-{unread,mini} ignores NOTICE and CTCP ACTION messages. * Major changes in 0.1.6 ** Fixed running problems on Emacs 20.7. ** Fixed compilation failure on XEmacs 21.1. ** Allow riece-rdcc to receive large files without memory consumption. ** Check channel modes when joinning if riece-gather-channel-modes == t. ** Fixed run-idle-timer usage to shrink channel buffers. ** Fixed buffer scrolling behavior when switching channels. ** Allow to specify qualified channel names in riece-log-directory-map. (by Ohashi-san) * Major changes in 0.1.5 ** Added 6 new window layouts. ** Automatically save/restore the current window layout. ** Added riece-icon add-on which decorates buffers with icons. ** Speedup in redrawing the user list buffer. ** Improve usability of CTCP ACTION (Thanks to knu-san) ** Fixed bug in riece-rdcc which causes freeze on DCC SEND. ** When riece server was opened, Do riece-command-configure-windows instead of signaling. (Thanks to Ohashi-san) ** Fixed bug in C-c o (riece-command-set-operators) and C-c v (riece-command-set-speakers). ** Shrink buffers when they exceeds riece-max-buffer-size. * Major changes in 0.1.4 ** Bind "N" instead of "\C-n" to riece-command-names in channel buffers. (thanks to Takahashi-san) ** Fixed bug causing an error when the user typed C-c C-t a (riece-command-toggle-away). (thanks to Maeda-san) ** Don't redisplay buffers when the current selected window doesn't display Riece buffers. ** Don't reuse buffers created by different programs. Genereate new buffer in such case. ** Fixed bug which doesn't allow to join a channel whose name is beginning with "!!". ** When riece-keyword is effective, don't check if the message from myself contains given keywords. ** Signal an error when the user issues a command which assumes the current channel though the current channel is not available. ** Added riece-menu add-on which adds a menu entry in the menubar. * Major changes in 0.1.3 ** Treat channel names in PRIVMSG/NOTICE messages case-insensitively. ** When riece-history is effective, mark the last visited channel with "+". ** Added riece-button add-on which decorates buffers with buttons and define some popup-menus. ** Added riece-keyword add-on which notifies the user when the arrived message contains given keywords. If you are using XEmacs and want to be notified of keywords with sound, add the following lines to your ~/.riece/init.el: (load-default-sounds) (setq riece-keywords '("foo" "bar")) (add-hook 'riece-notify-keyword-functions (lambda (keyword) (play-sound 'cuckoo))) * Major changes in 0.1.2 ** Fixed bug when joinning a channel using a key. ** Revive riece-startup-channel-list. ** New user option riece-rdcc-save-directory is added. ** Fixed unable to interrupt password input. ** Fixed bug in the INVITE handler. ** Prompt a channel name when the user joins the invited channel. ** Fixed bug that occasionally kept riece-channel-list-indicator not up to date. * Major changes in 0.1.1 ** Load some add-ons by default. ** Fixed bug with riece-default-channel-binding not working. ** Mark the current channel with "*" in *Channels* buffer. ** If riece-debug is turned off, don't report connection status when exiting. ** New add-on: riece-history manages channel switching history. ** New add-on: riece-guess offers the next channel user may want to check. Tips: If you have the following lines in ~/.riece/init.el: (setq riece-guess-channel-try-functions '(riece-guess-channel-from-unread riece-guess-channel-from-history)) By hitting `C-c g' repeatedly, you can check channels in the following order: 1. Channels where there is unread message. 2. Channels where you have visited recently. 3. The rest. * Major changes in 0.1.0 ** Use vectors to represent channels and users. ** Improve process management: -- Server names are now embedded in process names. -- Integrate scattered connection management code into riece-server.el. -- Force disconnect if the server does not respond after sending QUIT. ** New add-on: riece-doctor.el allows to pretended to be a doctor. ** Window configuration can be easily switched by hitting C-c t l. ** New add-on: riece-skk-kakutei.el avoids ▽ being included in spoken text, when you are using SKK. (by Takahashi-san) ** New predefined layout which emulates "top" window-style as in Liece. (by Takahashi-san) * Major changes in 0.0.4 ** Added riece-mini add-on which allows conversation through a minibuffer (by Ohashi-san). ** Added log collector add-on (riece-log) (by Ohashi-san). ** riece-command-next-channel (C-c >) and riece-command-previous-channel (C-c <) now follow the channel list circularly (by Nakayama-san). ** When riece-unread is enabled, you can quickly check the unread channels by hitting C-c C-u (by Ohashi-san). ** Display of status indicators obeys some IRC messages. ** Replaced ptexinfmt.el with the version which does not depend on APEL (Thanks to Yamaoka-san). * Major changes in 0.0.3 ** Fix bug connecting to two servers which require passwords (Thanks to Nakayama-san) ** Fix inconsistency when changing case of letters in nickname ** Catch all errors occured in handler hooks ** Support DCC file transfer (riece-ndcc.el, riece-rdcc.el) ** Add "mark unread channels" add-on (riece-unread.el) ** Add Japanese texinfo manual (I'll translate it in the future) * Major changes in 0.0.2 ** Don't use APEL functions (pop, push) ** "depcomp" was missing in the previous archive (sorry!) ** Fix bug building on Windows environment (Thanks to Ohashi-san) ** Fix inconsistency when changing nickname ** Fix bug on C-c C-t u (M-x riece-command-toggle-user-list-mode) ** Provide add-on mechanism ** Partial support for CTCP ** Make font-lock related module (riece-highlight) add-on ** Revive URL collector (formerly liece-url) as add-on * Major changes in 0.0.1 ** Initial release. * For details of changes, see the file ChangeLog. Local variables: mode: text mode: outline paragraph-separate: "[ ]*$" end: riece-9.0.0/aclocal.m40000664000076400007640000005541111761025270011411 00000000000000# generated automatically by aclocal 1.11.3 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, # Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],, [m4_warning([this file was generated for autoconf 2.68. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically `autoreconf'.])]) # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software # Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 1 # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.11' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. m4_if([$1], [1.11.3], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) # _AM_AUTOCONF_VERSION(VERSION) # ----------------------------- # aclocal traces this macro to find the Autoconf version. # This is a private macro too. Using m4_define simplifies # the logic in aclocal, which can simply ignore this definition. m4_define([_AM_AUTOCONF_VERSION], []) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.11.3])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 1 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to # `$srcdir', `$srcdir/..', or `$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is `.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [dnl Rely on autoconf to set up CDPATH properly. AC_PREREQ([2.50])dnl # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 9 # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ(2.52)dnl ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE])dnl AC_SUBST([$1_FALSE])dnl _AM_SUBST_NOTMAKE([$1_TRUE])dnl _AM_SUBST_NOTMAKE([$1_FALSE])dnl m4_define([_AM_COND_VALUE_$1], [$2])dnl if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([[conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]]) fi])]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2008, 2009 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 16 # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # The call with PACKAGE and VERSION arguments is the old style # call (pre autoconf-2.50), which is being phased out. PACKAGE # and VERSION should now be passed to AC_INIT and removed from # the call to AM_INIT_AUTOMAKE. # We support both call styles for the transition. After # the next Automake release, Autoconf can make the AC_INIT # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.62])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl # test to see if srcdir already configured if test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) AM_MISSING_PROG(AUTOCONF, autoconf) AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) AM_MISSING_PROG(AUTOHEADER, autoheader) AM_MISSING_PROG(MAKEINFO, makeinfo) AC_REQUIRE([AM_PROG_INSTALL_SH])dnl AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl AC_REQUIRE([AM_PROG_MKDIR_P])dnl # We need awk for the "check" target. The system "awk" is bad on # some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES(CC)], [define([AC_PROG_CC], defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES(CXX)], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES(OBJC)], [define([AC_PROG_OBJC], defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl ]) _AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl dnl The `parallel-tests' driver may need to know about EXEEXT, so add the dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro dnl is hooked onto _AC_COMPILER_EXEEXT early, see below. AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl ]) dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further dnl mangled by Autoconf and run in a shell conditional statement. m4_define([_AC_COMPILER_EXEEXT], m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the # loop where config.status creates the headers, so we can generate # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_arg=$1 _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001, 2003, 2005, 2008, 2011 Free Software Foundation, # Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 1 # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi AC_SUBST(install_sh)]) # Copyright (C) 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 6 # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it supports --run. # If it does, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= AC_MSG_WARN([`missing' script is too old or missing]) fi ]) # Copyright (C) 2003, 2004, 2005, 2006, 2011 Free Software Foundation, # Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 1 # AM_PROG_MKDIR_P # --------------- # Check for `mkdir -p'. AC_DEFUN([AM_PROG_MKDIR_P], [AC_PREREQ([2.60])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, dnl while keeping a definition of mkdir_p for backward compatibility. dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of dnl Makefile.ins that do not define MKDIR_P, so we do our own dnl adjustment using top_builddir (which is defined more often than dnl MKDIR_P). AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl case $mkdir_p in [[\\/$]]* | ?:[[\\/]]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac ]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 Free Software # Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 5 # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # -------------------- # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), 1)]) # _AM_SET_OPTIONS(OPTIONS) # ------------------------ # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 5 # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Just in case sleep 1 echo timestamp > conftest.file # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[[\\\"\#\$\&\'\`$am_lf]]*) AC_MSG_ERROR([unsafe absolute working directory name]);; esac case $srcdir in *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; esac # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi rm -f conftest.file if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT(yes)]) # Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 1 # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor `install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in `make install-strip', and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be `maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 3 # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. # This macro is traced by Automake. AC_DEFUN([_AM_SUBST_NOTMAKE]) # AM_SUBST_NOTMAKE(VARIABLE) # -------------------------- # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004, 2005, 2012 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. # FORMAT should be one of `v7', `ustar', or `pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory # $tardir. # tardir=directory && $(am__tar) > result.tar # # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AC_SUBST([AMTAR], ['$${TAR-tar}']) m4_if([$1], [v7], [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], [m4_case([$1], [ustar],, [pax],, [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' _am_tools=${am_cv_prog_tar_$1-$_am_tools} # Do not fold the above two line into one, because Tru64 sh and # Solaris sh will not grok spaces in the rhs of `-'. for _am_tool in $_am_tools do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR m4_include([acinclude.m4]) riece-9.0.0/acinclude.m40000644000076400007640000002502711377612201011737 00000000000000AC_DEFUN([AC_DEFINE_GNUS_PRODUCT_NAME], [echo $ac_n "defining gnus product name... $ac_c" AC_CACHE_VAL(EMACS_cv_GNUS_PRODUCT_NAME,[EMACS_cv_GNUS_PRODUCT_NAME=$1]) GNUS_PRODUCT_NAME=${EMACS_cv_GNUS_PRODUCT_NAME} AC_MSG_RESULT(${GNUS_PRODUCT_NAME}) AC_SUBST(GNUS_PRODUCT_NAME)]) AC_DEFUN([AC_CHECK_EMACS], [dnl Check for Emacsen. dnl Apparently, if you run a shell window in Emacs, it sets the EMACS dnl environment variable to 't'. Lets undo the damage. test "$EMACS" = t && EMACS= dnl Ignore cache. unset ac_cv_prog_EMACS; unset ac_cv_prog_XEMACS; AC_ARG_WITH(emacs, [ --with-emacs=EMACS compile with EMACS [EMACS=emacs, mule...]], [if test "$withval" = yes -o -z "$withval"; then AC_CHECK_PROGS(EMACS, emacs xemacs mule, emacs) else AC_CHECK_PROG(EMACS, $withval, $withval, emacs) fi]) AC_ARG_WITH(xemacs, [ --with-xemacs=XEMACS compile with XEMACS [XEMACS=xemacs]], [if test "$withval" = yes -o -z "$withval"; then AC_CHECK_PROG(XEMACS, xemacs, xemacs, xemacs) else AC_CHECK_PROG(XEMACS, $withval, $withval, xemacs) fi EMACS=$XEMACS], [XEMACS=xemacs test -z "$EMACS" && AC_CHECK_PROGS(EMACS, emacs xemacs mule, emacs)]) AC_SUBST(EMACS) AC_SUBST(XEMACS)]) AC_DEFUN([AC_EMACS_LISP], [ elisp="$2" if test -z "$3"; then AC_MSG_CHECKING(for $1) fi AC_CACHE_VAL(EMACS_cv_SYS_$1,[ OUTPUT=./conftest-$$ echo ${EMACS}' -batch -eval '\''(let ((x '${elisp}')) (write-region (if (stringp x) (princ x) (prin1-to-string x)) nil "'${OUTPUT}'" nil 5))'\' >& AC_FD_CC 2>&1 eval ${EMACS}' -batch -eval '\''(let ((x '${elisp}')) (write-region (if (stringp x) (princ x) (prin1-to-string x)) nil "'${OUTPUT}'" nil 5))'\' >& AC_FD_CC 2>&1 retval=`cat ${OUTPUT}` echo "=> ${retval}" >& AC_FD_CC 2>&1 rm -f ${OUTPUT} EMACS_cv_SYS_$1=$retval ]) $1=${EMACS_cv_SYS_$1} if test -z "$3"; then AC_MSG_RESULT($$1) fi ]) AC_DEFUN([AC_CHECK_EMACS_FLAVOR], [AC_MSG_CHECKING([what flavor does $EMACS have]) dnl Ignore cache. unset EMACS_cv_SYS_flavor; AC_EMACS_LISP(flavor, (cond ((featurep (quote xemacs)) \"XEmacs\")\ ((boundp (quote MULE)) \"MULE\")\ (t \"FSF Emacs\")), "noecho") case $EMACS_cv_SYS_flavor in XEmacs) EMACS_FLAVOR=xemacs;; MULE) EMACS_FLAVOR=mule;; *) EMACS_FLAVOR=emacs;; esac AC_MSG_RESULT($EMACS_cv_SYS_flavor)]) AC_DEFUN([AC_PATH_LISPDIR], [ AC_CHECK_EMACS_FLAVOR if test "$prefix" = NONE; then AC_MSG_CHECKING([prefix for your Emacs]) AC_EMACS_LISP(prefix,(expand-file-name \"..\" invocation-directory),"noecho") prefix=${EMACS_cv_SYS_prefix} AC_MSG_RESULT($prefix) fi AC_ARG_WITH(lispdir, [ --with-lispdir=DIR Where to install lisp files (for XEmacs package, use --with-packagedir instead)], lispdir=${withval}) AC_MSG_CHECKING([where lisp files should go]) if test -z "$lispdir"; then dnl Set default value theprefix=$prefix if test "$theprefix" = NONE; then theprefix=$ac_default_prefix fi lispdir="\$(datadir)/${EMACS_FLAVOR}/site-lisp/${GNUS_PRODUCT_NAME}" for thedir in share lib; do potential= if test -d ${theprefix}/${thedir}/${EMACS_FLAVOR}/site-lisp; then lispdir="\$(prefix)/${thedir}/${EMACS_FLAVOR}/site-lisp/${GNUS_PRODUCT_NAME}" break fi done fi if test ${EMACS_FLAVOR} = xemacs; then AC_MSG_RESULT([$lispdir (it will be ignored when \"make install-package[[-ja]]\" is done)]) else AC_MSG_RESULT([$lispdir]) fi AC_SUBST(lispdir) ]) AC_DEFUN([AC_PATH_ETCDIR], [ AC_ARG_WITH(etcdir,[ --with-etcdir=DIR Where to install etc files], etcdir=${withval}) AC_MSG_CHECKING([where etc files should go]) if test -z "$etcdir"; then dnl Set default value etcdir="\$(lispdir)/../etc" fi AC_MSG_RESULT($etcdir) AC_SUBST(etcdir) ]) dnl dnl Check whether a function exists in a library dnl All '_' characters in the first argument are converted to '-' dnl AC_DEFUN([AC_EMACS_CHECK_LIB], [ if test -z "$3"; then AC_MSG_CHECKING(for $2 in $1) fi library=`echo $1 | tr _ -` AC_EMACS_LISP($1,(progn (fmakunbound (quote $2)) (condition-case nil (progn (require (quote $library)) (fboundp (quote $2))) (error (prog1 nil (message \"$library not found\"))))),"noecho") if test "${EMACS_cv_SYS_$1}" = nil; then EMACS_cv_SYS_$1=no fi if test "${EMACS_cv_SYS_$1}" = t; then EMACS_cv_SYS_$1=yes fi HAVE_$1=${EMACS_cv_SYS_$1} AC_SUBST(HAVE_$1) if test -z "$3"; then AC_MSG_RESULT($HAVE_$1) fi ]) dnl dnl Perform sanity checking and try to locate the W3 package dnl AC_DEFUN([AC_CHECK_W3], [ AC_MSG_CHECKING(for acceptable W3 version) dnl Ignore cache. unset EMACS_cv_ACCEPTABLE_W3; unset EMACS_cv_SYS_w3_dir; unset EMACS_cv_SYS_w3_forms; AC_CACHE_VAL(EMACS_cv_ACCEPTABLE_W3,[ AC_EMACS_CHECK_LIB(w3_forms, w3-form-encode-xwfu,"noecho") if test "${HAVE_w3_forms}" = yes; then EMACS_cv_ACCEPTABLE_W3=yes else EMACS_cv_ACCEPTABLE_W3= fi if test "${EMACS_cv_ACCEPTABLE_W3}" = yes; then AC_EMACS_LISP(w3_dir,(file-name-directory (locate-library \"w3-forms\")),"noecho") EMACS_cv_ACCEPTABLE_W3=$EMACS_cv_SYS_w3_dir fi ]) AC_ARG_WITH(w3,[ --with-w3=DIR Specify where to find the w3 package], [ EMACS_cv_ACCEPTABLE_W3=`( cd $withval && pwd || echo "$withval" ) 2> /dev/null` ]) W3=${EMACS_cv_ACCEPTABLE_W3} AC_SUBST(W3) if test -z "${EMACS_cv_ACCEPTABLE_W3}"; then AC_MSG_RESULT(not found) else AC_MSG_RESULT(${W3}) fi ]) dnl dnl Perform sanity checking and try to locate the W3 package dnl AC_DEFUN([AC_CHECK_URL], [ AC_MSG_CHECKING(for acceptable URL version) dnl Ignore cache. unset EMACS_cv_ACCEPTABLE_URL; unset EMACS_cv_SYS_url_dir; unset EMACS_cv_SYS_url; AC_CACHE_VAL(EMACS_cv_ACCEPTABLE_URL,[ AC_EMACS_CHECK_LIB(url, url-retrieve, "noecho") if test "${HAVE_url}" = yes; then EMACS_cv_ACCEPTABLE_URL=yes else EMACS_cv_ACCEPTABLE_URL= fi if test "${EMACS_cv_ACCEPTABLE_URL}" = yes; then AC_EMACS_LISP(url_dir,(file-name-directory (locate-library \"url\")),"noecho") EMACS_cv_ACCEPTABLE_URL=$EMACS_cv_SYS_url_dir fi ]) AC_ARG_WITH(url,[ --with-url=DIR Specify where to find the url package], [ EMACS_cv_ACCEPTABLE_URL=`( cd $withval && pwd || echo "$withval" ) 2> /dev/null` ]) URL=${EMACS_cv_ACCEPTABLE_URL} AC_SUBST(URL) if test -z "${EMACS_cv_ACCEPTABLE_URL}"; then AC_MSG_RESULT(not found) else AC_MSG_RESULT("${URL}") fi ]) dnl dnl Perform checking available fonts: Adobe Bembo, Adobe Futura and dnl Bitstream Courier. dnl AC_DEFUN([GNUS_CHECK_FONTS], [ test "$LATEX" = t && LATEX= test "$LATEX" || AC_PATH_PROGS(LATEX, latex, no) AC_MSG_CHECKING(for available fonts) AC_ARG_WITH(fonts,[ --with-fonts Assume all fonts required are available],[USE_FONTS="$withval"]) WITH_FONTS_bembo='%' WITHOUT_FONTS_bembo= WITH_FONTS_pfu='%' WITHOUT_FONTS_pfu= WITH_FONTS_bcr='%' WITHOUT_FONTS_bcr= if test -z "${USE_FONTS}"; then if test "${LATEX}" = no; then : else OUTPUT=./conftest-$$ echo '\nonstopmode\documentclass{article}\usepackage{bembo}\begin{document}\end{document}' > ${OUTPUT} if ${LATEX} ${OUTPUT} & 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)]) riece-9.0.0/README0000644000076400007640000000235711377612201010427 00000000000000* What's this? Riece is an IRC client for Emacs. Riece provides the following features: - Several IRC servers may be used at the same time. - Essential features can be built upon the extension framework (called "add-on") capable of dependency tracking. - Installation is easy. Riece doesn't depend on other packages. - Setup is easy. Automatically save/restore the configuration. - Riece uses separate windows to display users, channels, and dialogues. The user can select the window layout. - Step-by-step instructions (in info format) are included. - Mostly compliant with RFC 2812. * Directory tree This package contains following directories: lisp/ - Emacs Lisp files. doc/ - Documentation files. * Requirements - Emacs 20.7 or later / XEmacs 21.4 or later - Ruby 1.8 or later (optional) * Installation $ ./configure $ sudo make install Add the following line to your Emacs startup file such as ~/.emacs. (autoload 'riece "riece" "Start Riece" t) If you are using XEmacs and want to install as a package, supply "--with-xemacs" option to the configure script and use "install-package" target instead of "install". * Manuals Info manuals are available after installation. To read, start Emacs and type M-x info and select "Riece-en". riece-9.0.0/Makefile.in0000664000076400007640000005255511761025271011625 00000000000000# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = . DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(top_srcdir)/configure AUTHORS COPYING \ ChangeLog INSTALL NEWS install-sh missing ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = depcomp = am__depfiles_maybe = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir dist dist-all distcheck ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ if test -d "$(distdir)"; then \ find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -rf "$(distdir)" \ || { sleep 5 && rm -rf "$(distdir)"; }; \ else :; fi am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best distuninstallcheck_listfiles = find . -type f -print am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EMACS = @EMACS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ PACKAGE = @PACKAGE@ PACKAGEDIR = @PACKAGEDIR@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XEMACS = @XEMACS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ am__leading_dot = @am__leading_dot@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ lispdir = @lispdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = lisp doc EXTRA_DIST = README.ja NEWS.ja AUTOMAKE_OPTIONS = no-dependencies all: all-recursive .SUFFIXES: am--refresh: Makefile @: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \ $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: $(am__configure_deps) $(am__cd) $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) $(am__aclocal_m4_deps): # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) $(am__remove_distdir) test -d "$(distdir)" || mkdir "$(distdir)" @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done -test -n "$(am__skip_mode_fix)" \ || find "$(distdir)" -type d ! -perm -755 \ -exec chmod u+rwx,go+rx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r "$(distdir)" dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 $(am__remove_distdir) dist-lzip: distdir tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz $(am__remove_distdir) dist-lzma: distdir tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma $(am__remove_distdir) dist-xz: distdir tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz $(am__remove_distdir) dist-tarZ: distdir tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__remove_distdir) dist-shar: distdir shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__remove_distdir) dist dist-all: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lzma*) \ lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\ *.tar.lz*) \ lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac chmod -R a-w $(distdir); chmod a+w $(distdir) mkdir $(distdir)/_build mkdir $(distdir)/_inst chmod a-w $(distdir) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && am__cwd=`pwd` \ && $(am__cd) $(distdir)/_build \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ && cd "$$am__cwd" \ || exit 1 $(am__remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: @test -n '$(distuninstallcheck_dir)' || { \ echo 'ERROR: trying to run $@ with an empty' \ '$$(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ $(am__cd) '$(distuninstallcheck_dir)' || { \ echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 distcleancheck: distclean @if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic mostlyclean-am distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am am--refresh check check-am clean clean-generic \ ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \ dist-lzip dist-lzma dist-shar dist-tarZ dist-xz dist-zip \ distcheck distclean distclean-generic distclean-tags \ distcleancheck distdir distuninstallcheck dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ pdf-am ps ps-am tags tags-recursive uninstall uninstall-am @XEMACS_TRUE@install-package package: @XEMACS_TRUE@ list='$(SUBDIRS)'; for subdir in $$list; do \ @XEMACS_TRUE@ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $@) \ @XEMACS_TRUE@ done # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: riece-9.0.0/configure0000755000076400007640000033550411761025270011462 00000000000000#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.68 for riece 9.0.0. # # Report bugs to . # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software # Foundation, Inc. # # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi " as_required="as_fn_return () { (exit \$1); } as_fn_success () { as_fn_return 0; } as_fn_failure () { as_fn_return 1; } as_fn_ret_success () { return 0; } as_fn_ret_failure () { return 1; } exitcode=0 as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes else as_have_required=no fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. as_shell=$as_dir/$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi done;; esac as_found=false done $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : CONFIG_SHELL=$SHELL as_have_required=yes fi; } IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV export CONFIG_SHELL case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"} fi if test x$as_have_required = xno; then : $as_echo "$0: This script requires a shell more modern than all" $as_echo "$0: the shells that I found on your system." if test x${ZSH_VERSION+set} = xset ; then $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org and $0: riece-discuss@nongnu.org about your system, including $0: any error possibly output before this message. Then $0: install a modern shell, or manually run the script $0: under such a shell if you do have one." fi exit 1 fi fi fi SHELL=${CONFIG_SHELL-/bin/sh} export SHELL # Unset more variables known to interfere with behavior of common tools. CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS ## --------------------- ## ## M4sh Shell Functions. ## ## --------------------- ## # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_lineno_1=$LINENO as_lineno_1a=$LINENO as_lineno_2=$LINENO as_lineno_2a=$LINENO eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in #( -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= # Identity of this package. PACKAGE_NAME='riece' PACKAGE_TARNAME='riece' PACKAGE_VERSION='9.0.0' PACKAGE_STRING='riece 9.0.0' PACKAGE_BUGREPORT='riece-discuss@nongnu.org' PACKAGE_URL='' ac_unique_file="configure.ac" ac_subst_vars='LTLIBOBJS LIBOBJS XEMACS_FALSE XEMACS_TRUE PACKAGEDIR lispdir XEMACS EMACS am__untar am__tar AMTAR am__leading_dot SET_MAKE AWK mkdir_p MKDIR_P INSTALL_STRIP_PROGRAM STRIP install_sh MAKEINFO AUTOHEADER AUTOMAKE AUTOCONF ACLOCAL VERSION PACKAGE CYGPATH_W am__isrc INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking with_emacs with_xemacs with_lispdir with_packagedir ' ac_precious_vars='build_alias host_alias target_alias' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *=) ac_optarg= ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) as_fn_error $? "unrecognized option: \`$ac_option' Try \`$0 --help' for more information" ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used" >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures riece 9.0.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/riece] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of riece 9.0.0:";; esac cat <<\_ACEOF Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-emacs=EMACS compile with EMACS EMACS=emacs, mule... --with-xemacs=XEMACS compile with XEMACS XEMACS=xemacs --with-lispdir=DIR Where to install lisp files (for XEmacs package, use --with-packagedir instead) --with-packagedir=DIR package DIR for XEmacs Report bugs to . _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF riece configure 9.0.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi ## ------------------------ ## ## Autoconf initialization. ## ## ------------------------ ## cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by riece $as_me 9.0.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. $as_echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done { ac_configure_args0=; unset ac_configure_args0;} { ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo $as_echo "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo $as_echo "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then $as_echo "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then $as_echo "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo cat confdefs.h echo fi test "$ac_signal" != 0 && $as_echo "$as_me: caught signal $ac_signal" $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h $as_echo "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_URL "$PACKAGE_URL" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then # We do not want a PATH search for config.site. case $CONFIG_SITE in #(( -*) ac_site_file1=./$CONFIG_SITE;; */*) ac_site_file1=$CONFIG_SITE;; *) ac_site_file1=./$CONFIG_SITE;; esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See \`config.log' for more details" "$LINENO" 5; } fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## ## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu am__api_version='1.11' ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f "$ac_dir/install.sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if ${ac_cv_path_install+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in #(( ./ | .// | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 $as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 $as_echo_n "checking whether build environment is sane... " >&6; } # Just in case sleep 1 echo timestamp > conftest.file # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; esac # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi rm -f conftest.file if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". as_fn_error $? "ls -t appears to fail. Make sure there is not a broken alias in your environment" "$LINENO" 5 fi test "$2" = conftest.file ) then # Ok. : else as_fn_error $? "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s&\$&$program_suffix&;$program_transform_name" # Double any \ or $. # By default was `s,x,x', remove it if useless. ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5 $as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} fi if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then if ${ac_cv_path_mkdir+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS fi test -d ./--version && rmdir ./--version if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a # value for MKDIR_P within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. MKDIR_P="$ac_install_sh -d" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } mkdir_p="$MKDIR_P" case $mkdir_p in [\\/$]* | ?:[\\/]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AWK+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 $as_echo "$AWK" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AWK" && break done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE='riece' VERSION='9.0.0' cat >>confdefs.h <<_ACEOF #define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF #define VERSION "$VERSION" _ACEOF # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} # We need awk for the "check" target. The system "awk" is bad on # some platforms. # Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AMTAR='$${TAR-tar}' am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' test "$EMACS" = t && EMACS= unset ac_cv_prog_EMACS; unset ac_cv_prog_XEMACS; # Check whether --with-emacs was given. if test "${with_emacs+set}" = set; then : withval=$with_emacs; if test "$withval" = yes -o -z "$withval"; then for ac_prog in emacs xemacs mule do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_EMACS+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$EMACS"; then ac_cv_prog_EMACS="$EMACS" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_EMACS="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi EMACS=$ac_cv_prog_EMACS if test -n "$EMACS"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EMACS" >&5 $as_echo "$EMACS" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$EMACS" && break done test -n "$EMACS" || EMACS="emacs" else # Extract the first word of "$withval", so it can be a program name with args. set dummy $withval; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_EMACS+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$EMACS"; then ac_cv_prog_EMACS="$EMACS" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_EMACS="$withval" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_prog_EMACS" && ac_cv_prog_EMACS="emacs" fi fi EMACS=$ac_cv_prog_EMACS if test -n "$EMACS"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EMACS" >&5 $as_echo "$EMACS" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi # Check whether --with-xemacs was given. if test "${with_xemacs+set}" = set; then : withval=$with_xemacs; if test "$withval" = yes -o -z "$withval"; then # Extract the first word of "xemacs", so it can be a program name with args. set dummy xemacs; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_XEMACS+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$XEMACS"; then ac_cv_prog_XEMACS="$XEMACS" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_XEMACS="xemacs" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_prog_XEMACS" && ac_cv_prog_XEMACS="xemacs" fi fi XEMACS=$ac_cv_prog_XEMACS if test -n "$XEMACS"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XEMACS" >&5 $as_echo "$XEMACS" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi else # Extract the first word of "$withval", so it can be a program name with args. set dummy $withval; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_XEMACS+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$XEMACS"; then ac_cv_prog_XEMACS="$XEMACS" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_XEMACS="$withval" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_prog_XEMACS" && ac_cv_prog_XEMACS="xemacs" fi fi XEMACS=$ac_cv_prog_XEMACS if test -n "$XEMACS"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XEMACS" >&5 $as_echo "$XEMACS" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi EMACS=$XEMACS else XEMACS=xemacs test -z "$EMACS" && for ac_prog in emacs xemacs mule do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_EMACS+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$EMACS"; then ac_cv_prog_EMACS="$EMACS" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_EMACS="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi EMACS=$ac_cv_prog_EMACS if test -n "$EMACS"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EMACS" >&5 $as_echo "$EMACS" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$EMACS" && break done test -n "$EMACS" || EMACS="emacs" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking what flavor does $EMACS have" >&5 $as_echo_n "checking what flavor does $EMACS have... " >&6; } unset EMACS_cv_SYS_flavor; elisp="(cond ((featurep (quote xemacs)) \"XEmacs\")\ ((boundp (quote MULE)) \"MULE\")\ (t \"FSF Emacs\"))" if test -z ""noecho""; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flavor" >&5 $as_echo_n "checking for flavor... " >&6; } fi if ${EMACS_cv_SYS_flavor+:} false; then : $as_echo_n "(cached) " >&6 else OUTPUT=./conftest-$$ echo ${EMACS}' -batch -eval '\''(let ((x '${elisp}')) (write-region (if (stringp x) (princ x) (prin1-to-string x)) nil "'${OUTPUT}'" nil 5))'\' >& 5 2>&1 eval ${EMACS}' -batch -eval '\''(let ((x '${elisp}')) (write-region (if (stringp x) (princ x) (prin1-to-string x)) nil "'${OUTPUT}'" nil 5))'\' >& 5 2>&1 retval=`cat ${OUTPUT}` echo "=> ${retval}" >& 5 2>&1 rm -f ${OUTPUT} EMACS_cv_SYS_flavor=$retval fi flavor=${EMACS_cv_SYS_flavor} if test -z ""noecho""; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $flavor" >&5 $as_echo "$flavor" >&6; } fi case $EMACS_cv_SYS_flavor in XEmacs) EMACS_FLAVOR=xemacs;; MULE) EMACS_FLAVOR=mule;; *) EMACS_FLAVOR=emacs;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EMACS_cv_SYS_flavor" >&5 $as_echo "$EMACS_cv_SYS_flavor" >&6; } if test "$prefix" = NONE; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking prefix for your Emacs" >&5 $as_echo_n "checking prefix for your Emacs... " >&6; } elisp="(expand-file-name \"..\" invocation-directory)" if test -z ""noecho""; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prefix" >&5 $as_echo_n "checking for prefix... " >&6; } fi if ${EMACS_cv_SYS_prefix+:} false; then : $as_echo_n "(cached) " >&6 else OUTPUT=./conftest-$$ echo ${EMACS}' -batch -eval '\''(let ((x '${elisp}')) (write-region (if (stringp x) (princ x) (prin1-to-string x)) nil "'${OUTPUT}'" nil 5))'\' >& 5 2>&1 eval ${EMACS}' -batch -eval '\''(let ((x '${elisp}')) (write-region (if (stringp x) (princ x) (prin1-to-string x)) nil "'${OUTPUT}'" nil 5))'\' >& 5 2>&1 retval=`cat ${OUTPUT}` echo "=> ${retval}" >& 5 2>&1 rm -f ${OUTPUT} EMACS_cv_SYS_prefix=$retval fi prefix=${EMACS_cv_SYS_prefix} if test -z ""noecho""; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $prefix" >&5 $as_echo "$prefix" >&6; } fi prefix=${EMACS_cv_SYS_prefix} { $as_echo "$as_me:${as_lineno-$LINENO}: result: $prefix" >&5 $as_echo "$prefix" >&6; } fi # Check whether --with-lispdir was given. if test "${with_lispdir+set}" = set; then : withval=$with_lispdir; lispdir=${withval} fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking where lisp files should go" >&5 $as_echo_n "checking where lisp files should go... " >&6; } if test -z "$lispdir"; then 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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lispdir (it will be ignored when \"make install-package[-ja]\" is done)" >&5 $as_echo "$lispdir (it will be ignored when \"make install-package[-ja]\" is done)" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lispdir" >&5 $as_echo "$lispdir" >&6; } fi if test ${EMACS_FLAVOR} = xemacs; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking where the XEmacs package is" >&5 $as_echo_n "checking where the XEmacs package is... " >&6; } # Check whether --with-packagedir was given. if test "${with_packagedir+set}" = set; then : withval=$with_packagedir; if test "$withval" != yes -a -n "$withval"; then PACKAGEDIR=$withval else elisp="(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 \"\"))" if test -z ""noecho""; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PACKAGEDIR" >&5 $as_echo_n "checking for PACKAGEDIR... " >&6; } fi if ${EMACS_cv_SYS_PACKAGEDIR+:} false; then : $as_echo_n "(cached) " >&6 else OUTPUT=./conftest-$$ echo ${EMACS}' -batch -eval '\''(let ((x '${elisp}')) (write-region (if (stringp x) (princ x) (prin1-to-string x)) nil "'${OUTPUT}'" nil 5))'\' >& 5 2>&1 eval ${EMACS}' -batch -eval '\''(let ((x '${elisp}')) (write-region (if (stringp x) (princ x) (prin1-to-string x)) nil "'${OUTPUT}'" nil 5))'\' >& 5 2>&1 retval=`cat ${OUTPUT}` echo "=> ${retval}" >& 5 2>&1 rm -f ${OUTPUT} EMACS_cv_SYS_PACKAGEDIR=$retval fi PACKAGEDIR=${EMACS_cv_SYS_PACKAGEDIR} if test -z ""noecho""; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PACKAGEDIR" >&5 $as_echo "$PACKAGEDIR" >&6; } fi fi else elisp="(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 \"\"))" if test -z ""noecho""; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PACKAGEDIR" >&5 $as_echo_n "checking for PACKAGEDIR... " >&6; } fi if ${EMACS_cv_SYS_PACKAGEDIR+:} false; then : $as_echo_n "(cached) " >&6 else OUTPUT=./conftest-$$ echo ${EMACS}' -batch -eval '\''(let ((x '${elisp}')) (write-region (if (stringp x) (princ x) (prin1-to-string x)) nil "'${OUTPUT}'" nil 5))'\' >& 5 2>&1 eval ${EMACS}' -batch -eval '\''(let ((x '${elisp}')) (write-region (if (stringp x) (princ x) (prin1-to-string x)) nil "'${OUTPUT}'" nil 5))'\' >& 5 2>&1 retval=`cat ${OUTPUT}` echo "=> ${retval}" >& 5 2>&1 rm -f ${OUTPUT} EMACS_cv_SYS_PACKAGEDIR=$retval fi PACKAGEDIR=${EMACS_cv_SYS_PACKAGEDIR} if test -z ""noecho""; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PACKAGEDIR" >&5 $as_echo "$PACKAGEDIR" >&6; } fi fi if test -z "$PACKAGEDIR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 $as_echo "not found" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PACKAGEDIR" >&5 $as_echo "$PACKAGEDIR" >&6; } fi else PACKAGEDIR= fi if test ${EMACS_FLAVOR} = xemacs; then XEMACS_TRUE= XEMACS_FALSE='#' else XEMACS_TRUE='#' XEMACS_FALSE= fi ac_config_files="$ac_config_files Makefile lisp/Makefile lisp/riece-package-info.el lisp/test/Makefile doc/Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes: double-quote # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then if test "x$cache_file" != "x/dev/null"; then { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else case $cache_file in #( */* | ?:*) mv -f confcache "$cache_file"$$ && mv -f "$cache_file"$$ "$cache_file" ;; #( *) mv -f confcache "$cache_file" ;; esac fi fi else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' # Transform confdefs.h into DEFS. # Protect against shell expansion while executing Makefile rules. # Protect against Makefile macro expansion. # # If the first sed substitution is executed (which looks for macros that # take arguments), then branch to the quote section. Otherwise, # look for a macro that doesn't take arguments. ac_script=' :mline /\\$/{ N s,\\\n,, b mline } t clear :clear s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g t quote s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g t quote b any :quote s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g s/\[/\\&/g s/\]/\\&/g s/\$/$$/g H :any ${ g s/^\n// s/\n/ /g p } ' DEFS=`sed -n "$ac_script" confdefs.h` ac_libobjs= ac_ltlibobjs= U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs if test -z "${XEMACS_TRUE}" && test -z "${XEMACS_FALSE}"; then as_fn_error $? "conditional \"XEMACS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in #( -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 ## ----------------------------------- ## ## Main body of $CONFIG_STATUS script. ## ## ----------------------------------- ## _ASEOF test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by riece $as_me 9.0.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE Configuration files: $config_files Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ riece config.status 9.0.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" Copyright (C) 2010 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' MKDIR_P='$MKDIR_P' AWK='$AWK' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; --*=) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg= ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --he | --h | --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX $as_echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "lisp/Makefile") CONFIG_FILES="$CONFIG_FILES lisp/Makefile" ;; "lisp/riece-package-info.el") CONFIG_FILES="$CONFIG_FILES lisp/riece-package-info.el" ;; "lisp/test/Makefile") CONFIG_FILES="$CONFIG_FILES lisp/test/Makefile" ;; "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= ac_tmp= trap 'exit_status=$? : "${ac_tmp:=$tmp}" { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=`echo X | tr X '\015'` # On cygwin, bash can eat \r inside `` if the user requested igncr. # But we know of no other shell where ac_cr would be empty at this # point, so we can use a bashism as a fallback. if test "x$ac_cr" = x; then eval ac_cr=\$\'\\r\' fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF # VPATH may cause trouble with some makes, so we remove sole $(srcdir), # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ h s/// s/^/:/ s/[ ]*$/:/ s/:\$(srcdir):/:/g s/:\${srcdir}:/:/g s/:@srcdir@:/:/g s/^:*// s/:*$// x s/\(=[ ]*\).*/\1/ G s/\n// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" eval set X " :F $CONFIG_FILES " shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$ac_tmp/stdin" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac ac_MKDIR_P=$MKDIR_P case $MKDIR_P in [\\/$]* | ?:[\\/]* ) ;; */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" case $ac_file in -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; esac \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac done # for ac_tag as_fn_exit 0 _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi riece-9.0.0/README.ja0000644000076400007640000000272511377612201011017 00000000000000* これは何か? Riece は Emacs 向け IRC クライアントです。 Riece には以下に挙げる特長があります: - 複数の IRC サーバに同時に接続可能 - アドオンにより拡張機能の追加や取り外しが可能 - 他の elisp パッケージに依存しないため、インストールが簡単 - 設定が簡単で、前回起動時の設定を記録・復元する仕組みを提供 - 段階的な操作説明書 (info 形式) が附属 - 最新の IRC のクライアントプロトコル (RFC2812) に準拠 * ディレクトリ構成 このパッケージは以下のディレクトリから成ります: lisp/ - Emacs Lisp のファイル doc/ - 文書ファイル * 必要なもの - Emacs 20.7 以降、または XEmacs 21.4 以降 - Ruby 1.8 以降 (任意) * インストール $ ./configure $ sudo make install ~/.emacs 等に以下の一行を追加してください。 (autoload 'riece "riece" "Start Riece" t) XEmacs で使う場合には "--with-xemacs" オプションを configure スクリプ トに与えてください。また、"make install" の代わりに "make install-package" とすることでXEmacs のパッケージとしてインストールする ことができます。 * マニュアル 使い方は同梱のマニュアルに記載されています。 マニュアルを読むには "M-x info" で以下のメニューを選択します。 * Riece-ja: (riece-ja). An IRC client for Emacsen riece-9.0.0/INSTALL0000644000076400007640000003660011761025271010600 00000000000000Installation Instructions ************************* Copyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. This file is offered as-is, without warranty of any kind. Basic Installation ================== Briefly, the shell commands `./configure; make; make install' should configure, build, and install this package. The following more-detailed instructions are generic; see the `README' file for instructions specific to this package. Some packages provide this `INSTALL' file but do not implement all of the features documented below. The lack of an optional feature in a given package is not necessarily a bug. More recommendations for GNU packages can be found in *note Makefile Conventions: (standards)Makefile Conventions. The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses those values to create a `Makefile' in each directory of the package. It may also create one or more `.h' files containing system-dependent definitions. Finally, it creates a shell script `config.status' that you can run in the future to recreate the current configuration, and a file `config.log' containing compiler output (useful mainly for debugging `configure'). It can also use an optional file (typically called `config.cache' and enabled with `--cache-file=config.cache' or simply `-C') that saves the results of its tests to speed up reconfiguring. Caching is disabled by default to prevent problems with accidental use of stale cache files. If you need to do unusual things to compile the package, please try to figure out how `configure' could check whether to do them, and mail diffs or instructions to the address given in the `README' so they can be considered for the next release. If you are using the cache, and at some point `config.cache' contains results you don't want to keep, you may remove or edit it. The file `configure.ac' (or `configure.in') is used to create `configure' by a program called `autoconf'. You need `configure.ac' if you want to change it or regenerate `configure' using a newer version of `autoconf'. The simplest way to compile this package is: 1. `cd' to the directory containing the package's source code and type `./configure' to configure the package for your system. Running `configure' might take a while. While running, it prints some messages telling which features it is checking for. 2. Type `make' to compile the package. 3. Optionally, type `make check' to run any self-tests that come with the package, generally using the just-built uninstalled binaries. 4. Type `make install' to install the programs and any data files and documentation. When installing into a prefix owned by root, it is recommended that the package be configured and built as a regular user, and only the `make install' phase executed with root privileges. 5. Optionally, type `make installcheck' to repeat any self-tests, but this time using the binaries in their final installed location. This target does not install anything. Running this target as a regular user, particularly if the prior `make install' required root privileges, verifies that the installation completed correctly. 6. You can remove the program binaries and object files from the source code directory by typing `make clean'. To also remove the files that `configure' created (so you can compile the package for a different kind of computer), type `make distclean'. There is also a `make maintainer-clean' target, but that is intended mainly for the package's developers. If you use it, you may have to get all sorts of other programs in order to regenerate files that came with the distribution. 7. Often, you can also type `make uninstall' to remove the installed files again. In practice, not all packages have tested that uninstallation works correctly, even though it is required by the GNU Coding Standards. 8. Some packages, particularly those that use Automake, provide `make distcheck', which can by used by developers to test that all other targets like `make install' and `make uninstall' work correctly. This target is generally not run by end users. Compilers and Options ===================== Some systems require unusual options for compilation or linking that the `configure' script does not know about. Run `./configure --help' for details on some of the pertinent environment variables. You can give `configure' initial values for configuration parameters by setting variables in the command line or in the environment. Here is an example: ./configure CC=c99 CFLAGS=-g LIBS=-lposix *Note Defining Variables::, for more details. Compiling For Multiple Architectures ==================================== You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their own directory. To do this, you can use GNU `make'. `cd' to the directory where you want the object files and executables to go and run the `configure' script. `configure' automatically checks for the source code in the directory that `configure' is in and in `..'. This is known as a "VPATH" build. With a non-GNU `make', it is safer to compile the package for one architecture at a time in the source code directory. After you have installed the package for one architecture, use `make distclean' before reconfiguring for another architecture. On MacOS X 10.5 and later systems, you can create libraries and executables that work on multiple system types--known as "fat" or "universal" binaries--by specifying multiple `-arch' options to the compiler but only a single `-arch' option to the preprocessor. Like this: ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ CPP="gcc -E" CXXCPP="g++ -E" This is not guaranteed to produce working output in all cases, you may have to build one architecture at a time and combine the results using the `lipo' tool if you have problems. Installation Names ================== By default, `make install' installs the package's commands under `/usr/local/bin', include files under `/usr/local/include', etc. You can specify an installation prefix other than `/usr/local' by giving `configure' the option `--prefix=PREFIX', where PREFIX must be an absolute file name. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you pass the option `--exec-prefix=PREFIX' to `configure', the package uses PREFIX as the prefix for installing programs and libraries. Documentation and other data files still use the regular prefix. In addition, if you use an unusual directory layout you can give options like `--bindir=DIR' to specify different values for particular kinds of files. Run `configure --help' for a list of the directories you can set and what kinds of files go in them. In general, the default for these options is expressed in terms of `${prefix}', so that specifying just `--prefix' will affect all of the other directory specifications that were not explicitly provided. The most portable way to affect installation locations is to pass the correct locations to `configure'; however, many packages provide one or both of the following shortcuts of passing variable assignments to the `make install' command line to change installation locations without having to reconfigure or recompile. The first method involves providing an override variable for each affected directory. For example, `make install prefix=/alternate/directory' will choose an alternate location for all directory configuration variables that were expressed in terms of `${prefix}'. Any directories that were specified during `configure', but not in terms of `${prefix}', must each be overridden at install time for the entire installation to be relocated. The approach of makefile variable overrides for each directory variable is required by the GNU Coding Standards, and ideally causes no recompilation. However, some platforms have known limitations with the semantics of shared libraries that end up requiring recompilation when using this method, particularly noticeable in packages that use GNU Libtool. The second method involves providing the `DESTDIR' variable. For example, `make install DESTDIR=/alternate/directory' will prepend `/alternate/directory' before all installation names. The approach of `DESTDIR' overrides is not required by the GNU Coding Standards, and does not work on platforms that have drive letters. On the other hand, it does better at avoiding recompilation issues, and works well even when some directory options were not specified in terms of `${prefix}' at `configure' time. Optional Features ================= If the package supports it, you can cause programs to be installed with an extra prefix or suffix on their names by giving `configure' the option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. Some packages pay attention to `--enable-FEATURE' options to `configure', where FEATURE indicates an optional part of the package. They may also pay attention to `--with-PACKAGE' options, where PACKAGE is something like `gnu-as' or `x' (for the X Window System). The `README' should mention any `--enable-' and `--with-' options that the package recognizes. For packages that use the X Window System, `configure' can usually find the X include and library files automatically, but if it doesn't, you can use the `configure' options `--x-includes=DIR' and `--x-libraries=DIR' to specify their locations. Some packages offer the ability to configure how verbose the execution of `make' will be. For these packages, running `./configure --enable-silent-rules' sets the default to minimal output, which can be overridden with `make V=1'; while running `./configure --disable-silent-rules' sets the default to verbose, which can be overridden with `make V=0'. Particular systems ================== On HP-UX, the default C compiler is not ANSI C compatible. If GNU CC is not installed, it is recommended to use the following options in order to use an ANSI C compiler: ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" and if that doesn't work, install pre-built binaries of GCC for HP-UX. HP-UX `make' updates targets which have the same time stamps as their prerequisites, which makes it generally unusable when shipped generated files such as `configure' are involved. Use GNU `make' instead. On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot parse its `' header file. The option `-nodtk' can be used as a workaround. If GNU CC is not installed, it is therefore recommended to try ./configure CC="cc" and if that doesn't work, try ./configure CC="cc -nodtk" On Solaris, don't put `/usr/ucb' early in your `PATH'. This directory contains several dysfunctional programs; working variants of these programs are available in `/usr/bin'. So, if you need `/usr/ucb' in your `PATH', put it _after_ `/usr/bin'. On Haiku, software installed for all users goes in `/boot/common', not `/usr/local'. It is recommended to use the following options: ./configure --prefix=/boot/common Specifying the System Type ========================== There may be some features `configure' cannot figure out automatically, but needs to determine by the type of machine the package will run on. Usually, assuming the package is built to be run on the _same_ architectures, `configure' can figure that out, but if it prints a message saying it cannot guess the machine type, give it the `--build=TYPE' option. TYPE can either be a short name for the system type, such as `sun4', or a canonical name which has the form: CPU-COMPANY-SYSTEM where SYSTEM can have one of these forms: OS KERNEL-OS See the file `config.sub' for the possible values of each field. If `config.sub' isn't included in this package, then this package doesn't need to know the machine type. If you are _building_ compiler tools for cross-compiling, you should use the option `--target=TYPE' to select the type of system they will produce code for. If you want to _use_ a cross compiler, that generates code for a platform different from the build platform, you should specify the "host" platform (i.e., that on which the generated programs will eventually be run) with `--host=TYPE'. Sharing Defaults ================ If you want to set default values for `configure' scripts to share, you can create a site shell script called `config.site' that gives default values for variables like `CC', `cache_file', and `prefix'. `configure' looks for `PREFIX/share/config.site' if it exists, then `PREFIX/etc/config.site' if it exists. Or, you can set the `CONFIG_SITE' environment variable to the location of the site script. A warning: not all `configure' scripts look for a site script. Defining Variables ================== Variables not defined in a site shell script can be set in the environment passed to `configure'. However, some packages may run configure again during the build, and the customized values of these variables may be lost. In order to avoid this problem, you should set them in the `configure' command line, using `VAR=value'. For example: ./configure CC=/usr/local2/bin/gcc causes the specified `gcc' to be used as the C compiler (unless it is overridden in the site shell script). Unfortunately, this technique does not work for `CONFIG_SHELL' due to an Autoconf bug. Until the bug is fixed you can use this workaround: CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash `configure' Invocation ====================== `configure' recognizes the following options to control how it operates. `--help' `-h' Print a summary of all of the options to `configure', and exit. `--help=short' `--help=recursive' Print a summary of the options unique to this package's `configure', and exit. The `short' variant lists options used only in the top level, while the `recursive' variant lists options also present in any nested packages. `--version' `-V' Print the version of Autoconf used to generate the `configure' script, and exit. `--cache-file=FILE' Enable the cache: use and save the results of the tests in FILE, traditionally `config.cache'. FILE defaults to `/dev/null' to disable caching. `--config-cache' `-C' Alias for `--cache-file=config.cache'. `--quiet' `--silent' `-q' Do not print messages saying which checks are being made. To suppress all normal output, redirect it to `/dev/null' (any error messages will still be shown). `--srcdir=DIR' Look for the package's source code in directory DIR. Usually `configure' can determine that directory automatically. `--prefix=DIR' Use DIR as the installation prefix. *note Installation Names:: for more details, including other options available for fine-tuning the installation locations. `--no-create' `-n' Run the configure checks, but stop before creating any output files. `configure' also accepts some other, not widely useful, options. Run `configure --help' for more details. riece-9.0.0/NEWS.ja0000664000076400007640000006261511761025203010641 00000000000000* Riece 9.0.0 の主な変更点 ** チャンネルを並べ直すコマンドを追加 (ueno) riece-command-reorder-channels の説明を参照 ** チャンネル参加時に複数のチャンネルを補完するようにした (ueno) * Riece 8.0.0 の主な変更点 ** riece-url の URL 正規表現を拡張 (ueno) ** lexical binding の使用 (ueno) ** doc/ptexinfmt.el の更新 (kaoru) * Riece 7.0.3 の主な変更点 ** チャンネルバッファにカーソルがある状態でのフリーズ動作の修正 (ueno) riece-shrink-buffer にバグがあり、フリーズ状態のチャンネルバッファで カーソルが先頭か末尾に移動することがあったのを修正 ** ソースツリー外でのビルドの修正 (kaoru, ueno) いくつかの場所で srcdir を適切にわたしていなかったのを修正 ** Emacs 24 のために旧スタイルのバッククオートを除去 (ueno) * Riece 7.0.2 の主な変更点 ** ログ読み出し時の不具合の修正 (ueno) 保存時に coding-system が指定されなかった場合に対応 ** コントロールシーケンスの扱いを修正 (ueno) * Riece 7.0.1 の主な変更点 ** Emacs 24 でのビルドエラーの修正 (ueno) make-local-hook が定義されない場合に対応 ** Emacs 24 でのコンパイル時の警告の抑制 (kaoru) 警告 "`save-excursion' defeated by `set-buffer'" を抑制 * Riece 7.0.0 の主な変更点 ** メーリングリストのアドレスを riece-discuss@nongnu.org に変更 ** XEmacs 21.5 でのビルドを修正 (ueno) ** モードライン上での riece-channel-list-indicator の色付けの修正 (ueno) * Riece 6.1.0 の主な変更点 ** 設定の保存に Custom を使うのをやめた (ueno) ** アドオン管理用のコマンドを Command バッファでも実行できるようにした (kaoru) * Riece 6.0.0 の主な変更点 ** 新規アドオン riece-desktop-notify (bg66) ** Custom を利用した設定保存機構の修正 * Riece 5.0.0 の主な変更点 ** 設定の保存に Custom を使うようにした (ueno) ** ツールバーのアイコンに Gtk+ の標準アイコンを使うようにした (ueno) ** 接続時に RFC2812 推奨の手順にしたがうようにした (ueno) ** リアルネームの設定に非 ASCII 文字が使えるようになった (KASUGA Toru) ** riece-keywords の設定上のバグを修正 (Takeru Naito) * Riece 4.0.0 の主な変更点 ** 新規アドオン riece-twitter (ueno) ** riece-rdcc で送信元のポート番号を指定できるようにした (ueno) * Riece 3.1.2 の主な変更点 ** メッセージカタログ (ueno) * Riece 3.1.1 の主な変更点 ** riece-async を再び動作するようにした (ueno) ** riece-shrink-buffer をデフォルトで有効にした (ueno) ** 新規ウィンドウレイアウト "spiral" を追加 (URABE Shyouhei) * Riece 3.1.0 の主な変更点 ** メッセージハンドラの再入禁止にした (ueno) ** riece-ndcc.el が calc に依存しないようにした (ueno) ** 353 ハンドラのバグの修正 (ueno) * Riece 3.0.0 の主な変更点 ** 変数 riece-username の意味を変更 (ueno) この変数を設定しているユーザは、riece-realname に変数名を変更する必 要がある。 ** 切断済みのサーバを再度切断しようとした場合に、エラーになるようにし た (yoichi) ** 新規アドオン riece-epg.el を導入。GnuPG を使った安全な会話が可能 (ueno) ** ユーザを招待 (invite) する際のバグを 2 つ修正 (Steve Youngs) ** ユーザがチャンネルを離脱した場面での、再描画のバグを修正 (ueno) ** riece-alias-alternate-separator のデフォルト値を "@" に戻した (ueno) * Riece 2.0.2 の主な変更点 ** C-c l (riece-command-list) で、チャンネルのトピックの代わりに参加者 数が表示されるバグを修正 (ueno) ** ニックネームやチャンネル名の補完候補の表示で大文字小文字を保存する ようにした (ueno) ** チャンネル名とサーバ名の区切り文字列のデフォルト値を "@" から "%" に変更 (ueno) * Riece 2.0.1 の主な変更点 ** 直前に選択していたチャンネルに未読メッセージがある場合に unread マー クが表示されない不具合の修正 (ueno) ** 新規アドオン riece-xfaceb.el を導入。BBDB から X-Face/Face を検索し、 ユーザ一覧に表示する (Steve Youngs) * Riece 2.0.0 の主な変更点 ** チャンネル毎にエンコーディングを指定できるようにした (ueno) 設定例: (setq riece-channel-coding-system-alist '(("#euc-jp" . euc-jp) ("#utf-8 irc.freenode.net" . utf-8))) ** アドオンの uninstall, unload (危険) に対応。 アドオン一覧モードで riece-addons のカスタマイズが可能 (ueno) ** Ruby のプログラムを評価する機構の導入。 利用方法は riece-ruby.el 冒頭のコメントを参照 (ueno) ** 新規アドオン riece-eval-ruby.el を導入。",ruby " に続いて任意の Ruby のプログラムを発言すると、評価結果をチャンネルに送信する (ueno) ** 定期的にバッファを切り詰める機能をアドオンに分離 これまで riece-max-buffer-size を設定していた人は、 riece-shrink-buffer アドオンを有効にする必要があるので注意 (ueno) ** 離脱したチャンネルに参加していたユーザが IRC をやめた場合に、エラー が発生する不具合の修正 (ueno) ** ログの保存時に、使用した coding-system の名前をファイル名に埋め込む ようにした。これにより riece-log-coding-system を設定しなくても文字 化けが発生しにくくなった (ueno) ** C-c g でチャンネルを移動する際に、新しい発言があったチャンネルから 辿るようにした (ueno) ** チャンネル名とサーバ名の区切り文字列として " " 以外に "@" も許すよ うにした (ueno) ** 日本語マニュアル (riece-ja.texi) を初心者を対象に書き直した (ueno) ** *Others* バッファを隠せるようにした (ueno) ** デバッグ出力を専用のバッファに分離 (ueno) ** elisp ファイルを1つずつ byte-compile する make ルールを設けた。 configure 後、lisp/ 以下で make compile-individually (ueno) ** 開発者向けの文書 (doc/HACKING{,.ja}) を同梱 (ueno) * Riece 1.0.8 の主な変更点 ** riece-log のロックの緩和 (ueno) ** RPL_WHOISIDLE の秒数を日時分秒形式で表示 (ueno) ** riece-obarray を riece-channel-obarray, riece-user-obarray に分離 (kaoru) ** いくつかの個所でチャンネル名の大文字小文字が区別されるバグへの対応 (ueno) ** SXEmacs のバージョン表記に対応 (Steve Youngs) ** CTCP TIME に対応 (Steve Youngs) ** ~/.riece/addons 以下のディレクトリを読み込まないようにした (kaoru) ** riece-command-part がエラーになるバグの修正 (yoichi) ** ~/.riece/addons ディレクトリがないと起動時にエラーになるバグの修正 (ueno) * Riece 1.0.7 の主な変更点 ** 新規アドオン riece-toolbar (ueno) riece-toolbar はツールバーにアイコンを表示します。現時点では全ての アイコンが含まれているわけではありません。 ** 新規アドオン riece-keepalive (ueno) riece-keepalive は自発的にサーバに PING メッセージを送ることで IRC のコネクションを持続させます。 ** 新規アドオン riece-google (bg66) riece-google は Google での検索結果をチャンネルに送ります。 ** 新規アドオン riece-eval (bg66) riece-eval は elisp の式の評価結果をチャンネルに送ります。 ** いくつかのアドオンをデフォルトで有効化 (ueno) riece-log, riece-alias, riece-ctlseq, riece-keyword が今回からデフォ ルトで有効になります。 ** 新規コマンド riece-command-suspend-resume (ueno) riece-command-suspend-resume は現在のウィンドウ構成を保存・再現します。 ** ボタンウィジェットクリック時のカーソル移動の抑止 (ueno) ** モードラインのインジケータを face で装飾 (ueno) ** NAMES リプライに含まれるユーザ数を数えるようになりました (ueno) ** 新規ユーザオプション riece-part-message (ueno) ** riece-addon-directory 以下に置かれたアドオンを自動的に有効化 (ueno) ** riece-buffer-dispose-function のデフォルト値が今回から kill-buffer になりました (ueno) ** process-filter 内でエラーが発生した場合、backtrace を行なうようにな りました (ueno) ** 必要に応じてチャンネルキーを問い合わせるようにしました (ueno) ** バッファの自動的な切り詰めをデフォルトでは無効化 (ueno) ** riece-log のための新しいディレクトリ構成 (ueno) ** user-renamed signal-filter のバグを修正 (kaoru) ** riece-command-enable-addon と riece-command-disable-addon のバグの 修正 (yoichi) * Riece 1.0.6 の主な変更点 ** CVS 版 GNU Emacs に同梱された url パッケージの irc: スキーマ対応の バックエンドとして Riece を使用できるようにするプログラム url-riece を 同梱 (大和さん) ** "Bug#12345" のような文字列を URL にマップするオプション riece-url-regexp-alist を新設 (Liece からバックポート) (ueno) ** モードラインに自身のチャンネルオペレータの印(@, +)を表示するように した (ueno, thanks to k-to さん) ** バッファを切り詰める際に、一行ずつではなく複数行一度に削除するよう にした (riece-shrink-buffer-remove-lines オプションで設定可能) (ueno, thanks to ysjj さん) ** riece-alias-alist が上手く動いていなかった不具合の修正 (ueno) ** 1.0.4 以降、GNU Emacs で、メッセージ送信時のフロー制御が上手く動い ていなかった不具合の修正 (ueno) ** バグ報告用のコマンド riece-submit-bug-report を新設 (ueno) ** nadoka や Tiarra などの IRC proxy が、IRC サーバ実装の伝統に沿わな いメッセージを返すことへの対処 (ueno, thanks to k-to さん) ** C-c # 数字で指定した番号のチャンネルに移動できるようにした (ueno, thanks to ysjj さん) ** riece-yank で、前置引数を指定することにより、メッセージを NOTICE と して送信できるようにした (bg66) * Riece 1.0.5 の主な変更点 ** ユニットテストを追加。(ueno) ** 複数サーバ接続時に、チャンネル名とサーバ名の区切りに空白以外の文字 列を使えるようにした。(ueno) riece-alias-alternate-separator == "@" の時の変換規則は以下の通り: "#riece" -> "#riece" "#riece localhost" -> "#riece@localhost" "#ch@nnel" -> "#ch@@nnel" "#ch@nnel localhost" -> "#ch@@nnel@localhost" ** DCC が他のクライアントとの間でうまく動かない不具合の修正。(ueno) ** kill-ring から文字列を送信するアドオン riece-yank を追加。(by 大和さん) ** 英語の文書を追加。(ueno) * Riece 1.0.4 の主な変更点 ** 大量のメッセージを送る場合に、フロー制御を行うようにした。(ueno) ** 起動時に複数サーバ上のチャンネルに参加する設定で、 riece-startup-server-list の設定を省略可能にした。(ueno) ** riece-mini 使用時に過去のメッセージを閲覧する機能を設けた。(bg66) * Riece 1.0.3 の主な変更点 ** NAMES 発行時に「いないはずのユーザ」をユーザ一覧から除外するように した (Thanks to 山下さん) ** 行の折り返しを各バッファの truncate-lines の値でカスタマイズできる ようにした(Thanks to 山下さん) ** チャンネルバッファのスクロール動作を制御するオプション riece-window-center-line を追加 ** コマンドバッファでの補完の不具合を修正 (Thanks to 山下さん) ** 一対一の会話で、相手が quit した場合、チャンネル一覧から除外するよ うにした (Thanks to 森本さん) ** デフォルトの IRC サーバへの接続時にエラーが出た場合には、即座に終了 するようにした(Thanks to k-to さん) * Riece 1.0.2 の主な変更点 ** riece-url 使用時にメニューバーのメニューが破壊される不具合の修正 ** Jabber 対応に向け、プロトコルインターフェースを分けた ** その他、雑多な修正 * Riece 1.0.1 の主な変更点 ** XEmacs で、モードラインに表示されるチャンネルの背景色をモードライン の色にあわせた ** チャンネルのモード変更時に、モード指定の先頭に ":" を付けて送ってい た不具合の修正 (Thanks to やまださん) ** チャンネルミスを防ぐアドオン riece-foolproof を追加 (by 高橋さん) ** チャンネルバッファのモードラインに表示される要素の順番を変更 (by 高橋さん) ** NOTICE で発言した時の表示を変更 (by 高橋さん) ** 再起動時にシグナル関数を二重に登録していた不具合の修正 ** C-c Home でチャンネルバッファの先頭にカーソルを移動するコマンドを追加 ** フリーズ状態のチャンネルでは、チャンネルを移動してもチャンネルバッ ファのカーソル位置を保つようにした ** CVS 版の Emacs で、引数なしの current-word が nil を返すようになったため、 riece-command-complete-user がエラーになる不具合の修正 (by 中山さん) ** riece-hangman の乱数発生ロジックの修正 (by 高橋さん) ** 空行の上で、C-c p でメッセージを送ろうとした場合、エラーを通知する ようにした ** riece-ignore 使用時に、設定ファイルで無視するユーザを指定できるよう、 オプション riece-startup-ignored-user-list を新設 ** riece-rdcc 使用時に、ファイル名に空白が入ったファイルを送受信できる ようにした * Riece 1.0.0 の主な変更点 ** アドオンの一覧表示モードを追加し、実行時にアドオンを有効化・無効化 できるようにした (C-c ^) ** GNU Emacs で、パスワード入力中に Quit (C-g) できない不具合の修正 ** チャンネル内で hangman(6) で遊ぶアドオン riece-hangman を追加 ** プロセスが一つもない場合に C-c q した場合のメッセージを変更 ** ユーザを無視するアドオン riece-ignore を追加 ** 9 文字以上のニックネームも受け付けるようにした ** 再起動した際に、アドオンを二重に組み込まないようにした ** 他のバッファにいる時に発言があるとモードラインに印 ("[R]") を表示す るアドオン riece-biff を追加 (by 大橋さん) ** 日本語の通らない端末で、日本語をローマ字で表示するアドオン riece-kakasi を追加 ** コマンドプロンプトにアクションを示す文字列を追加 (suggested by 山下さん) * Riece 0.2.2 の主な変更点 ** ^B, ^V, ^_ などのコントロールシーケンスによる文字列の強調に対応 (riece-ctlseq アドオンを追加) ** プリブが未読扱いされない不具合の修正 ** チャンネルバッファ、*Others* バッファを独立に freeze できるようにし た。(各バッファで C-t C-f でトグル) ** riece-log で、ログの保存先ディレクトリを canonicalize したチャンネ ル名から求めるようにした。(by 大橋さん) * Riece 0.2.0 の主な変更点 ** Qt や GTK+ と同様のシグナルを導入し、部分的に再描画するようにした。 ** C-c C-n で、チャンネルバッファにも名前の一覧を表示するようにした。 ** riece-lsdb 使用時の不具合の修正 (by 中山さん) * Riece 0.1.8 の主な変更点 ** LSDB と連携するアドオン riece-lsdb を追加 ** ユーザ一覧に X-Face を表示するアドオン riece-xface を追加 (要 LSDB). スクリーンショット: http://wiliki.designflaw.org/riece-xface.png ** チャンネル名の大文字小文字が区別されてしまうバグを修正 ** IRC proxy に他のクライアントと一緒に接続している場合でも,自分の発 言をきちんと扱うようにした (by 高橋さん) * Riece 0.1.7 の主な変更点 ** Emacs が busy or suspend 状態になることに備え、 PING に応答する local proxy 経由で IRC サーバに接続するアドオン riece-async を追加 ** riece-away-message が指定された場合に AWAY 状態のトグルに失敗するバ グを修正 (Thanks to 藤村さん) ** GNU Emacs で、ロード時に standard-syntax-table を変更してしまうバグを修正 (Thanks to Hori さん) ** riece-startup-channel-list に加え、riece-startup-server-list を指定 することで、起動時に複数のサーバ上のチャンネルに参加できるようにした ** riece-log 使用時にログファイルの coding system を指定するオプション riece-log-coding-system を追加 ** riece-keyword 使用時に指定したキーワードの発言があった時に呼ばれる riece-keyword-notify-functions を追加。既存の riece-notify-keyword-functions(なんて紛らわしい名前!) の代わりにこちら を使用してください ** riece-log 使用時に riece-log-flashback がハイライトやボタンも復元す るようにした ** riece-{unread,mini} を NOTICE や CTCP ACTION には反応しないようにした * Riece 0.1.6 の主な変更点 ** Emacs 20.7 でうまく動作しない不具合の修正。 ** XEmacs 21.1 でコンパイルに失敗する不具合の修正(動作は無保証)。 ** riece-rdcc で、巨大なファイルを受信してもメモリを食わないようにした。 ** riece-gather-channel-modes == t の場合、チャンネル参加時にチャンネ ルのモードを調べるようにした。 ** チャンネルバッファのサイズを切り詰めるタイミングを修正。 ** チャンネル移動時に、バッファが自動的にスクロールしない不具合の修正。 ** riece-log で、riece-log-directory-map にサーバ名付きのチャンネルを 指定できるようにした。(by 大橋さん) * Riece 0.1.5 の主な変更点 ** デフォルトで利用可能なウィンドウレイアウトに、 {top,middle,bottom}-{left,right} を追加。 ** 選択中のウィンドウレイアウトを保存するようにした。 ** アイコンを表示するアドオン (riece-icon) を追加。 ([http://wiliki.designflaw.org/riecess1.png スクリーンショット]) ** ユーザリストの再描画の高速化。 ** CTCP ACTION の改良。(Thanks to knu さん) ** riece-rdcc を使って DCC のファイル転送を始める際に、たまに固まるバグを修正。 ** 既に Riece が起動した状態でもう一度起動した場合、エラーを通知するの ではなく、riece-command-configure-windows を呼ぶようにした (Thanks to 大橋さん) ** C-c o (riece-command-set-operators) と C-c v (riece-command-set-speakers) で、3 人以上のユーザを対象にした場合のバ グを修正。 ** バッファのサイズが riece-max-buffer-size を越えた場合、自動的に切り 詰めるようにした。 * Riece 0.1.4 の主な変更点 ** チャンネルバッファで riece-command-names のキーバインドを C-n から N に変更。(thanks to 高橋さん) ** C-c C-t a (riece-command-toggle-away) がエラーになるバグを修正。 (thanks to 前田さん) ** Riece のバッファを選択していない時には、再描画を行わないようにした。 ** 同名のバッファが Riece 以外のプログラムに使われている時、 generate-new-buffer で新しいバッファを作成して利用するようにした。 ** ! で初まるチャンネルを作成できないバグを修正。 ** riece-keyword 使用時に、自分の発言に含まれるキーワードに反応しない ようにした。 ** ひとつもチャンネルに入っていない時、チャンネル内でのみ有効なコマン ドを実行するとエラーを出すようにした。 ** メニューバーにメニューを追加するアドオン (riece-menu) を新設。 * Riece 0.1.3 の主な変更点 ** PRIVMSG や NOTICE の受信時に,チャンネル名の大文字小文字を区別しな いようにした。 ** riece-history 使用時に,ヒストリの先頭にあるチャンネルに "+" マーク をつけるようにした。 ** ボタンとポップアップメニューを表示するアドオン (riece-button) を追加。 ** キーワードを検出するアドオン (riece-keyword) を追加。 XEmacs をお使いなら,以下の設定を ~/.riece/init.el に加えることで, "ほげ" や "ふが" に反応して音を鳴らすことができます. (load-default-sounds) (setq riece-keywords '("ほげ" "ふが")) (add-hook 'riece-notify-keyword-functions (lambda (keyword) (play-sound 'cuckoo))) * Riece 0.1.2 の主な変更点 ** パスワード付きのチャンネルに JOIN できないバグを修正 ** riece-startup-channel-list を復活 ** riece-rdcc-save-directory を新設 ** パスワード入力を中断できないバグを修正 ** INVITE ハンドラのバグを修正 ** INVITE された後に JOIN する場合、デフォルトのチャンネル名を使うようにした。 ** JOIN のタイミングにより riece-channel-list-indicator が更新されない バグを修正 * Riece 0.1.1 の主な変更点 ** いくつかのアドオンをデフォルトで読み込むようにした ** riece-default-channel-binding が効かないバグを治した ** *Channels* バッファで、現在いるチャンネル名の頭にマーク "*" を付ける ようにした ** riece-debug == nil の場合、切断時のメッセージを簡略化した ** チャンネル移動の履歴を管理するアドオン riece-history を追加 ** 移動先のチャンネルを推測するアドオン riece-guess を追加 Tips: ~/.riece/init.el に以下のように指定すると、 (setq riece-guess-channel-try-functions '(riece-guess-channel-from-unread riece-guess-channel-from-history)) C-c g で以下の順序で移動できます。 # 未読のメッセージのあるチャンネル # 最近訪れたチャンネル # それ以外 * Riece 0.1.0 の主な変更点 ** チャンネルの内部表現を文字列からベクターによる表現に変更した ** プロセス管理をまともにした *** プロセス名でサーバを識別するように変更した *** 接続・切断の処理を riece-server.el にまとめた *** QUIT を投げても応答がない場合、強制的に切断するようにした ** M-x doctor と連携するアドオンを追加 ** 発言に SKK の変換中の印▽が混ざらないようにするアドオンを追加 (by 高橋さん) ** ウィンドウレイアウトを変更できるようにした (C-c t l) ** Liece の "top" スタイルに似たウィンドウレイアウトを追加 (by 高橋さん) * Riece 0.0.4 の主な変更点 ** ミニバッファだけで IRC するアドオン riece-mini を追加 (by 大橋さん) ** ログ収集アドオン riece-log を追加 (by 大橋さん) ** riece-command-next-channel (C-c >), riece-command-previous-channel (C-c <) でチャンネルをぐるぐる移動できるようにした (by 中山さん) ** riece-unread アドオン使用時に発言のあったチャンネルに C-c C-u で移 動できるようにした (by 大橋さん) ** IRC メッセージに従ってインジケータを更新するようにした ** ptexinfmt.el を APEL free なものに置き換えた (Thanks to 山岡さん) * Riece 0.0.3 の主な変更点 ** パスワードが必要なサーバに二つ以上接続できないバグの修正 (Thanks to 中山さん) ** ニックの大文字小文字だけを変更すると一貫性が失われる問題を修正 ** ハンドラフックで発生したエラーを捕捉 ** DCC によるファイル転送に対応 (riece-ndcc.el, riece-rdcc.el) ** 発言のあったチャンネルに "!" マークをつけるアドオンの追加 (riece-unread.el) ** 日本語のマニュアルの追加 * Riece 0.0.2 の主な変更点 ** APEL の関数 (pop, push) の退治 ** "depcomp" が同梱されない問題の修正 (autoreconf のバグ?) ** Windows 環境でビルドできない不具合の修正 (Thanks to 大橋さん) ** ニック変更時に一貫性が失われる問題の修正 ** C-c C-t u (M-x riece-command-toggle-user-list-mode) の不具合の修正 ** アドオンの導入 ** CTCP に部分的に対応 (VERSION と PING のみ) ** font-lock モジュール (riece-highlight) のアドオン化 ** URL 収集機能のアドオン化 * Riece 0.0.1 の主な変更点 ** 最初のリリース * For details of changes, see the file ChangeLog. Local variables: mode: text mode: outline paragraph-separate: "[ ]*$" coding: utf-8 end: riece-9.0.0/configure.ac0000664000076400007640000000052211761024535012033 00000000000000AC_INIT([riece], [9.0.0], [riece-discuss@nongnu.org]) AC_CONFIG_SRCDIR([configure.ac]) AC_PREREQ(2.63) AM_INIT_AUTOMAKE AC_CHECK_EMACS AC_PATH_LISPDIR AC_PATH_PACKAGEDIR AM_CONDITIONAL(XEMACS, test ${EMACS_FLAVOR} = xemacs) AC_CONFIG_FILES([Makefile lisp/Makefile lisp/riece-package-info.el lisp/test/Makefile doc/Makefile]) AC_OUTPUT riece-9.0.0/AUTHORS0000644000076400007640000000175611377612201010621 00000000000000Copyright (C) 1998-2009 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)riece-9.0.0/COPYING0000644000076400007640000010451311377620461010606 00000000000000 GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU General Public 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. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: Copyright (C) This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see . The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read . riece-9.0.0/lisp/0000775000076400007640000000000011761025307010573 500000000000000riece-9.0.0/lisp/riece-menu.el0000644000076400007640000001257211546264442013101 00000000000000;;; riece-menu.el --- setup menus -*- lexical-binding: t -*- ;; 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) (require 'riece-mcat) (defcustom riece-menu-items (list "Riece" (vector (riece-mcat "Next Channel") 'riece-command-next-channel 'riece-current-channels) (vector (riece-mcat "Previous Channel") 'riece-command-previous-channel 'riece-current-channels) "----" (list (riece-mcat "Channels") :filter 'riece-menu-create-channels-menu) (list (riece-mcat "Servers") :filter 'riece-menu-create-servers-menu) "----" (vector (riece-mcat "Redraw Layout") 'riece-command-configure-windows t) (list (riece-mcat "Change Window Layout...") :filter 'riece-menu-create-layouts-menu) (list (riece-mcat "Toggle...") (vector (riece-mcat "Freeze Channel Buffer") 'riece-command-toggle-freeze t) (vector (riece-mcat "Freeze Channel Buffer Until Next Message") 'riece-command-toggle-own-freeze t) (vector (riece-mcat "Display Channel Buffer") 'riece-command-toggle-channel-buffer-mode t) (vector (riece-mcat "Display Channel List Buffer") 'riece-command-toggle-channel-list-buffer-mode t) (vector (riece-mcat "Display User List Buffer") 'riece-command-toggle-user-list-buffer-mode t)) "----" (vector (riece-mcat "Join Channel") 'riece-command-join t) (vector (riece-mcat "Part Channel") 'riece-command-part 'riece-current-channel) (vector (riece-mcat "Set Channel Topic") 'riece-command-topic 'riece-current-channel) (vector (riece-mcat "Kick User") 'riece-command-kick 'riece-current-channel) (vector (riece-mcat "Invite User") 'riece-command-invite 'riece-current-channel) "----" (vector (riece-mcat "Manage Add-ons") 'riece-command-list-addons t) (vector (riece-mcat "Version") 'riece-version t) (vector (riece-mcat "Submit Bug Report") 'riece-submit-bug-report t) "----" (vector (riece-mcat "Mark As Away") 'riece-command-toggle-away t) (vector (riece-mcat "Change Nickname") 'riece-command-change-nickname t) (vector (riece-mcat "Quit IRC") 'riece-command-quit t)) "Menu used in command mode." :type 'sexp :group 'riece-options) (defconst riece-menu-description "Setup Riece's command menus.") (defun riece-menu-create-layouts-menu (_menu) (mapcar (lambda (entry) (vector (car entry) (list 'riece-command-change-layout (car entry)) t)) riece-layout-alist)) (defun riece-menu-create-channels-menu (_menu) (delq nil (mapcar (lambda (channel) (if channel (list (riece-format-identity channel) (vector (riece-mcat "Switch To Channel") (list 'riece-command-switch-to-channel channel) t) (vector (riece-mcat "Part Channel") (list 'riece-command-part channel) t) (vector (riece-mcat "List Channel") (list 'riece-command-list (riece-identity-prefix channel)) t)))) riece-current-channels))) (defun riece-menu-create-servers-menu (_menu) (mapcar (lambda (entry) (list (car entry) (vector (riece-mcat "Open Server") (list 'riece-command-open-server (car entry)) (not (riece-server-opened (car entry)))) (vector (riece-mcat "Close Server") (list 'riece-command-close-server (car entry)) (riece-server-opened (car entry))))) riece-server-alist)) (defvar riece-command-mode-map) (defvar riece-menu) (defun riece-menu-command-mode-hook () (easy-menu-define riece-menu riece-command-mode-map "Riece Menu" riece-menu-items) (easy-menu-add riece-menu)) (defun riece-menu-requires () (if (memq 'riece-mcat riece-addons) '(riece-mcat))) (defun riece-menu-insinuate () (if (fboundp 'custom-reevaluate-setting) (custom-reevaluate-setting 'riece-menu-items) ;; We could emulate custom-reevaluate-setting by manually eval the ;; 'standard-value property of 'riece-menu-items. In that case ;; (i.e. XEmacs 21.4), however, there is no way to render ;; non-ASCII labels in the menu, so give up here. ) (if riece-command-buffer (with-current-buffer riece-command-buffer (riece-menu-command-mode-hook))) (add-hook 'riece-command-mode-hook 'riece-menu-command-mode-hook)) (defun riece-menu-uninstall () (if riece-command-buffer (with-current-buffer riece-command-buffer (easy-menu-remove riece-menu))) (remove-hook 'riece-command-mode-hook 'riece-menu-command-mode-hook)) (provide 'riece-menu) ;;; riece-menu.el ends here riece-9.0.0/lisp/riece-button.el0000644000076400007640000002472011546263732013447 00000000000000;;; riece-button.el --- display useful buttons in IRC buffers -*- lexical-binding: t -*- ;; 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 (with-current-buffer (riece-event-buffer event) (goto-char (riece-event-point event)) (widget-button-click event)) ;; riece-button-switch-to-identity changes window-configuration ;; so we must select the last selected window by _buffer_. (if (setq window (get-buffer-window buffer)) (progn (select-window window) (set-window-point window point)) (if riece-debug (riece-debug (format "buffer %s not visible" (buffer-name buffer)))))))) (defun riece-identity-button-popup-menu (event) "Popup the menu for identity buttons." (interactive "e") (with-current-buffer (riece-event-buffer event) (goto-char (riece-event-point event)) (riece-popup-menu-popup (if (riece-channel-p (riece-identity-prefix (get-text-property (point) 'riece-identity))) riece-channel-button-popup-menu riece-user-button-popup-menu) event))) (defun riece-channel-button-switch-to-channel () (interactive) (riece-command-switch-to-channel (get-text-property (point) 'riece-identity))) (defun riece-channel-button-part () (interactive) (riece-command-part (get-text-property (point) 'riece-identity))) (defun riece-channel-button-list () (interactive) (riece-command-list (riece-identity-prefix (get-text-property (point) 'riece-identity)))) (defun riece-user-button-join-partner () (interactive) (riece-command-join-partner (get-text-property (point) 'riece-identity))) (defun riece-user-button-set-operators () (interactive) (let (group users) (if (riece-region-active-p) (save-excursion (riece-scan-property-region 'riece-identity (region-beginning) (region-end) (lambda (start _end) (setq group (cons (get-text-property start 'riece-identity) group))))) (setq group (list (get-text-property (point) 'riece-identity)))) (setq users (riece-with-server-buffer (riece-identity-server riece-current-channel) (riece-channel-get-users (riece-identity-prefix riece-current-channel)))) (if (setq group (delq nil (mapcar (lambda (identity) (unless (memq ?o (cdr (riece-identity-assoc (riece-identity-prefix identity) users t))) identity)) group))) (riece-command-set-operators (mapcar #'riece-identity-prefix group))))) (defun riece-user-button-set-speakers () (interactive) (let (group users) (if (riece-region-active-p) (save-excursion (riece-scan-property-region 'riece-identity (region-beginning) (region-end) (lambda (start _end) (setq group (cons (get-text-property start 'riece-identity) group))))) (setq group (list (get-text-property (point) 'riece-identity)))) (setq users (riece-with-server-buffer (riece-identity-server riece-current-channel) (riece-channel-get-users (riece-identity-prefix riece-current-channel)))) (if (setq group (delq nil (mapcar (lambda (identity) (unless (memq ?v (cdr (riece-identity-assoc (riece-identity-prefix identity) users t))) identity)) group))) (riece-command-set-speakers (mapcar #'riece-identity-prefix group))))) (defun riece-user-button-finger () (interactive) (riece-command-finger (get-text-property (point) 'riece-identity))) (defun riece-make-identity-button-map () (let ((map (make-sparse-keymap))) (set-keymap-parent map (current-local-map)) (define-key map [down-mouse-2] 'riece-identity-button-click) (define-key map [down-mouse-3] 'riece-identity-button-popup-menu) map)) (defvar riece-identity-button-map) (defun riece-button-add-identity-button (start end) (if (get 'riece-button 'riece-addon-enabled) (riece-scan-property-region 'riece-identity start end (lambda (start end) (let ((inhibit-read-only t) buffer-read-only) (widget-convert-button 'riece-identity-button start end (get-text-property start 'riece-identity)) (add-text-properties start end (list 'local-map riece-identity-button-map 'keymap riece-identity-button-map))))))) (defun riece-button-update-buffer () (riece-button-add-identity-button (point-min) (point-max))) (defvar riece-channel-list-mode-map) (defvar riece-user-list-mode-map) (defvar riece-dialogue-mode-map) (defun riece-button-channel-list-mode-hook () (set-keymap-parent riece-channel-list-mode-map widget-keymap) (set (make-local-variable 'riece-identity-button-map) (riece-make-identity-button-map)) (add-hook 'riece-update-buffer-functions 'riece-button-update-buffer t t)) (defun riece-button-user-list-mode-hook () (set-keymap-parent riece-user-list-mode-map widget-keymap) (set (make-local-variable 'riece-identity-button-map) (riece-make-identity-button-map)) (add-hook 'riece-update-buffer-functions 'riece-button-update-buffer t t)) (defun riece-button-dialogue-mode-hook () (set-keymap-parent riece-dialogue-mode-map widget-keymap) (set (make-local-variable 'riece-identity-button-map) (riece-make-identity-button-map))) (defun riece-button-insinuate () (save-excursion (when riece-channel-list-buffer (set-buffer riece-channel-list-buffer) (riece-button-channel-list-mode-hook)) (when riece-user-list-buffer (set-buffer riece-user-list-buffer) (riece-button-user-list-mode-hook)) (let ((buffers riece-buffer-list)) (while buffers (set-buffer (car buffers)) (if (riece-derived-mode-p 'riece-dialogue-mode) (riece-button-dialogue-mode-hook)) (setq buffers (cdr buffers))))) (add-hook 'riece-channel-list-mode-hook 'riece-button-channel-list-mode-hook) (add-hook 'riece-user-list-mode-hook 'riece-button-user-list-mode-hook) (add-hook 'riece-dialogue-mode-hook 'riece-button-dialogue-mode-hook) (add-hook 'riece-after-insert-functions 'riece-button-add-identity-button)) (defun riece-button-uninstall () (let ((buffers riece-buffer-list)) (save-excursion (while buffers (set-buffer (car buffers)) (remove-hook 'riece-update-buffer-functions 'riece-button-update-buffer t) (if (local-variable-p 'riece-identity-button-map (car buffers)) (kill-local-variable 'riece-identity-button-map)) (setq buffers (cdr buffers))))) (remove-hook 'riece-channel-list-mode-hook 'riece-button-channel-list-mode-hook) (remove-hook 'riece-user-list-mode-hook 'riece-button-user-list-mode-hook) (remove-hook 'riece-dialogue-mode-hook 'riece-button-dialogue-mode-hook) (remove-hook 'riece-after-insert-functions 'riece-button-add-identity-button)) (defun riece-button-enable () (let ((pointer riece-buffer-list)) (while pointer (with-current-buffer (car pointer) (if (riece-derived-mode-p 'riece-dialogue-mode) (riece-button-update-buffer))) (setq pointer (cdr pointer))) (if riece-current-channel (riece-emit-signal 'user-list-changed riece-current-channel)) (riece-emit-signal 'channel-list-changed))) (defun riece-button-disable () (save-excursion (let ((pointer riece-buffer-list)) (while pointer ;; On XEmacs, BUFFER arg of widget-map-buttons is ignored. (set-buffer (car pointer)) (widget-map-buttons (lambda (widget _maparg) (widget-leave-text widget))) (setq pointer (cdr pointer)))))) (provide 'riece-button) ;;; riece-button.el ends here riece-9.0.0/lisp/riece-doctor.el0000644000076400007640000001021411546262045013413 00000000000000;;; riece-doctor.el --- pretend to be a psychotherapist -*- lexical-binding: t -*- ;; 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)) (with-current-buffer (get-buffer-create (riece-doctor-buffer-name user)) (erase-buffer) (doctor-mode)) (setq riece-doctor-patients (cons user riece-doctor-patients)) (riece-doctor-reply (car targets) (format "%s: I am the psychotherapist. \ Please, describe your problems." user))) (if (string-match riece-doctor-bye-regexp message) (let ((pointer (riece-identity-member user riece-doctor-patients t))) (when pointer (kill-buffer (riece-doctor-buffer-name user)) (setq riece-doctor-patients (delq (car pointer) riece-doctor-patients)) (riece-doctor-reply (car targets) (format "%s: Good bye." user)))) (if (riece-identity-member user riece-doctor-patients t) (let (string) (with-current-buffer (riece-doctor-buffer-name user) (goto-char (point-max)) (insert message "\n") (let ((point (point))) (doctor-read-print) (setq string (buffer-substring (1+ point) (- (point) 2)))) (with-temp-buffer (insert string) (subst-char-in-region (point-min) (point-max) ?\n ? ) (setq string (buffer-string)))) (riece-doctor-reply (car targets) (format "%s: %s" user string))))))))) (defun riece-doctor-insinuate () (add-hook 'riece-after-privmsg-hook 'riece-doctor-after-privmsg-hook)) (defun riece-doctor-uninstall () (remove-hook 'riece-after-privmsg-hook 'riece-doctor-after-privmsg-hook)) (provide 'riece-doctor) ;;; riece-doctor.el ends here riece-9.0.0/lisp/riece-server.el0000644000076400007640000002612511546262045013437 00000000000000;;; riece-server.el --- functions to open and close servers -*- lexical-binding: t -*- ;; 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) (require 'riece-debug) (eval-and-compile (defvar riece-server-keyword-map '((:host) (:service 6667) (:nickname riece-nickname) (:realname riece-realname) (:username riece-username) (:password) (:function riece-default-open-connection-function) (:coding riece-default-coding-system)) "Mapping from keywords to default values. All keywords that can be used must be listed here.")) (defmacro riece-server-keyword-bind (plist &rest body) "Return a `let' form that binds all variables in PLIST. After this is done, BODY will be executed in the scope of the `let' form. The variables bound and their default values are described by the `riece-server-keyword-map' variable." `(let ,(mapcar (lambda (keyword) (list (intern (substring (symbol-name (car keyword)) 1)) (if (cadr keyword) `(or (plist-get ,plist ',(car keyword)) ,(cadr keyword)) `(plist-get ,plist ',(car keyword))))) riece-server-keyword-map) ,@body)) (put 'riece-server-keyword-bind 'lisp-indent-function 1) (put 'riece-server-keyword-bind 'edebug-form-spec '(form body)) (defun riece-server-parse-string (string) "Convert a STRING set as `riece-server' and return a property list." (when (or (string-match "^\\[\\([^]]+\\)\\]:?\\([0-9]*\\)" string) (string-match "^\\([^:]+\\):?\\([0-9]*\\)" string)) (let ((host (match-string 1 string)) (service (match-string 2 string)) (password (substring string (match-end 0))) plist) (setq plist (cons `(:host ,host) plist)) (unless (equal service "") (setq plist (cons `(:service ,(string-to-number service)) plist))) (unless (equal password "") (setq plist (cons `(:password ,(substring password 1)) plist))) (apply #'nconc plist)))) (defun riece-server-name-to-server (server-name) (let ((entry (assoc server-name riece-server-alist))) (if entry (unless (listp (cdr entry)) (setcdr entry (riece-server-parse-string (cdr entry)))) (setq entry (cons server-name (riece-server-parse-string server-name)) riece-server-alist (cons entry riece-server-alist) riece-save-variables-are-dirty t)) (cdr entry))) (defun riece-server-process-name (server-name) (if (equal server-name "") "IRC" (format "IRC<%s>" server-name))) (defun riece-server-process (server-name) (cdr (assoc server-name riece-server-process-alist))) (defmacro riece-with-server-buffer (server-name &rest body) `(let ((process (riece-server-process ,server-name))) (if process (with-current-buffer (process-buffer process) ,@body) (error "Server closed")))) (put 'riece-with-server-buffer 'lisp-indent-function 1) (put 'riece-with-server-buffer 'edebug-form-spec '(form body)) (defun riece-make-queue () "Make a queue object." (vector nil nil)) (defun riece-queue-enqueue (queue object) "Add OBJECT to the end of QUEUE." (if (aref queue 1) (let ((last (list object))) (nconc (aref queue 1) last) (aset queue 1 last)) (aset queue 0 (list object)) (aset queue 1 (aref queue 0)))) (defun riece-queue-dequeue (queue) "Remove an object from the beginning of QUEUE." (unless (aref queue 0) (error "Empty queue")) (prog1 (car (aref queue 0)) (unless (aset queue 0 (cdr (aref queue 0))) (aset queue 1 nil)))) (defun riece-queue-empty (queue) "Return t if QUEUE is empty." (null (aref queue 0))) ;; stolen (and renamed) from time-date.el. (defun riece-seconds-to-time (seconds) "Convert SECONDS (a floating point number) to a time value." (list (floor seconds 65536) (floor (mod seconds 65536)) (floor (* (- seconds (ffloor seconds)) 1000000)))) ;; stolen (and renamed) from time-date.el. (defun riece-time-less-p (t1 t2) "Say whether time value T1 is less than time value T2." (or (< (car t1) (car t2)) (and (= (car t1) (car t2)) (< (nth 1 t1) (nth 1 t2))))) ;; stolen (and renamed) from time-date.el. (defun riece-time-since (time) "Return the time elapsed since TIME." (let* ((current (current-time)) (rest (when (< (nth 1 current) (nth 1 time)) (expt 2 16)))) (list (- (+ (car current) (if rest -1 0)) (car time)) (- (+ (or rest 0) (nth 1 current)) (nth 1 time))))) (defun riece-flush-send-queue (process) (with-current-buffer (process-buffer process) (let ((length 0) string) (if (riece-time-less-p (riece-seconds-to-time riece-send-delay) (riece-time-since riece-last-send-time)) (setq riece-send-size 0)) (while (and (not (riece-queue-empty riece-send-queue)) (<= riece-send-size riece-max-send-size)) (setq string (riece-queue-dequeue riece-send-queue) length (length string)) (if (> length riece-max-send-size) (message "Long message (%d > %d)" length riece-max-send-size) (setq riece-send-size (+ riece-send-size length)) (when (<= riece-send-size riece-max-send-size) (process-send-string process string) (setq riece-last-send-time (current-time))))) (unless (riece-queue-empty riece-send-queue) (riece-run-at-time riece-send-delay nil (lambda (process) (if (riece-server-process-opened process) (riece-flush-send-queue process))) process))))) (defun riece-process-send-string (process string) (with-current-buffer (process-buffer process) (riece-queue-enqueue riece-send-queue string)) (riece-flush-send-queue process)) (defun riece-current-server-name () (or riece-overriding-server-name ;already in the server buffer (if (local-variable-p 'riece-server-name (current-buffer)) riece-server-name (if riece-current-channel (riece-identity-server riece-current-channel) (if (riece-server-opened "") ""))))) (defun riece-send-string (string &optional identity) (let* ((server-name (if identity (riece-identity-server identity) (riece-current-server-name))) (process (riece-server-process server-name))) (unless process (error "%s" (substitute-command-keys "Type \\[riece-command-open-server] to open server."))) (riece-process-send-string process (with-current-buffer (process-buffer process) (if identity (riece-encode-coding-string-for-identity string identity) (riece-encode-coding-string string)))))) (defun riece-open-server (server server-name) (let ((protocol (or (plist-get server :protocol) riece-protocol)) function process) (condition-case nil (require (intern (concat "riece-" (symbol-name protocol)))) (error)) (setq function (intern-soft (concat "riece-" (symbol-name protocol) "-open-server"))) (unless function (error "\"%S\" is not supported" protocol)) (setq process (riece-funcall-ignore-errors (symbol-name function) function server server-name)) (when process (with-current-buffer (process-buffer process) (make-local-variable 'riece-protocol) (setq riece-protocol protocol)) (setq riece-server-process-alist (cons (cons server-name process) riece-server-process-alist))))) (defun riece-quit-server-process (process &optional message) (let ((function (intern-soft (concat "riece-" (with-current-buffer (process-buffer process) (symbol-name riece-protocol)) "-quit-server-process")))) (if function (funcall function process message)))) (defun riece-reset-process-buffer (process) (with-current-buffer (process-buffer process) (if (fboundp 'set-buffer-multibyte) (set-buffer-multibyte nil)) (kill-all-local-variables) (make-local-variable 'riece-real-nickname) (make-local-variable 'riece-last-nickname) (make-local-variable 'riece-nick-accepted) (make-local-variable 'riece-real-server-name) (make-local-variable 'riece-real-userhost) (make-local-variable 'riece-user-at-host) (make-local-variable 'riece-user-at-host-type) (make-local-variable 'riece-supported-user-modes) (make-local-variable 'riece-supported-channel-modes) (make-local-variable 'riece-channel-filter) (make-local-variable 'riece-server-name) (make-local-variable 'riece-read-point) (setq riece-read-point (point-min)) (make-local-variable 'riece-filter-running) (make-local-variable 'riece-send-queue) (setq riece-send-queue (riece-make-queue)) (make-local-variable 'riece-send-size) (setq riece-send-size 0) (make-local-variable 'riece-last-send-time) (setq riece-last-send-time '(0 0 0)) (make-local-variable 'riece-user-obarray) (setq riece-user-obarray (make-vector riece-user-obarray-size 0)) (make-local-variable 'riece-channel-obarray) (setq riece-channel-obarray (make-vector riece-channel-obarray-size 0)) (make-local-variable 'riece-coding-system) (make-local-variable 'riece-channel-cache) (setq riece-channel-cache (riece-make-cache riece-channel-cache-max-size)) (make-local-variable 'riece-user-cache) (setq riece-user-cache (riece-make-cache riece-user-cache-max-size)) (buffer-disable-undo) (erase-buffer))) (defun riece-close-server-process (process) (with-current-buffer (process-buffer process) (run-hooks 'riece-after-close-hook)) (kill-buffer (process-buffer process)) (setq riece-server-process-alist (delq (rassq process riece-server-process-alist) riece-server-process-alist))) (defun riece-server-process-opened (process) (not (null (memq (process-status process) '(open run))))) (defun riece-server-opened (&optional server-name) (if server-name (let ((process (riece-server-process server-name))) (and process (riece-server-process-opened process))) (let ((alist riece-server-process-alist)) (catch 'found (while alist (if (riece-server-process-opened (cdr (car alist))) (throw 'found t)) (setq alist (cdr alist))))))) (defun riece-server-properties (server-name) "Return a list of properties associated with SERVER-NAME." (if (equal server-name "") riece-server (let ((entry (assoc server-name riece-server-alist))) (unless entry (error "No such server")) (cdr entry)))) (provide 'riece-server) ;;; riece-server.el ends here riece-9.0.0/lisp/riece-unread.el0000644000076400007640000001615211546264624013413 00000000000000;;; riece-unread.el --- mark channels where new messages arrived -*- lexical-binding: t -*- ;; 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 riece-9.0.0/lisp/riece-twitter.el0000644000076400007640000000753411546264615013643 00000000000000;;; riece-twitter.el --- post your status to Twitter -*- lexical-binding: t -*- ;; Copyright (C) 2007 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-message) (defgroup riece-twitter nil "Post your status to Twitter" :group 'riece) (defcustom riece-twitter-credential nil "Your credential used to login to Twitter." :group 'riece-twitter :type 'string) (eval-and-compile (if (fboundp 'clear-string) (defalias 'riece-twitter-clear-string 'clear-string) (defun riece-twitter-clear-string (string) (fillarray string ?\0)))) (defun riece-twitter-set-credential (credential) "Set your credential used to login to Twitter." (interactive (let ((username (read-string "Username: ")) password) (unwind-protect (list (concat username ":" (setq password (read-passwd "Password: ")))) (if password (riece-twitter-clear-string password)) (setq password nil)))) (setq riece-twitter-credential credential)) (defun riece-twitter-update (status) "Update your status." (interactive (progn (unless riece-twitter-credential (error "%s" (substitute-command-keys "\\[riece-twitter-set-credential] to set your credential"))) (list (read-string "Status: ")))) (message "Sending to Twitter...") (let* ((args (list "-u" riece-twitter-credential "-d" (concat "status=" (riece-twitter-escape-string (encode-coding-string status 'utf-8))) "-s" "http://twitter.com/statuses/update.json")) (process (apply #'start-process "curl" nil "curl" (if (interactive-p) args (append args (list "-H" "X-Twitter-Client: Riece" "-H" (concat "X-Twitter-Client-Version: " riece-version-number) "-H" "X-Twitter-Client-URL: http://riece.nongnu.org/twitter.xml" "-d" "source=riece")))))) (set-process-sentinel process #'riece-twitter-sentinel))) (defun riece-twitter-sentinel (_process status) (if (equal status "finished\n") (message "Sending to Twitter...done") (message "Sending to Twitter...failed: %s" (substring status 0 (1- (length status)))))) (defun riece-twitter-message-filter (message) (if (and (riece-message-own-p message) (eq 'action (riece-message-type message))) (if riece-twitter-credential (riece-twitter-update (riece-message-text message)) (message "%s" (substitute-command-keys "\\[riece-twitter-set-credential] to set your credential")))) message) (defun riece-twitter-escape-string (string) (let ((index 0)) (while (string-match "[^0-9A-Za-z\-\._~:/?@!\$'()*,]" string index) (setq string (replace-match (format "%%%02X" (aref string (match-beginning 0))) t t string) index (+ 3 (match-beginning 0)))) string)) (defun riece-twitter-insinuate () (add-hook 'riece-message-filter-functions 'riece-twitter-message-filter)) (defun riece-twitter-uninstall () (remove-hook 'riece-message-filter-functions 'riece-twitter-message-filter)) (provide 'riece-twitter) ;;; riece-twitter.el ends here riece-9.0.0/lisp/riece-globals.el0000644000076400007640000001734311546262045013556 00000000000000;;; riece-globals.el --- global variables and constants. -*- lexical-binding: t -*- ;; 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) (put 'riece-mode-line-buffer-identification 'risky-local-variable t) (defvar riece-channel-indicator "None" "String displayed on the modeline to indicate the current channel.") (put 'riece-channel-indicator 'risky-local-variable t) (defvar riece-long-channel-indicator "None" "String displayed on the modeline to indicate the current channel. Generally, this string will contain more information than riece-channel-indicator.") (put 'riece-long-channel-indicator 'risky-local-variable t) (defvar riece-channel-list-indicator "No channel" "String displayed on the modeline to show the joined channels.") (put 'riece-channel-list-indicator 'risky-local-variable t) (defvar riece-user-indicator nil "String displayed on the modeline to show the current nickname.") (put 'riece-user-indicator 'risky-local-variable t) (defvar riece-away-indicator "-" "String displayed on the modeline to allow the user to tell if the user is away.") (put 'riece-away-indicator 'risky-local-variable t) (defvar riece-operator-indicator "-" "String displayed on the modeline to allow the user to tell if the user is an operator.") (put 'riece-operator-indicator 'risky-local-variable t) (defvar riece-channel-status-indicator "-" "String displayed on the modeline to allow the user to tell if the user's status on the current channel.") (put 'riece-channel-status-indicator 'risky-local-variable t) ;;; Buffers: (defvar riece-command-buffer nil "The command buffer.") (defvar riece-dialogue-buffer nil "Buffer for whole conversation.") (defvar riece-others-buffer nil "Buffer for other messages.") (defvar riece-channel-list-buffer nil "Buffer for channel list.") (defvar riece-user-list-buffer nil "Buffer for user list.") (defvar riece-channel-buffer nil "Buffer for messages arrived in the current channel.") (defvar riece-temp-buffer nil "Buffer for temporally use.") (defvar riece-debug-buffer nil "Buffer for debug output.") (defvar riece-buffer-list nil) (defvar riece-overriding-server-name nil) (defconst riece-change-prefix "*** Change: ") (defconst riece-notice-prefix "*** Notice: ") (defconst riece-wallops-prefix "*** Notice: ") (defconst riece-error-prefix "*** Error: ") (defconst riece-info-prefix "*** Info: ") (defconst riece-prefix-regexp "\\*\\*\\* \\([^:]+: \\)") (defconst riece-time-prefix-regexp "[0-9][0-9]:[0-9][0-9] ") (provide 'riece-globals) ;;; riece-globals.el ends here riece-9.0.0/lisp/riece-command-list-addons.xpm0000644000076400007640000000360511377612201016163 00000000000000/* XPM */ static char *riece_command_list_addons[] = { /* columns rows colors chars-per-pixel */ "24 24 76 1", " c #2E3436", ". c #343A3B", "X c #414646", "o c #4D5252", "O c #555753", "+ c #5A5E5D", "@ c #676A68", "# c #737673", "$ c #80827E", "% c #868984", "& c #888A85", "* c #898B86", "= c #898C87", "- c #8D908B", "; c #8F928C", ": c #BABDB6", "> c gray78", ", c #C8C8C8", "< c gray79", "1 c #CACBC9", "2 c #CACACA", "3 c #CBCBCB", "4 c gray80", "5 c #CDCDCD", "6 c #CECFCD", "7 c #CECECE", "8 c gray81", "9 c #D0D0D0", "0 c gray82", "q c #D2D2D2", "w c LightGray", "e c #D5D5D5", "r c gray86", "t c gainsboro", "y c #DDDDDD", "u c gray87", "i c #DFDFDF", "p c gray88", "a c #E1E1E0", "s c #E1E1E1", "d c #E2E2E1", "f c #E2E2E2", "g c #E3E3E2", "h c gray89", "j c #E4E4E3", "k c #E4E4E4", "l c #E5E5E4", "z c gray90", "x c #E6E6E5", "c c #E7E7E6", "v c #E8E8E6", "b c #E8E8E7", "n c #E9E9E7", "m c #E9E9E8", "M c #EAEAE8", "N c #EAEAE9", "B c #EBEBE9", "V c #EBEBEA", "C c #ECECEA", "Z c #ECECEB", "A c #EFEFEF", "S c gray94", "D c #F1F1F1", "F c gray95", "G c #F3F3F2", "H c #F3F3F3", "J c #F4F4F4", "K c #F5F5F4", "L c gray96", "P c #F6F6F5", "I c #F6F6F6", "U c #F7F7F6", "Y c gray97", "T c #FEFEFE", "R c gray100", "E c None", /* pixels */ "EEEEEEEEEEEEEEEEEEEEEEEE", "EEEEEEEEEEEEEEEEEEEEEEEE", "EEEEEEEEEEEEEEEEEEEEEEEE", "EE-*&&&&&&&&&&&&&&&*-EEE", "E;6LUUIPPLLKJJHHHHHD1;EE", "E*LZVBNMnbcxljhfsppsD*EE", "E&UVOOOOOmbcxljhfsppH&EE", "E&UBORRROM xl spH&EE", "E&INO:::OB...cx...daH&EE", "E&PmOOOOOBXXXcOOOOOsH&EE", "E&LbmoooCBooobORRROfH&EE", "E&Lcb+++BB+++bO:::OgH&EE", "E&Lxc@@@MM@@@bOOOOOhH&EE", "E&Hlx###nOOOOOv###khG&EE", "E&Fjl$$$cORRROc$$$ljF&EE", "E&Dgj&&&xO:::Oc&&&ljD&EE", "E&SdghjllOOOOOxxxlljD&EE", "E&IdsfgjjllzxxxxllklY&EE", "E&HTRRRRRRRRRRRRRRRTA&EE", "E*zewq0988754322<,>,u*EE", "E=8hkhffspppiiuyyytr2=EE", "EE%*&&&&&&&&&&&&&&&*%EEE", "EEEEEEEEEEEEEEEEEEEEEEEE", "EEEEEEEEEEEEEEEEEEEEEEEE" }; riece-9.0.0/lisp/riece-epg.el0000644000076400007640000001755511546264172012716 00000000000000;;; riece-epg.el --- Encrypt/decrypt messages add-on -*- lexical-binding: t -*- ;; 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)) (if (> (forward-line) 0) (insert "\n")))) (defun riece-command-set-passphrase (identity passphrase) "Set PASSPHRASE associated with IDENTITY." (interactive (let ((identity (riece-completing-read-identity "Channel/user: " riece-current-channels nil t nil nil (riece-format-identity riece-current-channel)))) (list identity (read-passwd (format "Passphrase for %s: " (riece-format-identity identity)))))) (let ((entry (riece-identity-assoc identity riece-epg-passphrase-alist))) (if (equal passphrase "") (if entry (setq riece-epg-passphrase-alist (delq entry riece-epg-passphrase-alist))) (if entry (setcdr entry passphrase) (setq riece-epg-passphrase-alist (cons (cons identity passphrase) riece-epg-passphrase-alist)))))) (defun riece-epg-decrypt-string-for-identity (context cipher target) (let ((coding-system (or (riece-coding-system-for-identity target) riece-default-coding-system))) (riece-with-server-buffer (riece-identity-server target) (decode-coding-string (riece-epg-funcall-clear-passphrase target #'epg-decrypt-string context (base64-decode-string cipher)) (if (consp coding-system) (car coding-system) coding-system))))) (defun riece-epg-message-filter (message) (if (get 'riece-epg 'riece-addon-enabled) (when (string-match "\\`\\[encrypted:\\(.*\\)]" (riece-message-text message)) (let ((context (epg-make-context)) (string (match-string 1 (riece-message-text message)))) (epg-context-set-passphrase-callback context (cons #'riece-epg-passphrase-callback-function-for-decrypt riece-current-channel)) (condition-case error (progn (riece-message-set-text message (format "[encrypted:%s]" (riece-epg-decrypt-string-for-identity context string (riece-message-target message))))) (error (riece-put-text-property-nonsticky 0 (length (riece-message-text message)) 'riece-epg-encryption-target (riece-message-target message) (riece-message-text message)) (if riece-debug (message "Couldn't decrypt: %s" (cdr error)) (message "Couldn't decrypt"))))))) message) (defun riece-epg-add-encrypted-button (start end) (if (and (get 'riece-button 'riece-addon-enabled) (get 'riece-epg 'riece-addon-enabled)) (riece-scan-property-region 'riece-epg-encryption-target start end (lambda (start end) (let ((inhibit-read-only t) buffer-read-only) (widget-convert-button 'link start end :help-echo "Click to decrypt" :notify #'riece-epg-encrypted-button-notify (get-text-property start 'riece-epg-encryption-target))))))) (defun riece-epg-encrypted-button-notify (widget &rest _ignore) (let* ((from (marker-position (widget-get widget :from))) (to (marker-position (widget-get widget :to))) (target (widget-get widget :value)) (cipher (buffer-substring from to)) (inhibit-read-only t) buffer-read-only plain) (when (string-match "\\`\\[encrypted:\\(.*\\)]" cipher) (setq plain (riece-epg-decrypt-string-for-identity (epg-make-context) (match-string 1 cipher) target)) (widget-delete widget) (delete-region from to) (save-excursion (goto-char from) (insert "[encrypted:" plain "]"))))) (defun riece-epg-requires () (if (memq 'riece-button riece-addons) '(riece-button))) (defun riece-epg-insinuate () (add-hook 'riece-message-filter-functions 'riece-epg-message-filter) (add-hook 'riece-after-insert-functions 'riece-epg-add-encrypted-button)) (defun riece-epg-uninstall () (remove-hook 'riece-message-filter-functions 'riece-epg-message-filter) (remove-hook 'riece-after-insert-functions 'riece-epg-add-encrypted-button)) (defvar riece-command-mode-map) (defun riece-epg-enable () (define-key riece-command-mode-map "\C-ce" 'riece-command-enter-encrypted-message) (define-key riece-command-mode-map "\C-c\C-ec" 'riece-command-set-passphrase)) (defun riece-epg-disable () (define-key riece-command-mode-map "\C-ce" nil) (define-key riece-command-mode-map "\C-c\C-ec" nil)) (provide 'riece-epg) ;;; riece-epg.el ends here riece-9.0.0/lisp/riece-skk-kakutei.el0000644000076400007640000000474211546262045014355 00000000000000;;; riece-skk-kakutei.el --- remove SKK's preedit mark before sending messages -*- lexical-binding: t -*- ;; Copyright (C) 2003 TAKAHASHI Kaoru ;; Author: TAKAHASHI 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 riece-9.0.0/lisp/riece-compat.el0000644000076400007640000000545211546262045013414 00000000000000;;; riece-compat.el --- compatibility functions -*- lexical-binding: t -*- ;; 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 "?")))) ""))) (if (or (not (fboundp 'make-local-hook)) (get 'make-local-hook 'byte-obsolete-info)) (defalias 'riece-make-local-hook 'ignore) (defalias 'riece-make-local-hook 'make-local-hook)) (autoload 'derived-mode-class "derived") (if (fboundp 'derived-mode-p) (defalias 'riece-derived-mode-p 'derived-mode-p) (defun riece-derived-mode-p (&rest modes) (memq (derived-mode-class major-mode) modes))) (if (fboundp 'set-process-query-on-exit-flag) (defalias 'riece-set-process-query-on-exit-flag 'set-process-query-on-exit-flag) (defalias 'riece-set-process-query-on-exit-flag 'process-kill-without-query)) (provide 'riece-compat) ;;; riece-compat.el ends here riece-9.0.0/lisp/riece-kakasi.el0000644000076400007640000000465711546262045013402 00000000000000;;; riece-kakasi.el --- convert Japanese to roman string by KAKASI -*- lexical-binding: t -*- ;; 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")) (with-current-buffer (process-buffer riece-kakasi-process) (while (progn (goto-char (point-min)) (not (search-forward "\n" nil t))) (accept-process-output riece-kakasi-process)) (prog1 (buffer-substring (point-min) (1- (point))) (delete-region (point-min) (point))))) (defun riece-kakasi-message-filter (message) (if (get 'riece-kakasi 'riece-addon-enabled) (riece-message-set-text message (riece-kakasi-convert-string (riece-message-text message)))) message) (defun riece-kakasi-insinuate () (add-hook 'riece-message-filter-functions 'riece-kakasi-message-filter)) (defun riece-kakasi-uninstall () (remove-hook 'riece-message-filter-functions 'riece-kakasi-message-filter)) (defun riece-kakasi-enable () (setq riece-kakasi-process (start-process "kakasi" (generate-new-buffer " *riece-kakasi*") "kakasi" "-Ha" "-Ka" "-Ja" "-Ea" "-ka")) (with-current-buffer (process-buffer riece-kakasi-process) (buffer-disable-undo) (erase-buffer))) (defun riece-kakasi-disable () (kill-buffer (process-buffer riece-kakasi-process))) (provide 'riece-kakasi) ;;; riece-kakasi.el ends here riece-9.0.0/lisp/riece-000.el0000644000076400007640000000576511546262524012441 00000000000000;;; riece-000.el --- handlers for 000 replies -*- lexical-binding: t -*- ;; 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)) (run-hooks 'riece-after-login-hook) (let ((channel-list riece-startup-channel-list) entry identity) (while channel-list (unless (listp (setq entry (car channel-list))) (setq entry (list (car channel-list)))) (if (equal (riece-identity-server (setq identity (riece-parse-identity (car entry)))) riece-server-name) (riece-command-join-channel identity (nth 1 entry))) (setq channel-list (cdr channel-list))))) (defun riece-handle-004-message (_prefix _number _name string) "RPL_MYINFO \" \"" (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 riece-9.0.0/lisp/aproxy.rb0000644000076400007640000000544411377612201012365 00000000000000# 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 riece-9.0.0/lisp/riece-icon.el0000644000076400007640000002510011546264242013052 00000000000000;;; riece-icon.el --- display icons in IRC buffers -*- lexical-binding: t -*- ;; 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 riece-9.0.0/lisp/riece-coding.el0000644000076400007640000000530311546262045013367 00000000000000;;; riece-coding.el --- converting string with coding system -*- lexical-binding: t -*- ;; 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) (require 'riece-options) (defun riece-encode-coding-string (string) (if (and (local-variable-p 'riece-coding-system (current-buffer)) riece-coding-system) ;should be nil on non-Mule environment (encode-coding-string string (if (consp riece-coding-system) (cdr riece-coding-system) riece-coding-system)) string)) (defun riece-decode-coding-string (string) (if (and (local-variable-p 'riece-coding-system (current-buffer)) riece-coding-system) ;should be nil on non-Mule environment (riece-decode-coding-string-1 string (if (consp riece-coding-system) (car riece-coding-system) riece-coding-system)) string)) (defun riece-decode-coding-string-1 (string coding-system) (let* ((decoded (decode-coding-string string coding-system)) (length (length decoded))) (put-text-property 0 length 'riece-decoded-encoded-string string decoded) (put-text-property 0 length 'riece-decoded-coding-system coding-system decoded) decoded)) ;; The following functions are API used by handler functions. For the ;; meantime DECODED is actually a string (with some text properties). ;; In the future, however, the implementation _should_ be changed so ;; that decoding phase is delayed until the body of handler functions. (defun riece-decoded-coding-system (decoded) "Return the coding-system used for decoding DECODED." (get-text-property 0 'riece-decoded-coding-system decoded)) (defun riece-decoded-encoded-string (decoded) "Return the string before decoding." (get-text-property 0 'riece-decoded-encoded-string decoded)) (defalias 'riece-decoded-string 'identity) (provide 'riece-coding) ;;; riece-coding.el ends here riece-9.0.0/lisp/riece-version.el0000644000076400007640000000721111546262045013611 00000000000000;;; riece-version.el --- version information handling -*- lexical-binding: t -*- ;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 ;; Free Software Foundation, Inc. ;; Copyright (C) 1998-2003 Daiki Ueno ;; Author: Daiki Ueno ;; 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 riece-9.0.0/lisp/riece-ndcc.el0000644000076400007640000002063411546262045013037 00000000000000;;; riece-ndcc.el --- DCC file sending protocol support (written in elisp) -*- lexical-binding: t -*- ;; 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 riece-9.0.0/lisp/riece-addon-modules.el0000644000076400007640000000575211546262136014670 00000000000000(require 'riece-mcat) (defconst riece-addon-modules (list (cons 'riece-alias (riece-mcat "Define aliases for IRC names.")) (cons 'riece-async (riece-mcat "Connect to IRC server via async proxy.")) (cons 'riece-biff (riece-mcat "Be notified if messages arrives.")) (cons 'riece-button (riece-mcat "Display useful buttons in IRC buffers.")) (cons 'riece-ctcp (riece-mcat "CTCP (Client To Client Protocol) support.")) (cons 'riece-ctlseq (riece-mcat "Mark up control sequences in IRC buffers.")) (cons 'riece-desktop-notify (riece-mcat "Display notification to desktop.")) (cons 'riece-doctor (riece-mcat "Pretend to be a psychotherapist.")) (cons 'riece-epg (riece-mcat "Encrypt/decrypt messages.")) (cons 'riece-eval-ruby (riece-mcat "Evaluate input string as a Ruby program.")) (cons 'riece-eval (riece-mcat "Evaluate an input string as an elisp form.")) (cons 'riece-foolproof (riece-mcat "Prevent miss-operation in the command buffer.")) (cons 'riece-google (riece-mcat "Search keywords by Google.")) (cons 'riece-guess (riece-mcat "Guess the next channel, using multiple methods.")) (cons 'riece-hangman (riece-mcat "Allow channel members to play the hangman game.")) (cons 'riece-highlight (riece-mcat "Highlight IRC buffers.")) (cons 'riece-history (riece-mcat "Manage history of channel shifting.")) (cons 'riece-icon (riece-mcat "Display icons in IRC buffers.")) (cons 'riece-ignore (riece-mcat "Ignore messages from some users.")) (cons 'riece-kakasi (riece-mcat "Convert Japanese to roman string by KAKASI.")) (cons 'riece-keepalive (riece-mcat "Keep an IRC connection.")) (cons 'riece-keyword (riece-mcat "Detect keywords in IRC buffers.")) (cons 'riece-log (riece-mcat "Save IRC logs.")) (cons 'riece-lsdb (riece-mcat "Help register nicknames in LSDB rolodex program.")) (cons 'riece-mcat (riece-mcat "Translate messages.")) (cons 'riece-menu (riece-mcat "Setup Riece's command menus.")) (cons 'riece-mini (riece-mcat "Use Riece only on the minibuffer.")) ;;; (cons 'riece-ndcc ;;; (riece-mcat "DCC file sending protocol support (written in elisp.)")) (cons 'riece-rdcc (riece-mcat "DCC file sending protocol support (written in Ruby.)")) (cons 'riece-shrink-buffer (riece-mcat "Free old IRC messages to save memory usage.")) (cons 'riece-skk-kakutei (riece-mcat "Remove SKK's preedit mark before sending messages.")) (cons 'riece-toolbar (riece-mcat "Display toolbar icons.")) (cons 'riece-twitter (riece-mcat "Send your status to Twitter.")) (cons 'riece-unread (riece-mcat "Mark channels where new messages arrived.")) (cons 'riece-url (riece-mcat "Collect URL in IRC buffers.")) (cons 'riece-xface (riece-mcat "Display X-Face in IRC buffers.")) (cons 'riece-xfaceb (riece-mcat "Display X-Face & Colour Face images in IRC buffers \(BBDB\).")) (cons 'riece-yank (riece-mcat "Enter the element of kill-ring.")))) (provide 'riece-addon-modules) riece-9.0.0/lisp/riece-eval-ruby.el0000644000076400007640000000555011546262045014036 00000000000000;;; riece-eval-ruby.el --- evaluate input string as a Ruby program -*- lexical-binding: t -*- ;; 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 riece-9.0.0/lisp/test/0000775000076400007640000000000011761025307011552 500000000000000riece-9.0.0/lisp/test/test-riece-alias.el0000644000076400007640000000716711377612201015156 00000000000000(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"))))riece-9.0.0/lisp/test/luna.el0000644000076400007640000003273411377612201012760 00000000000000;;; 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 riece-9.0.0/lisp/test/Makefile.in0000664000076400007640000002115311761025271013541 00000000000000# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = lisp/test DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EMACS = @EMACS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ PACKAGE = @PACKAGE@ PACKAGEDIR = @PACKAGEDIR@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XEMACS = @XEMACS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ am__leading_dot = @am__leading_dot@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ lispdir = @lispdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ 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 all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lisp/test/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu lisp/test/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic distclean \ distclean-generic distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic pdf pdf-am ps ps-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: riece-9.0.0/lisp/test/test-riece-yank.el0000644000076400007640000000065011377612201015015 00000000000000(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"))) riece-9.0.0/lisp/test/test-riece-eval.el0000644000076400007640000000260511377612201015004 00000000000000(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)))) riece-9.0.0/lisp/test/test-riece-cache.el0000644000076400007640000000435011377612201015117 00000000000000(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"))))) riece-9.0.0/lisp/test/lunit-report.el0000644000076400007640000001130611377612201014455 00000000000000;;; 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)riece-9.0.0/lisp/test/lunit.el0000644000076400007640000002455311377612201013154 00000000000000;;; 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 riece-9.0.0/lisp/test/test-riece-log.el0000644000076400007640000001203511455524431014640 00000000000000(require 'riece-log) (luna-define-class test-riece-log (lunit-test-case)) (defun test-riece-log-delete-directory (directory) (let ((file-name-coding-system 'no-conversion) (files (directory-files directory t nil t))) (while files (if (file-directory-p (car files)) (unless (member (file-name-nondirectory (car files)) '("." "..")) (test-riece-log-delete-directory (car files))) (delete-file (car files))) (setq files (cdr files))) (delete-directory directory))) (luna-define-method lunit-test-case-setup ((case test-riece-log)) (setq riece-log-directory (expand-file-name (make-temp-name "test-riece-log") (if (featurep 'xemacs) (temp-directory) temporary-file-directory)) test-riece-log-directory (expand-file-name "=23riece" riece-log-directory)) (make-directory riece-log-directory) (make-directory test-riece-log-directory) (write-region "03:14 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 'no-conversion)) (lunit-assert-2 case (file-directory-p (expand-file-name (encode-coding-string (format "=23%c%c%c" (make-char 'japanese-jisx0208 36 106) (make-char 'japanese-jisx0208 33 60) (make-char 'japanese-jisx0208 36 57)) 'euc-jp) riece-log-directory))))) riece-9.0.0/lisp/test/test-riece-addon.el0000644000076400007640000000217211377612201015141 00000000000000(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))))) riece-9.0.0/lisp/test/Makefile.am0000644000076400007640000000033111377612201013517 00000000000000EXTRA_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 riece-9.0.0/lisp/test/test-riece-shrink-buffer.el0000644000076400007640000000104611377612201016620 00000000000000(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)))))) riece-9.0.0/lisp/test/test-riece-url.el0000644000076400007640000000214011377612201014651 00000000000000(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))))) riece-9.0.0/lisp/riece-desktop-notify.el0000644000076400007640000001417611546264164015117 00000000000000;;; riece-desktop-notify.el --- Display notification to desktop -*- lexical-binding: t -*- ;; Copyright (C) 2009 OHASHI Akira ;; Author: OHASHI Akira ;; Created: 2009-03-29 ;; Keywords: IRC, riece ;; This file is part of Riece. ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 2, or (at your option) ;; any later version. ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with GNU Emacs; see the file COPYING. If not, write to the ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;; Commentary: ;; NOTE: This is an add-on module for Riece. ;; riece-desktop-notify.el needs an external program to notify desktop. ;; The setting prepared beforehand for most popular OS uses the ;; following external programs. ;; ;; Mac OS X: ;; growlnotify ;; (of course you need Growl ) ;; ;; GNU/Linux: ;; notify-send (which is included in libnotify) ;; ;; ;; If you use Debian, you can install it by the following command: ;; ;; % sudo aptitude install libnotify-bin ;; ;; Windows: ;; Snarl_CMD.exe ;; (of course you need Snarl ) ;;; Code: (require 'riece-message) (eval-when-compile (require 'riece-keyword)) (defconst riece-desktop-notify-description "Display notification to desktop.") (defgroup riece-desktop-notify nil "Display notification to desktop." :group 'riece) (defcustom riece-desktop-notify-title-function '(lambda (message) (riece-identity-prefix (riece-message-target message))) "*The function which make title. This function must have only one message object as argument." :type 'function :group 'riece-desktop-notify) (defcustom riece-desktop-notify-message-function 'riece-format-message "*The function which make message. This function must have only one message object as argument." :type 'function :group 'riece-desktop-notify) (defcustom riece-desktop-notify-coding-system (terminal-coding-system) "*Coding system used to notify desktop." :type 'coding-system :group 'riece-desktop-notify) (defcustom riece-desktop-notify-type (if (eq system-type 'linux) 'gnu/linux system-type) "*The type to notify desktop." :type '(radio (const :tag "Like Darwin" darwin) (const :tag "Like GNU/Linux" gnu/linux) (const :tag "Like Windows" windows-nt) (symbol :tag "The other type")) :group 'riece-desktop-notify) ;; for Darwin (defcustom riece-desktop-notify-darwin-program "growlnotify" "*The program name to notify for darwin." :type 'file :group 'riece-desktop-notify) (defcustom riece-desktop-notify-darwin-args '("-t" title "-m" message "-H" "localhost") "*The Arguments to notify for darwin." :type '(repeat (radio (string :tag "Argument") (const :tag "Title" title) (const :tag "Message" message))) :group 'riece-desktop-notify) ;; for GNU/Linux (defcustom riece-desktop-notify-gnu/linux-program "notify-send" "*The program name to notify for GNU/Linux." :type 'file :group 'riece-desktop-notify) (defcustom riece-desktop-notify-gnu/linux-args '("-u" "low" title message) "*The Arguments to notify for GNU/Linux." :type '(repeat (radio (string :tag "Argument") (const :tag "Title" title) (const :tag "Message" message))) :group 'riece-desktop-notify) ;; for Windows (defcustom riece-desktop-notify-windows-nt-program "snarl_cmd.exe" "*The program name to notify for Windows." :type 'file :group 'riece-desktop-notify) (defcustom riece-desktop-notify-windows-nt-args '("snShowMessage" "-1" title message) "*The Arguments string to notify for Windows." :type '(repeat (radio (string :tag "Argument") (const :tag "Title" title) (const :tag "Message" message))) :group 'riece-desktop-notify) ;; stolen and modified from riece-ruby.el (defun riece-desktop-notify-substitute-variables (args alist) "Substitute symbols in ARGS by looking up ALIST." (setq args (copy-sequence args)) (while alist (let ((pointer args)) (while pointer (setq pointer (memq (car (car alist)) args)) (if pointer (setcar pointer (cdr (car alist)))))) (setq alist (cdr alist))) args) (defsubst riece-desktop-notify-make-symbol (symbol) (intern (format "riece-desktop-notify-%s-%s" (symbol-name riece-desktop-notify-type) (symbol-name symbol)))) (defun riece-desktop-notify-keyword-notify-function (_keyword message) (let ((program-symbol (riece-desktop-notify-make-symbol 'program)) (args-symbol (riece-desktop-notify-make-symbol 'args))) (when (and (boundp program-symbol) (boundp args-symbol)) (let ((program (eval program-symbol)) (args (eval args-symbol))) (when (fboundp 'executable-find) (setq program (executable-find program))) (when (stringp program) (let ((title (funcall riece-desktop-notify-title-function message)) (message (funcall riece-desktop-notify-message-function message))) (condition-case nil (apply #'call-process program nil nil nil (riece-desktop-notify-substitute-variables args (list (cons 'title (encode-coding-string title riece-desktop-notify-coding-system)) (cons 'message (encode-coding-string message riece-desktop-notify-coding-system))))) (file-error nil)))))))) (defun riece-desktop-notify-requires () '(riece-keyword)) (defun riece-desktop-notify-insinuate () (add-hook 'riece-keyword-notify-functions 'riece-desktop-notify-keyword-notify-function)) (defun riece-desktop-notify-uninstall () (remove-hook 'riece-keyword-notify-functions 'riece-desktop-notify-keyword-notify-function)) (provide 'riece-desktop-notify) ;;; riece-desktop-notify.el ends here riece-9.0.0/lisp/riece-user.el0000644000076400007640000001217311546262045013105 00000000000000;;; riece-user.el --- a user object -*- lexical-binding: t -*- ;; 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 riece-9.0.0/lisp/riece-channel.el0000644000076400007640000001735511546263547013556 00000000000000;;; riece-channel.el --- a channel object -*- lexical-binding: t -*- ;; 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 key)) (defun riece-get-channel (name) (let ((symbol (intern-soft (riece-identity-canonicalize-prefix name) riece-channel-obarray))) (if symbol (progn (riece-cache-get riece-channel-cache name) (symbol-value symbol)) (riece-cache-set riece-channel-cache name name) (set (intern (riece-identity-canonicalize-prefix name) riece-channel-obarray) (riece-make-channel nil nil nil nil nil nil nil))))) (defun riece-channel-users (channel) "Return the users of CHANNEL." (aref channel 0)) (defun riece-channel-topic (channel) "Return the topic of CHANNEL." (aref channel 1)) (defun riece-channel-modes (channel) "Return the modes of CHANNEL." (aref channel 2)) (defun riece-channel-banned (channel) "Return the banned users of CHANNEL." (aref channel 3)) (defun riece-channel-invited (channel) "Return the invited users of CHANNEL." (aref channel 4)) (defun riece-channel-uninvited (channel) "Return the uninvited users of CHANNEL." (aref channel 5)) (defun riece-channel-key (channel) "Return the key of CHANNEL." (aref channel 6)) (defun riece-channel-set-users (channel value) "Set the users of CHANNEL to VALUE." (aset channel 0 value)) (defun riece-channel-set-topic (channel value) "Set the topic of CHANNEL to VALUE." (aset channel 1 value)) (defun riece-channel-set-modes (channel value) "Set the modes of CHANNEL to VALUE." (aset channel 2 value)) (defun riece-channel-set-banned (channel value) "Set the banned users of CHANNEL to VALUE." (aset channel 3 value)) (defun riece-channel-set-invited (channel value) "Set the invited users of CHANNEL to VALUE." (aset channel 4 value)) (defun riece-channel-set-uninvited (channel value) "Set the uninvited users of CHANNEL to VALUE." (aset channel 5 value)) (defun riece-channel-set-key (channel value) "Set the key of CHANNEL to VALUE." (aset channel 6 value)) (defun riece-channel-get-users (name) "Return channel's users as list." (riece-channel-users (riece-get-channel name))) (defun riece-channel-get-topic (name) "Return channel's topic." (riece-channel-topic (riece-get-channel name))) (defun riece-channel-get-modes (name) "Return channel's modes as list." (riece-channel-modes (riece-get-channel name))) (defun riece-channel-get-banned (name) "Return channel's banned users as list." (riece-channel-banned (riece-get-channel name))) (defun riece-channel-get-invited (name) "Return channel's invited users as list." (riece-channel-invited (riece-get-channel name))) (defun riece-channel-get-uninvited (name) "Return channel's uninvited users as list." (riece-channel-uninvited (riece-get-channel name))) (defun riece-channel-get-key (name) "Return channel's key." (riece-channel-key (riece-get-channel name))) ;;; Functions called from `riece-handle-mode-message': (defun riece-channel-toggle-mode (name mode flag) "Add or remove channel MODE of channel." (let* ((channel (riece-get-channel name)) (modes (riece-channel-modes channel)) (old (riece-mode-assoc (riece-mode-flag mode) modes))) (if flag (unless old (riece-channel-set-modes channel (cons mode modes))) (if old (riece-channel-set-modes channel (delq old modes)))))) (defun riece-channel-toggle-banned (name pattern flag) "Add or remove banned PATTERN of channel." (let* ((channel (riece-get-channel name)) (banned (riece-channel-banned channel))) (if flag (unless (member pattern banned) (riece-channel-set-banned channel (cons pattern banned))) (if (setq pattern (car (member pattern banned))) (riece-channel-set-banned channel (delq pattern banned)))))) (defun riece-channel-toggle-invited (name pattern flag) "Add or remove invited PATTERN of channel." (let* ((channel (riece-get-channel name)) (invited (riece-channel-invited channel))) (if flag (unless (member pattern invited) (riece-channel-set-invited channel (cons pattern invited))) (if (setq pattern (car (member pattern invited))) (riece-channel-set-invited channel (delq pattern invited)))))) (defun riece-channel-toggle-uninvited (name pattern flag) "Add or remove uninvited PATTERN to channel." (let* ((channel (riece-get-channel name)) (uninvited (riece-channel-uninvited channel))) (if flag (unless (member pattern uninvited) (riece-channel-set-uninvited channel (cons pattern uninvited))) (if (setq pattern (car (member pattern uninvited))) (riece-channel-set-uninvited channel (delq pattern uninvited)))))) (defun riece-channel-toggle-user (name user flag) "Add or remove an user to channel." (let* ((channel (riece-get-channel name)) (users (riece-channel-users channel))) (if flag (unless (riece-identity-assoc user users t) (riece-channel-set-users channel (cons (list user) users))) (if (setq user (riece-identity-assoc user users t)) (riece-channel-set-users channel (delq user users)))))) (defun riece-channel-toggle-operator (name user flag) "Add or remove an operator to channel." (let* ((channel (riece-get-channel name)) (users (riece-channel-users channel))) (setq user (riece-identity-assoc user users t)) (if flag (if user (unless (memq ?o (cdr user)) (setcdr user (cons ?o (cdr user)))) (riece-channel-set-users channel (cons (list user ?o) users))) (if user (setcdr user (delq ?o (cdr user))))))) (defun riece-channel-toggle-speaker (name user flag) "Add or remove an speaker to channel." (let* ((channel (riece-get-channel name)) (users (riece-channel-users channel))) (setq user (riece-identity-assoc user users t)) (if flag (if user (unless (memq ?v (cdr user)) (setcdr user (cons ?v (cdr user)))) (riece-channel-set-users channel (cons (list user ?v) users))) (if user (setcdr user (delq ?v (cdr user))))))) (provide 'riece-channel) ;;; riece-channel.el ends here riece-9.0.0/lisp/riece-debug.el0000644000076400007640000000631711546262045013220 00000000000000;;; riece-debug.el --- debug support -*- lexical-binding: t -*- ;; 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) (with-current-buffer riece-debug-buffer (goto-char (point-max)) (let ((time (format-time-string "%Y-%m-%d:%H:%M:%S"))) (if detail (insert "*** " time ": " message "\n" detail "\n") (insert "*** " time ": " message "\n"))))) (defun riece-debug (message &optional detail) "Print a one-line debug MESSAGE at the bottom of the frame. If the optional 2nd argument DETAIL is specified, it is stored into `riece-debug-buffer'." (ignore (riece-debug-1 message detail))) (defun riece-debug-reset-standard-output () "Reset `riece-temp-buffer' to be used as `standard-output'." (with-current-buffer riece-temp-buffer (buffer-disable-undo) (erase-buffer))) (defmacro riece-debug-with-backtrace (&rest body) "Execute BODY and send a backtrace to `riece-temp-buffer'." `(unwind-protect (progn ,@body) (riece-debug-reset-standard-output) (let ((standard-output riece-temp-buffer)) (backtrace)))) (put 'riece-debug-with-backtrace 'lisp-indent-function 0) (put 'riece-debug-with-backtrace 'edebug-form-spec '(form body)) (defmacro riece-ignore-errors (location &rest body) "Execute BODY; if an error occurs, return nil. Otherwise, return result of last FORM. If `riece-debug' is non-nil and an error occurred, it sends a backtrace to standard-output." `(condition-case error (if riece-debug (riece-debug-with-backtrace ,@body) ,@body) (error (if riece-debug (with-current-buffer riece-temp-buffer (goto-char (point-min)) (if (re-search-forward "^ signal(" nil t) (delete-region (point-min) (match-beginning 0))) (riece-debug (format "Error in `%s': %S" ,location error) (buffer-string)))) nil))) (put 'riece-ignore-errors 'lisp-indent-function 1) (put 'riece-ignore-errors 'edebug-form-spec '(form body)) (defun riece-funcall-ignore-errors (location function &rest args) "Call FUNCTION with ARGS; if an error occurs, return nil. Otherwise, return result of the function. If `riece-debug' is non-nil and an error occurred, it sends a backtrace to standard-output." (riece-ignore-errors location (apply function args))) (provide 'riece-debug) ;;; riece-debug.el ends here riece-9.0.0/lisp/riece-naming.el0000644000076400007640000001246111546262045013400 00000000000000;;; riece-naming.el --- toplevel naming management -*- lexical-binding: t -*- ;; 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 riece-9.0.0/lisp/server.rb0000644000076400007640000001224711377612201012350 00000000000000# 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 riece-9.0.0/lisp/riece-keepalive.el0000644000076400007640000000450311546262045014072 00000000000000;;; riece-keepalive.el --- keep an IRC connection -*- lexical-binding: t -*- ;; 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) (with-current-buffer buffer (riece-send-string "PING riece-keepalive\r\n"))) (current-buffer))))) (defun riece-keepalive-after-close-hook () (when riece-keepalive-timer (riece-cancel-timer riece-keepalive-timer) (setq riece-keepalive-timer nil))) (defun riece-keepalive-insinuate () (add-hook 'riece-after-login-hook 'riece-keepalive-after-login-hook) (add-hook 'riece-after-close-hook 'riece-keepalive-after-close-hook)) (defun riece-keepalive-uninstall () (remove-hook 'riece-after-login-hook 'riece-keepalive-after-login-hook) (remove-hook 'riece-after-close-hook 'riece-keepalive-after-close-hook)) (provide 'riece-keepalive) ;;; riece-ignore.el ends here riece-9.0.0/lisp/riece-xface.el0000644000076400007640000000553311546262045013217 00000000000000;;; riece-xface.el --- display X-Face in IRC buffers -*- lexical-binding: t -*- ;; 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 riece-9.0.0/lisp/riece-400.el0000644000076400007640000000607511546263151012435 00000000000000;;; riece-400.el --- handlers for 400 replies -*- lexical-binding: t -*- ;; 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) (require 'riece-commands) (eval-when-compile (autoload 'riece-default-handle-numeric-reply "riece-handle")) (defun riece-handle-default-400-message (prefix number name string) (riece-default-handle-numeric-reply riece-error-prefix prefix number name string)) (defun riece-handle-read-string (prompt) (condition-case nil (let (inhibit-quit) (read-string prompt)) (quit (ignore (message "%s" (concat prompt "Quit")))))) (defun riece-handle-432-message (_prefix _number _name string) "ERR_ERRONEUSNICKNAME \" :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 riece-9.0.0/lisp/riece-command-previous-channel.xpm0000644000076400007640000000360511377612201017224 00000000000000/* XPM */ static char *riece_command_previous_channel[] = { /* columns rows colors chars-per-pixel */ "24 24 75 1", " c #1F4985", ". c #204A86", "X c #204A87", "o c #214A87", "O c #204B87", "+ c #214C87", "@ c #204A88", "# c #214A88", "$ c #204B88", "% c #214B88", "& c #214C88", "* c #204C89", "= c #214C89", "- c #224D89", "; c #244D89", ": c #244F8B", "> c #28528C", ", c #2E5D9B", "< c #355D96", "1 c #305E9D", "2 c #3C639B", "3 c #3564A0", "4 c #3465A4", "5 c #3767A5", "6 c #3A68A3", "7 c #3868A6", "8 c #3B6AA7", "9 c #3B6BA7", "0 c #3C6BA7", "q c #3F6CA6", "w c #3E6CA8", "e c #3F70AB", "r c #3F70AC", "t c #41679D", "y c #456DA2", "u c #406EA9", "i c #446FA8", "p c #406FAC", "a c #4971A6", "s c #4471AB", "d c #4571AB", "f c #4572AB", "g c #4070AC", "h c #4071AC", "j c #4171AC", "k c #4070AD", "l c #4071AD", "z c #4171AD", "x c #4672AC", "c c #4972A9", "v c #4B73A9", "b c #4C74AB", "n c #4A74AC", "m c #4A75AD", "M c #4E78AF", "N c #4979B3", "B c #4A7AB3", "V c #4B7BB3", "C c #4D79B1", "Z c #4D7BB4", "A c #547FB5", "S c #5781B5", "D c #5883B8", "F c #5884B9", "G c #5D87BA", "H c #6089BA", "J c #618ABB", "K c #628BBC", "L c #638BBC", "P c #638CBC", "I c #6990BE", "U c #6E92BF", "Y c #6991C0", "T c #6D94C2", "R c None", /* pixels */ "RRRRRRRRRRRRRRRRRRRRRRRR", "RRRRRRRRRRRRRRRRRRRRRRRR", "RRRRRRRRRRRRRRRRRRRRRRRR", "RRRRRRRRRRRR*XRRRRRRRRRR", "RRRRRRRRRRR$nw444444444444MoRR", "RRRRRR:iw44444444444moRR", "RRRRRRR-q0449sfffffxdoRR", "RRRRRRRR=684u+XXXXXXXXRR", "RRRRRRRRR&379XRRRRRRRRRR", "RRRRRRRRRR@15XRRRRRRRRRR", "RRRRRRRRRRRO,XRRRRRRRRRR", "RRRRRRRRRRRRXXRRRRRRRRRR", "RRRRRRRRRRRRR RRRRRRRRRR", "RRRRRRRRRRRRRRRRRRRRRRRR", "RRRRRRRRRRRRRRRRRRRRRRRR", "RRRRRRRRRRRRRRRRRRRRRRRR" }; riece-9.0.0/lisp/ChangeLog.Liece0000644000076400007640000046011311377612201013306 000000000000002003-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. riece-9.0.0/lisp/riece-url.el0000664000076400007640000001252611546264632012741 00000000000000;;; riece-url.el --- collect URL in IRC buffers -*- lexical-binding: t -*- ;; 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 (require 'easymenu) (autoload 'browse-url "browse-url") (defvar browse-url-browser-function) (defgroup riece-url nil "URL Browsing in IRC buffer." :prefix "riece-" :group 'riece) ;; the default value was copied from gnus-button-url-regexp (defcustom riece-url-regexp (concat "\\b\\(\\(www\\.\\|\\(s?https?\\|ftp\\|file\\|gopher\\|" "nntp\\|news\\|telnet\\|wais\\|mailto\\|info\\):\\)" "\\(//[-a-z0-9_.]+:[0-9]*\\)?" (if (string-match "[[:digit:]]" "1") ;; Support POSIX? (let ((chars "-a-z0-9_=#$@~%&*+\\/[:word:]") (punct "!?:;.,")) (concat "\\(?:" ;; Match paired parentheses, e.g. in Wikipedia URLs: ;; http://thread.gmane.org/47B4E3B2.3050402@gmail.com "[" chars punct "]+" "(" "[" chars punct "]+" "[" chars "]*)" "[" chars "]*" "\\|" "[" chars punct "]+" "[" chars "]" "\\)")) (concat ;; XEmacs 21.4 doesn't support POSIX. "\\([-a-z0-9_=!?#$@~%&*+\\/:;.,]\\|\\w\\)+" "\\([-a-z0-9_=#$@~%&*+\\/]\\|\\w\\)")) "\\)") "Regular expression that matches URLs." :group 'riece-url :type 'regexp) (defcustom riece-url-regexp-alist nil "An alist mapping regexp to URL. For example: (setq riece-url-regexp-alist '((\"\\\\bBug#\\\\([0-9]+\\\\)\\\\b\" . \"http://bugs.debian.org/\\\\1\"))) This maps a string \"Bug#12345\" to a URL \"http://bugs.debian.org/12345\"." :type 'alist :group 'riece-url) (defvar riece-urls nil "A list of URL which appears in Riece buffers.") (defconst riece-url-description "Collect URL in IRC buffers.") (autoload 'widget-convert-button "wid-edit") (defun riece-url-replace-match (string) (let ((match-data (match-data)) (index 0) number replacement) (while (string-match "\\\\[&1-9\\\\]" string index) (if (eq (aref string (1+ (match-beginning 0))) ?&) (setq number 0) (unless (eq (aref string (1+ (match-beginning 0))) ?\\) (setq number (string-to-number (substring (match-string 0 string) 1))))) (if number (setq replacement (buffer-substring (nth (* number 2) match-data) (nth (1+ (* number 2)) match-data))) (setq replacement "\\")) (setq string (concat (substring string 0 (match-beginning 0)) replacement (substring string (match-end 0))) index (+ index (length replacement)))) string)) (defun riece-url-scan-region (start end) (let ((alist (cons (cons riece-url-regexp "\\&") riece-url-regexp-alist))) (while alist (save-excursion (goto-char start) (while (re-search-forward (car (car alist)) end t) (let ((url (save-match-data (riece-url-replace-match (cdr (car alist)))))) (if (memq 'riece-highlight riece-addons) (widget-convert-button 'url-link (match-beginning 0) (match-end 0) url)) (unless (member url riece-urls) (setq riece-urls (cons url riece-urls)))))) (setq alist (cdr alist))))) (defun riece-command-browse-url (&optional url) (interactive (list (completing-read (riece-mcat "Open URL: ") (mapcar #'list riece-urls)))) (browse-url url)) (defun riece-url-create-menu (_menu) (mapcar (lambda (url) (vector url (list 'browse-url url))) riece-urls)) (defvar riece-dialogue-mode-map) (defun riece-url-requires () (append (if (memq 'riece-highlight riece-addons) '(riece-highlight)) (if (memq 'riece-menu riece-addons) '(riece-menu)))) (defun riece-url-command-mode-hook () (easy-menu-add-item nil (list (car riece-menu-items)) (list (if (featurep 'xemacs) "Open URL..." (riece-mcat "Open URL...")) :filter 'riece-url-create-menu))) (defun riece-url-insinuate () (add-hook 'riece-after-insert-functions 'riece-url-scan-region) (if (memq 'riece-menu riece-addons) (add-hook 'riece-command-mode-hook 'riece-url-command-mode-hook t))) (defun riece-url-uninstall () (easy-menu-remove-item nil (list (car riece-menu-items)) (if (featurep 'xemacs) "Open URL..." (riece-mcat "Open URL..."))) (remove-hook 'riece-after-insert-functions 'riece-url-scan-region) (remove-hook 'riece-command-mode-hook 'riece-url-command-mode-hook)) (defun riece-url-enable () (define-key riece-dialogue-mode-map "U" 'riece-command-browse-url)) (defun riece-url-disable () (define-key riece-dialogue-mode-map "U" nil)) (provide 'riece-url) ;;; riece-url.el ends here riece-9.0.0/lisp/riece-command-part.xpm0000644000076400007640000000602511377612201014707 00000000000000/* XPM */ static char *riece_command_part[] = { /* columns rows colors chars-per-pixel */ "24 24 108 2", " c #4F514E", ". c #51524F", "X c #535550", "o c #535652", "O c #545552", "+ c #545553", "@ c #555653", "# c #545753", "$ c #565753", "% c #555754", "& c #565754", "* c #565854", "= c #565954", "- c #575954", "; c #565855", ": c #575855", "> c #565955", ", c #575955", "< c #575A55", "1 c #575A56", "2 c #585955", "3 c #585A55", "4 c #585956", "5 c #585A56", "6 c #595A56", "7 c #585B56", "8 c #585A57", "9 c #585B57", "0 c #595B57", "q c #71726E", "w c #747672", "e c #757773", "r c #767874", "t c #777974", "y c #767875", "u c #777975", "i c #7A7B78", "p c #7A7C78", "a c #7D7F7A", "s c #7D7F7C", "d c #7F817D", "f c #81827E", "g c #80827F", "h c #828480", "j c #828481", "k c #838481", "l c #848582", "z c #858783", "x c #858784", "c c #868784", "v c #888A85", "b c #888986", "n c #888A86", "m c #898B86", "M c #898A87", "N c #8B8D8A", "B c #8C8E89", "V c #8C8D8A", "C c #8C8E8A", "Z c #8E8F8B", "A c #8E8F8C", "S c #8F8F8C", "D c #8F908C", "F c #8F918C", "G c #90928D", "H c #90928E", "J c #91928E", "K c #91938E", "L c #919390", "P c #929490", "I c #929590", "U c #939590", "Y c #939591", "T c #949691", "R c #949692", "E c #959792", "W c #959793", "Q c #969793", "! c #969893", "~ c #979994", "^ c #989A95", "/ c #999B97", "( c #9A9B97", ") c #9B9D99", "_ c #9C9E9A", "` c #9E9F9B", "' c #A0A19D", "] c #A0A29D", "[ c #A0A29E", "{ c #A1A39F", "} c #A2A4A0", "| c #A4A6A1", " . c #A8A9A5", ".. c #A9AAA6", "X. c #A9ABA7", "o. c #AAACA8", "O. c #ABACA8", "+. c #ABADA9", "@. c #ACADA9", "#. c #ACAEAA", "$. c #ADAEAA", "%. c #ADAEAB", "&. c #AEAFAC", "*. c #AEB0AC", "=. c #AFB0AC", "-. c #AEB0AD", ";. c #AFB1AE", ":. c None", /* pixels */ ":.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.", ":.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.", ":.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.", ":.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.", ":.:.:.:.:.9 7 7 :.:.:.:.:.:.:.:.6 0 8 :.:.:.:.:.", ":.:.:.:.9 D ;.L 4 :.:.:.:.:.:.3 J ;.L 8 :.:.:.:.", ":.:.:.:.5 -.F #.S 4 :.:.:.:.3 N +.G *.< :.:.:.:.", ":.:.:.:.1 x .K @.A 5 :.:.3 V +.K .x 1 :.:.:.:.", ":.:.:.:.:.1 M ..R %.Z 2 , C $.R ..M 1 :.:.:.:.:.", ":.:.:.:.:.:.1 n o.~ =.A C &.~ o.n 1 :.:.:.:.:.:.", ":.:.:.:.:.:.:.1 b O./ X.X./ O.b 1 :.:.:.:.:.:.:.", ":.:.:.:.:.:.:.:.> l | ^ ^ | c > :.:.:.:.:.:.:.:.", ":.:.:.:.:.:.:.:.: z { E E { j : :.:.:.:.:.:.:.:.", ":.:.:.:.:.:.:.4 k } T ] ] T } k 4 :.:.:.:.:.:.:.", ":.:.:.:.:.:.4 f ` G [ h g ' G ` f 4 :.:.:.:.:.:.", ":.:.:.:.:.4 a ( B _ d : ; s ) B ( a 4 :.:.:.:.:.", ":.:.:.:.< y W v ~ p : :.:., p ! v Q i $ :.:.:.:.", ":.:.:.:.- I v Y u $ :.:.:.:.% r U m P = :.:.:.:.", ":.:.:.:.+ e H w @ :.:.:.:.:.:.# q D t O :.:.:.:.", ":.:.:.:.:.o * . :.:.:.:.:.:.:.:. & X :.:.:.:.:.", ":.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.", ":.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.", ":.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.", ":.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:." }; riece-9.0.0/lisp/riece-foolproof.el0000644000076400007640000000447611546262045014143 00000000000000;;; riece-foolproof.el --- prevent miss-operation in the command buffer -*- lexical-binding: t -*- ;; Copyright (C) 2004 TAKAHASHI Kaoru ;; Author: TAKAHASHI 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 riece-9.0.0/lisp/riece-mode.el0000664000076400007640000000442211546262045013053 00000000000000;;; riece-mode.el --- functions for manipulating channel/user modes -*- lexical-binding: t -*- ;; 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 riece-9.0.0/lisp/riece-highlight.el0000644000076400007640000002536511546264214014105 00000000000000;;; riece-highlight.el --- highlight IRC buffers -*- lexical-binding: t -*- ;; 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 '(repeat (cons character symbol)) :group 'riece-highlight) (defcustom riece-channel-list-font-lock-keywords '(("^[ 0-9][0-9]:\\(.\\)\\(.*\\)" (2 (or (cdr (assq (aref (match-string 1) 0) riece-channel-list-mark-face-alist)) riece-channel-list-default-face)))) "Default expressions to highlight in riece-channel-list-mode." :type '(repeat (list string)) :group 'riece-highlight) (unless (riece-facep 'riece-modeline-current-face) (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) (riece-make-local-hook 'after-change-functions) (add-hook 'after-change-functions 'riece-highlight-hide-prefix nil t) (if (get 'riece-highlight 'riece-addon-enabled) (font-lock-mode 1))) (defun riece-highlight-setup-channel-list () (make-local-variable 'font-lock-defaults) (setq font-lock-defaults '(riece-channel-list-font-lock-keywords t)) ;; In XEmacs, auto-initialization of font-lock is not affective ;; when buffer-file-name is not set. (font-lock-set-defaults) (if (get 'riece-highlight 'riece-addon-enabled) (font-lock-mode 1))) (defun riece-highlight-hide-prefix (start _end _length) (save-excursion (goto-char start) (if (looking-at riece-prefix-regexp) (put-text-property (match-beginning 1) (match-end 1) 'invisible t)))) (defun riece-highlight-put-overlay-faces (start end) (if (get 'riece-highlight 'riece-addon-enabled) (riece-scan-property-region 'riece-overlay-face start end (lambda (start end) (riece-overlay-put (riece-make-overlay start end) 'face (get-text-property start 'riece-overlay-face)))))) (defun riece-highlight-format-identity-for-channel-list-indicator (index identity) (if (and (get 'riece-highlight 'riece-addon-enabled) (riece-identity-equal identity riece-current-channel)) (let ((string (riece-format-identity identity)) (start 0)) ;; Escape % -> %%. (while (string-match "%" string start) (setq start (1+ (match-end 0)) string (replace-match "%%" nil nil string))) (list (format "%d:" index) (riece-propertize-modeline-string string 'face 'riece-modeline-current-face))))) (defun riece-highlight-insinuate () (put 'riece-channel-mode 'font-lock-defaults '(riece-dialogue-font-lock-keywords t)) (put 'riece-others-mode 'font-lock-defaults '(riece-dialogue-font-lock-keywords t)) (put 'riece-dialogue-mode 'font-lock-defaults '(riece-dialogue-font-lock-keywords t)) (add-hook 'riece-dialogue-mode-hook 'riece-highlight-setup-dialogue) (put 'riece-channel-list-mode 'font-lock-defaults '(riece-channel-list-font-lock-keywords t)) (add-hook 'riece-channel-list-mode-hook 'riece-highlight-setup-channel-list) (add-hook 'riece-format-identity-for-channel-list-indicator-functions 'riece-highlight-format-identity-for-channel-list-indicator) (add-hook 'riece-after-insert-functions 'riece-highlight-put-overlay-faces)) (defun riece-highlight-uninstall () (let ((buffers riece-buffer-list)) (save-excursion (while buffers (set-buffer (car buffers)) (if (riece-derived-mode-p 'riece-dialogue-mode) (remove-hook 'after-change-functions 'riece-highlight-hide-prefix t)) (setq buffers (cdr buffers))))) (riece-remprop 'riece-channel-mode 'font-lock-defaults) (riece-remprop 'riece-others-mode 'font-lock-defaults) (riece-remprop 'riece-dialogue-mode 'font-lock-defaults) (remove-hook 'riece-dialogue-mode-hook 'riece-highlight-setup-dialogue) (riece-remprop 'riece-channel-list-mode 'font-lock-defaults) (remove-hook 'riece-channel-list-mode-hook 'riece-highlight-setup-channel-list) (remove-hook 'riece-format-identity-for-channel-list-indicator-functions 'riece-highlight-format-identity-for-channel-list-indicator) (remove-hook 'riece-after-insert-functions 'riece-highlight-put-overlay-faces)) (defun riece-highlight-enable () (let ((buffers riece-buffer-list)) (while buffers (if (with-current-buffer (car buffers) (riece-derived-mode-p 'riece-dialogue-mode 'riece-channel-list-mode)) (with-current-buffer (car buffers) (font-lock-mode 1))) (setq buffers (cdr buffers))))) (defun riece-highlight-disable () (let ((buffers riece-buffer-list)) (while buffers (if (with-current-buffer (car buffers) (riece-derived-mode-p 'riece-dialogue-mode 'riece-channel-list-mode)) (with-current-buffer (car buffers) (font-lock-mode 0))) (setq buffers (cdr buffers))))) (provide 'riece-highlight) ;;; riece-highlight.el ends here riece-9.0.0/lisp/Makefile.in0000664000076400007640000004447711761025271012600 00000000000000# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = lisp DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(srcdir)/riece-package-info.el.in ChangeLog ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = riece-package-info.el CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EMACS = @EMACS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ PACKAGE = @PACKAGE@ PACKAGEDIR = @PACKAGEDIR@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XEMACS = @XEMACS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ am__leading_dot = @am__leading_dot@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ lispdir = @lispdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ 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 riece-twitter.el \ riece-desktop-notify.el \ url-riece.el \ riece-command-previous-channel.xpm riece-command-next-channel.xpm \ riece-command-configure-windows.xpm riece-command-list-addons.xpm \ riece-command-join.xpm riece-command-part.xpm \ server.rb aproxy.rb CLEANFILES = auto-autoloads.el custom-load.el *.elc lunit-report.xml DISTCLEANFILES = riece-package-info.el all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lisp/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu lisp/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): riece-package-info.el: $(top_builddir)/config.status $(srcdir)/riece-package-info.el.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am $(MAKE) $(AM_MAKEFLAGS) check-local check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install-exec: install-exec-recursive install-data: install-data-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) check-am \ ctags-recursive install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am check-local clean clean-generic \ ctags ctags-recursive distclean distclean-generic \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic pdf pdf-am ps ps-am tags \ tags-recursive uninstall uninstall-am FLAGS ?= -batch -q -no-site-file all: elc elc: $(EMACS) $(FLAGS) -l $(srcdir)/COMPILE -f riece-compile \ $(srcdir) install: elc $(EMACS) $(FLAGS) -l $(srcdir)/COMPILE -f riece-install \ $(srcdir) $(lispdir) # $(MAKE) uninstall: $(EMACS) $(FLAGS) -l $(srcdir)/COMPILE -f riece-uninstall \ $(lispdir) package: $(XEMACS) $(FLAGS) -l $(srcdir)/COMPILE -f riece-compile-package \ $(srcdir) install-package: package $(XEMACS) $(FLAGS) -l $(srcdir)/COMPILE -f riece-install-package \ $(srcdir) $(PACKAGEDIR) # $(MAKE) check-local: $(EMACS) $(FLAGS) -l $(srcdir)/COMPILE -f riece-test \ $(srcdir) lunit-report.xml compile-individually: @for i in `$(EMACS) $(FLAGS) -l $(srcdir)/COMPILE -f riece-examine`; \ do \ echo $(EMACS) $(FLAGS) -l $(srcdir)/COMPILE \ -f riece-compile-module $$i; \ $(EMACS) $(FLAGS) -l $(srcdir)/COMPILE \ -f riece-compile-module $$i; \ done update-mcat: $(EMACS) $(FLAGS) -l $(srcdir)/COMPILE -f riece-update-mcat \ $(srcdir) # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: riece-9.0.0/lisp/riece-command-join.xpm0000644000076400007640000001044511377612201014701 00000000000000/* XPM */ static char *riece_command_join[] = { /* columns rows colors chars-per-pixel */ "24 24 189 2", " c #EDD400", ". c #F2F02B", "X c #F5F328", "o c #F5F329", "O c #F4F22A", "+ c #F5F32A", "@ c #F2F02C", "# c #F4F22D", "$ c #EBE933", "% c #EDEC32", "& c #80827E", "* c #D1D150", "= c #D2D25E", "- c #E0DF40", "; c #E3E242", ": c #EFEE4F", "> c #E4E351", ", c #F0EF55", "< c #F2F152", "1 c #F2F157", "2 c #C2C261", "3 c #CDCD66", "4 c #EFEE60", "5 c #ECEC6B", "6 c #F1F063", "7 c #F7F66E", "8 c #EFEF70", "9 c #EEEE74", "0 c #E2E27D", "q c #ECEB79", "w c #EBEB7D", "e c #EBEC7C", "r c #F0EF76", "t c #F1F177", "y c #F7F677", "u c #F1F07E", "i c #838581", "p c #8A8C87", "a c #8B8D88", "s c #8C8E88", "d c #8C8E89", "f c #8D8F8A", "g c #8D908A", "h c #8E908B", "j c #8F918B", "k c #90928C", "l c #91938E", "z c #92948F", "x c #93958F", "c c #939590", "v c #949691", "b c #959892", "n c #979993", "m c #989A95", "M c #999B96", "N c #9A9D97", "B c #9C9E98", "V c #9D9F9A", "C c #9FA283", "Z c #9EA19B", "A c #9FA29C", "S c #BEBF81", "D c #A1A39D", "F c #A2A59E", "G c #ABAE9D", "H c #B3B594", "J c #A3A6A0", "K c #A4A7A1", "L c #A6A9A2", "P c #A6A9A3", "I c #A7A9A3", "U c #A7AAA3", "Y c #A7AAA4", "T c #A8AAA4", "R c #AAADA6", "E c #ABAEA7", "W c #EBEB86", "Q c #EDED8D", "! c #EEEE8E", "~ c #EFEE8F", "^ c #F0EF8D", "/ c #F1F082", "( c #F9F780", ") c #F0F08D", "_ c #E9E995", "` c #ECEC96", "' c #EAEB98", "] c #ECEB99", "[ c #F0F09D", "{ c #E7E9A2", "} c #E8E8A5", "| c #E8E9A5", " . c #E9EAA6", ".. c #E6E8AB", "X. c #E7E8AD", "o. c #EDEDAB", "O. c #EBEBAF", "+. c #FBFAAC", "@. c #EFEFB5", "#. c #E5E7BB", "$. c #E7E8BE", "%. c #F0F0B2", "&. c #F1F0B5", "*. c #F2F2B7", "=. c #F7F7BB", "-. c #DADBD9", ";. c #DDDEDB", ":. c #E5E7C3", ">. c #E4E5CB", ",. c #E4E6CB", "<. c #E5E7CB", "1. c #F0F0C1", "2. c #F0F0C7", "3. c #FBFBCA", "4. c #E3E5D0", "5. c #E3E5D3", "6. c #E4E6D0", "7. c #E4E6D4", "8. c #EAEBD1", "9. c #E4E7D8", "0. c #E2E4DF", "q. c #E2E5DF", "w. c #E4E6DD", "e. c #E5E7DE", "r. c #E7E8D9", "t. c #ECEDDC", "y. c #EFF0D1", "u. c #EFF0DA", "i. c #FBFBD5", "p. c #FAFADA", "a. c #FCFBD8", "s. c #E2E4E0", "d. c #E3E4E0", "f. c #E2E5E0", "g. c #E3E5E0", "h. c #E3E5E1", "j. c #E4E6E1", "k. c #E4E6E2", "l. c #E4E7E2", "z. c #E5E7E2", "x. c #E5E7E3", "c. c #E6E7E3", "v. c #E5E8E3", "b. c #E6E8E4", "n. c #E7E8E4", "m. c #E7E9E5", "M. c #E8E9E6", "N. c #E8EAE6", "B. c #E9EAE6", "V. c #E9EAE7", "C. c #E9EBE7", "Z. c #EAEBE8", "A. c #EBECE9", "S. c #ECEDEA", "D. c #ECEEEB", "F. c #EDEEEB", "G. c #EDEFEB", "H. c #EDEEEC", "J. c #EEEEEC", "K. c #EEEFEC", "L. c #EFEFED", "P. c #EFF0E9", "I. c #EFF0ED", "U. c #EFF0EE", "Y. c #F0F0EE", "T. c #F0F1EF", "R. c #F1F1EF", "E. c #FDFCEA", "W. c #FDFCEC", "Q. c #FEFDEC", "!. c #FEFEEF", "~. c #F1F1F0", "^. c #F1F2F0", "/. c #F2F2F0", "(. c #F2F2F1", "). c #F2F3F1", "_. c #F3F3F2", "`. c #F3F4F2", "'. c #F4F4F3", "]. c #F5F5F4", "[. c #FEFEF6", "{. c #FEFEF7", "}. c #FDFDF9", "|. c #FEFEF8", " X c #FEFEFA", ".X c #FEFEFB", "XX c #FEFEFE", "oX c gray100", "OX c None", /* pixels */ "OXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOX", "OXOXOXE T Y Y U I P G H S 3 OXOXOXOXOXOXOXOXOXOX", "OXOXR ;.XXoXoXoXoXQ.p.*.] 0 = > O OXOXOXOXOXOXOX", "OXOXL XXG.C.N.b.9.:. .! t 6 ; @ + OXOXOXOXOX", "OXOXK oXN.m.b.e.<...` 5 : {.oX % O + OXOXOXOX", "OXOXJ oXb.v.l.7.#._ 3.oXoX!. + OXOXOX", "OXOXF oXl.k.j.6.X. =.}.oXoXoXoXoXoXoXa. OXOXOX", "OXOXD oXj.h.g.,.} w .XoXoXoXoXoXoXoX o + OXOX", "OXOXA oXg.f.f.>.{ q y XXoXoXoXoXoXi. o + OXOX", "OXOXZ oXd.f.q.4.| e , W.oXoXoXoXoX . o + OXOX", "OXOXV oX0.f.s.5.X.W 4 XoXoXoXoXoX $ o OXOXOX", "OXOXB oXf.g.h.w.$.' 9 oX[. E.oX - + OXOXOX", "OXOXN oXz.x.c.b.r.O.Q 8 # X 7 * OXOXOXOX", "OXOXM oXn.m.M.N.V.8.o.~ r 6 1 < 1 6 ( 2 OXOXOXOX", "OXOXm oXB.C.Z.A.A.S.t.@.[ ) / u / ^ +.C OXOXOXOX", "OXOXn oXZ.A.S.F.H.K.L.P.u.2.&.%.1.y.|.z OXOXOXOX", "OXOXb oXA.S.F.K.I.Y.R.^.(.).).(./.R.oXl OXOXOXOX", "OXOXv oXS.F.K.I.Y.R./._.'.].].'._.).oXk OXOXOXOX", "OXOXc oXS.F.J.L.U.T.^.)._.`.`._.)./.oXh OXOXOXOX", "OXOXx XXF.S.D.H.K.I.Y.T.T.R.R.R.T.~.XXh OXOXOXOX", "OXOXg -.XXoXoXoXoXoXoXoXoXoXoXoXoXXX-.p OXOXOXOX", "OXOXOXi j h h h g f f f d d d s a d & OXOXOXOXOX", "OXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOX", "OXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOXOX" }; riece-9.0.0/lisp/riece-history.el0000644000076400007640000001327711546262045013636 00000000000000;;; riece-history.el --- manage history of channel shifting -*- lexical-binding: t -*- ;; 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 riece-9.0.0/lisp/riece-eval.el0000644000076400007640000000547711546262045013067 00000000000000;;; riece-eval.el --- evaluate input string as an elisp form -*- lexical-binding: t -*- ;; 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 riece-9.0.0/lisp/riece-command-configure-windows.xpm0000644000076400007640000000744211377612201017416 00000000000000/* XPM */ static char *riece_command_configure_windows[] = { /* columns rows colors chars-per-pixel */ "24 24 156 2", " c #1D3F75", ". c #1C4177", "X c #1D447B", "o c #1F4986", "O c #1F4B87", "+ c #1F4A88", "@ c #1F4B88", "# c #204985", "$ c #204987", "% c #204A86", "& c #204A87", "* c #214A87", "= c #204B87", "- c #214B87", "; c #244B86", ": c #214C87", "> c #204988", ", c #204A88", "< c #214A88", "1 c #204B88", "2 c #214B88", "3 c #214B89", "4 c #224B88", "5 c #204C88", "6 c #214C88", "7 c #214C89", "8 c #224C88", "9 c #224C89", "0 c #234D89", "q c #224C8A", "w c #224D8B", "e c #234E8B", "r c #244D89", "t c #254D89", "y c #254F8A", "u c #244E8B", "i c #274F8A", "p c #264E8B", "a c #234E8C", "s c #234F8C", "d c #244E8C", "f c #244F8D", "g c #26508B", "h c #27518C", "j c #28508C", "k c #28528D", "l c #2B538D", "z c #29548E", "x c #285390", "c c #2B5590", "v c #2B5792", "b c #2C5590", "n c #2D5690", "m c #2A5695", "M c #2F5996", "N c #2F5B97", "B c #2E5D9C", "V c #315991", "C c #305A96", "Z c #305E9B", "A c #355E99", "S c #30609E", "D c #31619F", "F c #35619C", "G c #3A649A", "H c #3A649D", "J c #3162A1", "K c #3262A1", "L c #3363A2", "P c #3364A3", "I c #3564A2", "U c #3465A4", "Y c #3667A4", "T c #3864A1", "R c #3865A2", "E c #3C67A1", "W c #3867A4", "Q c #3768A5", "! c #3768A6", "~ c #3C68A3", "^ c #3969A6", "/ c #3A69A7", "( c #3D6BA6", ") c #3A6BA8", "_ c #3A6AA9", "` c #3E6CA8", "' c #3F6DA8", "] c #43689A", "[ c #436BA3", "{ c #446BA1", "} c #466EA3", "| c #4B6DA1", " . c #426EA8", ".. c #416FAA", "X. c #406FAB", "o. c #4B71A5", "O. c #4B71A6", "+. c #4672AC", "@. c #4874AD", "#. c #4974AF", "$. c #4B76AE", "%. c #4B77AE", "&. c #4D78AF", "*. c #4E78AF", "=. c #5173A3", "-. c #577AAB", ";. c #4F7AB0", ":. c #507AB0", ">. c #517BB0", ",. c #517BB1", "<. c #537CB1", "1. c #547DB0", "2. c #547DB2", "3. c #577FB3", "4. c #5880B4", "5. c #5B82B5", "6. c #5F84B4", "7. c #6086B7", "8. c #6286B6", "9. c #6487B5", "0. c #6288B8", "q. c #6288B9", "w. c #648ABA", "e. c #668BBA", "r. c #678CBB", "t. c #688DBB", "y. c #6D8FBA", "u. c #6C8EBB", "i. c #6E91BE", "p. c #7493BC", "a. c #7294BF", "s. c #7895BD", "d. c #628DC3", "f. c #658EC4", "g. c #6C96CA", "h. c #7999C3", "j. c #7B9BC4", "k. c #7E9DC5", "l. c #819DC3", "z. c #809EC6", "x. c #83A1C7", "c. c #85A2C7", "v. c #86A2C7", "b. c #84A1C8", "n. c #86A3C8", "m. c #87A3C8", "M. c #89A4C9", "N. c #8AA5C9", "B. c #8BA7CB", "V. c #8FA9CB", "C. c #90ABCC", "Z. c #91ABCD", "A. c #91ACCE", "S. c #93ADCE", "D. c #95AECF", "F. c None", /* pixels */ "F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.", "F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.", "F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.", "F.F.F.F.F.F.F.4 7 , 1 2 6 1 F.F.F.F.F.F.O F.F.F.", "F.F.F.F.F.4 6 m S L ^ ( ~ F z < F.F.F.2 & F.F.F.", "F.F.F.F.4 f P J S W ' +.$.*.<.1.A - 2 { l F.F.F.", "F.F.F.F.0 B s 7 d 1 + k H >.,.@.7.6.O.j.j F.F.F.", "F.F.F.4 d 9 R X.Y F.F.F.7 7 [ w.&.%.i.z.h F.F.F.", "F.F.F.3 & #.d./ F.F.F.F.F.F.7 c 9.r.U b.y F.F.F.", "F.F.F.7 M g.F._ F.F.F.F.F.F.F.p y.;.U B.: F.F.F.", "F.F.F.5 F.F.F.F.F.F.F.F.F.F.- 9.k.x.B.A.2 F.F.F.", "F.F.F.F.F.F.F.F.F.F.F.F.F.O & r 8 8 2 2 & F.F.F.", "F.F.F.2 = = = = = = * F.F.F.F.F.F.F.F.F.F.F.F.F.", "F.F.F.* M.V.V.V.c.V F.F.F.F.F.F.F.F.F.F.< F.F.F.", "F.F.F., C.' ` m.| - F.F.F.F.F.F.) F.F.C w F.F.F.", "F.F.F.@ Z.Q 7.N.n 6 F.F.F.F.F.F.! f.E % q F.F.F.", "F.F.F.O S.a.&.q.n.} 2 = F.F.F.K T x a e F.F.F.F.", "F.F.F.= D.p.v.h.5.a.u.o.G b u g v Z D 2 F.F.F.F.", "F.F.F.> s.4 : =.l.t.0.7.4.3.2.$...I 7 F.F.F.F.F.", "F.F.F.% i F.F.F.; ] -.8.e.5.:. .N , F.F.F.F.F.", "F.F.F.$ F.F.F.F.F.F.. # & t & o X F.F.F.F.F.F.F.", "F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.", "F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.", "F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F.F." }; riece-9.0.0/lisp/riece-identity.el0000644000076400007640000001734211546262045013763 00000000000000;;; riece-identity.el --- an identity object -*- lexical-binding: t -*- ;; 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 riece-9.0.0/lisp/riece-handle.el0000644000076400007640000003507311546262474013374 00000000000000;;; riece-handle.el --- basic message handlers -*- lexical-binding: t -*- ;; 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 (if riece-real-nickname (riece-identity-equal-no-server user riece-real-nickname)))) ;; message from server (riece-insert-notice (list riece-dialogue-buffer riece-others-buffer) (concat (riece-concat-server-name message) "\n"))))) (defun riece-handle-ping-message (_prefix string) (riece-send-string (format "PONG :%s\r\n" (if (eq (aref string 0) ?:) (substring string 1) string)))) (defun riece-handle-join-message (prefix string) (let* ((user (riece-prefix-nickname prefix)) ;; RFC2812 3.2.1 doesn't recommend server to send join ;; messages which contain multiple targets. (channels (split-string (car (riece-split-parameters string)) ",")) (user-identity (riece-make-identity user riece-server-name))) (while channels (riece-naming-assert-join user (car channels)) (if (and riece-gather-channel-modes (riece-identity-equal-no-server user riece-real-nickname)) (riece-send-string (format "MODE %s\r\n" (car channels)))) (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 riece-9.0.0/lisp/riece-complete.el0000644000076400007640000001006611546262045013736 00000000000000;;; riece-complete.el --- completion -*- lexical-binding: t -*- ;; 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 riece-9.0.0/lisp/url-riece.el0000644000076400007640000000737011377612201012727 00000000000000;;; 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 riece-9.0.0/lisp/riece-alias.el0000644000076400007640000001314111546262045013214 00000000000000;;; riece-alias.el --- define aliases for IRC names -*- lexical-binding: t -*- ;; 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 riece-9.0.0/lisp/riece-guess.el0000644000076400007640000000654711546262045013265 00000000000000;;; riece-guess.el --- guess the next channel, using multiple methods -*- lexical-binding: t -*- ;; 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 riece-9.0.0/lisp/riece-message.el0000644000076400007640000002211511546262045013550 00000000000000;;; riece-message.el --- generate and display message line -*- lexical-binding: t -*- ;; 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) (defcustom riece-message-format-function-alist nil "Alist mapping message types to format functions." :type 'list :group 'riece-message) (defun riece-message-make-open-bracket (message) "Make `open-bracket' string for MESSAGE." (if (eq (riece-message-type message) 'notice) "{" (if (riece-message-own-p message) ">" (if (riece-message-private-p message) "=" (if (riece-message-external-p message) "(" "<"))))) (defun riece-message-make-close-bracket (message) "Make `close-bracket' string for MESSAGE." (if (eq (riece-message-type message) 'notice) "}" (if (riece-message-own-p message) "<" (if (riece-message-private-p message) "=" (if (riece-message-external-p message) ")" ">"))))) (defun riece-message-make-name (message) "Make local identity for MESSAGE." (if (riece-message-private-p message) (if (riece-message-own-p message) (riece-format-identity (riece-message-target message) t) (riece-format-identity (riece-message-speaker message) t)) (riece-format-identity (riece-message-speaker message) t))) (defun riece-message-make-global-name (message) "Make global identity for MESSAGE." (if (riece-message-private-p message) (if (riece-message-own-p message) (riece-format-identity (riece-message-target message) t) (riece-format-identity (riece-message-speaker message) t)) (concat (riece-format-identity (riece-message-target message) t) ":" (riece-format-identity (riece-message-speaker message) t)))) (defun riece-message-buffer (message) "Return the buffer where MESSAGE should appear." (let ((target (if (riece-message-private-p message) (if (riece-message-own-p message) (riece-message-target message) (riece-message-speaker message)) (riece-message-target message)))) (unless (riece-identity-member target riece-current-channels) (riece-join-channel target) ;; If you are not joined to any channel, ;; switch to the target immediately. (unless riece-current-channel (riece-switch-to-channel target))) (riece-channel-buffer target))) (defun riece-message-parent-buffers (message buffer) "Return the parents of BUFFER where MESSAGE should appear. Normally they are *Dialogue* and/or *Others*." (if (and buffer (riece-frozen buffer)) ;the message might not be ;visible in buffer's window (list riece-dialogue-buffer riece-others-buffer) (if (and riece-current-channel ;the message is not sent to ;the current channel (if (riece-message-private-p message) (if (riece-message-own-p message) (not (riece-identity-equal (riece-message-target message) riece-current-channel)) (not (riece-identity-equal (riece-message-speaker message) riece-current-channel))) (not (riece-identity-equal (riece-message-target message) riece-current-channel)))) (list riece-dialogue-buffer riece-others-buffer) riece-dialogue-buffer))) (defun riece-format-message-1 (message &optional global) (let ((open-bracket (funcall riece-message-make-open-bracket-function message)) (close-bracket (funcall riece-message-make-close-bracket-function message)) (name (if global (funcall riece-message-make-global-name-function message) (funcall riece-message-make-name-function message))) (server-name (riece-identity-server (riece-message-speaker message)))) (riece-with-server-buffer server-name (concat (if global (riece-concat-server-name (concat open-bracket name close-bracket " " (riece-message-text message))) (concat open-bracket name close-bracket " " (riece-message-text message))) "\n")))) (defun riece-format-message (message &optional global) (funcall (or (cdr (assq (riece-message-type message) riece-message-format-function-alist)) #'riece-format-message-1) message global)) (defun riece-display-message-1 (message) (let ((buffer (riece-message-buffer message)) parent-buffers) (when (and buffer (riece-message-own-p message) (riece-own-frozen buffer)) (with-current-buffer buffer (setq riece-freeze nil)) (riece-emit-signal 'buffer-freeze-changed buffer nil)) (setq parent-buffers (riece-message-parent-buffers message buffer)) (riece-insert buffer (riece-format-message message)) (riece-insert parent-buffers (riece-format-message message t)) (with-current-buffer buffer (run-hook-with-args 'riece-after-display-message-functions message)))) (defun riece-display-message (message) "Display MESSAGE object." (let ((functions riece-message-filter-functions)) (setq message (copy-sequence message)) (while (and functions message) (setq message (funcall (car functions) message) functions (cdr functions))) (if message (riece-display-message-1 message)))) (defun riece-make-message (speaker target text &optional type own-p) "Make an instance of message object. Arguments are appropriate to the sender, the receiver, and text content, respectively. Optional 4th argument TYPE specifies the type of the message. Currently possible values are `nil' or `notice'. Optional 5th argument is the flag to indicate that this message is not from the network." (vector speaker target text type own-p)) (defun riece-message-speaker (message) "Return the sender of MESSAGE." (aref message 0)) (defun riece-message-target (message) "Return the receiver of MESSAGE." (aref message 1)) (defun riece-message-text (message) "Return the text part of MESSAGE." (aref message 2)) (defun riece-message-type (message) "Return the type of MESSAGE. Currently possible values are `action' and `notice'." (aref message 3)) (defun riece-message-own-p (message) "Return t if MESSAGE is not from the network." (aref message 4)) (defun riece-message-set-speaker (message speaker) "Set the sender of MESSAGE." (aset message 0 speaker)) (defun riece-message-set-target (message target) "Set the receiver of MESSAGE." (aset message 1 target)) (defun riece-message-set-text (message text) "Set the text part of MESSAGE." (aset message 2 text)) (defun riece-message-set-type (message type) "Set the type of MESSAGE. Currently possible values are `action' and `notice'." (aset message 3 type)) (defun riece-message-set-own-p (message own-p) "Set t if MESSAGE is not from the network." (aset message 4 own-p)) (defun riece-message-private-p (message) "Return t if MESSAGE is a private message." (not (or (riece-channel-p (riece-identity-prefix (riece-message-speaker message))) (riece-channel-p (riece-identity-prefix (riece-message-target message)))))) (defun riece-message-external-p (message) "Return t if MESSAGE is from outside the channel." (not (riece-identity-member (riece-message-speaker message) (let ((target (riece-message-target message))) (riece-with-server-buffer (riece-identity-server target) (mapcar (lambda (user) (riece-make-identity (car user) riece-server-name)) (riece-channel-get-users (riece-identity-prefix target)))))))) (provide 'riece-message) ;;; riece-message.el ends here riece-9.0.0/lisp/riece-mcat-japanese.el0000644000076400007640000004013411746430713014636 00000000000000;;; riece-mcat.el --- message catalog for Japanese -*- coding: iso-2022-jp -*- -*- lexical-binding: t -*- ;; 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: ") ("Allow channel members to play the hangman game." . "$B%A%c%s%M%k$N;22CAw(B (Ruby $B$K$h$k$NJLL>Dj5A(B") ("Detect keywords in IRC buffers." . "$B%P%C%U%!$K=P$F$-$?%-!<%o!<%I$N8!=P(B") ("Display Channel Buffer" . "$B%A%c%s%M%k%P%C%U%!$NI=<((B") ("Display Channel List Buffer" . "$B%A%c%s%M%k0lMw%P%C%U%!$NI=<((B") ("Display User List Buffer" . "$B%f!<%60lMw%P%C%U%!$NI=<((B") ("Display X-Face & Colour Face images in IRC buffers (BBDB)." . "X-Face $B$d?'IU$-$N(B Face $B2hA|$rI=<((B (BBDB $BMxMQ(B)") ("Display X-Face in IRC buffers." . "X-Face $B$d?'IU$-(B Face $B2hA|$rI=<((B (LSDB $BMxMQ(B)") ("Display icons in IRC buffers." . "$B%"%$%3%s$rI=<((B") ("Display notification to desktop." . "$B%G%9%/%H%C%W$KDLCN(B") ("Display toolbar icons." . "$B%D!<%k%P!<$N%"%$%3%s$rI=<((B") ("Display useful buttons in IRC buffers." . "$B%\%?%s$rI=<((B") ("Encrypt/decrypt messages." . "$B%a%C%;!<%8$N0E9f2=!&I|9f(B") ("End of buffer" . "$B%P%C%U%!$N=*C<$G$9(B") ("Enter the element of kill-ring." . "kill-ring $B$+$i0l9TH/8@(B") ("Erroneous nickname \"%s\". Choose a new one: " . "$BIT@5$J%K%C%/%M!<%`(B \"%s\"$B!#?7$7$$%K%C%/%M!<%`(B: ") ("Evaluate an input string as an elisp form." . "$BF~NO9T$r(B Elisp $B$N<0$H$7$FI>2A(B") ("Evaluate input string as a Ruby program." . "$BF~NO9T$r(B Ruby $B$N<0$H$7$FI>2A(B") ("File: " . "$B%U%!%$%k(B: ") ("Finger user: " . "$B?H85$rD4$Y$k%f!<%6(B: ") ("Free old IRC messages to save memory usage." . "$B8E$$%a%C%;!<%8$r>C5n$7$F%a%b%j>CHq$r8:$i$9(B") ("Freeze Channel Buffer" . "$B<+F0%9%/%m!<%k$r6X;_(B") ("Freeze Channel Buffer Until Next Message" . "$B%a%C%;!<%8$,Mh$k$^$G<+F0%9%/%m!<%k$r6X;_(B") ("Guess the next channel, using multiple methods." . "$BJ#?t$NJ}K!$G0\F0@h$N%A%c%s%M%k$rM=B,(B") ("Help register nicknames in LSDB rolodex program." . "LSDB $B=;=jO?$K%K%C%/%M!<%`$rEPO?(B") ("Highlight IRC buffers." . "$B%P%C%U%!$N?'IU$1(B") ("Ignore messages from some users." . "$B;XDj$7$?%f!<%6$+$i$N%a%C%;!<%8$rL5;k(B") ("Invite User" . "$B%f!<%6$r>7BT$9$k(B") ("Invite user: " . "$B>7BT$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" . "$B%A%c%s%M%k$K;22C$9$k(B") ("Join channel/user" . "$B;22C$9$k%A%c%s%M%k$^$?$O%f!<%6(B") ("Join channel/user (default %s)" . "$B;22C$9$k%A%c%s%M%k$^$?$O%f!<%6(B ($B4{DjCM(B %s)") ("Keep an IRC connection." . "$B@\B3$r0];}(B") ("Key for %s: " . "%s $B$N%-!<(B: ") ("Key for %s: Quit" . "%s $B$N%-!<(B: $BCf;_(B") ("Kick User" . "$B%f!<%6$r=3$j=P$9(B") ("Kick user: " . "$B=3$j=P$9%f!<%6(B: ") ("LIST pattern: " . "LIST $B$N%Q%?!<%s(B: ") ("List Channel" . "$B%A%c%s%M%k$rD4$Y$k(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") ("Manage Add-ons" . "$B%"%I%*%s$N4IM}(B") ("Manage history of channel shifting." . "$B%A%c%s%M%k0\F0$NMzNr(B") ("Mark As Away" . "$BN%@J>uBV$K$9$k(B") ("Mark channels where new messages arrived." . "$B?7$7$$%a%C%;!<%8$,FO$$$?%A%c%s%M%k$r%^!<%/(B") ("Mark up control sequences in IRC buffers." . "$B%3%s%H%m!<%k%7!<%1%s%9$K$h$k?'IU$1(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: ") ("Next Channel" . "$BpJs$,$"$j$^$;$s(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%5!<%P$K@\B3(B") ("Open URL..." . "URL $B$r3+$/(B...") ("Open URL: " . "$B3+$/(B URL: ") ("Open server: " . "$B@\B3$9$k%5!<%P(B: ") ("Part Channel" . "$B%A%c%s%M%k$+$iN%C&$9$k(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") ("Pretend to be a psychotherapist." . "$B?4M}NEK!;N$K$J$j$9$^$9(B") ("Prevent miss-operation in the command buffer." . "$B%3%^%s%I%P%C%U%!$G$N8mA`:n$rKI$0(B") ("Previous Channel" . "$BA0$N%A%c%s%M%k(B") ("Quit IRC" . "IRC $B$r$d$a$k(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$+$ipJs$rAw$k(B") ("Sending %s...(%s/%d)" . "%s $B$rAw?.Cf(B...(%s/%d)") ("Sending %s...done" . "%s $B$rAw?.Cf(B...$B40N;(B") ("Sending QUIT to \"%s\"..." . "\"%s\" $B$K(B QUIT $B$rAw?.$7$F$$$^$9(B...") ("Sending QUIT to \"%s\"...done" . "\"%s\" $B$K(B QUIT $B$rAw?.$7$F$$$^$9(B...$B40N;(B") ("Sending QUIT..." . "QUIT $B$rAw?.$7$F$$$^$9(B...") ("Sending QUIT...done" . "QUIT $B$rAw?.$7$F$$$^$9(B...$B40N;(B") ("Server: " . "$B%5!<%P(B: ") ("Servers" . "$B%5!<%P0lMw(B") ("Set +o for users" . "+o $B$9$k%f!<%6(B") ("Set +v for users" . "+v $B$9$k%f!<%6(B") ("Set Channel Topic" . "$B%A%c%s%M%k$N%H%T%C%/(B") ("Set topic: " . "$B?7$7$$%H%T%C%/(B: ") ("Setup Riece's command menus." . "$B%a%K%e!<%P!<$NMxMQ(B") ("Submit Bug Report" . "$B%P%0$rJs9p(B") ("Switch To Channel" . "$B%A%c%s%M%k$K0\F0(B") ("Switch to channel/user: " . "$B0\F0@h$N%A%c%s%M%k$^$?$O%f!<%6(B: ") ("Switch to number: " . "$B0\F0@h$NHV9f(B: ") ("Toggle..." . "$B%H%0%k(B...") ("Topic by %s: %s\n" . "%s $B$K$h$k%H%T%C%/@_Dj(B: %s\n") ("Topic for %s: %s" . "%s $B$N%H%T%C%/(B: ") ("Topic on %s by %s: %s" . "%s $B$N%H%T%C%/$,(B %s $B$K$h$j@_Dj$5$l$^$7$?(B: %s") ("Topic: " . "$B%H%T%C%/(B: ") ("Translate messages." . "$B%a%C%;!<%8$NK]Lu(B") ("Type \\[describe-mode] for help" . "$B%X%k%W$r8+$k$K$O(B \\[describe-mode]") ("Type \\[riece-command-dcc-receive] to receive" . "$B ;; 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 riece-9.0.0/lisp/riece-misc.el0000664000076400007640000002031311546262045013057 00000000000000;;; riece-misc.el --- miscellaneous functions (not inlined) -*- lexical-binding: t -*- ;; 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) (with-current-buffer (car buffers) (let ((inhibit-read-only t) buffer-read-only start window point) ;; Save the current for the case when (car buffers) is the ;; currently selected buffer. (save-excursion (setq start (goto-char (point-max))) (insert (format-time-string "%H:%M") " " string) (setq point (point))) (if (and (not (riece-frozen (current-buffer))) (setq window (get-buffer-window (current-buffer))) (not (pos-visible-in-window-p point window))) (save-excursion ;save-selected-window changes ;current buffer (save-selected-window (select-window window) (goto-char point) ;select-window changes current point (recenter riece-window-center-line)))) (run-hook-with-args 'riece-after-insert-functions start point))) (setq buffers (cdr buffers)))) (defun riece-insert-change (buffer message) (riece-insert buffer (concat riece-change-prefix message))) (defun riece-insert-notice (buffer message) (riece-insert buffer (concat riece-notice-prefix message))) (defun riece-insert-wallops (buffer message) (riece-insert buffer (concat riece-wallops-prefix message))) (defun riece-insert-error (buffer message) (riece-insert buffer (concat riece-error-prefix message))) (defun riece-insert-info (buffer message) (riece-insert buffer (concat riece-info-prefix message))) (defun riece-frozen (buffer) (with-current-buffer buffer riece-freeze)) (defun riece-own-frozen (buffer) (with-current-buffer buffer (eq riece-freeze 'own))) (defun riece-channel-p (string) "Return t if STRING is a channel. \(i.e. it matches `riece-channel-regexp')" (string-match (concat "^" riece-channel-regexp) string)) (defun riece-user-p (string) "Return t if STRING is a user. \(i.e. it matches `riece-user-regexp')" (string-match (concat "^" riece-user-regexp) string)) (defun riece-current-nickname () "Return the current nickname." (riece-with-server-buffer (riece-current-server-name) (if riece-real-nickname (riece-make-identity riece-real-nickname riece-server-name)))) (defun riece-split-parameters (string) (if (eq ?: (aref string 0)) (list (substring string 1)) (let (parameters) (catch 'done (while (string-match "^\\([^ ]+\\) +" string) (setq parameters (nconc parameters (list (match-string 1 string))) string (substring string (match-end 0))) (when (and (not (equal "" string)) (eq ?: (aref string 0))) (setq string (substring string 1) parameters (nconc parameters (list string))) (throw 'done nil))) (or (equal "" string) (setq parameters (nconc parameters (list string))))) parameters))) (defun riece-concat-channel-topic (target string) (riece-with-server-buffer (riece-identity-server target) (let ((topic (riece-channel-get-topic (riece-identity-prefix target)))) (if (or (null topic) (equal topic "")) string (concat string ": " topic))))) (defun riece-concat-channel-modes (target string) (riece-with-server-buffer (riece-identity-server target) (let ((modes (riece-channel-get-modes (riece-identity-prefix target)))) (if modes (concat string " [" (mapconcat (lambda (mode) (if (riece-mode-parameter mode) (format "%c(%s)" (riece-mode-flag mode) (riece-mode-parameter mode)) (char-to-string (riece-mode-flag mode)))) modes "") "]") string)))) (defun riece-concat-message (string message) (if (or (null message) (equal message "")) string (concat string " (" message ")"))) (defun riece-concat-server-name (string) (if (equal riece-server-name "") string (let ((server-name (concat " (from " riece-server-name ")"))) (put-text-property 0 (length server-name) 'riece-server-name riece-server-name server-name) (concat string server-name)))) (defun riece-concat-user-status (status string) (if status (concat string " [" (mapconcat #'identity status ", ") "]") string)) (defun riece-prefix-user-at-host (prefix) (if (string-match "!" prefix) (substring prefix (match-end 0)) prefix)) (defun riece-prefix-nickname (prefix) (if (string-match "!" prefix) (substring prefix 0 (match-beginning 0)) prefix)) (defun riece-parse-user-at-host (user-at-host) (if (memq (aref user-at-host 0) '(?^ ?= ?~ ?- ?+)) (progn (if (memq (aref user-at-host 0) '(?^ ?=)) (setq riece-user-at-host-type 'fake) (if (memq (aref user-at-host 0) '(?~ ?-)) (setq riece-user-at-host-type 'not-verified) (if (eq (aref user-at-host 0) ?+) (setq riece-user-at-host-type 'ok)))) (substring user-at-host 1)) (setq riece-user-at-host-type 'ok) user-at-host)) (defun riece-strip-user-at-host (user-at-host) (if (memq (aref user-at-host 0) '(?^ ?= ?~ ?- ?+)) (substring user-at-host 1) user-at-host)) (defun riece-get-users-on-server (server-name) (riece-with-server-buffer server-name (let (identities) (mapatoms (lambda (user) (setq identities (cons (riece-make-identity (symbol-name user) server-name) identities))) (riece-cache-hash-obarray riece-user-cache)) identities))) (defun riece-get-channels-on-server (server-name) (riece-with-server-buffer server-name (let (identities) (mapatoms (lambda (channel) (setq identities (cons (riece-make-identity (symbol-name channel) server-name) identities))) (riece-cache-hash-obarray riece-channel-cache)) identities))) (defun riece-get-identities-on-server (server-name) (nconc (riece-get-channels-on-server server-name) (riece-get-users-on-server server-name))) (defun riece-check-channel-commands-are-usable (&optional channel) (unless riece-current-channel (error (substitute-command-keys "Type \\[riece-command-join] to join a channel"))) (if (and channel (not (riece-channel-p (riece-identity-prefix riece-current-channel)))) (error "Not on a channel"))) (provide 'riece-misc) ;;; riece-misc.el ends here riece-9.0.0/lisp/riece-command-next-channel.xpm0000644000076400007640000000377111377612201016332 00000000000000/* XPM */ static char *riece_command_next_channel[] = { /* columns rows colors chars-per-pixel */ "24 24 83 1", " c #1F4884", ". c #1F4B86", "X c #1F4B87", "o c #204A87", "O c #214A87", "+ c #204B87", "@ c #214C87", "# c #204A88", "$ c #204B88", "% c #214B88", "& c #214B89", "* c #224B88", "= c #224A8A", "- c #214C88", "; c #204C89", ": c #214C89", "> c #224C88", ", c #234D8A", "< c #244E89", "1 c #264F8B", "2 c #254F8C", "3 c #29528E", "4 c #2B548E", "5 c #2F5D9B", "6 c #365F97", "7 c #32619F", "8 c #3765A2", "9 c #3666A3", "0 c #3465A4", "q c #3767A5", "w c #3B6AA5", "e c #3868A6", "r c #3A69A6", "t c #3B6BA7", "y c #3C6AA5", "u c #3C6BA7", "i c #3F6CA6", "p c #3F6CA7", "a c #3D6CA8", "s c #3F70AB", "d c #3F70AC", "f c #41689E", "g c #466EA4", "h c #416EA8", "j c #446FA8", "k c #4B72A7", "l c #4371AB", "z c #4471AB", "x c #4772AA", "c c #4070AC", "v c #4071AC", "b c #4171AC", "n c #4070AD", "m c #4071AD", "M c #4171AD", "N c #4272AD", "B c #4872AA", "V c #4E76AA", "C c #4C76AD", "Z c #4E76AD", "A c #5178AD", "S c #5079AE", "D c #4979B3", "F c #4A7AB3", "G c #4B7AB3", "H c #4D79B1", "J c #4C7BB4", "K c #4E7CB5", "L c #4E7DB5", "P c #507BB0", "I c #537FB5", "U c #5B83B5", "Y c #5982B6", "T c #5883B7", "R c #5B84B8", "E c #5A86BA", "W c #5E87B9", "Q c #628BBB", "! c #638CBC", "~ c #678EBD", "^ c #6B8FBE", "/ c #6990BF", "( c None", /* pixels */ "((((((((((((((((((((((((", "((((((((((((((((((((((((", "((((((((((((((((((((((((", "(((((((((((+*(((((((((((", "(((((((((((+6:((((((((((", "(((((((((((+^f$(((((((((", "(((((((((((+//g$((((((((", "(((%+++++++>~L!k&(((((((", "(((;UQQQQQQ!EDGWV>((((((", "(((;RKFFFFFFDDDDTA<(((((", "(((;YJDDDDDDDDDDDIS1((((", "(((;PNcsdcccvbnmmMHZ+(((", "(((;Bq00000000000aC4=(((", "(((;jq0000000000ux3$((((", "(((;izlzzzzzu00th2%(((((", "(((##oooooo@p0ry,(((((((", "(((((((((((+we8-((((((((", "(((((((((((X97%(((((((((", "(((((((((((.5#((((((((((", "(((((((((((.O(((((((((((", "((((((((((( ((((((((((((", "((((((((((((((((((((((((", "((((((((((((((((((((((((", "((((((((((((((((((((((((" }; riece-9.0.0/lisp/riece-mini.el0000644000076400007640000001246411546262045013066 00000000000000;;; riece-mini.el --- use Riece only on the minibuffer -*- lexical-binding: t -*- ;; 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: " (riece-format-identity target))))) (unless (equal message "") (riece-switch-to-channel target) (riece-send-string (format "PRIVMSG %s :%s\r\n" (riece-identity-prefix target) message)) (riece-display-message (riece-make-message (riece-current-nickname) target message nil t))))) (defun riece-mini-show-backlog () "Send back logs to minibuffer." (interactive) (when riece-mini-backlog-history (let ((height (1+ riece-mini-backlog-size))) (mapc #'(lambda (string) (setq height (+ height (/ (string-width string) (window-width))))) riece-mini-backlog-history) (let ((max-mini-window-height height) (resize-mini-windows t)) (setq riece-mini-backlog-shown t) (when (and (memq 'riece-biff riece-addons) (get 'riece-biff 'riece-addon-enabled)) (riece-biff-clear)) (riece-mini-message-no-log "%s" (mapconcat #'identity riece-mini-backlog-history "\n")))))) (defun riece-mini-pre-command () (when riece-mini-backlog-shown (let ((resize-mini-windows t)) (setq riece-mini-backlog-shown nil) (riece-mini-message-no-log "")))) (defun riece-mini-requires () (if (memq 'riece-biff riece-addons) '(riece-biff))) (defun riece-mini-insinuate () (add-hook 'riece-after-display-message-functions 'riece-mini-display-message-function) (add-hook 'pre-command-hook 'riece-mini-pre-command)) (defun riece-mini-uninstall () (remove-hook 'riece-after-display-message-functions 'riece-mini-display-message-function) (remove-hook 'pre-command-hook 'riece-mini-pre-command)) (provide 'riece-mini) ;;; riece-mini.el ends here riece-9.0.0/lisp/riece-lsdb.el0000644000076400007640000001153611546264420013054 00000000000000;;; riece-lsdb.el --- help register nicknames in LSDB rolodex program -*- lexical-binding: t -*- ;; 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-misc) (eval-when-compile (autoload 'lsdb-maybe-load-hash-tables "lsdb") (autoload 'lsdb-rebuild-secondary-hash-tables "lsdb") (autoload 'lsdb-lookup-records "lsdb") (autoload 'lsdb-puthash "lsdb") (autoload 'lsdb-maphash "lsdb") (autoload 'lsdb-gethash "lsdb") (autoload 'lsdb-display-records "lsdb") (autoload 'lsdb-update-record "lsdb")) (defvar riece-lsdb-cache nil) (defconst riece-lsdb-description "Help register nicknames in LSDB rolodex program.") (defun riece-lsdb-update-cache (record) (let ((irc (cdr (assq 'irc record)))) (while irc (lsdb-puthash (car irc) (cons (car record) (lsdb-gethash (car irc) riece-lsdb-cache)) riece-lsdb-cache) (setq irc (cdr irc))))) (defun riece-lsdb-delete-cache (record) (let ((irc (cdr (assq 'irc record)))) (while irc (lsdb-puthash (car irc) (delete (car record) (lsdb-gethash (car irc) riece-lsdb-cache)) riece-lsdb-cache) (setq irc (cdr irc))))) (defun riece-lsdb-lookup-records (user) (lsdb-maybe-load-hash-tables) (unless riece-lsdb-cache (lsdb-rebuild-secondary-hash-tables)) (let ((names (lsdb-gethash (riece-format-identity user t) riece-lsdb-cache)) records) (while names (setq records (append records (lsdb-lookup-records (car names)))) (setq names (cdr names))) records)) (defun riece-lsdb-display-records (user) (interactive (let ((completion-ignore-case t)) (list (riece-completing-read-identity "User: " (riece-get-users-on-server (riece-current-server-name)))))) (let ((records (riece-lsdb-lookup-records user))) (if records (lsdb-display-records records) (message "No entry for `%s'" (riece-format-identity user t))))) (defvar lsdb-hash-table) (defun riece-lsdb-add-user (user full-name) (interactive (let ((completion-ignore-case t) (table lsdb-hash-table)) (unless (vectorp table) (setq table (make-vector 29 0)) (lsdb-maphash (lambda (key _value) (intern key table)) lsdb-hash-table)) (list (riece-completing-read-identity "User: " (riece-get-users-on-server (riece-current-server-name))) (completing-read "Full name: " table)))) (let* ((record (lsdb-gethash full-name lsdb-hash-table)) (irc (riece-format-identity user t)) (old (cdr (assq 'irc record)))) ;; Remove all properties before adding entry. (set-text-properties 0 (length irc) nil irc) (unless (member irc old) (lsdb-update-record (list full-name ;; LSDB does not allow empty 'net entry. (or (nth 1 (assq 'net (lsdb-lookup-records full-name))) "")) (list (cons 'irc (cons irc old))))))) (defvar riece-command-mode-map) (defvar lsdb-secondary-hash-tables) (defvar lsdb-after-update-record-functions) (defvar lsdb-after-delete-record-functions) (defun riece-lsdb-insinuate () (require 'lsdb) (add-to-list 'lsdb-secondary-hash-tables 'riece-lsdb-cache) (add-to-list 'lsdb-after-update-record-functions 'riece-lsdb-update-cache) (add-to-list 'lsdb-after-delete-record-functions 'riece-lsdb-delete-cache)) (defun riece-lsdb-uninstall () (setq lsdb-secondary-hash-tables (delq 'riece-lsdb-cache lsdb-secondary-hash-tables) lsdb-after-update-record-functions (delq 'riece-lsdb-update-cache lsdb-after-update-record-functions) lsdb-after-delete-record-functions (delq 'riece-lsdb-delete-cache lsdb-after-delete-record-functions))) (defun riece-lsdb-enable () (define-key riece-command-mode-map "\C-c\C-ll" 'riece-lsdb-display-records) (define-key riece-command-mode-map "\C-c\C-la" 'riece-lsdb-add-user)) (defun riece-lsdb-disable () (define-key riece-command-mode-map "\C-c\C-ll" nil) (define-key riece-command-mode-map "\C-c\C-la" nil)) (provide 'riece-lsdb) ;;; riece-lsdb.el ends here riece-9.0.0/lisp/riece-layout.el0000644000076400007640000002744511546262045013454 00000000000000;;; riece-layout.el --- layout management -*- lexical-binding: t -*- ;; Copyright (C) 1998-2003 Daiki Ueno ;; Author: Daiki Ueno ;; TAKAHASHI 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) ("one-window" riece-configure-windows-one-window) ("default" . "middle-right")) "An alist mapping the names to layout functions. An element of this alist is either in the following forms: \(NAME CONFIGURE-FUNCTION [PARAMETERS]\) \(NAME1 . NAME2\) In the first form, NAME is a string which specifies the layout setting, and CONFIGURE-FUNCTION is a function which does window splitting, etc. PARAMETERS are collected and passed to CONFIGURE-FUNCTION. In the second form, NAME1 is an alias for NAME2." :type '(repeat (choice (list :tag "Layout" (string :tag "Name") (function :tag "Configure function") (repeat :tag "Parameters" :inline t symbol)) (cons :tag "Alias" string string))) :group 'riece-layout) (defun riece-redraw-layout (&optional force) "Reconfigure windows with the current layout. If optional argument FORCE is non-nil, window reconfiguration will happen unconditionally." (let ((layout (cdr (assoc riece-layout riece-layout-alist)))) (unless layout (error "No such layout!")) (if (stringp layout) (let ((riece-layout layout)) (riece-redraw-layout force)) (if (or force (riece-reconfigure-windows-predicate)) (apply (car layout) (cdr layout)))))) (defun riece-set-window-points () (if (get-buffer-window riece-user-list-buffer) (with-current-buffer riece-user-list-buffer (unless (riece-frozen riece-user-list-buffer) (set-window-start (get-buffer-window riece-user-list-buffer) (point-min))))) (if (get-buffer-window riece-channel-list-buffer) (with-current-buffer riece-channel-list-buffer (unless (riece-frozen riece-channel-list-buffer) (set-window-start (get-buffer-window riece-channel-list-buffer) (point-min))))) (if (and riece-channel-buffer (get-buffer-window riece-channel-buffer)) (with-current-buffer riece-channel-buffer (if (riece-frozen riece-channel-buffer) (if riece-channel-buffer-window-point (set-window-point (get-buffer-window riece-channel-buffer) riece-channel-buffer-window-point)) (set-window-point (get-buffer-window riece-channel-buffer) (point-max))))) (if (get-buffer-window riece-others-buffer) (with-current-buffer riece-others-buffer (unless (riece-frozen riece-others-buffer) (set-window-point (get-buffer-window riece-others-buffer) (point-max))))) (if (get-buffer-window riece-dialogue-buffer) (with-current-buffer riece-dialogue-buffer (unless (riece-frozen riece-dialogue-buffer) (set-window-point (get-buffer-window riece-dialogue-buffer) (point-max)))))) (defun riece-reconfigure-windows-predicate () "Return t, if window reconfiguration is needed. This function is used by \"default\" layout." (memq (window-buffer (selected-window)) riece-buffer-list)) (defun riece-configure-windows (hpos vpos) (let ((buffer (window-buffer)) (show-user-list (and riece-user-list-buffer-mode riece-current-channel ;; User list buffer is nuisance for private conversation. (riece-channel-p (riece-identity-prefix riece-current-channel))))) ;; Can't expand minibuffer to full frame. (if (eq (selected-window) (minibuffer-window)) (other-window 1)) (delete-other-windows) (if (and riece-current-channel (or show-user-list riece-channel-list-buffer-mode)) (let ((rest-window (split-window (selected-window) (if (eq hpos 'left) (- (window-width) (/ (window-width) 5)) (/ (window-width) 5)) t))) (when (eq hpos 'left) (setq rest-window (selected-window)) (other-window 1)) (if (and show-user-list riece-channel-list-buffer-mode) (progn (set-window-buffer (split-window) riece-channel-list-buffer) (set-window-buffer (selected-window) riece-user-list-buffer)) (if show-user-list (set-window-buffer (selected-window) riece-user-list-buffer) (if riece-channel-list-buffer-mode (set-window-buffer (selected-window) riece-channel-list-buffer)))) (select-window rest-window))) (if (and riece-current-channel riece-channel-buffer-mode) (progn (if (eq vpos 'top) (let ((rest-window (split-window nil 4))) (set-window-buffer (selected-window) riece-command-buffer) (select-window rest-window) (if riece-others-buffer-mode (set-window-buffer (split-window rest-window) riece-others-buffer)) (set-window-buffer (selected-window) riece-channel-buffer)) (if (and (eq vpos 'middle) riece-others-buffer-mode) (let ((rest-window (split-window))) (set-window-buffer (selected-window) riece-channel-buffer) (set-window-buffer (split-window rest-window 4) riece-others-buffer) (set-window-buffer rest-window riece-command-buffer)) (let ((rest-window (split-window nil (- (window-height) 4)))) (if riece-others-buffer-mode (progn (set-window-buffer (selected-window) riece-others-buffer) (set-window-buffer (split-window) riece-channel-buffer)) (set-window-buffer (selected-window) riece-channel-buffer)) (set-window-buffer rest-window riece-command-buffer))))) (if (eq vpos 'bottom) (progn (set-window-buffer (selected-window) riece-command-buffer) (set-window-buffer (split-window (selected-window) 4) riece-dialogue-buffer)) (set-window-buffer (split-window (selected-window) 4) riece-dialogue-buffer) (set-window-buffer (selected-window) riece-command-buffer))) (riece-set-window-points) (select-window (or (get-buffer-window buffer) (get-buffer-window riece-command-buffer))))) (defun riece-configure-windows-top (&rest plist) "Candidate of `riece-configure-windows-function'. PLIST accept :command-height, :user-list-width, and :channel-list-width." (let ((command-height (or (plist-get plist :command-height) 4)) (user-list-width (or (plist-get plist :user-list-width) (+ 9 1 1))) (channel-list-width (or (plist-get plist :channel-list-width) 18)) (buffer (window-buffer)) (show-user-list (and riece-user-list-buffer-mode riece-current-channel ;; User list buffer is nuisance for private conversation. (riece-channel-p (riece-identity-prefix riece-current-channel))))) ;; Can't expand minibuffer to full frame. (when (eq (selected-window) (minibuffer-window)) (other-window 1)) (delete-other-windows) ;; top of frame (let ((rest-window (split-window (selected-window) command-height))) (set-window-buffer (selected-window) riece-command-buffer) (select-window rest-window)) ;; middle of frame (vertical-spilit when need) (when (or (and riece-current-channel riece-channel-buffer-mode) show-user-list) (let ((rest-window (split-window (selected-window) (/ (* 5 (+ (window-height) command-height)) 8)))) (cond ;; channel-buffer + user-list ((and show-user-list (and riece-current-channel riece-channel-buffer-mode)) (let ((user-list-window (split-window (selected-window) nil t))) (set-window-buffer (selected-window) riece-channel-buffer) (set-window-buffer user-list-window riece-user-list-buffer) (select-window user-list-window) (shrink-window-horizontally (- (window-width) user-list-width)))) ;; only user-list (show-user-list (set-window-buffer (selected-window) riece-user-list-buffer)) ;; only channel-buffer (riece-channel-buffer-mode (set-window-buffer (selected-window) riece-channel-buffer))) (select-window rest-window))) ;; bottom of frame (if (and riece-current-channel riece-channel-list-buffer-mode) (let ((channel-list-window (split-window (selected-window) nil t))) (set-window-buffer (selected-window) riece-others-buffer) (set-window-buffer channel-list-window riece-channel-list-buffer) (select-window channel-list-window) (shrink-window-horizontally (- (window-width) channel-list-width))) (set-window-buffer (selected-window) riece-dialogue-buffer)) (riece-set-window-points) (select-window (or (get-buffer-window buffer) (get-buffer-window riece-command-buffer))))) ;; +---+-------------------+---+ ;; | c | channel | u | ;; | h | | s | ;; | a | | e | ;; | n |-------------------+ r | | +---+ ;; | n | command | s | | | | ;; | e +-------------------+---+ | +-> | ;; | l | others | +-----+ ;; | s | | ;; +---+-----------------------+ (defun riece-configure-windows-spiral () "spiral placement of windows" ;; (interactive) (let ((command-height 4) (users-width 15) (channels-width 30) (buffer (window-buffer))) (when (eq (selected-window) (minibuffer-window)) (other-window 1)) (delete-other-windows) ;; (1) create channels window (let ((rest (split-window (selected-window) channels-width t))) (set-window-buffer (selected-window) riece-channel-list-buffer) (select-window rest)) ;; (2) create others window (set-window-buffer (split-window (selected-window) (+ (/ (window-height) 2) command-height)) riece-others-buffer) ;; (3) create users window (set-window-buffer (split-window (selected-window) (- (window-width) users-width) t) riece-user-list-buffer) ;; (4) create current channel window (let ((rest (split-window (selected-window) (- (window-height) command-height)))) (set-window-buffer rest riece-command-buffer) (set-window-buffer (selected-window) riece-channel-buffer)) (riece-set-window-points) (select-window (or (get-buffer-window buffer) (get-buffer-window riece-command-buffer))))) (defun riece-configure-windows-one-window () ;; Can't expand minibuffer to full frame. (if (eq (selected-window) (minibuffer-window)) (other-window 1)) (delete-other-windows) (set-window-buffer (selected-window) riece-dialogue-buffer)) (provide 'riece-layout) ;;; riece-layout.el ends here riece-9.0.0/lisp/riece-emacs.el0000644000076400007640000001231211546262177013220 00000000000000;;; riece-emacs.el --- FSF Emacs specific functions -*- lexical-binding: t -*- ;; 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 riece-9.0.0/lisp/riece-async.el0000644000076400007640000000610311546263633013244 00000000000000;;; riece-async.el --- connect to IRC server via async proxy -*- lexical-binding: t -*- ;; 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 (with-current-buffer (process-buffer process) (while (and (eq (process-status process) 'run) (progn (goto-char (point-min)) (not (looking-at (format "NOTICE CONNECTED %d" (process-id process)))))) (accept-process-output process)))) (riece-set-process-query-on-exit-flag process nil) process)) (defun riece-async-insinuate () (setq riece-default-open-connection-function #'riece-async-open-network-stream)) (provide 'riece-async) ;;; riece-async.el ends here riece-9.0.0/lisp/riece-addon.el0000644000076400007640000004252311546262045013216 00000000000000;;; riece-addon.el --- add-on management -*- lexical-binding: t -*- ;; 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 '(repeat (cons character symbol)) :group 'riece-addon-list) (defcustom riece-addon-list-font-lock-keywords '(("^\\([-+? ] \\S-+\\)\\s-+\\(.*\\)" (1 (cdr (assq (aref (match-string 1) 0) riece-addon-list-mark-face-alist))) (2 riece-addon-list-description-face))) "Default expressions to addon in riece-addon-list-mode." :type '(repeat (list string)) :group 'riece-addon-list) (eval-when-compile (autoload 'riece-command-save-variables "riece-commands")) (defvar riece-addon-list-mode-map (let ((keymap (make-sparse-keymap))) (define-key keymap "+" 'riece-command-enable-addon) (define-key keymap "-" 'riece-command-disable-addon) (define-key keymap "i" 'riece-command-insinuate-addon) (define-key keymap "u" 'riece-command-uninstall-addon) (define-key keymap "U" 'riece-command-unload-addon) (define-key keymap "n" 'next-line) (define-key keymap "p" 'previous-line) (define-key keymap " " 'scroll-up) (define-key keymap [delete] 'scroll-down) (define-key keymap "q" 'bury-buffer) (define-key keymap "s" 'riece-command-save-variables) keymap)) (defun riece-load-and-build-addon-dependencies (addons) (let ((load-path (cons riece-addon-directory load-path)) dependencies) (while addons (require (car addons)) ;error will be reported here (let* ((requires-function (intern-soft (concat (symbol-name (car addons)) "-requires"))) (requires (if (and requires-function (fboundp requires-function)) (funcall requires-function))) (pointer requires) entry) ;; Increment succs' pred count. (if (setq entry (assq (car addons) dependencies)) (setcar (cdr entry) (+ (length requires) (nth 1 entry))) (setq dependencies (cons (list (car addons) (length requires)) dependencies))) ;; Merge pred's succs. (while pointer (if (setq entry (assq (car pointer) dependencies)) (setcdr (cdr entry) (cons (car addons) (nthcdr 2 entry))) (setq dependencies (cons (list (car pointer) 0 (car addons)) dependencies))) (setq pointer (cdr pointer)))) (setq addons (cdr addons))) dependencies)) (defun riece-sort-addon-dependencies (dependencies) (let ((pointer dependencies) addons queue) (while pointer (if (zerop (nth 1 (car pointer))) (setq dependencies (delq (car pointer) dependencies) queue (cons (car pointer) queue))) (setq pointer (cdr pointer))) (while queue (setq addons (cons (cons (car (car queue)) (nthcdr 2 (car queue))) addons) pointer (nthcdr 2 (car queue))) (while pointer (let* ((entry (assq (car pointer) dependencies)) (count (1- (nth 1 entry)))) (if (zerop count) (setq dependencies (delq entry dependencies) queue (nconc queue (list entry))) (setcar (cdr entry) count))) (setq pointer (cdr pointer))) (setq queue (cdr queue))) (if dependencies (error "Circular add-on dependency found: %S" dependencies)) (nreverse addons))) (defun riece-resolve-addons (addons) ;; Add files in riece-addon-directory to addons. (if (file-directory-p riece-addon-directory) (setq addons (nconc addons (mapcar (lambda (name) (unless (file-directory-p (expand-file-name name riece-addon-directory)) (intern (file-name-sans-extension name)))) (directory-files riece-addon-directory nil "\\`[^.]"))))) ;; Sort & uniquify. (setq addons (sort addons (lambda (symbol1 symbol2) (string-lessp (symbol-name symbol1) (symbol-name symbol2))))) (let ((pointer addons)) (while pointer (if (memq (car pointer) (cdr pointer)) (setcar pointer nil)) (setq pointer (cdr pointer))) (delq nil addons)) ;; Build & resolve dependencies. (riece-sort-addon-dependencies (riece-load-and-build-addon-dependencies addons))) (defun riece-insinuate-addon-1 (addon verbose) (if (get addon 'riece-addon-insinuated) (if verbose (message (riece-mcat "Add-on %S is already insinuated") addon)) (require addon) (funcall (intern (concat (symbol-name addon) "-insinuate"))) (put addon 'riece-addon-insinuated t) (if verbose (message (riece-mcat "Add-on %S is insinuated") addon)) (unless (get addon 'riece-addon-default-disabled) (riece-enable-addon addon t)))) (defun riece-insinuate-addon (addon &optional verbose) (unless (assq addon riece-addon-dependencies) (setq riece-addons (cons addon riece-addons) riece-save-variables-are-dirty t riece-addon-dependencies (riece-resolve-addons (cons addon (mapcar #'car riece-addon-dependencies))))) (let ((pointer riece-addon-dependencies) addons) (while pointer (unless (get (car (car pointer)) 'riece-addon-insinuated) (setq addons (cons (car (car pointer)) addons))) (if (eq (car (car pointer)) addon) (setq pointer nil) (setq pointer (cdr pointer)))) (setq addons (nreverse addons)) (if (and (> (length addons) 1) (eq verbose 'ask) (not (y-or-n-p (format (riece-mcat "%s will be insinuated. Continue? ") (mapconcat #'symbol-name addons ", "))))) (error "Insinuate operation was cancelled")) (while addons (riece-insinuate-addon-1 (car addons) verbose) (setq addons (cdr addons))))) (defun riece-uninstall-addon (addon &optional verbose) (if (not (get addon 'riece-addon-insinuated)) (if verbose (message (riece-mcat "Add-on %S is not insinuated") addon)) (let ((entry (assq addon riece-addon-dependencies)) (uninstall (intern-soft (concat (symbol-name addon) "-uninstall")))) (if entry (if (cdr entry) (if (= (length (cdr entry)) 1) (error "%S depends on %S" (car (cdr entry)) addon) (error "%s depend on %S" (mapconcat #'symbol-name (cdr entry) ", ") addon)) (riece-disable-addon addon verbose) (if (and uninstall (fboundp uninstall)) (funcall uninstall)) (setq riece-addon-dependencies (delq entry riece-addon-dependencies)) (put addon 'riece-addon-insinuated nil) (setq riece-addons (delq addon riece-addons) riece-save-variables-are-dirty t riece-addon-dependencies (riece-resolve-addons (delq addon (mapcar #'car riece-addon-dependencies)))))) (if verbose (message (riece-mcat "Add-on %S is uninstalled") addon))))) (defun riece-enable-addon (addon &optional verbose) (unless (get addon 'riece-addon-insinuated) (error "Add-on %S is not insinuated" addon)) (if (get addon 'riece-addon-enabled) (if verbose (message (riece-mcat "Add-on %S is already enabled") addon)) (let ((enable (intern-soft (concat (symbol-name addon) "-enable")))) (if (and enable (fboundp enable)) (funcall enable)) (put addon 'riece-addon-enabled t) (if verbose (message (riece-mcat "Add-on %S enabled") addon))))) (defun riece-disable-addon (addon &optional verbose) (unless (get addon 'riece-addon-insinuated) (error "Add-on %S is not insinuated" addon)) (if (not (get addon 'riece-addon-enabled)) (if verbose (message (riece-mcat "Add-on %S is already disabled") addon)) (let ((disable (intern-soft (concat (symbol-name addon) "-disable")))) (if (and disable (fboundp disable)) (funcall disable)) (put addon 'riece-addon-enabled nil) (if verbose (message (riece-mcat "Add-on %S disabled") addon))))) (put 'riece-addon-list-mode 'font-lock-defaults '(riece-addon-list-font-lock-keywords t)) (defun riece-addon-list-mode () "Major mode for displaying addon list. All normal editing commands are turned off." (kill-all-local-variables) (buffer-disable-undo) (setq major-mode 'riece-addon-list-mode mode-name "AddOns" mode-line-buffer-identification (riece-mode-line-buffer-identification '("Riece: %12b")) truncate-lines t buffer-read-only t) (use-local-map riece-addon-list-mode-map) (make-local-variable 'font-lock-defaults) (setq font-lock-defaults '(riece-addon-list-font-lock-keywords t)) ;; In XEmacs, auto-initialization of font-lock is not effective ;; if buffer-file-name is not set. (font-lock-set-defaults) (run-hooks 'riece-addon-list-mode-hook)) (defun riece-command-list-addons () (interactive) (set-buffer (riece-get-buffer-create "*AddOn*" 'riece-addon-list-mode)) (riece-addon-list-mode) (let ((inhibit-read-only t) buffer-read-only (pointer riece-addon-dependencies) module-description-alist description point longest) (while pointer (setq description (intern-soft (concat (symbol-name (car (car pointer))) "-description")) module-description-alist (cons (cons (car (car pointer)) (if (and description (boundp description)) (riece-mcat (symbol-value description)) (riece-mcat "(no description)"))) module-description-alist) pointer (cdr pointer))) (setq pointer riece-addon-modules) (while pointer (unless (assq (car (car pointer)) module-description-alist) (setq module-description-alist (cons (cons (car (car pointer)) (riece-mcat (cdr (car pointer)))) module-description-alist))) (setq pointer (cdr pointer))) (erase-buffer) (riece-kill-all-overlays) (setq pointer module-description-alist longest "") (while pointer (if (> (length (symbol-name (car (car pointer)))) (length longest)) (setq longest (symbol-name (car (car pointer))))) (setq pointer (cdr pointer))) (setq pointer (sort module-description-alist (lambda (entry1 entry2) (string-lessp (symbol-name (car entry1)) (symbol-name (car entry2)))))) (while pointer (setq point (point)) (insert (format (format "%%c %%-%dS %%s\n" (length longest)) (if (not (featurep (car (car pointer)))) ? (if (not (get (car (car pointer)) 'riece-addon-insinuated)) ?? (if (get (car (car pointer)) 'riece-addon-enabled) ?+ ?-))) (car (car pointer)) (cdr (car pointer)))) (put-text-property point (point) 'riece-addon (car (car pointer))) (setq pointer (cdr pointer))) (insert (riece-mcat " Symbols in the leftmost column: + The add-on is enabled. - The add-on is disabled. ? The add-on is not insinuated. The add-on is not loaded. ")) (insert (substitute-command-keys (riece-mcat " Useful keys: `\\[riece-command-enable-addon]' to enable the current add-on. `\\[riece-command-disable-addon]' to disable the current add-on. `\\[riece-command-insinuate-addon]' to insinuate the current add-on. `\\[riece-command-uninstall-addon]' to uninstall the current add-on. `\\[riece-command-unload-addon]' to unload the current add-on. `\\[riece-command-save-variables]' to save the current setting. "))) (goto-char (point-min)) (pop-to-buffer (current-buffer)) (delete-other-windows))) (defun riece-addon-list-set-point (addon) (let ((point (point-min))) (while (and (not (eq (get-text-property point 'riece-addon) addon)) (setq point (next-single-property-change point 'riece-addon)))) (if point (goto-char point)))) (defun riece-command-enable-addon (addon) (interactive (list (or (if (eq major-mode 'riece-addon-list-mode) (get-text-property (point) 'riece-addon)) (intern-soft (completing-read (riece-mcat "Add-on: ") (mapcar (lambda (dependency) (list (symbol-name (car dependency)))) riece-addon-dependencies) (lambda (pointer) (let ((enabled (intern-soft (concat (car pointer) "-enabled")))) (and enabled (null (symbol-value enabled))))) t))))) (riece-command-insinuate-addon addon) (riece-enable-addon addon t) (when (eq major-mode 'riece-addon-list-mode) (riece-command-list-addons) (riece-addon-list-set-point addon))) (defun riece-command-disable-addon (addon) (interactive (list (or (if (eq major-mode 'riece-addon-list-mode) (get-text-property (point) 'riece-addon)) (intern-soft (completing-read (riece-mcat "Add-on: ") (mapcar (lambda (dependency) (list (symbol-name (car dependency)))) riece-addon-dependencies) (lambda (pointer) (let ((enabled (intern-soft (concat (car pointer) "-enabled")))) (and enabled (symbol-value enabled)))) t))))) (riece-disable-addon addon t) (when (eq major-mode 'riece-addon-list-mode) (riece-command-list-addons) (riece-addon-list-set-point addon))) (defun riece-command-insinuate-addon (addon) (interactive (list (or (if (eq major-mode 'riece-addon-list-mode) (get-text-property (point) 'riece-addon)) (intern-soft (completing-read (riece-mcat "Add-on: ") (mapcar (lambda (dependency) (list (symbol-name (car dependency)))) riece-addon-modules) (lambda (pointer) (not (get (intern-soft (car pointer)) 'riece-addon-insinuated))) t))))) (riece-insinuate-addon addon 'ask) (when (eq major-mode 'riece-addon-list-mode) (riece-command-list-addons) (riece-addon-list-set-point addon))) (defun riece-command-uninstall-addon (addon) (interactive (list (or (if (eq major-mode 'riece-addon-list-mode) (get-text-property (point) 'riece-addon)) (intern-soft (completing-read (riece-mcat "Add-on: ") (mapcar (lambda (dependency) (list (symbol-name (car dependency)))) riece-addon-dependencies) (lambda (pointer) (get (intern-soft (car pointer)) 'riece-addon-insinuated)) t))))) (riece-uninstall-addon addon t) (when (eq major-mode 'riece-addon-list-mode) (riece-command-list-addons) (riece-addon-list-set-point addon))) (defun riece-command-unload-addon (addon) (interactive (list (or (if (eq major-mode 'riece-addon-list-mode) (get-text-property (point) 'riece-addon)) (intern-soft (completing-read (riece-mcat "Add-on: ") (mapcar (lambda (dependency) (list (symbol-name (car dependency)))) riece-addon-dependencies) (lambda (pointer) (get (intern-soft (car pointer)) 'riece-addon-insinuated)) t))))) (riece-uninstall-addon addon t) (if (get addon 'riece-addon-not-unloadable) (message (riece-mcat "Add-on %S is not allowed to unload") addon) (unload-feature addon) (message (riece-mcat "Add-on %S is unloaded") addon)) (when (eq major-mode 'riece-addon-list-mode) (riece-command-list-addons) (riece-addon-list-set-point addon))) (provide 'riece-addon) ;;; riece-addon.el ends here riece-9.0.0/lisp/riece-xemacs.el0000644000076400007640000001136211546262045013406 00000000000000;;; riece-xemacs.el --- XEmacs specific functions -*- lexical-binding: t -*- ;; 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 riece-9.0.0/lisp/riece-toolbar.el0000644000076400007640000001125611546264603013574 00000000000000;;; riece-toolbar.el --- display toolbar icons -*- lexical-binding: t -*- ;; 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: ;; Image files are taken from stock icons: ;; riece-command-next-channel.xpm gtk-go-forward ;; riece-command-previous-channel.xpm gtk-go-back ;; riece-command-configure-windows.xpm gtk-refresh ;; riece-command-list-addons gtk-preferences ;; riece-command-join gtk-new ;; riece-command-part gtk-close ;; NOTE: This is an add-on module for Riece. ;;; Code: (require 'riece-menu) (defconst riece-toolbar-description "Display toolbar icons.") (defvar riece-toolbar-items '((riece-command-previous-channel . "left-arrow") (riece-command-next-channel . "right-arrow") (riece-command-configure-windows . "refresh") (riece-command-join . "new") (riece-command-part . "close") (riece-command-list-addons . "preferences"))) (defun riece-toolbar-find-menu-item (command) (let ((pointer riece-menu-items) item) (while pointer (if (and (not (stringp (car pointer))) (vectorp (car pointer)) (eq (aref (car pointer) 1) command)) (setq item (car pointer) pointer nil) (setq pointer (cdr pointer)))) item)) (eval-and-compile (if (featurep 'xemacs) (if (featurep 'toolbar) (progn (defun riece-make-toolbar-from-menu (items _menu-items _map) (let ((pointer items) toolbar file menu-item) (while pointer (setq file (locate-file (symbol-name (car (car pointer))) (cons riece-data-directory load-path) '(".xpm" ".pbm" ".xbm")) menu-item (riece-toolbar-find-menu-item (car (car pointer)))) (if (and file (file-exists-p file)) (setq toolbar (toolbar-add-item toolbar (toolbar-new-button file (car (car pointer)) (if menu-item (aref menu-item 0) (symbol-name (car (car pointer)))))))) (setq pointer (cdr pointer))) toolbar)) (defvar riece-toolbar-original-toolbar nil) (defun riece-set-toolbar (toolbar) (make-local-variable 'riece-toolbar-original-toolbar) (setq riece-toolbar-original-toolbar (specifier-specs default-toolbar (current-buffer))) (set-specifier default-toolbar toolbar (current-buffer))) (defun riece-unset-toolbar () (if riece-toolbar-original-toolbar (set-specifier default-toolbar riece-toolbar-original-toolbar (current-buffer)) (remove-specifier default-toolbar (current-buffer))) (kill-local-variable 'riece-toolbar-original-toolbar))) (defalias 'riece-make-toolbar-from-menu 'ignore) (defalias 'riece-set-toolbar 'ignore) (defalias 'riece-unset-toolbar 'ignore)) (defun riece-make-toolbar-from-menu (items _menu-items map) (let ((pointer items) (tool-bar-map (make-sparse-keymap))) (while pointer (tool-bar-add-item-from-menu (car (car pointer)) (cdr (car pointer)) map) (setq pointer (cdr pointer))) tool-bar-map)) (defun riece-set-toolbar (toolbar) (make-local-variable 'tool-bar-map) (setq tool-bar-map toolbar)) (defun riece-unset-toolbar () (kill-local-variable 'tool-bar-map)))) (defvar riece-command-mode-map) (defun riece-toolbar-command-mode-hook () (riece-set-toolbar (riece-make-toolbar-from-menu riece-toolbar-items riece-menu-items riece-command-mode-map))) (defun riece-toolbar-requires () '(riece-menu)) (defun riece-toolbar-insinuate () (if riece-command-buffer (with-current-buffer riece-command-buffer (riece-toolbar-command-mode-hook))) (add-hook 'riece-command-mode-hook 'riece-toolbar-command-mode-hook t)) (defun riece-toolbar-uninstall () (if riece-command-buffer (with-current-buffer riece-command-buffer (riece-unset-toolbar))) (remove-hook 'riece-command-mode-hook 'riece-toolbar-command-mode-hook)) (provide 'riece-toolbar) ;;; riece-toolbar.el ends here riece-9.0.0/lisp/riece-mcat.el0000644000076400007640000000707111546262045013054 00000000000000;;; riece-mcat.el --- message catalog -*- lexical-binding: t -*- ;; 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. ;;; Code: (require 'pp) (defun riece-mcat (string) "Translate STRING in the current language environment." (let ((feature (if (featurep 'mule) (get-language-info current-language-environment 'riece-mcat-feature)))) (if feature (progn (require feature) (or (cdr (assoc string (symbol-value (intern (concat (symbol-name feature) "-alist"))))) string)) string))) (defun riece-mcat-extract-from-form (form) (if (and form (listp form) (listp (cdr form))) (if (and (= (length form) 2) (eq (car form) 'riece-mcat) (stringp (car (cdr form)))) (cdr form) (delq nil (apply #'nconc (mapcar #'riece-mcat-extract-from-form form)))))) (defun riece-mcat-extract (files) (save-excursion (let (message-list pointer) (while files (with-temp-buffer (insert-file-contents (car files)) (goto-char (point-min)) (while (progn (while (progn (skip-chars-forward " \t\n\f") (looking-at ";")) (forward-line 1)) (not (eobp))) (setq message-list (nconc message-list (riece-mcat-extract-from-form (read (current-buffer))))))) (setq files (cdr files))) (setq message-list (sort message-list #'string-lessp) pointer message-list) (while pointer (if (member (car pointer) (cdr pointer)) (setcar pointer nil)) (setq pointer (cdr pointer))) (delq nil message-list)))) (defun riece-mcat-update (files mcat-file mcat-alist-symbol) "Update MCAT-FILE." (let ((pp-escape-newlines t) alist) (with-current-buffer (find-file-noselect mcat-file) (goto-char (point-min)) (if (re-search-forward (concat "^\\s-*(\\(defvar\\|defconst\\)\\s-+" (regexp-quote (symbol-name mcat-alist-symbol))) nil t) (progn (goto-char (match-beginning 0)) (save-excursion (eval (read (current-buffer)))) (delete-region (point) (progn (forward-sexp) (point)))) (set mcat-alist-symbol nil)) (setq alist (mapcar (lambda (message) (or (assoc message (symbol-value mcat-alist-symbol)) (list message))) (riece-mcat-extract files))) (insert "(defconst " (symbol-name mcat-alist-symbol) "\n '(") (while alist (insert "(" (pp-to-string (car (car alist))) " . " (pp-to-string (cdr (car alist))) ")") (if (cdr alist) (insert "\n ")) (setq alist (cdr alist))) (insert "))") (save-buffer)))) (defconst riece-mcat-description "Translate messages.") (defun riece-mcat-insinuate () (set-language-info "Japanese" 'riece-mcat-feature 'riece-mcat-japanese)) (defun riece-mcat-uninstall () (set-language-info "Japanese" 'riece-mcat-feature nil)) (provide 'riece-mcat) ;;; riece-mcat.el ends here riece-9.0.0/lisp/riece-options.el0000644000076400007640000002425011546262045013621 00000000000000;;; riece-options.el --- customization -*- lexical-binding: t -*- ;; 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-window-center-line -2 "Line number of center point in window when scrolling. If nil, erases the entire frame and then redraws with point in the center of the window. Negative means relative to bottom of window. See the document of the function `recenter'." :type 'integer :group 'riece-looks) (defcustom riece-directory (expand-file-name "~/.riece") "Where to look for startup files." :type 'directory :group 'riece-options) (defcustom riece-addon-directory (expand-file-name "addons" riece-directory) "Where to look for add-on files." :type 'directory :group 'riece-options) (defcustom riece-data-directory (if (fboundp 'locate-data-directory) (locate-data-directory "riece") (file-name-directory load-file-name)) "Where to look for data files." :type 'directory :group 'riece-options) (defcustom riece-variables-file (expand-file-name "init" riece-directory) "Where to look for variables." :type 'file :group 'riece-options) (defcustom riece-saved-variables-file (expand-file-name "save" riece-directory) "Where to look for variables. This file was saved the last session." :type 'file :group 'riece-options) (defcustom riece-variables-files (list riece-saved-variables-file riece-variables-file) "Where to look for variables. Helps to remove clutter from your .emacs. This feature is most likely to dissappear in near future. The preferred way is to put Riece variables on .emacs or file loaded from there." :type '(repeat (file :tag "Initialization File")) :group 'riece-options) (defcustom riece-addons '(riece-highlight riece-ctcp riece-guess riece-unread riece-history riece-url riece-button riece-menu riece-icon riece-ignore riece-log riece-toolbar riece-alias riece-ctlseq riece-keyword riece-shrink-buffer riece-mcat) "Add-ons insinuated into Riece." :type '(repeat symbol) :group 'riece-options) (defgroup riece-server nil "Server settings." :prefix "riece-" :group 'riece) (defgroup riece-channel nil "Channel settings." :prefix "riece-" :group 'riece) (defgroup riece-coding nil "Coding system." :tag "Coding" :prefix "riece-" :group 'riece) (defcustom riece-default-coding-system (if (featurep 'mule) (cons 'ctext 'iso-2022-jp-2)) "Coding system for process I/O. The value is a coding system, or a cons cell (DECODING . ENCODING) specifying the coding systems for decoding and encoding respectively." :type '(choice (symbol :tag "Coding system") (cons (symbol :tag "Input coding system") (symbol :tag "Output coding system")) (const nil :tag "No conversion")) :group 'riece-coding) (defcustom riece-server-alist nil "An alist mapping server names to plist." :type '(repeat (group (string :tag "Server") (list :inline t :tag "Host" :format "%{%t%}: %v" (const :tag "" :value :host) string) (repeat :inline t :tag "Options" (choice :inline t :value nil (list :inline t :tag "Port" :format "%{%t%}: %v" (const :tag "" :value :service) (choice (const :tag "Default" 6667) integer string)) (list :inline t :tag "Nickname" :format "%{%t%}: %v" (const :tag "" :value :nickname) (choice (const :tag "Default" riece-nickname) string)) (list :inline t :tag "Realname" :format "%{%t%}: %v" (const :tag "" :value :realname) (choice (const :tag "Default" riece-realname) string)) (list :inline t :tag "Username" :format "%{%t%}: %v" (const :tag "" :value :username) (choice (const :tag "Default" riece-username) string)) (list :inline t :tag "Password" :format "%{%t%}: %v" (const :tag "" :value :password) string) (list :inline t :tag "Function" :format "%{%t%}: %v" (const :tag "" :value :function) (choice (const :tag "Default" riece-default-open-connection-function) function)) (list :inline t :tag "Coding system" :format "%{%t%}: %v" (const :tag "" :value :coding) (choice (const :tag "Default" riece-default-coding-system) (choice (symbol :tag "Coding system") (cons (symbol :tag "Input coding system") (symbol :tag "Output coding system")) (const nil :tag "No conversion")))))))) :group 'riece-server) (defcustom riece-server (getenv "IRCSERVER") "IRC server host we are connecting to." :type 'string :group 'riece-server) (defcustom riece-protocol 'irc "Protocol support." :type 'symbol :group 'riece-server) (defcustom riece-max-send-size 512 "Maximum size of messages to be sent at a time." :type 'integer :group 'riece-server) (defcustom riece-send-delay 2 "Duration of multiple send." :type 'integer :group 'riece-server) (defcustom riece-default-password (getenv "IRCPASSWORD") "Your password." :type '(radio (string :tag "Password") (const :tag "No" nil)) :group 'riece-server) (defcustom riece-username nil "Your login name." :type 'string :group 'riece-server) (defcustom riece-realname nil "Your user name." :type 'string :group 'riece-server) (defcustom riece-nickname (or (getenv "IRCNICK") (user-real-login-name)) "Your nickname." :type 'string :group 'riece-server) (defcustom riece-startup-channel-list nil "A list of channels to join automatically at startup." :type '(repeat (choice (string :tag "Channel") (list (string :tag "Channel") (string :tag "Key")))) :group 'riece-channel) (defcustom riece-startup-server-list nil "A list of servers to connect automatically at startup." :type '(repeat (string :tag "Server")) :group 'riece-server) (defcustom riece-retry-with-new-nickname nil "When nickname has already been in use, grow-tail automatically." :type 'boolean :group 'riece-server) (defcustom riece-quit-timeout 1 "Quit timeout when there is no response from server." :type '(radio (integer :tag "Seconds") (const nil)) :group 'riece-server) (defcustom riece-default-open-connection-function #'open-network-stream "Default function used for connecting to an IRC server." :type 'function :group 'riece-server) (defcustom riece-user-cache-max-size 512 "Maximum size of cache of user names." :type 'integer :group 'riece-server) (defcustom riece-channel-cache-max-size 512 "Maximum size of cache of channel names." :type 'integer :group 'riece-server) (defcustom riece-channel-buffer-mode t "When non-nil, Riece will display a channel buffer." :type 'boolean :group 'riece-looks) (defcustom riece-others-buffer-mode t "When non-nil, Riece will display an \"*Others*\" buffer." :type 'boolean :group 'riece-looks) (defcustom riece-user-list-buffer-mode t "When non-nil, Riece will display a nick list buffer." :type 'boolean :group 'riece-looks) (defcustom riece-channel-list-buffer-mode t "When non-nil, Riece will display a channel list buffer." :type 'boolean :group 'riece-looks) (defcustom riece-default-freeze nil "Channel buffer local freeze flag is on at starting." :type 'boolean :group 'riece-looks) (defcustom riece-default-channel-binding nil "The channel list to bind the channel number when joining." :type '(repeat (radio (string :tag "Bound Channel") (const nil))) :group 'riece-channel) (defcustom riece-blink-parens nil "Should we blink matching parenthesis in the command buffer?" :type 'boolean :group 'riece-options) (defcustom riece-quit-message (riece-extended-version) "Default quit message." :type '(string :tag "Quit message") :group 'riece-options) (defcustom riece-part-message nil "Default part message." :type '(choice (const :tag "No message" nil) (string :tag "Part message")) :group 'riece-options) (defcustom riece-away-message "Gone" "Default away message." :type '(string :tag "Away message") :group 'riece-options) (defcustom riece-gather-channel-modes nil "If non-nil, gather channel modes when we join a channel." :type 'boolean :group 'riece-options) (defcustom riece-buffer-dispose-function #'kill-buffer "Function called after the buffer was disposed." :type 'function :group 'riece-options) (defcustom riece-format-time-function #'current-time-string "Function to convert the specified time to the human readable form." :type 'function :group 'riece-options) (provide 'riece-options) ;;; riece-options.el ends here riece-9.0.0/lisp/riece-irc.el0000644000076400007640000001056611546262045012710 00000000000000;;; riece-irc.el --- IRC protocol -*- lexical-binding: t -*- ;; 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 "NICK %s\r\n" nickname)) (unless realname (setq realname (riece-mcat "No information given"))) (if coding (setq realname (encode-coding-string realname (if (consp coding) (cdr coding) coding)))) (riece-process-send-string process (format "USER %s * * :%s\r\n" (or username (user-real-login-name)) realname)) (with-current-buffer (process-buffer process) (setq riece-last-nickname riece-real-nickname riece-nick-accepted 'sent riece-coding-system coding)) process)))) (defun riece-irc-quit-server-process (process &optional message) (if riece-quit-timeout (riece-run-at-time riece-quit-timeout nil (lambda (process) (if (rassq process riece-server-process-alist) (delete-process process))) process)) (let ((server-name (with-current-buffer (process-buffer process) riece-server-name))) (if (equal server-name "") (message (riece-mcat "Sending QUIT...")) (message (riece-mcat "Sending QUIT to \"%s\"...") server-name)) (riece-process-send-string process (if message (format "QUIT :%s\r\n" message) "QUIT\r\n")) (if (equal server-name "") (message (riece-mcat "Sending QUIT...done")) (message (riece-mcat "Sending QUIT to \"%s\"...done") server-name)))) (provide 'riece-irc) ;;; riece-irc.el ends here riece-9.0.0/lisp/riece-biff.el0000644000076400007640000000712611546263641013042 00000000000000;;; riece-biff.el --- be notified if messages arrives -*- lexical-binding: t -*- ;; 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 riece-9.0.0/lisp/riece-500.el0000644000076400007640000000240111546262045012424 00000000000000;;; riece-500.el --- handlers for 500 replies -*- lexical-binding: t -*- ;; 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 riece-9.0.0/lisp/riece.el0000644000076400007640000004557011546263621012141 00000000000000;;; riece.el --- IRC client for Emacsen -*- lexical-binding: t -*- ;; 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) (defvar riece-channel-list-mode-map (make-sparse-keymap)) (defvar riece-user-list-mode-map (make-sparse-keymap)) (defvar riece-dialogue-mode-map (let ((keymap (make-keymap))) (suppress-keymap keymap 'nodigit) keymap)) (defvar riece-command-mode-map (make-keymap)) (defvar riece-command-map (make-sparse-keymap)) (defvar riece-command-mode-syntax-table nil) (put 'riece-command-mode 'mode-class 'special) (put 'riece-dialogue-mode 'mode-class 'special) (put 'riece-others-mode 'derived-mode-parent 'riece-dialogue-mode) (put 'riece-channel-list-mode 'mode-class 'special) (put 'riece-user-list-mode 'mode-class 'special) (put 'riece-channel-mode 'derived-mode-parent 'riece-dialogue-mode) (defvar riece-buffer-alist '((riece-command-buffer "*Command*" riece-command-mode) (riece-dialogue-buffer "*Dialogue*" riece-dialogue-mode) (riece-others-buffer "*Others*" riece-others-mode) (riece-channel-list-buffer "*Channels*" riece-channel-list-mode) (riece-user-list-buffer " *Users*" riece-user-list-mode) (riece-temp-buffer " *Temp*") (riece-debug-buffer "*Debug*"))) (defvar riece-select-keys `("#" riece-command-switch-to-channel-by-number "1" riece-command-switch-to-channel-by-number-1 "2" riece-command-switch-to-channel-by-number-2 "3" riece-command-switch-to-channel-by-number-3 "4" riece-command-switch-to-channel-by-number-4 "5" riece-command-switch-to-channel-by-number-5 "6" riece-command-switch-to-channel-by-number-6 "7" riece-command-switch-to-channel-by-number-7 "8" riece-command-switch-to-channel-by-number-8 "9" riece-command-switch-to-channel-by-number-9 "0" riece-command-switch-to-channel-by-number-10 ,(concat riece-command-prefix "1") riece-command-switch-to-channel-by-number-11 ,(concat riece-command-prefix "2") riece-command-switch-to-channel-by-number-12 ,(concat riece-command-prefix "3") riece-command-switch-to-channel-by-number-13 ,(concat riece-command-prefix "4") riece-command-switch-to-channel-by-number-14 ,(concat riece-command-prefix "5") riece-command-switch-to-channel-by-number-15 ,(concat riece-command-prefix "6") riece-command-switch-to-channel-by-number-16 ,(concat riece-command-prefix "7") riece-command-switch-to-channel-by-number-17 ,(concat riece-command-prefix "8") riece-command-switch-to-channel-by-number-18 ,(concat riece-command-prefix "9") riece-command-switch-to-channel-by-number-19 ,(concat riece-command-prefix "0") riece-command-switch-to-channel-by-number-20)) ;;; Keymap macros. -- borrowed from `gnus-util.el'. (defmacro riece-local-set-keys (&rest plist) "Set the keys in PLIST in the current keymap." `(riece-define-keys-1 (current-local-map) ',plist)) (defmacro riece-define-keys (keymap &rest plist) "Assign KEYMAP keys from PLIST." `(riece-define-keys-1 ',keymap ',plist)) (defmacro riece-define-keys-safe (keymap &rest plist) "Assign KEYMAP keys from PLIST without overwriting previous definitions." `(riece-define-keys-1 ',keymap ',plist t)) (put 'riece-define-keys 'lisp-indent-function 1) (put 'riece-define-keys-safe 'lisp-indent-function 1) (put 'riece-local-set-keys 'lisp-indent-function 1) (defun riece-define-keys-1 (keymap plist &optional safe) "Assign KEYMAP keys from PLIST. If optional argument SAFE is nil, overwrite previous definitions." (unless keymap (error "Can't set keys in a null keymap")) (cond ((symbolp keymap) (setq keymap (symbol-value keymap))) ((keymapp keymap)) ((listp keymap) (set (car keymap) nil) (define-prefix-command (car keymap)) (define-key (symbol-value (nth 2 keymap)) (if (symbolp (nth 1 keymap)) (symbol-value (nth 1 keymap)) (nth 1 keymap)) (car keymap)) (setq keymap (symbol-value (car keymap))))) (let (key) (while plist (if (symbolp (setq key (car plist))) (setq key (symbol-value key))) (setq plist (cdr plist)) (if (or (not safe) (eq (lookup-key keymap key) 'undefined)) (define-key keymap key (car plist)) (car plist)) (setq plist (cdr plist))))) (when t (riece-define-keys riece-dialogue-mode-map "\177" scroll-down [delete] scroll-down [backspace] scroll-down [return] scroll-up " " scroll-up [home] beginning-of-buffer "$" end-of-buffer [end] end-of-buffer "/" riece-command-raw ">" end-of-buffer "<" beginning-of-buffer "^" riece-command-list-addons "\C-ta" riece-command-toggle-away "c" riece-command-select-command-buffer "f" riece-command-finger "\C-tf" riece-command-toggle-freeze "\C-to" riece-command-toggle-own-freeze "\C-tO" riece-command-toggle-others-buffer-mode "\C-tu" riece-command-toggle-user-list-buffer-mode "\C-tc" riece-command-toggle-channel-buffer-mode "\C-tC" riece-command-toggle-channel-list-buffer-mode "\C-tl" riece-command-change-layout "i" riece-command-invite "j" riece-command-join "\C-k" riece-command-kick "l" riece-command-list "M" riece-command-change-mode "n" riece-command-change-nickname "N" riece-command-names "o" other-window "O" riece-command-open-server "C" riece-command-close-server "M" riece-command-universal-server-name-argument "p" riece-command-enter-message-to-user "q" riece-command-quit "r" riece-command-configure-windows "s" riece-command-save-variables "x" riece-command-copy-region "t" riece-command-topic "w" riece-command-who "z" riece-command-suspend-resume) (riece-define-keys riece-command-mode-map "\r" riece-command-enter-message [(control return)] riece-command-enter-message-as-notice [tab] riece-command-complete-user) (riece-define-keys (riece-command-map riece-command-prefix riece-command-mode-map) "\177" riece-command-scroll-down [delete] riece-command-scroll-down [backspace] riece-command-scroll-down " " riece-command-scroll-up [home] riece-command-beginning-of-buffer "$" riece-command-end-of-buffer [end] riece-command-end-of-buffer ">" riece-command-next-channel "<" riece-command-previous-channel "\C-j" riece-command-next-channel "\C-n" riece-command-names "l" riece-command-list "\C-m" riece-command-change-mode "o" riece-command-set-operators "\C-p" riece-command-part "r" riece-command-configure-windows "v" riece-command-set-speakers "V" riece-version) (set-keymap-parent riece-command-map riece-dialogue-mode-map) (riece-define-keys riece-user-list-mode-map "o" riece-command-set-operators "v" riece-command-set-voices "f" riece-command-finger " " riece-command-user-list-scroll-up "\177" riece-command-user-list-scroll-down [delete] riece-command-user-list-scroll-down [backspace] riece-command-user-list-scroll-down "c" riece-command-select-command-buffer) (riece-define-keys riece-channel-list-mode-map ">" riece-command-next-channel "<" riece-command-previous-channel "o" other-window "c" riece-command-select-command-buffer) (riece-define-keys-1 riece-dialogue-mode-map riece-select-keys) (riece-define-keys-1 riece-channel-list-mode-map riece-select-keys)) (defun riece-read-variables-files (&optional file) "Read variables FILEs." (or (file-directory-p riece-directory) (make-directory riece-directory)) (let ((files (if file (setq riece-variables-file file riece-variables-files (list file)) riece-variables-files))) (while files (condition-case nil (load (expand-file-name (car files))) (file-error nil)) (setq files (cdr files))))) (defvar print-quoted) (defvar print-escape-multibyte) (defvar print-readably) (defun riece-save-variables-files () "Save current settings to `riece-saved-variables-file'." (message (riece-mcat "Saving %s...") riece-saved-variables-file) (with-temp-file riece-saved-variables-file (insert ";;; This file is generated automatically by " riece-version ".\n" ";;; Do not edit this file!\n\n") (let ((print-quoted t) (print-readably t) print-escape-multibyte print-level print-length (variables riece-saved-forms)) (while variables (prin1 `(setq ,(car variables) ',(symbol-value (car variables))) (current-buffer)) (insert "\n") (setq variables (cdr variables))))) (message (riece-mcat "Saving %s...done") riece-saved-variables-file) (setq riece-save-variables-are-dirty nil)) ;;;###autoload (defun riece (&optional confirm) "Connect to the IRC server and start chatting. If optional argument CONFIRM is non-nil, ask which IRC server to connect." (interactive "P") (riece-read-variables-files (if noninteractive (car command-line-args-left))) (run-hooks 'riece-after-load-startup-hook) (if (riece-server-opened) (riece-command-configure-windows) (modify-frame-parameters (selected-frame) (list (cons 'riece-window-configuration (current-window-configuration)))) (setq riece-addon-dependencies (riece-resolve-addons (copy-sequence riece-addons))) (let ((pointer riece-addon-dependencies)) (while pointer (riece-insinuate-addon (car (car pointer)) riece-debug) (setq pointer (cdr pointer)))) (if (or confirm (null riece-server)) (setq riece-server (completing-read (riece-mcat "Server: ") riece-server-alist))) (if (stringp riece-server) (setq riece-server (riece-server-name-to-server riece-server))) (riece-create-buffers) (switch-to-buffer riece-command-buffer) (riece-display-connect-signals) (riece-redisplay-buffers) (riece-open-server riece-server "") ;; If no server process is available, exit. (if (null riece-server-process-alist) (riece-exit) (let ((server-list riece-startup-server-list)) (while server-list (riece-command-open-server (car server-list)) (setq server-list (cdr server-list)))) (let ((channel-list riece-startup-channel-list) server) (while channel-list (setq server (riece-identity-server (riece-parse-identity (car channel-list)))) (unless (riece-server-opened server) (riece-command-open-server server)) (setq channel-list (cdr channel-list)))) (let ((pointer riece-addon-dependencies)) (while pointer (unless (get (car (car pointer)) 'riece-addon-default-disabled) (riece-enable-addon (car (car pointer)) riece-debug)) (setq pointer (cdr pointer)))) (run-hooks 'riece-startup-hook) (message "%s" (substitute-command-keys (riece-mcat "Type \\[describe-mode] for help")))))) (defun riece-exit () (if riece-save-variables-are-dirty (riece-save-variables-files)) (while riece-buffer-list (if (and (get-buffer (car riece-buffer-list)) (buffer-live-p (car riece-buffer-list))) (funcall riece-buffer-dispose-function (car riece-buffer-list))) (setq riece-buffer-list (cdr riece-buffer-list))) (riece-clear-signal-slots) (setq riece-server nil riece-current-channels nil riece-current-channel nil riece-channel-buffer nil riece-channel-buffer-alist nil riece-user-indicator nil riece-long-channel-indicator (riece-mcat "None") riece-channel-list-indicator (riece-mcat "No channel") riece-away-indicator "-" riece-operator-indicator "-" riece-channel-status-indicator "-" riece-freeze-indicator "-") (modify-frame-parameters (selected-frame) (list (list 'riece-window-configuration))) (delete-other-windows) (run-hooks 'riece-exit-hook)) (defun riece-command-mode () "Major mode for Riece. Normal edit function are available. Typing Return or Linefeed enters the current line in the dialogue. The following special commands are available: For a list of the generic commands type \\[riece-command-generic] ? RET. \\{riece-command-mode-map}" (interactive) (kill-all-local-variables) ;; Make `truncate-partial-width-windows' buffer local and set it to ;; nil. This causes `truncate-lines' to directly control line ;; truncation. (make-local-variable 'truncate-partial-width-windows) (setq truncate-partial-width-windows nil) (make-local-variable 'riece-mode-line-buffer-identification) (setq riece-away-indicator "-" riece-operator-indicator "-" riece-channel-status-indicator "-" major-mode 'riece-command-mode mode-name "Command" riece-mode-line-buffer-identification '("Riece: " riece-away-indicator riece-operator-indicator riece-channel-status-indicator " " riece-user-indicator " " riece-channel-indicator) mode-line-buffer-identification (riece-mode-line-buffer-identification riece-mode-line-buffer-identification) truncate-lines nil) (riece-simplify-mode-line-format) (use-local-map riece-command-mode-map) (unless riece-command-mode-syntax-table (setq riece-command-mode-syntax-table (copy-syntax-table (syntax-table))) (set-syntax-table riece-command-mode-syntax-table) (let* ((chars "^[]{}'`") (length (length chars)) (index 0)) (while (< index length) (modify-syntax-entry (aref chars index) "w") (setq index (1+ index))))) (run-hooks 'riece-command-mode-hook)) (defun riece-dialogue-mode () "Major mode for displaying the IRC dialogue. All normal editing commands are turned off. Instead, these commands are available: \\{riece-dialogue-mode-map}" (kill-all-local-variables) (make-local-variable 'riece-freeze) (make-local-variable 'riece-freeze-indicator) ;; Make `truncate-partial-width-windows' buffer local and set it to ;; nil. This causes `truncate-lines' to directly control line truncation. (make-local-variable 'truncate-partial-width-windows) (setq truncate-partial-width-windows nil) (make-local-variable 'riece-mode-line-buffer-identification) (setq riece-freeze riece-default-freeze riece-away-indicator "-" riece-operator-indicator "-" riece-channel-status-indicator "-" major-mode 'riece-dialogue-mode mode-name "Dialogue" riece-mode-line-buffer-identification '("Riece: " riece-away-indicator riece-operator-indicator riece-freeze-indicator riece-channel-status-indicator " " riece-channel-list-indicator " ") mode-line-buffer-identification (riece-mode-line-buffer-identification riece-mode-line-buffer-identification) truncate-lines nil buffer-read-only t) (riece-simplify-mode-line-format) (use-local-map riece-dialogue-mode-map) (buffer-disable-undo) (run-hooks 'riece-dialogue-mode-hook)) (define-derived-mode riece-others-mode riece-dialogue-mode "Others" "Major mode for displaying the IRC others message except current channel. All normal editing commands are turned off. Instead, these commands are available: \\{riece-others-mode-map}") (define-derived-mode riece-channel-mode riece-dialogue-mode "Channel" "Major mode for displaying the IRC current channel buffer. All normal editing commands are turned off. Instead, these commands are available: \\{riece-channel-mode-map}" (make-local-variable 'riece-channel-buffer-window-point) (make-local-variable 'riece-mode-line-buffer-identification) (setq riece-mode-line-buffer-identification '("Riece: " riece-away-indicator riece-operator-indicator riece-freeze-indicator riece-channel-status-indicator " " riece-long-channel-indicator) mode-line-buffer-identification (riece-mode-line-buffer-identification riece-mode-line-buffer-identification))) (defun riece-channel-list-mode () "Major mode for displaying channel list. All normal editing commands are turned off." (kill-all-local-variables) (buffer-disable-undo) ;; Make `truncate-partial-width-windows' buffer local and set it to ;; nil. This causes `truncate-lines' to directly control line truncation. (make-local-variable 'truncate-partial-width-windows) (setq truncate-partial-width-windows nil) (make-local-variable 'riece-mode-line-buffer-identification) (setq major-mode 'riece-channel-list-mode mode-name "Channels" riece-mode-line-buffer-identification '("Riece: ") mode-line-buffer-identification (riece-mode-line-buffer-identification riece-mode-line-buffer-identification) truncate-lines t buffer-read-only t) (riece-make-local-hook 'riece-update-buffer-functions) (add-hook 'riece-update-buffer-functions 'riece-update-channel-list-buffer nil t) (use-local-map riece-channel-list-mode-map) (run-hooks 'riece-channel-list-mode-hook)) (defun riece-user-list-mode () "Major mode for displaying members in the IRC current channel buffer. All normal editing commands are turned off. Instead, these commands are available: \\{riece-user-list-mode-map}" (kill-all-local-variables) (buffer-disable-undo) ;; Make `truncate-partial-width-windows' buffer local and set it to ;; nil. This causes `truncate-lines' to directly control line truncation. (make-local-variable 'truncate-partial-width-windows) (setq truncate-partial-width-windows nil) (make-local-variable 'riece-mode-line-buffer-identification) (setq major-mode 'riece-user-list-mode mode-name "Users" riece-mode-line-buffer-identification '("Riece: " riece-long-channel-indicator " ") mode-line-buffer-identification (riece-mode-line-buffer-identification riece-mode-line-buffer-identification) truncate-lines t buffer-read-only t) (if (boundp 'transient-mark-mode) (set (make-local-variable 'transient-mark-mode) t)) (riece-make-local-hook 'riece-update-buffer-functions) (add-hook 'riece-update-buffer-functions 'riece-update-user-list-buffer nil t) (use-local-map riece-user-list-mode-map) (run-hooks 'riece-user-list-mode-hook)) (defun riece-create-buffers () (let ((alist riece-buffer-alist)) (while alist (with-current-buffer (apply #'riece-get-buffer-create (cdr (car alist))) (set (car (car alist)) (current-buffer)) (unless (or (null (nth 2 (car alist))) (eq major-mode (nth 2 (car alist)))) (funcall (nth 2 (car alist)))) (setq alist (cdr alist)))))) (defun riece-submit-bug-report () "Submit via mail a bug report on Riece." (interactive) (browse-url "https://savannah.nongnu.org/bugs/?group=riece")) (provide 'riece) ;;; riece.el ends here riece-9.0.0/lisp/riece-log.el0000644000076400007640000002377611546262045012723 00000000000000;;; riece-log.el --- Save IRC logs -*- lexical-binding: t -*- ;; 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 'no-conversion)) (unless (file-directory-p (file-name-directory file)) (make-directory (file-name-directory file) t)) (write-region (concat (format-time-string "%H:%M") " " (riece-format-message message)) nil file t 0 riece-log-lock-file)))) (defun riece-log-make-file-name (identity coding-system) (expand-file-name (if (and (featurep 'mule) coding-system) (format "%s.txt.%s" (format-time-string "%Y%m%d") coding-system) (format "%s.txt" (format-time-string "%Y%m%d"))) (riece-log-directory identity))) (defun riece-log-list-files (identity time) (let ((directory (riece-log-directory identity)) (time-prefix (format-time-string "%Y%m%d" (or time '(0 0)))) files) (when (file-directory-p directory) (setq files (nreverse (sort (directory-files directory t (concat "^" riece-log-file-name-regexp) t) #'string-lessp))) (while (and files (string-lessp (file-name-nondirectory (car files)) time-prefix)) (setq files (cdr files))) files))) (defun riece-log-directory (identity) (let ((prefix (riece-identity-canonicalize-prefix (riece-identity-prefix identity))) (server (riece-identity-server identity)) (map (assoc (riece-format-identity identity) riece-log-directory-map))) (if map (expand-file-name (cdr map) riece-log-directory) (expand-file-name (riece-log-encode-file-name prefix) (expand-file-name (concat "." (riece-log-encode-file-name server)) riece-log-directory))))) (defun riece-log-encode-file-name (file-name) (if riece-log-file-name-coding-system (setq file-name (encode-coding-string file-name riece-log-file-name-coding-system))) (let ((index 0) c) (while (string-match "[^-0-9A-Za-z_\x80-\xFF]" file-name index) (setq c (aref file-name (match-beginning 0))) (if (eq c ?=) (setq file-name (replace-match "==" nil t file-name) index (1+ (match-end 0))) (setq file-name (replace-match (format "=%02X" c) nil t file-name) index (+ 2 (match-end 0))))) file-name)) (defun riece-log-decode-file-name (file-name) (let ((index 0)) (while (string-match "==\\|=\\([0-7][0-9A-F]\\)" file-name index) (setq file-name (replace-match (if (eq (aref file-name (1- (match-end 0))) ?=) "=" (char-to-string (car (read-from-string (concat "?\\x" (match-string 1 file-name)))))) nil t file-name) index (1+ (match-beginning 0)))) file-name) (if riece-log-file-name-coding-system (setq file-name (decode-coding-string file-name riece-log-file-name-coding-system))) file-name) (defun riece-log-insert (identity lines) "Insert logs for IDENTITY at most LINES. If LINES is t, insert today's logs entirely." (let* ((file-name-coding-system 'no-conversion) (files (riece-log-list-files identity (if (eq lines t) (current-time)))) name coding-system date point) (while (and (or (eq lines t) (> lines 0)) files) (save-restriction (narrow-to-region (point) (point)) (if (and (string-match (concat "^" riece-log-file-name-regexp) (setq name (file-name-nondirectory (car files)))) (match-beginning 2)) (progn (setq coding-system (intern (substring name (match-beginning 2)))) (if (featurep 'xemacs) (setq coding-system (find-coding-system coding-system)) (unless (coding-system-p coding-system) (setq coding-system nil))) (if coding-system (let ((coding-system-for-read coding-system)) (insert-file-contents (car files))) ;;don't insert file contents if they use non ;;supported coding-system. )) ;;if the filename has no coding-system suffix, decode with ;;riece-log-coding-system. (let ((coding-system-for-read riece-log-coding-system)) (insert-file-contents (car files)))) ;;lines in the file contents are in reversed order. (unless (eq lines t) (goto-char (point-max)) (setq lines (- (forward-line (- lines)))) (delete-region (point-min) (point))) ;;add (YYYY/MM/dd) suffix on each line left in the current buffer. (unless (equal (substring name 0 8) (format-time-string "%Y%m%d")) (setq date (concat " (" (substring name 0 4) "/" (substring name 4 6) "/" (substring name 6 8) ")")) (while (not (eobp)) (end-of-line) (setq point (point)) (insert date) (put-text-property point (point) 'riece-overlay-face 'riece-log-date-face) (forward-line)) (goto-char (point-min)))) (setq files (cdr files))))) (defun riece-log-flashback (identity) (when riece-log-flashback (riece-insert-info (current-buffer) (if (eq riece-log-flashback t) (riece-mcat "Recent messages of the day:\n") (format (riece-mcat "Recent messages up to %d lines:\n") riece-log-flashback))) (let (buffer-read-only (point (goto-char (point-max)))) (insert (with-temp-buffer (riece-log-insert identity riece-log-flashback) (buffer-string))) (goto-char point) (while (re-search-forward (concat "^" riece-time-prefix-regexp "\\(<[^>]+>\\|>[^<]+<\\|([^)]+)\\|{[^}]+}\\|=[^=]+=\\)") nil t) (put-text-property (1+ (match-beginning 1)) (1- (match-end 1)) 'riece-identity (riece-make-identity (buffer-substring (1+ (match-beginning 1)) (1- (match-end 1))) (riece-identity-server identity)))) (run-hook-with-args 'riece-after-insert-functions point (goto-char (point-max))) (set-window-point (get-buffer-window (current-buffer)) (point))))) (defun riece-log-dired (&optional channel) (interactive) (let ((directory (riece-log-directory (or channel riece-current-channel)))) (if (file-directory-p directory) (dired directory) (error "No log directory")))) (defun riece-log-requires () (if (memq 'riece-button riece-addons) '(riece-button))) (defun riece-log-insinuate () (make-directory riece-log-directory t) (setq riece-log-lock-file (expand-file-name (format "!%s-%d-%d" (riece-log-encode-file-name (system-name)) (user-uid) (emacs-pid)) riece-log-directory)) ;; FIXME: Use `riece-after-insert-functions' for trapping change, ;; notice, wallops and so on. But must add argument. (add-hook 'riece-after-display-message-functions 'riece-log-display-message-function) (add-hook 'riece-channel-buffer-create-functions 'riece-log-flashback)) (defun riece-log-uninstall () (setq riece-log-lock-file nil) (remove-hook 'riece-after-display-message-functions 'riece-log-display-message-function) (remove-hook 'riece-channel-buffer-create-functions 'riece-log-flashback)) (defvar riece-command-mode-map) (defun riece-log-enable () (define-key riece-command-mode-map "\C-cd" 'riece-log-dired)) (defun riece-log-disable () (define-key riece-command-mode-map "\C-cd" nil)) (provide 'riece-log) ;;; riece-log.el ends here riece-9.0.0/lisp/riece-hangman.el0000644000076400007640000001763411546262045013547 00000000000000;;; riece-hangman.el --- allow channel members to play the hangman game -*- lexical-binding: t -*- ;; 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*")) (with-current-buffer riece-hangman-words-buffer (buffer-disable-undo) (insert-file-contents riece-hangman-words-file) (let ((case-fold-search nil)) (delete-non-matching-lines "^[a-z][a-z][a-z][a-z][a-z][a-z]+")))) (with-current-buffer riece-hangman-words-buffer (goto-char (1+ (random (buffer-size)))) (if (eobp) (beginning-of-line -1) (beginning-of-line)) (buffer-substring (point) (progn (end-of-line) (point))))) (defun riece-hangman-reply (target string) (riece-display-message (riece-make-message (riece-make-identity riece-real-nickname riece-server-name) (riece-make-identity target riece-server-name) string 'notice t)) (riece-send-string (format "NOTICE %s :%s\r\n" target string))) (defun riece-hangman-reply-with-context (user target context) (let ((masked-word (make-string (length (riece-hangman-context-word context)) ?-)) (guessed (copy-sequence (riece-hangman-context-guessed context))) (index 0)) (while (< index (length (riece-hangman-context-word context))) (if (memq (aref (riece-hangman-context-word context) index) guessed) (aset masked-word index (aref (riece-hangman-context-word context) index))) (setq index (1+ index))) (riece-hangman-reply target (format "%s: Word: %s, Guessed: %s" user masked-word (if guessed (apply #'string (sort guessed #'<)) ""))))) (defun riece-hangman-after-privmsg-hook (prefix string) (if (get 'riece-hangman 'riece-addon-enabled) (let* ((user (riece-prefix-nickname prefix)) (parameters (riece-split-parameters string)) (targets (split-string (car parameters) ",")) (message (nth 1 parameters)) case-fold-search pointer word guessed index) (if (string-match riece-hangman-hello-regexp message) (if (riece-identity-assoc user riece-hangman-player-context-alist t) (riece-hangman-reply (car targets) (format "%s: You are already playing the game." user)) (let ((context (riece-hangman-make-context (riece-hangman-word)))) (setq riece-hangman-player-context-alist (cons (cons user context) riece-hangman-player-context-alist)) (riece-hangman-reply-with-context user (car targets) context))) (if (string-match riece-hangman-bye-regexp message) (when (setq pointer (riece-identity-assoc user riece-hangman-player-context-alist t)) (setq riece-hangman-player-context-alist (delq pointer riece-hangman-player-context-alist)) (riece-hangman-reply (car targets) (format "%s: Sorry, the word was \"%s\"" user (riece-hangman-context-word (cdr pointer))))) (if (setq pointer (riece-identity-assoc user riece-hangman-player-context-alist t)) (if (or (/= (length message) 1) (not (string-match "[a-z]" message))) (riece-hangman-reply (car targets) (format "%s: Not a valid guess: %s" user message)) (if (memq (aref message 0) (riece-hangman-context-guessed (cdr pointer))) (riece-hangman-reply (car targets) (format "%s: Already guessed '%c'" user (aref message 0))) (setq guessed (riece-hangman-context-set-guessed (cdr pointer) (cons (aref message 0) (riece-hangman-context-guessed (cdr pointer)))) word (riece-hangman-context-word (cdr pointer))) (unless (catch 'found (setq index 0) (while (< index (length word)) (if (eq (aref word index) (aref message 0)) (throw 'found t)) (setq index (1+ index)))) (riece-hangman-context-set-missed-count (cdr pointer) (1+ (riece-hangman-context-missed-count (cdr pointer))))) (if (>= (riece-hangman-context-missed-count (cdr pointer)) 7) (progn (riece-hangman-reply (car targets) (format "%s: Sorry, the word was \"%s\"" user (riece-hangman-context-word (cdr pointer)))) (setq riece-hangman-player-context-alist (delq pointer riece-hangman-player-context-alist))) (if (catch 'missing (setq index 0) (while (< index (length word)) (unless (memq (aref word index) guessed) (throw 'missing t)) (setq index (1+ index)))) (riece-hangman-reply-with-context user (car targets) (cdr pointer)) (riece-hangman-reply (car targets) (format "%s: You got it! (%s)" user word)) (setq riece-hangman-player-context-alist (delq pointer riece-hangman-player-context-alist)))))))))))) (defun riece-hangman-insinuate () (add-hook 'riece-after-privmsg-hook 'riece-hangman-after-privmsg-hook)) (defun riece-hangman-uninstall () (remove-hook 'riece-after-privmsg-hook 'riece-hangman-after-privmsg-hook)) (defun riece-hangman-enable () (random t)) (provide 'riece-hangman) ;;; riece-hangman.el ends here riece-9.0.0/lisp/riece-package-info.el.in0000644000076400007640000000217211377612201015051 00000000000000;;; 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 riece-9.0.0/lisp/riece-300.el0000644000076400007640000004017211546263450012432 00000000000000;;; riece-300.el --- handlers for 300 replies -*- lexical-binding: t -*- ;; 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 riece-9.0.0/lisp/COMPILE0000664000076400007640000002275111546261614011541 00000000000000;;; -*- Emacs-Lisp -*- (defvar riece-modules (cons 'riece-compat (cons (if (featurep 'xemacs) 'riece-xemacs 'riece-emacs) '(riece-globals riece-options riece-debug riece-package-info riece-version riece-coding riece-complete riece-addon-modules riece-addon riece-ruby riece-cache riece-mode ;; riece-identity -+-> riece-channel ;; +-> riece-user riece-identity riece-channel riece-user riece-misc riece-signal ;; riece-layout ---> riece-display riece-layout riece-display riece-server ;; riece-channel -+-> riece-naming ;; riece-user -+ riece-naming riece-message ;; riece-filter calls riece-{handle,000,200,300,400,500} riece-filter riece-handle riece-000 riece-200 riece-300 riece-400 riece-500 riece-commands riece-irc riece)))) (defvar riece-mcat-modules '(riece-mcat-japanese)) (defvar riece-generated-modules '(riece-package-info)) (defvar riece-icons '("riece-command-previous-channel.xpm" "riece-command-next-channel.xpm" "riece-command-configure-windows.xpm" "riece-command-list-addons.xpm" "riece-command-join.xpm" "riece-command-part.xpm")) (defvar riece-scripts '("server.rb" "aproxy.rb")) (defun riece-byte-compile-dest-file-function (filename) (expand-file-name (concat (file-name-nondirectory filename) "c"))) (defun riece-compile-modules (modules srcdir) (let ((load-path (cons nil (cons srcdir load-path))) error-modules) (while modules (let ((source (expand-file-name (concat (symbol-name (car modules)) ".el") srcdir)) (binary (expand-file-name (concat (symbol-name (car modules)) ".elc")))) (if (file-newer-than-file-p source binary) (condition-case error (let ((byte-compile-dest-file-function #'riece-byte-compile-dest-file-function)) (byte-compile-file source)) (error (setq error-modules (cons (car modules) error-modules)))))) (setq modules (cdr modules))) (if error-modules (princ (concat "\n\ WARNING: --------------------------------------------------------- WARNING: Couldn't compile following modules: WARNING: WARNING: " (mapconcat #'symbol-name error-modules ", ") "\n\ WARNING: WARNING: You should probably stop here, try \"make distclean\" to clear WARNING: the last build, and then reconfigure. WARNING: ---------------------------------------------------------\n\n"))))) (defun riece-compile-module () (let ((load-path (cons nil load-path))) (let ((source (expand-file-name (concat (car command-line-args-left) ".el")))) (if (file-newer-than-file-p source (concat source "c")) (byte-compile-file source)))) ;; Workaround for an XEmacs 21.5 bug ("xemacs -batch -f " ;; attempts to open as a file after ). (setq command-line-args-left (cdr command-line-args-left))) (defun riece-install-modules (modules srcdir lispdir just-print) (unless (or just-print (file-exists-p lispdir)) (make-directory lispdir t)) ;; Workaround for "make distcheck" (set-file-modes lispdir 493) (while modules (let ((name (symbol-name (car modules)))) (princ (format "%s.el -> %s\n" name lispdir)) (unless just-print (copy-file (expand-file-name (concat name ".el") (if (memq (car modules) riece-generated-modules) nil srcdir)) (expand-file-name (concat name ".el") lispdir) t t)) (princ (format "%s.elc -> %s\n" name lispdir)) (unless just-print (if (file-exists-p (expand-file-name (concat name ".elc"))) (copy-file (expand-file-name (concat name ".elc")) (expand-file-name (concat name ".elc") lispdir) t t) (princ (format "(%s was not successfully compiled, ignored)\n" name))))) (setq modules (cdr modules)))) (defun riece-install-icons (icons srcdir lispdir just-print) (unless (or just-print (file-exists-p lispdir)) (make-directory lispdir t)) ;; Workaround for "make distcheck" (set-file-modes lispdir 493) (while icons (when (file-exists-p (expand-file-name (car icons) srcdir)) (princ (format "%s -> %s\n" (car icons) lispdir)) (unless just-print (copy-file (expand-file-name (car icons) srcdir) (expand-file-name (car icons) lispdir) t t))) (setq icons (cdr icons)))) (defun riece-install-scripts (scripts srcdir lispdir just-print) (unless (or just-print (file-exists-p lispdir)) (make-directory lispdir t)) ;; Workaround for "make distcheck" (set-file-modes lispdir 493) (while scripts (when (file-exists-p (expand-file-name (car scripts) srcdir)) (princ (format "%s -> %s\n" (car scripts) lispdir)) (unless just-print (copy-file (expand-file-name (car scripts) srcdir) (expand-file-name (car scripts) lispdir) t t))) (setq scripts (cdr scripts)))) (defun riece-install-just-print-p () (let ((flag (getenv "MAKEFLAGS")) case-fold-search) (if flag (string-match "^\\(\\(--[^ ]+ \\)+-\\|[^ =-]\\)*n" flag)))) (defun riece-examine-modules (srcdir) (let ((load-path (cons nil (cons srcdir load-path)))) (require 'riece-mcat) (require 'riece-addon-modules) (append riece-modules riece-mcat-modules (mapcar #'car riece-addon-modules)))) (defun riece-examine () (princ (mapconcat #'symbol-name (riece-examine-modules (car command-line-args-left)) " "))) (defun riece-update-mcat () (let* ((srcdir (car command-line-args-left)) (modules (riece-examine-modules srcdir)) (pointer riece-mcat-modules) files) (while pointer (setq modules (delq (car pointer) modules) pointer (cdr pointer))) (setq files (mapcar (lambda (module) (concat (symbol-name module) ".el")) modules) pointer riece-mcat-modules) (while pointer (riece-mcat-update files (concat (symbol-name (car pointer)) ".el") (intern (concat (symbol-name (car pointer)) "-alist"))) (setq pointer (cdr pointer)))) ;; Workaround for an XEmacs 21.5 bug ("xemacs -batch -f " ;; attempts to open as a file after ). (setq command-line-args-left (cdr command-line-args-left))) (defun riece-compile () (let ((srcdir (car command-line-args-left))) (setq command-line-args-left (cdr command-line-args-left)) (riece-compile-modules (riece-examine-modules srcdir) srcdir)) ;; Workaround for an XEmacs 21.5 bug ("xemacs -batch -f " ;; attempts to open as a file after ). (setq command-line-args-left (cdr command-line-args-left))) (defun riece-install () (let ((srcdir (car command-line-args-left)) (lispdir (nth 1 command-line-args-left))) (riece-install-modules (riece-examine-modules srcdir) srcdir (expand-file-name "riece" lispdir) (riece-install-just-print-p)) (riece-install-icons riece-icons srcdir (expand-file-name "riece" lispdir) (riece-install-just-print-p)) (riece-install-scripts riece-scripts srcdir (expand-file-name "riece" lispdir) (riece-install-just-print-p)) ;; Workaround for an XEmacs 21.5 bug ("xemacs -batch -f " ;; attempts to open as a file after ). (setq command-line-args-left (nthcdr 2 command-line-args-left)))) (defun riece-uninstall () (let ((files (directory-files (expand-file-name "riece" (car command-line-args-left)) t "\\.\\(elc?\\|rb\\|xpm\\)$"))) (while files (delete-file (car files)) (setq files (cdr files))) ;; Workaround for an XEmacs 21.5 bug ("xemacs -batch -f " ;; attempts to open as a file after ). (setq command-line-args-left (cdr command-line-args-left)))) (defun riece-compile-package () (let ((srcdir (car command-line-args-left))) (setq command-line-args-left (cdr command-line-args-left)) (if (fboundp 'batch-update-directory-autoloads) (let ((command-line-args-left (list "riece" srcdir))) (batch-update-directory-autoloads)) (let ((command-line-args-left (list srcdir))) (setq autoload-package-name "riece") (batch-update-autoloads))) (let ((command-line-args-left (list srcdir))) (Custom-make-dependencies)) (riece-compile-modules (append (riece-examine-modules srcdir) '(auto-autoloads custom-load)) srcdir))) (defun riece-install-package () (let ((srcdir (car command-line-args-left))) (setq command-line-args-left (cdr command-line-args-left)) (riece-install-modules (append (riece-examine-modules srcdir) '(auto-autoloads custom-load)) srcdir (expand-file-name "lisp/riece" (car command-line-args-left)) (riece-install-just-print-p)) (riece-install-icons riece-icons srcdir (expand-file-name "etc/riece" (car command-line-args-left)) (riece-install-just-print-p)) (riece-install-scripts riece-scripts srcdir (expand-file-name "etc/riece" (car command-line-args-left)) (riece-install-just-print-p)))) (defun riece-test () (let* ((srcdir (car command-line-args-left)) (load-path (cons (expand-file-name "test" srcdir) (cons srcdir (cons nil load-path)))) (files (directory-files (expand-file-name "test" srcdir) t "^test-.*\\.el$")) suite) (require 'lunit-report) (setq suite (lunit-make-test-suite)) (while files (when (file-regular-p (car files)) (load-file (car files)) (lunit-test-suite-add-test suite (lunit-make-test-suite-from-class (intern (file-name-sans-extension (file-name-nondirectory (car files))))))) (setq files (cdr files))) (lunit-report suite (nth 1 command-line-args-left)))) riece-9.0.0/lisp/Makefile.am0000664000076400007640000000505311503600424012543 00000000000000SUBDIRS = 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 riece-twitter.el \ riece-desktop-notify.el \ url-riece.el \ riece-command-previous-channel.xpm riece-command-next-channel.xpm \ riece-command-configure-windows.xpm riece-command-list-addons.xpm \ riece-command-join.xpm riece-command-part.xpm \ server.rb aproxy.rb CLEANFILES = auto-autoloads.el custom-load.el *.elc lunit-report.xml DISTCLEANFILES = riece-package-info.el FLAGS ?= -batch -q -no-site-file all: elc elc: $(EMACS) $(FLAGS) -l $(srcdir)/COMPILE -f riece-compile \ $(srcdir) install: elc $(EMACS) $(FLAGS) -l $(srcdir)/COMPILE -f riece-install \ $(srcdir) $(lispdir) # $(MAKE) uninstall: $(EMACS) $(FLAGS) -l $(srcdir)/COMPILE -f riece-uninstall \ $(lispdir) package: $(XEMACS) $(FLAGS) -l $(srcdir)/COMPILE -f riece-compile-package \ $(srcdir) install-package: package $(XEMACS) $(FLAGS) -l $(srcdir)/COMPILE -f riece-install-package \ $(srcdir) $(PACKAGEDIR) # $(MAKE) check-local: $(EMACS) $(FLAGS) -l $(srcdir)/COMPILE -f riece-test \ $(srcdir) lunit-report.xml compile-individually: @for i in `$(EMACS) $(FLAGS) -l $(srcdir)/COMPILE -f riece-examine`; \ do \ echo $(EMACS) $(FLAGS) -l $(srcdir)/COMPILE \ -f riece-compile-module $$i; \ $(EMACS) $(FLAGS) -l $(srcdir)/COMPILE \ -f riece-compile-module $$i; \ done update-mcat: $(EMACS) $(FLAGS) -l $(srcdir)/COMPILE -f riece-update-mcat \ $(srcdir) riece-9.0.0/lisp/riece-ignore.el0000664000076400007640000001141011546264252013407 00000000000000;;; riece-ignore.el --- ignore messages from some users -*- lexical-binding: t -*- ;; 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))) (with-current-buffer riece-ignore-buffer (goto-char (point-max)) (let ((inhibit-read-only t) buffer-read-only) (insert (concat (format-time-string "%H:%M") " " (riece-format-message message t)))))) (put-text-property 0 (length (riece-message-text message)) 'invisible 'riece-ignore (riece-message-text message)) message) message)) (defvar riece-command-mode-map) (defun riece-ignore-insinuate () (setq riece-ignored-user-list (mapcar #'riece-parse-identity riece-startup-ignored-user-list)) (add-hook 'riece-message-filter-functions 'riece-ignore-message-filter)) (defun riece-ignore-uninstall () (setq riece-ignored-user-list nil) (remove-hook 'riece-message-filter-functions 'riece-ignore-message-filter)) (defun riece-ignore-enable () (define-key riece-command-mode-map "\C-ck" 'riece-ignore-user)) (defun riece-ignore-disable () (define-key riece-command-mode-map "\C-ck" nil)) (provide 'riece-ignore) ;;; riece-ignore.el ends here riece-9.0.0/lisp/ChangeLog0000664000076400007640000051323311745724754012312 000000000000002012-04-25 Daiki Ueno * riece-commands.el (riece-command-join): Allow multiple choices using riece-completing-read-multiple. * riece-mcat-japanese.el (riece-mcat-japanese-alist): Update translation. 2011-10-27 Daiki Ueno * riece-commands.el (riece-command-reorder-channels): New command. 2011-04-20 Daiki Ueno * riece-commands.el (riece-command-set-operators) (riece-command-set-speakers): Revert the arglist change in the last commit. 2011-04-04 Daiki Ueno * Use lexical binding. 2011-03-25 Daiki Ueno * riece-url.el (riece-url-regexp): Update the default value. 2011-03-16 Daiki Ueno * COMPILE (riece-compile-module, riece-update-mcat) (riece-compile): Add workaround for XEmacs 21.5. 2011-01-25 TAKAHASHI Kaoru * riece-ignore.el: Add newline at end of file. * riece-keyword.el: Ditto. * riece-mode.el: Ditto. 2010-12-20 Daiki Ueno * COMPILE (riece-examine): Supply srcdir to riece-examine-modules. (riece-compile-package): Ditto. (riece-install-package): Ditto. 2010-12-16 Daiki Ueno * riece-shrink-buffer.el (riece-shrink-buffer): Make sure not to move cursor. * riece-misc.el (riece-insert): Save the current point, if the buffer is frozen. 2010-12-11 TAKAHASHI Kaoru * COMPILE (riece-update-mcat): Fix "Wrong number of arguments" on `riece-examine-modules'. * Makefile.am: Add $(srcdir) to update-mcat target. 2010-12-10 Daiki Ueno * riece-log.el (riece-log-make-file-name): Don't append coding-system name to the filename when coding-system is nil. 2010-10-15 Daiki Ueno * riece-ctlseq.el (riece-ctlseq-put-attributes): Fix typo. 2010-10-15 Daiki Ueno * riece-ctlseq.el (riece-ctlseq-colors): Add an example setting to the doc. (riece-ctlseq-regexp, riece-ctlseq-update-attribute): Make "^C[,]" matching robuster. Thanks to Akira TAGOH. 2010-10-15 Daiki Ueno * riece-ctlseq.el (riece-ctlseq-regexp): New constant. (riece-ctlseq-update-attribute): Rename from riece-ctlseq-update-attributes. (riece-ctlseq-put-attributes): New function. (riece-ctlseq-message-filter): Rewrite the parsing logic. 2010-10-14 Daiki Ueno * COMPILE: Support "make distcheck". * Makefile.am: Support "make distcheck". * test/test-riece-log.el (test-riece-log-delete-directory) (test-riece-log-display-message-function): Don't bind default-file-name-coding-system. * riece-log.el (riece-log-display-message-function) (riece-log-insert): Don't bind default-file-name-coding-system. 2010-10-14 Daiki Ueno * riece-compat.el (riece-make-local-hook): Check if make-local-hook exists. Thanks to Makoto Fujiwara. 2010-09-12 TAKAHASHI Kaoru * riece-develop.el (riece-insert-struct-template): Use "\n" instead of newline in `interactive'. For `delete-trailing-whitespace' safe. * riece-rdcc.el (riece-rdcc-filter, riece-rdcc-sentinel): Suppress byte-compile warnings; `save-excursion' defeated by `set-buffer'. * riece-misc.el (riece-insert): Suppress byte-compile warnings; `save-excursion' defeated by `set-buffer'. * riece-keepalive.el (riece-keepalive-after-login-hook): Suppress byte-compile warnings; `save-excursion' defeated by `set-buffer'. * riece-kakasi.el (riece-kakasi-convert-string): Suppress byte-compile warnings; `save-excursion' defeated by `set-buffer'. * riece-ignore.el (riece-ignore-message-filter): Suppress byte-compile warnings; `save-excursion' defeated by `set-buffer'. * riece-hangman.el (riece-hangman-word): Suppress byte-compile warnings; `save-excursion' defeated by `set-buffer'. * riece-server.el (riece-reset-process-buffer): Suppress byte-compile warnings; `save-excursion' defeated by `set-buffer'. * riece-filter.el (riece-filter): Suppress byte-compile warnings; `save-excursion' defeated by `set-buffer'. * riece.el (riece-create-buffers): Suppress byte-compile warnings; `save-excursion' defeated by `set-buffer'. * riece-display.el (riece-display-connect-signals) (riece-update-buffers): Suppress byte-compile warnings; `save-excursion' defeated by `set-buffer'. * riece-button.el (riece-identity-button-popup-menu) (riece-identity-button-click): Suppress byte-compile warnings; `save-excursion' defeated by `set-buffer'. * riece-async.el (riece-async-open-network-stream): Suppress byte-compile warnings; `save-excursion' defeated by `set-buffer'. 2010-09-04 TAKAHASHI Kaoru * riece-mcat.el (riece-mcat-update): Suppress byte-compile warnings; `save-excursion' defeated by `set-buffer'. * riece-shrink-buffer.el (riece-shrink-buffer): Suppress byte-compile warnings; `save-excursion' defeated by `set-buffer'. * riece-ruby.el (riece-ruby-reset-process-buffer) (riece-ruby-execute, riece-ruby-filter) (riece-ruby-inspect): Suppress byte-compile warnings; `save-excursion' defeated by `set-buffer'. * riece-doctor.el (riece-doctor-after-privmsg-hook): Suppress byte-compile warnings; `save-excursion' defeated by `set-buffer'. 2010-09-01 TAKAHASHI Kaoru * riece-debug.el (riece-debug-1) (riece-debug-reset-standard-output, riece-ignore-errors): Suppress byte-compile warnings; `save-excursion' defeated by `set-buffer'. 2010-05-28 Daiki Ueno * riece-globals.el (riece-mode-line-buffer-identification) (riece-channel-indicator, riece-long-channel-indicator) (riece-channel-list-indicator, riece-user-indicator) (riece-away-indicator, riece-operator-indicator) (riece-channel-status-indicator): Mark as risky-local-variable. 2010-04-07 Daiki Ueno * COMPILE (riece-install): Add workaround for XEmacs 21.5. 2009-09-10 Daiki Ueno * Riece: Version 6.1.0 released. * riece.el (riece-read-variables-files) (riece-save-variables-files): Revert to use setq instead of custom-set-variables. Fixes #27384. 2009-08-28 TAKAHASHI Kaoru * riece-addon.el (riece-command-insinuate-addon) (riece-command-uninstall-addon, riece-command-unload-addon): Fix "Wrong type argument" error on not riece-addon-list-mode. 2009-07-26 TAKAHASHI Kaoru * riece-skk-kakutei.el: Fix Author header. * riece-foolproof.el: Ditto. * riece-layout.el: Ditto. 2009-05-30 Daiki Ueno * Riece: Version 6.0.0 released. 2009-04-23 Daiki Ueno * riece.el (riece-submit-bug-report): Just visit the tracker URL. 2009-04-22 Daiki Ueno * riece-addon-modules.el (riece-addon-modules): Don't mention riece-notify. * Makefile.am (EXTRA_DIST): Remove riece-notify.el. * riece-notify.el: Remove; use riece-desktop-notify.el. 2009-03-30 OHASHI Akira * riece-desktop-notify.el: New add-on. * riece-addon-modules.el (riece-addon-modules): Add riece-desktop-notify. * riece-mcat-japanese.el (riece-mcat-japanese-alist): Translate "Display notification to desktop.". * Makefile.am (EXTRA_DIST): Add riece-desktop-notify.el. 2009-03-30 OHASHI Akira * riece-keyword.el (riece-keyword-message-filter): Fix for the infinite loop. 2008-10-13 OHASHI Akira * riece-mini.el (riece-mini-show-backlog): Fix for multibyte characters. 2008-09-08 Daiki Ueno * riece-notify.el: New add-on. * riece-addon-modules.el (riece-addon-modules): Add riece-notify (commented). * Makefile.am (EXTRA_DIST): Add riece-notify.el. 2008-08-25 TAKAHASHI Kaoru * riece-commands.el (riece-command-enter-message): Fix behavior at last line of buffer. (riece-command-enter-message-to-user): Ditto. (riece-command-enter-message-as-notice): Ditto. 2008-06-11 Daiki Ueno * riece-options.el (riece-use-full-window): Abolish unused option. * riece-layout.el (riece-layout-alist): New layout "one-window". (riece-configure-windows-one-window): New function. 2008-06-07 Daiki Ueno * riece-options.el (riece-server-alist): Accept an integer for :service. 2008-06-06 Daiki Ueno * riece-compat.el (riece-make-local-hook): New alias. (riece-derived-mode-p): New alias. (riece-set-process-query-on-exit-flag): New alias. 2008-06-05 TAKAHASHI Kaoru * riece-options.el (riece-server-alist): Fix :value for username, password, function and coding-system. 2008-06-02 Daiki Ueno * riece.el (riece-read-variables-files): Re-evaluate custom settings. 2008-05-30 Daiki Ueno * Riece: Version 5.0.0 released. 2008-05-28 Daiki Ueno * riece.el (riece-save-variables-files): Generate custom-set-variables instead of a list of setq. * riece-options.el (riece-server-alist): Simplify custom-type. * riece-coding.el: Move defcustom to riece-options; require 'riece-options. 2008-05-27 Daiki Ueno * riece-menu.el (riece-menu-create-channels-menu): Remove placeholder channels. 2008-05-27 Daiki Ueno * riece-addon-modules.el (riece-addon-modules): Translate add-on description. * riece-menu.el (riece-menu-items): Define with defcustom; use riece-mcat to translate menu labels; bind riece-command-configure-windows. (riece-menu-requires): Depend on riece-mcat. (riece-menu-insinuate): Re-evaluate riece-menu-items. * riece-url.el (riece-url-command-mode-hook): Translate "Open URL...". 2008-05-27 Daiki Ueno * riece-display.el (riece-update-status-indicators): Don't update riece-user-indicator if riece-real-nickname is not fixed. * COMPILE (riece-icons): Re-order filenames. * Makefile.am (EXTRA_DIST): Add new toolbar icons. * riece-command-change-layout.xpm: * riece-command-configure-windows.xpm: * riece-command-join.xpm: * riece-command-part.xpm: * riece-command-quit.xpm: New toolbar icons. 2008-04-15 Daiki Ueno * riece-mcat-japanese.el (riece-mcat-japanese-alist): Translate "No information given". * riece-server.el (riece-open-server): Record errors for debug. * riece-irc.el (riece-irc-open-server): Send NICK before USER, following the recommendation in "3.1 Connection Registration" of RFC2812. (riece-irc-open-server): Fixed typo in the commit on 2008-04-04. 2008-04-04 春日 玄 KASUGA Toru * riece-irc.el (riece-irc-open-server): Encode realname when issueing a USER command. 2008-03-26 Takeru Naito * riece-keyword.el (riece-keyword-message-filter): Don't match to empty string if riece-keywords is nil, or it only contains regexp matchers. 2008-02-01 Daiki Ueno * riece.el (riece-save-variables-files): Display message before/after saving files. * riece-mcat-japanese.el (riece-mcat-japanese-alist): Translate these mesasges for riece-save-variables-files. 2007-12-21 OHASHI Akira * riece-mini.el (riece-mini-send-message): Use riece-format-identity. 2007-10-13 Daiki Ueno * riece-twitter.el (riece-twitter-update): Don't send extra headers only if it is called interactively. 2007-10-12 Daiki Ueno * riece-twitter.el (riece-twitter-update): Don't send extra headers. 2007-09-04 Didier Verna * riece-addon.el (riece-addon-list-mark-face-alist): Fix misuse of the list widget type. * riece-google.el (riece-google-program): Ditto. * riece-highlight.el (riece-channel-list-mark-face-alist): Ditto. * riece-keyword.el (riece-notify-keyword-functions) (riece-keyword-notify-functions): Ditto. * riece-layout.el (riece-layout-alist): Ditto. * riece-rdcc.el (riece-rdcc-send-program) (riece-rdcc-decode-address-program): Ditto. 2007-08-19 Daiki Ueno * riece-commands.el (riece-command-kick-with-ban): New command. 2007-06-21 Nikita Danilov * riece-000.el (riece-handle-001-message): Run riece-after-login-hook before joining in startup channels. * riece-mcat.el (riece-mcat): Don't load localized messages if mule is off. 2007-06-06 Daiki Ueno * riece-twitter.el (riece-twitter-set-credential): New command. (riece-twitter-update): New command. (riece-twitter-message-filter): Use it. (riece-twitter-sentinel): New function. 2007-06-05 Daiki Ueno * riece-twitter.el (riece-twitter-message-filter): Send a "source" parameter. 2007-05-29 Daiki Ueno * Riece: Version 4.0.0 released. 2007-05-29 Daiki Ueno * riece-twitter.el (riece-twitter-credential): Define with defcustom. (riece-twitter-cache-credential): New user option. (riece-twitter-message-filter): Ask Twitter username and password. 2007-05-28 Daiki Ueno * riece-log.el (riece-log-display-message-function): Just call riece-format-message. * riece-message.el (riece-format-message-1): Renamed from riece-format-message. (riece-format-message): Pick a function from riece-message-format-function-alist. 2007-04-24 OHASHI Akira * riece-log.el (riece-log-display-message-function): Use riece-message-format-function-alist. 2007-04-18 Daiki Ueno * riece-twitter.el: New add-on. * riece-addon-modules.el (riece-addon-modules): Add riece-twitter. * Makefile.am (EXTRA_DIST): Add riece-twitter.el. * riece-ctcp.el (riece-ctcp-action-format-message): New function. (riece-handle-ctcp-action-request): Use it. (riece-command-ctcp-action): Use it. * riece-message.el (riece-message-format-function-alist): New user option. (riece-display-message-1): Pick a format function from riece-message-format-function-alist. 2007-04-16 Daiki Ueno * riece-rdcc.el (riece-rdcc-server-port): New user option. (riece-rdcc-send-program): Bind `port'. 2007-02-12 Daiki Ueno * riece-handle.el (riece-handle-notice-message): Don't check the scope of the message if riece-real-nickname is nil. 2007-01-29 Daiki Ueno * 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. riece-9.0.0/lisp/riece-display.el0000644000076400007640000004117611546263431013601 00000000000000;;; riece-display.el --- buffer arrangement -*- lexical-binding: t -*- ;; 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) (defvar riece-channel-buffer-format "*Channel:%s*" "Format of channel message buffer.") (defvar riece-channel-buffer-alist nil "An alist mapping identities to channel buffers.") (defvar riece-update-buffer-functions nil "Functions to redisplay the buffer. Local to the buffer in `riece-buffer-list'.") (defvar riece-update-indicator-functions '(riece-update-status-indicators riece-update-channel-status-indicator riece-update-channel-indicator riece-update-long-channel-indicator riece-update-channel-list-indicator) "Functions to update modeline indicators.") (defun riece-display-connect-signals () (riece-connect-signal 'channel-list-changed (lambda (_signal _handback) (with-current-buffer riece-channel-list-buffer (run-hooks 'riece-update-buffer-functions)) (riece-update-channel-list-indicator))) (riece-connect-signal 'user-list-changed (lambda (_signal _handback) (with-current-buffer riece-user-list-buffer (run-hooks 'riece-update-buffer-functions))) (lambda (signal) (and riece-current-channel (riece-identity-equal (car (riece-signal-args signal)) riece-current-channel)))) (riece-connect-signal 'channel-switched (lambda (_signal _handback) (riece-update-status-indicators) (riece-update-channel-status-indicator) (riece-update-channel-indicator) (riece-update-long-channel-indicator) (force-mode-line-update t) (riece-emit-signal 'channel-list-changed) (riece-emit-signal 'user-list-changed riece-current-channel) (save-excursion (riece-redraw-layout)))) (riece-connect-signal 'user-joined-channel (lambda (_signal _handback) (riece-emit-signal 'user-list-changed riece-current-channel)) (lambda (signal) (and riece-current-channel (riece-identity-equal (nth 1 (riece-signal-args signal)) riece-current-channel) (not (riece-identity-equal (car (riece-signal-args signal)) (riece-current-nickname)))))) (riece-connect-signal 'user-joined-channel (lambda (signal _handback) (riece-join-channel (nth 1 (riece-signal-args signal))) (riece-switch-to-channel (nth 1 (riece-signal-args signal))) (setq riece-join-channel-candidate nil)) (lambda (signal) (riece-identity-equal (car (riece-signal-args signal)) (riece-current-nickname)))) (riece-connect-signal 'user-left-channel (lambda (_signal _handback) (riece-emit-signal 'user-list-changed riece-current-channel)) (lambda (signal) (and riece-current-channel (riece-identity-equal (nth 1 (riece-signal-args signal)) riece-current-channel) (not (riece-identity-equal (car (riece-signal-args signal)) (riece-current-nickname)))))) (riece-connect-signal 'user-left-channel (lambda (signal _handback) (riece-part-channel (nth 1 (riece-signal-args signal)))) (lambda (signal) (riece-identity-equal (car (riece-signal-args signal)) (riece-current-nickname)))) (riece-connect-signal 'user-renamed (lambda (_signal _handback) (riece-emit-signal 'user-list-changed riece-current-channel)) (lambda (signal) (and riece-current-channel (equal (riece-identity-server (nth 1 (riece-signal-args signal))) (riece-identity-server riece-current-channel)) (riece-with-server-buffer (riece-identity-server riece-current-channel) (when (riece-channel-p (riece-identity-prefix riece-current-channel)) (riece-identity-assoc (riece-identity-prefix (nth 1 (riece-signal-args signal))) (riece-channel-get-users (riece-identity-prefix riece-current-channel)) t)))))) (riece-connect-signal 'user-renamed (lambda (_signal _handback) (riece-update-status-indicators) (riece-update-channel-indicator) (force-mode-line-update t)) (lambda (signal) (riece-identity-equal (nth 1 (riece-signal-args signal)) (riece-current-nickname)))) (riece-connect-signal 'user-renamed (lambda (signal _handback) (riece-switch-to-channel (nth 1 (riece-signal-args signal)))) (lambda (signal) (and riece-current-channel (riece-identity-equal (car (riece-signal-args signal)) riece-current-channel)))) (riece-connect-signal 'user-renamed (lambda (signal _handback) (let* ((old-identity (car (riece-signal-args signal))) (new-identity (nth 1 (riece-signal-args signal))) (pointer (riece-identity-member old-identity riece-current-channels))) ;; Rename the channel buffer. (when pointer (setcar pointer new-identity) (with-current-buffer (riece-channel-buffer old-identity) (rename-buffer (riece-channel-buffer-name new-identity) t) (setq riece-channel-buffer-alist (cons (cons new-identity (current-buffer)) (delq (riece-identity-assoc old-identity riece-channel-buffer-alist) riece-channel-buffer-alist)))))))) (riece-connect-signal 'user-away-changed (lambda (_signal _handback) (riece-update-status-indicators) (force-mode-line-update t)) (lambda (signal) (riece-identity-equal (car (riece-signal-args signal)) (riece-current-nickname)))) (riece-connect-signal 'user-operator-changed (lambda (_signal _handback) (riece-update-status-indicators) (force-mode-line-update t)) (lambda (signal) (riece-identity-equal (car (riece-signal-args signal)) (riece-current-nickname)))) (riece-connect-signal 'channel-topic-changed (lambda (_signal _handback) (riece-update-long-channel-indicator) (force-mode-line-update t)) (lambda (signal) (and riece-current-channel (riece-identity-equal (car (riece-signal-args signal)) riece-current-channel)))) (riece-connect-signal 'channel-modes-changed (lambda (_signal _handback) (riece-update-long-channel-indicator) (force-mode-line-update t)) (lambda (signal) (and riece-current-channel (riece-identity-equal (car (riece-signal-args signal)) riece-current-channel)))) (riece-connect-signal 'channel-operators-changed (lambda (_signal _handback) (riece-update-channel-status-indicator) (riece-emit-signal 'user-list-changed riece-current-channel)) (lambda (signal) (and riece-current-channel (riece-identity-equal (car (riece-signal-args signal)) riece-current-channel)))) (riece-connect-signal 'channel-speakers-changed (lambda (_signal _handback) (riece-update-channel-status-indicator) (riece-emit-signal 'user-list-changed riece-current-channel)) (lambda (signal) (and riece-current-channel (riece-identity-equal (car (riece-signal-args signal)) riece-current-channel)))) (riece-connect-signal 'buffer-freeze-changed (lambda (_signal _handback) (riece-update-status-indicators) (force-mode-line-update t)))) (defun riece-update-user-list-buffer () (save-excursion (if (and riece-current-channel (riece-channel-p (riece-identity-prefix riece-current-channel))) (let* ((users (riece-with-server-buffer (riece-identity-server riece-current-channel) (riece-channel-get-users (riece-identity-prefix riece-current-channel)))) (inhibit-read-only t) buffer-read-only) (erase-buffer) (riece-kill-all-overlays) (while users (insert (if (memq ?o (cdr (car users))) "@" (if (memq ?v (cdr (car users))) "+" " ")) (riece-format-identity (riece-make-identity (car (car users)) (riece-identity-server riece-current-channel)) t) "\n") (setq users (cdr users))))))) (defun riece-format-identity-for-channel-list-buffer (index identity) (or (run-hook-with-args-until-success 'riece-format-identity-for-channel-list-buffer-functions index identity) (concat (format "%2d:%c" index (if (riece-identity-equal identity riece-current-channel) ?* ? )) (riece-format-identity identity)))) (defun riece-update-channel-list-buffer () (save-excursion (let ((inhibit-read-only t) buffer-read-only (index 1) (channels riece-current-channels)) (erase-buffer) (riece-kill-all-overlays) (while channels (if (car channels) (insert (riece-format-identity-for-channel-list-buffer index (car channels)) "\n")) (setq index (1+ index) channels (cdr channels)))))) (defun riece-update-channel-indicator () (setq riece-channel-indicator (if riece-current-channel (riece-format-identity riece-current-channel) (riece-mcat "None")))) (defun riece-update-long-channel-indicator () (setq riece-long-channel-indicator (if riece-current-channel (if (riece-channel-p (riece-identity-prefix riece-current-channel)) (riece-concat-channel-topic riece-current-channel (riece-concat-channel-modes riece-current-channel (riece-format-identity riece-current-channel))) (riece-format-identity riece-current-channel)) (riece-mcat "None")))) (defun riece-format-identity-for-channel-list-indicator (index identity) (or (run-hook-with-args-until-success 'riece-format-identity-for-channel-list-indicator-functions index identity) (let ((string (riece-format-identity identity)) (start 0)) ;; Escape % -> %%. (while (string-match "%" string start) (setq start (1+ (match-end 0)) string (replace-match "%%" nil nil string))) (format "%d:%s" index string)))) (defun riece-update-channel-list-indicator () (if (and riece-current-channels ;; There is at least one channel. (delq nil (copy-sequence riece-current-channels))) (let ((index 1) pointer) (setq riece-channel-list-indicator (delq nil (mapcar (lambda (channel) (prog1 (if channel (riece-format-identity-for-channel-list-indicator index channel)) (setq index (1+ index)))) riece-current-channels)) pointer riece-channel-list-indicator) (while pointer (if (cdr pointer) (setcdr pointer (cons "," (cdr pointer)))) (setq pointer (cdr (cdr pointer)))) (setq riece-channel-list-indicator (riece-normalize-modeline-string riece-channel-list-indicator))) (setq riece-channel-list-indicator (riece-mcat "No channel")))) (defun riece-update-status-indicators () (let ((server-name (riece-current-server-name))) (if server-name (with-current-buffer riece-command-buffer (riece-with-server-buffer server-name (setq riece-away-indicator (if (and riece-real-nickname (riece-user-get-away riece-real-nickname)) "A" "-") riece-operator-indicator (if (and riece-real-nickname (riece-user-get-operator riece-real-nickname)) "O" "-") ) (if riece-real-nickname (setq riece-user-indicator (riece-format-identity (riece-make-identity riece-real-nickname riece-server-name) t))))))) (walk-windows (lambda (window) (with-current-buffer (window-buffer window) (if (riece-derived-mode-p 'riece-dialogue-mode) (setq riece-freeze-indicator (if (eq riece-freeze 'own) "f" (if riece-freeze "F" "-")))))))) (defun riece-update-channel-status-indicator () (if (and riece-current-channel (riece-channel-p (riece-identity-prefix riece-current-channel))) (let ((users (riece-with-server-buffer (riece-identity-server riece-current-channel) (riece-channel-get-users (riece-identity-prefix riece-current-channel)))) (nickname (riece-with-server-buffer (riece-identity-server riece-current-channel) riece-real-nickname))) (with-current-buffer riece-command-buffer (setq riece-channel-status-indicator (if nickname (let ((user (cdr (riece-identity-assoc nickname users t)))) (if (memq ?o user) "@" (if (memq ?v user) "+" "-"))) "-")))))) (defun riece-update-buffers (&optional buffers) (unless buffers (setq buffers riece-buffer-list)) (while buffers (if (buffer-live-p (car buffers)) (with-current-buffer (car buffers) (run-hooks 'riece-update-buffer-functions))) (setq buffers (cdr buffers))) (run-hooks 'riece-update-indicator-functions) (force-mode-line-update t) (run-hooks 'riece-update-buffer-hook)) (defun riece-channel-buffer-name (identity) (let ((channels (riece-identity-member identity riece-current-channels))) (if channels (setq identity (car channels)) (if riece-debug (riece-debug (format "%S is not a member of riece-current-channels" identity)))) (format riece-channel-buffer-format (riece-format-identity identity)))) (eval-when-compile (autoload 'riece-channel-mode "riece")) (defun riece-channel-buffer-create (identity) (with-current-buffer (riece-get-buffer-create (riece-channel-buffer-name identity) 'riece-channel-mode) (setq riece-channel-buffer-alist (cons (cons identity (current-buffer)) riece-channel-buffer-alist)) (unless (eq major-mode 'riece-channel-mode) (riece-channel-mode) (let (buffer-read-only) (riece-insert-info (current-buffer) (format (riece-mcat "Created on %s\n") (funcall riece-format-time-function (current-time)))) (run-hook-with-args 'riece-channel-buffer-create-functions identity))) (current-buffer))) (defun riece-channel-buffer (identity) (let ((entry (riece-identity-assoc identity riece-channel-buffer-alist))) (if entry (if (buffer-live-p (cdr entry)) (cdr entry) (if riece-debug (riece-debug (format "riece-channel-buffer: nonexistent buffer: %s" (riece-format-identity identity)))))))) (defun riece-switch-to-channel (identity) (let ((last riece-current-channel) window) (if (and riece-channel-buffer (setq window (get-buffer-window riece-channel-buffer))) (with-current-buffer riece-channel-buffer (setq riece-channel-buffer-window-point (window-point window)))) (setq riece-current-channel identity riece-channel-buffer (riece-channel-buffer riece-current-channel)) (run-hook-with-args 'riece-after-switch-to-channel-functions last) (riece-emit-signal 'channel-switched))) (defun riece-join-channel (identity) (unless (riece-identity-member identity riece-current-channels) (setq riece-current-channels (riece-identity-assign-binding identity riece-current-channels (mapcar (lambda (channel) (if channel (riece-parse-identity channel))) riece-default-channel-binding))) (riece-channel-buffer-create identity))) (defun riece-switch-to-nearest-channel (pointer) (let ((start riece-current-channels) identity) (while (and start (not (eq start pointer))) (if (car start) (setq identity (car start))) (setq start (cdr start))) (unless identity (while (and pointer (null (car pointer))) (setq pointer (cdr pointer))) (setq identity (car pointer))) (if identity (riece-switch-to-channel identity) (let ((last riece-current-channel)) (run-hook-with-args 'riece-after-switch-to-channel-functions last) (setq riece-current-channel nil) (riece-emit-signal 'channel-switched))))) (defun riece-part-channel (identity) (let ((pointer (riece-identity-member identity riece-current-channels))) (unless pointer (error "No such channel!")) (setcar pointer nil) (if (riece-identity-equal identity riece-current-channel) (riece-switch-to-nearest-channel pointer) (riece-emit-signal 'channel-list-changed)) (funcall riece-buffer-dispose-function (riece-channel-buffer identity)))) (defun riece-redisplay-buffers (&optional force) (riece-update-buffers) (riece-redraw-layout force) (run-hooks 'riece-redisplay-buffers-hook)) (provide 'riece-display) ;;; riece-display.el ends here riece-9.0.0/lisp/riece-200.el0000644000076400007640000000240011546262045012420 00000000000000;;; riece-200.el --- handlers for 200 replies -*- lexical-binding: t -*- ;; 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 riece-9.0.0/lisp/riece-ctlseq.el0000644000076400007640000001673411546262045013431 00000000000000;;; riece-ctlseq.el --- mark up control sequences in IRC buffers -*- lexical-binding: t -*- ;; 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,. To set up colors compatible with X-Chat and mIRC, do: \(setq riece-ctlseq-colors '(\"#cecece\" \"black\" \"#0000cc\" \"#00cc00\" \"#dd0000\" \"#aa0000\" \"#bb00bb\" \"#ffaa00\" \"#eedd22\" \"#33de55\" \"#00cccc\" \"#33eeff\" \"#0000ff\" \"#ee22ee\" \"#777777\" \"#999999\")) " :group 'riece-ctlseq :type '(repeat (string :tag "Color"))) (defcustom riece-ctlseq-hide-controls t "If non-nil, control characters are hidden." :group 'riece-ctlseq :type 'boolean) (defcustom riece-ctlseq-face-cache-size 128 "Maximum length of the internal face cache." :group 'riece-ctlseq :type 'integer) (defvar riece-ctlseq-face-cache nil) (defvar riece-ctlseq-face-counter 0) (defconst riece-ctlseq-description "Mark up control sequences in IRC buffers.") (defconst riece-ctlseq-regexp "[\x2\xF\x16\x1F]\\|\x3\\([0-9][0-9]?\\)\\(,[0-9][0-9]?\\)?") (defun riece-ctlseq-compatible-attributes-p (this other) (let ((pointer this)) (catch 'mismatched (while pointer (unless (equal (plist-get other (car pointer)) (nth 1 pointer)) (throw 'mismatched nil)) (setq pointer (nthcdr 2 pointer))) t))) (defun riece-ctlseq-face-foreground-name (face) "Return the name of FACE's foreground color." (if (fboundp 'face-foreground-name) ;XEmacs (face-foreground-name face) (face-foreground face))) (defun riece-ctlseq-face-background-name (face) "Return the name of FACE's background color." (if (fboundp 'face-background-name) ;XEmacs (face-background-name face) (face-background face))) (defun riece-ctlseq-make-face (attrs) (let* ((face-name (intern (format "riece-ctlseq-face-%d" (prog1 riece-ctlseq-face-counter (setq riece-ctlseq-face-counter (1+ riece-ctlseq-face-counter)))))) (face (make-face face-name)) foreground background) (if (plist-get attrs 'bold) (make-face-bold face)) (if (plist-get attrs 'underline) (set-face-underline-p face t)) (if (setq foreground (plist-get attrs 'foreground)) (set-face-foreground face foreground)) (if (setq background (plist-get attrs 'background)) (set-face-background face background)) (when (plist-get attrs 'inverse-video) (setq foreground (or (riece-ctlseq-face-background-name face) (riece-ctlseq-face-background-name 'default)) background (or (riece-ctlseq-face-foreground-name face) (riece-ctlseq-face-foreground-name 'default))) (set-face-foreground face foreground) (set-face-background face background)) (put face-name 'riece-ctlseq-attributes attrs) face-name)) (defun riece-ctlseq-face-from-cache (attrs) (if (null attrs) 'default (let ((pointer riece-ctlseq-face-cache) last-pointer other) (catch 'found (while pointer (setq other (get (car pointer) 'riece-ctlseq-attributes)) (when (and (riece-ctlseq-compatible-attributes-p attrs other) (riece-ctlseq-compatible-attributes-p other attrs)) (if last-pointer (setcdr last-pointer (cdr pointer))) (throw 'found (setcar riece-ctlseq-face-cache (car pointer)))) (setq last-pointer pointer pointer (cdr pointer))) (if (>= (length riece-ctlseq-face-cache) riece-ctlseq-face-cache-size) (setq riece-ctlseq-face-cache (butlast riece-ctlseq-face-cache))) (setq riece-ctlseq-face-cache (cons (riece-ctlseq-make-face attrs) riece-ctlseq-face-cache)) (car riece-ctlseq-face-cache))))) (defun riece-ctlseq-update-attribute (tag attrs) (let ((attrs (copy-sequence attrs))) (cond ((eq (aref tag 0) ?\x2) ;^B (setq attrs (plist-put attrs 'bold (not (plist-get attrs 'bold))))) ((eq (aref tag 0) ?\xF) ;^O (setq attrs nil)) ((eq (aref tag 0) ?\x16) ;^V (setq attrs (plist-put attrs 'inverse-video (not (plist-get attrs 'inverse-video))))) ((eq (aref tag 0) ?\x1F) ;^_ (setq attrs (plist-put attrs 'underline (not (plist-get attrs 'underline))))) ((eq (aref tag 0) ?\x3) ;^C[,] (setq attrs (plist-put attrs 'foreground (nth (string-to-number (substring tag 1)) riece-ctlseq-colors))) (if (string-match "," tag) (setq attrs (plist-put attrs 'background (nth (string-to-number (substring tag (match-end 0))) riece-ctlseq-colors)))))) attrs)) (defun riece-ctlseq-update-attributes (tags attrs) (let ((start 0)) (while (string-match riece-ctlseq-regexp tags start) (setq start (match-end 0) attrs (riece-ctlseq-update-attribute (match-string 0 tags) attrs))) attrs)) (defun riece-ctlseq-put-attributes (string start end attrs) (when (and (> end start) attrs) (put-text-property start end 'riece-ctlseq-attributes (copy-sequence attrs) string) (put-text-property start end 'riece-overlay-face (riece-ctlseq-face-from-cache attrs) string))) (defun riece-ctlseq-message-filter (message) (if (get 'riece-ctlseq 'riece-addon-enabled) (let ((start 0) (end (length (riece-message-text message))) tags-start tags-end attrs) (while (string-match (concat "\\(" riece-ctlseq-regexp "\\)+") (riece-message-text message) start) (if riece-ctlseq-hide-controls (put-text-property (match-beginning 0) (match-end 0) 'invisible 'riece-ctlseq (riece-message-text message))) (setq tags-start (match-beginning 0) tags-end (match-end 0)) (riece-ctlseq-put-attributes (riece-message-text message) start tags-start attrs) (setq attrs (riece-ctlseq-update-attributes (substring (riece-message-text message) tags-start tags-end) attrs) start tags-end)) (riece-ctlseq-put-attributes (riece-message-text message) start end attrs))) message) (defun riece-ctlseq-requires () '(riece-highlight)) (defun riece-ctlseq-insinuate () (add-hook 'riece-message-filter-functions 'riece-ctlseq-message-filter)) (defun riece-ctlseq-uninstall () (remove-hook 'riece-message-filter-functions 'riece-ctlseq-message-filter)) (provide 'riece-ctlseq) ;;; riece-ctlseq.el ends here riece-9.0.0/lisp/riece-shrink-buffer.el0000644000076400007640000000732611546264524014704 00000000000000;;; riece-shrink-buffer.el --- free old IRC messages to save memory usage -*- lexical-binding: t -*- ;; 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) (require 'derived) (defgroup riece-shrink-buffer nil "Free old IRC messages to save memory usage." :prefix "riece-" :group 'riece) (defcustom riece-shrink-buffer-idle-time-delay 5 "Number of idle seconds to wait before shrinking channel buffers." :type 'integer :group 'riece-shrink-buffer) (defcustom riece-max-buffer-size 65536 "Maximum size of channel buffers." :type '(integer :tag "Number of characters") :group 'riece-shrink-buffer) (defcustom riece-shrink-buffer-remove-chars (/ riece-max-buffer-size 2) "Number of chars removed when shrinking channel buffers." :type 'integer :group 'riece-shrink-buffer) (defvar riece-shrink-buffer-idle-timer nil "Timer object to periodically shrink channel buffers.") (defconst riece-shrink-buffer-description "Free old IRC messages to save memory usage.") (defun riece-shrink-buffer-idle-timer () (let ((buffers riece-buffer-list)) (while buffers (if (and (get 'riece-shrink-buffer 'riece-addon-enabled) (buffer-live-p (car buffers)) (with-current-buffer (car buffers) (riece-derived-mode-p 'riece-dialogue-mode))) (riece-shrink-buffer (car buffers))) (setq buffers (cdr buffers))))) (defun riece-shrink-buffer (buffer) (save-excursion (set-buffer buffer) (goto-char (point-min)) (while (> (buffer-size) riece-max-buffer-size) (let* ((inhibit-read-only t) buffer-read-only (end (progn (goto-char riece-shrink-buffer-remove-chars) (beginning-of-line 2) (point))) (overlays (riece-overlays-in (point-min) end))) (while overlays (riece-delete-overlay (car overlays)) (setq overlays (cdr overlays))) (delete-region (point-min) end))))) (defun riece-shrink-buffer-startup-hook () (setq riece-shrink-buffer-idle-timer (riece-run-with-idle-timer riece-shrink-buffer-idle-time-delay t 'riece-shrink-buffer-idle-timer))) (defun riece-shrink-buffer-exit-hook () (if riece-shrink-buffer-idle-timer (riece-cancel-timer riece-shrink-buffer-idle-timer))) (defun riece-shrink-buffer-insinuate () (add-hook 'riece-startup-hook 'riece-shrink-buffer-startup-hook) ;; Reset the timer since riece-shrink-buffer-insinuate will be ;; called before running riece-startup-hook. (unless riece-shrink-buffer-idle-timer (riece-shrink-buffer-startup-hook)) (add-hook 'riece-exit-hook 'riece-shrink-buffer-exit-hook)) (defun riece-shrink-buffer-uninstall () (riece-shrink-buffer-exit-hook) (remove-hook 'riece-startup-hook 'riece-shrink-buffer-startup-hook) (remove-hook 'riece-exit-hook 'riece-shrink-buffer-exit-hook)) (provide 'riece-shrink-buffer) ;;; riece-shrink-buffer.el ends here riece-9.0.0/lisp/riece-ctcp.el0000644000076400007640000003504111546264157013065 00000000000000;;; riece-ctcp.el --- CTCP (Client To Client Protocol) support -*- lexical-binding: t -*- ;; 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) (require 'riece-message) (defface riece-ctcp-action-face '((((class color) (background dark)) (:foreground "PaleGreen" :italic t)) (((class color) (background light)) (:foreground "ForestGreen" :italic t)) (t (:bold t))) "Face used for displaying \"*** Action:\" line" :group 'riece-highlight-faces) (defvar riece-ctcp-action-face 'riece-ctcp-action-face) (defconst riece-ctcp-action-prefix "*** Action: ") (defvar riece-ctcp-ping-time nil) (defvar riece-ctcp-additional-clientinfo nil) (defvar riece-dialogue-mode-map) (defconst riece-ctcp-description "CTCP (Client To Client Protocol) support.") (defun riece-handle-ctcp-request (prefix string) (when (and (get 'riece-ctcp 'riece-addon-enabled) prefix string (riece-prefix-nickname prefix)) (let* ((parameters (riece-split-parameters string)) (targets (split-string (car parameters) ",")) (message (nth 1 parameters))) (if (string-match "\1\\([^ ]+\\)\\( .+\\)?\1" message) (let ((request (downcase (match-string 1 message)))) (if (match-beginning 2) (setq message (substring (match-string 2 message) 1))) (let ((hook (intern (concat "riece-ctcp-" request "-request-hook"))) (function (intern-soft (concat "riece-handle-ctcp-" request "-request"))) (after-hook (intern (concat "riece-ctcp-after-" request "-request-hook")))) (unless (riece-funcall-ignore-errors (symbol-name hook) #'run-hook-with-args-until-success hook prefix (car targets) message) (if function (riece-funcall-ignore-errors (symbol-name function) function prefix (car targets) message)) (riece-funcall-ignore-errors (symbol-name after-hook) #'run-hook-with-args-until-success after-hook prefix (car targets) message))) t))))) (defun riece-handle-ctcp-version-request (prefix target _string) (let* ((target-identity (riece-make-identity target riece-server-name)) (buffer (if (riece-channel-p target) (riece-channel-buffer target-identity))) (user (riece-prefix-nickname prefix))) (riece-send-string (format "NOTICE %s :\1VERSION %s\1\r\n" user (riece-extended-version))) (riece-insert-change buffer (format "CTCP VERSION from %s\n" user)) (riece-insert-change (if (and riece-channel-buffer-mode (not (eq buffer riece-channel-buffer))) (list riece-dialogue-buffer riece-others-buffer) riece-dialogue-buffer) (concat (riece-concat-server-name (format (riece-mcat "CTCP VERSION from %s (%s) to %s") user (riece-strip-user-at-host (riece-prefix-user-at-host prefix)) (riece-format-identity target-identity t))) "\n")))) (defun riece-handle-ctcp-ping-request (prefix target string) (let* ((target-identity (riece-make-identity target riece-server-name)) (buffer (if (riece-channel-p target) (riece-channel-buffer target-identity))) (user (riece-prefix-nickname prefix))) (riece-send-string (if string (format "NOTICE %s :\1PING %s\1\r\n" user string) (format "NOTICE %s :\1PING\1\r\n" user))) (riece-insert-change buffer (format "CTCP PING from %s\n" user)) (riece-insert-change (if (and riece-channel-buffer-mode (not (eq buffer riece-channel-buffer))) (list riece-dialogue-buffer riece-others-buffer) riece-dialogue-buffer) (concat (riece-concat-server-name (format (riece-mcat "CTCP PING from %s (%s) to %s") user (riece-strip-user-at-host (riece-prefix-user-at-host prefix)) (riece-format-identity target-identity t))) "\n")))) (defun riece-handle-ctcp-clientinfo-request (prefix target _string) (let* ((target-identity (riece-make-identity target riece-server-name)) (buffer (if (riece-channel-p target) (riece-channel-buffer target-identity))) (user (riece-prefix-nickname prefix))) (riece-send-string (format "NOTICE %s :\1CLIENTINFO %s\1\r\n" user (let (messages) (mapatoms (lambda (atom) (let ((case-fold-search t)) (if (and (fboundp atom) (string-match "riece-handle-ctcp-\\(.+\\)-request" (symbol-name atom))) (setq messages (cons (match-string 1 (symbol-name atom)) messages)))))) (mapconcat #'upcase (append messages riece-ctcp-additional-clientinfo) " ")))) (riece-insert-change buffer (format "CTCP CLIENTINFO from %s\n" user)) (riece-insert-change (if (and riece-channel-buffer-mode (not (eq buffer riece-channel-buffer))) (list riece-dialogue-buffer riece-others-buffer) riece-dialogue-buffer) (concat (riece-concat-server-name (format (riece-mcat "CTCP CLIENTINFO from %s (%s) to %s") user (riece-strip-user-at-host (riece-prefix-user-at-host prefix)) (riece-format-identity target-identity t))) "\n")))) (defun riece-ctcp-action-format-message (message &optional global) (riece-with-server-buffer (riece-identity-server (riece-message-speaker message)) (concat (if global (riece-concat-server-name (concat riece-ctcp-action-prefix (riece-format-identity (riece-message-target message) t) ": " (riece-identity-prefix (riece-message-speaker message)) " " (riece-message-text message))) (concat riece-ctcp-action-prefix (riece-identity-prefix (riece-message-speaker message)) " " (riece-message-text message))) "\n"))) (defun riece-handle-ctcp-action-request (prefix target string) (let ((user (riece-prefix-nickname prefix))) (riece-display-message (riece-make-message (riece-make-identity user riece-server-name) (riece-make-identity target riece-server-name) string 'action (riece-identity-equal-no-server user riece-real-nickname))))) (defun riece-handle-ctcp-time-request (prefix target _string) (let* ((target-identity (riece-make-identity target riece-server-name)) (buffer (if (riece-channel-p target) (riece-channel-buffer target-identity))) (user (riece-prefix-nickname prefix)) (time (format-time-string "%c"))) (riece-send-string (format "NOTICE %s :\1TIME %s\1\r\n" user time)) (riece-insert-change buffer (format (riece-mcat "CTCP TIME from %s\n") user)) (riece-insert-change (if (and riece-channel-buffer-mode (not (eq buffer riece-channel-buffer))) (list riece-dialogue-buffer riece-others-buffer) riece-dialogue-buffer) (concat (riece-concat-server-name (format (riece-mcat "CTCP TIME from %s (%s) to %s") user (riece-strip-user-at-host (riece-prefix-user-at-host prefix)) (riece-format-identity target-identity t))) "\n")))) (defun riece-handle-ctcp-response (prefix string) (when (and (get 'riece-ctcp 'riece-addon-enabled) prefix string (riece-prefix-nickname prefix)) (let* ((parameters (riece-split-parameters string)) (targets (split-string (car parameters) ",")) (message (nth 1 parameters))) (if (string-match "\1\\([^ ]+\\)\\( .+\\)?\1" message) (let ((response (downcase (match-string 1 message)))) (if (match-beginning 2) (setq message (substring (match-string 2 message) 1))) (let ((hook (intern (concat "riece-ctcp-" response "-response-hook"))) (function (intern-soft (concat "riece-handle-ctcp-" response "-response"))) (after-hook (intern (concat "riece-ctcp-after-" response "-response-hook")))) (unless (riece-funcall-ignore-errors (symbol-name hook) #'run-hook-with-args-until-success hook prefix (car targets) message) (if function (riece-funcall-ignore-errors (symbol-name function) function prefix (car targets) message)) (riece-funcall-ignore-errors (symbol-name after-hook) #'run-hook-with-args-until-success after-hook prefix (car targets) message))) t))))) (defun riece-handle-ctcp-version-response (prefix _target string) (riece-insert-change (list riece-dialogue-buffer riece-others-buffer) (concat (riece-concat-server-name (format (riece-mcat "CTCP VERSION for %s (%s) = %s") (riece-prefix-nickname prefix) (riece-strip-user-at-host (riece-prefix-user-at-host prefix)) string)) "\n"))) (defun riece-handle-ctcp-ping-response (prefix _target _string) (let* ((now (current-time)) (elapsed (+ (* 65536 (- (car now) (car riece-ctcp-ping-time))) (- (nth 1 now) (nth 1 riece-ctcp-ping-time))))) (riece-insert-change (list riece-dialogue-buffer riece-others-buffer) (concat (riece-concat-server-name (format (riece-mcat "CTCP PING for %s (%s) = %d sec") (riece-prefix-nickname prefix) (riece-strip-user-at-host (riece-prefix-user-at-host prefix)) elapsed)) "\n")))) (defun riece-handle-ctcp-clientinfo-response (prefix _target string) (riece-insert-change (list riece-dialogue-buffer riece-others-buffer) (concat (riece-concat-server-name (format (riece-mcat "CTCP CLIENTINFO for %s (%s) = %s") (riece-prefix-nickname prefix) (riece-strip-user-at-host (riece-prefix-user-at-host prefix)) string)) "\n"))) (defun riece-handle-ctcp-time-response (prefix _target string) (riece-insert-change (list riece-dialogue-buffer riece-others-buffer) (concat (riece-concat-server-name (format (riece-mcat "CTCP TIME for %s (%s) = %s") (riece-prefix-nickname prefix) (riece-strip-user-at-host (riece-prefix-user-at-host prefix)) string)) "\n"))) (defun riece-command-ctcp-version (target) (interactive (list (riece-completing-read-identity (riece-mcat "Channel/User: ") (riece-get-identities-on-server (riece-current-server-name))))) (riece-send-string (format "PRIVMSG %s :\1VERSION\1\r\n" (riece-identity-prefix target)))) (defun riece-command-ctcp-ping (target) (interactive (list (riece-completing-read-identity (riece-mcat "Channel/User: ") (riece-get-identities-on-server (riece-current-server-name))))) (riece-send-string (format "PRIVMSG %s :\1PING\1\r\n" (riece-identity-prefix target))) (setq riece-ctcp-ping-time (current-time))) (defun riece-command-ctcp-clientinfo (target) (interactive (list (riece-completing-read-identity (riece-mcat "Channel/User: ") (riece-get-identities-on-server (riece-current-server-name))))) (riece-send-string (format "PRIVMSG %s :\1CLIENTINFO\1\r\n" (riece-identity-prefix target)))) (defun riece-command-ctcp-action (target action) (interactive (list (if current-prefix-arg (riece-completing-read-identity (riece-mcat "Channel/User: ") (riece-get-identities-on-server (riece-current-server-name))) riece-current-channel) (let (message) (beginning-of-line) (setq message (buffer-substring (point) (progn (end-of-line) (point)))) (if (equal message "") (read-string (riece-mcat "Action: ")) (prog1 (read-from-minibuffer (riece-mcat "Action: ") (cons message 0)) (if (> (forward-line) 0) (insert "\n"))))))) (if (equal action "") (error "No action")) (riece-send-string (format "PRIVMSG %s :\1ACTION %s\1\r\n" (riece-identity-prefix target) action)) (riece-display-message (riece-make-message (riece-current-nickname) target action 'action t))) (defun riece-command-ctcp-time (target) (interactive (list (riece-completing-read-identity (riece-mcat "Channel/User: ") (riece-get-identities-on-server (riece-current-server-name))))) (riece-send-string (format "PRIVMSG %s :\1TIME\1\r\n" (riece-identity-prefix target)))) (defun riece-ctcp-requires () (if (memq 'riece-highlight riece-addons) '(riece-highlight))) (defvar riece-ctcp-dialogue-font-lock-keywords (list (concat "^" riece-time-prefix-regexp "\\(" (regexp-quote riece-ctcp-action-prefix) ".*\\)$") 1 riece-ctcp-action-face t t)) (defun riece-ctcp-insinuate () (add-hook 'riece-privmsg-hook 'riece-handle-ctcp-request) (add-hook 'riece-notice-hook 'riece-handle-ctcp-response) (if (memq 'riece-highlight riece-addons) (setq riece-dialogue-font-lock-keywords (cons riece-ctcp-dialogue-font-lock-keywords riece-dialogue-font-lock-keywords))) (unless (assq 'action riece-message-format-function-alist) (setq riece-message-format-function-alist (cons (cons 'action #'riece-ctcp-action-format-message) riece-message-format-function-alist)))) (defun riece-ctcp-uninstall () (remove-hook 'riece-privmsg-hook 'riece-handle-ctcp-request) (remove-hook 'riece-notice-hook 'riece-handle-ctcp-response) (setq riece-dialogue-font-lock-keywords (delq riece-ctcp-dialogue-font-lock-keywords riece-dialogue-font-lock-keywords))) (defun riece-ctcp-enable () (define-key riece-dialogue-mode-map "\C-cv" 'riece-command-ctcp-version) (define-key riece-dialogue-mode-map "\C-cp" 'riece-command-ctcp-ping) (define-key riece-dialogue-mode-map "\C-ca" 'riece-command-ctcp-action) (define-key riece-dialogue-mode-map "\C-cc" 'riece-command-ctcp-clientinfo) (define-key riece-dialogue-mode-map "\C-ct" 'riece-command-ctcp-time)) (defun riece-ctcp-disable () (define-key riece-dialogue-mode-map "\C-cv" nil) (define-key riece-dialogue-mode-map "\C-cp" nil) (define-key riece-dialogue-mode-map "\C-ca" nil) (define-key riece-dialogue-mode-map "\C-cc" nil) (define-key riece-dialogue-mode-map "\C-ct" nil)) (provide 'riece-ctcp) ;;; riece-ctcp.el ends here riece-9.0.0/lisp/riece-signal.el0000644000076400007640000000761111546262045013405 00000000000000;;; riece-signal.el --- "signal-slot" abstraction for routing display events -*- lexical-binding: t -*- ;; 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 riece-9.0.0/lisp/riece-filter.el0000644000076400007640000001241111546262045013407 00000000000000;;; riece-filter.el --- process filter and sentinel -*- lexical-binding: t -*- ;; 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) (with-current-buffer (process-buffer process) (goto-char (point-max)) (insert input) (unless riece-filter-running (unwind-protect (progn (setq riece-filter-running t) (goto-char riece-read-point) (beginning-of-line) (while (looking-at ".*\n") ;the input line is finished (save-excursion (if (looking-at ":\\([^ ]+\\) +\\([0-5][0-9][0-9]\\) +\\([^ ]+\\)\ +\\(.*\\)") (riece-handle-numeric-reply (match-string 1) ;prefix (string-to-number (match-string 2)) ;number (match-string 3) ;name (riece-chomp-string (match-string 4))) ;reply string (if (looking-at "\\(:\\([^ ]+\\) +\\)?\\([^ ]+\\) +\\(.*\\)") (riece-handle-message (match-string 2) ;optional prefix (match-string 3) ;command (riece-chomp-string (match-string 4)) ;params & trailing ) (if riece-debug (message "Weird message from server: %s" (buffer-substring (point) (progn (end-of-line) (point)))))))) (forward-line)) (unless riece-debug (delete-region (point-min) (point))) (setq riece-read-point (point))) (setq riece-filter-running nil))))) (eval-when-compile (autoload 'riece-exit "riece")) (defun riece-sentinel (process status) (if riece-reconnect-with-password (let ((server-name (with-current-buffer (process-buffer process) riece-server-name))) (riece-close-server-process process) (riece-open-server (if (equal server-name "") riece-server (riece-server-name-to-server server-name)) server-name)) (let ((server-name (with-current-buffer (process-buffer process) riece-server-name))) (if riece-debug (if (equal server-name "") (riece-debug (format "Connection closed: %s" (substring status 0 (1- (length status))))) (riece-debug (format "Connection to \"%s\" closed: %s" server-name (substring status 0 (1- (length status)))))) (if (equal server-name "") (message "Connection closed") (message "Connection to \"%s\" closed" server-name))) (let ((channels riece-current-channels)) (while channels (if (and (car channels) (equal (riece-identity-server (car channels)) server-name)) (riece-part-channel (car channels))) (setq channels (cdr channels)))) (riece-redisplay-buffers) (riece-close-server-process process) ;; If no server process is available, exit. (unless riece-server-process-alist (riece-exit))))) (provide 'riece-filter) ;;; riece-filter.el ends here riece-9.0.0/lisp/riece-xfaceb.el0000644000076400007640000001170711546262045013361 00000000000000;;; riece-xfaceb.el --- display X-Face/Colour Face in IRC buffers -*- lexical-binding: t -*- ;; 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 riece-9.0.0/lisp/riece-ruby.el0000644000076400007640000003372111546262207013112 00000000000000;;; riece-ruby.el --- interact with Ruby interpreter -*- lexical-binding: t -*- ;; 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 () (with-current-buffer (process-buffer riece-ruby-process) (buffer-disable-undo) (make-local-variable 'riece-ruby-response) (setq riece-ruby-response nil) (make-local-variable 'riece-ruby-data) (setq riece-ruby-data nil) (make-local-variable 'riece-ruby-escaped-data) (setq riece-ruby-escaped-data nil) (make-local-variable 'riece-ruby-status-alist) (setq riece-ruby-status-alist nil))) (defun riece-ruby-send-eval (program) (let* ((string (riece-ruby-escape-data program)) (length (- (length string) 998)) (index 0) data) (while (< index length) (setq data (cons (substring string index (setq index (+ index 998))) data))) (setq data (cons (substring string index) data) data (nreverse data)) (process-send-string riece-ruby-process "EVAL\r\n") (while data (process-send-string riece-ruby-process (concat "D " (car data) "\r\n")) (setq data (cdr data))) (process-send-string riece-ruby-process "END\r\n"))) (defun riece-ruby-send-poll (name) (process-send-string riece-ruby-process (concat "POLL " name "\r\n"))) (defun riece-ruby-send-exit (name) (process-send-string riece-ruby-process (concat "EXIT " name "\r\n"))) (defun riece-ruby-filter (process input) (with-current-buffer (process-buffer process) (goto-char (point-max)) (insert input) (goto-char (point-min)) (beginning-of-line) (while (looking-at ".*\r\n") (if (looking-at "OK\\( \\(.*\\)\\)?\r") (progn (if riece-ruby-escaped-data (setq riece-ruby-data (mapconcat #'riece-ruby-unescape-data riece-ruby-escaped-data ""))) (setq riece-ruby-escaped-data nil riece-ruby-response (list 'OK (match-string 2)) riece-ruby-lock nil)) (if (looking-at "ERR \\([0-9]+\\)\\( \\(.*\\)\\)?\r") (progn (setq riece-ruby-escaped-data nil riece-ruby-response (list 'ERR (string-to-number (match-string 1)) (match-string 3)) riece-ruby-lock nil)) (if (looking-at "D \\(.*\\)\r") (setq riece-ruby-escaped-data (cons (match-string 1) riece-ruby-escaped-data)) (if (looking-at "S \\([^ ]*\\) \\(.*\\)\r") (progn (setq riece-ruby-status-alist (cons (cons (match-string 1) (match-string 2)) riece-ruby-status-alist)) (if (member (car (car riece-ruby-status-alist)) '("finished" "exited")) (riece-ruby-run-exit-handler (cdr (car riece-ruby-status-alist))))) (if (looking-at "# output \\([^ ]*\\) \\(.*\\)\r") (riece-ruby-run-output-handler (match-string 1) (match-string 2) (current-time)) (if (looking-at "# exit \\(.*\\)\r") (riece-ruby-run-exit-handler (match-string 1)))))))) (forward-line)) (delete-region (point-min) (point)))) (defun riece-ruby-run-exit-handler (name) (let ((entry (assoc name riece-ruby-exit-handler-alist))) (when entry (setq riece-ruby-exit-handler-alist (delq entry riece-ruby-exit-handler-alist)) (riece-funcall-ignore-errors (if (symbolp (cdr entry)) (symbol-name (cdr entry)) (format "%s-exit-handler" name)) (cdr entry) (car entry)) (riece-ruby-clear name)))) (defun riece-ruby-run-output-handler (name output time) (let ((handler-entry (assoc name riece-ruby-output-handler-alist)) (entry (assoc name riece-ruby-output-queue-alist))) (if handler-entry (riece-funcall-ignore-errors (if (symbolp (cdr handler-entry)) (symbol-name (cdr handler-entry)) (format "%s-output-handler" name)) (cdr handler-entry) name output time) (if entry (setcdr entry (cons (cons output time) (cdr entry))) (setq riece-ruby-output-queue-alist (cons (list name (cons output time)) riece-ruby-output-queue-alist)))))) (defun riece-ruby-sentinel (process _status) (kill-buffer (process-buffer process))) (defun riece-ruby-execute (program) "Schedule an execution of a Ruby PROGRAM. Return a string name assigned by the server." (unless (and riece-ruby-process (eq (process-status riece-ruby-process) 'run)) (let (selective-display (coding-system-for-write 'binary) (coding-system-for-read 'binary)) (setq riece-ruby-process (apply #'start-process "riece-ruby" (generate-new-buffer " *Ruby*") riece-ruby-command (expand-file-name riece-ruby-server-program riece-data-directory) riece-ruby-server-program-arguments)) (riece-set-process-query-on-exit-flag riece-ruby-process nil) (set-process-filter riece-ruby-process #'riece-ruby-filter) (set-process-sentinel riece-ruby-process #'riece-ruby-sentinel))) (with-current-buffer (process-buffer riece-ruby-process) (riece-ruby-reset-process-buffer) (make-local-variable 'riece-ruby-lock) (setq riece-ruby-lock t) (riece-ruby-send-eval program) (while riece-ruby-lock (accept-process-output riece-ruby-process)) (if (eq (car riece-ruby-response) 'ERR) (error "Couldn't execute: %S" (cdr riece-ruby-response))) (cdr (assoc "name" riece-ruby-status-alist)))) (defun riece-ruby-inspect (name) "Inspect a result of program execution distinguished by NAME. Return a three element list. The car is protocol response line which looks like: \(ERR 103 \"Not implemented\"). The cadr is data from the server, that is, the result of the program. The caddr is status from the server." (with-current-buffer (process-buffer riece-ruby-process) (riece-ruby-reset-process-buffer) (make-local-variable 'riece-ruby-lock) (setq riece-ruby-lock t) (riece-ruby-send-poll name) (while riece-ruby-lock (accept-process-output riece-ruby-process)) (list riece-ruby-response riece-ruby-data riece-ruby-status-alist))) (defun riece-ruby-clear (name) "Clear a result of program execution distinguished by NAME. Note that riece-ruby-clear is automatically called iff an exit-handler is specified. Otherwise, it should be called explicitly." (with-current-buffer (process-buffer riece-ruby-process) (riece-ruby-reset-process-buffer) (make-local-variable 'riece-ruby-lock) (setq riece-ruby-lock t) (riece-ruby-send-exit name) (while riece-ruby-lock (accept-process-output riece-ruby-process))) (let ((entry (assoc name riece-ruby-property-alist))) (if entry (delq entry riece-ruby-property-alist)))) (defun riece-ruby-set-exit-handler (name handler) "Set an exit-handler HANDLER for the program distinguished by NAME. An exit-handler is called when the program is finished or exited abnormally. An exit-handler is called with an argument same as NAME. Note that riece-ruby-clear is automatically called iff an exit-handler is specified. Otherwise, it should be called explicitly." (let ((entry (assoc name riece-ruby-exit-handler-alist))) (if handler (progn (if entry (setcdr entry handler) (setq riece-ruby-exit-handler-alist (cons (cons name handler) riece-ruby-exit-handler-alist))) ;;check if the program already exited (riece-ruby-inspect name)) (if entry (setq riece-ruby-exit-handler-alist (delq entry riece-ruby-exit-handler-alist)))))) (defun riece-ruby-set-output-handler (name handler) "Set an output-handler HANDLER for the program distinguished by NAME. An output-handler is called when the program sends any output by using `output' method in the Ruby program. An output-handler is called with three argument. The first argument is the same as NAME. The second argument is the output string. The third argument is the timestamp of the output event." (let ((entry (assoc name riece-ruby-output-handler-alist)) queue-entry pointer) (if handler (progn (when (setq queue-entry (assoc name riece-ruby-output-queue-alist)) (setq pointer (nreverse (cdr queue-entry)) riece-ruby-output-queue-alist (delq queue-entry riece-ruby-output-queue-alist)) (while pointer (riece-funcall-ignore-errors (if (symbolp handler) (symbol-name handler) (format "%s-output-handler" name)) handler name (car (car pointer)) (cdr (car pointer))) (setq pointer (cdr pointer)))) (if entry (setcdr entry handler) (setq riece-ruby-output-handler-alist (cons (cons name handler) riece-ruby-output-handler-alist)))) (if entry (setq riece-ruby-output-handler-alist (delq entry riece-ruby-output-handler-alist)))))) (defun riece-ruby-set-property (name property value) "Set given PROPERTY/VALUE pair to the program distinguished by NAME." (let ((entry (assoc name riece-ruby-property-alist)) property-entry) (unless entry (setq entry (list name) riece-ruby-property-alist (cons entry riece-ruby-property-alist))) (if (setq property-entry (assoc property (cdr entry))) (setcdr property-entry value) (setcdr entry (cons (cons property value) (cdr entry)))))) (defun riece-ruby-property (name property) "Return the value of PROPERTY set to the program distinguished by NAME." (cdr (assoc property (cdr (assoc name riece-ruby-property-alist))))) (defun riece-ruby-substitute-variables (program alist) "Substitute symbols in PROGRAM by looking up ALIST. Return a string concatenating elements in PROGRAM." (setq program (copy-sequence program)) (while alist (let ((pointer program)) (while pointer (setq pointer (memq (car (car alist)) program)) (if pointer (setcar pointer (cdr (car alist)))))) (setq alist (cdr alist))) (apply #'concat program)) (provide 'riece-ruby) ;;; riece-ruby.el ends here riece-9.0.0/lisp/riece-google.el0000644000076400007640000001601311546264205013400 00000000000000;;; riece-google.el --- search keywords by Google -*- lexical-binding: t -*- ;; 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 'sexp :group 'riece-google) (defcustom riece-google-license-key nil "*License key for Google API." :type 'string :group 'riece-google) (defcustom riece-google-default-lang '("lang_en" "lang_ja") "*Default language for searching keywords." :type '(repeat (choice (const "lang_en" :tag "English") (const "lang_ja" :tag "Japanese") (string :tag "The other language"))) :group 'riece-google) (defconst riece-google-regexp "^go\\(o+\\)gle\\(:\\([a-z]+\\)\\)?>\\s-*\\(.*\\)") (defconst riece-google-description "Search keywords by Google.") (defvar riece-google-target nil) (defun riece-google-display-message-function (message) (when (and (get 'riece-google 'riece-addon-enabled) (stringp riece-google-license-key) (string-match riece-google-regexp (riece-message-text message))) (let ((keywords (match-string 4 (riece-message-text message))) (max-results (number-to-string (length (match-string 1 (riece-message-text message))))) (lang (or (match-string 3 (riece-message-text message)) riece-google-default-lang)) (process-connection-type nil) selective-display (coding-system-for-read 'binary) (coding-system-for-write 'binary) (process (start-process "Google" (generate-new-buffer " *Google*") riece-google-ruby-command))) (when (listp lang) (setq lang (mapconcat #'identity lang " "))) (setq riece-google-target (riece-message-target message)) (process-send-string process (apply #'concat (riece-google-substitute-variables (riece-google-substitute-variables (riece-google-substitute-variables (riece-google-substitute-variables riece-google-program 'keywords keywords) 'max-results max-results) 'license-key riece-google-license-key) 'lang lang))) (process-send-eof process) (with-current-buffer (process-buffer process) (set-buffer-multibyte t) (erase-buffer) (set-buffer-modified-p nil)) (set-process-filter process #'riece-google-filter) (set-process-sentinel process #'riece-google-sentinel)))) (defun riece-google-filter (process output) (when (buffer-live-p (process-buffer process)) (with-current-buffer (process-buffer process) (goto-char (point-max)) (insert output) (goto-char (point-min)) (while (progn (end-of-line) (and (not (eobp)) (eq (char-after) ?\n))) (if (eq (char-after (1- (point))) ?\r) ; cut off preceding LF (delete-region (1- (point)) (point))) (riece-google-send-string riece-google-target (buffer-substring (point-min) (point))) (delete-region (point-min) (progn (beginning-of-line 2) (point))))))) (defun riece-google-sentinel (process _string) (delete-process process)) (defun riece-google-send-string (target message) (riece-send-string (format "NOTICE %s :%s\r\n" (riece-identity-prefix target) message)) (riece-display-message (riece-make-message (riece-current-nickname) target message 'notice))) (defun riece-google-substitute-variables (program variable value) (setq program (copy-sequence program)) (let ((pointer program)) (while pointer (setq pointer (memq variable program)) (if pointer (setcar pointer value))) program)) (defun riece-google-insinuate () (add-hook 'riece-after-display-message-functions 'riece-google-display-message-function)) (defun riece-google-uninstall () (remove-hook 'riece-after-display-message-functions 'riece-google-display-message-function)) (provide 'riece-google) ;;; riece-google.el ends here riece-9.0.0/lisp/riece-cache.el0000644000076400007640000001267711546262045013203 00000000000000;;; riece-cache.el --- LRU cache -*- lexical-binding: t -*- ;; 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 riece-9.0.0/lisp/riece-rdcc.el0000644000076400007640000003126611546264460013051 00000000000000;;; riece-rdcc.el --- DCC file sending protocol support (written in Ruby) -*- lexical-binding: t -*- ;; 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-server-port nil "Local port of the DCC server. Only used for sending files." :type 'integer :group 'riece-rdcc) (defcustom riece-rdcc-send-program '("\ require 'socket' address = " address " port = " port " unless address sock = UDPSocket.new sock.connect('164.46.176.4', 7) # www.unixuser.org/echo address = sock.getsockname[4 .. 7].unpack('CCCC').join('.') end server = TCPServer.new(address, port) output(\"#{server.addr[3].split(/\\./).collect{|c| c.to_i}.pack('CCCC').unpack('N')[0]} #{server.addr[1]}\") session = server.accept if session total = 0 File.open(" file ") {|file| while (bytes = file.read(" block-size ")) total += bytes.length output(total) session.write(bytes) begin buf = session.read(4) end until buf.unpack('N')[0] == total end } session.close end ") "Ruby program to send file with DCC." :type 'sexp :group 'riece-rdcc) (defcustom riece-rdcc-decode-address-program '("\"#{" address " >> 24 & 0xFF}.#{" address " >> 16 & 0xFF}.#{" address " >> 8 & 0xFF}.#{" address " & 0xFF}\"") "Ruby program to numeric IP address." :type 'sexp :group 'riece-rdcc) (defcustom riece-rdcc-save-directory nil "Default directory where received files are saved in." :type 'directory :group 'riece-rdcc) (defcustom riece-rdcc-block-size 1024 "Number of bytes sent as a block." :type 'integer :group 'riece-rdcc) (defvar riece-rdcc-requests nil) (defvar riece-rdcc-request-user nil) (defvar riece-rdcc-request-file nil) (defvar riece-rdcc-request-size nil) (defvar riece-rdcc-temp-file nil) (defvar riece-rdcc-received-size nil) (defconst riece-rdcc-description "DCC file sending protocol support (written in Ruby.)") (defvar temporary-file-directory) (defvar jka-compr-compression-info-list) (defvar jam-zcat-filename-list) (defun riece-rdcc-output-handler (name output _time) (if (string-match "\\([0-9]+\\) \\([0-9]+\\)" output) (let ((address (match-string 1 output)) (port (match-string 2 output))) (riece-send-string (format "PRIVMSG %s :\1DCC SEND %s %s %s %d\1\r\n" (riece-identity-prefix (riece-ruby-property name 'riece-rdcc-request-user)) (file-name-nondirectory (riece-ruby-property name 'riece-rdcc-request-file)) address port (riece-ruby-property name 'riece-rdcc-request-size))))) (riece-ruby-set-output-handler name #'riece-rdcc-output-handler-2)) (defun riece-rdcc-output-handler-2 (name output _time) (message (riece-mcat "Sending %s...(%s/%d)") (riece-ruby-property name 'riece-rdcc-request-file) (string-to-number output) (riece-ruby-property name 'riece-rdcc-request-size))) (defun riece-rdcc-exit-handler (name) (message (riece-mcat "Sending %s...done") (riece-ruby-property name 'riece-rdcc-request-file))) (defun riece-command-dcc-send (user file) (interactive (let ((completion-ignore-case t)) (list (riece-completing-read-identity (riece-mcat "User: ") (riece-get-users-on-server (riece-current-server-name))) (expand-file-name (read-file-name (riece-mcat "File: ")))))) (let ((name (riece-ruby-execute (riece-ruby-substitute-variables riece-rdcc-send-program (list (cons 'address (if riece-rdcc-server-address (concat "'" riece-rdcc-server-address "'") "nil")) (cons 'port (if riece-rdcc-server-port (number-to-string riece-rdcc-server-port) "0")) (cons 'file (concat "'" file "'")) (cons 'block-size (number-to-string riece-rdcc-block-size))))))) (riece-ruby-set-property name 'riece-rdcc-request-user user) (riece-ruby-set-property name 'riece-rdcc-request-file file) (riece-ruby-set-property name 'riece-rdcc-request-size (nth 7 (file-attributes file))) (riece-ruby-set-output-handler name #'riece-rdcc-output-handler) (riece-ruby-set-exit-handler name #'riece-rdcc-exit-handler))) (defun riece-rdcc-filter (process input) (with-current-buffer (process-buffer process) (erase-buffer) (insert input) (let ((coding-system-for-write 'binary) jka-compr-compression-info-list jam-zcat-filename-list) (write-region (point-min) (point-max) riece-rdcc-temp-file t 0)) (setq riece-rdcc-received-size (+ (buffer-size) riece-rdcc-received-size)) (process-send-string process (format "%c%c%c%c" (lsh riece-rdcc-received-size -24) (logand (lsh riece-rdcc-received-size -16) 255) (logand (lsh riece-rdcc-received-size -8) 255) (logand riece-rdcc-received-size 255))) (message (riece-mcat "Receiving %s from %s...(%s/%s)") (file-name-nondirectory riece-rdcc-request-file) riece-rdcc-request-user (riece-rdcc-format-size riece-rdcc-received-size) (riece-rdcc-format-size riece-rdcc-request-size)) (if (= riece-rdcc-received-size riece-rdcc-request-size) (set-process-filter process nil)))) (defun riece-rdcc-sentinel (process _status) (with-current-buffer (process-buffer process) (unless (= riece-rdcc-received-size riece-rdcc-request-size) (error "Premature end of file")) (message (riece-mcat "Receiving %s from %s...done") (file-name-nondirectory riece-rdcc-request-file) riece-rdcc-request-user) (condition-case nil (progn (rename-file riece-rdcc-temp-file riece-rdcc-request-file) (delete-directory (file-name-directory riece-rdcc-temp-file))) (file-already-exists (error "Can't save %s. Temporarily saved in %s" riece-rdcc-request-file riece-rdcc-temp-file)))) (kill-buffer (process-buffer process))) (defun riece-rdcc-decode-address (address) (let ((name (riece-ruby-execute (riece-ruby-substitute-variables riece-rdcc-decode-address-program (list (cons 'address address))))) response) (while (equal (nth 2 (setq response (riece-ruby-inspect name))) "running") (accept-process-output riece-ruby-process)) (riece-ruby-clear name) (nth 1 response))) (defun riece-command-dcc-receive (request file) (interactive (progn (unless riece-rdcc-requests (error "No request")) (let* ((request (if (= (length riece-rdcc-requests) 1) (car riece-rdcc-requests) (with-output-to-temp-buffer "*Help*" (let ((requests riece-rdcc-requests) (index 1)) (while requests (princ (format (riece-mcat "%2d: %s %s (%d bytes)\n") index (car (car requests)) (nth 1 (car requests)) (nth 4 (car requests)))) (setq index (1+ index) requests (cdr requests))))) (let ((number (read-string "Request#: "))) (unless (string-match "^[0-9]+$" number) (error "Not a number")) (if (or (> (setq number (string-to-number number)) (length riece-rdcc-requests)) (< number 1)) (error "Invalid number")) (nth (1- number) riece-rdcc-requests)))) (default-name (expand-file-name (convert-standard-filename (nth 1 request)) (or riece-rdcc-save-directory default-directory)))) (list request (expand-file-name (read-file-name (format (riece-mcat "Save as (default %s) ") (file-name-nondirectory default-name)) (file-name-directory default-name) default-name)))))) (let* ((temp-file (expand-file-name (file-name-nondirectory file) (expand-file-name (make-temp-name "riece-rdcc") (if (featurep 'xemacs) (temp-directory) temporary-file-directory)))) (orig-mode (default-file-modes)) selective-display (coding-system-for-read 'binary) (coding-system-for-write 'binary) process) (unwind-protect (progn (set-default-file-modes 448) ;; This may throw an error. (make-directory (file-name-directory temp-file))) (set-default-file-modes orig-mode)) (setq process (open-network-stream "DCC" (generate-new-buffer " *DCC*") (riece-rdcc-decode-address (nth 2 request)) (nth 3 request))) (setq riece-rdcc-requests (delq request riece-rdcc-requests)) (with-current-buffer (process-buffer process) (if (fboundp 'set-buffer-multibyte) (set-buffer-multibyte nil)) (buffer-disable-undo) (erase-buffer) (make-local-variable 'riece-rdcc-request-user) (setq riece-rdcc-request-user (car request)) (make-local-variable 'riece-rdcc-request-file) (setq riece-rdcc-request-file file) (make-local-variable 'riece-rdcc-request-size) (setq riece-rdcc-request-size (nth 4 request)) (make-local-variable 'riece-rdcc-temp-file) (setq riece-rdcc-temp-file temp-file) (make-local-variable 'riece-rdcc-received-size) (setq riece-rdcc-received-size 0)) (set-process-filter process #'riece-rdcc-filter) (set-process-sentinel process #'riece-rdcc-sentinel))) (defun riece-rdcc-format-size (size) (if (< size 1024) (format "%0.1f" size) (setq size (/ size 1024.0)) (if (< size 1024) (format "%0.1fKB" size) (setq size (/ size 1024.0)) (if (< size 1024) (format "%0.1fMB" size) (format "%0.1fGB" (/ size 1024.0)))))) (defun riece-handle-dcc-request (prefix target message) (let ((case-fold-search t)) (when (and (get 'riece-rdcc 'riece-addon-enabled) (string-match "SEND \\(\\([^ ]+\\)\\|\"\\(.+\\)\"\\) \\([^ ]+\\) \\([^ ]+\\) \\([^ ]+\\)" message)) (let ((file (or (match-string 2 message) (match-string 3 message))) (address (match-string 4 message)) (port (string-to-number (match-string 5 message))) (size (string-to-number (match-string 6 message))) (buffer (if (riece-channel-p target) (riece-channel-buffer (riece-make-identity target riece-server-name)))) (user (riece-prefix-nickname prefix))) (setq riece-rdcc-requests (cons (list user file address port size) riece-rdcc-requests)) (message "%s" (with-current-buffer (window-buffer (selected-window)) (substitute-command-keys (format (riece-mcat "Type \\[riece-command-dcc-receive] to receive") user)))) (riece-insert-change buffer (format "DCC SEND from %s: %s (%s)\n" user file (riece-rdcc-format-size size))) (riece-insert-change (if (and riece-channel-buffer-mode (not (eq buffer riece-channel-buffer))) (list riece-dialogue-buffer riece-others-buffer) riece-dialogue-buffer) (concat (riece-concat-server-name (format "DCC SEND from %s (%s) to %s: %s (%s)" user (riece-strip-user-at-host (riece-prefix-user-at-host prefix)) (riece-decode-coding-string target) file (riece-rdcc-format-size size))) "\n"))) t))) (defun riece-rdcc-requires () '(riece-ctcp)) (defvar riece-dialogue-mode-map) (defun riece-rdcc-insinuate () (add-to-list 'riece-ctcp-additional-clientinfo "DCC") (add-hook 'riece-ctcp-dcc-request-hook 'riece-handle-dcc-request)) (defun riece-rdcc-uninstall () (setq riece-ctcp-additional-clientinfo (delete "DCC" riece-ctcp-additional-clientinfo)) (remove-hook 'riece-ctcp-dcc-request-hook 'riece-handle-dcc-request)) (defun riece-rdcc-enable () (define-key riece-dialogue-mode-map "\C-ds" 'riece-command-dcc-send) (define-key riece-dialogue-mode-map "\C-dr" 'riece-command-dcc-receive)) (defun riece-rdcc-disable () (define-key riece-dialogue-mode-map "\C-ds" nil) (define-key riece-dialogue-mode-map "\C-dr" nil)) (provide 'riece-rdcc) ;;; riece-rdcc.el ends here riece-9.0.0/lisp/riece-keyword.el0000664000076400007640000000752511546264350013623 00000000000000;;; riece-keyword.el --- detect keywords in IRC buffers -*- lexical-binding: t -*- ;; 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 '(repeat function) :group 'riece-keyword) (make-obsolete-variable 'riece-notify-keyword-functions 'riece-keyword-notify-functions "2003-12-22") (defcustom riece-keyword-notify-functions nil "Functions used to notify keyword match. Two arguments are passed to each function: the keyword used to match and the matched message object." :type '(repeat function) :group 'riece-keyword) (defface riece-keyword-face '((((class color)) (:foreground "red" :underline t)) (t (:underline t))) "Face used for highlightening matching keyword." :group 'riece-highlight-faces) (defvar riece-keyword-face 'riece-keyword-face) (defconst riece-keyword-description "Detect keywords in IRC buffers.") ;;; The old XEmacs package doesn't have autoload setting for regexp-opt. (autoload 'regexp-opt "regexp-opt") (defun riece-keyword-message-filter (message) (if (and (get 'riece-keyword 'riece-addon-enabled) riece-keywords ;; Ignore messages which belongs to myself. (not (riece-message-own-p message))) (let* (keywords (alist (nconc (delq nil (mapcar (lambda (matcher) (if (stringp matcher) (ignore (setq keywords (cons matcher keywords))) matcher)) riece-keywords)) (if keywords (list (cons (regexp-opt keywords) 0))))) index) (while alist (setq index 0) (while (and (< index (length (riece-message-text message))) (string-match (car (car alist)) (riece-message-text message) index)) (put-text-property (match-beginning (cdr (car alist))) (match-end (cdr (car alist))) 'riece-overlay-face riece-keyword-face (riece-message-text message)) (save-match-data (run-hook-with-args 'riece-notify-keyword-functions (match-string (cdr (car alist)) (riece-message-text message))) (run-hook-with-args 'riece-keyword-notify-functions (cdr (car alist)) message)) (setq index (1+ (match-end (cdr (car alist)))))) (setq alist (cdr alist))))) message) (defun riece-keyword-requires () (if (memq 'riece-highlight riece-addons) '(riece-highlight))) (defun riece-keyword-insinuate () (add-hook 'riece-message-filter-functions 'riece-keyword-message-filter)) (defun riece-keyword-uninstall () (remove-hook 'riece-message-filter-functions 'riece-keyword-message-filter)) (provide 'riece-keyword) ;;; riece-keyword.el ends here riece-9.0.0/lisp/riece-commands.el0000644000076400007640000006546411745724343013750 00000000000000;;; riece-commands.el --- commands available in command buffer -*- lexical-binding: t -*- ;; 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) ;;; Channel movement: (defun riece-command-switch-to-channel (channel) (interactive (list (riece-completing-read-identity (riece-mcat "Switch to channel/user: ") riece-current-channels nil t))) (unless (equal channel riece-current-channel) (riece-switch-to-channel channel))) (defun riece-command-switch-to-channel-by-number (number) (interactive (let ((command-name (symbol-name this-command))) (if (string-match "[0-9]+$" command-name) (list (string-to-number (match-string 0 command-name))) (list (string-to-number (read-string (riece-mcat "Switch to number: "))))))) (let ((channel (nth (1- number) riece-current-channels))) (if channel (riece-command-switch-to-channel channel) (error "No such number!")))) (eval-and-compile (let ((number 1)) (while (<= number 20) (defalias (intern (concat "riece-command-switch-to-channel-by-number-" (number-to-string number))) 'riece-command-switch-to-channel-by-number) (setq number (1+ number))))) (defun riece-command-next-channel () "Select the next channel." (interactive) (when (> (length riece-current-channels) 1) (let ((pointer (cdr (riece-identity-member riece-current-channel riece-current-channels)))) (while (and pointer (null (car pointer))) (setq pointer (cdr pointer))) (when (null pointer) (setq pointer riece-current-channels) (while (and pointer (null (car pointer))) (setq pointer (cdr pointer)))) (if (car pointer) (riece-command-switch-to-channel (car pointer)) (error "No such channel!"))))) (defun riece-command-previous-channel () "Select the previous channel." (interactive) (when (> (length riece-current-channels) 1) (let ((pointer (riece-identity-member riece-current-channel riece-current-channels)) (start riece-current-channels) channel) (while (and start (not (eq start pointer))) (if (car start) (setq channel (car start))) (setq start (cdr start))) (when (null channel) (setq start (copy-sequence riece-current-channels)) (setq start (delq nil start)) (and (> (length start) 1) (setq channel (nth (1- (length start)) start)))) (if channel (riece-command-switch-to-channel channel) (error "No such channel!"))))) (defun riece-command-reorder-channels () "Reorder channel list." (interactive) (let ((binding (mapcar (lambda (channel) (if channel (riece-parse-identity channel))) riece-default-channel-binding)) (pointer riece-current-channels) channels) (while pointer (if (car pointer) (setq channels (riece-identity-assign-binding (car pointer) channels binding))) (setq pointer (cdr pointer))) (setq riece-current-channels channels) (riece-emit-signal 'channel-list-changed))) (defun riece-command-select-command-buffer () "Select the command buffer." (interactive) (let ((window (get-buffer-window riece-command-buffer))) (if window (select-window window)))) (defun riece-command-configure-windows () (interactive) "Reconfigure windows with the current layout." (riece-redisplay-buffers t)) (defun riece-command-suspend-resume () (interactive) "Save or restore the current window configuration." (let ((entry (assq 'riece-window-configuration (frame-parameters)))) (modify-frame-parameters (selected-frame) (list (cons 'riece-window-configuration (current-window-configuration)))) (if (cdr entry) (set-window-configuration (cdr entry)) (delete-other-windows)) (message (substitute-command-keys "\\[riece-command-suspend-resume] to get back the last windows")))) (defun riece-command-change-layout (name) "Select a layout-name from all current available layouts and change the layout to the selected layout-name." (interactive (list (completing-read (riece-mcat "Change layout: ") riece-layout-alist))) (setq riece-layout name riece-save-variables-are-dirty t) (riece-command-configure-windows)) (defun riece-command-toggle-channel-buffer-mode () (interactive) (setq riece-channel-buffer-mode (not riece-channel-buffer-mode) riece-save-variables-are-dirty t) (riece-command-configure-windows)) (defun riece-command-toggle-others-buffer-mode () (interactive) (setq riece-others-buffer-mode (not riece-others-buffer-mode) riece-save-variables-are-dirty t) (riece-command-configure-windows)) (defun riece-command-toggle-user-list-buffer-mode () (interactive) (setq riece-user-list-buffer-mode (not riece-user-list-buffer-mode) riece-save-variables-are-dirty t) (riece-command-configure-windows)) (defun riece-command-toggle-channel-list-buffer-mode () (interactive) (setq riece-channel-list-buffer-mode (not riece-channel-list-buffer-mode) riece-save-variables-are-dirty t) (riece-command-configure-windows)) (defun riece-command-finger (user &optional recurse) (interactive (let* ((completion-ignore-case t) (user (riece-completing-read-identity (riece-mcat "Finger user: ") (riece-get-users-on-server (riece-current-server-name)) nil nil nil nil nil t))) (list user current-prefix-arg))) (if recurse (riece-send-string (format "WHOIS %s %s\r\n" (riece-identity-prefix user) (riece-identity-prefix user))) (riece-send-string (format "WHOIS %s\r\n" (riece-identity-prefix user))))) (defun riece-command-topic (topic) (interactive (progn (riece-check-channel-commands-are-usable t) (list (read-from-minibuffer (riece-mcat "Set topic: ") (cons (or (riece-with-server-buffer (riece-identity-server riece-current-channel) (riece-channel-get-topic (riece-identity-prefix riece-current-channel))) "") 0))))) (riece-send-string (format "TOPIC %s :%s\r\n" (riece-identity-prefix riece-current-channel) topic) riece-current-channel)) (defun riece-command-invite (user) (interactive (let ((completion-ignore-case t)) (riece-check-channel-commands-are-usable t) (list (riece-completing-read-identity (riece-mcat "Invite user: ") (riece-get-users-on-server (riece-current-server-name)) nil nil nil nil nil t)))) (riece-send-string (format "INVITE %s :%s\r\n" (riece-identity-prefix user) (riece-identity-prefix riece-current-channel)))) (defun riece-command-kick (user &optional message) (interactive (let ((completion-ignore-case t)) (riece-check-channel-commands-are-usable t) (list (completing-read (riece-mcat "Kick user: ") (riece-with-server-buffer (riece-identity-server riece-current-channel) (riece-channel-get-users (riece-identity-prefix riece-current-channel)))) (if current-prefix-arg (read-string "Message: "))))) (riece-send-string (if message (format "KICK %s %s :%s\r\n" (riece-identity-prefix riece-current-channel) user message) (format "KICK %s %s\r\n" (riece-identity-prefix riece-current-channel) user)) riece-current-channel)) (defun riece-command-kick-with-ban (user pattern &optional message) (interactive (let ((completion-ignore-case t) user) (riece-check-channel-commands-are-usable t) (riece-with-server-buffer (riece-identity-server riece-current-channel) (setq user (completing-read (riece-mcat "Kick user: ") (riece-channel-get-users (riece-identity-prefix riece-current-channel)))) (list user (read-from-minibuffer (riece-mcat "Ban pattern: ") (concat user "!" (riece-user-get-user-at-host user))) (if current-prefix-arg (read-string "Message: ")))))) (riece-send-string (format "MODE %s :+b %s\r\n" (riece-identity-prefix riece-current-channel) pattern) riece-current-channel) (riece-send-string (if message (format "KICK %s %s :%s\r\n" (riece-identity-prefix riece-current-channel) user message) (format "KICK %s %s\r\n" (riece-identity-prefix riece-current-channel) user)) riece-current-channel)) (defun riece-command-names (pattern) (interactive (let ((completion-ignore-case t)) (list (read-from-minibuffer (riece-mcat "NAMES pattern: ") (if (and riece-current-channel (riece-channel-p (riece-identity-prefix riece-current-channel))) (cons (riece-identity-prefix riece-current-channel) 0)))))) (if (or (not (equal pattern "")) (yes-or-no-p (riece-mcat "Really want to query NAMES without argument? "))) (riece-send-string (format "NAMES %s\r\n" pattern)))) (defun riece-command-who (pattern) (interactive (let ((completion-ignore-case t)) (list (read-from-minibuffer (riece-mcat "WHO pattern: ") (if (and riece-current-channel (riece-channel-p (riece-identity-prefix riece-current-channel))) (cons (riece-identity-prefix riece-current-channel) 0)))))) (if (or (not (equal pattern "")) (yes-or-no-p (riece-mcat "Really want to query WHO without argument? "))) (riece-send-string (format "WHO %s\r\n" pattern)))) (defun riece-command-list (pattern) (interactive (let ((completion-ignore-case t)) (list (read-from-minibuffer (riece-mcat "LIST pattern: ") (if (and riece-current-channel (riece-channel-p (riece-identity-prefix riece-current-channel))) (cons (riece-identity-prefix riece-current-channel) 0)))))) (if (or (not (equal pattern "")) (yes-or-no-p (riece-mcat "Really want to query LIST without argument? "))) (riece-send-string (format "LIST %s\r\n" pattern)))) (defvar riece-temp-minibuffer-message) (defvar riece-overriding-server-name) (defun riece-command-change-mode (channel change) (interactive (let* ((completion-ignore-case t) (channel (if current-prefix-arg (riece-completing-read-identity (riece-mcat "Change mode for channel/user: ") (riece-get-identities-on-server (riece-current-server-name)) nil nil nil nil nil t) (riece-check-channel-commands-are-usable t) riece-current-channel)) (riece-overriding-server-name (riece-identity-server channel)) (riece-temp-minibuffer-message (concat (riece-mcat "[Available modes: ") (riece-with-server-buffer (riece-identity-server channel) (if (riece-channel-p (riece-identity-prefix channel)) (if riece-supported-channel-modes (apply #'string riece-supported-channel-modes)) (if riece-supported-user-modes (apply #'string riece-supported-user-modes)))) "]"))) (list channel (read-from-minibuffer (concat (riece-concat-channel-modes channel (riece-mcat "Mode (? for help)")) ": ") nil riece-minibuffer-map)))) (if (equal change "") (riece-send-string (format "MODE %s\r\n" (riece-identity-prefix channel))) (riece-send-string (format "MODE %s %s\r\n" (riece-identity-prefix channel) change)))) (defun riece-command-set-operators (users &optional _arg) (interactive (progn (riece-check-channel-commands-are-usable t) (let ((completion-ignore-case t)) (list (riece-completing-read-multiple (if current-prefix-arg (riece-mcat "Unset +o for users") (riece-mcat "Set +o for users")) (riece-with-server-buffer (riece-identity-server riece-current-channel) (riece-channel-get-users (riece-identity-prefix riece-current-channel))) (if current-prefix-arg (lambda (user) (memq ?o (cdr user))) (lambda (user) (not (memq ?o (cdr user)))))) current-prefix-arg)))) (let (group) (while users (setq group (cons (car users) group) users (cdr users)) (when (or (= (length group) 3) (null users)) (riece-send-string (format "MODE %s %c%s %s\r\n" (riece-identity-prefix riece-current-channel) (if current-prefix-arg ?- ?+) (make-string (length group) ?o) (mapconcat #'identity (nreverse group) " "))) (setq group nil))))) (defun riece-command-set-speakers (users &optional _arg) (interactive (progn (riece-check-channel-commands-are-usable t) (let ((completion-ignore-case t)) (list (riece-completing-read-multiple (if current-prefix-arg (riece-mcat "Unset +v for users") (riece-mcat "Set +v for users")) (riece-with-server-buffer (riece-identity-server riece-current-channel) (riece-channel-get-users (riece-identity-prefix riece-current-channel))) (if current-prefix-arg (lambda (user) (memq ?v (cdr user))) (lambda (user) (not (memq ?v (cdr user)))))) current-prefix-arg)))) (let (group) (while users (setq group (cons (car users) group) users (cdr users)) (when (or (= (length group) 3) (null users)) (riece-send-string (format "MODE %s %c%s %s\r\n" (riece-identity-prefix riece-current-channel) (if current-prefix-arg ?- ?+) (make-string (length group) ?v) (mapconcat #'identity (nreverse group) " "))) (setq group nil))))) (defun riece-command-send-message (message notice) "Send MESSAGE to the current channel." (run-hooks 'riece-command-send-message-hook) (if (equal message "") (error (riece-mcat "No text to send"))) (riece-check-channel-commands-are-usable) (if notice (progn (riece-send-string (format "NOTICE %s :%s\r\n" (riece-identity-prefix riece-current-channel) message) riece-current-channel) (riece-display-message (riece-make-message (riece-current-nickname) riece-current-channel message 'notice t))) (riece-send-string (format "PRIVMSG %s :%s\r\n" (riece-identity-prefix riece-current-channel) message) riece-current-channel) (riece-display-message (riece-make-message (riece-current-nickname) riece-current-channel message nil t)))) (defun riece-command-enter-message () "Send the current line to the current channel." (interactive) (riece-command-send-message (buffer-substring (riece-line-beginning-position) (riece-line-end-position)) nil) (forward-line 1) (when (eobp) (insert "\n"))) (defun riece-command-enter-message-as-notice () "Send the current line to the current channel as NOTICE." (interactive) (riece-command-send-message (buffer-substring (riece-line-beginning-position) (riece-line-end-position)) t) (forward-line 1) (when (eobp) (insert "\n"))) (defun riece-command-enter-message-to-user (user) "Send the current line to USER." (interactive (if (and (bolp) (eolp)) (error "No text to send") (let ((completion-ignore-case t)) (list (riece-completing-read-identity (riece-mcat "Message to user: ") (riece-get-users-on-server (riece-current-server-name)) nil nil nil nil nil t))))) (let ((text (buffer-substring (riece-line-beginning-position) (riece-line-end-position)))) (riece-send-string (format "PRIVMSG %s :%s\r\n" (riece-identity-prefix user) text) user) (riece-display-message (riece-make-message (riece-current-nickname) user text nil t))) (forward-line 1) (when (eobp) (insert "\n"))) (defun riece-command-join-channel (target key) (unless (riece-server-opened (riece-identity-server target)) (error "%s" (substitute-command-keys "Type \\[riece-command-open-server] to open server."))) (riece-send-string (if key (format "JOIN %s :%s\r\n" (riece-identity-prefix target) key) (format "JOIN %s\r\n" (riece-identity-prefix target))) target)) (defun riece-command-join-partner (target) (let ((pointer (riece-identity-member target riece-current-channels))) (if pointer (riece-command-switch-to-channel (car pointer)) (riece-join-channel target) (riece-switch-to-channel target)))) (defun riece-command-join (targets) (interactive (let ((completion-ignore-case t) (candidates (mapcar (lambda (channel) (list (riece-format-identity channel))) (delq nil (riece-get-identities-on-server (riece-current-server-name))))) (default (if riece-join-channel-candidate (riece-format-identity riece-join-channel-candidate)))) (list (mapcar #'riece-parse-identity (riece-completing-read-multiple (if default (format (riece-mcat "Join channel/user (default %s)") default) (riece-mcat "Join channel/user")) candidates nil nil nil nil default))))) (let (pointer) (if (and (= (length targets) 1) (setq pointer (riece-identity-member (car targets) riece-current-channels))) (riece-command-switch-to-channel (car pointer)) (setq pointer targets) (while pointer (if (riece-channel-p (riece-identity-prefix (car pointer))) (riece-command-join-channel (car pointer) nil) (riece-command-join-partner (car pointer))) (setq pointer (cdr pointer)))))) (defun riece-command-part-channel (target message) (unless (riece-server-opened (riece-identity-server target)) (error "%s" (substitute-command-keys "Type \\[riece-command-open-server] to open server."))) (riece-send-string (if message (format "PART %s :%s\r\n" (riece-identity-prefix target) message) (format "PART %s\r\n" (riece-identity-prefix target))) target)) (defun riece-command-part (target &optional message) (interactive (progn (riece-check-channel-commands-are-usable) (let* ((completion-ignore-case t) (target (riece-completing-read-identity (format (riece-mcat "Part from channel/user (default %s): ") (riece-format-identity riece-current-channel)) riece-current-channels nil nil nil nil (riece-format-identity riece-current-channel))) (message (if current-prefix-arg (read-string (riece-mcat "Message: ")) riece-part-message))) (list target message)))) (if (riece-identity-member target riece-current-channels) (if (riece-channel-p (riece-identity-prefix target)) (riece-command-part-channel target message) (riece-part-channel target)) (error "You are not talking with %s" target))) (defun riece-command-change-nickname (nickname) "Change your nickname to NICK." (interactive "sEnter your nickname: ") (riece-send-string (format "NICK %s\r\n" nickname))) (defun riece-command-scroll-down (lines) "Scroll LINES down dialogue buffer from command buffer." (interactive "P") (let ((buffer (if (and riece-channel-buffer-mode riece-current-channel) riece-channel-buffer riece-dialogue-buffer))) (if (get-buffer-window buffer) (condition-case nil (let ((other-window-scroll-buffer buffer)) (scroll-other-window-down lines)) (beginning-of-buffer (message (riece-mcat "Beginning of buffer"))))))) (defun riece-command-scroll-up (lines) "Scroll LINES up dialogue buffer from command buffer." (interactive "P") (let ((buffer (if (and riece-channel-buffer-mode riece-current-channel) riece-channel-buffer riece-dialogue-buffer))) (if (get-buffer-window buffer) (condition-case nil (let ((other-window-scroll-buffer buffer)) (scroll-other-window lines)) (end-of-buffer (message (riece-mcat "End of buffer"))))))) (defun riece-command-user-list-scroll-down (lines) "Scroll LINES down user list buffer from command buffer." (interactive "P") (if (get-buffer-window riece-user-list-buffer) (condition-case nil (let ((other-window-scroll-buffer riece-user-list-buffer)) (scroll-other-window-down lines)) (beginning-of-buffer (message (riece-mcat "Beginning of buffer")))))) (defun riece-command-user-list-scroll-up (lines) "Scroll LINES up user list buffer from command buffer." (interactive "P") (if (get-buffer-window riece-user-list-buffer) (condition-case nil (let ((other-window-scroll-buffer riece-user-list-buffer)) (scroll-other-window lines)) (end-of-buffer (message (riece-mcat "End of buffer")))))) (defun riece-command-toggle-away (&optional message) "Mark yourself as being away." (interactive (if (and (not (riece-with-server-buffer (riece-identity-server (riece-current-nickname)) (riece-user-get-away (riece-identity-prefix (riece-current-nickname))))) current-prefix-arg) (list (read-from-minibuffer (riece-mcat "Away message: ") (cons (or riece-away-message "") 0))))) (if (riece-with-server-buffer (riece-identity-server (riece-current-nickname)) (riece-user-get-away (riece-identity-prefix (riece-current-nickname)))) (riece-send-string "AWAY\r\n") (riece-send-string (format "AWAY :%s\r\n" (or message riece-away-message))))) (defun riece-command-toggle-freeze (&optional arg) "Prevent automatic scrolling of the dialogue window. If prefix argument ARG is non-nil, toggle frozen status." (interactive "P") (with-current-buffer (if (riece-derived-mode-p 'riece-dialogue-mode) (current-buffer) (if (and riece-channel-buffer-mode riece-channel-buffer) riece-channel-buffer riece-dialogue-buffer)) (setq riece-freeze (if arg (< 0 (prefix-numeric-value arg)) (not riece-freeze))) (riece-emit-signal 'buffer-freeze-changed (current-buffer) riece-freeze))) (defun riece-command-toggle-own-freeze (&optional arg) "Prevent automatic scrolling of the dialogue window. The difference from `riece-command-freeze' is that your messages are hidden. If prefix argument ARG is non-nil, toggle frozen status." (interactive "P") (with-current-buffer (if (riece-derived-mode-p 'riece-dialogue-mode) (current-buffer) (if (and riece-channel-buffer-mode riece-channel-buffer) riece-channel-buffer riece-dialogue-buffer)) (if (if arg (< 0 (prefix-numeric-value arg)) (not (eq riece-freeze 'own))) (setq riece-freeze 'own) (setq riece-freeze nil)) (riece-emit-signal 'buffer-freeze-changed (current-buffer) riece-freeze))) (eval-when-compile (autoload 'riece-exit "riece")) (defun riece-command-quit (&optional arg) "Quit IRC." (interactive "P") (if (null riece-server-process-alist) (progn (message (riece-mcat "No server process")) (ding)) (if (y-or-n-p (riece-mcat "Really quit IRC? ")) (let ((message (if arg (read-string (riece-mcat "Message: ")) riece-quit-message)) (alist riece-server-process-alist)) (while alist (riece-quit-server-process (cdr (car alist)) message) (setq alist (cdr alist))))))) (defun riece-command-raw (command) "Enter raw IRC command, which is sent to the server." (interactive "sIRC command: ") (riece-send-string (concat command "\r\n"))) (defun riece-command-beginning-of-buffer () "Scroll channel buffer to the beginning." (interactive) (let (buffer window) (setq buffer (if riece-channel-buffer-mode riece-channel-buffer riece-dialogue-buffer)) (or (setq window (get-buffer-window buffer)) (setq window (get-buffer-window riece-dialogue-buffer) buffer riece-dialogue-buffer)) (when window (save-selected-window (select-window window) (goto-char (point-min)))))) (defun riece-command-end-of-buffer () "Scroll channel buffer to the end." (interactive) (let (buffer window) (setq buffer (if riece-channel-buffer-mode riece-channel-buffer riece-dialogue-buffer)) (or (setq window (get-buffer-window buffer)) (setq window (get-buffer-window riece-dialogue-buffer) buffer riece-dialogue-buffer)) (when window (save-selected-window (select-window window) (goto-char (point-max)))))) (defun riece-command-copy-region (start end) "Move current region between START and END to `kill-ring'." (interactive "r") (kill-new (buffer-substring-no-properties start end))) (defun riece-command-complete-user () "Complete a user name in the current buffer." (interactive) (let* ((completion-ignore-case t) (table (mapcar (lambda (user) (list (riece-format-identity user t))) (riece-get-users-on-server (riece-current-server-name)))) (current (or (current-word) "")) (completion (try-completion current table)) (all (all-completions current table))) (if (eq completion t) nil (if (null completion) (message (riece-mcat "Can't find completion for \"%s\"") current) (if (equal current completion) (with-output-to-temp-buffer "*Help*" (display-completion-list all)) (re-search-forward "\\>" nil t) (delete-region (point) (- (point) (length current))) (insert completion)))))) (defun riece-command-open-server (server-name) (interactive (list (completing-read (riece-mcat "Open server: ") riece-server-alist))) (if (riece-server-process server-name) (error "%s is already opened" server-name)) (riece-open-server (riece-server-name-to-server 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 riece-9.0.0/install-sh0000755000076400007640000003325611761025270011556 00000000000000#!/bin/sh # install - install a program, script, or datafile scriptversion=2011-01-19.21; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the # following copyright and license. # # Copyright (C) 1994 X Consortium # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or # sell copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # # Except as contained in this notice, the name of the X Consortium shall not # be used in advertising or otherwise to promote the sale, use or other deal- # ings in this Software without prior written authorization from the X Consor- # tium. # # # FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent # `make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. nl=' ' IFS=" "" $nl" # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit=${DOITPROG-} if test -z "$doit"; then doit_exec=exec else doit_exec=$doit fi # Put in absolute file names if you don't have them in your path; # or use environment vars. chgrpprog=${CHGRPPROG-chgrp} chmodprog=${CHMODPROG-chmod} chownprog=${CHOWNPROG-chown} cmpprog=${CMPPROG-cmp} cpprog=${CPPROG-cp} mkdirprog=${MKDIRPROG-mkdir} mvprog=${MVPROG-mv} rmprog=${RMPROG-rm} stripprog=${STRIPPROG-strip} posix_glob='?' initialize_posix_glob=' test "$posix_glob" != "?" || { if (set -f) 2>/dev/null; then posix_glob= else posix_glob=: fi } ' posix_mkdir= # Desired mode of installed file. mode=0755 chgrpcmd= chmodcmd=$chmodprog chowncmd= mvcmd=$mvprog rmcmd="$rmprog -f" stripcmd= src= dst= dir_arg= dst_arg= copy_on_change=false no_target_directory= usage="\ Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE or: $0 [OPTION]... SRCFILES... DIRECTORY or: $0 [OPTION]... -t DIRECTORY SRCFILES... or: $0 [OPTION]... -d DIRECTORIES... In the 1st form, copy SRCFILE to DSTFILE. In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. In the 4th, create DIRECTORIES. Options: --help display this help and exit. --version display version info and exit. -c (ignored) -C install only if different (preserve the last data modification time) -d create directories instead of installing files. -g GROUP $chgrpprog installed files to GROUP. -m MODE $chmodprog installed files to MODE. -o USER $chownprog installed files to USER. -s $stripprog installed files. -t DIRECTORY install into DIRECTORY. -T report an error if DSTFILE is a directory. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG " while test $# -ne 0; do case $1 in -c) ;; -C) copy_on_change=true;; -d) dir_arg=true;; -g) chgrpcmd="$chgrpprog $2" shift;; --help) echo "$usage"; exit $?;; -m) mode=$2 case $mode in *' '* | *' '* | *' '* | *'*'* | *'?'* | *'['*) echo "$0: invalid mode: $mode" >&2 exit 1;; esac shift;; -o) chowncmd="$chownprog $2" shift;; -s) stripcmd=$stripprog;; -t) dst_arg=$2 # Protect names problematic for `test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac shift;; -T) no_target_directory=true;; --version) echo "$0 $scriptversion"; exit $?;; --) shift break;; -*) echo "$0: invalid option: $1" >&2 exit 1;; *) break;; esac shift done if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. # Otherwise, the last argument is the destination. Remove it from $@. for arg do if test -n "$dst_arg"; then # $@ is not empty: it contains at least $arg. set fnord "$@" "$dst_arg" shift # fnord fi shift # arg dst_arg=$arg # Protect names problematic for `test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac done fi if test $# -eq 0; then if test -z "$dir_arg"; then echo "$0: no input file specified." >&2 exit 1 fi # It's OK to call `install-sh -d' without argument. # This can happen when creating conditional directories. exit 0 fi if test -z "$dir_arg"; then do_exit='(exit $ret); exit $ret' trap "ret=129; $do_exit" 1 trap "ret=130; $do_exit" 2 trap "ret=141; $do_exit" 13 trap "ret=143; $do_exit" 15 # Set umask so as not to create temps with too-generous modes. # However, 'strip' requires both read and write access to temps. case $mode in # Optimize common cases. *644) cp_umask=133;; *755) cp_umask=22;; *[0-7]) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw='% 200' fi cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; *) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw=,u+rw fi cp_umask=$mode$u_plus_rw;; esac fi for src do # Protect names problematic for `test' and other utilities. case $src in -* | [=\(\)!]) src=./$src;; esac if test -n "$dir_arg"; then dst=$src dstdir=$dst test -d "$dstdir" dstdir_status=$? else # Waiting for this to be detected by the "$cpprog $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if test ! -f "$src" && test ! -d "$src"; then echo "$0: $src does not exist." >&2 exit 1 fi if test -z "$dst_arg"; then echo "$0: no destination specified." >&2 exit 1 fi dst=$dst_arg # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. if test -d "$dst"; then if test -n "$no_target_directory"; then echo "$0: $dst_arg: Is a directory" >&2 exit 1 fi dstdir=$dst dst=$dstdir/`basename "$src"` dstdir_status=0 else # Prefer dirname, but fall back on a substitute if dirname fails. dstdir=` (dirname "$dst") 2>/dev/null || expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$dst" : 'X\(//\)[^/]' \| \ X"$dst" : 'X\(//\)$' \| \ X"$dst" : 'X\(/\)' \| . 2>/dev/null || echo X"$dst" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q' ` test -d "$dstdir" dstdir_status=$? fi fi obsolete_mkdir_used=false if test $dstdir_status != 0; then case $posix_mkdir in '') # Create intermediate dirs using mode 755 as modified by the umask. # This is like FreeBSD 'install' as of 1997-10-28. umask=`umask` case $stripcmd.$umask in # Optimize common cases. *[2367][2367]) mkdir_umask=$umask;; .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; *[0-7]) mkdir_umask=`expr $umask + 22 \ - $umask % 100 % 40 + $umask % 20 \ - $umask % 10 % 4 + $umask % 2 `;; *) mkdir_umask=$umask,go-w;; esac # With -d, create the new directory with the user-specified mode. # Otherwise, rely on $mkdir_umask. if test -n "$dir_arg"; then mkdir_mode=-m$mode else mkdir_mode= fi posix_mkdir=false case $umask in *[123567][0-7][0-7]) # POSIX mkdir -p sets u+wx bits regardless of umask, which # is incompatible with FreeBSD 'install' when (umask & 300) != 0. ;; *) tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 if (umask $mkdir_umask && exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 then if test -z "$dir_arg" || { # Check for POSIX incompatibilities with -m. # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or # other-writeable bit of parent directory when it shouldn't. # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. ls_ld_tmpdir=`ls -ld "$tmpdir"` case $ls_ld_tmpdir in d????-?r-*) different_mode=700;; d????-?--*) different_mode=755;; *) false;; esac && $mkdirprog -m$different_mode -p -- "$tmpdir" && { ls_ld_tmpdir_1=`ls -ld "$tmpdir"` test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" } } then posix_mkdir=: fi rmdir "$tmpdir/d" "$tmpdir" else # Remove any dirs left behind by ancient mkdir implementations. rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null fi trap '' 0;; esac;; esac if $posix_mkdir && ( umask $mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" ) then : else # The umask is ridiculous, or mkdir does not conform to POSIX, # or it failed possibly due to a race condition. Create the # directory the slow way, step by step, checking for races as we go. case $dstdir in /*) prefix='/';; [-=\(\)!]*) prefix='./';; *) prefix='';; esac eval "$initialize_posix_glob" oIFS=$IFS IFS=/ $posix_glob set -f set fnord $dstdir shift $posix_glob set +f IFS=$oIFS prefixes= for d do test X"$d" = X && continue prefix=$prefix$d if test -d "$prefix"; then prefixes= else if $posix_mkdir; then (umask=$mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break # Don't fail if two instances are running concurrently. test -d "$prefix" || exit 1 else case $prefix in *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; *) qprefix=$prefix;; esac prefixes="$prefixes '$qprefix'" fi fi prefix=$prefix/ done if test -n "$prefixes"; then # Don't fail if two instances are running concurrently. (umask $mkdir_umask && eval "\$doit_exec \$mkdirprog $prefixes") || test -d "$dstdir" || exit 1 obsolete_mkdir_used=true fi fi fi if test -n "$dir_arg"; then { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 else # Make a couple of temp file names in the proper directory. dsttmp=$dstdir/_inst.$$_ rmtmp=$dstdir/_rm.$$_ # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 # Copy the file name to the temp name. (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && # and set any options; do chmod last to preserve setuid bits. # # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $cpprog $src $dsttmp" command. # { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && # If -C, don't bother to copy if it wouldn't change the file. if $copy_on_change && old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && eval "$initialize_posix_glob" && $posix_glob set -f && set X $old && old=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 && $posix_glob set +f && test "$old" = "$new" && $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 then rm -f "$dsttmp" else # Rename the file to the real destination. $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || # The rename failed, perhaps because mv can't rename something else # to itself, or perhaps because mv is so ancient that it does not # support -f. { # Now remove or move aside any old file at destination location. # We try this two ways since rm can't unlink itself on some # systems and the destination file might be busy for other # reasons. In this case, the final cleanup might fail but the new # file should still install successfully. { test ! -f "$dst" || $doit $rmcmd -f "$dst" 2>/dev/null || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } } || { echo "$0: cannot unlink or rename $dst" >&2 (exit 1); exit 1 } } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dst" } fi || exit 1 trap '' 0 fi done # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: riece-9.0.0/Makefile.am0000644000076400007640000000034511377612201011576 00000000000000SUBDIRS = lisp doc EXTRA_DIST = 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 riece-9.0.0/ChangeLog0000664000076400007640000001424211761025227011322 000000000000002012-05-29 Daiki Ueno * Riece: Version 9.0.0 released. * configure.ac: Bump to 9.0.0. * NEWS: Add entry for 9.0.0. * NEWS.ja: Ditto. 2011-05-29 Daiki Ueno * Riece: Version 8.0.0 released. * configure.ac: Bump to 8.0.0. * NEWS: Add entry for 8.0.0. * NEWS.ja: Ditto. 2010-12-24 Daiki Ueno * Riece: Version 7.0.3 released. * configure.ac: Bump to 7.0.3. * NEWS: Add entry for 7.0.3. * NEWS.ja: Ditto. 2010-12-10 Daiki Ueno * Riece: Version 7.0.2 released. * configure.ac: Bump to 7.0.2. * NEWS: Add entry for 7.0.2. * NEWS.ja: Ditto. 2010-05-29 Daiki Ueno * Riece: Version 7.0.0 released. * configure.ac: Bump to 7.0.0. * NEWS: Add entry for 7.0.0. * NEWS.ja: Ditto. 2010-04-07 Daiki Ueno * NEWS.ja, README.ja, doc/riece-ja.texi: Change the encoding to UTF-8. 2009-09-10 Daiki Ueno * Riece: Version 6.1.0 released. * configure.ac: Bump up version to 6.1.0. 2009-05-30 Daiki Ueno * Riece: Version 6.0.0 released. * configure.ac: Bump up version to 6.0.0. 2009-04-22 Daiki Ueno * Makefile.am (EXTRA_DIST): Remove INSTALL-CVS. * INSTALL-CVS: Remove; see doc/HACKING instead. 2008-05-30 Daiki Ueno * Riece: Version 5.0.0 released. * configure.ac: Bump up version to 5.0.0. 2007-11-26 Daiki Ueno * configure.ac: Use modern AC_INIT. 2007-05-29 Daiki Ueno * Riece: Version 4.0.0 released. * configure.ac: Bump up version to 4.0.0. 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. 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-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-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-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-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-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-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-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. riece-9.0.0/doc/0000775000076400007640000000000011761025307010371 500000000000000riece-9.0.0/doc/ptexinfmt.el0000664000076400007640000010777711652200430012663 00000000000000;;; ptexinfmt.el -- portable Texinfo formatter. -*- lexical-binding: t -*- ;; Copyright (C) 1985, 1986, 1988, 1990, 1991, 1992, 1993, ;; 1994, 1995, 1996, 1997 Free Software Foundation, Inc. ;; Copyright (C) 1999 Yoshiki Hayashi ;; Copyright (C) 2000 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. ;; Unimplemented command: ;; @abbr{ABBREVIATION} ;; @float ... @end float, @caption{TEXT}, @shortcaption{TEXT}, @listoffloats ;; @deftypecv[x] ;; @headitem ;; @comma{} ;; @quotation (optional arguments) ;; @acronym{ACRONYM[, MEANING]} (optional argument) ;; @dofirstparagraphindent ;; @indent ;; @verbatiminclude FILENAME ;; @\ ;; @definfoenclose phoo,//,\\ ;; @deftypeivar CLASS DATA-TYPE VARIABLE-NAME ;; @deftypeop CATEGORY CLASS DATA-TYPE NAME ARGUMENTS... ;; @allowcodebreaks false ;; @thischapternum ;; @quotedblleft @quotedblright ;; @quoteleft @quoteright @quotedblbase @quotesinglbase ;; @guillemetleft @guillemetright @guilsinglleft @guilsinglright. ;; @clicksequence, @click, @clickstyle, @arrow ;;; Code: (require 'texinfmt) ;;; Broken (defvar ptexinfmt-disable-broken-notice-flag t "If non-nil disable notice, when call `ptexinfmt-broken-facility'. This is last argument in `ptexinfmt-broken-facility'.") (put 'ptexinfmt-broken-facility 'lisp-indent-function 'defun) (defmacro ptexinfmt-broken-facility (facility docstring assertion &optional _dummy) "Declare a symbol FACILITY is broken if ASSERTION is nil. DOCSTRING will be printed if ASSERTION is nil and `ptexinfmt-disable-broken-notice-flag' is nil." `(let ((facility ',facility) (docstring ,docstring) (assertion (eval ',assertion))) (put facility 'broken (not assertion)) (if assertion nil (put facility 'broken-docstring docstring) (if ptexinfmt-disable-broken-notice-flag nil (message "BROKEN FACILITY DETECTED: %s" docstring))))) (put 'ptexinfmt-defun-if-broken 'lisp-indent-function 'defun) (defmacro ptexinfmt-defun-if-broken (&rest args) "Redefine a function just like `defun' if it is considered broken." (let ((name (list 'quote (car args)))) (setq args (cdr args)) `(prog1 ,name (if (get ,name 'broken) (defalias ,name (function (lambda ,@args))))))) (put 'ptexinfmt-defun-if-void 'lisp-indent-function 'defun) (defmacro ptexinfmt-defun-if-void (&rest args) "Define a function just like `defun' unless it is already defined." (let ((name (list 'quote (car args)))) (setq args (cdr args)) `(prog1 ,name (if (fboundp ,name) nil (defalias ,name (function (lambda ,@args))))))) (put 'ptexinfmt-defvar-if-void 'lisp-indent-function 'defun) (defmacro ptexinfmt-defvar-if-void (&rest args) "Define a variable just like `defvar' unless it is already defined." (let ((name (car args))) (setq args (cdr args)) `(prog1 (defvar ,name) (if (boundp ',name) nil (defvar ,name ,@args))))) ;; sort -fd (ptexinfmt-broken-facility texinfo-format-printindex "Can't sort on Mule for Windows." (if (and (memq system-type '(windows-nt ms-dos)) ;;; I don't know version threshold. ;;; (string< texinfmt-version "2.37 of 24 May 1997") (boundp 'MULE) (not (featurep 'meadow))) ; Mule for Windows nil t)) ;; @var{METASYNTACTIC-VARIABLE} (defvar texinfo-enclosure-list) (defvar texinfo-alias-list) (ptexinfmt-broken-facility texinfo-format-var "Don't perse @var argument." (condition-case nil (with-temp-buffer (let (texinfo-enclosure-list texinfo-alias-list) (texinfo-mode) (insert "@var{@asis{foo}}\n") (texinfo-format-expand-region (point-min) (point-max)) t)) (error nil))) ;; @xref{NODE-NAME[, CROSS-REFERENCE-NAME, TITLE-OR-TOPIC, ;; INFO-FILE-NAME, PRINTED-MANUAL-TITLE]}. (ptexinfmt-broken-facility texinfo-format-xref "Can't format @xref, 1st argument is empty." (condition-case nil (with-temp-buffer (let (texinfo-enclosure-list texinfo-alias-list) (texinfo-mode) (insert "@xref{, xref, , file}\n") (texinfo-format-expand-region (point-min) (point-max)) t)) (error nil))) ;; @uref{URL[, TEXT][, REPLACEMENT]} (ptexinfmt-broken-facility texinfo-format-uref "Parse twice @uref argument." (condition-case nil (with-temp-buffer (let (texinfo-enclosure-list texinfo-alias-list) (texinfo-mode) (insert "@uref{mailto:foo@@noncommand.example.com}\n") (texinfo-format-expand-region (point-min) (point-max)) t)) (error nil))) ;; @multitable (ptexinfmt-broken-facility texinfo-multitable-widths "`texinfo-multitable-widths' unsupport wide-char." (if (fboundp 'texinfo-multitable-widths) (with-temp-buffer (let ((str (string (make-char 'japanese-jisx0208 73 125) (make-char 'japanese-jisx0208 57 45) (make-char 'japanese-jisx0208 74 56) (make-char 'japanese-jisx0208 59 122)))) (texinfo-mode) (insert (format " {%s}\n" str)) (goto-char (point-min)) (if (= (car (texinfo-multitable-widths)) (length str)) t nil))) ;; function definition is void nil)) (ptexinfmt-broken-facility texinfo-multitable-item "`texinfo-multitable-item' unsupport wide-char." (not (get 'texinfo-multitable-widths 'broken))) ;;; Hardcopy and HTML (discard) ;; html (put 'documentlanguage 'texinfo-format 'texinfo-discard-line-with-args) (put 'documentencoding 'texinfo-format 'texinfo-discard-line-with-args) (put 'documentdescription 'texinfo-format 'texinfo-discard-line-with-args) ;; size (put 'smallbook 'texinfo-format 'texinfo-discard-line) (put 'letterpaper 'texinfo-format 'texinfo-discard-line) (put 'afourpaper 'texinfo-format 'texinfo-discard-line) (put 'afourlatex 'texinfo-format 'texinfo-discard-line) (put 'afourwide 'texinfo-format 'texinfo-discard-line) (put 'afivepaper 'texinfo-format 'texinfo-discard-line) (put 'pagesizes 'texinfo-format 'texinfo-discard-line-with-args) (put 'fonttextsize 'texinfo-format 'texinfo-discard-line-with-args) ;; style (put 'setchapternewpage 'texinfo-format 'texinfo-discard-line-with-args) (put 'kbdinputstyle 'texinfo-format 'texinfo-discard-line-with-args) ;; flags (put 'setcontentsaftertitlepage 'texinfo-format 'texinfo-discard-line) (put 'setshortcontentsaftertitlepage 'texinfo-format 'texinfo-discard-line) (put 'novalidate 'texinfo-format 'texinfo-discard-line-with-args) (put 'frenchspacing 'texinfo-format 'texinfo-discard-line-with-args) ;; head & foot (put 'headings 'texinfo-format 'texinfo-discard-line-with-args) (put 'evenfooting 'texinfo-format 'texinfo-discard-line-with-args) (put 'evenheading 'texinfo-format 'texinfo-discard-line-with-args) (put 'oddfooting 'texinfo-format 'texinfo-discard-line-with-args) (put 'oddheading 'texinfo-format 'texinfo-discard-line-with-args) (put 'everyfooting 'texinfo-format 'texinfo-discard-line-with-args) (put 'everyheading 'texinfo-format 'texinfo-discard-line-with-args) ;; misc (put 'page 'texinfo-format 'texinfo-discard-line) (put 'hyphenation 'texinfo-format 'texinfo-discard-command-and-arg) ;; @slanted{TEXT} (makeinfo 4.8 or later) (put 'slanted 'texinfo-format 'texinfo-format-noop) ;; @sansserif{TEXT} (makeinfo 4.8 or later) (put 'sansserif 'texinfo-format 'texinfo-format-noop) ;; @tie{} (makeinfo 4.3 or later) (put 'tie 'texinfo-format 'texinfo-format-tie) (ptexinfmt-defun-if-void texinfo-format-tie () (texinfo-parse-arg-discard) (insert " ")) ;;; Directory File ;; @direcategory DIRPART (put 'dircategory 'texinfo-format 'texinfo-format-dircategory) (ptexinfmt-defun-if-void texinfo-format-dircategory () (let ((str (texinfo-parse-arg-discard))) (delete-region (point) (progn (skip-chars-forward " ") (point))) (insert "INFO-DIR-SECTION " str "\n"))) ;; @direntry ... @end direntry (put 'direntry 'texinfo-format 'texinfo-format-direntry) (ptexinfmt-defun-if-void texinfo-format-direntry () (texinfo-push-stack 'direntry nil) (texinfo-discard-line) (insert "START-INFO-DIR-ENTRY\n")) (put 'direntry 'texinfo-end 'texinfo-end-direntry) (ptexinfmt-defun-if-void texinfo-end-direntry () (texinfo-discard-command) (insert "END-INFO-DIR-ENTRY\n\n") (texinfo-pop-stack 'direntry)) ;;; Block Enclosing ;; @detailmenu ... @end detailmenu (put 'detailmenu 'texinfo-format 'texinfo-discard-line) (put 'detailmenu 'texinfo-end 'texinfo-discard-command) ;; @smalldisplay ... @end smalldisplay (put 'smalldisplay 'texinfo-format 'texinfo-format-example) (put 'smalldisplay 'texinfo-end 'texinfo-end-example) ;; @smallformat ... @end smallformat (put 'smallformat 'texinfo-format 'texinfo-format-flushleft) (put 'smallformat 'texinfo-end 'texinfo-end-flushleft) ;; @cartouche ... @end cartouche (put 'cartouche 'texinfo-format 'texinfo-discard-line) (put 'cartouche 'texinfo-end 'texinfo-discard-command) ;;; Conditional ;; @ifnottex ... @end ifnottex (makeinfo 3.11 or later) (put 'ifnottex 'texinfo-format 'texinfo-discard-line) (put 'ifnottex 'texinfo-end 'texinfo-discard-command) ;; @ifnothtml ... @end ifnothtml (makeinfo 3.11 or later) (put 'ifnothtml 'texinfo-format 'texinfo-discard-line) (put 'ifnothtml 'texinfo-end 'texinfo-discard-command) ;; @ifnotplaintext ... @end ifnotplaintext (makeinfo 4.2 or later) (put 'ifnotplaintext 'texinfo-format 'texinfo-discard-line) (put 'ifnotplaintext 'texinfo-end 'texinfo-discard-command) ;; @ifnotdocbook ... @end ifnotdocbook (makeinfo 4.7 or later) (put 'ifnotdocbook 'texinfo-format 'texinfo-discard-line) (put 'ifnotdocbook 'texinfo-end 'texinfo-discard-command) ;; @ifnotinfo ... @end ifnotinfo (makeinfo 3.11 or later) (put 'ifnotinfo 'texinfo-format 'texinfo-format-ifnotinfo) (ptexinfmt-defun-if-void texinfo-format-ifnotinfo () (delete-region texinfo-command-start (progn (re-search-forward "@end ifnotinfo[ \t]*\n") (point)))) ;; @html ... @end html (makeinfo 3.11 or later) (put 'html 'texinfo-format 'texinfo-format-html) (ptexinfmt-defun-if-void texinfo-format-html () (delete-region texinfo-command-start (progn (re-search-forward "@end html[ \t]*\n") (point)))) ;; @docbook ... @end docbook (makeinfo 4.7 or later) (put 'docbook 'texinfo-format 'texinfo-format-docbook) (ptexinfmt-defun-if-void texinfo-format-docbook () (delete-region texinfo-command-start (progn (re-search-forward "@end docbook[ \t]*\n") (point)))) ;; @ifhtml ... @end ifhtml (makeinfo 3.8 or later) (put 'ifhtml 'texinfo-format 'texinfo-format-ifhtml) (defun texinfo-format-ifhtml () (delete-region texinfo-command-start (progn (re-search-forward "@end ifhtml[ \t]*\n") (point)))) ;; @ifplaintext ... @end ifplaintext (makeinfo 4.2 or later) (put 'ifplaintext 'texinfo-format 'texinfo-format-ifplaintext) (ptexinfmt-defun-if-void texinfo-format-ifplaintext () (delete-region texinfo-command-start (progn (re-search-forward "@end ifplaintext[ \t]*\n") (point)))) ;; @ifdocbook ... @end ifdocbook (makeinfo 4.7 or later) (put 'ifdocbook 'texinfo-format 'texinfo-format-ifdocbook) (ptexinfmt-defun-if-void texinfo-format-ifdocbook () (delete-region texinfo-command-start (progn (re-search-forward "@end ifdocbook[ \t]*\n") (point)))) ;;; Marking ;; @env{ENVIRONMENT-VARIABLE} (put 'env 'texinfo-format 'texinfo-format-code) ;; @command{COMMAND-NAME} (put 'command 'texinfo-format 'texinfo-format-code) ;; @indicateurl{INDICATEURL} (put 'indicateurl 'texinfo-format 'texinfo-format-code) ;; @url{URL[, DISPLAYED-TEXT][, REPLACEMENT} (put 'url 'texinfo-format 'texinfo-format-uref) ; Texinfo 4.7 ;; @acronym{ACRONYM} (put 'acronym 'texinfo-format 'texinfo-format-var) ;; @var{METASYNTACTIC-VARIABLE} (ptexinfmt-defun-if-broken texinfo-format-var () (let ((arg (texinfo-parse-expanded-arg))) (texinfo-discard-command) (insert (upcase arg)))) ;; @key{KEY-NAME} (put 'key 'texinfo-format 'texinfo-format-key) (ptexinfmt-defun-if-void texinfo-format-key () (insert (texinfo-parse-arg-discard)) (goto-char texinfo-command-start)) ;; @email{EMAIL-ADDRESS[, DISPLAYED-TEXT]} (put 'email 'texinfo-format 'texinfo-format-email) (ptexinfmt-defun-if-void texinfo-format-email () "Format EMAIL-ADDRESS and optional DISPLAYED-TXT. Insert < ... > around EMAIL-ADDRESS." (let ((args (texinfo-format-parse-args))) (texinfo-discard-command) ;; if displayed-text (if (nth 1 args) (insert (nth 1 args) " <" (nth 0 args) ">") (insert "<" (nth 0 args) ">")))) ;; @option{OPTION-NAME} (put 'option 'texinfo-format 'texinfo-format-option) (ptexinfmt-defun-if-void texinfo-format-option () "Insert ` ... ' around arg unless inside a table; in that case, no quotes." ;; `looking-at-backward' not available in v. 18.57, 20.2 ;; searched-for character is a control-H (if (not (search-backward "\010" (save-excursion (beginning-of-line) (point)) t)) (insert "`" (texinfo-parse-arg-discard) "'") (insert (texinfo-parse-arg-discard))) (goto-char texinfo-command-start)) ;; @verb{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-char -1) (unless (looking-at "}") (error "Not found: @verb end brace")) (delete-char 1)) ;; @LaTeX{} (put 'LaTeX 'texinfo-format 'texinfo-format-LaTeX) (ptexinfmt-defun-if-void texinfo-format-LaTeX () (texinfo-parse-arg-discard) (insert "LaTeX")) ;; @registeredsymbol{} (put 'registeredsymbol 'texinfo-format 'texinfo-format-registeredsymbol) (ptexinfmt-defun-if-void texinfo-format-registeredsymbol () (texinfo-parse-arg-discard) (insert "(R)")) ;;; Accents and Special characters ;; @euro{} ==> Euro (put 'euro 'texinfo-format 'texinfo-format-euro) (ptexinfmt-defun-if-void texinfo-format-euro () (texinfo-parse-arg-discard) (insert "Euro ")) ;; @pounds{} ==> # Pounds Sterling (put 'pounds 'texinfo-format 'texinfo-format-pounds) (ptexinfmt-defun-if-void texinfo-format-pounds () (texinfo-parse-arg-discard) (insert "#")) ;; @ordf{} ==> a Spanish feminine (put 'ordf 'texinfo-format 'texinfo-format-ordf) (ptexinfmt-defun-if-void texinfo-format-ordf () (texinfo-parse-arg-discard) (insert "a")) ;; @ordm{} ==> o Spanish masculine (put 'ordm 'texinfo-format 'texinfo-format-ordm) (ptexinfmt-defun-if-void texinfo-format-ordm () (texinfo-parse-arg-discard) (insert "o")) ;; @OE{} ==> OE French-OE-ligature (put 'OE 'texinfo-format 'texinfo-format-French-OE-ligature) (ptexinfmt-defun-if-void texinfo-format-French-OE-ligature () (insert "OE" (texinfo-parse-arg-discard)) (goto-char texinfo-command-start)) ;; @oe{} ==> oe (put 'oe 'texinfo-format 'texinfo-format-French-oe-ligature) (ptexinfmt-defun-if-void texinfo-format-French-oe-ligature () ; lower case (insert "oe" (texinfo-parse-arg-discard)) (goto-char texinfo-command-start)) ;; @AA{} ==> AA Scandinavian-A-with-circle (put 'AA 'texinfo-format 'texinfo-format-Scandinavian-A-with-circle) (ptexinfmt-defun-if-void texinfo-format-Scandinavian-A-with-circle () (insert "AA" (texinfo-parse-arg-discard)) (goto-char texinfo-command-start)) ;; @aa{} ==> aa (put 'aa 'texinfo-format 'texinfo-format-Scandinavian-a-with-circle) (ptexinfmt-defun-if-void texinfo-format-Scandinavian-a-with-circle () ; lower case (insert "aa" (texinfo-parse-arg-discard)) (goto-char texinfo-command-start)) ;; @AE{} ==> AE Latin-Scandinavian-AE (put 'AE 'texinfo-format 'texinfo-format-Latin-Scandinavian-AE) (ptexinfmt-defun-if-void texinfo-format-Latin-Scandinavian-AE () (insert "AE" (texinfo-parse-arg-discard)) (goto-char texinfo-command-start)) ;; @ae{} ==> ae (put 'ae 'texinfo-format 'texinfo-format-Latin-Scandinavian-ae) (ptexinfmt-defun-if-void texinfo-format-Latin-Scandinavian-ae () ; lower case (insert "ae" (texinfo-parse-arg-discard)) (goto-char texinfo-command-start)) ;; @ss{} ==> ss German-sharp-S (put 'ss 'texinfo-format 'texinfo-format-German-sharp-S) (ptexinfmt-defun-if-void texinfo-format-German-sharp-S () (insert "ss" (texinfo-parse-arg-discard)) (goto-char texinfo-command-start)) ;; @questiondown{} ==> ? upside-down-question-mark (put 'questiondown 'texinfo-format 'texinfo-format-upside-down-question-mark) (ptexinfmt-defun-if-void texinfo-format-upside-down-question-mark () (insert "?" (texinfo-parse-arg-discard)) (goto-char texinfo-command-start)) ;; @exclamdown{} ==> ! upside-down-exclamation-mark (put 'exclamdown 'texinfo-format 'texinfo-format-upside-down-exclamation-mark) (ptexinfmt-defun-if-void texinfo-format-upside-down-exclamation-mark () (insert "!" (texinfo-parse-arg-discard)) (goto-char texinfo-command-start)) ;; @L{} ==> L/ Polish suppressed-L (Lslash) (put 'L 'texinfo-format 'texinfo-format-Polish-suppressed-L) (ptexinfmt-defun-if-void texinfo-format-Polish-suppressed-L () (insert (texinfo-parse-arg-discard) "/L") (goto-char texinfo-command-start)) ;; @l{} ==> l/ Polish suppressed-L (Lslash) (lower case) (put 'l 'texinfo-format 'texinfo-format-Polish-suppressed-l-lower-case) (ptexinfmt-defun-if-void texinfo-format-Polish-suppressed-l-lower-case () (insert (texinfo-parse-arg-discard) "/l") (goto-char texinfo-command-start)) ;; @O{} ==> O/ Scandinavian O-with-slash (put 'O 'texinfo-format 'texinfo-format-Scandinavian-O-with-slash) (ptexinfmt-defun-if-void texinfo-format-Scandinavian-O-with-slash () (insert (texinfo-parse-arg-discard) "O/") (goto-char texinfo-command-start)) ;; @o{} ==> o/ Scandinavian O-with-slash (lower case) (put 'o 'texinfo-format 'texinfo-format-Scandinavian-o-with-slash-lower-case) (ptexinfmt-defun-if-void texinfo-format-Scandinavian-o-with-slash-lower-case () (insert (texinfo-parse-arg-discard) "o/") (goto-char texinfo-command-start)) ;; @,{c} ==> c, cedilla accent (put '\, 'texinfo-format 'texinfo-format-cedilla-accent) (ptexinfmt-defun-if-void texinfo-format-cedilla-accent () (insert (texinfo-parse-arg-discard) ",") (goto-char texinfo-command-start)) ;; @dotaccent{o} ==> .o overdot-accent (put 'dotaccent 'texinfo-format 'texinfo-format-overdot-accent) (ptexinfmt-defun-if-void texinfo-format-overdot-accent () (insert "." (texinfo-parse-arg-discard)) (goto-char texinfo-command-start)) ;; @ubaraccent{o} ==> _o underbar-accent (put 'ubaraccent 'texinfo-format 'texinfo-format-underbar-accent) (ptexinfmt-defun-if-void texinfo-format-underbar-accent () (insert "_" (texinfo-parse-arg-discard)) (goto-char texinfo-command-start)) ;; @udotaccent{o} ==> o-. underdot-accent (put 'udotaccent 'texinfo-format 'texinfo-format-underdot-accent) (ptexinfmt-defun-if-void texinfo-format-underdot-accent () (insert (texinfo-parse-arg-discard) "-.") (goto-char texinfo-command-start)) ;; @H{o} ==> ""o long Hungarian umlaut (put 'H 'texinfo-format 'texinfo-format-long-Hungarian-umlaut) (ptexinfmt-defun-if-void texinfo-format-long-Hungarian-umlaut () (insert "\"\"" (texinfo-parse-arg-discard)) (goto-char texinfo-command-start)) ;; @ringaccent{o} ==> *o ring accent (put 'ringaccent 'texinfo-format 'texinfo-format-ring-accent) (ptexinfmt-defun-if-void texinfo-format-ring-accent () (insert "*" (texinfo-parse-arg-discard)) (goto-char texinfo-command-start)) ;; @tieaccent{oo} ==> [oo tie after accent (put 'tieaccent 'texinfo-format 'texinfo-format-tie-after-accent) (ptexinfmt-defun-if-void texinfo-format-tie-after-accent () (insert "[" (texinfo-parse-arg-discard)) (goto-char texinfo-command-start)) ;; @u{o} ==> (o breve accent (put 'u 'texinfo-format 'texinfo-format-breve-accent) (ptexinfmt-defun-if-void texinfo-format-breve-accent () (insert "(" (texinfo-parse-arg-discard)) (goto-char texinfo-command-start)) ;; @v{o} ==> i dotless i and dotless j (put 'dotless 'texinfo-format 'texinfo-format-dotless) (ptexinfmt-defun-if-void texinfo-format-dotless () (insert (texinfo-parse-arg-discard)) (goto-char texinfo-command-start)) ;; @. (put '\. 'texinfo-format 'texinfo-format-\.) (ptexinfmt-defun-if-void texinfo-format-\. () (texinfo-discard-command) (insert ".")) ;; @: (put '\: 'texinfo-format 'texinfo-format-\:) (ptexinfmt-defun-if-void texinfo-format-\: () (texinfo-discard-command)) ;; @- (put '\- 'texinfo-format 'texinfo-format-soft-hyphen) (ptexinfmt-defun-if-void texinfo-format-soft-hyphen () (texinfo-discard-command)) ;; @/ (put '\/ 'texinfo-format 'texinfo-format-\/) (ptexinfmt-defun-if-void texinfo-format-\/ () (texinfo-discard-command)) ;; @textdegree{} (put 'textdegree 'texinfo-format 'texinfo-format-textdegree) (ptexinfmt-defun-if-void texinfo-format-textdegree () (insert "o" (texinfo-parse-arg-discard)) (goto-char texinfo-command-start)) ;; @geq{} (put 'geq 'texinfo-format 'texinfo-format-geq) (ptexinfmt-defun-if-void texinfo-format-geq () (insert ">=" (texinfo-parse-arg-discard)) (goto-char texinfo-command-start)) ;; @leq{} (put 'leq 'texinfo-format 'texinfo-format-leq) (ptexinfmt-defun-if-void texinfo-format-leq () (insert "<=" (texinfo-parse-arg-discard)) (goto-char texinfo-command-start)) ;;; Cross References ;; @ref{NODE-NAME, ...} ;; @xref{NODE-NAME, ...} (put 'ref 'texinfo-format 'texinfo-format-xref) (ptexinfmt-defun-if-broken texinfo-format-xref () (let ((args (texinfo-format-parse-args))) (texinfo-discard-command) (insert "*Note ") (let ((fname (or (nth 1 args) (nth 2 args)))) (if (null (or fname (nth 3 args))) (insert (nth 0 args) "::") (insert (or fname (nth 0 args)) ": ") (if (nth 3 args) (insert "(" (nth 3 args) ")")) (unless (null (nth 0 args)) (insert (nth 0 args))))))) ;; @uref{URL [,TEXT] [,REPLACEMENT]} (put 'uref 'texinfo-format 'texinfo-format-uref) (ptexinfmt-defun-if-broken texinfo-format-uref () "Format URL and optional URL-TITLE. Insert ` ... ' around URL if no URL-TITLE argument; otherwise, insert URL-TITLE followed by URL in parentheses." (let ((args (texinfo-format-parse-args))) (texinfo-discard-command) ;; if url-title (if (nth 1 args) (insert (nth 1 args) " (" (nth 0 args) ")") (insert "`" (nth 0 args) "'")))) ;; @inforef{NODE-NAME, CROSS-REFERENCE-NAME, INFO-FILE-NAME} (put 'inforef 'texinfo-format 'texinfo-format-inforef) (ptexinfmt-defun-if-void texinfo-format-inforef () (let ((args (texinfo-format-parse-args))) (texinfo-discard-command) (if (nth 1 args) (insert "*Note " (nth 1 args) ": (" (nth 2 args) ")" (car args)) (insert "*Note " "(" (nth 2 args) ")" (car args) "::")))) ;; @anchor{NAME} ;; don't emulation ;; If support @anchor for Mule 2.3, We must fix informat.el and info.el: ;; - Info-tagify suport @anthor-*-refill. ;; - info.el support Ref in Tag table. (unless (get 'anchor 'texinfo-format) (put 'anchor 'texinfo-format 'texinfo-discard-command-and-arg)) ;;; 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))) ;;; @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)))) ;; @copying ... @end copying ;; that Emacs 21.4 and lesser and XEmacs don't support. (if (fboundp 'texinfo-copying) nil (defvar texinfo-copying-text "" "Text of the copyright notice and copying permissions.") (defun texinfo-copying () "Copy the copyright notice and copying permissions from the Texinfo file, as indicated by the @copying ... @end copying command; insert the text with the @insertcopying command." (let ((beg (progn (beginning-of-line) (point))) (end (progn (re-search-forward "^@end copying[ \t]*\n") (point)))) (setq texinfo-copying-text (buffer-substring-no-properties (save-excursion (goto-char beg) (forward-line 1) (point)) (save-excursion (goto-char end) (forward-line -1) (point)))) (delete-region beg end))) (defun texinfo-insertcopying () "Insert the copyright notice and copying permissions from the Texinfo file, which are indicated by the @copying ... @end copying command." (insert (concat "\n" texinfo-copying-text))) (defadvice texinfo-format-scan (before expand-@copying-section activate) "Extract @copying and replace @insertcopying with it." (goto-char (point-min)) (when (search-forward "@copying" nil t) (texinfo-copying)) (while (search-forward "@insertcopying" nil t) (delete-region (match-beginning 0) (match-end 0)) (texinfo-insertcopying)))) (provide 'ptexinfmt) ;;; ptexinfmt.el ends here riece-9.0.0/doc/irchat-copyright.el0000644000076400007640000000527211377612201014115 00000000000000;;; -*- emacs-lisp -*- ;;; ;;; $Id: irchat-copyright.el,v 1.1 2003/10/22 20:07:07 ueno Exp $ ;;; (defvar irchat-copyright " $Id: irchat-copyright.el,v 1.1 2003/10/22 20:07:07 ueno Exp $ Internet Relay CHAT interface for GNU Emacs Copyright (C) 1989 Tor Lillqvist This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GNU Emacs; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Author's email address is 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 Keinnen Markku Jrvinen 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.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 ;;; riece-9.0.0/doc/stamp-10000664000076400007640000000013311761025304011510 00000000000000@set UPDATED 28 May 2010 @set UPDATED-MONTH May 2010 @set EDITION 9.0.0 @set VERSION 9.0.0 riece-9.0.0/doc/stamp-vti0000664000076400007640000000013311761025303012151 00000000000000@set UPDATED 28 May 2010 @set UPDATED-MONTH May 2010 @set EDITION 9.0.0 @set VERSION 9.0.0 riece-9.0.0/doc/riece-ja.texi0000644000076400007640000007467111377612201012676 00000000000000\input texinfo @c -*- mode: texinfo; coding: utf-8 -*- @c %**start of header @setfilename riece-ja.info @settitle Riece -- An IRC client for Emacsen -- @c %**end of header @include version-ja.texi @c @documentlanguage ja @c @documentencoding utf-8 @dircategory GNU Emacs Lisp @direntry * Riece-ja: (riece-ja). An IRC client for Emacsen @end direntry @ifinfo This file describes Riece. Copyright (C) 2003,2004,2005,2006,2007,2008,2009,2010 Daiki Ueno. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License". @end ifinfo @tex @titlepage @title Riece @author by Daiki Ueno @page @vskip 0pt plus 1filll Copyright @copyright{} 2003,2004,2005,2006 Daiki Ueno. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License". @end titlepage @page @end tex @node Top, Overview, (dir), (dir) @top Riece user's manual このマニュアルでは、Riece バージョン @value{VERSION} について解説します。 このマニュアルで扱う範囲を越えた情報は Riece の公式ホームページ @uref{http://www.nongnu.org/riece/} から得られるかもしれません。 @menu * Overview:: はじめに読んでね * Getting started:: IRC サーバに接続して会話してみよう * Basic usage:: 基本的な使い方 * Advanced usage:: 進んだ使い方 * Tips:: 便利な設定 * Index:: * Function Index:: * Variable Index:: @end menu @node Overview, Getting started, Top, Top @chapter Overview Riece は IRC (Internet Relay Chat) の世界でチャットを楽しむためのユーザ インターフェースです。Riece は「りーす」と読みます。 Riece の主な特長は以下の通りです。 @itemize @bullet @item 複数の IRC サーバに同時に接続可能 @item アドオンにより機能の追加や取り外しが容易 @item 他の elisp パッケージに依存しないため、インストールが簡単 @item 設定が簡単で、前回起動時の設定を記録・復元する仕組みを提供 @item 段階的な操作説明書が附属 @item 最新の IRC のクライアントプロトコル (RFC2812) に準拠 @end itemize @node Getting started, Basic usage, Overview, Top @chapter Getting started Riece を起動する手順は次の通りです。 @enumerate @item @kbd{M-x load-library riece} @item @kbd{M-x riece} @end enumerate もし (1) で @samp{Cannot open load file: riece} のエラーが発生する場合に はインストールに失敗しています。自分でソースからインストールした場合には README をもう一度読み直してください。OS・ディストリビューションのパッケー ジからインストールした場合には、パッケージに含まれる文書をご確認ください。 Riece を起動すると、IRC サーバの名前を聞かれます。公共に利用可能な IRC サーバの一覧は Web ページなどから得ることができます。 @itemize @bullet @item http://www.ircnet.jp @item http://freenode.net @end itemize また、以下のようなメッセージが表示されるかもしれません。 @example Nickname "ueno" already in use. Choose a new one: @end example IRC では、参加者を表すのに@emph{ニックネーム}と呼ばれる短い呼称が使われ ます。もし希望のニックネームが他の誰かに使用されている場合、別のニックネー ムを選ぶ必要があります。 IRC サーバに接続できたら、次は会話をしてみましょう。IRC では@emph{チャンネル} と呼ばれる仮想的な会議室に参加して会話を行ないます。チャンネルに入るには @kbd{C-c j} とタイプします。参加するチャンネル名を尋ねられたら、適切なチャ ンネル名を入力しましょう。IRCnet には @samp{#Riece} というチャンネルがあ るので、テストをしたい場合には自由にお使いください。 チャンネルに入ると、下の図に示すような 5 つのウィンドウ @footnote{まぎらわしいですが、Emacs の世界ではバッファを表示する領域をウィ ンドウと呼びます。}からなる画面に切り替わります。 @example +-----+-----------------+ | | | | | | | (1) | (2) | | | | | | | +-----+-----------------+ | | (4) | | +-----------------+ | (3) | | | | (5) | | | | +-----+-----------------+ @end example (4) のウィンドウに表示されるバッファに文章を入力してリターンキーを押すと 発言できます。他の参加者の発言は (2) のウィンドウに表示されます。 @node Basic usage, Advanced usage, Getting started, Top @chapter Basic usage @menu * Windows:: 画面構成 * Indicators:: 自分の状態の表示 * Commands:: コマンドの一覧 @end menu @node Windows, Indicators, Basic usage, Basic usage @section Windows @example +-----+-----------------+ | | | | | | | (1) | (2) | | | | | | | +-----+-----------------+ | | (4) | | +-----------------+ | (3) | | | | (5) | | | | +-----+-----------------+ @end example 各ウィンドウに表示されるバッファの役割は以下の通りです。 @enumerate @item ユーザリストバッファ (@samp{ *Users*})。チャンネルに参加しているユー ザのニックネームの一覧が表示されます。 @item チャンネルバッファ (@samp{ *Channel:XXX*})。チャンネル内の会話が表示され ます。 @item チャンネルリストバッファ (@samp{ *Channels*})。自分が参加しているチャンネ ルの一覧が表示されます。 @item コマンドバッファ (@samp{*Command*})。文章やコマンドを送信するために使い ます。 @item アザーズバッファ (@samp{ *Others*})。現在選択中のチャンネル以外の会話が流 れます。 @end enumerate @node Indicators, Commands, Windows, Basic usage @section Indicators モードラインの左端には、現在の自分の状態を示す印が表示されます。 @footnote{もし画像を表示できる Emacs をお使いなら、左端に "R" のアイコン が表示されます。} @example Riece: ---- ueno #Riece [n] @end example ここで、@samp{----} の部分には左から順に以下の意味があります。 @enumerate @item 離席状態 (離席していれば @samp{A}) @item IRC オペレータ状態 (IRC ネットワークの管理者権限を持っていれば @samp{O}) @item ウィンドウの自動スクロールの禁止 (完全に禁止していれば @samp{F}、自分の 次回の発言まで禁止しているのであれば @samp{f}) @item チャンネルオペレータ状態 (チャンネルの管理者権限を持っていれば @samp{@@}) @end enumerate @node Commands, , Indicators, Basic usage @section Commands @ref{Basic usage}で文章を入力したバッファはコマンドバッファと呼ばれます。 コマンドバッファからは文章を送信する以外に、様々なコマンドを発行すること ができます。以下に一部を挙げます。 最初はなかなか覚えにくいですが、@kbd{C-h b} (@kbd{M-x describe-bindings}) で使用可能なキー操作の一覧が表示されるの で少しずつ覚えていくと良いでしょう。 @subsection IRC commands @table @kbd @item RET @findex riece-command-enter-message 文章を送ります(@code{riece-command-enter-message}) @item C-RET @findex riece-command-enter-message-as-notice 文章を NOTICE として送ります(@code{riece-command-enter-message-as-notice}) @item C-c j @findex riece-command-join チャンネルに参加します(@code{riece-command-join}) @item C-c C-p @findex riece-command-part チャンネルから離脱します(@code{riece-command-part}) @item C-c p @findex riece-command-enter-message-to-user 宛先を指定して現在の行を送ります(@code{riece-command-enter-message-to-user}) @item C-c q @findex riece-command-quit IRC をやめます(@code{riece-command-quit}) @item C-c n @findex riece-command-change-nickname 自分のニックネームを変更します(@code{riece-command-change-nickname}) @item C-c f @findex riece-command-finger ユーザの情報を調べます(@code{riece-command-finger}) @item C-c C-k @findex riece-command-kick ユーザをチャンネルから蹴り出します(@code{riece-command-kick}) @item C-c i @findex riece-command-invite ユーザをチャンネルに招待します(@code{riece-command-invite}) @item C-c l @findex riece-command-list パターンに対して LIST を発行します(@code{riece-command-list}) @item C-c C-n @findex riece-command-names パターンに対して NAMES を発行します(@code{riece-command-names}) @item C-c w @findex riece-command-who パターンに対して WHO を発行します(@code{riece-command-who}) @item C-c t @findex riece-command-topic チャンネルのトピックを設定します(@code{riece-command-topic}) @item C-c C-m @findex riece-command-change-mode チャンネルのモードを設定します(@code{riece-command-change-mode}) @item C-c o @findex riece-command-set-operators ユーザにチャンネルの管理者権限を与えます。@kbd{C-u C-c o} では逆に、ユーザからチャンネルの管理者権限を奪います(@code{riece-command-set-operators}) @item C-c v @findex riece-command-set-speakers ユーザにチャンネルでの発言権を与えます。@kbd{C-u C-c v} では逆に、ユーザからチャンネルでの発言権を奪います(@code{riece-command-set-speakers}) @item C-c V @findex riece-version Riece のバージョンを表示します。(@kbd{C-u C-c V}) で、より詳細な情報を表示します。 @item C-c / @findex riece-command-raw IRC コマンドを直接送ります(@code{riece-command-raw}) @end table @subsection Window manipulating commands @table @kbd @item C-c r @findex riece-command-configure-windows フレーム全体を再描画します(@code{riece-command-configure-windows}) @item C-c C-j または C-c > @findex riece-command-next-channel チャンネル一覧で次のチャンネルを選択します(@code{riece-command-next-channel}) @item C-c < @findex riece-command-previous-channel チャンネル一覧で前のチャンネルを選択します(@code{riece-command-previous-channel}) @item C-c ^ @findex riece-command-list-addons アドオンの一覧を表示します(@code{riece-command-list-addons}) @item C-c 数字 @findex riece-command-switch-to-channel-by-number チャンネル一覧で @var{n}番目のチャンネルを選択します(@code{riece-command-switch-to-channel-by-number}) @item C-c C-c 数字 @findex riece-command-switch-to-channel-by-number チャンネル一覧で @var{n} + 10番目のチャンネルを選択します(@code{riece-command-switch-to-channel-by-number}) @item C-c Home @findex riece-command-beginning-of-buffer チャンネルバッファ、またはダイアログバッファを上端までスクロールします(@code{riece-command-beginning-of-buffer}) @item C-c $ @findex riece-command-end-of-buffer チャンネルバッファ、またはダイアログバッファを下端までスクロールします(@code{riece-command-end-of-buffer}) @item C-c SPC @findex riece-command-scroll-up チャンネルバッファ、またはダイアログバッファを上方向にスクロールします(@code{riece-command-scroll-up}) @item C-c DEL @findex riece-command-scroll-down チャンネルバッファ、またはダイアログバッファを下方向にスクロールします(@code{riece-command-scroll-down}) @end table @subsection Status toggle commands @table @kbd @item C-c C-t c @findex riece-command-toggle-channel-buffer-mode チャンネルバッファの表示・非表示を切り替えます(@code{riece-command-toggle-channel-buffer-mode}) @item C-c C-t C @findex riece-command-toggle-channel-list-buffer-mode チャンネルリストバッファの表示・非表示を切り替えます(@code{riece-command-toggle-channel-list-buffer-mode}) @item C-c C-t u @findex riece-command-toggle-user-list-buffer-mode ユーザリストバッファの表示・非表示を切り替えます(@code{riece-command-toggle-user-list-buffer-mode}) @item C-c C-t f @findex riece-command-toggle-freeze チャンネルバッファ、またはダイアログバッファの自動スクロールを禁止しま す(@code{riece-command-toggle-freeze}) @item C-c C-t o @findex riece-command-toggle-own-freeze チャンネルバッファ、またはダイアログバッファを、自分が発言するまで、自動 スクロールを禁止します(@code{riece-command-toggle-own-freeze}) @item C-c C-t a @findex riece-command-toggle-away 自分の離席状態を切り替えます(@code{riece-command-toggle-away}) @end table @node Advanced usage, Tips, Basic usage, Top @chapter Advanced usage この章では、もっと進んだ使い方を解説します。 @menu * Startup File:: 設定ファイル * Server settings:: サーバの詳細設定 * Multiple servers:: 複数のサーバに接続するには * Add-ons:: アドオンとは @end menu @node Startup File, Server settings, Advanced usage, Advanced usage @section Startup file Riece の設定は Emacs の設定ファイルに書いても良いですが、Riece に固有の 設定はなるべく @file{~/.riece/init} に書くことを推奨します。 また、Riece を起動して終了すると @file{~/.riece/save} というファイルが 作成されます。このファイルには前回起動時の設定の一部が自動的に保存され ます。 起動時には、最初に @file{~/.riece/save} を、次に @file{~/.riece/init}を 読み込みます。つまり、前回起動時に @file{~/.riece/save} に保存された内容 は、@file{~/.riece/init} の内容で上書きされます。 @node Server settings, Multiple servers, Startup File, Advanced usage @section Server settings 起動時に接続する IRC サーバは変数 @code{riece-server} で指定します。 @vindex riece-server @code{riece-server} は文字列で、その形式は次のいずれかです。 @enumerate @item @code{IRC サーバのホスト名} @item @code{IRC サーバのホスト名:ポート番号} @item @code{IRC サーバのホスト名:ポート番号:パスワード} @item 詳細設定の名前 @end enumerate 4. の場合には、@code{riece-server} の値をキーに @code{riece-server-alist} を検索します。@code{riece-server-alist} は次 のような形式の連想配列です。 @vindex riece-server-alist @example (setq riece-server-alist '(("foo" :host "irc.example.com" :coding shift_jis) ("bar" :host "irc.example.net" :nickname "baz"))) @end example この設定の意味は以下の通りです。 @itemize @item @samp{foo} という名前の設定では、IRC サーバのホスト名に @samp{irc.example.com}、使用する文字コードに Shift_JIS を使う @item @samp{bar} という名前の設定では、IRC サーバのホスト名は @samp{irc.example.net}、このサーバではニックネーム @samp{baz} を使う @end itemize 指定できるキーワードの一覧は以下の通りです。 @table @code @item :host サーバのホスト名または IP アドレス @item :service サーバのサービス名またはポート番号 (既定値は @code{6667}) @item :nickname 接続時のニックネーム (既定値は変数 @code{user-real-login-name} の値) @item :username 接続時のユーザネーム (既定値は変数 @code{user-full-name} の値) @item :password 接続時のパスワード @item :function 接続用関数 (既定値は @code{open-network-stream}) @item :coding 文字コード (既定値は @code{riece-default-coding-system} の値) @end table @code{riece-server-alist} を対話的に設定するには次のコマンドを使うと便利です。 @example M-x load-library riece M-x customize-variable riece-server-alist @end example @node Multiple servers, Add-ons, Server settings, Advanced usage @section Multiple servers 同時に複数のサーバに接続する手順を以下に示します。 既に特定のサーバに接続している状態で、別のサーバに接続するには @kbd{C-c O} (@code{riece-command-open-server}) を使います。 別のサーバ上のチャンネルに参加するには、@kbd{C-c j} (@code{riece-command-join})でチャンネル名に @samp{@@} に続いてサーバ名を 続けます。 たとえば、サーバ @samp{irc.freenode.net} 上の @samp{#Riece} は次のよう に表記します。 @example #Riece@@irc.freenode.net @end example チャンネル名とサーバの区切り文字 @samp{@@} は 変数 @code{riece-alias-alternate-separator} で変更できます。 または、空白文字でも代用できます。この時には、@kbd{C-q SPC} と入力する 必要があります。 複数の接続を操作するコマンドを以下にまとめます。 @table @kbd @item C-c O @findex riece-command-open-server 別のサーバに接続します(@code{riece-command-open-server}) @item C-c C @findex riece-command-close-server サーバとの接続を切断します(@code{riece-command-close-server}) @item C-c M @findex riece-command-universal-server-name-argument 特定のサーバに対して、続くコマンドを発行します(@code{riece-command-universal-server-name-argument}) @end table @node Add-ons, , Multiple servers, Advanced usage @section Add-ons Riece では、雑多な機能を選択的に利用できるよう、アドオンと呼ばれる機構 を用意しています。アドオンは通常の elisp モジュールを拡張したもので、 安全な取り外しや、アドオン間の初期化処理の依存関係などの面倒をみます。 アドオンには次の四種類の状態があります。 @table @asis @item unloaded 読み込み前。アドオンの elisp モジュールが読み込まれていない状態 @item insinuated 組み込み済み。アドオンの elisp モジュールが読み込まれ、初期化処理が完了した状態 @item enabled 有効。アドオンが動作中 @item disabled 無効。アドオンの動作が停止中 @end table @menu * Add-on browser:: アドオンの一覧表示 * Available add-ons:: 標準添付のアドオンの紹介 @end menu @node Add-on browser, Available add-ons, Add-ons, Add-ons @subsection Add-on browser Riece の動作中にアドオンの一覧を眺めるにはアドオンブラウザを使うと便利です。 コマンドバッファで @kbd{C-c ^} とすると、次のように表示されます。 @example + riece-alias Define aliases for IRC names. riece-async Connect to IRC server via async proxy. riece-biff Be notified if messages arrives. + riece-button Display useful buttons in IRC buffers. + riece-ctcp CTCP (Client To Client Protocol) support. + riece-ctlseq Mark up control sequences in IRC buffers. @end example 各行の左端のマークはアドオンの状態を表わしています。@samp{+} は組込ま れて有効なアドオン、空白はロードされていないアドオンです。 ここで、riece-button を無効にしたい場合、四行目の先頭で @kbd{-} としま す。すると、先頭のマークが @samp{+} から @samp{-} に変化します。 @example + riece-alias Define aliases for IRC names. riece-async Connect to IRC server via async proxy. riece-biff Be notified if messages arrives. - riece-button Display useful buttons in IRC buffers. + riece-ctcp CTCP (Client To Client Protocol) support. + riece-ctlseq Mark up control sequences in IRC buffers. @end example さらに、@samp{u} とすると、riece-button をアドオンの設定から除外します。 さらに、@samp{U} とすると、riece-button を完全にアンロードします。 この状態で、@samp{s} または @samp{M-x riece-command-save-variables} と すると、設定を保存します。 @file{~/.riece/init} でアドオンを組み込むには @code{riece-addons} を設 定します。たとえば @samp{riece-alias} を組み込む場合には、以下のように 記述します。 @vindex riece-addons @example (add-to-list 'riece-addons 'riece-mini) @end example @node Available add-ons, , Add-on browser, Add-ons @subsection Available add-ons 利用可能なアドオンは次の通りです。これらのうちの多くは標準で組み込まれ ています。 @table @samp @item riece-alias チャンネル名やニックネームの別名を定義 @item riece-async Emacs が busy or suspend 状態になることに備え、 PING に応答する local proxy 経由で IRC サーバに接続 @item riece-biff 他のバッファにいる時に発言があるとモードラインに印 ("[R]") を表示 @item riece-button ボタンやポップアップメニューの表示 @item riece-ctcp CTCP (Client To Client Protocol) @item riece-ctlseq コントロールシーケンス (^B など) による強調表示 @item riece-desktop-notify メッセージの到着をデスクトップに通知 @item riece-doctor doctor.el と連携して精神科医になりすます @item riece-epg EasyPG @uref{http://www.easypg.org} による会話の暗号化 @item riece-eval-ruby 入力された文字列を Ruby の式として評価 @item riece-eval 入力された文字列を Emacs Lisp の式として評価 @item riece-foolproof チャンネルミスを防ぐ @item riece-google キーワードを Google で検索 @item riece-guess 色々な方法で移動先のチャンネルを推測 @item reice-hangman チャンネル内で hangman で遊ぶ @item riece-highlight バッファの色付け @item riece-history チャンネル移動の履歴管理 @item riece-icon バッファ中にアイコンを表示 @item riece-ignore 指定したユーザの発言を無視 @item riece-kakasi 日本語の通らない端末で、日本語をローマ字で表示 @item riece-keepalive IRC サーバとの接続を保持 @item riece-keyword キーワードの強調表示 @item riece-log 会話のログをファイルに保存 @item riece-lsdb アドレス帳 LSDB (Lovely Sister Database) @uref{http://lsdb.sourceforge.jp} と連携 @item riece-mcat メッセージカタログ @item riece-menu メニューバーにメニューを登録 @item riece-mini ミニバッファのみで IRC をする @item riece-ndcc DCC (Direct Client to Client protocol) によるファイル転送 (Emacs 22 でのみ動作) @item riece-rdcc DCC (Direct Client to Client protocol) によるファイル転送 @item riece-shrink-buffer メモリ確保のため、バッファを定期的に切り詰める @item riece-skk-kakutei SKK 使用時に変換モードの印を発言から取り除く @item riece-toolbar ツールバーを表示 @item riece-twitter CTCP ACTION (@kbd{C-c C-c a}) と同時に Twitter に状態を送信 @item riece-unread 発言のあったチャンネルに@samp{!}マークをつける @item riece-url 会話に現れた URL の収集 @item riece-xface ユーザリストバッファにユーザの X-Face を表示 @item riece-xfaceb ユーザリストバッファにユーザの X-Face を表示 (BBDB @uref{http://bbdb.sourceforge.net} が必要) @item riece-yank @kbd{C-c y} で kill-ring から文字列を送信 @end table @node Tips, Index, Advanced usage, Top @comment node-name, next, previous, up @chapter Tips この章では、よく聞かれる質問に対する答えと便利な設定例を紹介します。 @section 直前に選択していたチャンネルに移動したい @vindex riece-guess-channel-try-functions 以下の行を @file{~/.riece/init} に追加することで、@kbd{C-c g} で履歴を辿 りつつ移動できます。@samp{riece-guess} アドオンは、チャンネル選択の履歴 や未読メッセージの有無などから次に選択するチャンネルを推測してくれるアド オンで、標準で組み込まれています。 @example (add-hook 'riece-guess-channel-try-functions 'riece-guess-channel-from-history) @end example @section 発言があるとバッファがスクロールするのを止めたい @kbd{C-c C-t f} です。@emph{t}oggle @emph{f}reeze と覚えると良いでしょう。 @section 装飾を抑制したい @code{riece-addons} から装飾のためのアドオンを除外します。 通常有効になっている装飾のためのアドオンは次の通りです。 @itemize @item 色付け (@samp{riece-highlight}) @item ボタン表示 (@samp{riece-button}) @item アイコン画像の表示 (@samp{riece-icon}) @end itemize たとえば色付けをやめたいのであれば、以下の行を @file{~/.riece/init} に追 加します: @example (setq riece-addons (delq 'riece-highlight riece-addons)) @end example @section 特定の文字列を受信したら音を鳴らしたい @vindex riece-keyword-notify-functions 以下の設定を @file{~/.riece/init} に加えます。@samp{riece-keywords} アド オンを使うと特定の文字列を受信した際の動作を指定できます。 @example (setq riece-keywords '("ほげ" "ふが")) (add-hook 'riece-keyword-notify-functions (lambda (keyword message) (ding))) @end example @section SKK を使っていて、変換中の印 (▽) を送信してしまうことがある 以下の行を @file{~/.riece/init} に追加します。 @example (add-to-list 'riece-addons 'riece-skk-kakutei) @end example @section チャンネル一覧の並び順を固定したい @vindex riece-default-channel-binding 以下の行を @file{~/.riece/init} に追加します。 @example (setq riece-default-channel-binding '("#Riece" "#emacsen" nil "#debianjp")) @end example この設定例では、チャンネル一覧の並び順は次のようになります。 @enumerate @item #Riece @item #emacsen @item なし @item #debianjp @end enumerate 3 番目のチャンネルが空席となっていることにご注意ください。新たなチャンネ ルに参加した場合、そのチャンネルが 3 番目の位置に割当てられます。 @section 起動時に自動的にチャンネルに参加したい @vindex riece-startup-channel-list 変数 @samp{riece-startup-channel-list} を設定します。 @example (setq riece-startup-channel-list '("#Riece" "#public")) @end example この設定例は、@samp{#Riece} と @samp{#public} に参加することを意味してい ます。チャンネルに参加する際にパスワードが必要な場合には次のように設定し ます。 @example (setq riece-startup-channel-list '("#Riece" "#public" ("#private" "password"))) @end example @section 起動時に自動的に複数の IRC サーバに接続したい @vindex riece-startup-server-list 変数 @samp{riece-startup-server-list} を設定します。 @example (setq riece-server "ircnet" riece-server-alist '(("ircnet" :host "irc.tokyo.wide.ad.jp") ("freenode" :host "irc.ipv6.freenode.net"))) @end example この設定例では、起動時に接続するのは "ircnet" だけです。 @samp{riece-startup-server-list} を以下のように設定すると、 "freenode" にも接続するようになります。 @example (setq riece-startup-server-list '("freenode")) @end example @section HTTP プロキシを介して IRC サーバに接続したい @file{relay.el} と @file{connect.c} を使うと、 HTTP プロキシを介して IRC サーバに接続することができます。 @table @asis @item relay.el @uref{http://www.taiyo.co.jp/~gotoh/lisp/relay.el} @item connect.c @uref{http://www.taiyo.co.jp/~gotoh/ssh/connect.html} @end table たとえば、@samp{proxy.example.com:8080} 経由で @samp{irc.tokyo.wide.ad.jp} に接続する場合には、以下の行を @file{~/.riece/init} に追加します。 @example (require 'relay) (setq relay-command-alist (cons '("^irc\.tokyo\.wide\.ad\.jp$" "connect" "-H" "proxy.example.com:8080" host service) relay-command-alist) riece-server-alist (cons '("proxy-tokyo" :host "irc.tokyo.wide.ad.jp" :function relay-open-network-stream) riece-server-alist)) @end example @section 会話のログをファイルに保存したい @vindex riece-log-directory-map @samp{riece-log} アドオンを使うと、会話のログをファイルに保存し、再起動 時に参照できます。@samp{riece-log} アドオンは標準で組み込まれています。 通常は @file{~/.riece/log} の下に IRC サーバの名前、チャンネル名のディレ クリが作成され、その中に日にち毎に分別されて保存されます。 ディレクトリ名が文字化けする場合には、 @code{file-name-coding-system} の値を適切に設定するか、あるいは @code{riece-log-directory-map} を使ってチャンネル名を US-ASCII 文字列に 変換する必要があります。 @example (setq riece-log-directory-map '(("#りーす" . "riece"))) @end example @section ウィンドウ間を自由に移動したい GNU Emacs に附属の @samp{windmove.el} を使うと便利です。詳細は @samp{windmove.el} のコメントを参照ください。@samp{windmove.el} は 作者のページ (@uref{http://hovav.net/elisp/}) からも取得できます。 @node Index, Function Index, Tips, Top @chapter Index @printindex cp @node Function Index, Variable Index, Index, Top @chapter Function Index @printindex fn @node Variable Index, , Function Index, Top @chapter Variable Index @printindex vr @summarycontents @contents @bye @c End: riece-9.0.0/doc/riece-en.texi0000644000076400007640000003327211377612201012676 00000000000000\input texinfo @c -*- mode: texinfo -*- @c %**start of header @setfilename riece-en.info @settitle Riece -- An IRC client for Emacsen -- @c %**end of header @include version-en.texi @c @documentlanguage en @dircategory GNU Emacs Lisp @direntry * Riece-en: (riece-en). An IRC client for Emacsen @end direntry @ifinfo This file describes Riece. Copyright (C) 2003,2004,2005,2006,2007,2008,2009 Daiki Ueno. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License". @end ifinfo @tex @titlepage @title Riece @author by Daiki Ueno @page @vskip 0pt plus 1filll Copyright @copyright{} 2003,2004,2005 Daiki Ueno. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License". @end titlepage @page @end tex @node Top, Overview, (dir), (dir) @top Riece user's manual This manual documents Riece version @value{VERSION}. In addition to this manual, you may find useful information about Riece from Riece's official home page @uref{http://www.nongnu.org/riece/}. @menu * Overview:: Read me first. * Getting started:: Let's start chatting with other people. * Basic usage:: * Index:: * Function Index:: * Variable Index:: @end menu @node Overview, Getting started, Top, Top @chapter Overview Riece is a user interface for IRC (Internet Relay Chat). You should spell it with the first letter capitalized and pronounce it as /ri:s/. The features of Riece are as follows: @itemize @bullet @item Several IRC servers may be used at the same time. @item Many features built upon the extension mechanism called add-on. Currently 30 such add-ons are available. @item Installation is easy. Riece doesn't depend on other packages. @item Setup is easy. Automatically save/restore the configuration. @item Step-by-step instructions are included. @item Mostly compliant with the latest IRC client protocol (RFC 2812). @end itemize @node Getting started, Basic usage, Overview, Top @chapter Getting started To start Riece, follow the instruction below: @enumerate @item @kbd{M-x load-library riece} @item @kbd{M-x riece} @end enumerate In case that @samp{Cannot open load file: riece} is signalled in (1), you should probably have an installation problem. If you installed Riece from source tarball, please read README again. If you are trying to use a package distribution, check out the documentation. Once Riece started successfully, you will be asked the name of the IRC server to connect. IRC servers publicly available are taken from the Web pages of IRC networks: @itemize @bullet @item http://www.ircnet.jp @item http://freenode.net @end itemize You may see the following message: @example Nickname "ueno" already in use. Choose a new one: @end example In IRC, users are identified by @emph{nicknames}. If the nickname you selected has already used by another person, you must select the new one. In IRC, users join the @emph{channels} to start multi user conversation. To join a channel, type @kbd{C-c j}. On IRCnet, there is a channel named @samp{#Riece} where you can do some tests to get experienced with Riece. After you joined a channel, the layout of windows are changed to the following: @example +-----+-----------------+ | | | | | | | (1) | (2) | | | | | | | +-----+-----------------+ | | (4) | | +-----------------+ | (3) | | | | (5) | | | | +-----+-----------------+ @end example You can send messages by entering messages in (4). Messages from other persons are shown in (2). @node Basic usage, Index, Getting started, Top @chapter Basic usage To start Riece, you just type @kbd{M-x riece}. Then you will prompted for the name of an IRC server. A typical IRC network may consist of several IRC servers and you will need to pick up appropriate one. Most of IRC networks provide a list of available servers on their Web pages: @itemize @bullet @item http://irc.kyoto-u.ac.jp @item http://freenode.net @end itemize If your nickname is taken, you will be asked to use different one. The initial nickname can be set via the variable @code{riece-nickname}. By default, your nickname is generated from your login name. @vindex riece-nickname After successfully connecting to an IRC server, you can join a channel and talk with people there. To join a channel, type @kbd{C-c j}. By the way there is a channel called @samp{#Riece} on IRCnet, so feel free to use it for testing. Now you enter a message and it will be seen by everyone else on the channel. Messages from other people will appear on the top-left window. @menu * Windows:: * Indicators:: * Commands:: * Connecting to multiple servers:: @end menu @node Windows, Indicators, Basic usage, Basic usage @section Windows By default, Riece uses 5 windows to inform user of his status: @example +-----+-----------------+ | | | | | | | (1) | (2) | | | | | | | +-----+-----------------+ | | (4) | | +-----------------+ | (3) | | | | (5) | | | | +-----+-----------------+ @end example Each window is used for different purpose: @enumerate @item "user list window" (@samp{*Users XXX*}). Users on the current channel are listed in this window. @item "channel window" (@samp{*Channel XXX*}). This window keeps dialogues on the current channel. @item "channel list window" (@samp{*Channels*}). All channels you are joined are listed in this window. @item "command window" (@samp{*Commands*}). This window is used for either sending messages or issueing commands. @item "others buffer" (@samp{*Others*}). This window displays dialogues on channels except the current channel. @end enumerate @node Indicators, Commands, Windows, Basic usage @section Indicators Indicators are characters which indicate your status. Usually they are put on the left side of the modeline like: @example Riece: --- ueno #Riece [n] @end example In this case, @samp{---} are indicators. From left to right their meanings are: @enumerate @item You are not "away". (If you marked yourself as "away", it would be @samp{A}) @item You are not an IRC operator. (If you entered operator mode, it would be @samp{O}) @item The channel window is not locked. (If it was locked, it would be @samp{F}. If it was locked until next send, it would be @samp{f}) @end enumerate @node Commands, Connecting to multiple servers, Indicators, Basic usage @section Commands The buffer used for sending messages is called "command buffer". You can issue various commands from the command buffer. @subsection IRC commands @table @kbd @item RET @findex riece-command-enter-message Send the current line. (@code{riece-command-enter-message}) @item C-RET @findex riece-command-enter-message-as-notice Send the current line as NOTICE. (@code{riece-command-enter-message-as-notice}) @item C-c j @findex riece-command-join Join a channel. (@code{riece-command-join}) @item C-c C-p @findex riece-command-part Part from a channel. (@code{riece-command-part}) @item C-c p @findex riece-command-enter-message-to-user Send the current line to particular user. (@code{riece-command-enter-message-to-user}) @item C-c q @findex riece-command-quit Quit from IRC. (@code{riece-command-quit}) @item C-c n @findex riece-command-change-nickname Change your nickname. (@code{riece-command-change-nickname}) @item C-c f @findex riece-command-finger Get information of a user. (@code{riece-command-finger}) @item C-c C-k @findex riece-command-kick Kick a user from the current channel. (@code{riece-command-kick}) @item C-c i @findex riece-command-invite Invite a user to the current channel. (@code{riece-command-invite}) @item C-c l @findex riece-command-list Issue a LIST command with specified pattern. (@code{riece-command-list}) @item C-c C-n @findex riece-command-names Issue a NAMES command with specified pattern. (@code{riece-command-names}) @item C-c w @findex riece-command-who Issue a WHO command with specified pattern. (@code{riece-command-who}) @item C-c t @findex riece-command-topic Set topic of the current channel. (@code{riece-command-topic}) @item C-c C-m @findex riece-command-change-mode Change the mode of the current channel. (@code{riece-command-change-mode}) @item C-c o @findex riece-command-set-operators Assign channel operator privilege to a user. If a prefix argument (@kbd{C-u}) is given, remove the privilege from a user. (@code{riece-command-set-operators}) @item C-c v @findex riece-command-set-speakers Allow a user to speak in the current channel. If a prefix argument (@kbd{C-u}) is given, disallow a user to speak. (@code{riece-command-set-speakers}) @item C-c V @findex riece-version Display version number of Riece. If a prefix argument (@kbd{C-u}) is given, use User-Agent format. @item C-c / @findex riece-command-raw Send raw IRC command. (@code{riece-command-raw}) @end table @subsection Window manipulating commands @table @kbd @item C-c r @findex riece-command-configure-windows Redraw windows. (@code{riece-command-configure-windows}) @item C-c C-j @findex riece-command-next-channel Switch to the next channel in the channel list. (@code{riece-command-next-channel}) @item C-c < @findex riece-command-previous-channel Switch to the previous channel in the channel list. (@code{riece-command-previous-channel}) @item C-c > @findex riece-command-next-channel Switch to the next channel in the channel list. (@code{riece-command-next-channel}) @item C-c ^ @findex riece-command-list-addons Browse add-ons currently insinuated. (@code{riece-command-list-addons}) @item C-c digit @findex riece-command-switch-to-channel-by-number Switch to @var{n}th channel in the channel list. (@code{riece-command-switch-to-channel-by-number}) @item C-c C-c digit @findex riece-command-switch-to-channel-by-number Switch to @var{n} + 10th channel in the channel list. (@code{riece-command-switch-to-channel-by-number}) @item C-c Home @findex riece-command-beginning-of-buffer Move point to the beginning of the buffer in the channel window. (@code{riece-command-beginning-of-buffer}) @item C-c $ @findex riece-command-end-of-buffer Move point to the end of the buffer in the channel window. (@code{riece-command-end-of-buffer}) @item C-c SPC @findex riece-command-scroll-up Scroll text of the channel window up. (@code{riece-command-scroll-up}) @item C-c DEL @findex riece-command-scroll-down Scroll text of the channel window down. (@code{riece-command-scroll-down}) @end table @subsection Status toggle commands @table @kbd @item C-c C-t c @findex riece-command-toggle-channel-buffer-mode Toggle visibility of the channel window. (@code{riece-command-toggle-channel-buffer-mode}) @item C-c C-t C @findex riece-command-toggle-channel-list-buffer-mode Toggle visibility of the channel list window. (@code{riece-command-toggle-channel-list-buffer-mode}) @item C-c C-t u @findex riece-command-toggle-user-list-buffer-mode Toggle visibility of the user list window. (@code{riece-command-toggle-user-list-buffer-mode}) @item C-c C-t f @findex riece-command-toggle-freeze Disable scrolling of the channel window. (@code{riece-command-toggle-freeze}) @item C-c C-t o @findex riece-command-toggle-own-freeze Disable scrolling of the channel window until next send. (@code{riece-command-toggle-own-freeze}) @item C-c C-t a @findex riece-command-toggle-away Mark or unmark yourself as "away". (@code{riece-command-toggle-away}) @end table @node Connecting to multiple servers, , Commands, Basic usage @section Connecting to multiple servers One of the most important features of Riece is that users can use several IRC servers at the same time. The procedure to use multiple servers consists (1) connecting to the foreign server and (2) joinning a channel: @enumerate @item Type @kbd{C-c O} (@code{riece-command-open-server}), and then you will be asked the server name. @item Type @kbd{C-c j} (@code{riece-command-join}) to join a channel. Here the server name follows the channel name. To input a space character, use @kbd{C-q}. For example, if you want to join the channel @samp{#Riece} on the server @samp{irc6}, type @kbd{C-c j #Riece C-q SPC irc6}. @end enumerate If you want to send IRC command without joinning a channel, @kbd{C-c M} (@code{riece-command-universal-server-name-argument}) may be useful. Commands used for connection management are listed below: @table @kbd @item C-c O @findex riece-command-open-server Connect to the foreign server. (@code{riece-command-open-server}) @item C-c C @findex riece-command-close-server Close the connection to the server. (@code{riece-command-close-server}) @item C-c M @findex riece-command-universal-server-name-argument Issue a command on the specified server. (@code{riece-command-universal-server-name-argument}) @end table @node Index, Function Index, Basic usage, Top @chapter Index @printindex cp @node Function Index, Variable Index, Index, Top @chapter Function Index @printindex fn @node Variable Index, , Function Index, Top @chapter Variable Index @printindex vr @summarycontents @contents @bye @c End: riece-9.0.0/doc/Makefile.in0000664000076400007640000005162411761025270012365 00000000000000# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = doc DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(srcdir)/stamp-1 $(srcdir)/stamp-vti \ $(srcdir)/version-en.texi $(srcdir)/version-ja.texi mdate-sh \ texinfo.tex ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = INFO_DEPS = $(srcdir)/riece-ja.info $(srcdir)/riece-en.info am__TEXINFO_TEX_DIR = $(srcdir) DVIS = riece-ja.dvi riece-en.dvi PDFS = riece-ja.pdf riece-en.pdf PSS = riece-ja.ps riece-en.ps HTMLS = riece-ja.html riece-en.html TEXINFOS = riece-ja.texi riece-en.texi TEXI2DVI = texi2dvi TEXI2PDF = $(TEXI2DVI) --pdf --batch MAKEINFOHTML = $(MAKEINFO) --html AM_MAKEINFOHTMLFLAGS = $(AM_MAKEINFOFLAGS) DVIPS = dvips am__installdirs = "$(DESTDIR)$(infodir)" am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EMACS = @EMACS@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ PACKAGE = @PACKAGE@ PACKAGEDIR = @PACKAGEDIR@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XEMACS = @XEMACS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ am__leading_dot = @am__leading_dot@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ lispdir = @lispdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = -Wno-portability EXTRA_DIST = texinfo.tex infohack.el ptexinfmt.el irchat-copyright.el \ HACKING HACKING.ja info_TEXINFOS = riece-ja.texi riece-en.texi SUFFIXES = .texi .info all: all-am .SUFFIXES: .SUFFIXES: .texi .info .dvi .html .pdf .ps $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu doc/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): .texi.dvi: TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \ MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \ $(TEXI2DVI) $< .texi.pdf: TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \ MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \ $(TEXI2PDF) $< .texi.html: rm -rf $(@:.html=.htp) if $(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \ -o $(@:.html=.htp) $<; \ then \ rm -rf $@; \ if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \ mv $(@:.html=) $@; else mv $(@:.html=.htp) $@; fi; \ else \ if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \ rm -rf $(@:.html=); else rm -Rf $(@:.html=.htp) $@; fi; \ exit 1; \ fi $(srcdir)/riece-ja.info: riece-ja.texi $(srcdir)/version-ja.texi riece-ja.dvi: riece-ja.texi $(srcdir)/version-ja.texi riece-ja.pdf: riece-ja.texi $(srcdir)/version-ja.texi riece-ja.html: riece-ja.texi $(srcdir)/version-ja.texi $(srcdir)/version-ja.texi: $(srcdir)/stamp-vti $(srcdir)/stamp-vti: riece-ja.texi $(top_srcdir)/configure @(dir=.; test -f ./riece-ja.texi || dir=$(srcdir); \ set `$(SHELL) $(srcdir)/mdate-sh $$dir/riece-ja.texi`; \ echo "@set UPDATED $$1 $$2 $$3"; \ echo "@set UPDATED-MONTH $$2 $$3"; \ echo "@set EDITION $(VERSION)"; \ echo "@set VERSION $(VERSION)") > vti.tmp @cmp -s vti.tmp $(srcdir)/version-ja.texi \ || (echo "Updating $(srcdir)/version-ja.texi"; \ cp vti.tmp $(srcdir)/version-ja.texi) -@rm -f vti.tmp @cp $(srcdir)/version-ja.texi $@ mostlyclean-vti: -rm -f vti.tmp maintainer-clean-vti: -rm -f $(srcdir)/stamp-vti $(srcdir)/version-ja.texi $(srcdir)/riece-en.info: riece-en.texi $(srcdir)/version-en.texi riece-en.dvi: riece-en.texi $(srcdir)/version-en.texi riece-en.pdf: riece-en.texi $(srcdir)/version-en.texi riece-en.html: riece-en.texi $(srcdir)/version-en.texi $(srcdir)/version-en.texi: $(srcdir)/stamp-1 $(srcdir)/stamp-1: riece-en.texi $(top_srcdir)/configure @(dir=.; test -f ./riece-en.texi || dir=$(srcdir); \ set `$(SHELL) $(srcdir)/mdate-sh $$dir/riece-en.texi`; \ echo "@set UPDATED $$1 $$2 $$3"; \ echo "@set UPDATED-MONTH $$2 $$3"; \ echo "@set EDITION $(VERSION)"; \ echo "@set VERSION $(VERSION)") > 1.tmp @cmp -s 1.tmp $(srcdir)/version-en.texi \ || (echo "Updating $(srcdir)/version-en.texi"; \ cp 1.tmp $(srcdir)/version-en.texi) -@rm -f 1.tmp @cp $(srcdir)/version-en.texi $@ mostlyclean-1: -rm -f 1.tmp maintainer-clean-1: -rm -f $(srcdir)/stamp-1 $(srcdir)/version-en.texi .dvi.ps: TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \ $(DVIPS) -o $@ $< uninstall-dvi-am: @$(NORMAL_UNINSTALL) @list='$(DVIS)'; test -n "$(dvidir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(dvidir)/$$f'"; \ rm -f "$(DESTDIR)$(dvidir)/$$f"; \ done uninstall-html-am: @$(NORMAL_UNINSTALL) @list='$(HTMLS)'; test -n "$(htmldir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " rm -rf '$(DESTDIR)$(htmldir)/$$f'"; \ rm -rf "$(DESTDIR)$(htmldir)/$$f"; \ done uninstall-info-am: @$(PRE_UNINSTALL) @if test -d '$(DESTDIR)$(infodir)' && \ (install-info --version && \ install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \ list='$(INFO_DEPS)'; \ for file in $$list; do \ relfile=`echo "$$file" | sed 's|^.*/||'`; \ echo " install-info --info-dir='$(DESTDIR)$(infodir)' --remove '$(DESTDIR)$(infodir)/$$relfile'"; \ if install-info --info-dir="$(DESTDIR)$(infodir)" --remove "$(DESTDIR)$(infodir)/$$relfile"; \ then :; else test ! -f "$(DESTDIR)$(infodir)/$$relfile" || exit 1; fi; \ done; \ else :; fi @$(NORMAL_UNINSTALL) @list='$(INFO_DEPS)'; \ for file in $$list; do \ relfile=`echo "$$file" | sed 's|^.*/||'`; \ relfile_i=`echo "$$relfile" | sed 's|\.info$$||;s|$$|.i|'`; \ (if test -d "$(DESTDIR)$(infodir)" && cd "$(DESTDIR)$(infodir)"; then \ echo " cd '$(DESTDIR)$(infodir)' && rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]"; \ rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]; \ else :; fi); \ done uninstall-pdf-am: @$(NORMAL_UNINSTALL) @list='$(PDFS)'; test -n "$(pdfdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(pdfdir)/$$f'"; \ rm -f "$(DESTDIR)$(pdfdir)/$$f"; \ done uninstall-ps-am: @$(NORMAL_UNINSTALL) @list='$(PSS)'; test -n "$(psdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(psdir)/$$f'"; \ rm -f "$(DESTDIR)$(psdir)/$$f"; \ done dist-info: $(INFO_DEPS) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ list='$(INFO_DEPS)'; \ for base in $$list; do \ case $$base in \ $(srcdir)/*) base=`echo "$$base" | sed "s|^$$srcdirstrip/||"`;; \ esac; \ if test -f $$base; then d=.; else d=$(srcdir); fi; \ base_i=`echo "$$base" | sed 's|\.info$$||;s|$$|.i|'`; \ for file in $$d/$$base $$d/$$base-[0-9] $$d/$$base-[0-9][0-9] $$d/$$base_i[0-9] $$d/$$base_i[0-9][0-9]; do \ if test -f $$file; then \ relfile=`expr "$$file" : "$$d/\(.*\)"`; \ test -f "$(distdir)/$$relfile" || \ cp -p $$file "$(distdir)/$$relfile"; \ else :; fi; \ done; \ done mostlyclean-aminfo: -rm -rf riece-ja.aux riece-ja.cp riece-ja.cps riece-ja.fn riece-ja.fns \ riece-ja.ky riece-ja.kys riece-ja.log riece-ja.pg \ riece-ja.pgs riece-ja.tmp riece-ja.toc riece-ja.tp \ riece-ja.tps riece-ja.vr riece-ja.vrs riece-en.aux \ riece-en.cp riece-en.cps riece-en.fn riece-en.fns \ riece-en.ky riece-en.kys riece-en.log riece-en.pg \ riece-en.pgs riece-en.tmp riece-en.toc riece-en.tp \ riece-en.tps riece-en.vr riece-en.vrs clean-aminfo: -test -z "riece-ja.dvi riece-ja.pdf riece-ja.ps riece-ja.html riece-en.dvi \ riece-en.pdf riece-en.ps riece-en.html" \ || rm -rf riece-ja.dvi riece-ja.pdf riece-ja.ps riece-ja.html riece-en.dvi \ riece-en.pdf riece-en.ps riece-en.html maintainer-clean-aminfo: @list='$(INFO_DEPS)'; for i in $$list; do \ i_i=`echo "$$i" | sed 's|\.info$$||;s|$$|.i|'`; \ echo " rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]"; \ rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]; \ done tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" distdir="$(distdir)" \ dist-info check-am: all-am check: check-am all-am: Makefile $(INFO_DEPS) installdirs: for dir in "$(DESTDIR)$(infodir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-aminfo clean-generic mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: $(DVIS) html: html-am html-am: $(HTMLS) info: info-am info-am: $(INFO_DEPS) install-data-am: install-info-am install-dvi: install-dvi-am install-dvi-am: $(DVIS) @$(NORMAL_INSTALL) test -z "$(dvidir)" || $(MKDIR_P) "$(DESTDIR)$(dvidir)" @list='$(DVIS)'; test -n "$(dvidir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(dvidir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(dvidir)" || exit $$?; \ done install-exec-am: install-html: install-html-am install-html-am: $(HTMLS) @$(NORMAL_INSTALL) test -z "$(htmldir)" || $(MKDIR_P) "$(DESTDIR)$(htmldir)" @list='$(HTMLS)'; list2=; test -n "$(htmldir)" || list=; \ for p in $$list; do \ if test -f "$$p" || test -d "$$p"; then d=; else d="$(srcdir)/"; fi; \ $(am__strip_dir) \ d2=$$d$$p; \ if test -d "$$d2"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(htmldir)/$$f'"; \ $(MKDIR_P) "$(DESTDIR)$(htmldir)/$$f" || exit 1; \ echo " $(INSTALL_DATA) '$$d2'/* '$(DESTDIR)$(htmldir)/$$f'"; \ $(INSTALL_DATA) "$$d2"/* "$(DESTDIR)$(htmldir)/$$f" || exit $$?; \ else \ list2="$$list2 $$d2"; \ fi; \ done; \ test -z "$$list2" || { echo "$$list2" | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(htmldir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(htmldir)" || exit $$?; \ done; } install-info: install-info-am install-info-am: $(INFO_DEPS) @$(NORMAL_INSTALL) test -z "$(infodir)" || $(MKDIR_P) "$(DESTDIR)$(infodir)" @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ list='$(INFO_DEPS)'; test -n "$(infodir)" || list=; \ for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ esac; \ if test -f $$file; then d=.; else d=$(srcdir); fi; \ file_i=`echo "$$file" | sed 's|\.info$$||;s|$$|.i|'`; \ for ifile in $$d/$$file $$d/$$file-[0-9] $$d/$$file-[0-9][0-9] \ $$d/$$file_i[0-9] $$d/$$file_i[0-9][0-9] ; do \ if test -f $$ifile; then \ echo "$$ifile"; \ else : ; fi; \ done; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(infodir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(infodir)" || exit $$?; done @$(POST_INSTALL) @am__run_installinfo=yes; \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) am__run_installinfo=no;; \ *) (install-info --version) >/dev/null 2>&1 \ || am__run_installinfo=no;; \ esac; \ if test $$am__run_installinfo = yes; then \ list='$(INFO_DEPS)'; test -n "$(infodir)" || list=; \ for file in $$list; do \ relfile=`echo "$$file" | sed 's|^.*/||'`; \ echo " install-info --info-dir='$(DESTDIR)$(infodir)' '$(DESTDIR)$(infodir)/$$relfile'";\ install-info --info-dir="$(DESTDIR)$(infodir)" "$(DESTDIR)$(infodir)/$$relfile" || :;\ done; \ else : ; fi install-man: install-pdf: install-pdf-am install-pdf-am: $(PDFS) @$(NORMAL_INSTALL) test -z "$(pdfdir)" || $(MKDIR_P) "$(DESTDIR)$(pdfdir)" @list='$(PDFS)'; test -n "$(pdfdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pdfdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(pdfdir)" || exit $$?; done install-ps: install-ps-am install-ps-am: $(PSS) @$(NORMAL_INSTALL) test -z "$(psdir)" || $(MKDIR_P) "$(DESTDIR)$(psdir)" @list='$(PSS)'; test -n "$(psdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(psdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(psdir)" || exit $$?; done installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-1 \ maintainer-clean-aminfo maintainer-clean-generic \ maintainer-clean-vti mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-1 mostlyclean-aminfo mostlyclean-generic \ mostlyclean-vti pdf: pdf-am pdf-am: $(PDFS) ps: ps-am ps-am: $(PSS) uninstall-am: uninstall-dvi-am uninstall-html-am uninstall-info-am \ uninstall-pdf-am uninstall-ps-am .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-aminfo clean-generic \ dist-info distclean distclean-generic distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-1 maintainer-clean-aminfo \ maintainer-clean-generic maintainer-clean-vti mostlyclean \ mostlyclean-1 mostlyclean-aminfo mostlyclean-generic \ mostlyclean-vti pdf pdf-am ps ps-am uninstall uninstall-am \ uninstall-dvi-am uninstall-html-am uninstall-info-am \ uninstall-pdf-am uninstall-ps-am package: all $(MAKE) EMACS=$(XEMACS) install-package: package $(MAKE) infodir=$(PACKAGEDIR)/info install .texi.info: $(EMACS) -batch -q -no-site-file -l $(srcdir)/infohack.el $(srcdir) \ -f batch-makeinfo $< # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: riece-9.0.0/doc/riece-ja.info0000664000076400007640000007747111761025304012662 00000000000000Info file: riece-ja.info, -*-Text-*- produced by `texinfo-format-buffer' from file `riece-ja.texi' using `texinfmt.el' version 2.42 of 7 Jul 2006. INFO-DIR-SECTION GNU Emacs Lisp START-INFO-DIR-ENTRY * Riece-ja: (riece-ja). An IRC client for Emacsen END-INFO-DIR-ENTRY This file describes Riece. Copyright (C) 2003,2004,2005,2006,2007,2008,2009,2010 Daiki Ueno. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License".  File: riece-ja.info, Node: Top, Next: Overview, Prev: (dir), Up: (dir) Riece user's manual ******************* このマニュアルでは、Riece バージョン 9.0.0 について解説します。 このマニュアルで扱う範囲を越えた情報は Riece の公式ホームページ `http://www.nongnu.org/riece/' から得られるかもしれません。 * Menu: * Overview:: はじめに読んでね * Getting started:: IRC サーバに接続して会話してみよう * Basic usage:: 基本的な使い方 * Advanced usage:: 進んだ使い方 * Tips:: 便利な設定 * Index:: * Function Index:: * Variable Index::  File: riece-ja.info, Node: Overview, Next: Getting started, Prev: Top, Up: Top Overview ******** Riece は IRC (Internet Relay Chat) の世界でチャットを楽しむためのユーザ インターフェースです。Riece は「りーす」と読みます。 Riece の主な特長は以下の通りです。 * 複数の IRC サーバに同時に接続可能 * アドオンにより機能の追加や取り外しが容易 * 他の elisp パッケージに依存しないため、インストールが簡単 * 設定が簡単で、前回起動時の設定を記録・復元する仕組みを提供 * 段階的な操作説明書が附属 * 最新の IRC のクライアントプロトコル (RFC2812) に準拠  File: riece-ja.info, Node: Getting started, Next: Basic usage, Prev: Overview, Up: Top Getting started *************** Riece を起動する手順は次の通りです。 1. `M-x load-library riece' 2. `M-x riece' もし (1) で `Cannot open load file: riece' のエラーが発生する場合にはイ ンストールに失敗しています。自分でソースからインストールした場合には README をもう一度読み直してください。OS・ディストリビューションのパッケー ジからインストールした場合には、パッケージに含まれる文書をご確認くださ い。 Riece を起動すると、IRC サーバの名前を聞かれます。公共に利用可能な IRC サーバの一覧は Web ページなどから得ることができます。 * http://www.ircnet.jp * http://freenode.net また、以下のようなメッセージが表示されるかもしれません。 Nickname "ueno" already in use. Choose a new one: IRC では、参加者を表すのに*ニックネーム*と呼ばれる短い呼称が使われます。 もし希望のニックネームが他の誰かに使用されている場合、別のニックネーム を選ぶ必要があります。 IRC サーバに接続できたら、次は会話をしてみましょう。IRC では*チャンネル *と呼ばれる仮想的な会議室に参加して会話を行ないます。チャンネルに入るに は `C-c j' とタイプします。参加するチャンネル名を尋ねられたら、適切なチャ ンネル名を入力しましょう。IRCnet には `#Riece' というチャンネルがあるの で、テストをしたい場合には自由にお使いください。 チャンネルに入ると、下の図に示すような 5 つのウィンドウ (1) (*Note Getting started-Footnotes::)からなる画面に切り替わります。 +-----+-----------------+ | | | | | | | (1) | (2) | | | | | | | +-----+-----------------+ | | (4) | | +-----------------+ | (3) | | | | (5) | | | | +-----+-----------------+ (4) のウィンドウに表示されるバッファに文章を入力してリターンキーを押す と発言できます。他の参加者の発言は (2) のウィンドウに表示されます。  File: riece-ja.info Node: Getting started-Footnotes, Up: Getting started (1) まぎらわしいですが、Emacs の世界ではバッファを表示する領域をウィン ドウと呼びます。  File: riece-ja.info, Node: Basic usage, Next: Advanced usage, Prev: Getting started, Up: Top Basic usage *********** * Menu: * Windows:: 画面構成 * Indicators:: 自分の状態の表示 * Commands:: コマンドの一覧  File: riece-ja.info, Node: Windows, Next: Indicators, Prev: Basic usage, Up: Basic usage Windows ======= +-----+-----------------+ | | | | | | | (1) | (2) | | | | | | | +-----+-----------------+ | | (4) | | +-----------------+ | (3) | | | | (5) | | | | +-----+-----------------+ 各ウィンドウに表示されるバッファの役割は以下の通りです。 1. ユーザリストバッファ (` *Users*')。チャンネルに参加しているユーザ のニックネームの一覧が表示されます。 2. チャンネルバッファ (` *Channel:XXX*')。チャンネル内の会話が表示さ れます。 3. チャンネルリストバッファ (` *Channels*')。自分が参加しているチャン ネルの一覧が表示されます。 4. コマンドバッファ (`*Command*')。文章やコマンドを送信するために使い ます。 5. アザーズバッファ (` *Others*')。現在選択中のチャンネル以外の会話が 流れます。  File: riece-ja.info, Node: Indicators, Next: Commands, Prev: Windows, Up: Basic usage Indicators ========== モードラインの左端には、現在の自分の状態を示す印が表示されます。 (1) (*Note Indicators-Footnotes::) Riece: ---- ueno #Riece [n] ここで、`----' の部分には左から順に以下の意味があります。 1. 離席状態 (離席していれば `A') 2. IRC オペレータ状態 (IRC ネットワークの管理者権限を持っていれば `O') 3. ウィンドウの自動スクロールの禁止 (完全に禁止していれば `F'、自分の 次回の発言まで禁止しているのであれば `f') 4. チャンネルオペレータ状態 (チャンネルの管理者権限を持っていれば `@')  File: riece-ja.info Node: Indicators-Footnotes, Up: Indicators (1) もし画像を表示できる Emacs をお使いなら、左端に "R" のアイコンが表 示されます。  File: riece-ja.info, Node: Commands, Prev: Indicators, Up: Basic usage Commands ======== *Note Basic usage::で文章を入力したバッファはコマンドバッファと呼ばれま す。コマンドバッファからは文章を送信する以外に、様々なコマンドを発行す ることができます。以下に一部を挙げます。 最初はなかなか覚えにくいですが、`C-h b' (`M-x describe-bindings') で使 用可能なキー操作の一覧が表示されるので少しずつ覚えていくと良いでしょう。 IRC commands ------------ `RET' 文章を送ります(`riece-command-enter-message') `C-RET' 文章を NOTICE として送ります (`riece-command-enter-message-as-notice') `C-c j' チャンネルに参加します(`riece-command-join') `C-c C-p' チャンネルから離脱します(`riece-command-part') `C-c p' 宛先を指定して現在の行を送ります (`riece-command-enter-message-to-user') `C-c q' IRC をやめます(`riece-command-quit') `C-c n' 自分のニックネームを変更します(`riece-command-change-nickname') `C-c f' ユーザの情報を調べます(`riece-command-finger') `C-c C-k' ユーザをチャンネルから蹴り出します(`riece-command-kick') `C-c i' ユーザをチャンネルに招待します(`riece-command-invite') `C-c l' パターンに対して LIST を発行します(`riece-command-list') `C-c C-n' パターンに対して NAMES を発行します(`riece-command-names') `C-c w' パターンに対して WHO を発行します(`riece-command-who') `C-c t' チャンネルのトピックを設定します(`riece-command-topic') `C-c C-m' チャンネルのモードを設定します(`riece-command-change-mode') `C-c o' ユーザにチャンネルの管理者権限を与えます。`C-u C-c o' では逆に、ユー ザからチャンネルの管理者権限を奪います (`riece-command-set-operators') `C-c v' ユーザにチャンネルでの発言権を与えます。`C-u C-c v' では逆に、ユー ザからチャンネルでの発言権を奪います (`riece-command-set-speakers') `C-c V' Riece のバージョンを表示します。(`C-u C-c V') で、より詳細な情報を 表示します。 `C-c /' IRC コマンドを直接送ります(`riece-command-raw') Window manipulating commands ---------------------------- `C-c r' フレーム全体を再描画します(`riece-command-configure-windows') `C-c C-j または C-c >' チャンネル一覧で次のチャンネルを選択します (`riece-command-next-channel') `C-c <' チャンネル一覧で前のチャンネルを選択します (`riece-command-previous-channel') `C-c ^' アドオンの一覧を表示します(`riece-command-list-addons') `C-c 数字' チャンネル一覧で N番目のチャンネルを選択します (`riece-command-switch-to-channel-by-number') `C-c C-c 数字' チャンネル一覧で N + 10番目のチャンネルを選択します (`riece-command-switch-to-channel-by-number') `C-c Home' チャンネルバッファ、またはダイアログバッファを上端までスクロールし ます(`riece-command-beginning-of-buffer') `C-c $' チャンネルバッファ、またはダイアログバッファを下端までスクロールし ます(`riece-command-end-of-buffer') `C-c SPC' チャンネルバッファ、またはダイアログバッファを上方向にスクロールし ます(`riece-command-scroll-up') `C-c DEL' チャンネルバッファ、またはダイアログバッファを下方向にスクロールし ます(`riece-command-scroll-down') Status toggle commands ---------------------- `C-c C-t c' チャンネルバッファの表示・非表示を切り替えます (`riece-command-toggle-channel-buffer-mode') `C-c C-t C' チャンネルリストバッファの表示・非表示を切り替えます (`riece-command-toggle-channel-list-buffer-mode') `C-c C-t u' ユーザリストバッファの表示・非表示を切り替えます (`riece-command-toggle-user-list-buffer-mode') `C-c C-t f' チャンネルバッファ、またはダイアログバッファの自動スクロールを禁止 します(`riece-command-toggle-freeze') `C-c C-t o' チャンネルバッファ、またはダイアログバッファを、自分が発言するまで、 自動スクロールを禁止します(`riece-command-toggle-own-freeze') `C-c C-t a' 自分の離席状態を切り替えます(`riece-command-toggle-away')  File: riece-ja.info, Node: Advanced usage, Next: Tips, Prev: Basic usage, Up: Top Advanced usage ************** この章では、もっと進んだ使い方を解説します。 * Menu: * Startup File:: 設定ファイル * Server settings:: サーバの詳細設定 * Multiple servers:: 複数のサーバに接続するには * Add-ons:: アドオンとは  File: riece-ja.info, Node: Startup File, Next: Server settings, Prev: Advanced usage, Up: Advanced usage Startup file ============ Riece の設定は Emacs の設定ファイルに書いても良いですが、Riece に固有の 設定はなるべく `~/.riece/init' に書くことを推奨します。 また、Riece を起動して終了すると `~/.riece/save' というファイルが作成さ れます。このファイルには前回起動時の設定の一部が自動的に保存されます。 起動時には、最初に `~/.riece/save' を、次に `~/.riece/init'を読み込みま す。つまり、前回起動時に `~/.riece/save' に保存された内容は、 `~/.riece/init' の内容で上書きされます。  File: riece-ja.info, Node: Server settings, Next: Multiple servers, Prev: Startup File, Up: Advanced usage Server settings =============== 起動時に接続する IRC サーバは変数 `riece-server' で指定します。 `riece-server' は文字列で、その形式は次のいずれかです。 1. `IRC サーバのホスト名' 2. `IRC サーバのホスト名:ポート番号' 3. `IRC サーバのホスト名:ポート番号:パスワード' 4. 詳細設定の名前 4. の場合には、`riece-server' の値をキーに`riece-server-alist' を検索し ます。`riece-server-alist' は次のような形式の連想配列です。 (setq riece-server-alist '(("foo" :host "irc.example.com" :coding shift_jis) ("bar" :host "irc.example.net" :nickname "baz"))) この設定の意味は以下の通りです。 * `foo' という名前の設定では、IRC サーバのホスト名に `irc.example.com'、使用する文字コードに Shift_JIS を使う * `bar' という名前の設定では、IRC サーバのホスト名は `irc.example.net'、このサーバではニックネーム `baz' を使う 指定できるキーワードの一覧は以下の通りです。 `:host' サーバのホスト名または IP アドレス `:service' サーバのサービス名またはポート番号 (既定値は `6667') `:nickname' 接続時のニックネーム (既定値は変数 `user-real-login-name' の値) `:username' 接続時のユーザネーム (既定値は変数 `user-full-name' の値) `:password' 接続時のパスワード `:function' 接続用関数 (既定値は `open-network-stream') `:coding' 文字コード (既定値は `riece-default-coding-system' の値) `riece-server-alist' を対話的に設定するには次のコマンドを使うと便利です。 M-x load-library riece M-x customize-variable riece-server-alist  File: riece-ja.info, Node: Multiple servers, Next: Add-ons, Prev: Server settings, Up: Advanced usage Multiple servers ================ 同時に複数のサーバに接続する手順を以下に示します。 既に特定のサーバに接続している状態で、別のサーバに接続するには `C-c O' (`riece-command-open-server') を使います。 別のサーバ上のチャンネルに参加するには、`C-c j' (`riece-command-join') でチャンネル名に `@' に続いてサーバ名を続けます。 たとえば、サーバ `irc.freenode.net' 上の `#Riece' は次のように表記しま す。 #Riece@irc.freenode.net チャンネル名とサーバの区切り文字 `@' は変数 `riece-alias-alternate-separator' で変更できます。 または、空白文字でも代用できます。この時には、`C-q SPC' と入力する必要 があります。 複数の接続を操作するコマンドを以下にまとめます。 `C-c O' 別のサーバに接続します(`riece-command-open-server') `C-c C' サーバとの接続を切断します(`riece-command-close-server') `C-c M' 特定のサーバに対して、続くコマンドを発行します (`riece-command-universal-server-name-argument')  File: riece-ja.info, Node: Add-ons, Prev: Multiple servers, Up: Advanced usage Add-ons ======= Riece では、雑多な機能を選択的に利用できるよう、アドオンと呼ばれる機構 を用意しています。アドオンは通常の elisp モジュールを拡張したもので、安 全な取り外しや、アドオン間の初期化処理の依存関係などの面倒をみます。 アドオンには次の四種類の状態があります。 unloaded 読み込み前。アドオンの elisp モジュールが読み込まれていない状態 insinuated 組み込み済み。アドオンの elisp モジュールが読み込まれ、初期化処理 が完了した状態 enabled 有効。アドオンが動作中 disabled 無効。アドオンの動作が停止中 * Menu: * Add-on browser:: アドオンの一覧表示 * Available add-ons:: 標準添付のアドオンの紹介  File: riece-ja.info, Node: Add-on browser, Next: Available add-ons, Prev: Add-ons, Up: Add-ons Add-on browser -------------- Riece の動作中にアドオンの一覧を眺めるにはアドオンブラウザを使うと便利 です。コマンドバッファで `C-c ^' とすると、次のように表示されます。 + 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-button を無効にしたい場合、四行目の先頭で `-' とします。 すると、先頭のマークが `+' から `-' に変化します。 + 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. さらに、`u' とすると、riece-button をアドオンの設定から除外します。さら に、`U' とすると、riece-button を完全にアンロードします。 この状態で、`s' または `M-x riece-command-save-variables' とすると、設 定を保存します。 `~/.riece/init' でアドオンを組み込むには `riece-addons' を設定します。 たとえば `riece-alias' を組み込む場合には、以下のように記述します。 (add-to-list 'riece-addons 'riece-mini)  File: riece-ja.info, Node: Available add-ons, Prev: Add-on browser, Up: Add-ons Available add-ons ----------------- 利用可能なアドオンは次の通りです。これらのうちの多くは標準で組み込まれ ています。 `riece-alias' チャンネル名やニックネームの別名を定義 `riece-async' Emacs が busy or suspend 状態になることに備え、PING に応答する local proxy 経由で IRC サーバに接続 `riece-biff' 他のバッファにいる時に発言があるとモードラインに印 ("[R]") を表示 `riece-button' ボタンやポップアップメニューの表示 `riece-ctcp' CTCP (Client To Client Protocol) `riece-ctlseq' コントロールシーケンス (^B など) による強調表示 `riece-desktop-notify' メッセージの到着をデスクトップに通知 `riece-doctor' doctor.el と連携して精神科医になりすます `riece-epg' EasyPG `http://www.easypg.org' による会話の暗号化 `riece-eval-ruby' 入力された文字列を Ruby の式として評価 `riece-eval' 入力された文字列を Emacs Lisp の式として評価 `riece-foolproof' チャンネルミスを防ぐ `riece-google' キーワードを Google で検索 `riece-guess' 色々な方法で移動先のチャンネルを推測 `reice-hangman' チャンネル内で hangman で遊ぶ `riece-highlight' バッファの色付け `riece-history' チャンネル移動の履歴管理 `riece-icon' バッファ中にアイコンを表示 `riece-ignore' 指定したユーザの発言を無視 `riece-kakasi' 日本語の通らない端末で、日本語をローマ字で表示 `riece-keepalive' IRC サーバとの接続を保持 `riece-keyword' キーワードの強調表示 `riece-log' 会話のログをファイルに保存 `riece-lsdb' アドレス帳 LSDB (Lovely Sister Database) `http://lsdb.sourceforge.jp' と連携 `riece-mcat' メッセージカタログ `riece-menu' メニューバーにメニューを登録 `riece-mini' ミニバッファのみで IRC をする `riece-ndcc' DCC (Direct Client to Client protocol) によるファイル転送(Emacs 22 でのみ動作) `riece-rdcc' DCC (Direct Client to Client protocol) によるファイル転送 `riece-shrink-buffer' メモリ確保のため、バッファを定期的に切り詰める `riece-skk-kakutei' SKK 使用時に変換モードの印を発言から取り除く `riece-toolbar' ツールバーを表示 `riece-twitter' CTCP ACTION (`C-c C-c a') と同時に Twitter に状態を送信 `riece-unread' 発言のあったチャンネルに`!'マークをつける `riece-url' 会話に現れた URL の収集 `riece-xface' ユーザリストバッファにユーザの X-Face を表示 `riece-xfaceb' ユーザリストバッファにユーザの X-Face を表示(BBDB `http://bbdb.sourceforge.net' が必要) `riece-yank' `C-c y' で kill-ring から文字列を送信  File: riece-ja.info, Node: Tips, Next: Index, Prev: Advanced usage, Up: Top Tips **** この章では、よく聞かれる質問に対する答えと便利な設定例を紹介します。 直前に選択していたチャンネルに移動したい ======================================== 以下の行を `~/.riece/init' に追加することで、`C-c g' で履歴を辿りつつ移 動できます。`riece-guess' アドオンは、チャンネル選択の履歴や未読メッセー ジの有無などから次に選択するチャンネルを推測してくれるアドオンで、標準 で組み込まれています。 (add-hook 'riece-guess-channel-try-functions 'riece-guess-channel-from-history) 発言があるとバッファがスクロールするのを止めたい ================================================ `C-c C-t f' です。*t*oggle *f*reeze と覚えると良いでしょう。 装飾を抑制したい ================ `riece-addons' から装飾のためのアドオンを除外します。通常有効になってい る装飾のためのアドオンは次の通りです。 * 色付け (`riece-highlight') * ボタン表示 (`riece-button') * アイコン画像の表示 (`riece-icon') たとえば色付けをやめたいのであれば、以下の行を `~/.riece/init' に追加し ます: (setq riece-addons (delq 'riece-highlight riece-addons)) 特定の文字列を受信したら音を鳴らしたい ====================================== 以下の設定を `~/.riece/init' に加えます。`riece-keywords' アドオンを使 うと特定の文字列を受信した際の動作を指定できます。 (setq riece-keywords '("ほげ" "ふが")) (add-hook 'riece-keyword-notify-functions (lambda (keyword message) (ding))) SKK を使っていて、変換中の印 (▽) を送信してしまうことがある ============================================================ 以下の行を `~/.riece/init' に追加します。 (add-to-list 'riece-addons 'riece-skk-kakutei) チャンネル一覧の並び順を固定したい ================================== 以下の行を `~/.riece/init' に追加します。 (setq riece-default-channel-binding '("#Riece" "#emacsen" nil "#debianjp")) この設定例では、チャンネル一覧の並び順は次のようになります。 1. #Riece 2. #emacsen 3. なし 4. #debianjp 3 番目のチャンネルが空席となっていることにご注意ください。新たなチャン ネルに参加した場合、そのチャンネルが 3 番目の位置に割当てられます。 起動時に自動的にチャンネルに参加したい ====================================== 変数 `riece-startup-channel-list' を設定します。 (setq riece-startup-channel-list '("#Riece" "#public")) この設定例は、`#Riece' と `#public' に参加することを意味しています。チャ ンネルに参加する際にパスワードが必要な場合には次のように設定します。 (setq riece-startup-channel-list '("#Riece" "#public" ("#private" "password"))) 起動時に自動的に複数の IRC サーバに接続したい ============================================= 変数 `riece-startup-server-list' を設定します。 (setq riece-server "ircnet" riece-server-alist '(("ircnet" :host "irc.tokyo.wide.ad.jp") ("freenode" :host "irc.ipv6.freenode.net"))) この設定例では、起動時に接続するのは "ircnet" だけです。 `riece-startup-server-list' を以下のように設定すると、"freenode" にも接 続するようになります。 (setq riece-startup-server-list '("freenode")) HTTP プロキシを介して IRC サーバに接続したい ============================================ `relay.el' と `connect.c' を使うと、HTTP プロキシを介して IRC サーバに 接続することができます。 relay.el `http://www.taiyo.co.jp/~gotoh/lisp/relay.el' connect.c `http://www.taiyo.co.jp/~gotoh/ssh/connect.html' たとえば、`proxy.example.com:8080' 経由で `irc.tokyo.wide.ad.jp' に接続する場合には、以下の行を `~/.riece/init' に追加します。 (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)) 会話のログをファイルに保存したい ================================ `riece-log' アドオンを使うと、会話のログをファイルに保存し、再起動時に 参照できます。`riece-log' アドオンは標準で組み込まれています。 通常は `~/.riece/log' の下に IRC サーバの名前、チャンネル名のディレクリ が作成され、その中に日にち毎に分別されて保存されます。 ディレクトリ名が文字化けする場合には、`file-name-coding-system' の値を 適切に設定するか、あるいは `riece-log-directory-map' を使ってチャンネル 名を US-ASCII 文字列に変換する必要があります。 (setq riece-log-directory-map '(("#りーす" . "riece"))) ウィンドウ間を自由に移動したい ============================== GNU Emacs に附属の `windmove.el' を使うと便利です。詳細は `windmove.el' のコメントを参照ください。`windmove.el' は 作者のページ (`http://hovav.net/elisp/') からも取得できます。  File: riece-ja.info, Node: Index, Next: Function Index, Prev: Tips, Up: Top Index ***** * Menu:  File: riece-ja.info, Node: Function Index, Next: Variable Index, Prev: Index, Up: Top Function Index ************** * Menu: * riece-command-beginning-of-buffer: Commands. (line 89) * riece-command-change-mode: Commands. (line 62) * riece-command-change-nickname: Commands. (line 38) * riece-command-close-server: Multiple servers. (line 32) * riece-command-configure-windows: Commands. (line 67) * riece-command-end-of-buffer: Commands. (line 93) * riece-command-enter-message: Commands. (line 18) * riece-command-enter-message-as-notice: Commands. (line 21) * riece-command-enter-message-to-user: Commands. (line 31) * riece-command-finger: Commands. (line 41) * riece-command-invite: Commands. (line 47) * riece-command-join: Commands. (line 25) * riece-command-kick: Commands. (line 44) * riece-command-list: Commands. (line 50) * riece-command-list-addons: Commands. (line 78) * riece-command-names: Commands. (line 53) * riece-command-next-channel: Commands. (line 70) * riece-command-open-server: Multiple servers. (line 29) * riece-command-part: Commands. (line 28) * riece-command-previous-channel: Commands. (line 74) * riece-command-quit: Commands. (line 35) * riece-command-raw: Commands. (line 79) * riece-command-scroll-down: Commands. (line 101) * riece-command-scroll-up: Commands. (line 97) * riece-command-set-operators: Commands. (line 65) * riece-command-set-speakers: Commands. (line 70) * riece-command-switch-to-channel-by-number: Commands. (line 81) * riece-command-switch-to-channel-by-number: Commands. (line 85) * riece-command-toggle-away: Commands. (line 119) * riece-command-toggle-channel-buffer-mode: Commands. (line 99) * riece-command-toggle-channel-list-buffer-mode: Commands. (line 103) * riece-command-toggle-freeze: Commands. (line 111) * riece-command-toggle-own-freeze: Commands. (line 115) * riece-command-toggle-user-list-buffer-mode: Commands. (line 107) * riece-command-topic: Commands. (line 59) * riece-command-universal-server-name-argument: Multiple servers. (line 35) * riece-command-who: Commands. (line 56) * riece-version: Commands. (line 75)  File: riece-ja.info, Node: Variable Index, Prev: Function Index, Up: Top Variable Index ************** * Menu: * riece-addons: Add-on browser. (line 37) * riece-default-channel-binding: Tips. (line 66) * riece-guess-channel-try-functions: Tips. (line 11) * riece-keyword-notify-functions: Tips. (line 47) * riece-log-directory-map: Tips. (line 141) * riece-server: Server settings. (line 7) * riece-server-alist: Server settings. (line 20) * riece-startup-channel-list: Tips. (line 85) * riece-startup-server-list: Tips. (line 100)  Tag table: Node: Top759 Node: Overview1265 Node: Getting started1656 Node: Basic usage3211 Node: Windows3461 Node: Indicators4315 Node: Commands4883 Node: Advanced usage7863 Node: Startup File8179 Node: Server settings8607 Node: Multiple servers9850 Node: Add-ons10608 Node: Add-on browser11117 Node: Available add-ons12536 Node: Tips14504 Node: Index18395 Node: Function Index18498 Node: Variable Index21191  End tag table riece-9.0.0/doc/version-en.texi0000664000076400007640000000013311761025304013263 00000000000000@set UPDATED 28 May 2010 @set UPDATED-MONTH May 2010 @set EDITION 9.0.0 @set VERSION 9.0.0 riece-9.0.0/doc/HACKING.ja0000644000076400007640000003076111377612201011674 00000000000000-*- mode: text; coding: iso-2022-jp -*- $B$3$NJ8=q$O!"(BRiece $B$N3+H/pJs$r$^$H$a$F$$$^$9!#(B * $B3+H/%W%m%;%9(B ** $B%P%0$NJs9p(B $B%P%0$r8+IU$1$?$i0J2<$KEPO?$7$F$/$@$5$$!#(B https://savannah.nongnu.org/bugs/?group=riece ** $B%3!<%I$N9W8%(B $B%Q%C%A$+%"%I%*%s$r=q$$$?$iAw$C$F$/$@$5$$!#M-MQ$J$b$N$G$"$l$Pp(B $B$O4?7^$5$l$^$;$s!#(B (1) $B%b%8%e!<%k$N%A%'%C%/%"%&%H(B git clone git://git.sv.gnu.org/riece.git (2) configure $B%9%/%j%W%H$N@8@.(B autoreconf -f -i -v "autoreconf" $B$O(B "autoconf" $B$G$O$J$$$3$H$KCm0U$7$F$/$@$5$$!#(B * $BFbIt9=B$(B ** $B%b%8%e!<%k$N9=@.(B Riece $B$r9=@.$9$k(B elisp $B%b%8%e!<%k$r0J2<$KNs5s$7$^$9!#0MB84X78$N>e0L$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 riece-9.0.0/doc/mdate-sh0000755000076400007640000001371711761025270011747 00000000000000#!/bin/sh # Get modification time of a file or directory and pretty-print it. scriptversion=2010-08-21.06; # UTC # Copyright (C) 1995, 1996, 1997, 2003, 2004, 2005, 2007, 2009, 2010 # Free Software Foundation, Inc. # written by Ulrich Drepper , June 1995 # # 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 this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # This file is maintained in Automake, please report # bugs to or send patches to # . if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST fi case $1 in '') echo "$0: No file. Try \`$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: mdate-sh [--help] [--version] FILE Pretty-print the modification day of FILE, in the format: 1 January 1970 Report bugs to . EOF exit $? ;; -v | --v*) echo "mdate-sh $scriptversion" exit $? ;; esac error () { echo "$0: $1" >&2 exit 1 } # Prevent date giving response in another language. LANG=C export LANG LC_ALL=C export LC_ALL LC_TIME=C export LC_TIME # GNU ls changes its time format in response to the TIME_STYLE # variable. Since we cannot assume `unset' works, revert this # variable to its documented default. if test "${TIME_STYLE+set}" = set; then TIME_STYLE=posix-long-iso export TIME_STYLE fi save_arg1=$1 # Find out how to get the extended ls output of a file or directory. if ls -L /dev/null 1>/dev/null 2>&1; then ls_command='ls -L -l -d' else ls_command='ls -l -d' fi # Avoid user/group names that might have spaces, when possible. if ls -n /dev/null 1>/dev/null 2>&1; then ls_command="$ls_command -n" fi # A `ls -l' line looks as follows on OS/2. # drwxrwx--- 0 Aug 11 2001 foo # This differs from Unix, which adds ownership information. # drwxrwx--- 2 root root 4096 Aug 11 2001 foo # # To find the date, we split the line on spaces and iterate on words # until we find a month. This cannot work with files whose owner is a # user named `Jan', or `Feb', etc. However, it's unlikely that `/' # will be owned by a user whose name is a month. So we first look at # the extended ls output of the root directory to decide how many # words should be skipped to get the date. # On HPUX /bin/sh, "set" interprets "-rw-r--r--" as options, so the "x" below. set x`$ls_command /` # Find which argument is the month. month= command= until test $month do test $# -gt 0 || error "failed parsing \`$ls_command /' output" shift # Add another shift to the command. command="$command shift;" case $1 in Jan) month=January; nummonth=1;; Feb) month=February; nummonth=2;; Mar) month=March; nummonth=3;; Apr) month=April; nummonth=4;; May) month=May; nummonth=5;; Jun) month=June; nummonth=6;; Jul) month=July; nummonth=7;; Aug) month=August; nummonth=8;; Sep) month=September; nummonth=9;; Oct) month=October; nummonth=10;; Nov) month=November; nummonth=11;; Dec) month=December; nummonth=12;; esac done test -n "$month" || error "failed parsing \`$ls_command /' output" # Get the extended ls output of the file or directory. set dummy x`eval "$ls_command \"\\\$save_arg1\""` # Remove all preceding arguments eval $command # Because of the dummy argument above, month is in $2. # # On a POSIX system, we should have # # $# = 5 # $1 = file size # $2 = month # $3 = day # $4 = year or time # $5 = filename # # On Darwin 7.7.0 and 7.6.0, we have # # $# = 4 # $1 = day # $2 = month # $3 = year or time # $4 = filename # Get the month. case $2 in Jan) month=January; nummonth=1;; Feb) month=February; nummonth=2;; Mar) month=March; nummonth=3;; Apr) month=April; nummonth=4;; May) month=May; nummonth=5;; Jun) month=June; nummonth=6;; Jul) month=July; nummonth=7;; Aug) month=August; nummonth=8;; Sep) month=September; nummonth=9;; Oct) month=October; nummonth=10;; Nov) month=November; nummonth=11;; Dec) month=December; nummonth=12;; esac case $3 in ???*) day=$1;; *) day=$3; shift;; esac # Here we have to deal with the problem that the ls output gives either # the time of day or the year. case $3 in *:*) set `date`; eval year=\$$# case $2 in Jan) nummonthtod=1;; Feb) nummonthtod=2;; Mar) nummonthtod=3;; Apr) nummonthtod=4;; May) nummonthtod=5;; Jun) nummonthtod=6;; Jul) nummonthtod=7;; Aug) nummonthtod=8;; Sep) nummonthtod=9;; Oct) nummonthtod=10;; Nov) nummonthtod=11;; Dec) nummonthtod=12;; esac # For the first six month of the year the time notation can also # be used for files modified in the last year. if (expr $nummonth \> $nummonthtod) > /dev/null; then year=`expr $year - 1` fi;; *) year=$3;; esac # The result. echo $day $month $year # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: riece-9.0.0/doc/infohack.el0000664000076400007640000001421311501626052012412 00000000000000;;; 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" (car command-line-args-left))) (setq command-line-args-left (cdr command-line-args-left)) (defun infohack-remove-unsupported () (goto-char (point-min)) (while (re-search-forward "@\\(end \\)?ifnottex" nil t) (replace-match "")) (goto-char (point-min)) (while (search-forward "\n@iflatex\n" nil t) (delete-region (1+ (match-beginning 0)) (search-forward "\n@end iflatex\n")))) (defun infohack (file) (let ((dest-directory default-directory) (max-lisp-eval-depth (max max-lisp-eval-depth 600)) coding-system) (find-file file) (setq buffer-read-only nil) (setq coding-system (if (boundp 'buffer-file-coding-system) buffer-file-coding-system file-coding-system)) (infohack-remove-unsupported) (texinfo-every-node-update) (texinfo-format-buffer t) ;; Don't save any file. (setq default-directory dest-directory) (setq buffer-file-name (expand-file-name (file-name-nondirectory buffer-file-name) default-directory)) (setq buffer-file-coding-system coding-system file-coding-system coding-system) (if (> (buffer-size) 100000) (Info-split)) (save-buffer))) (eval-and-compile (when (string-match "windows-nt\\|os/2\\|emx\\|cygwin" (symbol-name system-type)) (defun subst-char-in-region (START END FROMCHAR TOCHAR &optional NOUNDO) "From START to END, replace FROMCHAR with TOCHAR each time it occurs. If optional arg NOUNDO is non-nil, don't record this change for undo and don't mark the buffer as really changed. Both characters must have the same length of multi-byte form." (let ((original-buffer-undo-list buffer-undo-list) (modified (buffer-modified-p))) (if NOUNDO (setq buffer-undo-list t)) (goto-char START) (let ((from (char-to-string FROMCHAR)) (to (char-to-string TOCHAR))) (while (search-forward from END t) (replace-match to t t))) (if NOUNDO (progn (setq buffer-undo-list original-buffer-undo-list) (set-buffer-modidifed-p modified))))))) (defun batch-makeinfo () "Emacs makeinfo in batch mode." (infohack-texi-format (car command-line-args-left) (car (cdr command-line-args-left))) (setq command-line-args-left nil)) (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 riece-9.0.0/doc/HACKING0000644000076400007640000003031211377612201011273 00000000000000-*- mode: text -*- This document is for Riece developers or those who are interested in becoming a developer. The main topics explained here are the development process and the internals. * Development process ** Reporting bugs If you find a bug, please file it at https://savannah.nongnu.org/bugs/?group=riece ** Contributing code If you write an add-on or a patch, send it to us. If it is useful, we may incorporate it into the development source code. ** Getting the development source code The development of Riece uses Git. The latest development version is available from git.sv.gnu.org. NOTE: If you are a beginning user, who just wants to try the "newer" version, stick on the latest released version. Pointless complaints about development versions are unwelcome to us. The instructions to obtain and build the source from Git are below. (1) checkout modules git clone git://git.sv.gnu.org/riece.git (2) generate configure script autoreconf -f -i -v Note that "autoreconf" is not "autoconf". * 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. riece-9.0.0/doc/texinfo.tex0000644000076400007640000115375111761025270012521 00000000000000% texinfo.tex -- TeX macros to handle Texinfo files. % % Load plain if necessary, i.e., if running under initex. \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi % \def\texinfoversion{2012-01-03.09} % % Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995, % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, % 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. % % This texinfo.tex file is free software: you can redistribute it and/or % modify it under the terms of the GNU General Public License as % published by the Free Software Foundation, either version 3 of the % License, or (at your option) any later version. % % This texinfo.tex file is distributed in the hope that it will be % useful, but WITHOUT ANY WARRANTY; without even the implied warranty % of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU % General Public License for more details. % % You should have received a copy of the GNU General Public License % along with this program. If not, see . % % As a special exception, when this file is read by TeX when processing % a Texinfo source document, you may use the result without % restriction. (This has been our intent since Texinfo was invented.) % % Please try the latest version of texinfo.tex before submitting bug % reports; you can get the latest version from: % http://www.gnu.org/software/texinfo/ (the Texinfo home page), or % ftp://tug.org/tex/texinfo.tex % (and all CTAN mirrors, see http://www.ctan.org). % The texinfo.tex in any given distribution could well be out % of date, so if that's what you're using, please check. % % Send bug reports to bug-texinfo@gnu.org. Please include including a % complete document in each bug report with which we can reproduce the % problem. Patches are, of course, greatly appreciated. % % To process a Texinfo manual with TeX, it's most reliable to use the % texi2dvi shell script that comes with the distribution. For a simple % manual foo.texi, however, you can get away with this: % tex foo.texi % texindex foo.?? % tex foo.texi % tex foo.texi % dvips foo.dvi -o # or whatever; this makes foo.ps. % The extra TeX runs get the cross-reference information correct. % Sometimes one run after texindex suffices, and sometimes you need more % than two; texi2dvi does it as many times as necessary. % % It is possible to adapt texinfo.tex for other languages, to some % extent. You can get the existing language-specific files from the % full Texinfo distribution. % % The GNU Texinfo home page is http://www.gnu.org/software/texinfo. \message{Loading texinfo [version \texinfoversion]:} % If in a .fmt file, print the version number % and turn on active characters that we couldn't do earlier because % they might have appeared in the input file name. \everyjob{\message{[Texinfo version \texinfoversion]}% \catcode`+=\active \catcode`\_=\active} \chardef\other=12 % We never want plain's \outer definition of \+ in Texinfo. % For @tex, we can use \tabalign. \let\+ = \relax % Save some plain tex macros whose names we will redefine. \let\ptexb=\b \let\ptexbullet=\bullet \let\ptexc=\c \let\ptexcomma=\, \let\ptexdot=\. \let\ptexdots=\dots \let\ptexend=\end \let\ptexequiv=\equiv \let\ptexexclam=\! \let\ptexfootnote=\footnote \let\ptexgtr=> \let\ptexhat=^ \let\ptexi=\i \let\ptexindent=\indent \let\ptexinsert=\insert \let\ptexlbrace=\{ \let\ptexless=< \let\ptexnewwrite\newwrite \let\ptexnoindent=\noindent \let\ptexplus=+ \let\ptexraggedright=\raggedright \let\ptexrbrace=\} \let\ptexslash=\/ \let\ptexstar=\* \let\ptext=\t \let\ptextop=\top {\catcode`\'=\active \global\let\ptexquoteright'}% active in plain's math mode % 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\putworderror\undefined \gdef\putworderror{error}\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 % Since the category of space is not known, we have to be careful. \chardef\spacecat = 10 \def\spaceisspace{\catcode`\ =\spacecat} % sometimes characters are active, so we need control sequences. \chardef\ampChar = `\& \chardef\colonChar = `\: \chardef\commaChar = `\, \chardef\dashChar = `\- \chardef\dotChar = `\. \chardef\exclamChar= `\! \chardef\hashChar = `\# \chardef\lquoteChar= `\` \chardef\questChar = `\? \chardef\rquoteChar= `\' \chardef\semiChar = `\; \chardef\slashChar = `\/ \chardef\underChar = `\_ % 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 } % 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\thisisundefined\else % etex gives us more logging \tracingscantokens1 \tracingifs1 \tracinggroups1 \tracingnesting2 \tracingassigns1 \fi \tracingcommands3 % 3 gives us more in etex \errorcontextlines16 }% % @errormsg{MSG}. Do the index-like expansions on MSG, but if things % aren't perfect, it's not the end of the world, being an error message, % after all. % \def\errormsg{\begingroup \indexnofonts \doerrormsg} \def\doerrormsg#1{\errmessage{#1}} % 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} % 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 % Output a mark which sets \thischapter, \thissection and \thiscolor. % We dump everything together because we only have one kind of mark. % This works because we only use \botmark / \topmark, not \firstmark. % % A mark contains a subexpression of the \ifcase ... \fi construct. % \get*marks macros below extract the needed part using \ifcase. % % Another complication is to let the user choose whether \thischapter % (\thissection) refers to the chapter (section) in effect at the top % of a page, or that at the bottom of a page. The solution is % described on page 260 of The TeXbook. It involves outputting two % marks for the sectioning macros, one before the section break, and % one after. I won't pretend I can describe this better than DEK... \def\domark{% \toks0=\expandafter{\lastchapterdefs}% \toks2=\expandafter{\lastsectiondefs}% \toks4=\expandafter{\prevchapterdefs}% \toks6=\expandafter{\prevsectiondefs}% \toks8=\expandafter{\lastcolordefs}% \mark{% \the\toks0 \the\toks2 \noexpand\or \the\toks4 \the\toks6 \noexpand\else \the\toks8 }% } % \topmark doesn't work for the very first chapter (after the title % page or the contents), so we use \firstmark there -- this gets us % the mark with the chapter defs, unless the user sneaks in, e.g., % @setcolor (or @url, or @link, etc.) between @contents and the very % first @chapter. \def\gettopheadingmarks{% \ifcase0\topmark\fi \ifx\thischapter\empty \ifcase0\firstmark\fi \fi } \def\getbottomheadingmarks{\ifcase1\botmark\fi} \def\getcolormarks{\ifcase2\topmark\fi} % Avoid "undefined control sequence" errors. \def\lastchapterdefs{} \def\lastsectiondefs{} \def\prevchapterdefs{} \def\prevsectiondefs{} \def\lastcolordefs{} % 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). \ifodd\pageno \getoddheadingmarks \else \getevenheadingmarks \fi \setbox\headlinebox = \vbox{\let\hsize=\pagewidth \makeheadline}% \ifodd\pageno \getoddfootingmarks \else \getevenfootingmarks \fi \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. \normalturnoffactive % \ in index entries must not stay \, e.g., if % the page break happens to be in the middle of an example. % We don't want .vr (or whatever) entries like this: % \entry{{\tt \indexbackslash }acronym}{32}{\code {\acronym}} % "\acronym" won't work when it's read back in; % it needs to be % {\code {{\tt \backslashcurfont }acronym} \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 \oddfootingyyy.) % The \baselineskip=24pt in plain's \makefootline has no effect. \vskip 24pt \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\relax \unvbox#1\relax \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\argtorun{#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 occurrence 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 % Do not use \next, perhaps the caller of \parsearg uses it; 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 \argtorun. % (Similarly, 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\argtorun\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 environments; they don't open a group. (The % implementation of @end takes care not to call \endgroup in this % special case.) % At run-time, 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 } % Environment mismatch, #1 expected: \def\badenverr{% \errhelp = \EMsimple \errmessage{This command can appear only \inenvironment\temp, not \inenvironment\thisenv}% } \def\inenvironment#1{% \ifx#1\empty outside 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. \expandafter\checkenv\csname#1\endcsname \csname E#1\endcsname \endgroup \fi } \newhelp\EMsimple{Press RETURN to continue.} % 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 \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'. Not documented, written for gawk manual. % \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 } % @| 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). This command % is not documented, not supported, and doesn't work. % \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 }% }% } % @include FILE -- \input text of FILE. % \def\include{\parseargusing\filenamecatcodes\includezzz} \def\includezzz#1{% \pushthisfilestack \def\thisfile{#1}% {% \makevalueexpandable % we want to expand any @value in FILE. \turnoffactive % and allow special characters in the expansion \indexnofonts % Allow `@@' and other weird things in file names. \wlog{texinfo.tex: doing @include of #1^^J}% \edef\temp{\noexpand\input #1 }% % % This trickery is to read FILE outside of a group, in case it makes % definitions, etc. \expandafter }\temp \popthisfilestack } \def\filenamecatcodes{% \catcode`\\=\other \catcode`~=\other \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 = {}% } % @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 being undefined. \ifx\pdfoutput\thisisundefined \else \ifx\pdfoutput\relax \else \ifcase\pdfoutput \else \pdftrue \fi \fi \fi % PDF uses PostScript string constants for the names of xref targets, % 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. % % See 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 what we do. pdftex 1.30.0 (ca.2005) introduced a primitive to % do this reliably, so we use it. % #1 is a control sequence in which to do the replacements, % which we \xdef. \def\txiescapepdf#1{% \ifx\pdfescapestring\relax % No primitive available; should we give a warning or log? % Many times it won't matter. \else % The expandable \pdfescapestring primitive escapes parentheses, % backslashes, and other special chars. \xdef#1{\pdfescapestring{#1}}% \fi } \newhelp\nopdfimagehelp{Texinfo supports .png, .jpg, .jpeg, and .pdf images with PDF output, and none of those formats could be found. (.eps cannot be supported due to the design of the PDF format; use regular TeX (DVI output) for that.)} \ifpdf % % Color manipulation macros based on pdfcolor.tex, % except using rgb instead of cmyk; the latter is said to render as a % very dark gray on-screen and a very dark halftone in print, instead % of actual black. \def\rgbDarkRed{0.50 0.09 0.12} \def\rgbBlack{0 0 0} % % k sets the color for filling (usual text, etc.); % K sets the color for stroking (thin rules, e.g., normal _'s). \def\pdfsetcolor#1{\pdfliteral{#1 rg #1 RG}} % % Set color, and create a mark which defines \thiscolor accordingly, % so that \makeheadline knows which color to restore. \def\setcolor#1{% \xdef\lastcolordefs{\gdef\noexpand\thiscolor{#1}}% \domark \pdfsetcolor{#1}% } % \def\maincolor{\rgbBlack} \pdfsetcolor{\maincolor} \edef\thiscolor{\maincolor} \def\lastcolordefs{} % \def\makefootline{% \baselineskip24pt \line{\pdfsetcolor{\maincolor}\the\footline}% } % \def\makeheadline{% \vbox to 0pt{% \vskip-22.5pt \line{% \vbox to8.5pt{}% % Extract \thiscolor definition from the marks. \getcolormarks % Typeset the headline with \maincolor, then restore the color. \pdfsetcolor{\maincolor}\the\headline\pdfsetcolor{\thiscolor}% }% \vss }% \nointerlineskip } % % \pdfcatalog{/PageMode /UseOutlines} % % #1 is image name, #2 width (might be empty/whitespace), #3 height (ditto). \def\dopdfimage#1#2#3{% \def\imagewidth{#2}\setbox0 = \hbox{\ignorespaces #2}% \def\imageheight{#3}\setbox2 = \hbox{\ignorespaces #3}% % % pdftex (and the PDF format) support .pdf, .png, .jpg (among % others). Let's try in that order, PDF first since if % someone has a scalable image, presumably better to use that than a % bitmap. \let\pdfimgext=\empty \begingroup \openin 1 #1.pdf \ifeof 1 \openin 1 #1.PDF \ifeof 1 \openin 1 #1.png \ifeof 1 \openin 1 #1.jpg \ifeof 1 \openin 1 #1.jpeg \ifeof 1 \openin 1 #1.JPG \ifeof 1 \errhelp = \nopdfimagehelp \errmessage{Could not find image file #1 for pdf}% \else \gdef\pdfimgext{JPG}% \fi \else \gdef\pdfimgext{jpeg}% \fi \else \gdef\pdfimgext{jpg}% \fi \else \gdef\pdfimgext{png}% \fi \else \gdef\pdfimgext{PDF}% \fi \else \gdef\pdfimgext{pdf}% \fi \closein 1 \endgroup % % without \immediate, ancient 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 \ifdim \wd0 >0pt width \imagewidth \fi \ifdim \wd2 >0pt height \imageheight \fi \ifnum\pdftexversion<13 #1.\pdfimgext \else {#1.\pdfimgext}% \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. \indexnofonts \turnoffactive \makevalueexpandable \def\pdfdestname{#1}% \txiescapepdf\pdfdestname \safewhatsit{\pdfdest name{\pdfdestname} xyz}% }} % % used to mark target names; must be expandable. \def\pdfmkpgn#1{#1} % % by default, use a color that is dark enough to print on paper as % nearly black, but still distinguishable for online viewing. \def\urlcolor{\rgbDarkRed} \def\linkcolor{\rgbDarkRed} \def\endlink{\setcolor{\maincolor}\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. \edef\pdfoutlinedest{#3}% \ifx\pdfoutlinedest\empty \def\pdfoutlinedest{#4}% \else \txiescapepdf\pdfoutlinedest \fi % % Also escape PDF chars in the display string. \edef\pdfoutlinetext{#1}% \txiescapepdf\pdfoutlinetext % \pdfoutline goto name{\pdfmkpgn{\pdfoutlinedest}}#2{\pdfoutlinetext}% } % \def\pdfmakeoutlines{% \begingroup % Read toc silently, to get counts of subentries for \pdfoutline. \def\partentry##1##2##3##4{}% ignore parts in the outlines \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. % % TODO this right, we have to translate 8-bit characters to % their "best" equivalent, based on the @documentencoding. Too % much work for too little return. Just use the ASCII equivalents % we use for the index sort strings. % \indexnofonts \setupdatafile % We can have normal brace characters in the PDF outlines, unlike % Texinfo index files. So set that up. \def\{{\lbracecharliteral}% \def\}{\rbracecharliteral}% \catcode`\\=\active \otherbackslash \input \tocreadfilename \endgroup } {\catcode`[=1 \catcode`]=2 \catcode`{=\other \catcode`}=\other \gdef\lbracecharliteral[{]% \gdef\rbracecharliteral[}]% ] % \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 % make a live url in pdf output. \def\pdfurl#1{% \begingroup % it seems we really need yet another set of dummies; have not % tried to figure out what each command should do in the context % of @url. for now, just make @/ a no-op, that's the only one % people have actually reported a problem with. % \normalturnoffactive \def\@{@}% \let\/=\empty \makevalueexpandable % do we want to go so far as to use \indexnofonts instead of just % special-casing \var here? \def\var##1{##1}% % \leavevmode\setcolor{\urlcolor}% \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}} \setcolor{\linkcolor}#1\endlink} \def\done{\edef\st{\global\noexpand\toksA={\the\toksB}}\st} \else % non-pdf mode \let\pdfmkdest = \gobble \let\pdfurl = \gobble \let\endlink = \relax \let\setcolor = \gobble \let\pdfsetcolor = \gobble \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}} % Unfortunately, we have to override this for titles and the like, since % in those cases "rm" is bold. Sigh. \def\rmisbold{\rm\def\curfontstyle{bf}} % 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} % % can get a sort of poor man's double spacing by redefining this. \def\baselinefactor{1} % \def\setleading#1{% \dimen0 = #1\relax \normalbaselineskip = \baselinefactor\dimen0 \normallineskip = \lineskipfactor\normalbaselineskip \normalbaselines \setbox\strutbox =\hbox{% \vrule width0pt height\strutheightpercent\baselineskip depth \strutdepthpercent \baselineskip }% } % PDF CMaps. See also LaTeX's t1.cmap. % % do nothing with this by default. \expandafter\let\csname cmapOT1\endcsname\gobble \expandafter\let\csname cmapOT1IT\endcsname\gobble \expandafter\let\csname cmapOT1TT\endcsname\gobble % if we are producing pdf, and we have \pdffontattr, then define cmaps. % (\pdffontattr was introduced many years ago, but people still run % older pdftex's; it's easy to conditionalize, so we do.) \ifpdf \ifx\pdffontattr\thisisundefined \else \begingroup \catcode`\^^M=\active \def^^M{^^J}% Output line endings as the ^^J char. \catcode`\%=12 \immediate\pdfobj stream {%!PS-Adobe-3.0 Resource-CMap %%DocumentNeededResources: ProcSet (CIDInit) %%IncludeResource: ProcSet (CIDInit) %%BeginResource: CMap (TeX-OT1-0) %%Title: (TeX-OT1-0 TeX OT1 0) %%Version: 1.000 %%EndComments /CIDInit /ProcSet findresource begin 12 dict begin begincmap /CIDSystemInfo << /Registry (TeX) /Ordering (OT1) /Supplement 0 >> def /CMapName /TeX-OT1-0 def /CMapType 2 def 1 begincodespacerange <00> <7F> endcodespacerange 8 beginbfrange <00> <01> <0393> <09> <0A> <03A8> <23> <26> <0023> <28> <3B> <0028> <3F> <5B> <003F> <5D> <5E> <005D> <61> <7A> <0061> <7B> <7C> <2013> endbfrange 40 beginbfchar <02> <0398> <03> <039B> <04> <039E> <05> <03A0> <06> <03A3> <07> <03D2> <08> <03A6> <0B> <00660066> <0C> <00660069> <0D> <0066006C> <0E> <006600660069> <0F> <00660066006C> <10> <0131> <11> <0237> <12> <0060> <13> <00B4> <14> <02C7> <15> <02D8> <16> <00AF> <17> <02DA> <18> <00B8> <19> <00DF> <1A> <00E6> <1B> <0153> <1C> <00F8> <1D> <00C6> <1E> <0152> <1F> <00D8> <21> <0021> <22> <201D> <27> <2019> <3C> <00A1> <3D> <003D> <3E> <00BF> <5C> <201C> <5F> <02D9> <60> <2018> <7D> <02DD> <7E> <007E> <7F> <00A8> endbfchar endcmap CMapName currentdict /CMap defineresource pop end end %%EndResource %%EOF }\endgroup \expandafter\edef\csname cmapOT1\endcsname#1{% \pdffontattr#1{/ToUnicode \the\pdflastobj\space 0 R}% }% % % \cmapOT1IT \begingroup \catcode`\^^M=\active \def^^M{^^J}% Output line endings as the ^^J char. \catcode`\%=12 \immediate\pdfobj stream {%!PS-Adobe-3.0 Resource-CMap %%DocumentNeededResources: ProcSet (CIDInit) %%IncludeResource: ProcSet (CIDInit) %%BeginResource: CMap (TeX-OT1IT-0) %%Title: (TeX-OT1IT-0 TeX OT1IT 0) %%Version: 1.000 %%EndComments /CIDInit /ProcSet findresource begin 12 dict begin begincmap /CIDSystemInfo << /Registry (TeX) /Ordering (OT1IT) /Supplement 0 >> def /CMapName /TeX-OT1IT-0 def /CMapType 2 def 1 begincodespacerange <00> <7F> endcodespacerange 8 beginbfrange <00> <01> <0393> <09> <0A> <03A8> <25> <26> <0025> <28> <3B> <0028> <3F> <5B> <003F> <5D> <5E> <005D> <61> <7A> <0061> <7B> <7C> <2013> endbfrange 42 beginbfchar <02> <0398> <03> <039B> <04> <039E> <05> <03A0> <06> <03A3> <07> <03D2> <08> <03A6> <0B> <00660066> <0C> <00660069> <0D> <0066006C> <0E> <006600660069> <0F> <00660066006C> <10> <0131> <11> <0237> <12> <0060> <13> <00B4> <14> <02C7> <15> <02D8> <16> <00AF> <17> <02DA> <18> <00B8> <19> <00DF> <1A> <00E6> <1B> <0153> <1C> <00F8> <1D> <00C6> <1E> <0152> <1F> <00D8> <21> <0021> <22> <201D> <23> <0023> <24> <00A3> <27> <2019> <3C> <00A1> <3D> <003D> <3E> <00BF> <5C> <201C> <5F> <02D9> <60> <2018> <7D> <02DD> <7E> <007E> <7F> <00A8> endbfchar endcmap CMapName currentdict /CMap defineresource pop end end %%EndResource %%EOF }\endgroup \expandafter\edef\csname cmapOT1IT\endcsname#1{% \pdffontattr#1{/ToUnicode \the\pdflastobj\space 0 R}% }% % % \cmapOT1TT \begingroup \catcode`\^^M=\active \def^^M{^^J}% Output line endings as the ^^J char. \catcode`\%=12 \immediate\pdfobj stream {%!PS-Adobe-3.0 Resource-CMap %%DocumentNeededResources: ProcSet (CIDInit) %%IncludeResource: ProcSet (CIDInit) %%BeginResource: CMap (TeX-OT1TT-0) %%Title: (TeX-OT1TT-0 TeX OT1TT 0) %%Version: 1.000 %%EndComments /CIDInit /ProcSet findresource begin 12 dict begin begincmap /CIDSystemInfo << /Registry (TeX) /Ordering (OT1TT) /Supplement 0 >> def /CMapName /TeX-OT1TT-0 def /CMapType 2 def 1 begincodespacerange <00> <7F> endcodespacerange 5 beginbfrange <00> <01> <0393> <09> <0A> <03A8> <21> <26> <0021> <28> <5F> <0028> <61> <7E> <0061> endbfrange 32 beginbfchar <02> <0398> <03> <039B> <04> <039E> <05> <03A0> <06> <03A3> <07> <03D2> <08> <03A6> <0B> <2191> <0C> <2193> <0D> <0027> <0E> <00A1> <0F> <00BF> <10> <0131> <11> <0237> <12> <0060> <13> <00B4> <14> <02C7> <15> <02D8> <16> <00AF> <17> <02DA> <18> <00B8> <19> <00DF> <1A> <00E6> <1B> <0153> <1C> <00F8> <1D> <00C6> <1E> <0152> <1F> <00D8> <20> <2423> <27> <2019> <60> <2018> <7F> <00A8> endbfchar endcmap CMapName currentdict /CMap defineresource pop end end %%EndResource %%EOF }\endgroup \expandafter\edef\csname cmapOT1TT\endcsname#1{% \pdffontattr#1{/ToUnicode \the\pdflastobj\space 0 R}% }% \fi\fi % 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, #5 is the CMap % encoding (currently only OT1, OT1IT and OT1TT are allowed, pass % empty to omit). \def\setfont#1#2#3#4#5{% \font#1=\fontprefix#2#3 scaled #4 \csname cmap#5\endcsname#1% } % This is what gets called when #5 of \setfont is empty. \let\cmap\gobble % emacs-page end of cmaps % Use cm as the default font prefix. % To specify the font prefix, you must define \fontprefix % before you read in texinfo.tex. \ifx\fontprefix\thisisundefined \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} % Definitions for a main text size of 11pt. This is the default in % Texinfo. % \def\definetextfontsizexi{% % Text fonts (11.2pt, magstep1). \def\textnominalsize{11pt} \edef\mainmagstep{\magstephalf} \setfont\textrm\rmshape{10}{\mainmagstep}{OT1} \setfont\texttt\ttshape{10}{\mainmagstep}{OT1TT} \setfont\textbf\bfshape{10}{\mainmagstep}{OT1} \setfont\textit\itshape{10}{\mainmagstep}{OT1IT} \setfont\textsl\slshape{10}{\mainmagstep}{OT1} \setfont\textsf\sfshape{10}{\mainmagstep}{OT1} \setfont\textsc\scshape{10}{\mainmagstep}{OT1} \setfont\textttsl\ttslshape{10}{\mainmagstep}{OT1TT} \font\texti=cmmi10 scaled \mainmagstep \font\textsy=cmsy10 scaled \mainmagstep \def\textecsize{1095} % A few fonts for @defun names and args. \setfont\defbf\bfshape{10}{\magstep1}{OT1} \setfont\deftt\ttshape{10}{\magstep1}{OT1TT} \setfont\defttsl\ttslshape{10}{\magstep1}{OT1TT} \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}{OT1} \setfont\smalltt\ttshape{9}{1000}{OT1TT} \setfont\smallbf\bfshape{10}{900}{OT1} \setfont\smallit\itshape{9}{1000}{OT1IT} \setfont\smallsl\slshape{9}{1000}{OT1} \setfont\smallsf\sfshape{9}{1000}{OT1} \setfont\smallsc\scshape{10}{900}{OT1} \setfont\smallttsl\ttslshape{10}{900}{OT1TT} \font\smalli=cmmi9 \font\smallsy=cmsy9 \def\smallecsize{0900} % Fonts for small examples (8pt). \def\smallernominalsize{8pt} \setfont\smallerrm\rmshape{8}{1000}{OT1} \setfont\smallertt\ttshape{8}{1000}{OT1TT} \setfont\smallerbf\bfshape{10}{800}{OT1} \setfont\smallerit\itshape{8}{1000}{OT1IT} \setfont\smallersl\slshape{8}{1000}{OT1} \setfont\smallersf\sfshape{8}{1000}{OT1} \setfont\smallersc\scshape{10}{800}{OT1} \setfont\smallerttsl\ttslshape{10}{800}{OT1TT} \font\smalleri=cmmi8 \font\smallersy=cmsy8 \def\smallerecsize{0800} % Fonts for title page (20.4pt): \def\titlenominalsize{20pt} \setfont\titlerm\rmbshape{12}{\magstep3}{OT1} \setfont\titleit\itbshape{10}{\magstep4}{OT1IT} \setfont\titlesl\slbshape{10}{\magstep4}{OT1} \setfont\titlett\ttbshape{12}{\magstep3}{OT1TT} \setfont\titlettsl\ttslshape{10}{\magstep4}{OT1TT} \setfont\titlesf\sfbshape{17}{\magstep1}{OT1} \let\titlebf=\titlerm \setfont\titlesc\scbshape{10}{\magstep4}{OT1} \font\titlei=cmmi12 scaled \magstep3 \font\titlesy=cmsy10 scaled \magstep4 \def\titleecsize{2074} % Chapter (and unnumbered) fonts (17.28pt). \def\chapnominalsize{17pt} \setfont\chaprm\rmbshape{12}{\magstep2}{OT1} \setfont\chapit\itbshape{10}{\magstep3}{OT1IT} \setfont\chapsl\slbshape{10}{\magstep3}{OT1} \setfont\chaptt\ttbshape{12}{\magstep2}{OT1TT} \setfont\chapttsl\ttslshape{10}{\magstep3}{OT1TT} \setfont\chapsf\sfbshape{17}{1000}{OT1} \let\chapbf=\chaprm \setfont\chapsc\scbshape{10}{\magstep3}{OT1} \font\chapi=cmmi12 scaled \magstep2 \font\chapsy=cmsy10 scaled \magstep3 \def\chapecsize{1728} % Section fonts (14.4pt). \def\secnominalsize{14pt} \setfont\secrm\rmbshape{12}{\magstep1}{OT1} \setfont\secit\itbshape{10}{\magstep2}{OT1IT} \setfont\secsl\slbshape{10}{\magstep2}{OT1} \setfont\sectt\ttbshape{12}{\magstep1}{OT1TT} \setfont\secttsl\ttslshape{10}{\magstep2}{OT1TT} \setfont\secsf\sfbshape{12}{\magstep1}{OT1} \let\secbf\secrm \setfont\secsc\scbshape{10}{\magstep2}{OT1} \font\seci=cmmi12 scaled \magstep1 \font\secsy=cmsy10 scaled \magstep2 \def\sececsize{1440} % Subsection fonts (13.15pt). \def\ssecnominalsize{13pt} \setfont\ssecrm\rmbshape{12}{\magstephalf}{OT1} \setfont\ssecit\itbshape{10}{1315}{OT1IT} \setfont\ssecsl\slbshape{10}{1315}{OT1} \setfont\ssectt\ttbshape{12}{\magstephalf}{OT1TT} \setfont\ssecttsl\ttslshape{10}{1315}{OT1TT} \setfont\ssecsf\sfbshape{12}{\magstephalf}{OT1} \let\ssecbf\ssecrm \setfont\ssecsc\scbshape{10}{1315}{OT1} \font\sseci=cmmi12 scaled \magstephalf \font\ssecsy=cmsy10 scaled 1315 \def\ssececsize{1200} % Reduced fonts for @acro in text (10pt). \def\reducednominalsize{10pt} \setfont\reducedrm\rmshape{10}{1000}{OT1} \setfont\reducedtt\ttshape{10}{1000}{OT1TT} \setfont\reducedbf\bfshape{10}{1000}{OT1} \setfont\reducedit\itshape{10}{1000}{OT1IT} \setfont\reducedsl\slshape{10}{1000}{OT1} \setfont\reducedsf\sfshape{10}{1000}{OT1} \setfont\reducedsc\scshape{10}{1000}{OT1} \setfont\reducedttsl\ttslshape{10}{1000}{OT1TT} \font\reducedi=cmmi10 \font\reducedsy=cmsy10 \def\reducedecsize{1000} \textleading = 13.2pt % line spacing for 11pt CM \textfonts % reset the current fonts \rm } % end of 11pt text font size definitions % Definitions to make the main text be 10pt Computer Modern, with % section, chapter, etc., sizes following suit. This is for the GNU % Press printing of the Emacs 22 manual. Maybe other manuals in the % future. Used with @smallbook, which sets the leading to 12pt. % \def\definetextfontsizex{% % Text fonts (10pt). \def\textnominalsize{10pt} \edef\mainmagstep{1000} \setfont\textrm\rmshape{10}{\mainmagstep}{OT1} \setfont\texttt\ttshape{10}{\mainmagstep}{OT1TT} \setfont\textbf\bfshape{10}{\mainmagstep}{OT1} \setfont\textit\itshape{10}{\mainmagstep}{OT1IT} \setfont\textsl\slshape{10}{\mainmagstep}{OT1} \setfont\textsf\sfshape{10}{\mainmagstep}{OT1} \setfont\textsc\scshape{10}{\mainmagstep}{OT1} \setfont\textttsl\ttslshape{10}{\mainmagstep}{OT1TT} \font\texti=cmmi10 scaled \mainmagstep \font\textsy=cmsy10 scaled \mainmagstep \def\textecsize{1000} % A few fonts for @defun names and args. \setfont\defbf\bfshape{10}{\magstephalf}{OT1} \setfont\deftt\ttshape{10}{\magstephalf}{OT1TT} \setfont\defttsl\ttslshape{10}{\magstephalf}{OT1TT} \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}{OT1} \setfont\smalltt\ttshape{9}{1000}{OT1TT} \setfont\smallbf\bfshape{10}{900}{OT1} \setfont\smallit\itshape{9}{1000}{OT1IT} \setfont\smallsl\slshape{9}{1000}{OT1} \setfont\smallsf\sfshape{9}{1000}{OT1} \setfont\smallsc\scshape{10}{900}{OT1} \setfont\smallttsl\ttslshape{10}{900}{OT1TT} \font\smalli=cmmi9 \font\smallsy=cmsy9 \def\smallecsize{0900} % Fonts for small examples (8pt). \def\smallernominalsize{8pt} \setfont\smallerrm\rmshape{8}{1000}{OT1} \setfont\smallertt\ttshape{8}{1000}{OT1TT} \setfont\smallerbf\bfshape{10}{800}{OT1} \setfont\smallerit\itshape{8}{1000}{OT1IT} \setfont\smallersl\slshape{8}{1000}{OT1} \setfont\smallersf\sfshape{8}{1000}{OT1} \setfont\smallersc\scshape{10}{800}{OT1} \setfont\smallerttsl\ttslshape{10}{800}{OT1TT} \font\smalleri=cmmi8 \font\smallersy=cmsy8 \def\smallerecsize{0800} % Fonts for title page (20.4pt): \def\titlenominalsize{20pt} \setfont\titlerm\rmbshape{12}{\magstep3}{OT1} \setfont\titleit\itbshape{10}{\magstep4}{OT1IT} \setfont\titlesl\slbshape{10}{\magstep4}{OT1} \setfont\titlett\ttbshape{12}{\magstep3}{OT1TT} \setfont\titlettsl\ttslshape{10}{\magstep4}{OT1TT} \setfont\titlesf\sfbshape{17}{\magstep1}{OT1} \let\titlebf=\titlerm \setfont\titlesc\scbshape{10}{\magstep4}{OT1} \font\titlei=cmmi12 scaled \magstep3 \font\titlesy=cmsy10 scaled \magstep4 \def\titleecsize{2074} % Chapter fonts (14.4pt). \def\chapnominalsize{14pt} \setfont\chaprm\rmbshape{12}{\magstep1}{OT1} \setfont\chapit\itbshape{10}{\magstep2}{OT1IT} \setfont\chapsl\slbshape{10}{\magstep2}{OT1} \setfont\chaptt\ttbshape{12}{\magstep1}{OT1TT} \setfont\chapttsl\ttslshape{10}{\magstep2}{OT1TT} \setfont\chapsf\sfbshape{12}{\magstep1}{OT1} \let\chapbf\chaprm \setfont\chapsc\scbshape{10}{\magstep2}{OT1} \font\chapi=cmmi12 scaled \magstep1 \font\chapsy=cmsy10 scaled \magstep2 \def\chapecsize{1440} % Section fonts (12pt). \def\secnominalsize{12pt} \setfont\secrm\rmbshape{12}{1000}{OT1} \setfont\secit\itbshape{10}{\magstep1}{OT1IT} \setfont\secsl\slbshape{10}{\magstep1}{OT1} \setfont\sectt\ttbshape{12}{1000}{OT1TT} \setfont\secttsl\ttslshape{10}{\magstep1}{OT1TT} \setfont\secsf\sfbshape{12}{1000}{OT1} \let\secbf\secrm \setfont\secsc\scbshape{10}{\magstep1}{OT1} \font\seci=cmmi12 \font\secsy=cmsy10 scaled \magstep1 \def\sececsize{1200} % Subsection fonts (10pt). \def\ssecnominalsize{10pt} \setfont\ssecrm\rmbshape{10}{1000}{OT1} \setfont\ssecit\itbshape{10}{1000}{OT1IT} \setfont\ssecsl\slbshape{10}{1000}{OT1} \setfont\ssectt\ttbshape{10}{1000}{OT1TT} \setfont\ssecttsl\ttslshape{10}{1000}{OT1TT} \setfont\ssecsf\sfbshape{10}{1000}{OT1} \let\ssecbf\ssecrm \setfont\ssecsc\scbshape{10}{1000}{OT1} \font\sseci=cmmi10 \font\ssecsy=cmsy10 \def\ssececsize{1000} % Reduced fonts for @acro in text (9pt). \def\reducednominalsize{9pt} \setfont\reducedrm\rmshape{9}{1000}{OT1} \setfont\reducedtt\ttshape{9}{1000}{OT1TT} \setfont\reducedbf\bfshape{10}{900}{OT1} \setfont\reducedit\itshape{9}{1000}{OT1IT} \setfont\reducedsl\slshape{9}{1000}{OT1} \setfont\reducedsf\sfshape{9}{1000}{OT1} \setfont\reducedsc\scshape{10}{900}{OT1} \setfont\reducedttsl\ttslshape{10}{900}{OT1TT} \font\reducedi=cmmi9 \font\reducedsy=cmsy9 \def\reducedecsize{0900} \divide\parskip by 2 % reduce space between paragraphs \textleading = 12pt % line spacing for 10pt CM \textfonts % reset the current fonts \rm } % end of 10pt text font size definitions % We provide the user-level command % @fonttextsize 10 % (or 11) to redefine the text font size. pt is assumed. % \def\xiword{11} \def\xword{10} \def\xwordpt{10pt} % \parseargdef\fonttextsize{% \def\textsizearg{#1}% %\wlog{doing @fonttextsize \textsizearg}% % % Set \globaldefs so that documents can use this inside @tex, since % makeinfo 4.8 does not support it, but we need it nonetheless. % \begingroup \globaldefs=1 \ifx\textsizearg\xword \definetextfontsizex \else \ifx\textsizearg\xiword \definetextfontsizexi \else \errhelp=\EMsimple \errmessage{@fonttextsize only supports `10' or `11', not `\textsizearg'} \fi\fi \endgroup } % 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{27pt}} \def\titlefont#1{{\titlefonts\rmisbold #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}} % Fonts for short table of contents. \setfont\shortcontrm\rmshape{12}{1000}{OT1} \setfont\shortcontbf\bfshape{10}{\magstep1}{OT1} % no cmb12 \setfont\shortcontsl\slshape{12}{1000}{OT1} \setfont\shortconttt\ttshape{12}{1000}{OT1TT} % Define these just so they can be easily changed for other fonts. \def\angleleft{$\langle$} \def\angleright{$\rangle$} % 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 % --karl, 24jan03. % Set up the default fonts, so we can use them for creating boxes. % \definetextfontsizexi \message{markup,} % 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 } % Markup style infrastructure. \defmarkupstylesetup\INITMACRO will % define and register \INITMACRO to be called on markup style changes. % \INITMACRO can check \currentmarkupstyle for the innermost % style and the set of \ifmarkupSTYLE switches for all styles % currently in effect. \newif\ifmarkupvar \newif\ifmarkupsamp \newif\ifmarkupkey %\newif\ifmarkupfile % @file == @samp. %\newif\ifmarkupoption % @option == @samp. \newif\ifmarkupcode \newif\ifmarkupkbd %\newif\ifmarkupenv % @env == @code. %\newif\ifmarkupcommand % @command == @code. \newif\ifmarkuptex % @tex (and part of @math, for now). \newif\ifmarkupexample \newif\ifmarkupverb \newif\ifmarkupverbatim \let\currentmarkupstyle\empty \def\setupmarkupstyle#1{% \csname markup#1true\endcsname \def\currentmarkupstyle{#1}% \markupstylesetup } \let\markupstylesetup\empty \def\defmarkupstylesetup#1{% \expandafter\def\expandafter\markupstylesetup \expandafter{\markupstylesetup #1}% \def#1% } % Markup style setup for left and right quotes. \defmarkupstylesetup\markupsetuplq{% \expandafter\let\expandafter \temp \csname markupsetuplq\currentmarkupstyle\endcsname \ifx\temp\relax \markupsetuplqdefault \else \temp \fi } \defmarkupstylesetup\markupsetuprq{% \expandafter\let\expandafter \temp \csname markupsetuprq\currentmarkupstyle\endcsname \ifx\temp\relax \markupsetuprqdefault \else \temp \fi } { \catcode`\'=\active \catcode`\`=\active \gdef\markupsetuplqdefault{\let`\lq} \gdef\markupsetuprqdefault{\let'\rq} \gdef\markupsetcodequoteleft{\let`\codequoteleft} \gdef\markupsetcodequoteright{\let'\codequoteright} \gdef\markupsetnoligaturesquoteleft{\let`\noligaturesquoteleft} } \let\markupsetuplqcode \markupsetcodequoteleft \let\markupsetuprqcode \markupsetcodequoteright % \let\markupsetuplqexample \markupsetcodequoteleft \let\markupsetuprqexample \markupsetcodequoteright % \let\markupsetuplqsamp \markupsetcodequoteleft \let\markupsetuprqsamp \markupsetcodequoteright % \let\markupsetuplqverb \markupsetcodequoteleft \let\markupsetuprqverb \markupsetcodequoteright % \let\markupsetuplqverbatim \markupsetcodequoteleft \let\markupsetuprqverbatim \markupsetcodequoteright \let\markupsetuplqkbd \markupsetnoligaturesquoteleft % Allow an option to not use regular directed right quote/apostrophe % (char 0x27), but instead the undirected quote from cmtt (char 0x0d). % The undirected quote is ugly, so don't make it the default, but it % works for pasting with more pdf viewers (at least evince), the % lilypond developers report. xpdf does work with the regular 0x27. % \def\codequoteright{% \expandafter\ifx\csname SETtxicodequoteundirected\endcsname\relax \expandafter\ifx\csname SETcodequoteundirected\endcsname\relax '% \else \char'15 \fi \else \char'15 \fi } % % and a similar option for the left quote char vs. a grave accent. % Modern fonts display ASCII 0x60 as a grave accent, so some people like % the code environments to do likewise. % \def\codequoteleft{% \expandafter\ifx\csname SETtxicodequotebacktick\endcsname\relax \expandafter\ifx\csname SETcodequotebacktick\endcsname\relax % [Knuth] pp. 380,381,391 % \relax disables Spanish ligatures ?` and !` of \tt font. \relax`% \else \char'22 \fi \else \char'22 \fi } % Commands to set the quote options. % \parseargdef\codequoteundirected{% \def\temp{#1}% \ifx\temp\onword \expandafter\let\csname SETtxicodequoteundirected\endcsname = t% \else\ifx\temp\offword \expandafter\let\csname SETtxicodequoteundirected\endcsname = \relax \else \errhelp = \EMsimple \errmessage{Unknown @codequoteundirected value `\temp', must be on|off}% \fi\fi } % \parseargdef\codequotebacktick{% \def\temp{#1}% \ifx\temp\onword \expandafter\let\csname SETtxicodequotebacktick\endcsname = t% \else\ifx\temp\offword \expandafter\let\csname SETtxicodequotebacktick\endcsname = \relax \else \errhelp = \EMsimple \errmessage{Unknown @codequotebacktick value `\temp', must be on|off}% \fi\fi } % [Knuth] pp. 380,381,391, disable Spanish ligatures ?` and !` of \tt font. \def\noligaturesquoteleft{\relax\lq} % Count depth in font-changes, for error checks \newcount\fontdepth \fontdepth=0 % Font commands. % #1 is the font command (\sl or \it), #2 is the text to slant. % If we are in a monospaced environment, however, 1) always use \ttsl, % and 2) do not add an italic correction. \def\dosmartslant#1#2{% \ifusingtt {{\ttsl #2}\let\next=\relax}% {\def\next{{#1#2}\futurelet\next\smartitaliccorrection}}% \next } \def\smartslanted{\dosmartslant\sl} \def\smartitalic{\dosmartslant\it} % Output an italic correction unless \next (presumed to be the following % character) is such as not to need one. \def\smartitaliccorrection{% \ifx\next,% \else\ifx\next-% \else\ifx\next.% \else\ptexslash \fi\fi\fi \aftersmartic } % like \smartslanted except unconditionally uses \ttsl, and no ic. % @var is set to this for defun arguments. \def\ttslanted#1{{\ttsl #1}} % @cite is like \smartslanted except unconditionally use \sl. We never want % ttsl for book titles, do we? \def\cite#1{{\sl #1}\futurelet\next\smartitaliccorrection} \def\aftersmartic{} \def\var#1{% \let\saveaftersmartic = \aftersmartic \def\aftersmartic{\null\let\aftersmartic=\saveaftersmartic}% \smartslanted{#1}% } \let\i=\smartitalic \let\slanted=\smartslanted \let\dfn=\smartslanted \let\emph=\smartitalic % 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 % @b, explicit bold. Also @strong. \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 % @t, explicit typewriter. \def\t#1{% {\tt \rawbackslash \plainfrenchspacing #1}% \null } % @samp. \def\samp#1{{\setupmarkupstyle{samp}\lq\tclose{#1}\rq\null}} % definition of @key that produces a lozenge. Doesn't adjust to text size. %\setfont\keyrm\rmshape{8}{1000}{OT1} %\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}}}} % definition of @key with no lozenge. If the current font is already % monospace, don't change it; that way, we respect @kbdinputstyle. But % if it isn't monospace, then use \tt. % \def\key#1{{\setupmarkupstyle{key}% \nohyphenation \ifmonospace\else\tt\fi #1}\null} % ctrl is no longer a Texinfo command. \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 % reset spacefactor to 1000 } % 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 \catcode`\'=\active \catcode`\`=\active \global\let'=\rq \global\let`=\lq % default definitions % \global\def\code{\begingroup \setupmarkupstyle{code}% % The following should really be moved into \setupmarkupstyle handlers. \catcode\dashChar=\active \catcode\underChar=\active \ifallowcodebreaks \let-\codedash \let_\codeunder \else \let-\realdash \let_\realunder \fi \codex } } \def\codex #1{\tclose{#1}\endgroup} \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{}{}{}}% {\_}% } % 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', must be true|false}% \fi\fi } % @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. % (This \urefnobreak definition isn't used now, leaving it for a while % for comparison.) \def\urefnobreak#1{\dourefnobreak #1,,,\finish} \def\dourefnobreak#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} % This \urefbreak definition is the active one. \def\urefbreak{\begingroup \urefcatcodes \dourefbreak} \let\uref=\urefbreak \def\dourefbreak#1{\urefbreakfinish #1,,,\finish} \def\urefbreakfinish#1,#2,#3,#4\finish{% doesn't work in @example \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\ (\urefcode{#1})% DVI: 2nd arg given, show both it and url \fi \else \urefcode{#1}% only url given, so show it \fi \fi \endlink \endgroup} % Allow line breaks around only a few characters (only). \def\urefcatcodes{% \catcode\ampChar=\active \catcode\dotChar=\active \catcode\hashChar=\active \catcode\questChar=\active \catcode\slashChar=\active } { \urefcatcodes % \global\def\urefcode{\begingroup \setupmarkupstyle{code}% \urefcatcodes \let&\urefcodeamp \let.\urefcodedot \let#\urefcodehash \let?\urefcodequest \let/\urefcodeslash \codex } % % By default, they are just regular characters. \global\def&{\normalamp} \global\def.{\normaldot} \global\def#{\normalhash} \global\def?{\normalquest} \global\def/{\normalslash} } % we put a little stretch before and after the breakable chars, to help % line breaking of long url's. The unequal skips make look better in % cmtt at least, especially for dots. \def\urefprestretch{\urefprebreak \hskip0pt plus.13em } \def\urefpoststretch{\urefpostbreak \hskip0pt plus.1em } % \def\urefcodeamp{\urefprestretch \&\urefpoststretch} \def\urefcodedot{\urefprestretch .\urefpoststretch} \def\urefcodehash{\urefprestretch \#\urefpoststretch} \def\urefcodequest{\urefprestretch ?\urefpoststretch} \def\urefcodeslash{\futurelet\next\urefcodeslashfinish} { \catcode`\/=\active \global\def\urefcodeslashfinish{% \urefprestretch \slashChar % Allow line break only after the final / in a sequence of % slashes, to avoid line break between the slashes in http://. \ifx\next/\else \urefpoststretch \fi } } % One more complication: by default we'll break after the special % characters, but some people like to break before the special chars, so % allow that. Also allow no breaking at all, for manual control. % \parseargdef\urefbreakstyle{% \def\txiarg{#1}% \ifx\txiarg\wordnone \def\urefprebreak{\nobreak}\def\urefpostbreak{\nobreak} \else\ifx\txiarg\wordbefore \def\urefprebreak{\allowbreak}\def\urefpostbreak{\nobreak} \else\ifx\txiarg\wordafter \def\urefprebreak{\nobreak}\def\urefpostbreak{\allowbreak} \else \errhelp = \EMsimple \errmessage{Unknown @urefbreakstyle setting `\txiarg'}% \fi\fi\fi } \def\wordafter{after} \def\wordbefore{before} \def\wordnone{none} \urefbreakstyle after % @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 % @kbd is like @code, except that if the argument is just one @key command, % then @kbd has no effect. \def\kbd#1{{\setupmarkupstyle{kbd}\def\look{#1}\expandafter\kbdfoo\look??\par}} % @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 setting `\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\setupmarkupstyle{kbd}\look}}\fi \else{\tclose{\kbdfont\setupmarkupstyle{kbd}\look}}\fi} % For @indicateurl, @env, @command quotes seem unnecessary, so use \code. \let\indicateurl=\code \let\env=\code \let\command=\code % @clicksequence{File @click{} Open ...} \def\clicksequence#1{\begingroup #1\endgroup} % @clickstyle @arrow (by default) \parseargdef\clickstyle{\def\click{#1}} \def\click{\arrow} % 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} % @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} % @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 \null % reset \spacefactor=1000 } % @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 \null % reset \spacefactor=1000 } % @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`\_ = \active \gdef\mathunderscore{% \catcode`\_=\active \def_{\ifnum\fam=\slfam \_\else\sb\fi}% } } % Another complication: we want \\ (and @\) to output a math (or tt) \. % FYI, plain.tex uses \\ as a temporary control sequence (for no % particular reason), but this is not advertised and we don't care. % % 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 % make the texinfo accent commands work in math mode \let\"=\ddot \let\'=\acute \let\==\bar \let\^=\hat \let\`=\grave \let\u=\breve \let\v=\check \let\~=\tilde \let\dotaccent=\dot $\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 \catcode`' = \active \gdef\mathactive{% \let^ = \ptexhat \let< = \ptexless \let> = \ptexgtr \let+ = \ptexplus \let' = \ptexquoteright } } % @inlinefmt{FMTNAME,PROCESSED-TEXT} and @inlineraw{FMTNAME,RAW-TEXT}. % Ignore unless FMTNAME == tex; then it is like @iftex and @tex, % except specified as a normal braced arg, so no newlines to worry about. % \def\outfmtnametex{tex} % \def\inlinefmt#1{\doinlinefmt #1,\finish} \def\doinlinefmt#1,#2,\finish{% \def\inlinefmtname{#1}% \ifx\inlinefmtname\outfmtnametex \ignorespaces #2\fi } % For raw, must switch into @tex before parsing the argument, to avoid % setting catcodes prematurely. Doing it this way means that, for % example, @inlineraw{html, foo{bar} gets a parse error instead of being % ignored. But this isn't important because if people want a literal % *right* brace they would have to use a command anyway, so they may as % well use a command to get a left brace too. We could re-use the % delimiter character idea from \verb, but it seems like overkill. % \def\inlineraw{\tex \doinlineraw} \def\doinlineraw#1{\doinlinerawtwo #1,\finish} \def\doinlinerawtwo#1,#2,\finish{% \def\inlinerawname{#1}% \ifx\inlinerawname\outfmtnametex \ignorespaces #2\fi \endgroup % close group opened by \tex. } \message{glyphs,} % and logos. % @@ prints an @, as does @atchar{}. \def\@{\char64 } \let\atchar=\@ % @{ @} @lbracechar{} @rbracechar{} all generate brace characters. % Unless we're in typewriter, use \ecfont because the CM text fonts do % not have braces, and we don't want to switch into math. \def\mylbrace{{\ifmonospace\else\ecfont\fi \char123}} \def\myrbrace{{\ifmonospace\else\ecfont\fi \char125}} \let\{=\mylbrace \let\lbracechar=\{ \let\}=\myrbrace \let\rbracechar=\} \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\, = \ptexc \let\dotaccent = \ptexdot \def\ringaccent#1{{\accent23 #1}} \let\tieaccent = \ptext \let\ubaraccent = \ptexb \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 \ifmmode\imath \else\ptexi \fi \else\ifx\temp\jmacro \ifmmode\jmath \else\j \fi \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{% \ifx\textnominalsize\xwordpt % for 10pt running text, \lllsize (8pt) is too small for the A in LaTeX. % Revert to plain's \scriptsize, which is 7pt. \count255=\the\fam $\fam\count255 \scriptstyle A$% \else % For 11pt, we can use our lllsize. \selectfonts\lllsize A% \fi }% \vss }}% \kern-.15em \TeX } % Some math mode symbols. \def\bullet{$\ptexbullet$} \def\geq{\ifmmode \ge\else $\ge$\fi} \def\leq{\ifmmode \le\else $\le$\fi} \def\minus{\ifmmode -\else $-$\fi} % @dots{} outputs an ellipsis using the current font. % We do .5em per period so that it has the same spacing in the cm % typewriter fonts as three actual period characters; on the other hand, % in other typewriter fonts three periods are wider than 1.5em. So do % whichever is larger. % \def\dots{% \leavevmode \setbox0=\hbox{...}% get width of three periods \ifdim\wd0 > 1.5em \dimen0 = \wd0 \else \dimen0 = 1.5em \fi \hbox to \dimen0{% \hskip 0pt plus.25fil .\hskip 0pt plus1fil .\hskip 0pt plus1fil .\hskip 0pt plus.5fil }% } % @enddots{} is an end-of-sentence ellipsis. % \def\enddots{% \dots \spacefactor=\endofsentencespacefactor } % @point{}, @result{}, @expansion{}, @print{}, @equiv{}. % % Since these characters are used in examples, they should be an even number of % \tt widths. Each \tt character is 1en, so two makes it 1em. % \def\point{$\star$} \def\arrow{\leavevmode\raise.05ex\hbox to 1em{\hfil$\rightarrow$\hfil}} \def\result{\leavevmode\raise.05ex\hbox to 1em{\hfil$\Rightarrow$\hfil}} \def\expansion{\leavevmode\hbox to 1em{\hfil$\mapsto$\hfil}} \def\print{\leavevmode\lower.1ex\hbox to 1em{\hfil$\dashv$\hfil}} \def\equiv{\leavevmode\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 \reducedsf \putworderror\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} % @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 } % Glyphs from the EC fonts. We don't use \let for the aliases, because % sometimes we redefine the original macro, and the alias should reflect % the redefinition. % % Use LaTeX names for the Icelandic letters. \def\DH{{\ecfont \char"D0}} % Eth \def\dh{{\ecfont \char"F0}} % eth \def\TH{{\ecfont \char"DE}} % Thorn \def\th{{\ecfont \char"FE}} % thorn % \def\guillemetleft{{\ecfont \char"13}} \def\guillemotleft{\guillemetleft} \def\guillemetright{{\ecfont \char"14}} \def\guillemotright{\guillemetright} \def\guilsinglleft{{\ecfont \char"0E}} \def\guilsinglright{{\ecfont \char"0F}} \def\quotedblbase{{\ecfont \char"12}} \def\quotesinglbase{{\ecfont \char"0D}} % % This positioning is not perfect (see the ogonek LaTeX package), but % we have the precomposed glyphs for the most common cases. We put the % tests to use those glyphs in the single \ogonek macro so we have fewer % dummy definitions to worry about for index entries, etc. % % ogonek is also used with other letters in Lithuanian (IOU), but using % the precomposed glyphs for those is not so easy since they aren't in % the same EC font. \def\ogonek#1{{% \def\temp{#1}% \ifx\temp\macrocharA\Aogonek \else\ifx\temp\macrochara\aogonek \else\ifx\temp\macrocharE\Eogonek \else\ifx\temp\macrochare\eogonek \else \ecfont \setbox0=\hbox{#1}% \ifdim\ht0=1ex\accent"0C #1% \else\ooalign{\unhbox0\crcr\hidewidth\char"0C \hidewidth}% \fi \fi\fi\fi\fi }% } \def\Aogonek{{\ecfont \char"81}}\def\macrocharA{A} \def\aogonek{{\ecfont \char"A1}}\def\macrochara{a} \def\Eogonek{{\ecfont \char"86}}\def\macrocharE{E} \def\eogonek{{\ecfont \char"A6}}\def\macrochare{e} % % Use the ec* fonts (cm-super in outline format) for non-CM glyphs. \def\ecfont{% % We can't distinguish serif/sans and italic/slanted, but this % is used for crude hacks anyway (like adding French and German % quotes to documents typeset with CM, where we lose kerning), so % hopefully nobody will notice/care. \edef\ecsize{\csname\curfontsize ecsize\endcsname}% \edef\nominalsize{\csname\curfontsize nominalsize\endcsname}% \ifx\curfontstyle\bfstylename % bold: \font\thisecfont = ecb\ifusingit{i}{x}\ecsize \space at \nominalsize \else % regular: \font\thisecfont = ec\ifusingit{ti}{rm}\ecsize \space at \nominalsize \fi \thisecfont } % @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}}% }$% } % @textdegree - the normal degrees sign. % \def\textdegree{$^\circ$} % 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\thisisundefined \def\Orb{\mathhexbox20D} \fi % Quotes. \chardef\quotedblleft="5C \chardef\quotedblright=`\" \chardef\quoteleft=`\` \chardef\quoteright=`\' \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} \parseargdef\title{% \checkenv\titlepage \leftline{\titlefonts\rmisbold #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 {\secfonts\rmisbold \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 -12pt \global\advance\vsize by -12pt } \parseargdef\everyfooting{\oddfootingxxx{#1}\evenfootingxxx{#1}} % @evenheadingmarks top \thischapter <- chapter at the top of a page % @evenheadingmarks bottom \thischapter <- chapter at the bottom of a page % % The same set of arguments for: % % @oddheadingmarks % @evenfootingmarks % @oddfootingmarks % @everyheadingmarks % @everyfootingmarks \def\evenheadingmarks{\headingmarks{even}{heading}} \def\oddheadingmarks{\headingmarks{odd}{heading}} \def\evenfootingmarks{\headingmarks{even}{footing}} \def\oddfootingmarks{\headingmarks{odd}{footing}} \def\everyheadingmarks#1 {\headingmarks{even}{heading}{#1} \headingmarks{odd}{heading}{#1} } \def\everyfootingmarks#1 {\headingmarks{even}{footing}{#1} \headingmarks{odd}{footing}{#1} } % #1 = even/odd, #2 = heading/footing, #3 = top/bottom. \def\headingmarks#1#2#3 {% \expandafter\let\expandafter\temp \csname get#3headingmarks\endcsname \global\expandafter\let\csname get#1#2marks\endcsname \temp } \everyheadingmarks bottom \everyfootingmarks bottom % @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{% non-global headings elimination \evenheadline={\hfil}\evenfootline={\hfil}% \oddheadline={\hfil}\oddfootline={\hfil}% } \def\HEADINGSoff{{\globaldefs=1 \headingsoff}} % global setting \HEADINGSoff % it's the default % 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\thisisundefined \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\relax \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 % % Try typesetting the item mark that if the document erroneously says % something like @itemize @samp (intending @table), there's an error % right away at the @itemize. It's not the best error message in the % world, but it's better than leaving it to the @item. This means if % the user wants an empty mark, they have to say @w{} not just @w. \def\itemcontents{#1}% \setbox0 = \hbox{\itemcontents}% % % @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. \everycr resets \everytab so we don't have to % undo it ourselves. \def\headitemfont{\b}% for people to use in the template row; not changeable \def\headitem{% \checkenv\multitable \crcr \global\everytab={\bf}% can't use \headitemfont since the parsing differs \the\everytab % for the first item }% % % 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 again encounter the problem the 1sp was intended to solve. % --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: \obeylines \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'. \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. \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. { \obeylines% % Ignore anything after the last `@end #1'; this matters in verbatim % environments, where otherwise the newline after an ignored conditional % would result in a blank line in the output. \gdef\enddoignore#1^^M{\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 \relax % 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 unexpandable (because we define \tt as a dummy) % definitions when @{ or @} appear in index entry text. Also, more % complicated, when \tex is in effect and \{ is a \delimiter again. % We can't use \lbracecmd and \rbracecmd because texindex assumes % braces and backslashes are used only as delimiters. Perhaps we % should define @lbrace and @rbrace commands a la @comma. \def\{{{\tt\char123}}% \def\}{{\tt\char125}}% % % I don't entirely understand this, but when an index entry is % generated from a macro call, the \endinput which \scanmacro inserts % causes processing to be prematurely terminated. This is, % apparently, because \indexsorttmp is fully expanded, and \endinput % is an expandable command. The redefinition below makes \endinput % disappear altogether for that purpose -- although logging shows that % processing continues to some further point. On the other hand, it % seems \endinput does not hurt in the printed index arg, since that % is still getting written without apparent harm. % % Sample source (mac-idx3.tex, reported by Graham Percival to % help-texinfo, 22may06): % @macro funindex {WORD} % @findex xyz % @end macro % ... % @funindex commtest % % The above is not enough to reproduce the bug, but it gives the flavor. % % Sample whatsit resulting: % .@write3{\entry{xyz}{@folio }{@code {xyz@endinput }}} % % So: \let\endinput = \empty % % 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 \otherbackslash } % 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\_% \definedummyletter\-% % % Non-English letters. \definedummyword\AA \definedummyword\AE \definedummyword\DH \definedummyword\L \definedummyword\O \definedummyword\OE \definedummyword\TH \definedummyword\aa \definedummyword\ae \definedummyword\dh \definedummyword\exclamdown \definedummyword\l \definedummyword\o \definedummyword\oe \definedummyword\ordf \definedummyword\ordm \definedummyword\questiondown \definedummyword\ss \definedummyword\th % % 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\arrow \definedummyword\bullet \definedummyword\comma \definedummyword\copyright \definedummyword\registeredsymbol \definedummyword\dots \definedummyword\enddots \definedummyword\entrybreak \definedummyword\equiv \definedummyword\error \definedummyword\euro \definedummyword\expansion \definedummyword\geq \definedummyword\guillemetleft \definedummyword\guillemetright \definedummyword\guilsinglleft \definedummyword\guilsinglright \definedummyword\leq \definedummyword\minus \definedummyword\ogonek \definedummyword\pounds \definedummyword\point \definedummyword\print \definedummyword\quotedblbase \definedummyword\quotedblleft \definedummyword\quotedblright \definedummyword\quoteleft \definedummyword\quoteright \definedummyword\quotesinglbase \definedummyword\result \definedummyword\textdegree % % 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. % \def\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\ogonek \definedummyword\ringaccent \definedummyword\tieaccent \definedummyword\ubaraccent \definedummyword\udotaccent \definedummyword\dotless % % Texinfo font commands. \definedummyword\b \definedummyword\i \definedummyword\r \definedummyword\sansserif \definedummyword\sc \definedummyword\slanted \definedummyword\t % % Commands that take arguments. \definedummyword\acronym \definedummyword\anchor \definedummyword\cite \definedummyword\code \definedummyword\command \definedummyword\dfn \definedummyword\dmn \definedummyword\email \definedummyword\emph \definedummyword\env \definedummyword\file \definedummyword\indicateurl \definedummyword\kbd \definedummyword\key \definedummyword\math \definedummyword\option \definedummyword\pxref \definedummyword\ref \definedummyword\samp \definedummyword\strong \definedummyword\tie \definedummyword\uref \definedummyword\url \definedummyword\var \definedummyword\verb \definedummyword\w \definedummyword\xref } % \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}% % All control words become @asis by default; overrides below. \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\@{@}% \def\_{\normalunderscore}% \def\-{}% @- shouldn't affect sorting % % Unfortunately, texindex is not prepared to handle braces in the % content at all. So for index sorting, we map @{ and @} to strings % starting with |, since that ASCII character is between ASCII { and }. \def\{{|a}% \def\}{|b}% % % Non-English letters. \def\AA{AA}% \def\AE{AE}% \def\DH{DZZ}% \def\L{L}% \def\OE{OE}% \def\O{O}% \def\TH{ZZZ}% \def\aa{aa}% \def\ae{ae}% \def\dh{dzz}% \def\exclamdown{!}% \def\l{l}% \def\oe{oe}% \def\ordf{a}% \def\ordm{o}% \def\o{o}% \def\questiondown{?}% \def\ss{ss}% \def\th{zzz}% % \def\LaTeX{LaTeX}% \def\TeX{TeX}% % % Assorted special characters. % (The following {} will end up in the sort string, but that's ok.) \def\arrow{->}% \def\bullet{bullet}% \def\comma{,}% \def\copyright{copyright}% \def\dots{...}% \def\enddots{...}% \def\equiv{==}% \def\error{error}% \def\euro{euro}% \def\expansion{==>}% \def\geq{>=}% \def\guillemetleft{<<}% \def\guillemetright{>>}% \def\guilsinglleft{<}% \def\guilsinglright{>}% \def\leq{<=}% \def\minus{-}% \def\point{.}% \def\pounds{pounds}% \def\print{-|}% \def\quotedblbase{"}% \def\quotedblleft{"}% \def\quotedblright{"}% \def\quoteleft{`}% \def\quoteright{'}% \def\quotesinglbase{,}% \def\registeredsymbol{R}% \def\result{=>}% \def\textdegree{o}% % \expandafter\ifx\csname SETtxiindexlquoteignore\endcsname\relax \else \indexlquoteignore \fi % % 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 } % Undocumented (for FSFS 2nd ed.): @set txiindexlquoteignore makes us % ignore left quotes in the sort term. {\catcode`\`=\active \gdef\indexlquoteignore{\let`=\empty}} \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}% % \safewhatsit\dosubindwrite }% \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/skips around a whatsit: % % 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 or \pdfdest 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} % \newskip\whatsitskip \newcount\whatsitpenalty % % ..., ready, GO: % \def\safewhatsit#1{% \ifhmode #1% \else % \lastskip and \lastpenalty cannot both be nonzero simultaneously. \whatsitskip = \lastskip \edef\lastskipmacro{\the\lastskip}% \whatsitpenalty = \lastpenalty % % If \lastskip is nonzero, that means the last item was a % skip. And since a skip is discardable, that means this % -\whatsitskip 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-\whatsitskip \fi % #1% % \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\whatsitpenalty>9999 \penalty\whatsitpenalty \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\whatsitskip \fi \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 \plainfrenchspacing \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 freezes 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 % % When reading the text of entry, convert explicit line breaks % from @* into spaces. The user might give these in long section % titles, for instance. \def\*{\unskip\space\ignorespaces}% \def\entrybreak{\hfil\break}% % % Swallow the left brace of the text (first parameter): \afterassignment\doentry \let\temp = } \def\entrybreak{\unskip\space\ignorespaces}% \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. \setbox\boxA = \hbox{#1}% \ifdim\wd\boxA = 0pt \ % \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 plain.tex's \dotfill, except uses up at least 1 em. \def\indexdotfill{\cleaders \hbox{$\mathsurround=0pt \mkern1.5mu.\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{% % The following penalty ensures that the page builder is exercised % _before_ we change the output routine. This is necessary in the % following situation: % % The last section of the index consists only of a single entry. % Before this section, \pagetotal is less than \pagegoal, so no % break occurs before the last section starts. However, the last % section, consisting of \initial and the single \entry, does not % fit on the page and has to be broken off. Without the following % penalty the page builder will not be exercised until \eject % below, and by that time we'll already have changed the output % routine to the \balancecolumns version, so the next-to-last % double-column page will be processed with \balancecolumns, which % is wrong: The two columns will go to the main vertical list, with % the broken-off section in the recent contributions. As soon as % the output routine finishes, TeX starts reconsidering the page % break. The two columns and the broken-off section both fit on the % page, because the two columns now take up only half of the page % goal. When TeX sees \eject from below which follows the final % section, it invokes the new output routine that we've set after % \balancecolumns below; \onepageout will try to fit the two columns % and the final section into the vbox of \pageheight (see % \pagebody), causing an overfull box. % % Note that glue won't work here, because glue does not exercise the % page builder, unlike penalties (see The TeXbook, pp. 280-281). \penalty0 % \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. % Let's start with @part. \outer\parseargdef\part{\partzzz{#1}} \def\partzzz#1{% \chapoddpage \null \vskip.3\vsize % move it down on the page a bit \begingroup \noindent \titlefonts\rmisbold #1\par % the text \let\lastnode=\empty % no node to associate with \writetocentry{part}{#1}{}% but put it in the toc \headingsoff % no headline or footline on the part page \chapoddpage \endgroup } % \unnumberedno is an oxymoron. 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 these (using marks) as the number+name, number % and name of the chapter. Page headings and footings can use % these. @section does likewise. \def\thischapter{} \def\thischapternum{} \def\thischaptername{} \def\thissection{} \def\thissectionnum{} \def\thissectionname{} \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 achieve this, remember the "biggest" unnum. sec. we are currently in: \chardef\unnlevel = \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 < \unnlevel \chardef\unnlevel = \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 > \unnlevel \def\headtype{U}% \else \chardef\unnlevel = 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 % % \putwordChapter can contain complex things in translations. \toks0=\expandafter{\putwordChapter}% \message{\the\toks0 \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 calls appendixzzz % \def\appendixzzz#1{% \global\secno=0 \global\subsecno=0 \global\subsubsecno=0 \global\advance\appendixno by 1 \gdef\chaplevelprefix{\appendixletter.}% \resetallfloatnos % % \putwordAppendix can contain complex things in translations. \toks0=\expandafter{\putwordAppendix}% \message{\the\toks0 \space \appendixletter}% % \chapmacro{#1}{Yappendix}{\appendixletter}% % \global\let\section = \appendixsec \global\let\subsection = \appendixsubsec \global\let\subsubsection = \appendixsubsubsec } % normally unnmhead0 calls unnumberedzzz: \outer\parseargdef\unnumbered{\unnmhead0{#1}} \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}% } % normally calls appendixsectionzzz: \outer\parseargdef\appendixsection{\apphead1{#1}} \def\appendixsectionzzz#1{% \global\subsecno=0 \global\subsubsecno=0 \global\advance\secno by 1 \sectionheading{#1}{sec}{Yappendix}{\appendixletter.\the\secno}% } \let\appendixsec\appendixsection % normally calls unnumberedseczzz: \outer\parseargdef\unnumberedsec{\unnmhead1{#1}} \def\unnumberedseczzz#1{% \global\subsecno=0 \global\subsubsecno=0 \global\advance\secno by 1 \sectionheading{#1}{sec}{Ynothing}{\the\unnumberedno.\the\secno}% } % Subsections. % % normally calls numberedsubseczzz: \outer\parseargdef\numberedsubsec{\numhead2{#1}} \def\numberedsubseczzz#1{% \global\subsubsecno=0 \global\advance\subsecno by 1 \sectionheading{#1}{subsec}{Ynumbered}{\the\chapno.\the\secno.\the\subsecno}% } % normally calls appendixsubseczzz: \outer\parseargdef\appendixsubsec{\apphead2{#1}} \def\appendixsubseczzz#1{% \global\subsubsecno=0 \global\advance\subsecno by 1 \sectionheading{#1}{subsec}{Yappendix}% {\appendixletter.\the\secno.\the\subsecno}% } % normally calls unnumberedsubseczzz: \outer\parseargdef\unnumberedsubsec{\unnmhead2{#1}} \def\unnumberedsubseczzz#1{% \global\subsubsecno=0 \global\advance\subsecno by 1 \sectionheading{#1}{subsec}{Ynothing}% {\the\unnumberedno.\the\secno.\the\subsecno}% } % Subsubsections. % % normally numberedsubsubseczzz: \outer\parseargdef\numberedsubsubsec{\numhead3{#1}} \def\numberedsubsubseczzz#1{% \global\advance\subsubsecno by 1 \sectionheading{#1}{subsubsec}{Ynumbered}% {\the\chapno.\the\secno.\the\subsecno.\the\subsubsecno}% } % normally appendixsubsubseczzz: \outer\parseargdef\appendixsubsubsec{\apphead3{#1}} \def\appendixsubsubseczzz#1{% \global\advance\subsubsecno by 1 \sectionheading{#1}{subsubsec}{Yappendix}% {\appendixletter.\the\secno.\the\subsecno.\the\subsubsecno}% } % normally unnumberedsubsubseczzz: \outer\parseargdef\unnumberedsubsubsec{\unnmhead3{#1}} \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\ptexraggedright \rmisbold #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} % Parameter controlling skip before chapter headings (if needed) \newskip\chapheadingskip % Define plain chapter starts, and page on/off switching for it. \def\chapbreak{\dobreak \chapheadingskip {-4000}} \def\chappager{\par\vfill\supereject} % Because \domark is called before \chapoddpage, the filler page will % get the headings for the next chapter, which is wrong. But we don't % care -- we just disable all headings on the filler page. \def\chapoddpage{% \chappager \ifodd\pageno \else \begingroup \headingsoff \null \chappager \endgroup \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{% % Insert the first mark before the heading break (see notes for \domark). \let\prevchapterdefs=\lastchapterdefs \let\prevsectiondefs=\lastsectiondefs \gdef\lastsectiondefs{\gdef\thissectionname{}\gdef\thissectionnum{}% \gdef\thissection{}}% % \def\temptype{#2}% \ifx\temptype\Ynothingkeyword \gdef\lastchapterdefs{\gdef\thischaptername{#1}\gdef\thischapternum{}% \gdef\thischapter{\thischaptername}}% \else\ifx\temptype\Yomitfromtockeyword \gdef\lastchapterdefs{\gdef\thischaptername{#1}\gdef\thischapternum{}% \gdef\thischapter{}}% \else\ifx\temptype\Yappendixkeyword \toks0={#1}% \xdef\lastchapterdefs{% \gdef\noexpand\thischaptername{\the\toks0}% \gdef\noexpand\thischapternum{\appendixletter}% % \noexpand\putwordAppendix avoids expanding indigestible % commands in some of the translations. \gdef\noexpand\thischapter{\noexpand\putwordAppendix{} \noexpand\thischapternum: \noexpand\thischaptername}% }% \else \toks0={#1}% \xdef\lastchapterdefs{% \gdef\noexpand\thischaptername{\the\toks0}% \gdef\noexpand\thischapternum{\the\chapno}% % \noexpand\putwordChapter avoids expanding indigestible % commands in some of the translations. \gdef\noexpand\thischapter{\noexpand\putwordChapter{} \noexpand\thischapternum: \noexpand\thischaptername}% }% \fi\fi\fi % % Output the mark. Pass it through \safewhatsit, to take care of % the preceding space. \safewhatsit\domark % % Insert the chapter heading break. \pchapsepmacro % % Now the second mark, after the heading break. No break points % between here and the heading. \let\prevchapterdefs=\lastchapterdefs \let\prevsectiondefs=\lastsectiondefs \domark % {% \chapfonts \rmisbold % % Have to define \lastsection 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\lastsection{#1}% % % Only insert the separating space if we have a chapter/appendix % number, and don't print the unnumbered ``number''. \ifx\temptype\Ynothingkeyword \setbox0 = \hbox{}% \def\toctype{unnchap}% \else\ifx\temptype\Yomitfromtockeyword \setbox0 = \hbox{}% contents like unnumbered, but no toc entry \def\toctype{omit}% \else\ifx\temptype\Yappendixkeyword \setbox0 = \hbox{\putwordAppendix{} #3\enspace}% \def\toctype{app}% \else \setbox0 = \hbox{#3\enspace}% \def\toctype{numchap}% \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. \nobreak % Avoid page breaks at the interline glue. \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \ptexraggedright \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\ptexraggedright \rmisbold #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 {\rmisbold #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\seckeyword{sec} % \def\sectionheading#1#2#3#4{% {% \checkenv{}% should not be in an environment. % % Switch to the right set of fonts. \csname #2fonts\endcsname \rmisbold % \def\sectionlevel{#2}% \def\temptype{#3}% % % Insert first mark before the heading break (see notes for \domark). \let\prevsectiondefs=\lastsectiondefs \ifx\temptype\Ynothingkeyword \ifx\sectionlevel\seckeyword \gdef\lastsectiondefs{\gdef\thissectionname{#1}\gdef\thissectionnum{}% \gdef\thissection{\thissectionname}}% \fi \else\ifx\temptype\Yomitfromtockeyword % Don't redefine \thissection. \else\ifx\temptype\Yappendixkeyword \ifx\sectionlevel\seckeyword \toks0={#1}% \xdef\lastsectiondefs{% \gdef\noexpand\thissectionname{\the\toks0}% \gdef\noexpand\thissectionnum{#4}% % \noexpand\putwordSection avoids expanding indigestible % commands in some of the translations. \gdef\noexpand\thissection{\noexpand\putwordSection{} \noexpand\thissectionnum: \noexpand\thissectionname}% }% \fi \else \ifx\sectionlevel\seckeyword \toks0={#1}% \xdef\lastsectiondefs{% \gdef\noexpand\thissectionname{\the\toks0}% \gdef\noexpand\thissectionnum{#4}% % \noexpand\putwordSection avoids expanding indigestible % commands in some of the translations. \gdef\noexpand\thissection{\noexpand\putwordSection{} \noexpand\thissectionnum: \noexpand\thissectionname}% }% \fi \fi\fi\fi % % Go into vertical mode. Usually we'll already be there, but we % don't want the following whatsit to end up in a preceding paragraph % if the document didn't happen to have a blank line. \par % % Output the mark. Pass it through \safewhatsit, to take care of % the preceding space. \safewhatsit\domark % % Insert space above the heading. \csname #2headingbreak\endcsname % % Now the second mark, after the heading break. No break points % between here and the heading. \let\prevsectiondefs=\lastsectiondefs \domark % % Only insert the space after the number if we have a section number. \ifx\temptype\Ynothingkeyword \setbox0 = \hbox{}% \def\toctype{unn}% \gdef\lastsection{#1}% \else\ifx\temptype\Yomitfromtockeyword % for @headings -- no section number, don't include in toc, % and don't redefine \lastsection. \setbox0 = \hbox{}% \def\toctype{omit}% \let\sectionlevel=\empty \else\ifx\temptype\Yappendixkeyword \setbox0 = \hbox{#4\enspace}% \def\toctype{app}% \gdef\lastsection{#1}% \else \setbox0 = \hbox{#4\enspace}% \def\toctype{num}% \gdef\lastsection{#1}% \fi\fi\fi % % Write the toc entry (before \donoderef). See comments in \chapmacro. \writetocentry{\toctype\sectionlevel}{#1}{#4}% % % Write the node reference (= pdf destination for pdftex). % Again, see comments in \chapmacro. \donoderef{#3}% % % Interline glue will be inserted when the vbox is completed. % That glue will be a valid breakpoint for the page, since it'll be % preceded by a whatsit (usually from the \donoderef, or from the % \writetocentry if there was no node). We don't want to allow that % break, since then the whatsits could end up on page n while the % section is on page n+1, thus toc/etc. are wrong. Debian bug 276000. \nobreak % % Output the actual section heading. \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \ptexraggedright \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 \tocreadfilename } \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. \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 } % redefined for the two-volume lispref. We always output on % \jobname.toc even if this is redefined. % \def\tocreadfilename{\jobname.toc} % Normal (long) toc. % \def\contents{% \startcontents{\putwordTOC}% \openin 1 \tocreadfilename\space \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\partentry = \shortpartentry \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 \tocreadfilename\space \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, ... % Parts, in the main contents. Replace the part number, which doesn't % exist, with an empty box. Let's hope all the numbers have the same width. % Also ignore the page number, which is conventionally not printed. \def\numeralbox{\setbox0=\hbox{8}\hbox to \wd0{\hfil}} \def\partentry#1#2#3#4{\dochapentry{\numeralbox\labelspace#1}{}} % % Parts, in the short toc. \def\shortpartentry#1#2#3#4{% \penalty-300 \vskip.5\baselineskip plus.15\baselineskip minus.1\baselineskip \shortchapentry{{\bf #1}}{\numeralbox}{}{}% } % 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. % @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 @ character. \envdef\tex{% \setupmarkupstyle{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 \catcode`\`=\other \catcode`\'=\other \escapechar=`\\ % % ' is active in math mode (mathcode"8000). So reset it, and all our % other math active characters (just in case), to plain's definitions. \mathactive % \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 \expandafter \let\csname top\endcsname=\ptextop % outer \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% % % If this cartouche directly follows a sectioning command, we need the % \parskip glue (backspaced over by default) or the cartouche can % collide with the section heading. \ifnum\lastpenalty>10000 \vskip\parskip \fi % \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. \newdimen\nonfillparindent \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 % Turn off paragraph indentation but redefine \indent to emulate % the normal \indent. \nonfillparindent=\parindent \parindent = 0pt \let\indent\nonfillindent % \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 } \begingroup \obeyspaces % We want to swallow spaces (but not other tokens) after the fake % @indent in our nonfill-environments, where spaces are normally % active and set to @tie, resulting in them not being ignored after % @indent. \gdef\nonfillindent{\futurelet\temp\nonfillindentcheck}% \gdef\nonfillindentcheck{% \ifx\temp % \expandafter\nonfillindentgobble% \else% \leavevmode\nonfillindentbox% \fi% }% \endgroup \def\nonfillindentgobble#1{\nonfillindent} \def\nonfillindentbox{\hbox to \nonfillparindent{\hss}} % 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 % end paragraph for sake of leading, in case document has no blank % line. This is redundant with what happens in \aboveenvbreak, but % we need to do it before changing the fonts, and it's inconvenient % to change the fonts afterward. \ifnum \lastpenalty=10000 \else \endgraf \fi \smallexamplefonts \rm \fi } \def\setsmalldispenv{% \ifx\SETdispenvsize\nosmallword \else \ifnum \lastpenalty=10000 \else \endgraf \fi \smallexamplefonts \rm \fi } % We often define two environments, @foo and @smallfoo. % Let's do it in one command. #1 is the env name, #2 the definition. \def\makedispenvdef#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 environment synonyms (#1 and #2) for an environment. \def\maketwodispenvdef#1#2#3{% \makedispenvdef{#1}{#3}% \makedispenvdef{#2}{#3}% } % % @lisp: indented, narrowed, typewriter font; % @example: same as @lisp. % % @smallexample and @smalllisp: use smaller fonts. % Originally contributed by Pavel@xerox. % \maketwodispenvdef{lisp}{example}{% \nonfillstart \tt\setupmarkupstyle{example}% \let\kbdfont = \kbdexamplefont % Allow @kbd to do something special. \gobble % eat return } % @display/@smalldisplay: same as @lisp except keep current font. % \makedispenvdef{display}{% \nonfillstart \gobble } % @format/@smallformat: same as @display except don't narrow margins. % \makedispenvdef{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\relax \gobble } \let\Eflushright = \afterenvbreak % @raggedright does more-or-less normal line breaking but no right % justification. From plain.tex. \envdef\raggedright{% \rightskip0pt plus2em \spaceskip.3333em \xspaceskip.5em\relax } \let\Eraggedright\par \envdef\raggedleft{% \parindent=0pt \leftskip0pt plus2em \spaceskip.3333em \xspaceskip.5em \parfillskip=0pt \hbadness=10000 % Last line will usually be underfull, so turn off % badness reporting. } \let\Eraggedleft\par \envdef\raggedcenter{% \parindent=0pt \rightskip0pt plus1em \leftskip0pt plus1em \spaceskip.3333em \xspaceskip.5em \parfillskip=0pt \hbadness=10000 % Last line will usually be underfull, so turn off % badness reporting. } \let\Eraggedcenter\par % @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. % \makedispenvdef{quotation}{\quotationstart} % \def\quotationstart{% {\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\thisisundefined\else % indent a bit. \leftline{\kern 2\leftskip \sl ---\quotationauthor}% \fi {\parskip=0pt \afterenvbreak}% } \def\Esmallquotation{\Equotation} % 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\"% % Don't do the quotes -- if we do, @set txicodequoteundirected and % @set txicodequotebacktick will not have effect on @verb and % @verbatim, and ?` and !` ligatures won't get disabled. %\do\`\do\'% } % % [Knuth] p. 380 \def\uncatcodespecials{% \def\do##1{\catcode`##1=\other}\dospecials} % % 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}% \setupmarkupstyle{verb}% \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 % % We typeset each line of the verbatim in an \hbox, so we can handle % tabs. The \global is in case the verbatim line starts with an accent, % or some other command that starts with a begin-group. Otherwise, the % entire \verbbox would disappear at the corresponding end-group, before % it is typeset. Meanwhile, we can't have nested verbatim commands % (can we?), so the \global won't be overwriting itself. \newbox\verbbox \def\starttabbox{\global\setbox\verbbox=\hbox\bgroup} % \begingroup \catcode`\^^I=\active \gdef\tabexpand{% \catcode`\^^I=\active \def^^I{\leavevmode\egroup \dimen\verbbox=\wd\verbbox % the width so far, or since the previous tab \divide\dimen\verbbox by\tabw \multiply\dimen\verbbox by\tabw % compute previous multiple of \tabw \advance\dimen\verbbox by\tabw % advance to next multiple of \tabw \wd\verbbox=\dimen\verbbox \box\verbbox \starttabbox }% } \endgroup % start the verbatim environment. \def\setupverbatim{% \let\nonarrowing = t% \nonfillstart \tt % easiest (and conventionally used) font for verbatim % The \leavevmode here is for blank lines. Otherwise, we would % never \starttabox and the \egroup would end verbatim mode. \def\par{\leavevmode\egroup\box\verbbox\endgraf}% \tabexpand \setupmarkupstyle{verbatim}% % 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 \indexnofonts % Allow `@@' and other weird things in file names. \wlog{texinfo.tex: doing @verbatiminclude of #1^^J}% \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 \newcount\defunpenalty % Start the processing of @deffn: \def\startdefun{% \ifnum\lastpenalty<10000 \medbreak \defunpenalty=10003 % Will keep this @deffn together with the % following @def command, see below. \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 \printdefunline, 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. % % As a further refinement, we avoid "club" headers by signalling % with penalty of 10003 after the very first @deffn in the % sequence (see above), and penalty of 10002 after any following % @def command. \ifnum\lastpenalty=10002 \penalty2000 \else \defunpenalty=10002 \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 \else \defunpenalty=10002 \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\relax \endgraf \nobreak\vskip -\parskip \penalty\defunpenalty % 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 remaining 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 \doingtypefnfalse % distinguish typed functions from all else \parseargusing\activeparens{\printdefunline#3}% }% \def#2{\dodefunx#1}% \def#3% } \newif\ifdoingtypefn % doing typed function? \newif\ifrettypeownline % typeset return type on its own line? % @deftypefnnewline on|off says whether the return type of typed functions % are printed on their own line. This affects @deftypefn, @deftypefun, % @deftypeop, and @deftypemethod. % \parseargdef\deftypefnnewline{% \def\temp{#1}% \ifx\temp\onword \expandafter\let\csname SETtxideftypefnnl\endcsname = \empty \else\ifx\temp\offword \expandafter\let\csname SETtxideftypefnnl\endcsname = \relax \else \errhelp = \EMsimple \errmessage{Unknown @txideftypefnnl value `\temp', must be on|off}% \fi\fi } % 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}% \doingtypefntrue \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 {} } % Types: % @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{% \par % Get the values of \leftskip and \rightskip as they were outside the @def... \advance\leftskip by -\defbodyindent % % Determine if we are typesetting the return type of a typed function % on a line by itself. \rettypeownlinefalse \ifdoingtypefn % doing a typed function specifically? % then check user option for putting return type on its own line: \expandafter\ifx\csname SETtxideftypefnnl\endcsname\relax \else \rettypeownlinetrue \fi \fi % % How we'll format the category 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. We'll always have at % least two. \tempnum = 2 % % 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 % % If doing a return type on its own line, we'll have another line. \ifrettypeownline \advance\tempnum by 1 \def\maybeshapeline{0in \hsize}% \else \def\maybeshapeline{}% \fi % % The continuations: \dimen2=\hsize \advance\dimen2 by -\defargsindent % % The final paragraph shape: \parshape \tempnum 0in \dimen0 \maybeshapeline \defargsindent \dimen2 % % Put the category name at 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}% text of the return type \ifx\temp\empty\else \tclose{\temp}% typeset the return type \ifrettypeownline % put return type on its own line; prohibit line break following: \hfil\vadjust{\nobreak}\break \else \space % type on same line, so just followed by a space \fi \fi % no return type #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. \def\var##1{{\setupmarkupstyle{var}\ttslanted{##1}}}% #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 } % these should not use \errmessage; the glibc manual, at least, actually % has such constructs (when documenting function pointers). \def\badparencount{% \message{Warning: unbalanced parentheses in @def...}% \global\parencount=0 } \def\badbrackcount{% \message{Warning: unbalanced square brackets 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\thisisundefined \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 for \example: \spaceisspace % % The \empty here causes a following catcode 5 newline to be eaten as % part of reading whitespace after a control sequence. It does not % eat a catcode 13 newline. There's no good way to handle the two % cases (untried: maybe e-TeX's \everyeof could help, though plain TeX % would then have different behavior). See the Macro Details node in % the manual for the workaround we recommend for macros and % line-oriented commands. % \scantokens{#1\empty}% \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 \ % to recognize macro arguments; this is the job of \mbodybackslash. % % Non-ASCII encodings make 8-bit characters active, so un-activate % them to avoid their expansion. Must do this non-globally, to % confine the change to the current group. % % 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{% used as subroutine \catcode`\"=\other \catcode`\+=\other \catcode`\<=\other \catcode`\>=\other \catcode`\@=\other \catcode`\^=\other \catcode`\_=\other \catcode`\|=\other \catcode`\~=\other \ifx\declaredencoding\ascii \else \setnonasciicharscatcodenonglobal\other \fi } \def\scanargctxt{% used for copying and captions, not macros. \scanctxt \catcode`\\=\other \catcode`\^^M=\other } \def\macrobodyctxt{% used for @macro definitions \scanctxt \catcode`\{=\other \catcode`\}=\other \catcode`\^^M=\other \usembodybackslash } \def\macroargctxt{% used when scanning invocations \scanctxt \catcode`\\=0 } % why catcode 0 for \ in the above? To recognize \\ \{ \} as "escapes" % for the single characters \ { }. Thus, we end up with the "commands" % that would be written @\ @{ @} in a Texinfo document. % % We already have @{ and @}. For @\, we define it here, and only for % this purpose, to produce a typewriter backslash (so, the @\ that we % define for @math can't be used with @macro calls): % \def\\{\normalbackslash}% % % We would like to do this for \, too, since that is what makeinfo does. % But it is not possible, because Texinfo already has a command @, for a % cedilla accent. Documents must use @comma{} instead. % % \anythingelse will almost certainly be an error of some kind. % \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\margbackslash#1{\char`\#1 } \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\relax \else \expandafter\parsemargdef \argl;% \if\paramno>256\relax \ifx\eTeXversion\thisisundefined \errhelp = \EMsimple \errmessage{You need eTeX to compile a file with macros with more than 256 arguments} \fi \fi \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}} % For macro processing make @ a letter so that we can make Texinfo private macro names. \edef\texiatcatcode{\the\catcode`\@} \catcode `@=11\relax % 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 some hook where the argument si to be expanded. If % there are less than 10 arguments that hook is to be replaced by ##N where N % is the position in that list, that is to say the macro arguments are to be % defined `a la TeX in the macro body. % % 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. % % If there are 10 or more arguments, a different technique is used, where the % hook remains in the body, and when macro is to be expanded the body is % processed again to replace the arguments. % % In that case, the hook is \the\toks N-1, and we simply set \toks N-1 to the % argument N value and then \edef the body (nothing else will expand because of % the catcode regime underwhich the body was input). % % If you compile with TeX (not eTeX), and you have macros with 10 or more % arguments, you need that no macro has more than 256 arguments, otherwise an % error is produced. \def\parsemargdef#1;{% \paramno=0\def\paramlist{}% \let\hash\relax \let\xeatspaces\relax \parsemargdefxxx#1,;,% % In case that there are 10 or more arguments we parse again the arguments % list to set new definitions for the \macarg.BLAH macros corresponding to % each BLAH argument. It was anyhow needed to parse already once this list % in order to count the arguments, and as macros with at most 9 arguments % are by far more frequent than macro with 10 or more arguments, defining % twice the \macarg.BLAH macros does not cost too much processing power. \ifnum\paramno<10\relax\else \paramno0\relax \parsemmanyargdef@@#1,;,% 10 or more arguments \fi } \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} \def\parsemmanyargdef@@#1,{% \if#1;\let\next=\relax \else \let\next=\parsemmanyargdef@@ \edef\tempb{\eatspaces{#1}}% \expandafter\def\expandafter\tempa \expandafter{\csname macarg.\tempb\endcsname}% % Note that we need some extra \noexpand\noexpand, this is because we % don't want \the to be expanded in the \parsermacbody as it uses an % \xdef . \expandafter\edef\tempa {\noexpand\noexpand\noexpand\the\toks\the\paramno}% \advance\paramno by 1\relax \fi\next} % These two commands read recursive and nonrecursive macro bodies. % (They're different since rec and nonrec macros end differently.) % \catcode `\@\texiatcatcode \long\def\parsemacbody#1@end macro% {\xdef\temp{\eatcr{#1}}\endgroup\defmacro}% \long\def\parsermacbody#1@end rmacro% {\xdef\temp{\eatcr{#1}}\endgroup\defmacro}% \catcode `\@=11\relax \let\endargs@\relax \let\nil@\relax \def\nilm@{\nil@}% \long\def\nillm@{\nil@}% % This macro is expanded during the Texinfo macro expansion, not during its % definition. It gets all the arguments values and assigns them to macros % macarg.ARGNAME % % #1 is the macro name % #2 is the list of argument names % #3 is the list of argument values \def\getargvals@#1#2#3{% \def\macargdeflist@{}% \def\saveparamlist@{#2}% Need to keep a copy for parameter expansion. \def\paramlist{#2,\nil@}% \def\macroname{#1}% \begingroup \macroargctxt \def\argvaluelist{#3,\nil@}% \def\@tempa{#3}% \ifx\@tempa\empty \setemptyargvalues@ \else \getargvals@@ \fi } % \def\getargvals@@{% \ifx\paramlist\nilm@ % Some sanity check needed here that \argvaluelist is also empty. \ifx\argvaluelist\nillm@ \else \errhelp = \EMsimple \errmessage{Too many arguments in macro `\macroname'!}% \fi \let\next\macargexpandinbody@ \else \ifx\argvaluelist\nillm@ % No more arguments values passed to macro. Set remaining named-arg % macros to empty. \let\next\setemptyargvalues@ \else % pop current arg name into \@tempb \def\@tempa##1{\pop@{\@tempb}{\paramlist}##1\endargs@}% \expandafter\@tempa\expandafter{\paramlist}% % pop current argument value into \@tempc \def\@tempa##1{\longpop@{\@tempc}{\argvaluelist}##1\endargs@}% \expandafter\@tempa\expandafter{\argvaluelist}% % Here \@tempb is the current arg name and \@tempc is the current arg value. % First place the new argument macro definition into \@tempd \expandafter\macname\expandafter{\@tempc}% \expandafter\let\csname macarg.\@tempb\endcsname\relax \expandafter\def\expandafter\@tempe\expandafter{% \csname macarg.\@tempb\endcsname}% \edef\@tempd{\long\def\@tempe{\the\macname}}% \push@\@tempd\macargdeflist@ \let\next\getargvals@@ \fi \fi \next } \def\push@#1#2{% \expandafter\expandafter\expandafter\def \expandafter\expandafter\expandafter#2% \expandafter\expandafter\expandafter{% \expandafter#1#2}% } % Replace arguments by their values in the macro body, and place the result % in macro \@tempa \def\macvalstoargs@{% % To do this we use the property that token registers that are \the'ed % within an \edef expand only once. So we are going to place all argument % values into respective token registers. % % First we save the token context, and initialize argument numbering. \begingroup \paramno0\relax % Then, for each argument number #N, we place the corresponding argument % value into a new token list register \toks#N \expandafter\putargsintokens@\saveparamlist@,;,% % Then, we expand the body so that argument are replaced by their % values. The trick for values not to be expanded themselves is that they % are within tokens and that tokens expand only once in an \edef . \edef\@tempc{\csname mac.\macroname .body\endcsname}% % Now we restore the token stack pointer to free the token list registers % which we have used, but we make sure that expanded body is saved after % group. \expandafter \endgroup \expandafter\def\expandafter\@tempa\expandafter{\@tempc}% } \def\macargexpandinbody@{% %% Define the named-macro outside of this group and then close this group. \expandafter \endgroup \macargdeflist@ % First the replace in body the macro arguments by their values, the result % is in \@tempa . \macvalstoargs@ % Then we point at the \norecurse or \gobble (for recursive) macro value % with \@tempb . \expandafter\let\expandafter\@tempb\csname mac.\macroname .recurse\endcsname % Depending on whether it is recursive or not, we need some tailing % \egroup . \ifx\@tempb\gobble \let\@tempc\relax \else \let\@tempc\egroup \fi % And now we do the real job: \edef\@tempd{\noexpand\@tempb{\macroname}\noexpand\scanmacro{\@tempa}\@tempc}% \@tempd } \def\putargsintokens@#1,{% \if#1;\let\next\relax \else \let\next\putargsintokens@ % First we allocate the new token list register, and give it a temporary % alias \@tempb . \toksdef\@tempb\the\paramno % Then we place the argument value into that token list register. \expandafter\let\expandafter\@tempa\csname macarg.#1\endcsname \expandafter\@tempb\expandafter{\@tempa}% \advance\paramno by 1\relax \fi \next } % Save the token stack pointer into macro #1 \def\texisavetoksstackpoint#1{\edef#1{\the\@cclvi}} % Restore the token stack pointer from number in macro #1 \def\texirestoretoksstackpoint#1{\expandafter\mathchardef\expandafter\@cclvi#1\relax} % newtoks that can be used non \outer . \def\texinonouternewtoks{\alloc@ 5\toks \toksdef \@cclvi} % Tailing missing arguments are set to empty \def\setemptyargvalues@{% \ifx\paramlist\nilm@ \let\next\macargexpandinbody@ \else \expandafter\setemptyargvaluesparser@\paramlist\endargs@ \let\next\setemptyargvalues@ \fi \next } \def\setemptyargvaluesparser@#1,#2\endargs@{% \expandafter\def\expandafter\@tempa\expandafter{% \expandafter\def\csname macarg.#1\endcsname{}}% \push@\@tempa\macargdeflist@ \def\paramlist{#2}% } % #1 is the element target macro % #2 is the list macro % #3,#4\endargs@ is the list value \def\pop@#1#2#3,#4\endargs@{% \def#1{#3}% \def#2{#4}% } \long\def\longpop@#1#2#3,#4\endargs@{% \long\def#1{#3}% \long\def#2{#4}% } % This defines a Texinfo @macro. There are eight cases: recursive and % nonrecursive macros of zero, one, up to nine, 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 \ifnum\paramno<10\relax % at most 9 \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}}% \else % 10 or more \expandafter\xdef\csname\the\macname\endcsname{% \noexpand\getargvals@{\the\macname}{\argl}% }% \global\expandafter\let\csname mac.\the\macname .body\endcsname\temp \global\expandafter\let\csname mac.\the\macname .recurse\endcsname\gobble \fi \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 % at most 9 \ifnum\paramno<10\relax \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}% \else % 10 or more: \expandafter\xdef\csname\the\macname\endcsname{% \noexpand\getargvals@{\the\macname}{\argl}% }% \global\expandafter\let\csname mac.\the\macname .body\endcsname\temp \global\expandafter\let\csname mac.\the\macname .recurse\endcsname\norecurse \fi \fi \fi} \catcode `\@\texiatcatcode\relax \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\macnamexxx=#1\futurelet\nchar\braceorlinexxx} \def\braceorlinexxx{% \ifx\nchar\bgroup\else \expandafter\parsearg \fi \macnamexxx} % @alias. % We need some trickery to remove the optional spaces around the equal % sign. 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 \lastsection, % 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{\lastsection}% \immediate \writexrdef{title}{\the\toks0 }% \immediate \writexrdef{snt}{\csname #2\endcsname}% \Ynumbered etc. \safewhatsit{\writexrdef{pg}{\folio}}% will be written later, at \shipout }% \fi } % @xrefautosectiontitle on|off says whether @section(ing) names are used % automatically in xrefs, if the third arg is not explicitly specified. % This was provided as a "secret" @set xref-automatic-section-title % variable, now it's official. % \parseargdef\xrefautomaticsectiontitle{% \def\temp{#1}% \ifx\temp\onword \expandafter\let\csname SETxref-automatic-section-title\endcsname = \empty \else\ifx\temp\offword \expandafter\let\csname SETxref-automatic-section-title\endcsname = \relax \else \errhelp = \EMsimple \errmessage{Unknown @xrefautomaticsectiontitle value `\temp', must be on|off}% \fi\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 {\indexnofonts \turnoffactive % This expands tokens, so do it after making catcode changes, so _ % etc. don't get their TeX definitions. \getfilename{#4}% % \edef\pdfxrefdest{#1}% \txiescapepdf\pdfxrefdest % \leavevmode \startlink attr{/Border [0 0 0]}% \ifnum\filenamelength>0 goto file{\the\filename.pdf} name{\pdfxrefdest}% \else goto name{\pdfmkpgn{\pdfxrefdest}}% \fi }% \setcolor{\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 {\toks0 = {#1}% avoid expansion of possibly-complex value \message{\linenumber Undefined cross reference `\the\toks0'.}}% \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{% {% The node name might contain 8-bit characters, which in our current % implementation are changed to commands like @'e. Don't let these % mess up the control sequence name. \indexnofonts \turnoffactive \xdef\safexrefname{#1}% }% % \expandafter\gdef\csname XR\safexrefname\endcsname{#2}% remember this xref % % Was that xref control sequence that we just defined for a float? \expandafter\iffloat\csname XR\safexrefname\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 {\safexrefname}}% \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 % % Invoke rest of plain TeX footnote routine. \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. % Similarly, 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\thisiundefined \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 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\medskip % 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 \fi % % Leave vertical mode so that indentation from an enclosing % environment such as @quotation is respected. On the other hand, if % it's at the top level, we don't want the normal paragraph indentation. \noindent % % 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 \medskip \fi % space after the standalone 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 \lastsection 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\lastsection{\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 floating, 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 % \lastsection 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,} % For single-language documents, @documentlanguage is usually given very % early, just after @documentencoding. Single argument is the language % (de) or locale (de_DE) abbreviation. % { \catcode`\_ = \active \globaldefs=1 \parseargdef\documentlanguage{\begingroup \let_=\normalunderscore % normal _ character for filenames \tex % read txi-??.tex file in plain TeX. % Read the file by the name they passed if it exists. \openin 1 txi-#1.tex \ifeof 1 \documentlanguagetrywithoutunderscore{#1_\finish}% \else \globaldefs = 1 % everything in the txi-LL files needs to persist \input txi-#1.tex \fi \closein 1 \endgroup % end raw TeX \endgroup} % % If they passed de_DE, and txi-de_DE.tex doesn't exist, % try txi-de.tex. % \gdef\documentlanguagetrywithoutunderscore#1_#2\finish{% \openin 1 txi-#1.tex \ifeof 1 \errhelp = \nolanghelp \errmessage{Cannot read language file txi-#1.tex}% \else \globaldefs = 1 % everything in the txi-LL files needs to persist \input txi-#1.tex \fi \closein 1 } }% end of special _ catcode % \newhelp\nolanghelp{The given language definition file cannot be found or is empty. Maybe you need to install it? Putting it in the current directory should work if nowhere else does.} % This macro is called from txi-??.tex files; the first argument is the % \language name to set (without the "\lang@" prefix), the second and % third args are \{left,right}hyphenmin. % % The language names to pass are determined when the format is built. % See the etex.log file created at that time, e.g., % /usr/local/texlive/2008/texmf-var/web2c/pdftex/etex.log. % % With TeX Live 2008, etex now includes hyphenation patterns for all % available languages. This means we can support hyphenation in % Texinfo, at least to some extent. (This still doesn't solve the % accented characters problem.) % \catcode`@=11 \def\txisetlanguage#1#2#3{% % do not set the language if the name is undefined in the current TeX. \expandafter\ifx\csname lang@#1\endcsname \relax \message{no patterns for #1}% \else \global\language = \csname lang@#1\endcsname \fi % but there is no harm in adjusting the hyphenmin values regardless. \global\lefthyphenmin = #2\relax \global\righthyphenmin = #3\relax } % Helpers for encodings. % Set the catcode of characters 128 through 255 to the specified number. % \def\setnonasciicharscatcode#1{% \count255=128 \loop\ifnum\count255<256 \global\catcode\count255=#1\relax \advance\count255 by 1 \repeat } \def\setnonasciicharscatcodenonglobal#1{% \count255=128 \loop\ifnum\count255<256 \catcode\count255=#1\relax \advance\count255 by 1 \repeat } % @documentencoding sets the definition of non-ASCII characters % according to the specified encoding. % \parseargdef\documentencoding{% % Encoding being declared for the document. \def\declaredencoding{\csname #1.enc\endcsname}% % % Supported encodings: names converted to tokens in order to be able % to compare them with \ifx. \def\ascii{\csname US-ASCII.enc\endcsname}% \def\latnine{\csname ISO-8859-15.enc\endcsname}% \def\latone{\csname ISO-8859-1.enc\endcsname}% \def\lattwo{\csname ISO-8859-2.enc\endcsname}% \def\utfeight{\csname UTF-8.enc\endcsname}% % \ifx \declaredencoding \ascii \asciichardefs % \else \ifx \declaredencoding \lattwo \setnonasciicharscatcode\active \lattwochardefs % \else \ifx \declaredencoding \latone \setnonasciicharscatcode\active \latonechardefs % \else \ifx \declaredencoding \latnine \setnonasciicharscatcode\active \latninechardefs % \else \ifx \declaredencoding \utfeight \setnonasciicharscatcode\active \utfeightchardefs % \else \message{Unknown document encoding #1, ignoring.}% % \fi % utfeight \fi % latnine \fi % latone \fi % lattwo \fi % ascii } % A message to be logged when using a character that isn't available % the default font encoding (OT1). % \def\missingcharmsg#1{\message{Character missing in OT1 encoding: #1.}} % Take account of \c (plain) vs. \, (Texinfo) difference. \def\cedilla#1{\ifx\c\ptexc\c{#1}\else\,{#1}\fi} % First, make active non-ASCII characters in order for them to be % correctly categorized when TeX reads the replacement text of % macros containing the character definitions. \setnonasciicharscatcode\active % % Latin1 (ISO-8859-1) character definitions. \def\latonechardefs{% \gdef^^a0{\tie} \gdef^^a1{\exclamdown} \gdef^^a2{\missingcharmsg{CENT SIGN}} \gdef^^a3{{\pounds}} \gdef^^a4{\missingcharmsg{CURRENCY SIGN}} \gdef^^a5{\missingcharmsg{YEN SIGN}} \gdef^^a6{\missingcharmsg{BROKEN BAR}} \gdef^^a7{\S} \gdef^^a8{\"{}} \gdef^^a9{\copyright} \gdef^^aa{\ordf} \gdef^^ab{\guillemetleft} \gdef^^ac{$\lnot$} \gdef^^ad{\-} \gdef^^ae{\registeredsymbol} \gdef^^af{\={}} % \gdef^^b0{\textdegree} \gdef^^b1{$\pm$} \gdef^^b2{$^2$} \gdef^^b3{$^3$} \gdef^^b4{\'{}} \gdef^^b5{$\mu$} \gdef^^b6{\P} % \gdef^^b7{$^.$} \gdef^^b8{\cedilla\ } \gdef^^b9{$^1$} \gdef^^ba{\ordm} % \gdef^^bb{\guillemetright} \gdef^^bc{$1\over4$} \gdef^^bd{$1\over2$} \gdef^^be{$3\over4$} \gdef^^bf{\questiondown} % \gdef^^c0{\`A} \gdef^^c1{\'A} \gdef^^c2{\^A} \gdef^^c3{\~A} \gdef^^c4{\"A} \gdef^^c5{\ringaccent A} \gdef^^c6{\AE} \gdef^^c7{\cedilla C} \gdef^^c8{\`E} \gdef^^c9{\'E} \gdef^^ca{\^E} \gdef^^cb{\"E} \gdef^^cc{\`I} \gdef^^cd{\'I} \gdef^^ce{\^I} \gdef^^cf{\"I} % \gdef^^d0{\DH} \gdef^^d1{\~N} \gdef^^d2{\`O} \gdef^^d3{\'O} \gdef^^d4{\^O} \gdef^^d5{\~O} \gdef^^d6{\"O} \gdef^^d7{$\times$} \gdef^^d8{\O} \gdef^^d9{\`U} \gdef^^da{\'U} \gdef^^db{\^U} \gdef^^dc{\"U} \gdef^^dd{\'Y} \gdef^^de{\TH} \gdef^^df{\ss} % \gdef^^e0{\`a} \gdef^^e1{\'a} \gdef^^e2{\^a} \gdef^^e3{\~a} \gdef^^e4{\"a} \gdef^^e5{\ringaccent a} \gdef^^e6{\ae} \gdef^^e7{\cedilla c} \gdef^^e8{\`e} \gdef^^e9{\'e} \gdef^^ea{\^e} \gdef^^eb{\"e} \gdef^^ec{\`{\dotless i}} \gdef^^ed{\'{\dotless i}} \gdef^^ee{\^{\dotless i}} \gdef^^ef{\"{\dotless i}} % \gdef^^f0{\dh} \gdef^^f1{\~n} \gdef^^f2{\`o} \gdef^^f3{\'o} \gdef^^f4{\^o} \gdef^^f5{\~o} \gdef^^f6{\"o} \gdef^^f7{$\div$} \gdef^^f8{\o} \gdef^^f9{\`u} \gdef^^fa{\'u} \gdef^^fb{\^u} \gdef^^fc{\"u} \gdef^^fd{\'y} \gdef^^fe{\th} \gdef^^ff{\"y} } % Latin9 (ISO-8859-15) encoding character definitions. \def\latninechardefs{% % Encoding is almost identical to Latin1. \latonechardefs % \gdef^^a4{\euro} \gdef^^a6{\v S} \gdef^^a8{\v s} \gdef^^b4{\v Z} \gdef^^b8{\v z} \gdef^^bc{\OE} \gdef^^bd{\oe} \gdef^^be{\"Y} } % Latin2 (ISO-8859-2) character definitions. \def\lattwochardefs{% \gdef^^a0{\tie} \gdef^^a1{\ogonek{A}} \gdef^^a2{\u{}} \gdef^^a3{\L} \gdef^^a4{\missingcharmsg{CURRENCY SIGN}} \gdef^^a5{\v L} \gdef^^a6{\'S} \gdef^^a7{\S} \gdef^^a8{\"{}} \gdef^^a9{\v S} \gdef^^aa{\cedilla S} \gdef^^ab{\v T} \gdef^^ac{\'Z} \gdef^^ad{\-} \gdef^^ae{\v Z} \gdef^^af{\dotaccent Z} % \gdef^^b0{\textdegree} \gdef^^b1{\ogonek{a}} \gdef^^b2{\ogonek{ }} \gdef^^b3{\l} \gdef^^b4{\'{}} \gdef^^b5{\v l} \gdef^^b6{\'s} \gdef^^b7{\v{}} \gdef^^b8{\cedilla\ } \gdef^^b9{\v s} \gdef^^ba{\cedilla s} \gdef^^bb{\v t} \gdef^^bc{\'z} \gdef^^bd{\H{}} \gdef^^be{\v z} \gdef^^bf{\dotaccent z} % \gdef^^c0{\'R} \gdef^^c1{\'A} \gdef^^c2{\^A} \gdef^^c3{\u A} \gdef^^c4{\"A} \gdef^^c5{\'L} \gdef^^c6{\'C} \gdef^^c7{\cedilla C} \gdef^^c8{\v C} \gdef^^c9{\'E} \gdef^^ca{\ogonek{E}} \gdef^^cb{\"E} \gdef^^cc{\v E} \gdef^^cd{\'I} \gdef^^ce{\^I} \gdef^^cf{\v D} % \gdef^^d0{\DH} \gdef^^d1{\'N} \gdef^^d2{\v N} \gdef^^d3{\'O} \gdef^^d4{\^O} \gdef^^d5{\H O} \gdef^^d6{\"O} \gdef^^d7{$\times$} \gdef^^d8{\v R} \gdef^^d9{\ringaccent U} \gdef^^da{\'U} \gdef^^db{\H U} \gdef^^dc{\"U} \gdef^^dd{\'Y} \gdef^^de{\cedilla T} \gdef^^df{\ss} % \gdef^^e0{\'r} \gdef^^e1{\'a} \gdef^^e2{\^a} \gdef^^e3{\u a} \gdef^^e4{\"a} \gdef^^e5{\'l} \gdef^^e6{\'c} \gdef^^e7{\cedilla c} \gdef^^e8{\v c} \gdef^^e9{\'e} \gdef^^ea{\ogonek{e}} \gdef^^eb{\"e} \gdef^^ec{\v e} \gdef^^ed{\'{\dotless{i}}} \gdef^^ee{\^{\dotless{i}}} \gdef^^ef{\v d} % \gdef^^f0{\dh} \gdef^^f1{\'n} \gdef^^f2{\v n} \gdef^^f3{\'o} \gdef^^f4{\^o} \gdef^^f5{\H o} \gdef^^f6{\"o} \gdef^^f7{$\div$} \gdef^^f8{\v r} \gdef^^f9{\ringaccent u} \gdef^^fa{\'u} \gdef^^fb{\H u} \gdef^^fc{\"u} \gdef^^fd{\'y} \gdef^^fe{\cedilla t} \gdef^^ff{\dotaccent{}} } % UTF-8 character definitions. % % This code to support UTF-8 is based on LaTeX's utf8.def, with some % changes for Texinfo conventions. It is included here under the GPL by % permission from Frank Mittelbach and the LaTeX team. % \newcount\countUTFx \newcount\countUTFy \newcount\countUTFz \gdef\UTFviiiTwoOctets#1#2{\expandafter \UTFviiiDefined\csname u8:#1\string #2\endcsname} % \gdef\UTFviiiThreeOctets#1#2#3{\expandafter \UTFviiiDefined\csname u8:#1\string #2\string #3\endcsname} % \gdef\UTFviiiFourOctets#1#2#3#4{\expandafter \UTFviiiDefined\csname u8:#1\string #2\string #3\string #4\endcsname} \gdef\UTFviiiDefined#1{% \ifx #1\relax \message{\linenumber Unicode char \string #1 not defined for Texinfo}% \else \expandafter #1% \fi } \begingroup \catcode`\~13 \catcode`\"12 \def\UTFviiiLoop{% \global\catcode\countUTFx\active \uccode`\~\countUTFx \uppercase\expandafter{\UTFviiiTmp}% \advance\countUTFx by 1 \ifnum\countUTFx < \countUTFy \expandafter\UTFviiiLoop \fi} \countUTFx = "C2 \countUTFy = "E0 \def\UTFviiiTmp{% \xdef~{\noexpand\UTFviiiTwoOctets\string~}} \UTFviiiLoop \countUTFx = "E0 \countUTFy = "F0 \def\UTFviiiTmp{% \xdef~{\noexpand\UTFviiiThreeOctets\string~}} \UTFviiiLoop \countUTFx = "F0 \countUTFy = "F4 \def\UTFviiiTmp{% \xdef~{\noexpand\UTFviiiFourOctets\string~}} \UTFviiiLoop \endgroup \begingroup \catcode`\"=12 \catcode`\<=12 \catcode`\.=12 \catcode`\,=12 \catcode`\;=12 \catcode`\!=12 \catcode`\~=13 \gdef\DeclareUnicodeCharacter#1#2{% \countUTFz = "#1\relax %\wlog{\space\space defining Unicode char U+#1 (decimal \the\countUTFz)}% \begingroup \parseXMLCharref \def\UTFviiiTwoOctets##1##2{% \csname u8:##1\string ##2\endcsname}% \def\UTFviiiThreeOctets##1##2##3{% \csname u8:##1\string ##2\string ##3\endcsname}% \def\UTFviiiFourOctets##1##2##3##4{% \csname u8:##1\string ##2\string ##3\string ##4\endcsname}% \expandafter\expandafter\expandafter\expandafter \expandafter\expandafter\expandafter \gdef\UTFviiiTmp{#2}% \endgroup} \gdef\parseXMLCharref{% \ifnum\countUTFz < "A0\relax \errhelp = \EMsimple \errmessage{Cannot define Unicode char value < 00A0}% \else\ifnum\countUTFz < "800\relax \parseUTFviiiA,% \parseUTFviiiB C\UTFviiiTwoOctets.,% \else\ifnum\countUTFz < "10000\relax \parseUTFviiiA;% \parseUTFviiiA,% \parseUTFviiiB E\UTFviiiThreeOctets.{,;}% \else \parseUTFviiiA;% \parseUTFviiiA,% \parseUTFviiiA!% \parseUTFviiiB F\UTFviiiFourOctets.{!,;}% \fi\fi\fi } \gdef\parseUTFviiiA#1{% \countUTFx = \countUTFz \divide\countUTFz by 64 \countUTFy = \countUTFz \multiply\countUTFz by 64 \advance\countUTFx by -\countUTFz \advance\countUTFx by 128 \uccode `#1\countUTFx \countUTFz = \countUTFy} \gdef\parseUTFviiiB#1#2#3#4{% \advance\countUTFz by "#10\relax \uccode `#3\countUTFz \uppercase{\gdef\UTFviiiTmp{#2#3#4}}} \endgroup \def\utfeightchardefs{% \DeclareUnicodeCharacter{00A0}{\tie} \DeclareUnicodeCharacter{00A1}{\exclamdown} \DeclareUnicodeCharacter{00A3}{\pounds} \DeclareUnicodeCharacter{00A8}{\"{ }} \DeclareUnicodeCharacter{00A9}{\copyright} \DeclareUnicodeCharacter{00AA}{\ordf} \DeclareUnicodeCharacter{00AB}{\guillemetleft} \DeclareUnicodeCharacter{00AD}{\-} \DeclareUnicodeCharacter{00AE}{\registeredsymbol} \DeclareUnicodeCharacter{00AF}{\={ }} \DeclareUnicodeCharacter{00B0}{\ringaccent{ }} \DeclareUnicodeCharacter{00B4}{\'{ }} \DeclareUnicodeCharacter{00B8}{\cedilla{ }} \DeclareUnicodeCharacter{00BA}{\ordm} \DeclareUnicodeCharacter{00BB}{\guillemetright} \DeclareUnicodeCharacter{00BF}{\questiondown} \DeclareUnicodeCharacter{00C0}{\`A} \DeclareUnicodeCharacter{00C1}{\'A} \DeclareUnicodeCharacter{00C2}{\^A} \DeclareUnicodeCharacter{00C3}{\~A} \DeclareUnicodeCharacter{00C4}{\"A} \DeclareUnicodeCharacter{00C5}{\AA} \DeclareUnicodeCharacter{00C6}{\AE} \DeclareUnicodeCharacter{00C7}{\cedilla{C}} \DeclareUnicodeCharacter{00C8}{\`E} \DeclareUnicodeCharacter{00C9}{\'E} \DeclareUnicodeCharacter{00CA}{\^E} \DeclareUnicodeCharacter{00CB}{\"E} \DeclareUnicodeCharacter{00CC}{\`I} \DeclareUnicodeCharacter{00CD}{\'I} \DeclareUnicodeCharacter{00CE}{\^I} \DeclareUnicodeCharacter{00CF}{\"I} \DeclareUnicodeCharacter{00D0}{\DH} \DeclareUnicodeCharacter{00D1}{\~N} \DeclareUnicodeCharacter{00D2}{\`O} \DeclareUnicodeCharacter{00D3}{\'O} \DeclareUnicodeCharacter{00D4}{\^O} \DeclareUnicodeCharacter{00D5}{\~O} \DeclareUnicodeCharacter{00D6}{\"O} \DeclareUnicodeCharacter{00D8}{\O} \DeclareUnicodeCharacter{00D9}{\`U} \DeclareUnicodeCharacter{00DA}{\'U} \DeclareUnicodeCharacter{00DB}{\^U} \DeclareUnicodeCharacter{00DC}{\"U} \DeclareUnicodeCharacter{00DD}{\'Y} \DeclareUnicodeCharacter{00DE}{\TH} \DeclareUnicodeCharacter{00DF}{\ss} \DeclareUnicodeCharacter{00E0}{\`a} \DeclareUnicodeCharacter{00E1}{\'a} \DeclareUnicodeCharacter{00E2}{\^a} \DeclareUnicodeCharacter{00E3}{\~a} \DeclareUnicodeCharacter{00E4}{\"a} \DeclareUnicodeCharacter{00E5}{\aa} \DeclareUnicodeCharacter{00E6}{\ae} \DeclareUnicodeCharacter{00E7}{\cedilla{c}} \DeclareUnicodeCharacter{00E8}{\`e} \DeclareUnicodeCharacter{00E9}{\'e} \DeclareUnicodeCharacter{00EA}{\^e} \DeclareUnicodeCharacter{00EB}{\"e} \DeclareUnicodeCharacter{00EC}{\`{\dotless{i}}} \DeclareUnicodeCharacter{00ED}{\'{\dotless{i}}} \DeclareUnicodeCharacter{00EE}{\^{\dotless{i}}} \DeclareUnicodeCharacter{00EF}{\"{\dotless{i}}} \DeclareUnicodeCharacter{00F0}{\dh} \DeclareUnicodeCharacter{00F1}{\~n} \DeclareUnicodeCharacter{00F2}{\`o} \DeclareUnicodeCharacter{00F3}{\'o} \DeclareUnicodeCharacter{00F4}{\^o} \DeclareUnicodeCharacter{00F5}{\~o} \DeclareUnicodeCharacter{00F6}{\"o} \DeclareUnicodeCharacter{00F8}{\o} \DeclareUnicodeCharacter{00F9}{\`u} \DeclareUnicodeCharacter{00FA}{\'u} \DeclareUnicodeCharacter{00FB}{\^u} \DeclareUnicodeCharacter{00FC}{\"u} \DeclareUnicodeCharacter{00FD}{\'y} \DeclareUnicodeCharacter{00FE}{\th} \DeclareUnicodeCharacter{00FF}{\"y} \DeclareUnicodeCharacter{0100}{\=A} \DeclareUnicodeCharacter{0101}{\=a} \DeclareUnicodeCharacter{0102}{\u{A}} \DeclareUnicodeCharacter{0103}{\u{a}} \DeclareUnicodeCharacter{0104}{\ogonek{A}} \DeclareUnicodeCharacter{0105}{\ogonek{a}} \DeclareUnicodeCharacter{0106}{\'C} \DeclareUnicodeCharacter{0107}{\'c} \DeclareUnicodeCharacter{0108}{\^C} \DeclareUnicodeCharacter{0109}{\^c} \DeclareUnicodeCharacter{0118}{\ogonek{E}} \DeclareUnicodeCharacter{0119}{\ogonek{e}} \DeclareUnicodeCharacter{010A}{\dotaccent{C}} \DeclareUnicodeCharacter{010B}{\dotaccent{c}} \DeclareUnicodeCharacter{010C}{\v{C}} \DeclareUnicodeCharacter{010D}{\v{c}} \DeclareUnicodeCharacter{010E}{\v{D}} \DeclareUnicodeCharacter{0112}{\=E} \DeclareUnicodeCharacter{0113}{\=e} \DeclareUnicodeCharacter{0114}{\u{E}} \DeclareUnicodeCharacter{0115}{\u{e}} \DeclareUnicodeCharacter{0116}{\dotaccent{E}} \DeclareUnicodeCharacter{0117}{\dotaccent{e}} \DeclareUnicodeCharacter{011A}{\v{E}} \DeclareUnicodeCharacter{011B}{\v{e}} \DeclareUnicodeCharacter{011C}{\^G} \DeclareUnicodeCharacter{011D}{\^g} \DeclareUnicodeCharacter{011E}{\u{G}} \DeclareUnicodeCharacter{011F}{\u{g}} \DeclareUnicodeCharacter{0120}{\dotaccent{G}} \DeclareUnicodeCharacter{0121}{\dotaccent{g}} \DeclareUnicodeCharacter{0124}{\^H} \DeclareUnicodeCharacter{0125}{\^h} \DeclareUnicodeCharacter{0128}{\~I} \DeclareUnicodeCharacter{0129}{\~{\dotless{i}}} \DeclareUnicodeCharacter{012A}{\=I} \DeclareUnicodeCharacter{012B}{\={\dotless{i}}} \DeclareUnicodeCharacter{012C}{\u{I}} \DeclareUnicodeCharacter{012D}{\u{\dotless{i}}} \DeclareUnicodeCharacter{0130}{\dotaccent{I}} \DeclareUnicodeCharacter{0131}{\dotless{i}} \DeclareUnicodeCharacter{0132}{IJ} \DeclareUnicodeCharacter{0133}{ij} \DeclareUnicodeCharacter{0134}{\^J} \DeclareUnicodeCharacter{0135}{\^{\dotless{j}}} \DeclareUnicodeCharacter{0139}{\'L} \DeclareUnicodeCharacter{013A}{\'l} \DeclareUnicodeCharacter{0141}{\L} \DeclareUnicodeCharacter{0142}{\l} \DeclareUnicodeCharacter{0143}{\'N} \DeclareUnicodeCharacter{0144}{\'n} \DeclareUnicodeCharacter{0147}{\v{N}} \DeclareUnicodeCharacter{0148}{\v{n}} \DeclareUnicodeCharacter{014C}{\=O} \DeclareUnicodeCharacter{014D}{\=o} \DeclareUnicodeCharacter{014E}{\u{O}} \DeclareUnicodeCharacter{014F}{\u{o}} \DeclareUnicodeCharacter{0150}{\H{O}} \DeclareUnicodeCharacter{0151}{\H{o}} \DeclareUnicodeCharacter{0152}{\OE} \DeclareUnicodeCharacter{0153}{\oe} \DeclareUnicodeCharacter{0154}{\'R} \DeclareUnicodeCharacter{0155}{\'r} \DeclareUnicodeCharacter{0158}{\v{R}} \DeclareUnicodeCharacter{0159}{\v{r}} \DeclareUnicodeCharacter{015A}{\'S} \DeclareUnicodeCharacter{015B}{\'s} \DeclareUnicodeCharacter{015C}{\^S} \DeclareUnicodeCharacter{015D}{\^s} \DeclareUnicodeCharacter{015E}{\cedilla{S}} \DeclareUnicodeCharacter{015F}{\cedilla{s}} \DeclareUnicodeCharacter{0160}{\v{S}} \DeclareUnicodeCharacter{0161}{\v{s}} \DeclareUnicodeCharacter{0162}{\cedilla{t}} \DeclareUnicodeCharacter{0163}{\cedilla{T}} \DeclareUnicodeCharacter{0164}{\v{T}} \DeclareUnicodeCharacter{0168}{\~U} \DeclareUnicodeCharacter{0169}{\~u} \DeclareUnicodeCharacter{016A}{\=U} \DeclareUnicodeCharacter{016B}{\=u} \DeclareUnicodeCharacter{016C}{\u{U}} \DeclareUnicodeCharacter{016D}{\u{u}} \DeclareUnicodeCharacter{016E}{\ringaccent{U}} \DeclareUnicodeCharacter{016F}{\ringaccent{u}} \DeclareUnicodeCharacter{0170}{\H{U}} \DeclareUnicodeCharacter{0171}{\H{u}} \DeclareUnicodeCharacter{0174}{\^W} \DeclareUnicodeCharacter{0175}{\^w} \DeclareUnicodeCharacter{0176}{\^Y} \DeclareUnicodeCharacter{0177}{\^y} \DeclareUnicodeCharacter{0178}{\"Y} \DeclareUnicodeCharacter{0179}{\'Z} \DeclareUnicodeCharacter{017A}{\'z} \DeclareUnicodeCharacter{017B}{\dotaccent{Z}} \DeclareUnicodeCharacter{017C}{\dotaccent{z}} \DeclareUnicodeCharacter{017D}{\v{Z}} \DeclareUnicodeCharacter{017E}{\v{z}} \DeclareUnicodeCharacter{01C4}{D\v{Z}} \DeclareUnicodeCharacter{01C5}{D\v{z}} \DeclareUnicodeCharacter{01C6}{d\v{z}} \DeclareUnicodeCharacter{01C7}{LJ} \DeclareUnicodeCharacter{01C8}{Lj} \DeclareUnicodeCharacter{01C9}{lj} \DeclareUnicodeCharacter{01CA}{NJ} \DeclareUnicodeCharacter{01CB}{Nj} \DeclareUnicodeCharacter{01CC}{nj} \DeclareUnicodeCharacter{01CD}{\v{A}} \DeclareUnicodeCharacter{01CE}{\v{a}} \DeclareUnicodeCharacter{01CF}{\v{I}} \DeclareUnicodeCharacter{01D0}{\v{\dotless{i}}} \DeclareUnicodeCharacter{01D1}{\v{O}} \DeclareUnicodeCharacter{01D2}{\v{o}} \DeclareUnicodeCharacter{01D3}{\v{U}} \DeclareUnicodeCharacter{01D4}{\v{u}} \DeclareUnicodeCharacter{01E2}{\={\AE}} \DeclareUnicodeCharacter{01E3}{\={\ae}} \DeclareUnicodeCharacter{01E6}{\v{G}} \DeclareUnicodeCharacter{01E7}{\v{g}} \DeclareUnicodeCharacter{01E8}{\v{K}} \DeclareUnicodeCharacter{01E9}{\v{k}} \DeclareUnicodeCharacter{01F0}{\v{\dotless{j}}} \DeclareUnicodeCharacter{01F1}{DZ} \DeclareUnicodeCharacter{01F2}{Dz} \DeclareUnicodeCharacter{01F3}{dz} \DeclareUnicodeCharacter{01F4}{\'G} \DeclareUnicodeCharacter{01F5}{\'g} \DeclareUnicodeCharacter{01F8}{\`N} \DeclareUnicodeCharacter{01F9}{\`n} \DeclareUnicodeCharacter{01FC}{\'{\AE}} \DeclareUnicodeCharacter{01FD}{\'{\ae}} \DeclareUnicodeCharacter{01FE}{\'{\O}} \DeclareUnicodeCharacter{01FF}{\'{\o}} \DeclareUnicodeCharacter{021E}{\v{H}} \DeclareUnicodeCharacter{021F}{\v{h}} \DeclareUnicodeCharacter{0226}{\dotaccent{A}} \DeclareUnicodeCharacter{0227}{\dotaccent{a}} \DeclareUnicodeCharacter{0228}{\cedilla{E}} \DeclareUnicodeCharacter{0229}{\cedilla{e}} \DeclareUnicodeCharacter{022E}{\dotaccent{O}} \DeclareUnicodeCharacter{022F}{\dotaccent{o}} \DeclareUnicodeCharacter{0232}{\=Y} \DeclareUnicodeCharacter{0233}{\=y} \DeclareUnicodeCharacter{0237}{\dotless{j}} \DeclareUnicodeCharacter{02DB}{\ogonek{ }} \DeclareUnicodeCharacter{1E02}{\dotaccent{B}} \DeclareUnicodeCharacter{1E03}{\dotaccent{b}} \DeclareUnicodeCharacter{1E04}{\udotaccent{B}} \DeclareUnicodeCharacter{1E05}{\udotaccent{b}} \DeclareUnicodeCharacter{1E06}{\ubaraccent{B}} \DeclareUnicodeCharacter{1E07}{\ubaraccent{b}} \DeclareUnicodeCharacter{1E0A}{\dotaccent{D}} \DeclareUnicodeCharacter{1E0B}{\dotaccent{d}} \DeclareUnicodeCharacter{1E0C}{\udotaccent{D}} \DeclareUnicodeCharacter{1E0D}{\udotaccent{d}} \DeclareUnicodeCharacter{1E0E}{\ubaraccent{D}} \DeclareUnicodeCharacter{1E0F}{\ubaraccent{d}} \DeclareUnicodeCharacter{1E1E}{\dotaccent{F}} \DeclareUnicodeCharacter{1E1F}{\dotaccent{f}} \DeclareUnicodeCharacter{1E20}{\=G} \DeclareUnicodeCharacter{1E21}{\=g} \DeclareUnicodeCharacter{1E22}{\dotaccent{H}} \DeclareUnicodeCharacter{1E23}{\dotaccent{h}} \DeclareUnicodeCharacter{1E24}{\udotaccent{H}} \DeclareUnicodeCharacter{1E25}{\udotaccent{h}} \DeclareUnicodeCharacter{1E26}{\"H} \DeclareUnicodeCharacter{1E27}{\"h} \DeclareUnicodeCharacter{1E30}{\'K} \DeclareUnicodeCharacter{1E31}{\'k} \DeclareUnicodeCharacter{1E32}{\udotaccent{K}} \DeclareUnicodeCharacter{1E33}{\udotaccent{k}} \DeclareUnicodeCharacter{1E34}{\ubaraccent{K}} \DeclareUnicodeCharacter{1E35}{\ubaraccent{k}} \DeclareUnicodeCharacter{1E36}{\udotaccent{L}} \DeclareUnicodeCharacter{1E37}{\udotaccent{l}} \DeclareUnicodeCharacter{1E3A}{\ubaraccent{L}} \DeclareUnicodeCharacter{1E3B}{\ubaraccent{l}} \DeclareUnicodeCharacter{1E3E}{\'M} \DeclareUnicodeCharacter{1E3F}{\'m} \DeclareUnicodeCharacter{1E40}{\dotaccent{M}} \DeclareUnicodeCharacter{1E41}{\dotaccent{m}} \DeclareUnicodeCharacter{1E42}{\udotaccent{M}} \DeclareUnicodeCharacter{1E43}{\udotaccent{m}} \DeclareUnicodeCharacter{1E44}{\dotaccent{N}} \DeclareUnicodeCharacter{1E45}{\dotaccent{n}} \DeclareUnicodeCharacter{1E46}{\udotaccent{N}} \DeclareUnicodeCharacter{1E47}{\udotaccent{n}} \DeclareUnicodeCharacter{1E48}{\ubaraccent{N}} \DeclareUnicodeCharacter{1E49}{\ubaraccent{n}} \DeclareUnicodeCharacter{1E54}{\'P} \DeclareUnicodeCharacter{1E55}{\'p} \DeclareUnicodeCharacter{1E56}{\dotaccent{P}} \DeclareUnicodeCharacter{1E57}{\dotaccent{p}} \DeclareUnicodeCharacter{1E58}{\dotaccent{R}} \DeclareUnicodeCharacter{1E59}{\dotaccent{r}} \DeclareUnicodeCharacter{1E5A}{\udotaccent{R}} \DeclareUnicodeCharacter{1E5B}{\udotaccent{r}} \DeclareUnicodeCharacter{1E5E}{\ubaraccent{R}} \DeclareUnicodeCharacter{1E5F}{\ubaraccent{r}} \DeclareUnicodeCharacter{1E60}{\dotaccent{S}} \DeclareUnicodeCharacter{1E61}{\dotaccent{s}} \DeclareUnicodeCharacter{1E62}{\udotaccent{S}} \DeclareUnicodeCharacter{1E63}{\udotaccent{s}} \DeclareUnicodeCharacter{1E6A}{\dotaccent{T}} \DeclareUnicodeCharacter{1E6B}{\dotaccent{t}} \DeclareUnicodeCharacter{1E6C}{\udotaccent{T}} \DeclareUnicodeCharacter{1E6D}{\udotaccent{t}} \DeclareUnicodeCharacter{1E6E}{\ubaraccent{T}} \DeclareUnicodeCharacter{1E6F}{\ubaraccent{t}} \DeclareUnicodeCharacter{1E7C}{\~V} \DeclareUnicodeCharacter{1E7D}{\~v} \DeclareUnicodeCharacter{1E7E}{\udotaccent{V}} \DeclareUnicodeCharacter{1E7F}{\udotaccent{v}} \DeclareUnicodeCharacter{1E80}{\`W} \DeclareUnicodeCharacter{1E81}{\`w} \DeclareUnicodeCharacter{1E82}{\'W} \DeclareUnicodeCharacter{1E83}{\'w} \DeclareUnicodeCharacter{1E84}{\"W} \DeclareUnicodeCharacter{1E85}{\"w} \DeclareUnicodeCharacter{1E86}{\dotaccent{W}} \DeclareUnicodeCharacter{1E87}{\dotaccent{w}} \DeclareUnicodeCharacter{1E88}{\udotaccent{W}} \DeclareUnicodeCharacter{1E89}{\udotaccent{w}} \DeclareUnicodeCharacter{1E8A}{\dotaccent{X}} \DeclareUnicodeCharacter{1E8B}{\dotaccent{x}} \DeclareUnicodeCharacter{1E8C}{\"X} \DeclareUnicodeCharacter{1E8D}{\"x} \DeclareUnicodeCharacter{1E8E}{\dotaccent{Y}} \DeclareUnicodeCharacter{1E8F}{\dotaccent{y}} \DeclareUnicodeCharacter{1E90}{\^Z} \DeclareUnicodeCharacter{1E91}{\^z} \DeclareUnicodeCharacter{1E92}{\udotaccent{Z}} \DeclareUnicodeCharacter{1E93}{\udotaccent{z}} \DeclareUnicodeCharacter{1E94}{\ubaraccent{Z}} \DeclareUnicodeCharacter{1E95}{\ubaraccent{z}} \DeclareUnicodeCharacter{1E96}{\ubaraccent{h}} \DeclareUnicodeCharacter{1E97}{\"t} \DeclareUnicodeCharacter{1E98}{\ringaccent{w}} \DeclareUnicodeCharacter{1E99}{\ringaccent{y}} \DeclareUnicodeCharacter{1EA0}{\udotaccent{A}} \DeclareUnicodeCharacter{1EA1}{\udotaccent{a}} \DeclareUnicodeCharacter{1EB8}{\udotaccent{E}} \DeclareUnicodeCharacter{1EB9}{\udotaccent{e}} \DeclareUnicodeCharacter{1EBC}{\~E} \DeclareUnicodeCharacter{1EBD}{\~e} \DeclareUnicodeCharacter{1ECA}{\udotaccent{I}} \DeclareUnicodeCharacter{1ECB}{\udotaccent{i}} \DeclareUnicodeCharacter{1ECC}{\udotaccent{O}} \DeclareUnicodeCharacter{1ECD}{\udotaccent{o}} \DeclareUnicodeCharacter{1EE4}{\udotaccent{U}} \DeclareUnicodeCharacter{1EE5}{\udotaccent{u}} \DeclareUnicodeCharacter{1EF2}{\`Y} \DeclareUnicodeCharacter{1EF3}{\`y} \DeclareUnicodeCharacter{1EF4}{\udotaccent{Y}} \DeclareUnicodeCharacter{1EF8}{\~Y} \DeclareUnicodeCharacter{1EF9}{\~y} \DeclareUnicodeCharacter{2013}{--} \DeclareUnicodeCharacter{2014}{---} \DeclareUnicodeCharacter{2018}{\quoteleft} \DeclareUnicodeCharacter{2019}{\quoteright} \DeclareUnicodeCharacter{201A}{\quotesinglbase} \DeclareUnicodeCharacter{201C}{\quotedblleft} \DeclareUnicodeCharacter{201D}{\quotedblright} \DeclareUnicodeCharacter{201E}{\quotedblbase} \DeclareUnicodeCharacter{2022}{\bullet} \DeclareUnicodeCharacter{2026}{\dots} \DeclareUnicodeCharacter{2039}{\guilsinglleft} \DeclareUnicodeCharacter{203A}{\guilsinglright} \DeclareUnicodeCharacter{20AC}{\euro} \DeclareUnicodeCharacter{2192}{\expansion} \DeclareUnicodeCharacter{21D2}{\result} \DeclareUnicodeCharacter{2212}{\minus} \DeclareUnicodeCharacter{2217}{\point} \DeclareUnicodeCharacter{2261}{\equiv} }% end of \utfeightchardefs % US-ASCII character definitions. \def\asciichardefs{% nothing need be done \relax } % Make non-ASCII characters printable again for compatibility with % existing Texinfo documents that may use them, even without declaring a % document encoding. % \setnonasciicharscatcode \other \message{formatting,} \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 very finicky about underfull hboxes, either. \hbadness = 6666 % Following George Bush, 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 % if we don't reset these, they will remain at "1 true in" of % whatever layout pdftex was dumped with. \pdfhorigin = 1 true in \pdfvorigin = 1 true in \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{607.2pt}{6in}% that's 46 lines {\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}% {-.2in}{0in}% {\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{673.2pt}{160mm}% that's 51 lines {\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\relax \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.} \def^^L{\par} % remove \outer, so ^L can appear in an @comment % DEL is a comment character, in case @c does not suffice. \catcode`\^^? = 14 % Define macros to output various characters with catcode for normal text. \catcode`\"=\other \def\normaldoublequote{"} \catcode`\$=\other \def\normaldollar{$}%$ font-lock fix \catcode`\+=\other \def\normalplus{+} \catcode`\<=\other \def\normalless{<} \catcode`\>=\other \def\normalgreater{>} \catcode`\^=\other \def\normalcaret{^} \catcode`\_=\other \def\normalunderscore{_} \catcode`\|=\other \def\normalverticalbar{|} \catcode`\~=\other \def\normaltilde{~} % 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} % Used sometimes to turn off (effectively) the active characters even after % parsing them. \def\turnoffactive{% \normalturnoffactive \otherbackslash } \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 % \realbackslash is an actual character `\' with catcode other, and % \doublebackslash is two of them (for the pdf outlines). {\catcode`\\=\other @gdef@realbackslash{\} @gdef@doublebackslash{\\}} % In texinfo, backslash is an active character; it prints the backslash % in fixed width font. \catcode`\\=\active % @ for escape char from now on. % The story here is that in math mode, the \char of \backslashcurfont % ends up printing the roman \ from the math symbol font (because \char % in math mode uses the \mathcode, and plain.tex sets % \mathcode`\\="026E). It seems better for @backslashchar{} to always % print a typewriter backslash, hence we use an explicit \mathchar, % which is the decimal equivalent of "715c (class 7, e.g., use \fam; % ignored family value; char position "5C). We can't use " for the % usual hex value because it has already been made active. @def@normalbackslash{{@tt @ifmmode @mathchar29020 @else @backslashcurfont @fi}} @let@backslashchar = @normalbackslash % @backslashchar{} is for user documents. % On startup, @fixbackslash assigns: % @let \ = @normalbackslash % \rawbackslash defines an active \ to do \backslashcurfont. % \otherbackslash defines an active \ to be a literal `\' character with % catcode other. We switch back and forth between these. @gdef@rawbackslash{@let\=@backslashcurfont} @gdef@otherbackslash{@let\=@realbackslash} % Same as @turnoffactive except outputs \ as {\tt\char`\\} instead of % the literal character `\'. % @def@normalturnoffactive{% @let"=@normaldoublequote @let$=@normaldollar %$ font-lock fix @let+=@normalplus @let<=@normalless @let>=@normalgreater @let\=@normalbackslash @let^=@normalcaret @let_=@normalunderscore @let|=@normalverticalbar @let~=@normaltilde @markupsetuplqdefault @markupsetuprqdefault @unsepspaces } % 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 (along with & and #) are made active for url-breaking, so need % active definitions as the normal characters. @def@normaldot{.} @def@normalquest{?} @def@normalslash{/} % These look ok in all fonts, so just make them not special. % @hashchar{} gets its own user-level command, because of #line. @catcode`@& = @other @def@normalamp{&} @catcode`@# = @other @def@normalhash{#} @catcode`@% = @other @def@normalpercent{%} @let @hashchar = @normalhash @c Finally, make ` and ' active, so that txicodequoteundirected and @c txicodequotebacktick work right in, e.g., @w{@code{`foo'}}. If we @c don't make ` and ' active, @code will not get them as active chars. @c Do this last of all since we use ` in the previous @catcode assignments. @catcode`@'=@active @catcode`@`=@active @markupsetuplqdefault @markupsetuprqdefault @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 riece-9.0.0/doc/Makefile.am0000664000076400007640000000063411501626052012344 00000000000000AUTOMAKE_OPTIONS = -Wno-portability 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 SUFFIXES = .texi .info .texi.info: $(EMACS) -batch -q -no-site-file -l $(srcdir)/infohack.el $(srcdir) \ -f batch-makeinfo $< riece-9.0.0/doc/version-ja.texi0000664000076400007640000000013311761025303013252 00000000000000@set UPDATED 28 May 2010 @set UPDATED-MONTH May 2010 @set EDITION 9.0.0 @set VERSION 9.0.0 riece-9.0.0/doc/riece-en.info0000664000076400007640000003510211761025304012653 00000000000000Info file: riece-en.info, -*-Text-*- produced by `texinfo-format-buffer' from file `riece-en.texi' using `texinfmt.el' version 2.42 of 7 Jul 2006. INFO-DIR-SECTION GNU Emacs Lisp START-INFO-DIR-ENTRY * Riece-en: (riece-en). An IRC client for Emacsen END-INFO-DIR-ENTRY This file describes Riece. Copyright (C) 2003,2004,2005,2006,2007,2008,2009 Daiki Ueno. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License".  File: riece-en.info, Node: Top, Next: Overview, Prev: (dir), Up: (dir) Riece user's manual ******************* This manual documents Riece version 9.0.0. In addition to this manual, you may find useful information about Riece from Riece's official home page `http://www.nongnu.org/riece/'. * Menu: * Overview:: Read me first. * Getting started:: Let's start chatting with other people. * Basic usage:: * Index:: * Function Index:: * Variable Index::  File: riece-en.info, Node: Overview, Next: Getting started, Prev: Top, Up: Top 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: * Several IRC servers may be used at the same time. * Many features built upon the extension mechanism called add-on. Currently 30 such add-ons are available. * Installation is easy. Riece doesn't depend on other packages. * Setup is easy. Automatically save/restore the configuration. * Step-by-step instructions are included. * Mostly compliant with the latest IRC client protocol (RFC 2812).  File: riece-en.info, Node: Getting started, Next: Basic usage, Prev: Overview, Up: Top Getting started *************** To start Riece, follow the instruction below: 1. `M-x load-library riece' 2. `M-x riece' In case that `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: * http://www.ircnet.jp * http://freenode.net You may see the following message: Nickname "ueno" already in use. Choose a new one: In IRC, users are identified by *nicknames*. If the nickname you selected has already used by another person, you must select the new one. In IRC, users join the *channels* to start multi user conversation. To join a channel, type `C-c j'. On IRCnet, there is a channel named `#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: +-----+-----------------+ | | | | | | | (1) | (2) | | | | | | | +-----+-----------------+ | | (4) | | +-----------------+ | (3) | | | | (5) | | | | +-----+-----------------+ You can send messages by entering messages in (4). Messages from other persons are shown in (2).  File: riece-en.info, Node: Basic usage, Next: Index, Prev: Getting started, Up: Top Basic usage *********** To start Riece, you just type `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: * http://irc.kyoto-u.ac.jp * http://freenode.net If your nickname is taken, you will be asked to use different one. The initial nickname can be set via the variable `riece-nickname'. By default, your nickname is generated from your login name. After successfully connecting to an IRC server, you can join a channel and talk with people there. To join a channel, type `C-c j'. By the way there is a channel called `#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::  File: riece-en.info, Node: Windows, Next: Indicators, Prev: Basic usage, Up: Basic usage Windows ======= By default, Riece uses 5 windows to inform user of his status: +-----+-----------------+ | | | | | | | (1) | (2) | | | | | | | +-----+-----------------+ | | (4) | | +-----------------+ | (3) | | | | (5) | | | | +-----+-----------------+ Each window is used for different purpose: 1. "user list window" (`*Users XXX*'). Users on the current channel are listed in this window. 2. "channel window" (`*Channel XXX*'). This window keeps dialogues on the current channel. 3. "channel list window" (`*Channels*'). All channels you are joined are listed in this window. 4. "command window" (`*Commands*'). This window is used for either sending messages or issueing commands. 5. "others buffer" (`*Others*'). This window displays dialogues on channels except the current channel.  File: riece-en.info, Node: Indicators, Next: Commands, Prev: Windows, Up: Basic usage Indicators ========== Indicators are characters which indicate your status. Usually they are put on the left side of the modeline like: Riece: -- ueno #Riece [n] In this case, `---' are indicators. From left to right their meanings are: 1. You are not "away". (If you marked yourself as "away", it would be `A') 2. You are not an IRC operator. (If you entered operator mode, it would be `O') 3. The channel window is not locked. (If it was locked, it would be `F'. If it was locked until next send, it would be `f')  File: riece-en.info, Node: Commands, Next: Connecting to multiple servers, Prev: Indicators, Up: Basic usage Commands ======== The buffer used for sending messages is called "command buffer". You can issue various commands from the command buffer. IRC commands ------------ `RET' Send the current line. (`riece-command-enter-message') `C-RET' Send the current line as NOTICE. (`riece-command-enter-message-as-notice') `C-c j' Join a channel. (`riece-command-join') `C-c C-p' Part from a channel. (`riece-command-part') `C-c p' Send the current line to particular user. (`riece-command-enter-message-to-user') `C-c q' Quit from IRC. (`riece-command-quit') `C-c n' Change your nickname. (`riece-command-change-nickname') `C-c f' Get information of a user. (`riece-command-finger') `C-c C-k' Kick a user from the current channel. (`riece-command-kick') `C-c i' Invite a user to the current channel. (`riece-command-invite') `C-c l' Issue a LIST command with specified pattern. (`riece-command-list') `C-c C-n' Issue a NAMES command with specified pattern. (`riece-command-names') `C-c w' Issue a WHO command with specified pattern. (`riece-command-who') `C-c t' Set topic of the current channel. (`riece-command-topic') `C-c C-m' Change the mode of the current channel. (`riece-command-change-mode') `C-c o' Assign channel operator privilege to a user. If a prefix argument (`C-u') is given, remove the privilege from a user. (`riece-command-set-operators') `C-c v' Allow a user to speak in the current channel. If a prefix argument (`C-u') is given, disallow a user to speak. (`riece-command-set-speakers') `C-c V' Display version number of Riece. If a prefix argument (`C-u') is given, use User-Agent format. `C-c /' Send raw IRC command. (`riece-command-raw') Window manipulating commands ---------------------------- `C-c r' Redraw windows. (`riece-command-configure-windows') `C-c C-j' Switch to the next channel in the channel list. (`riece-command-next-channel') `C-c <' Switch to the previous channel in the channel list. (`riece-command-previous-channel') `C-c >' Switch to the next channel in the channel list. (`riece-command-next-channel') `C-c ^' Browse add-ons currently insinuated. (`riece-command-list-addons') `C-c digit' Switch to Nth channel in the channel list. (`riece-command-switch-to-channel-by-number') `C-c C-c digit' Switch to N + 10th channel in the channel list. (`riece-command-switch-to-channel-by-number') `C-c Home' Move point to the beginning of the buffer in the channel window. (`riece-command-beginning-of-buffer') `C-c $' Move point to the end of the buffer in the channel window. (`riece-command-end-of-buffer') `C-c SPC' Scroll text of the channel window up. (`riece-command-scroll-up') `C-c DEL' Scroll text of the channel window down. (`riece-command-scroll-down') Status toggle commands ---------------------- `C-c C-t c' Toggle visibility of the channel window. (`riece-command-toggle-channel-buffer-mode') `C-c C-t C' Toggle visibility of the channel list window. (`riece-command-toggle-channel-list-buffer-mode') `C-c C-t u' Toggle visibility of the user list window. (`riece-command-toggle-user-list-buffer-mode') `C-c C-t f' Disable scrolling of the channel window. (`riece-command-toggle-freeze') `C-c C-t o' Disable scrolling of the channel window until next send. (`riece-command-toggle-own-freeze') `C-c C-t a' Mark or unmark yourself as "away". (`riece-command-toggle-away')  File: riece-en.info, Node: Connecting to multiple servers, Prev: Commands, Up: Basic usage 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: 1. Type `C-c O' (`riece-command-open-server'), and then you will be asked the server name. 2. Type `C-c j' (`riece-command-join') to join a channel. Here the server name follows the channel name. To input a space character, use `C-q'. For example, if you want to join the channel `#Riece' on the server `irc6', type `C-c j #Riece C-q SPC irc6'. If you want to send IRC command without joinning a channel, `C-c M' (`riece-command-universal-server-name-argument') may be useful. Commands used for connection management are listed below: `C-c O' Connect to the foreign server. (`riece-command-open-server') `C-c C' Close the connection to the server. (`riece-command-close-server') `C-c M' Issue a command on the specified server. (`riece-command-universal-server-name-argument')  File: riece-en.info, Node: Index, Next: Function Index, Prev: Basic usage, Up: Top Index ***** * Menu:  File: riece-en.info, Node: Function Index, Next: Variable Index, Prev: Index, Up: Top Function Index ************** * Menu: * riece-command-beginning-of-buffer: Commands. (line 93) * riece-command-change-mode: Commands. (line 60) * riece-command-change-nickname: Commands. (line 34) * riece-command-close-server: Connecting to multiple servers. (line 31) * riece-command-configure-windows: Commands. (line 66) * riece-command-end-of-buffer: Commands. (line 97) * riece-command-enter-message: Commands. (line 14) * riece-command-enter-message-as-notice: Commands. (line 17) * riece-command-enter-message-to-user: Commands. (line 27) * riece-command-finger: Commands. (line 37) * riece-command-invite: Commands. (line 43) * riece-command-join: Commands. (line 21) * riece-command-kick: Commands. (line 40) * riece-command-list: Commands. (line 46) * riece-command-list-addons: Commands. (line 81) * riece-command-names: Commands. (line 50) * riece-command-next-channel: Commands. (line 69) * riece-command-next-channel: Commands. (line 77) * riece-command-open-server: Connecting to multiple servers. (line 28) * riece-command-part: Commands. (line 24) * riece-command-previous-channel: Commands. (line 73) * riece-command-quit: Commands. (line 31) * riece-command-raw: Commands. (line 78) * riece-command-scroll-down: Commands. (line 104) * riece-command-scroll-up: Commands. (line 101) * riece-command-set-operators: Commands. (line 64) * riece-command-set-speakers: Commands. (line 69) * riece-command-switch-to-channel-by-number: Commands. (line 85) * riece-command-switch-to-channel-by-number: Commands. (line 89) * riece-command-toggle-away: Commands. (line 121) * riece-command-toggle-channel-buffer-mode: Commands. (line 101) * riece-command-toggle-channel-list-buffer-mode: Commands. (line 105) * riece-command-toggle-freeze: Commands. (line 113) * riece-command-toggle-own-freeze: Commands. (line 117) * riece-command-toggle-user-list-buffer-mode: Commands. (line 109) * riece-command-topic: Commands. (line 57) * riece-command-universal-server-name-argument: Connecting to multiple servers. (line 35) * riece-command-who: Commands. (line 54) * riece-version: Commands. (line 74)  File: riece-en.info, Node: Variable Index, Prev: Function Index, Up: Top Variable Index ************** * Menu: * riece-nickname: Basic usage. (line 18)  Tag table: Node: Top754 Node: Overview1243 Node: Getting started1951 Node: Basic usage3683 Node: Windows4784 Node: Indicators5943 Node: Commands6586 Node: Connecting to multiple servers10327 Node: Index11542 Node: Function Index11652 Node: Variable Index14444  End tag table