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

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

Re: looping through re-seach-forward gives error


From: Michael Heerdegen
Subject: Re: looping through re-seach-forward gives error
Date: Sun, 20 Mar 2016 23:21:15 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.92 (gnu/linux)

Drew Adams <drew.adams@oracle.com> writes:

> >     (defun find-start-of-sexp ()
> >        (re-search-forward "(" (point-max) t)
> >        (backward-char)
> >        (point-marker))
>
> What happens if (re-search-forward "(" (point-max) t) returns nil?
>
> >     (defun find-end-of-sexp ()
> >       (forward-sexp)
> >       (point-marker))
>
> What happens if (forward-sexp) has a problem?

Also: what happens when there are prompts which are directly followed by
another prompt?

I suggest to use Edebug to see what's going on.  Just instrument your
stuff (C-u C-M-x), start your program, and hit SPC, SPC, ... to see
what's going on.


Michael.




reply via email to

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