;ELC   
;;; compiled by amu@mit.edu on Sat Sep 13 16:20:22 1997
;;; from file /afs/sipb.mit.edu/contrib/emacs/packages/gnus-5.4.67/lisp/nndoc.el
;;; emacs version 19.30.1.
;;; bytecomp version FSF 2.10
;;; optimization is on.
;;; this file uses opcodes which do not exist in Emacs 18.

(if (and (boundp 'emacs-version)
	 (or (and (boundp 'epoch::version) epoch::version)
	     (string-lessp emacs-version "19.29")))
    (error "`nndoc.el' was compiled for Emacs 19.29 or later"))


(byte-code "!!!!\"ȉF	B	DBȇ" [require nnheader message nnmail nnoo nndoc mapcar #[(p) "C" [p] 1] nil nnoo-definition-alist "*internal-non-initialized-backend*" nnoo-state-alist] 4)
#@195 *Type of the file.
One of `mbox', `babyl', `digest', `news', `rnews', `mmdf', `forward',
`rfc934', `rfc822-forward', `mime-digest', `standard-digest',
`slack-digest', `clari-briefs' or `guess'.
(defvar nndoc-article-type (quote guess) (#$ . -697))
(nnoo-define (quote nndoc-article-type) nil)
#@47 *Whether the nndoc group is `mail' or `post'.
(defvar nndoc-post-type (quote mail) (#$ . -996))
(byte-code "\"!7 \"QB\"QBBBBBBBBBBBBBBB!F B\"!Z B\"!n B\"! B\"! B\"!  B\"! !B\"! \"B\"! #B\"! $B\"!%B\"!\"&B\"!6'B\"!J(B\"!^)B\"!r*B\"!+B\"!,B\"!.B\"" [nnoo-define nndoc-post-type nil boundp nndoc-type-alist (mmdf (article-begin . "^\n") (body-end . "^\n")) (news (article-begin . "^Path:")) (rnews (article-begin . "^#! *rnews +\\([0-9]+\\) *\n") (body-end-function . nndoc-rnews-body-end)) (mbox (article-begin-function . nndoc-mbox-article-begin) (body-end-function . nndoc-mbox-body-end)) (babyl (article-begin . "\f *\n") (body-end . "") (body-begin-function . nndoc-babyl-body-begin) (head-begin-function . nndoc-babyl-head-begin)) (forward (article-begin . "^-+ Start of forwarded message -+\n+") (body-end . "^-+ End of forwarded message -+$") (prepare-body-function . nndoc-unquote-dashes)) (rfc934 (article-begin . "^--.*\n+") (body-end . "^--.*$") (prepare-body-function . nndoc-unquote-dashes)) (clari-briefs (article-begin . "^ \\*") (body-end . "^	------*[ 	]^*\n^ \\*") (body-begin . "^	") (head-end . "^	") (generate-head-function . nndoc-generate-clari-briefs-head) (article-transform-function . nndoc-transform-clari-briefs)) (mime-digest (article-begin . "") (head-end . "^ ?$") (body-end . "") (file-end . "") (subtype digest guess)) standard-digest first-article "^" make-string 70 45 "\n\n+" article-begin "^\n" 30 ((prepare-body-function . nndoc-unquote-dashes) (body-end-function . nndoc-digest-body-end) (head-end . "^ ?$") (body-begin . "^ ?\n") (file-end . "^End of .*digest.*[0-9].*\n\\*\\*\\|^End of.*Digest *$") (subtype digest guess)) ((slack-digest (article-begin . "^------------------------------*[\n 	]+") (head-end . "^ ?$") (body-end-function . nndoc-digest-body-end) (body-begin . "^ ?$") (file-end . "^End of") (prepare-body-function . nndoc-unquote-dashes) (subtype digest guess)) (lanl-gov-announce (article-begin . "^\\\\\\\\\n") (head-begin . "^Paper.*:") (head-end . "\\(^\\\\\\\\.*\n\\|-----------------\\)") (body-begin . "") (body-end . "-------------------------------------------------") (file-end . "^Title: Recent Seminal") (generate-head-function . nndoc-generate-lanl-gov-head) (article-transform-function . nndoc-transform-lanl-gov-announce) (subtype preprints guess)) (rfc822-forward (article-begin . "^\n") (body-end-function . nndoc-rfc822-forward-body-end-function)) (guess (guess . t) (subtype nil)) (digest (guess . t) (subtype nil)) (preprints (guess . t) (subtype nil))) current-load-list nndoc-file-begin nndoc-first-article nndoc-article-end nndoc-article-begin nndoc-head-begin nndoc-head-end nndoc-file-end nndoc-body-begin nndoc-body-end-function nndoc-body-begin-function nndoc-head-begin-function nndoc-body-end nndoc-dissection-alist nndoc-prepare-body-function nndoc-generate-head-function nndoc-article-transform-function nndoc-article-begin-function nndoc-status-string "" nndoc-group-alist] 16)
#@28 Current nndoc news buffer.
(defvar nndoc-current-buffer nil (#$ . 4305))
(byte-code "\"! B\"" [nnoo-define nndoc-current-buffer nil boundp nndoc-address current-load-list] 3)
#@16 nndoc version.
(defconst nndoc-version "nndoc 1.0" (#$ . 4503))
(nnoo-define-basics-1 (quote nndoc))
(defalias 'nndoc-retrieve-headers #[(articles &optional newsgroup server fetch-old) "	\n\"{ q ŉ@; ɂz v A@\nA \"cM !Y @A@#db`SfUg c8\"cc  +" [nndoc-possibly-change-buffer newsgroup server nntp-server-buffer erase-buffer nil entry article articles headers nndoc-dissection-alist format "221 %d Article retrieved.\n" nndoc-generate-head-function insert-buffer-substring nndoc-current-buffer 10 "\n" "Lines: %d\n" 4 ".\n" nnheader-fold-continuation-lines] 4])
(nnoo-register-function (quote nndoc-retrieve-headers))
(defalias 'nndoc-request-article #[(article &optional newsgroup server buffer) "	\n\" \fA	q 	^ ;?^ \f	@	A@#c`\f	8	8#bS  ] !," [nndoc-possibly-change-buffer newsgroup server buffer nntp-server-buffer article nndoc-dissection-alist nil beg entry erase-buffer insert-buffer-substring nndoc-current-buffer "\n" 2 3 nndoc-prepare-body-function nndoc-article-transform-function t] 6])
(nnoo-register-function (quote nndoc-request-article))
#@20 Select news GROUP.
(defalias 'nndoc-request-group #[(group &optional server dont-check) "\f\" #> 	! #˂> \fGU7 !#> 		%)" [nil number nndoc-possibly-change-buffer group server nnheader-report nndoc "No such file or buffer: %s" nndoc-address dont-check "Selected group %s" t nndoc-dissection-alist 0 nndoc-close-group "No articles in group %s" nnheader-insert "211 %d %d %d %s\n" 1] 6 (#$ . 5689)])
(nnoo-register-function (quote nndoc-request-group))
(defalias 'nndoc-request-type #[(group &optional article) " \n\f \n" [article unknown nndoc-post-type] 1])
(nnoo-register-function (quote nndoc-request-type))
(defalias 'nndoc-close-group #[(group &optional server) "	\n\" ! !	\"\"\n\"\f͇" [nndoc-possibly-change-buffer group server nndoc-current-buffer buffer-name kill-buffer delq assoc nndoc-group-alist nil nnoo-close-server nndoc nndoc-dissection-alist t] 4])
(nnoo-register-function (quote nndoc-close-group))
(defalias 'nndoc-request-list #[(&optional server) "" [nil] 1])
(nnoo-register-function (quote nndoc-request-list))
(defalias 'nndoc-request-newgroups #[(date &optional server) "" [nil] 1])
(nnoo-register-function (quote nndoc-request-newgroups))
(defalias 'nndoc-request-list-newsgroups #[(&optional server) "" [nil] 1])
(nnoo-register-function (quote nndoc-request-list-newsgroups))
(defalias 'nndoc-possibly-change-buffer #[(group source) "\n \n! \n\"A=u 	\" 	u !0 !D ;u !u !u Q!BB\nqp! ;o !t !)\n  \nq  )\n  \n)" [nil buf nndoc-current-buffer buffer-name assoc group nndoc-group-alist bufferp nndoc-address file-exists-p file-directory-p get-buffer-create " *nndoc " "*" nndoc-dissection-alist buffer-disable-undo erase-buffer nnheader-insert-file-contents insert-buffer-substring nndoc-set-delims nndoc-dissect-buffer nndoc-close-server] 5])
#@74 Set the nndoc delimiter variables according to the type of the document.
(defalias 'nndoc-set-delims #[nil "	 	A@L )A' ! > @@\"!A@AL' )" [(nndoc-file-begin nndoc-first-article nndoc-article-end nndoc-head-begin nndoc-head-end nndoc-file-end nndoc-article-begin nndoc-body-begin nndoc-body-end-function nndoc-body-end nndoc-prepare-body-function nndoc-article-transform-function nndoc-generate-head-function nndoc-body-begin-function nndoc-head-begin-function) vars nil defs guess nndoc-article-type nndoc-type-alist nndoc-guess-type intern format "nndoc-%s"] 4 (#$ . 7622)])
(defalias 'nndoc-guess-type #[(subtype) "A A@A \nA  > eb\n@\"!  \nB\fB\f M \fM !V \n@] \f\"@A@," [nndoc-type-alist nil entry result results alist subtype (guess) intern format "nndoc-%s-type-p" error "Document is not of any recognized type" sort #[(r1 r2) "@	@W" [r1 r2] 2]] 5])
(defalias 'nndoc-mbox-type-p #[nil "	! " [looking-at message-unix-mail-delimiter t] 2])
(defalias 'nndoc-mbox-article-begin #[nil "\nP# Ŕb" [re-search-forward "^" message-unix-mail-delimiter nil t 0] 4])
(defalias 'nndoc-mbox-body-end #[nil "`P#T `T #T 	#T !!T #T `\n\\dU?T \ndWT \nbT !)Z \nb+" [nil end len beg re-search-backward "^" message-unix-mail-delimiter t search-forward "\n\n" "^Content-Length:[ 	]*\\([0-9]+\\) *$" string-to-int match-string 1 looking-at] 4])
(defalias 'nndoc-mmdf-type-p #[nil "! " [looking-at "$" t] 2])
(defalias 'nndoc-news-type-p #[nil "! " [looking-at "^Path:.*\n" t] 2])
(defalias 'nndoc-rnews-type-p #[nil "! " [looking-at "#! *rnews" t] 2])
(defalias 'nndoc-rnews-body-end #[nil "	# y `!!\\b" [re-search-backward nndoc-article-begin nil t 1 string-to-int match-string] 4])
(defalias 'nndoc-babyl-type-p #[nil "#	 Ç" [re-search-forward "\f *\n" nil t] 4])
(defalias 'nndoc-babyl-body-begin #[nil "#!1 #) d#?0 bycy)" [re-search-forward "^\n" nil t looking-at "*** EOOH ***" nndoc-article-begin next -1 "\n"] 4])
(defalias 'nndoc-babyl-head-begin #[nil "# ! yÇ" [re-search-forward "^[0-9].*\n" nil t looking-at "*** EOOH ***" 1] 4])
(defalias 'nndoc-forward-type-p #[nil "#& #?& $?& $?& Ç" [re-search-forward "^-+ Start of forwarded message -+\n+" nil t "^Subject:.*digest" re-search-backward "^From:" 2] 5])
(defalias 'nndoc-rfc934-type-p #[nil "#& #?& $?& $?& Ç" [re-search-forward "^-+ Start of forwarded.*\n+" nil t "^Subject:.*digest" re-search-backward "^From:" 2] 5])
(defalias 'nndoc-rfc822-forward-type-p #[nil " # )" [message-narrow-to-head re-search-forward "^Content-Type: *message/rfc822" nil t] 4])
(defalias 'nndoc-rfc822-forward-body-end-function #[nil "db" [] 1])
(defalias 'nndoc-clari-briefs-type-p #[nil "#)\f ć" [nil case-fold-search re-search-forward "^	[^a-z]+ ([^a-z]+) --" t] 4])
(defalias 'nndoc-transform-clari-briefs #[(article) "eb! ĉ#!" [looking-at " *\\*\\(.*\\)\n" replace-match "" t nndoc-generate-clari-briefs-head article] 4])
(defalias 'nndoc-generate-clari-briefs-head #[(article) "	Aq@8}eb!0 !\f\"0 \fΉO#)@ !*H \fO ٱ+" [article nndoc-dissection-alist nil from subject entry nndoc-current-buffer 3 looking-at " *\\*\\(.*\\)$" match-string 1 string-match "[ 	]+$" 0 case-fold-search re-search-forward "^	\\([^a-z]+\\(,[^(]+\\)? ([^a-z]+)\\) --" t "From: " "clari@clari.net (" "unknown" ")" "\nSubject: " "(no subject)" "\n"] 7])
(defalias 'nndoc-mime-digest-type-p #[nil "P#= ɔ= !\fQBBBB\fQB," [t nil entry b-delimiter boundary-id case-fold-search re-search-forward "^Content-Type: *multipart/digest;[ 	\n]*[ 	]" "boundary=\"\\([^\"\n]*[^\" 	\n]\\)\"" 1 match-string "\n--" "[\n 	]+" mime-digest nndoc-type-alist head-end "^ ?$" body-begin "^ ?\n" article-begin body-end-function nndoc-digest-body-end file-end "--[ 	]*$"] 10])
(defalias 'nndoc-standard-digest-type-p #[nil "\"Q# \"Q# Ǉ" [re-search-forward "^" make-string 70 45 "\n\n" nil t 30] 5])
(defalias 'nndoc-digest-body-end #[nil "	# Ĕb" [re-search-forward nndoc-article-begin nil t 0] 4])
(defalias 'nndoc-slack-digest-type-p #[nil "" [0] 1])
(defalias 'nndoc-lanl-gov-announce-type-p #[nil "#)\f ć" [nil case-fold-search re-search-forward "^\\\\\\\\\nPaper: [a-z-]+/[0-9]+" t] 4])
(defalias 'nndoc-transform-lanl-gov-announce #[(article) "db# #" [re-search-backward "^\\\\\\\\ +(\\([^ ]*\\) , *\\([^ ]*\\))" nil t replace-match "\n\nGet it at \\1 (\\2)"] 4])
(defalias 'nndoc-generate-lanl-gov-head #[(article) "	AÉq@A@}eb!P !Q#9 !#P !P!R*\fg \f\"g щ\f$U \fm s ޱ," [article nndoc-dissection-alist "no address given" nil from subject e-mail entry nndoc-current-buffer looking-at "^Paper.*: \\([a-z-]+/[0-9]+\\)" " (" match-string 1 ")" re-search-forward "^From: \\([^ ]+\\)" t "^Title: \\([^\f]*\\)\nAuthors?: \\(.*\\)" 2 " <" ">" string-match "([^)]*)" replace-match "" "From: " "unknown" "\nSubject: " "(no subject)" "\n"] 6])
(defalias 'nndoc-search #[(regexp) "	#y" [re-search-forward regexp nil t 0] 4])
#@70 Go through the document and partition it into heads/bodies/articles.
(defalias 'nndoc-dissect-buffer #[nil "	\nqeb$ !5 5 !7   I  S S !`dYe k !k db$ `u !`    !`    !   db # y`T\f\f\"	B	$ ." [0 t nil body-end body-begin head-end head-begin first i nndoc-dissection-alist nndoc-current-buffer nndoc-file-begin nndoc-search nndoc-first-article nndoc-article-begin nndoc-head-begin-function nndoc-head-begin nndoc-file-end looking-at nndoc-head-end "^$" nndoc-body-begin-function nndoc-body-begin "^\n" nndoc-body-end-function nndoc-body-end re-search-backward count-lines] 8 (#$ . 12964)])
(defalias 'nndoc-article-begin #[nil "  Ï" [nndoc-article-begin-function G77731 (nndoc-search nndoc-article-begin) ((error))] 3])
#@43 Unquote quoted non-separators in digests.
(defalias 'nndoc-unquote-dashes #[nil "# É#  " [re-search-forward "^- -" nil t replace-match "-"] 4 (#$ . 13842)])
#@266 Add document DEFINITION to the list of nndoc document definitions.
If POSITION is nil or `last', the definition will be added
as the last checked definition, if t or `first', add as the
first definition, and if any other symbol, add after that
symbol in the alist.
(defalias 'nndoc-add-type #[(definition &optional position) "	@\n\n\" = \n	C=% =+ 	\nB\n\n>; \"	AB)" [delq definition nndoc-type-alist position last t first list error "No such position: %s"] 4 (#$ . 14018)])
(provide (quote nndoc))
