[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#61691: (wrong-type-argument stringp nil) error when indenting some C
From: |
Daniel Martín |
Subject: |
bug#61691: (wrong-type-argument stringp nil) error when indenting some C code in c-ts-mode |
Date: |
Wed, 22 Feb 2023 00:23:37 +0100 |
Tags: patch
Given the following code in c-ts-mode:
int
foo ()
{
int c;
if (!CHAR_VALID_P (c))
/* This is a comment. */
c = 'a';
return c;
}
If point is in line "c = 'a'" and you press TAB, a (wrong-type-argument
stringp nil) error is thrown.
The attached patch fixes the problem by checking the return value of
(treesit-node-field-name node) before passing the result to
string-match-p.
0001-Fix-wrong-argument-error-indenting-C-code-in-c-ts-mo.patch
Description: Text Data
- bug#61691: (wrong-type-argument stringp nil) error when indenting some C code in c-ts-mode,
Daniel Martín <=