Mercurial > hg > xemacs-beta
diff lisp/gnus/gnus-sum.el @ 124:9b50b4588a93 r20-1b15
Import from CVS: tag r20-1b15
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:26:39 +0200 |
parents | d2f30a177268 |
children | b980b6286996 |
line wrap: on
line diff
--- a/lisp/gnus/gnus-sum.el Mon Aug 13 09:26:04 2007 +0200 +++ b/lisp/gnus/gnus-sum.el Mon Aug 13 09:26:39 2007 +0200 @@ -2759,26 +2759,29 @@ (defun gnus-thread-loop-p (root thread) "Say whether ROOT is in THREAD." - (let ((th (cdr thread))) - (while (and th - (not (eq (caar th) root))) - (pop th)) - (if th - ;; We have found a loop. - (let (ref-dep) - (setcdr thread (delq (car th) (cdr thread))) - (if (boundp (setq ref-dep (intern "none" - gnus-newsgroup-dependencies))) - (setcdr (symbol-value ref-dep) - (nconc (cdr (symbol-value ref-dep)) - (list (car th)))) - (set ref-dep (list nil (car th)))) - 1) - ;; Recurse down into the sub-threads and look for loops. - (apply '+ - (mapcar - (lambda (thread) (gnus-thread-loop-p root thread)) - (cdr thread)))))) + (let ((stack (list thread)) + (infloop 0) + th) + (while (setq thread (pop stack)) + (setq th (cdr thread)) + (while (and th + (not (eq (caar th) root))) + (pop th)) + (if th + ;; We have found a loop. + (let (ref-dep) + (setcdr thread (delq (car th) (cdr thread))) + (if (boundp (setq ref-dep (intern "none" + gnus-newsgroup-dependencies))) + (setcdr (symbol-value ref-dep) + (nconc (cdr (symbol-value ref-dep)) + (list (car th)))) + (set ref-dep (list nil (car th)))) + (setq infloop 1 + stack nil)) + ;; Push all the subthreads onto the stack. + (push (cdr thread) stack))) + infloop)) (defun gnus-make-threads () "Go through the dependency hashtb and find the roots. Return all threads." @@ -2950,10 +2953,10 @@ article (gnus-data-list t))))) ;; Error on the side of excessive subjects. - (error (mail-header-subject header))) + (error "")) (mail-header-subject header)) - (mail-header-subject header) - "") + "" + (mail-header-subject header)) nil (cdr (assq article gnus-newsgroup-scored)) (memq article gnus-newsgroup-processable)) (when length @@ -3817,7 +3820,7 @@ ;; All articles have to be subsets of the active articles. (cond ;; Adjust "simple" lists. - ((memq mark '(tick dormant expirable reply save)) + ((memq mark '(tick dormant expire reply save)) (while articles (when (or (< (setq article (pop articles)) min) (> article max)) (set var (delq article (symbol-value var)))))) @@ -4867,7 +4870,7 @@ (run-hooks 'gnus-exit-group-hook) (gnus-summary-update-info)) (gnus-close-group group) - ;; Make sure where I was, and go to next newsgroup. + ;; Make sure where we were, and go to next newsgroup. (set-buffer gnus-group-buffer) (unless quit-config (gnus-group-jump-to-group group))