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

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

Re: Need help with some changes in c-mode


From: MadRabbit
Subject: Re: Need help with some changes in c-mode
Date: 21 Feb 2007 05:33:58 -0800
User-agent: G2/1.0

> > That's exactly what I do. There's a php-mode which derived from c-
> > mode. Most of problems are already solved. I need help with this one.
> > Can anyone give a piece of code?
>
> See line ~821 in sh-script.el in the distribution of GNU Emacs 21 to
> see how sh-mode deals with this problem.
> The solution should be quite transferable to PHP.

The problem is a bit differ. I've already defined font-locks and
there's no problem with colorizing #comments. The problem in it's
behavior.

When you're typing something like
--------------
# correct usual comment
$bla = "bla bla bla";
--------------
All are ok, but if you input something like "= - '%" in that comment.
The next line will be understood as a part of sentence which started
inside the comment. Like that
------------
# $a =
.........."bla bla bla";
------------
The second line will have an indentation and behave like a part of "$a
= " sentence which started in the comment. I guess this is case c-mode
handles text inside #-comments and I don't know how to switch it off.



reply via email to

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