+2011-08-30 Lars Magne Ingebrigtsen <larsi@gnus.org>
+
+ * gnus-group.el (gnus-group-name-charset): Don't bug out on server
+ names.
+
2011-08-27 Daiki Ueno <ueno@unixuser.org>
* mml-smime.el (mml-smime-epg-verify): Don't use the 4th arg of
(gnus-group-mode)))
(defun gnus-group-name-charset (method group)
- (if (null method)
- (setq method (gnus-find-method-for-group group)))
- (let ((item (or (assoc method gnus-group-name-charset-method-alist)
- (and (consp method)
- (assoc (list (car method) (cadr method))
- gnus-group-name-charset-method-alist))))
- (alist gnus-group-name-charset-group-alist)
- result)
- (if item
- (cdr item)
- (while (setq item (pop alist))
- (if (string-match (car item) group)
- (setq alist nil
- result (cdr item))))
- result)))
+ (unless method
+ (setq method (gnus-find-method-for-group group)))
+ (when (stringp method)
+ (setq method (gnus-server-to-method method)))
+ (if (eq (car method) 'nnimap)
+ ;; IMAP groups should not be encoded, since they do the encoding
+ ;; in utf7 in the protocol.
+ nil
+ (let ((item (or (assoc method gnus-group-name-charset-method-alist)
+ (and (consp method)
+ (assoc (list (car method) (cadr method))
+ gnus-group-name-charset-method-alist))))
+ (alist gnus-group-name-charset-group-alist)
+ result)
+ (if item
+ (cdr item)
+ (while (setq item (pop alist))
+ (if (string-match (car item) group)
+ (setq alist nil
+ result (cdr item))))
+ result))))
(defun gnus-group-name-decode (string charset)
;; Fixme: Don't decode in unibyte mode.