www.digitalmars.com         C & C++   DMDScript  

D - first cut at Emacs mode for D

reply "Ben Hinkle" <bhinkle4 juno.com> writes:
I've put a first cut at an emacs mode for D in the uploads section of

http://dlanguage.netunify.com/38

The basic support is for most of the syntax and keywords and font-lock for
highlighting. Some D-specific constructs aren't supported like nested
comments (I've been wrestling with cc-engine.el to figure out how cc-mode
parses comments -ugh!), but in general I've found it does a reasonable job
with most of the sample files and phobos.

Hopefully I'm not sucking up too much of the upload space. If I am I'll find
another spot to park it. I also added an entry to that wiki for emacs. I've
only tried it on Windows but I don't imagine linux emacs would have any
problem.

enjoy,
-Ben Hinkle
Aug 25 2003
parent "Charles Sanders" <sanders-consulting comcast.net> writes:
Cool :).

Maybe put a line on the site about using

(require 'd-mode)
(setq auto-mode-alist (cons '("\\.d\\'" . d-mode) auto-mode-alist))

in ~/.emacs to auto load it

Also I have

(setq c-default-style "bsd")

which seems to clash with the d-mode

Error:
File mode specification error: (wrong-type-argument listp "bsd")

Charles

"Ben Hinkle" <bhinkle4 juno.com> wrote in message
news:bieabb$2mvr$1 digitaldaemon.com...
 I've put a first cut at an emacs mode for D in the uploads section of

 http://dlanguage.netunify.com/38

 The basic support is for most of the syntax and keywords and font-lock for
 highlighting. Some D-specific constructs aren't supported like nested
 comments (I've been wrestling with cc-engine.el to figure out how cc-mode
 parses comments -ugh!), but in general I've found it does a reasonable job
 with most of the sample files and phobos.

 Hopefully I'm not sucking up too much of the upload space. If I am I'll

 another spot to park it. I also added an entry to that wiki for emacs.

 only tried it on Windows but I don't imagine linux emacs would have any
 problem.

 enjoy,
 -Ben Hinkle

Aug 25 2003