Path: utzoo!telly!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!apple!bbn!jr@bbn.com From: jr@bbn.com (John Robinson) Newsgroups: gnu.emacs Subject: Re: mail beep Message-ID: <40000@bbn.COM> Date: 16 May 89 14:50:16 GMT References: <39946@bbn.COM> Sender: news@bbn.COM Reply-To: jr@bbn.com (John Robinson) Distribution: na Organization: BBN Systems and Technologies Corporation, Cambridge MA Lines: 18 In-reply-to: jr@bbn.com (John Robinson) In article <39946@bbn.COM>, jr@bbn (John Robinson) [that's me!] writes: >Just before them, insert: > > (if (and (string-match "Mail" string) > (not (string-match "Mail" display-time-string))) > (ding t)) > >Caveats: I haven't tried this. And if I had, maybe I would have noticed that this clobbers match-data, as Wolfgang Rupprecht pointed out in mail. If you want to get it right, protect it using the save-match-data function seen recently in comp.emacs (or contact me - there, I hope that's pennance enough :). -- /jr jr@bbn.com or bbn!jr C'mon big money!