|
From: D. M. <li...@mf...> - 2007-03-02 13:36:52
|
Bill Baxter wrote: > Howdy, I'm trying to update the Emacs d-mode here for the D > Programming Language: > http://www.prowiki.org/wiki4d/wiki.cgi?EditorSupport/EmacsDMode > I'd like to support more recent emacs/cc-mode better (while at the > same time not breaking backwards compatibility with previous emacs > releases). >=20 > The existing d-mode (above) seems to be in large part copied from a > previous csharp-mode.el that existed out on the net somewhere. But > that seems to be based on cc-mode before 5.30. If you are talking about my csharp-mode (http://mfgames.com/linux/csharp-= mode), it was based on derived mode. I don't know about any other csharp-modes, = mainly I stopped paying attention when mine worked 90%. :) > So I have a general question, and that's "how should I upgrade d-mode?"= > I found this: http://cc-mode.sourceforge.net/derived-mode-ex.el > example, which is a nice start, but unfortunately it doesn't really > customize all that much behavior, so as a template for making a new > mode, it's kind of limited. It also doesn't show how to maintain > backward compatibility. If it isn't based on that, you could probably easily modify it to fit. I = have most of the C# keywords all set in there, along with a couple more intere= sting ones. If you have any questions about how or why I did something, feel free to = ask. > Here's one specific question: >=20 > Is cc-mode capable of properly nested comments? Namely, D has two > block comment syntaxes, /* .. */ and /+ .. +/. The first acts like > C/C++ in that the comment is terminated on the first appearance of > "*/", but the second nests. so that e.g. > /+ ... /+ .. +/ /* */ +/ > is all one big comment. Sadly, I can't answer that. Cheers, Dylan |