diff options
author | Roland McGrath <roland@gnu.org> | 1994-01-17 21:44:35 +0000 |
---|---|---|
committer | Roland McGrath <roland@gnu.org> | 1994-01-17 21:44:35 +0000 |
commit | 3686c139b7de56adf208d7f41b1eceffb8ea7ddf (patch) | |
tree | d73d47f875177a55c03c7b0be3a301a3afa36aa3 /lisp/play | |
parent | 433afed55e73b4d5dc0e0ecbbafb5f94bf26a758 (diff) | |
download | emacs-3686c139b7de56adf208d7f41b1eceffb8ea7ddf.tar.gz |
(yow-file): Doc fix.
(yow): With non-nil arg (prefix arg), insert the chosen pinhead wisdom at
point. Use (interactive-p) instead of arg to decide if interactive.
(insert-zippyism): Yow! Am I INSERTED yet?
Diffstat (limited to 'lisp/play')
-rw-r--r-- | lisp/play/yow.el | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/lisp/play/yow.el b/lisp/play/yow.el index d25c6910e69..c3c663bffe5 100644 --- a/lisp/play/yow.el +++ b/lisp/play/yow.el @@ -1,6 +1,6 @@ ;;; yow.el --- quote random zippyisms -;; Copyright (C) 1993 Free Software Foundation, Inc. +;; Copyright (C) 1993, 1994 Free Software Foundation, Inc. ;; Maintainer: FSF ;; Keywords: games @@ -34,15 +34,17 @@ (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*")) @@ -58,6 +60,12 @@ If optional second arg is non-nil, require input to match a completion." (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)) ; Yowza!! Feed zippy quotes to the doctor. Watch results. ; fun, fun, fun. Entertainment for hours... |