Subject: Re: bug#26207: CC Mode 5.32.99 (C/l); add more keywords to c-macro-names-with-semicolon

From: Alan Mackenzie <[email-masked]>
Date: Sat, 25 Mar 2017 10:51:08 +0000

Hello, Mohammed.

On Tue, Mar 21, 2017 at 22:17:18 +0530, Mohammed Sadiq wrote:

> Hi,

> Currently the following are the values set for
> `c-macro-names-with-semicolon':  ("Q_OBJECT" "Q_PROPERTY" "Q_DECLARE"
> "Q_ENUMS")

> The following glib (https://en.wikipedia.org/wiki/GLib) variables are
> extensively used in several projects including Gtk+. So it would be nice
> for those to be added too to `c-macro-names-with-semicolon':

> "G_BEGIN_DECLS" "G_END_DECLS" "G_DECLARE_FINAL_TYPE"
> "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"

> may be 'G_DEFINE_', 'G_DECLARE_', 'G_BEGIN_DECLS', and 'G_END_DECLS'
> shall cover most scenarios.

c-macro-names-with-semicolon is a user option, a configuration variable.
The idea is, each user (or project) sets up this variable in her/his/its
.emacs, probably best done in the hook c-mode-common-hook.  So, any user
can set up all these "G_..." macros if her source code uses them.

Or have I missed something here?

> Thanks

-- 
Alan Mackenzie (Nuremberg, Germany).