[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Help needed to simplify code for customisation
From: |
Richard Riley |
Subject: |
Help needed to simplify code for customisation |
Date: |
Tue, 10 Mar 2009 03:14:10 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.0.91 (gnu/linux) |
Could someone please recommend the best way to remove the 3 similar lines
doing string-match on the "account" assign and iterate a variable list to
which I can "add-to-list" in other .el libraries for example?
,----
| (if (message-mail-p)
| (save-excursion
| (let* ((from
| (save-restriction
| (message-narrow-to-headers)
| (message-fetch-field "from")))
| (account
| (cond
| ((string-match ".*root.*" from)"richardriley")
| ((string-match ".*richardriley.*" from)"richardriley")
| ((string-match ".*rileyrgdev.*" from)"rileyrgdev")
| ))
| )
| (setq message-sendmail-extra-arguments (list "-a" account))
| )))
| )
`----
Thanks for any pointers,
r.
- Help needed to simplify code for customisation,
Richard Riley <=
Re: Help needed to simplify code for customisation, Kevin Rodgers, 2009/03/10