bug-gnu-emacs
[Top][All Lists]
Advanced

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

Re: CC Mode 5.27 (); Adaptation of c-mode for awk-mode


From: Martin Stjernholm
Subject: Re: CC Mode 5.27 (); Adaptation of c-mode for awk-mode
Date: 20 Nov 2000 13:12:42 +0100

Miles Bader <miles@lsi.nec.co.jp> wrote:

> `awk-mode' currently uses c-mode to do indentation, which only really
> works well for awk programs that terminate all statements using
> semicolons.  Unfortunately, this means it doesn't work well for a
> majority of awk programs.
> 
> How hard would it be to parameterize c-mode so that it could regard
> newline as being a statement terminator, just like semicolon?  This
> would allow awk-mode to behave much more nicely.

Spontaneously I'd say quite difficult, but it depends on how thorough
you'd want it to be. As a start it might be enough just to modify
c-beginning-of-statement-1, which is used most of the time to back up
a statement during syntax recognition.

Otoh, if awk-mode should work really well it might be better off not
to be based on CC Mode. The syntaxes doesn't really have all that much
in common, so the parts of CC Mode that are useful might just as well
be ripped out or reimplemented.




reply via email to

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