From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Giving "text quotes" syntax in font-lock-syntax-table only Date: Thu, 04 Jun 2020 10:00:58 -0400 Message-ID: References: <50114.1589957638@localhost> <32983.1591277792@localhost> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="88886"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: Ikumi Keita Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Jun 04 16:02:12 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jgqRe-000N1B-Ts for ged-emacs-devel@m.gmane-mx.org; Thu, 04 Jun 2020 16:02:10 +0200 Original-Received: from localhost ([::1]:45172 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jgqRd-0003FB-Ve for ged-emacs-devel@m.gmane-mx.org; Thu, 04 Jun 2020 10:02:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35772) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jgqQj-0002kj-JR for emacs-devel@gnu.org; Thu, 04 Jun 2020 10:01:13 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:22240) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jgqQc-0002dQ-0y for emacs-devel@gnu.org; Thu, 04 Jun 2020 10:01:09 -0400 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 97BC3100525; Thu, 4 Jun 2020 10:01:04 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id B758C1002CF; Thu, 4 Jun 2020 10:01:02 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1591279262; bh=WKR1chSApJb3r3kMUIpV3+Y06w8EJARb6L7dE1+sjSM=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=XWdO/0RnGdVNUNCE/KktaaSK5OFrijYqBkl6PYCJNNwLqNDUzkvYUMZjEM5DEeKWz lZw8kBEzddB7wzlvlz/dVi9NM5CBwO3E6iiS3WpFlfkgN3EGFbobt6jt1pQlkwrBra 3Lnl7HVOIFvZ4tdfJrAQ3wlu03B3XlKpex/JbYWJ2lDckwBUGvdCLQR8osVkLZg8Fb XdAqBVpZ5sXZ8j5SVu/7h3EzyOhJGzNPJT8VFQAgn/8YxR1FI254ekc9S6uPql6Pnu LJuE/plnZdt7fxdD/lzRBQW0JnF1ELb3SXN9GjLc6G/bh5OUAG75OsCnTA1P/RBimu IcbO3Kck8gTYw== Original-Received: from alfajor (76-10-137-254.dsl.teksavvy.com [76.10.137.254]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 164DD12027A; Thu, 4 Jun 2020 10:01:02 -0400 (EDT) In-Reply-To: <32983.1591277792@localhost> (Ikumi Keita's message of "Thu, 04 Jun 2020 22:36:32 +0900") Received-SPF: pass client-ip=132.204.25.50; envelope-from=monnier@iro.umontreal.ca; helo=mailscanner.iro.umontreal.ca X-detected-operating-system: by eggs.gnu.org: First seen = 2020/06/04 08:16:32 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:251853 Archived-At: >> Could you test the patch below to see if it makes the old code >> work correctly? > Yes, the fontification doesn't get scrambled with this modification. Thanks. I pushed it to `master`. > If I understand correctly, fontification still can fail even with this > fix, if `font-lock-syntax-table' is modified after font lock mode is > enabled. Yes, if `font-lock-syntax-table` is modified/set directly rather than via the 4th element of `font-lock-defaults`. > So I think it's preferable to advertise that `font-lock-syntax-table' > should not modified directly, unless the modification is restricted > within translation between ".", "w" and "_", once after font lock > mode is enabled. We should probably deprecate the use of `font-lock-syntax-table`, indeed. Stefan