(spam-get-article-as-string): updated to use
authorTeodor Zlatanov <tzz@lifelogs.com>
Mon, 12 Jan 2004 21:34:00 +0000 (21:34 +0000)
committerTeodor Zlatanov <tzz@lifelogs.com>
Mon, 12 Jan 2004 21:34:00 +0000 (21:34 +0000)
gnus-request-article-this-buffer, much simpler
(spam-get-article-as-buffer): removed

lisp/ChangeLog
lisp/spam.el

index 11dd36f..3be46c2 100644 (file)
@@ -1,3 +1,9 @@
+2004-01-12  Teodor Zlatanov  <tzz@lifelogs.com>
+
+       * spam.el (spam-get-article-as-string): updated to use
+       gnus-request-article-this-buffer, much simpler
+       (spam-get-article-as-buffer): removed
+
 2004-01-12  Kai Grossjohann  <kai.grossjohann@mci.com>
 
        * message.el (message-expand-name): Use EUDC if the user uses
index 2fa6efd..07405ca 100644 (file)
@@ -786,22 +786,12 @@ Respects the process/prefix convention."
     (spam-ham-copy-or-move-routine nil groups)))
 
 (defun spam-get-article-as-string (article)
-  (let ((article-buffer (spam-get-article-as-buffer article))
-       article-string)
-    (when article-buffer
-      (save-window-excursion
-       (set-buffer article-buffer)
-       (setq article-string (buffer-string))))
-    article-string))
-
-(defun spam-get-article-as-buffer (article)
-  (let ((article-buffer))
-    (when (numberp article)
-      (save-window-excursion
-       (gnus-summary-goto-subject article)
-       (gnus-summary-show-article t)
-       (setq article-buffer (get-buffer gnus-article-buffer))))
-    article-buffer))
+  (when (numberp article)
+    (with-temp-buffer
+      (gnus-request-article-this-buffer
+       article
+       gnus-newsgroup-name)
+      (buffer-string))))
 
 ;; disabled for now
 ;; (defun spam-get-article-as-filename (article)