From 897fa6ac0013133ee1c04cb38c7b3990d179d43d Mon Sep 17 00:00:00 2001 From: Justine Tunney Date: Thu, 14 Dec 2023 19:55:56 -0800 Subject: [PATCH] Add some Emacs keywords for CUDA --- tool/build/mkdeps.c | 2 +- tool/emacs/cosmo-c-keywords.el | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/tool/build/mkdeps.c b/tool/build/mkdeps.c index cd6414153..91dd299de 100644 --- a/tool/build/mkdeps.c +++ b/tool/build/mkdeps.c @@ -21,7 +21,6 @@ #include "libc/errno.h" #include "libc/fmt/libgen.h" #include "libc/fmt/magnumstrs.internal.h" -#include "libc/serialize.h" #include "libc/intrin/kprintf.h" #include "libc/limits.h" #include "libc/macros.internal.h" @@ -29,6 +28,7 @@ #include "libc/mem/mem.h" #include "libc/nexgen32e/crc32.h" #include "libc/runtime/runtime.h" +#include "libc/serialize.h" #include "libc/stdio/append.h" #include "libc/stdio/stdio.h" #include "libc/str/str.h" diff --git a/tool/emacs/cosmo-c-keywords.el b/tool/emacs/cosmo-c-keywords.el index f9fac4166..6d95663b4 100644 --- a/tool/emacs/cosmo-c-keywords.el +++ b/tool/emacs/cosmo-c-keywords.el @@ -9,6 +9,14 @@ "_Pragma" "_Complex")) + (cuda + '("__device__" + "__forceinline__" + "__global__" + "__shared__" + "__host__" + "__constant__")) + (c11 '("_Atomic" "alignas" @@ -217,6 +225,7 @@ ) (concat "\\_<" (regexp-opt (append + cuda c11 gnu clang