
(defun expand-mail-aliases (beg end) "\
Expand all mail aliases in suitable header fields found between BEG and END.
Suitable header fields are To, Cc and Bcc." (byte-code "=  b \"#) !`
	# ! b`W `m @AZVz A^ # !	`	Z
 !	݉
	\"\"? \"A 	ZBBbc``	Z\\\"b 	b
!*R \". \")" [mail-aliases t nil beg end case-fold-search beg1 end1 pos epos seplen disabled-aliases translation string build-mail-aliases set-marker make-marker re-search-forward "^\\(to\\|cc\\|bcc\\):" skip-chars-forward " 	" "^[^ 	]" move beginning-of-line skip-chars-backward " 	
" point-marker "[ 	]*[
,][ 	]*" match-beginning 0 marker-position buffer-substring assoc delete-region forward-char] 22))

(defun build-mail-aliases (&optional file) "\
Read mail aliases from ~/.mailrc and set mail-aliases." (byte-code " !pʎ!	!	q!2 !qed\")c< !?< !dbh=H  ebm?n  hUg !!cj !L eb# # !!!\"!` `\"\"*r )*" [file buffer nil obuf t name start mail-aliases expand-file-name "~/.mailrc" ((byte-code " !	q" [buffer obuf kill-buffer] 2)) generate-new-buffer "mailrc" buffer-flush-undo get-file-buffer buffer-substring file-exists-p insert-file-contents 10 newline end-of-line 92 delete-char -1 1 32 forward-char re-search-forward "^a\\(lias\\|\\)[ 	]+" "^g\\(roup\\|\\)[ 	]+" "[^ 	]+" match-beginning 0 match-end skip-chars-forward " 	" define-mail-alias] 27))

(defun define-mail-alias (name definition) "\
Define NAME as a mail-alias that translates to DEFINITION." (interactive "sDefine mail alias: 
sDefine %s as mail alias for: ") (byte-code "= !  #M !GU4 TOI TO!OQ\\ \"` \"g BB)" [mail-aliases t nil tem definition name file-exists-p "~/.mailrc" build-mail-aliases string-match "[^ 	,][ 	,]+" match-end 0 ", " 3 assoc rplacd] 11))
