Mercurial > emacs
comparison lisp/mail/mailalias.el @ 219:6f8afe7308eb
*** empty log message ***
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sun, 24 Mar 1991 23:18:32 +0000 |
parents | a8efef5eb891 |
children | ce8e0192266e |
comparison
equal
deleted
inserted
replaced
218:d492f16a8743 | 219:6f8afe7308eb |
---|---|
20 | 20 |
21 ;; Called from sendmail-send-it, or similar functions, | 21 ;; Called from sendmail-send-it, or similar functions, |
22 ;; only if some mail aliases are defined. | 22 ;; only if some mail aliases are defined. |
23 (defun expand-mail-aliases (beg end &optional exclude) | 23 (defun expand-mail-aliases (beg end &optional exclude) |
24 "Expand all mail aliases in suitable header fields found between BEG and END. | 24 "Expand all mail aliases in suitable header fields found between BEG and END. |
25 Suitable header fields are To, Cc and Bcc. Optional 2nd arg EXCLUDE may be a | 25 Suitable header fields are To, Cc and Bcc and their Resent- variants. |
26 regular expression defining text to be removed from alias expansions." | 26 Optional 2nd arg EXCLUDE may be a regular expression |
27 defining text to be removed from alias expansions." | |
27 (if (eq mail-aliases t) | 28 (if (eq mail-aliases t) |
28 (progn (setq mail-aliases nil) (build-mail-aliases))) | 29 (progn (setq mail-aliases nil) (build-mail-aliases))) |
29 (goto-char beg) | 30 (goto-char beg) |
30 (setq end (set-marker (make-marker) end)) | 31 (setq end (set-marker (make-marker) end)) |
31 (let ((case-fold-search nil)) | 32 (let ((case-fold-search nil)) |
32 (while (let ((case-fold-search t)) | 33 (while (let ((case-fold-search t)) |
33 (re-search-forward "^\\(to\\|cc\\|bcc\\):" end t)) | 34 (re-search-forward "^\\(to\\|cc\\|bcc\\|resent-to\\|resent-cc\\|resent-bcc\\):" end t)) |
34 (skip-chars-forward " \t") | 35 (skip-chars-forward " \t") |
35 (let ((beg1 (point)) | 36 (let ((beg1 (point)) |
36 end1 pos epos seplen | 37 end1 pos epos seplen |
37 ;; DISABLED-ALIASES records aliases temporarily disabled | 38 ;; DISABLED-ALIASES records aliases temporarily disabled |
38 ;; while we scan text that resulted from expanding those aliases. | 39 ;; while we scan text that resulted from expanding those aliases. |