[gtksourceview] c.lang: highlight _t and _T types as c:type
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtksourceview] c.lang: highlight _t and _T types as c:type
- Date: Tue, 4 Jan 2022 20:14:57 +0000 (UTC)
commit cf4f362a5e8fb4b5a49848e6057176feea61740c
Author: Rosetta H&S <markredmann icloud com>
Date: Sun Jan 2 13:41:21 2022 -0600
c.lang: highlight _t and _T types as c:type
The following modifications provides automatic C/C++ syntax highlighting
of user-defined types
[ending with either "_t" or
"_T"](https://stackoverflow.com/questions/231760/what-does-a-type-followed-by-t-underscore-t-represent),
as is seen in editors/viewers such as Nano, Micro, Stack Overflow, or
within GitHub itself.
data/language-specs/c.lang | 1 +
1 file changed, 1 insertion(+)
---
diff --git a/data/language-specs/c.lang b/data/language-specs/c.lang
index 96489321..4b58326e 100644
--- a/data/language-specs/c.lang
+++ b/data/language-specs/c.lang
@@ -244,6 +244,7 @@
<keyword>void</keyword>
<keyword>wchar_t</keyword>
<keyword>wint_t</keyword>
+ <keyword>[a-z_][0-9a-z_]+(_t|_T)</keyword>
</context>
<context id="storage-class" style-ref="storage-class">
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]