view lisp/play/meese.el @ 110763:0fe64d68a522

Merge changes made in Gnus trunk. shr.el: Implement table rendering. shr.el (shr-make-table): Tweak table generation. shr.el (shr-make-table): Fix typo. nnimap.el (nnimap-open-connection): Allow tls as a synonym for ssl. gnus-util.el (gnus-emacs-completing-read): Mapcar collection to list, for XEmacs. nnimap.el (nnimap-close-server): Implement. gnus-salt.el: Remove all gnus-carpal stuff -- it's not useful. nnir.el (nnir-run-imap): Remove spurious space in search string. message.el (message-idna-to-ascii-rhs-1): Don't bug out on addresses without @ signs. gnus-sum.el (gnus-widen-article-window): New variable. shr.el (browse-url): Required. shr.el (shr-ensure-paragraph): Don't insert a new newline after empty-ish lines. shr.el (shr-show-alt-text, shr-browse-image): New commands. gravatar.el (gravatar-retrieved): kill buffer when retrieved. shr.el (shr-browse-url, shr-copy-url): New commands. shr.el (shr-render-td): Protect against too-wide text. spam-report.el (spam-report-url-ping-plain): Don't query about killing the process. nnimap.el (nnimap-finish-retrieve-group-infos): Message while waiting for data. shr.el (shr-tag-blockquote): Ensure paragraph after quote, too. mml-smime.el: Fix gnus-completing-read usage. shr.el (shr-get-image-data): Ensure against the cache file missing. nnimap.el (nnimap-open-connection): Give an error if nnimap-stream is unknown.
author Katsumi Yamaoka <yamaoka@jpl.org>
date Mon, 04 Oct 2010 22:26:51 +0000
parents 1e3a407766b9
children ef719132ddfa
line wrap: on
line source

;;; meese.el --- protect the impressionable young minds of America

;; This is in the public domain on account of being distributed since
;; 1985 or 1986 without a copyright notice.

;; This file is part of GNU Emacs.

;; Maintainer: FSF
;; Keywords: games

;;; Commentary:

;; Adds a hook to protect the impressionable young minds of America
;; from reading certain files in the Emacs distribution using Emacs.

;; This file is named after Ed Meese, the US Attorney General
;; under President Reagan, because of his support for censorship.

;;; Code:

(defun protect-innocence-hook ()
  (let ((dir (file-name-directory buffer-file-name)))
    (if (and (equal buffer-file-name (expand-file-name "sex.6" dir))
	     (file-exists-p buffer-file-name)
	     (not (y-or-n-p "Are you over 18? ")))
	(progn
	  (clear-visited-file-modtime)
	  (setq buffer-file-name (expand-file-name "celibacy.1" dir))
	  (let ((inhibit-read-only t))	; otherwise (erase-buffer) may bomb.
	    (erase-buffer)
	    (insert-file-contents buffer-file-name t))
	  (rename-buffer (file-name-nondirectory buffer-file-name))))))

(add-hook 'find-file-hook 'protect-innocence-hook)
(provide 'meese)

;; arch-tag: 47af12d2-6a7d-4e2e-a1ea-eae75a77e3f0
;;; meese.el ends here