A new emacs d-mode from scratch
Bill Baxter
dnewsgroup at billbaxter.com
Mon Jun 4 06:14:06 PDT 2007
Thomas de Grivel wrote:
> Bill Baxter wrote:
>> I changed the wiki (which is actually the authoritative version).
>
> Hi, I patched some strange indentation of class constructor brackets
> when they are on their own line :
>
> I like to type
>> class Foo
>> {
>> this ()
>> {
>> ...
>> }
>>
>> void bar ()
>> {
>> ...
>> }
>> }
>
> But the wiki's d-mode would give me this
>> class Foo
>> {
>> this ()
>> {
>> ...
>> }
>>
>> void bar ()
>> {
>> ...
>> }
>> }
>
> Modifying d-mode.el by adding "this" to *c-modifier-kwds* at line 146
> fixed it, and even if it does not exactly match the comment, it does not
> seem to break anything else. I am no D expert yet but I figured I would
> let you know, and I'm too shy to modify the wiki without prior asking =)
Hmm, well I'd be more interested in the fix if
A) I actually saw the problem in my setup (your code indents fine for me)
and
B) If you could explain why the fix (pretending it's a c-modifier-kwd)
works (which would also help clarify if it will have any unwanted side
effects).
--bb
More information about the Digitalmars-d-announce
mailing list