Mercurial > hg > xemacs-beta
comparison lisp/utils/meese.el @ 0:376386a54a3c r19-14
Import from CVS: tag r19-14
author | cvs |
---|---|
date | Mon, 13 Aug 2007 08:45:50 +0200 |
parents | |
children | ac2d302a0011 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:376386a54a3c |
---|---|
1 ;;; meese.el --- protect the impressionable young minds of America | |
2 | |
3 ;;; Synched up with: FSF 19.30. | |
4 | |
5 ;; This is in the public domain on account of being distributed since | |
6 ;; 1985 or 1986 without a copyright notice. | |
7 | |
8 ;; Maintainer: FSF | |
9 ;; Keywords: games | |
10 | |
11 ;;; Code: | |
12 | |
13 (defun protect-innocence-hook () | |
14 (let ((dir (file-name-directory buffer-file-name))) | |
15 (if (and (equal buffer-file-name (expand-file-name "sex.6" dir)) | |
16 (file-exists-p buffer-file-name) | |
17 (not (y-or-n-p "Are you over 18? "))) | |
18 (progn | |
19 (clear-visited-file-modtime) | |
20 (setq buffer-file-name (expand-file-name "celibacy.1" dir)) | |
21 (let ((inhibit-read-only t)) ; otherwise (erase-buffer) may bomb. | |
22 (erase-buffer) | |
23 (insert-file-contents buffer-file-name t)) | |
24 (rename-buffer (file-name-nondirectory buffer-file-name)))))) | |
25 | |
26 (add-hook 'find-file-hooks 'protect-innocence-hook) | |
27 (provide 'meese) | |
28 | |
29 ;;; meese.el ends here |