From: ueno Date: Tue, 18 May 2004 01:30:42 +0000 (+0000) Subject: * riece-url.el (riece-url-regexp): Accept ";". X-Git-Tag: riece-1_0_0~53 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=c5fb39002fbf00cf516d3f06eba8231799a64575;p=elisp%2Friece.git * 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. --- diff --git a/lisp/COMPILE b/lisp/COMPILE index 246a628..17a0332 100644 --- a/lisp/COMPILE +++ b/lisp/COMPILE @@ -63,7 +63,8 @@ riece-async riece-lsdb riece-xface - riece-ctlseq)))) + riece-ctlseq + riece-ignore)))) (defun riece-compile-modules (modules) (let ((load-path (cons nil load-path))) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 6d66dc5..1293002 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,11 @@ +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 diff --git a/lisp/Makefile.am b/lisp/Makefile.am index e50d78a..2753735 100644 --- a/lisp/Makefile.am +++ b/lisp/Makefile.am @@ -11,7 +11,7 @@ EXTRA_DIST = COMPILE ChangeLog ChangeLog.Liece \ 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-xface.el riece-ctlseq.el riece-ignore.el CLEANFILES = auto-autoloads.el custom-load.el *.elc FLAGS ?= -batch -q -no-site-file diff --git a/lisp/riece-ignore.el b/lisp/riece-ignore.el new file mode 100644 index 0000000..c8a6383 --- /dev/null +++ b/lisp/riece-ignore.el @@ -0,0 +1,66 @@ +;;; riece-ignore.el --- ignore user +;; 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., 59 Temple Place - Suite 330, +;; Boston, MA 02111-1307, USA. + +;;; Commentary: + +;; To use, add the following line to your ~/.riece/init.el: +;; (add-to-list 'riece-addons 'riece-ignore) + +;;; Code: + +(require 'riece-signal) +(require 'riece-identity) +(require 'riece-message) + +(defvar riece-ignored-user nil) + +(defun riece-ignore-by-user (user) + (interactive + (let ((completion-ignore-case t)) + (list (riece-completing-read-identity + "User: " + (riece-get-users-on-server (riece-current-server-name)))))) + (setq riece-ignored-user (cons user riece-ignored-user)) + (riece-connect-signal + 'user-renamed + (lambda (signal handback) + (let ((pointer (riece-identity-member (car (riece-signal-args signal)) + riece-ignored-user))) + (if pointer + (setcar pointer (nth 1 (riece-signal-args signal)))))))) + +(defun riece-ignore-message-filter (message) + (unless (riece-identity-member (riece-message-speaker message) + riece-ignored-user) + message)) + +(defvar riece-command-mode-map) +(defun riece-ignore-insinuate () + (add-hook 'riece-message-filter-functions 'riece-ignore-message-filter) + (define-key riece-command-mode-map + "\C-ck" 'riece-ignore-by-user)) + +(provide 'riece-ignore) + +;;; riece-ignore.el ends here \ No newline at end of file diff --git a/lisp/riece-options.el b/lisp/riece-options.el index 4ed5f02..cc13625 100644 --- a/lisp/riece-options.el +++ b/lisp/riece-options.el @@ -110,7 +110,8 @@ way is to put Riece variables on .emacs or file loaded from there." riece-url riece-button riece-menu - riece-icon) + riece-icon + riece-ignore) "Add-ons insinuated into Riece." :type '(repeat symbol) :group 'riece-options) diff --git a/lisp/riece-url.el b/lisp/riece-url.el index f7155bc..449e27b 100644 --- a/lisp/riece-url.el +++ b/lisp/riece-url.el @@ -39,7 +39,7 @@ "URL Browsing in IRC buffer." :group 'riece) -(defcustom riece-url-regexp "\\b\\(s?https?\\|ftp\\|file\\|gopher\\|news\\|telnet\\|wais\\|mailto\\):\\(//[-a-zA-Z0-9_.]+:[0-9]*\\)?[-a-zA-Z0-9_=?#$@~`%&*+|\\/.,]*[-a-zA-Z0-9_=#$@~`%&*+|\\/]" +(defcustom riece-url-regexp "\\b\\(s?https?\\|ftp\\|file\\|gopher\\|news\\|telnet\\|wais\\|mailto\\):\\(//[-a-zA-Z0-9_.]+:[0-9]*\\)?[-a-zA-Z0-9_=?#$@~`%&*+|\\/.,;]*[-a-zA-Z0-9_=#$@~`%&*+|\\/;]" "Regular expression that matches URLs." :group 'riece-url :type 'regexp)