* nnmail.el (nnmail-parse-active): Make group names unibyte.
authorKatsumi Yamaoka <yamaoka@jpl.org>
Mon, 12 Nov 2007 12:10:01 +0000 (12:10 +0000)
committerKatsumi Yamaoka <yamaoka@jpl.org>
Mon, 12 Nov 2007 12:10:01 +0000 (12:10 +0000)
(nnmail-save-active): Use a unibyte buffer saving active file, which may
 contain non-ASCII group names.

* nnml.el (nnml-request-group): Decode group names in messages.

lisp/ChangeLog
lisp/nnmail.el
lisp/nnml.el

index adee308..c7bbca5 100644 (file)
@@ -1,3 +1,11 @@
+2007-11-12  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+       * nnmail.el (nnmail-parse-active): Make group names unibyte.
+       (nnmail-save-active): Use a unibyte buffer saving active file, which
+       may contain non-ASCII group names.
+
+       * nnml.el (nnml-request-group): Decode group names in messages.
+
 2007-11-05  Reiner Steib  <Reiner.Steib@gmx.de>
 
        * message.el (message-citation-line-function)
 2007-11-05  Reiner Steib  <Reiner.Steib@gmx.de>
 
        * message.el (message-citation-line-function)
index 7608660..8ff6d1d 100644 (file)
@@ -693,7 +693,7 @@ nn*-request-list should have been called before calling this function."
              (setq group (symbol-name group)))
            (if (and (numberp (setq max (read buffer)))
                     (numberp (setq min (read buffer))))
              (setq group (symbol-name group)))
            (if (and (numberp (setq max (read buffer)))
                     (numberp (setq min (read buffer))))
-               (push (list group (cons min max))
+               (push (list (mm-string-as-unibyte group) (cons min max))
                      group-assoc)))
        (error nil))
       (widen)
                      group-assoc)))
        (error nil))
       (widen)
@@ -708,6 +708,7 @@ nn*-request-list should have been called before calling this function."
   (let ((coding-system-for-write nnmail-active-file-coding-system))
     (when file-name
       (with-temp-file file-name
   (let ((coding-system-for-write nnmail-active-file-coding-system))
     (when file-name
       (with-temp-file file-name
+       (mm-disable-multibyte)
        (nnmail-generate-active group-assoc)))))
 
 (defun nnmail-generate-active (alist)
        (nnmail-generate-active group-assoc)))))
 
 (defun nnmail-generate-active (alist)
index 0f15918..f644fb7 100644 (file)
@@ -258,7 +258,8 @@ non-nil.")
            (string-to-number (file-name-nondirectory path)))))))
 
 (deffoo nnml-request-group (group &optional server dont-check)
            (string-to-number (file-name-nondirectory path)))))))
 
 (deffoo nnml-request-group (group &optional server dont-check)
-  (let ((file-name-coding-system nnmail-pathname-coding-system))
+  (let ((file-name-coding-system nnmail-pathname-coding-system)
+       (decoded (nnml-decoded-group-name group server)))
     (cond
      ((not (nnml-possibly-change-directory group server))
       (nnheader-report 'nnml "Invalid group (no such directory)"))
     (cond
      ((not (nnml-possibly-change-directory group server))
       (nnheader-report 'nnml "Invalid group (no such directory)"))
@@ -268,15 +269,15 @@ non-nil.")
      ((not (file-directory-p nnml-current-directory))
       (nnheader-report 'nnml "%s is not a directory" nnml-current-directory))
      (dont-check
      ((not (file-directory-p nnml-current-directory))
       (nnheader-report 'nnml "%s is not a directory" nnml-current-directory))
      (dont-check
-      (nnheader-report 'nnml "Group %s selected" group)
+      (nnheader-report 'nnml "Group %s selected" decoded)
       t)
      (t
       (nnheader-re-read-dir nnml-current-directory)
       (nnmail-activate 'nnml)
       (let ((active (nth 1 (assoc group nnml-group-alist))))
        (if (not active)
       t)
      (t
       (nnheader-re-read-dir nnml-current-directory)
       (nnmail-activate 'nnml)
       (let ((active (nth 1 (assoc group nnml-group-alist))))
        (if (not active)
-           (nnheader-report 'nnml "No such group: %s" group)
-         (nnheader-report 'nnml "Selected group %s" group)
+           (nnheader-report 'nnml "No such group: %s" decoded)
+         (nnheader-report 'nnml "Selected group %s" decoded)
          (nnheader-insert "211 %d %d %d %s\n"
                           (max (1+ (- (cdr active) (car active))) 0)
                           (car active) (cdr active) group)))))))
          (nnheader-insert "211 %d %d %d %s\n"
                           (max (1+ (- (cdr active) (car active))) 0)
                           (car active) (cdr active) group)))))))