
(provide (quote gnuspost))

(require (quote gnus))

(defvar gnus-organization-file "/usr/lib/news/organization" "\
*Local news organization file.")

(defvar gnus-post-news-buffer "*post-news*")

(defvar gnus-winconf-post-news nil)

(autoload (quote news-reply-mode) "rnewspost")

(autoload (quote timezone-make-date-arpa-standard) "timezone")

(defun gnus-Group-post-news nil "\
Post an article." (interactive) (byte-code "Ĉ Ǝ )
! 
!!  !" [gnus-winconf-post-news gnus-post-news-buffer gnus-Subject-buffer gnus-Article-buffer nil current-window-configuration ((byte-code "p!=  !? 	!" [gnus-post-news-buffer gnus-winconf-post-news get-buffer zerop buffer-size set-window-configuration] 5)) gnus-post-news get-buffer bury-buffer] 7))

(defun gnus-Subject-post-news nil "\
Post an article." (interactive) (byte-code "\" ǎ!   )!" [t nil gnus-winconf-post-news gnus-Article-buffer gnus-post-news-buffer gnus-Subject-select-article current-window-configuration ((byte-code "p!=  !? 	!" [gnus-post-news-buffer gnus-winconf-post-news get-buffer zerop buffer-size set-window-configuration] 5)) switch-to-buffer widen delete-other-windows gnus-post-news bury-buffer] 8))

(defun gnus-Subject-post-reply (yank) "\
Post a reply article.
If prefix argument YANK is non-nil, original article is yanked automatically." (interactive "P") (byte-code "\"
q\" !\"\" =?\" !?+ !D  Ў
!  !)
!" [t nil gnus-Article-buffer gnus-use-followup-to yank gnus-winconf-post-news gnus-post-news-buffer gnus-Subject-select-article string-equal "poster" gnus-fetch-field "followup-to" y-or-n-p "Do you want to ignore `Followup-To: poster'? " gnus-Subject-mail-reply current-window-configuration ((byte-code "p!=  !? 	!" [gnus-post-news-buffer gnus-winconf-post-news get-buffer zerop buffer-size set-window-configuration] 5)) switch-to-buffer widen delete-other-windows gnus-news-reply bury-buffer] 12))

(defun gnus-Subject-post-reply-with-original nil "\
Post a reply article with original article." (interactive) (byte-code "!" [t nil gnus-Subject-post-reply] 2))

(defun gnus-Subject-cancel-article nil "\
Cancel an article you posted." (interactive) (byte-code "\" Ǝ! ))" [t nil GNUSStartBufferWindow gnus-Article-buffer gnus-Subject-select-article selected-window ((byte-code "!" [GNUSStartBufferWindow select-window] 2)) pop-to-buffer gnus-cancel-news] 5))

(fset (quote sendnews) (quote gnus-post-news))

(fset (quote postnews) (quote gnus-post-news))

(defun gnus-post-news nil "\
Begin editing a new USENET news article to be posted.
Type \\[describe-mode] once editing the article to get a list of commands." (interactive) (byte-code "ƈ?
 ! p=  !?: \":  eeb!`\"!!	)
!   e  Ve !?o 	   ~  
 
%!\"
	%!  c !c db eb , !" [gnus-novice-user artbuf newsgroups major-mode gnus-newsgroup-name subject nil distribution news-reply-yank-from news-reply-yank-message-id gnus-post-news-buffer mail-reply-buffer gnus-interactive-post gnus-newsrc-assoc gnus-default-distribution gnus-author-copy y-or-n-p "Are you sure you want to post to all of USENET? " gnus-Article-mode zerop buffer-size equal gnus-Article-show-all-headers narrow-to-region search-forward "

" mail-fetch-field "from" "message-id" pop-to-buffer news-reply-mode gnus-overload-functions buffer-modified-p 0 "Unsent article being composed; erase it? " erase-buffer gnus-read-newsrc-file completing-read "Newsgroup: " require-match read-string "Subject: " "Distribution: " news-setup mail-position-on-field "Distribution" "" "FCC" end-of-line message] 26))

(defun gnus-news-reply (&optional yank) "\
Compose and post a reply (aka a followup) to the current article on USENET.
While composing the followup, use \\[news-reply-yank-original] to yank the
original message into it." (interactive) (byte-code "Ј?
 !p
	 !?K \"K  eeb!`\"!	!!!?} \"} \" Љ !!	!
!)!     V !? }  \"P		\" 	O 	Q)% c@ A !`B C 	7	c	?FD cOcE `T\"+@ F !
hcz@ G !cdb`dbH !b).I !" [gnus-novice-user from cc subject date to followup-to newsgroups message-of references distribution message-id artbuf major-mode news-reply-yank-from gnus-use-followup-to nil news-reply-yank-message-id gnus-post-news-buffer mail-reply-buffer stop-pos begin fill-column fill-prefix gnus-author-copy yank last y-or-n-p "Are you sure you want to followup to all of USENET? " zerop buffer-size equal gnus-Article-mode gnus-Article-show-all-headers narrow-to-region search-forward "

" mail-fetch-field "from" "subject" "date" "followup-to" string-equal "" "poster" "newsgroups" "references" "distribution" "message-id" pop-to-buffer news-reply-mode gnus-overload-functions buffer-modified-p 0 "Unsent article being composed; erase it? " erase-buffer "Re: " gnus-simplify-subject re-only string-match "  *at \\|  *@ \\| *(\\| *<" "'s message of " news-setup news-reply-followup-to mail-position-on-field "References" 79 "	" " " fill-region-as-paragraph "Distribution" "FCC" news-reply-yank-original message] 35))

(defun gnus-inews-news nil "\
Send a news message." (interactive) (byte-code "   eb!ebQ!!dbhU. c! > !F   \"eb!Q!!)
`  !i  q !*" [case-fold-search nil server-running mail-header-separator gnus-winconf-post-news gnus-server-opened gnus-start-news-server widen run-hooks news-inews-hook search-forward "
" replace-match "

" 10 message "Posting to USENET..." gnus-inews-article "Posting to USENET... done" ding "Article rejected: %s" gnus-status-message set-buffer-modified-p gnus-close-server fboundp bury-buffer set-window-configuration] 21))

(defun gnus-cancel-news nil "\
Cancel an article you posted." (interactive) (byte-code "!  eb#e`\"!!!!)!! !!\"?V  ! !qp! 
r & dbc!  !  !p!)," [from nil newsgroups message-id distribution yes-or-no-p "Do you really want to cancel this article? " gnus-Article-show-all-headers search-forward "

" move narrow-to-region mail-fetch-field "from" "newsgroups" "message-id" "distribution" string-equal downcase mail-strip-quoted-names gnus-inews-user-name ding message "This article is not yours" get-buffer-create " *GNUS-posting*" buffer-flush-undo erase-buffer insert "Newsgroups: " "
" "Subject: cancel " "Control: cancel " "Distribution: " "" gnus-inews-insert-headers "Canceling your article..." gnus-request-post "Canceling your article... done" "Failed to cancel your article" kill-buffer] 32))

(defun gnus-inews-article nil "\
NNTP inews interface." (byte-code "	 	\"p!qp! !eb!e`\"!) Z Q!J Q!Z dbc!eb!e`\" eb#{  )) ! p!)," [signature gnus-signature-file nil distribution artbuf tmpbuf case-fold-search t expand-file-name get-buffer-create " *GNUS-posting*" buffer-flush-undo erase-buffer insert-buffer-substring search-forward "

" narrow-to-region mail-fetch-field "distribution" widen file-exists-p "-" "--
" insert-file-contents gnus-inews-insert-headers re-search-forward "^FCC:" gnus-inews-do-fcc run-hooks gnus-Inews-article-hook gnus-request-post kill-buffer] 23))

(defun gnus-inews-do-fcc nil "\
Process FCC: fields." (byte-code "eb#1 ` !`\"B!!`\"  p @A
\"c 
!!Oed&)l j 
\"5 ))+" [fcc-list nil fcc-file case-fold-search t program shell-file-name gnus-author-copy-saver re-search-forward "^FCC:[ 	]*" buffer-substring end-of-line skip-chars-backward " 	" delete-region match-beginning 0 forward-line 1 widen string-match "^[ 	]*|[ 	]*\\(.*\\)[ 	]*$" match-end call-process-region "-c" funcall rmail-output] 21))

(defun gnus-inews-insert-headers nil "\
Prepare article headers.
Path:, From:, Subject: and Distribution: are generated.
Message-ID:, Date:, and Organization: is optional." (byte-code "   eb # #!# c	- 	#7 #
M `
#`\"+!V c=d  #+)" [date message-id organization begin fill-column fill-prefix gnus-news-system gnus-inews-date gnus-inews-message-id gnus-inews-organization insert "Path: " gnus-inews-path "
" "From: " gnus-inews-user-name mail-fetch-field "subject" "Subject: 
" "Message-ID: " "Date: " 79 "	" "Organization: " fill-region-as-paragraph "distribution" "Distribution: 
" Cnews "Lines: " gnus-inews-lines] 18))

(defun gnus-inews-path nil "\
Return uucp path." (byte-code " 	? 
Q 	; 	Q )" [login-name gnus-use-generic-path gnus-nntp-server t gnus-inews-login-name "!"] 4))

(defun gnus-inews-user-name nil "\
Return user's network address as `NAME@DOMAIN (FULL NAME)'." (byte-code "  
!	\" ɂ( 	\"$ Q( 	QR*" [login-name full-name gnus-use-generic-from t gnus-inews-login-name gnus-inews-full-name "@" gnus-inews-domain-name string-equal "" "&" " (" ")"] 11))

(defun gnus-inews-login-name nil "\
Return user login name.
Got from the variable gnus-user-login-name, the environment variables
USER and LOGNAME, and the function user-login-name." (byte-code " ! !  " [gnus-user-login-name getenv "USER" "LOGNAME" user-login-name] 4))

(defun gnus-inews-full-name nil "\
Return user full name.
Got from the variable gnus-user-full-name, the environment variable
NAME, and the function user-full-name." (byte-code " !  " [gnus-user-full-name getenv "NAME" user-full-name] 3))

(defun gnus-inews-domain-name (&optional genericfrom) "\
Return user's domain name.
If optional argument GENERICFROM is a string, use it as the domain
name; if it is non-nil, strip of local host name from the domain name.
If the function `system-name' returns full internet name and the
domain is undefined, the domain name is got from it." (byte-code "? ! 	; 7 !7 7  \"1  !O7 ! \"F  !OK  
O\"] 
O?f 
?s 
Qt 
*" [gnus-local-domain gnus-your-domain domain genericfrom host t boundp getenv "DOMAINNAME" string-match "\\." system-name match-end 0 nil read-string "Domain name (no host): " match-beginning string-equal "." 1] 17))

(defun gnus-inews-message-id nil "\
Generate unique Message-ID for user." (byte-code "  %" [concat "<" gnus-inews-unique-id "@" gnus-inews-domain-name ">"] 8))

(defun gnus-inews-unique-id nil "\
Generate unique ID from user name and current time." (byte-code "  \"G 	!!!O!!O!!O!!O!!O!!O&K \"*" [date name current-time-string gnus-inews-login-name string-match "^[^ ]+ \\([^ ]+\\)[ ]+\\([0-9]+\\) \\([0-9]+\\):\\([0-9]+\\):\\([0-9]+\\) [0-9][0-9]\\([0-9][0-9]\\)" concat upcase "." match-beginning 6 match-end 1 2 3 4 5 error "Cannot understand current-time-string: %s."] 27))

(defun gnus-inews-date nil "\
Bnews date format string of today.
If the variable gnus-local-timezone is non-nil, valid date will be
generated in terms of RFC822.  Otherwise, buggy date in which time
zone is ignored will be generated.  If you are using with Cnews, you
must use valid date." (byte-code "	   	=  " [gnus-local-timezone gnus-news-system gnus-inews-valid-date Bnews gnus-inews-buggy-date] 3))

(defun gnus-inews-valid-date nil "\
Bnews date format string of today represented in GMT.
Local timezone is specified by the variable gnus-local-timezone." (byte-code " #" [gnus-local-timezone timezone-make-date-arpa-standard current-time-string "GMT"] 5))

(defun gnus-inews-buggy-date nil "\
Buggy Bnews date format string of today. Time zone is ignored, but fast." (byte-code " \"3 !!O!!O!!O!!O&7 \")" [date current-time-string string-match "^[^ ]+ \\([^ ]+\\)[ ]+\\([0-9]+\\) \\([0-9:]+\\) [0-9][0-9]\\([0-9][0-9]\\)" concat match-beginning 2 match-end " " 1 4 3 error "Cannot understand current-time-string: %s."] 20))

(defun gnus-inews-organization nil "\
Return user's organization.
The ORGANIZATION environment variable is used if defined.
If not, the variable gnus-local-organization is used instead.
If the value begins with a slash, it is taken as the name of a file
containing the organization." (byte-code "? ! 	!  \"
;Y 
O\"Y !
Q!A 
QV 
!K 
V !U V 
)
;?d Â 
O\"q 
! !q 
! !)) 
)" [gnus-local-organization gnus-your-organization organization nil dist gnus-organization-file t tmpbuf boundp getenv "ORGANIZATION" expand-file-name "~/.organization" string-equal 0 1 "/" mail-fetch-field "distribution" file-exists-p "-" get-buffer-create " *GNUS organization*" erase-buffer insert-file-contents buffer-string kill-buffer] 17))

(defun gnus-inews-lines nil "\
Count the number of lines and return numeric string." (byte-code " eb#`d\"!))" [nil widen search-forward "

" move int-to-string count-lines] 6))
