help-gnu-emacs
[Top][All Lists]
Advanced

[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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]