;;; compiled by rms@wookumz.gnu.ai.mit.edu on Tue Jun  1 04:26:54 1993
;;; from file /gd/gnu/emacs/19.0/lisp/cookie1.el
;;; emacs version 19.10.3.
;;; bytecomp version FSF 2.08
;;; optimization is on.

(random t)
(defconst cookie-delimiter "\n%%\n\\| " "\
Delimiter used to separate cookie file entries.")
(defalias 'cookie #[(phrase-file startmsg endmsg) "À	\n#Å!ˆÆH)‡" [cookie-snarf phrase-file startmsg endmsg cookie-vector shuffle-vector 1] 4 "\
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-insert #[(phrase-file &optional count startmsg endmsg) "À	\n#Å!ˆ`ÇcˆÈGÉZ\n† É^\"ˆÇcˆË`Ì#*‡" [cookie-snarf phrase-file startmsg endmsg cookie-vector shuffle-vector start 10 cookie1 1 count fill-region-as-paragraph nil] 4 "\
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 'cookie1 #[(arg cookie-vec) "ÁUƒ Â‡HcˆÄcˆÅS\"‡" [arg 0 t cookie-vec " " cookie1] 3 "\
Inserts a cookie phrase ARG times."])
(defalias 'cookie-snarf #[(phrase-file startmsg endmsg) "ÀÁ\n!!ƒ ÃÁ\n!!‡Ä!ˆŠÆÇ!È	‰\nqˆËÌ\n!!ˆÍ!ˆÏÐ!ˆm„H `Í!ˆÒ`S\"	B	)‚) Ó\n!ˆÄ!ˆÁ\n!ÕÖ	\"L+‡" [boundp intern phrase-file eval message startmsg generate-new-buffer "*cookie*" nil result buf insert-file-contents expand-file-name re-search-forward cookie-delimiter skip-chars-forward " 	\n" beg buffer-substring kill-buffer endmsg apply vector] 5 "\
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 'pick-random #[(n) "ÀÁÂ Ã\"\"‡" [% logand random 777777 n] 4 "\
Returns a random number from 0 to N-1 inclusive."])
(defalias 'shuffle-vector #[(vector) "ÀÁ‰\nG‰Wƒ5 ÇZ!\\\nH\n\nHIˆ\nIˆT‰‚ ,\n‡" [0 nil vector len temp j i pick-random] 5 "\
Randomly permute the elements of VECTOR (all permutations equally likely)"])
(provide (quote cookie1))
