emacs-devel
[Top][All Lists]
Advanced

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

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


From: Andy Moreton
Subject: Re: good "modern" example code for a programming-language mode?
Date: Wed, 16 Feb 2011 13:59:17 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (windows-nt)

On Wed 16 Feb 2011, David Engster wrote:

> 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.

Semantic seems quite heavyweight, and is not that well documented. the
manul reads more as describing a box of parts, but doesn't really
provide much help in assembling them into something useful. It would
benefit from being split into a user guide and and an internals manual,
with some worked examples for both.

> 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.

Broaden your thoughts: there are other languages beyond C. In some of
them (e.g. python, haskell) indentation is semantically significant.

    AndyM




reply via email to

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