*** empty log message ***
[emacs.git] / lisp / play / meese.el
blobf62ce3c702a03cd7bce153c64de85800dcfb1a04
1 ;;; meese.el --- protect the impressionable young minds of America
3 ;; This is in the public domain on account of being distributed since
4 ;; 1985 or 1986 without a copyright notice.
6 ;; Maintainer: FSF
7 ;; Keywords: games
9 ;;; Commentary:
11 ;; Adds a hook to protect the impressionable young minds of America
12 ;; from reading certain files in the Emacs distribution using Emacs.
14 ;; This file is named after Ed Meese, the US Attorney General
15 ;; under President Reagan, because of his support for censorship.
17 ;;; Code:
19 (defun protect-innocence-hook ()
20 (let ((dir (file-name-directory buffer-file-name)))
21 (if (and (equal buffer-file-name (expand-file-name "sex.6" dir))
22 (file-exists-p buffer-file-name)
23 (not (y-or-n-p "Are you over 18? ")))
24 (progn
25 (clear-visited-file-modtime)
26 (setq buffer-file-name (expand-file-name "celibacy.1" dir))
27 (let ((inhibit-read-only t)) ; otherwise (erase-buffer) may bomb.
28 (erase-buffer)
29 (insert-file-contents buffer-file-name t))
30 (rename-buffer (file-name-nondirectory buffer-file-name))))))
32 (add-hook 'find-file-hooks 'protect-innocence-hook)
33 (provide 'meese)
35 ;;; meese.el ends here