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 ;; This file is part of GNU Emacs.
8 ;; Maintainer: emacs-devel@gnu.org
10 ;; Obsolete-since: 24.4
14 ;; Adds a hook to protect the impressionable young minds of America
15 ;; from reading certain files in the Emacs distribution using Emacs.
17 ;; This file is named after Ed Meese, the US Attorney General
18 ;; under President Reagan, because of his support for censorship.
22 (defun protect-innocence-hook ()
23 (let ((dir (file-name-directory buffer-file-name
)))
24 (if (and (equal buffer-file-name
(expand-file-name "sex.6" dir
))
25 (file-exists-p buffer-file-name
)
26 (not (y-or-n-p "Are you over 18? ")))
28 (clear-visited-file-modtime)
29 (setq buffer-file-name
(expand-file-name "celibacy.1" dir
))
30 (let ((inhibit-read-only t
)) ; otherwise (erase-buffer) may bomb.
32 (insert-file-contents buffer-file-name t
))
33 (rename-buffer (file-name-nondirectory buffer-file-name
))))))
35 ;;;(add-hook 'find-file-hook 'protect-innocence-hook)
38 ;;; meese.el ends here