From: mad@spirit.clearpoint.com (Michael Davis)
Newsgroups: gnu.emacs.sources
Subject: Re: Bush-bash
Date: 28 Sep 92 14:29:23 GMT
	<1992Sep19.211633.11599@mailer.cc.fsu.edu>
Distribution: gnu
Organization: Walking Dead Man Bar and Grille


Juan is On 19 Sep 92 21:16:33 GMT, jmarchin@loligo.cc.fsu.edu (Juan Marchini) said:
rms is the previous message from Richard Stallman

Juan> i used the autoload function to load in bash-bush as follows:

Juan> (autoload 'bash-bush "bush.el" "Bush bashing message appendix")

Juan> in my .emacs file, and when i ran emacs it didn't give me an error
Juan> in init file, as it is wont to do when usually edit it

Juan> however, perhaps i didn't understand what you meant by:

rms> Simply load this, and each message you subsequently send
rms> with Emacs will have a randomly selected bush-bashing statement
rms> added at the end.

Juan> did you mean mail message, or something else, because i used
Juan> emacs to send a message to myself and it didn't add the
Juan> bush-bashing statement to the message.

rms> The statement is added in the buffer when you begin composing the
rms> message, so if you don't want it in a particular message, just
rms> delete it.

Juan> so please tell me what to do...was it not when using the mail
Juan> function, or what?  am i suppose to have used the load function?

I too, had difficulties with the bash-bush function working as I
expected, so I made the following modifications:

1) I took the code at the bottom of the file out:

;;(or (boundp 'mail-setup-hook)
;;    (setq mail-setup-hook nil))
;;(if (or (and mail-setup-hook (symbolp mail-setup-hook))
;;	(and (consp mail-setup-hook) (eq (car mail-setup-hook) 'lambda)))
;;    (setq mail-setup-hook (list mail-setup-hook)))
;;(or (memq 'bash-bush mail-setup-hook)
;;    (setq mail-setup-hook (cons 'bash-bush mail-setup-hook)))

I did this so I could alter my own hooks in a manner more to my
liking.  Your mileage may vary on this.  Specifically, I changed the
hooks to sending mail and gnus:

2)  Changed the definition of send-mail-function so that my .signature
file and bush bashing quote would be appended:

;; new send-mail-function to add personl touches to the end of the message
;;
(setq send-mail-function
      '(lambda ()
	;
	; find the signature and append it to the message if it exists
	;
	 (let ((signature (expand-file-name "~/.signature" nil)))
	   (save-excursion
	     (if signature
		 (progn
		   ;; Insert signature.
		   (if (file-exists-p signature)
		       (progn
			 (goto-char (point-max))
			 (insert-file-contents signature))))))
	;
	; now add the bush bashing at the end
	;
	   (bash-bush))
	;
	; oh yeah, send the message
	;
	 (sendmail-send-it)))

3) Sind I use gnus, I wanted to bash bush in news postings as well:

(setq gnus-Inews-article-hook 'bash-bush)

4) Finally, the bash-bush, as written, always gives the same sequence
of quotations.  Therefore I modified the first occurence to the line

    (setq ran (random))

to be

    (setq ran (random t))

so that it would give the time as a random number seed each time
though.  This gives a much better distribution of quotes.


Juan> forgive my ignorance, i just recently started looking over the
Juan> emacs lisp code, and to my surprise i understood some of it, to
Juan> the point that i even added the pascal-mode option to my
Juan> auto-mode-alist variable :)

Juan> r.s.v.p.

I'm sure that I have not done everything in the best possible way, but
it works for me.  I appreciate any pointers from others on how I might
improve my code.

Juan> juan

-mad

Michael A. Davis               Clearpoint Research Corp.        (508) 435-7452 (voice)
mad@spirit.clearpoint.com      135 Parkwood Drive		(508) 435-7504 (fax)
                               Hopkinton, MA 01738


The cause of the riots were the rioters
                -- Vice President Dan Quayle giving an intelligent
                   analysis of the LA riots.
Newsgroups: gnu.emacs.sources