emacs-devel
[Top][All Lists]
Advanced

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

Re: address@hidden: C indentation (problem)]


From: Alan Mackenzie
Subject: Re: address@hidden: C indentation (problem)]
Date: 19 Mar 2007 21:08:20 +0100
Date: Mon, 19 Mar 2007 21:26:05 +0000
User-agent: Mutt/1.5.9i

Hi, Thomas!

On Mon, Mar 19, 2007 at 01:14:54AM -0400, Richard Stallman wrote:
> Would someone please DTRT and ack?

You wrote:
> In the emacs pretest I have indentation problems running php-mode.

> The indentation breaks if I put in a php opening tag, otherwise it
> works fine.  I have tracked the source of the problem to the new c-mode
> which php-mode inherits.

Could you do a few things to help me diagnose this, please:

(i) Tell me about this PHP Mode.  Where do I find the PHP Mode that you
are using?  Who maintains it?  (Yourself, perhaps?)  It doesn't seem to
be part of Emacs 22 itself.  The information you've posted says "Major
mode: C/l", which isn't "PHP Mode".  How does php-mode work, here?
[Note: I don't know PHP, so be gentle on me, please!]

(ii) You say:
> The indentation breaks if I put in a php opening tag, otherwise it
> works fine.  I have tracked the source of the problem to the new c-mode
> which php-mode inherits.

Could you be more specific about what you've found here, please.  What
exactly have you found C Mode doing?  What version of CC Mode were you
using before which seemed to work all right? 

(iii) Could you post a dump of CC Mode's configuration.  You get this
with C-c C-b (or M-x c-submit-bug-report).

You say:
> This is the indentation in c-mode (it is the same in php-mode):
>
> <?   php
> void foo() {
>       bar();
>      }
> ?>

In that little code snippet, could you please do C-u C-c C-s on each
line, to dump CC Mode's idea of each line's syntax, then post the
results.

> I am not sure if it's a bug or the ancient php-mode just needs to
> accommodate for the new emacs.

"<" and ">" are nasty tokens in C-like languages.  They can appear as
"i < 10", "#include <stdio.h>" and in C++ templates.  It could be that
the PHP "<?" is getting confused with one of these other uses.

Looking forward to hearing from you again,

-- 
Alan Mackenzie (Ittersbach, Germany).




reply via email to

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