;;; yow.el --- quote random zippyisms
-;; Copyright (C) 1993 Free Software Foundation, Inc.
+;; Copyright (C) 1993, 1994 Free Software Foundation, Inc.
;; Maintainer: FSF
;; Keywords: games
(require 'cookie1)
(defvar yow-file (concat data-directory "yow.lines")
- "Pertinent pinhead phrases.")
+ "File containing pertinent pinhead phrases.")
;;;###autoload
-(defun yow (&optional interactive)
- "Return or display a random Zippy quotation."
- (interactive "p")
- (let ((yow (cookie
- yow-file "Am I CONSING yet?..." "I have SEEN the CONSING!!")))
- (cond ((not interactive)
+(defun yow (&optional insert)
+ "Return or display a random Zippy quotation. With prefix arg, insert it."
+ (interactive "P")
+ (let ((yow (cookie yow-file
+ "Am I CONSING yet?..." "I have SEEN the CONSING!!")))
+ (cond (insert
+ (insert yow))
+ ((not (interactive-p))
yow)
((not (string-match "\n" yow))
(delete-windows-on (get-buffer-create "*Help*"))
(read-cookie prompt yow-file
"Am I CONSING yet?..." "I have SEEN the CONSING!!"
require-match))
+
+;;;###autoload
+(defun insert-zippyism (&optional zippyism)
+ "Prompt with completion for a known Zippy quotation, and insert it at point."
+ (interactive (list (read-zippyism "Pinhead wisdom: " t)))
+ (insert zippyism))
\f
; Yowza!! Feed zippy quotes to the doctor. Watch results.
; fun, fun, fun. Entertainment for hours...