[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: good "modern" example code for a programming-language mode?

From: David Engster
Subject: Re: good "modern" example code for a programming-language mode?
Date: Wed, 16 Feb 2011 11:19:43 +0100
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.2 (gnu/linux)

Miles Bader writes:
> Michael Welsh Duggan <address@hidden> writes:
>> I don't have a good answer for you, but I'd like to see more new modes
>> based the semantic library.  It just seems like the right thing to do.
> Are there _any_ modes using it to handle "basic" language support
> (indentation, highlighting)....?

No. I also don't think that Semantic is well suited for that.

As for highlighting, there's already the semantic-decorate minor mode
which will highlight the semantical expressions found in the
buffer. When activating it, you'll already see that Semantic doesn't
parse the contents of functions, for example. It only parses (parts of)
the contents when you're within that function, to determine the
variables/types/etc. in the local scope.

Regarding indentation: this is much more a matter of taste than
semantics or syntax. If there was a direct connection between semantical
analysis and indentation, why were all those wars fought for the
"correct" indentation of C, for instance? Just looking at c-style-alist
will make that clear. There's also a very good write-up regarding this
issue from Steve Yegge when he dealt with indentation of Javascript:



reply via email to

[Prev in Thread] Current Thread [Next in Thread]