From: ueno Date: Mon, 22 Dec 2003 02:57:46 +0000 (+0000) Subject: * riece-keyword.el (riece-notify-keyword-functions): Mark as obsolete. X-Git-Tag: riece-0_1_7~2 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4466c255682114a7ad912ae5a89eecda98bee1d4;p=elisp%2Friece.git * riece-keyword.el (riece-notify-keyword-functions): Mark as obsolete. (riece-keyword-notify-functions): New user option. (riece-keyword-message-filter): Call riece-keyword-notify-functions. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index ef60a5c..7e2b70f 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +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): Call riece-keyword-notify-functions. + 2003-12-17 Daiki Ueno * riece-log.el (riece-log-flashback): Use diff --git a/lisp/riece-keyword.el b/lisp/riece-keyword.el index b0b0952..37056e2 100644 --- a/lisp/riece-keyword.el +++ b/lisp/riece-keyword.el @@ -47,6 +47,16 @@ :type '(list function) :group 'riece-keyword) +(make-obsolete-variable 'riece-notify-keyword-functions + 'riece-keyword-notify-functions) + +(defcustom riece-keyword-notify-functions nil + "Functions used to notify keyword match. +Two arguments are passed to each function: the keyword used to match +and the matched message object." + :type '(list function) + :group 'riece-keyword) + (defface riece-keyword-face '((((class color)) (:foreground "red" :underline t)) @@ -83,10 +93,12 @@ (match-end (cdr (car alist))) 'riece-keyword t (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-notify-keyword-functions + (match-string (cdr (car alist)) + (riece-message-text message))) + (run-hook-with-args 'riece-keyword-notify-functions + (cdr (car alist)) + message) (setq index (match-end (cdr (car alist))))) (setq alist (cdr alist))))) message)