Subject: bug#11321: 24.0.95; forward-sexp fails on string

From: [email-masked]
Date: Sat, 05 Nov 2016 15:47:09 -0400

found 11321 24.2
tags 11321 fixed
close 11321 24.3
quit

Stefan Monnier <[email-masked]> writes:

>> Could someone explain what is going on? Is this a bug? Thanks.
>
> Here's my explanation: when you do the first C-M-f, syntax-propertize
> has not yet been applied to the end of the triple-quoted-string, so its
> end is not properly marked and forward-sexp doesn't find it.  The C-M-f
> at point 6 moves point such that the end of the string does get
> displayed, thus forcing application of syntax-propertize to the
> problematic area, so the C-M-f at point 8 finds that the string has
> already been processed in its entirety (or at least both the beginning
> and the end have been processed, which are the only parts that matter),
> leading to C-M-f working right this time.
>
> IOW, the problem is that syntax-propertize is currently applied "just in
> time" for font-lock, but not "just in time" for forward-sexp.

I can reproduce in 24.2 and below, but seems to be fixed in 24.3 and above.