From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Svend Tollak Munkejord Newsgroups: gmane.emacs.help Subject: Re: Test for a list of words? Date: Sun, 11 May 2003 17:10:33 +0200 Organization: The Royal Society for Putting Things on Top of Other Things Sender: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1052666134 18547 80.91.224.249 (11 May 2003 15:15:34 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 11 May 2003 15:15:34 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Sun May 11 17:15:33 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19EsY0-0004p0-00 for ; Sun, 11 May 2003 17:15:33 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 19EsYZ-0006kE-07 for gnu-help-gnu-emacs@m.gmane.org; Sun, 11 May 2003 11:16:07 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news.uchicago.edu!newsswitch.lcs.mit.edu!newsfeed.mathworks.com.MISMATCH!newsfeed!news.tele.dk!news.tele.dk!small.news.tele.dk!uninett.no!ntnu.no!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 20 Original-NNTP-Posting-Host: bacchus.pvv.ntnu.no Original-X-Trace: tyfon.itea.ntnu.no 1052665833 2268 129.241.210.178 (11 May 2003 15:10:33 GMT) Original-X-Complaints-To: usenet@itea.ntnu.no Original-NNTP-Posting-Date: Sun, 11 May 2003 15:10:33 +0000 (UTC) Mail-Copies-To: never User-Agent: Gnus/5.1001 (Gnus v5.10.1) Emacs/21.2 (berkeley-unix) X-Face: (2vS>!nr@2"*^KO{^8A<,_lGWx3HpnuA1UCA5vbsLl|2fZAV\T'x(3E`4@UJ >_mn@3S(.`C]g9DoFSSNAB@hftp\f-b#!UjRVfG5e#~H*^RvP+:meH63245"^?Zs7S[dE(SL`cn Cancel-Lock: sha1:FMzZPofYK6CkVpX8Xx6jDoTK4Q8= Original-Xref: shelby.stanford.edu gnu.emacs.help:113069 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:9564 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:9564 Today, Jesper Harder wrote: >Svend Tollak Munkejord writes: > >>How can I test whether a buffer contains some words? > >You could make a small function, say, `all-words-present-p': > >(require 'cl) > >(defun all-words-present-p (words) >(every (lambda (word) > (goto-char (point-min)) > (search-forward word nil t)) > words)) Great! Thanks! -- Svend Tollak Munkejord