unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / 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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).