+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)
(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 ()
(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
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
"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
(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
(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
;; 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
(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
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)
- (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))
(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)
(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)
(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)
(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)
(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)
(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
(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))))
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))
- (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))
(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"))
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)))
(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))
(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)))
(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
(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)
(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
(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
(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)
- (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))
(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)
(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
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)
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 ? ))
;; 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))
(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
(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)
- (setq previous (gnus-gethash previous gnus-newsrc-hashtb)))
+ (setq previous (gnus-group-entry previous)))
(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.
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)))))
(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)))))
(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.
(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.
- (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
(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'
;; 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))))))
;; 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")))
(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
(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)
"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)
(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
(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
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)
(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))
- (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)
(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))))
(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.
(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
;; 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)
(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)))
(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)))))))
(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)))
(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))
"." 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"))))
(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))))
;; 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))
(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
;; Restore the proper info.
(when ginfo
(setcdr ginfo (cdr orig-info)))
- (setcar (gnus-gethash (caar newsrc) gnus-newsrc-hashtb)
- num-unread)))
+ (setcar (gnus-group-entry (caar newsrc)) num-unread)))
(setcdr (car newsrc) (cdr active))
(gnus-message 3 "nnkiboze: Checking %s...done" (caar newsrc))
(setq newsrc (cdr newsrc)))))
;; 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