Article View: gnu.emacs.sources
Article #323mail aliases
From: Dale DePriest
Date: Wed, 20 Jan 1993 19:56
Date: Wed, 20 Jan 1993 19:56
41 lines
1485 bytes
1485 bytes
The routine permits you to see the expansion of the aliases at any time
during the composition of your mail. I have bound it to C-c C-a with
the meaning alias expansion. The aliases themselves are already supported
from entires in .mailrc and send mail will already expand them as the mail
is sent. I only provided a hook to permit you to see them ahead of time.
---Cut here-------------
(setq mail-mode-hook '(lambda ()
(define-key mail-mode-map "\C-c\C-a" 'my-mail-aliases)))
(defun my-mail-aliases ()
"Expand local mail aliases so user can view them."
(interactive)
(if mail-aliases
(save-excursion
(goto-char (point-min))
(re-search-forward
(concat "^" (regexp-quote mail-header-separator) "\n"))
(replace-match "\n")
(backward-char 1)
(setq delimline (point-marker))
(expand-mail-aliases (point-min) delimline)
(goto-char delimline)
(insert mail-header-separator ""))))
--
_ _ Dale DePriest San Jose, California
/`) _ // daled@Cadence.COM voice: (408) 428-5249
o/_/ (_(_X_(`
Technical Details
Message-ID:
<1993Jan20.195605.20847@Cadence.COM>Path:
arc1-ca.pugleaf.net!sparky!uunet!Cadence.COM!daledShow Full Headers
Complete Article Headers
Newsgroups: gnu.emacs.sources Path: arc1-ca.pugleaf.net!sparky!uunet!Cadence.COM!daled From: daled@cadence.com (Dale DePriest) Subject: mail aliases Message-ID: <1993Jan20.195605.20847@Cadence.COM> Sender: usenet@Cadence.COM (Usenet News) Nntp-Posting-Host: cds9172.cadence.com Organization: Cadence Design Systems Distribution: gnu.emacs.sources Date: Wed, 20 Jan 1993 19:56:05 GMT Lines: 41