all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@IRO.UMontreal.CA>
To: Vitalie Spinu <spinuvit@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: Syntax-ppss flush should happen in after-change hook
Date: Sat, 16 Mar 2019 18:41:35 -0400	[thread overview]
Message-ID: <jwv5zsi5tsn.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <87h8c24mr0.fsf@gmail.com> (Vitalie Spinu's message of "Sat, 16 Mar 2019 20:56:03 +0100")

>> I'd much rather "do it right" and change add-hook to understand a notion of
>> depth/priority/order.
>
> Interesting. This would be useful for this particular case, but are
> there other use cases that would benefit from it?

Since it's proved useful for add-function, I expect it would be useful
for add-hook as well.  Off hand, I can only mention
electric--sort-post-self-insertion-hook as a concrete example, tho.

>>> Combine-change-calls happened in my example, but currently any buffer
>>> change results in inconsistent syntax state.
>
>> Then I must have misunderstood something.
>> Can you give more details about the problem scenario you have in mind?
>
> Sorry, I didn't put it rightly.  I meant all those functions that
> trigger "syntax-propertize", but looks like I was actually confused
> about the number of such functions.
>
>> It's only when you start using combine-change-calls (or
>> combine-after-change-calls) that the code the performs the change
>> between a-c-f and b-c-f can run arbitrarly fancy Elisp code.
>
> I see. Then, as long as combine-change-calls leaves the correct state
> everything should be fine.  Then your patch looks right, indeed.
> It does fix my markdown-mode example for sure.

OK, thanks for testing,


        Stefan



      reply	other threads:[~2019-03-16 22:41 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-16 15:01 Syntax-ppss flush should happen in after-change hook Vitalie Spinu
2019-03-16 15:53 ` Stefan Monnier
2019-03-16 17:35   ` Vitalie Spinu
2019-03-16 18:09     ` Stefan Monnier
2019-03-16 19:56       ` Vitalie Spinu
2019-03-16 22:41         ` Stefan Monnier [this message]

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=jwv5zsi5tsn.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=emacs-devel@gnu.org \
    --cc=spinuvit@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.