GNU bug report logs - #18158
Fix extra indent of d-mode "else static if" statements in cc-engine.el

Previous Next

Packages: emacs, cc-mode;

Reported by: Liran Zvibel <liranz <at> gmail.com>

Date: Thu, 31 Jul 2014 17:17:01 UTC

Severity: normal

Full log


View this message in rfc822 format

From: Alan Mackenzie <acm <at> muc.de>
To: Liran Zvibel <liranz <at> gmail.com>
Cc: 18158 <at> debbugs.gnu.org, Stefan Kangas <stefan <at> marxist.se>
Subject: bug#18158: Fix extra indent of d-mode "else static if" statements in cc-engine.el
Date: Fri, 31 Jan 2020 19:41:03 +0000
Hello, Liran.

Many thanks for the sample D file.  I can indeed reproduce the problem,
and I'm looking into ways of fixing it properly, thus removing the need
for the workarounds which have found their way into d-mode.el.

On Tue, Jan 28, 2020 at 17:26:41 -0800, Liran Zvibel wrote:
> @("notrace") JSONValue objToJSON(T)(auto ref const T obj) @trusted {
>     alias U = Unqual!T;
>     static if (is(U == JSONValue)) {
>         return obj;
>     }
>     else static if (__traits(compiles, obj.toJSON())) {
>         return obj.toJSON();
>     }
>     else static if (is(U == typeof(null))) {

[ .... ]

>             }
>         }
>     }
> :


> > On Jan 26, 2020, at 7:29 AM, Alan Mackenzie <acm <at> muc.de> wrote:

> > Hello, Stefan and Liran.

> > On Mon, Jan 20, 2020 at 22:18:05 +0100, Stefan Kangas wrote:
> >> Hi Alan,

> >> Could you please help review also the below patch for cc-engine.el?

> > I'm less than happy about putting a special purpose workaround into a
> > critical bit of CC Mode (c-add-stmt-syntax) without having even seen the
> > problem.

> > Liran, if you're still there and still interested, could you possibly
> > supply me with a sample of D source code containing the problem?  I
> > would hope to be able to enhance CC Mode to handle it in a more general
> > and useful fashion.

-- 
Alan Mackenzie (Nuremberg, Germany).




This bug report was last modified 4 years and 260 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.