diff lisp/gnus/gnus-bcklg.el @ 88155:d7ddb3e565de

sync with trunk
author Henrik Enberg <henrik.enberg@telia.com>
date Mon, 16 Jan 2006 00:03:54 +0000
parents 9968f55ad26e
children
line wrap: on
line diff
--- a/lisp/gnus/gnus-bcklg.el	Sun Jan 15 23:02:10 2006 +0000
+++ b/lisp/gnus/gnus-bcklg.el	Mon Jan 16 00:03:54 2006 +0000
@@ -1,5 +1,7 @@
 ;;; gnus-bcklg.el --- backlog functions for Gnus
-;; Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+
+;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+;;   2005 Free Software Foundation, Inc.
 
 ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
 ;; Keywords: news
@@ -18,8 +20,8 @@
 
 ;; You should have received a copy of the GNU General Public License
 ;; along with GNU Emacs; see the file COPYING.  If not, write to the
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
 
 ;;; Commentary:
 
@@ -55,36 +57,39 @@
 
 (defun gnus-backlog-shutdown ()
   "Clear all backlog variables and buffers."
+  (interactive)
   (when (get-buffer gnus-backlog-buffer)
-    (kill-buffer gnus-backlog-buffer))
+    (gnus-kill-buffer gnus-backlog-buffer))
   (setq gnus-backlog-hashtb nil
 	gnus-backlog-articles nil))
 
 (defun gnus-backlog-enter-article (group number buffer)
-  (gnus-backlog-setup)
-  (let ((ident (intern (concat group ":" (int-to-string number))
-		       gnus-backlog-hashtb))
-	b)
-    (if (memq ident gnus-backlog-articles)
-	()				; It's already kept.
+  (when (and (numberp number)
+	     (not (string-match "^nnvirtual" group)))
+    (gnus-backlog-setup)
+    (let ((ident (intern (concat group ":" (int-to-string number))
+			 gnus-backlog-hashtb))
+	  b)
+      (if (memq ident gnus-backlog-articles)
+	  ()				; It's already kept.
       ;; Remove the oldest article, if necessary.
-      (and (numberp gnus-keep-backlog)
-	   (>= (length gnus-backlog-articles) gnus-keep-backlog)
+	(and (numberp gnus-keep-backlog)
+	     (>= (length gnus-backlog-articles) gnus-keep-backlog)
 	   (gnus-backlog-remove-oldest-article))
-      (push ident gnus-backlog-articles)
-      ;; Insert the new article.
-      (save-excursion
-	(set-buffer (gnus-backlog-buffer))
-	(let (buffer-read-only)
-	  (goto-char (point-max))
-	  (unless (bolp)
-	    (insert "\n"))
-	  (setq b (point))
-	  (insert-buffer-substring buffer)
-	  ;; Tag the beginning of the article with the ident.
-	  (if (> (point-max) b)
+	(push ident gnus-backlog-articles)
+	;; Insert the new article.
+	(save-excursion
+	  (set-buffer (gnus-backlog-buffer))
+	  (let (buffer-read-only)
+	    (goto-char (point-max))
+	    (unless (bolp)
+	      (insert "\n"))
+	    (setq b (point))
+	    (insert-buffer-substring buffer)
+	    ;; Tag the beginning of the article with the ident.
+	    (if (> (point-max) b)
 	      (gnus-put-text-property b (1+ b) 'gnus-backlog ident)
-	    (gnus-error 3 "Article %d is blank" number)))))))
+	      (gnus-error 3 "Article %d is blank" number))))))))
 
 (defun gnus-backlog-remove-oldest-article ()
   (save-excursion
@@ -127,7 +132,8 @@
 	  (setq gnus-backlog-articles (delq ident gnus-backlog-articles)))))))
 
 (defun gnus-backlog-request-article (group number &optional buffer)
-  (when (numberp number)
+  (when (and (numberp number)
+	     (not (string-match "^nnvirtual" group)))
     (gnus-backlog-setup)
     (let ((ident (intern (concat group ":" (int-to-string number))
 			 gnus-backlog-hashtb))
@@ -155,4 +161,5 @@
 
 (provide 'gnus-bcklg)
 
+;;; arch-tag: 66259e56-505a-4bba-8a0d-3552c5b94e39
 ;;; gnus-bcklg.el ends here