2233
|
1 ;;; meese.el --- protect the impressionable young minds of America
|
|
2
|
896
|
3 ;; This is in the public domain on account of being distributed since
|
|
4 ;; 1985 or 1986 without a copyright notice.
|
791
|
5
|
38412
|
6 ;; This file is part of GNU Emacs.
|
|
7
|
791
|
8 ;; Maintainer: FSF
|
811
|
9 ;; Keywords: games
|
659
|
10
|
30497
|
11 ;;; Commentary:
|
|
12
|
|
13 ;; Adds a hook to protect the impressionable young minds of America
|
|
14 ;; from reading certain files in the Emacs distribution using Emacs.
|
|
15
|
|
16 ;; This file is named after Ed Meese, the US Attorney General
|
|
17 ;; under President Reagan, because of his support for censorship.
|
|
18
|
846
|
19 ;;; Code:
|
|
20
|
14
|
21 (defun protect-innocence-hook ()
|
8126
|
22 (let ((dir (file-name-directory buffer-file-name)))
|
|
23 (if (and (equal buffer-file-name (expand-file-name "sex.6" dir))
|
|
24 (file-exists-p buffer-file-name)
|
|
25 (not (y-or-n-p "Are you over 18? ")))
|
|
26 (progn
|
|
27 (clear-visited-file-modtime)
|
|
28 (setq buffer-file-name (expand-file-name "celibacy.1" dir))
|
|
29 (let ((inhibit-read-only t)) ; otherwise (erase-buffer) may bomb.
|
|
30 (erase-buffer)
|
|
31 (insert-file-contents buffer-file-name t))
|
|
32 (rename-buffer (file-name-nondirectory buffer-file-name))))))
|
14
|
33
|
46899
|
34 (add-hook 'find-file-hook 'protect-innocence-hook)
|
8126
|
35 (provide 'meese)
|
659
|
36
|
52401
|
37 ;;; arch-tag: 47af12d2-6a7d-4e2e-a1ea-eae75a77e3f0
|
659
|
38 ;;; meese.el ends here
|