[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#59498: 29.0.50; c++-ts-mode get wrong-type-argument error when enabl
From: |
Eason Huang |
Subject: |
bug#59498: 29.0.50; c++-ts-mode get wrong-type-argument error when enabled |
Date: |
Fri, 25 Nov 2022 20:56:36 +0800 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Randy Taylor <dev@rjt.dev> writes:
> On Wednesday, November 23rd, 2022 at 05:53, Eason Huang
> <aqua0210@foxmail.com> wrote:
>
>>
>>
>> But when I try to indent code,
>> it will raise the error (Wrong type argument: stringp, nil) again.
>> It should be a different bug.
>>
>> Steps to reproduce:
>>
>> After the step 4, try to type the code as below:
>>
>> int main(){
>> <-- put you cursor at the first colum 1, and then hit
>> TAB(indent-for-tab-command)
>>
>> }
>>
>> after you hit TAB at the above code, you will get the backtrace error as
>> below:
>>
>> Debugger entered--Lisp error: (wrong-type-argument stringp nil)
>> looking-at(nil t)
>> #f(compiled-function (&rest _) #<bytecode 0x18b0dfc57c56ebd8>)(nil
>> #<treesit-node (compound_statement) in 11-15> 13)
>>
>> #f(compiled-function (fn) #<bytecode
>> 0x188c898311f019af>)(#f(compiled-function (&rest _) #<bytecode
>> 0x18b0dfc57c56ebd8>))
>>
>> mapcar(#f(compiled-function (fn) #<bytecode 0x188c898311f019af>)
>> (#f(compiled-function (n parent &rest _) #<bytecode
>> 0x149caa867664fee9>) #f(compiled-function (&rest _) #<bytecode
>> 0x18b0dfc57c56ebd8>)))
>>
>> #f(compiled-function (node parent bol &rest _) #<bytecode
>> -0xb869f433d8fc770>)(nil #<treesit-node (compound_statement) in 11-15> 13)
>>
>> treesit--simple-indent-eval(((and (parent-is "comment") comment-end) nil
>> #<treesit-node (compound_statement) in 11-15> 13))
>>
>> treesit-simple-indent(nil #<treesit-node (compound_statement) in 11-15> 13)
>>
>> treesit--indent-1()
>> treesit-indent()
>> indent-according-to-mode()
>> electric-indent-post-self-insert-function()
>> newline(nil 1)
>> funcall-interactively(newline nil 1)
>> command-execute(newline)
>>
>>
>> --
>> Eason Huang
>>
>
> The attached patch fixes it for me.
>
>
Hi Randy,
Thanks for your patch, I tested on macOS 13.0.1. And I can confirm that it
fixes the issue of indentation.
Hope it can be merged to master.
--
Eason Huang
- bug#59498: 29.0.50; c++-ts-mode get wrong-type-argument error when enabled, Eason Huang, 2022/11/22
- bug#59498: 29.0.50; c++-ts-mode get wrong-type-argument error when enabled, Daniel MartÃn, 2022/11/23
- bug#59498: 29.0.50; c++-ts-mode get wrong-type-argument error when enabled, Eason Huang, 2022/11/23
- bug#59498: 29.0.50; c++-ts-mode get wrong-type-argument error when enabled, Randy Taylor, 2022/11/24
- bug#59498: 29.0.50; c++-ts-mode get wrong-type-argument error when enabled,
Eason Huang <=
- bug#59498: 29.0.50; c++-ts-mode get wrong-type-argument error when enabled, Eli Zaretskii, 2022/11/26
- bug#59498: 29.0.50; c++-ts-mode get wrong-type-argument error when enabled, Yuan Fu, 2022/11/26
- bug#59498: 29.0.50; c++-ts-mode get wrong-type-argument error when enabled, Eli Zaretskii, 2022/11/27
- bug#59498: 29.0.50; c++-ts-mode get wrong-type-argument error when enabled, Stefan Monnier, 2022/11/27
- bug#59498: 29.0.50; c++-ts-mode get wrong-type-argument error when enabled, Eli Zaretskii, 2022/11/27
- bug#59498: 29.0.50; c++-ts-mode get wrong-type-argument error when enabled, Yuan Fu, 2022/11/27
- bug#59498: 29.0.50; c++-ts-mode get wrong-type-argument error when enabled, Stefan Kangas, 2022/11/27
- bug#59498: 29.0.50; c++-ts-mode get wrong-type-argument error when enabled, Eason Huang, 2022/11/28
- bug#59498: 29.0.50; c++-ts-mode get wrong-type-argument error when enabled, Yuan Fu, 2022/11/27