From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#53260: char-syntax differs in interpreter and bytecode Date: Sat, 15 Jan 2022 17:51:26 -0500 Message-ID: References: <0A87E4BA-4741-4688-A005-912ABFC86B83@acm.org> <8735lpmm4f.fsf@gnus.org> <978B1D34-1F52-4B3E-B2E2-7ADA95155068@acm.org> Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="14342"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: Lars Ingebrigtsen , 53260@debbugs.gnu.org To: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jan 15 23:52:13 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1n8ru8-0003Vj-2m for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 15 Jan 2022 23:52:12 +0100 Original-Received: from localhost ([::1]:51464 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n8ru6-0001AT-Gv for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 15 Jan 2022 17:52:10 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:50052) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n8rty-0001A6-1C for bug-gnu-emacs@gnu.org; Sat, 15 Jan 2022 17:52:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:49306) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n8rtx-0001IO-OP for bug-gnu-emacs@gnu.org; Sat, 15 Jan 2022 17:52:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1n8rtx-0007EA-Nz for bug-gnu-emacs@gnu.org; Sat, 15 Jan 2022 17:52:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 15 Jan 2022 22:52:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53260 X-GNU-PR-Package: emacs Original-Received: via spool by 53260-submit@debbugs.gnu.org id=B53260.164228709827748 (code B ref 53260); Sat, 15 Jan 2022 22:52:01 +0000 Original-Received: (at 53260) by debbugs.gnu.org; 15 Jan 2022 22:51:38 +0000 Original-Received: from localhost ([127.0.0.1]:42209 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n8rta-0007DU-MZ for submit@debbugs.gnu.org; Sat, 15 Jan 2022 17:51:38 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:4929) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n8rtY-0007DC-Sk for 53260@debbugs.gnu.org; Sat, 15 Jan 2022 17:51:37 -0500 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 650EA1001AC; Sat, 15 Jan 2022 17:51:30 -0500 (EST) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 944BA10008C; Sat, 15 Jan 2022 17:51:28 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1642287088; bh=izLSPUVwWL/LKra3u/AYX0IaNOXi2RbKvdKIkS/DF90=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=YrlIUxKOeVMsJo2A8KvNcHGHyb2vn0xU4sUb1XXhRSYVGfJegIme3l8CLqNP1ygPm fIHb9FBN1W2ewAIfcFMwAcR/8E5XHFZTXWwEJl17kJlOzar0dxD/29O4lvWTn0KEdH +fyw0axUw5HE2SkzKdkYNmYYWnB66RcFzQOmZbcai6AdiMP6NTgYWrQzmoQGNzTpBM DE5UAOXdtwb3oPwl9x0CuEAliHU5eLQJXJDmCVvZ03SwIamW0MTZIwOdPj+y0Lj/8U YcYL3854DlmpGgKa+fSWWpdnnxyG2UKZxB7YsnAYVrAnXlmUsX95BDn7cDwT2Yfu8f gou5rfAmCCmNA== Original-Received: from pastel (unknown [216.154.30.173]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 38CC41203A9; Sat, 15 Jan 2022 17:51:28 -0500 (EST) In-Reply-To: <978B1D34-1F52-4B3E-B2E2-7ADA95155068@acm.org> ("Mattias =?UTF-8?Q?Engdeg=C3=A5rd?="'s message of "Sat, 15 Jan 2022 18:29:41 +0100") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:224355 Archived-At: > 1. Remove SETUP_BUFFER_SYNTAX_TABLE() from Fchar_syntax because as far as > I can tell it has no effect at all. Sounds good. > 2. Remove make_char_multibyte(c) from Bchar_syntax because it seems to be > the wrong thing to do: in a unibyte buffer, wouldn't the syntax table be > indexed by byte value (so that char 255 in the buffer corresponds to entry > 255 in the syntax table rather than entry 0x3fffff)? Doesn't sound right: char tables are indexed by chars (i.e. Unicode code points) not by bytes, so we need to convert the byte into a char before indexing. > 3. Now both implementations are identical. Replace the one in the byte-code > interpreter with a call to Fchar_syntax. Sounds good. Stefan