Subject: bug#36678: 27.0.50; imenu not working in C++ (maybe because of namespace)

From: Alan Mackenzie <[email-masked]>
Date: Sun, 4 Aug 2019 08:51:06 +0000

Hello, Richard.

On Sat, Aug 03, 2019 at 22:56:19 -0400, Richard Stallman wrote:
> [[[ To any NSA and FBI agents reading my email: please consider    ]]]
> [[[ whether defending the US Constitution against all enemies,     ]]]
> [[[ foreign or domestic, requires you to follow Snowden's example. ]]]

>   > CC Mode has had imenu type indexing right from its inception.  What is
>   > changing is the increasing complexity of function definitions, in
>   > particular, the slow demise of the convention of function names being in
>   > column zero.

> Why is that happening?  Is there a practical benefit, or is it just
> a matter of fashion, or what?

In C++, it's largely the namespace, which is being used ever more.

Instead of writing

    namespace foo {
    int bar (int baz)
    {
        .....
    }
    .....
    }

, people are indenting within the namespace, something like

    namespace foo {
        int bar (int baz)
	{
	    ....
	}
	....
    }

.  Not all the time, but a lot of the time, possibly most of the time.
This indentation inside a namespace seems like a natural way to format a
program, and people are going to carry on doing it.

The issue is how we best deal with this.

> -- 
> Dr Richard Stallman
> President, Free Software Foundation (https://gnu.org, https://fsf.org)
> Internet Hall-of-Famer (https://internethalloffame.org)

-- 
Alan Mackenzie (Nuremberg, Germany).