Function: gnus-request-accept-article

gnus-request-accept-article is a byte-compiled function defined in gnus-int.el.gz.

Signature

(gnus-request-accept-article GROUP &optional COMMAND-METHOD LAST NO-ENCODE)

Source Code

;; Defined in /usr/src/emacs/lisp/gnus/gnus-int.el.gz
(defun gnus-request-accept-article (group &optional command-method last
					  no-encode)
  (let ((gnus-command-method
         (if (stringp command-method)
             (gnus-server-to-method command-method)
           command-method)))
    (when (and (not gnus-command-method)
	       (stringp group))
      (setq gnus-command-method (or (gnus-find-method-for-group group)
                                    (gnus-group-name-to-method group))))
    (goto-char (point-max))
    ;; Make sure there's a newline at the end of the article.
    (unless (bolp)
      (insert "\n"))
    (unless no-encode
      (let ((message-options message-options))
        (message-options-set-recipient)
        (save-restriction
	  (message-narrow-to-head)
	  (mail-encode-encoded-word-buffer))
	(message-encode-message-body)))
    (let ((gnus-command-method (or gnus-command-method
				   (gnus-find-method-for-group group)))
	  (result
	   (funcall
	    (gnus-get-function gnus-command-method 'request-accept-article)
	    (if (stringp group) (gnus-group-real-name group) group)
	    (cadr gnus-command-method)
	    last)))
      (when (and gnus-agent
                 (gnus-agent-method-p gnus-command-method)
                 (cdr result))
	(gnus-agent-regenerate-group group (list (cdr result))))
      result)))