all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Break from a dolist
@ 2012-09-09  8:56 Cecil Westerhof
  2012-09-09  9:25 ` Jambunathan K
       [not found] ` <mailman.8449.1347182656.855.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 6+ messages in thread
From: Cecil Westerhof @ 2012-09-09  8:56 UTC (permalink / raw)
  To: help-gnu-emacs

I have the following code to fetch the email address belonging to a
mailing list. I use it to automatically fill the to address when
posting to a newsgroup.

    (defun dcbl-gnus-get-mailing-list-address ()
      "Get gnus-newsgroup-name mailing list address (if it has one);"
      (let ((to-address nil))
        (when gnus-newsgroup-name
          (dolist (item dcbl-gnus-mailing-lists)
            (when (string-match (car item) gnus-newsgroup-name)
              (setq to-address (cdr item)))))
        to-address))

But when the address is found, it would be better to leave the loop.
Is this possible?

-- 
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof


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

end of thread, other threads:[~2012-09-09 19:47 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-09  8:56 Break from a dolist Cecil Westerhof
2012-09-09  9:25 ` Jambunathan K
     [not found] ` <mailman.8449.1347182656.855.help-gnu-emacs@gnu.org>
2012-09-09 12:49   ` Cecil Westerhof
2012-09-09 13:52     ` Le Wang
2012-09-09 14:13       ` Jambunathan K
     [not found]       ` <mailman.8455.1347199946.855.help-gnu-emacs@gnu.org>
2012-09-09 19:47         ` Cecil Westerhof

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.