;ELC   
;;; compiled by amu@tux.mit.edu on Sun Nov 15 14:42:20 1998
;;; from file /afs/sipb.mit.edu/contrib/emacs/packages/gnus-5.6.44/lisp/gnus-soup.el
;;; emacs version 19.34.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 "`gnus-soup.el' was compiled for Emacs 19.29 or later"))


(byte-code "!!!!!" [require gnus gnus-art message gnus-start gnus-range] 2)
#@48 *Directory containing an unpacked SOUP packet.
(defvar gnus-soup-directory (nnheader-concat gnus-home-directory "SoupBrew/") (#$ . -591))
#@54 *Directory where Gnus will do processing of replies.
(defvar gnus-soup-replies-directory (nnheader-concat gnus-soup-directory "SoupReplies/") (#$ . -735))
#@59 *Name of the file where Gnus stores the last used prefix.
(defvar gnus-soup-prefix-file "gnus-prefix" (#$ . -896))
#@206 Format string command for packing a SOUP packet.
The SOUP files will be inserted where the %s is in the string.
This string MUST contain both %s and %d.  The file number will be
inserted where %d appears.
(defvar gnus-soup-packer "tar cf - %s | gzip > $HOME/Soupout%d.tgz" (#$ . 1018))
#@107 *Format string command for unpacking a SOUP packet.
The SOUP packet file name will be inserted at the %s.
(defvar gnus-soup-unpacker "gunzip -c %s | tar xvf -" (#$ . -1311))
#@49 *Where gnus-soup will look for REPLIES packets.
(defvar gnus-soup-packet-directory gnus-home-directory (#$ . -1491))
#@84 *Regular expression matching SOUP REPLIES packets in `gnus-soup-packet-directory'.
(defvar gnus-soup-packet-regexp "Soupin" (#$ . -1614))
#@67 *Regexp to match headers to be removed when brewing SOUP packets.
(defvar gnus-soup-ignored-headers "^Xref:" (#$ . -1758))
#@99 *Soup encoding type.
`n' is news format, `m' is Unix mbox format, and `M' is MMDF mailbox
format.
(defvar gnus-soup-encoding-type 110 (#$ . -1887))
#@89 *Soup index type.
`n' means no index file and `c' means standard Cnews overview
format.
(defvar gnus-soup-index-type 99 (#$ . -2041))
(byte-code "! B! B!  B!- B" [boundp gnus-soup-areas nil current-load-list gnus-soup-last-prefix gnus-soup-prev-prefix gnus-soup-buffers] 2)
(defalias 'gnus-soup-area-prefix '(macro . #[(area) "	BB" [aref area (0)] 3]))
(defalias 'gnus-soup-set-area-prefix '(macro . #[(area prefix) "	F" [aset area 0 prefix] 4]))
(defalias 'gnus-soup-area-name '(macro . #[(area) "	BB" [aref area (1)] 3]))
(defalias 'gnus-soup-area-encoding '(macro . #[(area) "	BB" [aref area (2)] 3]))
(defalias 'gnus-soup-area-description '(macro . #[(area) "	BB" [aref area (3)] 3]))
(defalias 'gnus-soup-area-number '(macro . #[(area) "	BB" [aref area (4)] 3]))
(defalias 'gnus-soup-area-set-number '(macro . #[(area value) "	F" [aset area 4 value] 4]))
(defalias 'gnus-soup-encoding-format '(macro . #[(encoding) "	BB" [aref encoding (0)] 3]))
(defalias 'gnus-soup-encoding-index '(macro . #[(encoding) "	BB" [aref encoding (1)] 3]))
(defalias 'gnus-soup-encoding-kind '(macro . #[(encoding) "	BB" [aref encoding (2)] 3]))
(defalias 'gnus-soup-reply-prefix '(macro . #[(reply) "	BB" [aref reply (0)] 3]))
(defalias 'gnus-soup-reply-kind '(macro . #[(reply) "	BB" [aref reply (1)] 3]))
(defalias 'gnus-soup-reply-encoding '(macro . #[(reply) "	BB" [aref reply (2)] 3]))
#@50 Unpack and send all replies in the reply packet.
(defalias 'gnus-soup-send-replies #[nil "	# \f@! \f@!\fA\n )" [directory-files gnus-soup-packet-directory t gnus-soup-packet-regexp packets gnus-soup-send-packet delete-file nil] 5 (#$ . 3501) nil])
#@247 Add the current article to SOUP packet.
If N is a positive number, add the N next articles.
If N is a negative number, add the N previous articles.
If N is nil and any articles have been marked with the process mark,
move those articles instead.
(defalias 'gnus-soup-add-article #[(n) "	!!!H\n\f!\ny q\n@8\fb q\n@\"b  \")\n\f%H_ TIq\n@!\n@\"\nA !) !-" [gnus-summary-work-articles n articles gnus-get-buffer-create "*soup work*" tmp-buf gnus-soup-area gnus-newsgroup-name area 0 prefix nil headers buffer-disable-undo gnus-summary-buffer 3 gnus-newsgroup-data gnus-request-article-this-buffer message-narrow-to-head message-remove-header gnus-soup-ignored-headers t gnus-soup-store gnus-soup-directory gnus-soup-encoding-type gnus-soup-index-type 4 gnus-summary-remove-process-mark gnus-summary-mark-as-read gnus-souped-mark kill-buffer gnus-soup-save-areas gnus-set-mode-line summary] 7 (#$ . 3773) "P"])
#@41 Make a SOUP packet from the SOUP areas.
(defalias 'gnus-soup-pack-packet #[nil " \n! \n\"\n# !\n\n\"" [gnus-soup-read-areas file-exists-p gnus-soup-directory message "No such directory: %s" directory-files nil "\\.MSG$" "No files to pack." gnus-soup-pack gnus-soup-packer] 4 (#$ . 4768) nil])
#@80 Make a soup packet from the current group.
Uses the process/prefix convention.
(defalias 'gnus-group-brew-soup #[(n) "	! \n@!\n@\"\nA  )" [gnus-group-process-prefix n groups gnus-group-remove-mark gnus-soup-group-brew t gnus-soup-save-areas] 4 (#$ . 5086) "P"])
#@64 Go through all groups on LEVEL or less and make a soup packet.
(defalias 'gnus-brew-soup #[(&optional level) " 	\nA$ @A@X @@\"A  *" [level gnus-level-subscribed gnus-newsrc-alist newsrc gnus-soup-group-brew t gnus-soup-save-areas] 4 (#$ . 5370) "P"])
#@402 Brew a SOUP packet from groups mention on the command line.
Will use the remaining command line arguments as regular expressions
for matching on group names.

For instance, if you want to brew on all the nnml groups, as well as
groups with "emacs" in the name, you could say something like:

$ emacs -batch -f gnus-batch-brew-soup ^nnml ".*emacs.*"

Note -- this function hasn't been implemented yet.
(defalias 'gnus-batch-brew-soup #[nil "" [nil] 1 (#$ . 5650) nil])
(defalias 'gnus-soup-store #[(directory prefix headers format index) "	!	Q!U? 	Q!	p\n\f\"B!	H 	B	!dbiUU ceb!h !h !!\febU}  \" U # # \f  ԰ U 邵 \"qdbc`\n!U 	q/\" U \"." [gnus-make-directory directory nnheader-find-file-noselect prefix ".MSG" msg-buf index 110 ".IDX" idx-buf article-buf nil from head-line beg type delq gnus-soup-buffers buffer-disable-undo 0 "\n" gnus-mail-strip-quoted-names mail-fetch-field "from" "really-from" "sender" gnus-soup-encoding-type format "#! rnews %d\n" buffer-size 109 search-forward "\nFrom " t replace-match "\n>From " "From " "unknown" " " current-time-string 77 "\n" error "Unsupported type: %c" insert-buffer-substring 99 gnus-soup-insert-idx headers "Unknown index type: %c"] 5])
#@93 Enter GROUP and add all articles to a SOUP package.
If NOT-ALL, don't pack ticked articles.
(defalias 'gnus-soup-group-brew #[(group &optional not-all) "\f\"J6 @=6 @# @V6 	?X 88A!X #X 	M \"O !! +" [t nil intern-soft group gnus-newsrc-hashtb entry gnus-large-newsgroup gnus-expert-user 0 not-all gnus-range-length tick 3 2 gnus-summary-read-group reverse append gnus-newsgroup-marked gnus-newsgroup-unreads gnus-newsgroup-processable gnus-soup-add-article gnus-summary-exit] 5 (#$ . 7003)])
(defalias 'gnus-soup-insert-idx #[(offset header) "db\nH H H H)  #PH0 H7 H> &	c" [format "%d	%s	%s	%s	%s	%s	%d	%s		\n" offset header 1 "(none)" 2 "(nobody)" 3 "" 4 "soup-dummy-id-" mapconcat #[(time) "	!" [int-to-string time] 2] current-time "-" 5 6 0 7 "0"] 11])
#@25 Write all SOUP buffers.
(defalias 'gnus-soup-save-areas #[nil " ( @A\n! \nq !  p! ) )" [gnus-soup-write-areas nil buf gnus-soup-buffers buffer-name buffer-modified-p save-buffer kill-buffer gnus-soup-write-prefixes] 2 (#$ . 7855) nil])
(defalias 'gnus-soup-write-prefixes #[nil " A@'  \nA\"c\n@	P! +" [gnus-soup-last-prefix nil prefix prefixes gnus-set-work-buffer erase-buffer format "(setq gnus-soup-prev-prefix %d)\n" gnus-write-buffer gnus-soup-prefix-file] 3])
(defalias 'gnus-soup-pack #[(dir packer) "#\"\"W\" \f\f!!#- \f!!\f#\f!\f\f!#ω\fR&Ut ω\f\fR&#w !+" [mapconcat identity ("AREAS" "*.MSG" "*.IDX" "INFO" "LIST" "REPLIES" "COMMANDS" "ERRORS") " " files string-match "%s" packer "%d" format string-to-int gnus-soup-unique-prefix dir expand-file-name gnus-make-directory nil gnus-soup-areas gnus-message 4 "Packing %s..." call-process shell-file-name shell-command-switch "cd " " ; " 0 " ; rm " "Packing...done" error "Couldn't pack packet"] 10])
#@231 Parse soup area file FILE.
The result is a of vectors, each containing one entry from the AREA file.
The vector contain five strings,
  [prefix name encoding description number]
though the two last may be nil if they are missing.
(defalias 'gnus-soup-parse-areas #[(file) "!H \"qp!ebmC    h=)  h=3  !%	Bh= y p!)	)" [nil areas file-exists-p file nnheader-find-file-noselect force buffer-disable-undo vector gnus-soup-field 9 string-to-int 1 kill-buffer] 7 (#$ . 8947)])
#@167 Parse soup REPLIES file FILE.
The result is a of vectors, each containing one entry from the REPLIES
file.  The vector contain three strings, [prefix name encoding].
(defalias 'gnus-soup-parse-replies #[(file) "!qp!ebm*    #	Bh= y p!)	)" [nil replies nnheader-find-file-noselect file buffer-disable-undo vector gnus-soup-field 9 1 kill-buffer] 4 (#$ . 9459)])
(defalias 'gnus-soup-field #[nil "`w`{u" ["^	\n" nil 1] 3])
(defalias 'gnus-soup-read-areas #[nil " \nP!" [gnus-soup-areas gnus-soup-parse-areas gnus-soup-directory "AREAS"] 3])
#@23 Write the AREAS file.
(defalias 'gnus-soup-write-areas #[nil " 	P!!q	̎A@n HHHHG Hg HP Hb H!Pc Qh %c *z  = 	q  	q!! !\"ed%." [gnus-soup-areas gnus-soup-directory "AREAS" temp-file fundamental-mode default-major-mode get-buffer-create generate-new-buffer-name " *nnheader temp*" temp-buffer nil temp-results ((byte-code "	!\n 	!" [buffer-name temp-buffer kill-buffer] 2)) area areas format "%s	%s	%s%s\n" 0 1 2 3 4 "	" "" int-to-string t buffer-string file-directory-p file-name-directory make-directory write-region nomesg] 11 (#$ . 10042) nil])
#@47 Write a REPLIES file in DIR containing AREAS.
(defalias 'gnus-soup-write-replies #[(dir areas) "P!!q\nˎ\fA@\f8 \fH\fH\fH$c )\n\nD \np \n=S q p q\n!!f \n!\"ed\n%\n." [dir "REPLIES" temp-file fundamental-mode default-major-mode get-buffer-create generate-new-buffer-name " *nnheader temp*" temp-buffer nil temp-results ((byte-code "	!\n 	!" [buffer-name temp-buffer kill-buffer] 2)) area areas format "%s	%s	%s\n" 0 1 2 t buffer-string file-directory-p file-name-directory make-directory write-region nomesg] 6 (#$ . 10709)])
(defalias 'gnus-soup-area #[(group) " 	\n\" ƕO )ǉ	\nA @	A	H\n! 	! g  \n\n\"\\ Ղ] $ǉ%	B," [gnus-soup-read-areas gnus-soup-areas group gname string-match "^[^:]+:" 0 nil result area real-group areas 1 vector gnus-soup-unique-prefix format "%c%c%c" gnus-soup-encoding-type gnus-soup-index-type gnus-member-of-valid mail 109 110] 11])
(defalias 'gnus-soup-unique-prefix #[(&optional dir) "	 \n!	\f\"/ 		P!\" ̏	) B\fBAT A!+" [file-name-as-directory dir gnus-soup-directory assoc gnus-soup-last-prefix entry nil gnus-soup-prev-prefix file-exists-p gnus-soup-prefix-file G99179 (byte-code "	\nPĉ$" [load dir gnus-soup-prefix-file nil t] 5) ((error)) 0 gnus-soup-write-prefixes int-to-string] 3])
#@85 Unpack PACKET into DIR using UNPACKER.
Return whether the unpacking was successful.
(defalias 'gnus-soup-unpack-packet #[(dir unpacker packet) "	!\"#	ʉ	!\"#&U\"" [gnus-make-directory dir gnus-message 4 "Unpacking: %s" format unpacker packet call-process shell-file-name nil shell-command-switch "cd %s ; %s" expand-file-name 0 "Unpacking...done"] 12 (#$ . 12100)])
(defalias 'gnus-soup-send-packet #[(packet) "	\n#	P!	@HQ		!( 	!\f!@HHUH ! \f \f!\fqebm !g !y``۔ە{!\\! \f#eb!u#c %&@H瘃 !#!/0 ) @H !#!  !\fqbY  !\f!!\"-A *" [gnus-soup-unpack-packet gnus-soup-replies-directory gnus-soup-unpacker packet gnus-soup-parse-replies "REPLIES" replies 0 ".MSG" msg-file file-exists-p nnheader-find-file-noselect msg-buf gnus-get-buffer-create " *soup send*" tmp-buf nil beg end 2 110 error "Unsupported encoding" buffer-disable-undo looking-at "#! *rnews +\\([0-9]+\\)" "Bad header" 1 string-to-int switch-to-buffer erase-buffer insert-buffer-substring search-forward "\n\n" -1 mail-header-separator gnus-extended-version message-mailer message-newsreader "news" gnus-message 5 "Sending news message to %s..." mail-fetch-field "newsgroups" sit-for dont-check-for-anything-just-trust-me message-syntax-checks message-send-news-function "mail" "Sending mail to %s..." "to" message-send-mail "Unknown reply kind" delete-file buffer-file-name kill-buffer 4 "Sent packet" t] 6])
(provide (quote gnus-soup))
