From: kaoru Date: Thu, 26 Oct 2000 05:51:57 +0000 (+0000) Subject: * elmo-util.el (elmo-string-matched-member): New function. X-Git-Tag: wl-2_4-root~78 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=72dd3af5e4e97b3410ce40729b252541708cd54e;p=elisp%2Fwanderlust.git * elmo-util.el (elmo-string-matched-member): New function. --- diff --git a/elmo/ChangeLog b/elmo/ChangeLog index 599313f..25c18b5 100644 --- a/elmo/ChangeLog +++ b/elmo/ChangeLog @@ -1,3 +1,7 @@ +2000-10-26 TAKAHASHI Kaoru + + * elmo-util.el (elmo-string-matched-member): New function. + 2000-10-26 Yuuichi Teranishi * elmo-util.el (elmo-unintern): New macro. diff --git a/elmo/elmo-util.el b/elmo/elmo-util.el index 3216644..f4159ef 100644 --- a/elmo/elmo-util.el +++ b/elmo/elmo-util.el @@ -1573,6 +1573,14 @@ But if optional argument AUTO is non-nil, DEFAULT is returned." (throw 'member (car list))) (setq list (cdr list)))))) +(defun elmo-string-matched-member (str list &optional case-ignore) + (let ((case-fold-search case-ignore)) + (catch 'member + (while list + (if (string-match str (car list)) + (throw 'member (car list))) + (setq list (cdr list)))))) + (defsubst elmo-string-delete-match (string pos) (concat (substring string 0 (match-beginning pos))