Fix error of arguments and references.
authorShengHuo ZHU <zsh@cs.rochester.edu>
Tue, 7 Dec 1999 21:21:45 +0000 (21:21 +0000)
committerShengHuo ZHU <zsh@cs.rochester.edu>
Tue, 7 Dec 1999 21:21:45 +0000 (21:21 +0000)
lisp/ChangeLog
lisp/nnwarchive.el

index f3e1cdd..29a43b9 100644 (file)
@@ -1,3 +1,8 @@
+1999-12-07 16:17:12  Shenghuo ZHU  <zsh@cs.rochester.edu>
+
+       * nnwarchive.el (nnwarchive-mail-archive-article): Fix
+       buffer-string arguments. Fix references.
+
 1999-12-07 15:04:18  Shenghuo ZHU  <zsh@cs.rochester.edu>
 
        * gnus-agent.el (gnus-agent-confirmation-function): New variable.
index d4f7b21..61069e2 100644 (file)
   (while (re-search-forward "<a[^>]+>\\([^<]+\\)</a>" nil t)
     (replace-match "<\\1>"))
   (nnwarchive-decode-entities)
-  (buffer-substring (point-min) (point-max)))
+  (buffer-string))
 
 (defun nnwarchive-egroups-xover-files (group articles)
   (let (aux auxs)
       (setq min (apply 'min (mapcar 'car nnwarchive-headers))))))
 
 (defun nnwarchive-mail-archive-article (group article)
-  (let (p refs url mime file)
+  (let (p refs url mime file e)
     (save-restriction
       (goto-char (point-min))
       (when (search-forward "<ul>" nil t)
            (goto-char (point-max))))
       (setq p (point))
       (when (search-forward "X-References-End" nil t)
-       (narrow-to-region p (point))
-       (goto-char (point-min))
-       (while (re-search-forward "msg\\([0-9]+\\)\\.html" nil t)
-         (push (concat "<" (match-string 1) "%" group ">") refs))
-       (widen))
+       (setq e (point))
+       (beginning-of-line)
+       (search-backward "X-References" p t)
+       (while (re-search-forward "msg\\([0-9]+\\)\\.html" e t)
+         (push (concat "<" (match-string 1) "%" group ">") refs)))
       (delete-region p (point-max))
       (goto-char (point-min))
       (insert (format "Message-ID: <%05d%%%s>\n" (1- article) group))
       (when mime
        (insert "MIME-Version: 1.0\n"
                "Content-Type: text/html\n")))
-    (buffer-string (point-min) (point-max))))
+    (buffer-string)))
 
 (provide 'nnwarchive)