From: bg66 Date: Tue, 24 Apr 2007 01:21:03 +0000 (+0000) Subject: (riece-log-display-message-function): Use X-Git-Tag: riece-4_0_0~11 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=f686bbadad1d94594b807b00d75c7e010c916fc3;p=elisp%2Friece.git (riece-log-display-message-function): Use riece-message-format-function-alist. --- 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)