NOTE: This patch has been committed.
xemacs-packages source patch:
Diff command: cvs -q diff -u
Files affected: xemacs-packages/riece/lisp/riece.el xemacs-packages/riece/lisp/riece-xemacs.el xemacs-packages/riece/lisp/riece-version.el xemacs-packages/riece/lisp/riece-url.el xemacs-packages/riece/lisp/riece-server.el xemacs-packages/riece/lisp/riece-rdcc.el xemacs-packages/riece/lisp/riece-options.el xemacs-packages/riece/lisp/riece-misc.el xemacs-packages/riece/lisp/riece-mini.el xemacs-packages/riece/lisp/riece-log.el xemacs-packages/riece/lisp/riece-globals.el xemacs-packages/riece/lisp/riece-emacs.el xemacs-packages/riece/lisp/riece-display.el xemacs-packages/riece/lisp/riece-biff.el xemacs-packages/riece/lisp/riece-alias.el xemacs-packages/riece/lisp/riece-300.el xemacs-packages/riece/lisp/Makefile.am xemacs-packages/riece/lisp/COMPILE xemacs-packages/riece/lisp/.cvsignore xemacs-packages/riece/doc/riece-ja.texi xemacs-packages/riece/doc/irchat-copyright.el xemacs-packages/riece/package-info.in xemacs-packages/riece/configure.ac xemacs-packages/riece/Makefile
Index: xemacs-packages/riece/ChangeLog
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/riece/ChangeLog,v
retrieving revision 1.12
diff -u -F^( -u -r1.12 ChangeLog
--- xemacs-packages/riece/ChangeLog 6 Sep 2004 11:33:55 -0000 1.12
+++ xemacs-packages/riece/ChangeLog 5 Dec 2004 04:07:54 -0000
@@ -1,3 +1,18 @@
+2004-12-05 Daiki Ueno <ueno(a)unixuser.org>
+
+ * Riece: Version 1.0.6 released.
+ * configure.ac: Bump up version to 1.0.6.
+
+2004-11-07 Daiki Ueno <ueno(a)unixuser.org>
+
+ * Riece: Version 1.0.5 released.
+ * configure.ac: Bump up version to 1.0.5.
+
+2004-10-11 Daiki Ueno <ueno(a)unixuser.org>
+
+ * Riece: Version 1.0.4 released.
+ * configure.ac: Bump up version to 1.0.4.
+
2004-09-06 Norbert Koch <viteno(a)xemacs.org>
* Makefile (VERSION): XEmacs package 1.16 released.
Index: xemacs-packages/riece/Makefile
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/riece/Makefile,v
retrieving revision 1.12
diff -u -F^( -u -r1.12 Makefile
--- xemacs-packages/riece/Makefile 6 Sep 2004 11:33:55 -0000 1.12
+++ xemacs-packages/riece/Makefile 5 Dec 2004 04:07:54 -0000
@@ -20,7 +20,7 @@
# This XEmacs package contains the riece IRC client package
VERSION = 1.16
-AUTHOR_VERSION = 1.0.3
+AUTHOR_VERSION = 1.0.6
MAINTAINER = Daiki Ueno <ueno(a)unixuser.org>
PACKAGE = riece
PKG_TYPE = regular
@@ -46,13 +46,14 @@
lisp/riece-keyword.elc lisp/riece-menu.elc lisp/riece-icon.elc \
lisp/riece-async.elc lisp/riece-lsdb.elc lisp/riece-xface.elc \
lisp/riece-ctlseq.elc lisp/riece-ignore.elc lisp/riece-hangman.elc \
- lisp/riece-biff.elc lisp/riece-kakasi.elc
+ lisp/riece-biff.elc lisp/riece-kakasi.elc lisp/riece-yank.elc
-EXTRA_SOURCES = lisp/riece-emacs.el lisp/riece-skk-kakutei.el
+EXTRA_SOURCES = lisp/riece-emacs.el lisp/riece-skk-kakutei.el lisp/url-riece.el
AUTOLOAD_PATH = lisp
+EXPLICIT_DOCS = doc/riece-en.texi
ifeq ($(BUILD_WITHOUT_MULE),)
-EXPLICIT_DOCS = doc/riece-ja.texi
+EXPLICIT_DOCS += doc/riece-ja.texi
ELCS += lisp/riece-skk-kakutei.elc
endif
Index: xemacs-packages/riece/configure.ac
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/riece/configure.ac,v
retrieving revision 1.4
diff -u -F^( -u -r1.4 configure.ac
--- xemacs-packages/riece/configure.ac 5 Sep 2004 09:04:14 -0000 1.4
+++ xemacs-packages/riece/configure.ac 5 Dec 2004 04:07:54 -0000
@@ -1,6 +1,6 @@
AC_INIT(configure.ac)
AC_PREREQ(2.50)
-AM_INIT_AUTOMAKE(riece, 1.0.3)
+AM_INIT_AUTOMAKE(riece, 1.0.6)
AC_ISC_POSIX
AC_PROG_INSTALL
@@ -14,4 +14,5 @@
AC_OUTPUT(Makefile \
lisp/Makefile
+lisp/test/Makefile
doc/Makefile)
Index: xemacs-packages/riece/package-info.in
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/riece/package-info.in,v
retrieving revision 1.2
diff -u -F^( -u -r1.2 package-info.in
--- xemacs-packages/riece/package-info.in 5 Sep 2004 09:04:14 -0000 1.2
+++ xemacs-packages/riece/package-info.in 5 Dec 2004 04:07:54 -0000
@@ -13,7 +13,7 @@ (riece
filename FILENAME
md5sum MD5SUM
size SIZE
- provides (riece-compat riece-xemacs riece-globals riece-options riece-version riece-coding riece-complete riece-addon riece-mode riece-identity riece-channel riece-user riece-misc riece-signal riece-layout riece-display riece-server riece-naming riece-message riece-filter riece-handle riece-000 riece-200 riece-300 riece-400 riece-500 riece-commands riece-irc riece riece-ctcp riece-highlight riece-log riece-mini riece-rdcc riece-url riece-unread riece-doctor riece-alias riece-foolproof riece-guess riece-history riece-button riece-keyword riece-menu riece-icon riece-async riece-lsdb riece-xface riece-ctlseq riece-ignore riece-hangman riece-biff riece-kakasi)
+ provides (riece-compat riece-xemacs riece-globals riece-options riece-version riece-coding riece-complete riece-addon riece-mode riece-identity riece-channel riece-user rIndex: xemacs-packages/riece/doc/Makefile.am
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/riece/doc/Makefile.am,v
retrieving revision 1.1.1.1
diff -u -F^( -u -r1.1.1.1 Makefile.am
--- xemacs-packages/riece/doc/Makefile.am 25 Oct 2003 09:25:38 -0000 1.1.1.1
+++ xemacs-packages/riece/doc/Makefile.am 5 Dec 2004 04:07:54 -0000
@@ -1,7 +1,6 @@
EXTRA_DIST = texinfo.tex infohack.el ptexinfmt.el irchat-copyright.el
-info_TEXINFOS = riece-ja.texi
-riece_ja_TEXINFOS = fdl.texi
+info_TEXINFOS = riece-ja.texi riece-en.texi
package: all
$(MAKE) EMACS=$(XEMACS)
@@ -9,5 +8,5 @@
install-package: package
$(MAKE) infodir=$(PACKAGEDIR)/info install
-%-ja.info: %-ja.texi
+%.info: %.texi
$(EMACS) -batch -q -no-site-file -l ./infohack.el -f batch-makeinfo $<
Index: xemacs-packages/riece/doc/irchat-copyright.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/riece/doc/irchat-copyright.el,v
retrieving revision 1.3
diff -u -F^( -u -r1.3 irchat-copyright.el
--- xemacs-packages/riece/doc/irchat-copyright.el 5 Sep 2004 09:04:18 -0000 1.3
+++ xemacs-packages/riece/doc/irchat-copyright.el 5 Dec 2004 04:07:54 -0000
@@ -1,9 +1,9 @@
;;; -*- emacs-lisp -*-
;;;
-;;; $Id: irchat-copyright.el,v 1.3 2004/09/05 09:04:18 daiki Exp $
+;;; $Id: irchat-copyright.el,v 1.1 2003/10/22 20:07:07 ueno Exp $
;;;
(defvar irchat-copyright "
- $Id: irchat-copyright.el,v 1.3 2004/09/05 09:04:18 daiki Exp $
+ $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
@@ -49,9 +49,6 @@ (defvar irchat-copyright "
;;;
;;; $Log: irchat-copyright.el,v $
-;;; Revision 1.3 2004/09/05 09:04:18 daiki
-;;; Sync riece with upstream version 1.0.3
-;;;
;;; Revision 1.1 2003/10/22 20:07:07 ueno
;;; (EXTRA_DIST) Add irchat-copyright.el.
;;;
cvs server: xemacs-packages/riece/doc/riece-en.texi is a new entry, no comparison available
Index: xemacs-packages/riece/doc/riece-ja.texi
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/riece/doc/riece-ja.texi,v
retrieving revision 1.4
diff -u -F^( -u -r1.4 riece-ja.texi
--- xemacs-packages/riece/doc/riece-ja.texi 5 Sep 2004 09:04:18 -0000 1.4
+++ xemacs-packages/riece/doc/riece-ja.texi 5 Dec 2004 04:07:54 -0000
@@ -3,7 +3,7 @@
@setfilename riece-ja.info
@settitle Riece -- An IRC client for Emacsen --
@c %**end of header
-@set VERSION 1.0.3
+@set VERSION 1.0.6
@c @documentlanguage ja
@dircategory GNU Emacs Lisp
@@ -54,8 +54,8 @@
@menu
* Overview:: Riece とは何か
* Getting started::
-* Basic usage:: 基本的なつかいかた
-* Advanced usage:: 進んだつかいかた
+* Basic usage:: 基本的な使い方
+* Advanced usage:: 進んだ使い方
* Tips:: 便利な設定
* Development:: 開発者向け情報
* Index::
@@ -182,10 +182,10 @@ (autoload 'riece "riece" "Start Riece" t
ユーザのログイン名がそのまま使われます。
@vindex riece-nickname
-無事に接続できたなら、次はチャンネルに参加して会話をしてみましょう。
-@kbd{C-c j} とタイプすると、チャンネル名を尋ねられるので、適当なチャンネ
-ル名を入力しましょう。たとえば IRCnet には @samp{#Liece} というチャンネ
-ルがあるので、テストにお使いください。
+無事に接続できたら、次はチャンネルに参加して会話をしてみましょう。
+@kbd{C-c j} とタイプすると参加するチャンネル名を尋ねられるので、適当なチャ
+ンネル名を入力しましょう。IRCnet には @samp{#Riece} というチャンネルがあ
+るので、テストにお使いください。
チャンネルに入ることができたら、文章を入力してリターンキーを押すと発言す
ることができます。他の人の会話は画面右上のバッファに表示されます。
@@ -322,7 +322,7 @@ (完全に禁止していれば @samp{F}!
チャンネルのモードを設定します(@code{riece-command-change-mode})
@item C-c o
@findex riece-command-set-operators
-ユーザにオペレータ権限を与えます。前置引数 (@kbd{C-u}) を与えると、ユーザから発言権を奪います(@code{riece-command-set-operators})
+ユーザにオペレータ権限を与えます。前置引数 (@kbd{C-u}) を与えると、ユーザからオペレータ権限を奪います(@code{riece-command-set-operators})
@item C-c v
@findex riece-command-set-speakers
ユーザに発言権を与えます。前置引数 (@kbd{C-u}) を与えると、ユーザから発言権を奪います(@code{riece-command-set-speakers})
@@ -558,6 +558,8 @@ (Emacs 21.3 の make-network-proces
他のバッファにいる時に発言があるとモードラインに印 ("[R]") を表示
@item riece-kakasi
日本語の通らない端末で、日本語をローマ字で表示
+@item riece-yank
+@kbd{C-c y} で kill-ring から文字列を送信
@end table
これらのうち、@samp{riece-highlight} と @samp{riece-ctcp}、
@@ -589,6 +591,7 @@ (add-to-list 'riece-addons 'riece-alias)
@end example
@section 直前にいたチャンネルに戻りたい
+@vindex riece-guess-channel-try-functions
以下の行を @file{~/.riece/init.el} に追加することで、
@kbd{C-c g} で履歴を辿りつつ移動できます。
@@ -616,6 +619,7 @@ (setq riece-addons (delq 'riece-highligh
@end example
@section キーワードに反応して音を鳴らしたい
+@vindex riece-keyword-notify-functions
XEmacs では、以下の設定を @file{~/.riece/init.el} に加えることで、"ほげ"
や "ふが" に反応して効果音(この例では、カッコーの鳴き声)を鳴らすことがで
@@ -659,6 +663,7 @@ (add-to-list 'riece-addons 'riece-skk-ka
@end example
@section チャンネルの番号を固定したい
+@vindex riece-default-channel-binding
以下の行を @file{~/.riece/init.el} に追加します:
@@ -672,6 +677,8 @@ (setq riece-default-channel-binding
場合、そのチャンネルが 3 番目のチャンネルとして扱われます。
@section 起動時にパスワードつきのチャンネルに参加したい
+@vindex riece-startup-channel-list
+@vindex riece-startup-server-list
以下の行を @file{~/.riece/init.el} に追加します:
@@ -706,10 +713,10 @@ (setq riece-startup-server-list '("freen
@table @asis
@item relay.el
-@uref{http://www.imasy.or.jp/~gotoh/lisp/relay.el}
+@uref{http://www.taiyo.co.jp/~gotoh/lisp/relay.el}
@item connect.c
-@uref{http://www.imasy.or.jp/~gotoh/ssh/connect.html}
+@uref{http://www.taiyo.co.jp/~gotoh/ssh/connect.html}
@end table
たとえば、"proxy.example.com:8080" 経由で irc.tokyo.wide.ad.jp に接続す
@@ -727,6 +734,7 @@ (setq relay-command-alist (cons '("^irc\
@end example
@section IRC ログをファイルに保存したい
+@vindex riece-log-directory-map
以下の行を @file{~/.riece/init.el} に追加します:
Index: xemacs-packages/riece/lisp/.cvsignore
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/riece/lisp/.cvsignore,v
retrieving revision 1.1.1.1
diff -u -F^( -u -r1.1.1.1 .cvsignore
--- xemacs-packages/riece/lisp/.cvsignore 25 Oct 2003 09:25:46 -0000 1.1.1.1
+++ xemacs-packages/riece/lisp/.cvsignore 5 Dec 2004 04:07:54 -0000
@@ -2,3 +2,4 @@
Makefile
auto-autoloads.el
custom-load.el
+lunit-report.xml
Index: xemacs-packages/riece/lisp/COMPILE
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/riece/lisp/COMPILE,v
retrieving revision 1.4
diff -u -F^( -u -r1.4 COMPILE
--- xemacs-packages/riece/lisp/COMPILE 5 Sep 2004 09:04:19 -0000 1.4
+++ xemacs-packages/riece/lisp/COMPILE 5 Dec 2004 04:07:54 -0000
@@ -70,7 +70,8 @@ (defvar riece-modules
riece-ignore
riece-hangman
riece-biff
- riece-kakasi))))
+ riece-kakasi
+ riece-yank))))
(defun riece-compile-modules (modules)
(let ((load-path (cons nil load-path)))
@@ -135,3 +136,20 @@ (defun riece-install-package ()
(expand-file-name "riece"
(expand-file-name "lisp" (car command-line-args-left)))
(riece-install-just-print-p)))
+
+(defun riece-test ()
+ (let ((load-path (cons (expand-file-name "test") (cons nil load-path)))
+ (files (directory-files "test" t "^test-.*\\.el$"))
+ suite)
+ (require 'lunit)
+ (setq suite (lunit-make-test-suite))
+ (while files
+ (when (file-regular-p (car files))
+ (load-file (car files))
+ (lunit-test-suite-add-test
+ suite
+ (lunit-make-test-suite-from-class
+ (intern (file-name-sans-extension
+ (file-name-nondirectory (car files)))))))
+ (setq files (cdr files)))
+ (lunit-report suite (car command-line-args-left))))
Index: xemacs-packages/riece/lisp/ChangeLog
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/riece/lisp/ChangeLog,v
retrieving revision 1.4
diff -u -F^( -u -r1.4 ChangeLog
--- xemacs-packages/riece/lisp/ChangeLog 5 Sep 2004 09:04:19 -0000 1.4
+++ xemacs-packages/riece/lisp/ChangeLog 5 Dec 2004 04:07:55 -0000
@@ -1,3 +1,354 @@
+2004-12-05 Daiki Ueno <ueno(a)unixuser.org>
+
+ * Riece: Version 1.0.6 released.
+ * riece-version.el (riece-version-number): Bump up to 1.0.6.
+
+2004-12-01 Daiki Ueno <ueno(a)unixuser.org>
+
+ * riece-display.el (riece-update-channel-status-indicator): Fixed typo.
+
+2004-11-28 Daiki Ueno <ueno(a)unixuser.org>
+
+ * test/lunit.el (lunit-report): Accept output filename as the 2nd arg.
+ * Makefile.am (check-local): Supply riece-test with output filename.
+ * COMPILE (riece-test): Supply lunit-report with output filename.
+
+ * test/lunit.el: Require 'pp.
+ (lunit-escape-quote): Rename from lunit-test-reporter-format-sexp.
+ (lunit-report): Add "emacs-version" property.
+
+2004-11-28 Daiki Ueno <ueno(a)unixuser.org>
+
+ * COMPILE (riece-test): Use lunit-report instead of lunit.
+
+ * test/lunit.el: Report test result as XML.
+ (lunit-time-since): New function.
+ (lunit-test-reporter): New test-listener.
+ (lunit-test-reporter-format-sexp): New function.
+ (lunit-report): New function.
+
+2004-11-27 Daiki Ueno <ueno(a)unixuser.org>
+
+ * test/lunit.el: Update copyright year.
+ (lunit-test-result-run): Fixed the argument of
+ lunit-test-listener-error listener.
+
+2004-11-26 Daiki Ueno <ueno(a)unixuser.org>
+
+ * COMPILE (riece-test): Require 'lunit after when ./test is added
+ to load-path.
+
+ * test/test-riece-yank.el (test-riece-yank-strip-space): Use
+ lunit-assert-2 instead of lunit-assert.
+
+ * test/test-riece-url.el (test-riece-url-replace-match): Use
+ lunit-assert-2 instead of lunit-assert.
+ (test-riece-url-regexp-alist): Ditto.
+
+ * test/test-riece-alias.el (test-riece-alias-percent-hack): Use
+ lunit-assert-2 instead of lunit-assert.
+ (test-riece-alias-alist-1): Ditto.
+ (test-riece-alias-alist-2): Ditto.
+ (test-riece-alias-altsep-1): Ditto.
+ (test-riece-alias-altsep-2): Ditto.
+ (test-riece-alias-altsep-3): Ditto.
+ (test-riece-alias-altsep-4): Ditto.
+
+ * test/test-riece-addon.el (test-riece-resolve-addons-1): Use
+ lunit-assert-2 instead of lunit-assert.
+ (test-riece-resolve-addons-2): Ditto.
+
+ * test/lunit.el: Count assertions in test-case methods.
+ (lunit-test-result): Add assert-count slot.
+ (lunit-make-test-result): Reset assert-count to 0.
+ (lunit-test-result-run): Count assertions.
+ (lunit-test-result-failure): Abolished.
+ (lunit-test-case): Add assert-count slot; define internal
+ accesssors for them.
+ (lunit-make-test-case): Reset assert-count to 0.
+ (lunit-assert-2): New macro.
+ (lunit): Display assertion count.
+
+2004-11-25 Daiki Ueno <ueno(a)unixuser.org>
+
+ * Makefile.am (EXTRA_DIST): Add url-riece.el.
+ * url-riece.el: url-irc backend provided by Masatake YAMATO
+ <jet(a)gyve.org>.
+ [cf. <Liece:00373>]
+
+2004-11-25 Daiki Ueno <ueno(a)unixuser.org>
+
+ * test/Makefile.am (EXTRA_DIST): Add test-riece-url.el.
+ * test/test-riece-url.el: New test cases.
+
+ * riece-url.el (riece-url-regexp-alist): Backport from Liece 2.0.
+ (riece-url-replace-match): New function.
+ (riece-url-scan-region): Handle riece-url-regexp-alist.
+
+2004-11-25 Daiki Ueno <ueno(a)unixuser.org>
+
+ * riece-server.el (riece-server-properties): New function.
+
+2004-11-22 Daiki Ueno <ueno(a)unixuser.org>
+
+ * riece-display.el (riece-update-status-indicators): Format
+ riece-user-indicator as an identity.
+
+2004-11-22 Daiki Ueno <ueno(a)unixuser.org>
+
+ * test/test-riece-alias.el (test-riece-alias-alist-1): New test case.
+ (test-riece-alias-alist-2): New test case.
+
+ * riece-alias.el (riece-alias-abbrev-identity-string): Fixed
+ riece-alias-alist handling.
+ (riece-alias-expand-identity-string): Ditto.
+
+2004-11-21 Daiki Ueno <ueno(a)unixuser.org>
+
+ * riece-options.el (riece-shrink-buffer-remove-lines): New user option.
+ * riece.el (riece-shrink-buffer): Remove lines specified by
+ riece-shrink-buffer-remove-lines at a time.
+
+2004-11-21 Daiki Ueno <ueno(a)unixuser.org>
+
+ * riece.el (riece): Remove nonexistent buffer from
+ riece-buffer-list when running riece-shrink-buffer.
+
+2004-11-20 Daiki Ueno <ueno(a)unixuser.org>
+
+ * riece-display.el (riece-update-buffers): Check existence of each
+ buffer in riece-buffer-list.
+ * riece.el (riece): Ditto.
+
+2004-11-20 Daiki Ueno <ueno(a)unixuser.org>
+
+ * riece.el: Bind reporter-prompt-for-summary-p.
+
+2004-11-19 Daiki Ueno <ueno(a)unixuser.org>
+
+ * riece.el (riece-submit-bug-report): Query VERSION.
+
+2004-11-19 Daiki Ueno <ueno(a)unixuser.org>
+
+ * riece.el (riece-submit-bug-report): Query CTCP VERSION before
+ inspecting *IRC* buffer.
+
+2004-11-19 Daiki Ueno <ueno(a)unixuser.org>
+
+ * riece.el (riece-submit-bug-report): use
+ riece-server-process-opened instead of process-live-p.
+
+ * riece-server.el (riece-flush-send-queue): Use
+ riece-server-process-opened instead of process-live-p.
+
+ * riece-yank.el (riece-yank-strip-space): Bind space-width.
+
+ * riece-xemacs.el (riece-recent-messages): New function.
+ * riece-emacs.el (riece-recent-messages): New function.
+ * riece.el (riece-submit-bug-report): Use riece-recent-messages
+ instead of (with-output-string (print-recent-messages ...)).
+
+2004-11-18 Daiki Ueno <ueno(a)unixuser.org>
+
+ * riece.el (riece-submit-bug-report): New command.
+
+2004-11-15 Daiki Ueno <ueno(a)unixuser.org>
+
+ * riece-misc.el (riece-insert): Don't bind unused variable `buffer'.
+
+2004-11-15 Daiki Ueno <ueno(a)unixuser.org>
+
+ * riece-300.el (riece-handle-302-message): Don't expect leading
+ ":" before parameter list.
+ (riece-handle-301-message): Ditto.
+ (riece-handle-311-message): Ditto.
+ (riece-handle-312-message): Ditto.
+ (riece-handle-317-message): Ditto.
+ (riece-handle-319-message): Ditto.
+ (riece-handle-351-message): Ditto.
+ (riece-handle-353-message): Ditto.
+ (riece-handle-322-message): Ditto.
+ (riece-handle-set-topic): Ditto.
+ (riece-handle-366-message): Ditto.
+
+2004-11-14 Daiki Ueno <ueno(a)unixuser.org>
+
+ * riece.el (riece-exit): Reset riece-channel-status-indicator.
+ (riece-command-mode): Display riece-channel-status-indicator.
+ (riece-dialogue-mode): Ditto.
+ (riece-channel-mode): Ditto.
+
+ * riece-display.el (riece-update-channel-status-indicator): New
+ function.
+ (riece-update-indicator-functions): Add it.
+
+ * riece-globals.el (riece-channel-status-indicator): New indicator.
+
+2004-11-13 Daiki Ueno <ueno(a)unixuser.org>
+
+ * riece.el (riece-select-keys): Bind
+ riece-command-switch-to-channel-by-number to "#".
+
+2004-11-11 Masatake YAMATO <jet(a)gyve.org>
+
+ * riece-yank.el (riece-command-yank): Fix a typo in comments.
+
+2004-11-09 OHASHI Akira <bg66(a)koka-in.org>
+
+ * riece-yank.el (riece-command-yank): Take a 1st argument to send
+ messages as notice.
+
+2004-11-07 Daiki Ueno <ueno(a)unixuser.org>
+
+ * Riece: Version 1.0.5 released.
+ * riece-version.el (riece-version-number): Bump up to 1.0.5.
+
+2004-11-07 Daiki Ueno <ueno(a)unixuser.org>
+
+ * riece-yank.el (riece-yank-strip-space): New function split from
+ riece-command-yank.
+ * test/test-riece-addon.el: New test cases.
+ * test/test-riece-yank.el: New test cases.
+
+2004-11-05 Daiki Ueno <ueno(a)unixuser.org>
+
+ * COMPILE (riece-test): New function.
+ * Makefile.am (check-local): New target.
+ * test/luna.el: New file.
+ * test/lunit.el: New file.
+ * test/test-riece-alias.el: New test cases.
+
+2004-11-05 Daiki Ueno <ueno(a)unixuser.org>
+
+ * riece-alias.el (riece-alias-alternate-separator): New user
+ option.
+ (riece-alias-use-atmark): Abolished.
+ (riece-alias-escape-alternate-separator): Renamed from
+ riece-alias-escape-atmark; use riece-alias-alternate-separator
+ instead of hard-coded "@".
+ (riece-alias-abbrev-alternate-separator): Renamed from
+ riece-alias-abbrev-atmark; use riece-alias-alternate-separator
+ instead of hard-coded "@".
+ (riece-alias-expand-alternate-separator): Renamed from
+ riece-alias-expand-atmark; use riece-alias-alternate-separator
+ instead of hard-coded "@".
+
+2004-11-05 Daiki Ueno <ueno(a)unixuser.org>
+
+ * riece-alias.el (riece-alias-abbrev-atmark): Don't append "@" to
+ a channel on default server.
+
+2004-11-05 Daiki Ueno <ueno(a)unixuser.org>
+
+ * riece-alias.el (riece-alias-use-atmark): New user option. If
+ this option enabled, atmark "@" will be used to separate prefix
+ and server. (e.g. "#riece@server")
+ (riece-alias-escape-atmark): New function.
+ (riece-alias-abbrev-atmark): New function.
+ (riece-alias-expand-atmark): New function.
+ (riece-alias-abbrev-identity-string): Call
+ riece-alias-abbrev-atmark.
+ (riece-alias-expand-identity-string): Call
+ riece-alias-expand-atmark.
+
+ * riece-rdcc.el (riece-rdcc-block-size): Changed default value to
+ 1024 due to the DCC specification.
+ (riece-rdcc-send-program): Wait ack from a recipient.
+ (riece-rdcc-filter): Send ack each time data arrives.
+
+2004-10-30 Daiki Ueno <ueno(a)unixuser.org>
+
+ * riece-yank.el (riece-yank-strip-space): New user option.
+ (riece-command-yank): Strip spaces if riece-yank-strip-space is
+ non-nil.
+
+2004-10-18 Daiki Ueno <ueno(a)unixuser.org>
+
+ * riece-yank.el: New add-on from Masatake YAMATO <jet(a)gyve.org>.
+ * COMPILE (riece-modules): Add riece-yank.
+ * Makefile.am (EXTRA_DIST): Add riece-yank.el.
+
+2004-10-11 Daiki Ueno <ueno(a)unixuser.org>
+
+ * Riece: Version 1.0.4 released.
+ * riece-version.el (riece-version-number): Bump up to 1.0.4.
+
+2004-10-05 Daiki Ueno <ueno(a)unixuser.org>
+
+ * riece.el (riece): Scan riece-startup-channel-list and open servers.
+
+2004-09-27 Daiki Ueno <ueno(a)unixuser.org>
+
+ * riece-options.el (riece-send-delay): Set default to 2.
+
+ * riece-server.el (riece-make-queue): New function.
+ (riece-queue-enqueue): New function.
+ (riece-queue-dequeue): New function.
+ (riece-queue-empty): New function.
+ (riece-flush-send-queue): Use a queue object; check the process
+ is active.
+
+2004-09-25 Daiki Ueno <ueno(a)unixuser.org>
+
+ * riece-server.el: Implement flood protection.
+ (riece-flush-send-queue): New function.
+ (riece-process-send-string): Use it.
+ (riece-reset-process-buffer): Reset riece-send-queue,
+ riece-send-size, and riece-last-send-time.
+ (riece-seconds-to-time): New function.
+ (riece-time-less-p): New function.
+ (riece-time-since): New function.
+ * riece-options.el (riece-max-send-size): New user option.
+ (riece-send-delay): New user option.
+ * riece-globals.el (riece-send-queue): New variable.
+ (riece-send-size): New variable.
+
+2004-09-14 OHASHI Akira <bg66(a)koka-in.org>
+
+ * riece-log.el (riece-log-flashback): Run riece-button-update-buffer
+ only when riece-button is enabled.
+
+ * riece-mini.el: Require 'riece-biff.
+ (riece-mini-requires): New function.
+ (riece-mini-show-backlog): Run riece-biff-clear when riece-biff is
+ enabled.
+
+2004-09-13 OHASHI Akira <bg66(a)koka-in.org>
+
+ * riece-mini.el (riece-mini-show-backlog): Fix for long messages.
+ (riece-mini-backlog-size): Change default value.
+
+2004-09-12 OHASHI Akira <bg66(a)koka-in.org>
+
+ * riece-mini.el (riece-mini-show-backlog): Protect 1st arg of
+ `riece-mini-message-no-log'.
+
+2004-09-11 OHASHI Akira <bg66(a)koka-in.org>
+
+ * riece-mini.el (riece-mini-display-message-function): Remove
+ properties and "\n" of the end.
+ (riece-mini-show-backlog): Follow the change above.
+ (riece-mini-display-message-function): Save the history always.
+
+2004-09-10 OHASHI Akira <bg66(a)koka-in.org>
+
+ * riece-mini.el (riece-mini-display-message-function): Don't use
+ cl macro.
+ (riece-mini-show-backlog): Follow the change above.
+
+ * riece-mini.el (riece-mini): New group.
+ (riece-mini-backlog-size): New user option.
+ (riece-mini-backlog-history): New internal variable.
+ (riece-mini-backlog-shown): Ditto.
+ (riece-mini-show-backlog): New function.
+ (riece-mini-pre-command): Ditto.
+ (riece-mini-display-message-function): Use them.
+ (riece-mini-insinuate): Ditto.
+
+ * riece-biff.el (toplevel): Remove eval-when-compile.
+ * riece-log.el (toplevel): Ditto.
+ * riece-mini.el (toplevel): Ditto.
+
2004-09-05 Daiki Ueno <ueno(a)unixuser.org>
* Riece: Version 1.0.3 released.
Index: xemacs-packages/riece/lisp/Makefile.am
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/riece/lisp/Makefile.am,v
retrieving revision 1.4
diff -u -F^( -u -r1.4 Makefile.am
--- xemacs-packages/riece/lisp/Makefile.am 5 Sep 2004 09:04:19 -0000 1.4
+++ xemacs-packages/riece/lisp/Makefile.am 5 Dec 2004 04:07:55 -0000
@@ -1,3 +1,5 @@
+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.el riece-channel.el riece-coding.el riece-commands.el \
@@ -12,7 +14,8 @@
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-biff.el riece-kakasi.el riece-foolproof.el riece-yank.el \
+ url-riece.el
CLEANFILES = auto-autoloads.el custom-load.el *.elc
FLAGS ?= -batch -q -no-site-file
@@ -31,3 +34,6 @@
install-package: package
$(XEMACS) $(FLAGS) -l COMPILE -f riece-install-package \
$(PACKAGEDIR) # $(MAKE)
+
+check-local:
+ $(EMACS) $(FLAGS) -l COMPILE -f riece-test lunit-report.xml
Index: xemacs-packages/riece/lisp/riece-300.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/riece/lisp/riece-300.el,v
retrieving revision 1.3
diff -u -F^( -u -r1.3 riece-300.el
--- xemacs-packages/riece/lisp/riece-300.el 5 Sep 2004 09:04:19 -0000 1.3
+++ xemacs-packages/riece/lisp/riece-300.el 5 Dec 2004 04:07:55 -0000
@@ -34,7 +34,10 @@ (defun riece-handle-default-300-message
(defun riece-handle-302-message (prefix number name string)
"RPL_USERHOST \":*1<reply> *( \" \" <reply> )\""
- (let ((replies (split-string (substring string 1) " ")))
+ (let ((replies (split-string (if (eq (aref string 0) ?:)
+ (substring string 1)
+ string)
+ " ")))
(while replies
(if (string-match
(concat "^\\(" riece-user-regexp
@@ -82,12 +85,15 @@ (defun riece-handle-303-message (prefix
(riece-format-identity
(riece-make-identity user riece-server-name)
t))
- (split-string (substring string 1) " ")
+ (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 "^\\(" riece-user-regexp "\\) :") string)
+ (if (string-match (concat "^\\(" riece-user-regexp "\\) :?") string)
(let ((user (match-string 1 string))
(message (substring string (match-end 0))))
(riece-user-toggle-away user t)
@@ -122,7 +128,7 @@ (defun riece-handle-306-message (prefix
(defun riece-handle-311-message (prefix number name string)
(if (string-match
(concat "^\\(" riece-user-regexp
- "\\) \\([^ ]+\\) \\([^ ]+\\) \\* :")
+ "\\) \\([^ ]+\\) \\([^ ]+\\) \\* :?")
string)
(let ((user (match-string 1 string))
(name (substring string (match-end 0)))
@@ -142,7 +148,7 @@ (defun riece-handle-311-message (prefix
(defun riece-handle-312-message (prefix number name string)
(if (string-match
- (concat "^\\(" riece-user-regexp "\\) \\([^ ]+\\) :")
+ (concat "^\\(" riece-user-regexp "\\) \\([^ ]+\\) :?")
string)
(riece-insert-info
(list riece-dialogue-buffer riece-others-buffer)
@@ -168,7 +174,7 @@ (defun riece-handle-313-message (prefix
(defun riece-handle-317-message (prefix number name string)
(if (string-match
- (concat "^\\(" riece-user-regexp "\\) \\([0-9]+\\) [^:]*:seconds")
+ (concat "^\\(" riece-user-regexp "\\) \\([0-9]+\\) ")
string)
(let ((user (match-string 1 string))
(idle (match-string 2 string)))
@@ -184,7 +190,7 @@ (defun riece-handle-317-message (prefix
"\n")))))
(defun riece-handle-319-message (prefix number name string)
- (if (string-match (concat "^\\(" riece-user-regexp "\\) :") string)
+ (if (string-match (concat "^\\(" riece-user-regexp "\\) :?") string)
(let ((user (match-string 1 string))
(channels
(mapconcat
@@ -212,7 +218,7 @@ (defun riece-handle-319-message (prefix
"\n")))))
(defun riece-handle-351-message (prefix number name string)
- (if (string-match "\\([^ ]+\\.[^ ]+\\) \\([^ ]+\\) :" string)
+ (if (string-match "\\([^ ]+\\.[^ ]+\\) \\([^ ]+\\) :?" string)
(riece-insert-info
(list riece-dialogue-buffer riece-others-buffer)
(concat
@@ -226,7 +232,7 @@ (defun riece-handle-351-message (prefix
(defvar riece-353-users nil)
(defun riece-handle-353-message (prefix number name string)
"RPL_NAMREPLY \"[=\*@] <channel> :[[@|+]<nick> [[@|+]<nick> [...]]]\"."
- (if (string-match "^[=\*@] *\\([^ ]+\\) +:" string)
+ (if (string-match "^[=\*@] *\\([^ ]+\\) +:?" string)
(let ((channel (match-string 1 string))
(start 0)
user)
@@ -264,7 +270,7 @@ (defun riece-handle-353-message (prefix
"\n"))))))
(defun riece-handle-322-message (prefix number name string)
- (if (string-match "^\\([^ ]+\\) \\([0-9]+\\) :" string)
+ (if (string-match "^\\([^ ]+\\) \\([0-9]+\\) :?" string)
(let* ((channel (match-string 1 string))
(visible (match-string 2 string))
(topic (substring string (match-end 0))))
@@ -308,7 +314,7 @@ (defun riece-handle-324-message (prefix
"\n"))))))
(defun riece-handle-set-topic (prefix number name string remove)
- (if (string-match "^\\([^ ]+\\) :" string)
+ (if (string-match "^\\([^ ]+\\) :?" string)
(let* ((channel (match-string 1 string))
(message (substring string (match-end 0)))
(channel-identity (riece-make-identity channel riece-server-name))
@@ -428,7 +434,7 @@ (defun riece-handle-323-message (prefix
(defun riece-handle-366-message (prefix number name string)
"RPL_ENDOFNAMES \"<channel> :End of NAMES list\""
- (if (string-match "^\\([^ ]+\\) +:" string)
+ (if (string-match "^\\([^ ]+\\) " string)
(let ((channel (match-string 1 string)))
(riece-naming-assert-channel-users (nreverse riece-353-users)
channel)))
Index: xemacs-packages/riece/lisp/riece-alias.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/riece/lisp/riece-alias.el,v
retrieving revision 1.2
diff -u -F^( -u -r1.2 riece-alias.el
--- xemacs-packages/riece/lisp/riece-alias.el 5 Sep 2004 09:04:19 -0000 1.2
+++ xemacs-packages/riece/lisp/riece-alias.el 5 Dec 2004 04:07:55 -0000
@@ -50,6 +50,11 @@ (defcustom riece-alias-enable-percent-ha
:type 'boolean
:group 'riece-alias)
+(defcustom riece-alias-alternate-separator nil
+ "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
@@ -74,27 +79,84 @@ (defun riece-alias-expand-percent-hack (
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))
- (catch 'done
- (while alist
- (if (equal (car (car alist)) string)
- (throw 'done (cdr (car alist))))
- (setq alist (cdr alist)))
- string)))
+ (while alist
+ (if (equal (car (car alist)) string)
+ (setq string (cdr (car alist))
+ alist nil)
+ (setq alist (cdr alist)))))
+ string)
(defun riece-alias-expand-identity-string (string)
+ (let ((alist riece-alias-alist))
+ (while alist
+ (if (equal (cdr (car alist)) 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)))
- (let ((alist riece-alias-alist))
- (catch 'done
- (while alist
- (if (equal (cdr (car alist)) string)
- (throw 'done (car (car alist))))
- (setq alist (cdr alist)))
- string)))
+ string)
(defun riece-alias-insinuate ()
)
Index: xemacs-packages/riece/lisp/riece-biff.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/riece/lisp/riece-biff.el,v
retrieving revision 1.1
diff -u -F^( -u -r1.1 riece-biff.el
--- xemacs-packages/riece/lisp/riece-biff.el 5 Sep 2004 09:04:19 -0000 1.1
+++ xemacs-packages/riece/lisp/riece-biff.el 5 Dec 2004 04:07:55 -0000
@@ -28,7 +28,7 @@
;;; Code:
-(eval-when-compile (require 'riece-message))
+(require 'riece-message)
(defgroup riece-biff nil
"Biff for new arrival messages"
Index: xemacs-packages/riece/lisp/riece-display.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/riece/lisp/riece-display.el,v
retrieving revision 1.3
diff -u -F^( -u -r1.3 riece-display.el
--- xemacs-packages/riece/lisp/riece-display.el 5 Sep 2004 09:04:19 -0000 1.3
+++ xemacs-packages/riece/lisp/riece-display.el 5 Dec 2004 04:07:55 -0000
@@ -43,6 +43,7 @@ (defvar riece-update-buffer-functions ni
(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)
@@ -70,6 +71,7 @@ (defun riece-display-connect-signals ()
'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)
@@ -199,6 +201,7 @@ (defun riece-display-connect-signals ()
(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
@@ -207,6 +210,7 @@ (defun riece-display-connect-signals ()
(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
@@ -325,20 +329,24 @@ (defun riece-update-channel-list-indicat
(setq riece-channel-list-indicator "No channel")))
(defun riece-update-status-indicators ()
- (if riece-current-channel
- (with-current-buffer riece-command-buffer
- (riece-with-server-buffer (riece-identity-server riece-current-channel)
- (setq riece-away-indicator
- (if (and riece-real-nickname
- (riece-user-get-away riece-real-nickname))
- "A"
- "-")
- riece-operator-indicator
- (if (and riece-real-nickname
- (riece-user-get-operator riece-real-nickname))
- "O"
- "-")
- riece-user-indicator riece-real-nickname))))
+ (let ((server-name (riece-current-server-name)))
+ (if server-name
+ (with-current-buffer riece-command-buffer
+ (riece-with-server-buffer server-name
+ (setq riece-away-indicator
+ (if (and riece-real-nickname
+ (riece-user-get-away riece-real-nickname))
+ "A"
+ "-")
+ riece-operator-indicator
+ (if (and riece-real-nickname
+ (riece-user-get-operator riece-real-nickname))
+ "O"
+ "-")
+ riece-user-indicator
+ (riece-format-identity
+ (riece-make-identity riece-real-nickname riece-server-name)
+ t))))))
(walk-windows
(lambda (window)
(with-current-buffer (window-buffer window)
@@ -351,13 +359,37 @@ (defun riece-update-status-indicators ()
"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
- (save-excursion
- (set-buffer (car buffers))
- (run-hooks 'riece-update-buffer-functions))
+ (if (buffer-live-p (car buffers))
+ (save-excursion
+ (set-buffer (car buffers))
+ (run-hooks 'riece-update-buffer-functions)))
(setq buffers (cdr buffers)))
(run-hooks 'riece-update-indicator-functions)
(force-mode-line-update t)
Index: xemacs-packages/riece/lisp/riece-emacs.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/riece/lisp/riece-emacs.el,v
retrieving revision 1.4
diff -u -F^( -u -r1.4 riece-emacs.el
--- xemacs-packages/riece/lisp/riece-emacs.el 5 Sep 2004 09:04:19 -0000 1.4
+++ xemacs-packages/riece/lisp/riece-emacs.el 5 Dec 2004 04:07:55 -0000
@@ -103,6 +103,25 @@ (defun riece-put-text-property-nonsticky
(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))))))
+
(provide 'riece-emacs)
;;; riece-emacs.el ends here
Index: xemacs-packages/riece/lisp/riece-globals.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/riece/lisp/riece-globals.el,v
retrieving revision 1.4
diff -u -F^( -u -r1.4 riece-globals.el
--- xemacs-packages/riece/lisp/riece-globals.el 5 Sep 2004 09:04:19 -0000 1.4
+++ xemacs-packages/riece/lisp/riece-globals.el 5 Dec 2004 04:07:55 -0000
@@ -108,6 +108,15 @@ (defvar riece-channel-filter ""
(defvar riece-read-point nil
"Point at the last input was seen.
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-obarray nil
"Namespace of the IRC world.
Local to the server buffers.")
@@ -147,7 +156,10 @@ (defvar riece-away-indicator "-"
user is away.")
(defvar riece-operator-indicator "-"
"String displayed on the modeline to allow the user to tell if the
-user is a operator.")
+user is an operator.")
+(defvar riece-channel-status-indicator "-"
+ "String displayed on the modeline to allow the user to tell if the
+user's status on the current channel.")
;;; Buffers:
(defvar riece-command-buffer nil
Index: xemacs-packages/riece/lisp/riece-log.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/riece/lisp/riece-log.el,v
retrieving revision 1.4
diff -u -F^( -u -r1.4 riece-log.el
--- xemacs-packages/riece/lisp/riece-log.el 5 Sep 2004 09:04:19 -0000 1.4
+++ xemacs-packages/riece/lisp/riece-log.el 5 Dec 2004 04:07:55 -0000
@@ -30,8 +30,8 @@
;;; Code:
-(eval-when-compile (require 'riece-message)
- (require 'riece-button))
+(require 'riece-message)
+(require 'riece-button)
(defgroup riece-log nil
"Save irc log"
@@ -127,8 +127,9 @@ (defun riece-log-flashback (identity)
(riece-make-identity
(riece-match-string-no-properties 1)
(riece-identity-server identity))))
- (if (memq 'riece-button riece-addons)
- (riece-button-update-buffer))
+ (when (and (memq 'riece-button riece-addons)
+ riece-button-enabled)
+ (riece-button-update-buffer))
(goto-char (point-max))
(set-window-point (get-buffer-window (current-buffer))
(point))))))))
Index: xemacs-packages/riece/lisp/riece-mini.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/riece/lisp/riece-mini.el,v
retrieving revision 1.3
diff -u -F^( -u -r1.3 riece-mini.el
--- xemacs-packages/riece/lisp/riece-mini.el 5 Sep 2004 09:04:19 -0000 1.3
+++ xemacs-packages/riece/lisp/riece-mini.el 5 Dec 2004 04:07:55 -0000
@@ -32,16 +32,29 @@
;; To use, add the following line to your ~/.riece/init.el:
;; (add-to-list 'riece-addons 'riece-mini)
;;
-;; And for using conveniently, bind any global key to
-;; `riece-mini-send-message'.
+;; 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:
-(eval-when-compile (require 'riece-message))
+(require 'riece-message)
+(require 'riece-biff)
+
+(defgroup riece-mini nil
+ "riece on 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)
(defvar riece-mini-enabled nil)
@@ -59,16 +72,24 @@ (defmacro riece-mini-message-no-log (str
(defun riece-mini-display-message-function (message)
"Show arrival messages to minibuffer."
- (when (and riece-mini-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" (concat (format-time-string "%H:%M") " "
- (riece-format-message message t)))))
+ (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 riece-mini-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.
@@ -94,9 +115,38 @@ (defun riece-mini-send-message (arg)
(riece-make-message (riece-current-nickname) target
message nil t)))))
+(defun riece-mini-show-backlog ()
+ "Send back logs to minibuffer."
+ (interactive)
+ (when riece-mini-backlog-history
+ (let ((height (1+ riece-mini-backlog-size)))
+ (mapc #'(lambda (string)
+ (setq height (+ height
+ (/ (length string) (window-width)))))
+ riece-mini-backlog-history)
+ (let ((max-mini-window-height height)
+ (resize-mini-windows t))
+ (setq riece-mini-backlog-shown t)
+ (when (and (memq 'riece-biff riece-addons)
+ riece-biff-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))
+ 'riece-mini-display-message-function)
+ (add-hook 'pre-command-hook 'riece-mini-pre-command))
(defun riece-mini-enable ()
(setq riece-mini-enabled t))
Index: xemacs-packages/riece/lisp/riece-misc.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/riece/lisp/riece-misc.el,v
retrieving revision 1.3
diff -u -F^( -u -r1.3 riece-misc.el
--- xemacs-packages/riece/lisp/riece-misc.el 5 Sep 2004 09:04:19 -0000 1.3
+++ xemacs-packages/riece/lisp/riece-misc.el 5 Dec 2004 04:07:55 -0000
@@ -70,7 +70,6 @@ (defun riece-insert (buffers string)
(let ((inhibit-read-only t)
buffer-read-only
(start (goto-char (point-max)))
- (buffer (current-buffer))
window
point)
(insert (format-time-string "%H:%M") " " string)
Index: xemacs-packages/riece/lisp/riece-options.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/riece/lisp/riece-options.el,v
retrieving revision 1.3
diff -u -F^( -u -r1.3 riece-options.el
--- xemacs-packages/riece/lisp/riece-options.el 5 Sep 2004 09:04:19 -0000 1.3
+++ xemacs-packages/riece/lisp/riece-options.el 5 Dec 2004 04:07:55 -0000
@@ -178,6 +178,16 @@ (defcustom riece-protocol 'irc
: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")
@@ -276,6 +286,11 @@ (defcustom riece-buffer-dispose-function
(defcustom riece-shrink-buffer-idle-time-delay 5
"Number of idle seconds to wait before shrinking channel buffers."
+:type 'integer
+:group 'riece-options)
+
+(defcustom riece-shrink-buffer-remove-lines 10
+ "Number of lines removed when shrinking channel buffers."
:type 'integer
:group 'riece-options)
Index: xemacs-packages/riece/lisp/riece-rdcc.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/riece/lisp/riece-rdcc.el,v
retrieving revision 1.3
diff -u -F^( -u -r1.3 riece-rdcc.el
--- xemacs-packages/riece/lisp/riece-rdcc.el 5 Sep 2004 09:04:19 -0000 1.3
+++ xemacs-packages/riece/lisp/riece-rdcc.el 5 Dec 2004 04:07:55 -0000
@@ -62,8 +62,11 @@ (defcustom riece-rdcc-send-program
File.open(" file ") {|file|
while (bytes = file.read(" block-size "))
total += bytes.length
- puts(\"#{total}\")
+ puts(total)
session.write(bytes)
+ begin
+ buf = session.read(4)
+ end until buf.unpack('N')[0] == total
end
}
session.close
@@ -86,7 +89,7 @@ (defcustom riece-rdcc-save-directory nil
:type 'directory
:group 'riece-rdcc)
-(defcustom riece-rdcc-block-size 4096
+(defcustom riece-rdcc-block-size 1024
"Number of bytes sent as a block."
:type 'integer
:group 'riece-rdcc)
@@ -198,13 +201,21 @@ (defun riece-rdcc-filter (process 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 "Receiving %s from %s...(%s/%s)"
(file-name-nondirectory riece-rdcc-request-file)
riece-rdcc-request-user
- (riece-rdcc-format-size
- (setq riece-rdcc-received-size (+ (buffer-size)
- riece-rdcc-received-size)))
- (riece-rdcc-format-size riece-rdcc-request-size))))
+ (riece-rdcc-format-size riece-rdcc-received-size)
+ (riece-rdcc-format-size riece-rdcc-request-size))
+ (if (= riece-rdcc-received-size riece-rdcc-request-size)
+ (set-process-filter process nil))))
(defun riece-rdcc-sentinel (process status)
(save-excursion
Index: xemacs-packages/riece/lisp/riece-server.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/riece/lisp/riece-server.el,v
retrieving revision 1.4
diff -u -F^( -u -r1.4 riece-server.el
--- xemacs-packages/riece/lisp/riece-server.el 5 Sep 2004 09:04:19 -0000 1.4
+++ xemacs-packages/riece/lisp/riece-server.el 5 Dec 2004 04:07:55 -0000
@@ -105,9 +105,83 @@ (defmacro riece-with-server-buffer (serv
(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-encode-coding-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)
- (process-send-string process (riece-encode-coding-string string))))
+ (riece-queue-enqueue riece-send-queue string))
+ (riece-flush-send-queue process))
(defun riece-current-server-name ()
(or riece-overriding-server-name
@@ -179,6 +253,12 @@ (defun riece-reset-process-buffer (proce
(make-local-variable 'riece-server-name)
(make-local-variable 'riece-read-point)
(setq riece-read-point (point-min))
+ (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-obarray)
(setq riece-obarray (make-vector riece-obarray-size 0))
(make-local-variable 'riece-coding-system)
@@ -205,6 +285,15 @@ (defun riece-server-opened (&optional se
(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)
Index: xemacs-packages/riece/lisp/riece-url.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/riece/lisp/riece-url.el,v
retrieving revision 1.3
diff -u -F^( -u -r1.3 riece-url.el
--- xemacs-packages/riece/lisp/riece-url.el 5 Sep 2004 09:04:19 -0000 1.3
+++ xemacs-packages/riece/lisp/riece-url.el 5 Dec 2004 04:07:55 -0000
@@ -44,6 +44,18 @@ (defcustom riece-url-regexp "\\b\\(s?ht
: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.")
@@ -54,16 +66,43 @@ (defconst riece-url-description
(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)
- (save-excursion
- (goto-char start)
- (while (re-search-forward riece-url-regexp end t)
- (let ((url (match-string 0)))
- (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)))))))
+ (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
Index: xemacs-packages/riece/lisp/riece-version.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/riece/lisp/riece-version.el,v
retrieving revision 1.4
diff -u -F^( -u -r1.4 riece-version.el
--- xemacs-packages/riece/lisp/riece-version.el 5 Sep 2004 09:04:19 -0000 1.4
+++ xemacs-packages/riece/lisp/riece-version.el 5 Dec 2004 04:07:55 -0000
@@ -48,7 +48,7 @@ (defcustom riece-user-agent 'emacs-riece
(defconst riece-product-name "Riece")
-(defconst riece-version-number "1.0.3"
+(defconst riece-version-number "1.0.6"
"Version number for this version of Riece.")
(defconst riece-version (format "Riece v%s" riece-version-number)
Index: xemacs-packages/riece/lisp/riece-xemacs.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/riece/lisp/riece-xemacs.el,v
retrieving revision 1.5
diff -u -F^( -u -r1.5 riece-xemacs.el
--- xemacs-packages/riece/lisp/riece-xemacs.el 5 Sep 2004 09:04:19 -0000 1.5
+++ xemacs-packages/riece/lisp/riece-xemacs.el 5 Dec 2004 04:07:55 -0000
@@ -129,6 +129,12 @@ (defun riece-put-text-property-nonsticky
(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)))
+
(provide 'riece-xemacs)
;;; riece-xemacs.el ends here
cvs server: xemacs-packages/riece/lisp/riece-yank.el is a new entry, no comparison available
Index: xemacs-packages/riece/lisp/riece.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/riece/lisp/riece.el,v
retrieving revision 1.4
diff -u -F^( -u -r1.4 riece.el
--- xemacs-packages/riece/lisp/riece.el 5 Sep 2004 09:04:20 -0000 1.4
+++ xemacs-packages/riece/lisp/riece.el 5 Dec 2004 04:07:55 -0000
@@ -67,7 +67,8 @@ (defvar riece-addons-insinuated nil
"Non nil if add-ons are already insinuated.")
(defvar riece-select-keys
- `("1" riece-command-switch-to-channel-by-number-1
+ `("#" 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
@@ -293,11 +294,13 @@ (defun riece (&optional confirm)
(lambda ()
(let ((buffers riece-buffer-list))
(while buffers
- (if (eq (derived-mode-class
- (with-current-buffer (car buffers)
- major-mode))
- 'riece-dialogue-mode)
- (riece-shrink-buffer (car buffers)))
+ (if (buffer-live-p (car buffers))
+ (if (eq (derived-mode-class
+ (with-current-buffer (car buffers)
+ major-mode))
+ 'riece-dialogue-mode)
+ (riece-shrink-buffer (car buffers)))
+ (delq (car buffers) riece-buffer-list))
(setq buffers (cdr buffers))))))))
(switch-to-buffer riece-command-buffer)
(riece-display-connect-signals)
@@ -310,6 +313,14 @@ (defun riece (&optional confirm)
(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-addons))
(while pointer
(unless (get (car pointer) 'riece-addon-default-disabled)
@@ -327,7 +338,9 @@ (defun riece-shrink-buffer (buffer)
(let* ((inhibit-read-only t)
buffer-read-only
(start (point))
- (end (progn (beginning-of-line 2) (point)))
+ (end (progn (beginning-of-line
+ (1+ riece-shrink-buffer-remove-lines))
+ (point)))
(overlays (riece-overlays-in start end)))
(while overlays
(riece-delete-overlay (car overlays))
@@ -355,6 +368,7 @@ (defun riece-exit ()
riece-channel-list-indicator "No channel"
riece-away-indicator "-"
riece-operator-indicator "-"
+ riece-channel-status-indicator "-"
riece-freeze-indicator "-")
(delete-other-windows)
(run-hooks 'riece-exit-hook))
@@ -376,6 +390,7 @@ (defun riece-command-mode ()
(setq riece-away-indicator "-"
riece-operator-indicator "-"
+ riece-channel-status-indicator "-"
major-mode 'riece-command-mode
mode-name "Command"
mode-line-buffer-identification
@@ -383,6 +398,7 @@ (defun riece-command-mode ()
'("Riece: "
riece-away-indicator
riece-operator-indicator
+ riece-channel-status-indicator
" "
riece-user-indicator
" "
@@ -418,6 +434,7 @@ (defun riece-dialogue-mode ()
(setq riece-freeze riece-default-freeze
riece-away-indicator "-"
riece-operator-indicator "-"
+ riece-channel-status-indicator "-"
major-mode 'riece-dialogue-mode
mode-name "Dialogue"
mode-line-buffer-identification
@@ -426,6 +443,7 @@ (defun riece-dialogue-mode ()
riece-away-indicator
riece-operator-indicator
riece-freeze-indicator
+ riece-channel-status-indicator
" "
riece-channel-list-indicator " "))
truncate-lines nil
@@ -455,6 +473,7 @@ (define-derived-mode riece-channel-mode
riece-away-indicator
riece-operator-indicator
riece-freeze-indicator
+ riece-channel-status-indicator
" "
riece-long-channel-indicator))))
@@ -520,6 +539,97 @@ (defun riece-create-buffers ()
(eq major-mode (nth 2 (car alist))))
(funcall (nth 2 (car alist))))
(setq alist (cdr alist))))))
+
+(defvar reporter-prompt-for-summary-p)
+(defun riece-submit-bug-report (&optional recent-messages recent-keys)
+ "Submit via mail a bug report on Riece."
+ ;; This strange form ensures that (recent-keys) is the value before
+ ;; the bug subject string is read.
+ (interactive (list (riece-recent-messages 20) (recent-keys)))
+ (message "Querying server version...")
+ (let ((pointer riece-server-process-alist)
+ nickname)
+ (while pointer
+ (when (riece-server-process-opened (cdr (car pointer)))
+ (process-send-string (cdr (car pointer)) "VERSION\r\n")
+ (if (setq nickname
+ (with-current-buffer (process-buffer (cdr (car pointer)))
+ riece-real-nickname))
+ (process-send-string
+ (cdr (car pointer))
+ (format "PRIVMSG %s :\1VERSION\1\r\n" nickname))))
+ (setq pointer (cdr pointer))))
+ (sit-for 3)
+ (message "Querying server version...done")
+ (require 'reporter)
+ (let ((reporter-prompt-for-summary-p t))
+ (unless riece-debug
+ (error "Please turn on riece-debug and restart Riece."))
+ (reporter-submit-bug-report
+ "liece(a)unixuser.org"
+ (riece-version)
+ '(riece-debug)
+ nil
+ nil
+ "This bug report will be sent to the Riece Development Team,
+not to your local site managers!!
+
+Please write in Japanese or English, because the Riece maintainers do
+not have translators to read other languages for them.
+
+Please describe as succinctly as possible:
+\t- What happened.
+\t- What you thought should have happened.
+\t- Precisely what you were doing at the time.
+
+Also include a reliable recipe for triggering the bug, as well as
+any lisp back-traces that you may have.
+\(setq stack-trace-on-error t\), or \(setq debug-on-error t\) if you
+are familiar with the debugger, to get a lisp back-trace.")
+ (delete-other-windows)
+ (save-excursion
+ (goto-char (point-max))
+ (insert
+ "\nAdd-on state:\n"
+ "------------\n"
+ (save-window-excursion
+ (save-excursion
+ (riece-command-list-addons)
+ (search-forward "\n\n")
+ (buffer-substring (point-min) (point)))))
+ (insert "Recent messages from servers:\n"
+ "--------------------------")
+ (let ((pointer riece-server-process-alist))
+ (while pointer
+ (insert "\n- \"" (car (car pointer)) "\", \n"
+ (format "%S" (if (equal (car (car pointer)) "")
+ riece-server
+ (cdr (assoc (car (car pointer))
+ riece-server-alist))))
+ "\n"
+ (if (riece-server-process-opened (cdr (car pointer)))
+ (save-excursion
+ (set-buffer (process-buffer (cdr (car pointer))))
+ (goto-char (point-max))
+ (beginning-of-line -60)
+ (buffer-substring (point) (point-max)))
+ "(closed server)"))
+ (setq pointer (cdr pointer))))
+ ;; Insert recent keystrokes.
+ (insert "\n\nRecent keystrokes:\n"
+ "-----------------\n\n")
+ (let ((before-keys (point)))
+ (insert (key-description recent-keys))
+ (save-restriction
+ (narrow-to-region before-keys (point))
+ (goto-char before-keys)
+ (while (progn (move-to-column 50) (not (eobp)))
+ (search-forward " " nil t)
+ (insert "\n"))))
+ ;; Insert recent minibuffer messages.
+ (insert "\n\nRecent messages (most recent first):\n"
+ "-----------------------------------\n"
+ recent-messages))))
(provide 'riece)
cvs server: xemacs-packages/riece/lisp/url-riece.el is a new entry, no comparison available
cvs server: xemacs-packages/riece/lisp/test/.cvsignore is a new entry, no comparison available
cvs server: xemacs-packages/riece/lisp/test/Makefile.am is a new entry, no comparison available
cvs server: xemacs-packages/riece/lisp/test/luna.el is a new entry, no comparison available
cvs server: xemacs-packages/riece/lisp/test/lunit.el is a new entry, no comparison available
cvs server: xemacs-packages/riece/lisp/test/test-riece-addon.el is a new entry, no comparison available
cvs server: xemacs-packages/riece/lisp/test/test-riece-alias.el is a new entry, no comparison available
--
Daiki Ueno