;ELC   
;;; Compiled by rms@psilocin.gnu.org on Tue Feb 17 03:23:44 1998
;;; from file /gd/gnu/emacs/lisp/play/cookie1.el
;;; in Emacs version 20.2.87.5
;;; with bytecomp version 2.38
;;; with all optimizations.
;;; This file uses opcodes which do not exist in Emacs 18.

(if (and (boundp 'emacs-version)
	 (< (aref emacs-version (1- (length emacs-version))) ?A)
	 (or (and (boundp 'epoch::version) epoch::version)
	     (string-lessp emacs-version "19.29")))
    (error "`cookie1.el' was compiled for Emacs 19.29 or later"))


(random t)
#@49 Delimiter used to separate cookie file entries.
(defconst cookie-delimiter "\n%%\n\\|\n%\n\\| " (#$ . 545))
#@55 Cache of cookie files that have already been snarfed.
(defvar cookie-cache (make-vector 511 0) (#$ . 659))
#@130 Return a random phrase from PHRASE-FILE.  When the phrase file
is read in, display STARTMSG at beginning of load, ENDMSG at end.
(defalias 'cookie #[(phrase-file startmsg endmsg) "\304	\n#\305!\210\306H)\207" [phrase-file startmsg endmsg cookie-vector cookie-snarf shuffle-vector 1] 4 (#$ . 773)])
#@144 Insert random phrases from PHRASE-FILE; COUNT of them.  When the phrase file
is read in, display STARTMSG at beginning of load, ENDMSG at end.
(defalias 'cookie-insert #[(phrase-file &optional count startmsg endmsg) "\306	\n#\307!\210`\310c\210\311GS\206 \312^\"\210\310c\210\313\f`\314#*\207" [phrase-file startmsg endmsg cookie-vector start count cookie-snarf shuffle-vector 10 cookie1 1 fill-region-as-paragraph nil] 4 (#$ . 1082)])
#@36 Inserts a cookie phrase ARG times.
(defalias 'cookie1 #[(arg cookie-vec) "\302U\203 \303\207	Hc\210\304c\210\305S	\"\207" [arg cookie-vec 0 t " " cookie1] 3 (#$ . 1532)])
#@188 Reads in the PHRASE-FILE, returns it as a vector of strings.
Emit STARTMSG and ENDMSG before and after.  Caches the result; second
and subsequent calls on the same file won't go to disk.
(defalias 'cookie-snarf #[(phrase-file startmsg endmsg) "\306	\"\211\203 \nK\307\310!8\232\204 \311\312P!\203 \313\n\203' \nJ\202{ \314	\"\315\316\"\210\212\317\320!\313\211q\210\n\307\310!8M\210\321\322!!\210\323!\210\324\313w\210m\204j `\323!\210\325\224{\fB)\202N \326!\210\315\316\"\210\n\327\330\f\"L+)\207" [phrase-file cookie-cache sym startmsg result buf intern-soft 5 file-attributes yes-or-no-p " has changed.  Read new contents? " nil intern message "%s" generate-new-buffer "*cookie*" insert-file-contents expand-file-name re-search-forward " 	\n\f" 0 kill-buffer apply vector cookie-delimiter beg endmsg] 5 (#$ . 1714)])
#@198 Prompt with PROMPT and read with completion among cookies in PHRASE-FILE.
STARTMSG and ENDMSG are passed along to `cookie-snarf'.
Optional fifth arg REQUIRE-MATCH non-nil forces a matching cookie.
(defalias 'read-cookie #[(prompt phrase-file startmsg endmsg &optional require-match) "\306	\"\204 \307\n#\210\310\f\311	\"\211\312N\206H \313\307\n#\211GS\211\314V\203A HCB\202( \315\312#+)\313\313\211&\207" [phrase-file cookie-cache startmsg endmsg prompt sym intern-soft cookie-snarf completing-read intern completion-alist nil 0 put alist vec i require-match] 8 (#$ . 2570)])
#@75 Randomly permute the elements of VECTOR (all permutations equally likely)
(defalias 'shuffle-vector #[(vector) "\305\306\211G\211	W\203. \f\307	\fZ!\\\fH\fHI\210\nI\210\fT\211\202\n ,\207" [vector len temp j i 0 nil random] 5 (#$ . 3185)])
(provide 'cookie1)
