*** empty log message ***
[emacs.git] / lisp / play / meese.el
blob5bbe3b1a07b894ce9c7761aa72a89cdc5cc36480
1 ;; meese.el --- protect the impressionable young minds of America...NOT!
3 (defun protect-innocence-hook ()
4 (if (and (equal (file-name-nondirectory buffer-file-name) "sex.6")
5 (not (y-or-n-p "Are you over 18? ")))
6 (progn
7 (clear-visited-file-modtime)
8 (setq buffer-file-name (concat (file-name-directory buffer-file-name)
9 "celibacy.1"))
10 (let (buffer-read-only) ; otherwise (erase-buffer) may bomb.
11 (erase-buffer)
12 (insert-file-contents buffer-file-name t))
13 (rename-buffer (file-name-nondirectory buffer-file-name)))))
15 (or (memq 'protect-innocence-hook find-file-hooks)
16 (setq find-file-hooks (cons 'protect-innocence-hook find-file-hooks)))
18 ;;; meese.el ends here