Editor Support /
Emacs Editor
Difference (last change) (no other diffs, normal page display)
Changed: 1c1
Option 1: EmacsDMode? is the latest D-mode for ![]() ![]() |
== d-mode for Emacs == |
Changed: 3c3
Option 2: For D support on Emacs 21.x only is Ben Hinkle's mode. The zip file ![]() |
The currently maintained version of the d-mode, compatible with Emacs 23 and Emacs 24, can be found at its ![]() |
Changed: 5c5
Note: Ben's version above does not work on versions of Emacs greater than 21.x. I've tried on 22.0.something and on a cvs checkout (23.0.0, emacs-unicode-2 branch), and the d-mode command caused the same errors on both. It seems like there might be some sort of api mismatch or something, but that's just a guess. -- <n>MichaelA?</n> September 20, 2006 |
This is the d-mode written from scratch by Bill Baxter and currently maintained by a small team of contributors. |
Changed: 7c7
Option 3: If that doesn't work for you then you can try java-mode. That seems to do a pretty decent job on D code. It's better than c++-mode, at least. Newer versions of emacs may have a csharp-mode too. |
== Support for older Emacsen == |
Changed: 9,10c9,11
Sort of an Option 3, but not really: For emacs 22.x, if you Google you may find another d-mode.el by Sam Steingold. This is not a d-mode for the D Programming Langauge, but a d-mode for some sort of C-like extension language for CLISP:![]() ![]() |
For D support on Emacs 21.x only is Ben Hinkle's mode. The zip file ![]() If that doesn't work for you then you can try java-mode. That seems to do a pretty decent job on D code. It's better than c++-mode, at least. Newer versions of emacs may have a csharp-mode too. |
Changed: 12,15c13,14
=== <n>History</n> === * Updated Dec 7, 2003 by Ben Hinkle ( ![]() * Updated Feb 24, 2007 by Bill Baxter * Updated Mar 2, 2007 by Bill Baxter |
For emacs 22.x, if you Google you may find another d-mode.el by Sam Steingold. This is not a d-mode for the D Programming Langauge, but a d-mode for some sort of C-like extension language for CLISP:![]() ![]() |
Changed: 17,18c16
===Emacs 22 for Win32= A note for windows Emacs users -- you can get a more recent version of emacs for Windows than the FSF's 21.x from the ![]() |
== Support for Compilation (M-x compile) == |
Deleted: 20d17
===Support for Compilation (M-x compile)= |
Added: 34a32
|
Changed: 59c57,58
===Support for flymake = |
== Support for flymake == |
Changed: 69c68
Change the d-mode-hook to something else if you're not in d-mode while editing .d -files. |
Change the d-mode-hook to something else if you're not in d-mode while editing .d -files. |
d-mode for Emacs
The currently maintained version of the d-mode, compatible with Emacs 23 and Emacs 24, can be found at its development page at Github.
This is the d-mode written from scratch by Bill Baxter and currently maintained by a small team of contributors.
Support for older Emacsen
For D support on Emacs 21.x only is Ben Hinkle's mode. The zip file d-mode.zip contains both d-mode and a few other tools that may or may not work on newer versions of Emacs.
If that doesn't work for you then you can try java-mode. That seems to do a pretty decent job on D code. It's better than c++-mode, at least. Newer versions of emacs may have a csharp-mode too.
For emacs 22.x, if you Google you may find another d-mode.el by Sam Steingold. This is not a d-mode for the D Programming Langauge, but a d-mode for some sort of C-like extension language for CLISP:
CLISP's d-mode (Here's an example of that
other D code if you're curious). The funny thing is that this actually does a reasonable job formatting and highlighting DigitalMars D code. I was using it happily for weeks before I realized it was a mode for the wrong D.
Support for Compilation (M-x compile)
Many of DMD's compilation error messages lack a category prefix (like "Error" or "Warning"). Without the category, the messages don't match Emacs' built-in error matching regexps used for M-x next-error after a M-x compile. That makes M-x compile unable to take you to the the file and line where the error is.
Add this to your .emacs and it should fix it.
![]() |
|
Also (this is Windows-specific) but if you don't have your DMD stuff always added to your path by default, you can add it in your .emacs. I always have an environment variable set called "DMDDIR" that points to where DMD is installed. Then I add this to my .emacs (uncomment the INCLUDE part if you have some default includes you want to add):
![]() |
|
Support for flymake
Flymake-mode is a mode for emacs which compiles edited files in the background and highlights possible errors. Here is a version modified to support dsss building.
(Note: the link above is currently broken. I've added a Flymake configuration example to the EmacsWiki?. -- GrahamFawcett?)
If you want to automatically enable flymake when editing .d files just add following somewhere where emacs can find it (.emacs):
![]() |
|
Change the d-mode-hook to something else if you're not in d-mode while editing .d -files.