From: Lars Magne Ingebrigtsen Date: Sun, 29 Dec 2002 18:04:05 +0000 (+0000) Subject: (gnus-topic-display-missing-topic): New function. X-Git-Url: https://cgit.sxemacs.org/?a=commitdiff_plain;h=a95d494c13e9d9f2a7bdb0e1db3eb50d63cd96bf;p=gnus (gnus-topic-display-missing-topic): New function. (gnus-topic-goto-missing-group): Use it. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 0852bdd9e..48d6d583d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2002-12-29 Lars Magne Ingebrigtsen + * gnus-topic.el (gnus-topic-display-missing-topic): New function. + (gnus-topic-goto-missing-group): Use it. + * message.el (message-required-news-headers): Removed Lines. (message-reply): Don't insert References first. (message-followup): Ditto. diff --git a/lisp/gnus-score.el b/lisp/gnus-score.el index b37b6a017..1bad98f46 100644 --- a/lisp/gnus-score.el +++ b/lisp/gnus-score.el @@ -935,7 +935,6 @@ EXTRA is the possible non-standard header." ;; All score code written by Per Abrahamsen . -;; Added by Per Abrahamsen . (defun gnus-score-set-mark-below (score) "Automatically mark articles with score below SCORE as read." (interactive diff --git a/lisp/gnus-topic.el b/lisp/gnus-topic.el index 836c013fb..544d48b80 100644 --- a/lisp/gnus-topic.el +++ b/lisp/gnus-topic.el @@ -696,7 +696,8 @@ articles in the topic and its subtopics." (unfound t) entry) ;; Try to jump to a visible group. - (while (and g (not (gnus-group-goto-group (car g) t))) + (while (and g + (not (gnus-group-goto-group (car g) t))) (pop g)) ;; It wasn't visible, so we try to see where to insert it. (when (not g) @@ -708,20 +709,30 @@ articles in the topic and its subtopics." (when (and unfound topic (not (gnus-topic-goto-missing-topic topic))) - (let* ((top (gnus-topic-find-topology topic)) - (children (cddr top)) - (type (cadr top)) - (unread 0) - (entries (gnus-topic-find-groups - (car type) (car gnus-group-list-mode) - (cdr gnus-group-list-mode)))) - (while children - (incf unread (gnus-topic-unread (caar (pop children))))) - (while (setq entry (pop entries)) - (when (numberp (car entry)) - (incf unread (car entry)))) - (gnus-topic-insert-topic-line - topic t t (car (gnus-topic-find-topology topic)) nil unread)))))) + (gnus-topic-display-missing-topic topic))))) + +(defun gnus-topic-display-missing-topic (topic) + "Insert topic lines recursively for missing topics." + (let ((parent (gnus-topic-find-topology + (gnus-topic-parent-topic topic)))) + (when (and parent + (not (gnus-topic-goto-missing-topic (caadr parent)))) + (gnus-topic-display-missing-topic (caadr parent)))) + (gnus-topic-goto-missing-topic topic) + (let* ((top (gnus-topic-find-topology topic)) + (children (cddr top)) + (type (cadr top)) + (unread 0) + (entries (gnus-topic-find-groups + (car type) (car gnus-group-list-mode) + (cdr gnus-group-list-mode)))) + (while children + (incf unread (gnus-topic-unread (caar (pop children))))) + (while (setq entry (pop entries)) + (when (numberp (car entry)) + (incf unread (car entry)))) + (gnus-topic-insert-topic-line + topic t t (car (gnus-topic-find-topology topic)) nil unread))) (defun gnus-topic-goto-missing-topic (topic) (if (gnus-topic-goto-topic topic)