all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Help needed to simplify code for customisation
@ 2009-03-10  2:14 Richard Riley
  2009-03-10  6:44 ` Xah Lee
  2009-03-11  2:39 ` Kevin Rodgers
  0 siblings, 2 replies; 6+ messages in thread
From: Richard Riley @ 2009-03-10  2:14 UTC (permalink / raw)
  To: help-gnu-emacs


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.


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2009-03-11  6:37 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-10  2:14 Help needed to simplify code for customisation Richard Riley
2009-03-10  6:44 ` Xah Lee
     [not found]   ` <b5ecffc4-3770-4c6e-8f1c-38042d65d09e@a39g2000yqc.googlegroups.com>
2009-03-10 11:42     ` William James
2009-03-10 16:53       ` Marco Antoniotti
2009-03-11  6:37         ` Kenneth Tilton
2009-03-11  2:39 ` Kevin Rodgers

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.