From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: thermate@india.com Newsgroups: gmane.emacs.help Subject: Re: How to break out of an emacs lisp loop ? Date: Tue, 23 Oct 2007 20:10:35 -0000 Organization: http://groups.google.com Message-ID: <1193170235.626923.210420__42582.4837446727$1193320197$gmane$org@t8g2000prg.googlegroups.com> References: <1193164140.500795.322030@t8g2000prg.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" X-Trace: ger.gmane.org 1193320189 1288 80.91.229.12 (25 Oct 2007 13:49:49 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 25 Oct 2007 13:49:49 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Oct 25 15:49:49 2007 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Il35l-0002RH-Ma for geh-help-gnu-emacs@m.gmane.org; Thu, 25 Oct 2007 15:49:45 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Il35d-0008Gl-Gt for geh-help-gnu-emacs@m.gmane.org; Thu, 25 Oct 2007 09:49:37 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!postnews.google.com!t8g2000prg.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help, comp.lang.scheme, soc.culture.usa, comp.text.tex, comp.lang.python Original-Lines: 54 Original-NNTP-Posting-Host: 75.28.143.190 Original-X-Trace: posting.google.com 1193170237 30515 127.0.0.1 (23 Oct 2007 20:10:37 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Tue, 23 Oct 2007 20:10:37 +0000 (UTC) In-Reply-To: <1193164140.500795.322030@t8g2000prg.googlegroups.com> User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8.1.8) Gecko/20071008 Firefox/2.0.0.8,gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: t8g2000prg.googlegroups.com; posting-host=75.28.143.190; posting-account=ps2QrAMAAAA6_jCuRt2JEIpn5Otqf_w0 Original-Xref: shelby.stanford.edu gnu.emacs.help:153250 comp.lang.scheme:74510 soc.culture.usa:1859212 comp.text.tex:360629 comp.lang.python:517479 X-Mailman-Approved-At: Thu, 25 Oct 2007 09:49:08 -0400 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:48798 Archived-At: On Oct 23, 11:29 am, gnuist...@gmail.com wrote: > (while (not (forward-char)) > (if (looking-at "a") break ) > > When I run this sexp, I get error at break. So break is wrong syntax. > But this is the way many C loops are written. > > while ((c=(getchar()) != EOF){ if (c=='a') break; } Here is a one/two liner that exactly does what you want with the same functions that you have and without any break and is actually readable like an english sentence (while (not (looking-at "a" )) (forward-char)) ============= Watch and spread the link of the movie below. The 911 truthers confront the VILE and EVIL RABID NEOCON ZIONIST Bastard Norman Podhoretz at Barnes & Noble. NYC Confronts Norman Podhoretz!! http://www.youtube.com/watch?v=3MBzLTjVMhY from the great site 911blogger.com <-------------------------- http://www.voxfux.com/features/bush_child_sex_coverup/franklin.htm <----- http://counterpunch.org/neumann04142007.html http://counterpunch.org/ross04182007.html www.911truth.org www.st911.org www.counterpunch.org www.countercurrents.org www.nkusa.org www.911blogger.org www.mujca.org http://home.att.net/~south.tower/911RussianSatellite1.htm Loose Change Terror Storm Alex Jones - www.infowars.com, www.prisonplanet.org The Bohemian Grove The arrest of Alex Jones by bush Republican Pedophilia - a distinguished record Monica Lewdinsky aka Bill Clintone Neocons, Scooter, Judith Miller, Thomas Friedman, Charles Krauthmer, Edward Bernays Benjamin Friedman speech Holocaust Victims Accuse the Zionists Moshe Katsa and his rapes Yank Bastards and their 911 HEINOUS CRIME