unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* How to break out of an emacs lisp loop ?
@ 2007-10-23 18:29 gnuist006
  2007-10-23 19:03 ` Joost Kremers
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: gnuist006 @ 2007-10-23 18:29 UTC (permalink / raw)
  To: help-gnu-emacs


(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; }

as in compilable running file:

#include <stdio.h>
main(){
int c;
  while ((c=getchar()) != EOF){ if (c=='a') break; }
}

So how do I break out of a loop in lisp ?

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2007-10-24 19:59 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-23 18:29 How to break out of an emacs lisp loop ? gnuist006
2007-10-23 19:03 ` Joost Kremers
2007-10-23 20:00 ` Bastien
2007-10-23 20:10 ` thermate
2007-10-24  1:12 ` Stefan Monnier
     [not found] ` <1193170235.626923.210420@t8g2000prg.googlegroups.com>
2007-10-24 19:59   ` Jason

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).