*** empty log message ***
[gnus] / lisp / gnus-bcklg.el
index 33019e2..0f0fa5e 100644 (file)
@@ -1,5 +1,5 @@
 ;;; gnus-bcklg.el --- backlog functions for Gnus
-;; Copyright (C) 1996 Free Software Foundation, Inc.
+;; Copyright (C) 1996,97 Free Software Foundation, Inc.
 
 ;; Author: Lars Magne Ingebrigtsen <larsi@ifi.uio.no>
 ;; Keywords: news
@@ -25,7 +25,7 @@
 
 ;;; Code:
 
-(require 'gnus-load)
+(require 'gnus)
 
 ;;;
 ;;; Buffering of read articles.
@@ -48,7 +48,7 @@
 (defun gnus-backlog-setup ()
   "Initialize backlog variables."
   (unless gnus-backlog-hashtb
-    (setq gnus-backlog-hashtb (make-vector 1023 0))))
+    (setq gnus-backlog-hashtb (gnus-make-hashtable 1024))))
 
 (gnus-add-shutdown 'gnus-backlog-shutdown 'gnus)
 
                       gnus-backlog-hashtb))
        b)
     (if (memq ident gnus-backlog-articles)
-       () ; It's already kept.
+       ()                              ; 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))
-      (setq gnus-backlog-articles (cons ident gnus-backlog-articles))
+      (push ident gnus-backlog-articles)
       ;; Insert the new article.
       (save-excursion
        (set-buffer (gnus-backlog-buffer))
        (let (buffer-read-only)
          (goto-char (point-max))
-         (or (bolp) (insert "\n"))
+         (unless (bolp)
+           (insert "\n"))
          (setq b (point))
          (insert-buffer-substring buffer)
          ;; Tag the beginning of the article with the ident.
@@ -87,7 +88,7 @@
     (set-buffer (gnus-backlog-buffer))
     (goto-char (point-min))
     (if (zerop (buffer-size))
-       () ; The buffer is empty.
+       ()                              ; The buffer is empty.
       (let ((ident (get-text-property (point) 'gnus-backlog))
            buffer-read-only)
        ;; Remove the ident from the list of articles.