[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: A bad indentation made by C
From: |
Alan Mackenzie |
Subject: |
Re: A bad indentation made by C |
Date: |
22 Apr 2007 16:17:17 +0200 |
Date: |
Sun, 22 Apr 2007 16:37:43 +0100 |
User-agent: |
Mutt/1.5.9i |
Hallo again, Lennart!
On Sun, Apr 22, 2007 at 02:42:00PM +0200, Lennart Borgman (gmail) wrote:
> Hi, Alan!
> >On Sun, Apr 22, 2007 at 01:28:25PM +0200, Lennart Borgman (gmail)
> >wrote:
> >>but for php-mode.el. The php-mode I am using/distributing is derived
> >>from c-mode. It uses c-indent-line. That works in many circumstances
> >>but not all.
> >>A rather annoying indentation is the following
> >> for (;;) {
> >> }
> >>This happens only if the for-loop is on top level, but that happens
> >>all the time in PHP. Maybe that little thing could be changed in
> >>c-indent-line? Or maybe someone can help me a bit to fix this in
> >>php-mode.el?
> >As a pure guess, the indentation of the "}" to column 1 probably comes
> >from `c-gnu-impose-minimum' which is installed on
> >c-special-indent-hook for the style "gnu". If you set a different
> >style (e.g. by C-c .), this problem might go away. Or remove it from
> >c-special-indent-hook in php-mode-hook or one of CC Mode's hooks.
> Thanks, that helped. But now I have one of my favourite questions I
> seldom ask: How do I make a local hook so much nil so that the global
> hook is not run?
Sorry, I can't parse that (but I do understand about writing foreign
languages). Which local hook, which global hook? When do you not wan't
which global hook to run?
> >The php-mode.el at SourceForge, when I last looked at it, didn't look
> >like it was being actively maintained. The latest release was from
> >2003, and it didn't appear to have been updated for CC Mode 5.30
> >(which superseded 5.28 in summer 2003).
> I have tried to contact the author, Turadg, but he has not replied (yet).
It might well me that he (?she) has simply lost interest and given up on
the project. I hope you get an answer sometime, though.
> >I think that php-mode.el needs a serious amount of work done on it to
> >bring it up to date with the current CC Mode. It would probably be
> >better to wait till after the release to do this. ;-)
> I have done a bit of work on it, but not very much since I do not
> understand most of it.
Where's that little word "yet"? ;-)
> I have uploaded the slightly changed version here:
[ .... ]
> If you want to have a look at it it would be nice. I think that there
> can be some interest in it again, especially when used in nXhtml (or
> something similar perhaps).
Well, I'm struggling a bit to keep up with everything on CC Mode, so I'm
not really in a position to take on anything extra.
--
Alan.