From: ueno Date: Fri, 12 Aug 2005 07:26:21 +0000 (+0000) Subject: Use get-language-info to get the default coding-system. X-Git-Tag: channel-coding-branchpoint~122 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7a6bbe7e9076a455c50a9ca5c6714401811edca6;p=elisp%2Friece.git Use get-language-info to get the default coding-system. --- diff --git a/lisp/riece-log.el b/lisp/riece-log.el index cbdad44..e1c0a74 100644 --- a/lisp/riece-log.el +++ b/lisp/riece-log.el @@ -98,8 +98,11 @@ It is created if there is at least one instance of Emacs running riece-log.") (defun riece-log-display-message-function (message) (if riece-log-enabled - (let ((coding-system-for-write (or riece-log-coding-system - default-buffer-file-coding-system)) + (let ((coding-system-for-write + (if (featurep 'mule) + (or riece-log-coding-system + (car (get-language-info current-language-environment + 'coding-system))))) (file (riece-log-make-file-name (riece-message-target message) coding-system-for-write)) file-name-coding-system @@ -112,9 +115,12 @@ It is created if there is at least one instance of Emacs running riece-log.") riece-log-lock-file)))) (defun riece-log-make-file-name (identity coding-system) - (expand-file-name (format "%s.txt.%s" - (format-time-string "%Y%m%d") - coding-system) + (expand-file-name (if (featurep 'mule) + (format "%s.txt.%s" + (format-time-string "%Y%m%d") + coding-system) + (format "%s.txt" + (format-time-string "%Y%m%d"))) (riece-log-directory identity))) (defun riece-log-list-files (identity time)