# HG changeset patch # User Ulf Jasper # Date 1234013046 0 # Node ID 085bed32d1c10de83dee610a786a159ad30553c6 # Parent 5be87badd8fdb2956bbe81e2a17277676e4969ea newsticker: fix infinite recursion when moving to next new item diff -r 5be87badd8fd -r 085bed32d1c1 lisp/ChangeLog --- a/lisp/ChangeLog Sat Feb 07 13:07:38 2009 +0000 +++ b/lisp/ChangeLog Sat Feb 07 13:24:06 2009 +0000 @@ -1,3 +1,9 @@ +2009-02-07 Ulf Jasper + + * net/newst-treeview.el + (newsticker-treeview-next-new-or-immortal-item): New arg + DONT-WRAP-TREES to prevent infinite recursion. + 2009-02-07 Stefan Monnier * mail/rmailedit.el (rmail-cease-edit): narrow-to-region before diff -r 5be87badd8fd -r 085bed32d1c1 lisp/net/newst-treeview.el --- a/lisp/net/newst-treeview.el Sat Feb 07 13:07:38 2009 +0000 +++ b/lisp/net/newst-treeview.el Sat Feb 07 13:24:06 2009 +0000 @@ -7,7 +7,7 @@ ;; URL: http://www.nongnu.org/newsticker ;; Created: 2007 ;; Keywords: News, RSS, Atom -;; Time-stamp: "24. Januar 2009, 11:22:20 (ulf)" +;; Time-stamp: "7. Februar 2009, 11:46:00 (ulf)" ;; ====================================================================== @@ -1314,7 +1314,8 @@ (newsticker-treeview-show-item)) (defun newsticker-treeview-next-new-or-immortal-item (&optional - current-item-counts) + current-item-counts + dont-wrap-trees) "Move to next new or immortal item. Will move to next feed until an item is found. Will not move if optional argument CURRENT-ITEM-COUNTS is t and current item is @@ -1337,9 +1338,10 @@ (newsticker-treeview-show-item) (throw 'found t)) (setq move t)))) - (when (or (newsticker-treeview-next-feed t) - (newsticker--treeview-first-feed)) - (newsticker-treeview-next-new-or-immortal-item t)))) + (let ((wrap-trees (not dont-wrap-trees))) + (when (or (newsticker-treeview-next-feed t) + (and wrap-trees (newsticker--treeview-first-feed))) + (newsticker-treeview-next-new-or-immortal-item t t))))) (defun newsticker-treeview-prev-new-or-immortal-item () "Move to previous new or immortal item.