From 72dd3af5e4e97b3410ce40729b252541708cd54e Mon Sep 17 00:00:00 2001 From: kaoru Date: Thu, 26 Oct 2000 05:51:57 +0000 Subject: [PATCH] * elmo-util.el (elmo-string-matched-member): New function. --- elmo/ChangeLog | 4 ++++ elmo/elmo-util.el | 8 ++++++++ 2 files changed, 12 insertions(+) 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)) -- 1.7.10.4