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 18:46:39 +0000

Hello, Mahammed.

On Sat, Mar 25, 2017 at 20:25:24 +0530, Mohammed Sadiq wrote:
> By the way, it seems like "Q_DECLARE" "Q_DEFINE" etc. are strings. But
> in the suggested case, G_BEGIN_DECLS and G_END_DECLS are strings
> while the others are regexps like "G_DEFINE[A-Z_]*" "G_DECLARE[A-Z_]".

I hadn't actually noticed that.  c-macro-names-with-semicolon can be
either a list of strings or a regular expression (but not a mixture of
the two ;-).

A regexp matching all four of the things above would look something
like:

    "G_\(\(BEGIN\|END\)_DECLS\|DE\(FINE\|CLARE\)[A-Z_]*\)"

(untested) (that's assuming that there should be a "*" at the end of
"G_DEECLARE[A-Z_]").  But here one must be careful - careful that there
aren't any macro names of that form which require one explicitly to
write a semicolon at their ends.

-- 
Alan Mackenzie (Nuremberg, Germany).