Add standard library headers.
[bpt/emacs.git] / lisp / play / meese.el
CommitLineData
84176303 1;; meese.el --- protect the impressionable young minds of America
ee3b8d4d
RS
2;; This is in the public domain on account of being distributed since
3;; 1985 or 1986 without a copyright notice.
84176303
ER
4
5;; Maintainer: FSF
fd7fa35a 6;; Keywords: games
6594deb0 7
3a801d0c
ER
8;;; Code:
9
3d72126b
JB
10(defun protect-innocence-hook ()
11 (if (and (equal (file-name-nondirectory buffer-file-name) "sex.6")
12 (not (y-or-n-p "Are you over 18? ")))
13 (progn
14 (clear-visited-file-modtime)
15 (setq buffer-file-name (concat (file-name-directory buffer-file-name)
16 "celibacy.1"))
17 (let (buffer-read-only) ; otherwise (erase-buffer) may bomb.
18 (erase-buffer)
19 (insert-file-contents buffer-file-name t))
20 (rename-buffer (file-name-nondirectory buffer-file-name)))))
21
22(or (memq 'protect-innocence-hook find-file-hooks)
23 (setq find-file-hooks (cons 'protect-innocence-hook find-file-hooks)))
6594deb0
ER
24
25;;; meese.el ends here