emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/gnus/gnus-bcklg.el


From: Miles Bader
Subject: [Emacs-diffs] Changes to emacs/lisp/gnus/gnus-bcklg.el
Date: Sat, 04 Sep 2004 09:48:03 -0400

Index: emacs/lisp/gnus/gnus-bcklg.el
diff -c emacs/lisp/gnus/gnus-bcklg.el:1.5 emacs/lisp/gnus/gnus-bcklg.el:1.6
*** emacs/lisp/gnus/gnus-bcklg.el:1.5   Mon Sep  1 15:45:24 2003
--- emacs/lisp/gnus/gnus-bcklg.el       Sat Sep  4 13:13:43 2004
***************
*** 1,5 ****
  ;;; gnus-bcklg.el --- backlog functions for Gnus
! ;; Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
  
  ;; Author: Lars Magne Ingebrigtsen <address@hidden>
  ;; Keywords: news
--- 1,6 ----
  ;;; gnus-bcklg.el --- backlog functions for Gnus
! ;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003
! ;;        Free Software Foundation, Inc.
  
  ;; Author: Lars Magne Ingebrigtsen <address@hidden>
  ;; Keywords: news
***************
*** 55,90 ****
  
  (defun gnus-backlog-shutdown ()
    "Clear all backlog variables and buffers."
    (when (get-buffer gnus-backlog-buffer)
!     (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.
        ;; Remove the oldest article, if necessary.
!       (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)
              (gnus-put-text-property b (1+ b) 'gnus-backlog ident)
!           (gnus-error 3 "Article %d is blank" number)))))))
  
  (defun gnus-backlog-remove-oldest-article ()
    (save-excursion
--- 56,94 ----
  
  (defun gnus-backlog-shutdown ()
    "Clear all backlog variables and buffers."
+   (interactive)
    (when (get-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)
!   (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)
           (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)
              (gnus-put-text-property b (1+ b) 'gnus-backlog ident)
!             (gnus-error 3 "Article %d is blank" number))))))))
  
  (defun gnus-backlog-remove-oldest-article ()
    (save-excursion
***************
*** 127,133 ****
          (setq gnus-backlog-articles (delq ident gnus-backlog-articles)))))))
  
  (defun gnus-backlog-request-article (group number &optional buffer)
!   (when (numberp number)
      (gnus-backlog-setup)
      (let ((ident (intern (concat group ":" (int-to-string number))
                         gnus-backlog-hashtb))
--- 131,138 ----
          (setq gnus-backlog-articles (delq ident gnus-backlog-articles)))))))
  
  (defun gnus-backlog-request-article (group number &optional buffer)
!   (when (and (numberp number)
!            (not (string-match "^nnvirtual" group)))
      (gnus-backlog-setup)
      (let ((ident (intern (concat group ":" (int-to-string number))
                         gnus-backlog-hashtb))




reply via email to

[Prev in Thread] Current Thread [Next in Thread]