* gnus-start.el (gnus-subscribe-newsgroup, gnus-start-draft-setup)
authorJesper Harder <harder@ifa.au.dk>
Sat, 10 Jan 2004 04:27:01 +0000 (04:27 +0000)
committerJesper Harder <harder@ifa.au.dk>
Sat, 10 Jan 2004 04:27:01 +0000 (04:27 +0000)
(gnus-group-change-level, gnus-kill-newsgroup)
(gnus-check-bogus-newsgroups, gnus-get-unread-articles-in-group)
(gnus-get-unread-articles, gnus-make-articles-unread)
(gnus-make-ascending-articles-unread): Use accessor
macros (gnus-group-entry, gnus-group-unread, gnus-info-marks etc.)
to get group information for improved readability.

* gnus-srvr.el (gnus-browse-unsubscribe-group): do.

* gnus-soup.el (gnus-soup-group-brew): do.

* gnus-msg.el (gnus-put-message): do.

* gnus-move.el (gnus-group-move-group-to-server): do.

* gnus-kill.el (gnus-batch-score): do.

* gnus-group.el (gnus-group-prepare-flat, gnus-group-delete-group)
(gnus-group-update-group-line, gnus-group-insert-group-line-info)
(gnus-group-update-group, gnus-group-read-group)
(gnus-group-make-group, gnus-group-make-help-group)
(gnus-group-make-archive-group, gnus-group-make-directory-group)
(gnus-group-make-empty-virtual, gnus-group-sort-selected-flat)
(gnus-group-sort-by-unread, gnus-group-catchup)
(gnus-group-unsubscribe-group, gnus-group-kill-group)
(gnus-group-yank-group, gnus-group-set-info)
(gnus-group-list-groups): do.

* gnus.el (gnus-generate-new-group-name): do.

* gnus-delay.el (gnus-delay-send-queue): do.

* nnvirtual.el (nnvirtual-catchup-group): do.

* nnkiboze.el (nnkiboze-generate-group, nnkiboze-generate-group):
do.

* gnus-topic.el (gnus-topic-find-groups, gnus-topic-clean-alist)
(gnus-group-prepare-topics, gnus-topic-check-topology): do.

* gnus-sum.el (gnus-update-read-articles, gnus-select-newsgroup)
(gnus-mark-xrefs-as-read, gnus-compute-read-articles)
(gnus-summary-walk-group-buffer, gnus-summary-move-article)
(gnus-group-make-articles-read): do.

14 files changed:
lisp/ChangeLog
lisp/gnus-delay.el
lisp/gnus-group.el
lisp/gnus-kill.el
lisp/gnus-move.el
lisp/gnus-msg.el
lisp/gnus-soup.el
lisp/gnus-srvr.el
lisp/gnus-start.el
lisp/gnus-sum.el
lisp/gnus-topic.el
lisp/gnus.el
lisp/nnkiboze.el
lisp/nnvirtual.el

index abc709c..b0d0850 100644 (file)
@@ -1,3 +1,51 @@
+2004-01-10  Jesper Harder  <harder@ifa.au.dk>
+
+       * gnus-start.el (gnus-subscribe-newsgroup, gnus-start-draft-setup)
+       (gnus-group-change-level, gnus-kill-newsgroup)
+       (gnus-check-bogus-newsgroups, gnus-get-unread-articles-in-group)
+       (gnus-get-unread-articles, gnus-make-articles-unread)
+       (gnus-make-ascending-articles-unread): Use accessor
+       macros (gnus-group-entry, gnus-group-unread, gnus-info-marks etc.)
+       to get group information for improved readability.
+
+       * gnus-srvr.el (gnus-browse-unsubscribe-group): do.
+
+       * gnus-soup.el (gnus-soup-group-brew): do.
+
+       * gnus-msg.el (gnus-put-message): do.
+
+       * gnus-move.el (gnus-group-move-group-to-server): do.
+
+       * gnus-kill.el (gnus-batch-score): do.
+
+       * gnus-group.el (gnus-group-prepare-flat, gnus-group-delete-group)
+       (gnus-group-update-group-line, gnus-group-insert-group-line-info)
+       (gnus-group-update-group, gnus-group-read-group)
+       (gnus-group-make-group, gnus-group-make-help-group)
+       (gnus-group-make-archive-group, gnus-group-make-directory-group)
+       (gnus-group-make-empty-virtual, gnus-group-sort-selected-flat)
+       (gnus-group-sort-by-unread, gnus-group-catchup)
+       (gnus-group-unsubscribe-group, gnus-group-kill-group)
+       (gnus-group-yank-group, gnus-group-set-info)
+       (gnus-group-list-groups): do.
+
+       * gnus.el (gnus-generate-new-group-name): do.
+
+       * gnus-delay.el (gnus-delay-send-queue): do.
+
+       * nnvirtual.el (nnvirtual-catchup-group): do.
+
+       * nnkiboze.el (nnkiboze-generate-group, nnkiboze-generate-group):
+       do.
+
+       * gnus-topic.el (gnus-topic-find-groups, gnus-topic-clean-alist)
+       (gnus-group-prepare-topics, gnus-topic-check-topology): do.
+       
+       * gnus-sum.el (gnus-update-read-articles, gnus-select-newsgroup)
+       (gnus-mark-xrefs-as-read, gnus-compute-read-articles)
+       (gnus-summary-walk-group-buffer, gnus-summary-move-article)
+       (gnus-group-make-articles-read): do.
+       
 2004-01-09  Jesper Harder  <harder@ifa.au.dk>
 
        * gnus-art.el (article-decode-mime-words, article-babel)
 2004-01-09  Jesper Harder  <harder@ifa.au.dk>
 
        * gnus-art.el (article-decode-mime-words, article-babel)
index cc212fa..67f74ce 100644 (file)
@@ -150,7 +150,7 @@ DELAY is a string, giving the length of the time.  Possible values are:
           (message-send-hook (copy-sequence message-send-hook))
           articles
           article deadline)
           (message-send-hook (copy-sequence message-send-hook))
           articles
           article deadline)
-      (when (gnus-gethash group gnus-newsrc-hashtb)
+      (when (gnus-group-entry group)
        (gnus-activate-group group)
        (add-hook 'message-send-hook
                  '(lambda ()
        (gnus-activate-group group)
        (add-hook 'message-send-hook
                  '(lambda ()
index bf037c1..1cd5b60 100644 (file)
@@ -1156,7 +1156,7 @@ Also see the `gnus-group-use-permanent-levels' variable."
                     (point-min) (point-max)
                     'gnus-group (gnus-intern-safe
                                  group gnus-active-hashtb))))
                     (point-min) (point-max)
                     'gnus-group (gnus-intern-safe
                                  group gnus-active-hashtb))))
-         (let ((newsrc (cdddr (gnus-gethash group gnus-newsrc-hashtb))))
+         (let ((newsrc (cdddr (gnus-group-entry group))))
            (while (and newsrc
                        (not (gnus-goto-char
                              (text-property-any
            (while (and newsrc
                        (not (gnus-goto-char
                              (text-property-any
@@ -1211,7 +1211,7 @@ if it is a string, only list groups matching REGEXP."
              group (gnus-info-group info)
              params (gnus-info-params info)
              newsrc (cdr newsrc)
              group (gnus-info-group info)
              params (gnus-info-params info)
              newsrc (cdr newsrc)
-             unread (car (gnus-gethash group gnus-newsrc-hashtb)))
+             unread (gnus-group-unread group))
        (when not-in-list
          (setq not-in-list (delete group not-in-list)))
        (when (gnus-group-prepare-logic
        (when not-in-list
          (setq not-in-list (delete group not-in-list)))
        (when (gnus-group-prepare-logic
@@ -1311,7 +1311,7 @@ if it is a string, only list groups matching REGEXP."
   "Update the current line in the group buffer."
   (let* ((buffer-read-only nil)
         (group (gnus-group-group-name))
   "Update the current line in the group buffer."
   (let* ((buffer-read-only nil)
         (group (gnus-group-group-name))
-        (entry (and group (gnus-gethash group gnus-newsrc-hashtb)))
+        (entry (and group (gnus-group-entry group)))
         gnus-group-indentation)
     (when group
       (and entry
         gnus-group-indentation)
     (when group
       (and entry
@@ -1328,7 +1328,7 @@ if it is a string, only list groups matching REGEXP."
 
 (defun gnus-group-insert-group-line-info (group)
   "Insert GROUP on the current line."
 
 (defun gnus-group-insert-group-line-info (group)
   "Insert GROUP on the current line."
-  (let ((entry (gnus-gethash group gnus-newsrc-hashtb))
+  (let ((entry (gnus-group-entry group))
        (gnus-group-indentation (gnus-group-group-indentation))
        active info)
     (if entry
        (gnus-group-indentation (gnus-group-group-indentation))
        active info)
     (if entry
@@ -1508,7 +1508,7 @@ already."
            (loc (point-min))
            found buffer-read-only)
        ;; Enter the current status into the dribble buffer.
            (loc (point-min))
            found buffer-read-only)
        ;; Enter the current status into the dribble buffer.
-       (let ((entry (gnus-gethash group gnus-newsrc-hashtb)))
+       (let ((entry (gnus-group-entry group)))
          (when (and entry
                     (not (gnus-ephemeral-group-p group)))
            (gnus-dribble-enter
          (when (and entry
                     (not (gnus-ephemeral-group-p group)))
            (gnus-dribble-enter
@@ -1533,7 +1533,7 @@ already."
          ;; go, and insert it there (or at the end of the buffer).
          (if gnus-goto-missing-group-function
              (funcall gnus-goto-missing-group-function group)
          ;; go, and insert it there (or at the end of the buffer).
          (if gnus-goto-missing-group-function
              (funcall gnus-goto-missing-group-function group)
-           (let ((entry (cddr (gnus-gethash group gnus-newsrc-hashtb))))
+           (let ((entry (cddr (gnus-group-entry group))))
              (while (and entry (car entry)
                          (not
                           (gnus-goto-char
              (while (and entry (car entry)
                          (not
                           (gnus-goto-char
@@ -1861,8 +1861,7 @@ group."
     (unless group
       (error "No group on current line"))
     (setq marked (gnus-info-marks
     (unless group
       (error "No group on current line"))
     (setq marked (gnus-info-marks
-                 (nth 2 (setq entry (gnus-gethash
-                                     group gnus-newsrc-hashtb)))))
+                 (nth 2 (setq entry (gnus-group-entry group)))))
     ;; This group might be a dead group.  In that case we have to get
     ;; the number of unread articles from `gnus-active-hashtb'.
     (setq number
     ;; This group might be a dead group.  In that case we have to get
     ;; the number of unread articles from `gnus-active-hashtb'.
     (setq number
@@ -2233,15 +2232,14 @@ ADDRESS."
                    method))))
         (nname (if method (gnus-group-prefixed-name name meth) name))
         backend info)
                    method))))
         (nname (if method (gnus-group-prefixed-name name meth) name))
         backend info)
-    (when (gnus-gethash nname gnus-newsrc-hashtb)
+    (when (gnus-group-entry nname)
       (error "Group %s already exists" nname))
     ;; Subscribe to the new group.
     (gnus-group-change-level
      (setq info (list t nname gnus-level-default-subscribed nil nil meth))
      gnus-level-default-subscribed gnus-level-killed
      (and (gnus-group-group-name)
       (error "Group %s already exists" nname))
     ;; Subscribe to the new group.
     (gnus-group-change-level
      (setq info (list t nname gnus-level-default-subscribed nil nil meth))
      gnus-level-default-subscribed gnus-level-killed
      (and (gnus-group-group-name)
-         (gnus-gethash (gnus-group-group-name)
-                       gnus-newsrc-hashtb))
+         (gnus-group-entry (gnus-group-group-name)))
      t)
     ;; Make it active.
     (gnus-set-active nname (cons 1 0))
      t)
     ;; Make it active.
     (gnus-set-active nname (cons 1 0))
@@ -2309,7 +2307,7 @@ be removed from the server, even when it's empty."
          (gnus-message 6 "Deleting group %s...done" group)
          (gnus-group-goto-group group)
          (gnus-group-kill-group 1 t)
          (gnus-message 6 "Deleting group %s...done" group)
          (gnus-group-goto-group group)
          (gnus-group-kill-group 1 t)
-         (gnus-sethash group nil gnus-active-hashtb)
+         (gnus-set-active group nil)
          (if (boundp 'gnus-cache-active-hashtb)
              (when gnus-cache-active-hashtb
                (gnus-sethash group nil gnus-cache-active-hashtb)
          (if (boundp 'gnus-cache-active-hashtb)
              (when gnus-cache-active-hashtb
                (gnus-sethash group nil gnus-cache-active-hashtb)
@@ -2480,7 +2478,7 @@ group already exists:
   (interactive)
   (let ((name (gnus-group-prefixed-name "gnus-help" '(nndoc "gnus-help")))
        (file (nnheader-find-etc-directory "gnus-tut.txt" t)))
   (interactive)
   (let ((name (gnus-group-prefixed-name "gnus-help" '(nndoc "gnus-help")))
        (file (nnheader-find-etc-directory "gnus-tut.txt" t)))
-    (if (gnus-gethash name gnus-newsrc-hashtb)
+    (if (gnus-group-entry name)
        (cond ((eq noerror nil)
               (error "Documentation group already exists"))
              ((eq noerror t)
        (cond ((eq noerror nil)
               (error "Documentation group already exists"))
              ((eq noerror t)
@@ -2638,7 +2636,7 @@ Given a prefix, create a full group."
   (interactive "P")
   (let ((group (gnus-group-prefixed-name
                (if all "ding.archives" "ding.recent") '(nndir ""))))
   (interactive "P")
   (let ((group (gnus-group-prefixed-name
                (if all "ding.archives" "ding.recent") '(nndir ""))))
-    (when (gnus-gethash group gnus-newsrc-hashtb)
+    (when (gnus-group-entry group)
       (error "Archive group already exists"))
     (gnus-group-make-group
      (gnus-group-real-name group)
       (error "Archive group already exists"))
     (gnus-group-make-group
      (gnus-group-real-name group)
@@ -2662,7 +2660,7 @@ mail messages or news articles in files that have numeric names."
   (let ((ext "")
        (i 0)
        group)
   (let ((ext "")
        (i 0)
        group)
-    (while (or (not group) (gnus-gethash group gnus-newsrc-hashtb))
+    (while (or (not group) (gnus-group-entry group))
       (setq group
            (gnus-group-prefixed-name
             (expand-file-name ext dir)
       (setq group
            (gnus-group-prefixed-name
             (expand-file-name ext dir)
@@ -2732,7 +2730,7 @@ score file entries for articles to include in the group."
   (let* ((method (list 'nnvirtual "^$"))
         (pgroup (gnus-group-prefixed-name group method)))
     ;; Check whether it exists already.
   (let* ((method (list 'nnvirtual "^$"))
         (pgroup (gnus-group-prefixed-name group method)))
     ;; Check whether it exists already.
-    (when (gnus-gethash pgroup gnus-newsrc-hashtb)
+    (when (gnus-group-entry pgroup)
       (error "Group %s already exists" pgroup))
     ;; Subscribe the new group after the group on the current line.
     (gnus-subscribe-group pgroup (gnus-group-group-name) method)
       (error "Group %s already exists" pgroup))
     ;; Subscribe the new group after the group on the current line.
     (gnus-subscribe-group pgroup (gnus-group-group-name) method)
@@ -2904,7 +2902,7 @@ If REVERSE, sort in reverse order."
   (let (entries infos)
     ;; First find all the group entries for these groups.
     (while groups
   (let (entries infos)
     ;; First find all the group entries for these groups.
     (while groups
-      (push (nthcdr 2 (gnus-gethash (pop groups) gnus-newsrc-hashtb))
+      (push (nthcdr 2 (gnus-group-entry (pop groups)))
            entries))
     ;; Then sort the infos.
     (setq infos
            entries))
     ;; Then sort the infos.
     (setq infos
@@ -2985,8 +2983,8 @@ sort in reverse order."
 
 (defun gnus-group-sort-by-unread (info1 info2)
   "Sort by number of unread articles."
 
 (defun gnus-group-sort-by-unread (info1 info2)
   "Sort by number of unread articles."
-  (let ((n1 (car (gnus-gethash (gnus-info-group info1) gnus-newsrc-hashtb)))
-       (n2 (car (gnus-gethash (gnus-info-group info2) gnus-newsrc-hashtb))))
+  (let ((n1 (gnus-group-unread (gnus-info-group info1)))
+       (n2 (gnus-group-unread (gnus-info-group info1))))
     (< (or (and (numberp n1) n1) 0)
        (or (and (numberp n2) n2) 0))))
 
     (< (or (and (numberp n1) n1) 0)
        (or (and (numberp n2) n2) 0))))
 
@@ -3126,9 +3124,9 @@ Cross references (Xref: header) of articles are ignored."
 If ALL is non-nil, all articles are marked as read.
 The return value is the number of articles that were marked as read,
 or nil if no action could be taken."
 If ALL is non-nil, all articles are marked as read.
 The return value is the number of articles that were marked as read,
 or nil if no action could be taken."
-  (let* ((entry (gnus-gethash group gnus-newsrc-hashtb))
+  (let* ((entry (gnus-group-entry group))
         (num (car entry))
         (num (car entry))
-        (marks (nth 3 (nth 2 entry)))
+        (marks (gnus-info-marks (nth 2 entry)))
         (unread (gnus-list-of-unread-articles group)))
     ;; Remove entries for this group.
     (nnmail-purge-split-history (gnus-group-real-name group))
         (unread (gnus-list-of-unread-articles group)))
     ;; Remove entries for this group.
     (nnmail-purge-split-history (gnus-group-real-name group))
@@ -3284,7 +3282,7 @@ group line."
          (gnus-read-active-file-p)
          nil
          'gnus-group-history)))
          (gnus-read-active-file-p)
          nil
          'gnus-group-history)))
-  (let ((newsrc (gnus-gethash group gnus-newsrc-hashtb)))
+  (let ((newsrc (gnus-group-entry group)))
     (cond
      ((string-match "^[ \t]*$" group)
       (error "Empty group name"))
     (cond
      ((string-match "^[ \t]*$" group)
       (error "Empty group name"))
@@ -3308,7 +3306,7 @@ group line."
                gnus-level-zombie)
           gnus-level-killed)
        (when (gnus-group-group-name)
                gnus-level-zombie)
           gnus-level-killed)
        (when (gnus-group-group-name)
-        (gnus-gethash (gnus-group-group-name) gnus-newsrc-hashtb)))
+        (gnus-group-entry (gnus-group-group-name))))
       (unless silent
        (gnus-group-update-group group)))
      (t (error "No such newsgroup: %s" group)))
       (unless silent
        (gnus-group-update-group group)))
      (t (error "No such newsgroup: %s" group)))
@@ -3376,7 +3374,7 @@ of groups killed."
          (setq level (gnus-group-group-level))
          (gnus-delete-line)
          (when (and (not discard)
          (setq level (gnus-group-group-level))
          (gnus-delete-line)
          (when (and (not discard)
-                    (setq entry (gnus-gethash group gnus-newsrc-hashtb)))
+                    (setq entry (gnus-group-entry group)))
            (gnus-undo-register
              `(progn
                 (gnus-group-goto-group ,(gnus-group-group-name))
            (gnus-undo-register
              `(progn
                 (gnus-group-goto-group ,(gnus-group-group-name))
@@ -3399,7 +3397,7 @@ of groups killed."
          (funcall gnus-group-change-level-function
                   group gnus-level-killed 3))
        (cond
          (funcall gnus-group-change-level-function
                   group gnus-level-killed 3))
        (cond
-        ((setq entry (gnus-gethash group gnus-newsrc-hashtb))
+        ((setq entry (gnus-group-entry group))
          (push (cons (car entry) (nth 2 entry))
                gnus-list-of-killed-groups)
          (setcdr (cdr entry) (cdddr entry)))
          (push (cons (car entry) (nth 2 entry))
                gnus-list-of-killed-groups)
          (setcdr (cdr entry) (cdddr entry)))
@@ -3432,7 +3430,7 @@ yanked) a list of yanked groups is returned."
       (setq prev (gnus-group-group-name))
       (gnus-group-change-level
        info (gnus-info-level (cdr info)) gnus-level-killed
       (setq prev (gnus-group-group-name))
       (gnus-group-change-level
        info (gnus-info-level (cdr info)) gnus-level-killed
-       (and prev (gnus-gethash prev gnus-newsrc-hashtb))
+       (and prev (gnus-group-entry prev))
        t)
       (gnus-group-insert-group-line-info group)
       (gnus-undo-register
        t)
       (gnus-group-insert-group-line-info group)
       (gnus-undo-register
@@ -4018,9 +4016,8 @@ and the second element is the address."
 
 (defun gnus-group-set-info (info &optional method-only-group part)
   (when (or info part)
 
 (defun gnus-group-set-info (info &optional method-only-group part)
   (when (or info part)
-    (let* ((entry (gnus-gethash
-                  (or method-only-group (gnus-info-group info))
-                  gnus-newsrc-hashtb))
+    (let* ((entry (gnus-group-entry
+                  (or method-only-group (gnus-info-group info))))
           (part-info info)
           (info (if method-only-group (nth 2 entry) info))
           method)
           (part-info info)
           (info (if method-only-group (nth 2 entry) info))
           method)
@@ -4058,10 +4055,9 @@ and the second element is the address."
              (gnus-group-make-group (gnus-info-group info))))
          (gnus-message 6 "Note: New group created")
          (setq entry
              (gnus-group-make-group (gnus-info-group info))))
          (gnus-message 6 "Note: New group created")
          (setq entry
-               (gnus-gethash (gnus-group-prefixed-name
-                              (gnus-group-real-name (gnus-info-group info))
-                              (or (gnus-info-method info) gnus-select-method))
-                             gnus-newsrc-hashtb))))
+               (gnus-group-entry (gnus-group-prefixed-name
+                                  (gnus-group-real-name (gnus-info-group info))
+                                  (or (gnus-info-method info) gnus-select-method))))))
       ;; Whether it was a new group or not, we now have the entry, so we
       ;; can do the update.
       (if entry
       ;; Whether it was a new group or not, we now have the entry, so we
       ;; can do the update.
       (if entry
index cf95f9f..2a5770f 100644 (file)
@@ -690,7 +690,7 @@ Usage: emacs -batch -l ~/.emacs -l gnus -f gnus-batch-score"
         (mail-sources nil)
         (gnus-use-dribble-file nil)
         (gnus-batch-mode t)
         (mail-sources nil)
         (gnus-use-dribble-file nil)
         (gnus-batch-mode t)
-        info group newsrc entry
+        info group newsrc unread
         ;; Disable verbose message.
         gnus-novice-user gnus-large-newsgroup
         gnus-options-subscribe gnus-auto-subscribed-groups
         ;; Disable verbose message.
         gnus-novice-user gnus-large-newsgroup
         gnus-options-subscribe gnus-auto-subscribed-groups
@@ -702,11 +702,11 @@ Usage: emacs -batch -l ~/.emacs -l gnus -f gnus-batch-score"
     (setq newsrc (cdr gnus-newsrc-alist))
     (while (setq info (pop newsrc))
       (setq group (gnus-info-group info)
     (setq newsrc (cdr gnus-newsrc-alist))
     (while (setq info (pop newsrc))
       (setq group (gnus-info-group info)
-           entry (gnus-gethash group gnus-newsrc-hashtb))
+           unread (gnus-group-unread group))
       (when (and (<= (gnus-info-level info) gnus-level-subscribed)
       (when (and (<= (gnus-info-level info) gnus-level-subscribed)
-                (and (car entry)
-                     (or (eq (car entry) t)
-                         (not (zerop (car entry))))))
+                (and unread
+                     (or (eq unread t)
+                         (not (zerop unread)))))
        (ignore-errors
          (gnus-summary-read-group group nil t nil t))
        (when (eq (current-buffer) (get-buffer gnus-summary-buffer))
        (ignore-errors
          (gnus-summary-read-group group nil t nil t))
        (when (eq (current-buffer) (get-buffer gnus-summary-buffer))
index 36839c8..3e06945 100644 (file)
@@ -176,8 +176,7 @@ Update the .newsrc.eld file to reflect the change of nntp server."
           (new-name (gnus-group-prefixed-name
                      (gnus-group-real-name group) to-server)))
       (gnus-info-set-group info new-name)
           (new-name (gnus-group-prefixed-name
                      (gnus-group-real-name group) to-server)))
       (gnus-info-set-group info new-name)
-      (gnus-sethash new-name (gnus-gethash group gnus-newsrc-hashtb)
-                   gnus-newsrc-hashtb)
+      (gnus-sethash new-name (gnus-group-entry group) gnus-newsrc-hashtb)
       (gnus-sethash group nil gnus-newsrc-hashtb))))
 
 (provide 'gnus-move)
       (gnus-sethash group nil gnus-newsrc-hashtb))))
 
 (provide 'gnus-move)
index a1223df..5f5aa38 100644 (file)
@@ -1377,7 +1377,7 @@ The current group name will be inserted at \"%s\".")
                 (not (gnus-group-read-only-p group)))
       (setq group (read-string "Put in group: " nil (gnus-writable-groups))))
 
                 (not (gnus-group-read-only-p group)))
       (setq group (read-string "Put in group: " nil (gnus-writable-groups))))
 
-    (when (gnus-gethash group gnus-newsrc-hashtb)
+    (when (gnus-group-entry group)
       (error "No such group: %s" group))
     (save-excursion
       (save-restriction
       (error "No such group: %s" group))
     (save-excursion
       (save-restriction
index b7c1a23..62722b1 100644 (file)
@@ -278,7 +278,7 @@ Note -- this function hasn't been implemented yet."
 If NOT-ALL, don't pack ticked articles."
   (let ((gnus-expert-user t)
        (gnus-large-newsgroup nil)
 If NOT-ALL, don't pack ticked articles."
   (let ((gnus-expert-user t)
        (gnus-large-newsgroup nil)
-       (entry (gnus-gethash group gnus-newsrc-hashtb)))
+       (entry (gnus-group-entry group)))
     (when (or (null entry)
              (eq (car entry) t)
              (and (car entry)
     (when (or (null entry)
              (eq (car entry) t)
              (and (car entry)
index 0e41ff5..63249ef 100644 (file)
@@ -933,8 +933,7 @@ buffer.
                              gnus-browse-current-method)))
             gnus-level-default-subscribed (gnus-group-level group)
             (and (car (nth 1 gnus-newsrc-alist))
                              gnus-browse-current-method)))
             gnus-level-default-subscribed (gnus-group-level group)
             (and (car (nth 1 gnus-newsrc-alist))
-                 (gnus-gethash (car (nth 1 gnus-newsrc-alist))
-                               gnus-newsrc-hashtb))
+                 (gnus-group-entry (car (nth 1 gnus-newsrc-alist))))
             t)
            (delete-char 1)
            (insert ? ))
             t)
            (delete-char 1)
            (insert ? ))
index 77d3bbf..19c9c3d 100644 (file)
@@ -615,8 +615,7 @@ the first newsgroup."
     ;; We subscribe the group by changing its level to `subscribed'.
     (gnus-group-change-level
      newsgroup gnus-level-default-subscribed
     ;; We subscribe the group by changing its level to `subscribed'.
     (gnus-group-change-level
      newsgroup gnus-level-default-subscribed
-     gnus-level-killed (gnus-gethash (or next "dummy.group")
-                                    gnus-newsrc-hashtb))
+     gnus-level-killed (gnus-group-entry (or next "dummy.group")))
     (gnus-message 5 "Subscribe newsgroup: %s" newsgroup)
     (run-hook-with-args 'gnus-subscribe-newsgroup-hooks newsgroup)
     t))
     (gnus-message 5 "Subscribe newsgroup: %s" newsgroup)
     (run-hook-with-args 'gnus-subscribe-newsgroup-hooks newsgroup)
     t))
@@ -790,7 +789,7 @@ prompt the user for the name of an NNTP server to use."
 (defun gnus-start-draft-setup ()
   "Make sure the draft group exists."
   (gnus-request-create-group "drafts" '(nndraft ""))
 (defun gnus-start-draft-setup ()
   "Make sure the draft group exists."
   (gnus-request-create-group "drafts" '(nndraft ""))
-  (unless (gnus-gethash "nndraft:drafts" gnus-newsrc-hashtb)
+  (unless (gnus-group-entry "nndraft:drafts")
     (let ((gnus-level-default-subscribed 1))
       (gnus-subscribe-group "nndraft:drafts" nil '(nndraft "")))
     (gnus-group-set-parameter
     (let ((gnus-level-default-subscribed 1))
       (gnus-subscribe-group "nndraft:drafts" nil '(nndraft "")))
     (gnus-group-set-parameter
@@ -1295,16 +1294,16 @@ for new groups, and subscribe the new groups as zombies."
     (when (and (stringp entry)
               oldlevel
               (< oldlevel gnus-level-zombie))
     (when (and (stringp entry)
               oldlevel
               (< oldlevel gnus-level-zombie))
-      (setq entry (gnus-gethash entry gnus-newsrc-hashtb)))
+      (setq entry (gnus-group-entry entry)))
     (if (and (not oldlevel)
             (consp entry))
        (setq oldlevel (gnus-info-level (nth 2 entry)))
       (setq oldlevel (or oldlevel gnus-level-killed)))
     (when (stringp previous)
     (if (and (not oldlevel)
             (consp entry))
        (setq oldlevel (gnus-info-level (nth 2 entry)))
       (setq oldlevel (or oldlevel gnus-level-killed)))
     (when (stringp previous)
-      (setq previous (gnus-gethash previous gnus-newsrc-hashtb)))
+      (setq previous (gnus-group-entry previous)))
 
     (if (and (>= oldlevel gnus-level-zombie)
 
     (if (and (>= oldlevel gnus-level-zombie)
-            (gnus-gethash group gnus-newsrc-hashtb))
+            (gnus-group-entry group))
        ;; We are trying to subscribe a group that is already
        ;; subscribed.
        ()                              ; Do nothing.
        ;; We are trying to subscribe a group that is already
        ;; subscribed.
        ()                              ; Do nothing.
@@ -1328,8 +1327,7 @@ for new groups, and subscribe the new groups as zombies."
                   entry)
          (gnus-sethash (car (nth 2 entry)) nil gnus-newsrc-hashtb)
          (when (nth 3 entry)
                   entry)
          (gnus-sethash (car (nth 2 entry)) nil gnus-newsrc-hashtb)
          (when (nth 3 entry)
-           (setcdr (gnus-gethash (car (nth 3 entry))
-                                 gnus-newsrc-hashtb)
+           (setcdr (gnus-group-entry (car (nth 3 entry)))
                    (cdr entry)))
          (setcdr (cdr entry) (cdddr entry)))))
 
                    (cdr entry)))
          (setcdr (cdr entry) (cdddr entry)))))
 
@@ -1389,7 +1387,7 @@ for new groups, and subscribe the new groups as zombies."
            (gnus-sethash group (cons num previous)
                          gnus-newsrc-hashtb))
          (when (cdr entry)
            (gnus-sethash group (cons num previous)
                          gnus-newsrc-hashtb))
          (when (cdr entry)
-           (setcdr (gnus-gethash (caadr entry) gnus-newsrc-hashtb) entry))
+           (setcdr (gnus-group-entry (caadr entry)) entry))
          (gnus-dribble-enter
           (format
            "(gnus-group-set-info '%S)" info)))))
          (gnus-dribble-enter
           (format
            "(gnus-group-set-info '%S)" info)))))
@@ -1400,7 +1398,7 @@ for new groups, and subscribe the new groups as zombies."
 (defun gnus-kill-newsgroup (newsgroup)
   "Obsolete function.  Kills a newsgroup."
   (gnus-group-change-level
 (defun gnus-kill-newsgroup (newsgroup)
   "Obsolete function.  Kills a newsgroup."
   (gnus-group-change-level
-   (gnus-gethash newsgroup gnus-newsrc-hashtb) gnus-level-killed))
+   (gnus-group-entry newsgroup) gnus-level-killed))
 
 (defun gnus-check-bogus-newsgroups (&optional confirm)
   "Remove bogus newsgroups.
 
 (defun gnus-check-bogus-newsgroups (&optional confirm)
   "Remove bogus newsgroups.
@@ -1428,14 +1426,14 @@ newsgroup."
           (lambda (group)
             ;; Remove all bogus subscribed groups by first killing them, and
             ;; then removing them from the list of killed groups.
           (lambda (group)
             ;; Remove all bogus subscribed groups by first killing them, and
             ;; then removing them from the list of killed groups.
-            (when (setq entry (gnus-gethash group gnus-newsrc-hashtb))
+            (when (setq entry (gnus-group-entry group))
               (gnus-group-change-level entry gnus-level-killed)
               (setq gnus-killed-list (delete group gnus-killed-list))))
           bogus '("group" "groups" "remove"))
        (while (setq group (pop bogus))
          ;; Remove all bogus subscribed groups by first killing them, and
          ;; then removing them from the list of killed groups.
               (gnus-group-change-level entry gnus-level-killed)
               (setq gnus-killed-list (delete group gnus-killed-list))))
           bogus '("group" "groups" "remove"))
        (while (setq group (pop bogus))
          ;; Remove all bogus subscribed groups by first killing them, and
          ;; then removing them from the list of killed groups.
-         (when (setq entry (gnus-gethash group gnus-newsrc-hashtb))
+         (when (setq entry (gnus-group-entry group))
            (gnus-group-change-level entry gnus-level-killed)
            (setq gnus-killed-list (delete group gnus-killed-list)))))
       ;; Then we remove all bogus groups from the list of killed and
            (gnus-group-change-level entry gnus-level-killed)
            (setq gnus-killed-list (delete group gnus-killed-list)))))
       ;; Then we remove all bogus groups from the list of killed and
@@ -1601,8 +1599,8 @@ newsgroup."
        (setq num (max 0 (- (cdr active) num)))))
       ;; Set the number of unread articles.
       (when (and info
        (setq num (max 0 (- (cdr active) num)))))
       ;; Set the number of unread articles.
       (when (and info
-                (gnus-gethash (gnus-info-group info) gnus-newsrc-hashtb))
-       (setcar (gnus-gethash (gnus-info-group info) gnus-newsrc-hashtb) num))
+                (gnus-group-entry (gnus-info-group info)))
+       (setcar (gnus-group-entry (gnus-info-group info)) num))
       num)))
 
 ;; Go though `gnus-newsrc-alist' and compare with `gnus-active-hashtb'
       num)))
 
 ;; Go though `gnus-newsrc-alist' and compare with `gnus-active-hashtb'
@@ -1718,7 +1716,7 @@ newsgroup."
        ;; The group couldn't be reached, so we nix out the number of
        ;; unread articles and stuff.
        (gnus-set-active group nil)
        ;; The group couldn't be reached, so we nix out the number of
        ;; unread articles and stuff.
        (gnus-set-active group nil)
-       (let ((tmp (gnus-gethash group gnus-newsrc-hashtb)))
+       (let ((tmp (gnus-group-entry group)))
          (when tmp
            (setcar tmp t))))))
 
          (when tmp
            (setcar tmp t))))))
 
@@ -1743,7 +1741,7 @@ newsgroup."
              ;; The group couldn't be reached, so we nix out the number of
              ;; unread articles and stuff.
              (gnus-set-active group nil)
              ;; The group couldn't be reached, so we nix out the number of
              ;; unread articles and stuff.
              (gnus-set-active group nil)
-             (setcar (gnus-gethash group gnus-newsrc-hashtb) t)))))))
+             (setcar (gnus-group-entry group) t)))))))
 
     (gnus-message 6 "Checking new news...done")))
 
 
     (gnus-message 6 "Checking new news...done")))
 
@@ -1795,9 +1793,9 @@ newsgroup."
 
 (defun gnus-make-articles-unread (group articles)
   "Mark ARTICLES in GROUP as unread."
 
 (defun gnus-make-articles-unread (group articles)
   "Mark ARTICLES in GROUP as unread."
-  (let* ((info (nth 2 (or (gnus-gethash group gnus-newsrc-hashtb)
-                         (gnus-gethash (gnus-group-real-name group)
-                                       gnus-newsrc-hashtb))))
+  (let* ((info (nth 2 (or (gnus-group-entry group)
+                         (gnus-group-entry
+                          (gnus-group-real-name group)))))
         (ranges (gnus-info-read info))
         news article)
     (while articles
         (ranges (gnus-info-read info))
         news article)
     (while articles
@@ -1817,9 +1815,8 @@ newsgroup."
 
 (defun gnus-make-ascending-articles-unread (group articles)
   "Mark ascending ARTICLES in GROUP as unread."
 
 (defun gnus-make-ascending-articles-unread (group articles)
   "Mark ascending ARTICLES in GROUP as unread."
-  (let* ((entry (or (gnus-gethash group gnus-newsrc-hashtb)
-                    (gnus-gethash (gnus-group-real-name group)
-                                  gnus-newsrc-hashtb)))
+  (let* ((entry (or (gnus-group-entry group)
+                    (gnus-group-entry (gnus-group-real-name group))))
          (info (nth 2 entry))
         (ranges (gnus-info-read info))
          (r ranges)
          (info (nth 2 entry))
         (ranges (gnus-info-read info))
          (r ranges)
index 8366eae..592bd34 100644 (file)
@@ -5006,7 +5006,7 @@ or a straight list of headers."
   "Select newsgroup GROUP.
 If READ-ALL is non-nil, all articles in the group are selected.
 If SELECT-ARTICLES, only select those articles from GROUP."
   "Select newsgroup GROUP.
 If READ-ALL is non-nil, all articles in the group are selected.
 If SELECT-ARTICLES, only select those articles from GROUP."
-  (let* ((entry (gnus-gethash group gnus-newsrc-hashtb))
+  (let* ((entry (gnus-group-entry group))
         ;;!!! Dirty hack; should be removed.
         (gnus-summary-ignore-duplicates
          (if (eq (car (gnus-find-method-for-group group)) 'nnvirtual)
         ;;!!! Dirty hack; should be removed.
         (gnus-summary-ignore-duplicates
          (if (eq (car (gnus-find-method-for-group group)) 'nnvirtual)
@@ -5600,7 +5600,7 @@ The resulting hash table is returned, or nil if no Xrefs were found."
 (defun gnus-mark-xrefs-as-read (from-newsgroup headers unreads)
   "Look through all the headers and mark the Xrefs as read."
   (let ((virtual (gnus-virtual-group-p from-newsgroup))
 (defun gnus-mark-xrefs-as-read (from-newsgroup headers unreads)
   "Look through all the headers and mark the Xrefs as read."
   (let ((virtual (gnus-virtual-group-p from-newsgroup))
-       name entry info xref-hashtb idlist method nth4)
+       name info xref-hashtb idlist method nth4)
     (save-excursion
       (set-buffer gnus-group-buffer)
       (when (setq xref-hashtb
     (save-excursion
       (set-buffer gnus-group-buffer)
       (when (setq xref-hashtb
@@ -5611,8 +5611,7 @@ The resulting hash table is returned, or nil if no Xrefs were found."
             (setq idlist (symbol-value group))
             ;; Dead groups are not updated.
             (and (prog1
             (setq idlist (symbol-value group))
             ;; Dead groups are not updated.
             (and (prog1
-                     (setq entry (gnus-gethash name gnus-newsrc-hashtb)
-                           info (nth 2 entry))
+                     (setq info (gnus-get-info name))
                    (when (stringp (setq nth4 (gnus-info-method info)))
                      (setq nth4 (gnus-server-to-method nth4))))
                  ;; Only do the xrefs if the group has the same
                    (when (stringp (setq nth4 (gnus-info-method info)))
                      (setq nth4 (gnus-server-to-method nth4))))
                  ;; Only do the xrefs if the group has the same
@@ -5634,7 +5633,7 @@ The resulting hash table is returned, or nil if no Xrefs were found."
         xref-hashtb)))))
 
 (defun gnus-compute-read-articles (group articles)
         xref-hashtb)))))
 
 (defun gnus-compute-read-articles (group articles)
-  (let* ((entry (gnus-gethash group gnus-newsrc-hashtb))
+  (let* ((entry (gnus-group-entry group))
         (info (nth 2 entry))
         (active (gnus-active group))
         ninfo)
         (info (nth 2 entry))
         (active (gnus-active group))
         ninfo)
@@ -5671,14 +5670,13 @@ The resulting hash table is returned, or nil if no Xrefs were found."
 (defun gnus-group-make-articles-read (group articles)
   "Update the info of GROUP to say that ARTICLES are read."
   (let* ((num 0)
 (defun gnus-group-make-articles-read (group articles)
   "Update the info of GROUP to say that ARTICLES are read."
   (let* ((num 0)
-        (entry (gnus-gethash group gnus-newsrc-hashtb))
+        (entry (gnus-group-entry group))
         (info (nth 2 entry))
         (active (gnus-active group))
         range)
     (when entry
       (setq range (gnus-compute-read-articles group articles))
         (info (nth 2 entry))
         (active (gnus-active group))
         range)
     (when entry
       (setq range (gnus-compute-read-articles group articles))
-      (save-excursion
-       (set-buffer gnus-group-buffer)
+      (with-current-buffer gnus-group-buffer
        (gnus-undo-register
          `(progn
             (gnus-info-set-marks ',info ',(gnus-info-marks info) t)
        (gnus-undo-register
          `(progn
             (gnus-info-set-marks ',info ',(gnus-info-marks info) t)
@@ -7142,7 +7140,7 @@ If BACKWARD, the previous article is selected instead of the next."
                      (not (gnus-ephemeral-group-p gnus-newsgroup-name)))
                 (format " (Type %s for %s [%s])"
                         (single-key-description cmd) group
                      (not (gnus-ephemeral-group-p gnus-newsgroup-name)))
                 (format " (Type %s for %s [%s])"
                         (single-key-description cmd) group
-                        (car (gnus-gethash group gnus-newsrc-hashtb)))
+                        (gnus-group-unread group))
               (format " (Type %s to exit %s)"
                       (single-key-description cmd)
                       gnus-newsgroup-name))))
               (format " (Type %s to exit %s)"
                       (single-key-description cmd)
                       gnus-newsgroup-name))))
@@ -8952,9 +8950,7 @@ ACTION can be either `move' (the default), `crosspost' or `copy'."
        (t
        (let* ((pto-group (gnus-group-prefixed-name
                           (car art-group) to-method))
        (t
        (let* ((pto-group (gnus-group-prefixed-name
                           (car art-group) to-method))
-              (entry
-               (gnus-gethash pto-group gnus-newsrc-hashtb))
-              (info (nth 2 entry))
+              (info (gnus-get-info pto-group))
               (to-group (gnus-info-group info))
               to-marks)
          ;; Update the group that has been moved to.
               (to-group (gnus-info-group info))
               to-marks)
          ;; Update the group that has been moved to.
@@ -11301,11 +11297,10 @@ If REVERSE, save parts that do not match TYPE."
 (defun gnus-update-read-articles (group unread &optional compute)
   "Update the list of read articles in GROUP.
 UNREAD is a sorted list."
 (defun gnus-update-read-articles (group unread &optional compute)
   "Update the list of read articles in GROUP.
 UNREAD is a sorted list."
-  (let* ((active (or gnus-newsgroup-active (gnus-active group)))
-        (entry (gnus-gethash group gnus-newsrc-hashtb))
-        (info (nth 2 entry))
-        (prev 1)
-        read)
+  (let ((active (or gnus-newsgroup-active (gnus-active group)))
+       (info (gnus-get-info group))
+       (prev 1)
+       read)
     (if (or (not info) (not active))
        ;; There is no info on this group if it was, in fact,
        ;; killed.  Gnus stores no information on killed groups, so
     (if (or (not info) (not active))
        ;; There is no info on this group if it was, in fact,
        ;; killed.  Gnus stores no information on killed groups, so
index 292f6c1..cb40c7c 100644 (file)
@@ -209,7 +209,7 @@ If RECURSIVE is t, return groups in its subtopics too."
     ;; We go through the newsrc to look for matches.
     (while groups
       (when (setq group (pop groups))
     ;; We go through the newsrc to look for matches.
     (while groups
       (when (setq group (pop groups))
-       (setq entry (gnus-gethash group gnus-newsrc-hashtb)
+       (setq entry (gnus-group-entry group)
              info (nth 2 entry)
              params (gnus-info-params info)
              active (gnus-active group)
              info (nth 2 entry)
              params (gnus-info-params info)
              active (gnus-active group)
@@ -464,7 +464,7 @@ If LOWEST is non-nil, list all newsgroups of level LOWEST or higher."
          (gnus-make-hashtable-from-killed))
        (gnus-group-prepare-flat-list-dead
         (gnus-remove-if (lambda (group)
          (gnus-make-hashtable-from-killed))
        (gnus-group-prepare-flat-list-dead
         (gnus-remove-if (lambda (group)
-                          (or (gnus-gethash group gnus-newsrc-hashtb)
+                          (or (gnus-group-entry group)
                               (gnus-gethash group gnus-killed-hashtb)))
                         not-in-list)
         gnus-level-killed ?K regexp)))
                               (gnus-gethash group gnus-killed-hashtb)))
                         not-in-list)
         gnus-level-killed ?K regexp)))
@@ -857,7 +857,7 @@ articles in the topic and its subtopics."
     (while (setq topic (pop alist))
       (while (cdr topic)
        (if (and (cadr topic)
     (while (setq topic (pop alist))
       (while (cdr topic)
        (if (and (cadr topic)
-                (gnus-gethash (cadr topic) gnus-newsrc-hashtb))
+                (gnus-group-entry (cadr topic)))
            (setq topic (cdr topic))
          (setcdr topic (cddr topic)))))))
 
            (setq topic (cdr topic))
          (setcdr topic (cddr topic)))))))
 
@@ -887,7 +887,7 @@ articles in the topic and its subtopics."
       (let ((topic-name (pop topic))
            group filtered-topic)
        (while (setq group (pop topic))
       (let ((topic-name (pop topic))
            group filtered-topic)
        (while (setq group (pop topic))
-         (when (and (or (gnus-gethash group gnus-active-hashtb)
+         (when (and (or (gnus-active group)
                         (gnus-info-method (gnus-get-info group)))
                     (not (gnus-gethash group gnus-killed-hashtb)))
            (push group filtered-topic)))
                         (gnus-info-method (gnus-get-info group)))
                     (not (gnus-gethash group gnus-killed-hashtb)))
            (push group filtered-topic)))
index 1512d01..02d872b 100644 (file)
@@ -3216,7 +3216,7 @@ that that variable is buffer-local to the summary buffers."
 (defun gnus-generate-new-group-name (leaf)
   (let ((name leaf)
        (num 0))
 (defun gnus-generate-new-group-name (leaf)
   (let ((name leaf)
        (num 0))
-    (while (gnus-gethash name gnus-newsrc-hashtb)
+    (while (gnus-group-entry name)
       (setq name (concat leaf "<" (int-to-string (setq num (1+ num))) ">")))
     name))
 
       (setq name (concat leaf "<" (int-to-string (setq num (1+ num))) ">")))
     name))
 
index fc0ff51..2b79e4c 100644 (file)
@@ -227,7 +227,7 @@ Finds out what articles are to be part of the nnkiboze groups."
                          "." gnus-score-file-suffix))))))
 
 (defun nnkiboze-generate-group (group &optional inhibit-list-groups)
                          "." gnus-score-file-suffix))))))
 
 (defun nnkiboze-generate-group (group &optional inhibit-list-groups)
-  (let* ((info (nth 2 (gnus-gethash group gnus-newsrc-hashtb)))
+  (let* ((info (gnus-get-info group))
         (newsrc-file (concat nnkiboze-directory
                              (nnheader-translate-file-chars
                               (concat group ".newsrc"))))
         (newsrc-file (concat nnkiboze-directory
                              (nnheader-translate-file-chars
                               (concat group ".newsrc"))))
@@ -269,8 +269,7 @@ Finds out what articles are to be part of the nnkiboze groups."
                  (numberp (car (symbol-value group))) ; It is active
                  (or (> nnkiboze-level 7)
                      (and (setq glevel
                  (numberp (car (symbol-value group))) ; It is active
                  (or (> nnkiboze-level 7)
                      (and (setq glevel
-                                (nth 1 (nth 2 (gnus-gethash
-                                               gname gnus-newsrc-hashtb))))
+                                (gnus-info-level (gnus-get-info gname)))
                           (>= nnkiboze-level glevel)))
                  (not (string-match "^nnkiboze:" gname)) ; Exclude kibozes
                  (push (cons gname (1- (car (symbol-value group))))
                           (>= nnkiboze-level glevel)))
                  (not (string-match "^nnkiboze:" gname)) ; Exclude kibozes
                  (push (cons gname (1- (car (symbol-value group))))
@@ -282,8 +281,7 @@ Finds out what articles are to be part of the nnkiboze groups."
          ;; number that has been kibozed in GROUP in this kiboze group.
          (setq newsrc nnkiboze-newsrc)
          (while newsrc
          ;; number that has been kibozed in GROUP in this kiboze group.
          (setq newsrc nnkiboze-newsrc)
          (while newsrc
-           (if (not (setq active (gnus-gethash
-                                  (caar newsrc) gnus-active-hashtb)))
+           (if (not (setq active (gnus-active (caar newsrc))))
                ;; This group isn't active after all, so we remove it from
                ;; the list of component groups.
                (setq nnkiboze-newsrc (delq (car newsrc) nnkiboze-newsrc))
                ;; This group isn't active after all, so we remove it from
                ;; the list of component groups.
                (setq nnkiboze-newsrc (delq (car newsrc) nnkiboze-newsrc))
@@ -294,8 +292,7 @@ Finds out what articles are to be part of the nnkiboze groups."
              (gnus-message 3 "nnkiboze: Checking %s..." (caar newsrc))
              (setq ginfo (gnus-get-info (gnus-group-group-name))
                    orig-info (gnus-copy-sequence ginfo)
              (gnus-message 3 "nnkiboze: Checking %s..." (caar newsrc))
              (setq ginfo (gnus-get-info (gnus-group-group-name))
                    orig-info (gnus-copy-sequence ginfo)
-                   num-unread (car (gnus-gethash (caar newsrc)
-                                                 gnus-newsrc-hashtb)))
+                   num-unread (gnus-group-unread (caar newsrc)))
              (unwind-protect
                  (progn
                    ;; We set all list of article marks to nil.  Since we operate
              (unwind-protect
                  (progn
                    ;; We set all list of article marks to nil.  Since we operate
@@ -338,8 +335,7 @@ Finds out what articles are to be part of the nnkiboze groups."
                ;; Restore the proper info.
                (when ginfo
                  (setcdr ginfo (cdr orig-info)))
                ;; Restore the proper info.
                (when ginfo
                  (setcdr ginfo (cdr orig-info)))
-               (setcar (gnus-gethash (caar newsrc) gnus-newsrc-hashtb)
-                       num-unread)))
+               (setcar (gnus-active (caar newsrc)) num-unread)))
            (setcdr (car newsrc) (cdr active))
            (gnus-message 3 "nnkiboze: Checking %s...done" (caar newsrc))
            (setq newsrc (cdr newsrc)))))
            (setcdr (car newsrc) (cdr active))
            (gnus-message 3 "nnkiboze: Checking %s...done" (caar newsrc))
            (setq newsrc (cdr newsrc)))))
index 8d922ca..139ee9f 100644 (file)
@@ -340,7 +340,7 @@ component group will show up when you enter the virtual group.")
       ;; Make sure all groups are activated.
       (mapcar
        (lambda (g)
       ;; Make sure all groups are activated.
       (mapcar
        (lambda (g)
-        (when (not (numberp (car (gnus-gethash g gnus-newsrc-hashtb))))
+        (when (not (numberp (gnus-group-unread g)))
           (gnus-activate-group g)))
        nnvirtual-component-groups)
       (save-excursion
           (gnus-activate-group g)))
        nnvirtual-component-groups)
       (save-excursion