Commit | Line | Data |
---|---|---|
84176303 ER |
1 | ;; meese.el --- protect the impressionable young minds of America |
2 | ||
3 | ;; Maintainer: FSF | |
4 | ;; Last-Modified: 20 May 1988 | |
fd7fa35a | 5 | ;; Keywords: games |
6594deb0 | 6 | |
3d72126b JB |
7 | (defun protect-innocence-hook () |
8 | (if (and (equal (file-name-nondirectory buffer-file-name) "sex.6") | |
9 | (not (y-or-n-p "Are you over 18? "))) | |
10 | (progn | |
11 | (clear-visited-file-modtime) | |
12 | (setq buffer-file-name (concat (file-name-directory buffer-file-name) | |
13 | "celibacy.1")) | |
14 | (let (buffer-read-only) ; otherwise (erase-buffer) may bomb. | |
15 | (erase-buffer) | |
16 | (insert-file-contents buffer-file-name t)) | |
17 | (rename-buffer (file-name-nondirectory buffer-file-name))))) | |
18 | ||
19 | (or (memq 'protect-innocence-hook find-file-hooks) | |
20 | (setq find-file-hooks (cons 'protect-innocence-hook find-file-hooks))) | |
6594deb0 ER |
21 | |
22 | ;;; meese.el ends here |