From: tsuchiya Date: Sat, 9 Feb 2002 05:41:05 +0000 (+0000) Subject: (gnus-namazu/group-alist): Abolished. X-Git-Tag: t-gnus-6_15_6-01-quimby~64 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dbe72fe412ea4e9938e7910bc5e07aede727dc11;p=elisp%2Fgnus.git- (gnus-namazu/group-alist): Abolished. (gnus-namazu/setup): Not set it. (gnus-namazu/shutdown): Removed. (gnus-namazu/group-prefixed-name): Handle case-insensitive file names by itself. (gnus-namazu/complete-query): Relaxed the regexp which matches field search keywords. This patch is posted by NISHIDA Masakazu . --- diff --git a/ChangeLog b/ChangeLog index 43305bc..32d1f11 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +2002-02-09 TSUCHIYA Masatoshi + + * lisp/gnus-namazu.el (gnus-namazu/group-alist): Abolished. + (gnus-namazu/setup): Not set it. + (gnus-namazu/shutdown): Removed. + (gnus-namazu/group-prefixed-name): Handle case-insensitive file + names by itself. + +2002-02-09 NISHIDA Masakazu + + * lisp/gnus-namazu.el (gnus-namazu/complete-query): Relaxed the + regexp which matches field search keywords. + 2002-02-01 ShengHuo ZHU * etc/gnus/gnus.xpm: Remove some garbages at the end of the file. diff --git a/lisp/gnus-namazu.el b/lisp/gnus-namazu.el index a577798..01ad845 100644 --- a/lisp/gnus-namazu.el +++ b/lisp/gnus-namazu.el @@ -162,8 +162,6 @@ options make any sense in this context." :group 'gnus-namazu) ;;; Internal Variable: -(defvar gnus-namazu/group-alist nil - "Associative list to map groups in lower case to official names.") (defconst gnus-namazu/group-name-regexp "\\`nnvirtual:namazu-search\\?") ;; Multibyte group name: @@ -207,21 +205,7 @@ options make any sense in this context." (setcdr pair gnus-namazu-coding-system) (push (cons gnus-namazu/group-name-regexp gnus-namazu-coding-system) - gnus-group-name-charset-group-alist)))) - (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. - ;; This reconstruction make gnus-namazu-search() slow. - (setq gnus-namazu/group-alist nil) - (dolist (server (gnus-namazu/indexed-servers)) - (dolist (group (gnus-namazu/request-list server)) - (let ((name (gnus-group-prefixed-name group server))) - (unless (assoc name gnus-namazu/group-alist) - (push (cons (downcase name) name) gnus-namazu/group-alist))))))) - -(defun gnus-namazu/shutdown () - (setq gnus-namazu/group-alist nil)) -(add-hook 'gnus-exit-gnus-hook 'gnus-namazu/shutdown) + gnus-group-name-charset-group-alist))))) (defun gnus-namazu/request-list (server) "Return groups of the server SERVER." @@ -279,9 +263,14 @@ options make any sense in this context." "Return the whole name from GROUP and METHOD." (if gnus-namazu-case-sensitive-filesystem (gnus-group-prefixed-name group method) - (let ((name (gnus-group-prefixed-name group method))) - (or (cdr (assoc (downcase name) gnus-namazu/group-alist)) - name)))) + (let* ((orig (gnus-group-prefixed-name group method)) + (name (downcase orig))) + (catch 'found-group + (mapatoms (lambda (sym) + (when (string= name (downcase (symbol-name sym))) + (throw 'found-group (symbol-name sym)))) + gnus-newsrc-hashtb) + orig)))) (defun gnus-namazu/check-cache-group (str) "Get the news group from the partial path STR of the cached article." @@ -454,7 +443,7 @@ generate possible group names from it." (interactive) (let ((pos (point))) (cond - ((and (re-search-backward "\\+\\([a-z]*\\)" nil t) + ((and (re-search-backward "\\+\\([-a-z]*\\)" nil t) (= pos (match-end 0))) (let* ((partial (match-string 1)) (completions