aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorMiles Bader <[email protected]>2007-08-21 04:52:22 +0000
committerMiles Bader <[email protected]>2007-08-21 04:52:22 +0000
commit11abff8e05954174244715859f788753aea77859 (patch)
treebab9e507ab151752c1784a596352e0531b7bcb7e /lisp
parent30a718e6b77f4f0c422f748dd14ea772b7fa2a1a (diff)
Merge from gnus--rel--5.10
Patches applied: * gnus--rel--5.10 (patch 245) - Update from CVS 2007-08-17 Katsumi Yamaoka <[email protected]> * lisp/gnus/gnus-art.el (gnus-article-summary-command-nosave) (gnus-article-read-summary-keys): Don't use 3rd arg of pop-to-buffer. 2007-08-14 Katsumi Yamaoka <[email protected]> * lisp/gnus/gnus.el (gnus-maximum-newsgroup): New variable. * lisp/gnus/gnus-agent.el (gnus-agent-fetch-headers): Limit the range of articles according to gnus-maximum-newsgroup. * lisp/gnus/gnus-sum.el (gnus-articles-to-read, gnus-list-of-unread-articles) (gnus-list-of-read-articles, gnus-sequence-of-unread-articles): Limit the range of articles according to gnus-maximum-newsgroup. 2007-08-14 Katsumi Yamaoka <[email protected]> * man/gnus.texi (Selecting a Group): Mention gnus-maximum-newsgroup. Revision: [email protected]/emacs--rel--22--patch-96
Diffstat (limited to 'lisp')
-rw-r--r--lisp/gnus/ChangeLog16
-rw-r--r--lisp/gnus/gnus-agent.el9
-rw-r--r--lisp/gnus/gnus-art.el11
-rw-r--r--lisp/gnus/gnus-sum.el37
-rw-r--r--lisp/gnus/gnus.el11
5 files changed, 66 insertions, 18 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index 7fd187a4ae..201b7fefdc 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,3 +1,19 @@
+2007-08-17 Katsumi Yamaoka <[email protected]>
+
+ * gnus-art.el (gnus-article-summary-command-nosave)
+ (gnus-article-read-summary-keys): Don't use 3rd arg of pop-to-buffer.
+
+2007-08-14 Katsumi Yamaoka <[email protected]>
+
+ * gnus.el (gnus-maximum-newsgroup): New variable.
+
+ * gnus-agent.el (gnus-agent-fetch-headers): Limit the range of articles
+ according to gnus-maximum-newsgroup.
+
+ * gnus-sum.el (gnus-articles-to-read, gnus-list-of-unread-articles)
+ (gnus-list-of-read-articles, gnus-sequence-of-unread-articles): Limit
+ the range of articles according to gnus-maximum-newsgroup.
+
2007-08-10 Katsumi Yamaoka <[email protected]>
* nntp.el (nntp-xref-number-is-evil): New server variable.
diff --git a/lisp/gnus/gnus-agent.el b/lisp/gnus/gnus-agent.el
index 7b98b1e045..347b57983e 100644
--- a/lisp/gnus/gnus-agent.el
+++ b/lisp/gnus/gnus-agent.el
@@ -1765,7 +1765,14 @@ article numbers will be returned."
(gnus-agent-find-parameter group
'agent-predicate)))))
(articles (if fetch-all
- (gnus-uncompress-range (gnus-active group))
+ (if gnus-maximum-newsgroup
+ (let ((active (gnus-active group)))
+ (gnus-uncompress-range
+ (cons (max (car active)
+ (- (cdr active)
+ gnus-maximum-newsgroup -1))
+ (cdr active))))
+ (gnus-uncompress-range (gnus-active group)))
(gnus-list-of-unread-articles group)))
(gnus-decode-encoded-word-function 'identity)
(gnus-decode-encoded-address-function 'identity)
diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el
index 6ccba3b108..696222e004 100644
--- a/lisp/gnus/gnus-art.el
+++ b/lisp/gnus/gnus-art.el
@@ -5607,7 +5607,7 @@ not have a face in `gnus-article-boring-faces'."
"Execute the last keystroke in the summary buffer."
(interactive)
(let (func)
- (pop-to-buffer gnus-article-current-summary nil (not (featurep 'xemacs)))
+ (pop-to-buffer gnus-article-current-summary)
(setq func (lookup-key (current-local-map) (this-command-keys)))
(call-interactively func)))
@@ -5646,8 +5646,7 @@ not have a face in `gnus-article-boring-faces'."
(member keys nosave-in-article))
(let (func)
(save-window-excursion
- (pop-to-buffer gnus-article-current-summary
- nil (not (featurep 'xemacs)))
+ (pop-to-buffer gnus-article-current-summary)
;; We disable the pick minor mode commands.
(let (gnus-pick-mode)
(setq func (lookup-key (current-local-map) keys))))
@@ -5659,16 +5658,14 @@ not have a face in `gnus-article-boring-faces'."
(call-interactively func)
(setq new-sum-point (point)))
(when (member keys nosave-but-article)
- (pop-to-buffer gnus-article-buffer
- nil (not (featurep 'xemacs)))))
+ (pop-to-buffer gnus-article-buffer)))
;; These commands should restore window configuration.
(let ((obuf (current-buffer))
(owin (current-window-configuration))
(opoint (point))
win func in-buffer selected new-sum-start new-sum-hscroll)
(cond (not-restore-window
- (pop-to-buffer gnus-article-current-summary
- nil (not (featurep 'xemacs))))
+ (pop-to-buffer gnus-article-current-summary))
((setq win (get-buffer-window gnus-article-current-summary))
(select-window win))
(t
diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el
index 708689fef9..851ec88c96 100644
--- a/lisp/gnus/gnus-sum.el
+++ b/lisp/gnus/gnus-sum.el
@@ -5472,7 +5472,13 @@ If SELECT-ARTICLES, only select those articles from GROUP."
;; articles in the group, or (if that's nil), the
;; articles in the cache.
(or
- (gnus-uncompress-range (gnus-active group))
+ (if gnus-maximum-newsgroup
+ (let ((active (gnus-active group)))
+ (gnus-uncompress-range
+ (cons (max (car active)
+ (- (cdr active) gnus-maximum-newsgroup -1))
+ (cdr active))))
+ (gnus-uncompress-range (gnus-active group)))
(gnus-cache-articles-in-group group))
;; Select only the "normal" subset of articles.
(gnus-sorted-nunion
@@ -6534,23 +6540,26 @@ displayed, no centering will be performed."
(let* ((read (gnus-info-read (gnus-get-info group)))
(active (or (gnus-active group) (gnus-activate-group group)))
(last (cdr active))
+ (bottom (if gnus-maximum-newsgroup
+ (max (car active) (- last gnus-maximum-newsgroup -1))
+ (car active)))
first nlast unread)
;; If none are read, then all are unread.
(if (not read)
- (setq first (car active))
+ (setq first bottom)
;; If the range of read articles is a single range, then the
;; first unread article is the article after the last read
;; article. Sounds logical, doesn't it?
(if (and (not (listp (cdr read)))
- (or (< (car read) (car active))
+ (or (< (car read) bottom)
(progn (setq read (list read))
nil)))
- (setq first (max (car active) (1+ (cdr read))))
+ (setq first (max bottom (1+ (cdr read))))
;; `read' is a list of ranges.
(when (/= (setq nlast (or (and (numberp (car read)) (car read))
(caar read)))
1)
- (setq first (car active)))
+ (setq first bottom))
(while read
(when first
(while (< first nlast)
@@ -6575,7 +6584,12 @@ displayed, no centering will be performed."
(gnus-list-range-difference
(gnus-list-range-difference
(gnus-sorted-complement
- (gnus-uncompress-range active)
+ (gnus-uncompress-range
+ (if gnus-maximum-newsgroup
+ (cons (max (car active)
+ (- (cdr active) gnus-maximum-newsgroup -1))
+ (cdr active))
+ active))
(gnus-list-of-unread-articles group))
(cdr (assq 'dormant marked)))
(cdr (assq 'tick marked))))))
@@ -6587,23 +6601,26 @@ displayed, no centering will be performed."
(let* ((read (gnus-info-read (gnus-get-info group)))
(active (or (gnus-active group) (gnus-activate-group group)))
(last (cdr active))
+ (bottom (if gnus-maximum-newsgroup
+ (max (car active) (- last gnus-maximum-newsgroup -1))
+ (car active)))
first nlast unread)
;; If none are read, then all are unread.
(if (not read)
- (setq first (car active))
+ (setq first bottom)
;; If the range of read articles is a single range, then the
;; first unread article is the article after the last read
;; article. Sounds logical, doesn't it?
(if (and (not (listp (cdr read)))
- (or (< (car read) (car active))
+ (or (< (car read) bottom)
(progn (setq read (list read))
nil)))
- (setq first (max (car active) (1+ (cdr read))))
+ (setq first (max bottom (1+ (cdr read))))
;; `read' is a list of ranges.
(when (/= (setq nlast (or (and (numberp (car read)) (car read))
(caar read)))
1)
- (setq first (car active)))
+ (setq first bottom))
(while read
(when first
(push (cons first nlast) unread))
diff --git a/lisp/gnus/gnus.el b/lisp/gnus/gnus.el
index 0e8e9908cf..3f75bba6d1 100644
--- a/lisp/gnus/gnus.el
+++ b/lisp/gnus/gnus.el
@@ -1501,6 +1501,17 @@ If it is nil, no confirmation is required."
:type '(choice (const :tag "No limit" nil)
integer))
+(defcustom gnus-maximum-newsgroup nil
+ "The maximum number of articles a newsgroup.
+If this is a number, old articles in a newsgroup exceeding this number
+are silently ignored. If it is nil, no article is ignored. Note that
+setting this variable to a number might prevent you from reading very
+old articles."
+ :group 'gnus-group-select
+ :version "22.2"
+ :type '(choice (const :tag "No limit" nil)
+ integer))
+
(defcustom gnus-use-long-file-name (not (memq system-type '(usg-unix-v xenix)))
"*Non-nil means that the default name of a file to save articles in is the group name.
If it's nil, the directory form of the group name is used instead.