annotate 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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1 ;;; meese.el --- protect the impressionable young minds of America
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3 ;;; Synched up with: FSF 19.30.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
5 ;; This is in the public domain on account of being distributed since
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
6 ;; 1985 or 1986 without a copyright notice.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
7
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
8 ;; Maintainer: FSF
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
9 ;; Keywords: games
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
10
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
11 ;;; Code:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
12
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
13 (defun protect-innocence-hook ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
14 (let ((dir (file-name-directory buffer-file-name)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
15 (if (and (equal buffer-file-name (expand-file-name "sex.6" dir))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
16 (file-exists-p buffer-file-name)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
17 (not (y-or-n-p "Are you over 18? ")))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
18 (progn
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
19 (clear-visited-file-modtime)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
20 (setq buffer-file-name (expand-file-name "celibacy.1" dir))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
21 (let ((inhibit-read-only t)) ; otherwise (erase-buffer) may bomb.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
22 (erase-buffer)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
23 (insert-file-contents buffer-file-name t))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
24 (rename-buffer (file-name-nondirectory buffer-file-name))))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
25
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
26 (add-hook 'find-file-hooks 'protect-innocence-hook)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
27 (provide 'meese)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
28
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
29 ;;; meese.el ends here