* riece-log.el (riece-log-file-name-coding-system): New user option.
authorDaiki Ueno <ueno@unixuser.org>
Wed, 17 Dec 2003 02:35:23 +0000 (02:35 +0000)
committerDaiki Ueno <ueno@unixuser.org>
Wed, 17 Dec 2003 02:35:23 +0000 (02:35 +0000)
(riece-log-display-message-function): Bind file-name-coding-system.
(riece-log-flashback): Ditto.

lisp/ChangeLog
lisp/riece-log.el

index 7405df1..da41794 100644 (file)
@@ -1,7 +1,12 @@
 2003-12-17  Daiki Ueno  <ueno@unixuser.org>
 
+       * riece-log.el (riece-log-file-name-coding-system): New user option.
+       (riece-log-display-message-function): Bind file-name-coding-system.
+       (riece-log-flashback): Ditto.
+
        * riece-log.el (riece-log-flashback): Use
        riece-match-string-no-properties instead of match-string-no-properties.
+
        * riece-xemacs.el (riece-match-string-no-properties): New function.
        * riece-emacs.el (riece-match-string-no-properties): New alias.
 
index 4398f8b..66aa3bd 100644 (file)
@@ -61,6 +61,11 @@ If integer, flash back only this line numbers. t means all lines."
   :type 'symbol
   :group 'riece-log)
 
+(defcustom riece-log-file-name-coding-system file-name-coding-system
+  "*Coding system used to convert pathnames of log files."
+  :type 'symbol
+  :group 'riece-log)
+
 (defun riece-log-display-message-function (message)
   (let ((open-bracket
         (funcall riece-message-make-open-bracket-function message))
@@ -69,7 +74,8 @@ If integer, flash back only this line numbers. t means all lines."
        (name
         (funcall riece-message-make-name-function message))
        (file (riece-log-get-file (riece-message-target message)))
-       (coding-system-for-write riece-log-coding-system))
+       (coding-system-for-write riece-log-coding-system)
+       (file-name-coding-system riece-log-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") " "
@@ -101,7 +107,8 @@ If integer, flash back only this line numbers. t means all lines."
 
 (defun riece-log-flashback (identity)
   (when riece-log-flashback
-    (let ((file (riece-log-get-file identity)))
+    (let ((file (riece-log-get-file identity))
+         (file-name-coding-system riece-log-file-name-coding-system))
       (when (file-exists-p file)
        (let (string)
          (with-temp-buffer