From add219a1606d804819dd5a4c711c80eb0677a846 Mon Sep 17 00:00:00 2001 From: shuhei-k Date: Fri, 28 Aug 1998 13:15:40 +0000 Subject: [PATCH] (gnus-set-summary-default-charset): Try "qualified" newsgroup name first. --- lisp/gnus-i18n.el | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/lisp/gnus-i18n.el b/lisp/gnus-i18n.el index 105130f..b45b119 100644 --- a/lisp/gnus-i18n.el +++ b/lisp/gnus-i18n.el @@ -63,16 +63,24 @@ newsgroup name. SYMBOL is MIME charset or coding-system.") It is specified by variable `gnus-newsgroup-default-charset-alist' \(cf. function `gnus-set-newsgroup-default-charset')." (if (buffer-live-p gnus-summary-buffer) - (let* ((group (save-excursion - (set-buffer gnus-summary-buffer) - (gnus-group-real-name gnus-newsgroup-name))) - (alist gnus-newsgroup-default-charset-alist) - (charset (catch 'found - (let (pair) - (while (setq pair (car alist)) - (if (string-match (car pair) group) - (throw 'found (cdr pair))) - (setq alist (cdr alist))))))) + (let* ((qgroup (save-excursion + (set-buffer gnus-summary-buffer) + gnus-newsgroup-name)) + (rgroup (gnus-group-real-name qgroup)) + alist pair charset) + (setq charset (catch 'found + ;; First, use "qualified" newsgroup name. + (setq alist gnus-newsgroup-default-charset-alist) + (while (setq pair (car alist)) + (if (string-match (car pair) qgroup) + (throw 'found (cdr pair))) + (setq alist (cdr alist))) + ;; Next, try "real" newsgroup name. + (setq alist gnus-newsgroup-default-charset-alist) + (while (setq pair (car alist)) + (if (string-match (car pair) rgroup) + (throw 'found (cdr pair))) + (setq alist (cdr alist))))) (if charset (progn (save-excursion -- 1.7.10.4