From f686bbadad1d94594b807b00d75c7e010c916fc3 Mon Sep 17 00:00:00 2001 From: bg66 Date: Tue, 24 Apr 2007 01:21:03 +0000 Subject: [PATCH] (riece-log-display-message-function): Use riece-message-format-function-alist. --- lisp/ChangeLog | 5 +++++ lisp/riece-log.el | 12 ++++++++---- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 62b83ad..e7159c1 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +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. diff --git a/lisp/riece-log.el b/lisp/riece-log.el index 624115b..2f8b4f8 100644 --- a/lisp/riece-log.el +++ b/lisp/riece-log.el @@ -106,10 +106,14 @@ It is created if there is at least one instance of Emacs running riece-log.") default-file-name-coding-system) (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)))) + (let ((format-message-function + (or (cdr (assq (riece-message-type message) + riece-message-format-function-alist)) + #'riece-format-message))) + (write-region (concat (format-time-string "%H:%M") " " + (funcall format-message-function message)) + nil file t 0 + riece-log-lock-file))))) (defun riece-log-make-file-name (identity coding-system) (expand-file-name (if (featurep 'mule) -- 1.7.10.4