all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Leo <sdl.web@gmail.com>
Cc: 11321@debbugs.gnu.org
Subject: bug#11321: 24.0.95; forward-sexp fails on string
Date: Tue, 24 Apr 2012 08:45:29 -0400	[thread overview]
Message-ID: <jwvwr55joba.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <m2zka1hip4.fsf@gmail.com> (Leo's message of "Tue, 24 Apr 2012 12:12:07 +0800")

> 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.


        Stefan





  reply	other threads:[~2012-04-24 12:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-24  4:12 bug#11321: 24.0.95; forward-sexp fails on string Leo
2012-04-24 12:45 ` Stefan Monnier [this message]
2016-11-05 19:47   ` npostavs

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvwr55joba.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=11321@debbugs.gnu.org \
    --cc=sdl.web@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.