[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Break from a dolist
From: |
Jambunathan K |
Subject: |
Re: Break from a dolist |
Date: |
Sun, 09 Sep 2012 14:55:01 +0530 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux) |
Cecil Westerhof <Cecil@decebal.nl> writes:
> 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?
(info "(elisp) Examples of Catch")
--
- Break from a dolist, Cecil Westerhof, 2012/09/09
- Re: Break from a dolist,
Jambunathan K <=
- Message not available