Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!leah!rpi!rpi.edu!rodney From: rodney@sun.ipl.rpi.edu (Rodney Peck II) Newsgroups: comp.emacs Subject: Re: a mail header hook with zippy Message-ID: Date: 7 Jul 89 16:03:32 GMT References: Sender: usenet@rpi.edu Distribution: comp Organization: Rensselaer Polytechnic Institute Image Processing Lab, Troy NY Lines: 40 In-reply-to: rodney@sun.ipl.rpi.edu's message of 7 Jul 89 14:18:29 GMT oops. figures. a really simple posting a it gets screwed up. it seems that my add-zippism couldn't find the --tex in the header when i demonstrated it but it did find it down in the function body! Well, here's the new version: note the addition of the begining of buffer and check for unbound hook. this actually works. ;;;;;;;;;;;;;;;;;;;;;;;;;;; -*- Mode: Emacs-Lisp -*- ;;;;;;;;;;;;;;;;;;;;;;;;;; ;; zippy-mail.el ;; Author : Rodney Peck II (rodney@ipl.rpi.edu) ;; Created On : Fri Jul 7 10:09:03 1989 ;; Last Modified By: Rodney Peck II ;; Last Modified On: Fri Jul 7 11:22:05 1989 ;; Update Count : 6 ;; Status : works. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defun add-zippyism () (save-excursion (goto-char (point-min)) ;; begining of buffer (search-forward "--tex") (beginning-of-line) (insert "X-Zippy: ") (insert (yow)) (insert "\n"))) (or (and (not (boundp 'mail-setup-hook)) (setq mail-setup-hook '(add-zippyism))) (memq 'add-zippyism mail-setup-hook) (setq mail-setup-hook (cons 'add-zippyism mail-setup-hook))) ;;(setq mail-setup-hook nil) -- Rodney