help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to break out of an emacs lisp loop ?


From: gnuist006
Subject: How to break out of an emacs lisp loop ?
Date: Tue, 23 Oct 2007 18:29:00 -0000
User-agent: G2/1.0

(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 ?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]