Subject: 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 12:20:37 +0000

Hello again, Mohammed.

On Sat, Mar 25, 2017 at 17:33:41 +0530, Mohammed Sadiq wrote:

> > On March 25, 2017 at 4:21 PM Alan Mackenzie <[email-masked]> wrote:
> > 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?

> Hm. Probably No. But may be yes. :)

> In cc-vars.el, I saw '("Q_OBJECT" "Q_PROPERTY" "Q_DECLARE" "Q_ENUMS")
> set in GNU Emacs source. I believe that they are used in Qt. 

I think so too, but it's so long ago I can't remember for sure.  ;-)

> The values I said ("G_DECLARE", "G_DEFINE", "G_BEGIN_DECLS",
> "G_END_DECLS") are used extensively in GTk+ and is defined in GLib. As
> those both are GNU projects, I find it right to be included in GNU
> Emacs by default, especially since Qt variables are already included.

> I don't know if I'm wrong to say so.

No, maybe you're right, the default (which was intended as no more than
an illustration, rather than just having a null list as default)
probably should be symbols from a GNU project.  The four you list is a
short enough list not to be unreasonable as a default.  Let me mull this
over for a while.

But another thing that concerns me is, is there anything in the doc
strings or manual, or is there anything missing, which might make it
unclear that c-macro-names-with-semicolon is meant to be a configuration
variable?
 
-- 
Alan Mackenzie (Nuremberg, Germany).