[gnus git] branch master updated: n0-17-375-g775293f =1= (gnus-group-get-new-news): New parameter `one-level' for scanning exactly one level

Lars Magne Ingebrigtsen <[email protected]>
Newsgroups gmane.emacs.gnus.cvs
Message-ID <[email protected]>
       via  775293ffb232e69b6bffc771e6e0924aa9969463 (commit)
      from  ac5c4bc62b7664123242533d38c41ad7c0b586ba (commit)


- Log -----------------------------------------------------------------
commit 775293ffb232e69b6bffc771e6e0924aa9969463
Author: Peter Münster <[email protected]>
Date:   Thu Nov 3 23:34:42 2011 +0100

    (gnus-group-get-new-news): New parameter `one-level' for scanning exactly one level
    
    (gnus-get-unread-articles): Ditto.

diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 7bf1362..e5c2419 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,9 @@
+2011-10-31  Peter Münster  <[email protected]>  (tiny change)
+
+	* gnus-group.el (gnus-group-get-new-news): New parameter `one-level'
+	for scanning exactly one level.
+	* gnus-start.el (gnus-get-unread-articles): Ditto.
+
 2011-11-03  Lars Magne Ingebrigtsen  <[email protected]>
 
 	* gnus-sum.el (gnus-articles-to-read): Change wording in prompt to be
diff --git a/lisp/gnus-group.el b/lisp/gnus-group.el
index 4c527ca..64e8047 100644
--- a/lisp/gnus-group.el
+++ b/lisp/gnus-group.el
@@ -4009,11 +4009,13 @@ entail asking the server for the groups."
 	(gnus-activate-foreign-newsgroups level))
     (gnus-group-get-new-news)))
 
-(defun gnus-group-get-new-news (&optional arg)
+(defun gnus-group-get-new-news (&optional arg one-level)
   "Get newly arrived articles.
 If ARG is a number, it specifies which levels you are interested in
 re-scanning.  If ARG is non-nil and not a number, this will force
-\"hard\" re-reading of the active files from all servers."
+\"hard\" re-reading of the active files from all servers.
+If ONE-LEVEL is not nil, then re-scan only the specified level,
+otherwise all levels below ARG will be scanned too."
   (interactive "P")
   (require 'nnmail)
   (let ((gnus-inhibit-demon t)
@@ -4027,7 +4029,7 @@ re-scanning.  If ARG is non-nil and not a number, this will force
     (unless gnus-slave
       (gnus-master-read-slave-newsrc))
 
-    (gnus-get-unread-articles arg)
+    (gnus-get-unread-articles arg nil one-level)
 
     ;; If the user wants it, we scan for new groups.
     (when (eq gnus-check-new-newsgroups 'always)
diff --git a/lisp/gnus-start.el b/lisp/gnus-start.el
index 7c63d5e..0ddab6f 100644
--- a/lisp/gnus-start.el
+++ b/lisp/gnus-start.el
@@ -1606,7 +1606,7 @@ If SCAN, request a scan of that group as well."
 
 ;; Go though `gnus-newsrc-alist' and compare with `gnus-active-hashtb'
 ;; and compute how many unread articles there are in each group.
-(defun gnus-get-unread-articles (&optional level dont-connect)
+(defun gnus-get-unread-articles (&optional level dont-connect one-level)
   (setq gnus-server-method-cache nil)
   (require 'gnus-agent)
   (let* ((newsrc (cdr gnus-newsrc-alist))
@@ -1663,7 +1663,7 @@ If SCAN, request a scan of that group as well."
 	(push (setq method-group-list (list method method-type nil nil))
 	      type-cache))
       ;; Only add groups that need updating.
-      (if (<= (gnus-info-level info)
+      (if (funcall (if one-level #'= #'<=) (gnus-info-level info)
 	      (if (eq (cadr method-group-list) 'foreign)
 		  foreign-level
 		alevel))

-----------------------------------------------------------------------
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we listed those
revisions in full, above.

Summary of changes:
 lisp/ChangeLog     |    6 ++++++
 lisp/gnus-group.el |    8 +++++---
 lisp/gnus-start.el |    4 ++--
 3 files changed, 13 insertions(+), 5 deletions(-)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Gnus Project".

The branch, master has been updated


hooks/post-receive
-- 
Gnus Project
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.