home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-dist / emacs-19.28-src.tgz / tar.out / fsf / emacs / lisp / meese.el < prev    next >
Lisp/Scheme  |  1996-09-28  |  871b  |  28 lines

  1. ;;; meese.el --- protect the impressionable young minds of America
  2.  
  3. ;; This is in the public domain on account of being distributed since
  4. ;; 1985 or 1986 without a copyright notice.
  5.  
  6. ;; Maintainer: FSF
  7. ;; Keywords: games
  8.  
  9. ;;; Code:
  10.  
  11. (defun protect-innocence-hook ()
  12.   (let ((dir (file-name-directory buffer-file-name)))
  13.     (if (and (equal buffer-file-name (expand-file-name "sex.6" dir))
  14.          (file-exists-p buffer-file-name)
  15.          (not (y-or-n-p "Are you over 18? ")))
  16.     (progn
  17.       (clear-visited-file-modtime)
  18.       (setq buffer-file-name (expand-file-name "celibacy.1" dir))
  19.       (let ((inhibit-read-only t))    ; otherwise (erase-buffer) may bomb.
  20.         (erase-buffer)
  21.         (insert-file-contents buffer-file-name t))
  22.       (rename-buffer (file-name-nondirectory buffer-file-name))))))
  23.  
  24. (add-hook 'find-file-hooks 'protect-innocence-hook)
  25. (provide 'meese)
  26.  
  27. ;;; meese.el ends here
  28.