From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Vitalie Spinu Newsgroups: gmane.emacs.devel Subject: Re: Syntax-ppss flush should happen in after-change hook Date: Sat, 16 Mar 2019 20:56:03 +0100 Message-ID: <87h8c24mr0.fsf@gmail.com> References: <87sgvm50dk.fsf@gmail.com> <87lg1e4t9u.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="88953"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Mar 16 21:13:21 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h5FgE-000N0k-3D for ged-emacs-devel@m.gmane.org; Sat, 16 Mar 2019 21:13:18 +0100 Original-Received: from localhost ([127.0.0.1]:45783 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h5FgC-0002kL-Vn for ged-emacs-devel@m.gmane.org; Sat, 16 Mar 2019 16:13:17 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:32925) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h5Fbo-0008Ll-Nl for emacs-devel@gnu.org; Sat, 16 Mar 2019 16:08:45 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h5FPd-0007y0-MD for emacs-devel@gnu.org; Sat, 16 Mar 2019 15:56:10 -0400 Original-Received: from mail-ed1-x536.google.com ([2a00:1450:4864:20::536]:36927) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1h5FPa-0007s2-It for emacs-devel@gnu.org; Sat, 16 Mar 2019 15:56:07 -0400 Original-Received: by mail-ed1-x536.google.com with SMTP id m12so10363366edv.4 for ; Sat, 16 Mar 2019 12:56:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=OHVBqHxSlV2H8jEyirlDoNxSYMFjv50LaOwKeb9XZW4=; b=X7xDv1HyU+NqCakdQPPeIeut2o5yi1Pi8c7hTXFb28szHwAhF9FXRiwc2djAyUpyRT 4alrbA0svdx7yqi/U8K/n+JKZqC0+vTrR0sJPx4pvRsosFCoUfA7MLWD6MiRreSadcch ryxB/5fH3cwiE+6u5bxY53IftYP9EE5McgPXJqZgHpa/V8UcQD80dn+RbTwdi/rdNCBY 3WFaClmnR9akCs8ADrI/Vn8UwgJ98WxYfP6SV7QjSPhUJvs9YOQCRKAlMHHIqEfABFcD 7TbLkkrEGQca5CHz4hfpuqiO9Mvo2DL3oK7VJP/iPgiwWa7YFhjbNSZuw/51CXiwrpMb XAaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=OHVBqHxSlV2H8jEyirlDoNxSYMFjv50LaOwKeb9XZW4=; b=ZmWGq77V72+784RATND3eRWgecYb/Ggfcxw3c4jFPSS1W0Qlm6x14XKuwDgep1YRDY WMZgZD/DbQfWm6/ovMXGWSJOBQmeUsv4XYM7bCyUOw8q+pzWQSzaB1D9q48BZ0tlu0e4 jjsUYKT1VlsrRvem5lMy7eHpupDpCr+CEx0czQRgia+Wt8g2iorqXlcBf12X6zoMoTKP nc80UC2SHSat/EH/hCB/zosvsBxQUQDJAquTqDUA9Tb261T2ymGJpBoQ6/bT+wcofdE9 ufw1kpfIpgZO80Sj6ZZaNCIpt6ZCsWzlbQnj0osRVi7EItC4R3F4SpBGzXRPboSs1v98 HIzw== X-Gm-Message-State: APjAAAW4BVcTFZdgiKZXONCz3TlAuGdeJ6ltU46dNKWfyuyPRzSRo/eJ HCocg9uwQIjXIshKVuvVduI= X-Google-Smtp-Source: APXvYqzWtgC322Gz2ElzCnaseMLWJiqChY16Fwj4z4tW3Kj8cmc5deIbiDJ8k1tNPA3hLCLaBavNYw== X-Received: by 2002:a17:906:1e0f:: with SMTP id g15mr5940806ejj.166.1552766164772; Sat, 16 Mar 2019 12:56:04 -0700 (PDT) Original-Received: from localhost ([2001:1c00:a17:1300:21d3:c436:f892:a1b8]) by smtp.gmail.com with ESMTPSA id y13sm1232071eje.34.2019.03.16.12.56.03 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 16 Mar 2019 12:56:04 -0700 (PDT) In-Reply-To: (Stefan Monnier's message of "Sat, 16 Mar 2019 14:09:37 -0400") X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::536 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:234242 Archived-At: >> On Sat, Mar 16 2019 14:09, Stefan Monnier wrote: > 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? >> 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. Vitalie