Function: gnus-topic-grok-active-1
gnus-topic-grok-active-1 is a byte-compiled function defined in
gnus-topic.el.gz.
Signature
(gnus-topic-grok-active-1 TOPOLOGY GROUPS)
Source Code
;; Defined in /usr/src/emacs/lisp/gnus/gnus-topic.el.gz
(defun gnus-topic-grok-active-1 (topology groups)
(let* ((name (caar topology))
(prefix (concat "^" (regexp-quote name)))
tgroups ntopology group)
(while (and groups
(string-match prefix (setq group (car groups))))
(if (not (string-match "\\." group (match-end 0)))
;; There are no further hierarchies here, so we just
;; enter this group into the list belonging to this
;; topic.
(push (pop groups) tgroups)
;; New sub-hierarchy, so we add it to the topology.
(nconc topology (list (setq ntopology
(list (list (substring
group 0 (match-end 0))
'invisible)))))
;; Descend the hierarchy.
(setq groups (gnus-topic-grok-active-1 ntopology groups))))
;; We remove the trailing "." from the topic name.
(setq name
(if (string-match "\\.$" name)
(substring name 0 (match-beginning 0))
name))
;; Add this topic and its groups to the topic alist.
(push (cons name (nreverse tgroups)) gnus-topic-active-alist)
(setcar (car topology) name)
;; We return the rest of the groups that didn't belong
;; to this topic.
groups))