Emacs & D wiki update

Bill Baxter dnewsgroup at billbaxter.com
Fri Mar 2 13:57:49 PST 2007


Brad Anderson wrote:
> Sean Kelly wrote:
>> Bill Baxter wrote:
>>> The bizarre thing is that I actually like the way it highlights D code
>>> *better* than Ben Hinkle's d-mode.  That's really bizarre.  I think
>>> it's just that's because it's based on emacs 22's cc-mode, so really
>>> all I'm seeing is the upgraded cc-mode at work.
>>>
>>> So realizing this, I decided to try to update Ben Hinkle's mode.  It
>>> now works for me at least in both Emacs 21 and 22.    You can get it
>>> here:
>>>    http://www.prowiki.org/wiki4d/wiki.cgi?EditorSupport/EmacsDMode
>>>
>>> Hopefully that will work for you.   If not, maybe tell me what version
>>> of emacs you have (M-x version) and what version of cc-mode you have
>>> (M-x c-version).  But honestly I'm not really much of an elisp hacker.
>>> I know just enough to be dangerous.  :-)
>> I'll give it a try.  The problem I ran into with the old d-mode was that
>> it didn't auto-indent some things properly, and Emacs tends to be pretty
>> heavy-handed in how it does auto-indenting.  With any luck this one will
>> work better.
> 
> Further, I'd be interested in how to get to some indent other than 2 spaces in
> d-mode...  Granted, I haven't looked very hard yet.  It's somewhere in
> c++-mode, I imagine.
> 
> BA

(setq c-basic-offset 4)

If you want to get fancy, put that in a mode-hook so it only gets set 
for some modes.  Check out the sample .emacs file in the cc-mode 
documentation:
http://cc-mode.sourceforge.net/html-manual/Sample-_002eemacs-File.html#Sample-_002eemacs-File

--bb



More information about the Digitalmars-d-announce mailing list