* riece-keyword.el (riece-notify-keyword-functions): Mark as obsolete.
authorueno <ueno>
Mon, 22 Dec 2003 02:57:46 +0000 (02:57 +0000)
committerueno <ueno>
Mon, 22 Dec 2003 02:57:46 +0000 (02:57 +0000)
(riece-keyword-notify-functions): New user option.
(riece-keyword-message-filter): Call riece-keyword-notify-functions.

lisp/ChangeLog
lisp/riece-keyword.el

index ef60a5c..7e2b70f 100644 (file)
@@ -1,3 +1,9 @@
+2003-12-22  Daiki Ueno  <ueno@unixuser.org>
+
+       * 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  <ueno@unixuser.org>
 
        * riece-log.el (riece-log-flashback): Use
index b0b0952..37056e2 100644 (file)
   :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))
                                   (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)