From: ueno Date: Sun, 5 Dec 2004 07:07:07 +0000 (+0000) Subject: * riece-log.el (riece-log-display-message-function): Switch to X-Git-Tag: riece-1_0_7~129 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d695c7ef181d36c5fa66bbfac058cc1fbcb43492;p=elisp%2Friece.git * riece-log.el (riece-log-display-message-function): Switch to riece-dialogue-buffer when writing messages from other people to a file. [cf. ] --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 71a6e8c..6d0e47c 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,12 @@ 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. + [cf. ] + +2004-12-05 Daiki Ueno + * Riece: Version 1.0.6 released. * riece-version.el (riece-version-number): Bump up to 1.0.6. diff --git a/lisp/riece-log.el b/lisp/riece-log.el index 352fa03..a7598b3 100644 --- a/lisp/riece-log.el +++ b/lisp/riece-log.el @@ -73,13 +73,14 @@ If integer, flash back only this line numbers. t means all lines." (defun riece-log-display-message-function (message) (if riece-log-enabled - (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)))) + (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))))) (defun riece-log-get-file (identity) (expand-file-name