GNU bug report logs -
#59807
29.0.60; [PATCH] python-ts-mode does not auto-complete the closing quote
Previous Next
Reported by: Kai Ma <justksqsf <at> gmail.com>
Date: Sat, 3 Dec 2022 22:28:02 UTC
Severity: normal
Tags: patch
Found in version 29.0.60
Done: Yuan Fu <casouri <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
Message #11 received at 59807 <at> debbugs.gnu.org (full text, mbox):
> On Dec 3, 2022, at 11:19 PM, Eli Zaretskii <eliz <at> gnu.org> wrote:
>
>> From: Kai Ma <justksqsf <at> gmail.com>
>> Date: Sun, 04 Dec 2022 06:27:18 +0800
>>
>> When electric-pair-mode is enabled, a single quote ' should be auto
>> completed to be '' (which means an empty string). Python-mode correctly
>> does this, but python-ts-mode does not. This is clearly a problem
>> regarding the syntax table.
>>
>> The attached patch makes python-ts-mode uses the same syntax table as
>> python-mode's, and fixes this problem. I also checked a few other ts
>> modes, and some also have this issue. For example, js-ts-mode does not
>> auto complete '' either, which is also fixed by this patch.
>>
>>> From 7f996826bc47bcdd155eb0cc220a48c32cb2619a Mon Sep 17 00:00:00 2001
>> From: Kai Ma <justksqsf <at> gmail.com>
>> Date: Sun, 4 Dec 2022 06:15:42 +0800
>> Subject: [PATCH] Fix syntax tables of tree-sitter modes
>>
>> Tree-sitter modes should use the same syntax table as the
>> non-tree-sitter ones.
>> * lisp/progmodes/csharp-mode.el (csharp-mode-syntax-table)
>> (csharp-mode):
>> * lisp/progmodes/js.el (js-mode-syntax-table) (js-ts-mode):
>> * lisp/progmodes/python.el (python-ts-mode):
>> * lisp/progmodes/sh-script.el (bash-ts-mode):
>> * lisp/textmodes/css-mode.el (css-ts-mode):
>
> Thanks, but please format the log message according to our conventions:
> there should be a description of the actual changes after the last colon.
>
> Yuan, is it really true that the syntax tables in treesit-supported modes
> should be always identical to those of the non-treesit modes? Or maybe
> there could be subtle differences?
IMO yes. But since I’m not the original author of some of the modes, I included Theo for his opinion.
Yuan
This bug report was last modified 2 years and 217 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.