From 9f9ea16509b8b0cdf85b38828472d6fee6c7df7a Mon Sep 17 00:00:00 2001 From: Evangelos Ribeiro Tzaras Date: Fri, 11 Jun 2021 10:08:54 +0200 Subject: [PATCH] dir-locals: Treat G_* macros as including a semicolon Otherwise without appending a semicolon explicitly to the macros, emacs will insist on indentation. --- .dir-locals.el | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.dir-locals.el b/.dir-locals.el index df2c4f6..4920a14 100644 --- a/.dir-locals.el +++ b/.dir-locals.el @@ -1 +1,7 @@ -((nil . ((indent-tabs-mode . nil)))) +((nil . ((indent-tabs-mode . nil))) + ;; thanks to Mohammed Sadiq, see https://source.puri.sm/Librem5/calls/-/merge_requests/332#note_159469 + (c-mode . ((c-macro-names-with-semicolon + . ("G_BEGIN_DECLS" "G_END_DECLS" "G_DECLARE_FINAL_TYPE" "G_DEFINE_QUARK" + "G_DECLARE_DERIVABLE_TYPE" "G_DECLARE_INTERFACE" "G_DEFINE_TYPE" + "G_DEFINE_TYPE_WITH_PRIVATE" "G_DEFINE_ABSTRACT_TYPE" + "G_DEFINE_ABSTRACT_TYPE_WITH_PRIVATE")))))