Path: utzoo!telly!ddsw1!mcdchg!rutgers!tut.cis.ohio-state.edu!THINK.COM!mjab
From: mjab@THINK.COM
Newsgroups: gnu.emacs.bug
Subject: bug in define-mail-alias
Message-ID: <8809211832.AA21693@medusa.think.com>
Date: 21 Sep 88 18:32:22 GMT
Sender: daemon@tut.cis.ohio-state.edu
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 57

The function define-mail-alias in emacs version 18.49.20 is
wrong.  It incorrectly assumes that blanks in a mail address are
meant to separate mail addresses.  It adds commas after every
word of a multi-word mail address which creates havoc if
build-mail-aliases is used to create aliases from a .mailrc file
which contains many such addresses.

The problem arises because of addresses in the form

lots of words 

This form of addressing comes up very frequently when mailing to
institutions (like the military or IBM) which restrict access to
electonic mail to whole departments rather than individuals.

The required fix is to replace define-mail-alias with the
following:


;;; This definition fails to trash addresses in the form 
;;; "Roland H. Pesch "  The way it is defined
;;; in /public/gnu/dist/lisp/mailalias.el is completely wrong.
;;; -Michael Berry Wed Sep 14 1988


(defun define-mail-alias (name definition)
  "Define NAME as a mail-alias that translates to DEFINITION."
  (interactive "sDefine mail alias: \nsDefine %s as mail alias for: ")
  ;; Read the defaults first, if we have not done so.
  (if (eq mail-aliases t)
      (progn
	(setq mail-aliases nil)
	(if (file-exists-p "~/.mailrc")
	    (build-mail-aliases))))
  ;removed code wich mistakenly inserted commas -mjab Wed Sep 14 1988
      (setq mail-aliases (cons (cons name definition) mail-aliases)))

I have tested this patch.  With it, aliases like the following
one are properly translated.


alias x3j3   Jeanne Adams -NCAR , Bob Allison -Microsoft , Michael Berry -Thinking Machines , Walter Brainerd -Unicomp , Carl Burch -HP <
cdb%hpda@hplabs.hp.com>, Gary Campbell - Sun , Tim Dodd -Modcomp , Miles Ellis -Oxford , Kevin Harris -DEC , Dick He
ndrickson -ETA , Kurt Hirchert -Univ of Il , Andy Johnson -Prime , Henry Katz -DOD , Sharon Lammers -Cray , Rochelle Lauer -DECUS , Bill Leonard -Harris , Neldon Marshall -INEL , Jeanne Martin -LLNL , Alex Marusak -LANL , Mike Metcalf -CERN , Geoff Millard -EPCL , Len Moss -SLAC , Dan Pearl -Masscomp , Ivor Philips -Boeing CS , Rich Ragan -CDC , L Schonfelder-U Liverpool , Paul Sinclair -Telesoft , Brian Smith -ANL 
, Presley Smith -Convex , Sunnie Sund -SHARE , Richard Swift -Alliant , Andrew Tait - Amdahl , Brian Thomps
on-Concurrent , Jerry Wagener - AMOCO , Tammy Yan -Data General 


=============================================
Michael J. A. Berrry

Internet: mjab@think.com
uucp:     {harvard, ihnp4, seismo}!think!mjab
=============================================