unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: "MadRabbit" <nemshilov@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: Need help with some changes in c-mode
Date: 21 Feb 2007 05:33:58 -0800	[thread overview]
Message-ID: <1172064838.055577.50280@j27g2000cwj.googlegroups.com> (raw)
In-Reply-To: <1172053551.099281.87630@l53g2000cwa.googlegroups.com>

> > 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	other threads:[~2007-02-21 13:33 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-17  6:34 Need help with some changes in c-mode nemshilov
2007-02-19 19:34 ` Glenn Morris
2007-02-20  4:03   ` nemshilov
2007-02-20 15:50     ` Robert Thorpe
2007-02-21  3:19       ` MadRabbit
2007-02-21 10:25         ` Robert Thorpe
2007-02-21 13:33           ` MadRabbit [this message]
2007-02-21 17:34             ` Robert Thorpe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1172064838.055577.50280@j27g2000cwj.googlegroups.com \
    --to=nemshilov@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).