[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to break out of an emacs lisp loop ?
From: |
Jason |
Subject: |
Re: How to break out of an emacs lisp loop ? |
Date: |
Wed, 24 Oct 2007 12:59:27 -0700 |
User-agent: |
G2/1.0 |
On Oct 23, 1:10 pm, therm...@india.com wrote:
> 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.
(progn
(insert "\nbefore")
(do ((i 0 (+ i 1)))
((> i 10) (insert "\ndone"))
(progn
(insert "\n")
(insert (int-to-string i))
(if (> i 5)
(return i))))
(insert "\nafter"))
-Jason