Function: gnus-with-article
gnus-with-article is a macro defined in gnus-sum.el.gz.
Signature
(gnus-with-article ARTICLE &rest FORMS)
Documentation
Select ARTICLE and perform FORMS in the original article buffer.
Then replace the article with the result.
Source Code
;; Defined in /usr/src/emacs/lisp/gnus/gnus-sum.el.gz
;;;
;;; with article
;;;
(defmacro gnus-with-article (article &rest forms)
"Select ARTICLE and perform FORMS in the original article buffer.
Then replace the article with the result."
(declare (indent 1) (debug t))
`(progn
;; We don't want the article to be marked as read.
(let (gnus-mark-article-hook)
(gnus-summary-select-article t t nil ,article))
(set-buffer gnus-original-article-buffer)
,@forms
(if (not (gnus-check-backend-function
'request-replace-article (car gnus-article-current)))
(gnus-message 5 "Read-only group; not replacing")
(unless (gnus-request-replace-article
,article (car gnus-article-current)
(current-buffer) t)
(error "Couldn't replace article")))
;; The cache and backlog have to be flushed somewhat.
(when gnus-keep-backlog
(gnus-backlog-remove-article
(car gnus-article-current) (cdr gnus-article-current)))
(when gnus-use-cache
(gnus-cache-update-article
(car gnus-article-current) (cdr gnus-article-current)))))