unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Dmitry Gutov <dgutov@yandex.ru>
To: Ikumi Keita <ikumi@ikumi.que.jp>, 41522@debbugs.gnu.org
Subject: bug#41522: 26.3; Narrowing can prevent syntax propertization
Date: Mon, 25 May 2020 18:04:01 +0300	[thread overview]
Message-ID: <8f0d1e94-f918-4315-d5d5-ac1ee4df3477@yandex.ru> (raw)
In-Reply-To: <14765.1590396129@localhost>

Hi!

On 25.05.2020 11:42, Ikumi Keita wrote:
> In a similar way, if a lisp function goes to the point where syntax
> propertization has not yet took place, makes narrowing and calls some
> syntax-aware function which sets `syntax-propertize--done' to a value
> inside the narrowing, a large portion of the buffer can be left without
> suitable `syntax-table' property. This can lead to incorrect result
> for not only font-lock but also syntax-aware functions such as
> `forward-comment'.

Our current stance on the matter is that, in the simple case, code 
should call syntax-ppss from "widened" state. And the code which doesn't 
should be fixed. Or if it really need to do that (for some reason), it 
should take care to handle any undesired sife-effects itself.

See the definition of syntax-ppss-wide, which contains caches for both 
narrowed and "wide" syntax states.





  reply	other threads:[~2020-05-25 15:04 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-25  8:42 bug#41522: 26.3; Narrowing can prevent syntax propertization Ikumi Keita
2020-05-25 15:04 ` Dmitry Gutov [this message]
2020-05-25 17:02   ` Ikumi Keita
2020-05-25 22:12     ` Dmitry Gutov

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=8f0d1e94-f918-4315-d5d5-ac1ee4df3477@yandex.ru \
    --to=dgutov@yandex.ru \
    --cc=41522@debbugs.gnu.org \
    --cc=ikumi@ikumi.que.jp \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).