unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Alan Mackenzie <acm@muc.de>
To: "Lennart Borgman \(gmail\)" <lennart.borgman@gmail.com>
Cc: Eric Lilja <mindcooler@gmail.com>, Emacs Devel <emacs-devel@gnu.org>
Subject: Re: A bad indentation made by C
Date: 22 Apr 2007 16:17:17 +0200	[thread overview]
Message-ID: <20070422153743.GB2402@muc.de> (raw)
In-Reply-To: <462B5818.8030008@gmail.com>

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.

  reply	other threads:[~2007-04-22 14:17 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-22 11:28 A bad indentation made by C Lennart Borgman (gmail)
2007-04-22 12:02 ` Alan Mackenzie
2007-04-22 12:42   ` Lennart Borgman (gmail)
2007-04-22 14:17     ` Alan Mackenzie [this message]
2007-04-22 14:50       ` Lennart Borgman (gmail)
2007-04-22 17:50         ` Alan Mackenzie
2007-04-23  4:49         ` Stefan Monnier
2007-04-23  5:29           ` Lennart Borgman (gmail)

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=20070422153743.GB2402@muc.de \
    --to=acm@muc.de \
    --cc=emacs-devel@gnu.org \
    --cc=lennart.borgman@gmail.com \
    --cc=mindcooler@gmail.com \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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).