Bind coding-system-for-write.
authorShengHuo ZHU <zsh@cs.rochester.edu>
Wed, 13 Sep 2000 12:41:58 +0000 (12:41 +0000)
committerShengHuo ZHU <zsh@cs.rochester.edu>
Wed, 13 Sep 2000 12:41:58 +0000 (12:41 +0000)
lisp/ChangeLog
lisp/gnus-util.el

index 3a5dc61..dfc10ff 100644 (file)
@@ -1,3 +1,8 @@
+2000-09-13 09:38:26  ShengHuo ZHU  <zsh@cs.rochester.edu>
+
+       * gnus-util.el (gnus-write-active-file): Bind
+       coding-system-for-write.
+
 2000-09-13 09:14:57  ShengHuo ZHU  <zsh@cs.rochester.edu>
 
        * nnmail.el (nnmail-get-new-mail): Don't test nnmail-spool-file.
index 6a67152..10f5076 100644 (file)
@@ -963,23 +963,24 @@ Entries without port tokens default to DEFAULTPORT."
     t))
 
 (defun gnus-write-active-file (file hashtb &optional full-names)
-  (with-temp-file file
-    (mapatoms
-     (lambda (sym)
-       (when (and sym
-                 (boundp sym)
-                 (symbol-value sym))
-        (insert (format "%S %d %d y\n"
-                        (if full-names
-                            sym
-                          (intern (gnus-group-real-name (symbol-name sym))))
-                        (or (cdr (symbol-value sym))
-                            (car (symbol-value sym)))
-                        (car (symbol-value sym))))))
-     hashtb)
-    (goto-char (point-max))
-    (while (search-backward "\\." nil t)
-      (delete-char 1))))
+  (let ((coding-system-for-write nnmail-active-file-coding-system))
+    (with-temp-file file
+      (mapatoms
+       (lambda (sym)
+        (when (and sym
+                   (boundp sym)
+                   (symbol-value sym))
+          (insert (format "%S %d %d y\n"
+                          (if full-names
+                              sym
+                            (intern (gnus-group-real-name (symbol-name sym))))
+                          (or (cdr (symbol-value sym))
+                              (car (symbol-value sym)))
+                          (car (symbol-value sym))))))
+       hashtb)
+      (goto-char (point-max))
+      (while (search-backward "\\." nil t)
+       (delete-char 1)))))
 
 (provide 'gnus-util)