From dcc768635217785f41000a71d59cd03a88fb6982 Mon Sep 17 00:00:00 2001 From: ueno Date: Sun, 5 Dec 2004 07:10:11 +0000 Subject: [PATCH] * riece-message.el (riece-display-message-1): Call riece-after-display-message-functions in riece-message-buffer. [cf. ] --- lisp/ChangeLog | 5 ++--- lisp/riece-log.el | 15 +++++++-------- lisp/riece-message.el | 3 ++- 3 files changed, 11 insertions(+), 12 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 6d0e47c..a2f9b18 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,8 +1,7 @@ 2004-12-05 Daiki Ueno - * riece-log.el (riece-log-display-message-function): Switch to - riece-dialogue-buffer when writing messages from other people to a - file. + * riece-message.el (riece-display-message-1): Call + riece-after-display-message-functions in riece-message-buffer. [cf. ] 2004-12-05 Daiki Ueno diff --git a/lisp/riece-log.el b/lisp/riece-log.el index a7598b3..352fa03 100644 --- a/lisp/riece-log.el +++ b/lisp/riece-log.el @@ -73,14 +73,13 @@ If integer, flash back only this line numbers. t means all lines." (defun riece-log-display-message-function (message) (if riece-log-enabled - (with-current-buffer riece-dialogue-buffer - (let ((file (riece-log-get-file (riece-message-target message))) - (coding-system-for-write riece-log-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))))) + (let ((file (riece-log-get-file (riece-message-target message))) + (coding-system-for-write riece-log-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)))) (defun riece-log-get-file (identity) (expand-file-name diff --git a/lisp/riece-message.el b/lisp/riece-message.el index f9d3740..0ed4602 100644 --- a/lisp/riece-message.el +++ b/lisp/riece-message.el @@ -174,7 +174,8 @@ Normally they are *Dialogue* and/or *Others*." (setq parent-buffers (riece-message-parent-buffers message buffer)) (riece-insert buffer (riece-format-message message)) (riece-insert parent-buffers (riece-format-message message t)) - (run-hook-with-args 'riece-after-display-message-functions message))) + (with-current-buffer buffer + (run-hook-with-args 'riece-after-display-message-functions message)))) (defun riece-display-message (message) "Display MESSAGE object." -- 1.7.10.4