Function: nntp-request-post

nntp-request-post is a byte-compiled function defined in nntp.el.gz.

Signature

(nntp-request-post &optional SERVER)

Source Code

;; Defined in /usr/src/emacs/lisp/gnus/nntp.el.gz
(deffoo nntp-request-post (&optional server)
  (nntp-with-open-group
   nil server
   (when (nntp-send-command "^[23].*\r?\n" "POST")
     (let ((response (with-current-buffer nntp-server-buffer
                       nntp-process-response))
           server-id)
       (when (and response
                  (string-match "^[23].*\\(<[^\t\n @<>]+@[^\t\n @<>]+>\\)"
                                response))
         (setq server-id (match-string 1 response))
         (narrow-to-region (goto-char (point-min))
                           (if (search-forward "\n\n" nil t)
                               (1- (point))
                             (point-max)))
         (unless (mail-fetch-field "Message-ID")
           (goto-char (point-min))
           (insert "Message-ID: " server-id "\n"))
         (widen))
       (run-hooks 'nntp-prepare-post-hook)
       (nntp-send-buffer "^[23].*\n")))))