ANN: Updated emacs d-mode v2.0.4
Bill Baxter
dnewsgroup at billbaxter.com
Wed Feb 27 13:25:56 PST 2008
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!
>>
> Thanks, that' great! But...
>
> 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
More information about the Digitalmars-d-announce
mailing list