www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.announce - ANN: Updated emacs d-mode v2.0.4

reply Bill Baxter <dnewsgroup billbaxter.com> writes:
New version of Emacs D-mode!

* Andrei sent me a fix for the long standing problem with indentation of 
the "else static if" clauses.

* Also I figured out how to get the line after "debug if(something) {" 
to indent properly.

The code is here:
http://www.prowiki.org/wiki4d/wiki.cgi?EditorSupport/EmacsDMode

Enjoy!

--bb
Feb 26 2008
parent reply =?ISO-8859-1?Q?=22J=E9r=F4me_M=2E_Berger=22?= <jeberger free.fr> writes:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Bill Baxter wrote:
 New version of Emacs D-mode!
 
 * Andrei sent me a fix for the long standing problem with indentation of
 the "else static if" clauses.
 
 * Also I figured out how to get the line after "debug if(something) {"
 to indent properly.
 
 The code is here:
 http://www.prowiki.org/wiki4d/wiki.cgi?EditorSupport/EmacsDMode
 
 Enjoy!
 

I first clicked on the download link at the top of the page, and it took me a while to understand why I kept getting version 2.0.1 and where this version 2.0.4 you're speaking of was. Would it be possible to update the download link too? Jerome - -- +------------------------- Jerome M. BERGER ---------------------+ | mailto:jeberger free.fr | ICQ: 238062172 | | http://jeberger.free.fr/ | Jabber: jeberger jabber.fr | +---------------------------------+------------------------------+ -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (GNU/Linux) iD8DBQFHxb99d0kWM4JG3k8RApBOAKCSGQRYjlD/STuUZmD4DfibIf5ipgCggIn2 pIWqk9VgOPj/cGYJMAg74pU= =E0Gd -----END PGP SIGNATURE-----
Feb 27 2008
parent Bill Baxter <dnewsgroup billbaxter.com> writes:
Jérôme M. Berger wrote:
 -----BEGIN PGP SIGNED MESSAGE-----
 Hash: SHA1
 
 Bill Baxter wrote:
 New version of Emacs D-mode!

 * Andrei sent me a fix for the long standing problem with indentation of
 the "else static if" clauses.

 * Also I figured out how to get the line after "debug if(something) {"
 to indent properly.

 The code is here:
 http://www.prowiki.org/wiki4d/wiki.cgi?EditorSupport/EmacsDMode

 Enjoy!

I first clicked on the download link at the top of the page, and it took me a while to understand why I kept getting version 2.0.1 and where this version 2.0.4 you're speaking of was. Would it be possible to update the download link too?

Didn't even realize that was there. Someone else must have added it to the page. Sure thing. Here's the new link: http://www.billbaxter.com/etc/d-mode.el I think the static if thing still isn't really working properly. It seems ok for fully-braced static if / else static if now: static if (...) { stuff } else static if (...) { more stuff } else { } But this from d2 std.traits doesn't work right: template unsigned(T) { static if (is(T == byte)) alias ubyte unsigned; else static if (is(T == short)) alias ushort unsigned; else static if (is(T == int)) alias uint unsigned; else static if (is(T == long)) alias ulong unsigned; else static if (is(T == ubyte)) alias ubyte unsigned; else static if (is(T == ushort)) alias ushort unsigned; else static if (is(T == uint)) alias uint unsigned; else static if (is(T == ulong)) alias ulong unsigned; else static if (is(T == char)) alias char unsigned; else static if (is(T == wchar)) alias wchar unsigned; else static if (is(T == dchar)) alias dchar unsigned; else static if(is(T == enum)) { static if (T.sizeof == 1) alias ubyte unsigned; else static if (T.sizeof == 2) alias ushort unsigned; else static if (T.sizeof == 4) alias uint unsigned; else static if (T.sizeof == 8) alias ulong unsigned; else static assert(false, "Type " ~ T.stringof ~ " does not have an unsigned counterpart"); } I suspect the change to cc-mode I suggested earlier may still be necessary. --bb
Feb 27 2008