diff options
| author | Karl Heuer | 1997-11-23 02:10:07 +0000 |
|---|---|---|
| committer | Karl Heuer | 1997-11-23 02:10:07 +0000 |
| commit | f83d2997fbf6b7b8287f34a89966f404bd095698 (patch) | |
| tree | 313f5b2abc9c70aa0ed892bd20fbae27690f0bd3 /lisp/play | |
| parent | 950444902e9db2eebe771951f474951e059d8f22 (diff) | |
| download | emacs-f83d2997fbf6b7b8287f34a89966f404bd095698.tar.gz emacs-f83d2997fbf6b7b8287f34a89966f404bd095698.zip | |
Initial revision
Diffstat (limited to 'lisp/play')
| -rw-r--r-- | lisp/play/bruce.el | 139 |
1 files changed, 139 insertions, 0 deletions
diff --git a/lisp/play/bruce.el b/lisp/play/bruce.el new file mode 100644 index 00000000000..46fa59bdec9 --- /dev/null +++ b/lisp/play/bruce.el | |||
| @@ -0,0 +1,139 @@ | |||
| 1 | ;;; bruce.el --- bruce phrase utility for overloading the Communications | ||
| 2 | ;;; Decency Act snoops, if any. | ||
| 3 | |||
| 4 | ;; Copyright (C) 1988, 1993, 1997 Free Software Foundation, Inc. | ||
| 5 | |||
| 6 | ;; Maintainer: FSF | ||
| 7 | ;; Keywords: games | ||
| 8 | ;; Created: Jan 1997 | ||
| 9 | |||
| 10 | ;; This file is part of GNU Emacs. | ||
| 11 | |||
| 12 | ;; GNU Emacs is free software; you can redistribute it and/or modify | ||
| 13 | ;; it under the terms of the GNU General Public License as published by | ||
| 14 | ;; the Free Software Foundation; either version 2, or (at your option) | ||
| 15 | ;; any later version. | ||
| 16 | |||
| 17 | ;; GNU Emacs is distributed in the hope that it will be useful, | ||
| 18 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 19 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 20 | ;; GNU General Public License for more details. | ||
| 21 | |||
| 22 | ;; You should have received a copy of the GNU General Public License | ||
| 23 | ;; along with GNU Emacs; see the file COPYING. If not, write to the | ||
| 24 | ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, | ||
| 25 | ;; Boston, MA 02111-1307, USA. | ||
| 26 | |||
| 27 | ;;; Commentary: | ||
| 28 | |||
| 29 | ;; This program was written to protest the miss-named "Communications | ||
| 30 | ;; Decency Act of 1996. This Act bans "indecent speech", whatever that is, | ||
| 31 | ;; from the internet. For more on the CDA, see Richard Stallman's essay on | ||
| 32 | ;; censorship, included in the etc directory of emacs distributions 19.34 | ||
| 33 | ;; and up. See also http://www.eff.org/blueribbon.html. | ||
| 34 | |||
| 35 | ;; For many years, emacs has included a program called Spook. This program | ||
| 36 | ;; adds a series of "keywords" to email just before it goes out. On the | ||
| 37 | ;; theory that the NSA monitors people's email, the keywords would be | ||
| 38 | ;; picked up by the NSA's snoop computers, causing them to waste time | ||
| 39 | ;; reading your meeting schedule notices or other email boring to everyone | ||
| 40 | ;; but you and (you hope) the recipient. See below (I left in the original | ||
| 41 | ;; writeup when I made this conversion), or the emacs documentation at | ||
| 42 | ;; ftp://prep.ai.mit.edu/pub/gnu/emacs-manual*. | ||
| 43 | |||
| 44 | ;; Bruce is a direct copy of spook, with the word "spook" replaced with | ||
| 45 | ;; the word "bruce". Thanks to "esr", whoever he, she or it may be, this | ||
| 46 | ;; conversion was an extremely easy piece of editing, suitable for a first | ||
| 47 | ;; essay at elisp programming. | ||
| 48 | |||
| 49 | ;; You may think of the name as having been derived from a certain Monty | ||
| 50 | ;; Python routine. Or from Lenny Bruce, who opposed censorship in his own | ||
| 51 | ;; inimitable way. Bruce does exactly what Spook does: it throws keywords | ||
| 52 | ;; into your email messages or other documents. | ||
| 53 | |||
| 54 | ;; However, in order to comply with the CDA as interpreted by Richard | ||
| 55 | ;; Stallman (see the essay on censorship), bruce is distributed without a | ||
| 56 | ;; data file from which to select words at random. Sorry about that. I | ||
| 57 | ;; believe the average user will be able to come up with a few words on | ||
| 58 | ;; his or her own. If that is a problem, feel free to ask any American | ||
| 59 | ;; teenager, preferrably one who attends a government school. Failing | ||
| 60 | ;; that, you might write to Mr. Clinton or Ms Reno or their successors and | ||
| 61 | ;; ask them for suggestions. Think of it as a public spirited act: the | ||
| 62 | ;; time they spend answering you is time not spent persecuting someone | ||
| 63 | ;; else. However, do ask them to respond by snail mail, where their | ||
| 64 | ;; suggestions would be legal. | ||
| 65 | |||
| 66 | ;; To build the data file, just start a file called bruce.lines in the etc | ||
| 67 | ;; directory of your emacs distribution. Note that each phrase or word has | ||
| 68 | ;; to be followed by an ascii 0, control-@. See the file spook.lines in | ||
| 69 | ;; the etc directory for an example. In emacs, use c-q c-@ to insert the | ||
| 70 | ;; ascii 0s. | ||
| 71 | |||
| 72 | ;; Once you have edited up a data file, you have to tell emacs how to find | ||
| 73 | ;; the program bruce. Add the follwing two lines to your .emacs file. Be | ||
| 74 | ;; sure to uncomment the second line. | ||
| 75 | |||
| 76 | ;; for bruce mode | ||
| 77 | ;; (autoload 'bruce "bruce" "Use the Bruce program to protest the CDA" t) | ||
| 78 | |||
| 79 | ;; Shut down emacs and fire it up again. Then "M-x bruce" should put some | ||
| 80 | ;; shocking words in the current buffer. | ||
| 81 | |||
| 82 | |||
| 83 | ;; Please note that I am not suggesting that you actually use this program | ||
| 84 | ;; to add "illegal" words to your email, or any other purpose. First, you | ||
| 85 | ;; don't really need a program to do it, and second, it would be illegal | ||
| 86 | ;; for me to suggest or advise that you actually break the law. This | ||
| 87 | ;; program was written as a demonstration only, and as an act of political | ||
| 88 | ;; protest and free expression protected by the First Amendment, or | ||
| 89 | ;; whatever is left of it. | ||
| 90 | |||
| 91 | |||
| 92 | ;; We now return to the original writeup for spook: | ||
| 93 | |||
| 94 | ;; Steve Strassmann <straz@media-lab.media.mit.edu> didn't write the | ||
| 95 | ;; program spook, from which this was adapted, and even if he did, he | ||
| 96 | ;; really didn't mean for you to use it in an anarchistic way. | ||
| 97 | ;; | ||
| 98 | ;; To use this: | ||
| 99 | ;; Just before sending mail, do M-x spook. | ||
| 100 | ;; A number of phrases will be inserted into your buffer, to help | ||
| 101 | ;; give your message that extra bit of attractiveness for automated | ||
| 102 | ;; keyword scanners. Help defeat the NSA trunk trawler! | ||
| 103 | |||
| 104 | ;;; Code: | ||
| 105 | |||
| 106 | (require 'cookie1) | ||
| 107 | |||
| 108 | ; Variables | ||
| 109 | (defvar bruce-phrases-file "~/bruce.lines" | ||
| 110 | "Keep your favorite phrases here.") | ||
| 111 | |||
| 112 | (defvar bruce-phrase-default-count 15 | ||
| 113 | "Default number of phrases to insert") | ||
| 114 | |||
| 115 | ;;;###autoload | ||
| 116 | (defun bruce () | ||
| 117 | "Adds that special touch of class to your outgoing mail." | ||
| 118 | (interactive) | ||
| 119 | (or (file-exists-p bruce-phrases-file) | ||
| 120 | (error "You need to create %s" bruce-phrases-file)) | ||
| 121 | (cookie-insert bruce-phrases-file | ||
| 122 | bruce-phrase-default-count | ||
| 123 | "Checking authorization..." | ||
| 124 | "Checking authorization...Approved")) | ||
| 125 | |||
| 126 | ;;;###autoload | ||
| 127 | (defun snarf-bruces () | ||
| 128 | "Return a vector containing the lines from `bruce-phrases-file'." | ||
| 129 | (or (file-exists-p bruce-phrases-file) | ||
| 130 | (error "You need to create %s" bruce-phrases-file)) | ||
| 131 | (cookie-snarf bruce-phrases-file | ||
| 132 | "Checking authorization..." | ||
| 133 | "Checking authorization...Approved")) | ||
| 134 | |||
| 135 | ;; Note: the implementation that used to take up most of this file has been | ||
| 136 | ;; cleaned up, generalized, gratuitously broken by esr, and now resides in | ||
| 137 | ;; cookie1.el. | ||
| 138 | |||
| 139 | ;;; bruce.el ends here | ||