From 4da93d866c958ab599763d8125f3442da1ccde83 Mon Sep 17 00:00:00 2001 From: tsuchiya Date: Sun, 9 Dec 2001 12:44:58 +0000 Subject: [PATCH] Cancel the last change. * lisp/gnus-namazu.el (gnus-namazu-summary-buffer-name): New advice. --- ChangeLog | 6 +++--- lisp/gnus-namazu.el | 25 +++++++++++++++++++++++-- 2 files changed, 26 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 61755af..ff72bf6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,8 +1,8 @@ 2001-12-09 TSUCHIYA Masatoshi - * lisp/gnus-namazu.el (gnus-namazu-search): Slightly modified for - Oort Gnus v0.03. - + * lisp/gnus-namazu.el (gnus-namazu-summary-buffer-name): New + advice. + * lisp/gnus.el (top): Add autoload of `gnus-namazu-search'. * lisp/gnus-sum.el (gnus-summary-mode-map): Define "\C-c\C-n" as diff --git a/lisp/gnus-namazu.el b/lisp/gnus-namazu.el index 1f42383..37fdd86 100644 --- a/lisp/gnus-namazu.el +++ b/lisp/gnus-namazu.el @@ -148,6 +148,26 @@ options make any sense in this context." "Associative list to map groups in lower case to official names.") (defconst gnus-namazu/group-name-regexp "\\`nnvirtual:namazu-search\\?") +;; Multibyte group name: +(add-to-list 'gnus-group-name-charset-group-alist + (cons gnus-namazu/group-name-regexp gnus-namazu-coding-system)) +(and + (fboundp 'gnus-group-decoded-name) + (let ((group + (concat "nnvirtual:namazu-search?query=" + (decode-coding-string + (string 27 36 66 52 65 59 122 27 40 66) + (if (boundp 'MULE) '*iso-2022-jp* 'iso-2022-7bit))))) + (/= (length (string-to-char-list (concat "*Summary " group "*"))) + (length + (string-to-char-list + (gnus-summary-buffer-name + (encode-coding-string group gnus-namazu-coding-system)))))) + (let (current-load-list) + (defadvice gnus-summary-buffer-name + (before gnus-namazu-summary-buffer-name activate compile) + "Advised by `gnus-namazu' to handle encoded group names." + (ad-set-arg 0 (gnus-group-decoded-name (ad-get-arg 0)))))) (defmacro gnus-namazu/make-article (group number) `(cons ,group ,number)) @@ -161,8 +181,6 @@ options make any sense in this context." (gnus-servers-using-backend 'nnmh))) (defun gnus-namazu/setup () - (add-to-list 'gnus-group-name-charset-group-alist - (cons gnus-namazu/group-name-regexp gnus-namazu-coding-system)) (unless gnus-namazu-case-sensitive-filesystem ;; FIXME: The alist to map group names in lower case to real names ;; is reconstructed every when gnus-namazu/setup() is called. @@ -461,6 +479,9 @@ and make a virtual group contains its results." (dolist (a articles) (add-to-list 'real-groups (gnus-namazu/article-group a)))) ;; Generate virtual group which includes all results. + (when (fboundp 'gnus-group-decoded-name) + (setq vgroup + (encode-coding-string vgroup gnus-namazu-coding-system))) (setq vgroup (gnus-group-read-ephemeral-group vgroup -- 1.7.10.4