Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uwm.edu!uakari.primate.wisc.edu!ginosko!uunet!mcsun!ukc!cam-cl!tdw From: tdw@cl.cam.ac.uk (Tim Wilson) Newsgroups: gnu.emacs Subject: Re: Any interesting .abbrev_defs? Summary: Abbrevs are convenient alternative to mail aliases Keywords: mail abbrev alias Message-ID: <1353@scaup.cl.cam.ac.uk> Date: 18 Oct 89 10:24:50 GMT References: <1989Oct17.030717.18759@sun.soe.clarkson.edu> Sender: news@cl.cam.ac.uk Reply-To: tdw@cl.cam.ac.uk (Tim Wilson) Organization: U of Cambridge Comp Lab, UK Lines: 67 In article <1989Oct17.030717.18759@sun.soe.clarkson.edu> nelson@clutx.clarkson.edu writes: > Does anyone have interesting .abbrev_defs that they'd like to share with > the world? My .abbrev_defs is probably one of the least worth sharing, but I use it a lot myself. I use it to store `mail aliases', instead of using ~/.mailrc, for example (in edit-abbrev format) "timw" 2 "Tim Wilson " I prefer abbrevs to .mailrc aliases since I see the expansion immediately---and more importantly, I immediately notice the absence of expansion caused by typos or using aliases I haven't defined. What about other mail programs? The only other mail program I use is more(1) (faster startup then emacs -f vm), so this point doesn't affect me. Acknowledgement: The idea was stolen from the Acorn Research Centre mail reader (ARCmail) for Unipress emacs. Here's the code: ---- From my .emacs ----------------------------------------------------------- (autoload 'sendmail-abbrev-setup "sendmail-abbrevs" "Load sendmail abbreviations" nil) (setq mail-mode-hook '(lambda () (sendmail-abbrev-setup) ;; [others omitted] )) ------------------------------------------------------------------------------- ---- sendmail-abbrevs.el ------------------------------------------------------ ;;; Turn on abbrev mode for sendmail, and load abbreviations. ;;; Last edited: Tue Jun 6 08:55:51 1989 by Tim Wilson (define-abbrev-table 'sendmail-mode-abbrev-table ()) (defun sendmail-abbrev-setup () ;; ;; Load abbrevs unless we have done so already ;; (if (not mail-abbrevs-loaded) ; Defined in sendmail.el (if (file-readable-p abbrev-file-name) (progn (read-abbrev-file abbrev-file-name) ; Ie default abbrev table (setq mail-abbrevs-loaded t)))) (setq local-abbrev-table sendmail-mode-abbrev-table) (abbrev-mode 1)) ------------------------------------------------------------------------------- ARCmail added the wrinkle that mail alias expansion only took place in the header. However, I omitted this feature since I quite often want to include mail addresses in the body of a message---and anyway, very few of my abbrevs are English words. Improved implemention: How about defining abbrevs equivalent to .mailrc? (We already have a parser for .mailrc in mailalias.el.) Improvements and suggestions welcome. -- Tim Wilson Janet: tdw@uk.ac.cam.cl Nsfnet: tdw%cl.cam.ac.uk@nsfnet-relay.ac.uk +44 223 334624 Uucp: ...!mcvax!ukc!cam-cl!tdw