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

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

Re: [External] : forward-sexp


From: Pierre Rouleau
Subject: Re: [External] : forward-sexp
Date: Fri, 11 Aug 2023 15:47:17 -0400

Hi Andreas,

Does it work with quotes?
For instance:
["(&adsf"]

On Fri, Aug 11, 2023 at 3:21 PM Andreas Röhler <
andreas.roehler@easy-emacs.de> wrote:

>
> Am 11.08.23 um 19:43 schrieb Drew Adams:
> >> M-x forward-sexp RET works from the beginning of the first line, but
> >> does nothing from the beginning at the second. Are there reasons for
> >> this? [ asdf ] .
>
> > The syntactic definition of "sexp" depends on the context, e.g., the
> > current major mode. Without knowing how a "sexp" is defined in your
> > context, we can't help much. That said, trying it in a Lisp mode tells
> > me that an error is raised when I try it at the beginning of the
> > second line, because: Debugger entered--Lisp error: (scan-error
> > "Unbalanced parentheses" 450 459) scan-sexps(450 1) forward-sexp(1)
> > funcall-interactively(forward-sexp 1) call-interactively(forward-sexp
> > nil nil) command-execute(forward-sexp) IOW, the `(' char isn't
> > balanced with a `)' char, so parsing to the end of the `[' sexp isn't
> > possible.
>
> let assume fundamental mode, cursor at opening bracket: what puzzles me,
>
> with [ asdf ] it recognizes the opening bracket.
>
> In such a case, it should not look inside, just travel onto the closing
> one.
>
> But with [(&asdf] it fails.
>
>

-- 
/Pierre


reply via email to

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